open-multi-agent/tests
JackChen b857c001a8
feat: agent delegation mechanism (#123)
Implements `delegate_to_agent` built-in tool (closes #63). Opt-in registration via `includeDelegateTool`; only wired up by `runTeam` / `runTasks` for pool workers. Guards: self-delegation, unknown target, cycle detection via `delegationChain`, depth cap (`maxDelegationDepth`, default 3), pool deadlock.

Delegation runs on ephemeral Agent instances via `AgentPool.runEphemeral` (pool semaphore only, no per-agent lock) so mutual delegation (A→B while B→A) can't deadlock. Delegated run `tokenUsage` surfaces via `ToolResult.metadata` and rolls into the parent runner's total before the next budget check; delegation tool_result blocks are exempt from `compressToolResults` and the `compact` strategy. Best-effort SharedMemory audit writes at `{caller}/delegation:{target}:{ts}-{rand}`.

Picks up @NamelessNATM's work from #84 and adds cycle detection, token aggregation, compression exemption, mutual-delegation deadlock fix (Codex P1), and tool_result-preservation on budget-exceeded (Codex P2).

Co-authored-by: NamelessNATM <hamzarstar@gmail.com>
2026-04-19 10:50:44 +08:00
..
e2e test: add LLM adapter contract tests, improve coverage from 71% to 88% (#56) 2026-04-05 14:14:43 +08:00
helpers test: add LLM adapter contract tests, improve coverage from 71% to 88% (#56) 2026-04-05 14:14:43 +08:00
abort-signal-propagation.test.ts fix: propagate AbortSignal through tool execution, Gemini adapter, and abort queue path (#99, #100, #101) 2026-04-12 23:20:30 +08:00
abort-signal.test.ts fix: correct Team constructor usage in abort-signal tests 2026-04-06 12:54:24 +08:00
agent-hooks.test.ts feat: implement token budget management in agent and orchestrator (#71) 2026-04-06 23:14:08 +08:00
agent-pool.test.ts feat: agent delegation mechanism (#123) 2026-04-19 10:50:44 +08:00
anthropic-adapter.test.ts test: add LLM adapter contract tests, improve coverage from 71% to 88% (#56) 2026-04-05 14:14:43 +08:00
approval.test.ts feat(orchestrator): add onApproval callback for human-in-the-loop (#32) 2026-04-05 02:46:20 +08:00
built-in-tools.test.ts feat: agent delegation mechanism (#123) 2026-04-19 10:50:44 +08:00
cli.test.ts feat: add cli 2026-04-12 20:12:16 +03:00
context-strategy.test.ts feat: add rule-based compact context strategy (#111) (#119) 2026-04-16 23:34:50 +08:00
copilot-adapter.test.ts test: add LLM adapter contract tests, improve coverage from 71% to 88% (#56) 2026-04-05 14:14:43 +08:00
deepseek-adapter.test.ts DeepSeek - Fixed adapter test URL 2026-04-16 15:24:16 +10:00
delegation-budget.test.ts feat: agent delegation mechanism (#123) 2026-04-19 10:50:44 +08:00
delegation-concurrency.test.ts feat: agent delegation mechanism (#123) 2026-04-19 10:50:44 +08:00
gemini-adapter-contract.test.ts test: add LLM adapter contract tests, improve coverage from 71% to 88% (#56) 2026-04-05 14:14:43 +08:00
gemini-adapter.test.ts chore: support Node >=18, add optional @google/genai peer dependency and API key fallback 2026-04-04 22:12:28 +03:00
grok-adapter.test.ts feat(llm): add first-class Grok (xAI) support with dedicated GrokAdapter (#44) 2026-04-04 18:20:55 +08:00
keywords.test.ts refactor(orchestrator): address PR #70 review feedback 2026-04-07 21:46:03 +09:00
llm-adapters.test.ts test: improve coverage from 37% to 71% (#41) (#53) 2026-04-05 13:37:00 +08:00
loop-detection.test.ts feat(agent): smart loop detection for stuck agents (#49) 2026-04-05 13:01:53 +08:00
mcp-tools.test.ts feat: update MCP GitHub example and added llmInputSchema 2026-04-12 00:01:22 +03:00
minimax-adapter.test.ts Support MiniMax 2026-04-16 11:06:37 +10:00
openai-adapter.test.ts test: add LLM adapter contract tests, improve coverage from 71% to 88% (#56) 2026-04-05 14:14:43 +08:00
openai-fallback.test.ts feat(llm): add fallback tool-call extraction for local models (#15) 2026-04-05 11:49:10 +08:00
orchestrator.test.ts feat: add customTools to AgentConfig (#109) 2026-04-15 15:14:19 +08:00
runner-error-propagation.test.ts fix: propagate error events in AgentRunner.run() (#98) 2026-04-12 22:16:33 +08:00
scheduler.test.ts test: improve coverage from 37% to 71% (#41) (#53) 2026-04-05 13:37:00 +08:00
semaphore.test.ts feat: agent delegation mechanism (#123) 2026-04-19 10:50:44 +08:00
shared-memory.test.ts feat: enforce dependency-scoped agent context (default-deny) (#87) 2026-04-10 03:09:58 +08:00
short-circuit.test.ts fix: eliminate duplicate progress events and double completedTaskCount in short-circuit path (#82) 2026-04-08 12:49:13 +08:00
structured-output.test.ts feat: add optional outputSchema (Zod) for structured agent output (#36) 2026-04-03 13:45:47 +08:00
task-queue.test.ts feat: enforce dependency-scoped agent context (default-deny) (#87) 2026-04-10 03:09:58 +08:00
task-retry.test.ts feat: task-level retry with exponential backoff (#37) 2026-04-03 14:08:36 +08:00
task-utils.test.ts chore: add tests, CI, contributing guide, and PR template 2026-04-02 23:43:54 +08:00
team-messaging.test.ts test: improve coverage from 37% to 71% (#41) (#53) 2026-04-05 13:37:00 +08:00
text-tool-extractor.test.ts feat(llm): add fallback tool-call extraction for local models (#15) 2026-04-05 11:49:10 +08:00
token-budget.test.ts refactor(orchestrator): address PR #70 review feedback 2026-04-07 21:46:03 +09:00
tool-executor.test.ts feat: add tool output auto-truncation (#110) (#115) 2026-04-16 17:40:08 +08:00
tool-filtering.test.ts feat: add customTools to AgentConfig (#109) 2026-04-15 15:14:19 +08:00
tool-result-compression.test.ts feat: agent delegation mechanism (#123) 2026-04-19 10:50:44 +08:00
trace.test.ts feat: add tool allowlist, denylist, preset list (#83) 2026-04-08 02:04:40 +08:00