@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
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type MindosSelectedSkillSource = 'user-selected' | 'implicit';
|
|
2
|
+
export type MindosSelectedSkill = {
|
|
3
|
+
name: string;
|
|
4
|
+
source?: MindosSelectedSkillSource;
|
|
5
|
+
};
|
|
6
|
+
export declare function normalizeMindosSelectedSkills(skills: Array<MindosSelectedSkill | string | null | undefined> | undefined, legacySkillName?: string): MindosSelectedSkill[];
|
|
7
|
+
export declare function mindosSelectedSkillNames(skills: Array<MindosSelectedSkill | string | null | undefined> | undefined): string[];
|
|
8
|
+
//# sourceMappingURL=selected-skills.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selected-skills.d.ts","sourceRoot":"","sources":["../../src/agent/selected-skills.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,yBAAyB,GAAG,eAAe,GAAG,UAAU,CAAC;AAErE,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,yBAAyB,CAAC;CACpC,CAAC;AAEF,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,KAAK,CAAC,mBAAmB,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,SAAS,EAC1E,eAAe,CAAC,EAAE,MAAM,GACvB,mBAAmB,EAAE,CAqBvB;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,KAAK,CAAC,mBAAmB,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,SAAS,GAAG,MAAM,EAAE,CAE7H"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export function normalizeMindosSelectedSkills(skills, legacySkillName) {
|
|
2
|
+
const result = [];
|
|
3
|
+
const seen = new Set();
|
|
4
|
+
const add = (value, fallbackSource) => {
|
|
5
|
+
const name = typeof value === 'string'
|
|
6
|
+
? value.trim()
|
|
7
|
+
: (value?.name ?? '').trim();
|
|
8
|
+
if (!name || seen.has(name))
|
|
9
|
+
return;
|
|
10
|
+
seen.add(name);
|
|
11
|
+
const source = typeof value === 'string'
|
|
12
|
+
? fallbackSource
|
|
13
|
+
: (value?.source ?? fallbackSource);
|
|
14
|
+
result.push({
|
|
15
|
+
name,
|
|
16
|
+
source,
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
for (const skill of skills ?? [])
|
|
20
|
+
add(skill, 'user-selected');
|
|
21
|
+
add(legacySkillName, 'user-selected');
|
|
22
|
+
return result;
|
|
23
|
+
}
|
|
24
|
+
export function mindosSelectedSkillNames(skills) {
|
|
25
|
+
return normalizeMindosSelectedSkills(skills).map((skill) => skill.name);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=selected-skills.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selected-skills.js","sourceRoot":"","sources":["../../src/agent/selected-skills.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,6BAA6B,CAC3C,MAA0E,EAC1E,eAAwB;IAExB,MAAM,MAAM,GAA0B,EAAE,CAAC;IACzC,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,MAAM,GAAG,GAAG,CAAC,KAAsD,EAAE,cAAyC,EAAE,EAAE;QAChH,MAAM,IAAI,GAAG,OAAO,KAAK,KAAK,QAAQ;YACpC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE;YACd,CAAC,CAAC,CAAC,KAAK,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;QAC/B,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,OAAO;QACpC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACf,MAAM,MAAM,GAAG,OAAO,KAAK,KAAK,QAAQ;YACtC,CAAC,CAAC,cAAc;YAChB,CAAC,CAAC,CAAC,KAAK,EAAE,MAAM,IAAI,cAAc,CAAC,CAAC;QACtC,MAAM,CAAC,IAAI,CAAC;YACV,IAAI;YACJ,MAAM;SACP,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,KAAK,MAAM,KAAK,IAAI,MAAM,IAAI,EAAE;QAAE,GAAG,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;IAC9D,GAAG,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,MAA0E;IACjH,OAAO,6BAA6B,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC1E,CAAC"}
|
|
@@ -0,0 +1,619 @@
|
|
|
1
|
+
import type { MindosDiscoveredSkill, MindosExtensionLoadError, MindosPiResourceLoaderAdapter } from '../mindos-pi/resource-types.js';
|
|
2
|
+
import type { MindosExecutableTool } from '../tool/executable-tool.js';
|
|
3
|
+
export { redactSensitiveObject, redactSensitiveText } from './redaction.js';
|
|
4
|
+
export type { MindosDiscoveredSkill, MindosExtensionEntry, MindosExtensionLoadError, MindosExtensionLoadResult, MindosPiResourceLoaderAdapter, } from '../mindos-pi/resource-types.js';
|
|
5
|
+
export type { MindosExecutableTool } from '../tool/executable-tool.js';
|
|
6
|
+
export type MindosSessionEventType = 'session.started' | 'message.delta' | 'tool.started' | 'tool.completed' | 'session.completed' | 'session.failed';
|
|
7
|
+
export type MindosSessionEvent<TData = unknown> = {
|
|
8
|
+
id: string;
|
|
9
|
+
type: MindosSessionEventType;
|
|
10
|
+
sessionId: string;
|
|
11
|
+
timestamp: string;
|
|
12
|
+
data?: TData;
|
|
13
|
+
};
|
|
14
|
+
export type MindosSessionStreamSchema = {
|
|
15
|
+
protocol: 'mindos.session.events';
|
|
16
|
+
version: 1;
|
|
17
|
+
events: MindosSessionEventType[];
|
|
18
|
+
};
|
|
19
|
+
export declare const MINDOS_SESSION_STREAM_SCHEMA: MindosSessionStreamSchema;
|
|
20
|
+
export declare function createMindosSessionEvent<TData>(input: Omit<MindosSessionEvent<TData>, 'timestamp'> & {
|
|
21
|
+
timestamp?: string;
|
|
22
|
+
}): MindosSessionEvent<TData>;
|
|
23
|
+
export type MindOSSSEvent = {
|
|
24
|
+
type: 'agent_run_context';
|
|
25
|
+
rootRunId: string;
|
|
26
|
+
chatSessionId?: string;
|
|
27
|
+
startedAt: number;
|
|
28
|
+
} | {
|
|
29
|
+
type: 'text_delta';
|
|
30
|
+
delta: string;
|
|
31
|
+
} | {
|
|
32
|
+
type: 'thinking_delta';
|
|
33
|
+
delta: string;
|
|
34
|
+
} | {
|
|
35
|
+
type: 'tool_start';
|
|
36
|
+
toolCallId: string;
|
|
37
|
+
toolName: string;
|
|
38
|
+
args: unknown;
|
|
39
|
+
runtime?: 'mindos' | 'acp' | 'codex' | 'claude';
|
|
40
|
+
} | {
|
|
41
|
+
type: 'tool_delta';
|
|
42
|
+
toolCallId: string;
|
|
43
|
+
delta: string;
|
|
44
|
+
toolName?: string;
|
|
45
|
+
runtime?: 'mindos' | 'acp' | 'codex' | 'claude';
|
|
46
|
+
} | {
|
|
47
|
+
type: 'tool_end';
|
|
48
|
+
toolCallId: string;
|
|
49
|
+
output: string;
|
|
50
|
+
isError: boolean;
|
|
51
|
+
toolName?: string;
|
|
52
|
+
runtime?: 'mindos' | 'acp' | 'codex' | 'claude';
|
|
53
|
+
} | {
|
|
54
|
+
type: 'runtime_permission_request';
|
|
55
|
+
runId: string;
|
|
56
|
+
requestId: string;
|
|
57
|
+
runtime: 'codex' | 'claude';
|
|
58
|
+
toolCallId: string;
|
|
59
|
+
toolName: string;
|
|
60
|
+
input: unknown;
|
|
61
|
+
options: Array<{
|
|
62
|
+
id: string;
|
|
63
|
+
label: string;
|
|
64
|
+
description?: string;
|
|
65
|
+
intent?: 'allow' | 'deny' | 'cancel';
|
|
66
|
+
scope?: 'once' | 'session' | 'always' | 'turn';
|
|
67
|
+
}>;
|
|
68
|
+
reason?: string;
|
|
69
|
+
action?: string;
|
|
70
|
+
resource?: string;
|
|
71
|
+
risk?: {
|
|
72
|
+
level: 'low' | 'medium' | 'high';
|
|
73
|
+
summary: string;
|
|
74
|
+
reasons?: string[];
|
|
75
|
+
};
|
|
76
|
+
} | {
|
|
77
|
+
type: 'runtime_permission_resolved';
|
|
78
|
+
runId: string;
|
|
79
|
+
requestId: string;
|
|
80
|
+
runtime: 'codex' | 'claude';
|
|
81
|
+
toolCallId: string;
|
|
82
|
+
decision: string;
|
|
83
|
+
cancelled?: boolean;
|
|
84
|
+
decisionLabel?: string;
|
|
85
|
+
decisionIntent?: 'allow' | 'deny' | 'cancel';
|
|
86
|
+
decisionScope?: 'once' | 'session' | 'always' | 'turn';
|
|
87
|
+
} | {
|
|
88
|
+
type: 'user_question_start';
|
|
89
|
+
runId: string;
|
|
90
|
+
toolCallId: string;
|
|
91
|
+
questions: unknown;
|
|
92
|
+
} | {
|
|
93
|
+
type: 'user_question_answered';
|
|
94
|
+
runId: string;
|
|
95
|
+
toolCallId: string;
|
|
96
|
+
answers?: unknown;
|
|
97
|
+
} | {
|
|
98
|
+
type: 'user_question_cancelled';
|
|
99
|
+
runId: string;
|
|
100
|
+
toolCallId: string;
|
|
101
|
+
reason: string;
|
|
102
|
+
} | {
|
|
103
|
+
type: 'runtime_binding';
|
|
104
|
+
runtime: 'acp' | 'codex' | 'claude';
|
|
105
|
+
externalSessionId: string;
|
|
106
|
+
cwd?: string;
|
|
107
|
+
status?: 'active' | 'missing' | 'signed-out' | 'archived' | 'failed';
|
|
108
|
+
reason?: string;
|
|
109
|
+
} | {
|
|
110
|
+
type: 'done';
|
|
111
|
+
usage?: {
|
|
112
|
+
input: number;
|
|
113
|
+
output: number;
|
|
114
|
+
};
|
|
115
|
+
} | {
|
|
116
|
+
type: 'error';
|
|
117
|
+
message: string;
|
|
118
|
+
} | {
|
|
119
|
+
type: 'status';
|
|
120
|
+
message: string;
|
|
121
|
+
visible?: boolean;
|
|
122
|
+
runtime?: 'mindos' | 'acp' | 'codex' | 'claude';
|
|
123
|
+
};
|
|
124
|
+
export declare const MINDOS_ASK_STREAM_EVENT_TYPES: readonly ["text_delta", "thinking_delta", "agent_run_context", "tool_start", "tool_delta", "tool_end", "runtime_permission_request", "runtime_permission_resolved", "user_question_start", "user_question_answered", "user_question_cancelled", "runtime_binding", "done", "error", "status"];
|
|
125
|
+
export declare const MINDOS_SSE_HEADERS: Record<string, string>;
|
|
126
|
+
export type MessageUpdateEvent = {
|
|
127
|
+
type: 'message_update';
|
|
128
|
+
assistantMessageEvent?: {
|
|
129
|
+
type: string;
|
|
130
|
+
delta?: string;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
export type ToolExecStartEvent = {
|
|
134
|
+
type: 'tool_execution_start';
|
|
135
|
+
toolCallId: string;
|
|
136
|
+
toolName: string;
|
|
137
|
+
args: unknown;
|
|
138
|
+
};
|
|
139
|
+
export type ToolExecEndEvent = {
|
|
140
|
+
type: 'tool_execution_end';
|
|
141
|
+
toolCallId: string;
|
|
142
|
+
result?: {
|
|
143
|
+
content?: Array<{
|
|
144
|
+
type: string;
|
|
145
|
+
text?: string;
|
|
146
|
+
}>;
|
|
147
|
+
};
|
|
148
|
+
isError?: boolean;
|
|
149
|
+
};
|
|
150
|
+
export type TurnEndEvent = {
|
|
151
|
+
type: 'turn_end';
|
|
152
|
+
toolResults?: Array<{
|
|
153
|
+
toolName: string;
|
|
154
|
+
content: unknown;
|
|
155
|
+
}>;
|
|
156
|
+
usage?: {
|
|
157
|
+
inputTokens: number;
|
|
158
|
+
outputTokens?: number;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
export type AgentEndEvent = {
|
|
162
|
+
type: 'agent_end';
|
|
163
|
+
messages?: Array<{
|
|
164
|
+
role: string;
|
|
165
|
+
content?: Array<{
|
|
166
|
+
type: string;
|
|
167
|
+
text?: string;
|
|
168
|
+
}>;
|
|
169
|
+
stopReason?: string;
|
|
170
|
+
errorMessage?: string;
|
|
171
|
+
}>;
|
|
172
|
+
};
|
|
173
|
+
export declare function isTextDeltaEvent(event: unknown): event is MessageUpdateEvent;
|
|
174
|
+
export declare function getTextDelta(event: unknown): string;
|
|
175
|
+
export declare function isThinkingDeltaEvent(event: unknown): event is MessageUpdateEvent;
|
|
176
|
+
export declare function getThinkingDelta(event: unknown): string;
|
|
177
|
+
export declare function isToolExecutionStartEvent(event: unknown): event is ToolExecStartEvent;
|
|
178
|
+
export declare function getToolExecutionStart(event: unknown): {
|
|
179
|
+
toolCallId: string;
|
|
180
|
+
toolName: string;
|
|
181
|
+
args: unknown;
|
|
182
|
+
};
|
|
183
|
+
export declare function isToolExecutionEndEvent(event: unknown): event is ToolExecEndEvent;
|
|
184
|
+
export declare function getToolExecutionEnd(event: unknown): {
|
|
185
|
+
toolCallId: string;
|
|
186
|
+
output: string;
|
|
187
|
+
isError: boolean;
|
|
188
|
+
};
|
|
189
|
+
export declare function isTurnEndEvent(event: unknown): event is TurnEndEvent;
|
|
190
|
+
export declare function getTurnEndData(event: unknown): {
|
|
191
|
+
toolResults: Array<{
|
|
192
|
+
toolName: string;
|
|
193
|
+
content: unknown;
|
|
194
|
+
}>;
|
|
195
|
+
};
|
|
196
|
+
export type MindosAgentEventReducerOptions = {
|
|
197
|
+
stepLimit: number;
|
|
198
|
+
loopWarningMessage?: string;
|
|
199
|
+
};
|
|
200
|
+
export type MindosAgentEventEffect = {
|
|
201
|
+
events: MindOSSSEvent[];
|
|
202
|
+
hasVisibleContent: boolean;
|
|
203
|
+
toolExecutions?: number;
|
|
204
|
+
tokenUsage?: {
|
|
205
|
+
input: number;
|
|
206
|
+
output: number;
|
|
207
|
+
};
|
|
208
|
+
stepCount?: number;
|
|
209
|
+
shouldAbort?: boolean;
|
|
210
|
+
steerMessage?: string;
|
|
211
|
+
lastModelError?: string;
|
|
212
|
+
};
|
|
213
|
+
export type MindosAgentEventReducer = {
|
|
214
|
+
readonly lastModelError: string;
|
|
215
|
+
readonly stepCount: number;
|
|
216
|
+
handle(event: unknown): MindosAgentEventEffect;
|
|
217
|
+
};
|
|
218
|
+
export declare function createMindosAgentEventReducer(options: MindosAgentEventReducerOptions): MindosAgentEventReducer;
|
|
219
|
+
export declare function sanitizeToolArgs(toolName: string, args: unknown): unknown;
|
|
220
|
+
export declare function sanitizeToolOutput(output: string): string;
|
|
221
|
+
export declare function encodeMindosSseEvent(event: MindOSSSEvent): string;
|
|
222
|
+
export declare function parseMindosSseLine(line: string): MindOSSSEvent | null;
|
|
223
|
+
export type MindosAskMode = 'agent' | 'organize';
|
|
224
|
+
export type MindosAskFileValidationResult = {
|
|
225
|
+
valid: boolean;
|
|
226
|
+
newCumulativeSize: number;
|
|
227
|
+
error?: string;
|
|
228
|
+
};
|
|
229
|
+
export type MindosAskFileContextServices = {
|
|
230
|
+
readFile(filePath: string): string;
|
|
231
|
+
truncate?: (content: string) => string;
|
|
232
|
+
validateFileSize?: (filePath: string, cumulativeSize: number) => MindosAskFileValidationResult;
|
|
233
|
+
warn?: (message: string, error?: unknown) => void;
|
|
234
|
+
};
|
|
235
|
+
export type MindosAskFileContext = {
|
|
236
|
+
contextParts: string[];
|
|
237
|
+
failedFiles: string[];
|
|
238
|
+
};
|
|
239
|
+
export declare function normalizeMindosAskMode(mode: unknown): MindosAskMode;
|
|
240
|
+
export declare function normalizeMindosAskStepLimit(options: {
|
|
241
|
+
mode: MindosAskMode;
|
|
242
|
+
requestedMaxSteps?: unknown;
|
|
243
|
+
agentMaxSteps?: number;
|
|
244
|
+
}): number;
|
|
245
|
+
export declare function resolveMindosAgentTimeoutMs(raw?: string | undefined, defaultMs?: number): number;
|
|
246
|
+
export declare function expandMindosAskAttachedFiles(raw: string[] | undefined, collectAllFiles: () => string[], maxDirFiles?: number): string[] | undefined;
|
|
247
|
+
export declare function loadMindosAskFileContext(attachedFiles: string[] | undefined, currentFile: string | undefined, mode: string, services: MindosAskFileContextServices): MindosAskFileContext;
|
|
248
|
+
export declare function createMindosUploadedFileParts(uploadedFiles: unknown, options?: {
|
|
249
|
+
maxBytes?: number;
|
|
250
|
+
limit?: number;
|
|
251
|
+
}): string[];
|
|
252
|
+
export type MindosExternalRuntimePromptInput = {
|
|
253
|
+
prompt: string;
|
|
254
|
+
mode?: MindosAskMode;
|
|
255
|
+
fileContext?: MindosAskFileContext;
|
|
256
|
+
uploadedParts?: string[];
|
|
257
|
+
recalledKnowledge?: Array<{
|
|
258
|
+
path: string;
|
|
259
|
+
content: string;
|
|
260
|
+
}>;
|
|
261
|
+
};
|
|
262
|
+
export declare function buildMindosExternalRuntimePrompt(input: MindosExternalRuntimePromptInput): string;
|
|
263
|
+
export declare function safeParseMindosJsonObject(raw: string | undefined): Record<string, unknown>;
|
|
264
|
+
export declare function dirnameOfMindosPath(filePath?: string): string | null;
|
|
265
|
+
export type MindosAgentStepEntry = {
|
|
266
|
+
tool: string;
|
|
267
|
+
input: string;
|
|
268
|
+
};
|
|
269
|
+
export declare function isMindosTransientError(err: Error): boolean;
|
|
270
|
+
export declare function isMindosRetryableError(err: unknown, httpStatus?: number): boolean;
|
|
271
|
+
export declare function mindosRetryDelay(attempt: number): number;
|
|
272
|
+
export declare function sleepMindos(ms: number, signal?: AbortSignal): Promise<void>;
|
|
273
|
+
export type MindosAskRetryOptions = {
|
|
274
|
+
maxRetries?: number;
|
|
275
|
+
signal?: AbortSignal;
|
|
276
|
+
hasContent(): boolean;
|
|
277
|
+
onVisibleContent?(): void;
|
|
278
|
+
send(event: MindOSSSEvent): void;
|
|
279
|
+
execute(attempt: number): Promise<void>;
|
|
280
|
+
onAttemptError?(error: Error, attempt: number): Promise<void> | void;
|
|
281
|
+
isTransientError?: (error: Error) => boolean;
|
|
282
|
+
retryDelay?: (attempt: number) => number;
|
|
283
|
+
sleep?: (ms: number, signal?: AbortSignal) => Promise<void>;
|
|
284
|
+
retryMessage?: (attempt: number, maxRetries: number) => string;
|
|
285
|
+
};
|
|
286
|
+
export declare function runMindosAskWithRetry(options: MindosAskRetryOptions): Promise<Error | null>;
|
|
287
|
+
export type MindosAcpSessionUpdate = {
|
|
288
|
+
type: string;
|
|
289
|
+
text?: string;
|
|
290
|
+
error?: string;
|
|
291
|
+
toolCall?: {
|
|
292
|
+
toolCallId: string;
|
|
293
|
+
title?: string;
|
|
294
|
+
kind?: string;
|
|
295
|
+
rawInput?: string;
|
|
296
|
+
rawOutput?: string;
|
|
297
|
+
status?: string;
|
|
298
|
+
};
|
|
299
|
+
plan?: {
|
|
300
|
+
entries?: Array<{
|
|
301
|
+
status?: string;
|
|
302
|
+
content?: string;
|
|
303
|
+
}>;
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
export type MindosAcpUpdateMappingOptions = {
|
|
307
|
+
suppressErrors?: boolean;
|
|
308
|
+
};
|
|
309
|
+
export declare function mapMindosAcpUpdateToSseEvents(update: MindosAcpSessionUpdate, options?: MindosAcpUpdateMappingOptions): {
|
|
310
|
+
events: MindOSSSEvent[];
|
|
311
|
+
hasVisibleContent: boolean;
|
|
312
|
+
};
|
|
313
|
+
export type MindosAcpAskSessionServices = {
|
|
314
|
+
createSession(agentId: string, options: {
|
|
315
|
+
cwd: string;
|
|
316
|
+
permissionMode?: 'agent' | 'readonly';
|
|
317
|
+
}): Promise<{
|
|
318
|
+
id: string;
|
|
319
|
+
}>;
|
|
320
|
+
promptStream(sessionId: string, prompt: string, onUpdate: (update: MindosAcpSessionUpdate) => void, signal?: AbortSignal): Promise<void>;
|
|
321
|
+
cancelPrompt?(sessionId: string): Promise<void>;
|
|
322
|
+
closeSession(sessionId: string): Promise<void>;
|
|
323
|
+
};
|
|
324
|
+
export type MindosAcpAskSessionOptions = MindosAcpAskSessionServices & {
|
|
325
|
+
agentId: string;
|
|
326
|
+
cwd: string;
|
|
327
|
+
prompt: string;
|
|
328
|
+
maxRetries?: number;
|
|
329
|
+
timeoutMs?: number;
|
|
330
|
+
signal?: AbortSignal;
|
|
331
|
+
hasContent(): boolean;
|
|
332
|
+
onVisibleContent?(): void;
|
|
333
|
+
send(event: MindOSSSEvent): void;
|
|
334
|
+
sleep?: (ms: number, signal?: AbortSignal) => Promise<void>;
|
|
335
|
+
retryDelay?: (attempt: number) => number;
|
|
336
|
+
timeoutMessage?: (timeoutMs: number) => string;
|
|
337
|
+
errorMessage?: (error: Error) => string;
|
|
338
|
+
};
|
|
339
|
+
export type MindosAcpAskSessionResult = {
|
|
340
|
+
error?: Error;
|
|
341
|
+
};
|
|
342
|
+
export declare function runMindosAcpAskSession(options: MindosAcpAskSessionOptions): Promise<MindosAcpAskSessionResult>;
|
|
343
|
+
export declare function runMindosWithTimeout<T>(promise: Promise<T>, timeoutMs: number, message: string): Promise<T>;
|
|
344
|
+
export type MindosPiAgentSessionAdapter = {
|
|
345
|
+
subscribe(callback: (event: unknown) => void): void;
|
|
346
|
+
prompt(prompt: string, options?: unknown): Promise<void>;
|
|
347
|
+
steer(message: string): Promise<void> | void;
|
|
348
|
+
abort(): Promise<void> | void;
|
|
349
|
+
};
|
|
350
|
+
export type MindosPiAgentAskSessionOptions = {
|
|
351
|
+
session: MindosPiAgentSessionAdapter;
|
|
352
|
+
prompt: string;
|
|
353
|
+
promptOptions?: unknown;
|
|
354
|
+
stepLimit: number;
|
|
355
|
+
timeoutMs?: number;
|
|
356
|
+
signal?: AbortSignal;
|
|
357
|
+
provider: string;
|
|
358
|
+
baseUrl?: string;
|
|
359
|
+
effectiveBaseUrlKey?: string;
|
|
360
|
+
compatMode?: string;
|
|
361
|
+
send(event: MindOSSSEvent): void;
|
|
362
|
+
runFallback(): Promise<void>;
|
|
363
|
+
proxyMessages: MindosAskProxyFallbackMessages;
|
|
364
|
+
writeCompat?(key: string, mode: 'non-streaming'): void;
|
|
365
|
+
onToolExecution?(): void;
|
|
366
|
+
onTokens?(input: number, output: number): void;
|
|
367
|
+
onStep?(step: number, stepLimit: number): void;
|
|
368
|
+
sleep?: (ms: number, signal?: AbortSignal) => Promise<void>;
|
|
369
|
+
retryDelay?: (attempt: number) => number;
|
|
370
|
+
timeoutMessage?: (timeoutMs: number) => string;
|
|
371
|
+
};
|
|
372
|
+
export type MindosPiAgentAskSessionResult = {
|
|
373
|
+
hasContent: boolean;
|
|
374
|
+
lastModelError: string;
|
|
375
|
+
};
|
|
376
|
+
export declare function runMindosPiAgentAskSession(options: MindosPiAgentAskSessionOptions): Promise<MindosPiAgentAskSessionResult>;
|
|
377
|
+
export type MindosResolvedModelConfig = {
|
|
378
|
+
model: unknown;
|
|
379
|
+
modelName: string;
|
|
380
|
+
apiKey: string;
|
|
381
|
+
provider: string;
|
|
382
|
+
baseUrl?: string;
|
|
383
|
+
};
|
|
384
|
+
export type MindosPiRuntimeResourceLoaderConfig = {
|
|
385
|
+
cwd: string;
|
|
386
|
+
agentDir: string;
|
|
387
|
+
settingsManager: unknown;
|
|
388
|
+
systemPrompt: string;
|
|
389
|
+
/**
|
|
390
|
+
* Re-evaluated by the SDK loader on every reload(). The agent-mode system
|
|
391
|
+
* prompt suffix (skills XML + active-skill directive) is delivered through
|
|
392
|
+
* this hook — `systemPrompt` above is captured once at construction, so
|
|
393
|
+
* appending to it after the loader exists never reaches the session.
|
|
394
|
+
*/
|
|
395
|
+
systemPromptOverride?(base?: string): string | undefined;
|
|
396
|
+
appendSystemPrompt: string[];
|
|
397
|
+
agentsFilesOverride(result: {
|
|
398
|
+
agentsFiles: unknown[];
|
|
399
|
+
}): {
|
|
400
|
+
agentsFiles: unknown[];
|
|
401
|
+
};
|
|
402
|
+
skillsOverride(result: {
|
|
403
|
+
skills: MindosDiscoveredSkill[];
|
|
404
|
+
}): {
|
|
405
|
+
skills: MindosDiscoveredSkill[];
|
|
406
|
+
};
|
|
407
|
+
additionalSkillPaths: string[];
|
|
408
|
+
additionalExtensionPaths: string[];
|
|
409
|
+
};
|
|
410
|
+
export type MindosPiRuntimeCreateAgentSessionConfig = {
|
|
411
|
+
cwd: string;
|
|
412
|
+
model: unknown;
|
|
413
|
+
thinkingLevel: 'medium' | 'off';
|
|
414
|
+
authStorage: unknown;
|
|
415
|
+
modelRegistry: unknown;
|
|
416
|
+
resourceLoader: MindosPiResourceLoaderAdapter;
|
|
417
|
+
sessionManager: unknown;
|
|
418
|
+
settingsManager: unknown;
|
|
419
|
+
/**
|
|
420
|
+
* pi-coding-agent ≥0.62 made `tools` a string-name ALLOWLIST that hard-filters
|
|
421
|
+
* every tool source (builtin + extension + custom). MindOS must never set it:
|
|
422
|
+
* extension-registered KB tools would be filtered out. Builtins stay off via
|
|
423
|
+
* `noTools: 'builtin'` and capabilities come from extensions + customTools.
|
|
424
|
+
*/
|
|
425
|
+
noTools: 'builtin';
|
|
426
|
+
customTools: unknown[];
|
|
427
|
+
};
|
|
428
|
+
export type MindosPiSessionManagerAdapter = {
|
|
429
|
+
appendMessage(message: unknown): void;
|
|
430
|
+
};
|
|
431
|
+
export type MindosPiAgentRuntimeServices = {
|
|
432
|
+
resolveModelConfig(input: {
|
|
433
|
+
providerOverride?: string;
|
|
434
|
+
modelOverride?: string;
|
|
435
|
+
messages: MindosUiAskMessage[];
|
|
436
|
+
hasImages: boolean;
|
|
437
|
+
}): MindosResolvedModelConfig;
|
|
438
|
+
toRuntimeProvider(provider: string): string;
|
|
439
|
+
createAuthStorage(): {
|
|
440
|
+
setRuntimeApiKey(provider: string, apiKey: string): void;
|
|
441
|
+
};
|
|
442
|
+
createModelRegistry(authStorage: unknown): unknown;
|
|
443
|
+
createSettingsManager(settings: Record<string, unknown>): unknown;
|
|
444
|
+
createSessionManager(): MindosPiSessionManagerAdapter;
|
|
445
|
+
createResourceLoader(config: MindosPiRuntimeResourceLoaderConfig): MindosPiResourceLoaderAdapter;
|
|
446
|
+
createAgentSession(config: MindosPiRuntimeCreateAgentSessionConfig): Promise<{
|
|
447
|
+
session: MindosPiAgentSessionAdapter;
|
|
448
|
+
}>;
|
|
449
|
+
convertToLlm(messages: MindosAgentHistoryMessage[]): unknown[];
|
|
450
|
+
setKbMode(mode: MindosAskMode): void;
|
|
451
|
+
generateSkillsXml?(skills: MindosDiscoveredSkill[]): string;
|
|
452
|
+
getOllamaContextWindow?(baseUrl: string, modelName: string): Promise<number | undefined>;
|
|
453
|
+
estimateTokens?(content: string): number;
|
|
454
|
+
compactPrompt?(prompt: string, options: {
|
|
455
|
+
maxPromptTokens: number;
|
|
456
|
+
estimateTokens(content: string): number;
|
|
457
|
+
onStrip?(section: string, sectionTokens: number): void;
|
|
458
|
+
}): string;
|
|
459
|
+
onOllamaContext?(data: {
|
|
460
|
+
modelName: string;
|
|
461
|
+
contextWindow?: number;
|
|
462
|
+
promptTokens: number;
|
|
463
|
+
maxPromptTokens?: number;
|
|
464
|
+
}): void;
|
|
465
|
+
onOllamaCompactStrip?(section: string, sectionTokens: number): void;
|
|
466
|
+
onOllamaCompacted?(data: {
|
|
467
|
+
beforeTokens: number;
|
|
468
|
+
afterTokens: number;
|
|
469
|
+
}): void;
|
|
470
|
+
/**
|
|
471
|
+
* Called after each resource loader reload() that produced extension load
|
|
472
|
+
* errors. A failed extension entry silently drops every tool it would have
|
|
473
|
+
* registered (the session runs with `noTools: 'builtin'`), so hosts should
|
|
474
|
+
* at minimum log these. Defaults to console.error when not provided.
|
|
475
|
+
*/
|
|
476
|
+
onExtensionLoadErrors?(errors: MindosExtensionLoadError[]): void;
|
|
477
|
+
};
|
|
478
|
+
export type MindosPiAgentRuntimeOptions = {
|
|
479
|
+
mode: MindosAskMode;
|
|
480
|
+
messages: MindosUiAskMessage[];
|
|
481
|
+
systemPrompt: string;
|
|
482
|
+
providerOverride?: string;
|
|
483
|
+
modelOverride?: string;
|
|
484
|
+
projectRoot: string;
|
|
485
|
+
agentDir: string;
|
|
486
|
+
mindRoot: string;
|
|
487
|
+
workDir?: string;
|
|
488
|
+
agentConfig?: {
|
|
489
|
+
enableThinking?: boolean;
|
|
490
|
+
thinkingBudget?: number;
|
|
491
|
+
contextStrategy?: string;
|
|
492
|
+
};
|
|
493
|
+
serverSettings?: {
|
|
494
|
+
disabledSkills?: string[];
|
|
495
|
+
};
|
|
496
|
+
additionalSkillPaths?: string[];
|
|
497
|
+
additionalExtensionPaths?: string[];
|
|
498
|
+
requestTools: MindosExecutableTool[];
|
|
499
|
+
allowProjectBash?: boolean;
|
|
500
|
+
bashTool: unknown;
|
|
501
|
+
services: MindosPiAgentRuntimeServices;
|
|
502
|
+
};
|
|
503
|
+
export type MindosPiAgentRuntime = {
|
|
504
|
+
session: MindosPiAgentSessionAdapter;
|
|
505
|
+
agentRunContextResource: object;
|
|
506
|
+
llmHistoryMessages: unknown[];
|
|
507
|
+
requestTools: MindosExecutableTool[];
|
|
508
|
+
systemPrompt: string;
|
|
509
|
+
model: unknown;
|
|
510
|
+
modelName: string;
|
|
511
|
+
apiKey: string;
|
|
512
|
+
provider: string;
|
|
513
|
+
baseUrl?: string;
|
|
514
|
+
lastUserContent: string;
|
|
515
|
+
lastUserImages?: MindosUiImagePart[];
|
|
516
|
+
lastUserSkillName?: string;
|
|
517
|
+
};
|
|
518
|
+
export declare function createMindosPiAgentRuntime(options: MindosPiAgentRuntimeOptions): Promise<MindosPiAgentRuntime>;
|
|
519
|
+
export type MindosAskProxyFallbackMessages = {
|
|
520
|
+
proxyCompatMode: string;
|
|
521
|
+
proxyCompatDetecting: string;
|
|
522
|
+
proxyCompatFailed(message: string): string;
|
|
523
|
+
proxyCompatAlsoFailed(message: string): string;
|
|
524
|
+
};
|
|
525
|
+
export type MindosAskProxyFallbackOptions = {
|
|
526
|
+
phase: 'before-stream' | 'after-stream';
|
|
527
|
+
provider: string;
|
|
528
|
+
baseUrl?: string;
|
|
529
|
+
effectiveBaseUrlKey?: string;
|
|
530
|
+
compatMode?: string;
|
|
531
|
+
hasContent?: boolean;
|
|
532
|
+
lastModelError?: string;
|
|
533
|
+
send(event: MindOSSSEvent): void;
|
|
534
|
+
runFallback(): Promise<void>;
|
|
535
|
+
writeCompat?(key: string, mode: 'non-streaming'): void;
|
|
536
|
+
messages: MindosAskProxyFallbackMessages;
|
|
537
|
+
};
|
|
538
|
+
export declare function runMindosAskProxyFallback(options: MindosAskProxyFallbackOptions): Promise<boolean>;
|
|
539
|
+
export declare function buildMindosCompatEndpointCandidates(baseUrl: string, endpointPath: string, apiType: string): string[];
|
|
540
|
+
type MindosOpenAIMessage = {
|
|
541
|
+
role: string;
|
|
542
|
+
content?: unknown;
|
|
543
|
+
tool_calls?: unknown;
|
|
544
|
+
tool_call_id?: string;
|
|
545
|
+
};
|
|
546
|
+
type MindosOpenAIToolCall = {
|
|
547
|
+
id: string;
|
|
548
|
+
type: string;
|
|
549
|
+
function: {
|
|
550
|
+
name: string;
|
|
551
|
+
arguments: string;
|
|
552
|
+
};
|
|
553
|
+
};
|
|
554
|
+
export declare function reassembleMindosOpenAISse(sseText: string): {
|
|
555
|
+
choices: Array<{
|
|
556
|
+
message: {
|
|
557
|
+
role: string;
|
|
558
|
+
content: string | null;
|
|
559
|
+
tool_calls?: MindosOpenAIToolCall[];
|
|
560
|
+
};
|
|
561
|
+
finish_reason: string;
|
|
562
|
+
}>;
|
|
563
|
+
};
|
|
564
|
+
export declare function mindosPiMessagesToOpenAI(piMessages: unknown[]): MindosOpenAIMessage[];
|
|
565
|
+
export type MindosNonStreamingFallbackOptions = {
|
|
566
|
+
baseUrl: string;
|
|
567
|
+
apiKey: string;
|
|
568
|
+
model: string;
|
|
569
|
+
systemPrompt: string;
|
|
570
|
+
historyMessages: unknown[];
|
|
571
|
+
userContent: string;
|
|
572
|
+
tools: MindosExecutableTool[];
|
|
573
|
+
send(event: MindOSSSEvent): void;
|
|
574
|
+
signal: AbortSignal;
|
|
575
|
+
maxSteps: number;
|
|
576
|
+
fetch?: typeof fetch;
|
|
577
|
+
chunkDelayMs?: number;
|
|
578
|
+
};
|
|
579
|
+
export declare function runMindosNonStreamingFallback(options: MindosNonStreamingFallbackOptions): Promise<void>;
|
|
580
|
+
export declare function detectMindosAgentLoop(history: MindosAgentStepEntry[], threshold?: number): boolean;
|
|
581
|
+
export type MindosUiImagePart = {
|
|
582
|
+
type: 'image';
|
|
583
|
+
data?: string;
|
|
584
|
+
mimeType?: string;
|
|
585
|
+
};
|
|
586
|
+
export type MindosUiTextPart = {
|
|
587
|
+
type: 'text';
|
|
588
|
+
text?: string;
|
|
589
|
+
};
|
|
590
|
+
export type MindosUiReasoningPart = {
|
|
591
|
+
type: 'reasoning';
|
|
592
|
+
text?: string;
|
|
593
|
+
};
|
|
594
|
+
export type MindosUiToolCallPart = {
|
|
595
|
+
type: 'tool-call';
|
|
596
|
+
toolCallId: string;
|
|
597
|
+
toolName: string;
|
|
598
|
+
input?: unknown;
|
|
599
|
+
output?: string;
|
|
600
|
+
state?: 'pending' | 'running' | 'done' | 'error';
|
|
601
|
+
};
|
|
602
|
+
export type MindosUiRuntimeStatusPart = {
|
|
603
|
+
type: 'runtime-status';
|
|
604
|
+
message: string;
|
|
605
|
+
runtime?: 'mindos' | 'acp' | 'codex' | 'claude';
|
|
606
|
+
};
|
|
607
|
+
export type MindosUiMessagePart = MindosUiImagePart | MindosUiTextPart | MindosUiReasoningPart | MindosUiToolCallPart | MindosUiRuntimeStatusPart;
|
|
608
|
+
export type MindosUiAskMessage = {
|
|
609
|
+
role: 'user' | 'assistant';
|
|
610
|
+
content: string;
|
|
611
|
+
timestamp?: number;
|
|
612
|
+
skillName?: string;
|
|
613
|
+
parts?: MindosUiMessagePart[];
|
|
614
|
+
images?: MindosUiImagePart[];
|
|
615
|
+
};
|
|
616
|
+
export type MindosAgentHistoryMessage = Record<string, unknown>;
|
|
617
|
+
export declare function toMindosAgentMessages(messages: MindosUiAskMessage[]): MindosAgentHistoryMessage[];
|
|
618
|
+
export { detectMindosAgentLoop as detectLoop, isMindosRetryableError as isRetryableError, isMindosTransientError as isTransientError, mindosRetryDelay as retryDelay, sleepMindos as sleep, };
|
|
619
|
+
//# sourceMappingURL=index.d.ts.map
|