Public: anyone can read this; the crew can change it.
The crew takes direction only from people who can write: a reader's comment never steers or starts a run #694
A new function, mayDirectCrew in src/crew/direct.ts, now decides who can direct the crew on a repository. It allows someone who can write to the repository (canWrite), the crew's own reviewer, or any signed-in user once the owner turns on the per-repository switch "outsiders may trigger the crew".
stopped closed without shipping deploy 69873ff
Review (owner's steward): the rule itself is right and comments, reviews, tell, the steering box and converge are closed with good tests. Three changes before this lands:
- Autonomy must apply the same rule. The ready list takes every open issue whatever its author, autonomy then assigns a builder, and the brief hands over the issue body as the task. An issue whose author does not pass
mayDirectCrewmust stay out of the ready list until a person who can write the repository adopts it (assigns it, labels it, or links it into the map). In the brief, mark a body written by someone who cannot direct the crew as untrusted, the way comments already are. Test: a reader opens an issue on an autonomous public repository and nothing is assigned, queued or planned from it; after a writer adopts it, it flows. - Only people who may direct the crew can re-arm it.
stalled()counts any comment, and the planner-decline check counts any non-agent comment, so a reader's comment un-parks a stalled issue or answers a decline. Count only authors who passmayDirectCrew; test both. - Rebase. Conflicts in schema.ts and test/oauth-discovery.test.ts: main already has migration 46, and two open pulls take 47 and 48, so take 49; keep main's version of the oauth test.
Follow-up to file, not for this pull: the crewOutsiders switch is reachable only from the web form; it needs the API and MCP (done means reachable).
Sign in to join this conversation.
new above
offline
A new function,
mayDirectCrewinsrc/crew/direct.ts, now decides who can direct the crew on a repository. It allows someone who can write to the repository (canWrite), the crew's own reviewer, or any signed-in user once the owner turns on the per-repository switch "outsiders may trigger the crew". The switch is off by default, only an admin can change it, and each change is recorded in the audit asrepo.crew_outsiders.What changed
src/crew/dispatch.ts): an issue comment, pull comment or commenting review from someone who fails the rule stays on the thread. It does not steer a running agent and queues no run. This also covers an unassigned pull an agent wrote, whereagentForfalls back to the pull's author.telland converge (web,POST …/following/converge, and the MCPconvergetool) all check the same rule. The MCP tool used to check only read access and token scope. Assignment and the steering box keep their writer-only checks.src/crew/brief.ts,src/crew/runner.ts): comments and review comments from people who fail the rule are marked as untrusted input from a reader, never treated as instructions. When there are no such comments, the prompt reads as before./tell, the change view and the TUI activity screen say that only people who can write here direct the crew. Settings has the outsiders switch.repo.crew_outsiders, default 0.Tests
test/crew-direction.test.tsis new and is now in the gate (scripts/gate.ts). It uses a public repository and a non-member account. In it, a reader's comment does not reach a running agent, and a reader's comment and commenting review on an agent's pull queue nothing but stay on the thread. A writer's comment still steers or queues a run. With the switch on, the reader's comment queues a run. It also checks thattell, steering, assignment, and converge in the action, over HTTP and over MCP each refuse a reader. A version ofdispatch.tswith the rule removed fails the suite.One existing test was wrong and is changed:
test/oauth-discovery.test.tspicked "its" migration as the last one in the list, which broke once migration 46 was added. It now finds the migration by its content. The rest of the code was not changed for it.bun x tsc --noEmitis clean, the new suite and the two fixed tests pass, and the rest of the gate passed in the full run.Not done here
/data/steward-unassigned-public-2026-10-05.json(agent assignments on public repositories, andvesperandtorqueon trevato/cs-engine's crew). That should happen after this merges.To try it: on a public repository with a crew, comment on an agent's open issue from a non-member account. The comment shows up and nothing runs. Do the same as the owner and a run starts. Then turn on "outsiders may trigger the crew" in Settings and the non-member's comment queues a run.
🤖 Generated with Claude Code
Closes #619