Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
'
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 17 additions & 2 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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##*/}" && \
Expand All @@ -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
Expand All @@ -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 \
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 21 additions & 0 deletions tests/test_containerfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Loading