Repository navigation
Conversation
|
Thanks for this, aakhter. This PR lets I ran it against a real in-process server as well as your tests: claude and shell workers land in the given directory with the parent lineage intact and a started pane, no agent-case marker is written, and a CLI that is not installed is refused before any session exists. Typecheck, lint, format and the agent CLI, MCP, skill and plugin tests all pass. A few small things:
Nits:
No need to push again for these: I will apply them on top when I merge, unless you would rather push them yourself first. |
…ment the directory launch
`codeman agent spawn ""` (for example `spawn "$CASE"` with CASE unset)
used to launch a worker in the caller's cwd. Both case checks now test
`caseName !== undefined`, so an empty name reaches quick-start and is
refused by its schema as before.
Drop the `{ id }` fallback on the create answer: `POST /api/sessions`
answers `{ session: { id } }`, and the test fakes now use that shape.
Tests: an empty case name (unit and through the real argument parser
and HTTP transport), the claude `--ready` order create, /interactive,
wait-output on the created id, and a non-JSON failed start (id alone on
stdout, reason on stderr, exit 1).
Docs: the spawn mapping and directory-launch JSON shape in
docs/api-reference.md, the README and wiki `codeman agent` sections, the
cli-agent @fileoverview and the skill reference tables; reflow the new
SKILL.md paragraph (plugin mirror synced); the changeset notes the
local exit-4 refusal of an unknown mode for named cases.
|
Thanks for the review and for testing it against a real server. I pushed all of it (c5ffea0), so there is nothing left for you to apply at merge.
Nits: the changeset now says an unknown Typecheck, lint, format and the agent CLI, MCP, skill and plugin tests (201) all pass. |
|
Thanks for the quick and thorough follow-up, aakhter. With c5ffea0, One small thing is left, the flag version of the empty-case issue:
Nit:
No need to push again for these: I will apply them on top when I merge, unless you would rather push them yourself first. |
`codeman agent spawn --working-dir "$WT"` with WT empty (a failed
`git worktree add`, say) resolved '' to the caller's cwd and started an
editing worker in the caller's own checkout. An empty or
whitespace-only --working-dir now refuses with exit 4 before any
request.
The emitJson comment names the directory-spawn exception to "the
envelope's data": `{ sessionId, workingDir, created: true, ready }`.
Tests: unit (`''`, spaces, tab: exit 4, no calls) and through the real
argument parser and HTTP transport (nothing sent, exit 4).
Docs: README, api-reference, wiki, SKILL.md (plugin mirror synced) and
the changeset note the refusal.
|
Thanks. I pushed both so nothing is left to apply at merge:
Nit: the |
|
Thanks for the second follow-up, aakhter. With b26234d, Both points from the last round landed: an empty or whitespace-only One small thing is left:
Nit:
No need to push again for these: I will apply them on top when I merge, unless you would rather push them yourself first. |
codeman agent spawnrequires a case name even when a worker should use an existing project. Allow an omitted case to use cwd and add--working-dirfor another existing local directory. Explicit case names keep their current quick-start behavior.Project launches validate the mode and directory, create and start the session through the existing APIs, and preserve parent lineage and server ownership checks. Real project directories receive no agent-scratch label. Rejected or ambiguous startup returns the exact created ID, one valid JSON document when requested, and an error exit without retrying. Includes CLI/skill documentation, the synchronized plugin mirror, and a minor changeset.
Validation:
Paths must exist on the CLI host; normal server path and ownership validation still apply. This contribution is independent of the readiness-transport fix and offline-history commands.