feat: replace role-based agent config with user-defined workspace paths#27
Open
feat: replace role-based agent config with user-defined workspace paths#27
Conversation
Replace the `role` enum with a `workspace` path field in agent config. Users now point each agent to their own OpenClaw workspace directory containing SOUL.md, HEARTBEAT.md, skills/, etc. ClawForce stops managing agent personality templates and focuses on deployment wiring. Key changes: - AgentConfigSchema: role -> workspace, remove skills field - parse.ts: resolve workspace paths relative to config file location - generate-compose.ts: per-agent Docker volume bind-mounts - generate-openclaw.ts: remove role-partial template merging - setup.ts: remove SKILL.md/cron template copying - agents-md.ts: remove ROLE_DISPLAY_NAMES, simplify agent entries - Supervisor validation: empty supervises list triggers error (no role gate) - Cron/hooks: configured via openclaw passthrough block, not role templates - Delete test/unit/templates/roles.test.ts (templates decoupled from runtime) - Update all 43 fixture YAMLs and 20 test files
- Add test for per-agent workspace volume mount in compose output - Add test for multi-agent workspace volume mounts with absolute paths - Add test verifying workspace paths are resolved to absolute paths relative to config file directory
Replace role-based agent configuration references with workspace-based approach across README, getting started guide, multi-agent docs, roadmap, supervisor research/plan docs, and smoke test checklist.
Integration (deploy-lifecycle.test.ts): - Validate per-agent workspace volume mounts in generated compose - Validate agents.list workspace paths in generated openclaw.json - Verify workspace host paths are absolute (resolved by parseConfig) - New multi-agent test: full pipeline with 2 agents, validates compose volumes, openclaw.json agents.list, and AGENTS.md content E2E (runtime-pipeline.e2e.test.ts): - Add validateWorkspaceArtifacts helper called after every deploy - Validates compose volumes, openclaw.json, and AGENTS.md per-agent - New multi-agent e2e scenario with runtime-multi-agent.yaml fixture
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
roleenum withworkspacepath field in agent config — users point each agent to their own OpenClaw workspace directoryopenclawpassthrough block, not implicit role templatesChanges
Schema (
src/config/types.ts)roleenum removed, replaced withworkspace: string(required)skillsfield removed (was inert — never used at runtime)supervisesfield presence triggers supervisor behavior (no role gate)Parse (
src/config/parse.ts)Deploy Pipeline
setupWorkspace: removed per-agent template copying loopagents-md.ts: removed role display names and SKILL.md path referencesgenerate-openclaw.ts: removed role-partial merge loopgenerate-compose.ts: added per-agent workspace bind-mountsdeploy.ts: removed role from agent display logDocumentation
role:toworkspace:Test plan
agent.rolereferences remain insrc/Breaking Changes
rolefield removed from agent config — useworkspaceinsteadskillsfield removed from agent configopenclaw.default.cronpassthrough