macro-agent 0.0.11 → 0.0.12
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.
- package/.macro-agent/teams/self-driving/prompts/grinder.md +27 -0
- package/.macro-agent/teams/self-driving/prompts/judge.md +27 -0
- package/.macro-agent/teams/self-driving/prompts/planner.md +33 -0
- package/.macro-agent/teams/self-driving/roles/grinder.yaml +17 -0
- package/.macro-agent/teams/self-driving/roles/judge.yaml +24 -0
- package/.macro-agent/teams/self-driving/roles/planner.yaml +18 -0
- package/.macro-agent/teams/self-driving/team.yaml +103 -0
- package/.macro-agent/teams/structured/prompts/developer.md +26 -0
- package/.macro-agent/teams/structured/prompts/lead.md +25 -0
- package/.macro-agent/teams/structured/prompts/reviewer.md +24 -0
- package/.macro-agent/teams/structured/roles/developer.yaml +12 -0
- package/.macro-agent/teams/structured/roles/lead.yaml +11 -0
- package/.macro-agent/teams/structured/roles/reviewer.yaml +19 -0
- package/.macro-agent/teams/structured/team.yaml +89 -0
- package/.sudocode/issues.jsonl +6 -0
- package/.sudocode/specs.jsonl +7 -0
- package/CLAUDE.md +110 -30
- package/README.md +60 -3
- package/dist/acp/macro-agent.d.ts +4 -0
- package/dist/acp/macro-agent.d.ts.map +1 -1
- package/dist/acp/macro-agent.js +50 -4
- package/dist/acp/macro-agent.js.map +1 -1
- package/dist/acp/session-mapper.d.ts +20 -1
- package/dist/acp/session-mapper.d.ts.map +1 -1
- package/dist/acp/session-mapper.js +90 -1
- package/dist/acp/session-mapper.js.map +1 -1
- package/dist/acp/types.d.ts +24 -1
- package/dist/acp/types.d.ts.map +1 -1
- package/dist/acp/types.js.map +1 -1
- package/dist/agent/agent-manager.d.ts +25 -1
- package/dist/agent/agent-manager.d.ts.map +1 -1
- package/dist/agent/agent-manager.js +93 -7
- package/dist/agent/agent-manager.js.map +1 -1
- package/dist/agent/types.d.ts +22 -0
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/agent-detection/command-builder.d.ts +30 -0
- package/dist/agent-detection/command-builder.d.ts.map +1 -0
- package/dist/agent-detection/command-builder.js +71 -0
- package/dist/agent-detection/command-builder.js.map +1 -0
- package/dist/agent-detection/detector.d.ts +84 -0
- package/dist/agent-detection/detector.d.ts.map +1 -0
- package/dist/agent-detection/detector.js +240 -0
- package/dist/agent-detection/detector.js.map +1 -0
- package/dist/agent-detection/index.d.ts +12 -0
- package/dist/agent-detection/index.d.ts.map +1 -0
- package/dist/agent-detection/index.js +14 -0
- package/dist/agent-detection/index.js.map +1 -0
- package/dist/agent-detection/registry.d.ts +53 -0
- package/dist/agent-detection/registry.d.ts.map +1 -0
- package/dist/agent-detection/registry.js +177 -0
- package/dist/agent-detection/registry.js.map +1 -0
- package/dist/agent-detection/types.d.ts +121 -0
- package/dist/agent-detection/types.d.ts.map +1 -0
- package/dist/agent-detection/types.js +20 -0
- package/dist/agent-detection/types.js.map +1 -0
- package/dist/api/server.d.ts.map +1 -1
- package/dist/api/server.js +95 -0
- package/dist/api/server.js.map +1 -1
- package/dist/cli/index.js +29 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/mcp.js +38 -0
- package/dist/cli/mcp.js.map +1 -1
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +2 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/project-config.d.ts +46 -0
- package/dist/config/project-config.d.ts.map +1 -0
- package/dist/config/project-config.js +68 -0
- package/dist/config/project-config.js.map +1 -0
- package/dist/lifecycle/cascade.d.ts +1 -1
- package/dist/lifecycle/cascade.d.ts.map +1 -1
- package/dist/lifecycle/handlers/index.d.ts +4 -0
- package/dist/lifecycle/handlers/index.d.ts.map +1 -1
- package/dist/lifecycle/handlers/index.js +2 -0
- package/dist/lifecycle/handlers/index.js.map +1 -1
- package/dist/lifecycle/handlers/worker.d.ts +4 -0
- package/dist/lifecycle/handlers/worker.d.ts.map +1 -1
- package/dist/lifecycle/handlers/worker.js +35 -3
- package/dist/lifecycle/handlers/worker.js.map +1 -1
- package/dist/map/adapter/acp-over-map.d.ts.map +1 -1
- package/dist/map/adapter/acp-over-map.js +32 -2
- package/dist/map/adapter/acp-over-map.js.map +1 -1
- package/dist/map/adapter/event-translator.d.ts.map +1 -1
- package/dist/map/adapter/event-translator.js +1 -0
- package/dist/map/adapter/event-translator.js.map +1 -1
- package/dist/map/adapter/extensions/agent-detection.d.ts +49 -0
- package/dist/map/adapter/extensions/agent-detection.d.ts.map +1 -0
- package/dist/map/adapter/extensions/agent-detection.js +91 -0
- package/dist/map/adapter/extensions/agent-detection.js.map +1 -0
- package/dist/map/adapter/extensions/index.d.ts +10 -1
- package/dist/map/adapter/extensions/index.d.ts.map +1 -1
- package/dist/map/adapter/extensions/index.js +39 -0
- package/dist/map/adapter/extensions/index.js.map +1 -1
- package/dist/map/adapter/extensions/resume.d.ts +47 -0
- package/dist/map/adapter/extensions/resume.d.ts.map +1 -0
- package/dist/map/adapter/extensions/resume.js +59 -0
- package/dist/map/adapter/extensions/resume.js.map +1 -0
- package/dist/map/adapter/extensions/workspace-files.d.ts +42 -0
- package/dist/map/adapter/extensions/workspace-files.d.ts.map +1 -0
- package/dist/map/adapter/extensions/workspace-files.js +338 -0
- package/dist/map/adapter/extensions/workspace-files.js.map +1 -0
- package/dist/mcp/mcp-server.d.ts +6 -0
- package/dist/mcp/mcp-server.d.ts.map +1 -1
- package/dist/mcp/mcp-server.js +45 -0
- package/dist/mcp/mcp-server.js.map +1 -1
- package/dist/mcp/tools/claim_task.d.ts +35 -0
- package/dist/mcp/tools/claim_task.d.ts.map +1 -0
- package/dist/mcp/tools/claim_task.js +58 -0
- package/dist/mcp/tools/claim_task.js.map +1 -0
- package/dist/mcp/tools/done.d.ts +11 -2
- package/dist/mcp/tools/done.d.ts.map +1 -1
- package/dist/mcp/tools/done.js +15 -10
- package/dist/mcp/tools/done.js.map +1 -1
- package/dist/mcp/tools/list_claimable_tasks.d.ts +38 -0
- package/dist/mcp/tools/list_claimable_tasks.d.ts.map +1 -0
- package/dist/mcp/tools/list_claimable_tasks.js +63 -0
- package/dist/mcp/tools/list_claimable_tasks.js.map +1 -0
- package/dist/mcp/tools/unclaim_task.d.ts +31 -0
- package/dist/mcp/tools/unclaim_task.d.ts.map +1 -0
- package/dist/mcp/tools/unclaim_task.js +47 -0
- package/dist/mcp/tools/unclaim_task.js.map +1 -0
- package/dist/metrics/index.d.ts +2 -0
- package/dist/metrics/index.d.ts.map +1 -0
- package/dist/metrics/index.js +2 -0
- package/dist/metrics/index.js.map +1 -0
- package/dist/metrics/metrics.d.ts +79 -0
- package/dist/metrics/metrics.d.ts.map +1 -0
- package/dist/metrics/metrics.js +166 -0
- package/dist/metrics/metrics.js.map +1 -0
- package/dist/roles/capabilities.d.ts +1 -0
- package/dist/roles/capabilities.d.ts.map +1 -1
- package/dist/roles/capabilities.js +3 -0
- package/dist/roles/capabilities.js.map +1 -1
- package/dist/roles/types.d.ts +1 -1
- package/dist/roles/types.d.ts.map +1 -1
- package/dist/router/message-router.d.ts +41 -0
- package/dist/router/message-router.d.ts.map +1 -1
- package/dist/router/message-router.js +136 -5
- package/dist/router/message-router.js.map +1 -1
- package/dist/store/event-store.d.ts +8 -1
- package/dist/store/event-store.d.ts.map +1 -1
- package/dist/store/event-store.js +120 -4
- package/dist/store/event-store.js.map +1 -1
- package/dist/store/types/agents.d.ts +1 -1
- package/dist/store/types/agents.d.ts.map +1 -1
- package/dist/store/types/events.d.ts +1 -1
- package/dist/store/types/events.d.ts.map +1 -1
- package/dist/store/types/events.js.map +1 -1
- package/dist/store/types/index.d.ts +1 -0
- package/dist/store/types/index.d.ts.map +1 -1
- package/dist/store/types/index.js +1 -0
- package/dist/store/types/index.js.map +1 -1
- package/dist/store/types/sessions.d.ts +44 -0
- package/dist/store/types/sessions.d.ts.map +1 -0
- package/dist/store/types/sessions.js +9 -0
- package/dist/store/types/sessions.js.map +1 -0
- package/dist/store/types/tasks.d.ts +2 -0
- package/dist/store/types/tasks.d.ts.map +1 -1
- package/dist/task/backend/memory.d.ts +4 -1
- package/dist/task/backend/memory.d.ts.map +1 -1
- package/dist/task/backend/memory.js +81 -0
- package/dist/task/backend/memory.js.map +1 -1
- package/dist/task/backend/types.d.ts +30 -0
- package/dist/task/backend/types.d.ts.map +1 -1
- package/dist/task/backend/types.js.map +1 -1
- package/dist/teams/index.d.ts +4 -0
- package/dist/teams/index.d.ts.map +1 -0
- package/dist/teams/index.js +4 -0
- package/dist/teams/index.js.map +1 -0
- package/dist/teams/team-loader.d.ts +20 -0
- package/dist/teams/team-loader.d.ts.map +1 -0
- package/dist/teams/team-loader.js +293 -0
- package/dist/teams/team-loader.js.map +1 -0
- package/dist/teams/team-runtime.d.ts +139 -0
- package/dist/teams/team-runtime.d.ts.map +1 -0
- package/dist/teams/team-runtime.js +613 -0
- package/dist/teams/team-runtime.js.map +1 -0
- package/dist/teams/types.d.ts +266 -0
- package/dist/teams/types.d.ts.map +1 -0
- package/dist/teams/types.js +20 -0
- package/dist/teams/types.js.map +1 -0
- package/dist/workspace/dataplane-adapter.d.ts +1 -1
- package/dist/workspace/dataplane-adapter.d.ts.map +1 -1
- package/dist/workspace/dataplane-adapter.js +1 -1
- package/dist/workspace/dataplane-adapter.js.map +1 -1
- package/dist/workspace/index.d.ts +1 -1
- package/dist/workspace/index.d.ts.map +1 -1
- package/dist/workspace/strategies/index.d.ts +6 -0
- package/dist/workspace/strategies/index.d.ts.map +1 -0
- package/dist/workspace/strategies/index.js +5 -0
- package/dist/workspace/strategies/index.js.map +1 -0
- package/dist/workspace/strategies/optimistic.d.ts +26 -0
- package/dist/workspace/strategies/optimistic.d.ts.map +1 -0
- package/dist/workspace/strategies/optimistic.js +121 -0
- package/dist/workspace/strategies/optimistic.js.map +1 -0
- package/dist/workspace/strategies/queue.d.ts +26 -0
- package/dist/workspace/strategies/queue.d.ts.map +1 -0
- package/dist/workspace/strategies/queue.js +67 -0
- package/dist/workspace/strategies/queue.js.map +1 -0
- package/dist/workspace/strategies/registry.d.ts +37 -0
- package/dist/workspace/strategies/registry.d.ts.map +1 -0
- package/dist/workspace/strategies/registry.js +63 -0
- package/dist/workspace/strategies/registry.js.map +1 -0
- package/dist/workspace/strategies/trunk.d.ts +20 -0
- package/dist/workspace/strategies/trunk.d.ts.map +1 -0
- package/dist/workspace/strategies/trunk.js +108 -0
- package/dist/workspace/strategies/trunk.js.map +1 -0
- package/dist/workspace/strategies/types.d.ts +104 -0
- package/dist/workspace/strategies/types.d.ts.map +1 -0
- package/dist/workspace/strategies/types.js +11 -0
- package/dist/workspace/strategies/types.js.map +1 -0
- package/dist/workspace/types.d.ts +1 -1
- package/dist/workspace/types.d.ts.map +1 -1
- package/dist/workspace/workspace-manager.d.ts +1 -1
- package/dist/workspace/workspace-manager.d.ts.map +1 -1
- package/docs/implementation-details.md +1127 -0
- package/docs/implementation-summary.md +448 -0
- package/docs/plan-self-driving-support.md +433 -0
- package/docs/spec-self-driving-support.md +462 -0
- package/docs/team-templates.md +860 -0
- package/docs/teams.md +233 -0
- package/package.json +4 -2
- package/src/acp/__tests__/integration.test.ts +161 -1
- package/src/acp/__tests__/macro-agent.test.ts +95 -0
- package/src/acp/__tests__/session-persistence.test.ts +276 -0
- package/src/acp/macro-agent.ts +79 -7
- package/src/acp/session-mapper.ts +108 -1
- package/src/acp/types.ts +33 -1
- package/src/agent/agent-manager.ts +158 -6
- package/src/agent/types.ts +27 -0
- package/src/agent-detection/__tests__/command-builder.test.ts +336 -0
- package/src/agent-detection/__tests__/detector.test.ts +768 -0
- package/src/agent-detection/__tests__/registry.test.ts +254 -0
- package/src/agent-detection/command-builder.ts +90 -0
- package/src/agent-detection/detector.ts +307 -0
- package/src/agent-detection/index.ts +36 -0
- package/src/agent-detection/registry.ts +200 -0
- package/src/agent-detection/types.ts +184 -0
- package/src/api/server.ts +110 -0
- package/src/cli/index.ts +44 -0
- package/src/cli/mcp.ts +47 -0
- package/src/config/index.ts +9 -0
- package/src/config/project-config.ts +107 -0
- package/src/lifecycle/cascade.ts +1 -1
- package/src/lifecycle/handlers/index.ts +8 -0
- package/src/lifecycle/handlers/worker.ts +48 -3
- package/src/map/adapter/__tests__/extensions.test.ts +359 -0
- package/src/map/adapter/__tests__/workspace-files.test.ts +673 -0
- package/src/map/adapter/acp-over-map.ts +45 -2
- package/src/map/adapter/event-translator.ts +1 -0
- package/src/map/adapter/extensions/agent-detection.ts +201 -0
- package/src/map/adapter/extensions/index.ts +63 -0
- package/src/map/adapter/extensions/resume.ts +114 -0
- package/src/map/adapter/extensions/workspace-files.ts +449 -0
- package/src/mcp/mcp-server.ts +67 -0
- package/src/mcp/tools/claim_task.ts +86 -0
- package/src/mcp/tools/done.ts +24 -10
- package/src/mcp/tools/list_claimable_tasks.ts +93 -0
- package/src/mcp/tools/unclaim_task.ts +71 -0
- package/src/metrics/index.ts +9 -0
- package/src/metrics/metrics.ts +280 -0
- package/src/roles/capabilities.ts +3 -0
- package/src/roles/types.ts +2 -1
- package/src/router/__tests__/message-router.test.ts +561 -0
- package/src/router/message-router.ts +223 -6
- package/src/store/event-store.ts +151 -3
- package/src/store/types/agents.ts +1 -1
- package/src/store/types/events.ts +2 -1
- package/src/store/types/index.ts +1 -0
- package/src/store/types/sessions.ts +53 -0
- package/src/store/types/tasks.ts +3 -0
- package/src/task/backend/memory.ts +116 -0
- package/src/task/backend/types.ts +43 -0
- package/src/teams/__tests__/cross-subsystem.integration.test.ts +983 -0
- package/src/teams/__tests__/e2e/team-runtime.e2e.test.ts +553 -0
- package/src/teams/__tests__/team-system.test.ts +1280 -0
- package/src/teams/index.ts +13 -0
- package/src/teams/team-loader.ts +434 -0
- package/src/teams/team-runtime.ts +727 -0
- package/src/teams/types.ts +377 -0
- package/src/workspace/dataplane-adapter.ts +1 -1
- package/src/workspace/index.ts +1 -1
- package/src/workspace/strategies/index.ts +18 -0
- package/src/workspace/strategies/optimistic.ts +136 -0
- package/src/workspace/strategies/queue.ts +81 -0
- package/src/workspace/strategies/registry.ts +89 -0
- package/src/workspace/strategies/trunk.ts +123 -0
- package/src/workspace/strategies/types.ts +145 -0
- package/src/workspace/types.ts +1 -1
- package/src/workspace/workspace-manager.ts +1 -1
- package/.claude/settings.local.json +0 -59
- package/dist/map/utils/address-translation.d.ts +0 -99
- package/dist/map/utils/address-translation.d.ts.map +0 -1
- package/dist/map/utils/address-translation.js +0 -285
- package/dist/map/utils/address-translation.js.map +0 -1
- package/dist/map/utils/index.d.ts +0 -7
- package/dist/map/utils/index.d.ts.map +0 -1
- package/dist/map/utils/index.js +0 -7
- package/dist/map/utils/index.js.map +0 -1
- package/references/acp-factory-ref/CHANGELOG.md +0 -33
- package/references/acp-factory-ref/LICENSE +0 -21
- package/references/acp-factory-ref/README.md +0 -341
- package/references/acp-factory-ref/package-lock.json +0 -3102
- package/references/acp-factory-ref/package.json +0 -96
- package/references/acp-factory-ref/python/CHANGELOG.md +0 -33
- package/references/acp-factory-ref/python/LICENSE +0 -21
- package/references/acp-factory-ref/python/Makefile +0 -57
- package/references/acp-factory-ref/python/README.md +0 -253
- package/references/acp-factory-ref/python/pyproject.toml +0 -73
- package/references/acp-factory-ref/python/tests/__init__.py +0 -0
- package/references/acp-factory-ref/python/tests/e2e/__init__.py +0 -1
- package/references/acp-factory-ref/python/tests/e2e/test_codex_e2e.py +0 -349
- package/references/acp-factory-ref/python/tests/e2e/test_gemini_e2e.py +0 -165
- package/references/acp-factory-ref/python/tests/e2e/test_opencode_e2e.py +0 -296
- package/references/acp-factory-ref/python/tests/test_client_handler.py +0 -543
- package/references/acp-factory-ref/python/tests/test_pushable.py +0 -199
- package/references/claude-code-acp/.github/workflows/ci.yml +0 -45
- package/references/claude-code-acp/.github/workflows/publish.yml +0 -34
- package/references/claude-code-acp/.prettierrc.json +0 -4
- package/references/claude-code-acp/CHANGELOG.md +0 -249
- package/references/claude-code-acp/LICENSE +0 -222
- package/references/claude-code-acp/README.md +0 -53
- package/references/claude-code-acp/docs/RELEASES.md +0 -24
- package/references/claude-code-acp/eslint.config.js +0 -48
- package/references/claude-code-acp/package-lock.json +0 -4570
- package/references/claude-code-acp/package.json +0 -88
- package/references/claude-code-acp/scripts/release.sh +0 -119
- package/references/claude-code-acp/src/acp-agent.ts +0 -2065
- package/references/claude-code-acp/src/index.ts +0 -26
- package/references/claude-code-acp/src/lib.ts +0 -38
- package/references/claude-code-acp/src/mcp-server.ts +0 -911
- package/references/claude-code-acp/src/settings.ts +0 -522
- package/references/claude-code-acp/src/tests/.claude/commands/quick-math.md +0 -5
- package/references/claude-code-acp/src/tests/.claude/commands/say-hello.md +0 -6
- package/references/claude-code-acp/src/tests/acp-agent-fork.test.ts +0 -479
- package/references/claude-code-acp/src/tests/acp-agent.test.ts +0 -1502
- package/references/claude-code-acp/src/tests/extract-lines.test.ts +0 -103
- package/references/claude-code-acp/src/tests/fork-session.test.ts +0 -335
- package/references/claude-code-acp/src/tests/replace-and-calculate-location.test.ts +0 -334
- package/references/claude-code-acp/src/tests/settings.test.ts +0 -617
- package/references/claude-code-acp/src/tests/skills-options.test.ts +0 -187
- package/references/claude-code-acp/src/tests/tools.test.ts +0 -318
- package/references/claude-code-acp/src/tests/typescript-declarations.test.ts +0 -558
- package/references/claude-code-acp/src/tools.ts +0 -819
- package/references/claude-code-acp/src/utils.ts +0 -171
- package/references/claude-code-acp/tsconfig.json +0 -18
- package/references/claude-code-acp/vitest.config.ts +0 -19
- package/references/multi-agent-protocol/.sudocode/issues.jsonl +0 -111
- package/references/multi-agent-protocol/.sudocode/specs.jsonl +0 -13
- package/references/multi-agent-protocol/LICENSE +0 -21
- package/references/multi-agent-protocol/README.md +0 -113
- package/references/multi-agent-protocol/docs/00-design-specification.md +0 -496
- package/references/multi-agent-protocol/docs/01-open-questions.md +0 -1050
- package/references/multi-agent-protocol/docs/02-wire-protocol.md +0 -296
- package/references/multi-agent-protocol/docs/03-streaming-semantics.md +0 -252
- package/references/multi-agent-protocol/docs/04-error-handling.md +0 -231
- package/references/multi-agent-protocol/docs/05-connection-model.md +0 -244
- package/references/multi-agent-protocol/docs/06-visibility-permissions.md +0 -243
- package/references/multi-agent-protocol/docs/07-federation.md +0 -259
- package/references/multi-agent-protocol/docs/08-macro-agent-migration.md +0 -253
- package/references/multi-agent-protocol/docs/09-authentication.md +0 -680
- package/references/multi-agent-protocol/docs/10-mail-protocol.md +0 -553
- package/references/multi-agent-protocol/docs/agent-iam-integration.md +0 -877
- package/references/multi-agent-protocol/docs/agentic-mesh-integration-draft.md +0 -459
- package/references/multi-agent-protocol/docs/git-transport-draft.md +0 -251
- package/references/multi-agent-protocol/docs-site/Gemfile +0 -22
- package/references/multi-agent-protocol/docs-site/README.md +0 -82
- package/references/multi-agent-protocol/docs-site/_config.yml +0 -91
- package/references/multi-agent-protocol/docs-site/_includes/head_custom.html +0 -20
- package/references/multi-agent-protocol/docs-site/_sass/color_schemes/map.scss +0 -42
- package/references/multi-agent-protocol/docs-site/_sass/custom/custom.scss +0 -34
- package/references/multi-agent-protocol/docs-site/examples/full-integration.md +0 -510
- package/references/multi-agent-protocol/docs-site/examples/index.md +0 -138
- package/references/multi-agent-protocol/docs-site/examples/simple-chat.md +0 -282
- package/references/multi-agent-protocol/docs-site/examples/task-queue.md +0 -399
- package/references/multi-agent-protocol/docs-site/getting-started/index.md +0 -98
- package/references/multi-agent-protocol/docs-site/getting-started/installation.md +0 -219
- package/references/multi-agent-protocol/docs-site/getting-started/overview.md +0 -172
- package/references/multi-agent-protocol/docs-site/getting-started/quickstart.md +0 -237
- package/references/multi-agent-protocol/docs-site/index.md +0 -136
- package/references/multi-agent-protocol/docs-site/protocol/authentication.md +0 -391
- package/references/multi-agent-protocol/docs-site/protocol/connection-model.md +0 -376
- package/references/multi-agent-protocol/docs-site/protocol/design.md +0 -284
- package/references/multi-agent-protocol/docs-site/protocol/error-handling.md +0 -312
- package/references/multi-agent-protocol/docs-site/protocol/federation.md +0 -449
- package/references/multi-agent-protocol/docs-site/protocol/index.md +0 -129
- package/references/multi-agent-protocol/docs-site/protocol/permissions.md +0 -398
- package/references/multi-agent-protocol/docs-site/protocol/streaming.md +0 -353
- package/references/multi-agent-protocol/docs-site/protocol/wire-protocol.md +0 -369
- package/references/multi-agent-protocol/docs-site/sdk/api/agent.md +0 -357
- package/references/multi-agent-protocol/docs-site/sdk/api/client.md +0 -380
- package/references/multi-agent-protocol/docs-site/sdk/api/index.md +0 -62
- package/references/multi-agent-protocol/docs-site/sdk/api/server.md +0 -453
- package/references/multi-agent-protocol/docs-site/sdk/api/types.md +0 -468
- package/references/multi-agent-protocol/docs-site/sdk/guides/agent.md +0 -375
- package/references/multi-agent-protocol/docs-site/sdk/guides/authentication.md +0 -405
- package/references/multi-agent-protocol/docs-site/sdk/guides/client.md +0 -352
- package/references/multi-agent-protocol/docs-site/sdk/guides/index.md +0 -89
- package/references/multi-agent-protocol/docs-site/sdk/guides/server.md +0 -360
- package/references/multi-agent-protocol/docs-site/sdk/guides/testing.md +0 -446
- package/references/multi-agent-protocol/docs-site/sdk/guides/transports.md +0 -363
- package/references/multi-agent-protocol/docs-site/sdk/index.md +0 -206
- package/references/multi-agent-protocol/package-lock.json +0 -3886
- package/references/multi-agent-protocol/package.json +0 -56
- package/references/multi-agent-protocol/schema/meta.json +0 -467
- package/references/multi-agent-protocol/schema/schema.json +0 -2558
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests for skills and plugins options handling.
|
|
3
|
-
*
|
|
4
|
-
* Run with: npx vitest run src/tests/skills-options.test.ts
|
|
5
|
-
*/
|
|
6
|
-
import { describe, it, expect, beforeEach, vi } from "vitest";
|
|
7
|
-
import type { ClaudeAcpAgent } from "../acp-agent.js";
|
|
8
|
-
|
|
9
|
-
// Mock client for testing
|
|
10
|
-
const mockClient = {
|
|
11
|
-
sessionUpdate: vi.fn(),
|
|
12
|
-
extNotification: vi.fn(),
|
|
13
|
-
} as any;
|
|
14
|
-
|
|
15
|
-
describe("skills and plugins options", () => {
|
|
16
|
-
let agent: ClaudeAcpAgent;
|
|
17
|
-
|
|
18
|
-
beforeEach(async () => {
|
|
19
|
-
const { ClaudeAcpAgent } = await import("../acp-agent.js");
|
|
20
|
-
agent = new ClaudeAcpAgent(mockClient);
|
|
21
|
-
// Initialize the agent
|
|
22
|
-
await agent.initialize({
|
|
23
|
-
protocolVersion: 1,
|
|
24
|
-
clientInfo: { name: "test-client", version: "1.0.0" },
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
describe("settingSources option", () => {
|
|
29
|
-
it("should use default settingSources when not provided", async () => {
|
|
30
|
-
// We can't easily test the internal options object, but we can verify
|
|
31
|
-
// that the agent accepts a session request without settingSources
|
|
32
|
-
// This test mainly validates the code path doesn't throw
|
|
33
|
-
expect(agent).toBeDefined();
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
it("should accept custom settingSources in _meta", async () => {
|
|
37
|
-
// Verify that the NewSessionMeta type accepts settingSources
|
|
38
|
-
const meta = {
|
|
39
|
-
claudeCode: {
|
|
40
|
-
options: {
|
|
41
|
-
settingSources: ["project"] as const,
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
expect(meta.claudeCode.options.settingSources).toEqual(["project"]);
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
it("should accept all valid settingSources values", async () => {
|
|
49
|
-
const validSources = ["user", "project", "local"] as const;
|
|
50
|
-
const meta = {
|
|
51
|
-
claudeCode: {
|
|
52
|
-
options: {
|
|
53
|
-
settingSources: validSources,
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
expect(meta.claudeCode.options.settingSources).toHaveLength(3);
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
describe("plugins option", () => {
|
|
62
|
-
it("should accept plugins array in _meta", async () => {
|
|
63
|
-
const meta = {
|
|
64
|
-
claudeCode: {
|
|
65
|
-
options: {
|
|
66
|
-
plugins: [
|
|
67
|
-
{ type: "local" as const, path: "./my-plugin" },
|
|
68
|
-
{ type: "local" as const, path: "/absolute/path/to/plugin" },
|
|
69
|
-
],
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
};
|
|
73
|
-
expect(meta.claudeCode.options.plugins).toHaveLength(2);
|
|
74
|
-
expect(meta.claudeCode.options.plugins[0].type).toBe("local");
|
|
75
|
-
expect(meta.claudeCode.options.plugins[0].path).toBe("./my-plugin");
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
it("should accept empty plugins array", async () => {
|
|
79
|
-
const meta = {
|
|
80
|
-
claudeCode: {
|
|
81
|
-
options: {
|
|
82
|
-
plugins: [],
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
};
|
|
86
|
-
expect(meta.claudeCode.options.plugins).toHaveLength(0);
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
describe("allowedTools option", () => {
|
|
91
|
-
it("should accept allowedTools array in _meta", async () => {
|
|
92
|
-
const meta = {
|
|
93
|
-
claudeCode: {
|
|
94
|
-
options: {
|
|
95
|
-
allowedTools: ["Skill", "Read", "Write", "Bash"],
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
};
|
|
99
|
-
expect(meta.claudeCode.options.allowedTools).toContain("Skill");
|
|
100
|
-
expect(meta.claudeCode.options.allowedTools).toHaveLength(4);
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
it("should accept Skill tool for enabling skills", async () => {
|
|
104
|
-
const meta = {
|
|
105
|
-
claudeCode: {
|
|
106
|
-
options: {
|
|
107
|
-
allowedTools: ["Skill"],
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
};
|
|
111
|
-
expect(meta.claudeCode.options.allowedTools).toContain("Skill");
|
|
112
|
-
});
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
describe("disallowedTools option", () => {
|
|
116
|
-
it("should accept disallowedTools array in _meta", async () => {
|
|
117
|
-
const meta = {
|
|
118
|
-
claudeCode: {
|
|
119
|
-
options: {
|
|
120
|
-
disallowedTools: ["WebSearch", "WebFetch"],
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
};
|
|
124
|
-
expect(meta.claudeCode.options.disallowedTools).toHaveLength(2);
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
describe("combined options", () => {
|
|
129
|
-
it("should accept full skills configuration", async () => {
|
|
130
|
-
const meta = {
|
|
131
|
-
claudeCode: {
|
|
132
|
-
options: {
|
|
133
|
-
settingSources: ["user", "project"] as const,
|
|
134
|
-
plugins: [{ type: "local" as const, path: "~/.claude/plugins/my-plugin" }],
|
|
135
|
-
allowedTools: ["Skill", "Read", "Write"],
|
|
136
|
-
disallowedTools: ["WebSearch"],
|
|
137
|
-
},
|
|
138
|
-
compaction: {
|
|
139
|
-
enabled: true,
|
|
140
|
-
contextTokenThreshold: 50000,
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
expect(meta.claudeCode.options.settingSources).toEqual(["user", "project"]);
|
|
146
|
-
expect(meta.claudeCode.options.plugins).toHaveLength(1);
|
|
147
|
-
expect(meta.claudeCode.options.allowedTools).toContain("Skill");
|
|
148
|
-
expect(meta.claudeCode.options.disallowedTools).toContain("WebSearch");
|
|
149
|
-
expect(meta.claudeCode.compaction?.enabled).toBe(true);
|
|
150
|
-
});
|
|
151
|
-
});
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
describe("SkillInfo type", () => {
|
|
155
|
-
it("should have correct structure", async () => {
|
|
156
|
-
const { SkillInfo } = await import("../acp-agent.js") as any;
|
|
157
|
-
|
|
158
|
-
// Test that the type structure is correct by creating a valid object
|
|
159
|
-
const skill = {
|
|
160
|
-
name: "test-skill",
|
|
161
|
-
description: "A test skill",
|
|
162
|
-
source: "project" as const,
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
expect(skill.name).toBe("test-skill");
|
|
166
|
-
expect(skill.description).toBe("A test skill");
|
|
167
|
-
expect(skill.source).toBe("project");
|
|
168
|
-
});
|
|
169
|
-
|
|
170
|
-
it("should allow optional fields", async () => {
|
|
171
|
-
const skill = {
|
|
172
|
-
name: "minimal-skill",
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
expect(skill.name).toBe("minimal-skill");
|
|
176
|
-
expect((skill as any).description).toBeUndefined();
|
|
177
|
-
expect((skill as any).source).toBeUndefined();
|
|
178
|
-
});
|
|
179
|
-
|
|
180
|
-
it("should accept all valid source values", async () => {
|
|
181
|
-
const sources = ["user", "project", "plugin"] as const;
|
|
182
|
-
sources.forEach((source) => {
|
|
183
|
-
const skill = { name: "test", source };
|
|
184
|
-
expect(skill.source).toBe(source);
|
|
185
|
-
});
|
|
186
|
-
});
|
|
187
|
-
});
|
|
@@ -1,318 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from "vitest";
|
|
2
|
-
import { AgentSideConnection } from "@agentclientprotocol/sdk";
|
|
3
|
-
import { ToolResultBlockParam } from "@anthropic-ai/sdk/resources";
|
|
4
|
-
import {
|
|
5
|
-
BetaMCPToolResultBlock,
|
|
6
|
-
BetaTextBlock,
|
|
7
|
-
BetaWebSearchResultBlock,
|
|
8
|
-
BetaWebSearchToolResultBlock,
|
|
9
|
-
BetaBashCodeExecutionToolResultBlock,
|
|
10
|
-
BetaBashCodeExecutionResultBlock,
|
|
11
|
-
} from "@anthropic-ai/sdk/resources/beta.mjs";
|
|
12
|
-
import { toAcpNotifications, ToolUseCache, Logger } from "../acp-agent.js";
|
|
13
|
-
|
|
14
|
-
describe("rawOutput in tool call updates", () => {
|
|
15
|
-
const mockClient = {} as AgentSideConnection;
|
|
16
|
-
const mockLogger: Logger = { log: () => {}, error: () => {} };
|
|
17
|
-
|
|
18
|
-
it("should include rawOutput with string content for tool_result", () => {
|
|
19
|
-
const toolUseCache: ToolUseCache = {
|
|
20
|
-
toolu_123: {
|
|
21
|
-
type: "tool_use",
|
|
22
|
-
id: "toolu_123",
|
|
23
|
-
name: "Bash",
|
|
24
|
-
input: { command: "echo hello" },
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const toolResult: ToolResultBlockParam = {
|
|
29
|
-
type: "tool_result",
|
|
30
|
-
tool_use_id: "toolu_123",
|
|
31
|
-
content: "hello\n",
|
|
32
|
-
is_error: false,
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const notifications = toAcpNotifications(
|
|
36
|
-
[toolResult],
|
|
37
|
-
"assistant",
|
|
38
|
-
"test-session",
|
|
39
|
-
toolUseCache,
|
|
40
|
-
mockClient,
|
|
41
|
-
mockLogger,
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
expect(notifications).toHaveLength(1);
|
|
45
|
-
expect(notifications[0].update).toMatchObject({
|
|
46
|
-
sessionUpdate: "tool_call_update",
|
|
47
|
-
toolCallId: "toolu_123",
|
|
48
|
-
status: "completed",
|
|
49
|
-
rawOutput: "hello\n",
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
it("should include rawOutput with array content for tool_result", () => {
|
|
54
|
-
const toolUseCache: ToolUseCache = {
|
|
55
|
-
toolu_456: {
|
|
56
|
-
type: "tool_use",
|
|
57
|
-
id: "toolu_456",
|
|
58
|
-
name: "Read",
|
|
59
|
-
input: { file_path: "/test/file.txt" },
|
|
60
|
-
},
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
// ToolResultBlockParam content can be string or array of TextBlockParam
|
|
64
|
-
const toolResult: ToolResultBlockParam = {
|
|
65
|
-
type: "tool_result",
|
|
66
|
-
tool_use_id: "toolu_456",
|
|
67
|
-
content: [{ type: "text", text: "Line 1\nLine 2\nLine 3" }],
|
|
68
|
-
is_error: false,
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
const notifications = toAcpNotifications(
|
|
72
|
-
[toolResult],
|
|
73
|
-
"assistant",
|
|
74
|
-
"test-session",
|
|
75
|
-
toolUseCache,
|
|
76
|
-
mockClient,
|
|
77
|
-
mockLogger,
|
|
78
|
-
);
|
|
79
|
-
|
|
80
|
-
expect(notifications).toHaveLength(1);
|
|
81
|
-
expect(notifications[0].update).toMatchObject({
|
|
82
|
-
sessionUpdate: "tool_call_update",
|
|
83
|
-
toolCallId: "toolu_456",
|
|
84
|
-
status: "completed",
|
|
85
|
-
rawOutput: [{ type: "text", text: "Line 1\nLine 2\nLine 3" }],
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
it("should include rawOutput for mcp_tool_result with string content", () => {
|
|
90
|
-
const toolUseCache: ToolUseCache = {
|
|
91
|
-
toolu_789: {
|
|
92
|
-
type: "tool_use",
|
|
93
|
-
id: "toolu_789",
|
|
94
|
-
name: "mcp__server__tool",
|
|
95
|
-
input: { query: "test" },
|
|
96
|
-
},
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
// BetaMCPToolResultBlock content can be string or Array<BetaTextBlock>
|
|
100
|
-
const toolResult: BetaMCPToolResultBlock = {
|
|
101
|
-
type: "mcp_tool_result",
|
|
102
|
-
tool_use_id: "toolu_789",
|
|
103
|
-
content: '{"result": "success", "data": [1, 2, 3]}',
|
|
104
|
-
is_error: false,
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
const notifications = toAcpNotifications(
|
|
108
|
-
[toolResult],
|
|
109
|
-
"assistant",
|
|
110
|
-
"test-session",
|
|
111
|
-
toolUseCache,
|
|
112
|
-
mockClient,
|
|
113
|
-
mockLogger,
|
|
114
|
-
);
|
|
115
|
-
|
|
116
|
-
expect(notifications).toHaveLength(1);
|
|
117
|
-
expect(notifications[0].update).toMatchObject({
|
|
118
|
-
sessionUpdate: "tool_call_update",
|
|
119
|
-
toolCallId: "toolu_789",
|
|
120
|
-
status: "completed",
|
|
121
|
-
rawOutput: '{"result": "success", "data": [1, 2, 3]}',
|
|
122
|
-
});
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
it("should include rawOutput for mcp_tool_result with array content", () => {
|
|
126
|
-
const toolUseCache: ToolUseCache = {
|
|
127
|
-
toolu_abc: {
|
|
128
|
-
type: "tool_use",
|
|
129
|
-
id: "toolu_abc",
|
|
130
|
-
name: "mcp__server__search",
|
|
131
|
-
input: { term: "test" },
|
|
132
|
-
},
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
// BetaTextBlock requires citations field
|
|
136
|
-
const arrayContent: BetaTextBlock[] = [
|
|
137
|
-
{ type: "text", text: "Result 1", citations: null },
|
|
138
|
-
{ type: "text", text: "Result 2", citations: null },
|
|
139
|
-
];
|
|
140
|
-
|
|
141
|
-
const toolResult: BetaMCPToolResultBlock = {
|
|
142
|
-
type: "mcp_tool_result",
|
|
143
|
-
tool_use_id: "toolu_abc",
|
|
144
|
-
content: arrayContent,
|
|
145
|
-
is_error: false,
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
const notifications = toAcpNotifications(
|
|
149
|
-
[toolResult],
|
|
150
|
-
"assistant",
|
|
151
|
-
"test-session",
|
|
152
|
-
toolUseCache,
|
|
153
|
-
mockClient,
|
|
154
|
-
mockLogger,
|
|
155
|
-
);
|
|
156
|
-
|
|
157
|
-
expect(notifications).toHaveLength(1);
|
|
158
|
-
expect(notifications[0].update).toMatchObject({
|
|
159
|
-
sessionUpdate: "tool_call_update",
|
|
160
|
-
toolCallId: "toolu_abc",
|
|
161
|
-
status: "completed",
|
|
162
|
-
rawOutput: arrayContent,
|
|
163
|
-
});
|
|
164
|
-
});
|
|
165
|
-
|
|
166
|
-
it("should include rawOutput for web_search_tool_result", () => {
|
|
167
|
-
const toolUseCache: ToolUseCache = {
|
|
168
|
-
toolu_web: {
|
|
169
|
-
type: "tool_use",
|
|
170
|
-
id: "toolu_web",
|
|
171
|
-
name: "WebSearch",
|
|
172
|
-
input: { query: "test search" },
|
|
173
|
-
},
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
// BetaWebSearchResultBlock from SDK
|
|
177
|
-
const searchResults: BetaWebSearchResultBlock[] = [
|
|
178
|
-
{
|
|
179
|
-
type: "web_search_result",
|
|
180
|
-
url: "https://example.com",
|
|
181
|
-
title: "Example",
|
|
182
|
-
encrypted_content: "encrypted content here",
|
|
183
|
-
page_age: "2 days ago",
|
|
184
|
-
},
|
|
185
|
-
];
|
|
186
|
-
|
|
187
|
-
const toolResult: BetaWebSearchToolResultBlock = {
|
|
188
|
-
type: "web_search_tool_result",
|
|
189
|
-
tool_use_id: "toolu_web",
|
|
190
|
-
content: searchResults,
|
|
191
|
-
};
|
|
192
|
-
|
|
193
|
-
const notifications = toAcpNotifications(
|
|
194
|
-
[toolResult],
|
|
195
|
-
"assistant",
|
|
196
|
-
"test-session",
|
|
197
|
-
toolUseCache,
|
|
198
|
-
mockClient,
|
|
199
|
-
mockLogger,
|
|
200
|
-
);
|
|
201
|
-
|
|
202
|
-
expect(notifications).toHaveLength(1);
|
|
203
|
-
expect(notifications[0].update).toMatchObject({
|
|
204
|
-
sessionUpdate: "tool_call_update",
|
|
205
|
-
toolCallId: "toolu_web",
|
|
206
|
-
status: "completed",
|
|
207
|
-
rawOutput: searchResults,
|
|
208
|
-
});
|
|
209
|
-
});
|
|
210
|
-
|
|
211
|
-
it("should include rawOutput for bash_code_execution_tool_result", () => {
|
|
212
|
-
const toolUseCache: ToolUseCache = {
|
|
213
|
-
toolu_bash: {
|
|
214
|
-
type: "tool_use",
|
|
215
|
-
id: "toolu_bash",
|
|
216
|
-
name: "Bash",
|
|
217
|
-
input: { command: "ls -la" },
|
|
218
|
-
},
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
// BetaBashCodeExecutionResultBlock from SDK
|
|
222
|
-
const bashResult: BetaBashCodeExecutionResultBlock = {
|
|
223
|
-
type: "bash_code_execution_result",
|
|
224
|
-
stdout: "file1.txt\nfile2.txt",
|
|
225
|
-
stderr: "",
|
|
226
|
-
return_code: 0,
|
|
227
|
-
content: [],
|
|
228
|
-
};
|
|
229
|
-
|
|
230
|
-
const toolResult: BetaBashCodeExecutionToolResultBlock = {
|
|
231
|
-
type: "bash_code_execution_tool_result",
|
|
232
|
-
tool_use_id: "toolu_bash",
|
|
233
|
-
content: bashResult,
|
|
234
|
-
};
|
|
235
|
-
|
|
236
|
-
const notifications = toAcpNotifications(
|
|
237
|
-
[toolResult],
|
|
238
|
-
"assistant",
|
|
239
|
-
"test-session",
|
|
240
|
-
toolUseCache,
|
|
241
|
-
mockClient,
|
|
242
|
-
mockLogger,
|
|
243
|
-
);
|
|
244
|
-
|
|
245
|
-
expect(notifications).toHaveLength(1);
|
|
246
|
-
expect(notifications[0].update).toMatchObject({
|
|
247
|
-
sessionUpdate: "tool_call_update",
|
|
248
|
-
toolCallId: "toolu_bash",
|
|
249
|
-
status: "completed",
|
|
250
|
-
rawOutput: bashResult,
|
|
251
|
-
});
|
|
252
|
-
});
|
|
253
|
-
|
|
254
|
-
it("should set status to failed when is_error is true", () => {
|
|
255
|
-
const toolUseCache: ToolUseCache = {
|
|
256
|
-
toolu_err: {
|
|
257
|
-
type: "tool_use",
|
|
258
|
-
id: "toolu_err",
|
|
259
|
-
name: "Bash",
|
|
260
|
-
input: { command: "invalid_command" },
|
|
261
|
-
},
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
const toolResult: ToolResultBlockParam = {
|
|
265
|
-
type: "tool_result",
|
|
266
|
-
tool_use_id: "toolu_err",
|
|
267
|
-
content: "command not found: invalid_command",
|
|
268
|
-
is_error: true,
|
|
269
|
-
};
|
|
270
|
-
|
|
271
|
-
const notifications = toAcpNotifications(
|
|
272
|
-
[toolResult],
|
|
273
|
-
"assistant",
|
|
274
|
-
"test-session",
|
|
275
|
-
toolUseCache,
|
|
276
|
-
mockClient,
|
|
277
|
-
mockLogger,
|
|
278
|
-
);
|
|
279
|
-
|
|
280
|
-
expect(notifications).toHaveLength(1);
|
|
281
|
-
expect(notifications[0].update).toMatchObject({
|
|
282
|
-
sessionUpdate: "tool_call_update",
|
|
283
|
-
toolCallId: "toolu_err",
|
|
284
|
-
status: "failed",
|
|
285
|
-
rawOutput: "command not found: invalid_command",
|
|
286
|
-
});
|
|
287
|
-
});
|
|
288
|
-
|
|
289
|
-
it("should not emit tool_call_update for TodoWrite (emits plan instead)", () => {
|
|
290
|
-
const toolUseCache: ToolUseCache = {
|
|
291
|
-
toolu_todo: {
|
|
292
|
-
type: "tool_use",
|
|
293
|
-
id: "toolu_todo",
|
|
294
|
-
name: "TodoWrite",
|
|
295
|
-
input: { todos: [{ content: "Test task", status: "pending" }] },
|
|
296
|
-
},
|
|
297
|
-
};
|
|
298
|
-
|
|
299
|
-
const toolResult: ToolResultBlockParam = {
|
|
300
|
-
type: "tool_result",
|
|
301
|
-
tool_use_id: "toolu_todo",
|
|
302
|
-
content: "Todos updated successfully",
|
|
303
|
-
is_error: false,
|
|
304
|
-
};
|
|
305
|
-
|
|
306
|
-
const notifications = toAcpNotifications(
|
|
307
|
-
[toolResult],
|
|
308
|
-
"assistant",
|
|
309
|
-
"test-session",
|
|
310
|
-
toolUseCache,
|
|
311
|
-
mockClient,
|
|
312
|
-
mockLogger,
|
|
313
|
-
);
|
|
314
|
-
|
|
315
|
-
// TodoWrite should not emit tool_call_update - it emits plan updates instead
|
|
316
|
-
expect(notifications).toHaveLength(0);
|
|
317
|
-
});
|
|
318
|
-
});
|