pulseed 0.6.2 → 0.6.4
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/adapters/agents/claude-api.d.ts +2 -2
- package/dist/adapters/agents/claude-api.d.ts.map +1 -1
- package/dist/adapters/agents/claude-api.js +3 -2
- package/dist/adapters/agents/claude-api.js.map +1 -1
- package/dist/adapters/agents/openai-codex.d.ts +3 -0
- package/dist/adapters/agents/openai-codex.d.ts.map +1 -1
- package/dist/adapters/agents/openai-codex.js +5 -0
- package/dist/adapters/agents/openai-codex.js.map +1 -1
- package/dist/adapters/datasources/artifact-metric-datasource.d.ts +13 -0
- package/dist/adapters/datasources/artifact-metric-datasource.d.ts.map +1 -1
- package/dist/adapters/datasources/artifact-metric-datasource.js +257 -8
- package/dist/adapters/datasources/artifact-metric-datasource.js.map +1 -1
- package/dist/base/config/global-config.d.ts +4 -4
- package/dist/base/llm/codex-llm-client.d.ts +3 -0
- package/dist/base/llm/codex-llm-client.d.ts.map +1 -1
- package/dist/base/llm/codex-llm-client.js +71 -7
- package/dist/base/llm/codex-llm-client.js.map +1 -1
- package/dist/base/llm/llm-client.d.ts +2 -0
- package/dist/base/llm/llm-client.d.ts.map +1 -1
- package/dist/base/llm/llm-client.js +2 -2
- package/dist/base/llm/llm-client.js.map +1 -1
- package/dist/base/llm/ollama-client.d.ts.map +1 -1
- package/dist/base/llm/ollama-client.js +12 -0
- package/dist/base/llm/ollama-client.js.map +1 -1
- package/dist/base/llm/openai-client.d.ts +4 -0
- package/dist/base/llm/openai-client.d.ts.map +1 -1
- package/dist/base/llm/openai-client.js +29 -15
- package/dist/base/llm/openai-client.js.map +1 -1
- package/dist/base/llm/provider-config.d.ts +12 -2
- package/dist/base/llm/provider-config.d.ts.map +1 -1
- package/dist/base/llm/provider-config.js +46 -5
- package/dist/base/llm/provider-config.js.map +1 -1
- package/dist/base/llm/provider-factory.d.ts +1 -1
- package/dist/base/llm/provider-factory.d.ts.map +1 -1
- package/dist/base/llm/provider-factory.js +7 -2
- package/dist/base/llm/provider-factory.js.map +1 -1
- package/dist/base/protocol/exact-protocol.d.ts +47 -0
- package/dist/base/protocol/exact-protocol.d.ts.map +1 -0
- package/dist/base/protocol/exact-protocol.js +175 -0
- package/dist/base/protocol/exact-protocol.js.map +1 -0
- package/dist/base/types/core.d.ts +1 -1
- package/dist/base/types/core.d.ts.map +1 -1
- package/dist/base/types/core.js +2 -0
- package/dist/base/types/core.js.map +1 -1
- package/dist/base/utils/execFileNoThrow.d.ts +4 -0
- package/dist/base/utils/execFileNoThrow.d.ts.map +1 -1
- package/dist/base/utils/execFileNoThrow.js +81 -2
- package/dist/base/utils/execFileNoThrow.js.map +1 -1
- package/dist/base/utils/workspace-path.d.ts +6 -0
- package/dist/base/utils/workspace-path.d.ts.map +1 -0
- package/dist/base/utils/workspace-path.js +24 -0
- package/dist/base/utils/workspace-path.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/interface/chat/chat-event-state.d.ts +2 -0
- package/dist/interface/chat/chat-event-state.d.ts.map +1 -1
- package/dist/interface/chat/chat-event-state.js +22 -41
- package/dist/interface/chat/chat-event-state.js.map +1 -1
- package/dist/interface/chat/chat-events.d.ts +15 -1
- package/dist/interface/chat/chat-events.d.ts.map +1 -1
- package/dist/interface/chat/chat-history.d.ts +3816 -192
- package/dist/interface/chat/chat-history.d.ts.map +1 -1
- package/dist/interface/chat/chat-history.js +529 -5
- package/dist/interface/chat/chat-history.js.map +1 -1
- package/dist/interface/chat/chat-runner-command-helpers.d.ts +1 -0
- package/dist/interface/chat/chat-runner-command-helpers.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner-command-helpers.js +1 -0
- package/dist/interface/chat/chat-runner-command-helpers.js.map +1 -1
- package/dist/interface/chat/chat-runner-commands.d.ts +3 -1
- package/dist/interface/chat/chat-runner-commands.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner-commands.js +175 -22
- package/dist/interface/chat/chat-runner-commands.js.map +1 -1
- package/dist/interface/chat/chat-runner-contracts.d.ts +6 -1
- package/dist/interface/chat/chat-runner-contracts.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner-event-bridge.d.ts +13 -1
- package/dist/interface/chat/chat-runner-event-bridge.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner-event-bridge.js +51 -3
- package/dist/interface/chat/chat-runner-event-bridge.js.map +1 -1
- package/dist/interface/chat/chat-runner-routes.d.ts +5 -17
- package/dist/interface/chat/chat-runner-routes.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner-routes.js +80 -51
- package/dist/interface/chat/chat-runner-routes.js.map +1 -1
- package/dist/interface/chat/chat-runner-runtime.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner-runtime.js +4 -0
- package/dist/interface/chat/chat-runner-runtime.js.map +1 -1
- package/dist/interface/chat/chat-runner.d.ts +8 -1
- package/dist/interface/chat/chat-runner.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner.js +172 -49
- package/dist/interface/chat/chat-runner.js.map +1 -1
- package/dist/interface/chat/chat-session-store.d.ts +3 -0
- package/dist/interface/chat/chat-session-store.d.ts.map +1 -1
- package/dist/interface/chat/chat-session-store.js +12 -0
- package/dist/interface/chat/chat-session-store.js.map +1 -1
- package/dist/interface/chat/chat-state-service.d.ts +1 -0
- package/dist/interface/chat/chat-state-service.d.ts.map +1 -1
- package/dist/interface/chat/chat-state-service.js +1 -0
- package/dist/interface/chat/chat-state-service.js.map +1 -1
- package/dist/interface/chat/cross-platform-session.d.ts +15 -0
- package/dist/interface/chat/cross-platform-session.d.ts.map +1 -1
- package/dist/interface/chat/cross-platform-session.js +260 -42
- package/dist/interface/chat/cross-platform-session.js.map +1 -1
- package/dist/interface/chat/failure-recovery.d.ts.map +1 -1
- package/dist/interface/chat/failure-recovery.js +15 -1
- package/dist/interface/chat/failure-recovery.js.map +1 -1
- package/dist/interface/chat/freeform-route-classifier.d.ts +2 -2
- package/dist/interface/chat/ingress-router.d.ts +3 -0
- package/dist/interface/chat/ingress-router.d.ts.map +1 -1
- package/dist/interface/chat/ingress-router.js +3 -0
- package/dist/interface/chat/ingress-router.js.map +1 -1
- package/dist/interface/chat/model-request-builder.d.ts +37 -0
- package/dist/interface/chat/model-request-builder.d.ts.map +1 -0
- package/dist/interface/chat/model-request-builder.js +76 -0
- package/dist/interface/chat/model-request-builder.js.map +1 -0
- package/dist/interface/chat/turn-context.d.ts +200 -0
- package/dist/interface/chat/turn-context.d.ts.map +1 -0
- package/dist/interface/chat/turn-context.js +249 -0
- package/dist/interface/chat/turn-context.js.map +1 -0
- package/dist/interface/chat/turn-protocol.d.ts +35 -0
- package/dist/interface/chat/turn-protocol.d.ts.map +1 -0
- package/dist/interface/chat/turn-protocol.js +27 -0
- package/dist/interface/chat/turn-protocol.js.map +1 -0
- package/dist/interface/chat/user-input.d.ts +55 -0
- package/dist/interface/chat/user-input.d.ts.map +1 -0
- package/dist/interface/chat/user-input.js +52 -0
- package/dist/interface/chat/user-input.js.map +1 -0
- package/dist/interface/cli/cli-command-registry.d.ts +1 -1
- package/dist/interface/cli/cli-command-registry.d.ts.map +1 -1
- package/dist/interface/cli/cli-command-registry.js +12 -16
- package/dist/interface/cli/cli-command-registry.js.map +1 -1
- package/dist/interface/cli/commands/config.d.ts.map +1 -1
- package/dist/interface/cli/commands/config.js +12 -1
- package/dist/interface/cli/commands/config.js.map +1 -1
- package/dist/interface/cli/commands/daemon-shared.d.ts +8 -0
- package/dist/interface/cli/commands/daemon-shared.d.ts.map +1 -1
- package/dist/interface/cli/commands/daemon-shared.js +18 -2
- package/dist/interface/cli/commands/daemon-shared.js.map +1 -1
- package/dist/interface/cli/commands/daemon.d.ts.map +1 -1
- package/dist/interface/cli/commands/daemon.js +64 -2
- package/dist/interface/cli/commands/daemon.js.map +1 -1
- package/dist/interface/cli/commands/doctor.d.ts +1 -0
- package/dist/interface/cli/commands/doctor.d.ts.map +1 -1
- package/dist/interface/cli/commands/doctor.js +83 -1
- package/dist/interface/cli/commands/doctor.js.map +1 -1
- package/dist/interface/cli/commands/goal-dispatch.d.ts.map +1 -1
- package/dist/interface/cli/commands/goal-dispatch.js +19 -7
- package/dist/interface/cli/commands/goal-dispatch.js.map +1 -1
- package/dist/interface/cli/commands/goal-raw.d.ts +1 -0
- package/dist/interface/cli/commands/goal-raw.d.ts.map +1 -1
- package/dist/interface/cli/commands/goal-raw.js +34 -2
- package/dist/interface/cli/commands/goal-raw.js.map +1 -1
- package/dist/interface/cli/commands/goal-utils.d.ts.map +1 -1
- package/dist/interface/cli/commands/goal-utils.js +3 -5
- package/dist/interface/cli/commands/goal-utils.js.map +1 -1
- package/dist/interface/cli/commands/run.d.ts.map +1 -1
- package/dist/interface/cli/commands/run.js +50 -0
- package/dist/interface/cli/commands/run.js.map +1 -1
- package/dist/interface/cli/commands/setup/import/flow.d.ts.map +1 -1
- package/dist/interface/cli/commands/setup/import/flow.js +2 -0
- package/dist/interface/cli/commands/setup/import/flow.js.map +1 -1
- package/dist/interface/cli/commands/setup/import/provider.d.ts.map +1 -1
- package/dist/interface/cli/commands/setup/import/provider.js +5 -1
- package/dist/interface/cli/commands/setup/import/provider.js.map +1 -1
- package/dist/interface/cli/commands/setup/import/types.d.ts +1 -0
- package/dist/interface/cli/commands/setup/import/types.d.ts.map +1 -1
- package/dist/interface/cli/commands/setup-shared.d.ts +2 -0
- package/dist/interface/cli/commands/setup-shared.d.ts.map +1 -1
- package/dist/interface/cli/commands/setup-shared.js +4 -1
- package/dist/interface/cli/commands/setup-shared.js.map +1 -1
- package/dist/interface/cli/commands/setup-wizard.d.ts +2 -0
- package/dist/interface/cli/commands/setup-wizard.d.ts.map +1 -1
- package/dist/interface/cli/commands/setup-wizard.js +36 -4
- package/dist/interface/cli/commands/setup-wizard.js.map +1 -1
- package/dist/interface/cli/commands/setup.d.ts.map +1 -1
- package/dist/interface/cli/commands/setup.js +13 -1
- package/dist/interface/cli/commands/setup.js.map +1 -1
- package/dist/interface/cli/setup.d.ts +1 -1
- package/dist/interface/cli/setup.d.ts.map +1 -1
- package/dist/interface/cli/setup.js +4 -3
- package/dist/interface/cli/setup.js.map +1 -1
- package/dist/interface/cli/utils/loop-runner.d.ts +1 -0
- package/dist/interface/cli/utils/loop-runner.d.ts.map +1 -1
- package/dist/interface/cli/utils/loop-runner.js +12 -3
- package/dist/interface/cli/utils/loop-runner.js.map +1 -1
- package/dist/interface/tui/app.d.ts +6 -1
- package/dist/interface/tui/app.d.ts.map +1 -1
- package/dist/interface/tui/app.js +29 -12
- package/dist/interface/tui/app.js.map +1 -1
- package/dist/interface/tui/bash-mode.d.ts.map +1 -1
- package/dist/interface/tui/bash-mode.js +2 -9
- package/dist/interface/tui/bash-mode.js.map +1 -1
- package/dist/interface/tui/chat/suggestions.js +1 -1
- package/dist/interface/tui/chat/suggestions.js.map +1 -1
- package/dist/interface/tui/chat/viewport.d.ts.map +1 -1
- package/dist/interface/tui/chat/viewport.js +57 -11
- package/dist/interface/tui/chat/viewport.js.map +1 -1
- package/dist/interface/tui/entry-deps.d.ts +6 -1
- package/dist/interface/tui/entry-deps.d.ts.map +1 -1
- package/dist/interface/tui/entry-deps.js +3 -0
- package/dist/interface/tui/entry-deps.js.map +1 -1
- package/dist/interface/tui/entry.d.ts.map +1 -1
- package/dist/interface/tui/entry.js +6 -2
- package/dist/interface/tui/entry.js.map +1 -1
- package/dist/interface/tui/input-action.d.ts.map +1 -1
- package/dist/interface/tui/input-action.js +3 -2
- package/dist/interface/tui/input-action.js.map +1 -1
- package/dist/interface/tui/intent-recognizer.d.ts.map +1 -1
- package/dist/interface/tui/intent-recognizer.js +21 -33
- package/dist/interface/tui/intent-recognizer.js.map +1 -1
- package/dist/orchestrator/execution/adapter-layer.d.ts +6 -1
- package/dist/orchestrator/execution/adapter-layer.d.ts.map +1 -1
- package/dist/orchestrator/execution/adapter-layer.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-command-classifier.d.ts +12 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-command-classifier.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-command-classifier.js +16 -31
- package/dist/orchestrator/execution/agent-loop/agent-loop-command-classifier.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-compaction-record.d.ts +75 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-compaction-record.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-compaction-record.js +10 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-compaction-record.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-compactor.d.ts +3 -2
- package/dist/orchestrator/execution/agent-loop/agent-loop-compactor.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-compactor.js +185 -22
- package/dist/orchestrator/execution/agent-loop/agent-loop-compactor.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-context-assembler.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-context-assembler.js +12 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-context-assembler.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.d.ts +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.js +11 -2
- package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-events.d.ts +8 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-events.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-events.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-history.d.ts +3 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-history.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-history.js +12 -3
- package/dist/orchestrator/execution/agent-loop/agent-loop-history.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-model-client.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-model-client.js +8 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-model-client.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-model.d.ts +39 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-model.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-model.js +21 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-model.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-result.d.ts +17 -11
- package/dist/orchestrator/execution/agent-loop/agent-loop-result.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-session-state.d.ts +4 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-session-state.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-session-state.js +135 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-session-state.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-runtime.d.ts +3 -2
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-runtime.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-runtime.js +68 -61
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-runtime.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-turn-context.d.ts +3 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-turn-context.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-turn-context.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-timeline.d.ts +12 -1
- package/dist/orchestrator/execution/agent-loop/agent-timeline.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-timeline.js +19 -56
- package/dist/orchestrator/execution/agent-loop/agent-timeline.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/anthropic-messages-agent-loop-model-client.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/anthropic-messages-agent-loop-model-client.js +13 -4
- package/dist/orchestrator/execution/agent-loop/anthropic-messages-agent-loop-model-client.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.d.ts +12 -0
- package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.js +404 -79
- package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.d.ts +1 -1
- package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.js +80 -12
- package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/chat-display-output.d.ts +1 -0
- package/dist/orchestrator/execution/agent-loop/chat-display-output.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/chat-display-output.js +3 -1
- package/dist/orchestrator/execution/agent-loop/chat-display-output.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/index.d.ts +3 -0
- package/dist/orchestrator/execution/agent-loop/index.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/index.js +3 -0
- package/dist/orchestrator/execution/agent-loop/index.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/openai-responses-agent-loop-model-client.d.ts +1 -0
- package/dist/orchestrator/execution/agent-loop/openai-responses-agent-loop-model-client.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/openai-responses-agent-loop-model-client.js +56 -11
- package/dist/orchestrator/execution/agent-loop/openai-responses-agent-loop-model-client.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/response-item-tool-router.d.ts +20 -0
- package/dist/orchestrator/execution/agent-loop/response-item-tool-router.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/response-item-tool-router.js +180 -0
- package/dist/orchestrator/execution/agent-loop/response-item-tool-router.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/response-item.d.ts +805 -0
- package/dist/orchestrator/execution/agent-loop/response-item.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/response-item.js +104 -0
- package/dist/orchestrator/execution/agent-loop/response-item.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-context.d.ts +7 -2
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-context.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-context.js +20 -1
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-context.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-result.d.ts +5 -3
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-result.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-result.js +110 -10
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-result.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-runner.d.ts +2 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-runner.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-runner.js +9 -4
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-runner.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-verification.d.ts +0 -1
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-verification.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-verification.js +7 -87
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-verification.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-worktree.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-worktree.js +25 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-worktree.js.map +1 -1
- package/dist/orchestrator/execution/context/issue-context-fetcher.d.ts +5 -1
- package/dist/orchestrator/execution/context/issue-context-fetcher.d.ts.map +1 -1
- package/dist/orchestrator/execution/context/issue-context-fetcher.js +7 -4
- package/dist/orchestrator/execution/context/issue-context-fetcher.js.map +1 -1
- package/dist/orchestrator/execution/task/task-artifact-contract.d.ts +18 -0
- package/dist/orchestrator/execution/task/task-artifact-contract.d.ts.map +1 -0
- package/dist/orchestrator/execution/task/task-artifact-contract.js +176 -0
- package/dist/orchestrator/execution/task/task-artifact-contract.js.map +1 -0
- package/dist/orchestrator/execution/task/task-diff-capture.d.ts +14 -1
- package/dist/orchestrator/execution/task/task-diff-capture.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-diff-capture.js +269 -17
- package/dist/orchestrator/execution/task/task-diff-capture.js.map +1 -1
- package/dist/orchestrator/execution/task/task-execution-helpers.d.ts +1 -0
- package/dist/orchestrator/execution/task/task-execution-helpers.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-execution-helpers.js +76 -17
- package/dist/orchestrator/execution/task/task-execution-helpers.js.map +1 -1
- package/dist/orchestrator/execution/task/task-executor.d.ts +16 -1
- package/dist/orchestrator/execution/task/task-executor.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-executor.js +55 -50
- package/dist/orchestrator/execution/task/task-executor.js.map +1 -1
- package/dist/orchestrator/execution/task/task-generation.d.ts +54 -1
- package/dist/orchestrator/execution/task/task-generation.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-generation.js +19 -3
- package/dist/orchestrator/execution/task/task-generation.js.map +1 -1
- package/dist/orchestrator/execution/task/task-lifecycle-runner.d.ts +4 -3
- package/dist/orchestrator/execution/task/task-lifecycle-runner.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-lifecycle-runner.js +32 -5
- package/dist/orchestrator/execution/task/task-lifecycle-runner.js.map +1 -1
- package/dist/orchestrator/execution/task/task-lifecycle.d.ts +5 -4
- package/dist/orchestrator/execution/task/task-lifecycle.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-lifecycle.js +61 -11
- package/dist/orchestrator/execution/task/task-lifecycle.js.map +1 -1
- package/dist/orchestrator/execution/task/task-outcome-ledger.d.ts +8 -0
- package/dist/orchestrator/execution/task/task-outcome-ledger.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-outcome-ledger.js +59 -3
- package/dist/orchestrator/execution/task/task-outcome-ledger.js.map +1 -1
- package/dist/orchestrator/execution/task/task-prompt-builder.d.ts +3 -1
- package/dist/orchestrator/execution/task/task-prompt-builder.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-prompt-builder.js +23 -12
- package/dist/orchestrator/execution/task/task-prompt-builder.js.map +1 -1
- package/dist/orchestrator/execution/task/task-verifier-rules.d.ts +5 -2
- package/dist/orchestrator/execution/task/task-verifier-rules.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-verifier-rules.js +346 -104
- package/dist/orchestrator/execution/task/task-verifier-rules.js.map +1 -1
- package/dist/orchestrator/execution/task/task-verifier-types.d.ts +13 -0
- package/dist/orchestrator/execution/task/task-verifier-types.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-verifier-types.js.map +1 -1
- package/dist/orchestrator/execution/task/task-verifier.d.ts +5 -4
- package/dist/orchestrator/execution/task/task-verifier.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-verifier.js +237 -22
- package/dist/orchestrator/execution/task/task-verifier.js.map +1 -1
- package/dist/orchestrator/execution/task/task-workspace.d.ts +13 -0
- package/dist/orchestrator/execution/task/task-workspace.d.ts.map +1 -0
- package/dist/orchestrator/execution/task/task-workspace.js +32 -0
- package/dist/orchestrator/execution/task/task-workspace.js.map +1 -0
- package/dist/orchestrator/execution/types/task-group.d.ts +76 -5
- package/dist/orchestrator/execution/types/task-group.d.ts.map +1 -1
- package/dist/orchestrator/execution/types/task.d.ts +117 -3
- package/dist/orchestrator/execution/types/task.d.ts.map +1 -1
- package/dist/orchestrator/execution/types/task.js +12 -0
- package/dist/orchestrator/execution/types/task.js.map +1 -1
- package/dist/orchestrator/goal/types/goal.d.ts +6 -6
- package/dist/orchestrator/loop/durable-loop/iteration-kernel.d.ts +1 -0
- package/dist/orchestrator/loop/durable-loop/iteration-kernel.d.ts.map +1 -1
- package/dist/orchestrator/loop/durable-loop/iteration-kernel.js +2 -2
- package/dist/orchestrator/loop/durable-loop/iteration-kernel.js.map +1 -1
- package/dist/orchestrator/loop/durable-loop/preparation.d.ts.map +1 -1
- package/dist/orchestrator/loop/durable-loop/preparation.js +7 -1
- package/dist/orchestrator/loop/durable-loop/preparation.js.map +1 -1
- package/dist/orchestrator/loop/durable-loop/task-cycle.d.ts +2 -1
- package/dist/orchestrator/loop/durable-loop/task-cycle.d.ts.map +1 -1
- package/dist/orchestrator/loop/durable-loop/task-cycle.js +2 -2
- package/dist/orchestrator/loop/durable-loop/task-cycle.js.map +1 -1
- package/dist/orchestrator/loop/durable-loop.d.ts +3 -2
- package/dist/orchestrator/loop/durable-loop.d.ts.map +1 -1
- package/dist/orchestrator/loop/durable-loop.js +26 -6
- package/dist/orchestrator/loop/durable-loop.js.map +1 -1
- package/dist/platform/corrections/memory-correction-ledger.d.ts +30 -30
- package/dist/platform/corrections/memory-governance.d.ts +2 -2
- package/dist/platform/knowledge/memory/memory-selection.d.ts.map +1 -1
- package/dist/platform/knowledge/memory/memory-selection.js +24 -18
- package/dist/platform/knowledge/memory/memory-selection.js.map +1 -1
- package/dist/platform/knowledge/types/agent-memory.d.ts +30 -30
- package/dist/platform/observation/context-provider/collector.d.ts.map +1 -1
- package/dist/platform/observation/context-provider/collector.js +89 -24
- package/dist/platform/observation/context-provider/collector.js.map +1 -1
- package/dist/platform/observation/data-source-adapter.d.ts +2 -0
- package/dist/platform/observation/data-source-adapter.d.ts.map +1 -1
- package/dist/platform/observation/data-source-adapter.js.map +1 -1
- package/dist/platform/observation/observation-apply.d.ts.map +1 -1
- package/dist/platform/observation/observation-apply.js +8 -2
- package/dist/platform/observation/observation-apply.js.map +1 -1
- package/dist/platform/observation/observation-engine.d.ts.map +1 -1
- package/dist/platform/observation/observation-engine.js +154 -67
- package/dist/platform/observation/observation-engine.js.map +1 -1
- package/dist/platform/observation/observation-helpers.d.ts +2 -0
- package/dist/platform/observation/observation-helpers.d.ts.map +1 -1
- package/dist/platform/observation/observation-helpers.js.map +1 -1
- package/dist/platform/observation/types/data-source.d.ts +60 -0
- package/dist/platform/observation/types/data-source.d.ts.map +1 -1
- package/dist/platform/observation/types/data-source.js +5 -0
- package/dist/platform/observation/types/data-source.js.map +1 -1
- package/dist/platform/observation/workspace-context.d.ts.map +1 -1
- package/dist/platform/observation/workspace-context.js +13 -18
- package/dist/platform/observation/workspace-context.js.map +1 -1
- package/dist/platform/soil/contracts.d.ts +74 -74
- package/dist/reporting/types/report.d.ts +7 -0
- package/dist/reporting/types/report.d.ts.map +1 -1
- package/dist/runtime/approval-broker.d.ts +12 -0
- package/dist/runtime/approval-broker.d.ts.map +1 -1
- package/dist/runtime/approval-broker.js +27 -7
- package/dist/runtime/approval-broker.js.map +1 -1
- package/dist/runtime/control/daemon-runtime-control-executor.d.ts.map +1 -1
- package/dist/runtime/control/daemon-runtime-control-executor.js +9 -4
- package/dist/runtime/control/daemon-runtime-control-executor.js.map +1 -1
- package/dist/runtime/control/runtime-control-intent.d.ts.map +1 -1
- package/dist/runtime/control/runtime-control-intent.js +3 -2
- package/dist/runtime/control/runtime-control-intent.js.map +1 -1
- package/dist/runtime/control/runtime-control-service.d.ts +2 -1
- package/dist/runtime/control/runtime-control-service.d.ts.map +1 -1
- package/dist/runtime/control/runtime-control-service.js +9 -2
- package/dist/runtime/control/runtime-control-service.js.map +1 -1
- package/dist/runtime/control/runtime-target-resolver.js +2 -0
- package/dist/runtime/control/runtime-target-resolver.js.map +1 -1
- package/dist/runtime/daemon/runner-goal-cycle.d.ts.map +1 -1
- package/dist/runtime/daemon/runner-goal-cycle.js +1 -2
- package/dist/runtime/daemon/runner-goal-cycle.js.map +1 -1
- package/dist/runtime/daemon/runner-recovery.d.ts +17 -3
- package/dist/runtime/daemon/runner-recovery.d.ts.map +1 -1
- package/dist/runtime/daemon/runner-recovery.js +50 -12
- package/dist/runtime/daemon/runner-recovery.js.map +1 -1
- package/dist/runtime/daemon/runner-startup.d.ts.map +1 -1
- package/dist/runtime/daemon/runner-startup.js +18 -1
- package/dist/runtime/daemon/runner-startup.js.map +1 -1
- package/dist/runtime/daemon/runner.d.ts.map +1 -1
- package/dist/runtime/daemon/runner.js +3 -2
- package/dist/runtime/daemon/runner.js.map +1 -1
- package/dist/runtime/daemon/runtime-ownership.d.ts +0 -1
- package/dist/runtime/daemon/runtime-ownership.d.ts.map +1 -1
- package/dist/runtime/daemon/runtime-ownership.js +18 -18
- package/dist/runtime/daemon/runtime-ownership.js.map +1 -1
- package/dist/runtime/daemon/wait-deadline-resolver.d.ts.map +1 -1
- package/dist/runtime/daemon/wait-deadline-resolver.js +2 -0
- package/dist/runtime/daemon/wait-deadline-resolver.js.map +1 -1
- package/dist/runtime/evidence-answer.d.ts.map +1 -1
- package/dist/runtime/evidence-answer.js +34 -7
- package/dist/runtime/evidence-answer.js.map +1 -1
- package/dist/runtime/executor/goal-worker.d.ts +6 -1
- package/dist/runtime/executor/goal-worker.d.ts.map +1 -1
- package/dist/runtime/executor/goal-worker.js +18 -1
- package/dist/runtime/executor/goal-worker.js.map +1 -1
- package/dist/runtime/executor/loop-supervisor.d.ts +1 -0
- package/dist/runtime/executor/loop-supervisor.d.ts.map +1 -1
- package/dist/runtime/executor/loop-supervisor.js +58 -6
- package/dist/runtime/executor/loop-supervisor.js.map +1 -1
- package/dist/runtime/gateway/channel-adapter.d.ts +3 -0
- package/dist/runtime/gateway/channel-adapter.d.ts.map +1 -1
- package/dist/runtime/gateway/channel-display-policy.d.ts +42 -0
- package/dist/runtime/gateway/channel-display-policy.d.ts.map +1 -0
- package/dist/runtime/gateway/channel-display-policy.js +85 -0
- package/dist/runtime/gateway/channel-display-policy.js.map +1 -0
- package/dist/runtime/gateway/chat-event-rendering.d.ts +2 -1
- package/dist/runtime/gateway/chat-event-rendering.d.ts.map +1 -1
- package/dist/runtime/gateway/chat-event-rendering.js +2 -0
- package/dist/runtime/gateway/chat-event-rendering.js.map +1 -1
- package/dist/runtime/gateway/chat-session-dispatch.d.ts.map +1 -1
- package/dist/runtime/gateway/chat-session-dispatch.js +4 -9
- package/dist/runtime/gateway/chat-session-dispatch.js.map +1 -1
- package/dist/runtime/gateway/chat-session-port.d.ts +2 -0
- package/dist/runtime/gateway/chat-session-port.d.ts.map +1 -1
- package/dist/runtime/gateway/chat-session-port.js.map +1 -1
- package/dist/runtime/gateway/discord-gateway-adapter.d.ts +4 -0
- package/dist/runtime/gateway/discord-gateway-adapter.d.ts.map +1 -1
- package/dist/runtime/gateway/discord-gateway-adapter.js +100 -31
- package/dist/runtime/gateway/discord-gateway-adapter.js.map +1 -1
- package/dist/runtime/gateway/index.d.ts +4 -0
- package/dist/runtime/gateway/index.d.ts.map +1 -1
- package/dist/runtime/gateway/index.js +2 -0
- package/dist/runtime/gateway/index.js.map +1 -1
- package/dist/runtime/gateway/non-tui-display-projector.d.ts +40 -0
- package/dist/runtime/gateway/non-tui-display-projector.d.ts.map +1 -0
- package/dist/runtime/gateway/non-tui-display-projector.js +166 -0
- package/dist/runtime/gateway/non-tui-display-projector.js.map +1 -0
- package/dist/runtime/gateway/signal-gateway-adapter.d.ts +1 -0
- package/dist/runtime/gateway/signal-gateway-adapter.d.ts.map +1 -1
- package/dist/runtime/gateway/signal-gateway-adapter.js +47 -4
- package/dist/runtime/gateway/signal-gateway-adapter.js.map +1 -1
- package/dist/runtime/gateway/slack-channel-adapter.d.ts +1 -0
- package/dist/runtime/gateway/slack-channel-adapter.d.ts.map +1 -1
- package/dist/runtime/gateway/slack-channel-adapter.js +93 -18
- package/dist/runtime/gateway/slack-channel-adapter.js.map +1 -1
- package/dist/runtime/gateway/telegram-gateway-adapter.d.ts +2 -0
- package/dist/runtime/gateway/telegram-gateway-adapter.d.ts.map +1 -1
- package/dist/runtime/gateway/telegram-gateway-adapter.js +61 -113
- package/dist/runtime/gateway/telegram-gateway-adapter.js.map +1 -1
- package/dist/runtime/gateway/whatsapp-gateway-adapter.d.ts +1 -0
- package/dist/runtime/gateway/whatsapp-gateway-adapter.d.ts.map +1 -1
- package/dist/runtime/gateway/whatsapp-gateway-adapter.js +49 -4
- package/dist/runtime/gateway/whatsapp-gateway-adapter.js.map +1 -1
- package/dist/runtime/permission-dialogue.d.ts +113 -0
- package/dist/runtime/permission-dialogue.d.ts.map +1 -0
- package/dist/runtime/permission-dialogue.js +82 -0
- package/dist/runtime/permission-dialogue.js.map +1 -0
- package/dist/runtime/run-spec/derive.d.ts +14 -14
- package/dist/runtime/run-spec/handoff.js +2 -0
- package/dist/runtime/run-spec/handoff.js.map +1 -1
- package/dist/runtime/run-spec/types.d.ts +16 -16
- package/dist/runtime/session-registry/types.d.ts +12 -12
- package/dist/runtime/store/artifact-retention.d.ts +2 -0
- package/dist/runtime/store/artifact-retention.d.ts.map +1 -1
- package/dist/runtime/store/artifact-retention.js +24 -21
- package/dist/runtime/store/artifact-retention.js.map +1 -1
- package/dist/runtime/store/budget-store.d.ts +8 -8
- package/dist/runtime/store/evidence-ledger.d.ts.map +1 -1
- package/dist/runtime/store/evidence-ledger.js +39 -1
- package/dist/runtime/store/evidence-ledger.js.map +1 -1
- package/dist/runtime/store/evidence-types.d.ts +118 -118
- package/dist/runtime/store/experiment-queue-store.d.ts +20 -20
- package/dist/runtime/store/postmortem-report.d.ts +2 -2
- package/dist/runtime/store/reproducibility-manifest.d.ts +20 -20
- package/dist/runtime/store/runtime-operation-schemas.d.ts +18 -18
- package/dist/runtime/store/runtime-operation-schemas.d.ts.map +1 -1
- package/dist/runtime/store/runtime-operation-schemas.js +1 -0
- package/dist/runtime/store/runtime-operation-schemas.js.map +1 -1
- package/dist/runtime/store/runtime-schemas.d.ts +58 -28
- package/dist/runtime/store/runtime-schemas.d.ts.map +1 -1
- package/dist/runtime/store/runtime-schemas.js +1 -0
- package/dist/runtime/store/runtime-schemas.js.map +1 -1
- package/dist/tools/execution/MemorySaveTool/MemorySaveTool.d.ts +8 -8
- package/dist/tools/execution/RunAdapterTool/RunAdapterTool.d.ts +6 -0
- package/dist/tools/execution/RunAdapterTool/RunAdapterTool.d.ts.map +1 -1
- package/dist/tools/execution/RunAdapterTool/RunAdapterTool.js +2 -0
- package/dist/tools/execution/RunAdapterTool/RunAdapterTool.js.map +1 -1
- package/dist/tools/execution-orchestrator.d.ts +29 -0
- package/dist/tools/execution-orchestrator.d.ts.map +1 -0
- package/dist/tools/execution-orchestrator.js +153 -0
- package/dist/tools/execution-orchestrator.js.map +1 -0
- package/dist/tools/executor.d.ts +6 -0
- package/dist/tools/executor.d.ts.map +1 -1
- package/dist/tools/executor.js +48 -11
- package/dist/tools/executor.js.map +1 -1
- package/dist/tools/fs/ApplyPatchTool/ApplyPatchTool.d.ts.map +1 -1
- package/dist/tools/fs/ApplyPatchTool/ApplyPatchTool.js +130 -17
- package/dist/tools/fs/ApplyPatchTool/ApplyPatchTool.js.map +1 -1
- package/dist/tools/mutation/TaskStopTool/TaskStopTool.d.ts.map +1 -1
- package/dist/tools/mutation/TaskStopTool/TaskStopTool.js +8 -0
- package/dist/tools/mutation/TaskStopTool/TaskStopTool.js.map +1 -1
- package/dist/tools/mutation/TaskUpdateTool/TaskUpdateTool.d.ts +6 -6
- package/dist/tools/network/GitHubCliTool/GitHubCliTool.d.ts +4 -4
- package/dist/tools/network/McpStdioTool/McpStdioTool.d.ts +4 -4
- package/dist/tools/permission.d.ts +0 -1
- package/dist/tools/permission.d.ts.map +1 -1
- package/dist/tools/permission.js +9 -33
- package/dist/tools/permission.js.map +1 -1
- package/dist/tools/query/CodeReadContextTool/CodeReadContextTool.d.ts +4 -4
- package/dist/tools/query/CodeSearchRepairTool/CodeSearchRepairTool.d.ts +8 -8
- package/dist/tools/query/CodeSearchTool/CodeSearchTool.d.ts +4 -4
- package/dist/tools/query/ConfigTool/ConfigTool.d.ts.map +1 -1
- package/dist/tools/query/ConfigTool/ConfigTool.js +1 -0
- package/dist/tools/query/ConfigTool/ConfigTool.js.map +1 -1
- package/dist/tools/query/MemoryRecallTool/MemoryRecallTool.d.ts +4 -4
- package/dist/tools/query/runtime-session-tools.d.ts +73 -5
- package/dist/tools/query/runtime-session-tools.d.ts.map +1 -1
- package/dist/tools/query/runtime-session-tools.js +114 -0
- package/dist/tools/query/runtime-session-tools.js.map +1 -1
- package/dist/tools/runtime/LongRunningRuntimeTools.d.ts +60 -42
- package/dist/tools/runtime/LongRunningRuntimeTools.d.ts.map +1 -1
- package/dist/tools/runtime/LongRunningRuntimeTools.js +4 -1
- package/dist/tools/runtime/LongRunningRuntimeTools.js.map +1 -1
- package/dist/tools/runtime/RunSpecHandoffTools.d.ts.map +1 -1
- package/dist/tools/runtime/RunSpecHandoffTools.js +162 -2
- package/dist/tools/runtime/RunSpecHandoffTools.js.map +1 -1
- package/dist/tools/runtime/SetupRuntimeControlTools.d.ts.map +1 -1
- package/dist/tools/runtime/SetupRuntimeControlTools.js +169 -17
- package/dist/tools/runtime/SetupRuntimeControlTools.js.map +1 -1
- package/dist/tools/system/GitDiffTool/GitDiffTool.d.ts +4 -4
- package/dist/tools/system/ShellCommandTool/ShellCommandTool.d.ts.map +1 -1
- package/dist/tools/system/ShellCommandTool/ShellCommandTool.js +7 -1
- package/dist/tools/system/ShellCommandTool/ShellCommandTool.js.map +1 -1
- package/dist/tools/system/ShellTool/ShellTool.d.ts.map +1 -1
- package/dist/tools/system/ShellTool/ShellTool.js +25 -11
- package/dist/tools/system/ShellTool/ShellTool.js.map +1 -1
- package/dist/tools/system/ShellTool/command-policy.d.ts +11 -8
- package/dist/tools/system/ShellTool/command-policy.d.ts.map +1 -1
- package/dist/tools/system/ShellTool/command-policy.js +402 -98
- package/dist/tools/system/ShellTool/command-policy.js.map +1 -1
- package/dist/tools/system/TestRunnerTool/TestRunnerTool.d.ts +1 -1
- package/dist/tools/system/TestRunnerTool/TestRunnerTool.d.ts.map +1 -1
- package/dist/tools/system/TestRunnerTool/TestRunnerTool.js +153 -9
- package/dist/tools/system/TestRunnerTool/TestRunnerTool.js.map +1 -1
- package/dist/tools/system/UpdatePlanTool/UpdatePlanTool.js +1 -1
- package/dist/tools/system/UpdatePlanTool/UpdatePlanTool.js.map +1 -1
- package/dist/tools/types.d.ts +34 -12
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/types.js +26 -3
- package/dist/tools/types.js.map +1 -1
- package/dist/tools/workspace-scope.d.ts +11 -0
- package/dist/tools/workspace-scope.d.ts.map +1 -0
- package/dist/tools/workspace-scope.js +77 -0
- package/dist/tools/workspace-scope.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-item.d.ts","sourceRoot":"","sources":["../../../../src/orchestrator/execution/agent-loop/response-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAEtF,eAAO,MAAM,uBAAuB,2CAAyC,CAAC;AAE9E,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;EAK1C,CAAC;AAEH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;EAI9C,CAAC;AAEH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;EAK7C,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;EAInC,CAAC;AAEH,eAAO,MAAM,mBAAmB,qEAI9B,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQvC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;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M,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACpF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,2BAA2B,GACnC,sBAAsB,GACtB,qBAAqB,GACrB,uBAAuB,CAAC;AAE5B,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,EACf,KAAK,CAAC,EAAE,qBAAqB,GAC5B,yBAAyB,CAM3B;AAED,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,MAAM,GAAG,6BAA6B,CAK5F;AAED,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,iBAAiB,GAAG,4BAA4B,CAOlG;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC5C,IAAI,EAAE,4BAA4B,CAAC;IACnC,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,UAAU,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,GAAG,sBAAsB,CASzB"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { ToolResultSchema } from "../../../tools/types.js";
|
|
3
|
+
export const ResponseItemPhaseSchema = z.enum(["commentary", "final_answer"]);
|
|
4
|
+
export const AssistantTextResponseItemSchema = z.object({
|
|
5
|
+
type: z.literal("assistant_text"),
|
|
6
|
+
id: z.string().optional(),
|
|
7
|
+
content: z.string(),
|
|
8
|
+
phase: ResponseItemPhaseSchema.optional(),
|
|
9
|
+
});
|
|
10
|
+
export const ReasoningProgressResponseItemSchema = z.object({
|
|
11
|
+
type: z.literal("reasoning_progress"),
|
|
12
|
+
id: z.string().optional(),
|
|
13
|
+
content: z.string(),
|
|
14
|
+
});
|
|
15
|
+
export const FunctionToolCallResponseItemSchema = z.object({
|
|
16
|
+
type: z.literal("function_tool_call"),
|
|
17
|
+
id: z.string().min(1),
|
|
18
|
+
name: z.string().min(1),
|
|
19
|
+
arguments: z.unknown(),
|
|
20
|
+
});
|
|
21
|
+
export const ToolExecutionStateSchema = z.object({
|
|
22
|
+
status: z.enum(["executed", "not_executed"]),
|
|
23
|
+
reason: z.enum(["approval_denied", "permission_denied", "policy_blocked", "dry_run", "tool_error", "timed_out", "interrupted", "sandbox_required", "escalation_required", "stale_state"]).optional(),
|
|
24
|
+
message: z.string().optional(),
|
|
25
|
+
});
|
|
26
|
+
export const ToolErrorCodeSchema = z.enum([
|
|
27
|
+
"invalid_arguments",
|
|
28
|
+
"not_allowed",
|
|
29
|
+
"execution_failed",
|
|
30
|
+
]);
|
|
31
|
+
export const ToolResultResponseItemSchema = z.object({
|
|
32
|
+
type: z.literal("tool_result"),
|
|
33
|
+
id: z.string().optional(),
|
|
34
|
+
callId: z.string().min(1),
|
|
35
|
+
toolName: z.string().min(1),
|
|
36
|
+
arguments: z.unknown(),
|
|
37
|
+
result: ToolResultSchema,
|
|
38
|
+
durationMs: z.number(),
|
|
39
|
+
});
|
|
40
|
+
export const ToolErrorResponseItemSchema = z.object({
|
|
41
|
+
type: z.literal("tool_error"),
|
|
42
|
+
id: z.string().optional(),
|
|
43
|
+
callId: z.string().min(1),
|
|
44
|
+
toolName: z.string().min(1),
|
|
45
|
+
arguments: z.unknown(),
|
|
46
|
+
error: z.object({
|
|
47
|
+
code: ToolErrorCodeSchema,
|
|
48
|
+
message: z.string(),
|
|
49
|
+
details: z.unknown().optional(),
|
|
50
|
+
}),
|
|
51
|
+
result: ToolResultSchema.optional(),
|
|
52
|
+
execution: ToolExecutionStateSchema.optional(),
|
|
53
|
+
durationMs: z.number(),
|
|
54
|
+
});
|
|
55
|
+
export const UnknownToolResponseItemSchema = z.object({
|
|
56
|
+
type: z.literal("unknown_tool"),
|
|
57
|
+
id: z.string().optional(),
|
|
58
|
+
callId: z.string().min(1),
|
|
59
|
+
toolName: z.string().min(1),
|
|
60
|
+
arguments: z.unknown(),
|
|
61
|
+
message: z.string(),
|
|
62
|
+
execution: ToolExecutionStateSchema,
|
|
63
|
+
durationMs: z.number(),
|
|
64
|
+
});
|
|
65
|
+
export const ResponseItemSchema = z.discriminatedUnion("type", [
|
|
66
|
+
AssistantTextResponseItemSchema,
|
|
67
|
+
ReasoningProgressResponseItemSchema,
|
|
68
|
+
FunctionToolCallResponseItemSchema,
|
|
69
|
+
ToolResultResponseItemSchema,
|
|
70
|
+
ToolErrorResponseItemSchema,
|
|
71
|
+
UnknownToolResponseItemSchema,
|
|
72
|
+
]);
|
|
73
|
+
export function assistantTextResponseItem(content, phase) {
|
|
74
|
+
return {
|
|
75
|
+
type: "assistant_text",
|
|
76
|
+
content,
|
|
77
|
+
...(phase ? { phase } : {}),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
export function reasoningProgressResponseItem(content) {
|
|
81
|
+
return {
|
|
82
|
+
type: "reasoning_progress",
|
|
83
|
+
content,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
export function functionToolCallResponseItem(call) {
|
|
87
|
+
return {
|
|
88
|
+
type: "function_tool_call",
|
|
89
|
+
id: call.id,
|
|
90
|
+
name: call.name,
|
|
91
|
+
arguments: call.input,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
export function toolResultResponseItem(input) {
|
|
95
|
+
return {
|
|
96
|
+
type: "tool_result",
|
|
97
|
+
callId: input.call.id,
|
|
98
|
+
toolName: input.call.name,
|
|
99
|
+
arguments: input.arguments,
|
|
100
|
+
result: input.result,
|
|
101
|
+
durationMs: input.durationMs,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=response-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-item.js","sourceRoot":"","sources":["../../../../src/orchestrator/execution/agent-loop/response-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAI3D,MAA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AC,IAAuB;IAClE,OAAO;QACL,IAAI,EAAE,oBAAoB;QAC1B,EAAE,EAAE,IAAI,CAAC,EAAE;QACX,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,SAAS,EAAE,IAAI,CAAC,KAAK;KACtB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,KAKtC;IACC,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE;QACrB,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI;QACzB,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,UAAU,EAAE,KAAK,CAAC,UAAU;KAC7B,CAAC;AACJ,CAAC"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
import type { Goal } from "../../../base/types/goal.js";
|
|
1
2
|
import type { Task } from "../../../base/types/task.js";
|
|
2
3
|
import type { ToolCallContext } from "../../../tools/types.js";
|
|
3
4
|
import type { AgentLoopBudget } from "./agent-loop-budget.js";
|
|
4
|
-
import type { AgentLoopModelInfo, AgentLoopModelRef } from "./agent-loop-model.js";
|
|
5
|
+
import type { AgentLoopModelInfo, AgentLoopModelRef, AgentLoopReasoningEffort } from "./agent-loop-model.js";
|
|
5
6
|
import type { AgentLoopSession } from "./agent-loop-session.js";
|
|
6
7
|
import type { AgentLoopSessionState } from "./agent-loop-session-state.js";
|
|
7
8
|
import type { AgentLoopToolPolicy, AgentLoopTurnContext } from "./agent-loop-turn-context.js";
|
|
8
9
|
import { type TaskAgentLoopOutput } from "./task-agent-loop-result.js";
|
|
9
|
-
import type { SubagentRole } from "./execution-policy.js";
|
|
10
|
+
import type { ExecutionPolicy, SubagentRole } from "./execution-policy.js";
|
|
10
11
|
export interface TaskAgentLoopContextInput {
|
|
11
12
|
task: Task;
|
|
13
|
+
artifactGoal?: Pick<Goal, "constraints"> | null;
|
|
12
14
|
model: AgentLoopModelRef;
|
|
13
15
|
modelInfo: AgentLoopModelInfo;
|
|
14
16
|
session: AgentLoopSession;
|
|
@@ -23,6 +25,9 @@ export interface TaskAgentLoopContextInput {
|
|
|
23
25
|
resumeState?: AgentLoopSessionState;
|
|
24
26
|
abortSignal?: AbortSignal;
|
|
25
27
|
role?: SubagentRole;
|
|
28
|
+
profileName?: string;
|
|
29
|
+
reasoningEffort?: AgentLoopReasoningEffort;
|
|
30
|
+
executionPolicy?: ExecutionPolicy;
|
|
26
31
|
}
|
|
27
32
|
export declare function buildTaskAgentLoopTurnContext(input: TaskAgentLoopContextInput): AgentLoopTurnContext<TaskAgentLoopOutput>;
|
|
28
33
|
//# sourceMappingURL=task-agent-loop-context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-agent-loop-context.d.ts","sourceRoot":"","sources":["../../../../src/orchestrator/execution/agent-loop/task-agent-loop-context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"task-agent-loop-context.d.ts","sourceRoot":"","sources":["../../../../src/orchestrator/execution/agent-loop/task-agent-loop-context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,wBAAwB,E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C,CAkG3C"}
|
|
@@ -4,8 +4,16 @@ import { withDefaultBudget } from "./agent-loop-turn-context.js";
|
|
|
4
4
|
import { TaskAgentLoopOutputSchema } from "./task-agent-loop-result.js";
|
|
5
5
|
import { buildAgentLoopBaseInstructions } from "./agent-loop-prompts.js";
|
|
6
6
|
import { isTaskRelevantVerificationCommand } from "./task-agent-loop-verification.js";
|
|
7
|
+
import { verifyTaskArtifactContract } from "../task/task-artifact-contract.js";
|
|
7
8
|
export function buildTaskAgentLoopTurnContext(input) {
|
|
8
9
|
const cwd = input.cwd ?? processCwd();
|
|
10
|
+
const executionPolicy = input.toolCallContext?.executionPolicy ?? input.executionPolicy;
|
|
11
|
+
const verificationPlan = {
|
|
12
|
+
requiredCommands: input.task.success_criteria
|
|
13
|
+
.filter((criterion) => criterion.is_blocking)
|
|
14
|
+
.map((criterion) => criterion.verification_method.trim())
|
|
15
|
+
.filter(Boolean),
|
|
16
|
+
};
|
|
9
17
|
const baseSystemPrompt = buildAgentLoopBaseInstructions({
|
|
10
18
|
mode: "task",
|
|
11
19
|
extraRules: [
|
|
@@ -28,9 +36,12 @@ export function buildTaskAgentLoopTurnContext(input) {
|
|
|
28
36
|
turnId: randomUUID(),
|
|
29
37
|
goalId: input.task.goal_id,
|
|
30
38
|
taskId: input.task.id,
|
|
39
|
+
...(input.profileName ? { profileName: input.profileName } : {}),
|
|
31
40
|
cwd,
|
|
32
41
|
model: input.model,
|
|
33
42
|
modelInfo: input.modelInfo,
|
|
43
|
+
...(input.reasoningEffort ? { reasoningEffort: input.reasoningEffort } : {}),
|
|
44
|
+
...(executionPolicy ? { executionPolicy } : {}),
|
|
34
45
|
messages: [
|
|
35
46
|
{
|
|
36
47
|
role: "system",
|
|
@@ -41,7 +52,8 @@ export function buildTaskAgentLoopTurnContext(input) {
|
|
|
41
52
|
outputSchema: TaskAgentLoopOutputSchema,
|
|
42
53
|
budget: withDefaultBudget(input.budget),
|
|
43
54
|
toolPolicy: input.toolPolicy ?? {},
|
|
44
|
-
|
|
55
|
+
verificationPlan,
|
|
56
|
+
completionValidator: async ({ output, changedFiles, commandResults }) => {
|
|
45
57
|
if (output.status !== "done")
|
|
46
58
|
return { ok: true, reasons: [] };
|
|
47
59
|
const reasons = [];
|
|
@@ -61,6 +73,12 @@ export function buildTaskAgentLoopTurnContext(input) {
|
|
|
61
73
|
if (claimedChangedFiles.length > 0 && runtimeVerifiedCommands.length < 1) {
|
|
62
74
|
reasons.push(`You claimed changed files (${claimedChangedFiles.slice(0, 5).join(", ")}) but no successful runtime verification command was observed.`);
|
|
63
75
|
}
|
|
76
|
+
const artifactVerification = await verifyTaskArtifactContract(input.task, cwd, {
|
|
77
|
+
goal: input.artifactGoal,
|
|
78
|
+
});
|
|
79
|
+
if (artifactVerification.applicable && !artifactVerification.passed) {
|
|
80
|
+
reasons.push(artifactVerification.description);
|
|
81
|
+
}
|
|
64
82
|
return {
|
|
65
83
|
ok: reasons.length === 0,
|
|
66
84
|
reasons,
|
|
@@ -72,6 +90,7 @@ export function buildTaskAgentLoopTurnContext(input) {
|
|
|
72
90
|
trustBalance: 0,
|
|
73
91
|
preApproved: true,
|
|
74
92
|
approvalFn: async () => false,
|
|
93
|
+
...(executionPolicy ? { executionPolicy } : {}),
|
|
75
94
|
agentRole: input.role,
|
|
76
95
|
...input.toolCallContext,
|
|
77
96
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-agent-loop-context.js","sourceRoot":"","sources":["../../../../src/orchestrator/execution/agent-loop/task-agent-loop-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,GAAG,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"task-agent-loop-context.js","sourceRoot":"","sources":["../../../../src/orchestrator/execution/agent-loop/task-agent-loop-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;A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AChE,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACjE,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import type { AgentResult } from "../adapter-layer.js";
|
|
3
|
-
import type { AgentLoopResult } from "./agent-loop-result.js";
|
|
3
|
+
import type { AgentLoopResult, AgentLoopWorkspaceInfo } from "./agent-loop-result.js";
|
|
4
4
|
export declare const TaskAgentLoopOutputSchema: z.ZodObject<{
|
|
5
5
|
status: z.ZodEnum<["done", "blocked", "partial", "failed"]>;
|
|
6
6
|
finalAnswer: z.ZodString;
|
|
@@ -23,7 +23,7 @@ export declare const TaskAgentLoopOutputSchema: z.ZodObject<{
|
|
|
23
23
|
verificationHints: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
24
24
|
blockers: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
25
25
|
}, "strip", z.ZodTypeAny, {
|
|
26
|
-
status: "partial" | "
|
|
26
|
+
status: "partial" | "blocked" | "failed" | "done";
|
|
27
27
|
summary: string;
|
|
28
28
|
filesChanged: string[];
|
|
29
29
|
blockers: string[];
|
|
@@ -36,7 +36,7 @@ export declare const TaskAgentLoopOutputSchema: z.ZodObject<{
|
|
|
36
36
|
outputSummary: string;
|
|
37
37
|
}[];
|
|
38
38
|
}, {
|
|
39
|
-
status: "partial" | "
|
|
39
|
+
status: "partial" | "blocked" | "failed" | "done";
|
|
40
40
|
finalAnswer: string;
|
|
41
41
|
summary?: string | undefined;
|
|
42
42
|
filesChanged?: string[] | undefined;
|
|
@@ -50,5 +50,7 @@ export declare const TaskAgentLoopOutputSchema: z.ZodObject<{
|
|
|
50
50
|
}[] | undefined;
|
|
51
51
|
}>;
|
|
52
52
|
export type TaskAgentLoopOutput = z.infer<typeof TaskAgentLoopOutputSchema>;
|
|
53
|
+
export declare function requiresIsolatedWorkspaceHandoff(workspace: Pick<AgentLoopWorkspaceInfo, "isolated" | "disposition"> | undefined): boolean;
|
|
54
|
+
export declare function collectTaskAgentLoopNotExecutedBlockers(result: AgentLoopResult<TaskAgentLoopOutput>): string[];
|
|
53
55
|
export declare function taskAgentLoopResultToAgentResult(result: AgentLoopResult<TaskAgentLoopOutput>): AgentResult;
|
|
54
56
|
//# sourceMappingURL=task-agent-loop-result.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-agent-loop-result.d.ts","sourceRoot":"","sources":["../../../../src/orchestrator/execution/agent-loop/task-agent-loop-result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"task-agent-loop-result.d.ts","sourceRoot":"","sources":["../../../../src/orchestrator/execution/agent-loop/task-agent-loop-result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAEtF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAapC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AA4C5E,wBAAgB,gCAAgC,CAC9C,SAAS,EAAE,IAAI,CAAC,sBAAsB,EAAE,UAAU,GAAG,aAAa,CAAC,GAAG,SAAS,GAC9E,OAAO,CAET;AAUD,wBAAgB,uCAAuC,CACrD,MAAM,EAAE,eAAe,CAAC,mBAAmB,CAAC,GAC3C,MAAM,EAAE,CAgDV;AAED,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,eAAe,CAAC,mBAAmB,CAAC,GAC3C,WAAW,CA8Eb"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import * as path from "node:path";
|
|
2
3
|
export const TaskAgentLoopOutputSchema = z.object({
|
|
3
4
|
status: z.enum(["done", "blocked", "partial", "failed"]),
|
|
4
5
|
finalAnswer: z.string(),
|
|
@@ -13,28 +14,123 @@ export const TaskAgentLoopOutputSchema = z.object({
|
|
|
13
14
|
verificationHints: z.array(z.string()).default([]),
|
|
14
15
|
blockers: z.array(z.string()).default([]),
|
|
15
16
|
});
|
|
17
|
+
function isSafeRelativeArtifact(filePath) {
|
|
18
|
+
const trimmed = filePath.trim();
|
|
19
|
+
if (!trimmed || trimmed.includes("\0") || path.isAbsolute(trimmed))
|
|
20
|
+
return false;
|
|
21
|
+
const segments = trimmed.replace(/\\/g, "/").split("/");
|
|
22
|
+
return !segments.includes("..");
|
|
23
|
+
}
|
|
24
|
+
function collectAgentLoopChangedPaths(result) {
|
|
25
|
+
const applyPatchArtifactPaths = (result.toolResults ?? []).flatMap((entry) => {
|
|
26
|
+
if (!entry.success || entry.toolName !== "apply_patch" || entry.checkOnly === true)
|
|
27
|
+
return [];
|
|
28
|
+
return (entry.artifacts ?? []).map((artifact) => artifact.trim()).filter(isSafeRelativeArtifact);
|
|
29
|
+
});
|
|
30
|
+
return [
|
|
31
|
+
...new Set([
|
|
32
|
+
...(result.output?.filesChanged ?? []),
|
|
33
|
+
...result.changedFiles,
|
|
34
|
+
...applyPatchArtifactPaths,
|
|
35
|
+
]),
|
|
36
|
+
];
|
|
37
|
+
}
|
|
38
|
+
function isBlockingNotExecutedReason(reason) {
|
|
39
|
+
return reason !== "dry_run";
|
|
40
|
+
}
|
|
41
|
+
function formatNotExecutedDetail(input) {
|
|
42
|
+
const reason = input.reason ? ` (${input.reason})` : "";
|
|
43
|
+
const command = input.command ? `: ${input.command}` : "";
|
|
44
|
+
const cwd = input.cwd ? ` in ${input.cwd}` : "";
|
|
45
|
+
const message = input.message?.trim() ? `. ${input.message.trim()}` : "";
|
|
46
|
+
return `${input.kind} ${input.name} was not executed${reason}${cwd}${command}${message}`;
|
|
47
|
+
}
|
|
48
|
+
export function requiresIsolatedWorkspaceHandoff(workspace) {
|
|
49
|
+
return workspace?.isolated === true && workspace.disposition === "handoff_required";
|
|
50
|
+
}
|
|
51
|
+
function formatIsolatedWorkspaceHandoffBlocker(workspace) {
|
|
52
|
+
return `Isolated agent loop worktree has unintegrated changes; completion requires operator handoff: ${workspace.executionCwd}`;
|
|
53
|
+
}
|
|
54
|
+
function entrySequence(entry, fallbackIndex) {
|
|
55
|
+
return entry.sequence ?? fallbackIndex;
|
|
56
|
+
}
|
|
57
|
+
export function collectTaskAgentLoopNotExecutedBlockers(result) {
|
|
58
|
+
const toolResults = result.toolResults ?? [];
|
|
59
|
+
const lastSuccessfulSequence = Math.max(-1, ...result.commandResults
|
|
60
|
+
.map((entry, index) => ({ entry, index }))
|
|
61
|
+
.filter(({ entry }) => entry.success)
|
|
62
|
+
.map(({ entry, index }) => entrySequence(entry, index)), ...toolResults
|
|
63
|
+
.map((entry, index) => ({ entry, index }))
|
|
64
|
+
.filter(({ entry }) => entry.success)
|
|
65
|
+
.map(({ entry, index }) => entrySequence(entry, index)));
|
|
66
|
+
const commandBlockers = result.commandResults
|
|
67
|
+
.map((entry, index) => ({ entry, index }))
|
|
68
|
+
.filter(({ entry, index }) => entrySequence(entry, index) > lastSuccessfulSequence
|
|
69
|
+
&& entry.execution?.status === "not_executed"
|
|
70
|
+
&& isBlockingNotExecutedReason(entry.execution.reason))
|
|
71
|
+
.map(({ entry }) => formatNotExecutedDetail({
|
|
72
|
+
kind: "Command",
|
|
73
|
+
name: entry.toolName,
|
|
74
|
+
reason: entry.execution?.reason,
|
|
75
|
+
message: entry.execution?.message || entry.outputSummary,
|
|
76
|
+
command: entry.command,
|
|
77
|
+
cwd: entry.cwd,
|
|
78
|
+
}));
|
|
79
|
+
const commandToolNames = new Set(result.commandResults
|
|
80
|
+
.filter((entry) => entry.execution?.status === "not_executed")
|
|
81
|
+
.map((entry) => entry.toolName));
|
|
82
|
+
const toolBlockers = toolResults
|
|
83
|
+
.map((entry, index) => ({ entry, index }))
|
|
84
|
+
.filter(({ entry, index }) => entrySequence(entry, index) > lastSuccessfulSequence
|
|
85
|
+
&& entry.execution?.status === "not_executed"
|
|
86
|
+
&& isBlockingNotExecutedReason(entry.execution.reason)
|
|
87
|
+
&& !commandToolNames.has(entry.toolName))
|
|
88
|
+
.map(({ entry }) => formatNotExecutedDetail({
|
|
89
|
+
kind: "Tool",
|
|
90
|
+
name: entry.toolName,
|
|
91
|
+
reason: entry.execution?.reason,
|
|
92
|
+
message: entry.execution?.message || entry.outputSummary,
|
|
93
|
+
}));
|
|
94
|
+
return [...new Set([...commandBlockers, ...toolBlockers])];
|
|
95
|
+
}
|
|
16
96
|
export function taskAgentLoopResultToAgentResult(result) {
|
|
17
|
-
const
|
|
97
|
+
const notExecutedBlockers = collectTaskAgentLoopNotExecutedBlockers(result);
|
|
98
|
+
const workspaceHandoffBlockers = requiresIsolatedWorkspaceHandoff(result.workspace)
|
|
99
|
+
? [formatIsolatedWorkspaceHandoffBlocker(result.workspace)]
|
|
100
|
+
: [];
|
|
101
|
+
const blockers = [
|
|
102
|
+
...(result.output?.blockers ?? []),
|
|
103
|
+
...notExecutedBlockers,
|
|
104
|
+
...workspaceHandoffBlockers,
|
|
105
|
+
];
|
|
106
|
+
const done = result.success && result.output?.status === "done" && blockers.length === 0;
|
|
107
|
+
const blocked = result.success && result.output?.status === "blocked";
|
|
18
108
|
const runtimeVerificationCommands = result.commandResults.filter((command) => command.evidenceEligible && command.relevantToTask !== false);
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
?? result.stopReason
|
|
109
|
+
const filesChangedPaths = collectAgentLoopChangedPaths(result);
|
|
110
|
+
const blockerOutput = blockers.join("; ");
|
|
111
|
+
const fallbackOutput = done
|
|
112
|
+
? result.output?.finalAnswer ?? result.finalText ?? result.stopReason
|
|
113
|
+
: blockerOutput || result.output?.finalAnswer || result.finalText || result.stopReason;
|
|
23
114
|
return {
|
|
24
115
|
success: done,
|
|
25
116
|
output: fallbackOutput,
|
|
26
|
-
error: done ? null :
|
|
117
|
+
error: done ? null : blockerOutput || result.finalText || result.stopReason,
|
|
118
|
+
structuredOutput: result.output ?? undefined,
|
|
27
119
|
exit_code: null,
|
|
28
120
|
elapsed_ms: result.elapsedMs,
|
|
29
121
|
stopped_reason: result.stopReason === "timeout" ? "timeout" :
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
122
|
+
result.stopReason === "cancelled" ? "cancelled" :
|
|
123
|
+
blocked ? "blocked" :
|
|
124
|
+
done ? "completed" : "error",
|
|
125
|
+
filesChanged: filesChangedPaths.length > 0 || Boolean(result.filesChanged),
|
|
126
|
+
filesChangedPaths,
|
|
33
127
|
agentLoop: {
|
|
34
128
|
traceId: result.traceId,
|
|
35
129
|
sessionId: result.sessionId,
|
|
36
130
|
turnId: result.turnId,
|
|
37
131
|
stopReason: result.stopReason,
|
|
132
|
+
...(result.failureReason ? { failureReason: result.failureReason } : {}),
|
|
133
|
+
...(result.failureDetail ? { failureDetail: result.failureDetail } : {}),
|
|
38
134
|
modelTurns: result.modelTurns,
|
|
39
135
|
toolCalls: result.toolCalls,
|
|
40
136
|
usage: result.usage,
|
|
@@ -48,8 +144,10 @@ export function taskAgentLoopResultToAgentResult(result) {
|
|
|
48
144
|
verificationHints: [
|
|
49
145
|
...(result.output?.verificationHints ?? []),
|
|
50
146
|
...runtimeVerificationCommands.filter((command) => !command.success).map((command) => `failed command: ${command.command}`),
|
|
147
|
+
...notExecutedBlockers,
|
|
148
|
+
...workspaceHandoffBlockers,
|
|
51
149
|
],
|
|
52
|
-
filesChangedPaths
|
|
150
|
+
filesChangedPaths,
|
|
53
151
|
...(result.workspace
|
|
54
152
|
? {
|
|
55
153
|
requestedCwd: result.workspace.requestedCwd,
|
|
@@ -57,6 +155,8 @@ export function taskAgentLoopResultToAgentResult(result) {
|
|
|
57
155
|
isolatedWorkspace: result.workspace.isolated,
|
|
58
156
|
workspaceCleanupStatus: result.workspace.cleanupStatus,
|
|
59
157
|
workspaceCleanupReason: result.workspace.cleanupReason,
|
|
158
|
+
workspaceDirty: result.workspace.dirty,
|
|
159
|
+
workspaceDisposition: result.workspace.disposition,
|
|
60
160
|
}
|
|
61
161
|
: {}),
|
|
62
162
|
...(result.executionPolicy
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-agent-loop-result.js","sourceRoot":"","sources":["../../../../src/orchestrator/execution/agent-loop/task-agent-loop-result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"task-agent-loop-result.js","sourceRoot":"","sources":["../../../../src/orchestrator/execution/agent-loop/task-agent-loop-result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAIlC,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IACxD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC/B,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7C,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;QACzB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;QACnB,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE;QACnB,aAAa,EAAE,CAAC,CAAC,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AAY,EAAE,MAAM,CAAC,SAAS,CAAC,YAAY;oBAC3C,iBAAiB,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ;oBAC5C,sBAAsB,EAAE,MAAM,CAAC,SAAS,CAAC,aAAa;oBACtD,sBAAsB,EAAE,MAAM,CAAC,SAAS,CAAC,aAAa;oBACtD,cAAc,EAAE,MAAM,CAAC,SAAS,CAAC,KAAK;oBACtC,oBAAoB,EAAE,MAAM,CAAC,SAAS,CAAC,WAAW;iBACnD;gBACH,CAAC,CAAC,EAAE,CAAC;YACP,GAAG,CAAC,MAAM,CAAC,eAAe;gBACxB,CAAC,CAAC;oBACE,WAAW,EAAE,MAAM,CAAC,eAAe,CAAC,WAAW;oBAC/C,cAAc,EAAE,MAAM,CAAC,eAAe,CAAC,cAAc;oBACrD,aAAa,EAAE,MAAM,CAAC,eAAe,CAAC,aAAa;iBACpD;gBACH,CAAC,CAAC,EAAE,CAAC;SACR;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Task } from "../../../base/types/task.js";
|
|
2
|
+
import type { Goal } from "../../../base/types/goal.js";
|
|
2
3
|
import type { AgentResult } from "../adapter-layer.js";
|
|
3
4
|
import type { AgentLoopBudget } from "./agent-loop-budget.js";
|
|
4
5
|
import type { AgentLoopModelClient, AgentLoopModelRef, AgentLoopModelRegistry, AgentLoopReasoningEffort } from "./agent-loop-model.js";
|
|
@@ -33,6 +34,7 @@ export interface TaskAgentLoopRunnerDeps {
|
|
|
33
34
|
}
|
|
34
35
|
export interface TaskAgentLoopRunInput {
|
|
35
36
|
task: Task;
|
|
37
|
+
artifactGoal?: Pick<Goal, "constraints"> | null;
|
|
36
38
|
workspaceContext?: string;
|
|
37
39
|
knowledgeContext?: string;
|
|
38
40
|
model?: AgentLoopModelRef;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-agent-loop-runner.d.ts","sourceRoot":"","sources":["../../../../src/orchestrator/execution/agent-loop/task-agent-loop-runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAA0B,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACxF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,KAAK,iBAAiB,EAAE,KAAK,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAE/H,OAAO,
|
|
1
|
+
{"version":3,"file":"task-agent-loop-runner.d.ts","sourceRoot":"","sources":["../../../../src/orchestrator/execution/agent-loop/task-agent-loop-runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAA0B,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACxF,OAAO,KAAK,EAAE,eAAe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B,CAAC;CAC7D;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,CAAC,EAAE,IAAI,CAAC,IAAI,EAAE,aAAa,CAAC,GAAG,IAAI,CAAC;IAChD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAClC,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC,cAAc,CAAC,EAAE,uBAAuB,CAAC;IACzC,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAED,qBAAa,mBAAmB;IAClB,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,uBAAuB;IAEpD,OAAO,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC;IAiFpF,oBAAoB,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,WAAW,CAAC;CAG/E"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createAgentLoopSession } from "./agent-loop-session.js";
|
|
2
2
|
import { AgentLoopContextAssembler } from "./agent-loop-context-assembler.js";
|
|
3
3
|
import { buildTaskAgentLoopTurnContext } from "./task-agent-loop-context.js";
|
|
4
|
-
import { taskAgentLoopResultToAgentResult, } from "./task-agent-loop-result.js";
|
|
4
|
+
import { collectTaskAgentLoopNotExecutedBlockers, taskAgentLoopResultToAgentResult, } from "./task-agent-loop-result.js";
|
|
5
5
|
import { isTaskRelevantVerificationCommand } from "./task-agent-loop-verification.js";
|
|
6
6
|
import { prepareTaskAgentLoopWorkspace, } from "./task-agent-loop-worktree.js";
|
|
7
7
|
export class TaskAgentLoopRunner {
|
|
@@ -24,16 +24,19 @@ export class TaskAgentLoopRunner {
|
|
|
24
24
|
let finalResult = null;
|
|
25
25
|
let runError = null;
|
|
26
26
|
try {
|
|
27
|
+
const executionPolicy = this.deps.defaultToolCallContext?.executionPolicy
|
|
28
|
+
?? this.deps.defaultExecutionPolicy;
|
|
27
29
|
const assembled = await contextAssembler.assembleTask({
|
|
28
30
|
task: input.task,
|
|
29
31
|
workspaceContext: input.workspaceContext,
|
|
30
32
|
knowledgeContext: input.knowledgeContext,
|
|
31
33
|
cwd: workspace.executionCwd,
|
|
32
34
|
soilPrefetch: this.deps.soilPrefetch,
|
|
33
|
-
trustProjectInstructions:
|
|
35
|
+
trustProjectInstructions: executionPolicy?.trustProjectInstructions,
|
|
34
36
|
});
|
|
35
37
|
const turn = buildTaskAgentLoopTurnContext({
|
|
36
38
|
task: input.task,
|
|
39
|
+
artifactGoal: input.artifactGoal,
|
|
37
40
|
model,
|
|
38
41
|
modelInfo,
|
|
39
42
|
session,
|
|
@@ -47,14 +50,15 @@ export class TaskAgentLoopRunner {
|
|
|
47
50
|
toolCallContext: this.deps.defaultToolCallContext,
|
|
48
51
|
...(this.deps.defaultProfileName ? { profileName: this.deps.defaultProfileName } : {}),
|
|
49
52
|
...(this.deps.defaultReasoningEffort ? { reasoningEffort: this.deps.defaultReasoningEffort } : {}),
|
|
50
|
-
...(
|
|
53
|
+
...(executionPolicy ? { executionPolicy } : {}),
|
|
51
54
|
...(input.resumeState ? { resumeState: input.resumeState } : {}),
|
|
52
55
|
abortSignal: input.abortSignal,
|
|
53
56
|
role: input.role,
|
|
54
57
|
});
|
|
55
58
|
const result = await this.deps.boundedRunner.run(turn);
|
|
59
|
+
const success = result.success && collectTaskAgentLoopNotExecutedBlockers(result).length === 0;
|
|
56
60
|
finalizationInput = {
|
|
57
|
-
success
|
|
61
|
+
success,
|
|
58
62
|
changedFiles: result.changedFiles,
|
|
59
63
|
};
|
|
60
64
|
const commandResults = result.commandResults.map((commandResult) => ({
|
|
@@ -63,6 +67,7 @@ export class TaskAgentLoopRunner {
|
|
|
63
67
|
}));
|
|
64
68
|
finalResult = {
|
|
65
69
|
...result,
|
|
70
|
+
success,
|
|
66
71
|
commandResults,
|
|
67
72
|
};
|
|
68
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-agent-loop-runner.js","sourceRoot":"","sources":["../../../../src/orchestrator/execution/agent-loop/task-agent-loop-runner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"task-agent-loop-runner.js","sourceRoot":"","sources":["../../../../src/orchestrator/execution/agent-loop/task-agent-loop-runner.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,sBAAsB,EAAyB,MAAM,yBAAyB,CAAC;AAGxF,OAAO,EAAE,yBAAyB,EAAmD,MAAM,mCAAmC,CAAC;AAC/H,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EACL,uCAAuC,EACvC,gCAAgC,GAEjC,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAAE,iCAAiC,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,EACL,6BAA6B,GAE9B,MAAM,+BAA+B,CAAC;AAqCvC,MAAM,OAAO,mBAAmB;IACD;IAA7B,YAA6B,IAA6B;QAA7B,SAAI,GAAJ,IAAI,CAAyB;IAAG,CAAC;IAE9D,KAAK,CAAC,OAAO,CAAC,KAA4B;QACxC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,MAAM,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC;QACpG,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QAClE,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,EAAE,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AAM,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;YAC/F,iBAAiB,GAAG;gBAClB,OAAO;gBACP,YAAY,EAAE,MAAM,CAAC,YAAY;aAClC,CAAC;YACF,MAAM,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;gBACnE,GAAG,aAAa;gBAChB,cAAc,EAAE,iCAAiC,CAAC,KAAK,CAAC,IAAI,EAAE,aAAa,CAAC;aAC7E,CAAC,CAAC,CAAC;YACJ,WAAW,GAAG;gBACZ,GAAG,MAAM;gBACT,OAAO;gBACP,cAAc;aACf,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,QAAQ,GAAG,KAAK,CAAC;QACnB,CAAC;QACD,IAAI,gBAAoD,CAAC;QACzD,IAAI,CAAC;YACH,gBAAgB,GAAG,MAAM,SAAS,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;QACjE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACd,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;QACD,IAAI,QAAQ,EAAE,CAAC;YACb,MAAM,QAAQ,CAAC;QACjB,CAAC;QACD,OAAO;YACL,GAAG,WAAY;YACf,SAAS,EAAE,gBAAgB;SAC5B,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,oBAAoB,CAAC,KAA4B;QACrD,OAAO,gCAAgC,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IACrE,CAAC;CACF"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Task } from "../../../base/types/task.js";
|
|
2
2
|
import type { AgentLoopCommandResult } from "./agent-loop-result.js";
|
|
3
|
-
export declare function isMechanicalVerificationMethod(method: string): boolean;
|
|
4
3
|
export declare function isTaskRelevantVerificationCommand(task: Task, commandResult: AgentLoopCommandResult): boolean;
|
|
5
4
|
//# sourceMappingURL=task-agent-loop-verification.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-agent-loop-verification.d.ts","sourceRoot":"","sources":["../../../../src/orchestrator/execution/agent-loop/task-agent-loop-verification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"task-agent-loop-verification.d.ts","sourceRoot":"","sources":["../../../../src/orchestrator/execution/agent-loop/task-agent-loop-verification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAErE,wBAAgB,iCAAiC,CAC/C,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,sBAAsB,GACpC,OAAO,CAcT"}
|