From 727099230640361b86afba39d1de2479eb64211f Mon Sep 17 00:00:00 2001 From: Scott McCarty Date: Wed, 18 Nov 2026 12:27:57 +0000 Subject: [PATCH] feat: Ashigaru 3.3.0 and the /ashigaru skill in managed skills (a317) Bump the pinned Ashigaru RPM to 3.3.0 and link the skill it ships (/usr/share/ashigaru/skills/ashigaru) into Claude Code's managed skills folder, /etc/claude-code/.claude/skills, since HOME is a volume. The image sets ASHIGARU_URL to the Desk; the key stays the unit's. The 3.3.0 CLI has no --version, so the build and container.yml check the installed version through rpm -q and ashigaru.__version__. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01R7Y1jgQzPHsAyyjYY7kKir --- .github/workflows/container.yml | 5 +++++ CHANGELOG.md | 11 +++++++++++ Containerfile | 19 +++++++++++++++++-- README.md | 9 ++++++--- tests/test_containerfile.py | 21 +++++++++++++++++++++ 5 files changed, 60 insertions(+), 5 deletions(-) diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml index b2be153..8e0da92 100644 --- a/.github/workflows/container.yml +++ b/.github/workflows/container.yml @@ -59,6 +59,11 @@ jobs: test -x /usr/libexec/developer/seat-state test -x /usr/libexec/developer/ashigaru-hook ashigaru --help > /dev/null + test "$(rpm -q --qf "%{VERSION}" ashigaru)" = 3.3.0 + test "$(python3 -c "import ashigaru; print(ashigaru.__version__)")" = 3.3.0 + test -f /etc/claude-code/.claude/skills/ashigaru/SKILL.md + grep -q "^name: ashigaru$" /etc/claude-code/.claude/skills/ashigaru/SKILL.md + test "$ASHIGARU_URL" = https://ashigaru.crunchtools.com echo "{}" | /usr/libexec/developer/ashigaru-hook stop python3 -m json.tool /etc/claude-code/managed-settings.d/40-developer-seat.json > /dev/null ' diff --git a/CHANGELOG.md b/CHANGELOG.md index 66df899..dd51267 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,17 @@ All notable changes to this project are documented here. The format follows ## [Unreleased] +### Added +- The `/ashigaru` skill, from the Ashigaru RPM, linked into Claude Code's + managed skills folder (`/etc/claude-code/.claude/skills/ashigaru`), so every + seat and Josui Prime can run it. josui-skills' `/agents` is unchanged. +- `ASHIGARU_URL` defaults to `https://ashigaru.crunchtools.com`. The key still + comes only from the unit; without it `ashigaru` says "no API key" and + ashigaru-hook stays silent. + +### Changed +- Ashigaru 3.0.0 to 3.3.0 (`ASHIGARU_VERSION`, `ASHIGARU_SHA256`). + ## [1.16.0] - 2026-11-18 ### Added diff --git a/Containerfile b/Containerfile index c871feb..95417df 100644 --- a/Containerfile +++ b/Containerfile @@ -74,8 +74,8 @@ ARG CLAUDE_AGENT_VERSION=1.2.0 # which is this base's too. A bump is these two lines: the version and the # sha256 of that release's fc43 RPM. Only one RPM is installed (noarch, one # dist), so one hash covers it. -ARG ASHIGARU_VERSION=3.0.0 -ARG ASHIGARU_SHA256=6c493397db5867f3de1c9d3156fa438d4196db406cabd51563be127465129758 +ARG ASHIGARU_VERSION=3.3.0 +ARG ASHIGARU_SHA256=23840a7d32f50071021fcc187d38997bd1ddcccded0716a34a930113630f3379 USER 0 @@ -126,6 +126,12 @@ RUN dnf -y upgrade && \ # build here rather than shipping a seat without the CLI. The RPM is unsigned # and rpm.yml uploads with --clobber, so the asset at that URL can be replaced: # the pinned hash, not TLS, is what says this is the file that was reviewed. +# +# The RPM ships the /ashigaru skill under /usr/share/ashigaru/skills. HOME is +# a volume, so ~/.claude/skills cannot carry it: it is linked into Claude +# Code's managed skills folder, /etc/claude-code/.claude/skills, which every +# session loads beside the josui-skills links in ~/.claude/skills. A link, not +# a copy, so a version bump brings its own skill with it. RUN rpm=/tmp/ashigaru-${ASHIGARU_VERSION}-1.fc43.noarch.rpm && \ curl -fsSL -o "$rpm" \ "https://github.com/crunchtools/ashigaru/releases/download/v${ASHIGARU_VERSION}/${rpm##*/}" && \ @@ -134,6 +140,10 @@ RUN rpm=/tmp/ashigaru-${ASHIGARU_VERSION}-1.fc43.noarch.rpm && \ rm -f "$rpm" && \ dnf -y clean all && \ rm -rf /var/cache/dnf && \ + mkdir -p /etc/claude-code/.claude/skills && \ + ln -s /usr/share/ashigaru/skills/ashigaru /etc/claude-code/.claude/skills/ashigaru && \ + test -f /etc/claude-code/.claude/skills/ashigaru/SKILL.md && \ + test "$(rpm -q --qf '%{VERSION}' ashigaru)" = "$ASHIGARU_VERSION" && \ ashigaru --help > /dev/null # uid 1000 is the base's own `podman` user, with the subuid ranges that make @@ -158,7 +168,12 @@ RUN chmod 0755 /usr/local/bin/developer-entrypoint /usr/local/bin/developer-work # PYTEST_XDIST_AUTO_NUM_WORKERS: `-n auto` (trentina's addopts) otherwise # starts one ~280 MB worker per host core -- 24 here -- which is past the # seat's memcg, and the OOM killer takes the Claude session with the tests. +# ASHIGARU_URL is where the Desk is, which is config: the image says it once +# rather than every unit. The key is not, and comes only from the unit +# (ASHIGARU_API_KEY_FILE); without one `ashigaru` stops with "no API key" and +# ashigaru-hook stays silent, as before. ENV HOME=/home/podman \ + ASHIGARU_URL=https://ashigaru.crunchtools.com \ LANG=C.UTF-8 \ PYTEST_XDIST_AUTO_NUM_WORKERS=4 \ JOSUI_CONFIG_DIR=/etc/josui \ diff --git a/README.md b/README.md index 20143bf..4414a61 100644 --- a/README.md +++ b/README.md @@ -82,9 +82,12 @@ for about a minute, until Claude Code's idle notification ends it; if someone types in that minute, it stays `active` until the next turn ends. The same events also go to the Ashigaru Desk through `ashigaru hook`, which -applies the same rules. That hook does nothing until the seat is given -`ASHIGARU_URL` and a key (`ASHIGARU_API_KEY_FILE`, or `ASHIGARU_API_KEY`); both -run until the cutover retires seat-state.json. +applies the same rules. The image sets `ASHIGARU_URL` to +`https://ashigaru.crunchtools.com`; the hook does nothing until the seat is +also given a key (`ASHIGARU_API_KEY_FILE`, or `ASHIGARU_API_KEY`). Both run +until the cutover retires seat-state.json. The Ashigaru RPM's `/ashigaru` +skill is linked into Claude Code's managed skills folder, +`/etc/claude-code/.claude/skills`, so every seat has it beside josui-skills. A worker with `JOSUI_MATRIX_HOMESERVER` set is held by `claude-agent run` instead: one session that the Matrix bridge texts into, Remote Control reaches diff --git a/tests/test_containerfile.py b/tests/test_containerfile.py index 6467aa9..cf538bf 100644 --- a/tests/test_containerfile.py +++ b/tests/test_containerfile.py @@ -26,3 +26,24 @@ def test_the_rpm_is_pinned_by_sha256(self) -> None: self.assertRegex(args["ASHIGARU_VERSION"], r"^\d+\.\d+\.\d+$") self.assertRegex(args["ASHIGARU_SHA256"], r"^[0-9a-f]{64}$") self.assertIn("sha256sum -c --strict", CONTAINERFILE.read_text()) + + +class AshigaruSkillTest(unittest.TestCase): + # HOME is a volume, so the skill reaches Claude Code only through the + # managed skills folder; the image build and container.yml check the link + # resolves to the RPM's SKILL.md. + def test_the_rpm_skill_is_linked_into_managed_skills(self) -> None: + self.assertIn( + "ln -s /usr/share/ashigaru/skills/ashigaru /etc/claude-code/.claude/skills/ashigaru", + CONTAINERFILE.read_text(), + ) + + def test_the_build_checks_the_installed_version(self) -> None: + self.assertIn( + 'rpm -q --qf \'%{VERSION}\' ashigaru)" = "$ASHIGARU_VERSION"', CONTAINERFILE.read_text() + ) + + def test_the_image_points_at_the_desk_but_carries_no_key(self) -> None: + text = CONTAINERFILE.read_text() + self.assertRegex(text, r"(?m)^\s+ASHIGARU_URL=https://ashigaru\.crunchtools\.com \\$") + self.assertNotIn("ASHIGARU_API_KEY=", text)