@evalops/maestro 0.10.50 → 0.10.51
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/agent/agent-outcome.d.ts +54 -0
- package/dist/agent/agent-outcome.d.ts.map +1 -0
- package/dist/agent/agent-outcome.js +142 -0
- package/dist/agent/agent-outcome.js.map +1 -0
- package/dist/agent/agent-resume.d.ts.map +1 -1
- package/dist/agent/agent-resume.js +3 -3
- package/dist/agent/agent-resume.js.map +1 -1
- package/dist/agent/agent-run-summary.d.ts +37 -0
- package/dist/agent/agent-run-summary.d.ts.map +1 -0
- package/dist/agent/agent-run-summary.js +15 -0
- package/dist/agent/agent-run-summary.js.map +1 -0
- package/dist/agent/agent-work-board.d.ts +82 -0
- package/dist/agent/agent-work-board.d.ts.map +1 -0
- package/dist/agent/agent-work-board.js +312 -0
- package/dist/agent/agent-work-board.js.map +1 -0
- package/dist/agent/auto-compaction.d.ts +7 -2
- package/dist/agent/auto-compaction.d.ts.map +1 -1
- package/dist/agent/auto-compaction.js +23 -10
- package/dist/agent/auto-compaction.js.map +1 -1
- package/dist/agent/mission-artifacts.d.ts +62 -0
- package/dist/agent/mission-artifacts.d.ts.map +1 -0
- package/dist/agent/mission-artifacts.js +438 -0
- package/dist/agent/mission-artifacts.js.map +1 -0
- package/dist/agent/mission-manifest.d.ts +139 -3
- package/dist/agent/mission-manifest.d.ts.map +1 -1
- package/dist/agent/mission-manifest.js +549 -3
- package/dist/agent/mission-manifest.js.map +1 -1
- package/dist/agent/mission-store.d.ts +80 -0
- package/dist/agent/mission-store.d.ts.map +1 -0
- package/dist/agent/mission-store.js +603 -0
- package/dist/agent/mission-store.js.map +1 -0
- package/dist/agent/modes.d.ts +2 -2
- package/dist/agent/modes.d.ts.map +1 -1
- package/dist/agent/modes.js +10 -3
- package/dist/agent/modes.js.map +1 -1
- package/dist/agent/providers/codex-app-server.d.ts.map +1 -1
- package/dist/agent/providers/codex-app-server.js +1 -3
- package/dist/agent/providers/codex-app-server.js.map +1 -1
- package/dist/agent/providers/google-gemini-cli.js +203 -107
- package/dist/agent/providers/google.js +100 -41
- package/dist/agent/providers/scripted.d.ts.map +1 -1
- package/dist/agent/providers/scripted.js +1 -3
- package/dist/agent/providers/scripted.js.map +1 -1
- package/dist/agent/providers/validation.d.ts.map +1 -1
- package/dist/agent/providers/validation.js +1 -3
- package/dist/agent/providers/validation.js.map +1 -1
- package/dist/agent/providers/vertex.js +203 -107
- package/dist/agent/snapshot-store.d.ts +32 -0
- package/dist/agent/snapshot-store.d.ts.map +1 -0
- package/dist/agent/snapshot-store.js +195 -0
- package/dist/agent/snapshot-store.js.map +1 -0
- package/dist/agent/specialist-profiles.d.ts +36 -0
- package/dist/agent/specialist-profiles.d.ts.map +1 -0
- package/dist/agent/specialist-profiles.js +159 -0
- package/dist/agent/specialist-profiles.js.map +1 -0
- package/dist/agent/subagent-specs.d.ts +4 -1
- package/dist/agent/subagent-specs.d.ts.map +1 -1
- package/dist/agent/subagent-specs.js +81 -8
- package/dist/agent/subagent-specs.js.map +1 -1
- package/dist/agent/swarm/coverage-gate.d.ts +37 -0
- package/dist/agent/swarm/coverage-gate.d.ts.map +1 -0
- package/dist/agent/swarm/coverage-gate.js +48 -0
- package/dist/agent/swarm/coverage-gate.js.map +1 -0
- package/dist/agent/swarm/executor.d.ts +1 -0
- package/dist/agent/swarm/executor.d.ts.map +1 -1
- package/dist/agent/swarm/executor.js +151 -15
- package/dist/agent/swarm/executor.js.map +1 -1
- package/dist/agent/swarm/orchestrator-prompt.d.ts +25 -0
- package/dist/agent/swarm/orchestrator-prompt.d.ts.map +1 -0
- package/dist/agent/swarm/orchestrator-prompt.js +48 -0
- package/dist/agent/swarm/orchestrator-prompt.js.map +1 -0
- package/dist/agent/swarm/plan-parser.d.ts.map +1 -1
- package/dist/agent/swarm/plan-parser.js +27 -2
- package/dist/agent/swarm/plan-parser.js.map +1 -1
- package/dist/agent/swarm/types.d.ts +17 -0
- package/dist/agent/swarm/types.d.ts.map +1 -1
- package/dist/agent/swarm/types.js.map +1 -1
- package/dist/agent/swarm/validation-directive.d.ts +21 -0
- package/dist/agent/swarm/validation-directive.d.ts.map +1 -0
- package/dist/agent/swarm/validation-directive.js +25 -0
- package/dist/agent/swarm/validation-directive.js.map +1 -0
- package/dist/agent/transport/tool-execution-bridge.d.ts.map +1 -1
- package/dist/agent/transport/tool-execution-bridge.js +4 -1
- package/dist/agent/transport/tool-execution-bridge.js.map +1 -1
- package/dist/api/enterprise-routes.d.ts.map +1 -1
- package/dist/api/enterprise-routes.js +87 -10
- package/dist/api/enterprise-routes.js.map +1 -1
- package/dist/api/org-settings-merge.d.ts +12 -0
- package/dist/api/org-settings-merge.d.ts.map +1 -0
- package/dist/api/org-settings-merge.js +38 -0
- package/dist/api/org-settings-merge.js.map +1 -0
- package/dist/api/user-settings-merge.d.ts +16 -0
- package/dist/api/user-settings-merge.d.ts.map +1 -0
- package/dist/api/user-settings-merge.js +37 -0
- package/dist/api/user-settings-merge.js.map +1 -0
- package/dist/app-server/daemon-lifecycle-api.d.ts.map +1 -1
- package/dist/app-server/daemon-lifecycle-api.js +1 -3
- package/dist/app-server/daemon-lifecycle-api.js.map +1 -1
- package/dist/app-server/external-agent-import-api.d.ts.map +1 -1
- package/dist/app-server/external-agent-import-api.js +1 -3
- package/dist/app-server/external-agent-import-api.js.map +1 -1
- package/dist/app-server/network-governance-api.d.ts.map +1 -1
- package/dist/app-server/network-governance-api.js +1 -3
- package/dist/app-server/network-governance-api.js.map +1 -1
- package/dist/app-server/plugin-bundle-api.d.ts.map +1 -1
- package/dist/app-server/plugin-bundle-api.js +1 -3
- package/dist/app-server/plugin-bundle-api.js.map +1 -1
- package/dist/app-server/policy-control-api.d.ts.map +1 -1
- package/dist/app-server/policy-control-api.js +1 -3
- package/dist/app-server/policy-control-api.js.map +1 -1
- package/dist/app-server/protocol-modes-api.d.ts.map +1 -1
- package/dist/app-server/protocol-modes-api.js +1 -3
- package/dist/app-server/protocol-modes-api.js.map +1 -1
- package/dist/cli/args.d.ts +2 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +15 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/commands/a2a.d.ts.map +1 -1
- package/dist/cli/commands/a2a.js +1 -3
- package/dist/cli/commands/a2a.js.map +1 -1
- package/dist/cli/commands/agents.d.ts +4 -0
- package/dist/cli/commands/agents.d.ts.map +1 -1
- package/dist/cli/commands/agents.js +149 -0
- package/dist/cli/commands/agents.js.map +1 -1
- package/dist/cli/commands/mission.d.ts +4 -0
- package/dist/cli/commands/mission.d.ts.map +1 -0
- package/dist/cli/commands/mission.js +196 -0
- package/dist/cli/commands/mission.js.map +1 -0
- package/dist/cli/commands/value.d.ts +10 -0
- package/dist/cli/commands/value.d.ts.map +1 -0
- package/dist/cli/commands/value.js +33 -0
- package/dist/cli/commands/value.js.map +1 -0
- package/dist/cli/headless-protocol.d.ts.map +1 -1
- package/dist/cli/headless-protocol.js +1 -3
- package/dist/cli/headless-protocol.js.map +1 -1
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +10 -0
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/system-prompt.d.ts.map +1 -1
- package/dist/cli/system-prompt.js +38 -7
- package/dist/cli/system-prompt.js.map +1 -1
- package/dist/cli-runtime.js +7756 -2800
- package/dist/cli-tui/client-tools/client-tool-controller.d.ts.map +1 -1
- package/dist/cli-tui/client-tools/client-tool-controller.js +1 -3
- package/dist/cli-tui/client-tools/client-tool-controller.js.map +1 -1
- package/dist/cli-tui/commands/undo-handlers.d.ts.map +1 -1
- package/dist/cli-tui/commands/undo-handlers.js +7 -2
- package/dist/cli-tui/commands/undo-handlers.js.map +1 -1
- package/dist/cli-tui/tui-renderer/skills-controller.d.ts +3 -0
- package/dist/cli-tui/tui-renderer/skills-controller.d.ts.map +1 -1
- package/dist/cli-tui/tui-renderer/skills-controller.js +77 -33
- package/dist/cli-tui/tui-renderer/skills-controller.js.map +1 -1
- package/dist/codex/app-server-client.d.ts.map +1 -1
- package/dist/codex/app-server-client.js +1 -3
- package/dist/codex/app-server-client.js.map +1 -1
- package/dist/codex/compatibility.d.ts.map +1 -1
- package/dist/codex/compatibility.js +1 -3
- package/dist/codex/compatibility.js.map +1 -1
- package/dist/codex/subagent-dispatch-table.d.ts +8 -0
- package/dist/codex/subagent-dispatch-table.d.ts.map +1 -1
- package/dist/codex/subagent-dispatch-table.js +23 -0
- package/dist/codex/subagent-dispatch-table.js.map +1 -1
- package/dist/context/manifest.d.ts.map +1 -1
- package/dist/context/manifest.js +1 -3
- package/dist/context/manifest.js.map +1 -1
- package/dist/conversation/render-model.d.ts +0 -36
- package/dist/conversation/render-model.d.ts.map +1 -1
- package/dist/conversation/render-model.js +1 -3
- package/dist/conversation/render-model.js.map +1 -1
- package/dist/customer-value/ambient-learning.d.ts +75 -0
- package/dist/customer-value/ambient-learning.d.ts.map +1 -0
- package/dist/customer-value/ambient-learning.js +472 -0
- package/dist/customer-value/ambient-learning.js.map +1 -0
- package/dist/customer-value/internal-helpers.d.ts +13 -0
- package/dist/customer-value/internal-helpers.d.ts.map +1 -0
- package/dist/customer-value/internal-helpers.js +70 -0
- package/dist/customer-value/internal-helpers.js.map +1 -0
- package/dist/customer-value/report.d.ts +282 -0
- package/dist/customer-value/report.d.ts.map +1 -0
- package/dist/customer-value/report.js +2085 -0
- package/dist/customer-value/report.js.map +1 -0
- package/dist/db/schema.d.ts +5 -1
- package/dist/db/schema.d.ts.map +1 -1
- package/dist/db/schema.js.map +1 -1
- package/dist/evalops/agent-bootstrap.d.ts.map +1 -1
- package/dist/evalops/agent-bootstrap.js +1 -3
- package/dist/evalops/agent-bootstrap.js.map +1 -1
- package/dist/evalops/agent-mcp-metadata.d.ts.map +1 -1
- package/dist/evalops/agent-mcp-metadata.js +1 -3
- package/dist/evalops/agent-mcp-metadata.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/installers/maestro-review-workflow.d.ts +38 -0
- package/dist/installers/maestro-review-workflow.d.ts.map +1 -0
- package/dist/installers/maestro-review-workflow.js +163 -0
- package/dist/installers/maestro-review-workflow.js.map +1 -0
- package/dist/load-env.d.ts.map +1 -1
- package/dist/load-env.js +2 -1
- package/dist/load-env.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +92 -3
- package/dist/main.js.map +1 -1
- package/dist/mcp/config.d.ts.map +1 -1
- package/dist/mcp/config.js +1 -3
- package/dist/mcp/config.js.map +1 -1
- package/dist/mcp/elicitation.d.ts.map +1 -1
- package/dist/mcp/elicitation.js +1 -3
- package/dist/mcp/elicitation.js.map +1 -1
- package/dist/mcp/official-registry.d.ts.map +1 -1
- package/dist/mcp/official-registry.js +1 -3
- package/dist/mcp/official-registry.js.map +1 -1
- package/dist/mcp/workspace-trust.d.ts.map +1 -1
- package/dist/mcp/workspace-trust.js +1 -3
- package/dist/mcp/workspace-trust.js.map +1 -1
- package/dist/memory/service-client.d.ts.map +1 -1
- package/dist/memory/service-client.js +1 -3
- package/dist/memory/service-client.js.map +1 -1
- package/dist/models/config-loader.d.ts.map +1 -1
- package/dist/models/config-loader.js +1 -3
- package/dist/models/config-loader.js.map +1 -1
- package/dist/node_modules/@evalops/contracts/dist/index.d.ts +1 -0
- package/dist/node_modules/@evalops/contracts/dist/index.d.ts.map +1 -1
- package/dist/node_modules/@evalops/contracts/dist/index.js +1 -0
- package/dist/node_modules/@evalops/contracts/dist/index.js.map +1 -1
- package/dist/node_modules/@evalops/contracts/dist/maestro-settings.d.ts +61 -0
- package/dist/node_modules/@evalops/contracts/dist/maestro-settings.d.ts.map +1 -0
- package/dist/node_modules/@evalops/contracts/dist/maestro-settings.js +183 -0
- package/dist/node_modules/@evalops/contracts/dist/maestro-settings.js.map +1 -0
- package/dist/node_modules/@evalops/contracts/package.json +1 -1
- package/dist/node_modules/@evalops/tui/package.json +1 -1
- package/dist/oauth/connectors.d.ts.map +1 -1
- package/dist/oauth/connectors.js +1 -3
- package/dist/oauth/connectors.js.map +1 -1
- package/dist/oauth/evalops.d.ts.map +1 -1
- package/dist/oauth/evalops.js +1 -3
- package/dist/oauth/evalops.js.map +1 -1
- package/dist/platform/a2a-client.d.ts.map +1 -1
- package/dist/platform/a2a-client.js +1 -3
- package/dist/platform/a2a-client.js.map +1 -1
- package/dist/platform/a2a-cockpit.d.ts +1 -0
- package/dist/platform/a2a-cockpit.d.ts.map +1 -1
- package/dist/platform/a2a-cockpit.js +42 -11
- package/dist/platform/a2a-cockpit.js.map +1 -1
- package/dist/platform/a2a-completion-audit.d.ts +1 -1
- package/dist/platform/a2a-completion-audit.d.ts.map +1 -1
- package/dist/platform/a2a-completion-audit.js +7 -11
- package/dist/platform/a2a-completion-audit.js.map +1 -1
- package/dist/platform/a2a-maestro-peer.js +16 -0
- package/dist/platform/a2a-maestro-peer.js.map +1 -1
- package/dist/platform/a2a-peer-pairing.d.ts.map +1 -1
- package/dist/platform/a2a-peer-pairing.js +1 -3
- package/dist/platform/a2a-peer-pairing.js.map +1 -1
- package/dist/platform/a2a-peer-registry.d.ts.map +1 -1
- package/dist/platform/a2a-peer-registry.js +1 -3
- package/dist/platform/a2a-peer-registry.js.map +1 -1
- package/dist/platform/a2a-task-ledger.d.ts +20 -0
- package/dist/platform/a2a-task-ledger.d.ts.map +1 -1
- package/dist/platform/a2a-task-ledger.js +207 -11
- package/dist/platform/a2a-task-ledger.js.map +1 -1
- package/dist/platform/a2a-work-graph.d.ts.map +1 -1
- package/dist/platform/a2a-work-graph.js +1 -3
- package/dist/platform/a2a-work-graph.js.map +1 -1
- package/dist/platform/operating-layer.d.ts.map +1 -1
- package/dist/platform/operating-layer.js +14 -8
- package/dist/platform/operating-layer.js.map +1 -1
- package/dist/platform/tool-execution-client.d.ts.map +1 -1
- package/dist/platform/tool-execution-client.js +19 -2
- package/dist/platform/tool-execution-client.js.map +1 -1
- package/dist/providers/auth.d.ts.map +1 -1
- package/dist/providers/auth.js +1 -3
- package/dist/providers/auth.js.map +1 -1
- package/dist/runtime/env.d.ts +9 -1
- package/dist/runtime/env.d.ts.map +1 -1
- package/dist/runtime/env.js +63 -1
- package/dist/runtime/env.js.map +1 -1
- package/dist/safety/policy.d.ts.map +1 -1
- package/dist/safety/policy.js +1 -4
- package/dist/safety/policy.js.map +1 -1
- package/dist/sandbox/docker-sandbox.d.ts.map +1 -1
- package/dist/sandbox/docker-sandbox.js +6 -1
- package/dist/sandbox/docker-sandbox.js.map +1 -1
- package/dist/server/handlers/hosted-runner-drain.d.ts.map +1 -1
- package/dist/server/handlers/hosted-runner-drain.js +1 -3
- package/dist/server/handlers/hosted-runner-drain.js.map +1 -1
- package/dist/server/handlers/platform-a2a-push.d.ts.map +1 -1
- package/dist/server/handlers/platform-a2a-push.js +53 -2
- package/dist/server/handlers/platform-a2a-push.js.map +1 -1
- package/dist/server/handlers/runtime-app-server-ws.d.ts.map +1 -1
- package/dist/server/handlers/runtime-app-server-ws.js +1 -3
- package/dist/server/handlers/runtime-app-server-ws.js.map +1 -1
- package/dist/server/headless-runtime-service.d.ts +16 -0
- package/dist/server/headless-runtime-service.d.ts.map +1 -1
- package/dist/server/headless-runtime-service.js +232 -206
- package/dist/server/headless-runtime-service.js.map +1 -1
- package/dist/server/hosted-agent-runtime-progress.d.ts.map +1 -1
- package/dist/server/hosted-agent-runtime-progress.js +12 -3
- package/dist/server/hosted-agent-runtime-progress.js.map +1 -1
- package/dist/server/pending-request-payload.d.ts.map +1 -1
- package/dist/server/pending-request-payload.js +1 -3
- package/dist/server/pending-request-payload.js.map +1 -1
- package/dist/server/route-auth.d.ts.map +1 -1
- package/dist/server/route-auth.js +2 -0
- package/dist/server/route-auth.js.map +1 -1
- package/dist/server/session-serialization.d.ts.map +1 -1
- package/dist/server/session-serialization.js +1 -3
- package/dist/server/session-serialization.js.map +1 -1
- package/dist/services/compliance/normalize.d.ts.map +1 -1
- package/dist/services/compliance/normalize.js +1 -3
- package/dist/services/compliance/normalize.js.map +1 -1
- package/dist/services/intelligent-router/normalize.d.ts.map +1 -1
- package/dist/services/intelligent-router/normalize.js +1 -3
- package/dist/services/intelligent-router/normalize.js.map +1 -1
- package/dist/services/revenue-attribution/normalize.d.ts.map +1 -1
- package/dist/services/revenue-attribution/normalize.js +1 -3
- package/dist/services/revenue-attribution/normalize.js.map +1 -1
- package/dist/services/traces/normalize.d.ts.map +1 -1
- package/dist/services/traces/normalize.js +1 -3
- package/dist/services/traces/normalize.js.map +1 -1
- package/dist/services/workspace-config/normalize.d.ts.map +1 -1
- package/dist/services/workspace-config/normalize.js +1 -3
- package/dist/services/workspace-config/normalize.js.map +1 -1
- package/dist/skills/composer.d.ts.map +1 -1
- package/dist/skills/composer.js +13 -1
- package/dist/skills/composer.js.map +1 -1
- package/dist/skills/index.d.ts +1 -0
- package/dist/skills/index.d.ts.map +1 -1
- package/dist/skills/index.js +1 -0
- package/dist/skills/index.js.map +1 -1
- package/dist/skills/learned-guidelines.d.ts +33 -0
- package/dist/skills/learned-guidelines.d.ts.map +1 -0
- package/dist/skills/learned-guidelines.js +291 -0
- package/dist/skills/learned-guidelines.js.map +1 -0
- package/dist/skills/linter.d.ts.map +1 -1
- package/dist/skills/linter.js +1 -3
- package/dist/skills/linter.js.map +1 -1
- package/dist/skills/runtime-activation.d.ts +1 -0
- package/dist/skills/runtime-activation.d.ts.map +1 -1
- package/dist/skills/runtime-activation.js +2 -3
- package/dist/skills/runtime-activation.js.map +1 -1
- package/dist/skills/tool.d.ts.map +1 -1
- package/dist/skills/tool.js +26 -21
- package/dist/skills/tool.js.map +1 -1
- package/dist/skills/trust-cache.d.ts +7 -0
- package/dist/skills/trust-cache.d.ts.map +1 -1
- package/dist/skills/trust-cache.js +16 -0
- package/dist/skills/trust-cache.js.map +1 -1
- package/dist/telemetry/agent-workforce-native-event.d.ts.map +1 -1
- package/dist/telemetry/agent-workforce-native-event.js +1 -3
- package/dist/telemetry/agent-workforce-native-event.js.map +1 -1
- package/dist/telemetry/maestro-event-bus.d.ts.map +1 -1
- package/dist/telemetry/maestro-event-bus.js +42 -81
- package/dist/telemetry/maestro-event-bus.js.map +1 -1
- package/dist/telemetry/maestro-platform-replay-fixture.d.ts.map +1 -1
- package/dist/telemetry/maestro-platform-replay-fixture.js +1 -3
- package/dist/telemetry/maestro-platform-replay-fixture.js.map +1 -1
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +54 -43
- package/dist/telemetry.js.map +1 -1
- package/dist/theme/theme-loader.d.ts.map +1 -1
- package/dist/theme/theme-loader.js +1 -3
- package/dist/theme/theme-loader.js.map +1 -1
- package/dist/tools/apply-patch.d.ts.map +1 -1
- package/dist/tools/apply-patch.js +76 -8
- package/dist/tools/apply-patch.js.map +1 -1
- package/dist/tools/diff-preview.d.ts.map +1 -1
- package/dist/tools/diff-preview.js +10 -1
- package/dist/tools/diff-preview.js.map +1 -1
- package/dist/tools/edit.d.ts.map +1 -1
- package/dist/tools/edit.js +17 -0
- package/dist/tools/edit.js.map +1 -1
- package/dist/tools/write.d.ts.map +1 -1
- package/dist/tools/write.js +9 -0
- package/dist/tools/write.js.map +1 -1
- package/dist/undo/tracker.d.ts +5 -0
- package/dist/undo/tracker.d.ts.map +1 -1
- package/dist/undo/tracker.js +13 -0
- package/dist/undo/tracker.js.map +1 -1
- package/dist/utils/fs.d.ts +1 -1
- package/dist/utils/fs.d.ts.map +1 -1
- package/dist/utils/fs.js +29 -2
- package/dist/utils/fs.js.map +1 -1
- package/dist/utils/git-stash.d.ts.map +1 -1
- package/dist/utils/git-stash.js +15 -8
- package/dist/utils/git-stash.js.map +1 -1
- package/dist/utils/json.d.ts +11 -0
- package/dist/utils/json.d.ts.map +1 -1
- package/dist/utils/json.js +9 -0
- package/dist/utils/json.js.map +1 -1
- package/dist/utils/shell-env.d.ts.map +1 -1
- package/dist/utils/shell-env.js +2 -0
- package/dist/utils/shell-env.js.map +1 -1
- package/dist/utils/url-extractor-git.d.ts +26 -0
- package/dist/utils/url-extractor-git.d.ts.map +1 -0
- package/dist/utils/url-extractor-git.js +259 -0
- package/dist/utils/url-extractor-git.js.map +1 -0
- package/dist/utils/url-extractor.d.ts.map +1 -1
- package/dist/utils/url-extractor.js +23 -251
- package/dist/utils/url-extractor.js.map +1 -1
- package/dist/version.json +2 -2
- package/package.json +310 -306
- package/skills/incident-triage/SKILL.md +19 -1
- package/skills/install-code-review/SKILL.md +69 -0
- package/skills/security-review/SKILL.md +68 -0
- package/skills/security-review/reference/rubric.md +85 -0
|
@@ -16,6 +16,7 @@ import { createAutomaticMemoryExtractionCoordinator, } from "../memory/auto-extr
|
|
|
16
16
|
import { checkSessionLimits } from "../safety/policy.js";
|
|
17
17
|
import { toSessionModelMetadata } from "../session/manager.js";
|
|
18
18
|
import { createRuntimeSessionSummaryUpdater } from "../session/runtime-summary-updater.js";
|
|
19
|
+
import { isRecord } from "../utils/json.js";
|
|
19
20
|
import { createLogger } from "../utils/logger.js";
|
|
20
21
|
import { sanitizeWithStaticMask } from "../utils/secret-redactor.js";
|
|
21
22
|
import { WebActionApprovalService } from "./approval-service.js";
|
|
@@ -121,9 +122,6 @@ export class HeadlessRuntimeNotReadyError extends Error {
|
|
|
121
122
|
this.name = "HeadlessRuntimeNotReadyError";
|
|
122
123
|
}
|
|
123
124
|
}
|
|
124
|
-
function isRecord(value) {
|
|
125
|
-
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
126
|
-
}
|
|
127
125
|
function restoreFlushStatus(value) {
|
|
128
126
|
switch (value) {
|
|
129
127
|
case "completed":
|
|
@@ -1218,223 +1216,251 @@ export class HeadlessSessionRuntime {
|
|
|
1218
1216
|
}
|
|
1219
1217
|
this.updatedAt = Date.now();
|
|
1220
1218
|
switch (msg.type) {
|
|
1221
|
-
case "hello":
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
this.
|
|
1227
|
-
connectionId: subscriber?.connectionId ?? metadata?.connectionId ?? undefined,
|
|
1228
|
-
clientProtocolVersion: msg.protocol_version,
|
|
1229
|
-
clientInfo: msg.client_info,
|
|
1230
|
-
capabilities: msg.capabilities,
|
|
1231
|
-
optOutNotifications: msg.opt_out_notifications,
|
|
1232
|
-
role: msg.role,
|
|
1233
|
-
});
|
|
1234
|
-
const connection = this.getConnectionById(subscriber?.connectionId ?? metadata?.connectionId ?? undefined) ?? this.getPreferredConnection();
|
|
1235
|
-
if (connection) {
|
|
1236
|
-
this.enqueuePrivateMessage(this.translator.buildHelloOkMessage({
|
|
1237
|
-
connection_id: connection.id,
|
|
1238
|
-
protocol_version: HEADLESS_PROTOCOL_VERSION,
|
|
1239
|
-
client_protocol_version: connection.clientProtocolVersion,
|
|
1240
|
-
client_info: connection.clientInfo,
|
|
1241
|
-
capabilities: connection.capabilities,
|
|
1242
|
-
opt_out_notifications: connection.optOutNotifications
|
|
1243
|
-
? [...connection.optOutNotifications]
|
|
1244
|
-
: undefined,
|
|
1245
|
-
role: connection.role,
|
|
1246
|
-
controller_connection_id: this.controllerConnectionId,
|
|
1247
|
-
lease_expires_at: this.getLeaseExpiryIso(connection),
|
|
1248
|
-
}), metadata);
|
|
1249
|
-
}
|
|
1250
|
-
if (msg.protocol_version &&
|
|
1251
|
-
msg.protocol_version !== HEADLESS_PROTOCOL_VERSION) {
|
|
1252
|
-
this.publish({
|
|
1253
|
-
type: "status",
|
|
1254
|
-
message: `Client protocol ${msg.protocol_version} attached to server ${HEADLESS_PROTOCOL_VERSION}`,
|
|
1255
|
-
});
|
|
1256
|
-
}
|
|
1257
|
-
return;
|
|
1258
|
-
}
|
|
1259
|
-
case "init": {
|
|
1260
|
-
this.lastInit = msg;
|
|
1261
|
-
applyOutgoingHeadlessMessage(this.state, msg);
|
|
1262
|
-
const applied = applyInitMessage(this.agent, msg, this.approvalService);
|
|
1263
|
-
this.publish({
|
|
1264
|
-
type: "status",
|
|
1265
|
-
message: applied.length > 0
|
|
1266
|
-
? `Initialized: ${applied.join(", ")}`
|
|
1267
|
-
: "Init received with no changes",
|
|
1268
|
-
});
|
|
1269
|
-
return;
|
|
1270
|
-
}
|
|
1271
|
-
case "prompt": {
|
|
1272
|
-
if (this.running) {
|
|
1273
|
-
throw new Error("Headless runtime is already processing a prompt");
|
|
1274
|
-
}
|
|
1275
|
-
applyOutgoingHeadlessMessage(this.state, msg);
|
|
1276
|
-
this.running = true;
|
|
1277
|
-
let attachments;
|
|
1278
|
-
if (msg.attachments?.length) {
|
|
1279
|
-
const loaded = await loadPromptAttachments(msg.attachments, (message) => {
|
|
1280
|
-
this.publish({
|
|
1281
|
-
type: "error",
|
|
1282
|
-
message,
|
|
1283
|
-
fatal: false,
|
|
1284
|
-
error_type: "tool",
|
|
1285
|
-
});
|
|
1286
|
-
});
|
|
1287
|
-
if (loaded.length > 0) {
|
|
1288
|
-
attachments = loaded;
|
|
1289
|
-
this.publish({
|
|
1290
|
-
type: "status",
|
|
1291
|
-
message: `Loaded ${loaded.length} attachment(s)`,
|
|
1292
|
-
});
|
|
1293
|
-
}
|
|
1294
|
-
}
|
|
1295
|
-
void this.runPrompt(msg.content, attachments);
|
|
1296
|
-
return;
|
|
1297
|
-
}
|
|
1219
|
+
case "hello":
|
|
1220
|
+
return this.handleHello(msg, metadata);
|
|
1221
|
+
case "init":
|
|
1222
|
+
return this.handleInit(msg);
|
|
1223
|
+
case "prompt":
|
|
1224
|
+
return this.handlePrompt(msg);
|
|
1298
1225
|
case "interrupt":
|
|
1299
1226
|
case "cancel":
|
|
1300
|
-
this.
|
|
1301
|
-
? "Interrupted before request completed"
|
|
1302
|
-
: "Cancelled before request completed");
|
|
1303
|
-
applyOutgoingHeadlessMessage(this.state, msg);
|
|
1304
|
-
await this.utilityCommands.dispose(msg.type === "interrupt"
|
|
1305
|
-
? "Interrupted while utility command was still running"
|
|
1306
|
-
: "Cancelled while utility command was still running");
|
|
1307
|
-
this.fileWatches.dispose(msg.type === "interrupt"
|
|
1308
|
-
? "Interrupted while file watch was still running"
|
|
1309
|
-
: "Cancelled while file watch was still running");
|
|
1310
|
-
this.agent.abort();
|
|
1311
|
-
this.publishSnapshot();
|
|
1312
|
-
return;
|
|
1227
|
+
return this.handleInterrupt(msg);
|
|
1313
1228
|
case "tool_response":
|
|
1314
|
-
this.
|
|
1315
|
-
|
|
1316
|
-
this.
|
|
1317
|
-
return;
|
|
1318
|
-
case "client_tool_result": {
|
|
1319
|
-
this.resolveLegacyClientToolResult(msg);
|
|
1320
|
-
applyOutgoingHeadlessMessage(this.state, msg);
|
|
1321
|
-
this.publishSnapshot();
|
|
1322
|
-
return;
|
|
1323
|
-
}
|
|
1229
|
+
return this.handleToolResponse(msg);
|
|
1230
|
+
case "client_tool_result":
|
|
1231
|
+
return this.handleClientToolResult(msg);
|
|
1324
1232
|
case "server_request_response":
|
|
1325
|
-
this.
|
|
1326
|
-
applyOutgoingHeadlessMessage(this.state, msg);
|
|
1327
|
-
this.publishSnapshot();
|
|
1328
|
-
return;
|
|
1233
|
+
return this.handleServerRequestResponse(msg);
|
|
1329
1234
|
case "shutdown":
|
|
1330
|
-
this.
|
|
1331
|
-
applyOutgoingHeadlessMessage(this.state, msg);
|
|
1332
|
-
await this.utilityCommands.dispose("Headless runtime shutdown while utility command was still running");
|
|
1333
|
-
this.fileWatches.dispose("Headless runtime shutdown while file watch was still running");
|
|
1334
|
-
this.agent.abort();
|
|
1335
|
-
this.publishSnapshot();
|
|
1336
|
-
this.finalizeDisposal();
|
|
1337
|
-
return;
|
|
1235
|
+
return this.handleShutdown(msg);
|
|
1338
1236
|
case "utility_command_start":
|
|
1339
|
-
|
|
1340
|
-
throw new Error("utility_command_start requires command_exec capability");
|
|
1341
|
-
}
|
|
1342
|
-
await this.utilityCommands.start({
|
|
1343
|
-
command_id: msg.command_id,
|
|
1344
|
-
command: msg.command,
|
|
1345
|
-
cwd: msg.cwd,
|
|
1346
|
-
env: msg.env,
|
|
1347
|
-
shell_mode: msg.shell_mode,
|
|
1348
|
-
terminal_mode: msg.terminal_mode,
|
|
1349
|
-
allow_stdin: msg.allow_stdin,
|
|
1350
|
-
columns: msg.columns,
|
|
1351
|
-
rows: msg.rows,
|
|
1352
|
-
owner_connection_id: this.getMessageConnectionId(metadata),
|
|
1353
|
-
});
|
|
1354
|
-
return;
|
|
1237
|
+
return this.handleUtilityCommandStart(msg, metadata);
|
|
1355
1238
|
case "utility_command_terminate":
|
|
1356
|
-
this.
|
|
1357
|
-
await this.utilityCommands.terminate(msg.command_id, msg.force);
|
|
1358
|
-
return;
|
|
1239
|
+
return this.handleUtilityCommandTerminate(msg, metadata);
|
|
1359
1240
|
case "utility_command_stdin":
|
|
1360
|
-
|
|
1361
|
-
throw new Error("utility_command_stdin requires command_exec capability");
|
|
1362
|
-
}
|
|
1363
|
-
this.assertUtilityOwnerAccess(this.utilityCommands.get(msg.command_id)?.owner_connection_id, this.getMessageConnectionId(metadata), "command", msg.command_id);
|
|
1364
|
-
await this.utilityCommands.writeStdin(msg.command_id, msg.content, msg.eof);
|
|
1365
|
-
return;
|
|
1241
|
+
return this.handleUtilityCommandStdin(msg, metadata);
|
|
1366
1242
|
case "utility_command_resize":
|
|
1367
|
-
|
|
1368
|
-
throw new Error("utility_command_resize requires command_exec capability");
|
|
1369
|
-
}
|
|
1370
|
-
this.assertUtilityOwnerAccess(this.utilityCommands.get(msg.command_id)?.owner_connection_id, this.getMessageConnectionId(metadata), "command", msg.command_id);
|
|
1371
|
-
await this.utilityCommands.resize(msg.command_id, msg.columns, msg.rows);
|
|
1372
|
-
return;
|
|
1243
|
+
return this.handleUtilityCommandResize(msg, metadata);
|
|
1373
1244
|
case "utility_file_search":
|
|
1374
|
-
|
|
1375
|
-
throw new Error("utility_file_search requires file_search capability");
|
|
1376
|
-
}
|
|
1377
|
-
{
|
|
1378
|
-
const result = searchWorkspaceFiles({
|
|
1379
|
-
query: msg.query,
|
|
1380
|
-
cwd: msg.cwd,
|
|
1381
|
-
workspaceRoot: this.workspaceRoot,
|
|
1382
|
-
limit: msg.limit,
|
|
1383
|
-
});
|
|
1384
|
-
this.publish({
|
|
1385
|
-
type: "utility_file_search_results",
|
|
1386
|
-
search_id: msg.search_id,
|
|
1387
|
-
query: result.query,
|
|
1388
|
-
cwd: result.cwd,
|
|
1389
|
-
results: result.results,
|
|
1390
|
-
truncated: result.truncated,
|
|
1391
|
-
});
|
|
1392
|
-
}
|
|
1393
|
-
return;
|
|
1245
|
+
return this.handleUtilityFileSearch(msg);
|
|
1394
1246
|
case "utility_file_read":
|
|
1395
|
-
|
|
1396
|
-
throw new Error("utility_file_read requires file_read capability");
|
|
1397
|
-
}
|
|
1398
|
-
{
|
|
1399
|
-
const result = await readWorkspaceFile({
|
|
1400
|
-
path: msg.path,
|
|
1401
|
-
cwd: msg.cwd,
|
|
1402
|
-
workspaceRoot: this.workspaceRoot,
|
|
1403
|
-
offset: msg.offset,
|
|
1404
|
-
limit: msg.limit,
|
|
1405
|
-
});
|
|
1406
|
-
this.publish({
|
|
1407
|
-
type: "utility_file_read_result",
|
|
1408
|
-
read_id: msg.read_id,
|
|
1409
|
-
path: result.path,
|
|
1410
|
-
relative_path: result.relative_path,
|
|
1411
|
-
cwd: result.cwd,
|
|
1412
|
-
content: result.content,
|
|
1413
|
-
start_line: result.start_line,
|
|
1414
|
-
end_line: result.end_line,
|
|
1415
|
-
total_lines: result.total_lines,
|
|
1416
|
-
truncated: result.truncated,
|
|
1417
|
-
});
|
|
1418
|
-
}
|
|
1419
|
-
return;
|
|
1247
|
+
return this.handleUtilityFileRead(msg);
|
|
1420
1248
|
case "utility_file_watch_start":
|
|
1421
|
-
|
|
1422
|
-
throw new Error("utility_file_watch_start requires file_watch capability");
|
|
1423
|
-
}
|
|
1424
|
-
await this.fileWatches.start({
|
|
1425
|
-
watch_id: msg.watch_id,
|
|
1426
|
-
root_dir: msg.root_dir,
|
|
1427
|
-
include_patterns: msg.include_patterns,
|
|
1428
|
-
exclude_patterns: msg.exclude_patterns,
|
|
1429
|
-
debounce_ms: msg.debounce_ms,
|
|
1430
|
-
owner_connection_id: this.getMessageConnectionId(metadata),
|
|
1431
|
-
});
|
|
1432
|
-
return;
|
|
1249
|
+
return this.handleUtilityFileWatchStart(msg, metadata);
|
|
1433
1250
|
case "utility_file_watch_stop":
|
|
1434
|
-
this.
|
|
1435
|
-
|
|
1436
|
-
|
|
1251
|
+
return this.handleUtilityFileWatchStop(msg, metadata);
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
async handleHello(msg, metadata) {
|
|
1255
|
+
applyOutgoingHeadlessMessage(this.state, msg);
|
|
1256
|
+
const subscriber = metadata?.subscriptionId
|
|
1257
|
+
? this.subscribers.get(metadata.subscriptionId)
|
|
1258
|
+
: undefined;
|
|
1259
|
+
this.updateConnectionMetadata({
|
|
1260
|
+
connectionId: subscriber?.connectionId ?? metadata?.connectionId ?? undefined,
|
|
1261
|
+
clientProtocolVersion: msg.protocol_version,
|
|
1262
|
+
clientInfo: msg.client_info,
|
|
1263
|
+
capabilities: msg.capabilities,
|
|
1264
|
+
optOutNotifications: msg.opt_out_notifications,
|
|
1265
|
+
role: msg.role,
|
|
1266
|
+
});
|
|
1267
|
+
const connection = this.getConnectionById(subscriber?.connectionId ?? metadata?.connectionId ?? undefined) ?? this.getPreferredConnection();
|
|
1268
|
+
if (connection) {
|
|
1269
|
+
this.enqueuePrivateMessage(this.translator.buildHelloOkMessage({
|
|
1270
|
+
connection_id: connection.id,
|
|
1271
|
+
protocol_version: HEADLESS_PROTOCOL_VERSION,
|
|
1272
|
+
client_protocol_version: connection.clientProtocolVersion,
|
|
1273
|
+
client_info: connection.clientInfo,
|
|
1274
|
+
capabilities: connection.capabilities,
|
|
1275
|
+
opt_out_notifications: connection.optOutNotifications
|
|
1276
|
+
? [...connection.optOutNotifications]
|
|
1277
|
+
: undefined,
|
|
1278
|
+
role: connection.role,
|
|
1279
|
+
controller_connection_id: this.controllerConnectionId,
|
|
1280
|
+
lease_expires_at: this.getLeaseExpiryIso(connection),
|
|
1281
|
+
}), metadata);
|
|
1282
|
+
}
|
|
1283
|
+
if (msg.protocol_version &&
|
|
1284
|
+
msg.protocol_version !== HEADLESS_PROTOCOL_VERSION) {
|
|
1285
|
+
this.publish({
|
|
1286
|
+
type: "status",
|
|
1287
|
+
message: `Client protocol ${msg.protocol_version} attached to server ${HEADLESS_PROTOCOL_VERSION}`,
|
|
1288
|
+
});
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
async handleInit(msg) {
|
|
1292
|
+
this.lastInit = msg;
|
|
1293
|
+
applyOutgoingHeadlessMessage(this.state, msg);
|
|
1294
|
+
const applied = applyInitMessage(this.agent, msg, this.approvalService);
|
|
1295
|
+
this.publish({
|
|
1296
|
+
type: "status",
|
|
1297
|
+
message: applied.length > 0
|
|
1298
|
+
? `Initialized: ${applied.join(", ")}`
|
|
1299
|
+
: "Init received with no changes",
|
|
1300
|
+
});
|
|
1301
|
+
}
|
|
1302
|
+
async handlePrompt(msg) {
|
|
1303
|
+
if (this.running) {
|
|
1304
|
+
throw new Error("Headless runtime is already processing a prompt");
|
|
1305
|
+
}
|
|
1306
|
+
applyOutgoingHeadlessMessage(this.state, msg);
|
|
1307
|
+
this.running = true;
|
|
1308
|
+
let attachments;
|
|
1309
|
+
if (msg.attachments?.length) {
|
|
1310
|
+
const loaded = await loadPromptAttachments(msg.attachments, (message) => {
|
|
1311
|
+
this.publish({
|
|
1312
|
+
type: "error",
|
|
1313
|
+
message,
|
|
1314
|
+
fatal: false,
|
|
1315
|
+
error_type: "tool",
|
|
1316
|
+
});
|
|
1317
|
+
});
|
|
1318
|
+
if (loaded.length > 0) {
|
|
1319
|
+
attachments = loaded;
|
|
1320
|
+
this.publish({
|
|
1321
|
+
type: "status",
|
|
1322
|
+
message: `Loaded ${loaded.length} attachment(s)`,
|
|
1323
|
+
});
|
|
1324
|
+
}
|
|
1437
1325
|
}
|
|
1326
|
+
void this.runPrompt(msg.content, attachments);
|
|
1327
|
+
}
|
|
1328
|
+
async handleInterrupt(msg) {
|
|
1329
|
+
this.cancelPendingServerRequests(msg.type === "interrupt"
|
|
1330
|
+
? "Interrupted before request completed"
|
|
1331
|
+
: "Cancelled before request completed");
|
|
1332
|
+
applyOutgoingHeadlessMessage(this.state, msg);
|
|
1333
|
+
await this.utilityCommands.dispose(msg.type === "interrupt"
|
|
1334
|
+
? "Interrupted while utility command was still running"
|
|
1335
|
+
: "Cancelled while utility command was still running");
|
|
1336
|
+
this.fileWatches.dispose(msg.type === "interrupt"
|
|
1337
|
+
? "Interrupted while file watch was still running"
|
|
1338
|
+
: "Cancelled while file watch was still running");
|
|
1339
|
+
this.agent.abort();
|
|
1340
|
+
this.publishSnapshot();
|
|
1341
|
+
}
|
|
1342
|
+
async handleToolResponse(msg) {
|
|
1343
|
+
this.resolveLegacyToolResponse(msg);
|
|
1344
|
+
applyOutgoingHeadlessMessage(this.state, msg);
|
|
1345
|
+
this.publishSnapshot();
|
|
1346
|
+
}
|
|
1347
|
+
async handleClientToolResult(msg) {
|
|
1348
|
+
this.resolveLegacyClientToolResult(msg);
|
|
1349
|
+
applyOutgoingHeadlessMessage(this.state, msg);
|
|
1350
|
+
this.publishSnapshot();
|
|
1351
|
+
}
|
|
1352
|
+
async handleServerRequestResponse(msg) {
|
|
1353
|
+
this.resolveServerRequestResponse(msg);
|
|
1354
|
+
applyOutgoingHeadlessMessage(this.state, msg);
|
|
1355
|
+
this.publishSnapshot();
|
|
1356
|
+
}
|
|
1357
|
+
async handleShutdown(msg) {
|
|
1358
|
+
this.cancelPendingServerRequests("Shutdown before request completed");
|
|
1359
|
+
applyOutgoingHeadlessMessage(this.state, msg);
|
|
1360
|
+
await this.utilityCommands.dispose("Headless runtime shutdown while utility command was still running");
|
|
1361
|
+
this.fileWatches.dispose("Headless runtime shutdown while file watch was still running");
|
|
1362
|
+
this.agent.abort();
|
|
1363
|
+
this.publishSnapshot();
|
|
1364
|
+
this.finalizeDisposal();
|
|
1365
|
+
}
|
|
1366
|
+
async handleUtilityCommandStart(msg, metadata) {
|
|
1367
|
+
if (!this.state.capabilities?.utility_operations?.includes("command_exec")) {
|
|
1368
|
+
throw new Error("utility_command_start requires command_exec capability");
|
|
1369
|
+
}
|
|
1370
|
+
await this.utilityCommands.start({
|
|
1371
|
+
command_id: msg.command_id,
|
|
1372
|
+
command: msg.command,
|
|
1373
|
+
cwd: msg.cwd,
|
|
1374
|
+
env: msg.env,
|
|
1375
|
+
shell_mode: msg.shell_mode,
|
|
1376
|
+
terminal_mode: msg.terminal_mode,
|
|
1377
|
+
allow_stdin: msg.allow_stdin,
|
|
1378
|
+
columns: msg.columns,
|
|
1379
|
+
rows: msg.rows,
|
|
1380
|
+
owner_connection_id: this.getMessageConnectionId(metadata),
|
|
1381
|
+
});
|
|
1382
|
+
}
|
|
1383
|
+
async handleUtilityCommandTerminate(msg, metadata) {
|
|
1384
|
+
this.assertUtilityOwnerAccess(this.utilityCommands.get(msg.command_id)?.owner_connection_id, this.getMessageConnectionId(metadata), "command", msg.command_id);
|
|
1385
|
+
await this.utilityCommands.terminate(msg.command_id, msg.force);
|
|
1386
|
+
}
|
|
1387
|
+
async handleUtilityCommandStdin(msg, metadata) {
|
|
1388
|
+
if (!this.state.capabilities?.utility_operations?.includes("command_exec")) {
|
|
1389
|
+
throw new Error("utility_command_stdin requires command_exec capability");
|
|
1390
|
+
}
|
|
1391
|
+
this.assertUtilityOwnerAccess(this.utilityCommands.get(msg.command_id)?.owner_connection_id, this.getMessageConnectionId(metadata), "command", msg.command_id);
|
|
1392
|
+
await this.utilityCommands.writeStdin(msg.command_id, msg.content, msg.eof);
|
|
1393
|
+
}
|
|
1394
|
+
async handleUtilityCommandResize(msg, metadata) {
|
|
1395
|
+
if (!this.state.capabilities?.utility_operations?.includes("command_exec")) {
|
|
1396
|
+
throw new Error("utility_command_resize requires command_exec capability");
|
|
1397
|
+
}
|
|
1398
|
+
this.assertUtilityOwnerAccess(this.utilityCommands.get(msg.command_id)?.owner_connection_id, this.getMessageConnectionId(metadata), "command", msg.command_id);
|
|
1399
|
+
await this.utilityCommands.resize(msg.command_id, msg.columns, msg.rows);
|
|
1400
|
+
}
|
|
1401
|
+
async handleUtilityFileSearch(msg) {
|
|
1402
|
+
if (!this.state.capabilities?.utility_operations?.includes("file_search")) {
|
|
1403
|
+
throw new Error("utility_file_search requires file_search capability");
|
|
1404
|
+
}
|
|
1405
|
+
{
|
|
1406
|
+
const result = searchWorkspaceFiles({
|
|
1407
|
+
query: msg.query,
|
|
1408
|
+
cwd: msg.cwd,
|
|
1409
|
+
workspaceRoot: this.workspaceRoot,
|
|
1410
|
+
limit: msg.limit,
|
|
1411
|
+
});
|
|
1412
|
+
this.publish({
|
|
1413
|
+
type: "utility_file_search_results",
|
|
1414
|
+
search_id: msg.search_id,
|
|
1415
|
+
query: result.query,
|
|
1416
|
+
cwd: result.cwd,
|
|
1417
|
+
results: result.results,
|
|
1418
|
+
truncated: result.truncated,
|
|
1419
|
+
});
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
async handleUtilityFileRead(msg) {
|
|
1423
|
+
if (!this.state.capabilities?.utility_operations?.includes("file_read")) {
|
|
1424
|
+
throw new Error("utility_file_read requires file_read capability");
|
|
1425
|
+
}
|
|
1426
|
+
{
|
|
1427
|
+
const result = await readWorkspaceFile({
|
|
1428
|
+
path: msg.path,
|
|
1429
|
+
cwd: msg.cwd,
|
|
1430
|
+
workspaceRoot: this.workspaceRoot,
|
|
1431
|
+
offset: msg.offset,
|
|
1432
|
+
limit: msg.limit,
|
|
1433
|
+
});
|
|
1434
|
+
this.publish({
|
|
1435
|
+
type: "utility_file_read_result",
|
|
1436
|
+
read_id: msg.read_id,
|
|
1437
|
+
path: result.path,
|
|
1438
|
+
relative_path: result.relative_path,
|
|
1439
|
+
cwd: result.cwd,
|
|
1440
|
+
content: result.content,
|
|
1441
|
+
start_line: result.start_line,
|
|
1442
|
+
end_line: result.end_line,
|
|
1443
|
+
total_lines: result.total_lines,
|
|
1444
|
+
truncated: result.truncated,
|
|
1445
|
+
});
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
async handleUtilityFileWatchStart(msg, metadata) {
|
|
1449
|
+
if (!this.state.capabilities?.utility_operations?.includes("file_watch")) {
|
|
1450
|
+
throw new Error("utility_file_watch_start requires file_watch capability");
|
|
1451
|
+
}
|
|
1452
|
+
await this.fileWatches.start({
|
|
1453
|
+
watch_id: msg.watch_id,
|
|
1454
|
+
root_dir: msg.root_dir,
|
|
1455
|
+
include_patterns: msg.include_patterns,
|
|
1456
|
+
exclude_patterns: msg.exclude_patterns,
|
|
1457
|
+
debounce_ms: msg.debounce_ms,
|
|
1458
|
+
owner_connection_id: this.getMessageConnectionId(metadata),
|
|
1459
|
+
});
|
|
1460
|
+
}
|
|
1461
|
+
async handleUtilityFileWatchStop(msg, metadata) {
|
|
1462
|
+
this.assertUtilityOwnerAccess(this.fileWatches.get(msg.watch_id)?.owner_connection_id, this.getMessageConnectionId(metadata), "file watch", msg.watch_id);
|
|
1463
|
+
this.fileWatches.stop(msg.watch_id, "Stopped by controller");
|
|
1438
1464
|
}
|
|
1439
1465
|
async runPrompt(content, attachments) {
|
|
1440
1466
|
try {
|