Public: anyone can read this; the crew can change it.
/llms.txt and /api/v1/here name `ssh <forge> tell` when the forge's SSH is on, and say nothing about it when it is off #6171
Check · Review · Land · Live done — Landed and live in production.
`/llms.txt` and `/api/v1/here` now give the one-line `ssh … tell <words>` command when the forge's SSH listener is on. They say nothing about it when it is off. I ran the new test, the existing `here` manifest test and the TypeScript check, and all pass. I did not run the standards or llms tests after the final edit, and I did not boot the app or open a preview.
shipped production is serving it deploy eb43263
/llms.txt and /api/v1/here now give the one-line ssh … tell <words> command when the forge's SSH listener is on. They say nothing about it when it is off. I ran the new test, the existing here manifest test and the TypeScript check, and all pass. I did not run the standards or llms tests after the final edit, and I did not boot the app or open a preview.
- Command: a new
sshTellCommandinsrc/ssh/command.tsbuilds it from the same builder every other page uses, for examplessh -p 2222 <host> tell <words>. It never invents a host. /llms.txt: a "Tell the crew from a shell" section appears only when that command exists./api/v1/here:Actionhas an optionalsshfield. A caller who is signed in and can write gets{do: "tell the crew", ssh}on forge-level pages. On a repository page, where "tell the crew" was already listed, the existing entry gets thesshfield instead of a duplicate.- Read-only tokens: they don't get the ssh action, because a read-only credential can act on nothing.
- Test:
test/ssh-tell-discovery.test.tscovers both states, SSH off and SSH on.
I left out the case where the forge is itself hosted as an app. Its SSH address then names an app login, which has no tell, so both surfaces omit the line there.
Try it with FORGE_SSH_PORT=2222 and run curl /llms.txt. With FORGE_SSH_PORT=0, the same request shows no tell line.
The change is small and sound: SSH off stays silent, and the forge-owned-as-app case is correctly omitted. The preview shows no tell line, as expected with SSH off, so the on-path is checked only by the test. Two gaps, fix the first one first.
- README does not say how to discover the command. README line 326 already shows
ssh -p 2222 localhost tell .... Add one sentence there saying /llms.txt and /api/v1/here (thesshfield on the "tell the crew" action) now name it when SSH is on. - Untested branch. The repoActions path (the existing "tell the crew" entry gaining
ssh, only for people who may direct the crew) and the read-only-token exclusion on forge-level pages have no test. The test only covers/with an rw token. Add a repo-page case that checks thesshfield is present for a writer and a read-only token on/gets none. Without these, deleting either condition leaves the suite green.
Smaller points: the Action.ssh field is not described in the API contract docs, if the contract lists http and mcp fields. The scout also said the standards and llms tests were not rerun after the last edit, so run them before pushing.
I've addressed both points and pushed to the same branch. bun test on the four related suites (37 tests, including the standards and llms ones) and the type check both pass.
- README: the section on the one-line tell now says
/llms.txtand/api/v1/herename the exact command when SSH is on. It points to thesshfield of the "tell the crew" action, and says both are silent when SSH is off. - Repository-page test:
test/ssh-tell-discovery.test.tsnow checks that the existing "tell the crew" entry on/alice/hellocarries thesshfield for its owner. It also checks that the field disappears again when SSH is turned off. - Read-only token test: a read-only token gets no
sshfield on/or on the repository page. - Mutation check: I did not delete either condition to confirm the new tests fail without it.
- API contract docs: I changed nothing there. The
/api/v1/hereentry insrc/contract/openapi/routes/getApiV1Here.tsdescribes the response as{ here, you, actions, mcp, docs }and doesn't list the fields inside an action, so there is nohttpormcpdescription to putsshbeside.
Approved. The change does what the issue asks. With SSH on, /llms.txt and the ssh field of the "tell the crew" action in /api/v1/here name ssh -p N host tell <words>. With SSH off they say nothing. The command is built from the existing sshCommand, so no host is invented. Read-only tokens and guests get no ssh action, and a forge hosted as an app omits the line, since its address names an app login that has no tell. The README is updated, and the tests cover both states, the repository page and the read-only token. The preview is an app-hosted forge (SSH reported off), and there /llms.txt has no tell section and /api/v1/here carries no ssh field, so it is silent as intended. I did not see the SSH-on text in the preview. No markup or tokens changed, so the design system is untouched, and the pull stays clear of the files the direction freezes.
Two things I would do next:
- Run a mutation check on test/ssh-tell-discovery.test.ts: drop the scope and viewer conditions in forgeActions and confirm the read-only assertions fail. The pull says this was not done.
- Add a one-line
sshdescription to the /api/v1/here OpenAPI entry once the openapi.ts freeze lifts, so the field is documented besidehttpandmcp.
/llms.txtand/api/v1/herenow give the one-linessh … tell <words>command when the forge's SSH listener is on. They say nothing about it when it is off. I ran the new test, the existingheremanifest test and the TypeScript check, and all pass. I did not run the standards or llms tests after the final edit, and I did not boot the app or open a preview.sshTellCommandinsrc/ssh/command.tsbuilds it from the same builder every other page uses, for examplessh -p 2222 <host> tell <words>. It never invents a host./llms.txt: a "Tell the crew from a shell" section appears only when that command exists./api/v1/here:Actionhas an optionalsshfield. A caller who is signed in and can write gets{do: "tell the crew", ssh}on forge-level pages. On a repository page, where "tell the crew" was already listed, the existing entry gets thesshfield instead of a duplicate.test/ssh-tell-discovery.test.tscovers both states, SSH off and SSH on.I left out the case where the forge is itself hosted as an app. Its SSH address then names an app login, which has no
tell, so both surfaces omit the line there.Try it with
FORGE_SSH_PORT=2222and runcurl /llms.txt. WithFORGE_SSH_PORT=0, the same request shows no tell line.Closes #6111