feat: PicoClaw worker spawner and extended CC session events#17
Merged
Conversation
Adds a PicoClaw worker spawner that subscribes to task assignment events (swarm.task.*.assigned), filters for picoclaw runtime, and spawns picoclaw worker processes with mission directory setup, briefing JSON, and timeout management. Extends CCSessionCompletedData with backwards-compatible Model, Runtime, and token count fields emitted by PicoClaw workers. New: internal/process/spawner.go, PicoClawConfig in config Modified: hermes events/subjects, cmd/orchestrator/main.go wiring Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rename CacheRead/CacheWrite to CacheReadTokens/CacheWriteTokens for consistent field naming convention across CCSessionCompletedData - Redirect worker stdout/stderr to per-task log files in .mission/logs/ instead of Warren's stdout (avoids noise with concurrent workers) - Publish fallback swarm.cc.session.completed event from spawner so NATS consumers see completions even if picoclaw doesn't publish natively - Document that spawner assumes a forward-looking "picoclaw worker" subcommand that doesn't exist yet Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Concurrency is controlled via atomic counter, not mutex. Fixes golangci-lint unused field error. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
process.Spawnerthat subscribes toswarm.task.*.assigned, filters forruntime: "picoclaw", and spawns picoclaw worker processes with mission directory, briefing JSON, and timeout managementPicoClawConfigto config with defaults (binary, mission_base_dir, default_timeout=5m, max_concurrent=20)CCSessionCompletedDatawith backwards-compatibleModel,Runtime, and token count fields emitted by PicoClaw workersSubjectAllTaskAssignedwildcard subject for task assignment subscriptionNew files
internal/process/spawner.gointernal/process/spawner_test.gointernal/config/config_picoclaw_test.gointernal/hermes/picoclaw_test.goTest plan
go build ./...— cleango vet ./...— clean🤖 Generated with Claude Code