@botiverse/oar 0.121.0 → 0.123.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 +13 -8
- package/dist/capabilities.d.ts +10 -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/client.d.ts +24 -0
- package/dist/community/cybion/client.d.ts.map +1 -0
- package/dist/community/cybion/client.js +42 -0
- package/dist/community/cybion/client.js.map +1 -0
- package/dist/community/cybion/index.d.ts +14 -0
- package/dist/community/cybion/index.d.ts.map +1 -0
- package/dist/community/cybion/index.js +30 -0
- package/dist/community/cybion/index.js.map +1 -0
- package/dist/community/cybion/projection.d.ts +7 -0
- package/dist/community/cybion/projection.d.ts.map +1 -0
- package/dist/community/cybion/projection.js +100 -0
- package/dist/community/cybion/projection.js.map +1 -0
- package/dist/community/cybion/refusal.d.ts +19 -0
- package/dist/community/cybion/refusal.d.ts.map +1 -0
- package/dist/community/cybion/refusal.js +23 -0
- package/dist/community/cybion/refusal.js.map +1 -0
- package/dist/community/cybion/refused-options.d.ts +4 -0
- package/dist/community/cybion/refused-options.d.ts.map +1 -0
- package/dist/community/cybion/refused-options.js +17 -0
- package/dist/community/cybion/refused-options.js.map +1 -0
- package/dist/community/cybion/session.d.ts +8 -0
- package/dist/community/cybion/session.d.ts.map +1 -0
- package/dist/community/cybion/session.js +283 -0
- package/dist/community/cybion/session.js.map +1 -0
- package/dist/community/cybion/thread.d.ts +75 -0
- package/dist/community/cybion/thread.d.ts.map +1 -0
- package/dist/community/cybion/thread.js +192 -0
- package/dist/community/cybion/thread.js.map +1 -0
- package/dist/community/cybion/tracker-facts.d.ts +38 -0
- package/dist/community/cybion/tracker-facts.d.ts.map +1 -0
- package/dist/community/cybion/tracker-facts.js +44 -0
- package/dist/community/cybion/tracker-facts.js.map +1 -0
- package/dist/community/cybion/tracker.d.ts +76 -0
- package/dist/community/cybion/tracker.d.ts.map +1 -0
- package/dist/community/cybion/tracker.js +244 -0
- package/dist/community/cybion/tracker.js.map +1 -0
- package/dist/community/index.d.ts +1 -0
- package/dist/community/index.d.ts.map +1 -1
- package/dist/community/index.js +1 -0
- package/dist/community/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/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 +3 -1
- package/dist/contracts/account-usage.d.ts.map +1 -1
- package/dist/contracts/context-usage.d.ts +10 -0
- package/dist/contracts/context-usage.d.ts.map +1 -1
- 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 +5 -4
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js +1 -1
- package/dist/contracts/index.js.map +1 -1
- package/dist/contracts/login.d.ts +6 -0
- package/dist/contracts/login.d.ts.map +1 -1
- package/dist/contracts/orientation.d.ts +5 -0
- package/dist/contracts/orientation.d.ts.map +1 -1
- package/dist/contracts/records.d.ts +12 -11
- package/dist/contracts/records.d.ts.map +1 -1
- package/dist/contracts/runtime.d.ts +77 -6
- package/dist/contracts/runtime.d.ts.map +1 -1
- package/dist/contracts/runtime.js +25 -0
- package/dist/contracts/runtime.js.map +1 -1
- package/dist/contracts/session-options.d.ts +22 -22
- package/dist/contracts/session-options.d.ts.map +1 -1
- package/dist/contracts/session.d.ts +2 -2
- package/dist/contracts/session.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/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/session-view-events.d.ts.map +1 -1
- package/dist/observe/session-view-events.js +6 -7
- package/dist/observe/session-view-events.js.map +1 -1
- package/dist/observe/session-view-fold.d.ts +1 -0
- package/dist/observe/session-view-fold.d.ts.map +1 -1
- package/dist/observe/session-view-fold.js +2 -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 +69 -0
- package/dist/observe/session-view-root.js.map +1 -0
- package/dist/observe/session-view.d.ts +6 -7
- package/dist/observe/session-view.d.ts.map +1 -1
- package/dist/observe/session-view.js +19 -27
- package/dist/observe/session-view.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/platforms.d.ts +25 -0
- package/dist/platforms.d.ts.map +1 -0
- package/dist/platforms.js +16 -0
- package/dist/platforms.js.map +1 -0
- package/dist/runtimes/antigravity/index.d.ts +8 -1
- package/dist/runtimes/antigravity/index.d.ts.map +1 -1
- package/dist/runtimes/antigravity/index.js +3 -2
- package/dist/runtimes/antigravity/index.js.map +1 -1
- package/dist/runtimes/antigravity/skill-files.d.ts.map +1 -1
- package/dist/runtimes/antigravity/skill-files.js +44 -18
- package/dist/runtimes/antigravity/skill-files.js.map +1 -1
- package/dist/runtimes/antigravity/skill-manifests.d.ts +2 -0
- package/dist/runtimes/antigravity/skill-manifests.d.ts.map +1 -1
- package/dist/runtimes/antigravity/skill-manifests.js +11 -16
- package/dist/runtimes/antigravity/skill-manifests.js.map +1 -1
- package/dist/runtimes/claude/account-usage.d.ts.map +1 -1
- package/dist/runtimes/claude/account-usage.js +9 -7
- 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 +6 -1
- 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 +62 -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 +14 -2
- package/dist/runtimes/claude/failure.js.map +1 -1
- package/dist/runtimes/claude/fork-identity.d.ts +2 -2
- package/dist/runtimes/claude/fork-identity.d.ts.map +1 -1
- package/dist/runtimes/claude/fork-identity.js +21 -16
- package/dist/runtimes/claude/fork-identity.js.map +1 -1
- package/dist/runtimes/claude/global-config.d.ts +3 -0
- package/dist/runtimes/claude/global-config.d.ts.map +1 -0
- package/dist/runtimes/claude/global-config.js +36 -0
- package/dist/runtimes/claude/global-config.js.map +1 -0
- package/dist/runtimes/claude/index.d.ts +9 -1
- package/dist/runtimes/claude/index.d.ts.map +1 -1
- package/dist/runtimes/claude/index.js +5 -2
- package/dist/runtimes/claude/index.js.map +1 -1
- package/dist/runtimes/claude/last-account.d.ts +4 -0
- package/dist/runtimes/claude/last-account.d.ts.map +1 -0
- package/dist/runtimes/claude/last-account.js +15 -0
- package/dist/runtimes/claude/last-account.js.map +1 -0
- package/dist/runtimes/claude/launch-args.d.ts.map +1 -1
- package/dist/runtimes/claude/launch-args.js +16 -8
- package/dist/runtimes/claude/launch-args.js.map +1 -1
- package/dist/runtimes/claude/launch.js +3 -3
- package/dist/runtimes/claude/launch.js.map +1 -1
- package/dist/runtimes/claude/limit-reset/driver.d.ts.map +1 -1
- package/dist/runtimes/claude/limit-reset/driver.js +6 -34
- package/dist/runtimes/claude/limit-reset/driver.js.map +1 -1
- package/dist/runtimes/claude/open-settings.d.ts +2 -2
- package/dist/runtimes/claude/open-settings.d.ts.map +1 -1
- package/dist/runtimes/claude/open-settings.js +13 -6
- package/dist/runtimes/claude/open-settings.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 +45 -14
- 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 +4 -3
- package/dist/runtimes/claude/session.js.map +1 -1
- package/dist/runtimes/claude/update.d.ts.map +1 -1
- package/dist/runtimes/claude/update.js +8 -0
- 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 +4 -0
- package/dist/runtimes/codebuddy/failure.js.map +1 -1
- package/dist/runtimes/codebuddy/index.d.ts +8 -1
- package/dist/runtimes/codebuddy/index.d.ts.map +1 -1
- package/dist/runtimes/codebuddy/index.js +3 -2
- package/dist/runtimes/codebuddy/index.js.map +1 -1
- package/dist/runtimes/codebuddy/options.d.ts.map +1 -1
- package/dist/runtimes/codebuddy/options.js +8 -9
- package/dist/runtimes/codebuddy/options.js.map +1 -1
- package/dist/runtimes/codex/app-server-client.d.ts.map +1 -1
- package/dist/runtimes/codex/app-server-client.js +2 -1
- package/dist/runtimes/codex/app-server-client.js.map +1 -1
- package/dist/runtimes/codex/index.d.ts +9 -2
- package/dist/runtimes/codex/index.d.ts.map +1 -1
- package/dist/runtimes/codex/index.js +7 -2
- package/dist/runtimes/codex/index.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/index.d.ts.map +1 -1
- package/dist/runtimes/cursor/index.js +1 -2
- package/dist/runtimes/cursor/index.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 +3 -1
- package/dist/runtimes/cursor/model.js.map +1 -1
- package/dist/runtimes/cursor/session.d.ts.map +1 -1
- package/dist/runtimes/cursor/session.js +5 -4
- 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 +3 -1
- package/dist/runtimes/devin/index.d.ts.map +1 -1
- package/dist/runtimes/dsh/bridge-controls.d.ts +3 -0
- package/dist/runtimes/dsh/bridge-controls.d.ts.map +1 -0
- package/dist/runtimes/dsh/bridge-controls.js +67 -0
- package/dist/runtimes/dsh/bridge-controls.js.map +1 -0
- 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 +3 -0
- package/dist/runtimes/dsh/bridge-input.d.ts.map +1 -0
- package/dist/runtimes/dsh/bridge-input.js +77 -0
- package/dist/runtimes/dsh/bridge-input.js.map +1 -0
- package/dist/runtimes/dsh/bridge.d.ts.map +1 -1
- package/dist/runtimes/dsh/bridge.js +30 -55
- package/dist/runtimes/dsh/bridge.js.map +1 -1
- package/dist/runtimes/dsh/compaction.d.ts +5 -0
- package/dist/runtimes/dsh/compaction.d.ts.map +1 -0
- package/dist/runtimes/dsh/compaction.js +73 -0
- package/dist/runtimes/dsh/compaction.js.map +1 -0
- package/dist/runtimes/dsh/control.d.ts +2 -2
- package/dist/runtimes/dsh/control.d.ts.map +1 -1
- package/dist/runtimes/dsh/control.js +7 -5
- package/dist/runtimes/dsh/control.js.map +1 -1
- package/dist/runtimes/dsh/index.d.ts +43 -3
- package/dist/runtimes/dsh/index.d.ts.map +1 -1
- package/dist/runtimes/dsh/index.js +13 -2
- package/dist/runtimes/dsh/index.js.map +1 -1
- package/dist/runtimes/dsh/jobs.d.ts +3 -1
- package/dist/runtimes/dsh/jobs.d.ts.map +1 -1
- package/dist/runtimes/dsh/jobs.js +20 -1
- package/dist/runtimes/dsh/jobs.js.map +1 -1
- package/dist/runtimes/dsh/launch.d.ts +0 -2
- package/dist/runtimes/dsh/launch.d.ts.map +1 -1
- package/dist/runtimes/dsh/launch.js +1 -6
- package/dist/runtimes/dsh/launch.js.map +1 -1
- package/dist/runtimes/dsh/options.d.ts +2 -0
- package/dist/runtimes/dsh/options.d.ts.map +1 -1
- package/dist/runtimes/dsh/options.js +11 -1
- package/dist/runtimes/dsh/options.js.map +1 -1
- package/dist/runtimes/dsh/projection.d.ts.map +1 -1
- package/dist/runtimes/dsh/projection.js +7 -2
- 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 +38 -12
- package/dist/runtimes/dsh/session.js.map +1 -1
- package/dist/runtimes/dsh/version.d.ts +1 -2
- package/dist/runtimes/dsh/version.d.ts.map +1 -1
- package/dist/runtimes/dsh/version.js +3 -46
- package/dist/runtimes/dsh/version.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 +4 -2
- package/dist/runtimes/factory/account-usage.js.map +1 -1
- package/dist/runtimes/factory/client.d.ts.map +1 -1
- package/dist/runtimes/factory/client.js +2 -1
- 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 +35 -51
- 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 +8 -1
- package/dist/runtimes/factory/index.d.ts.map +1 -1
- package/dist/runtimes/factory/index.js +2 -1
- package/dist/runtimes/factory/index.js.map +1 -1
- package/dist/runtimes/factory/options.d.ts.map +1 -1
- package/dist/runtimes/factory/options.js +3 -8
- package/dist/runtimes/factory/options.js.map +1 -1
- package/dist/runtimes/factory/session-state.d.ts +2 -0
- package/dist/runtimes/factory/session-state.d.ts.map +1 -1
- 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 +76 -45
- package/dist/runtimes/factory/session.js.map +1 -1
- package/dist/runtimes/grok/account-info.d.ts +11 -0
- package/dist/runtimes/grok/account-info.d.ts.map +1 -0
- package/dist/runtimes/grok/account-info.js +60 -0
- package/dist/runtimes/grok/account-info.js.map +1 -0
- package/dist/runtimes/grok/account-usage.d.ts +0 -2
- package/dist/runtimes/grok/account-usage.d.ts.map +1 -1
- package/dist/runtimes/grok/account-usage.js +30 -48
- package/dist/runtimes/grok/account-usage.js.map +1 -1
- package/dist/runtimes/grok/auth.d.ts.map +1 -1
- package/dist/runtimes/grok/auth.js +9 -2
- package/dist/runtimes/grok/auth.js.map +1 -1
- package/dist/runtimes/grok/failure.d.ts.map +1 -1
- package/dist/runtimes/grok/failure.js +4 -2
- package/dist/runtimes/grok/failure.js.map +1 -1
- package/dist/runtimes/grok/index.d.ts +8 -1
- package/dist/runtimes/grok/index.d.ts.map +1 -1
- package/dist/runtimes/grok/index.js +3 -2
- package/dist/runtimes/grok/index.js.map +1 -1
- package/dist/runtimes/kimi/index.d.ts +8 -1
- package/dist/runtimes/kimi/index.d.ts.map +1 -1
- package/dist/runtimes/kimi/index.js +3 -2
- package/dist/runtimes/kimi/index.js.map +1 -1
- package/dist/runtimes/opencode/index.d.ts +7 -6
- package/dist/runtimes/opencode/index.d.ts.map +1 -1
- package/dist/runtimes/opencode/index.js +6 -5
- package/dist/runtimes/opencode/index.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 +24 -1
- package/dist/runtimes/opencode/options.js.map +1 -1
- package/dist/runtimes/opencode/prompt-config-v2.d.ts +15 -0
- package/dist/runtimes/opencode/prompt-config-v2.d.ts.map +1 -0
- package/dist/runtimes/opencode/prompt-config-v2.js +75 -0
- package/dist/runtimes/opencode/prompt-config-v2.js.map +1 -0
- package/dist/runtimes/opencode/prompt-config.d.ts +12 -0
- package/dist/runtimes/opencode/prompt-config.d.ts.map +1 -1
- package/dist/runtimes/opencode/prompt-config.js +32 -19
- package/dist/runtimes/opencode/prompt-config.js.map +1 -1
- package/dist/runtimes/opencode/retry.d.ts +5 -0
- package/dist/runtimes/opencode/retry.d.ts.map +1 -0
- package/dist/runtimes/opencode/retry.js +20 -0
- package/dist/runtimes/opencode/retry.js.map +1 -0
- package/dist/runtimes/opencode/session.d.ts +1 -0
- package/dist/runtimes/opencode/session.d.ts.map +1 -1
- package/dist/runtimes/opencode/session.js +31 -8
- 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 +7 -2
- package/dist/runtimes/opencode/shared-session.js.map +1 -1
- package/dist/runtimes/opencode/token-usage.d.ts +5 -0
- package/dist/runtimes/opencode/token-usage.d.ts.map +1 -0
- package/dist/runtimes/opencode/token-usage.js +31 -0
- package/dist/runtimes/opencode/token-usage.js.map +1 -0
- 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/index.d.ts.map +1 -1
- package/dist/runtimes/pi/index.js +3 -2
- 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/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/projection.d.ts.map +1 -1
- package/dist/runtimes/pi/projection.js +5 -1
- 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 +5 -3
- package/dist/runtimes/pi/rpc/control.js.map +1 -1
- package/dist/runtimes/pi/rpc/open.d.ts.map +1 -1
- package/dist/runtimes/pi/rpc/open.js +4 -2
- package/dist/runtimes/pi/rpc/open.js.map +1 -1
- package/dist/runtimes/pi/rpc/session.js +4 -4
- package/dist/runtimes/pi/rpc/session.js.map +1 -1
- package/dist/runtimes/pi/session.js +4 -4
- package/dist/runtimes/pi/session.js.map +1 -1
- package/dist/runtimes/pi-durable/index.d.ts.map +1 -1
- package/dist/runtimes/pi-durable/index.js +3 -2
- package/dist/runtimes/pi-durable/index.js.map +1 -1
- package/dist/runtimes/pi-durable/session.d.ts.map +1 -1
- package/dist/runtimes/pi-durable/session.js +53 -12
- 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 +12 -6
- package/dist/runtimes/qoder/daemon.js.map +1 -1
- package/dist/runtimes/qoder/index.d.ts +8 -1
- package/dist/runtimes/qoder/index.d.ts.map +1 -1
- package/dist/runtimes/qoder/index.js +2 -1
- package/dist/runtimes/qoder/index.js.map +1 -1
- package/dist/runtimes/qoder/launch.d.ts +2 -1
- package/dist/runtimes/qoder/launch.d.ts.map +1 -1
- package/dist/runtimes/qoder/launch.js +8 -4
- 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 +20 -13
- package/dist/runtimes/qoder/list-models.js.map +1 -1
- package/dist/runtimes/qoder/options.d.ts.map +1 -1
- package/dist/runtimes/qoder/options.js +13 -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 +2 -1
- 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.js +1 -1
- package/dist/runtimes/qoder/session.js.map +1 -1
- package/dist/runtimes/qwen/index.d.ts +9 -2
- package/dist/runtimes/qwen/index.d.ts.map +1 -1
- package/dist/runtimes/qwen/index.js +7 -2
- package/dist/runtimes/qwen/index.js.map +1 -1
- package/dist/runtimes/qwen/launch.js +1 -1
- package/dist/runtimes/qwen/launch.js.map +1 -1
- package/dist/runtimes/qwen/options.d.ts.map +1 -1
- package/dist/runtimes/qwen/options.js +11 -17
- package/dist/runtimes/qwen/options.js.map +1 -1
- package/dist/shared/acp/errors.d.ts.map +1 -1
- package/dist/shared/acp/errors.js +2 -1
- package/dist/shared/acp/errors.js.map +1 -1
- package/dist/shared/acp/profile.d.ts +5 -3
- package/dist/shared/acp/profile.d.ts.map +1 -1
- package/dist/shared/acp/profile.js +34 -17
- package/dist/shared/acp/profile.js.map +1 -1
- package/dist/shared/acp/projection.js +7 -3
- package/dist/shared/acp/projection.js.map +1 -1
- package/dist/shared/acp/records.js +9 -9
- package/dist/shared/acp/records.js.map +1 -1
- package/dist/shared/acp/session.d.ts +3 -2
- package/dist/shared/acp/session.d.ts.map +1 -1
- package/dist/shared/acp/session.js +95 -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 +8 -2
- package/dist/shared/acp/shared-session.js.map +1 -1
- package/dist/shared/acp/token-usage.d.ts +1 -1
- package/dist/shared/acp/token-usage.d.ts.map +1 -1
- package/dist/shared/acp/token-usage.js +2 -2
- package/dist/shared/acp/token-usage.js.map +1 -1
- package/dist/shared/acp/turn-terminals.d.ts.map +1 -1
- package/dist/shared/acp/turn-terminals.js +59 -48
- package/dist/shared/acp/turn-terminals.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 +11 -7
- 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/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/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.js +1 -1
- package/dist/shared/executable/process.js.map +1 -1
- package/dist/shared/executable/reported-stderr.d.ts +10 -0
- package/dist/shared/executable/reported-stderr.d.ts.map +1 -0
- package/dist/shared/executable/reported-stderr.js +28 -0
- package/dist/shared/executable/reported-stderr.js.map +1 -0
- 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/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/orientation/index.d.ts.map +1 -1
- package/dist/shared/orientation/index.js +7 -2
- package/dist/shared/orientation/index.js.map +1 -1
- package/dist/shared/process-session.d.ts +3 -2
- package/dist/shared/process-session.d.ts.map +1 -1
- package/dist/shared/process-session.js +13 -11
- package/dist/shared/process-session.js.map +1 -1
- 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 +12 -0
- package/dist/shared/semver.d.ts.map +1 -0
- package/dist/shared/semver.js +52 -0
- package/dist/shared/semver.js.map +1 -0
- package/dist/shared/session-options.d.ts +6 -0
- package/dist/shared/session-options.d.ts.map +1 -1
- package/dist/shared/session-options.js +22 -4
- package/dist/shared/session-options.js.map +1 -1
- package/dist/shared/stream-json/profile.d.ts +5 -1
- 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 +34 -3
- 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 +12 -5
- package/dist/shared/stream-json/session.js.map +1 -1
- package/dist/shared/stream-json/state.d.ts +2 -0
- 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/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/testing/scripted-runtime.d.ts.map +1 -1
- package/dist/testing/scripted-runtime.js +3 -2
- package/dist/testing/scripted-runtime.js.map +1 -1
- package/package.json +5 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { spawnNodeScript } from "../../../shared/executable/node-script.js";
|
|
2
2
|
import { asRecord } from "../../../shared/json.js";
|
|
3
|
-
import {
|
|
3
|
+
import { reportedStderr } from "../../../shared/executable/reported-stderr.js";
|
|
4
4
|
import { cursorChildLaunch } from "./child-script.js";
|
|
5
5
|
/** How long the SDK may take to load in a fresh child (a cold import of the bundle). */
|
|
6
6
|
const READY_TIMEOUT_MS = 60_000;
|
|
@@ -21,10 +21,10 @@ export function childError(value) {
|
|
|
21
21
|
}
|
|
22
22
|
return error;
|
|
23
23
|
}
|
|
24
|
-
function exitReason(exit) {
|
|
24
|
+
function exitReason(exit, redact) {
|
|
25
25
|
const how = exit.signal === null ? `code ${String(exit.code)}` : `signal ${exit.signal}`;
|
|
26
|
-
const tail = exit.
|
|
27
|
-
return
|
|
26
|
+
const tail = reportedStderr(exit, redact).trim().slice(-REASON_STDERR_CHARS);
|
|
27
|
+
return tail === "" ? `cursor's SDK child process exited with ${how}` : `cursor's SDK child process exited with ${how}; stderr ends: ${tail}`;
|
|
28
28
|
}
|
|
29
29
|
function features(value) {
|
|
30
30
|
const record = asRecord(value);
|
|
@@ -35,7 +35,7 @@ function features(value) {
|
|
|
35
35
|
* environment) and wait until it loaded the SDK from `sdkModule`. A child
|
|
36
36
|
* that cannot load it, or exits first, is stopped and the open rejects.
|
|
37
37
|
*/
|
|
38
|
-
export async function openCursorChannel(sdkModule, env, session = false, own) {
|
|
38
|
+
export async function openCursorChannel(sdkModule, env, session = false, own, redact) {
|
|
39
39
|
const launch = cursorChildLaunch(sdkModule, env);
|
|
40
40
|
// The host scans for what a session's child left behind; a one-shot call's child runs no tools, and scans for itself as it exits.
|
|
41
41
|
const child = spawnNodeScript(launch.script, launch.argument, launch.env, session ? launch.marker : undefined);
|
|
@@ -74,7 +74,7 @@ export async function openCursorChannel(sdkModule, env, session = false, own) {
|
|
|
74
74
|
});
|
|
75
75
|
void (async () => {
|
|
76
76
|
const ended = await child.exited;
|
|
77
|
-
exit = { code: ended.code, reason: exitReason(ended) };
|
|
77
|
+
exit = { code: ended.code, reason: exitReason(ended, redact) };
|
|
78
78
|
const gone = new Error(exit.reason);
|
|
79
79
|
ready.reject(gone);
|
|
80
80
|
for (const waiting of replies.values()) {
|
|
@@ -99,7 +99,7 @@ export async function openCursorChannel(sdkModule, env, session = false, own) {
|
|
|
99
99
|
stopping = exit === null;
|
|
100
100
|
// The child closes what is still open and exits on its own; the tree kill is the backstop.
|
|
101
101
|
const ended = await child.stop(() => { child.send({ id: 0, m: "shutdown", a: [] }); }, session || own !== undefined);
|
|
102
|
-
return exit ?? { code: ended.code, reason: exitReason(ended) };
|
|
102
|
+
return exit ?? { code: ended.code, reason: exitReason(ended, redact) };
|
|
103
103
|
};
|
|
104
104
|
const timer = setTimeout(() => { ready.reject(new Error(`cursor's SDK child process did not load ${sdkModule} within ${String(READY_TIMEOUT_MS / 1000)} s`)); }, READY_TIMEOUT_MS);
|
|
105
105
|
let loaded = null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.js","sources":["../../../../src/runtimes/cursor/subprocess/channel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAuB,MAAM,2CAA2C,CAAC;AACjG,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"channel.js","sources":["../../../../src/runtimes/cursor/subprocess/channel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAuB,MAAM,2CAA2C,CAAC;AACjG,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAA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AK,CAAC,OAAO,CAAC;gBAAC,CAAC;wBAAS,CAAC;oBAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;gBAAC,CAAC;YACpE,CAAC,CAAC,EAAE,EAAE,CAAC;IACT,CAAC,CAAC;IACF,OAAO;QACL,QAAQ,EAAE,MAAM;QAChB,KAAK;QACL,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO;YAC9B,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC;YACvD,OAAO,KAAK,CAAC;QACf,CAAC;QACD,MAAM,CAAC,QAAQ;YACb,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;gBAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAAC,CAAC;iBAAM,CAAC;gBAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAAC,CAAC;QAC/E,CAAC;QACD,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ;QACxB,IAAI;KACL,CAAC;AACJ,CAAC"}
|
|
@@ -21,5 +21,7 @@ export declare const devinRuntime: Omit<{
|
|
|
21
21
|
readonly checkUpdate: import("../../browser.js").UpdateChecker;
|
|
22
22
|
readonly authStatus: typeof devinAuthStatus;
|
|
23
23
|
readonly refusedSessionOptions: Readonly<Partial<Record<import("../../contracts/runtime.js").RefusableSessionOption, string>>>;
|
|
24
|
-
}, "execution" | "placement" | "session" | "withPlacement"> & import("../../contracts/runtime.js").Runtime
|
|
24
|
+
}, "execution" | "placement" | "session" | "sessionCapabilities" | "withPlacement"> & import("../../contracts/runtime.js").Runtime & {
|
|
25
|
+
readonly sessionCapabilities: NonNullable<import("../../contracts/runtime.js").Runtime["sessionCapabilities"]>;
|
|
26
|
+
};
|
|
25
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sources":["../../../src/runtimes/devin/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAM5C,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../../../src/runtimes/devin/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAM5C,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;CAoBG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bridge-controls.d.ts","sources":["../../../src/runtimes/dsh/bridge-controls.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,QAgE5B,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/** Native job ownership and session-scoped sandbox grants in the DSH process. */
|
|
2
|
+
export const dshControlSource = String.raw `
|
|
3
|
+
const jobs = ctx.get("jobs");
|
|
4
|
+
const configureDirectories = (agent, request) => {
|
|
5
|
+
if (request.additionalDirectories?.length > 0) {
|
|
6
|
+
const policy = agent.scope.ctx.get("sandboxPolicy");
|
|
7
|
+
requireMethod(policy, "registerWritableRoot", "additionalDirectories");
|
|
8
|
+
for (const directory of request.additionalDirectories) {
|
|
9
|
+
const unregister = policy.registerWritableRoot(agent.session, directory);
|
|
10
|
+
agent.scope.ctx.effect(() => unregister);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
const configureTools = (agent, request) => {
|
|
15
|
+
if (request.disallowedTools?.length > 0) {
|
|
16
|
+
const tools = agent.scope?.ctx?.tools;
|
|
17
|
+
requireMethod(tools, "restrict", "disallowedTools");
|
|
18
|
+
requireMethod(tools, "get", "disallowedTools");
|
|
19
|
+
requireMethod(agent.scope.ctx, "on", "disallowedTools");
|
|
20
|
+
try { tools.restrict({ deny: request.disallowedTools }); }
|
|
21
|
+
catch (error) { throw refusal("option_not_applied", String(error?.message ?? error), "disallowedTools"); }
|
|
22
|
+
agent.scope.ctx.on("agent/created", ({ agent: created }) => {
|
|
23
|
+
if (created !== agent) { return; }
|
|
24
|
+
for (const name of request.disallowedTools) {
|
|
25
|
+
if (tools.get(name, agent) !== undefined) {
|
|
26
|
+
throw refusal("option_not_applied", "The native tool remains available: " + name, "disallowedTools");
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const compacting = new Map();
|
|
34
|
+
const sessionControls = {
|
|
35
|
+
async compact(request) {
|
|
36
|
+
const { agent } = owned(request.sessionId);
|
|
37
|
+
const service = ctx.get("compaction");
|
|
38
|
+
requireMethod(service, "compactNow", "manual compaction");
|
|
39
|
+
if (agent.status !== "idle" || agent.inbox?.nextTurn?.length || admissions.has(agent) || compacting.has(agent)) throw refusal("busy", "DSH has pending input or an active operation");
|
|
40
|
+
const controller = new AbortController();
|
|
41
|
+
compacting.set(agent, controller);
|
|
42
|
+
try { return { result: await service.compactNow(agent, controller.signal, request.commandId) }; }
|
|
43
|
+
finally { compacting.delete(agent); }
|
|
44
|
+
},
|
|
45
|
+
cancelCompaction(request) {
|
|
46
|
+
const { agent } = owned(request.sessionId);
|
|
47
|
+
const controller = compacting.get(agent);
|
|
48
|
+
if (!controller) throw refusal("busy", "No live native compaction target");
|
|
49
|
+
controller.abort();
|
|
50
|
+
return {};
|
|
51
|
+
},
|
|
52
|
+
async stopTask(request) {
|
|
53
|
+
const { agent } = owned(request.sessionId);
|
|
54
|
+
const owner = agent.session.id;
|
|
55
|
+
const job = jobs.get(request.taskId, owner);
|
|
56
|
+
if (job.owner !== owner || (job.kind !== "bash" && job.kind !== "pwsh")) {
|
|
57
|
+
throw refusal("unsupported_task", "DSH can stop only a shell job owned by this session");
|
|
58
|
+
}
|
|
59
|
+
const result = jobs.kill(job.id, owner, "Stopped by host");
|
|
60
|
+
if (result !== "requested") { throw refusal("job_finished", "DSH reports that this shell job already finished"); }
|
|
61
|
+
const settled = await jobs.wait(job.id, 5000, owner);
|
|
62
|
+
if (settled.status !== "killed") { throw refusal("job_not_killed", "DSH reported shell job status " + settled.status); }
|
|
63
|
+
return { jobId: settled.id, status: settled.status };
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
`;
|
|
67
|
+
//# sourceMappingURL=bridge-controls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bridge-controls.js","sources":["../../../src/runtimes/dsh/bridge-controls.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgEzC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge-goal.d.ts","sources":["../../../src/runtimes/dsh/bridge-goal.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"bridge-goal.d.ts","sources":["../../../src/runtimes/dsh/bridge-goal.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,eAAO,MAAM,aAAa,QA2CzB,CAAC"}
|
|
@@ -7,20 +7,20 @@ export const dshGoalSource = String.raw `
|
|
|
7
7
|
}
|
|
8
8
|
return goals;
|
|
9
9
|
};
|
|
10
|
-
const observeGoal = (agent, goals) => {
|
|
10
|
+
const observeGoal = (agent, goals, operation) => {
|
|
11
11
|
const goal = goals.get(agent) ?? null;
|
|
12
|
-
write({ type: "native", channel: "goal/read", sessionId: agent.session.id, goal });
|
|
12
|
+
write({ type: "native", channel: "goal/read", operation, sessionId: agent.session.id, goal });
|
|
13
13
|
return { goal };
|
|
14
14
|
};
|
|
15
15
|
const goalCommands = {
|
|
16
16
|
goalConfirm() { goalService(); return {}; },
|
|
17
|
-
goalRead(request) { return observeGoal(owned(request.sessionId).agent, goalService()); },
|
|
17
|
+
goalRead(request) { return observeGoal(owned(request.sessionId).agent, goalService(), "read"); },
|
|
18
18
|
goalClear(request) {
|
|
19
19
|
const { agent } = owned(request.sessionId);
|
|
20
20
|
const goals = goalService();
|
|
21
21
|
const current = goals.get(agent);
|
|
22
22
|
if (current !== undefined) { goals.clear(agent, current); }
|
|
23
|
-
return observeGoal(agent, goals);
|
|
23
|
+
return observeGoal(agent, goals, "clear");
|
|
24
24
|
},
|
|
25
25
|
goalSet(request) {
|
|
26
26
|
const { agent } = owned(request.sessionId);
|
|
@@ -32,10 +32,14 @@ export const dshGoalSource = String.raw `
|
|
|
32
32
|
} else if (current.objective !== options.objective) {
|
|
33
33
|
current = goals.edit(agent, current, { objective: options.objective });
|
|
34
34
|
}
|
|
35
|
+
if (current === undefined || current === null) {
|
|
36
|
+
observeGoal(agent, goals, "set");
|
|
37
|
+
throw refusal("runtime_refused", "DSH did not report a valid goal observation");
|
|
38
|
+
}
|
|
35
39
|
if (options.status === "active" && (current.phase !== "active" || current.activation !== "armed")) { goals.resume(agent, current); }
|
|
36
40
|
if (options.status === "paused" && current.phase !== "paused") { goals.pause(agent, current); }
|
|
37
41
|
if (options.status === "complete" && current.phase !== "complete") { goals.complete(agent, current); }
|
|
38
|
-
return observeGoal(agent, goals);
|
|
42
|
+
return observeGoal(agent, goals, "set");
|
|
39
43
|
},
|
|
40
44
|
};
|
|
41
45
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge-goal.js","sources":["../../../src/runtimes/dsh/bridge-goal.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"bridge-goal.js","sources":["../../../src/runtimes/dsh/bridge-goal.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bridge-input.d.ts","sources":["../../../src/runtimes/dsh/bridge-input.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAC5G,eAAO,MAAM,cAAc,QA0E1B,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/** Persist incoming bytes in DSH's attachment store and send its durable references in the user message. */
|
|
2
|
+
export const dshInputSource = String.raw `
|
|
3
|
+
const routes = new WeakMap();
|
|
4
|
+
const admissions = new WeakMap();
|
|
5
|
+
const pendingQueues = new WeakMap();
|
|
6
|
+
const supportedMedia = ["image/png", "image/jpeg", "image/gif", "image/webp"];
|
|
7
|
+
async function imageTypes(agent) {
|
|
8
|
+
const route = agent.model?.current?.() ?? routes.get(agent);
|
|
9
|
+
const attachments = ctx.get("attachments");
|
|
10
|
+
const llm = ctx.get("llm");
|
|
11
|
+
if (!route?.provider || !route.model || typeof attachments?.saveImages !== "function" || typeof llm?.resolveModelInfo !== "function") return [];
|
|
12
|
+
try {
|
|
13
|
+
const info = await llm.resolveModelInfo(route.provider, route.model);
|
|
14
|
+
return info.inputModalities?.includes("image") ? supportedMedia.filter(type => attachments.imageLimits?.mediaTypes?.includes(type)) : [];
|
|
15
|
+
} catch { return []; }
|
|
16
|
+
}
|
|
17
|
+
const submit = async (agent, method, request, pending) => {
|
|
18
|
+
const isImage = request.images?.length > 0;
|
|
19
|
+
const verify = () => {
|
|
20
|
+
if (compacting.has(agent)) throw refusal("busy", "DSH is compacting this session");
|
|
21
|
+
if (method === "prompt" && agent.status !== "idle") throw refusal("busy", "busy");
|
|
22
|
+
if (method === "steer" && agent.status === "idle") throw refusal("no_active_turn", "no active turn");
|
|
23
|
+
};
|
|
24
|
+
const action = method === "steer" ? "steer" : "followup";
|
|
25
|
+
requireMethod(agent, action, method);
|
|
26
|
+
verify();
|
|
27
|
+
const content = request.text.length > 0 || !isImage ? [{ type: "text", text: request.text }] : [];
|
|
28
|
+
if (isImage) {
|
|
29
|
+
const types = await imageTypes(agent);
|
|
30
|
+
if (request.images.some(image => !types.includes(image.mediaType))) throw refusal("image_unsupported", "This DSH model or attachment store does not accept the requested image type");
|
|
31
|
+
const refs = await ctx.get("attachments").saveImages(request.images.map(image => ({ data: Buffer.from(image.data, "base64"), mediaType: image.mediaType })));
|
|
32
|
+
if (refs.length !== request.images.length) throw refusal("native_attachment_error", "DSH did not store every submitted image");
|
|
33
|
+
for (const attachment of refs) content.push({ type: "image", attachment });
|
|
34
|
+
verify();
|
|
35
|
+
}
|
|
36
|
+
const messageId = pending?.id ?? request.inputId ?? randomUUID();
|
|
37
|
+
if (pending?.withdrawn === true) { pending.intercepted = true; return { messageId }; }
|
|
38
|
+
const message = Object.freeze({ id: messageId, role: "user", content: Object.freeze(content), source: Object.freeze({ kind: "user" }) });
|
|
39
|
+
cause = method === "prompt" ? "prompt" : undefined;
|
|
40
|
+
try { agent[action](message); } finally { cause = undefined; }
|
|
41
|
+
return { messageId: message.id };
|
|
42
|
+
};
|
|
43
|
+
const admitInput = (method, request) => {
|
|
44
|
+
const { agent } = owned(request.sessionId);
|
|
45
|
+
let pending;
|
|
46
|
+
if (method === "queue") {
|
|
47
|
+
requireMethod(agent, "followup", "queue");
|
|
48
|
+
let settledResolve;
|
|
49
|
+
const settled = new Promise(resolve => { settledResolve = resolve; });
|
|
50
|
+
pending = { id: request.inputId ?? randomUUID(), withdrawn: false, intercepted: false, settled, resolve: settledResolve };
|
|
51
|
+
const list = pendingQueues.get(agent) ?? [];
|
|
52
|
+
list.push(pending);
|
|
53
|
+
pendingQueues.set(agent, list);
|
|
54
|
+
}
|
|
55
|
+
const removePending = () => {
|
|
56
|
+
if (pending === undefined) return;
|
|
57
|
+
const list = pendingQueues.get(agent);
|
|
58
|
+
if (list !== undefined) {
|
|
59
|
+
const index = list.indexOf(pending);
|
|
60
|
+
if (index >= 0) list.splice(index, 1);
|
|
61
|
+
if (list.length === 0) pendingQueues.delete(agent);
|
|
62
|
+
}
|
|
63
|
+
pending.resolve(pending.intercepted);
|
|
64
|
+
};
|
|
65
|
+
const previous = admissions.get(agent);
|
|
66
|
+
const run = async () => {
|
|
67
|
+
try { const value = await submit(agent, method, request, pending); removePending(); return value; }
|
|
68
|
+
catch (error) { removePending(); throw error; }
|
|
69
|
+
};
|
|
70
|
+
const next = previous === undefined ? run() : previous.then(run, run);
|
|
71
|
+
admissions.set(agent, next);
|
|
72
|
+
const clear = () => { if (admissions.get(agent) === next) admissions.delete(agent); };
|
|
73
|
+
next.then(clear, clear);
|
|
74
|
+
return next;
|
|
75
|
+
};
|
|
76
|
+
`;
|
|
77
|
+
//# sourceMappingURL=bridge-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bridge-input.js","sources":["../../../src/runtimes/dsh/bridge-input.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAC5G,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0EvC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge.d.ts","sources":["../../../src/runtimes/dsh/bridge.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bridge.d.ts","sources":["../../../src/runtimes/dsh/bridge.ts"],"names":[],"mappings":"AAKA,gIAAgI;AAChI,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,QAuP3B,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { dshInputSource } from "./bridge-input.js";
|
|
2
|
+
import { dshControlSource } from "./bridge-controls.js";
|
|
1
3
|
import { dshGoalSource } from "./bridge-goal.js";
|
|
2
4
|
import { dshPromptSource } from "./bridge-prompt.js";
|
|
3
5
|
/** Revision of the internal transport between this source and `control.ts`. Both ship together; it is not a public protocol. */
|
|
@@ -58,10 +60,7 @@ function requireMethod(target, key, capability) {
|
|
|
58
60
|
}
|
|
59
61
|
}
|
|
60
62
|
|
|
61
|
-
|
|
62
|
-
const id = inputId ?? randomUUID();
|
|
63
|
-
return Object.freeze({ id, role: "user", content: Object.freeze([Object.freeze({ type: "text", text })]), source: Object.freeze({ kind: "user" }) });
|
|
64
|
-
}
|
|
63
|
+
|
|
65
64
|
|
|
66
65
|
export function apply(ctx, config) {
|
|
67
66
|
const loader = ctx.get("loader");
|
|
@@ -92,6 +91,7 @@ export function apply(ctx, config) {
|
|
|
92
91
|
function boot(ctx) {
|
|
93
92
|
const agents = ctx.get("agents");
|
|
94
93
|
const persistence = ctx.get("sessionPersistence");
|
|
94
|
+
${dshControlSource}
|
|
95
95
|
const handles = new Map();
|
|
96
96
|
const owned = (sessionId) => {
|
|
97
97
|
const handle = handles.get(sessionId);
|
|
@@ -107,11 +107,14 @@ function boot(ctx) {
|
|
|
107
107
|
ctx.on("agent/error", ({ agent, turn, step, error }) => { write({ type: "native", channel: "agent/error", sessionId: agent.session.id, turn, step, error: structured(error) }); });
|
|
108
108
|
for (const channel of ["subagent/start", "subagent/end"]) { ctx.on(channel, (info) => { write({ type: "native", channel, info }); }); }
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
${dshInputSource}
|
|
111
|
+
const opened = async (handle, route) => {
|
|
111
112
|
const { agent } = handle;
|
|
112
113
|
handles.set(agent.session.id, handle);
|
|
114
|
+
routes.set(agent, route);
|
|
113
115
|
const modelCurrent = typeof agent.model?.current === "function";
|
|
114
|
-
return { sessionId: agent.session.id, header: agent.session.header, status: agent.status,
|
|
116
|
+
return { compact: typeof ctx.get("compaction")?.compactNow === "function", imageTypes: await imageTypes(agent), sessionId: agent.session.id, header: agent.session.header, status: agent.status,
|
|
117
|
+
jobMethods: methods(jobs, ["get", "kill", "wait"]),
|
|
115
118
|
methods: methods(agent, AGENT_METHODS), inboxMethods: methods(agent.inbox, INBOX_METHODS),
|
|
116
119
|
pending: { nextTurn: agent.inbox?.nextTurn?.length, nextStep: agent.inbox?.nextStep?.length },
|
|
117
120
|
modelCurrent, ...(modelCurrent ? { model: agent.model.current() } : {}) };
|
|
@@ -132,26 +135,8 @@ function boot(ctx) {
|
|
|
132
135
|
return typeof defaults?.currentSelection === "function" ? defaults.currentSelection() : {};
|
|
133
136
|
};
|
|
134
137
|
|
|
135
|
-
const configureTools = (agent, request) => {
|
|
136
|
-
if (request.disallowedTools?.length > 0) {
|
|
137
|
-
const tools = agent.scope?.ctx?.tools;
|
|
138
|
-
requireMethod(tools, "restrict", "disallowedTools");
|
|
139
|
-
requireMethod(tools, "get", "disallowedTools");
|
|
140
|
-
requireMethod(agent.scope.ctx, "on", "disallowedTools");
|
|
141
|
-
try { tools.restrict({ deny: request.disallowedTools }); }
|
|
142
|
-
catch (error) { throw refusal("option_not_applied", String(error?.message ?? error), "disallowedTools"); }
|
|
143
|
-
agent.scope.ctx.on("agent/created", ({ agent: created }) => {
|
|
144
|
-
if (created !== agent) { return; }
|
|
145
|
-
for (const name of request.disallowedTools) {
|
|
146
|
-
if (tools.get(name, agent) !== undefined) {
|
|
147
|
-
throw refusal("option_not_applied", "The native tool remains available: " + name, "disallowedTools");
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
|
|
154
138
|
${dshPromptSource} const configureSession = (agent, request) => {
|
|
139
|
+
configureDirectories(agent, request);
|
|
155
140
|
configureTools(agent, request);
|
|
156
141
|
configurePrompt(agent, request);
|
|
157
142
|
};
|
|
@@ -159,6 +144,7 @@ ${dshPromptSource} const configureSession = (agent, request) => {
|
|
|
159
144
|
${dshGoalSource}
|
|
160
145
|
const commands = {
|
|
161
146
|
...goalCommands,
|
|
147
|
+
...sessionControls,
|
|
162
148
|
name(request) {
|
|
163
149
|
const { agent } = owned(request.sessionId);
|
|
164
150
|
const title = ctx.get("sessionTitle");
|
|
@@ -174,7 +160,7 @@ ${dshGoalSource}
|
|
|
174
160
|
requireMethod(agents, "create", "opening a session");
|
|
175
161
|
const explicit = request.agentOptions ?? {};
|
|
176
162
|
const route = await validated(explicit.provider === undefined ? { ...defaultRoute(), ...explicit } : explicit, explicit);
|
|
177
|
-
return opened(await agents.create({ sessionId: request.sessionId, meta: { cwd: request.cwd }, agentOptions: route, setup: (_ctx, agent) => configureSession(agent, request) }));
|
|
163
|
+
return opened(await agents.create({ sessionId: request.sessionId, meta: { cwd: request.cwd }, agentOptions: route, setup: (_ctx, agent) => configureSession(agent, request) }), route);
|
|
178
164
|
},
|
|
179
165
|
// The saved header and route, read without taking the session over.
|
|
180
166
|
async peek(request) {
|
|
@@ -194,42 +180,31 @@ ${dshGoalSource}
|
|
|
194
180
|
const explicit = request.agentOptions ?? {};
|
|
195
181
|
const saved = request.route ?? defaultRoute();
|
|
196
182
|
const route = await validated(explicit.provider === undefined ? { ...saved, ...explicit } : explicit, explicit);
|
|
197
|
-
const handle = await agents.resume({ resumeSessionId: request.sessionId, agentOptions: route, setup: (_ctx, agent) =>
|
|
183
|
+
const handle = await agents.resume({ resumeSessionId: request.sessionId, agentOptions: route, setup: (_ctx, agent) => {
|
|
184
|
+
// Read the restored log before creation hooks can start another request.
|
|
185
|
+
const last = agent.session.requestContext?.();
|
|
186
|
+
if (typeof last?.contextWindow === "number" && (explicit.provider === undefined || (last.provider === explicit.provider && last.model === explicit.model))) {
|
|
187
|
+
write({ type: "native", channel: "session/requestContext", sessionId: agent.session.id, contextWindow: last.contextWindow });
|
|
188
|
+
}
|
|
189
|
+
configureSession(agent, request);
|
|
190
|
+
} });
|
|
198
191
|
// Releases with a recorded selection keep the saved route over these options unless told otherwise.
|
|
199
192
|
if ((explicit.provider !== undefined || explicit.reasoningEffort !== undefined) && typeof handle.agent.model?.select === "function") { handle.agent.model.select(route); }
|
|
200
|
-
return opened(handle);
|
|
201
|
-
},
|
|
202
|
-
prompt(request) {
|
|
203
|
-
const { agent } = owned(request.sessionId);
|
|
204
|
-
requireMethod(agent, "followup", "prompt");
|
|
205
|
-
if (agent.status !== "idle") { throw refusal("busy", "busy"); }
|
|
206
|
-
const message = userMessage(request.text, request.inputId);
|
|
207
|
-
cause = "prompt";
|
|
208
|
-
try { agent.followup(message); } finally { cause = undefined; }
|
|
209
|
-
return { messageId: message.id };
|
|
210
|
-
},
|
|
211
|
-
queue(request) {
|
|
212
|
-
const { agent } = owned(request.sessionId);
|
|
213
|
-
requireMethod(agent, "followup", "queue");
|
|
214
|
-
const message = userMessage(request.text, request.inputId);
|
|
215
|
-
agent.followup(message);
|
|
216
|
-
return { messageId: message.id };
|
|
217
|
-
},
|
|
218
|
-
steer(request) {
|
|
219
|
-
const { agent } = owned(request.sessionId);
|
|
220
|
-
requireMethod(agent, "steer", "steer");
|
|
221
|
-
if (agent.status === "idle") { throw refusal("no_active_turn", "no active turn"); }
|
|
222
|
-
const message = userMessage(request.text, request.inputId);
|
|
223
|
-
agent.steer(message);
|
|
224
|
-
return { messageId: message.id };
|
|
193
|
+
return opened(handle, route);
|
|
225
194
|
},
|
|
226
|
-
|
|
195
|
+
prompt: request => admitInput("prompt", request),
|
|
196
|
+
queue: request => admitInput("queue", request),
|
|
197
|
+
steer: request => admitInput("steer", request),
|
|
198
|
+
async withdraw(request) {
|
|
227
199
|
const { agent } = owned(request.sessionId);
|
|
228
200
|
requireMethod(agent.inbox, "remove", "withdraw");
|
|
201
|
+
const matching = (pendingQueues.get(agent) ?? []).filter((entry) => entry.id === request.messageId);
|
|
202
|
+
for (const entry of matching) { entry.withdrawn = true; }
|
|
203
|
+
const intercepted = matching.length > 0 ? (await Promise.all(matching.map((entry) => entry.settled))).some(Boolean) : false;
|
|
229
204
|
// Only input held for a later turn: a steer may already be in the next request.
|
|
230
|
-
if (!agent.inbox.nextTurn.some((message) => message.id === request.messageId)) { return { removed:
|
|
205
|
+
if (!agent.inbox.nextTurn.some((message) => message.id === request.messageId)) { return { removed: intercepted }; }
|
|
231
206
|
cause = "withdraw";
|
|
232
|
-
try { return { removed: agent.inbox.remove(request.messageId) }; } finally { cause = undefined; }
|
|
207
|
+
try { return { removed: agent.inbox.remove(request.messageId) || intercepted }; } finally { cause = undefined; }
|
|
233
208
|
},
|
|
234
209
|
cancel(request) {
|
|
235
210
|
const { agent } = owned(request.sessionId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge.js","sources":["../../../src/runtimes/dsh/bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,gIAAgI;AAChI,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAErC;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;mBAKtB,MAAM,CAAC,mBAAmB,CAAC
|
|
1
|
+
{"version":3,"file":"bridge.js","sources":["../../../src/runtimes/dsh/bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,gIAAgI;AAChI,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAErC;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;mBAKtB,MAAM,CAAC,mBAAmB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsE5C,gBAAgB;;;;;;;;;;;;;;;;EAgBhB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4Bd,eAAe;;;;;;EAMf,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0Hd,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { manualCompaction } from "../../shared/manual-compaction.js";
|
|
2
|
+
import type { SessionKernel } from "../../shared/session-kernel.js";
|
|
3
|
+
import { type DshControl } from "./control.js";
|
|
4
|
+
export declare function dshCompaction(kernel: SessionKernel, control: DshControl, busy: () => boolean): ReturnType<typeof manualCompaction>;
|
|
5
|
+
//# sourceMappingURL=compaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compaction.d.ts","sources":["../../../src/runtimes/dsh/compaction.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAuD,MAAM,mCAAmC,CAAC;AAC1H,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAmB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAqDhE,wBAAgB,aAAa,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAElI"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { asRecord } from "../../shared/json.js";
|
|
2
|
+
import { manualCompaction } from "../../shared/manual-compaction.js";
|
|
3
|
+
import { DshCommandError } from "./control.js";
|
|
4
|
+
/** The initiating command id belongs to the caller; the compaction id belongs to DSH. */
|
|
5
|
+
function operation(kernel, control) {
|
|
6
|
+
let commandId = null;
|
|
7
|
+
let reply = null;
|
|
8
|
+
let end = null;
|
|
9
|
+
let compactionId = null;
|
|
10
|
+
return {
|
|
11
|
+
async start(request, respond) {
|
|
12
|
+
commandId = request.id;
|
|
13
|
+
reply = respond;
|
|
14
|
+
try {
|
|
15
|
+
const result = await control.request("compact", { sessionId: kernel.sessionId, commandId }, null);
|
|
16
|
+
if (kernel.unreachable() !== null) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
respond({ kind: "accepted" });
|
|
20
|
+
kernel.frame({ type: "dsh/compact", native: result, responseTo: commandId, events: [] });
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
if (kernel.unreachable() !== null) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (compactionId === null && error instanceof DshCommandError && error.code === "busy") {
|
|
27
|
+
respond({ kind: "rejected", code: "busy", reason: error.message, native: error.native });
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
respond({ kind: "accepted" });
|
|
31
|
+
const native = error instanceof DshCommandError ? error.native : { message: String(error) };
|
|
32
|
+
kernel.frame({ type: "dsh/compact/error", native, responseTo: commandId, events: [] });
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
observe(frame) {
|
|
36
|
+
const { body } = frame;
|
|
37
|
+
const native = asRecord(body.native);
|
|
38
|
+
const data = asRecord(native?.data);
|
|
39
|
+
if (commandId === null) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
if (body.responseTo === commandId) {
|
|
43
|
+
if (body.type === "dsh/compact/error") {
|
|
44
|
+
return native?.code === "cancelled" || native?.name === "AbortError" ? { kind: "aborted", frame }
|
|
45
|
+
: { kind: "failed", code: "native_failed", reason: typeof native?.message === "string" ? native.message : "DSH compaction failed", frame };
|
|
46
|
+
}
|
|
47
|
+
if (native?.result === null) {
|
|
48
|
+
return { kind: "failed", code: "not_compacted", reason: "DSH found no compactable history", frame };
|
|
49
|
+
}
|
|
50
|
+
const result = asRecord(native?.result);
|
|
51
|
+
if (end !== null && result?.sourceCommandId === commandId && result.compactionId === compactionId) {
|
|
52
|
+
return { kind: "completed", frame: end };
|
|
53
|
+
}
|
|
54
|
+
return { kind: "unconfirmed", code: "observation_failed", reason: "DSH answered without matching compaction boundaries" };
|
|
55
|
+
}
|
|
56
|
+
if (data?.sourceCommandId !== commandId || typeof data.compactionId !== "string") {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
if (body.type === "session/event:compaction/start") {
|
|
60
|
+
compactionId = data.compactionId;
|
|
61
|
+
reply?.({ kind: "accepted" });
|
|
62
|
+
}
|
|
63
|
+
else if (body.type === "session/event:compaction/end" && data.compactionId === compactionId && data.error === undefined) {
|
|
64
|
+
end = frame;
|
|
65
|
+
}
|
|
66
|
+
return null;
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
export function dshCompaction(kernel, control, busy) {
|
|
71
|
+
return manualCompaction(kernel, { busy, busyReason: "DSH compaction requires an idle session with no pending input", settledBy: "native_response", create: () => operation(kernel, control) });
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=compaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compaction.js","sources":["../../../src/runtimes/dsh/compaction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAuD,MAAM,mCAAmC,CAAC;AAE1H,OAAO,EAAE,eAAe,EAAmB,MAAM,cAAc,CAAC;AAEhE,yFAAyF;AACzF,SAAS,SAAS,CAAC,MAAqB,EAAE,OAAmB;IAC3D,IAAI,SAAS,GAAkB,IAAI,CAAC;IACpC,IAAI,KAAK,GAA0C,IAAI,CAAC;IACxD,IAAI,GAAG,GAAiB,IAAI,CAAC;IAC7B,IAAI,YAAY,GAAkB,IAAI,CAAC;IACvC,OAAO;QACL,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO;YAC1B,SAAS,GAAG,OAAO,CAAC,EAAE,CAAC;YACvB,KAAK,GAAG,OAAO,CAAC;YAChB,IAAI,CAAC;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,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,EAAE,qDAAqD,EAAE,CAAC;YAC5H,CAAC;YACD,IAAI,IAAI,EAAE,eAAe,KAAK,SAAS,IAAI,OAAO,IAAI,CAAC,YAAY,KAAK,QAAQ,EAAE,CAAC;gBAAC,OAAO,IAAI,CAAC;YAAC,CAAC;YAClG,IAAI,IAAI,CAAC,IAAI,KAAK,gCAAgC,EAAE,CAAC;gBACnD,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;gBACjC,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;YAChC,CAAC;iBAAM,IAAI,IAAI,CAAC,IAAI,KAAK,8BAA8B,IAAI,IAAI,CAAC,YAAY,KAAK,YAAY,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;gBAAC,GAAG,GAAG,KAAK,CAAC;YAAC,CAAC;YAC3I,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,MAAqB,EAAE,OAAmB,EAAE,IAAmB;IAC3F,OAAO,gBAAgB,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,+DAA+D,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;AACjM,CAAC"}
|
|
@@ -16,11 +16,11 @@ export declare class DshCommandError extends Error {
|
|
|
16
16
|
}
|
|
17
17
|
export interface DshControl {
|
|
18
18
|
readonly ready: Promise<DshReady>;
|
|
19
|
-
request(this: void, method: string, fields?: JsonRecord, timeoutMs?: number): Promise<JsonRecord>;
|
|
19
|
+
request(this: void, method: string, fields?: JsonRecord, timeoutMs?: number | null): Promise<JsonRecord>;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* The bridge's JSON lines. Every line but a command answer goes to `receive` in
|
|
23
23
|
* order, a line that is not an object included, so nothing the process said is lost.
|
|
24
24
|
*/
|
|
25
|
-
export declare function dshControl(child: LineProcess, receive: (message: JsonRecord) => void): DshControl;
|
|
25
|
+
export declare function dshControl(child: LineProcess, receive: (message: JsonRecord) => void, redact?: (text: string) => string): DshControl;
|
|
26
26
|
//# sourceMappingURL=control.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control.d.ts","sources":["../../../src/runtimes/dsh/control.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"control.d.ts","sources":["../../../src/runtimes/dsh/control.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAuB,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAG5E,oGAAoG;AACpG,eAAO,MAAM,oBAAoB,QAAS,CAAC;AAG3C,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;CAC/B;AAED,6FAA6F;AAC7F,qBAAa,eAAgB,SAAQ,KAAK;IACxC,SAAkB,IAAI,qBAAqB;IAC3C,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAE5B,YAAY,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,UAAU,EAAE,MAAM,GAAG,SAAS,EAKvF;CACF;AAID,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClC,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CAC1G;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,UAAU,KAAK,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,UAAU,CA2DpI"}
|