open-multi-agent/src
EchoOfZion 9463dbb28e refactor(orchestrator): address PR #70 review feedback
Addresses all five review points from @JackChen-me on PR #70:

1. Extract shared keyword helpers into src/utils/keywords.ts so the
   short-circuit selector and Scheduler.capability-match cannot drift.
   Both orchestrator.ts and scheduler.ts now import the same module.

2. selectBestAgent now mirrors Scheduler.capability-match exactly,
   including the asymmetric use of agent.model: agentKeywords includes
   model, agentText does not. This restores parity with the documented
   capability-match behaviour.

3. Remove isSimpleGoal and selectBestAgent from the public barrel
   (src/index.ts). They remain exported from orchestrator.ts for unit
   tests but are no longer part of the package API surface.

4. Forward the AbortSignal from runTeam(options) through the
   short-circuit path. runAgent() now accepts an optional
   { abortSignal } argument; runTeam's short-circuit branch passes
   the caller's signal so cancellation works for simple goals too.

5. Tighten the collaborate/coordinate complexity regexes so they only
   fire on imperative directives ("collaborate with X", "coordinate
   the team") and not on descriptive uses ("explain how pods
   coordinate", "what is microservice collaboration").

Also fixes a pre-existing test failure in token-budget.test.ts:
"enforces orchestrator budget in runTeam" was using "Do work" as its
goal which now short-circuits, so the coordinator path the test was
exercising never ran. Switched to a multi-step goal.

Adds 60 new tests across short-circuit.test.ts and the new
keywords.test.ts covering all five fixes.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-04-07 21:46:03 +09:00
..
agent fix: add per-agent mutex to prevent concurrent runs on same Agent instance (#72) 2026-04-07 03:42:24 +08:00
llm feat(llm): add fallback tool-call extraction for local models (#15) 2026-04-05 11:49:10 +08:00
memory Initial release: open-multi-agent v0.1.0 2026-04-01 04:33:15 +08:00
orchestrator refactor(orchestrator): address PR #70 review feedback 2026-04-07 21:46:03 +09:00
task feat(orchestrator): add onApproval callback for human-in-the-loop (#32) 2026-04-05 02:46:20 +08:00
team fix: use explicit crypto import for Node 18 compatibility 2026-04-02 23:46:43 +08:00
tool fix(agent): merge abort signals instead of overriding caller's signal 2026-04-05 12:00:16 +08:00
utils refactor(orchestrator): address PR #70 review feedback 2026-04-07 21:46:03 +09:00
errors.ts feat: implement token budget management in agent and orchestrator (#71) 2026-04-06 23:14:08 +08:00
index.ts refactor(orchestrator): address PR #70 review feedback 2026-04-07 21:46:03 +09:00
types.ts feat: implement token budget management in agent and orchestrator (#71) 2026-04-06 23:14:08 +08:00