@staix/agent-hub 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/.claude-plugin/marketplace.json +12 -0
  2. package/CHANGELOG.md +19 -0
  3. package/LICENSE +21 -0
  4. package/README.md +54 -0
  5. package/package.json +41 -0
  6. package/plugins/agent-hub/.claude-plugin/plugin.json +11 -0
  7. package/plugins/agent-hub/.mcp.json +8 -0
  8. package/plugins/agent-hub/server.js +15832 -0
  9. package/src/adapters/acp.ts +183 -0
  10. package/src/adapters/claude-channel.ts +146 -0
  11. package/src/adapters/codex-appserver.ts +323 -0
  12. package/src/adapters/local-worker.ts +232 -0
  13. package/src/cli/init.ts +43 -0
  14. package/src/cli/launch.ts +66 -0
  15. package/src/cli/main.js +9 -0
  16. package/src/cli/main.ts +434 -0
  17. package/src/cli/setup.ts +79 -0
  18. package/src/cli/statusline-tee.ts +33 -0
  19. package/src/hub/ask.ts +163 -0
  20. package/src/hub/board.ts +110 -0
  21. package/src/hub/budget.ts +268 -0
  22. package/src/hub/bus.ts +251 -0
  23. package/src/hub/control-client.ts +78 -0
  24. package/src/hub/daemon.ts +658 -0
  25. package/src/hub/envelope.ts +95 -0
  26. package/src/hub/hub-tools.ts +50 -0
  27. package/src/hub/inference.ts +130 -0
  28. package/src/hub/peers.ts +68 -0
  29. package/src/hub/ports.ts +29 -0
  30. package/src/hub/routing.ts +160 -0
  31. package/src/hub/tasks.ts +293 -0
  32. package/src/local/deny.ts +36 -0
  33. package/src/local/sandbox.ts +94 -0
  34. package/src/local/tools.ts +160 -0
  35. package/src/memory/brief.ts +59 -0
  36. package/src/memory/capture.ts +83 -0
  37. package/src/memory/client.ts +79 -0
  38. package/src/memory/recall.ts +55 -0
  39. package/src/omniroute/client.ts +163 -0
  40. package/src/switchyard/config.ts +45 -0
  41. package/src/switchyard/sidecar.ts +102 -0
  42. package/src/version.ts +4 -0
  43. package/templates/AGENTS.block.md +11 -0
  44. package/templates/CLAUDE.block.md +10 -0
  45. package/templates/config.json +25 -0
  46. package/templates/routing.toml +84 -0
@@ -0,0 +1,84 @@
1
+ # agent-hub routing: who takes which kind of task (L1), and which model route the local worker asks for (L2).
2
+ # [targets.*] and [routes.*] use Switchyard's own table shapes (v0.2.0 toml_schema): the hub copies them into the
3
+ # sidecar config and adds the gateway client, so anything Switchyard accepts can be written here.
4
+
5
+ [local]
6
+ route = "sy/coding" # Switchyard route the local worker asks for
7
+ fixed_model = "vllm/deepseek-ai/DeepSeek-V4-Flash-0731" # straight to OmniRoute when the sidecar is absent or unhealthy
8
+
9
+ [targets.dsv4f]
10
+ id = "vllm/deepseek-ai/DeepSeek-V4-Flash-0731"
11
+
12
+ [routes."sy/coding"]
13
+ type = "passthrough"
14
+ target = "dsv4f"
15
+
16
+ [routes."sy/fast"]
17
+ type = "passthrough"
18
+ target = "dsv4f"
19
+
20
+ # With a second model served (here GLM-5.3-Flash), replace sy/coding with the two-tier route and add the review escalation:
21
+ #
22
+ # [targets.glm53f]
23
+ # id = "vllm/zai-org/GLM-5.3-Flash"
24
+ #
25
+ # [routes."sy/coding"]
26
+ # type = "stage_router"
27
+ # efficient_target = "glm53f"
28
+ # capable_target = "dsv4f"
29
+ # picker = "efficient_first"
30
+ # confidence_threshold = 0.5
31
+ #
32
+ # [routes."sy/review"]
33
+ # type = "llm_classifier"
34
+ # mode = "escalation"
35
+ # classifier_target = "glm53f"
36
+ # weak_target = "glm53f"
37
+ # strong_target = "dsv4f"
38
+ #
39
+ # [routes."sy/review".escalation] # required by the 0.2.0 binary for mode = "escalation"
40
+ # confirmations = 2
41
+
42
+ # L1: task assignment. `peers` is the preference order among attached, unpaused peers (idle before busy).
43
+ # `route` / `fixed_model` apply when the task lands on the local worker. Two changes_requested in a row move the
44
+ # task to the next attached peer in `escalate_to`.
45
+
46
+ [signals]
47
+ pii_patterns = ["\\b\\d{6}-\\d{7}\\b"] # Korean resident registration numbers; add your own, e.g. "@your-org\\.example" for staff mail addresses
48
+ long_context_tokens = 120000
49
+
50
+ [constraints]
51
+ pii = "local_only" # hard: a PII task is owned by `local` or nobody, and nothing about it leaves the hub
52
+ long_context = "skip_local"
53
+ budget_paused = "skip_peer"
54
+
55
+ [classes.plan]
56
+ peers = ["claude", "codex"]
57
+ local_allowed = false
58
+
59
+ [classes.implement]
60
+ peers = ["codex", "kimi", "local"]
61
+ route = "sy/coding"
62
+ escalate_to = ["kimi", "claude"]
63
+
64
+ [classes.bulk_edit]
65
+ peers = ["local", "kimi"]
66
+ route = "sy/fast"
67
+ escalate_to = ["kimi", "codex"]
68
+
69
+ [classes.test]
70
+ peers = ["kimi", "local", "codex"]
71
+ route = "sy/fast"
72
+ escalate_to = ["codex"]
73
+
74
+ [classes.review]
75
+ peers = ["claude", "codex"]
76
+ local_allowed = false # judgment classes never go to local
77
+
78
+ [classes.summarize]
79
+ peers = ["local", "kimi"]
80
+ route = "sy/fast"
81
+
82
+ [classes.triage]
83
+ peers = ["local", "kimi"]
84
+ route = "sy/fast"