Repository navigation
Every local worker is one named agent of the swarm, never root - #55
Merged
Merged
Conversation
- startLiteWorker, liteWorkerCommand and factory-lite require an agentId (--agent on the command line); root is refused, and startLiteWorker also refuses an agent the swarm does not have or one that is not ready. - The worker's board connection is always launched with --actor, so every claim, hand-in and review goes under that name. - The plain claim (Factory.claimTask, factory_claim_task, factory claim) refuses a task assigned through a workflow: only its assigned worker claims it, with factory_workflow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #52. First of a stack of three: this one, then #56 (worker tools), then #57 (front page and release 0.13.0).
Until now a local worker started without an
agentIdconnected to the board as the supervisor (root), which may claim work under any agent's name. The README's one-minute example did exactly that, so its "team" was one Claude Code with two labels.What changes
startLiteWorker,liteWorkerCommandandfactory-literequire anagentId(--agent <id>on the command line).rootis refused.startLiteWorkeralso refuses an agent the swarm does not have, or one that is not ready, before anything starts.factory-mcp <board> --actor <agentId>), so every claim, hand-in and review goes under that name. A tool argument cannot choose another agent (that was already true for the workflow tools).Factory.claimTask, MCPfactory_claim_task,factory claim) now refuses such a task, so the supervisor can no longer take a builder's lease and block it. Plain tasks are claimed as before.This breaks callers that started workers without an
agentId; it ships in 0.13.0.Tests
New: a worker is always one named agent (
codex,claude,flujo; missing,root, invalid);startLiteWorkerrefuses a missing swarm and an unknown agent; an assigned task cannot be claimed by the supervisor's plain claim or by another agent; a worker's MCP connection does not list or acceptfactory_claim_task. Existing tests now pass anagentId.Local checks (Windows and Linux, as in
public-sdk.yml)Commit
dcb9b1c(the same files as this branch after rebasing onto main with #54; checked by comparing the git trees), from a cleangit -c core.autocrlf=false archivesnapshot with a cleannpm cieach time. Linux ran in disposablenode:*-bookworm-slimDocker containers as thenodeuser.All four combinations passed.