@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,124 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export function isRecord(value) {
|
|
3
|
-
return !!value && typeof value === 'object' && !Array.isArray(value);
|
|
4
|
-
}
|
|
5
|
-
export function classifyRuntimeFailure(message, runtime) {
|
|
6
|
-
const normalized = message.trim() || 'Runtime failed to start.';
|
|
7
|
-
const summary = summarizeRuntimeFailure(normalized, { runtime });
|
|
8
|
-
if (/\b(login|log in|signin|sign in|auth|authentication|unauthori[sz]ed|credential|api key|token)\b/i.test(normalized)) {
|
|
9
|
-
return {
|
|
10
|
-
status: 'signed-out',
|
|
11
|
-
reason: summary.reason,
|
|
12
|
-
...(summary.diagnosticHints ? { diagnosticHints: summary.diagnosticHints } : {}),
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
if (/missing environment variable/i.test(normalized)) {
|
|
16
|
-
return {
|
|
17
|
-
status: 'signed-out',
|
|
18
|
-
reason: summary.reason,
|
|
19
|
-
...(summary.diagnosticHints ? { diagnosticHints: summary.diagnosticHints } : {}),
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
return {
|
|
23
|
-
status: 'error',
|
|
24
|
-
reason: summary.reason,
|
|
25
|
-
...(summary.diagnosticHints ? { diagnosticHints: summary.diagnosticHints } : {}),
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
function isResolvedCommandSource(value) {
|
|
29
|
-
return value === 'user-override' || value === 'descriptor' || value === 'registry';
|
|
30
|
-
}
|
|
31
|
-
function isInstalledRuntimeStatus(value) {
|
|
32
|
-
return value === 'available' || value === 'signed-out' || value === 'error';
|
|
33
|
-
}
|
|
34
|
-
function isMissingRuntimeStatus(value) {
|
|
35
|
-
return value === 'missing' || value === 'error';
|
|
36
|
-
}
|
|
37
|
-
export function normalizeResolvedCommand(value) {
|
|
38
|
-
if (!isRecord(value))
|
|
39
|
-
return null;
|
|
40
|
-
if (typeof value.cmd !== 'string' || !Array.isArray(value.args) || !value.args.every((arg) => typeof arg === 'string'))
|
|
41
|
-
return null;
|
|
42
|
-
if (!isResolvedCommandSource(value.source))
|
|
43
|
-
return null;
|
|
44
|
-
return {
|
|
45
|
-
cmd: value.cmd,
|
|
46
|
-
args: value.args,
|
|
47
|
-
source: value.source,
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
export function normalizeDiagnosticHints(value) {
|
|
51
|
-
if (!Array.isArray(value))
|
|
52
|
-
return undefined;
|
|
53
|
-
const hints = value
|
|
54
|
-
.filter((hint) => typeof hint === 'string' && hint.trim().length > 0)
|
|
55
|
-
.map((hint) => hint.trim());
|
|
56
|
-
return hints.length > 0 ? Array.from(new Set(hints)) : undefined;
|
|
57
|
-
}
|
|
58
|
-
function isRuntimeBridgeKind(value) {
|
|
59
|
-
return value === 'codex-app-server' || value === 'claude-sdk' || value === 'claude-cli';
|
|
60
|
-
}
|
|
61
|
-
export function normalizeRuntimeBridge(value) {
|
|
62
|
-
if (!isRecord(value))
|
|
63
|
-
return undefined;
|
|
64
|
-
if (!isRuntimeBridgeKind(value.kind) || typeof value.label !== 'string' || !value.label.trim())
|
|
65
|
-
return undefined;
|
|
66
|
-
return {
|
|
67
|
-
kind: value.kind,
|
|
68
|
-
label: value.label.trim(),
|
|
69
|
-
...(typeof value.fallback === 'boolean' ? { fallback: value.fallback } : {}),
|
|
70
|
-
...(typeof value.reason === 'string' && value.reason.trim()
|
|
71
|
-
? { reason: compactRuntimeFailureMessage(value.reason, { runtime: value.kind === 'claude-cli' || value.kind === 'claude-sdk' ? 'claude' : 'codex' }) }
|
|
72
|
-
: {}),
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
export function normalizeInstalled(value) {
|
|
76
|
-
if (!isRecord(value))
|
|
77
|
-
return null;
|
|
78
|
-
if (typeof value.id !== 'string' || typeof value.name !== 'string' || typeof value.binaryPath !== 'string')
|
|
79
|
-
return null;
|
|
80
|
-
const resolved = normalizeResolvedCommand(value.resolvedCommand);
|
|
81
|
-
const diagnosticHints = normalizeDiagnosticHints(value.diagnosticHints);
|
|
82
|
-
const runtimeBridge = normalizeRuntimeBridge(value.runtimeBridge);
|
|
83
|
-
return {
|
|
84
|
-
id: value.id,
|
|
85
|
-
name: value.name,
|
|
86
|
-
binaryPath: value.binaryPath,
|
|
87
|
-
...(resolved ? { resolvedCommand: resolved } : {}),
|
|
88
|
-
...(isInstalledRuntimeStatus(value.status) ? { status: value.status } : {}),
|
|
89
|
-
...(typeof value.reason === 'string' && value.reason.trim() ? { reason: value.reason } : {}),
|
|
90
|
-
...(diagnosticHints ? { diagnosticHints } : {}),
|
|
91
|
-
...(runtimeBridge ? { runtimeBridge } : {}),
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
export function normalizeMissing(value) {
|
|
95
|
-
if (!isRecord(value))
|
|
96
|
-
return null;
|
|
97
|
-
if (typeof value.id !== 'string' || typeof value.name !== 'string' || typeof value.installCmd !== 'string')
|
|
98
|
-
return null;
|
|
99
|
-
const diagnosticHints = normalizeDiagnosticHints(value.diagnosticHints);
|
|
100
|
-
return {
|
|
101
|
-
id: value.id,
|
|
102
|
-
name: value.name,
|
|
103
|
-
installCmd: value.installCmd,
|
|
104
|
-
...(typeof value.packageName === 'string' ? { packageName: value.packageName } : {}),
|
|
105
|
-
...(isMissingRuntimeStatus(value.status) ? { status: value.status } : {}),
|
|
106
|
-
...(typeof value.reason === 'string' && value.reason.trim() ? { reason: value.reason } : {}),
|
|
107
|
-
...(diagnosticHints ? { diagnosticHints } : {}),
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
export function isCodexAgent(agent) {
|
|
111
|
-
const name = agent.name.toLowerCase();
|
|
112
|
-
return agent.id === 'codex' || agent.id === 'codex-acp' || name === 'codex' || name.includes('codex');
|
|
113
|
-
}
|
|
114
|
-
export function isClaudeAgent(agent) {
|
|
115
|
-
const name = agent.name.toLowerCase();
|
|
116
|
-
return agent.id === 'claude' || agent.id === 'claude-code' || name.includes('claude');
|
|
117
|
-
}
|
|
118
|
-
export function isNativeRuntimeId(value) {
|
|
119
|
-
return value === 'codex' || value === 'claude';
|
|
120
|
-
}
|
|
121
|
-
export function compactRuntimeHintsForDescriptor(hints, runtime, reason) {
|
|
122
|
-
return compactRuntimeDiagnosticHints(hints, { runtime }).filter((hint) => hint !== reason);
|
|
123
|
-
}
|
|
1
|
+
export * from '../agent/runtime/detection.js';
|
|
124
2
|
//# sourceMappingURL=detection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detection.js","sourceRoot":"","sources":["../../src/agent-runtime/detection.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"detection.js","sourceRoot":"","sources":["../../src/agent-runtime/detection.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export * from './claude-code-cli.js';
|
|
3
|
-
export * from './claude-code-sdk.js';
|
|
4
|
-
export * from './codex-env.js';
|
|
5
|
-
export * from './runtime-env.js';
|
|
6
|
-
export * from './registry.js';
|
|
7
|
-
export * from './codex-app-server.js';
|
|
8
|
-
export * from './run.js';
|
|
1
|
+
export * from '../agent/runtime/index.js';
|
|
9
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export * from './claude-code-cli.js';
|
|
3
|
-
export * from './claude-code-sdk.js';
|
|
4
|
-
export * from './codex-env.js';
|
|
5
|
-
export * from './runtime-env.js';
|
|
6
|
-
export * from './registry.js';
|
|
7
|
-
export * from './codex-app-server.js';
|
|
8
|
-
export * from './run.js';
|
|
1
|
+
export * from '../agent/runtime/index.js';
|
|
9
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agent-runtime/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agent-runtime/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
|
|
@@ -1,152 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import type { AgentRuntimeEnvironmentSettings } from './runtime-env.js';
|
|
3
|
-
export type AgentRuntimeKind = 'mindos' | 'acp' | 'codex' | 'claude';
|
|
4
|
-
export type AgentRuntimeCategory = 'mindos' | 'native' | 'acp' | 'cloud';
|
|
5
|
-
export type NativeRuntimeId = 'codex' | 'claude';
|
|
6
|
-
export type AgentRuntimeStatus = 'available' | 'missing' | 'signed-out' | 'error';
|
|
7
|
-
export type AgentRuntimeCapabilities = {
|
|
8
|
-
ownsModelSelection: boolean;
|
|
9
|
-
supportsResume: boolean;
|
|
10
|
-
supportsFreshSession: boolean;
|
|
11
|
-
supportsListSessions: boolean;
|
|
12
|
-
supportsAttachExisting: boolean;
|
|
13
|
-
supportsFork: boolean;
|
|
14
|
-
supportsArchive: boolean;
|
|
15
|
-
supportsInterrupt: boolean;
|
|
16
|
-
supportsModelList: boolean;
|
|
17
|
-
supportsApprovals: boolean;
|
|
18
|
-
supportsUserInput: boolean;
|
|
19
|
-
supportsToolEvents: boolean;
|
|
20
|
-
supportsRuntimeStatus: boolean;
|
|
21
|
-
supportsDiffs: boolean;
|
|
22
|
-
supportsCheckpoints: boolean;
|
|
23
|
-
supportsBackgroundRuns: boolean;
|
|
24
|
-
supportsMcpConfig: boolean;
|
|
25
|
-
};
|
|
26
|
-
export type AgentRuntimeHarnessCapabilities = {
|
|
27
|
-
session: 'none' | 'local-id' | 'native-thread' | 'cloud-task';
|
|
28
|
-
eventStream: Array<'text' | 'tool-events' | 'thread-turn-item' | 'runtime-status' | 'permissions' | 'user-input'>;
|
|
29
|
-
workspace: 'local-cwd' | 'local-worktree' | 'container' | 'cloud-vm';
|
|
30
|
-
permissions: 'none' | 'mindos-only' | 'runtime-bridged';
|
|
31
|
-
tools: Array<'shell' | 'file' | 'git' | 'browser' | 'mcp' | 'plugins' | 'skills'>;
|
|
32
|
-
output: Array<'text' | 'diff' | 'checkpoint' | 'artifact' | 'branch' | 'pr'>;
|
|
33
|
-
};
|
|
34
|
-
export type AgentRuntimeAdapter = 'mindos' | 'codex-app-server' | 'codex-sdk' | 'claude-cli' | 'claude-sdk' | 'acp';
|
|
35
|
-
export type AgentRuntimeOwner = 'mindos' | 'external';
|
|
36
|
-
export type AgentRuntimeBridge = {
|
|
37
|
-
kind: 'codex-app-server' | 'claude-sdk' | 'claude-cli';
|
|
38
|
-
label: string;
|
|
39
|
-
fallback?: boolean;
|
|
40
|
-
reason?: string;
|
|
41
|
-
};
|
|
42
|
-
export type AgentRuntimeDescriptor = {
|
|
43
|
-
id: string;
|
|
44
|
-
name: string;
|
|
45
|
-
kind: AgentRuntimeKind;
|
|
46
|
-
category?: AgentRuntimeCategory;
|
|
47
|
-
runtimeId?: string;
|
|
48
|
-
adapter: AgentRuntimeAdapter;
|
|
49
|
-
modelOwner: AgentRuntimeOwner;
|
|
50
|
-
authOwner: AgentRuntimeOwner;
|
|
51
|
-
permissionOwner: AgentRuntimeOwner;
|
|
52
|
-
sessionOwner: AgentRuntimeOwner;
|
|
53
|
-
status: AgentRuntimeStatus;
|
|
54
|
-
capabilities: AgentRuntimeCapabilities;
|
|
55
|
-
harnessCapabilities?: AgentRuntimeHarnessCapabilities;
|
|
56
|
-
runtimeBridge?: AgentRuntimeBridge;
|
|
57
|
-
description?: string;
|
|
58
|
-
sourceAgentId?: string;
|
|
59
|
-
canonicalAgentId?: string;
|
|
60
|
-
mcpAgentKey?: string;
|
|
61
|
-
aliases?: string[];
|
|
62
|
-
binaryPath?: string;
|
|
63
|
-
resolvedCommand?: {
|
|
64
|
-
cmd: string;
|
|
65
|
-
args: string[];
|
|
66
|
-
source: 'user-override' | 'descriptor' | 'registry';
|
|
67
|
-
};
|
|
68
|
-
installCmd?: string;
|
|
69
|
-
packageName?: string;
|
|
70
|
-
availability?: {
|
|
71
|
-
checkedAt: string;
|
|
72
|
-
sources: Array<'acp-detect' | 'acp-registry' | 'mcp-agents' | 'native-health' | 'settings'>;
|
|
73
|
-
reason?: string;
|
|
74
|
-
diagnosticHints?: string[];
|
|
75
|
-
stale?: boolean;
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
export type DetectedRuntimeAgent = {
|
|
79
|
-
id: string;
|
|
80
|
-
name: string;
|
|
81
|
-
binaryPath: string;
|
|
82
|
-
resolvedCommand?: NonNullable<AgentRuntimeDescriptor['resolvedCommand']>;
|
|
83
|
-
status?: Exclude<AgentRuntimeStatus, 'missing'>;
|
|
84
|
-
reason?: string;
|
|
85
|
-
diagnosticHints?: string[];
|
|
86
|
-
runtimeBridge?: AgentRuntimeBridge;
|
|
87
|
-
};
|
|
88
|
-
export type MissingRuntimeAgent = {
|
|
89
|
-
id: string;
|
|
90
|
-
name: string;
|
|
91
|
-
installCmd: string;
|
|
92
|
-
packageName?: string;
|
|
93
|
-
status?: Extract<AgentRuntimeStatus, 'missing' | 'error'>;
|
|
94
|
-
reason?: string;
|
|
95
|
-
diagnosticHints?: string[];
|
|
96
|
-
};
|
|
97
|
-
export type AgentRuntimesPayload = {
|
|
98
|
-
runtimes: AgentRuntimeDescriptor[];
|
|
99
|
-
installed: DetectedRuntimeAgent[];
|
|
100
|
-
notInstalled: MissingRuntimeAgent[];
|
|
101
|
-
};
|
|
102
|
-
export type AgentRuntimePayload = {
|
|
103
|
-
runtime: AgentRuntimeDescriptor;
|
|
104
|
-
};
|
|
105
|
-
export type AgentRuntimesSettings = {
|
|
106
|
-
acpAgents?: Record<string, AcpAgentOverride>;
|
|
107
|
-
agentRuntimeEnv?: AgentRuntimeEnvironmentSettings;
|
|
108
|
-
};
|
|
109
|
-
export type NativeRuntimeHealthResult = {
|
|
110
|
-
status: Exclude<AgentRuntimeStatus, 'missing'>;
|
|
111
|
-
reason?: string;
|
|
112
|
-
diagnosticHints?: string[];
|
|
113
|
-
runtimeBridge?: AgentRuntimeBridge;
|
|
114
|
-
};
|
|
115
|
-
export type NativeRuntimeHealthInput = {
|
|
116
|
-
runtime: NativeRuntimeId;
|
|
117
|
-
agent: DetectedRuntimeAgent;
|
|
118
|
-
timeoutMs?: number;
|
|
119
|
-
};
|
|
120
|
-
export type AgentRuntimesServices = {
|
|
121
|
-
readSettings?(): AgentRuntimesSettings;
|
|
122
|
-
detectLocalAcpAgents?(options?: {
|
|
123
|
-
overrides?: Record<string, AcpAgentOverride>;
|
|
124
|
-
}): Promise<{
|
|
125
|
-
installed: unknown[];
|
|
126
|
-
notInstalled: unknown[];
|
|
127
|
-
}>;
|
|
128
|
-
checkNativeRuntimeHealth?(input: NativeRuntimeHealthInput): Promise<NativeRuntimeHealthResult>;
|
|
129
|
-
resolveRuntimeCommand?(command: string): Promise<string | null>;
|
|
130
|
-
now?(): number;
|
|
131
|
-
};
|
|
132
|
-
export declare const RUNTIME_DETECTION_TIMEOUT_MS = 5000;
|
|
133
|
-
export declare const NATIVE_HEALTH_TIMEOUT_MS = 20000;
|
|
134
|
-
export declare const nativeRuntimeDefinitions: Array<{
|
|
135
|
-
id: 'codex-acp' | 'claude';
|
|
136
|
-
name: string;
|
|
137
|
-
runtime: NativeRuntimeId;
|
|
138
|
-
command: string;
|
|
139
|
-
installCmd: string;
|
|
140
|
-
}>;
|
|
141
|
-
export declare function buildAgentRuntimesPayload(input: {
|
|
142
|
-
installed: unknown[];
|
|
143
|
-
notInstalled: unknown[];
|
|
144
|
-
checkedAt: string;
|
|
145
|
-
}): AgentRuntimesPayload;
|
|
146
|
-
export declare function buildAcpScopedPayload(input: {
|
|
147
|
-
installed: unknown[];
|
|
148
|
-
notInstalled: unknown[];
|
|
149
|
-
checkedAt: string;
|
|
150
|
-
}): AgentRuntimesPayload;
|
|
151
|
-
export declare function applyNativeRuntimeHealth(installed: unknown[], services: AgentRuntimesServices, checkNativeRuntimeHealthFallback: (input: NativeRuntimeHealthInput) => Promise<NativeRuntimeHealthResult>): Promise<unknown[]>;
|
|
1
|
+
export * from '../agent/runtime/registry.js';
|
|
152
2
|
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/registry.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/registry.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC"}
|
|
@@ -1,84 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { classifyRuntimeFailure, isClaudeAgent, isCodexAgent, normalizeInstalled, normalizeMissing, } from './detection.js';
|
|
3
|
-
export const RUNTIME_DETECTION_TIMEOUT_MS = 5000;
|
|
4
|
-
export const NATIVE_HEALTH_TIMEOUT_MS = 20000;
|
|
5
|
-
export const nativeRuntimeDefinitions = [
|
|
6
|
-
{ id: 'codex-acp', name: 'Codex', runtime: 'codex', command: 'codex', installCmd: 'npm install -g @openai/codex' },
|
|
7
|
-
{ id: 'claude', name: 'Claude Code', runtime: 'claude', command: 'claude', installCmd: 'npm install -g @anthropic-ai/claude-code' },
|
|
8
|
-
];
|
|
9
|
-
export function buildAgentRuntimesPayload(input) {
|
|
10
|
-
const installed = input.installed.map(normalizeInstalled).filter((agent) => !!agent);
|
|
11
|
-
const notInstalled = input.notInstalled.map(normalizeMissing).filter((agent) => !!agent);
|
|
12
|
-
const codexInstalled = installed.find(isCodexAgent);
|
|
13
|
-
const claudeInstalled = installed.find(isClaudeAgent);
|
|
14
|
-
const codexMissing = notInstalled.find(isCodexAgent);
|
|
15
|
-
const claudeMissing = notInstalled.find(isClaudeAgent);
|
|
16
|
-
const runtimes = [
|
|
17
|
-
mindosRuntimeDescriptor(input.checkedAt),
|
|
18
|
-
nativeDescriptor({
|
|
19
|
-
id: 'codex',
|
|
20
|
-
name: 'Codex',
|
|
21
|
-
checkedAt: input.checkedAt,
|
|
22
|
-
...(codexInstalled ? { source: codexInstalled } : {}),
|
|
23
|
-
...(codexMissing ? { missing: codexMissing } : {}),
|
|
24
|
-
}),
|
|
25
|
-
nativeDescriptor({
|
|
26
|
-
id: 'claude',
|
|
27
|
-
name: 'Claude Code',
|
|
28
|
-
checkedAt: input.checkedAt,
|
|
29
|
-
...(claudeInstalled ? { source: claudeInstalled } : {}),
|
|
30
|
-
...(claudeMissing ? { missing: claudeMissing } : {}),
|
|
31
|
-
}),
|
|
32
|
-
...installed
|
|
33
|
-
.filter((agent) => !isCodexAgent(agent) && !isClaudeAgent(agent))
|
|
34
|
-
.map((agent) => acpRuntimeDescriptor(agent, input.checkedAt)),
|
|
35
|
-
];
|
|
36
|
-
return { runtimes, installed, notInstalled };
|
|
37
|
-
}
|
|
38
|
-
export function buildAcpScopedPayload(input) {
|
|
39
|
-
const installed = input.installed
|
|
40
|
-
.map(normalizeInstalled)
|
|
41
|
-
.filter((agent) => !!agent && !isCodexAgent(agent) && !isClaudeAgent(agent));
|
|
42
|
-
const notInstalled = input.notInstalled
|
|
43
|
-
.map(normalizeMissing)
|
|
44
|
-
.filter((agent) => !!agent && !isCodexAgent(agent) && !isClaudeAgent(agent));
|
|
45
|
-
const runtimes = installed.map((agent) => acpRuntimeDescriptor(agent, input.checkedAt));
|
|
46
|
-
return { runtimes, installed, notInstalled };
|
|
47
|
-
}
|
|
48
|
-
export async function applyNativeRuntimeHealth(installed, services, checkNativeRuntimeHealthFallback) {
|
|
49
|
-
const checkNativeRuntimeHealth = services.checkNativeRuntimeHealth ?? checkNativeRuntimeHealthFallback;
|
|
50
|
-
const normalized = installed.map((agent) => ({ raw: agent, detected: normalizeInstalled(agent) }));
|
|
51
|
-
const enriched = await Promise.all(normalized.map(async ({ raw, detected }) => {
|
|
52
|
-
if (!detected)
|
|
53
|
-
return raw;
|
|
54
|
-
const runtime = isCodexAgent(detected) ? 'codex' : isClaudeAgent(detected) ? 'claude' : null;
|
|
55
|
-
if (!runtime)
|
|
56
|
-
return raw;
|
|
57
|
-
if (detected.status)
|
|
58
|
-
return raw;
|
|
59
|
-
try {
|
|
60
|
-
const health = await checkNativeRuntimeHealth({
|
|
61
|
-
runtime,
|
|
62
|
-
agent: detected,
|
|
63
|
-
timeoutMs: NATIVE_HEALTH_TIMEOUT_MS,
|
|
64
|
-
});
|
|
65
|
-
return {
|
|
66
|
-
...(raw && typeof raw === 'object' && !Array.isArray(raw) ? raw : detected),
|
|
67
|
-
status: health.status,
|
|
68
|
-
...(health.reason ? { reason: health.reason } : {}),
|
|
69
|
-
...(health.diagnosticHints ? { diagnosticHints: health.diagnosticHints } : {}),
|
|
70
|
-
...(health.runtimeBridge ? { runtimeBridge: health.runtimeBridge } : {}),
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
catch (error) {
|
|
74
|
-
const result = classifyRuntimeFailure(error instanceof Error ? error.message : String(error), runtime);
|
|
75
|
-
return {
|
|
76
|
-
...(raw && typeof raw === 'object' && !Array.isArray(raw) ? raw : detected),
|
|
77
|
-
status: result.status,
|
|
78
|
-
...(result.reason ? { reason: result.reason } : {}),
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
}));
|
|
82
|
-
return enriched;
|
|
83
|
-
}
|
|
1
|
+
export * from '../agent/runtime/registry.js';
|
|
84
2
|
//# sourceMappingURL=registry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/agent-runtime/registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/agent-runtime/registry.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC"}
|
|
@@ -1,125 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { type ClaudeCodeCliClient, type ClaudeCodeCliPermissionPrompt } from './claude-code-cli.js';
|
|
3
|
-
import { type ClaudeCodeSdkModule } from './claude-code-sdk.js';
|
|
4
|
-
import { type CodexAppServerClient, type CodexAppServerServerRequest } from './codex-app-server.js';
|
|
5
|
-
export type MindosNativeAgentRuntimeKind = 'codex' | 'claude';
|
|
6
|
-
export type MindosAgentRuntimeSelection = {
|
|
7
|
-
id: string;
|
|
8
|
-
name: string;
|
|
9
|
-
kind: MindosNativeAgentRuntimeKind;
|
|
10
|
-
externalSessionId?: string;
|
|
11
|
-
binaryPath?: string;
|
|
12
|
-
};
|
|
13
|
-
export type MindosAgentRuntimeAskServices = {
|
|
14
|
-
createCodexClient?(options: {
|
|
15
|
-
cwd: string;
|
|
16
|
-
signal?: AbortSignal;
|
|
17
|
-
handleServerRequest?: (request: CodexAppServerServerRequest) => Promise<unknown> | unknown;
|
|
18
|
-
}): CodexAppServerClient | Promise<CodexAppServerClient>;
|
|
19
|
-
createClaudeClient?(options: {
|
|
20
|
-
cwd: string;
|
|
21
|
-
signal?: AbortSignal;
|
|
22
|
-
}): ClaudeCodeCliClient | Promise<ClaudeCodeCliClient>;
|
|
23
|
-
createClaudeCliClient?(options: {
|
|
24
|
-
cwd: string;
|
|
25
|
-
signal?: AbortSignal;
|
|
26
|
-
command?: string;
|
|
27
|
-
env?: NodeJS.ProcessEnv;
|
|
28
|
-
}): ClaudeCodeCliClient | Promise<ClaudeCodeCliClient>;
|
|
29
|
-
createClaudeSdkClient?(options: {
|
|
30
|
-
cwd: string;
|
|
31
|
-
signal?: AbortSignal;
|
|
32
|
-
command: string;
|
|
33
|
-
env?: NodeJS.ProcessEnv;
|
|
34
|
-
}): ClaudeCodeCliClient | Promise<ClaudeCodeCliClient>;
|
|
35
|
-
loadClaudeSdk?(): ClaudeCodeSdkModule | Promise<ClaudeCodeSdkModule>;
|
|
36
|
-
createClaudePermissionPrompt?(options: {
|
|
37
|
-
cwd: string;
|
|
38
|
-
signal?: AbortSignal;
|
|
39
|
-
}): ClaudeCodeCliPermissionPrompt | undefined | Promise<ClaudeCodeCliPermissionPrompt | undefined>;
|
|
40
|
-
requestRuntimePermission?(request: MindosRuntimePermissionRequest, options?: {
|
|
41
|
-
signal?: AbortSignal;
|
|
42
|
-
}): Promise<MindosRuntimePermissionResult>;
|
|
43
|
-
requestUserQuestion?(request: MindosRuntimeUserQuestionRequest, options?: {
|
|
44
|
-
signal?: AbortSignal;
|
|
45
|
-
}): Promise<MindosRuntimeUserQuestionResult>;
|
|
46
|
-
};
|
|
47
|
-
export type MindosRuntimePermissionOption = {
|
|
48
|
-
id: string;
|
|
49
|
-
label: string;
|
|
50
|
-
description?: string;
|
|
51
|
-
intent?: 'allow' | 'deny' | 'cancel';
|
|
52
|
-
scope?: 'once' | 'session' | 'always' | 'turn';
|
|
53
|
-
};
|
|
54
|
-
export type MindosRuntimePermissionRisk = {
|
|
55
|
-
level: 'low' | 'medium' | 'high';
|
|
56
|
-
summary: string;
|
|
57
|
-
reasons?: string[];
|
|
58
|
-
};
|
|
59
|
-
export type MindosRuntimePermissionRequest = {
|
|
60
|
-
runtime: 'codex' | 'claude';
|
|
61
|
-
toolCallId: string;
|
|
62
|
-
toolName: string;
|
|
63
|
-
input: unknown;
|
|
64
|
-
options: MindosRuntimePermissionOption[];
|
|
65
|
-
reason?: string;
|
|
66
|
-
action?: string;
|
|
67
|
-
resource?: string;
|
|
68
|
-
risk?: MindosRuntimePermissionRisk;
|
|
69
|
-
};
|
|
70
|
-
export type MindosRuntimePermissionResult = {
|
|
71
|
-
decision: string;
|
|
72
|
-
cancelled?: boolean;
|
|
73
|
-
decisionLabel?: string;
|
|
74
|
-
decisionIntent?: 'allow' | 'deny' | 'cancel';
|
|
75
|
-
decisionScope?: 'once' | 'session' | 'always' | 'turn';
|
|
76
|
-
};
|
|
77
|
-
export type MindosRuntimeUserQuestionOption = {
|
|
78
|
-
label: string;
|
|
79
|
-
description: string;
|
|
80
|
-
preview?: string;
|
|
81
|
-
};
|
|
82
|
-
export type MindosRuntimeUserQuestion = {
|
|
83
|
-
question: string;
|
|
84
|
-
header: string;
|
|
85
|
-
options: MindosRuntimeUserQuestionOption[];
|
|
86
|
-
multiSelect?: boolean;
|
|
87
|
-
};
|
|
88
|
-
export type MindosRuntimeUserQuestionAnswer = {
|
|
89
|
-
questionIndex: number;
|
|
90
|
-
question: string;
|
|
91
|
-
kind: 'option' | 'custom' | 'chat' | 'multi';
|
|
92
|
-
answer: string | null;
|
|
93
|
-
selected?: string[];
|
|
94
|
-
notes?: string;
|
|
95
|
-
preview?: string;
|
|
96
|
-
};
|
|
97
|
-
export type MindosRuntimeUserQuestionRequest = {
|
|
98
|
-
runtime: 'codex' | 'claude';
|
|
99
|
-
toolCallId: string;
|
|
100
|
-
questions: MindosRuntimeUserQuestion[];
|
|
101
|
-
};
|
|
102
|
-
export type MindosRuntimeUserQuestionResult = {
|
|
103
|
-
answers: MindosRuntimeUserQuestionAnswer[];
|
|
104
|
-
cancelled?: boolean;
|
|
105
|
-
error?: string;
|
|
106
|
-
};
|
|
107
|
-
export type MindosAgentRuntimeAskOptions = {
|
|
108
|
-
runtime: MindosAgentRuntimeSelection;
|
|
109
|
-
cwd: string;
|
|
110
|
-
prompt: string;
|
|
111
|
-
permissionMode?: 'readonly' | 'agent';
|
|
112
|
-
modelOverride?: string;
|
|
113
|
-
reasoningEffort?: 'low' | 'medium' | 'high' | 'xhigh';
|
|
114
|
-
timeoutMs?: number;
|
|
115
|
-
runtimeEnv?: NodeJS.ProcessEnv;
|
|
116
|
-
signal?: AbortSignal;
|
|
117
|
-
send(event: MindOSSSEvent): void;
|
|
118
|
-
services?: MindosAgentRuntimeAskServices;
|
|
119
|
-
};
|
|
120
|
-
export type MindosAgentRuntimeAskResult = {
|
|
121
|
-
externalSessionId?: string;
|
|
122
|
-
error?: Error;
|
|
123
|
-
};
|
|
124
|
-
export declare function runMindosAgentRuntimeAskSession(options: MindosAgentRuntimeAskOptions): Promise<MindosAgentRuntimeAskResult>;
|
|
1
|
+
export * from '../agent/runtime/run.js';
|
|
125
2
|
//# sourceMappingURL=run.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/run.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/run.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|