@saltpub/oar 0.121.1 → 0.122.0
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/README.md +51 -43
- package/assets/brands/NOTICE.md +7 -0
- package/assets/brands/cybion.svg +27 -0
- package/dist/capabilities.d.ts +12 -0
- package/dist/capabilities.d.ts.map +1 -0
- package/dist/capabilities.js +7 -0
- package/dist/capabilities.js.map +1 -0
- package/dist/community/cybion/index.d.ts.map +1 -1
- package/dist/community/cybion/index.js +10 -3
- package/dist/community/cybion/index.js.map +1 -1
- package/dist/community/cybion/refused-options.d.ts.map +1 -1
- package/dist/community/cybion/refused-options.js +2 -0
- package/dist/community/cybion/refused-options.js.map +1 -1
- package/dist/community/morph/index.js +1 -1
- package/dist/community/morph/index.js.map +1 -1
- package/dist/community/morph/projection.d.ts.map +1 -1
- package/dist/community/morph/projection.js +14 -2
- package/dist/community/morph/projection.js.map +1 -1
- package/dist/community/morph/session.d.ts.map +1 -1
- package/dist/community/morph/session.js +2 -0
- package/dist/community/morph/session.js.map +1 -1
- package/dist/community/morph/tracker.d.ts.map +1 -1
- package/dist/community/morph/tracker.js +18 -6
- package/dist/community/morph/tracker.js.map +1 -1
- package/dist/contracts/account-usage.d.ts +1 -1
- package/dist/contracts/account-usage.d.ts.map +1 -1
- package/dist/contracts/context-usage.d.ts +12 -0
- package/dist/contracts/context-usage.d.ts.map +1 -1
- package/dist/contracts/credentials.d.ts +61 -0
- package/dist/contracts/credentials.d.ts.map +1 -0
- package/dist/contracts/credentials.js +2 -0
- package/dist/contracts/credentials.js.map +1 -0
- package/dist/contracts/failure.d.ts +4 -1
- package/dist/contracts/failure.d.ts.map +1 -1
- package/dist/contracts/graph.d.ts +1 -1
- package/dist/contracts/graph.d.ts.map +1 -1
- package/dist/contracts/index.d.ts +7 -3
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js.map +1 -1
- package/dist/contracts/installation.d.ts +27 -4
- package/dist/contracts/installation.d.ts.map +1 -1
- package/dist/contracts/login.d.ts +3 -1
- package/dist/contracts/login.d.ts.map +1 -1
- package/dist/contracts/model-request.d.ts +14 -0
- package/dist/contracts/model-request.d.ts.map +1 -0
- package/dist/contracts/model-request.js +2 -0
- package/dist/contracts/model-request.js.map +1 -0
- package/dist/contracts/orientation.d.ts +2 -1
- package/dist/contracts/orientation.d.ts.map +1 -1
- package/dist/contracts/records.d.ts +21 -12
- package/dist/contracts/records.d.ts.map +1 -1
- package/dist/contracts/runtime.d.ts +39 -52
- package/dist/contracts/runtime.d.ts.map +1 -1
- package/dist/contracts/runtime.js.map +1 -1
- package/dist/contracts/session-options.d.ts +46 -48
- package/dist/contracts/session-options.d.ts.map +1 -1
- package/dist/contracts/session.d.ts +9 -3
- package/dist/contracts/session.d.ts.map +1 -1
- package/dist/contracts/tasks.d.ts +4 -0
- package/dist/contracts/tasks.d.ts.map +1 -1
- package/dist/contracts/tool-output.d.ts +6 -0
- package/dist/contracts/tool-output.d.ts.map +1 -1
- package/dist/forms/fields.d.ts +6 -3
- package/dist/forms/fields.d.ts.map +1 -1
- package/dist/forms/fields.js +44 -5
- package/dist/forms/fields.js.map +1 -1
- package/dist/forms/map.d.ts.map +1 -1
- package/dist/forms/map.js +18 -14
- package/dist/forms/map.js.map +1 -1
- package/dist/forms/types.d.ts +1 -1
- package/dist/forms/types.d.ts.map +1 -1
- package/dist/forms/validate.d.ts.map +1 -1
- package/dist/forms/validate.js +8 -15
- package/dist/forms/validate.js.map +1 -1
- package/dist/mcp/serve-tools.js +1 -1
- package/dist/mcp/serve-tools.js.map +1 -1
- package/dist/observe/agent-status.js +1 -0
- package/dist/observe/agent-status.js.map +1 -1
- package/dist/observe/conversation.d.ts.map +1 -1
- package/dist/observe/conversation.js +2 -8
- package/dist/observe/conversation.js.map +1 -1
- package/dist/observe/cursor.d.ts +6 -0
- package/dist/observe/cursor.d.ts.map +1 -0
- package/dist/observe/cursor.js +19 -0
- package/dist/observe/cursor.js.map +1 -0
- package/dist/observe/display-text.d.ts.map +1 -1
- package/dist/observe/display-text.js +1 -0
- package/dist/observe/display-text.js.map +1 -1
- package/dist/observe/events.d.ts +1 -1
- package/dist/observe/events.d.ts.map +1 -1
- package/dist/observe/events.js +5 -3
- package/dist/observe/events.js.map +1 -1
- package/dist/observe/failure-advice.d.ts.map +1 -1
- package/dist/observe/failure-advice.js +1 -0
- package/dist/observe/failure-advice.js.map +1 -1
- package/dist/observe/graph.d.ts +2 -0
- package/dist/observe/graph.d.ts.map +1 -1
- package/dist/observe/graph.js +17 -1
- package/dist/observe/graph.js.map +1 -1
- package/dist/observe/index.d.ts +1 -0
- package/dist/observe/index.d.ts.map +1 -1
- package/dist/observe/index.js +1 -0
- package/dist/observe/index.js.map +1 -1
- package/dist/observe/mcp-startup.d.ts +7 -0
- package/dist/observe/mcp-startup.d.ts.map +1 -0
- package/dist/observe/mcp-startup.js +16 -0
- package/dist/observe/mcp-startup.js.map +1 -0
- package/dist/observe/session-view-events.d.ts.map +1 -1
- package/dist/observe/session-view-events.js +6 -6
- package/dist/observe/session-view-events.js.map +1 -1
- package/dist/observe/session-view-fold.d.ts +2 -0
- package/dist/observe/session-view-fold.d.ts.map +1 -1
- package/dist/observe/session-view-fold.js +4 -0
- package/dist/observe/session-view-fold.js.map +1 -1
- package/dist/observe/session-view-root.d.ts +8 -0
- package/dist/observe/session-view-root.d.ts.map +1 -0
- package/dist/observe/session-view-root.js +76 -0
- package/dist/observe/session-view-root.js.map +1 -0
- package/dist/observe/session-view-tools.d.ts +1 -1
- package/dist/observe/session-view-tools.d.ts.map +1 -1
- package/dist/observe/session-view-tools.js +1 -0
- package/dist/observe/session-view-tools.js.map +1 -1
- package/dist/observe/session-view.d.ts +10 -8
- package/dist/observe/session-view.d.ts.map +1 -1
- package/dist/observe/session-view.js +31 -31
- package/dist/observe/session-view.js.map +1 -1
- package/dist/observe/tasks.d.ts +3 -0
- package/dist/observe/tasks.d.ts.map +1 -1
- package/dist/observe/tasks.js +1 -1
- package/dist/observe/tasks.js.map +1 -1
- package/dist/observe/tool-activity.d.ts +2 -2
- package/dist/observe/tool-activity.d.ts.map +1 -1
- package/dist/observe/tool-activity.js +9 -2
- package/dist/observe/tool-activity.js.map +1 -1
- package/dist/observe/usage-totals.d.ts +0 -2
- package/dist/observe/usage-totals.d.ts.map +1 -1
- package/dist/observe/usage-totals.js +1 -15
- package/dist/observe/usage-totals.js.map +1 -1
- package/dist/observe/usage.js +2 -2
- package/dist/observe/usage.js.map +1 -1
- package/dist/runtimes/antigravity/account-usage.d.ts +5 -2
- package/dist/runtimes/antigravity/account-usage.d.ts.map +1 -1
- package/dist/runtimes/antigravity/account-usage.js +13 -9
- package/dist/runtimes/antigravity/account-usage.js.map +1 -1
- package/dist/runtimes/antigravity/account.d.ts +37 -0
- package/dist/runtimes/antigravity/account.d.ts.map +1 -0
- package/dist/runtimes/antigravity/account.js +119 -0
- package/dist/runtimes/antigravity/account.js.map +1 -0
- package/dist/runtimes/antigravity/auth-status.d.ts +9 -0
- package/dist/runtimes/antigravity/auth-status.d.ts.map +1 -0
- package/dist/runtimes/antigravity/auth-status.js +54 -0
- package/dist/runtimes/antigravity/auth-status.js.map +1 -0
- package/dist/runtimes/antigravity/auth.d.ts +2 -6
- package/dist/runtimes/antigravity/auth.d.ts.map +1 -1
- package/dist/runtimes/antigravity/auth.js +10 -50
- package/dist/runtimes/antigravity/auth.js.map +1 -1
- package/dist/runtimes/antigravity/index.d.ts +40 -3
- package/dist/runtimes/antigravity/index.d.ts.map +1 -1
- package/dist/runtimes/antigravity/index.js +19 -4
- package/dist/runtimes/antigravity/index.js.map +1 -1
- package/dist/runtimes/antigravity/installation.d.ts +6 -3
- package/dist/runtimes/antigravity/installation.d.ts.map +1 -1
- package/dist/runtimes/antigravity/installation.js +25 -30
- package/dist/runtimes/antigravity/installation.js.map +1 -1
- package/dist/runtimes/antigravity/logout.d.ts.map +1 -1
- package/dist/runtimes/antigravity/logout.js +2 -0
- package/dist/runtimes/antigravity/logout.js.map +1 -1
- package/dist/runtimes/antigravity/options.d.ts.map +1 -1
- package/dist/runtimes/antigravity/options.js +3 -0
- package/dist/runtimes/antigravity/options.js.map +1 -1
- package/dist/runtimes/antigravity/quota.d.ts +6 -1
- package/dist/runtimes/antigravity/quota.d.ts.map +1 -1
- package/dist/runtimes/antigravity/quota.js +47 -13
- package/dist/runtimes/antigravity/quota.js.map +1 -1
- package/dist/runtimes/antigravity/skill-files.d.ts.map +1 -1
- package/dist/runtimes/antigravity/skill-files.js +2 -1
- package/dist/runtimes/antigravity/skill-files.js.map +1 -1
- package/dist/runtimes/antigravity/token-email.d.ts +37 -0
- package/dist/runtimes/antigravity/token-email.d.ts.map +1 -0
- package/dist/runtimes/antigravity/token-email.js +155 -0
- package/dist/runtimes/antigravity/token-email.js.map +1 -0
- package/dist/runtimes/claude/account-usage.d.ts.map +1 -1
- package/dist/runtimes/claude/account-usage.js +30 -8
- package/dist/runtimes/claude/account-usage.js.map +1 -1
- package/dist/runtimes/claude/auth-status.d.ts.map +1 -1
- package/dist/runtimes/claude/auth-status.js +25 -4
- package/dist/runtimes/claude/auth-status.js.map +1 -1
- package/dist/runtimes/claude/context-usage.d.ts +8 -4
- package/dist/runtimes/claude/context-usage.d.ts.map +1 -1
- package/dist/runtimes/claude/context-usage.js +24 -4
- package/dist/runtimes/claude/context-usage.js.map +1 -1
- package/dist/runtimes/claude/credentials.d.ts +4 -0
- package/dist/runtimes/claude/credentials.d.ts.map +1 -0
- package/dist/runtimes/claude/credentials.js +79 -0
- package/dist/runtimes/claude/credentials.js.map +1 -0
- package/dist/runtimes/claude/failure.d.ts +4 -0
- package/dist/runtimes/claude/failure.d.ts.map +1 -1
- package/dist/runtimes/claude/failure.js +33 -18
- package/dist/runtimes/claude/failure.js.map +1 -1
- package/dist/runtimes/claude/index.d.ts +16 -3
- package/dist/runtimes/claude/index.d.ts.map +1 -1
- package/dist/runtimes/claude/index.js +13 -2
- package/dist/runtimes/claude/index.js.map +1 -1
- package/dist/runtimes/claude/installation.d.ts +1 -0
- package/dist/runtimes/claude/installation.d.ts.map +1 -1
- package/dist/runtimes/claude/installation.js +2 -1
- package/dist/runtimes/claude/installation.js.map +1 -1
- package/dist/runtimes/claude/inventory.js +1 -1
- package/dist/runtimes/claude/inventory.js.map +1 -1
- package/dist/runtimes/claude/last-account.d.ts +21 -0
- package/dist/runtimes/claude/last-account.d.ts.map +1 -1
- package/dist/runtimes/claude/last-account.js +58 -6
- package/dist/runtimes/claude/last-account.js.map +1 -1
- package/dist/runtimes/claude/launch-args.d.ts +3 -0
- package/dist/runtimes/claude/launch-args.d.ts.map +1 -1
- package/dist/runtimes/claude/launch-args.js +26 -8
- package/dist/runtimes/claude/launch-args.js.map +1 -1
- package/dist/runtimes/claude/launch.d.ts +1 -1
- package/dist/runtimes/claude/launch.d.ts.map +1 -1
- package/dist/runtimes/claude/launch.js +9 -6
- package/dist/runtimes/claude/launch.js.map +1 -1
- package/dist/runtimes/claude/list-models.js +1 -1
- package/dist/runtimes/claude/list-models.js.map +1 -1
- package/dist/runtimes/claude/login-url.d.ts +3 -0
- package/dist/runtimes/claude/login-url.d.ts.map +1 -0
- package/dist/runtimes/claude/login-url.js +26 -0
- package/dist/runtimes/claude/login-url.js.map +1 -0
- package/dist/runtimes/claude/login.d.ts.map +1 -1
- package/dist/runtimes/claude/login.js +17 -10
- package/dist/runtimes/claude/login.js.map +1 -1
- package/dist/runtimes/claude/mcp-config.d.ts +2 -6
- package/dist/runtimes/claude/mcp-config.d.ts.map +1 -1
- package/dist/runtimes/claude/mcp-config.js +7 -117
- package/dist/runtimes/claude/mcp-config.js.map +1 -1
- package/dist/runtimes/claude/model-request-files.d.ts +19 -0
- package/dist/runtimes/claude/model-request-files.d.ts.map +1 -0
- package/dist/runtimes/claude/model-request-files.js +104 -0
- package/dist/runtimes/claude/model-request-files.js.map +1 -0
- package/dist/runtimes/claude/model-requests.d.ts +16 -0
- package/dist/runtimes/claude/model-requests.d.ts.map +1 -0
- package/dist/runtimes/claude/model-requests.js +190 -0
- package/dist/runtimes/claude/model-requests.js.map +1 -0
- package/dist/runtimes/claude/open-settings.d.ts +2 -1
- package/dist/runtimes/claude/open-settings.d.ts.map +1 -1
- package/dist/runtimes/claude/open-settings.js +33 -9
- package/dist/runtimes/claude/open-settings.js.map +1 -1
- package/dist/runtimes/claude/options.d.ts +5 -0
- package/dist/runtimes/claude/options.d.ts.map +1 -1
- package/dist/runtimes/claude/options.js +25 -0
- package/dist/runtimes/claude/options.js.map +1 -1
- package/dist/runtimes/claude/projection.d.ts +2 -1
- package/dist/runtimes/claude/projection.d.ts.map +1 -1
- package/dist/runtimes/claude/projection.js +44 -16
- package/dist/runtimes/claude/projection.js.map +1 -1
- package/dist/runtimes/claude/session.d.ts.map +1 -1
- package/dist/runtimes/claude/session.js +30 -7
- package/dist/runtimes/claude/session.js.map +1 -1
- package/dist/runtimes/claude/side-question.js +1 -1
- package/dist/runtimes/claude/side-question.js.map +1 -1
- package/dist/runtimes/claude/update.d.ts +17 -9
- package/dist/runtimes/claude/update.d.ts.map +1 -1
- package/dist/runtimes/claude/update.js +154 -29
- package/dist/runtimes/claude/update.js.map +1 -1
- package/dist/runtimes/claude/user-configuration.d.ts.map +1 -1
- package/dist/runtimes/claude/user-configuration.js +13 -6
- package/dist/runtimes/claude/user-configuration.js.map +1 -1
- package/dist/runtimes/codebuddy/failure.d.ts.map +1 -1
- package/dist/runtimes/codebuddy/failure.js +18 -2
- package/dist/runtimes/codebuddy/failure.js.map +1 -1
- package/dist/runtimes/codebuddy/index.d.ts +60 -1
- package/dist/runtimes/codebuddy/index.d.ts.map +1 -1
- package/dist/runtimes/codebuddy/index.js +25 -1
- package/dist/runtimes/codebuddy/index.js.map +1 -1
- package/dist/runtimes/codebuddy/installation.d.ts.map +1 -1
- package/dist/runtimes/codebuddy/installation.js +5 -4
- package/dist/runtimes/codebuddy/installation.js.map +1 -1
- package/dist/runtimes/codebuddy/options.d.ts.map +1 -1
- package/dist/runtimes/codebuddy/options.js +11 -9
- package/dist/runtimes/codebuddy/options.js.map +1 -1
- package/dist/runtimes/codex/account-id.d.ts +14 -0
- package/dist/runtimes/codex/account-id.d.ts.map +1 -0
- package/dist/runtimes/codex/account-id.js +173 -0
- package/dist/runtimes/codex/account-id.js.map +1 -0
- package/dist/runtimes/codex/account-request.d.ts +1 -0
- package/dist/runtimes/codex/account-request.d.ts.map +1 -1
- package/dist/runtimes/codex/account-request.js +45 -16
- package/dist/runtimes/codex/account-request.js.map +1 -1
- package/dist/runtimes/codex/account-usage.d.ts.map +1 -1
- package/dist/runtimes/codex/account-usage.js +15 -13
- package/dist/runtimes/codex/account-usage.js.map +1 -1
- package/dist/runtimes/codex/app-server-client.d.ts +5 -1
- package/dist/runtimes/codex/app-server-client.d.ts.map +1 -1
- package/dist/runtimes/codex/app-server-client.js +7 -7
- package/dist/runtimes/codex/app-server-client.js.map +1 -1
- package/dist/runtimes/codex/failure.d.ts.map +1 -1
- package/dist/runtimes/codex/failure.js +14 -16
- package/dist/runtimes/codex/failure.js.map +1 -1
- package/dist/runtimes/codex/home-initialization.d.ts +1 -0
- package/dist/runtimes/codex/home-initialization.d.ts.map +1 -1
- package/dist/runtimes/codex/home-initialization.js +49 -58
- package/dist/runtimes/codex/home-initialization.js.map +1 -1
- package/dist/runtimes/codex/index.d.ts +64 -1
- package/dist/runtimes/codex/index.d.ts.map +1 -1
- package/dist/runtimes/codex/index.js +27 -1
- package/dist/runtimes/codex/index.js.map +1 -1
- package/dist/runtimes/codex/installation.d.ts +1 -0
- package/dist/runtimes/codex/installation.d.ts.map +1 -1
- package/dist/runtimes/codex/installation.js +9 -1
- package/dist/runtimes/codex/installation.js.map +1 -1
- package/dist/runtimes/codex/inventory.js +1 -1
- package/dist/runtimes/codex/inventory.js.map +1 -1
- package/dist/runtimes/codex/item-detail.d.ts +4 -0
- package/dist/runtimes/codex/item-detail.d.ts.map +1 -1
- package/dist/runtimes/codex/item-detail.js +39 -0
- package/dist/runtimes/codex/item-detail.js.map +1 -1
- package/dist/runtimes/codex/limit-reset.d.ts.map +1 -1
- package/dist/runtimes/codex/limit-reset.js +3 -2
- package/dist/runtimes/codex/limit-reset.js.map +1 -1
- package/dist/runtimes/codex/list-models.js +1 -1
- package/dist/runtimes/codex/list-models.js.map +1 -1
- package/dist/runtimes/codex/login.d.ts.map +1 -1
- package/dist/runtimes/codex/login.js +24 -10
- package/dist/runtimes/codex/login.js.map +1 -1
- package/dist/runtimes/codex/open-config.d.ts +6 -0
- package/dist/runtimes/codex/open-config.d.ts.map +1 -0
- package/dist/runtimes/codex/open-config.js +28 -0
- package/dist/runtimes/codex/open-config.js.map +1 -0
- package/dist/runtimes/codex/open.d.ts.map +1 -1
- package/dist/runtimes/codex/open.js +3 -2
- package/dist/runtimes/codex/open.js.map +1 -1
- package/dist/runtimes/codex/options.d.ts.map +1 -1
- package/dist/runtimes/codex/options.js +3 -0
- package/dist/runtimes/codex/options.js.map +1 -1
- package/dist/runtimes/codex/projection.d.ts.map +1 -1
- package/dist/runtimes/codex/projection.js +44 -40
- package/dist/runtimes/codex/projection.js.map +1 -1
- package/dist/runtimes/codex/refusal.d.ts +3 -3
- package/dist/runtimes/codex/refusal.js +3 -3
- package/dist/runtimes/codex/session.d.ts.map +1 -1
- package/dist/runtimes/codex/session.js +13 -6
- package/dist/runtimes/codex/session.js.map +1 -1
- package/dist/runtimes/codex/tasks.d.ts.map +1 -1
- package/dist/runtimes/codex/tasks.js +1 -0
- package/dist/runtimes/codex/tasks.js.map +1 -1
- package/dist/runtimes/codex/tool-denials.d.ts +0 -3
- package/dist/runtimes/codex/tool-denials.d.ts.map +1 -1
- package/dist/runtimes/codex/tool-denials.js +0 -8
- package/dist/runtimes/codex/tool-denials.js.map +1 -1
- package/dist/runtimes/cursor/access.d.ts +4 -3
- package/dist/runtimes/cursor/access.d.ts.map +1 -1
- package/dist/runtimes/cursor/access.js +12 -8
- package/dist/runtimes/cursor/access.js.map +1 -1
- package/dist/runtimes/cursor/auth-status.js +1 -1
- package/dist/runtimes/cursor/auth-status.js.map +1 -1
- package/dist/runtimes/cursor/failure.d.ts.map +1 -1
- package/dist/runtimes/cursor/failure.js +4 -6
- package/dist/runtimes/cursor/failure.js.map +1 -1
- package/dist/runtimes/cursor/index.d.ts.map +1 -1
- package/dist/runtimes/cursor/index.js +18 -5
- package/dist/runtimes/cursor/index.js.map +1 -1
- package/dist/runtimes/cursor/installation.d.ts +13 -9
- package/dist/runtimes/cursor/installation.d.ts.map +1 -1
- package/dist/runtimes/cursor/installation.js +29 -14
- package/dist/runtimes/cursor/installation.js.map +1 -1
- package/dist/runtimes/cursor/list-models.js +1 -1
- package/dist/runtimes/cursor/list-models.js.map +1 -1
- package/dist/runtimes/cursor/login.js +1 -1
- package/dist/runtimes/cursor/login.js.map +1 -1
- package/dist/runtimes/cursor/logout.js +1 -1
- package/dist/runtimes/cursor/logout.js.map +1 -1
- package/dist/runtimes/cursor/model.d.ts.map +1 -1
- package/dist/runtimes/cursor/model.js +7 -1
- package/dist/runtimes/cursor/model.js.map +1 -1
- package/dist/runtimes/cursor/run.d.ts +2 -0
- package/dist/runtimes/cursor/run.d.ts.map +1 -1
- package/dist/runtimes/cursor/run.js +31 -0
- package/dist/runtimes/cursor/run.js.map +1 -1
- package/dist/runtimes/cursor/session.d.ts +3 -1
- package/dist/runtimes/cursor/session.d.ts.map +1 -1
- package/dist/runtimes/cursor/session.js +29 -18
- package/dist/runtimes/cursor/session.js.map +1 -1
- package/dist/runtimes/cursor/subprocess/channel.d.ts +1 -1
- package/dist/runtimes/cursor/subprocess/channel.d.ts.map +1 -1
- package/dist/runtimes/cursor/subprocess/channel.js +7 -7
- package/dist/runtimes/cursor/subprocess/channel.js.map +1 -1
- package/dist/runtimes/devin/index.d.ts +19 -0
- package/dist/runtimes/devin/index.d.ts.map +1 -1
- package/dist/runtimes/devin/index.js +10 -1
- package/dist/runtimes/devin/index.js.map +1 -1
- package/dist/runtimes/devin/installation.d.ts.map +1 -1
- package/dist/runtimes/devin/installation.js +7 -2
- package/dist/runtimes/devin/installation.js.map +1 -1
- package/dist/runtimes/devin/options.d.ts.map +1 -1
- package/dist/runtimes/devin/options.js +4 -0
- package/dist/runtimes/devin/options.js.map +1 -1
- package/dist/runtimes/devin/session.d.ts.map +1 -1
- package/dist/runtimes/devin/session.js +2 -0
- package/dist/runtimes/devin/session.js.map +1 -1
- package/dist/runtimes/dsh/bridge-controls.d.ts.map +1 -1
- package/dist/runtimes/dsh/bridge-controls.js +21 -0
- package/dist/runtimes/dsh/bridge-controls.js.map +1 -1
- package/dist/runtimes/dsh/bridge-goal.d.ts.map +1 -1
- package/dist/runtimes/dsh/bridge-goal.js +9 -5
- package/dist/runtimes/dsh/bridge-goal.js.map +1 -1
- package/dist/runtimes/dsh/bridge-input.d.ts.map +1 -1
- package/dist/runtimes/dsh/bridge-input.js +29 -3
- package/dist/runtimes/dsh/bridge-input.js.map +1 -1
- package/dist/runtimes/dsh/bridge.d.ts +1 -1
- package/dist/runtimes/dsh/bridge.d.ts.map +1 -1
- package/dist/runtimes/dsh/bridge.js +43 -8
- package/dist/runtimes/dsh/bridge.js.map +1 -1
- package/dist/runtimes/dsh/control.d.ts +3 -1
- package/dist/runtimes/dsh/control.d.ts.map +1 -1
- package/dist/runtimes/dsh/control.js +20 -6
- package/dist/runtimes/dsh/control.js.map +1 -1
- package/dist/runtimes/dsh/index.d.ts +36 -1
- package/dist/runtimes/dsh/index.d.ts.map +1 -1
- package/dist/runtimes/dsh/index.js +19 -3
- package/dist/runtimes/dsh/index.js.map +1 -1
- package/dist/runtimes/dsh/installation.d.ts +2 -3
- package/dist/runtimes/dsh/installation.d.ts.map +1 -1
- package/dist/runtimes/dsh/installation.js +11 -11
- package/dist/runtimes/dsh/installation.js.map +1 -1
- package/dist/runtimes/dsh/launch.d.ts +9 -1
- package/dist/runtimes/dsh/launch.d.ts.map +1 -1
- package/dist/runtimes/dsh/launch.js +22 -4
- package/dist/runtimes/dsh/launch.js.map +1 -1
- package/dist/runtimes/dsh/list-models.d.ts +3 -1
- package/dist/runtimes/dsh/list-models.d.ts.map +1 -1
- package/dist/runtimes/dsh/list-models.js +38 -11
- package/dist/runtimes/dsh/list-models.js.map +1 -1
- package/dist/runtimes/dsh/options.d.ts +6 -0
- package/dist/runtimes/dsh/options.d.ts.map +1 -1
- package/dist/runtimes/dsh/options.js +17 -1
- package/dist/runtimes/dsh/options.js.map +1 -1
- package/dist/runtimes/dsh/profile-startup.d.ts +12 -0
- package/dist/runtimes/dsh/profile-startup.d.ts.map +1 -0
- package/dist/runtimes/dsh/profile-startup.js +64 -0
- package/dist/runtimes/dsh/profile-startup.js.map +1 -0
- package/dist/runtimes/dsh/projection.d.ts +2 -0
- package/dist/runtimes/dsh/projection.d.ts.map +1 -1
- package/dist/runtimes/dsh/projection.js +35 -22
- package/dist/runtimes/dsh/projection.js.map +1 -1
- package/dist/runtimes/dsh/session.d.ts.map +1 -1
- package/dist/runtimes/dsh/session.js +76 -15
- package/dist/runtimes/dsh/session.js.map +1 -1
- package/dist/runtimes/dsh/skills.d.ts.map +1 -1
- package/dist/runtimes/dsh/skills.js +7 -5
- package/dist/runtimes/dsh/skills.js.map +1 -1
- package/dist/runtimes/factory/account-credential.d.ts +2 -1
- package/dist/runtimes/factory/account-credential.d.ts.map +1 -1
- package/dist/runtimes/factory/account-credential.js +5 -2
- package/dist/runtimes/factory/account-credential.js.map +1 -1
- package/dist/runtimes/factory/account-usage.d.ts.map +1 -1
- package/dist/runtimes/factory/account-usage.js +6 -3
- package/dist/runtimes/factory/account-usage.js.map +1 -1
- package/dist/runtimes/factory/account.d.ts.map +1 -1
- package/dist/runtimes/factory/account.js +4 -3
- package/dist/runtimes/factory/account.js.map +1 -1
- package/dist/runtimes/factory/client.d.ts.map +1 -1
- package/dist/runtimes/factory/client.js +3 -8
- package/dist/runtimes/factory/client.js.map +1 -1
- package/dist/runtimes/factory/compaction.d.ts +1 -1
- package/dist/runtimes/factory/compaction.d.ts.map +1 -1
- package/dist/runtimes/factory/compaction.js +62 -48
- package/dist/runtimes/factory/compaction.js.map +1 -1
- package/dist/runtimes/factory/context-usage.d.ts +15 -0
- package/dist/runtimes/factory/context-usage.d.ts.map +1 -0
- package/dist/runtimes/factory/context-usage.js +75 -0
- package/dist/runtimes/factory/context-usage.js.map +1 -0
- package/dist/runtimes/factory/index.d.ts +60 -0
- package/dist/runtimes/factory/index.d.ts.map +1 -1
- package/dist/runtimes/factory/index.js +21 -1
- package/dist/runtimes/factory/index.js.map +1 -1
- package/dist/runtimes/factory/installation.d.ts +1 -1
- package/dist/runtimes/factory/installation.d.ts.map +1 -1
- package/dist/runtimes/factory/installation.js +2 -2
- package/dist/runtimes/factory/installation.js.map +1 -1
- package/dist/runtimes/factory/options.d.ts.map +1 -1
- package/dist/runtimes/factory/options.js +6 -8
- package/dist/runtimes/factory/options.js.map +1 -1
- package/dist/runtimes/factory/projection.d.ts.map +1 -1
- package/dist/runtimes/factory/projection.js +31 -11
- package/dist/runtimes/factory/projection.js.map +1 -1
- package/dist/runtimes/factory/session-state.d.ts +9 -0
- package/dist/runtimes/factory/session-state.d.ts.map +1 -1
- package/dist/runtimes/factory/session-state.js +27 -0
- package/dist/runtimes/factory/session-state.js.map +1 -1
- package/dist/runtimes/factory/session.d.ts.map +1 -1
- package/dist/runtimes/factory/session.js +93 -46
- package/dist/runtimes/factory/session.js.map +1 -1
- package/dist/runtimes/grok/account-usage.d.ts.map +1 -1
- package/dist/runtimes/grok/account-usage.js +8 -6
- package/dist/runtimes/grok/account-usage.js.map +1 -1
- package/dist/runtimes/grok/failure.d.ts.map +1 -1
- package/dist/runtimes/grok/failure.js +12 -8
- package/dist/runtimes/grok/failure.js.map +1 -1
- package/dist/runtimes/grok/index.d.ts +32 -4
- package/dist/runtimes/grok/index.d.ts.map +1 -1
- package/dist/runtimes/grok/index.js +15 -2
- package/dist/runtimes/grok/index.js.map +1 -1
- package/dist/runtimes/grok/installation.d.ts +1 -0
- package/dist/runtimes/grok/installation.d.ts.map +1 -1
- package/dist/runtimes/grok/installation.js +8 -1
- package/dist/runtimes/grok/installation.js.map +1 -1
- package/dist/runtimes/grok/mcp-startup.d.ts +5 -0
- package/dist/runtimes/grok/mcp-startup.d.ts.map +1 -0
- package/dist/runtimes/grok/mcp-startup.js +80 -0
- package/dist/runtimes/grok/mcp-startup.js.map +1 -0
- package/dist/runtimes/grok/options.d.ts +3 -1
- package/dist/runtimes/grok/options.d.ts.map +1 -1
- package/dist/runtimes/grok/options.js +12 -0
- package/dist/runtimes/grok/options.js.map +1 -1
- package/dist/runtimes/grok/session.d.ts.map +1 -1
- package/dist/runtimes/grok/session.js +2 -0
- package/dist/runtimes/grok/session.js.map +1 -1
- package/dist/runtimes/grok/tasks.d.ts.map +1 -1
- package/dist/runtimes/grok/tasks.js +3 -1
- package/dist/runtimes/grok/tasks.js.map +1 -1
- package/dist/runtimes/kimi/account-usage.d.ts.map +1 -1
- package/dist/runtimes/kimi/account-usage.js +5 -3
- package/dist/runtimes/kimi/account-usage.js.map +1 -1
- package/dist/runtimes/kimi/index.d.ts +56 -7
- package/dist/runtimes/kimi/index.d.ts.map +1 -1
- package/dist/runtimes/kimi/index.js +21 -3
- package/dist/runtimes/kimi/index.js.map +1 -1
- package/dist/runtimes/kimi/installation.d.ts.map +1 -1
- package/dist/runtimes/kimi/installation.js +5 -1
- package/dist/runtimes/kimi/installation.js.map +1 -1
- package/dist/runtimes/kimi/kap-boot.d.ts +16 -0
- package/dist/runtimes/kimi/kap-boot.d.ts.map +1 -0
- package/dist/runtimes/kimi/kap-boot.js +28 -0
- package/dist/runtimes/kimi/kap-boot.js.map +1 -0
- package/dist/runtimes/kimi/kap-compaction.d.ts +12 -0
- package/dist/runtimes/kimi/kap-compaction.d.ts.map +1 -0
- package/dist/runtimes/kimi/kap-compaction.js +63 -0
- package/dist/runtimes/kimi/kap-compaction.js.map +1 -0
- package/dist/runtimes/kimi/kap-controls.d.ts +48 -0
- package/dist/runtimes/kimi/kap-controls.d.ts.map +1 -0
- package/dist/runtimes/kimi/kap-controls.js +263 -0
- package/dist/runtimes/kimi/kap-controls.js.map +1 -0
- package/dist/runtimes/kimi/kap-dispatch.d.ts +10 -0
- package/dist/runtimes/kimi/kap-dispatch.d.ts.map +1 -0
- package/dist/runtimes/kimi/kap-dispatch.js +146 -0
- package/dist/runtimes/kimi/kap-dispatch.js.map +1 -0
- package/dist/runtimes/kimi/kap-errors.d.ts +24 -0
- package/dist/runtimes/kimi/kap-errors.d.ts.map +1 -0
- package/dist/runtimes/kimi/kap-errors.js +173 -0
- package/dist/runtimes/kimi/kap-errors.js.map +1 -0
- package/dist/runtimes/kimi/kap-failures.d.ts +12 -0
- package/dist/runtimes/kimi/kap-failures.d.ts.map +1 -0
- package/dist/runtimes/kimi/kap-failures.js +177 -0
- package/dist/runtimes/kimi/kap-failures.js.map +1 -0
- package/dist/runtimes/kimi/kap-items.d.ts +10 -0
- package/dist/runtimes/kimi/kap-items.d.ts.map +1 -0
- package/dist/runtimes/kimi/kap-items.js +201 -0
- package/dist/runtimes/kimi/kap-items.js.map +1 -0
- package/dist/runtimes/kimi/kap-negotiate.d.ts +9 -0
- package/dist/runtimes/kimi/kap-negotiate.d.ts.map +1 -0
- package/dist/runtimes/kimi/kap-negotiate.js +83 -0
- package/dist/runtimes/kimi/kap-negotiate.js.map +1 -0
- package/dist/runtimes/kimi/kap-open.d.ts +25 -0
- package/dist/runtimes/kimi/kap-open.d.ts.map +1 -0
- package/dist/runtimes/kimi/kap-open.js +130 -0
- package/dist/runtimes/kimi/kap-open.js.map +1 -0
- package/dist/runtimes/kimi/kap-projection-state.d.ts +68 -0
- package/dist/runtimes/kimi/kap-projection-state.d.ts.map +1 -0
- package/dist/runtimes/kimi/kap-projection-state.js +61 -0
- package/dist/runtimes/kimi/kap-projection-state.js.map +1 -0
- package/dist/runtimes/kimi/kap-projection.d.ts +6 -0
- package/dist/runtimes/kimi/kap-projection.d.ts.map +1 -0
- package/dist/runtimes/kimi/kap-projection.js +223 -0
- package/dist/runtimes/kimi/kap-projection.js.map +1 -0
- package/dist/runtimes/kimi/kap-protocol.d.ts +46 -0
- package/dist/runtimes/kimi/kap-protocol.d.ts.map +1 -0
- package/dist/runtimes/kimi/kap-protocol.js +220 -0
- package/dist/runtimes/kimi/kap-protocol.js.map +1 -0
- package/dist/runtimes/kimi/kap-session.d.ts +11 -0
- package/dist/runtimes/kimi/kap-session.d.ts.map +1 -0
- package/dist/runtimes/kimi/kap-session.js +116 -0
- package/dist/runtimes/kimi/kap-session.js.map +1 -0
- package/dist/runtimes/kimi/kap-socket.d.ts +11 -0
- package/dist/runtimes/kimi/kap-socket.d.ts.map +1 -0
- package/dist/runtimes/kimi/kap-socket.js +147 -0
- package/dist/runtimes/kimi/kap-socket.js.map +1 -0
- package/dist/runtimes/kimi/kap-turns.d.ts +12 -0
- package/dist/runtimes/kimi/kap-turns.d.ts.map +1 -0
- package/dist/runtimes/kimi/kap-turns.js +168 -0
- package/dist/runtimes/kimi/kap-turns.js.map +1 -0
- package/dist/runtimes/kimi/native-usage.d.ts.map +1 -1
- package/dist/runtimes/kimi/native-usage.js +4 -3
- package/dist/runtimes/kimi/native-usage.js.map +1 -1
- package/dist/runtimes/kimi/options.d.ts +5 -1
- package/dist/runtimes/kimi/options.d.ts.map +1 -1
- package/dist/runtimes/kimi/options.js +45 -2
- package/dist/runtimes/kimi/options.js.map +1 -1
- package/dist/runtimes/kimi/session.d.ts.map +1 -1
- package/dist/runtimes/kimi/session.js +15 -3
- package/dist/runtimes/kimi/session.js.map +1 -1
- package/dist/runtimes/kimi/version.d.ts +5 -0
- package/dist/runtimes/kimi/version.d.ts.map +1 -0
- package/dist/runtimes/kimi/version.js +12 -0
- package/dist/runtimes/kimi/version.js.map +1 -0
- package/dist/runtimes/kimi/web-startup.d.ts.map +1 -1
- package/dist/runtimes/kimi/web-startup.js +4 -18
- package/dist/runtimes/kimi/web-startup.js.map +1 -1
- package/dist/runtimes/omp/index.d.ts +4 -0
- package/dist/runtimes/omp/index.d.ts.map +1 -1
- package/dist/runtimes/omp/index.js +1 -0
- package/dist/runtimes/omp/index.js.map +1 -1
- package/dist/runtimes/omp/installation.d.ts.map +1 -1
- package/dist/runtimes/omp/installation.js +3 -0
- package/dist/runtimes/omp/installation.js.map +1 -1
- package/dist/runtimes/opencode/failure.js +6 -6
- package/dist/runtimes/opencode/failure.js.map +1 -1
- package/dist/runtimes/opencode/index.d.ts +120 -5
- package/dist/runtimes/opencode/index.d.ts.map +1 -1
- package/dist/runtimes/opencode/index.js +34 -4
- package/dist/runtimes/opencode/index.js.map +1 -1
- package/dist/runtimes/opencode/inline-prompt-config.d.ts +5 -0
- package/dist/runtimes/opencode/inline-prompt-config.d.ts.map +1 -0
- package/dist/runtimes/opencode/inline-prompt-config.js +82 -0
- package/dist/runtimes/opencode/inline-prompt-config.js.map +1 -0
- package/dist/runtimes/opencode/installation.d.ts +8 -0
- package/dist/runtimes/opencode/installation.d.ts.map +1 -1
- package/dist/runtimes/opencode/installation.js +26 -1
- package/dist/runtimes/opencode/installation.js.map +1 -1
- package/dist/runtimes/opencode/options.d.ts +5 -1
- package/dist/runtimes/opencode/options.d.ts.map +1 -1
- package/dist/runtimes/opencode/options.js +45 -1
- package/dist/runtimes/opencode/options.js.map +1 -1
- package/dist/runtimes/opencode/prompt-config-v2.d.ts.map +1 -1
- package/dist/runtimes/opencode/prompt-config-v2.js +23 -31
- package/dist/runtimes/opencode/prompt-config-v2.js.map +1 -1
- package/dist/runtimes/opencode/prompt-config.d.ts +2 -1
- package/dist/runtimes/opencode/prompt-config.d.ts.map +1 -1
- package/dist/runtimes/opencode/prompt-config.js +45 -23
- package/dist/runtimes/opencode/prompt-config.js.map +1 -1
- package/dist/runtimes/opencode/session.d.ts.map +1 -1
- package/dist/runtimes/opencode/session.js +1 -0
- package/dist/runtimes/opencode/session.js.map +1 -1
- package/dist/runtimes/opencode/shared-session.d.ts.map +1 -1
- package/dist/runtimes/opencode/shared-session.js +3 -0
- package/dist/runtimes/opencode/shared-session.js.map +1 -1
- package/dist/runtimes/opencode/upgrade.d.ts +4 -0
- package/dist/runtimes/opencode/upgrade.d.ts.map +1 -0
- package/dist/runtimes/opencode/upgrade.js +21 -0
- package/dist/runtimes/opencode/upgrade.js.map +1 -0
- package/dist/runtimes/opencode/version.d.ts +5 -0
- package/dist/runtimes/opencode/version.d.ts.map +1 -1
- package/dist/runtimes/opencode/version.js +14 -1
- package/dist/runtimes/opencode/version.js.map +1 -1
- package/dist/runtimes/pi/auth.d.ts +30 -7
- package/dist/runtimes/pi/auth.d.ts.map +1 -1
- package/dist/runtimes/pi/auth.js +2 -0
- package/dist/runtimes/pi/auth.js.map +1 -1
- package/dist/runtimes/pi/catalog.d.ts +1 -1
- package/dist/runtimes/pi/catalog.d.ts.map +1 -1
- package/dist/runtimes/pi/catalog.js.map +1 -1
- package/dist/runtimes/pi/credential-shape.d.ts +9 -0
- package/dist/runtimes/pi/credential-shape.d.ts.map +1 -0
- package/dist/runtimes/pi/credential-shape.js +85 -0
- package/dist/runtimes/pi/credential-shape.js.map +1 -0
- package/dist/runtimes/pi/facade-runtime.d.ts +1 -7
- package/dist/runtimes/pi/facade-runtime.d.ts.map +1 -1
- package/dist/runtimes/pi/facade-runtime.js.map +1 -1
- package/dist/runtimes/pi/failure.d.ts.map +1 -1
- package/dist/runtimes/pi/failure.js.map +1 -1
- package/dist/runtimes/pi/index.d.ts.map +1 -1
- package/dist/runtimes/pi/index.js +3 -1
- package/dist/runtimes/pi/index.js.map +1 -1
- package/dist/runtimes/pi/input-disposition.d.ts +1 -1
- package/dist/runtimes/pi/input-disposition.d.ts.map +1 -1
- package/dist/runtimes/pi/installation.d.ts +15 -3
- package/dist/runtimes/pi/installation.d.ts.map +1 -1
- package/dist/runtimes/pi/installation.js +101 -59
- package/dist/runtimes/pi/installation.js.map +1 -1
- package/dist/runtimes/pi/inventory.d.ts.map +1 -1
- package/dist/runtimes/pi/inventory.js +5 -2
- package/dist/runtimes/pi/inventory.js.map +1 -1
- package/dist/runtimes/pi/list-models.d.ts +3 -2
- package/dist/runtimes/pi/list-models.d.ts.map +1 -1
- package/dist/runtimes/pi/list-models.js +12 -2
- package/dist/runtimes/pi/list-models.js.map +1 -1
- package/dist/runtimes/pi/model-projection.d.ts +2 -0
- package/dist/runtimes/pi/model-projection.d.ts.map +1 -1
- package/dist/runtimes/pi/model-projection.js.map +1 -1
- package/dist/runtimes/pi/model-requests.d.ts +9 -0
- package/dist/runtimes/pi/model-requests.d.ts.map +1 -0
- package/dist/runtimes/pi/model-requests.js +76 -0
- package/dist/runtimes/pi/model-requests.js.map +1 -0
- package/dist/runtimes/pi/open.d.ts.map +1 -1
- package/dist/runtimes/pi/open.js +13 -28
- package/dist/runtimes/pi/open.js.map +1 -1
- package/dist/runtimes/pi/options.d.ts +7 -0
- package/dist/runtimes/pi/options.d.ts.map +1 -1
- package/dist/runtimes/pi/options.js.map +1 -1
- package/dist/runtimes/pi/projection.d.ts.map +1 -1
- package/dist/runtimes/pi/projection.js +11 -4
- package/dist/runtimes/pi/projection.js.map +1 -1
- package/dist/runtimes/pi/rpc/control.d.ts +1 -1
- package/dist/runtimes/pi/rpc/control.d.ts.map +1 -1
- package/dist/runtimes/pi/rpc/control.js +6 -4
- package/dist/runtimes/pi/rpc/control.js.map +1 -1
- package/dist/runtimes/pi/rpc/extension.d.ts.map +1 -1
- package/dist/runtimes/pi/rpc/extension.js +15 -2
- package/dist/runtimes/pi/rpc/extension.js.map +1 -1
- package/dist/runtimes/pi/rpc/open.d.ts.map +1 -1
- package/dist/runtimes/pi/rpc/open.js +11 -6
- package/dist/runtimes/pi/rpc/open.js.map +1 -1
- package/dist/runtimes/pi/rpc/prompt-files.d.ts.map +1 -1
- package/dist/runtimes/pi/rpc/prompt-files.js +14 -5
- package/dist/runtimes/pi/rpc/prompt-files.js.map +1 -1
- package/dist/runtimes/pi/rpc/readers.d.ts.map +1 -1
- package/dist/runtimes/pi/rpc/readers.js +2 -0
- package/dist/runtimes/pi/rpc/readers.js.map +1 -1
- package/dist/runtimes/pi/rpc/session.d.ts.map +1 -1
- package/dist/runtimes/pi/rpc/session.js +18 -12
- package/dist/runtimes/pi/rpc/session.js.map +1 -1
- package/dist/runtimes/pi/session.d.ts.map +1 -1
- package/dist/runtimes/pi/session.js +15 -7
- package/dist/runtimes/pi/session.js.map +1 -1
- package/dist/runtimes/pi/side-question.js +1 -1
- package/dist/runtimes/pi/side-question.js.map +1 -1
- package/dist/runtimes/pi-durable/index.d.ts.map +1 -1
- package/dist/runtimes/pi-durable/index.js +8 -1
- package/dist/runtimes/pi-durable/index.js.map +1 -1
- package/dist/runtimes/pi-durable/options.d.ts.map +1 -1
- package/dist/runtimes/pi-durable/options.js +3 -0
- package/dist/runtimes/pi-durable/options.js.map +1 -1
- package/dist/runtimes/pi-durable/projection.d.ts +4 -2
- package/dist/runtimes/pi-durable/projection.d.ts.map +1 -1
- package/dist/runtimes/pi-durable/projection.js +19 -4
- package/dist/runtimes/pi-durable/projection.js.map +1 -1
- package/dist/runtimes/pi-durable/session.d.ts.map +1 -1
- package/dist/runtimes/pi-durable/session.js +164 -23
- package/dist/runtimes/pi-durable/session.js.map +1 -1
- package/dist/runtimes/qoder/daemon.d.ts +2 -1
- package/dist/runtimes/qoder/daemon.d.ts.map +1 -1
- package/dist/runtimes/qoder/daemon.js +13 -7
- package/dist/runtimes/qoder/daemon.js.map +1 -1
- package/dist/runtimes/qoder/index.d.ts +25 -1
- package/dist/runtimes/qoder/index.d.ts.map +1 -1
- package/dist/runtimes/qoder/index.js +14 -1
- package/dist/runtimes/qoder/index.js.map +1 -1
- package/dist/runtimes/qoder/installation.d.ts +2 -2
- package/dist/runtimes/qoder/installation.d.ts.map +1 -1
- package/dist/runtimes/qoder/installation.js +10 -17
- package/dist/runtimes/qoder/installation.js.map +1 -1
- package/dist/runtimes/qoder/launch.d.ts +4 -4
- package/dist/runtimes/qoder/launch.d.ts.map +1 -1
- package/dist/runtimes/qoder/launch.js +24 -31
- package/dist/runtimes/qoder/launch.js.map +1 -1
- package/dist/runtimes/qoder/list-models.d.ts.map +1 -1
- package/dist/runtimes/qoder/list-models.js +22 -14
- package/dist/runtimes/qoder/list-models.js.map +1 -1
- package/dist/runtimes/qoder/mcp-config.d.ts +13 -0
- package/dist/runtimes/qoder/mcp-config.d.ts.map +1 -0
- package/dist/runtimes/qoder/mcp-config.js +22 -0
- package/dist/runtimes/qoder/mcp-config.js.map +1 -0
- package/dist/runtimes/qoder/options.d.ts.map +1 -1
- package/dist/runtimes/qoder/options.js +16 -10
- package/dist/runtimes/qoder/options.js.map +1 -1
- package/dist/runtimes/qoder/projection.d.ts.map +1 -1
- package/dist/runtimes/qoder/projection.js +5 -3
- package/dist/runtimes/qoder/projection.js.map +1 -1
- package/dist/runtimes/qoder/protocol.d.ts +3 -1
- package/dist/runtimes/qoder/protocol.d.ts.map +1 -1
- package/dist/runtimes/qoder/protocol.js +6 -4
- package/dist/runtimes/qoder/protocol.js.map +1 -1
- package/dist/runtimes/qoder/session.d.ts.map +1 -1
- package/dist/runtimes/qoder/session.js +8 -4
- package/dist/runtimes/qoder/session.js.map +1 -1
- package/dist/runtimes/qwen/control.d.ts +1 -1
- package/dist/runtimes/qwen/control.d.ts.map +1 -1
- package/dist/runtimes/qwen/control.js +3 -5
- package/dist/runtimes/qwen/control.js.map +1 -1
- package/dist/runtimes/qwen/credentials.d.ts +7 -0
- package/dist/runtimes/qwen/credentials.d.ts.map +1 -0
- package/dist/runtimes/qwen/credentials.js +47 -0
- package/dist/runtimes/qwen/credentials.js.map +1 -0
- package/dist/runtimes/qwen/index.d.ts +10 -9
- package/dist/runtimes/qwen/index.d.ts.map +1 -1
- package/dist/runtimes/qwen/index.js +21 -2
- package/dist/runtimes/qwen/index.js.map +1 -1
- package/dist/runtimes/qwen/installation.d.ts +1 -0
- package/dist/runtimes/qwen/installation.d.ts.map +1 -1
- package/dist/runtimes/qwen/installation.js +2 -1
- package/dist/runtimes/qwen/installation.js.map +1 -1
- package/dist/runtimes/qwen/launch.d.ts +3 -1
- package/dist/runtimes/qwen/launch.d.ts.map +1 -1
- package/dist/runtimes/qwen/launch.js +27 -16
- package/dist/runtimes/qwen/launch.js.map +1 -1
- package/dist/runtimes/qwen/list-models.js +2 -2
- package/dist/runtimes/qwen/list-models.js.map +1 -1
- package/dist/runtimes/qwen/native-memory.d.ts +17 -0
- package/dist/runtimes/qwen/native-memory.d.ts.map +1 -0
- package/dist/runtimes/qwen/native-memory.js +252 -0
- package/dist/runtimes/qwen/native-memory.js.map +1 -0
- package/dist/runtimes/qwen/options.d.ts +2 -0
- package/dist/runtimes/qwen/options.d.ts.map +1 -1
- package/dist/runtimes/qwen/options.js +20 -17
- package/dist/runtimes/qwen/options.js.map +1 -1
- package/dist/runtimes/qwen/projection.d.ts.map +1 -1
- package/dist/runtimes/qwen/projection.js +2 -1
- package/dist/runtimes/qwen/projection.js.map +1 -1
- package/dist/runtimes/qwen/session.d.ts.map +1 -1
- package/dist/runtimes/qwen/session.js +16 -7
- package/dist/runtimes/qwen/session.js.map +1 -1
- package/dist/shared/acp/effort.d.ts.map +1 -1
- package/dist/shared/acp/effort.js +5 -0
- package/dist/shared/acp/effort.js.map +1 -1
- package/dist/shared/acp/errors.d.ts +1 -1
- package/dist/shared/acp/errors.d.ts.map +1 -1
- package/dist/shared/acp/errors.js +3 -10
- package/dist/shared/acp/errors.js.map +1 -1
- package/dist/shared/acp/failure.js +5 -5
- package/dist/shared/acp/open-readiness.d.ts +15 -0
- package/dist/shared/acp/open-readiness.d.ts.map +1 -0
- package/dist/shared/acp/open-readiness.js +11 -0
- package/dist/shared/acp/open-readiness.js.map +1 -0
- package/dist/shared/acp/process.d.ts +5 -1
- package/dist/shared/acp/process.d.ts.map +1 -1
- package/dist/shared/acp/process.js +18 -5
- package/dist/shared/acp/process.js.map +1 -1
- package/dist/shared/acp/profile.d.ts +7 -4
- package/dist/shared/acp/profile.d.ts.map +1 -1
- package/dist/shared/acp/profile.js +42 -22
- package/dist/shared/acp/profile.js.map +1 -1
- package/dist/shared/acp/projection.d.ts.map +1 -1
- package/dist/shared/acp/projection.js +8 -3
- package/dist/shared/acp/projection.js.map +1 -1
- package/dist/shared/acp/routing-types.d.ts +3 -1
- package/dist/shared/acp/routing-types.d.ts.map +1 -1
- package/dist/shared/acp/routing.d.ts.map +1 -1
- package/dist/shared/acp/routing.js +5 -3
- package/dist/shared/acp/routing.js.map +1 -1
- package/dist/shared/acp/session-state.d.ts +2 -1
- package/dist/shared/acp/session-state.d.ts.map +1 -1
- package/dist/shared/acp/session-state.js +3 -1
- package/dist/shared/acp/session-state.js.map +1 -1
- package/dist/shared/acp/session.d.ts.map +1 -1
- package/dist/shared/acp/session.js +98 -52
- package/dist/shared/acp/session.js.map +1 -1
- package/dist/shared/acp/shared-session.d.ts.map +1 -1
- package/dist/shared/acp/shared-session.js +18 -6
- package/dist/shared/acp/shared-session.js.map +1 -1
- package/dist/shared/acp/turns.d.ts +1 -1
- package/dist/shared/acp/turns.d.ts.map +1 -1
- package/dist/shared/acp/turns.js +14 -12
- package/dist/shared/acp/turns.js.map +1 -1
- package/dist/shared/credential-redactor.d.ts +8 -0
- package/dist/shared/credential-redactor.d.ts.map +1 -1
- package/dist/shared/credential-redactor.js +22 -0
- package/dist/shared/credential-redactor.js.map +1 -1
- package/dist/shared/executable/close.d.ts +7 -0
- package/dist/shared/executable/close.d.ts.map +1 -0
- package/dist/shared/executable/close.js +26 -0
- package/dist/shared/executable/close.js.map +1 -0
- package/dist/shared/executable/diagnostics.d.ts +6 -0
- package/dist/shared/executable/diagnostics.d.ts.map +1 -1
- package/dist/shared/executable/diagnostics.js +9 -0
- package/dist/shared/executable/diagnostics.js.map +1 -1
- package/dist/shared/executable/index.d.ts +2 -0
- package/dist/shared/executable/index.d.ts.map +1 -1
- package/dist/shared/executable/index.js +1 -0
- package/dist/shared/executable/index.js.map +1 -1
- package/dist/shared/executable/node-script.d.ts +1 -0
- package/dist/shared/executable/node-script.d.ts.map +1 -1
- package/dist/shared/executable/node-script.js +1 -1
- package/dist/shared/executable/node-script.js.map +1 -1
- package/dist/shared/executable/process-cleanup-diagnostics.d.ts +3 -1
- package/dist/shared/executable/process-cleanup-diagnostics.d.ts.map +1 -1
- package/dist/shared/executable/process-cleanup-diagnostics.js.map +1 -1
- package/dist/shared/executable/process-cleanup.d.ts.map +1 -1
- package/dist/shared/executable/process-cleanup.js +41 -12
- package/dist/shared/executable/process-cleanup.js.map +1 -1
- package/dist/shared/executable/process-shutdown.d.ts +1 -0
- package/dist/shared/executable/process-shutdown.d.ts.map +1 -1
- package/dist/shared/executable/process-shutdown.js +27 -4
- package/dist/shared/executable/process-shutdown.js.map +1 -1
- package/dist/shared/executable/process-table-async.js +4 -4
- package/dist/shared/executable/process-table-async.js.map +1 -1
- package/dist/shared/executable/process-table-windows.d.ts.map +1 -1
- package/dist/shared/executable/process-table-windows.js +3 -1
- package/dist/shared/executable/process-table-windows.js.map +1 -1
- package/dist/shared/executable/process-tree.d.ts +8 -4
- package/dist/shared/executable/process-tree.d.ts.map +1 -1
- package/dist/shared/executable/process-tree.js +17 -10
- package/dist/shared/executable/process-tree.js.map +1 -1
- package/dist/shared/executable/process.d.ts +9 -1
- package/dist/shared/executable/process.d.ts.map +1 -1
- package/dist/shared/executable/process.js +2 -1
- package/dist/shared/executable/process.js.map +1 -1
- package/dist/shared/executable/reported-stderr.d.ts +18 -0
- package/dist/shared/executable/reported-stderr.d.ts.map +1 -0
- package/dist/shared/executable/reported-stderr.js +49 -0
- package/dist/shared/executable/reported-stderr.js.map +1 -0
- package/dist/shared/executable/run.d.ts +2 -0
- package/dist/shared/executable/run.d.ts.map +1 -1
- package/dist/shared/executable/run.js +4 -0
- package/dist/shared/executable/run.js.map +1 -1
- package/dist/shared/executable/verify-descendant-exit.d.ts +4 -0
- package/dist/shared/executable/verify-descendant-exit.d.ts.map +1 -0
- package/dist/shared/executable/verify-descendant-exit.js +34 -0
- package/dist/shared/executable/verify-descendant-exit.js.map +1 -0
- package/dist/shared/failure-class.d.ts +2 -0
- package/dist/shared/failure-class.d.ts.map +1 -1
- package/dist/shared/failure-class.js +11 -1
- package/dist/shared/failure-class.js.map +1 -1
- package/dist/shared/held-input.d.ts +9 -0
- package/dist/shared/held-input.d.ts.map +1 -1
- package/dist/shared/held-input.js +8 -0
- package/dist/shared/held-input.js.map +1 -1
- package/dist/shared/host-environment.d.ts +40 -0
- package/dist/shared/host-environment.d.ts.map +1 -0
- package/dist/shared/host-environment.js +74 -0
- package/dist/shared/host-environment.js.map +1 -0
- package/dist/shared/installation.d.ts +14 -3
- package/dist/shared/installation.d.ts.map +1 -1
- package/dist/shared/installation.js +81 -61
- package/dist/shared/installation.js.map +1 -1
- package/dist/shared/launch-args.d.ts +7 -0
- package/dist/shared/launch-args.d.ts.map +1 -0
- package/dist/shared/launch-args.js +25 -0
- package/dist/shared/launch-args.js.map +1 -0
- package/dist/shared/login.d.ts +3 -0
- package/dist/shared/login.d.ts.map +1 -1
- package/dist/shared/login.js +2 -1
- package/dist/shared/login.js.map +1 -1
- package/dist/shared/mcp-config-handoff.d.ts +12 -0
- package/dist/shared/mcp-config-handoff.d.ts.map +1 -0
- package/dist/shared/mcp-config-handoff.js +131 -0
- package/dist/shared/mcp-config-handoff.js.map +1 -0
- package/dist/shared/native-home-initialization.d.ts +20 -0
- package/dist/shared/native-home-initialization.d.ts.map +1 -0
- package/dist/shared/native-home-initialization.js +87 -0
- package/dist/shared/native-home-initialization.js.map +1 -0
- package/dist/shared/native-session-file.d.ts +3 -0
- package/dist/shared/native-session-file.d.ts.map +1 -0
- package/dist/shared/native-session-file.js +22 -0
- package/dist/shared/native-session-file.js.map +1 -0
- package/dist/shared/process-session.d.ts +1 -1
- package/dist/shared/process-session.d.ts.map +1 -1
- package/dist/shared/process-session.js +12 -9
- package/dist/shared/process-session.js.map +1 -1
- package/dist/shared/prompt-run.d.ts +10 -0
- package/dist/shared/prompt-run.d.ts.map +1 -0
- package/dist/shared/prompt-run.js +9 -0
- package/dist/shared/prompt-run.js.map +1 -0
- package/dist/shared/seal-session.d.ts.map +1 -1
- package/dist/shared/seal-session.js +2 -1
- package/dist/shared/seal-session.js.map +1 -1
- package/dist/shared/semver.d.ts +6 -0
- package/dist/shared/semver.d.ts.map +1 -1
- package/dist/shared/semver.js +16 -0
- package/dist/shared/semver.js.map +1 -1
- package/dist/shared/session-credentials.d.ts.map +1 -1
- package/dist/shared/session-credentials.js +2 -0
- package/dist/shared/session-credentials.js.map +1 -1
- package/dist/shared/session-options.d.ts.map +1 -1
- package/dist/shared/session-options.js +7 -4
- package/dist/shared/session-options.js.map +1 -1
- package/dist/shared/stream-json/compaction.d.ts +0 -1
- package/dist/shared/stream-json/compaction.d.ts.map +1 -1
- package/dist/shared/stream-json/compaction.js +1 -1
- package/dist/shared/stream-json/compaction.js.map +1 -1
- package/dist/shared/stream-json/held-input.d.ts.map +1 -1
- package/dist/shared/stream-json/held-input.js +0 -4
- package/dist/shared/stream-json/held-input.js.map +1 -1
- package/dist/shared/stream-json/input-lifecycle.d.ts.map +1 -1
- package/dist/shared/stream-json/input-lifecycle.js +8 -0
- package/dist/shared/stream-json/input-lifecycle.js.map +1 -1
- package/dist/shared/stream-json/profile.d.ts +6 -4
- package/dist/shared/stream-json/profile.d.ts.map +1 -1
- package/dist/shared/stream-json/projection.d.ts.map +1 -1
- package/dist/shared/stream-json/projection.js +23 -6
- package/dist/shared/stream-json/projection.js.map +1 -1
- package/dist/shared/stream-json/session.d.ts.map +1 -1
- package/dist/shared/stream-json/session.js +19 -21
- package/dist/shared/stream-json/session.js.map +1 -1
- package/dist/shared/stream-json/state.d.ts +3 -2
- package/dist/shared/stream-json/state.d.ts.map +1 -1
- package/dist/shared/stream-json/state.js +1 -0
- package/dist/shared/stream-json/state.js.map +1 -1
- package/dist/shared/update.d.ts +2 -0
- package/dist/shared/update.d.ts.map +1 -1
- package/dist/shared/update.js +6 -2
- package/dist/shared/update.js.map +1 -1
- package/dist/shared/usage-ratio.d.ts +16 -0
- package/dist/shared/usage-ratio.d.ts.map +1 -0
- package/dist/shared/usage-ratio.js +52 -0
- package/dist/shared/usage-ratio.js.map +1 -0
- package/dist/shared/user-configuration.d.ts +5 -0
- package/dist/shared/user-configuration.d.ts.map +1 -0
- package/dist/shared/user-configuration.js +19 -0
- package/dist/shared/user-configuration.js.map +1 -0
- package/dist/shared/version-range.d.ts +30 -0
- package/dist/shared/version-range.d.ts.map +1 -0
- package/dist/shared/version-range.js +50 -0
- package/dist/shared/version-range.js.map +1 -0
- package/dist/testing/scripted-runtime.d.ts.map +1 -1
- package/dist/testing/scripted-runtime.js +9 -4
- package/dist/testing/scripted-runtime.js.map +1 -1
- package/dist/testing/scripted-tasks.d.ts +1 -0
- package/dist/testing/scripted-tasks.d.ts.map +1 -1
- package/package.json +15 -8
- package/dist/runtimes/qwen/close.d.ts +0 -4
- package/dist/runtimes/qwen/close.d.ts.map +0 -1
- package/dist/runtimes/qwen/close.js +0 -13
- package/dist/runtimes/qwen/close.js.map +0 -1
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { parseTree } from "jsonc-parser";
|
|
2
|
+
import { UnsupportedOptionError } from "../../contracts/errors.js";
|
|
3
|
+
import { checkResume } from "../../shared/session-options.js";
|
|
4
|
+
import { environmentValue, sessionEnvironment } from "../../shared/environment.js";
|
|
5
|
+
function root(content, option) {
|
|
6
|
+
const errors = [];
|
|
7
|
+
const node = parseTree(content, errors, { disallowComments: true });
|
|
8
|
+
if (errors.length > 0 || node?.type !== "object") {
|
|
9
|
+
throw new UnsupportedOptionError(option, "OPENCODE_CONFIG_CONTENT must be a JSON object");
|
|
10
|
+
}
|
|
11
|
+
return node;
|
|
12
|
+
}
|
|
13
|
+
export function inlineContent(options) {
|
|
14
|
+
return environmentValue(sessionEnvironment(options.env), "OPENCODE_CONFIG_CONTENT");
|
|
15
|
+
}
|
|
16
|
+
export function validateOpenCodePrompts(options) {
|
|
17
|
+
checkResume(options);
|
|
18
|
+
const option = options.systemPrompt !== undefined ? "systemPrompt" : "appendSystemPrompt";
|
|
19
|
+
if (options.systemPrompt === undefined && options.appendSystemPrompt === undefined) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const content = inlineContent(options);
|
|
23
|
+
if (content !== undefined) {
|
|
24
|
+
root(content, option);
|
|
25
|
+
}
|
|
26
|
+
// An empty agent.prompt selects the built-in prompt in native request.ts.
|
|
27
|
+
if (options.systemPrompt === "") {
|
|
28
|
+
throw new UnsupportedOptionError("systemPrompt", "opencode treats an empty agent prompt as its built-in prompt, so it cannot replace the system prompt with an empty string");
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
// Edit only the targeted container. OpenCode interpolates the raw JSON before
|
|
32
|
+
// parsing, so even re-encoding an untouched string can change its meaning.
|
|
33
|
+
function insert(content, node, entry) {
|
|
34
|
+
const end = node.offset + node.length - 1;
|
|
35
|
+
return content.slice(0, end) + ((node.children?.length ?? 0) === 0 ? "" : ",") + entry + content.slice(end);
|
|
36
|
+
}
|
|
37
|
+
function member(node, key) {
|
|
38
|
+
return node.children?.findLast((property) => property.children?.[0]?.value === key)?.children?.[1];
|
|
39
|
+
}
|
|
40
|
+
function literal(text) {
|
|
41
|
+
return JSON.stringify(text).replaceAll(/\{(?=env:|file:)/gu, String.raw `\u007b`);
|
|
42
|
+
}
|
|
43
|
+
function addAgentPrompt(content, group, agent, field, text) {
|
|
44
|
+
const path = [group, agent, field];
|
|
45
|
+
let target = root(content, "systemPrompt");
|
|
46
|
+
for (const [index, key] of path.entries()) {
|
|
47
|
+
const child = member(target, key);
|
|
48
|
+
if (child === undefined) {
|
|
49
|
+
let value = literal(text);
|
|
50
|
+
for (const name of path.slice(index + 1).toReversed()) {
|
|
51
|
+
value = `{${literal(name)}:${value}}`;
|
|
52
|
+
}
|
|
53
|
+
return insert(content, target, `${literal(key)}:${value}`);
|
|
54
|
+
}
|
|
55
|
+
if (index === path.length - 1 || child.type !== "object") {
|
|
56
|
+
throw new UnsupportedOptionError("systemPrompt", `OPENCODE_CONFIG_CONTENT already sets ${path.slice(0, index + 1).join(".")}`);
|
|
57
|
+
}
|
|
58
|
+
target = child;
|
|
59
|
+
}
|
|
60
|
+
return content;
|
|
61
|
+
}
|
|
62
|
+
export function promptContent(options, group, agents, file) {
|
|
63
|
+
let content = inlineContent(options) ?? "{}";
|
|
64
|
+
if (options.systemPrompt !== undefined) {
|
|
65
|
+
for (const agent of agents) {
|
|
66
|
+
content = addAgentPrompt(content, group, agent, group === "agent" ? "prompt" : "system", options.systemPrompt);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
if (file === undefined) {
|
|
70
|
+
return content;
|
|
71
|
+
}
|
|
72
|
+
const config = root(content, "appendSystemPrompt");
|
|
73
|
+
const list = member(config, "instructions");
|
|
74
|
+
if (list === undefined) {
|
|
75
|
+
return insert(content, config, `"instructions":[${literal(file)}]`);
|
|
76
|
+
}
|
|
77
|
+
if (list.type !== "array") {
|
|
78
|
+
throw new UnsupportedOptionError("appendSystemPrompt", "OPENCODE_CONFIG_CONTENT.instructions must be an array");
|
|
79
|
+
}
|
|
80
|
+
return insert(content, list, literal(file));
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=inline-prompt-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-prompt-config.js","sources":["../../../src/runtimes/opencode/inline-prompt-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA8B,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAInF,SAAS,IAAI,CAAC,OAAe,EAAE,MAAoB;IACjD,MAAM,MAAM,GAAiB,EAAE,CAAC;IAChC,MAAM,IAAI,GAAG,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,gBAAgB,EAAE,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,OAAO,EAAE,MAAM,EAAE,mBAAmB,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAAC,CAAC;IAChG,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;QAAC,MAAM,IAAI,sBAAsB,CAAC,oBAAoB,EAAE,uDAAuD,CAAC,CAAC;IAAC,CAAC;IAC/I,OAAO,MAAM,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/** Verified OpenCode 1.x baseline (docs/runtimes/opencode.md). */
|
|
2
|
+
export declare const OPENCODE_V1_MINIMUM_VERSION = "1.18.30";
|
|
3
|
+
/** Verified OpenCode 2.x floor: first 2.x release with working cold `models --standalone` (docs/runtimes/opencode.md). */
|
|
4
|
+
export declare const OPENCODE_V2_MINIMUM_VERSION = "2.0.27";
|
|
5
|
+
/** Supported OpenCode version range across both release lines, bounded below major 3. */
|
|
6
|
+
export declare const OPENCODE_SUPPORTED_VERSION_RANGE = ">=1.18.30 <2.0.0 || >=2.0.27 <3.0.0";
|
|
7
|
+
/** Extract a semver token from `opencode --version` (`1.18.30` on v1, `opencode v2.2.7` on v2). */
|
|
8
|
+
export declare function parseOpencodeSemver(raw: string): string | undefined;
|
|
1
9
|
/**
|
|
2
10
|
* The install script's directory, `~/.opencode/bin`, which a GUI process's
|
|
3
11
|
* PATH can miss. npm (`opencode-ai`), Homebrew and Scoop copies are on PATH.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installation.d.ts","sources":["../../../src/runtimes/opencode/installation.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,wBAAgB,qCAAqC,CACnD,QAAQ,GAAE,MAAM,CAAC,QAA2B,EAC5C,IAAI,GAAE,MAAkB,GACvB,SAAS,MAAM,EAAE,CAGnB;AAED,2FAA2F;AAC3F,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"installation.d.ts","sources":["../../../src/runtimes/opencode/installation.ts"],"names":[],"mappings":"AAKA,kEAAkE;AAClE,eAAO,MAAM,2BAA2B,YAAY,CAAC;AAErD,0HAA0H;AAC1H,eAAO,MAAM,2BAA2B,WAAW,CAAC;AAEpD,yFAAyF;AACzF,eAAO,MAAM,gCAAgC,wCAAuF,CAAC;AAErI,mGAAmG;AACnG,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEnE;AAED;;;GAGG;AACH,wBAAgB,qCAAqC,CACnD,QAAQ,GAAE,MAAM,CAAC,QAA2B,EAC5C,IAAI,GAAE,MAAkB,GACvB,SAAS,MAAM,EAAE,CAGnB;AAED,2FAA2F;AAC3F,eAAO,MAAM,oBAAoB,8CAqBhC,CAAC"}
|
|
@@ -2,6 +2,16 @@ import { environmentHome } from "../../shared/environment-home.js";
|
|
|
2
2
|
import { homedir } from "node:os";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { executableInstallation } from "../../shared/installation.js";
|
|
5
|
+
/** Verified OpenCode 1.x baseline (docs/runtimes/opencode.md). */
|
|
6
|
+
export const OPENCODE_V1_MINIMUM_VERSION = "1.18.30";
|
|
7
|
+
/** Verified OpenCode 2.x floor: first 2.x release with working cold `models --standalone` (docs/runtimes/opencode.md). */
|
|
8
|
+
export const OPENCODE_V2_MINIMUM_VERSION = "2.0.27";
|
|
9
|
+
/** Supported OpenCode version range across both release lines, bounded below major 3. */
|
|
10
|
+
export const OPENCODE_SUPPORTED_VERSION_RANGE = `>=${OPENCODE_V1_MINIMUM_VERSION} <2.0.0 || >=${OPENCODE_V2_MINIMUM_VERSION} <3.0.0`;
|
|
11
|
+
/** Extract a semver token from `opencode --version` (`1.18.30` on v1, `opencode v2.2.7` on v2). */
|
|
12
|
+
export function parseOpencodeSemver(raw) {
|
|
13
|
+
return /^(?:opencode\s+)?v?(\d+\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?)$/u.exec(raw.trim())?.[1];
|
|
14
|
+
}
|
|
5
15
|
/**
|
|
6
16
|
* The install script's directory, `~/.opencode/bin`, which a GUI process's
|
|
7
17
|
* PATH can miss. npm (`opencode-ai`), Homebrew and Scoop copies are on PATH.
|
|
@@ -11,5 +21,20 @@ export function opencodeInstalledExecutableCandidates(platform = process.platfor
|
|
|
11
21
|
return [paths.join(home, ".opencode", "bin", platform === "win32" ? "opencode.exe" : "opencode")];
|
|
12
22
|
}
|
|
13
23
|
/** `opencode --version` is retained verbatim: v1 prints 1.x; v2 prints "opencode v2.x". */
|
|
14
|
-
export const opencodeInstallation = executableInstallation("OAR_OPENCODE_BIN", "opencode", (env) => opencodeInstalledExecutableCandidates(process.platform, environmentHome(env)),
|
|
24
|
+
export const opencodeInstallation = executableInstallation("OAR_OPENCODE_BIN", "opencode", (env) => opencodeInstalledExecutableCandidates(process.platform, environmentHome(env)), ["--help"], {
|
|
25
|
+
versionTimeoutMs: 15_000,
|
|
26
|
+
identity: {
|
|
27
|
+
vendor: "OpenCode",
|
|
28
|
+
help: /(?:^\s*opencode(?:\.exe)?\s+(?:acp|<subcommand>|\[project\])\b|^\s*OpenCode command line interface\s*$)/imu,
|
|
29
|
+
},
|
|
30
|
+
versionPolicy: {
|
|
31
|
+
label: "OpenCode",
|
|
32
|
+
lines: [
|
|
33
|
+
{ major: 1, min: OPENCODE_V1_MINIMUM_VERSION },
|
|
34
|
+
{ major: 2, min: OPENCODE_V2_MINIMUM_VERSION },
|
|
35
|
+
],
|
|
36
|
+
required: OPENCODE_SUPPORTED_VERSION_RANGE,
|
|
37
|
+
parseVersion: parseOpencodeSemver,
|
|
38
|
+
},
|
|
39
|
+
});
|
|
15
40
|
//# sourceMappingURL=installation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installation.js","sources":["../../../src/runtimes/opencode/installation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kCA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1
|
+
import { type OpencodeRelease } from "./version.js";
|
|
2
|
+
import type { AvailableInstallation } from "../../contracts/installation.js";
|
|
3
|
+
import type { RefusedSessionOptions, SessionCapabilityDeclaration } from "../../contracts/runtime.js";
|
|
2
4
|
/**
|
|
3
5
|
* `opencode acp` (1.18.30, live 2026-10-05; source packages/opencode/src/acp
|
|
4
6
|
* at v1.18.34) is opencode's own ACP layer over its HTTP server, so the
|
|
@@ -6,4 +8,6 @@ import type { RefusedSessionOptions } from "../../contracts/runtime.js";
|
|
|
6
8
|
*/
|
|
7
9
|
export declare const opencodeRefusedSessionOptions: RefusedSessionOptions;
|
|
8
10
|
export declare const opencodeV1RefusedSessionOptions: RefusedSessionOptions;
|
|
11
|
+
export declare function opencodeV2PromptRefusals(release: OpencodeRelease): Pick<RefusedSessionOptions, "appendSystemPrompt" | "systemPrompt">;
|
|
12
|
+
export declare function opencodeSessionCapabilities(installation: AvailableInstallation): SessionCapabilityDeclaration;
|
|
9
13
|
//# sourceMappingURL=options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sources":["../../../src/runtimes/opencode/options.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"options.d.ts","sources":["../../../src/runtimes/opencode/options.ts"],"names":[],"mappings":"AACA,OAAO,EAA8D,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAChH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,KAAK,EAAE,qBAAqB,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAItG;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,EAAE,qBAW3C,CAAC;AAEF,eAAO,MAAM,+BAA+B,EAAE,qBAI7C,CAAC;AAQF,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC,qBAAqB,EAAE,oBAAoB,GAAG,cAAc,CAAC,CAKrI;AAED,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,qBAAqB,GAAG,4BAA4B,CAuB7G"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { semverAtLeast } from "../../shared/semver.js";
|
|
2
|
+
import { atLeastV2, hasBackgroundChildUpdates, parseOpencodeRelease } from "./version.js";
|
|
1
3
|
/* Declared refusals, apart from the session code so the runtime entry loads no ACP SDK until a session opens. */
|
|
2
4
|
/**
|
|
3
5
|
* `opencode acp` (1.18.30, live 2026-10-05; source packages/opencode/src/acp
|
|
@@ -5,7 +7,7 @@
|
|
|
5
7
|
* mapping is upstream's.
|
|
6
8
|
*/
|
|
7
9
|
export const opencodeRefusedSessionOptions = {
|
|
8
|
-
|
|
10
|
+
modelRequests: "This adapter has no verified capture of the root agent's provider request",
|
|
9
11
|
goals: "This runtime interface exposes no structured native goal controls",
|
|
10
12
|
endTurnProcessesOnAbort: "OAR has not verified reading and ending one aborted OpenCode turn's processes while its session stays usable",
|
|
11
13
|
userConfiguration: "opencode has no verified separation of user configuration from its native login",
|
|
@@ -13,9 +15,51 @@ export const opencodeRefusedSessionOptions = {
|
|
|
13
15
|
name: "opencode ACP exposes no verified session name setting",
|
|
14
16
|
serviceTier: "opencode exposes no verified per-session service-tier setting and readback",
|
|
15
17
|
disallowedTools: "opencode ACP has no session tool denylist; global permission rules can be overridden by agent rules and do not use the tool-name vocabulary consistently",
|
|
18
|
+
nativeMemoryDefault: "OpenCode exposes no verified below-user default layer for background auto-memory",
|
|
19
|
+
sessionLogUpload: "This adapter has no verified switch to stop vendor session-log upload",
|
|
16
20
|
};
|
|
17
21
|
export const opencodeV1RefusedSessionOptions = {
|
|
18
22
|
...opencodeRefusedSessionOptions,
|
|
23
|
+
fork: "OAR has not verified a native copy of a saved OpenCode v1 session",
|
|
19
24
|
additionalDirectories: "opencode v1 ACP exposes no additional workspace directory setting",
|
|
20
25
|
};
|
|
26
|
+
/** First v2 releases measured to apply each part of the overlay (experiments/opencode-v2-prompts). */
|
|
27
|
+
const V2_INSTRUCTIONS = { minor: 0, patch: 30, version: "2.0.30" };
|
|
28
|
+
const V2_AGENT_LISTING = { minor: 2, patch: 0, version: "2.2.0" };
|
|
29
|
+
/** 2.0.26: oldest v2 release tested calling stdio/HTTP echo tools (experiments/opencode-v2-2026-10-09.md, mcp-servers-acp.vendor.test.ts). */
|
|
30
|
+
const V2_MCP_HTTP = { minor: 0, patch: 26, version: "2.0.26" };
|
|
31
|
+
export function opencodeV2PromptRefusals(release) {
|
|
32
|
+
return {
|
|
33
|
+
...(!atLeastV2(release, V2_INSTRUCTIONS) ? { appendSystemPrompt: `opencode ${release.version} does not load configured instructions; ${V2_INSTRUCTIONS.version} or later does` } : {}),
|
|
34
|
+
...(!atLeastV2(release, V2_AGENT_LISTING) ? { systemPrompt: `opencode ${release.version} cannot list its agents without the shared background service; ${V2_AGENT_LISTING.version} or later can` } : {}),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function opencodeSessionCapabilities(installation) {
|
|
38
|
+
if (installation.via !== "executable" || installation.version === undefined) {
|
|
39
|
+
return { stopTask: false };
|
|
40
|
+
}
|
|
41
|
+
const release = parseOpencodeRelease(installation.version);
|
|
42
|
+
if (release?.major === 1) {
|
|
43
|
+
return {
|
|
44
|
+
taskEventTypes: [],
|
|
45
|
+
...(semverAtLeast(installation.version, "1.19.5") ? { subagentResults: { foreground: "parent_tool_result" } } : {}),
|
|
46
|
+
steer: true, stopTask: false, contextUsage: { tokens: true, contextWindow: true }, refusedSessionOptions: opencodeV1RefusedSessionOptions,
|
|
47
|
+
// 1.18.30: oldest v1 release observed advertising mcpCapabilities.http and tested calling stdio/HTTP echo tools in mcp-servers-acp.vendor.test.ts.
|
|
48
|
+
...(semverAtLeast(installation.version, "1.18.30") ? { mcpTransports: ["stdio", "http"] } : {}),
|
|
49
|
+
manualCompaction: { kind: "unsupported", reason: "OpenCode v1 ACP has no verified structural completion signal for /compact" },
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
if (release?.major !== 2) {
|
|
53
|
+
return { stopTask: false };
|
|
54
|
+
}
|
|
55
|
+
const background = hasBackgroundChildUpdates(release);
|
|
56
|
+
return {
|
|
57
|
+
taskEventTypes: background ? ["agent"] : [],
|
|
58
|
+
...(background ? { subagentResults: { background: "child_text" } } : {}),
|
|
59
|
+
...(!background && atLeastV2(release, { minor: 2, patch: 7 }) ? { subagentResults: { foreground: "parent_tool_result" } } : {}),
|
|
60
|
+
stopTask: false, contextUsage: { tokens: true, contextWindow: true },
|
|
61
|
+
...(atLeastV2(release, V2_MCP_HTTP) ? { mcpTransports: ["stdio", "http"] } : {}),
|
|
62
|
+
refusedSessionOptions: opencodeV2PromptRefusals(release), manualCompaction: { kind: "supported", activeTurn: "reject" },
|
|
63
|
+
};
|
|
64
|
+
}
|
|
21
65
|
//# sourceMappingURL=options.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sources":["../../../src/runtimes/opencode/options.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"options.js","sources":["../../../src/runtimes/opencode/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,yBAAyB,EAAE,oBAAoB,EAAwB,MAAM,cAAc,CAAC;AAIhH,iHAAiH;AAEjH;;;;GAIG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAA0B;IAClE,aAAa,EAAE,2EAA2E;IAC1F,KAAK,EAAE,mEAAmE;IAC1E,uBAAuB,EAAE,8GAA8G;IACvI,iBAAiB,EAAE,iFAAiF;IACpG,YAAY,EAAE,6GAA6G;IAC3H,IAAI,EAAE,uDAAuD;IAC7D,WAAW,EAAE,4EAA4E;IACzF,eAAe,EAAE,0JAA0J;IAC3K,mBAAmB,EAAE,kFAAkF;IACvG,gBAAgB,EAAE,uEAAuE;CAC1F,CAAC;AAEF,MAAM,CAAC,MAAM,+BAA+B,GAA0B;IACpE,GAAG,6BAA6B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AAE,CAAC;QACxI,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;QACpE,GAAG,CAAC,SAAS,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,CAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzF,qBAAqB,EAAE,wBAAwB,CAAC,OAAO,CAAC,EAAE,gBAAgB,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE;KACxH,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-config-v2.d.ts","sources":["../../../src/runtimes/opencode/prompt-config-v2.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGjE,OAAO,EAAiB,KAAK,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACtF,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,
|
|
1
|
+
{"version":3,"file":"prompt-config-v2.d.ts","sources":["../../../src/runtimes/opencode/prompt-config-v2.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGjE,OAAO,EAAiB,KAAK,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACtF,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAA8D,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAG3H,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAiCpD;;;;;;GAMG;AACH,wBAAsB,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,GAAE,gBAAgC,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAsBvL;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAK5F"}
|
|
@@ -3,8 +3,8 @@ import { sessionEnvironment } from "../../shared/environment.js";
|
|
|
3
3
|
import { processFailure } from "../../shared/executable/diagnostics.js";
|
|
4
4
|
import { runExecutable } from "../../shared/executable/run.js";
|
|
5
5
|
import { asRecord } from "../../shared/json.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { preparePromptOptions, openedAgent, validateOpenCodePrompts } from "./prompt-config.js";
|
|
7
|
+
import { opencodeV2PromptRefusals } from "./options.js";
|
|
8
8
|
import { acquireOpenCodeStartup } from "./startup-gate.js";
|
|
9
9
|
/** The private server opens the native database like an ACP start does, so it waits its turn behind the same gate. */
|
|
10
10
|
async function gated(options, work) {
|
|
@@ -16,19 +16,6 @@ async function gated(options, work) {
|
|
|
16
16
|
release();
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
/** First v2 releases measured to apply each part of the overlay (experiments/opencode-v2-prompts). */
|
|
20
|
-
const V2_INSTRUCTIONS = { minor: 0, patch: 30, version: "2.0.30" };
|
|
21
|
-
const V2_AGENT_LISTING = { minor: 2, patch: 0, version: "2.2.0" };
|
|
22
|
-
/** A pre-release of the floor itself (`2.2.0-beta`) is below it: it may predate the measured behavior. */
|
|
23
|
-
function atLeast(release, floor) {
|
|
24
|
-
if (release.minor !== floor.minor) {
|
|
25
|
-
return release.minor > floor.minor;
|
|
26
|
-
}
|
|
27
|
-
if (release.patch !== floor.patch) {
|
|
28
|
-
return release.patch > floor.patch;
|
|
29
|
-
}
|
|
30
|
-
return !/^\d+\.\d+\.\d+-/u.test(release.version);
|
|
31
|
-
}
|
|
32
19
|
/**
|
|
33
20
|
* The agents a v2 session can open on: primary or all-mode agents that are not
|
|
34
21
|
* hidden, from `debug agents` on a private server with the session's own
|
|
@@ -49,7 +36,7 @@ async function primaryAgents(command, options, run) {
|
|
|
49
36
|
if (!Array.isArray(listed)) {
|
|
50
37
|
throw new TypeError("opencode debug agents returned no agent list while resolving the session's agents");
|
|
51
38
|
}
|
|
52
|
-
const agents = listed.map((entry) => asRecord(entry)).flatMap((entry) => entry !== null && typeof entry.id === "string" && entry.mode !== "subagent" && entry.hidden !== true ? [entry.id] : []);
|
|
39
|
+
const agents = listed.map((entry) => asRecord(entry)).flatMap((entry) => entry !== null && typeof entry.id === "string" && entry.mode !== "subagent" && entry.hidden !== true ? [{ id: entry.id, system: entry.system }] : []);
|
|
53
40
|
if (agents.length === 0) {
|
|
54
41
|
throw new UnsupportedOptionError("systemPrompt", "opencode reports no visible primary agent whose system prompt could be replaced");
|
|
55
42
|
}
|
|
@@ -64,23 +51,28 @@ async function primaryAgents(command, options, run) {
|
|
|
64
51
|
*/
|
|
65
52
|
export async function prepareOpenCodeV2Prompts(command, release, options, run = runExecutable) {
|
|
66
53
|
validateOpenCodePrompts(options);
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
const
|
|
70
|
-
|
|
54
|
+
const refused = opencodeV2PromptRefusals(release);
|
|
55
|
+
for (const option of ["appendSystemPrompt", "systemPrompt"]) {
|
|
56
|
+
const reason = refused[option];
|
|
57
|
+
if (options[option] !== undefined && reason !== undefined) {
|
|
58
|
+
throw new UnsupportedOptionError(option, reason);
|
|
59
|
+
}
|
|
71
60
|
}
|
|
72
|
-
|
|
73
|
-
|
|
61
|
+
// The revisioned instructions channel rides the same measured instructions floor.
|
|
62
|
+
if (options.instructions !== undefined && refused.appendSystemPrompt !== undefined) {
|
|
63
|
+
throw new UnsupportedOptionError("instructions", refused.appendSystemPrompt);
|
|
74
64
|
}
|
|
75
|
-
const
|
|
76
|
-
const
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
65
|
+
const primary = options.systemPrompt === undefined ? undefined : await primaryAgents(command, options, run);
|
|
66
|
+
const agents = primary?.map(entry => entry.id);
|
|
67
|
+
const prepared = await preparePromptOptions(options, "agents", agents ?? [], async (merged) => {
|
|
68
|
+
const confirmed = await primaryAgents(command, merged, run);
|
|
69
|
+
for (const id of agents ?? []) {
|
|
70
|
+
if (confirmed.find(entry => entry.id === id)?.system !== options.systemPrompt) {
|
|
71
|
+
throw new UnsupportedOptionError("systemPrompt", `opencode debug agents did not confirm agents.${id}.system`);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
return { ...prepared, ...(agents === undefined ? {} : { agents }) };
|
|
84
76
|
}
|
|
85
77
|
export function verifyOpenCodeAgents(response, expected) {
|
|
86
78
|
const actual = openedAgent(response);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-config-v2.js","sources":["../../../src/runtimes/opencode/prompt-config-v2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAyB,MAAM,gCAAgC,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAmB,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"prompt-config-v2.js","sources":["../../../src/runtimes/opencode/prompt-config-v2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAyB,MAAM,gCAAgC,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAmB,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,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GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IACrC,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAC7D,MAAM,IAAI,KAAK,CAAC,4BAA4B,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,8CAA8C,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACvN,CAAC;AACH,CAAC"}
|
|
@@ -22,7 +22,8 @@ export declare function instructionFiles(options: SessionOptions): Promise<{
|
|
|
22
22
|
}>;
|
|
23
23
|
/** OpenCode interpolates {env:...}/{file:...} BEFORE parsing JSON. Escape only those opening braces so prompt text survives literally. */
|
|
24
24
|
export declare function configContent(overlay: JsonRecord): string;
|
|
25
|
-
/**
|
|
25
|
+
/** Include host config in discovery, then verify the final inline config with the same native reader. */
|
|
26
|
+
export declare function preparePromptOptions(options: SessionOptions, group: "agent" | "agents", agents: readonly string[], verify: (merged: SessionOptions, file: string | undefined) => Promise<void>): Promise<OpenCodePromptConfig>;
|
|
26
27
|
export declare function prepareOpenCodePrompts(command: string, options: SessionOptions, run?: ExecutableRunner): Promise<OpenCodePromptConfig>;
|
|
27
28
|
/** The agent the ACP open reports, from the mode config option or the legacy modes block. */
|
|
28
29
|
export declare function openedAgent(response: JsonRecord): unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-config.d.ts","sources":["../../../src/runtimes/opencode/prompt-config.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"prompt-config.d.ts","sources":["../../../src/runtimes/opencode/prompt-config.ts"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M,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,GACzJ,OAAO,CAAC,oBAAoB,CAAC,CAoB/B;AAED,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,GAAE,gBAAgC,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAa3J;AAED,6FAA6F;AAC7F,wBAAgB,WAAW,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,CAGzD;AAGD,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAKhF"}
|
|
@@ -1,36 +1,32 @@
|
|
|
1
1
|
/* oxlint-disable import/max-dependencies -- Prompt preparation composes temp files, config overlay and executable probing helpers. */
|
|
2
|
-
import {
|
|
2
|
+
import { sessionEnvironment } from "../../shared/environment.js";
|
|
3
3
|
import { rm, writeFile } from "node:fs/promises";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { UnsupportedOptionError } from "../../contracts/errors.js";
|
|
6
|
-
import { checkResume } from "../../shared/session-options.js";
|
|
7
6
|
import { processFailure } from "../../shared/executable/diagnostics.js";
|
|
8
7
|
import { runExecutable } from "../../shared/executable/run.js";
|
|
9
8
|
import { asRecord } from "../../shared/json.js";
|
|
10
9
|
import { privateTempDir } from "../../shared/private-temp.js";
|
|
11
10
|
import { openCodePolicyOverlay } from "./execution-policy.js";
|
|
11
|
+
import { inlineContent, promptContent, validateOpenCodePrompts as validateInlinePrompts } from "./inline-prompt-config.js";
|
|
12
12
|
export function validateOpenCodePrompts(options) {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
validateInlinePrompts(options);
|
|
14
|
+
// Fork policy/instruction overlays build the inline content from scratch; merging them into a host's inline configuration is not verified.
|
|
15
|
+
if (options.executionPolicy === undefined && options.instructions === undefined) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
15
18
|
let option = "instructions";
|
|
16
19
|
if (options.systemPrompt !== undefined) {
|
|
17
20
|
option = "systemPrompt";
|
|
18
21
|
}
|
|
19
|
-
else if (
|
|
22
|
+
else if (options.appendSystemPrompt !== undefined) {
|
|
20
23
|
option = "appendSystemPrompt";
|
|
21
24
|
}
|
|
22
25
|
else if (options.executionPolicy !== undefined) {
|
|
23
26
|
option = "executionPolicy";
|
|
24
27
|
}
|
|
25
|
-
if (
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
if (environmentValue(sessionEnvironment(options.env), "OPENCODE_CONFIG_CONTENT") !== undefined) {
|
|
29
|
-
throw new UnsupportedOptionError(option, `opencode ${legacy ? "prompt options" : "session policy/instructions"} require OPENCODE_CONFIG_CONTENT, which is already set in the effective session environment`);
|
|
30
|
-
}
|
|
31
|
-
// An empty agent.prompt selects the built-in prompt in native request.ts.
|
|
32
|
-
if (options.systemPrompt === "") {
|
|
33
|
-
throw new UnsupportedOptionError("systemPrompt", "opencode treats an empty agent prompt as its built-in prompt, so it cannot replace the system prompt with an empty string");
|
|
28
|
+
if (inlineContent(options) !== undefined) {
|
|
29
|
+
throw new UnsupportedOptionError(option, "opencode session policy/instructions require OPENCODE_CONFIG_CONTENT, which is already set in the effective session environment");
|
|
34
30
|
}
|
|
35
31
|
}
|
|
36
32
|
async function query(command, args, options, run) {
|
|
@@ -144,18 +140,44 @@ export async function instructionFiles(options) {
|
|
|
144
140
|
export function configContent(overlay) {
|
|
145
141
|
return JSON.stringify(overlay).replaceAll(/\{(?=env:|file:)/gu, String.raw `\u007b`);
|
|
146
142
|
}
|
|
147
|
-
/**
|
|
143
|
+
/** Include host config in discovery, then verify the final inline config with the same native reader. */
|
|
144
|
+
export async function preparePromptOptions(options, group, agents, verify) {
|
|
145
|
+
const instructions = await instructionFiles(options);
|
|
146
|
+
try {
|
|
147
|
+
// validateOpenCodePrompts refused a pre-set inline configuration whenever a policy applies, so this seed never overwrites a host value.
|
|
148
|
+
const policy = openCodePolicyOverlay(options.executionPolicy, options.cwd, group === "agent" ? 1 : 2);
|
|
149
|
+
let current = options;
|
|
150
|
+
if (Object.keys(policy).length > 0) {
|
|
151
|
+
current = { ...current, env: { ...current.env, OPENCODE_CONFIG_CONTENT: configContent(policy) } };
|
|
152
|
+
}
|
|
153
|
+
let content = promptContent(current, group, agents, instructions.paths[0]);
|
|
154
|
+
for (const file of instructions.paths.slice(1)) {
|
|
155
|
+
content = promptContent({ ...current, env: { ...current.env, OPENCODE_CONFIG_CONTENT: content } }, group, [], file);
|
|
156
|
+
}
|
|
157
|
+
const merged = { ...options, env: { ...options.env, OPENCODE_CONFIG_CONTENT: content } };
|
|
158
|
+
if (inlineContent(options) !== undefined) {
|
|
159
|
+
await verify(merged, instructions.paths.at(-1));
|
|
160
|
+
}
|
|
161
|
+
return { options: merged, cleanup: instructions.cleanup };
|
|
162
|
+
}
|
|
163
|
+
catch (error) {
|
|
164
|
+
await instructions.cleanup();
|
|
165
|
+
throw error;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
148
168
|
export async function prepareOpenCodePrompts(command, options, run = runExecutable) {
|
|
149
169
|
validateOpenCodePrompts(options);
|
|
150
170
|
const agent = options.systemPrompt === undefined ? undefined : await activeAgent(command, options, run);
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
171
|
+
const prepared = await preparePromptOptions(options, "agent", agent === undefined ? [] : [agent], async (merged, file) => {
|
|
172
|
+
const resolved = await query(command, ["debug", "config"], merged, run);
|
|
173
|
+
if (agent !== undefined && asRecord(asRecord(resolved.agent)?.[agent])?.prompt !== options.systemPrompt) {
|
|
174
|
+
throw new UnsupportedOptionError("systemPrompt", `opencode debug config did not confirm agent.${agent}.prompt`);
|
|
175
|
+
}
|
|
176
|
+
if (file !== undefined && (!Array.isArray(resolved.instructions) || resolved.instructions.at(-1) !== file)) {
|
|
177
|
+
throw new UnsupportedOptionError("appendSystemPrompt", "opencode debug config did not confirm the last instructions entry");
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
return { ...prepared, ...(agent === undefined ? {} : { agent }) };
|
|
159
181
|
}
|
|
160
182
|
/** The agent the ACP open reports, from the mode config option or the legacy modes block. */
|
|
161
183
|
export function openedAgent(response) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-config.js","sources":["../../../src/runtimes/opencode/prompt-config.ts"],"names":[],"mappings":"AAAA,sIAAsI;AACtI,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"prompt-config.js","sources":["../../../src/runtimes/opencode/prompt-config.ts"],"names":[],"mappings":"AAAA,sIAAsI;AACtI,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAyB,MAAM,gCAAgC,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAmB,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,uBAAuB,IAAI,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAW3H,MAAM,UAAU,uBAAuB,CAAC,OAAuB;IAC7D,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAC/B,2IAA2I;IAC3I,IAAI,OAAO,CAAC,eAAe,KAAK,SAAS,IAAI,OAAO,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;QAAC,OAAO;IAAC,CAAC;IAC5F,IAAI,MAAM,GAA+E,cAAc,C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QACxB,MAAM,IAAI,KAAK,CAAC,2BAA2B,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,8CAA8C,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACrL,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sources":["../../../src/runtimes/opencode/session.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAQxE,OAAO,KAAK,EAAkB,YAAY,EAAW,MAAM,4BAA4B,CAAC;AAExF,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAajF,eAAO,MAAM,kBAAkB,EAAE,iBA4BhC,CAAC;AAGF,uHAAuH;AACvH,eAAO,MAAM,+BAA+B,EAAE,qBAAqD,CAAC;AACpG,eAAO,MAAM,oBAAoB,EAAE,
|
|
1
|
+
{"version":3,"file":"session.d.ts","sources":["../../../src/runtimes/opencode/session.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAQxE,OAAO,KAAK,EAAkB,YAAY,EAAW,MAAM,4BAA4B,CAAC;AAExF,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAajF,eAAO,MAAM,kBAAkB,EAAE,iBA4BhC,CAAC;AAGF,uHAAuH;AACvH,eAAO,MAAM,+BAA+B,EAAE,qBAAqD,CAAC;AACpG,eAAO,MAAM,oBAAoB,EAAE,iBAWlC,CAAC;AACF;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B,EAAE,iBAO5C,CAAC;AA8DF,eAAO,MAAM,eAAe,EAAE,YA+E7B,CAAC"}
|
|
@@ -50,6 +50,7 @@ const { steerParams: _v1SteerParams, ...commonProfile } = opencodeAcpProfile;
|
|
|
50
50
|
export const opencodeV2RefusedSessionOptions = opencodeRefusedSessionOptions;
|
|
51
51
|
export const opencodeV2AcpProfile = {
|
|
52
52
|
...commonProfile,
|
|
53
|
+
wholeSessionFork: true,
|
|
53
54
|
promptTokenUsage: opencodePromptTokenUsage,
|
|
54
55
|
compaction: opencodeCompaction,
|
|
55
56
|
projectUpdate: (update, receivedAt) => [...opencodeCompactionEvents(update), ...opencodeRetryEvents(update, receivedAt)],
|