@myagentroam/agent 0.11.33 → 0.11.34
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/dist/cli/catalog-file.d.ts +78 -0
- package/dist/cli/catalog-file.js +102 -0
- package/dist/cli/codex-auth-file.d.ts +1 -1
- package/dist/cli/codex-auth-file.js +9 -10
- package/dist/cli/main.js +44 -54
- package/dist/error.d.ts +15 -0
- package/dist/error.js +74 -0
- package/dist/extensions/agents.d.ts +100 -0
- package/dist/extensions/agents.js +121 -0
- package/dist/extensions/capabilities.d.ts +4 -0
- package/dist/extensions/commands.d.ts +23 -0
- package/dist/extensions/commands.js +45 -0
- package/dist/extensions/compaction.d.ts +36 -0
- package/dist/extensions/contracts.d.ts +147 -0
- package/dist/extensions/data.d.ts +81 -0
- package/dist/extensions/data.js +78 -0
- package/dist/extensions/environment.d.ts +39 -0
- package/dist/extensions/environment.js +52 -0
- package/dist/extensions/files.d.ts +68 -0
- package/dist/extensions/files.js +26 -0
- package/dist/extensions/hooks.d.ts +32 -0
- package/dist/extensions/host-ports.d.ts +24 -0
- package/dist/extensions/manager.d.ts +42 -0
- package/dist/extensions/manager.js +457 -0
- package/dist/extensions/mcp.d.ts +116 -0
- package/dist/extensions/mcp.js +434 -0
- package/dist/extensions/model-request.d.ts +65 -0
- package/dist/extensions/model-request.js +197 -0
- package/dist/extensions/model-stream.d.ts +18 -0
- package/dist/extensions/model-stream.js +108 -0
- package/dist/extensions/models.d.ts +46 -0
- package/dist/extensions/models.js +7 -0
- package/dist/extensions/network.d.ts +40 -0
- package/dist/extensions/network.js +97 -0
- package/dist/extensions/operation.d.ts +32 -0
- package/dist/extensions/processes.d.ts +64 -0
- package/dist/extensions/processes.js +284 -0
- package/dist/extensions/prompt-composition.d.ts +38 -0
- package/dist/extensions/prompt-composition.js +100 -0
- package/dist/extensions/prompt-input.d.ts +30 -0
- package/dist/extensions/prompt-input.js +48 -0
- package/dist/extensions/prompts.d.ts +31 -0
- package/dist/extensions/prompts.js +88 -0
- package/dist/extensions/resources.d.ts +26 -0
- package/dist/extensions/resources.js +221 -0
- package/dist/extensions/services.d.ts +31 -0
- package/dist/extensions/services.js +61 -0
- package/dist/extensions/session-api.d.ts +6 -0
- package/dist/extensions/session-api.js +52 -0
- package/dist/extensions/session-input.d.ts +184 -0
- package/dist/extensions/session-input.js +422 -0
- package/dist/extensions/session-messages.d.ts +41 -0
- package/dist/extensions/session-messages.js +76 -0
- package/dist/extensions/session-tools.d.ts +32 -0
- package/dist/extensions/session-tools.js +208 -0
- package/dist/extensions/session.d.ts +60 -0
- package/dist/extensions/session.js +265 -0
- package/dist/extensions/settings.d.ts +76 -0
- package/dist/extensions/settings.js +115 -0
- package/dist/extensions/store.d.ts +10 -0
- package/dist/extensions/store.js +131 -0
- package/dist/extensions/tool-runtime.d.ts +16 -0
- package/dist/extensions/tools.d.ts +80 -0
- package/dist/extensions/tools.js +270 -0
- package/dist/extensions.d.ts +22 -0
- package/dist/host/contracts.d.ts +58 -0
- package/dist/host/contracts.js +18 -0
- package/dist/host/description.d.ts +19 -0
- package/dist/host/local-agent-host.d.ts +96 -0
- package/dist/host/local-agent-host.js +429 -0
- package/dist/host/local-exec-tool.d.ts +26 -0
- package/dist/host/local-exec-tool.js +686 -0
- package/dist/host/local-file-access.d.ts +30 -0
- package/dist/host/local-file-access.js +107 -0
- package/dist/host/local-network-access.d.ts +6 -0
- package/dist/host/local-network-access.js +101 -0
- package/dist/host/local-process-executor.d.ts +5 -0
- package/dist/host/local-process-executor.js +17 -0
- package/dist/host/local-session-environment.d.ts +18 -0
- package/dist/host/local-shell.d.ts +3 -0
- package/dist/host/local-tool-registry.d.ts +34 -0
- package/dist/host/local-tool-registry.js +134 -0
- package/dist/host/network.d.ts +5 -0
- package/dist/host/network.js +42 -0
- package/dist/host/process-control.d.ts +2 -0
- package/dist/host/process-control.js +26 -0
- package/dist/host/skill-contract.d.ts +6 -0
- package/dist/host.d.ts +17 -0
- package/dist/host.js +3 -0
- package/dist/index.d.ts +26 -51
- package/dist/index.js +9 -12
- package/dist/model/anthropic-messages.d.ts +10 -0
- package/dist/model/anthropic-messages.js +692 -0
- package/dist/model/anthropic-thinking.js +33 -0
- package/dist/model/configuration.d.ts +111 -0
- package/dist/model/configuration.js +201 -0
- package/dist/model/contracts.d.ts +229 -0
- package/dist/model/http.d.ts +13 -0
- package/dist/model/http.js +119 -0
- package/dist/model/image-contract.d.ts +10 -0
- package/dist/model/image.d.ts +9 -0
- package/dist/model/inline-media-budget.d.ts +7 -0
- package/dist/model/inline-media-budget.js +36 -0
- package/dist/model/input-images.d.ts +3 -0
- package/dist/model/input-images.js +16 -0
- package/dist/model/openai-responses.d.ts +59 -0
- package/dist/model/openai-responses.js +1586 -0
- package/dist/model/recovery.js +80 -0
- package/dist/model/request-configuration.d.ts +17 -0
- package/dist/model/request-configuration.js +47 -0
- package/dist/model/responses-event-projection.d.ts +24 -0
- package/dist/model/responses-event-projection.js +194 -0
- package/dist/model/responses-request.d.ts +5 -0
- package/dist/model/responses-request.js +363 -0
- package/dist/model/responses-session-cache.d.ts +33 -0
- package/dist/model/responses-session-cache.js +64 -0
- package/dist/model/runtime-credential.d.ts +1 -0
- package/dist/model/runtime-credential.js +1 -0
- package/dist/model/sse.js +281 -0
- package/dist/model/text-blocks.js +40 -0
- package/dist/model/tool-declarations.d.ts +4 -0
- package/dist/model/tool-definition-projection.d.ts +6 -0
- package/dist/model/tool-definition-projection.js +11 -0
- package/dist/model/tool-schema.d.ts +2 -0
- package/dist/model/tool-schema.js +17 -0
- package/dist/model/transport-test.d.ts +10 -0
- package/dist/model/transport-test.js +27 -0
- package/dist/model/usage-observer.d.ts +5 -0
- package/dist/model/usage.d.ts +40 -0
- package/dist/network/credential-runtime.d.ts +8 -0
- package/dist/network/credential-runtime.js +72 -0
- package/dist/network/credentials.d.ts +20 -0
- package/dist/network/credentials.js +18 -0
- package/dist/network/http.d.ts +20 -0
- package/dist/network/http.js +421 -0
- package/dist/network/product-user-agent.d.ts +5 -0
- package/dist/network/product-user-agent.js +22 -0
- package/dist/network/transport-error.d.ts +5 -0
- package/dist/network/transport-error.js +31 -0
- package/dist/process/contracts.d.ts +26 -0
- package/dist/prompts/index.d.ts +20 -0
- package/dist/prompts/index.js +49 -0
- package/dist/prompts/prompt-sections.d.ts +6 -0
- package/dist/prompts/prompt-sections.js +6 -0
- package/dist/prompts/read-context.js +152 -0
- package/dist/runtime/compaction/contracts.d.ts +23 -0
- package/dist/runtime/compaction/coordinator.js +88 -0
- package/dist/runtime/compaction/generate.d.ts +31 -0
- package/dist/runtime/compaction/generate.js +84 -0
- package/dist/runtime/compaction/history.d.ts +16 -0
- package/dist/runtime/compaction/operation.d.ts +30 -0
- package/dist/runtime/compaction/operation.js +131 -0
- package/dist/runtime/compaction/requests.d.ts +16 -0
- package/dist/runtime/compaction/requests.js +114 -0
- package/dist/runtime/compaction/retained-context.d.ts +6 -0
- package/dist/runtime/compaction/retained-context.js +48 -0
- package/dist/runtime/compaction/smart.d.ts +14 -0
- package/dist/runtime/compaction/smart.js +59 -0
- package/dist/runtime/context/contextual-blocks.d.ts +31 -0
- package/dist/runtime/context/contextual-blocks.js +158 -0
- package/dist/runtime/context/environment.d.ts +5 -0
- package/dist/runtime/context/gc-candidates-code.d.ts +6 -0
- package/dist/runtime/context/gc-candidates-code.js +102 -0
- package/dist/runtime/context/gc-candidates-exec.d.ts +6 -0
- package/dist/runtime/context/gc-candidates-exec.js +131 -0
- package/dist/runtime/context/gc-candidates-read-patch.d.ts +7 -0
- package/dist/runtime/context/gc-candidates-read-patch.js +118 -0
- package/dist/runtime/context/gc-candidates-subagent.d.ts +6 -0
- package/dist/runtime/context/gc-candidates-subagent.js +100 -0
- package/dist/runtime/context/gc-candidates-web.d.ts +6 -0
- package/dist/runtime/context/gc-candidates-web.js +58 -0
- package/dist/runtime/context/gc-candidates.d.ts +12 -0
- package/dist/runtime/context/gc-candidates.js +192 -0
- package/dist/runtime/context/gc-contracts.d.ts +57 -0
- package/dist/runtime/context/gc-economics.d.ts +48 -0
- package/dist/runtime/context/gc-economics.js +161 -0
- package/dist/runtime/context/gc-runtime.d.ts +43 -0
- package/dist/runtime/context/gc-tokens.d.ts +26 -0
- package/dist/runtime/context/gc-tokens.js +106 -0
- package/dist/runtime/context/gc.d.ts +7 -0
- package/dist/runtime/context/gc.js +552 -0
- package/dist/runtime/context/instructions.d.ts +37 -0
- package/dist/runtime/context/instructions.js +297 -0
- package/dist/runtime/context/normalize.d.ts +5 -0
- package/dist/runtime/context/projection.d.ts +23 -0
- package/dist/runtime/context/projection.js +284 -0
- package/dist/runtime/context/request-budget.d.ts +5 -0
- package/dist/runtime/context/request-budget.js +25 -0
- package/dist/runtime/context/restore.d.ts +27 -0
- package/dist/runtime/context/restore.js +186 -0
- package/dist/runtime/context/usage.d.ts +17 -0
- package/dist/runtime/context/usage.js +124 -0
- package/dist/runtime/context/world-state.d.ts +34 -0
- package/dist/runtime/context/world-state.js +232 -0
- package/dist/runtime/contracts.d.ts +29 -0
- package/dist/runtime/event-projection.d.ts +14 -0
- package/dist/runtime/event-projection.js +87 -0
- package/dist/runtime/events.d.ts +195 -0
- package/dist/runtime/execution-handle.d.ts +12 -0
- package/dist/runtime/execution-handle.js +1 -0
- package/dist/runtime/execution.d.ts +55 -0
- package/dist/runtime/execution.js +444 -0
- package/dist/runtime/model-progress.js +85 -0
- package/dist/runtime/resource-publication.d.ts +27 -0
- package/dist/runtime/resource-publication.js +60 -0
- package/dist/runtime/tool-round-contract.d.ts +19 -0
- package/dist/runtime/tool-round-contract.js +1 -0
- package/dist/runtime/wait.js +82 -0
- package/dist/sandbox/linux/bubblewrap-sandbox-executor.d.ts +1 -1
- package/dist/sandbox/linux/bubblewrap-sandbox-executor.js +8 -8
- package/dist/sdk/agent.d.ts +7 -0
- package/dist/sdk/agent.js +321 -0
- package/dist/sdk/execution-code-mode.d.ts +18 -0
- package/dist/sdk/execution-code-mode.js +51 -0
- package/dist/sdk/execution-compact-commit.d.ts +23 -0
- package/dist/sdk/execution-compact-commit.js +41 -0
- package/dist/sdk/execution-compact-extension.d.ts +12 -0
- package/dist/sdk/execution-compact-extension.js +46 -0
- package/dist/sdk/execution-compact-generation.d.ts +17 -0
- package/dist/sdk/execution-compact-generation.js +30 -0
- package/dist/sdk/execution-compaction-flight.d.ts +31 -0
- package/dist/sdk/execution-compaction-flight.js +50 -0
- package/dist/sdk/execution-compaction.d.ts +47 -0
- package/dist/sdk/execution-compaction.js +121 -0
- package/dist/sdk/execution-context-coordinator.d.ts +56 -0
- package/dist/sdk/execution-context-coordinator.js +102 -0
- package/dist/sdk/execution-input.d.ts +58 -0
- package/dist/sdk/execution-input.js +266 -0
- package/dist/sdk/execution-model-context.d.ts +52 -0
- package/dist/sdk/execution-model-context.js +156 -0
- package/dist/sdk/execution-model-lifecycle.d.ts +39 -0
- package/dist/sdk/execution-model-lifecycle.js +73 -0
- package/dist/sdk/execution-model-request.d.ts +40 -0
- package/dist/sdk/execution-model-request.js +45 -0
- package/dist/sdk/execution-round-preparation.d.ts +11 -0
- package/dist/sdk/execution-round-preparation.js +18 -0
- package/dist/sdk/execution-round-request.d.ts +30 -0
- package/dist/sdk/execution-round-request.js +31 -0
- package/dist/sdk/execution-tool-catalog.d.ts +46 -0
- package/dist/sdk/execution-tool-catalog.js +103 -0
- package/dist/sdk/execution-tool-scope.d.ts +67 -0
- package/dist/sdk/execution-tool-scope.js +147 -0
- package/dist/sdk/extension-agent-controller.d.ts +3 -0
- package/dist/sdk/extension-agent-controller.js +69 -0
- package/dist/sdk/extension-agents.d.ts +9 -0
- package/dist/sdk/extension-agents.js +58 -0
- package/dist/sdk/extension-models.d.ts +17 -0
- package/dist/sdk/extension-models.js +142 -0
- package/dist/sdk/extension-session-launch.d.ts +18 -0
- package/dist/sdk/extension-session-launch.js +73 -0
- package/dist/sdk/extension-session.d.ts +30 -0
- package/dist/sdk/extension-session.js +107 -0
- package/dist/sdk/extension-tool-runtime.d.ts +2 -0
- package/dist/sdk/extension-tool-runtime.js +14 -0
- package/dist/sdk/extension-tools.d.ts +16 -0
- package/dist/sdk/extension-tools.js +126 -0
- package/dist/sdk/model-input-projection.d.ts +4 -0
- package/dist/sdk/model-input-projection.js +27 -0
- package/dist/sdk/model-runtime.d.ts +21 -0
- package/dist/sdk/model-runtime.js +91 -0
- package/dist/sdk/native-steer.d.ts +20 -0
- package/dist/sdk/native-steer.js +84 -0
- package/dist/sdk/request-preparation.d.ts +9 -0
- package/dist/sdk/resource-input.d.ts +33 -0
- package/dist/sdk/resource-input.js +402 -0
- package/dist/sdk/session-catalog.d.ts +2 -0
- package/dist/sdk/session-catalog.js +12 -0
- package/dist/sdk/session-composition.d.ts +54 -0
- package/dist/sdk/session-composition.js +1 -0
- package/dist/sdk/session-execution-factory.d.ts +43 -0
- package/dist/sdk/session-execution-factory.js +937 -0
- package/dist/sdk/session-execution.d.ts +163 -0
- package/dist/sdk/session-execution.js +388 -0
- package/dist/sdk/session-extension-messages.d.ts +16 -0
- package/dist/sdk/session-extension-messages.js +64 -0
- package/dist/sdk/session-extension-prompt.d.ts +35 -0
- package/dist/sdk/session-extension-prompt.js +62 -0
- package/dist/sdk/session-maintenance.d.ts +25 -0
- package/dist/sdk/session-maintenance.js +205 -0
- package/dist/sdk/session-model-adapters.d.ts +28 -0
- package/dist/sdk/session-model-adapters.js +96 -0
- package/dist/sdk/session-open.d.ts +22 -0
- package/dist/sdk/session-open.js +44 -0
- package/dist/sdk/session-registry.d.ts +17 -0
- package/dist/sdk/session-registry.js +83 -0
- package/dist/sdk/session-runtime.d.ts +72 -0
- package/dist/sdk/session-runtime.js +205 -0
- package/dist/sdk/session.d.ts +3 -0
- package/dist/sdk/session.js +313 -0
- package/dist/sdk/subagent-backend.d.ts +3 -0
- package/dist/sdk/subagent-backend.js +49 -0
- package/dist/sdk/types.d.ts +80 -0
- package/dist/sdk/types.js +1 -0
- package/dist/session/catalog.d.ts +70 -0
- package/dist/session/catalog.js +194 -0
- package/dist/session/code-observation-contract.d.ts +40 -0
- package/dist/session/code-observation-contract.js +1 -0
- package/dist/session/code-observation-projection.d.ts +54 -0
- package/dist/session/code-observation-projection.js +165 -0
- package/dist/session/code-state.d.ts +27 -0
- package/dist/session/code-state.js +89 -0
- package/dist/session/context-gc-checkpoint.d.ts +26 -0
- package/dist/session/context-gc-checkpoint.js +935 -0
- package/dist/session/context-gc-contract.d.ts +141 -0
- package/dist/session/context-gc-contract.js +1 -0
- package/dist/session/context-gc-observations.d.ts +58 -0
- package/dist/session/context-gc-observations.js +187 -0
- package/dist/session/context-gc-replacements.d.ts +63 -0
- package/dist/session/context-gc-subagent.d.ts +54 -0
- package/dist/session/deferred-input.d.ts +5 -0
- package/dist/session/deferred-input.js +74 -0
- package/dist/session/extension-checkpoint.d.ts +8 -0
- package/dist/session/extension-checkpoint.js +30 -0
- package/dist/session/history-input-limits.d.ts +4 -0
- package/dist/session/history-input-limits.js +4 -0
- package/dist/session/inline-media-contract.d.ts +16 -0
- package/dist/session/inline-media-contract.js +1 -0
- package/dist/session/inline-media.d.ts +26 -0
- package/dist/session/inline-media.js +138 -0
- package/dist/session/model-request.d.ts +14 -0
- package/dist/session/model-request.js +1 -0
- package/dist/session/record-contract.d.ts +19 -0
- package/dist/session/record-contract.js +1 -0
- package/dist/session/record-projection.d.ts +6 -0
- package/dist/session/record-projection.js +80 -0
- package/dist/session/resource-contract.d.ts +9 -0
- package/dist/session/resource-contract.js +1 -0
- package/dist/session/rollback.d.ts +13 -0
- package/dist/session/rollback.js +46 -0
- package/dist/session/store/contracts.d.ts +160 -0
- package/dist/session/store/contracts.js +1 -0
- package/dist/session/store/current-state.d.ts +17 -0
- package/dist/session/store/current-state.js +53 -0
- package/dist/session/store/execution-state.d.ts +13 -0
- package/dist/session/store/execution-state.js +103 -0
- package/dist/session/store/index.d.ts +4 -0
- package/dist/session/store/index.js +2 -0
- package/dist/session/store/jsonl/directory-index.d.ts +26 -0
- package/dist/session/store/jsonl/directory-index.js +283 -0
- package/dist/session/store/jsonl/fs-durability.d.ts +3 -0
- package/dist/session/store/jsonl/fs-durability.js +17 -0
- package/dist/session/store/jsonl/history-replacement.d.ts +48 -0
- package/dist/session/store/jsonl/history-replacement.js +147 -0
- package/dist/session/store/jsonl/history.d.ts +25 -0
- package/dist/session/store/jsonl/history.js +181 -0
- package/dist/session/store/jsonl/images.d.ts +19 -0
- package/dist/session/store/jsonl/images.js +122 -0
- package/dist/session/store/jsonl/index-transaction.d.ts +13 -0
- package/dist/session/store/jsonl/index-transaction.js +87 -0
- package/dist/session/store/jsonl/jsonl-admission.d.ts +10 -0
- package/dist/session/store/jsonl/jsonl-admission.js +205 -0
- package/dist/session/store/jsonl/jsonl-codec.d.ts +11 -0
- package/dist/session/store/jsonl/jsonl-codec.js +138 -0
- package/dist/session/store/jsonl/jsonl-migration.d.ts +12 -0
- package/dist/session/store/jsonl/jsonl-migration.js +105 -0
- package/dist/session/store/jsonl/jsonl-store.d.ts +171 -0
- package/dist/session/store/jsonl/jsonl-store.js +2482 -0
- package/dist/session/store/jsonl/open-recovery.d.ts +13 -0
- package/dist/session/store/jsonl/open-recovery.js +131 -0
- package/dist/session/store/jsonl/read-pins.d.ts +4 -0
- package/dist/session/store/jsonl/read-pins.js +131 -0
- package/dist/session/store/jsonl/record-append.d.ts +16 -0
- package/dist/session/store/jsonl/record-append.js +49 -0
- package/dist/session/store/jsonl/records.d.ts +30 -0
- package/dist/session/store/jsonl/records.js +313 -0
- package/dist/session/store/jsonl/resources.d.ts +19 -0
- package/dist/session/store/jsonl/resources.js +209 -0
- package/dist/session/store/jsonl/store-pool.d.ts +12 -0
- package/dist/session/store/jsonl/store-pool.js +55 -0
- package/dist/session/store/jsonl/transaction-recovery.d.ts +48 -0
- package/dist/session/store/jsonl/transaction-recovery.js +374 -0
- package/dist/session/store/jsonl/tree-maintenance.d.ts +12 -0
- package/dist/session/store/jsonl/tree-maintenance.js +59 -0
- package/dist/session/store/types.d.ts +69 -0
- package/dist/session/store/types.js +1 -0
- package/dist/session/summary.d.ts +18 -0
- package/dist/session/summary.js +1 -0
- package/dist/session/todo.d.ts +11 -0
- package/dist/session/todo.js +30 -0
- package/dist/session/tool-result-resources.d.ts +27 -0
- package/dist/session/tool-result-resources.js +255 -0
- package/dist/session/types.js +1 -0
- package/dist/session/user-history.d.ts +17 -0
- package/dist/session/user-history.js +1 -0
- package/dist/session-store.d.ts +2 -0
- package/dist/session-store.js +1 -0
- package/dist/shared/auto-title.d.ts +3 -3
- package/dist/shared/auto-title.js +6 -6
- package/dist/shared/model-text.d.ts +8 -8
- package/dist/shared/model-text.js +8 -7
- package/dist/storage/file-lock.js +83 -0
- package/dist/subagent/contracts.d.ts +107 -0
- package/dist/subagent/contracts.js +1 -0
- package/dist/subagent/limits.d.ts +17 -0
- package/dist/subagent/limits.js +17 -0
- package/dist/subagent/model-update.js +81 -0
- package/dist/subagent/session-controller.d.ts +148 -0
- package/dist/subagent/session-controller.js +1761 -0
- package/dist/subagent/wait-targets.d.ts +10 -0
- package/dist/subagent/wait-targets.js +26 -0
- package/dist/subagent/wait.d.ts +26 -0
- package/dist/subagent/wait.js +73 -0
- package/dist/tools/agent/agent-cancel.d.ts +7 -0
- package/dist/tools/agent/agent-cancel.js +29 -0
- package/dist/tools/agent/agent-message.d.ts +7 -0
- package/dist/tools/agent/agent-message.js +57 -0
- package/dist/tools/agent/agent-start.d.ts +12 -0
- package/dist/tools/agent/agent-start.js +106 -0
- package/dist/tools/agent/agent-wait.d.ts +7 -0
- package/dist/tools/agent/agent-wait.js +91 -0
- package/dist/tools/agent/question.d.ts +7 -0
- package/dist/tools/agent/question.js +125 -0
- package/dist/tools/agent/skill.d.ts +11 -0
- package/dist/tools/agent/skill.js +38 -0
- package/dist/tools/agent/sleep.d.ts +9 -0
- package/dist/tools/agent/sleep.js +54 -0
- package/dist/tools/agent/smart-compact.d.ts +9 -0
- package/dist/tools/agent/smart-compact.js +23 -0
- package/dist/tools/agent/todo-read.d.ts +14 -0
- package/dist/tools/agent/todo-write.d.ts +14 -0
- package/dist/tools/agent/todo-write.js +66 -0
- package/dist/tools/agent/todo.d.ts +25 -0
- package/dist/tools/agent/todo.js +32 -0
- package/dist/tools/callers.d.ts +7 -0
- package/dist/tools/callers.js +39 -0
- package/dist/tools/code-mode/cells.d.ts +29 -0
- package/dist/tools/code-mode/cells.js +338 -0
- package/dist/tools/code-mode/dispatch.d.ts +20 -0
- package/dist/tools/code-mode/dispatch.js +80 -0
- package/dist/tools/code-mode/engine.d.ts +60 -0
- package/dist/tools/code-mode/engine.js +1 -0
- package/dist/tools/code-mode/index.d.ts +31 -0
- package/dist/tools/code-mode/index.js +751 -0
- package/dist/tools/code-mode/observations.d.ts +8 -0
- package/dist/tools/code-mode/observations.js +64 -0
- package/dist/tools/code-mode/worker.d.ts +1 -0
- package/dist/tools/contracts.d.ts +193 -0
- package/dist/tools/contracts.js +1 -0
- package/dist/tools/definition-projection.d.ts +1 -0
- package/dist/tools/definition-projection.js +1 -0
- package/dist/tools/execution-limits.d.ts +69 -0
- package/dist/tools/execution-limits.js +58 -0
- package/dist/tools/execution.d.ts +30 -0
- package/dist/tools/execution.js +191 -0
- package/dist/tools/local/apply-patch-parser.js +177 -0
- package/dist/tools/local/apply-patch.d.ts +19 -0
- package/dist/tools/local/apply-patch.js +489 -0
- package/dist/tools/local/exec.d.ts +28 -0
- package/dist/tools/local/exec.js +194 -0
- package/dist/tools/local/image-processing.js +146 -0
- package/dist/tools/local/read.d.ts +43 -0
- package/dist/tools/local/read.js +470 -0
- package/dist/tools/local/view-image.d.ts +15 -0
- package/dist/tools/local/view-image.js +317 -0
- package/dist/tools/mcp/catalog.js +220 -0
- package/dist/tools/mcp/history.d.ts +4 -0
- package/dist/tools/mcp/tool-search.d.ts +45 -0
- package/dist/tools/mcp/tool-search.js +294 -0
- package/dist/tools/output-projection.d.ts +18 -0
- package/dist/tools/output-projection.js +341 -0
- package/dist/tools/permission-contract.d.ts +25 -0
- package/dist/tools/permission-contract.js +1 -0
- package/dist/tools/permissions.d.ts +61 -0
- package/dist/tools/permissions.js +237 -0
- package/dist/tools/registry.d.ts +7 -0
- package/dist/tools/result-extension-contract.d.ts +37 -0
- package/dist/tools/result-extension-contract.js +32 -0
- package/dist/tools/result-extensions.d.ts +12 -0
- package/dist/tools/result-extensions.js +104 -0
- package/dist/tools/runtime-context.d.ts +89 -0
- package/dist/tools/runtime-context.js +1 -0
- package/dist/tools/runtime-resource-handles.js +28 -0
- package/dist/tools/runtime.js +77 -0
- package/dist/tools/scheduler.d.ts +12 -0
- package/dist/tools/shared/path-resolver.js +133 -0
- package/dist/tools/wait.d.ts +1 -0
- package/dist/tools/wait.js +1 -0
- package/package.json +15 -3
- package/dist/agent-core/error.d.ts +0 -15
- package/dist/agent-core/error.js +0 -74
- package/dist/agent-core/extensions/agents.d.ts +0 -79
- package/dist/agent-core/extensions/agents.js +0 -186
- package/dist/agent-core/extensions/compaction.d.ts +0 -48
- package/dist/agent-core/extensions/contracts.d.ts +0 -265
- package/dist/agent-core/extensions/data.d.ts +0 -84
- package/dist/agent-core/extensions/data.js +0 -83
- package/dist/agent-core/extensions/environment.d.ts +0 -27
- package/dist/agent-core/extensions/environment.js +0 -52
- package/dist/agent-core/extensions/files.d.ts +0 -64
- package/dist/agent-core/extensions/files.js +0 -26
- package/dist/agent-core/extensions/hooks.d.ts +0 -32
- package/dist/agent-core/extensions/manager.d.ts +0 -39
- package/dist/agent-core/extensions/manager.js +0 -458
- package/dist/agent-core/extensions/mcp.d.ts +0 -99
- package/dist/agent-core/extensions/mcp.js +0 -433
- package/dist/agent-core/extensions/model-request.d.ts +0 -56
- package/dist/agent-core/extensions/model-request.js +0 -197
- package/dist/agent-core/extensions/model-stream.d.ts +0 -9
- package/dist/agent-core/extensions/model-stream.js +0 -108
- package/dist/agent-core/extensions/models.d.ts +0 -43
- package/dist/agent-core/extensions/network.d.ts +0 -32
- package/dist/agent-core/extensions/network.js +0 -97
- package/dist/agent-core/extensions/operation.d.ts +0 -30
- package/dist/agent-core/extensions/processes.d.ts +0 -52
- package/dist/agent-core/extensions/processes.js +0 -284
- package/dist/agent-core/extensions/prompt-composition.d.ts +0 -24
- package/dist/agent-core/extensions/prompt-composition.js +0 -106
- package/dist/agent-core/extensions/prompt-input.d.ts +0 -23
- package/dist/agent-core/extensions/prompt-input.js +0 -48
- package/dist/agent-core/extensions/resources.d.ts +0 -27
- package/dist/agent-core/extensions/resources.js +0 -221
- package/dist/agent-core/extensions/services.d.ts +0 -31
- package/dist/agent-core/extensions/services.js +0 -61
- package/dist/agent-core/extensions/session-input.d.ts +0 -163
- package/dist/agent-core/extensions/session-input.js +0 -411
- package/dist/agent-core/extensions/session-messages.d.ts +0 -41
- package/dist/agent-core/extensions/session-messages.js +0 -76
- package/dist/agent-core/extensions/session.d.ts +0 -69
- package/dist/agent-core/extensions/session.js +0 -607
- package/dist/agent-core/extensions/settings.d.ts +0 -59
- package/dist/agent-core/extensions/settings.js +0 -115
- package/dist/agent-core/extensions/store.d.ts +0 -10
- package/dist/agent-core/extensions/store.js +0 -131
- package/dist/agent-core/extensions/tools.d.ts +0 -61
- package/dist/agent-core/extensions/tools.js +0 -269
- package/dist/agent-core/host/contracts.d.ts +0 -100
- package/dist/agent-core/host/contracts.js +0 -18
- package/dist/agent-core/host/local-agent-host.d.ts +0 -96
- package/dist/agent-core/host/local-agent-host.js +0 -425
- package/dist/agent-core/host/local-file-access.d.ts +0 -30
- package/dist/agent-core/host/local-file-access.js +0 -107
- package/dist/agent-core/host/local-network-access.d.ts +0 -6
- package/dist/agent-core/host/local-network-access.js +0 -101
- package/dist/agent-core/host/local-process-executor.d.ts +0 -29
- package/dist/agent-core/host/local-process-executor.js +0 -41
- package/dist/agent-core/host/local-session-environment.d.ts +0 -18
- package/dist/agent-core/host/local-shell.d.ts +0 -3
- package/dist/agent-core/host/network.d.ts +0 -4
- package/dist/agent-core/host/network.js +0 -6
- package/dist/agent-core/model/anthropic-messages.d.ts +0 -10
- package/dist/agent-core/model/anthropic-messages.js +0 -707
- package/dist/agent-core/model/anthropic-thinking.js +0 -33
- package/dist/agent-core/model/catalog-file.d.ts +0 -80
- package/dist/agent-core/model/catalog-file.js +0 -103
- package/dist/agent-core/model/configuration.d.ts +0 -127
- package/dist/agent-core/model/configuration.js +0 -168
- package/dist/agent-core/model/contracts.d.ts +0 -229
- package/dist/agent-core/model/http.d.ts +0 -27
- package/dist/agent-core/model/http.js +0 -534
- package/dist/agent-core/model/image.d.ts +0 -17
- package/dist/agent-core/model/openai-responses.d.ts +0 -77
- package/dist/agent-core/model/openai-responses.js +0 -2123
- package/dist/agent-core/model/product-user-agent.d.ts +0 -5
- package/dist/agent-core/model/product-user-agent.js +0 -22
- package/dist/agent-core/model/recovery.js +0 -80
- package/dist/agent-core/model/request-configuration.d.ts +0 -17
- package/dist/agent-core/model/request-configuration.js +0 -47
- package/dist/agent-core/model/runtime-credential.d.ts +0 -8
- package/dist/agent-core/model/runtime-credential.js +0 -72
- package/dist/agent-core/model/sse.js +0 -281
- package/dist/agent-core/model/text-blocks.js +0 -40
- package/dist/agent-core/model/tool-declarations.d.ts +0 -4
- package/dist/agent-core/model/transport-test.d.ts +0 -3
- package/dist/agent-core/model/transport-test.js +0 -23
- package/dist/agent-core/model/usage-observer.d.ts +0 -31
- package/dist/agent-core/prompts/index.d.ts +0 -20
- package/dist/agent-core/prompts/index.js +0 -49
- package/dist/agent-core/runtime/compaction/coordinator.js +0 -88
- package/dist/agent-core/runtime/compaction/generate.d.ts +0 -28
- package/dist/agent-core/runtime/compaction/generate.js +0 -84
- package/dist/agent-core/runtime/compaction/history.d.ts +0 -16
- package/dist/agent-core/runtime/compaction/operation.d.ts +0 -29
- package/dist/agent-core/runtime/compaction/operation.js +0 -131
- package/dist/agent-core/runtime/compaction/requests.d.ts +0 -16
- package/dist/agent-core/runtime/compaction/requests.js +0 -114
- package/dist/agent-core/runtime/compaction/retained-context.d.ts +0 -6
- package/dist/agent-core/runtime/compaction/retained-context.js +0 -47
- package/dist/agent-core/runtime/compaction/smart.d.ts +0 -14
- package/dist/agent-core/runtime/compaction/smart.js +0 -59
- package/dist/agent-core/runtime/context/contextual-blocks.d.ts +0 -30
- package/dist/agent-core/runtime/context/contextual-blocks.js +0 -146
- package/dist/agent-core/runtime/context/environment.d.ts +0 -5
- package/dist/agent-core/runtime/context/gc-runtime.d.ts +0 -38
- package/dist/agent-core/runtime/context/gc-tokens.d.ts +0 -25
- package/dist/agent-core/runtime/context/gc-tokens.js +0 -103
- package/dist/agent-core/runtime/context/gc.d.ts +0 -75
- package/dist/agent-core/runtime/context/gc.js +0 -1386
- package/dist/agent-core/runtime/context/instructions.d.ts +0 -37
- package/dist/agent-core/runtime/context/instructions.js +0 -297
- package/dist/agent-core/runtime/context/normalize.d.ts +0 -5
- package/dist/agent-core/runtime/context/projection.d.ts +0 -23
- package/dist/agent-core/runtime/context/projection.js +0 -284
- package/dist/agent-core/runtime/context/request-budget.d.ts +0 -4
- package/dist/agent-core/runtime/context/request-budget.js +0 -25
- package/dist/agent-core/runtime/context/restore.d.ts +0 -25
- package/dist/agent-core/runtime/context/restore.js +0 -186
- package/dist/agent-core/runtime/context/usage.d.ts +0 -17
- package/dist/agent-core/runtime/context/usage.js +0 -124
- package/dist/agent-core/runtime/context/world-state.d.ts +0 -33
- package/dist/agent-core/runtime/context/world-state.js +0 -232
- package/dist/agent-core/runtime/contracts.d.ts +0 -41
- package/dist/agent-core/runtime/event-projection.d.ts +0 -14
- package/dist/agent-core/runtime/event-projection.js +0 -87
- package/dist/agent-core/runtime/events.d.ts +0 -197
- package/dist/agent-core/runtime/execution-handle.d.ts +0 -12
- package/dist/agent-core/runtime/execution.d.ts +0 -50
- package/dist/agent-core/runtime/execution.js +0 -445
- package/dist/agent-core/runtime/model-progress.js +0 -85
- package/dist/agent-core/runtime/resource-publication.d.ts +0 -8
- package/dist/agent-core/runtime/resource-publication.js +0 -60
- package/dist/agent-core/sdk/agent.d.ts +0 -11
- package/dist/agent-core/sdk/agent.js +0 -474
- package/dist/agent-core/sdk/extension-agents.d.ts +0 -9
- package/dist/agent-core/sdk/extension-agents.js +0 -58
- package/dist/agent-core/sdk/extension-models.d.ts +0 -13
- package/dist/agent-core/sdk/extension-models.js +0 -137
- package/dist/agent-core/sdk/extension-session.d.ts +0 -30
- package/dist/agent-core/sdk/extension-session.js +0 -105
- package/dist/agent-core/sdk/extension-tools.d.ts +0 -16
- package/dist/agent-core/sdk/extension-tools.js +0 -126
- package/dist/agent-core/sdk/model-runtime.d.ts +0 -18
- package/dist/agent-core/sdk/model-runtime.js +0 -93
- package/dist/agent-core/sdk/native-steer.d.ts +0 -20
- package/dist/agent-core/sdk/native-steer.js +0 -84
- package/dist/agent-core/sdk/request-preparation.d.ts +0 -7
- package/dist/agent-core/sdk/resource-input.d.ts +0 -32
- package/dist/agent-core/sdk/resource-input.js +0 -403
- package/dist/agent-core/sdk/session.d.ts +0 -94
- package/dist/agent-core/sdk/session.js +0 -2377
- package/dist/agent-core/sdk/subagent-backend.d.ts +0 -3
- package/dist/agent-core/sdk/subagent-backend.js +0 -49
- package/dist/agent-core/sdk/types.d.ts +0 -81
- package/dist/agent-core/session/catalog.d.ts +0 -99
- package/dist/agent-core/session/catalog.js +0 -200
- package/dist/agent-core/session/context-gc-checkpoint.d.ts +0 -165
- package/dist/agent-core/session/context-gc-checkpoint.js +0 -935
- package/dist/agent-core/session/context-gc-observations.d.ts +0 -60
- package/dist/agent-core/session/context-gc-observations.js +0 -187
- package/dist/agent-core/session/context-gc-replacements.d.ts +0 -62
- package/dist/agent-core/session/context-gc-subagent.d.ts +0 -53
- package/dist/agent-core/session/deferred-input.d.ts +0 -5
- package/dist/agent-core/session/deferred-input.js +0 -74
- package/dist/agent-core/session/inline-media.d.ts +0 -45
- package/dist/agent-core/session/inline-media.js +0 -163
- package/dist/agent-core/session/rollback.d.ts +0 -13
- package/dist/agent-core/session/rollback.js +0 -46
- package/dist/agent-core/session/store/contracts.d.ts +0 -158
- package/dist/agent-core/session/store/current-state.d.ts +0 -17
- package/dist/agent-core/session/store/current-state.js +0 -53
- package/dist/agent-core/session/store/directory-index.d.ts +0 -18
- package/dist/agent-core/session/store/directory-index.js +0 -169
- package/dist/agent-core/session/store/execution-state.d.ts +0 -18
- package/dist/agent-core/session/store/execution-state.js +0 -175
- package/dist/agent-core/session/store/history.d.ts +0 -25
- package/dist/agent-core/session/store/history.js +0 -181
- package/dist/agent-core/session/store/images.d.ts +0 -19
- package/dist/agent-core/session/store/images.js +0 -110
- package/dist/agent-core/session/store/index.d.ts +0 -4
- package/dist/agent-core/session/store/index.js +0 -2
- package/dist/agent-core/session/store/jsonl-store.d.ts +0 -171
- package/dist/agent-core/session/store/jsonl-store.js +0 -2078
- package/dist/agent-core/session/store/records.d.ts +0 -23
- package/dist/agent-core/session/store/records.js +0 -261
- package/dist/agent-core/session/store/resources.d.ts +0 -26
- package/dist/agent-core/session/store/resources.js +0 -197
- package/dist/agent-core/session/store/types.d.ts +0 -82
- package/dist/agent-core/session/tool-result-resources.d.ts +0 -26
- package/dist/agent-core/session/tool-result-resources.js +0 -256
- package/dist/agent-core/session/transaction-recovery.d.ts +0 -16
- package/dist/agent-core/session/transaction-recovery.js +0 -135
- package/dist/agent-core/storage/file-lock.js +0 -83
- package/dist/agent-core/subagent/contracts.d.ts +0 -117
- package/dist/agent-core/subagent/model-update.js +0 -81
- package/dist/agent-core/subagent/scheduler.d.ts +0 -135
- package/dist/agent-core/subagent/scheduler.js +0 -369
- package/dist/agent-core/subagent/session-controller.d.ts +0 -138
- package/dist/agent-core/subagent/session-controller.js +0 -1594
- package/dist/agent-core/subagent/wait.d.ts +0 -14
- package/dist/agent-core/subagent/wait.js +0 -32
- package/dist/agent-core/tools/agent/agent-cancel.d.ts +0 -7
- package/dist/agent-core/tools/agent/agent-cancel.js +0 -29
- package/dist/agent-core/tools/agent/agent-message.d.ts +0 -7
- package/dist/agent-core/tools/agent/agent-message.js +0 -57
- package/dist/agent-core/tools/agent/agent-start.d.ts +0 -12
- package/dist/agent-core/tools/agent/agent-start.js +0 -106
- package/dist/agent-core/tools/agent/agent-wait.d.ts +0 -7
- package/dist/agent-core/tools/agent/agent-wait.js +0 -91
- package/dist/agent-core/tools/agent/question.d.ts +0 -7
- package/dist/agent-core/tools/agent/question.js +0 -125
- package/dist/agent-core/tools/agent/skill.d.ts +0 -11
- package/dist/agent-core/tools/agent/skill.js +0 -38
- package/dist/agent-core/tools/agent/sleep.d.ts +0 -12
- package/dist/agent-core/tools/agent/sleep.js +0 -54
- package/dist/agent-core/tools/agent/smart-compact.d.ts +0 -9
- package/dist/agent-core/tools/agent/smart-compact.js +0 -23
- package/dist/agent-core/tools/agent/todo-read.d.ts +0 -14
- package/dist/agent-core/tools/agent/todo-write.d.ts +0 -14
- package/dist/agent-core/tools/agent/todo-write.js +0 -66
- package/dist/agent-core/tools/agent/todo.d.ts +0 -26
- package/dist/agent-core/tools/agent/todo.js +0 -60
- package/dist/agent-core/tools/callers.d.ts +0 -6
- package/dist/agent-core/tools/callers.js +0 -39
- package/dist/agent-core/tools/code-mode/cells.d.ts +0 -29
- package/dist/agent-core/tools/code-mode/cells.js +0 -337
- package/dist/agent-core/tools/code-mode/dispatch.d.ts +0 -20
- package/dist/agent-core/tools/code-mode/dispatch.js +0 -80
- package/dist/agent-core/tools/code-mode/engine.d.ts +0 -60
- package/dist/agent-core/tools/code-mode/index.d.ts +0 -29
- package/dist/agent-core/tools/code-mode/index.js +0 -749
- package/dist/agent-core/tools/code-mode/observations.d.ts +0 -98
- package/dist/agent-core/tools/code-mode/observations.js +0 -228
- package/dist/agent-core/tools/code-mode/state.d.ts +0 -9
- package/dist/agent-core/tools/code-mode/state.js +0 -82
- package/dist/agent-core/tools/contracts.d.ts +0 -211
- package/dist/agent-core/tools/definition-projection.d.ts +0 -7
- package/dist/agent-core/tools/definition-projection.js +0 -26
- package/dist/agent-core/tools/execution-limits.d.ts +0 -69
- package/dist/agent-core/tools/execution-limits.js +0 -69
- package/dist/agent-core/tools/execution.d.ts +0 -46
- package/dist/agent-core/tools/execution.js +0 -191
- package/dist/agent-core/tools/local/apply-patch-parser.js +0 -177
- package/dist/agent-core/tools/local/apply-patch.d.ts +0 -19
- package/dist/agent-core/tools/local/apply-patch.js +0 -489
- package/dist/agent-core/tools/local/exec.d.ts +0 -53
- package/dist/agent-core/tools/local/exec.js +0 -877
- package/dist/agent-core/tools/local/image-processing.js +0 -146
- package/dist/agent-core/tools/local/read-context.js +0 -152
- package/dist/agent-core/tools/local/read.d.ts +0 -43
- package/dist/agent-core/tools/local/read.js +0 -470
- package/dist/agent-core/tools/local/registry.d.ts +0 -34
- package/dist/agent-core/tools/local/registry.js +0 -132
- package/dist/agent-core/tools/local/view-image.d.ts +0 -15
- package/dist/agent-core/tools/local/view-image.js +0 -317
- package/dist/agent-core/tools/local/workspace-tools.d.ts +0 -12
- package/dist/agent-core/tools/local/workspace-tools.js +0 -28
- package/dist/agent-core/tools/mcp/catalog.js +0 -220
- package/dist/agent-core/tools/mcp/history.d.ts +0 -4
- package/dist/agent-core/tools/mcp/tool-search.d.ts +0 -45
- package/dist/agent-core/tools/mcp/tool-search.js +0 -294
- package/dist/agent-core/tools/output-projection.d.ts +0 -18
- package/dist/agent-core/tools/output-projection.js +0 -341
- package/dist/agent-core/tools/permissions.d.ts +0 -85
- package/dist/agent-core/tools/permissions.js +0 -237
- package/dist/agent-core/tools/registry.d.ts +0 -7
- package/dist/agent-core/tools/result-extensions.d.ts +0 -46
- package/dist/agent-core/tools/result-extensions.js +0 -134
- package/dist/agent-core/tools/runtime-context.d.ts +0 -74
- package/dist/agent-core/tools/runtime-resource-handles.js +0 -28
- package/dist/agent-core/tools/runtime.js +0 -77
- package/dist/agent-core/tools/scheduler.d.ts +0 -12
- package/dist/agent-core/tools/shared/path-resolver.js +0 -133
- package/dist/agent-core/tools/wait.js +0 -82
- /package/dist/{agent-core/extensions/models.js → extensions/capabilities.js} +0 -0
- /package/dist/{agent-core/extensions → extensions}/compaction.js +0 -0
- /package/dist/{agent-core/model → extensions}/contracts.js +0 -0
- /package/dist/{agent-core/extensions → extensions}/hooks.js +0 -0
- /package/dist/{agent-core/runtime/context/contracts.js → extensions/host-ports.js} +0 -0
- /package/dist/{agent-core/extensions → extensions}/operation.js +0 -0
- /package/dist/{agent-core/runtime/contracts.js → extensions/tool-runtime.js} +0 -0
- /package/dist/{agent-core/extensions/contracts.js → extensions.js} +0 -0
- /package/dist/{agent-core/runtime/events.js → host/description.js} +0 -0
- /package/dist/{agent-core/host → host}/local-session-environment.js +0 -0
- /package/dist/{agent-core/host → host}/local-shell.js +0 -0
- /package/dist/{agent-core/runtime/execution-handle.js → host/skill-contract.js} +0 -0
- /package/dist/{agent-core/model → model}/anthropic-thinking.d.ts +0 -0
- /package/dist/{agent-core/model → model}/attempt-diagnostics.d.ts +0 -0
- /package/dist/{agent-core/model → model}/attempt-diagnostics.js +0 -0
- /package/dist/{agent-core/session/store → model}/contracts.js +0 -0
- /package/dist/{agent-core/sdk/types.js → model/image-contract.js} +0 -0
- /package/dist/{agent-core/model → model}/image.js +0 -0
- /package/dist/{agent-core/model → model}/native-context.d.ts +0 -0
- /package/dist/{agent-core/model → model}/native-context.js +0 -0
- /package/dist/{agent-core/model → model}/recovery.d.ts +0 -0
- /package/dist/{agent-core/model → model}/sse.d.ts +0 -0
- /package/dist/{agent-core/model → model}/text-blocks.d.ts +0 -0
- /package/dist/{agent-core/model → model}/tool-declarations.js +0 -0
- /package/dist/{agent-core/model → model}/tool-input.d.ts +0 -0
- /package/dist/{agent-core/model → model}/tool-input.js +0 -0
- /package/dist/{agent-core/model → model}/usage-observer.js +0 -0
- /package/dist/{agent-core/session/store/types.js → model/usage.js} +0 -0
- /package/dist/{agent-core/subagent → process}/contracts.js +0 -0
- /package/dist/{agent-core/prompts → prompts}/compact.d.ts +0 -0
- /package/dist/{agent-core/prompts → prompts}/compact.js +0 -0
- /package/dist/{agent-core/prompts → prompts}/core.d.ts +0 -0
- /package/dist/{agent-core/prompts → prompts}/core.js +0 -0
- /package/dist/{agent-core/prompts → prompts}/markup.d.ts +0 -0
- /package/dist/{agent-core/prompts → prompts}/markup.js +0 -0
- /package/dist/{agent-core/prompts → prompts}/modes.d.ts +0 -0
- /package/dist/{agent-core/prompts → prompts}/modes.js +0 -0
- /package/dist/{agent-core/prompts → prompts}/output.d.ts +0 -0
- /package/dist/{agent-core/prompts → prompts}/output.js +0 -0
- /package/dist/{agent-core/prompts → prompts}/permissions.d.ts +0 -0
- /package/dist/{agent-core/prompts → prompts}/permissions.js +0 -0
- /package/dist/{agent-core/tools/local → prompts}/read-context.d.ts +0 -0
- /package/dist/{agent-core/prompts → prompts}/resources.d.ts +0 -0
- /package/dist/{agent-core/prompts → prompts}/resources.js +0 -0
- /package/dist/{agent-core/prompts → prompts}/subagent.d.ts +0 -0
- /package/dist/{agent-core/prompts → prompts}/subagent.js +0 -0
- /package/dist/{agent-core/prompts → prompts}/workflow.d.ts +0 -0
- /package/dist/{agent-core/prompts → prompts}/workflow.js +0 -0
- /package/dist/{agent-core/runtime → runtime}/async-queue.d.ts +0 -0
- /package/dist/{agent-core/runtime → runtime}/async-queue.js +0 -0
- /package/dist/{agent-core/tools → runtime/compaction}/contracts.js +0 -0
- /package/dist/{agent-core/runtime → runtime}/compaction/coordinator.d.ts +0 -0
- /package/dist/{agent-core/runtime → runtime}/compaction/history.js +0 -0
- /package/dist/{agent-core/runtime → runtime}/context/contracts.d.ts +0 -0
- /package/dist/{agent-core/session/types.js → runtime/context/contracts.js} +0 -0
- /package/dist/{agent-core/runtime → runtime}/context/environment.js +0 -0
- /package/dist/{agent-core/tools/code-mode/engine.js → runtime/context/gc-contracts.js} +0 -0
- /package/dist/{agent-core/runtime → runtime}/context/gc-runtime.js +0 -0
- /package/dist/{agent-core/runtime → runtime}/context/normalize.js +0 -0
- /package/dist/{agent-core/tools/code-mode/worker.d.ts → runtime/contracts.js} +0 -0
- /package/dist/{agent-core/tools/runtime-context.js → runtime/events.js} +0 -0
- /package/dist/{agent-core/runtime → runtime}/execution-policy.d.ts +0 -0
- /package/dist/{agent-core/runtime → runtime}/execution-policy.js +0 -0
- /package/dist/{agent-core/runtime → runtime}/model-generation-timing.d.ts +0 -0
- /package/dist/{agent-core/runtime → runtime}/model-generation-timing.js +0 -0
- /package/dist/{agent-core/runtime → runtime}/model-progress.d.ts +0 -0
- /package/dist/{agent-core/runtime → runtime}/plan-output.d.ts +0 -0
- /package/dist/{agent-core/runtime → runtime}/plan-output.js +0 -0
- /package/dist/{agent-core/tools/public-metadata.d.ts → runtime/public-tool-metadata.d.ts} +0 -0
- /package/dist/{agent-core/tools/public-metadata.js → runtime/public-tool-metadata.js} +0 -0
- /package/dist/{agent-core/runtime → runtime}/token-budget.d.ts +0 -0
- /package/dist/{agent-core/runtime → runtime}/token-budget.js +0 -0
- /package/dist/{agent-core/tools → runtime}/wait.d.ts +0 -0
- /package/dist/{agent-core/sdk → sdk}/request-preparation.js +0 -0
- /package/dist/{agent-core/session → session}/context-gc-markup.d.ts +0 -0
- /package/dist/{agent-core/session → session}/context-gc-markup.js +0 -0
- /package/dist/{agent-core/session → session}/context-gc-replacements.js +0 -0
- /package/dist/{agent-core/session → session}/context-gc-subagent.js +0 -0
- /package/dist/{agent-core/session → session}/types.d.ts +0 -0
- /package/dist/{agent-core/storage → storage}/file-lock.d.ts +0 -0
- /package/dist/{agent-core/subagent → subagent}/model-update.d.ts +0 -0
- /package/dist/{agent-core/tools → tools}/agent/todo-read.js +0 -0
- /package/dist/{agent-core/tools → tools}/code-mode/quickjs-engine.d.ts +0 -0
- /package/dist/{agent-core/tools → tools}/code-mode/quickjs-engine.js +0 -0
- /package/dist/{agent-core/tools → tools}/code-mode/text-output.d.ts +0 -0
- /package/dist/{agent-core/tools → tools}/code-mode/text-output.js +0 -0
- /package/dist/{agent-core/tools → tools}/code-mode/worker.js +0 -0
- /package/dist/{agent-core/tools → tools}/file-change-diff.d.ts +0 -0
- /package/dist/{agent-core/tools → tools}/file-change-diff.js +0 -0
- /package/dist/{agent-core/tools → tools}/input-diagnostics/source-preview.d.ts +0 -0
- /package/dist/{agent-core/tools → tools}/input-diagnostics/source-preview.js +0 -0
- /package/dist/{agent-core/tools → tools}/input.d.ts +0 -0
- /package/dist/{agent-core/tools → tools}/input.js +0 -0
- /package/dist/{agent-core/tools → tools}/local/apply-patch-parser.d.ts +0 -0
- /package/dist/{agent-core/tools → tools}/local/image-processing.d.ts +0 -0
- /package/dist/{agent-core/tools → tools}/mcp/catalog.d.ts +0 -0
- /package/dist/{agent-core/tools → tools}/mcp/history.js +0 -0
- /package/dist/{agent-core/tools → tools}/registry.js +0 -0
- /package/dist/{agent-core/tools → tools}/runtime-resource-handles.d.ts +0 -0
- /package/dist/{agent-core/tools → tools}/runtime.d.ts +0 -0
- /package/dist/{agent-core/tools → tools}/scheduler.js +0 -0
- /package/dist/{agent-core/tools → tools}/shared/patch-result.d.ts +0 -0
- /package/dist/{agent-core/tools → tools}/shared/patch-result.js +0 -0
- /package/dist/{agent-core/tools → tools}/shared/path-resolver.d.ts +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
2
|
+
import { isDeepStrictEqual } from 'node:util';
|
|
3
|
+
import { AgentError } from '../error.js';
|
|
4
|
+
import { ExtensionRequestBridge } from '../extensions/model-request.js';
|
|
5
|
+
import { projectPermissionTool } from '../tools/permissions.js';
|
|
6
|
+
/** Captures Extension rewrites against immutable tool bindings and attributes model usage. */
|
|
7
|
+
export function createExecutionModelRequest(ports) {
|
|
8
|
+
return async (candidate, bindings = ports.capture(), modelId = ports.modelId, purpose = ports.compact ? 'compact' : 'conversation') => {
|
|
9
|
+
let lowered = candidate;
|
|
10
|
+
if (ports.hooks.hasInterceptors('model.request')) {
|
|
11
|
+
const bridge = new ExtensionRequestBridge(modelId, candidate, undefined, ports.turn.continuationInputCount?.() ?? 0);
|
|
12
|
+
const request = await ports.operation((call) => ports.hooks.invoke('model.request', bridge.view, call, async (view) => view));
|
|
13
|
+
lowered = bridge.lower(request);
|
|
14
|
+
if (bridge.rewroteCommittedInput)
|
|
15
|
+
ports.turn.resetContinuation?.();
|
|
16
|
+
}
|
|
17
|
+
for (const definition of lowered.tools) {
|
|
18
|
+
const binding = bindings.get(definition.name);
|
|
19
|
+
const { description: _description, ...contract } = definition;
|
|
20
|
+
const { description: _capturedDescription, ...capturedContract } = binding
|
|
21
|
+
? ports.autoPermission
|
|
22
|
+
? projectPermissionTool(binding.definition)
|
|
23
|
+
: binding.definition
|
|
24
|
+
: {};
|
|
25
|
+
if (!binding || !isDeepStrictEqual(contract, capturedContract))
|
|
26
|
+
throw new AgentError('MAR_AGENT_EXTENSION_MODEL_REQUEST_INVALID', 'Request tools do not match captured sources.');
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
...lowered,
|
|
30
|
+
usageRequestId: randomUUID(),
|
|
31
|
+
...(ports.host.modelUsage === undefined
|
|
32
|
+
? {}
|
|
33
|
+
: {
|
|
34
|
+
onModelUsage: (usage) => ports.host.modelUsage({
|
|
35
|
+
...usage,
|
|
36
|
+
sessionId: ports.sessionId,
|
|
37
|
+
executionId: ports.executionId,
|
|
38
|
+
purpose,
|
|
39
|
+
agentRole: ports.source === 'subagent' ? 'subagent' : 'root'
|
|
40
|
+
}),
|
|
41
|
+
onModelUsageFailure: ports.usageFailed
|
|
42
|
+
})
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Owns round retries when late input or resource collection invalidates a candidate. */
|
|
2
|
+
export declare function createExecutionRoundPreparer<Continuation, Candidate, Round>(ports: {
|
|
3
|
+
prepareInputs(includeSubagentUpdates: boolean): Promise<void>;
|
|
4
|
+
buildCandidate(continuation: Continuation | undefined): Promise<Candidate>;
|
|
5
|
+
adoptLateInput(): Promise<boolean>;
|
|
6
|
+
prepareResources(candidate: Candidate): Promise<{
|
|
7
|
+
round: Round;
|
|
8
|
+
} | {
|
|
9
|
+
retry: true;
|
|
10
|
+
}>;
|
|
11
|
+
}): (continuation: Continuation | undefined) => Promise<Round>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Owns round retries when late input or resource collection invalidates a candidate. */
|
|
2
|
+
export function createExecutionRoundPreparer(ports) {
|
|
3
|
+
return async (continuation) => {
|
|
4
|
+
let includeSubagentUpdates = true;
|
|
5
|
+
for (;;) {
|
|
6
|
+
await ports.prepareInputs(includeSubagentUpdates);
|
|
7
|
+
const candidate = await ports.buildCandidate(continuation);
|
|
8
|
+
if (await ports.adoptLateInput()) {
|
|
9
|
+
includeSubagentUpdates = false;
|
|
10
|
+
continue;
|
|
11
|
+
}
|
|
12
|
+
const prepared = await ports.prepareResources(candidate);
|
|
13
|
+
if ('round' in prepared)
|
|
14
|
+
return prepared.round;
|
|
15
|
+
includeSubagentUpdates = false;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { splitContextualPrompt } from '../runtime/context/contextual-blocks.js';
|
|
2
|
+
import { type ContextualWorldState } from '../runtime/context/world-state.js';
|
|
3
|
+
import type { AgentModelConfiguration } from '../model/configuration.js';
|
|
4
|
+
import type { SessionModelMessage, SessionModelRequest } from '../session/model-request.js';
|
|
5
|
+
import type { ClientToolDefinition } from '../tools/contracts.js';
|
|
6
|
+
/** Capture, transform and commit the world state for one actual model request. */
|
|
7
|
+
export declare function prepareExecutionRoundRequest<Bindings, Scope>(input: {
|
|
8
|
+
readonly messages: SessionModelMessage[];
|
|
9
|
+
readonly continuation: SessionModelMessage | undefined;
|
|
10
|
+
readonly model: Pick<AgentModelConfiguration, 'protocol' | 'inputCapabilities'>;
|
|
11
|
+
readonly requestBase: Omit<SessionModelRequest, 'system' | 'systemBlocks' | 'messages' | 'tools'>;
|
|
12
|
+
residentTools(): readonly ClientToolDefinition[];
|
|
13
|
+
readonly autoPermission: boolean;
|
|
14
|
+
readonly signal: AbortSignal;
|
|
15
|
+
capture(): {
|
|
16
|
+
roundTools: readonly ClientToolDefinition[];
|
|
17
|
+
roundBindings: Bindings;
|
|
18
|
+
toolScope: Scope;
|
|
19
|
+
composeSystemPrompt(): Promise<Parameters<typeof splitContextualPrompt>[0]>;
|
|
20
|
+
};
|
|
21
|
+
bind(scope: Scope): void;
|
|
22
|
+
world(): ContextualWorldState;
|
|
23
|
+
commitWorld(world: ContextualWorldState): Promise<void>;
|
|
24
|
+
preparing(messages: readonly SessionModelMessage[] | undefined, baseLength: number): void;
|
|
25
|
+
transform(request: SessionModelRequest, bindings: Bindings): Promise<SessionModelRequest>;
|
|
26
|
+
}): Promise<{
|
|
27
|
+
candidateRequest: SessionModelRequest;
|
|
28
|
+
request: SessionModelRequest;
|
|
29
|
+
toolScope: Scope;
|
|
30
|
+
}>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { splitContextualPrompt } from '../runtime/context/contextual-blocks.js';
|
|
2
|
+
import { updatePromptWorldState } from '../runtime/context/world-state.js';
|
|
3
|
+
import { prepareSessionModelRequest } from './request-preparation.js';
|
|
4
|
+
/** Capture, transform and commit the world state for one actual model request. */
|
|
5
|
+
export async function prepareExecutionRoundRequest(input) {
|
|
6
|
+
const { roundTools, roundBindings, toolScope, composeSystemPrompt } = input.capture();
|
|
7
|
+
const residentTools = input.residentTools();
|
|
8
|
+
const requestMessages = input.continuation === undefined ? input.messages : [...input.messages, input.continuation];
|
|
9
|
+
input.bind(toolScope);
|
|
10
|
+
const composed = splitContextualPrompt(await composeSystemPrompt());
|
|
11
|
+
const world = updatePromptWorldState(input.world(), input.messages.length, composed.parts);
|
|
12
|
+
const candidateRequest = prepareSessionModelRequest({
|
|
13
|
+
...input.requestBase,
|
|
14
|
+
system: composed.system,
|
|
15
|
+
...(composed.systemBlocks ? { systemBlocks: composed.systemBlocks } : {}),
|
|
16
|
+
messages: requestMessages,
|
|
17
|
+
tools: roundTools
|
|
18
|
+
}, input.model, world.entries, residentTools, input.autoPermission);
|
|
19
|
+
input.preparing(candidateRequest.messages, input.messages.length);
|
|
20
|
+
let request;
|
|
21
|
+
try {
|
|
22
|
+
request = await input.transform(candidateRequest, roundBindings);
|
|
23
|
+
}
|
|
24
|
+
finally {
|
|
25
|
+
input.preparing(undefined, input.messages.length);
|
|
26
|
+
}
|
|
27
|
+
input.signal.throwIfAborted();
|
|
28
|
+
if (world !== input.world())
|
|
29
|
+
await input.commitWorld(world);
|
|
30
|
+
return { candidateRequest, request, toolScope };
|
|
31
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ExtensionToolBinding } from '../extensions/tools.js';
|
|
2
|
+
import type { AgentHost } from '../host/contracts.js';
|
|
3
|
+
import type { ClientToolDefinition, McpToolCatalog, McpToolCatalogContext } from '../tools/contracts.js';
|
|
4
|
+
import { DeferredMcpRegistry } from '../tools/mcp/tool-search.js';
|
|
5
|
+
import type { SessionModelMessage } from '../session/model-request.js';
|
|
6
|
+
import type { ExecutionMode } from './types.js';
|
|
7
|
+
import type { ResolvedModelConfiguration } from './model-runtime.js';
|
|
8
|
+
import { ExecutionToolSources } from './extension-tools.js';
|
|
9
|
+
/** Initializes one Execution's catalog before Extension attachment owns its bindings. */
|
|
10
|
+
export declare function initializeExecutionToolCatalog(input: {
|
|
11
|
+
host: Pick<AgentHost, 'listMcpToolCatalog' | 'listMcpTools' | 'listExecutionExtensions'>;
|
|
12
|
+
context: McpToolCatalogContext;
|
|
13
|
+
models: ReadonlyMap<string, ResolvedModelConfiguration>;
|
|
14
|
+
messages: SessionModelMessage[];
|
|
15
|
+
supplemental(names: ReadonlySet<string>): readonly ExtensionToolBinding[];
|
|
16
|
+
}): Promise<{
|
|
17
|
+
catalog: McpToolCatalog;
|
|
18
|
+
registry: DeferredMcpRegistry;
|
|
19
|
+
extensions: import("./types.js").HostExecutionExtensions;
|
|
20
|
+
supplemental: readonly ExtensionToolBinding[];
|
|
21
|
+
sources: ExecutionToolSources;
|
|
22
|
+
}>;
|
|
23
|
+
/** Owns the live MCP projection while source identities remain tied to one Execution. */
|
|
24
|
+
export declare class ExecutionToolCatalog {
|
|
25
|
+
#private;
|
|
26
|
+
private readonly input;
|
|
27
|
+
constructor(input: {
|
|
28
|
+
catalog: McpToolCatalog;
|
|
29
|
+
registry: DeferredMcpRegistry;
|
|
30
|
+
messages: SessionModelMessage[];
|
|
31
|
+
model: ResolvedModelConfiguration;
|
|
32
|
+
child: boolean;
|
|
33
|
+
mode: ExecutionMode;
|
|
34
|
+
codeExecute: boolean;
|
|
35
|
+
capture(): ReadonlyMap<string, ExtensionToolBinding>;
|
|
36
|
+
servers(): McpToolCatalog['servers'];
|
|
37
|
+
hasSkills(): boolean;
|
|
38
|
+
});
|
|
39
|
+
eligible(tool: ClientToolDefinition): boolean;
|
|
40
|
+
updateRegistry(): void;
|
|
41
|
+
available(): ClientToolDefinition[];
|
|
42
|
+
base(): ClientToolDefinition[];
|
|
43
|
+
refresh(): void;
|
|
44
|
+
get tools(): readonly ClientToolDefinition[];
|
|
45
|
+
restore(): void;
|
|
46
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { AgentError } from '../error.js';
|
|
3
|
+
import { coreMcpCatalog } from '../extensions/mcp.js';
|
|
4
|
+
import { assertMcpToolCatalog } from '../tools/mcp/catalog.js';
|
|
5
|
+
import { DeferredMcpRegistry } from '../tools/mcp/tool-search.js';
|
|
6
|
+
import { discoveredMcpToolNames, rebindMcpToolSearchOutputs } from '../tools/mcp/history.js';
|
|
7
|
+
import { BUILTIN_TOOL_DEFINITIONS } from '../tools/registry.js';
|
|
8
|
+
import { agentStartToolDefinitionWithModels } from '../tools/agent/agent-start.js';
|
|
9
|
+
import { toolCallers } from '../tools/callers.js';
|
|
10
|
+
import { ExecutionToolSources } from './extension-tools.js';
|
|
11
|
+
/** Initializes one Execution's catalog before Extension attachment owns its bindings. */
|
|
12
|
+
export async function initializeExecutionToolCatalog(input) {
|
|
13
|
+
const { host, context } = input;
|
|
14
|
+
let catalog;
|
|
15
|
+
if (host.listMcpToolCatalog) {
|
|
16
|
+
catalog = await host.listMcpToolCatalog(context);
|
|
17
|
+
assertMcpToolCatalog(catalog);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
const definitions = (await host.listMcpTools?.(context)) ?? [];
|
|
21
|
+
catalog = {
|
|
22
|
+
revision: createHash('sha256').update(JSON.stringify(definitions)).digest('hex'),
|
|
23
|
+
servers: [{ id: 'legacy', name: 'External MCP' }],
|
|
24
|
+
tools: definitions.map((definition) => ({
|
|
25
|
+
definition,
|
|
26
|
+
serverId: 'legacy',
|
|
27
|
+
rawName: definition.name,
|
|
28
|
+
sourceIdentity: `legacy:${context.executionId}`,
|
|
29
|
+
definitionRevision: createHash('sha256').update(JSON.stringify(definition)).digest('hex'),
|
|
30
|
+
lifetime: 'execution',
|
|
31
|
+
exposure: 'deferred'
|
|
32
|
+
}))
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
const registry = new DeferredMcpRegistry(discoveredMcpToolNames(input.messages));
|
|
36
|
+
const extensions = (await host.listExecutionExtensions?.(context)) ?? {};
|
|
37
|
+
if (extensions.tools?.some((tool) => tool.name.startsWith('mcp__')))
|
|
38
|
+
throw new AgentError('MAR_AGENT_TOOL_INPUT_INVALID', 'Host tools cannot use the MCP namespace.');
|
|
39
|
+
const builtins = BUILTIN_TOOL_DEFINITIONS.map((tool) => tool.name === 'agent_start'
|
|
40
|
+
? agentStartToolDefinitionWithModels([...input.models.values()]
|
|
41
|
+
.filter((configuration) => configuration.conversationModel !== false)
|
|
42
|
+
.map(({ id, name, reasoningEfforts }) => ({ id, name, reasoningEfforts })))
|
|
43
|
+
: tool);
|
|
44
|
+
const tools = [
|
|
45
|
+
...builtins,
|
|
46
|
+
...(extensions.tools ?? []),
|
|
47
|
+
...catalog.tools.map((tool) => tool.definition)
|
|
48
|
+
];
|
|
49
|
+
const names = new Set(tools.map((tool) => tool.name));
|
|
50
|
+
if (names.size !== tools.length)
|
|
51
|
+
throw new AgentError('MAR_AGENT_TOOL_INPUT_INVALID', 'Tool names conflict.');
|
|
52
|
+
const supplemental = input.supplemental(names);
|
|
53
|
+
const sources = new ExecutionToolSources(context.executionId, context.sessionId, tools, builtins, catalog, supplemental);
|
|
54
|
+
return { catalog, registry, extensions, supplemental, sources };
|
|
55
|
+
}
|
|
56
|
+
/** Owns the live MCP projection while source identities remain tied to one Execution. */
|
|
57
|
+
export class ExecutionToolCatalog {
|
|
58
|
+
input;
|
|
59
|
+
#tools = [];
|
|
60
|
+
constructor(input) {
|
|
61
|
+
this.input = input;
|
|
62
|
+
}
|
|
63
|
+
eligible(tool) {
|
|
64
|
+
toolCallers(tool);
|
|
65
|
+
if (this.input.child &&
|
|
66
|
+
(tool.agentScope === 'ROOT_ONLY' ||
|
|
67
|
+
tool.name.startsWith('agent_') ||
|
|
68
|
+
tool.name === 'question'))
|
|
69
|
+
return false;
|
|
70
|
+
if (tool.name === 'tool_search')
|
|
71
|
+
return this.input.registry.hasDeferred;
|
|
72
|
+
return tool.name === 'code_exec' || tool.name === 'code_exec_wait'
|
|
73
|
+
? this.input.model.codeMode && this.input.codeExecute
|
|
74
|
+
: tool.name === 'question'
|
|
75
|
+
? this.input.mode === 'plan'
|
|
76
|
+
: tool.name !== 'view_image' || this.input.model.inputCapabilities.includes('IMAGE');
|
|
77
|
+
}
|
|
78
|
+
updateRegistry() {
|
|
79
|
+
this.input.registry.update(coreMcpCatalog([...this.input.catalog.servers, ...this.input.servers()], this.input.capture()), (tool) => this.eligible(tool.definition), { nativeToolNames: true });
|
|
80
|
+
}
|
|
81
|
+
available() {
|
|
82
|
+
return [...this.input.capture().values()]
|
|
83
|
+
.map((binding) => binding.definition)
|
|
84
|
+
.filter((tool) => this.eligible(tool));
|
|
85
|
+
}
|
|
86
|
+
base() {
|
|
87
|
+
return [...this.input.capture().values()]
|
|
88
|
+
.filter((binding) => binding.mcp === undefined)
|
|
89
|
+
.map((binding) => binding.definition)
|
|
90
|
+
.filter((tool) => this.eligible(tool) && (tool.name !== 'skill' || this.input.hasSkills()));
|
|
91
|
+
}
|
|
92
|
+
refresh() {
|
|
93
|
+
this.#tools = this.input.registry.project(this.base());
|
|
94
|
+
}
|
|
95
|
+
get tools() {
|
|
96
|
+
return this.#tools;
|
|
97
|
+
}
|
|
98
|
+
restore() {
|
|
99
|
+
this.input.registry.restore(discoveredMcpToolNames(this.input.messages));
|
|
100
|
+
rebindMcpToolSearchOutputs(this.input.messages, this.input.registry);
|
|
101
|
+
this.refresh();
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { currentExecutionImages } from '../tools/output-projection.js';
|
|
2
|
+
import { type SmartCompactionInput } from '../runtime/compaction/smart.js';
|
|
3
|
+
import type { SessionStore } from '../session/store/contracts.js';
|
|
4
|
+
import type { ClientToolDefinition } from '../tools/contracts.js';
|
|
5
|
+
import type { ModelImage } from '../model/image.js';
|
|
6
|
+
import type { ToolRuntimeContext } from '../tools/runtime-context.js';
|
|
7
|
+
import type { RoundToolScope } from '../tools/execution.js';
|
|
8
|
+
import type { SessionRuntime } from './session-runtime.js';
|
|
9
|
+
import type { ExecutionToolSources } from './extension-tools.js';
|
|
10
|
+
import type { ExtensionSession } from '../extensions/session.js';
|
|
11
|
+
import type { ExtensionOperations, ExtensionOperationContext } from '../extensions/operation.js';
|
|
12
|
+
import type { ExtensionPromptComposition } from '../extensions/prompt-composition.js';
|
|
13
|
+
import type { DeferredMcpRegistry } from '../tools/mcp/tool-search.js';
|
|
14
|
+
import type { SubagentSessionController } from '../subagent/session-controller.js';
|
|
15
|
+
import type { ResolvedModelConfiguration } from './model-runtime.js';
|
|
16
|
+
import type { ExecutionMode } from './types.js';
|
|
17
|
+
import type { CompactFlight } from '../runtime/compaction/coordinator.js';
|
|
18
|
+
import type { ExecutionEventPayload } from './session-execution.js';
|
|
19
|
+
/** Capture immutable round tool identities, parent scope and resource capabilities. */
|
|
20
|
+
export declare function createExecutionToolScope(input: {
|
|
21
|
+
readonly store: Pick<SessionStore, 'readResource' | 'writeToolResultResource' | 'readCodeModeState' | 'retainSessionLease' | 'append' | 'commitCodeModeState' | 'persistResource' | 'setResourceUrl'>;
|
|
22
|
+
readonly host: ToolRuntimeContext['host'];
|
|
23
|
+
readonly sessionId: string;
|
|
24
|
+
readonly executionId: string;
|
|
25
|
+
readonly turnId: string;
|
|
26
|
+
readonly mode: ExecutionMode;
|
|
27
|
+
readonly controller: AbortController;
|
|
28
|
+
readonly sessionWriterOwner: object;
|
|
29
|
+
readonly selectedModel: ResolvedModelConfiguration;
|
|
30
|
+
readonly permissionPolicy: NonNullable<ToolRuntimeContext['permissionPolicy']>;
|
|
31
|
+
readonly todo: ToolRuntimeContext['todo'];
|
|
32
|
+
readonly waitInterrupt: ToolRuntimeContext['waitInterrupt'];
|
|
33
|
+
readonly skills: ToolRuntimeContext['skills'];
|
|
34
|
+
readonly subagents: Pick<SubagentSessionController, 'captureParentFrame' | 'captureExecution' | 'modelMessages'> | undefined;
|
|
35
|
+
readonly coreExtensions: Pick<ExtensionSession, 'epoch' | 'agentAction' | 'withTools' | 'invoke' | 'assertLive' | 'pin' | 'diagnose' | 'composeModelSystem'>;
|
|
36
|
+
readonly operations: Pick<ExtensionOperations, 'enter'>;
|
|
37
|
+
readonly scheduleTool: SessionRuntime['scheduleTool'];
|
|
38
|
+
readonly sources: Pick<ExecutionToolSources, 'withFrame' | 'assertActive'>;
|
|
39
|
+
readonly mcpRegistry: Pick<DeferredMcpRegistry, 'expectedTool' | 'expose'>;
|
|
40
|
+
readonly autoPermissionPrompt: string;
|
|
41
|
+
readonly currentExecutionToolImages: Parameters<typeof currentExecutionImages>[1];
|
|
42
|
+
readonly inputImageBytes: Map<string, ModelImage>;
|
|
43
|
+
snapshotTools(): readonly ClientToolDefinition[];
|
|
44
|
+
baseTools(): readonly ClientToolDefinition[];
|
|
45
|
+
captureTools(): ReturnType<ExtensionSession['capture']>;
|
|
46
|
+
promptComposition(tools: readonly ClientToolDefinition[], mode: ExecutionMode): ExtensionPromptComposition & {
|
|
47
|
+
sections: ExtensionPromptComposition['sections'];
|
|
48
|
+
};
|
|
49
|
+
smartInput(): SmartCompactionInput | undefined;
|
|
50
|
+
modelInputImages(): readonly ModelImage[] | undefined;
|
|
51
|
+
startCompact(input: {
|
|
52
|
+
async: true;
|
|
53
|
+
}): CompactFlight;
|
|
54
|
+
preparedPrompt(): Awaited<ReturnType<ExtensionSession['composeModelSystem']>> | undefined;
|
|
55
|
+
clearPreparedPrompt(): void;
|
|
56
|
+
operation<T>(run: (call: ExtensionOperationContext) => T): T;
|
|
57
|
+
emit(event: ExecutionEventPayload, assertLive?: () => void): Promise<void>;
|
|
58
|
+
}): () => {
|
|
59
|
+
roundTools: readonly ClientToolDefinition[];
|
|
60
|
+
roundBindings: Map<string, import("../extensions/tools.js").ExtensionToolBinding>;
|
|
61
|
+
toolScope: RoundToolScope;
|
|
62
|
+
composeSystemPrompt(): Promise<{
|
|
63
|
+
text: string;
|
|
64
|
+
blocks?: readonly import("../model/contracts.js").ModelTextBlock[];
|
|
65
|
+
sections?: readonly import("../prompts/prompt-sections.js").PromptPart[];
|
|
66
|
+
}>;
|
|
67
|
+
};
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { bindAgentController } from './extension-agent-controller.js';
|
|
2
|
+
import { createExecutionCodeModeContext } from './execution-code-mode.js';
|
|
3
|
+
import { currentExecutionImages } from '../tools/output-projection.js';
|
|
4
|
+
import { requestSmartCompaction } from '../runtime/compaction/smart.js';
|
|
5
|
+
import { renderPromptSections } from '../prompts/prompt-sections.js';
|
|
6
|
+
import { withToolPermissions } from '../tools/permissions.js';
|
|
7
|
+
/** Capture immutable round tool identities, parent scope and resource capabilities. */
|
|
8
|
+
export function createExecutionToolScope(input) {
|
|
9
|
+
const { store, host, sessionId, executionId, turnId, mode, controller, sessionWriterOwner, selectedModel, permissionPolicy, todo, waitInterrupt, skills, subagents, coreExtensions, operations, scheduleTool, sources, mcpRegistry, autoPermissionPrompt, currentExecutionToolImages, inputImageBytes, snapshotTools, baseTools, captureTools, promptComposition, smartInput, modelInputImages, startCompact, preparedPrompt, clearPreparedPrompt, operation, emit } = input;
|
|
10
|
+
const captureRoundToolScope = () => {
|
|
11
|
+
const roundTools = snapshotTools();
|
|
12
|
+
const availableBindings = captureTools();
|
|
13
|
+
const roundBindings = new Map(roundTools.map((tool) => [tool.name, availableBindings.get(tool.name)]));
|
|
14
|
+
const defaultComposition = promptComposition(roundTools, mode === 'compact' ? 'run' : mode);
|
|
15
|
+
if (permissionPolicy.mode === 'auto')
|
|
16
|
+
defaultComposition.sections = [
|
|
17
|
+
...defaultComposition.sections,
|
|
18
|
+
{ id: 'core:auto-permission', text: autoPermissionPrompt }
|
|
19
|
+
];
|
|
20
|
+
const defaultSystemPrompt = renderPromptSections(defaultComposition.sections);
|
|
21
|
+
let systemPrompt = defaultSystemPrompt;
|
|
22
|
+
const roundMcpExpectations = new Map(roundTools
|
|
23
|
+
.filter((tool) => roundBindings.get(tool.name)?.mcp !== undefined)
|
|
24
|
+
.map((tool) => [tool.name, mcpRegistry.expectedTool(tool.name)]));
|
|
25
|
+
const parentFrame = subagents === undefined || mode === 'compact'
|
|
26
|
+
? undefined
|
|
27
|
+
: subagents.captureParentFrame(executionId);
|
|
28
|
+
const roundSmartInput = smartInput();
|
|
29
|
+
const toolContext = {
|
|
30
|
+
imageStore: store,
|
|
31
|
+
host: host,
|
|
32
|
+
requestSmartCompact: () => {
|
|
33
|
+
controller.signal.throwIfAborted();
|
|
34
|
+
requestSmartCompaction(roundSmartInput === smartInput() ? roundSmartInput : undefined, () => {
|
|
35
|
+
// The Session owns this background operation, not the short-lived tool callback.
|
|
36
|
+
operations.enter({
|
|
37
|
+
sessionId,
|
|
38
|
+
sessionEpoch: coreExtensions.epoch,
|
|
39
|
+
executionId,
|
|
40
|
+
turnId,
|
|
41
|
+
actor: 'sdk',
|
|
42
|
+
entry: 'native-api',
|
|
43
|
+
signal: controller.signal
|
|
44
|
+
}, () => startCompact({ async: true }));
|
|
45
|
+
});
|
|
46
|
+
},
|
|
47
|
+
permissionPolicy,
|
|
48
|
+
writeToolResultResource: (text) => store.writeToolResultResource(sessionId, text),
|
|
49
|
+
todo,
|
|
50
|
+
...(subagents === undefined || mode === 'compact'
|
|
51
|
+
? {}
|
|
52
|
+
: {
|
|
53
|
+
subagents: bindAgentController(subagents.captureExecution(executionId), coreExtensions.agentAction),
|
|
54
|
+
subagentMessages: subagents.modelMessages
|
|
55
|
+
}),
|
|
56
|
+
mode,
|
|
57
|
+
sessionId,
|
|
58
|
+
executionId,
|
|
59
|
+
modelId: selectedModel.id,
|
|
60
|
+
signal: controller.signal,
|
|
61
|
+
waitInterrupt,
|
|
62
|
+
emit,
|
|
63
|
+
skills: skills,
|
|
64
|
+
invokeTool: (call, context, caller) => {
|
|
65
|
+
const invoke = () => coreExtensions.withTools(roundBindings, scheduleTool, () => withToolPermissions(permissionPolicy, () => operations.enter({
|
|
66
|
+
sessionId,
|
|
67
|
+
sessionEpoch: coreExtensions.epoch,
|
|
68
|
+
executionId,
|
|
69
|
+
turnId,
|
|
70
|
+
actor: caller === 'programmatic' ? 'code-mode' : 'model',
|
|
71
|
+
entry: caller,
|
|
72
|
+
...(context.parentCallId === undefined
|
|
73
|
+
? {}
|
|
74
|
+
: { parentToolCallId: context.parentCallId }),
|
|
75
|
+
signal: context.signal
|
|
76
|
+
}, (operation) => coreExtensions.invoke(call, operation, roundBindings))));
|
|
77
|
+
return sources.withFrame(context, () => parentFrame === undefined ? invoke() : parentFrame(invoke));
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const recentImages = async () => {
|
|
81
|
+
const inputImages = await Promise.all((modelInputImages() ?? []).map(async (image) => {
|
|
82
|
+
if (image.dataBase64 !== undefined || image.resourceId === undefined)
|
|
83
|
+
return image;
|
|
84
|
+
const cached = inputImageBytes.get(image.resourceId);
|
|
85
|
+
if (cached !== undefined)
|
|
86
|
+
return cached;
|
|
87
|
+
const source = await store.readResource(sessionId, image.resourceId);
|
|
88
|
+
const restored = { ...image, ...source };
|
|
89
|
+
inputImageBytes.set(image.resourceId, restored);
|
|
90
|
+
return restored;
|
|
91
|
+
}));
|
|
92
|
+
return currentExecutionImages(inputImages, currentExecutionToolImages);
|
|
93
|
+
};
|
|
94
|
+
const toolScope = {
|
|
95
|
+
context: toolContext,
|
|
96
|
+
tools: roundTools,
|
|
97
|
+
expectations: roundMcpExpectations,
|
|
98
|
+
extensionToolNames: new Set([...roundBindings.values()]
|
|
99
|
+
.filter((binding) => binding.source.kind === 'host' || binding.source.kind === 'extension')
|
|
100
|
+
.map((binding) => binding.definition.name)),
|
|
101
|
+
schedule: scheduleTool,
|
|
102
|
+
assertLive: () => coreExtensions.assertLive(),
|
|
103
|
+
assertExecutionLive: () => sources.assertActive(),
|
|
104
|
+
emit: (event, assertLive) => emit(event, () => {
|
|
105
|
+
coreExtensions.assertLive();
|
|
106
|
+
assertLive?.();
|
|
107
|
+
}),
|
|
108
|
+
searchMcpTools: (arguments_, searchSignal) => mcpRegistry.expose(arguments_, {
|
|
109
|
+
signal: searchSignal,
|
|
110
|
+
base: baseTools(),
|
|
111
|
+
window: selectedModel.contextWindowTokens,
|
|
112
|
+
system: systemPrompt
|
|
113
|
+
}),
|
|
114
|
+
recentImages,
|
|
115
|
+
captureCodeContext: () => ({
|
|
116
|
+
...toolContext,
|
|
117
|
+
waitInterrupt: undefined
|
|
118
|
+
}),
|
|
119
|
+
codeModeContext: createExecutionCodeModeContext({
|
|
120
|
+
store,
|
|
121
|
+
sessionId,
|
|
122
|
+
executionId,
|
|
123
|
+
turnId,
|
|
124
|
+
writerOwner: sessionWriterOwner,
|
|
125
|
+
supportsImages: selectedModel.inputCapabilities.includes('IMAGE'),
|
|
126
|
+
tools: roundTools,
|
|
127
|
+
permissionStop: (callId) => permissionPolicy.stop?.source.parentCallId === callId ? permissionPolicy.stop : undefined,
|
|
128
|
+
assertLive: () => coreExtensions.assertLive(),
|
|
129
|
+
pin: () => coreExtensions.pin(),
|
|
130
|
+
cleanupFailed: () => coreExtensions.diagnose({ code: 'MAR_AGENT_EXTENSION_CLEANUP_FAILED', sessionId })
|
|
131
|
+
})
|
|
132
|
+
};
|
|
133
|
+
return {
|
|
134
|
+
roundTools,
|
|
135
|
+
roundBindings,
|
|
136
|
+
toolScope,
|
|
137
|
+
async composeSystemPrompt() {
|
|
138
|
+
const composed = preparedPrompt() ??
|
|
139
|
+
(await operation((call) => coreExtensions.composeModelSystem(defaultComposition, call)));
|
|
140
|
+
clearPreparedPrompt();
|
|
141
|
+
systemPrompt = composed.text;
|
|
142
|
+
return composed;
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
return captureRoundToolScope;
|
|
147
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { parseAgentWaitTargets } from '../subagent/wait-targets.js';
|
|
2
|
+
import { resolveAgentSpawn } from '../extensions/agents.js';
|
|
3
|
+
export function bindAgentController(controller, action) {
|
|
4
|
+
const wait = (input, waitInterrupt) => action('agent.wait', input, (target, call) => {
|
|
5
|
+
const selection = parseAgentWaitTargets(target);
|
|
6
|
+
return selection.agentIds !== undefined
|
|
7
|
+
? controller.outputMany(selection.agentIds, {
|
|
8
|
+
...target,
|
|
9
|
+
waitInterrupt,
|
|
10
|
+
mode: selection.mode ?? 'any',
|
|
11
|
+
signal: call.signal
|
|
12
|
+
})
|
|
13
|
+
: target.agentId === undefined
|
|
14
|
+
? controller.outputAny({ ...target, waitInterrupt, signal: call.signal })
|
|
15
|
+
: controller.output(target.agentId, { ...target, waitInterrupt, signal: call.signal });
|
|
16
|
+
});
|
|
17
|
+
return {
|
|
18
|
+
run: (input, options) => {
|
|
19
|
+
return action('agent.spawn', {
|
|
20
|
+
...(options?.waitFor === undefined ? {} : { waitFor: options.waitFor }),
|
|
21
|
+
prompt: input.prompt,
|
|
22
|
+
description: input.description,
|
|
23
|
+
role: input.role,
|
|
24
|
+
background: input.background ?? false,
|
|
25
|
+
...(input.modelId === undefined ? {} : { modelId: input.modelId }),
|
|
26
|
+
...(input.reasoningEffort === undefined ? {} : { reasoningEffort: input.reasoningEffort })
|
|
27
|
+
}, async (target, call) => {
|
|
28
|
+
const task = resolveAgentSpawn(target);
|
|
29
|
+
return controller.run({
|
|
30
|
+
prompt: task.prompt,
|
|
31
|
+
description: task.description ?? input.description,
|
|
32
|
+
role: task.role ?? input.role,
|
|
33
|
+
background: task.background ?? false,
|
|
34
|
+
...(input.parentSubagentId === undefined
|
|
35
|
+
? {}
|
|
36
|
+
: { parentSubagentId: input.parentSubagentId }),
|
|
37
|
+
...(task.modelId === undefined ? {} : { modelId: task.modelId }),
|
|
38
|
+
...(task.reasoningEffort === undefined
|
|
39
|
+
? {}
|
|
40
|
+
: { reasoningEffort: task.reasoningEffort })
|
|
41
|
+
}, {
|
|
42
|
+
...options,
|
|
43
|
+
...(task.turnSignal === undefined ? {} : { turnSignal: task.turnSignal }),
|
|
44
|
+
...(task.waitFor === undefined ? {} : { waitFor: task.waitFor }),
|
|
45
|
+
signal: call.signal
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
output: (id, options) => {
|
|
50
|
+
const { waitInterrupt, ...input } = options ?? {};
|
|
51
|
+
return wait({ ...input, agentId: id }, waitInterrupt);
|
|
52
|
+
},
|
|
53
|
+
outputAny: (options) => {
|
|
54
|
+
const { waitInterrupt, ...input } = options ?? {};
|
|
55
|
+
return wait(input, waitInterrupt);
|
|
56
|
+
},
|
|
57
|
+
outputMany: (ids, options) => {
|
|
58
|
+
const { waitInterrupt, ...input } = options ?? {};
|
|
59
|
+
return wait({ ...input, agentIds: ids }, waitInterrupt);
|
|
60
|
+
},
|
|
61
|
+
message: (id, message, options) => action('agent.message', { ...options, agentId: id, message }, (target, call) => controller.message(target.agentId, target.message, {
|
|
62
|
+
...(target.delivery === undefined ? {} : { delivery: target.delivery }),
|
|
63
|
+
signal: call.signal
|
|
64
|
+
})),
|
|
65
|
+
cancel: (id) => action('agent.cancel', { agentId: id }, (target) => controller.cancel(target.agentId)),
|
|
66
|
+
listSessionResources: () => controller.listSessionResources(),
|
|
67
|
+
dispose: () => controller.dispose()
|
|
68
|
+
};
|
|
69
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ExtensionAgentsBackend } from '../extensions/agents.js';
|
|
2
|
+
import type { ExtensionOperationContext } from '../extensions/operation.js';
|
|
3
|
+
import type { SubagentParentOperation, SubagentSessionController } from '../subagent/session-controller.js';
|
|
4
|
+
/** Uses the Session's sole task controller, including its durable children and queue. */
|
|
5
|
+
export declare function createExtensionAgentsBackend(input: {
|
|
6
|
+
readonly controller: () => Promise<SubagentSessionController>;
|
|
7
|
+
readonly existingController: () => SubagentSessionController | undefined;
|
|
8
|
+
readonly parent: (controller: SubagentSessionController, call: ExtensionOperationContext) => SubagentParentOperation;
|
|
9
|
+
}): ExtensionAgentsBackend;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { AgentError } from '../error.js';
|
|
2
|
+
import { parseAgentWaitTargets } from '../subagent/wait-targets.js';
|
|
3
|
+
/** Uses the Session's sole task controller, including its durable children and queue. */
|
|
4
|
+
export function createExtensionAgentsBackend(input) {
|
|
5
|
+
const withController = async (call, run) => {
|
|
6
|
+
call.signal.throwIfAborted();
|
|
7
|
+
const controller = await input.controller();
|
|
8
|
+
call.signal.throwIfAborted();
|
|
9
|
+
return controller.withOperation(input.parent(controller, call), () => run(controller));
|
|
10
|
+
};
|
|
11
|
+
return {
|
|
12
|
+
own: (owner) => async () => {
|
|
13
|
+
await input.existingController()?.cancelOwned(owner);
|
|
14
|
+
},
|
|
15
|
+
spawn: (task, call) => withController(call, (controller) => controller.run({
|
|
16
|
+
description: task.description ?? 'Extension agent',
|
|
17
|
+
prompt: task.prompt,
|
|
18
|
+
role: task.role ?? 'general-purpose',
|
|
19
|
+
background: task.background ?? true,
|
|
20
|
+
...(task.modelId === undefined ? {} : { modelId: task.modelId }),
|
|
21
|
+
...(task.reasoningEffort === undefined ? {} : { reasoningEffort: task.reasoningEffort })
|
|
22
|
+
}, {
|
|
23
|
+
signal: call.signal,
|
|
24
|
+
...(task.turnSignal === undefined ? {} : { turnSignal: task.turnSignal }),
|
|
25
|
+
...(task.waitFor === undefined ? {} : { waitFor: task.waitFor }),
|
|
26
|
+
onCreated: (created) => {
|
|
27
|
+
if (created.status === 'failed')
|
|
28
|
+
throw new AgentError(created.errorCode ?? 'MAR_AGENT_SUBAGENT_FAILED', created.errorMessage ?? 'Agent could not start.');
|
|
29
|
+
}
|
|
30
|
+
})),
|
|
31
|
+
list: (call) => withController(call, (controller) => controller.list(call.signal)),
|
|
32
|
+
inspect: (target, call) => withController(call, (controller) => controller.inspect(target.agentId)),
|
|
33
|
+
wait: (target, call) => withController(call, (controller) => {
|
|
34
|
+
const selection = parseAgentWaitTargets(target);
|
|
35
|
+
const options = {
|
|
36
|
+
waitMs: target.waitMs ?? 30_000,
|
|
37
|
+
...(target.untilSettled === undefined ? {} : { untilSettled: target.untilSettled }),
|
|
38
|
+
...(target.waitFor === undefined ? {} : { waitFor: target.waitFor }),
|
|
39
|
+
signal: call.signal
|
|
40
|
+
};
|
|
41
|
+
if (selection.agentIds !== undefined)
|
|
42
|
+
return controller.outputMany(selection.agentIds, {
|
|
43
|
+
...options,
|
|
44
|
+
mode: selection.mode ?? 'any'
|
|
45
|
+
});
|
|
46
|
+
if (target.untilSettled && target.agentId === undefined)
|
|
47
|
+
throw new AgentError('MAR_AGENT_TOOL_INPUT_INVALID', 'An unbounded wait requires an agent id.');
|
|
48
|
+
return target.agentId === undefined
|
|
49
|
+
? controller.outputAny(options)
|
|
50
|
+
: controller.output(target.agentId, options);
|
|
51
|
+
}),
|
|
52
|
+
message: (target, call) => withController(call, (controller) => controller.message(target.agentId, target.message, {
|
|
53
|
+
...(target.delivery === undefined ? {} : { delivery: target.delivery }),
|
|
54
|
+
signal: call.signal
|
|
55
|
+
})),
|
|
56
|
+
cancel: (target, call) => withController(call, (controller) => controller.cancel(target.agentId))
|
|
57
|
+
};
|
|
58
|
+
}
|