Skip to content

feat: custom orchestrator gateways via YAML config (v0.0.10) - #19

Closed
araa47 wants to merge 1 commit into
mainfrom
feat/custom-orchestrator-gateways
Closed

feat: custom orchestrator gateways via YAML config (v0.0.10)#19
araa47 wants to merge 1 commit into
mainfrom
feat/custom-orchestrator-gateways

Conversation

@araa47

@araa47 araa47 commented Mar 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add Orchestrator::Custom(String) variant — unknown orchestrator names now resolve to custom gateways defined in ~/.orca/config.yaml
  • Add YAML config loading (OrcaConfig/GatewayConfig) with {text}, {worker}, {channel}, {target}, {thread} template placeholders
  • Env vars still override YAML values (fully backwards compatible)
  • Custom gateway delivery via sh -c in the wake module, with expand_template() helper
  • Dynamic CLI validation: accepts builtin orchestrators + any configured gateway name
  • Gateways with a reply template require --reply-channel at spawn time (like openclaw)
  • Added config.example.yaml with Hermes gateway example
  • Updated README.md and SETUP.md with configuration docs

Backwards Compatibility

  • All existing orchestrators (cc, cx, cu, openclaw, none) work exactly as before
  • Env vars (ORCA_MAX_DEPTH, ORCA_MAX_WORKERS, ORCA_WATCHDOG_QUIET_SECS) still override
  • No config.yaml file needed — defaults remain the same when absent
  • Existing state.json entries deserialize correctly

Example Usage

# ~/.orca/config.yaml
gateways:
  hermes:
    wake: 'hermes chat -q "{text}"'
    reply: 'hermes chat -q "Use the send_message tool to send to {channel}: {text}"'
orca spawn "do task" -b cc --orchestrator hermes --spawned-by self --reply-channel matrix-room --reply-to room-id

Test plan

  • cargo fmt --check passes
  • cargo clippy -- -D warnings passes
  • All 660 tests pass (cargo nextest run)
  • Pre-commit hooks pass

🤖 Generated with Claude Code

Add support for user-defined orchestrator gateways in ~/.orca/config.yaml,
enabling Hermes, webhooks, and arbitrary agents as orchestrators via shell
command templates with {text}, {channel}, {target}, {thread}, {worker}
placeholders.

- Add Orchestrator::Custom(String) variant to types
- Add OrcaConfig/GatewayConfig YAML loading in config module
- Env vars still override YAML values (backwards compatible)
- Custom gateway delivery in wake module with expand_template()
- Dynamic CLI orchestrator validation (builtin + configured gateways)
- Require --reply-channel when gateway defines a reply template
- Example config, README and SETUP.md docs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🧪 Coverage Report

Metric Coverage
Lines 85.80% (16132 lines, 2290 missed)
Functions 94.74%
Regions 85.78%
📄 Coverage by file
File Lines Functions Regions
cli.rs 89.52% 98.05% 90.87%
cli/mod.rs 78.11% 84.75% 77.50%
config.rs 94.94% 95.71% 94.35%
config/mod.rs 90.50% 89.23% 86.75%
daemon.rs 80.05% 92.47% 81.36%
daemon/mod.rs 42.15% 77.11% 39.99%
events.rs 99.44% 100.00% 97.63%
events/mod.rs 98.72% 100.00% 92.86%
main.rs 100.00% 100.00% 100.00%
names.rs 100.00% 100.00% 100.00%
names/mod.rs 100.00% 100.00% 100.00%
prompts.rs 100.00% 100.00% 100.00%
prompts/mod.rs 100.00% 100.00% 100.00%
spawn.rs 93.08% 96.43% 92.57%
spawn/mod.rs 90.15% 93.55% 87.94%
state.rs 98.09% 93.33% 96.13%
state/mod.rs 95.32% 87.23% 87.77%
tmux.rs 97.53% 100.00% 96.69%
tmux/mod.rs 91.89% 99.15% 90.89%
types/mod.rs 96.93% 93.75% 97.14%
wake.rs 98.60% 100.00% 98.93%
wake/mod.rs 87.59% 100.00% 85.26%
worktree.rs 95.25% 100.00% 95.61%
worktree/mod.rs 84.76% 100.00% 83.91%

Coverage must not decrease. See CONTRIBUTING.md for policy.

@araa47 araa47 closed this Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant