@geminilight/mindos 1.1.26 → 1.1.30
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/bridges/index.d.ts +3 -0
- package/dist/agent/bridges/index.d.ts.map +1 -0
- package/dist/agent/bridges/index.js +3 -0
- package/dist/agent/bridges/index.js.map +1 -0
- package/dist/agent/bridges/runtime-permission-bridge.d.ts +34 -0
- package/dist/agent/bridges/runtime-permission-bridge.d.ts.map +1 -0
- package/dist/agent/bridges/runtime-permission-bridge.js +284 -0
- package/dist/agent/bridges/runtime-permission-bridge.js.map +1 -0
- package/dist/agent/bridges/user-question-bridge.d.ts +90 -0
- package/dist/agent/bridges/user-question-bridge.d.ts.map +1 -0
- package/dist/agent/bridges/user-question-bridge.js +260 -0
- package/dist/agent/bridges/user-question-bridge.js.map +1 -0
- package/dist/agent/index.d.ts +6 -7
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +6 -7
- package/dist/agent/index.js.map +1 -1
- package/dist/agent/ledger/index.d.ts +5 -0
- package/dist/agent/ledger/index.d.ts.map +1 -0
- package/dist/agent/ledger/index.js +5 -0
- package/dist/agent/ledger/index.js.map +1 -0
- package/dist/agent/ledger/run-cancellation.d.ts +13 -0
- package/dist/agent/ledger/run-cancellation.d.ts.map +1 -0
- package/dist/agent/ledger/run-cancellation.js +97 -0
- package/dist/agent/ledger/run-cancellation.js.map +1 -0
- package/dist/agent/ledger/run-ledger-types.d.ts +197 -0
- package/dist/agent/ledger/run-ledger-types.d.ts.map +1 -0
- package/dist/agent/ledger/run-ledger-types.js +9 -0
- package/dist/agent/ledger/run-ledger-types.js.map +1 -0
- package/dist/agent/ledger/run-ledger.d.ts +44 -0
- package/dist/agent/ledger/run-ledger.d.ts.map +1 -0
- package/dist/agent/ledger/run-ledger.js +814 -0
- package/dist/agent/ledger/run-ledger.js.map +1 -0
- package/dist/agent/ledger/run-timeline-events.d.ts +3 -0
- package/dist/agent/ledger/run-timeline-events.d.ts.map +1 -0
- package/dist/agent/ledger/run-timeline-events.js +239 -0
- package/dist/agent/ledger/run-timeline-events.js.map +1 -0
- package/dist/agent/mindos-pi/extension/extension-tools.d.ts +16 -0
- package/dist/agent/mindos-pi/extension/extension-tools.d.ts.map +1 -0
- package/dist/agent/mindos-pi/extension/extension-tools.js +115 -0
- package/dist/agent/mindos-pi/extension/extension-tools.js.map +1 -0
- package/dist/agent/mindos-pi/extension/index.d.ts +3 -0
- package/dist/agent/mindos-pi/extension/index.d.ts.map +1 -0
- package/dist/agent/mindos-pi/extension/index.js +3 -0
- package/dist/agent/mindos-pi/extension/index.js.map +1 -0
- package/dist/agent/mindos-pi/extension/kb-extension.d.ts +38 -0
- package/dist/agent/mindos-pi/extension/kb-extension.d.ts.map +1 -0
- package/dist/agent/mindos-pi/extension/kb-extension.js +140 -0
- package/dist/agent/mindos-pi/extension/kb-extension.js.map +1 -0
- package/dist/agent/mindos-pi/index.d.ts +5 -0
- package/dist/agent/mindos-pi/index.d.ts.map +1 -0
- package/dist/agent/mindos-pi/index.js +5 -0
- package/dist/agent/mindos-pi/index.js.map +1 -0
- package/dist/agent/mindos-pi/prompt.d.ts +3 -0
- package/dist/agent/mindos-pi/prompt.d.ts.map +1 -0
- package/dist/agent/mindos-pi/prompt.js +22 -0
- package/dist/agent/mindos-pi/prompt.js.map +1 -0
- package/dist/agent/mindos-pi/resource-types.d.ts +27 -0
- package/dist/agent/mindos-pi/resource-types.d.ts.map +1 -0
- package/dist/agent/mindos-pi/resource-types.js +2 -0
- package/dist/agent/mindos-pi/resource-types.js.map +1 -0
- package/dist/agent/mindos-pi/runtime.d.ts +10 -0
- package/dist/agent/mindos-pi/runtime.d.ts.map +1 -0
- package/dist/agent/mindos-pi/runtime.js +31 -0
- package/dist/agent/mindos-pi/runtime.js.map +1 -0
- package/dist/agent/pi/extension-tools.d.ts +2 -0
- package/dist/agent/pi/extension-tools.d.ts.map +1 -0
- package/dist/agent/pi/extension-tools.js +2 -0
- package/dist/agent/pi/extension-tools.js.map +1 -0
- package/dist/agent/pi/index.d.ts +2 -0
- package/dist/agent/pi/index.d.ts.map +1 -0
- package/dist/agent/pi/index.js +2 -0
- package/dist/agent/pi/index.js.map +1 -0
- package/dist/agent/pi/resource-types.d.ts +2 -0
- package/dist/agent/pi/resource-types.d.ts.map +1 -0
- package/dist/agent/pi/resource-types.js +2 -0
- package/dist/agent/pi/resource-types.js.map +1 -0
- package/dist/agent/pi/runtime.d.ts +2 -0
- package/dist/agent/pi/runtime.d.ts.map +1 -0
- package/dist/agent/pi/runtime.js +2 -0
- package/dist/agent/pi/runtime.js.map +1 -0
- package/dist/agent/prompt/context-prompt.d.ts +50 -0
- package/dist/agent/prompt/context-prompt.d.ts.map +1 -1
- package/dist/agent/prompt/context-prompt.js +71 -38
- package/dist/agent/prompt/context-prompt.js.map +1 -1
- package/dist/agent/prompt/index.d.ts +1 -1
- package/dist/agent/prompt/index.d.ts.map +1 -1
- package/dist/agent/prompt/index.js +1 -1
- package/dist/agent/prompt/index.js.map +1 -1
- package/dist/agent/result-reducer.d.ts +1 -1
- package/dist/agent/result-reducer.d.ts.map +1 -1
- package/dist/agent/run-cancellation.d.ts +1 -12
- package/dist/agent/run-cancellation.d.ts.map +1 -1
- package/dist/agent/run-cancellation.js +1 -96
- package/dist/agent/run-cancellation.js.map +1 -1
- package/dist/agent/run-ledger-types.d.ts +1 -196
- package/dist/agent/run-ledger-types.d.ts.map +1 -1
- package/dist/agent/run-ledger-types.js +1 -8
- package/dist/agent/run-ledger-types.js.map +1 -1
- package/dist/agent/run-ledger.d.ts +1 -43
- package/dist/agent/run-ledger.d.ts.map +1 -1
- package/dist/agent/run-ledger.js +1 -813
- package/dist/agent/run-ledger.js.map +1 -1
- package/dist/agent/run-timeline-events.d.ts +1 -2
- package/dist/agent/run-timeline-events.d.ts.map +1 -1
- package/dist/agent/run-timeline-events.js +1 -238
- package/dist/agent/run-timeline-events.js.map +1 -1
- package/dist/agent/runtime/adapters/index.d.ts +2 -0
- package/dist/agent/runtime/adapters/index.d.ts.map +1 -0
- package/dist/agent/runtime/adapters/index.js +2 -0
- package/dist/agent/runtime/adapters/index.js.map +1 -0
- package/dist/agent/runtime/adapters/mindos.d.ts +21 -0
- package/dist/agent/runtime/adapters/mindos.d.ts.map +1 -0
- package/dist/agent/runtime/adapters/mindos.js +14 -0
- package/dist/agent/runtime/adapters/mindos.js.map +1 -0
- package/dist/agent/runtime/attachments.d.ts +37 -0
- package/dist/agent/runtime/attachments.d.ts.map +1 -0
- package/dist/agent/runtime/attachments.js +187 -0
- package/dist/agent/runtime/attachments.js.map +1 -0
- package/dist/agent/runtime/capabilities.d.ts +10 -0
- package/dist/agent/runtime/capabilities.d.ts.map +1 -0
- package/dist/agent/runtime/capabilities.js +100 -0
- package/dist/agent/runtime/capabilities.js.map +1 -0
- package/dist/agent/runtime/child-process.d.ts +21 -0
- package/dist/agent/runtime/child-process.d.ts.map +1 -0
- package/dist/agent/runtime/child-process.js +29 -0
- package/dist/agent/runtime/child-process.js.map +1 -0
- package/dist/agent/runtime/claude-code-cli.d.ts +40 -0
- package/dist/agent/runtime/claude-code-cli.d.ts.map +1 -0
- package/dist/agent/runtime/claude-code-cli.js +288 -0
- package/dist/agent/runtime/claude-code-cli.js.map +1 -0
- package/dist/agent/runtime/claude-code-sdk.d.ts +62 -0
- package/dist/agent/runtime/claude-code-sdk.d.ts.map +1 -0
- package/dist/agent/runtime/claude-code-sdk.js +613 -0
- package/dist/agent/runtime/claude-code-sdk.js.map +1 -0
- package/dist/agent/runtime/codex-app-server.d.ts +172 -0
- package/dist/agent/runtime/codex-app-server.d.ts.map +1 -0
- package/dist/agent/runtime/codex-app-server.js +700 -0
- package/dist/agent/runtime/codex-app-server.js.map +1 -0
- package/dist/agent/runtime/codex-env.d.ts +42 -0
- package/dist/agent/runtime/codex-env.d.ts.map +1 -0
- package/dist/agent/runtime/codex-env.js +290 -0
- package/dist/agent/runtime/codex-env.js.map +1 -0
- package/dist/agent/runtime/descriptors.d.ts +19 -0
- package/dist/agent/runtime/descriptors.d.ts.map +1 -0
- package/dist/agent/runtime/descriptors.js +143 -0
- package/dist/agent/runtime/descriptors.js.map +1 -0
- package/dist/agent/runtime/detection.d.ts +15 -0
- package/dist/agent/runtime/detection.d.ts.map +1 -0
- package/dist/agent/runtime/detection.js +124 -0
- package/dist/agent/runtime/detection.js.map +1 -0
- package/dist/agent/runtime/index.d.ts +15 -0
- package/dist/agent/runtime/index.d.ts.map +1 -0
- package/dist/agent/runtime/index.js +15 -0
- package/dist/agent/runtime/index.js.map +1 -0
- package/dist/agent/runtime/registry.d.ts +152 -0
- package/dist/agent/runtime/registry.d.ts.map +1 -0
- package/dist/agent/runtime/registry.js +84 -0
- package/dist/agent/runtime/registry.js.map +1 -0
- package/dist/agent/runtime/run.d.ts +129 -0
- package/dist/agent/runtime/run.d.ts.map +1 -0
- package/dist/agent/runtime/run.js +739 -0
- package/dist/agent/runtime/run.js.map +1 -0
- package/dist/agent/runtime/runtime-env.d.ts +28 -0
- package/dist/agent/runtime/runtime-env.d.ts.map +1 -0
- package/dist/agent/runtime/runtime-env.js +66 -0
- package/dist/agent/runtime/runtime-env.js.map +1 -0
- package/dist/agent/runtime/runtime-errors.d.ts +20 -0
- package/dist/agent/runtime/runtime-errors.d.ts.map +1 -0
- package/dist/agent/runtime/runtime-errors.js +95 -0
- package/dist/agent/runtime/runtime-errors.js.map +1 -0
- package/dist/agent/runtime-permission-bridge.d.ts +1 -33
- package/dist/agent/runtime-permission-bridge.d.ts.map +1 -1
- package/dist/agent/runtime-permission-bridge.js +1 -283
- package/dist/agent/runtime-permission-bridge.js.map +1 -1
- package/dist/agent/selected-skills.d.ts +8 -0
- package/dist/agent/selected-skills.d.ts.map +1 -0
- package/dist/agent/selected-skills.js +27 -0
- package/dist/agent/selected-skills.js.map +1 -0
- package/dist/agent/session/index.d.ts +619 -0
- package/dist/agent/session/index.d.ts.map +1 -0
- package/dist/agent/session/index.js +1331 -0
- package/dist/agent/session/index.js.map +1 -0
- package/dist/agent/session/redaction.d.ts +3 -0
- package/dist/agent/session/redaction.d.ts.map +1 -0
- package/dist/agent/session/redaction.js +47 -0
- package/dist/agent/session/redaction.js.map +1 -0
- package/dist/agent/stream/index.d.ts +3 -0
- package/dist/agent/stream/index.d.ts.map +1 -0
- package/dist/agent/stream/index.js +3 -0
- package/dist/agent/stream/index.js.map +1 -0
- package/dist/agent/stream/stream-consumer.d.ts +65 -0
- package/dist/agent/stream/stream-consumer.d.ts.map +1 -0
- package/dist/agent/stream/stream-consumer.js +664 -0
- package/dist/agent/stream/stream-consumer.js.map +1 -0
- package/dist/agent/stream/stream-message-types.d.ts +128 -0
- package/dist/agent/stream/stream-message-types.d.ts.map +1 -0
- package/dist/agent/stream/stream-message-types.js +14 -0
- package/dist/agent/stream/stream-message-types.js.map +1 -0
- package/dist/agent/stream-consumer.d.ts +1 -64
- package/dist/agent/stream-consumer.d.ts.map +1 -1
- package/dist/agent/stream-consumer.js +1 -663
- package/dist/agent/stream-consumer.js.map +1 -1
- package/dist/agent/stream-message-types.d.ts +1 -137
- package/dist/agent/stream-message-types.d.ts.map +1 -1
- package/dist/agent/stream-message-types.js +1 -13
- package/dist/agent/stream-message-types.js.map +1 -1
- package/dist/agent/subagent/index.d.ts +3 -0
- package/dist/agent/subagent/index.d.ts.map +1 -0
- package/dist/agent/subagent/index.js +3 -0
- package/dist/agent/subagent/index.js.map +1 -0
- package/dist/agent/subagent/subagent-ledger-extension.d.ts +36 -0
- package/dist/agent/subagent/subagent-ledger-extension.d.ts.map +1 -0
- package/dist/agent/subagent/subagent-ledger-extension.js +572 -0
- package/dist/agent/subagent/subagent-ledger-extension.js.map +1 -0
- package/dist/agent/subagent/subagent-orchestrator.d.ts +62 -0
- package/dist/agent/subagent/subagent-orchestrator.d.ts.map +1 -0
- package/dist/agent/subagent/subagent-orchestrator.js +350 -0
- package/dist/agent/subagent/subagent-orchestrator.js.map +1 -0
- package/dist/agent/subagent-ledger-extension.d.ts +1 -35
- package/dist/agent/subagent-ledger-extension.d.ts.map +1 -1
- package/dist/agent/subagent-ledger-extension.js +1 -571
- package/dist/agent/subagent-ledger-extension.js.map +1 -1
- package/dist/agent/subagent-orchestrator.d.ts +1 -61
- package/dist/agent/subagent-orchestrator.d.ts.map +1 -1
- package/dist/agent/subagent-orchestrator.js +1 -349
- package/dist/agent/subagent-orchestrator.js.map +1 -1
- package/dist/agent/tool/executable-tool.d.ts +12 -0
- package/dist/agent/tool/executable-tool.d.ts.map +1 -0
- package/dist/agent/tool/executable-tool.js +2 -0
- package/dist/agent/tool/executable-tool.js.map +1 -0
- package/dist/agent/tool/index.d.ts +1 -1
- package/dist/agent/tool/index.d.ts.map +1 -1
- package/dist/agent/tool/index.js +1 -1
- package/dist/agent/tool/index.js.map +1 -1
- package/dist/agent/tool/kb-extension.d.ts +1 -37
- package/dist/agent/tool/kb-extension.d.ts.map +1 -1
- package/dist/agent/tool/kb-extension.js +1 -139
- package/dist/agent/tool/kb-extension.js.map +1 -1
- package/dist/agent/user-question-bridge.d.ts +1 -89
- package/dist/agent/user-question-bridge.d.ts.map +1 -1
- package/dist/agent/user-question-bridge.js +1 -259
- package/dist/agent/user-question-bridge.js.map +1 -1
- package/dist/agent-runtime/adapters/index.d.ts +2 -0
- package/dist/agent-runtime/adapters/index.d.ts.map +1 -0
- package/dist/agent-runtime/adapters/index.js +2 -0
- package/dist/agent-runtime/adapters/index.js.map +1 -0
- package/dist/agent-runtime/adapters/mindos.d.ts +2 -0
- package/dist/agent-runtime/adapters/mindos.d.ts.map +1 -0
- package/dist/agent-runtime/adapters/mindos.js +2 -0
- package/dist/agent-runtime/adapters/mindos.js.map +1 -0
- package/dist/agent-runtime/capabilities.d.ts +1 -9
- package/dist/agent-runtime/capabilities.d.ts.map +1 -1
- package/dist/agent-runtime/capabilities.js +1 -99
- package/dist/agent-runtime/capabilities.js.map +1 -1
- package/dist/agent-runtime/child-process.d.ts +1 -20
- package/dist/agent-runtime/child-process.d.ts.map +1 -1
- package/dist/agent-runtime/child-process.js +1 -28
- package/dist/agent-runtime/child-process.js.map +1 -1
- package/dist/agent-runtime/claude-code-cli.d.ts +1 -35
- package/dist/agent-runtime/claude-code-cli.d.ts.map +1 -1
- package/dist/agent-runtime/claude-code-cli.js +1 -287
- package/dist/agent-runtime/claude-code-cli.js.map +1 -1
- package/dist/agent-runtime/claude-code-sdk.d.ts +1 -40
- package/dist/agent-runtime/claude-code-sdk.d.ts.map +1 -1
- package/dist/agent-runtime/claude-code-sdk.js +1 -571
- package/dist/agent-runtime/claude-code-sdk.js.map +1 -1
- package/dist/agent-runtime/codex-app-server.d.ts +1 -157
- package/dist/agent-runtime/codex-app-server.d.ts.map +1 -1
- package/dist/agent-runtime/codex-app-server.js +1 -665
- package/dist/agent-runtime/codex-app-server.js.map +1 -1
- package/dist/agent-runtime/codex-env.d.ts +1 -41
- package/dist/agent-runtime/codex-env.d.ts.map +1 -1
- package/dist/agent-runtime/codex-env.js +1 -289
- package/dist/agent-runtime/codex-env.js.map +1 -1
- package/dist/agent-runtime/descriptors.d.ts +1 -18
- package/dist/agent-runtime/descriptors.d.ts.map +1 -1
- package/dist/agent-runtime/descriptors.js +1 -142
- package/dist/agent-runtime/descriptors.js.map +1 -1
- package/dist/agent-runtime/detection.d.ts +1 -14
- package/dist/agent-runtime/detection.d.ts.map +1 -1
- package/dist/agent-runtime/detection.js +1 -123
- package/dist/agent-runtime/detection.js.map +1 -1
- package/dist/agent-runtime/index.d.ts +1 -8
- package/dist/agent-runtime/index.d.ts.map +1 -1
- package/dist/agent-runtime/index.js +1 -8
- package/dist/agent-runtime/index.js.map +1 -1
- package/dist/agent-runtime/registry.d.ts +1 -151
- package/dist/agent-runtime/registry.d.ts.map +1 -1
- package/dist/agent-runtime/registry.js +1 -83
- package/dist/agent-runtime/registry.js.map +1 -1
- package/dist/agent-runtime/run.d.ts +1 -124
- package/dist/agent-runtime/run.d.ts.map +1 -1
- package/dist/agent-runtime/run.js +1 -720
- package/dist/agent-runtime/run.js.map +1 -1
- package/dist/agent-runtime/runtime-env.d.ts +1 -27
- package/dist/agent-runtime/runtime-env.d.ts.map +1 -1
- package/dist/agent-runtime/runtime-env.js +1 -65
- package/dist/agent-runtime/runtime-env.js.map +1 -1
- package/dist/agent-runtime/runtime-errors.d.ts +1 -19
- package/dist/agent-runtime/runtime-errors.d.ts.map +1 -1
- package/dist/agent-runtime/runtime-errors.js +1 -94
- package/dist/agent-runtime/runtime-errors.js.map +1 -1
- package/dist/agent-runtime.d.ts +1 -1
- package/dist/agent-runtime.js +1 -1
- package/dist/client.d.ts +8 -4
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js.map +1 -1
- package/dist/foundation/config/schema.d.ts +1 -1
- package/dist/server/contract.d.ts.map +1 -1
- package/dist/server/contract.js +1 -0
- package/dist/server/contract.js.map +1 -1
- package/dist/server/handlers/agent-runtime-codex.d.ts +1 -1
- package/dist/server/handlers/agent-runtime-codex.js +2 -2
- package/dist/server/handlers/agent-runtimes.d.ts +3 -3
- package/dist/server/handlers/agent-runtimes.js +5 -5
- package/dist/server/handlers/ask.d.ts +42 -4
- package/dist/server/handlers/ask.d.ts.map +1 -1
- package/dist/server/handlers/ask.js +124 -1
- package/dist/server/handlers/ask.js.map +1 -1
- package/dist/server/handlers/inbox-source.d.ts +1 -1
- package/dist/server/handlers/inbox-source.d.ts.map +1 -1
- package/dist/server/handlers/inbox-source.js +22 -0
- package/dist/server/handlers/inbox-source.js.map +1 -1
- package/dist/server/handlers/mcp-install.d.ts +18 -0
- package/dist/server/handlers/mcp-install.d.ts.map +1 -1
- package/dist/server/handlers/mcp-install.js +423 -3
- package/dist/server/handlers/mcp-install.js.map +1 -1
- package/dist/server/handlers/settings.d.ts +1 -1
- package/dist/server/handlers/settings.js +1 -1
- package/dist/server/handlers/setup.d.ts +2 -1
- package/dist/server/handlers/setup.d.ts.map +1 -1
- package/dist/server/handlers/setup.js +1 -0
- package/dist/server/handlers/setup.js.map +1 -1
- package/dist/server/http.d.ts.map +1 -1
- package/dist/server/http.js +9 -1
- package/dist/server/http.js.map +1 -1
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/server/route-ownership.d.ts.map +1 -1
- package/dist/server/route-ownership.js +1 -0
- package/dist/server/route-ownership.js.map +1 -1
- package/dist/server/runtime.d.ts +1 -1
- package/dist/session/index.d.ts +1 -650
- package/dist/session/index.d.ts.map +1 -1
- package/dist/session/index.js +1 -1455
- package/dist/session/index.js.map +1 -1
- package/dist/session/pi-coding-agent-runtime.d.ts +1 -9
- package/dist/session/pi-coding-agent-runtime.d.ts.map +1 -1
- package/dist/session/pi-coding-agent-runtime.js +1 -30
- package/dist/session/pi-coding-agent-runtime.js.map +1 -1
- package/dist/session/redaction.d.ts +1 -2
- package/dist/session/redaction.d.ts.map +1 -1
- package/dist/session/redaction.js +1 -46
- package/dist/session/redaction.js.map +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +1 -1
- package/dist/session.js.map +1 -1
- package/dist/setup/index.d.ts +24 -3
- package/dist/setup/index.d.ts.map +1 -1
- package/dist/setup/index.js +102 -2
- package/dist/setup/index.js.map +1 -1
- package/package.json +97 -9
|
@@ -1,90 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
label: string;
|
|
3
|
-
description: string;
|
|
4
|
-
preview?: string;
|
|
5
|
-
};
|
|
6
|
-
export type AskUserQuestionQuestion = {
|
|
7
|
-
question: string;
|
|
8
|
-
header: string;
|
|
9
|
-
options: AskUserQuestionOption[];
|
|
10
|
-
multiSelect?: boolean;
|
|
11
|
-
};
|
|
12
|
-
export type AskUserQuestionParams = {
|
|
13
|
-
questions: AskUserQuestionQuestion[];
|
|
14
|
-
};
|
|
15
|
-
export type AskUserQuestionAnswer = {
|
|
16
|
-
questionIndex: number;
|
|
17
|
-
question: string;
|
|
18
|
-
kind: 'option' | 'custom' | 'chat' | 'multi';
|
|
19
|
-
answer: string | null;
|
|
20
|
-
selected?: string[];
|
|
21
|
-
notes?: string;
|
|
22
|
-
preview?: string;
|
|
23
|
-
};
|
|
24
|
-
export type AskUserQuestionResult = {
|
|
25
|
-
answers: AskUserQuestionAnswer[];
|
|
26
|
-
cancelled: boolean;
|
|
27
|
-
error?: string;
|
|
28
|
-
};
|
|
29
|
-
export type UserQuestionStartEvent = {
|
|
30
|
-
type: 'user_question_start';
|
|
31
|
-
runId: string;
|
|
32
|
-
toolCallId: string;
|
|
33
|
-
questions: AskUserQuestionQuestion[];
|
|
34
|
-
};
|
|
35
|
-
export type UserQuestionAnsweredEvent = {
|
|
36
|
-
type: 'user_question_answered';
|
|
37
|
-
runId: string;
|
|
38
|
-
toolCallId: string;
|
|
39
|
-
answers: AskUserQuestionAnswer[];
|
|
40
|
-
};
|
|
41
|
-
export type UserQuestionCancelledEvent = {
|
|
42
|
-
type: 'user_question_cancelled';
|
|
43
|
-
runId: string;
|
|
44
|
-
toolCallId: string;
|
|
45
|
-
reason: string;
|
|
46
|
-
};
|
|
47
|
-
export type AskUserQuestionBridgeSend = (event: UserQuestionStartEvent | UserQuestionAnsweredEvent | UserQuestionCancelledEvent) => void;
|
|
48
|
-
export type AskUserQuestionBridgeContext = {
|
|
49
|
-
runId: string;
|
|
50
|
-
send: AskUserQuestionBridgeSend;
|
|
51
|
-
timeoutMs?: number;
|
|
52
|
-
};
|
|
53
|
-
export declare function runWithAskUserQuestionBridge<T>(context: AskUserQuestionBridgeContext, callback: () => Promise<T>): Promise<T>;
|
|
54
|
-
export declare function hasAskUserQuestionBridge(): boolean;
|
|
55
|
-
export declare function askUserQuestionViaBridge(input: {
|
|
56
|
-
toolCallId: string;
|
|
57
|
-
params: unknown;
|
|
58
|
-
signal?: AbortSignal;
|
|
59
|
-
}): Promise<AskUserQuestionResult>;
|
|
60
|
-
export declare function askUserQuestionForRun(input: {
|
|
61
|
-
runId: string;
|
|
62
|
-
toolCallId: string;
|
|
63
|
-
params: unknown;
|
|
64
|
-
signal?: AbortSignal;
|
|
65
|
-
}): Promise<AskUserQuestionResult>;
|
|
66
|
-
export declare function answerAskUserQuestion(input: {
|
|
67
|
-
runId: string;
|
|
68
|
-
toolCallId: string;
|
|
69
|
-
answers: AskUserQuestionAnswer[];
|
|
70
|
-
cancelled?: boolean;
|
|
71
|
-
}): {
|
|
72
|
-
ok: true;
|
|
73
|
-
} | {
|
|
74
|
-
ok: false;
|
|
75
|
-
status: number;
|
|
76
|
-
error: string;
|
|
77
|
-
};
|
|
78
|
-
export declare function cancelAskUserQuestion(input: {
|
|
79
|
-
runId: string;
|
|
80
|
-
toolCallId: string;
|
|
81
|
-
reason?: string;
|
|
82
|
-
}): {
|
|
83
|
-
ok: true;
|
|
84
|
-
} | {
|
|
85
|
-
ok: false;
|
|
86
|
-
status: number;
|
|
87
|
-
error: string;
|
|
88
|
-
};
|
|
89
|
-
export declare function getPendingAskUserQuestionCount(): number;
|
|
1
|
+
export * from './bridges/user-question-bridge.js';
|
|
90
2
|
//# sourceMappingURL=user-question-bridge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-question-bridge.d.ts","sourceRoot":"","sources":["../../src/agent/user-question-bridge.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"user-question-bridge.d.ts","sourceRoot":"","sources":["../../src/agent/user-question-bridge.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC"}
|
|
@@ -1,260 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* AskUserQuestion bridge: an agent raises structured questions mid-run, the
|
|
3
|
-
* UI answers them through a separate HTTP route. Sunk from
|
|
4
|
-
* packages/web/lib/agent/user-question-bridge.ts
|
|
5
|
-
* (spec-agent-core-consolidation Wave 2). Same shape as the runtime
|
|
6
|
-
* permission bridge: the pending map is shared across module copies via
|
|
7
|
-
* global-state.
|
|
8
|
-
*/
|
|
9
|
-
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
10
|
-
import { ASK_USER_QUESTION_BRIDGE_KEY, getProcessGlobal } from './global-state.js';
|
|
11
|
-
const DEFAULT_TIMEOUT_MS = 10 * 60 * 1000;
|
|
12
|
-
function getGlobalBridgeState() {
|
|
13
|
-
return getProcessGlobal(ASK_USER_QUESTION_BRIDGE_KEY, () => ({
|
|
14
|
-
bridgeContext: new AsyncLocalStorage(),
|
|
15
|
-
runs: new Map(),
|
|
16
|
-
pendingQuestions: new Map(),
|
|
17
|
-
}));
|
|
18
|
-
}
|
|
19
|
-
const bridgeState = getGlobalBridgeState();
|
|
20
|
-
const bridgeContext = bridgeState.bridgeContext;
|
|
21
|
-
const runs = bridgeState.runs;
|
|
22
|
-
const pendingQuestions = bridgeState.pendingQuestions;
|
|
23
|
-
function pendingKey(runId, toolCallId) {
|
|
24
|
-
return `${runId}:${toolCallId}`;
|
|
25
|
-
}
|
|
26
|
-
function isRecord(value) {
|
|
27
|
-
return Boolean(value) && typeof value === 'object' && !Array.isArray(value);
|
|
28
|
-
}
|
|
29
|
-
function normalizeQuestions(params) {
|
|
30
|
-
if (!isRecord(params) || !Array.isArray(params.questions))
|
|
31
|
-
return [];
|
|
32
|
-
return params.questions
|
|
33
|
-
.filter(isRecord)
|
|
34
|
-
.map((question) => ({
|
|
35
|
-
question: typeof question.question === 'string' ? question.question : '',
|
|
36
|
-
header: typeof question.header === 'string' ? question.header : '',
|
|
37
|
-
multiSelect: question.multiSelect === true,
|
|
38
|
-
options: Array.isArray(question.options)
|
|
39
|
-
? question.options.filter(isRecord).map((option) => ({
|
|
40
|
-
label: typeof option.label === 'string' ? option.label : '',
|
|
41
|
-
description: typeof option.description === 'string' ? option.description : '',
|
|
42
|
-
...(typeof option.preview === 'string' ? { preview: option.preview } : {}),
|
|
43
|
-
}))
|
|
44
|
-
: [],
|
|
45
|
-
}));
|
|
46
|
-
}
|
|
47
|
-
function cancelled(reason) {
|
|
48
|
-
return { answers: [], cancelled: true, error: reason };
|
|
49
|
-
}
|
|
50
|
-
export function runWithAskUserQuestionBridge(context, callback) {
|
|
51
|
-
runs.set(context.runId, context);
|
|
52
|
-
return bridgeContext.run(context, async () => {
|
|
53
|
-
try {
|
|
54
|
-
return await callback();
|
|
55
|
-
}
|
|
56
|
-
finally {
|
|
57
|
-
// Two bridges can share a runId (e.g. a retried request) — only tear
|
|
58
|
-
// down state that still belongs to THIS bridge instance.
|
|
59
|
-
cancelQuestionsForRun(context.runId, context);
|
|
60
|
-
if (runs.get(context.runId) === context) {
|
|
61
|
-
runs.delete(context.runId);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
export function hasAskUserQuestionBridge() {
|
|
67
|
-
return Boolean(bridgeContext.getStore());
|
|
68
|
-
}
|
|
69
|
-
export async function askUserQuestionViaBridge(input) {
|
|
70
|
-
const context = bridgeContext.getStore();
|
|
71
|
-
if (!context)
|
|
72
|
-
return cancelled('no_bridge');
|
|
73
|
-
return enqueueAskUserQuestion(context, input);
|
|
74
|
-
}
|
|
75
|
-
export async function askUserQuestionForRun(input) {
|
|
76
|
-
const context = runs.get(input.runId);
|
|
77
|
-
if (!context)
|
|
78
|
-
return cancelled('no_bridge');
|
|
79
|
-
return enqueueAskUserQuestion(context, input);
|
|
80
|
-
}
|
|
81
|
-
function enqueueAskUserQuestion(context, input) {
|
|
82
|
-
const questions = normalizeQuestions(input.params);
|
|
83
|
-
if (questions.length === 0)
|
|
84
|
-
return Promise.resolve(cancelled('empty_questions'));
|
|
85
|
-
const params = { questions };
|
|
86
|
-
const key = pendingKey(context.runId, input.toolCallId);
|
|
87
|
-
if (pendingQuestions.has(key))
|
|
88
|
-
return Promise.resolve(cancelled('duplicate_question'));
|
|
89
|
-
return new Promise((resolve, reject) => {
|
|
90
|
-
let abort;
|
|
91
|
-
const finish = (result) => {
|
|
92
|
-
const pending = pendingQuestions.get(key);
|
|
93
|
-
if (!pending)
|
|
94
|
-
return;
|
|
95
|
-
clearTimeout(pending.timeout);
|
|
96
|
-
if (abort)
|
|
97
|
-
input.signal?.removeEventListener('abort', abort);
|
|
98
|
-
pendingQuestions.delete(key);
|
|
99
|
-
resolve(result);
|
|
100
|
-
};
|
|
101
|
-
const timeout = setTimeout(() => {
|
|
102
|
-
context.send({
|
|
103
|
-
type: 'user_question_cancelled',
|
|
104
|
-
runId: context.runId,
|
|
105
|
-
toolCallId: input.toolCallId,
|
|
106
|
-
reason: 'timeout',
|
|
107
|
-
});
|
|
108
|
-
finish(cancelled('timeout'));
|
|
109
|
-
}, context.timeoutMs ?? DEFAULT_TIMEOUT_MS);
|
|
110
|
-
pendingQuestions.set(key, {
|
|
111
|
-
runId: context.runId,
|
|
112
|
-
toolCallId: input.toolCallId,
|
|
113
|
-
params,
|
|
114
|
-
send: context.send,
|
|
115
|
-
context,
|
|
116
|
-
resolve: finish,
|
|
117
|
-
reject,
|
|
118
|
-
timeout,
|
|
119
|
-
});
|
|
120
|
-
abort = () => {
|
|
121
|
-
context.send({
|
|
122
|
-
type: 'user_question_cancelled',
|
|
123
|
-
runId: context.runId,
|
|
124
|
-
toolCallId: input.toolCallId,
|
|
125
|
-
reason: 'aborted',
|
|
126
|
-
});
|
|
127
|
-
finish(cancelled('aborted'));
|
|
128
|
-
};
|
|
129
|
-
if (input.signal?.aborted) {
|
|
130
|
-
abort();
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
input.signal?.addEventListener('abort', abort, { once: true });
|
|
134
|
-
context.send({
|
|
135
|
-
type: 'user_question_start',
|
|
136
|
-
runId: context.runId,
|
|
137
|
-
toolCallId: input.toolCallId,
|
|
138
|
-
questions,
|
|
139
|
-
});
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
function cancelQuestionsForRun(runId, context) {
|
|
143
|
-
for (const pending of Array.from(pendingQuestions.values())) {
|
|
144
|
-
if (pending.runId !== runId)
|
|
145
|
-
continue;
|
|
146
|
-
if (context && pending.context !== context)
|
|
147
|
-
continue;
|
|
148
|
-
pending.send({
|
|
149
|
-
type: 'user_question_cancelled',
|
|
150
|
-
runId,
|
|
151
|
-
toolCallId: pending.toolCallId,
|
|
152
|
-
reason: 'run_finished',
|
|
153
|
-
});
|
|
154
|
-
pending.resolve(cancelled('run_finished'));
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
export function answerAskUserQuestion(input) {
|
|
158
|
-
const key = pendingKey(input.runId, input.toolCallId);
|
|
159
|
-
const pending = pendingQuestions.get(key);
|
|
160
|
-
if (!pending)
|
|
161
|
-
return { ok: false, status: 404, error: 'Question is no longer pending.' };
|
|
162
|
-
const validation = input.cancelled === true
|
|
163
|
-
? { ok: true, answers: [] }
|
|
164
|
-
: validateAnswers(pending.params.questions, input.answers);
|
|
165
|
-
if (!validation.ok)
|
|
166
|
-
return { ok: false, status: 400, error: validation.error };
|
|
167
|
-
const result = {
|
|
168
|
-
answers: validation.answers,
|
|
169
|
-
cancelled: input.cancelled === true,
|
|
170
|
-
};
|
|
171
|
-
pending.send(input.cancelled === true
|
|
172
|
-
? {
|
|
173
|
-
type: 'user_question_cancelled',
|
|
174
|
-
runId: input.runId,
|
|
175
|
-
toolCallId: input.toolCallId,
|
|
176
|
-
reason: 'user_cancelled',
|
|
177
|
-
}
|
|
178
|
-
: {
|
|
179
|
-
type: 'user_question_answered',
|
|
180
|
-
runId: input.runId,
|
|
181
|
-
toolCallId: input.toolCallId,
|
|
182
|
-
answers: result.answers,
|
|
183
|
-
});
|
|
184
|
-
pending.resolve(result);
|
|
185
|
-
return { ok: true };
|
|
186
|
-
}
|
|
187
|
-
function validateAnswers(questions, answers) {
|
|
188
|
-
if (!Array.isArray(answers) || answers.length === 0) {
|
|
189
|
-
return { ok: false, error: 'At least one answer is required.' };
|
|
190
|
-
}
|
|
191
|
-
const seen = new Set();
|
|
192
|
-
for (const answer of answers) {
|
|
193
|
-
if (!Number.isInteger(answer.questionIndex)) {
|
|
194
|
-
return { ok: false, error: 'Answer questionIndex must be an integer.' };
|
|
195
|
-
}
|
|
196
|
-
if (seen.has(answer.questionIndex)) {
|
|
197
|
-
return { ok: false, error: 'Each question can only be answered once.' };
|
|
198
|
-
}
|
|
199
|
-
seen.add(answer.questionIndex);
|
|
200
|
-
const question = questions[answer.questionIndex];
|
|
201
|
-
if (!question) {
|
|
202
|
-
return { ok: false, error: 'Answer questionIndex does not match a pending question.' };
|
|
203
|
-
}
|
|
204
|
-
if (answer.question !== question.question) {
|
|
205
|
-
return { ok: false, error: 'Answer question text does not match the pending question.' };
|
|
206
|
-
}
|
|
207
|
-
const optionLabels = new Set(question.options.map((option) => option.label));
|
|
208
|
-
if (answer.kind === 'option') {
|
|
209
|
-
if (question.multiSelect) {
|
|
210
|
-
return { ok: false, error: 'Use a multi answer for multi-select questions.' };
|
|
211
|
-
}
|
|
212
|
-
if (typeof answer.answer !== 'string' || !answer.answer.trim()) {
|
|
213
|
-
return { ok: false, error: 'Option answers must include a selected option.' };
|
|
214
|
-
}
|
|
215
|
-
if (optionLabels.size > 0 && !optionLabels.has(answer.answer)) {
|
|
216
|
-
return { ok: false, error: 'Selected option is not valid for this question.' };
|
|
217
|
-
}
|
|
218
|
-
continue;
|
|
219
|
-
}
|
|
220
|
-
if (answer.kind === 'multi') {
|
|
221
|
-
if (!question.multiSelect) {
|
|
222
|
-
return { ok: false, error: 'Use a single answer for single-select questions.' };
|
|
223
|
-
}
|
|
224
|
-
const selected = Array.isArray(answer.selected) ? answer.selected : [];
|
|
225
|
-
if (selected.length === 0) {
|
|
226
|
-
return { ok: false, error: 'Multi-select answers must include at least one option.' };
|
|
227
|
-
}
|
|
228
|
-
if (optionLabels.size > 0 && selected.some((value) => !optionLabels.has(value))) {
|
|
229
|
-
return { ok: false, error: 'Selected option is not valid for this question.' };
|
|
230
|
-
}
|
|
231
|
-
continue;
|
|
232
|
-
}
|
|
233
|
-
if (answer.kind === 'custom' || answer.kind === 'chat') {
|
|
234
|
-
if (typeof answer.answer !== 'string' || !answer.answer.trim()) {
|
|
235
|
-
return { ok: false, error: 'Custom answers must include text.' };
|
|
236
|
-
}
|
|
237
|
-
continue;
|
|
238
|
-
}
|
|
239
|
-
return { ok: false, error: 'Answer kind is not valid.' };
|
|
240
|
-
}
|
|
241
|
-
return { ok: true, answers };
|
|
242
|
-
}
|
|
243
|
-
export function cancelAskUserQuestion(input) {
|
|
244
|
-
const key = pendingKey(input.runId, input.toolCallId);
|
|
245
|
-
const pending = pendingQuestions.get(key);
|
|
246
|
-
if (!pending)
|
|
247
|
-
return { ok: false, status: 404, error: 'Question is no longer pending.' };
|
|
248
|
-
pending.send({
|
|
249
|
-
type: 'user_question_cancelled',
|
|
250
|
-
runId: input.runId,
|
|
251
|
-
toolCallId: input.toolCallId,
|
|
252
|
-
reason: input.reason ?? 'user_cancelled',
|
|
253
|
-
});
|
|
254
|
-
pending.resolve(cancelled(input.reason ?? 'user_cancelled'));
|
|
255
|
-
return { ok: true };
|
|
256
|
-
}
|
|
257
|
-
export function getPendingAskUserQuestionCount() {
|
|
258
|
-
return pendingQuestions.size;
|
|
259
|
-
}
|
|
1
|
+
export * from './bridges/user-question-bridge.js';
|
|
260
2
|
//# sourceMappingURL=user-question-bridge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-question-bridge.js","sourceRoot":"","sources":["../../src/agent/user-question-bridge.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"user-question-bridge.js","sourceRoot":"","sources":["../../src/agent/user-question-bridge.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agent-runtime/adapters/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/agent-runtime/adapters/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mindos.d.ts","sourceRoot":"","sources":["../../../src/agent-runtime/adapters/mindos.ts"],"names":[],"mappings":"AAAA,cAAc,wCAAwC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mindos.js","sourceRoot":"","sources":["../../../src/agent-runtime/adapters/mindos.ts"],"names":[],"mappings":"AAAA,cAAc,wCAAwC,CAAC"}
|
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const mindosCapabilities: AgentRuntimeCapabilities;
|
|
3
|
-
export declare const codexCapabilities: AgentRuntimeCapabilities;
|
|
4
|
-
export declare const claudeCapabilities: AgentRuntimeCapabilities;
|
|
5
|
-
export declare const acpCapabilities: AgentRuntimeCapabilities;
|
|
6
|
-
export declare const mindosHarnessCapabilities: AgentRuntimeHarnessCapabilities;
|
|
7
|
-
export declare const codexHarnessCapabilities: AgentRuntimeHarnessCapabilities;
|
|
8
|
-
export declare const claudeHarnessCapabilities: AgentRuntimeHarnessCapabilities;
|
|
9
|
-
export declare const acpHarnessCapabilities: AgentRuntimeHarnessCapabilities;
|
|
1
|
+
export * from '../agent/runtime/capabilities.js';
|
|
10
2
|
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/capabilities.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/capabilities.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC"}
|
|
@@ -1,100 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
ownsModelSelection: true,
|
|
3
|
-
supportsResume: true,
|
|
4
|
-
supportsFreshSession: true,
|
|
5
|
-
supportsListSessions: true,
|
|
6
|
-
supportsAttachExisting: false,
|
|
7
|
-
supportsFork: false,
|
|
8
|
-
supportsArchive: false,
|
|
9
|
-
supportsInterrupt: true,
|
|
10
|
-
supportsModelList: true,
|
|
11
|
-
supportsApprovals: false,
|
|
12
|
-
supportsUserInput: true,
|
|
13
|
-
supportsToolEvents: true,
|
|
14
|
-
supportsRuntimeStatus: true,
|
|
15
|
-
supportsDiffs: false,
|
|
16
|
-
supportsCheckpoints: false,
|
|
17
|
-
supportsBackgroundRuns: false,
|
|
18
|
-
supportsMcpConfig: true,
|
|
19
|
-
};
|
|
20
|
-
const nativeBaseCapabilities = {
|
|
21
|
-
ownsModelSelection: true,
|
|
22
|
-
supportsResume: true,
|
|
23
|
-
supportsFreshSession: true,
|
|
24
|
-
supportsListSessions: false,
|
|
25
|
-
supportsAttachExisting: false,
|
|
26
|
-
supportsFork: false,
|
|
27
|
-
supportsArchive: false,
|
|
28
|
-
supportsInterrupt: true,
|
|
29
|
-
supportsModelList: false,
|
|
30
|
-
supportsApprovals: true,
|
|
31
|
-
supportsUserInput: true,
|
|
32
|
-
supportsToolEvents: true,
|
|
33
|
-
supportsRuntimeStatus: true,
|
|
34
|
-
supportsDiffs: false,
|
|
35
|
-
supportsCheckpoints: false,
|
|
36
|
-
supportsBackgroundRuns: false,
|
|
37
|
-
supportsMcpConfig: true,
|
|
38
|
-
};
|
|
39
|
-
export const codexCapabilities = {
|
|
40
|
-
...nativeBaseCapabilities,
|
|
41
|
-
supportsListSessions: true,
|
|
42
|
-
supportsAttachExisting: true,
|
|
43
|
-
supportsFork: true,
|
|
44
|
-
supportsArchive: true,
|
|
45
|
-
};
|
|
46
|
-
export const claudeCapabilities = {
|
|
47
|
-
...nativeBaseCapabilities,
|
|
48
|
-
};
|
|
49
|
-
export const acpCapabilities = {
|
|
50
|
-
ownsModelSelection: true,
|
|
51
|
-
supportsResume: false,
|
|
52
|
-
supportsFreshSession: false,
|
|
53
|
-
supportsListSessions: false,
|
|
54
|
-
supportsAttachExisting: false,
|
|
55
|
-
supportsFork: false,
|
|
56
|
-
supportsArchive: false,
|
|
57
|
-
supportsInterrupt: true,
|
|
58
|
-
supportsModelList: false,
|
|
59
|
-
supportsApprovals: false,
|
|
60
|
-
supportsUserInput: false,
|
|
61
|
-
supportsToolEvents: true,
|
|
62
|
-
supportsRuntimeStatus: false,
|
|
63
|
-
supportsDiffs: false,
|
|
64
|
-
supportsCheckpoints: false,
|
|
65
|
-
supportsBackgroundRuns: false,
|
|
66
|
-
supportsMcpConfig: false,
|
|
67
|
-
};
|
|
68
|
-
export const mindosHarnessCapabilities = {
|
|
69
|
-
session: 'local-id',
|
|
70
|
-
eventStream: ['text', 'tool-events', 'runtime-status', 'user-input'],
|
|
71
|
-
workspace: 'local-cwd',
|
|
72
|
-
permissions: 'mindos-only',
|
|
73
|
-
tools: ['file', 'mcp', 'skills'],
|
|
74
|
-
output: ['text', 'artifact'],
|
|
75
|
-
};
|
|
76
|
-
export const codexHarnessCapabilities = {
|
|
77
|
-
session: 'native-thread',
|
|
78
|
-
eventStream: ['text', 'tool-events', 'thread-turn-item', 'runtime-status', 'permissions', 'user-input'],
|
|
79
|
-
workspace: 'local-cwd',
|
|
80
|
-
permissions: 'runtime-bridged',
|
|
81
|
-
tools: ['shell', 'file', 'git', 'mcp'],
|
|
82
|
-
output: ['text', 'diff', 'checkpoint', 'artifact', 'branch', 'pr'],
|
|
83
|
-
};
|
|
84
|
-
export const claudeHarnessCapabilities = {
|
|
85
|
-
session: 'local-id',
|
|
86
|
-
eventStream: ['text', 'tool-events', 'runtime-status', 'permissions', 'user-input'],
|
|
87
|
-
workspace: 'local-cwd',
|
|
88
|
-
permissions: 'runtime-bridged',
|
|
89
|
-
tools: ['shell', 'file', 'git', 'mcp'],
|
|
90
|
-
output: ['text', 'diff', 'artifact'],
|
|
91
|
-
};
|
|
92
|
-
export const acpHarnessCapabilities = {
|
|
93
|
-
session: 'none',
|
|
94
|
-
eventStream: ['text', 'tool-events'],
|
|
95
|
-
workspace: 'local-cwd',
|
|
96
|
-
permissions: 'none',
|
|
97
|
-
tools: ['shell', 'file'],
|
|
98
|
-
output: ['text'],
|
|
99
|
-
};
|
|
1
|
+
export * from '../agent/runtime/capabilities.js';
|
|
100
2
|
//# sourceMappingURL=capabilities.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../src/agent-runtime/capabilities.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../src/agent-runtime/capabilities.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC"}
|
|
@@ -1,21 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export declare const CHILD_LOG_BUFFER_MAX_LENGTH: number;
|
|
3
|
-
export type KillableChildProcess = {
|
|
4
|
-
exitCode: number | null;
|
|
5
|
-
signalCode: NodeJS.Signals | null;
|
|
6
|
-
kill(signal?: NodeJS.Signals): boolean;
|
|
7
|
-
once(event: 'exit', listener: () => void): unknown;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* SIGTERM the child, then SIGKILL it if it has not exited within the grace
|
|
11
|
-
* period. A child that traps or ignores SIGTERM would otherwise keep the
|
|
12
|
-
* turn (and its pipes) alive forever.
|
|
13
|
-
*/
|
|
14
|
-
export declare function killChildWithEscalation(child: KillableChildProcess, graceMs?: number): void;
|
|
15
|
-
/**
|
|
16
|
-
* Append a chunk to a diagnostic log buffer, keeping only the most recent
|
|
17
|
-
* output. stderr from a crashing child can be arbitrarily large; only the
|
|
18
|
-
* tail is useful in error messages.
|
|
19
|
-
*/
|
|
20
|
-
export declare function appendBoundedLog(current: string, chunk: unknown, maxLength?: number): string;
|
|
1
|
+
export * from '../agent/runtime/child-process.js';
|
|
21
2
|
//# sourceMappingURL=child-process.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"child-process.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/child-process.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"child-process.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/child-process.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC"}
|
|
@@ -1,29 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export const CHILD_LOG_BUFFER_MAX_LENGTH = 32 * 1024;
|
|
3
|
-
/**
|
|
4
|
-
* SIGTERM the child, then SIGKILL it if it has not exited within the grace
|
|
5
|
-
* period. A child that traps or ignores SIGTERM would otherwise keep the
|
|
6
|
-
* turn (and its pipes) alive forever.
|
|
7
|
-
*/
|
|
8
|
-
export function killChildWithEscalation(child, graceMs = CHILD_KILL_GRACE_MS) {
|
|
9
|
-
if (child.exitCode !== null || child.signalCode !== null)
|
|
10
|
-
return;
|
|
11
|
-
child.kill('SIGTERM');
|
|
12
|
-
const timer = setTimeout(() => {
|
|
13
|
-
if (child.exitCode === null && child.signalCode === null) {
|
|
14
|
-
child.kill('SIGKILL');
|
|
15
|
-
}
|
|
16
|
-
}, graceMs);
|
|
17
|
-
timer.unref?.();
|
|
18
|
-
child.once('exit', () => clearTimeout(timer));
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Append a chunk to a diagnostic log buffer, keeping only the most recent
|
|
22
|
-
* output. stderr from a crashing child can be arbitrarily large; only the
|
|
23
|
-
* tail is useful in error messages.
|
|
24
|
-
*/
|
|
25
|
-
export function appendBoundedLog(current, chunk, maxLength = CHILD_LOG_BUFFER_MAX_LENGTH) {
|
|
26
|
-
const next = current + String(chunk);
|
|
27
|
-
return next.length > maxLength ? next.slice(next.length - maxLength) : next;
|
|
28
|
-
}
|
|
1
|
+
export * from '../agent/runtime/child-process.js';
|
|
29
2
|
//# sourceMappingURL=child-process.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"child-process.js","sourceRoot":"","sources":["../../src/agent-runtime/child-process.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"child-process.js","sourceRoot":"","sources":["../../src/agent-runtime/child-process.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC"}
|
|
@@ -1,36 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export type ClaudeCodeCliTransport = {
|
|
3
|
-
run(args: string[], options: {
|
|
4
|
-
cwd: string;
|
|
5
|
-
signal?: AbortSignal;
|
|
6
|
-
}): AsyncIterable<string>;
|
|
7
|
-
close?(): void | Promise<void>;
|
|
8
|
-
};
|
|
9
|
-
export type ClaudeCodeCliPermissionPrompt = {
|
|
10
|
-
toolName: string;
|
|
11
|
-
mcpConfig: string | Record<string, unknown>;
|
|
12
|
-
};
|
|
13
|
-
export type ClaudeCodeCliPermissionMode = 'default' | 'acceptEdits' | 'bypassPermissions' | 'plan' | 'dontAsk' | 'auto';
|
|
14
|
-
export type ClaudeCodeCliClient = {
|
|
15
|
-
startTurn(input: {
|
|
16
|
-
prompt: string;
|
|
17
|
-
cwd: string;
|
|
18
|
-
sessionId?: string;
|
|
19
|
-
model?: string;
|
|
20
|
-
effort?: 'low' | 'medium' | 'high' | 'xhigh';
|
|
21
|
-
permissionMode?: ClaudeCodeCliPermissionMode;
|
|
22
|
-
permissionPrompt?: ClaudeCodeCliPermissionPrompt;
|
|
23
|
-
signal?: AbortSignal;
|
|
24
|
-
}): AsyncIterable<ClaudeCodeCliEvent>;
|
|
25
|
-
close?(): void | Promise<void>;
|
|
26
|
-
};
|
|
27
|
-
export type ClaudeCodeCliEvent = {
|
|
28
|
-
type: 'session_id';
|
|
29
|
-
sessionId: string;
|
|
30
|
-
} | MindOSSSEvent;
|
|
31
|
-
export declare function createClaudeCodeCliClient(transport: ClaudeCodeCliTransport): ClaudeCodeCliClient;
|
|
32
|
-
export declare function createClaudeCodeCliStdioTransport(options?: {
|
|
33
|
-
command?: string;
|
|
34
|
-
env?: NodeJS.ProcessEnv;
|
|
35
|
-
}): ClaudeCodeCliTransport;
|
|
1
|
+
export * from '../agent/runtime/claude-code-cli.js';
|
|
36
2
|
//# sourceMappingURL=claude-code-cli.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-code-cli.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/claude-code-cli.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"claude-code-cli.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/claude-code-cli.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC"}
|