@chatcode/chatcode-cli 3.0.5-rc.7 → 3.0.6-rc.1
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.i18n.yaml +6 -6
- package/README.md +7 -0
- package/README.zh.md +7 -0
- package/lib/bin.js +19 -5
- package/lib/desktop-history-B0iUekXf.js +72 -0
- package/lib/desktop-history-DvgkONgj.js +2 -0
- package/lib/{dump-config-D8kXfdTs.js → dump-config-CgIYHBp2.js} +1 -1
- package/lib/dump-config-D6TruNva.js +2 -0
- package/lib/{dump-config-schema-CtZbroi6.js → dump-config-schema-GiAtkJwx.js} +2 -2
- package/lib/{plugin-CYw-MBRn.js → plugin-BACkrsVG.js} +1 -1
- package/lib/{profile-boot-CffsubnV.js → profile-boot-c5YKtUIb.js} +17 -4
- package/lib/profile-boot.js +1 -1
- package/lib/tui-compat.js +1 -1
- package/lib/types/args.d.ts +8 -1
- package/lib/types/desktop-history.d.ts +31 -0
- package/lib/types/installed-bin.d.ts +9 -0
- package/package.json +26 -26
- package/runtime/manifest.json +3 -2
- package/runtime/node_modules/@chatcode/runtime-client/README.md +225 -0
- package/runtime/node_modules/@chatcode/runtime-client/desktop-history-guard.mjs +65 -0
- package/runtime/node_modules/@chatcode/runtime-client/desktop-history.mjs +278 -0
- package/runtime/node_modules/@chatcode/runtime-client/desktop-permission-gate.mjs +28 -0
- package/runtime/node_modules/@chatcode/runtime-client/execution.mjs +593 -0
- package/runtime/node_modules/@chatcode/runtime-client/index.d.ts +449 -0
- package/runtime/node_modules/@chatcode/runtime-client/model-preferences.mjs +57 -0
- package/runtime/node_modules/@chatcode/runtime-client/package.json +53 -0
- package/runtime/node_modules/@chatcode/runtime-client/runtime-connector.mjs +736 -0
- package/runtime/node_modules/@chatcode/runtime-client/session-activity.mjs +121 -0
- package/runtime/node_modules/@chatcode/runtime-client/session-browser.mjs +122 -0
- package/runtime/node_modules/@chatcode/runtime-client/stdio-bridge.mjs +103 -0
- package/runtime/node_modules/@chatcode/runtime-client/user-questions.mjs +108 -0
- package/runtime/node_modules/@deepseek-ai/cordis-plugin-include/lib/types/journal.d.ts +69 -0
- package/runtime/node_modules/@deepseek-ai/cordis-plugin-include/lib/types/journal.d.ts.map +1 -0
- package/runtime/node_modules/@deepseek-ai/cordis-plugin-include/lib/types/patch.d.ts +68 -0
- package/runtime/node_modules/@deepseek-ai/cordis-plugin-include/lib/types/patch.d.ts.map +1 -0
- package/runtime/node_modules/@deepseek-ai/cordis-plugin-loader/lib/types/resolve.d.ts +9 -0
- package/runtime/node_modules/@deepseek-ai/cordis-plugin-loader/lib/types/resolve.d.ts.map +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-agent/lib/index.js +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-agent/lib/types/model-selection.d.ts +6 -0
- package/runtime/node_modules/@deepseek-ai/dsh-agent/lib/types/model-selection.js +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-agent/lib/types/runtime-types.d.ts +12 -3
- package/runtime/node_modules/@deepseek-ai/dsh-agent-default-model/lib/index.js +11 -0
- package/runtime/node_modules/@deepseek-ai/dsh-agent-default-model/lib/types/index.d.ts +7 -0
- package/runtime/node_modules/@deepseek-ai/dsh-agent-loop/lib/index.js +69 -17
- package/runtime/node_modules/@deepseek-ai/dsh-agent-loop/lib/invariant.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-agent-loop/lib/types/agent.d.ts +3 -1
- package/runtime/node_modules/@deepseek-ai/dsh-agent-loop/lib/types/inbox.d.ts +13 -0
- package/runtime/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/typert.host.js +5 -5
- package/runtime/node_modules/@deepseek-ai/dsh-api-gateway/lib/types/access.d.ts +40 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-gateway/lib/types/access.js +164 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +460 -79
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/index.js +636 -44
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.host.js +483 -55
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.remote-client.d.ts +19 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.remote-client.js +377 -40
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/agent.d.ts +24 -4
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/agent.js +97 -15
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/catalog.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/commands.d.ts +11 -2
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/commands.js +172 -18
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/continuation.d.ts +35 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/continuation.js +48 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/history/assistant-stream.d.ts +43 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/history/assistant-stream.js +80 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/history/controller.d.ts +104 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/history/controller.js +294 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/history/listener.d.ts +105 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/history/listener.js +297 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/history.js +4 -4
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/index.d.ts +88 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/index.js +230 -6
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/login-token-store.d.ts +64 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/login-token-store.js +79 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/state/controller.d.ts +45 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/state/controller.js +289 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/state/listener.d.ts +40 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/state/listener.js +112 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/types.d.ts +93 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/web/controller.d.ts +25 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/web/controller.js +139 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/package.json +9 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/typert.host.js +5 -5
- package/runtime/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/types/client/inventory.d.ts +42 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/types/client/inventory.js +101 -0
- package/runtime/node_modules/@deepseek-ai/dsh-app-boot/lib/types/bundle-platform.d.ts +17 -0
- package/runtime/node_modules/@deepseek-ai/dsh-app-boot/lib/types/startup-diagnostics.d.ts +38 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-connection/lib/types/client/socket.d.ts +50 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-connection/lib/types/connect-protocol.d.ts +6 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-connection/lib/types/peer.d.ts +36 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-file-upload/lib/typert.host.js +5 -5
- package/runtime/node_modules/@deepseek-ai/dsh-client-locale/lib/types/locales/de.d.ts +47 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-locale/lib/types/locales/es.d.ts +47 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-locale/lib/types/locales/fr.d.ts +47 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-locale/lib/types/locales/ja.d.ts +47 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-locale/lib/types/locales/pt.d.ts +47 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-locale/lib/types/locales/ru.d.ts +47 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-modules/lib/types/assets.d.ts +51 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-modules/lib/types/client/notify.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-modules/lib/types/client/release-change.d.ts +44 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/types/client/CreatePluginMenuItem.d.ts +20 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/types/client/analytics.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-approval/lib/types/client/ApprovalCard.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-approval/lib/types/client/ApprovalWarning.d.ts +10 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-brand-official/lib/types/client/home-whale/PixelWhale.d.ts +14 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-brand-official/lib/types/client/home-whale/artwork.d.ts +17 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-brand-official/lib/types/client/home-whale/code-fill.d.ts +21 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-brand-official/lib/types/client/home-whale/renderer.d.ts +20 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/types/client/chat/ChatFlow.d.ts +4 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/types/client/chat/ReasoningContent.d.ts +16 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/types/client/chat/RunningStatus.d.ts +18 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/types/client/chat/RunningWhaleTail.d.ts +6 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/types/client/chat/UserContent.d.ts +9 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/types/client/chat/flow-motion.d.ts +110 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/types/client/chat/text-interaction.d.ts +19 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/types/client/chat/text-selection.d.ts +20 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/types/client/contract/group-tree.d.ts +32 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/types/client/conversation-nodes/group-tree-segments.d.ts +42 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/types/client/file-path.d.ts +11 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/types/client/reasoning-text.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/types/index.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/types/client/option-groups.d.ts +15 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/types/client/contract/text-interaction.d.ts +31 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/types/client/contract/user-text.d.ts +60 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/types/client/conversation/interaction-registry.d.ts +28 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/types/client/conversation/user-text-document.d.ts +21 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/types/client/conversation/user-text-registry.d.ts +26 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/types/client/draft.d.ts +23 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/types/client/input/editor/CommandChip.d.ts +13 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/types/client/input/editor/QuoteNode.d.ts +61 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/types/client/input/editor/command-chip-node.d.ts +87 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/types/client/input/editor/command-chip-selection.d.ts +20 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/types/client/input/prompt.d.ts +9 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/types/client/input/submission-analytics.d.ts +10 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/types/client/user-text/UserText.d.ts +22 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/types/client/user-text/session-reference-rule.d.ts +15 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/types/client/user-text/whitespace-rules.d.ts +7 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/types/client/view-pins.d.ts +22 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/types/client/GoalCommandReference.d.ts +9 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/types/client/user-text-rules.d.ts +21 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/types/client/provider-order.d.ts +10 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/lib/types/client/context-menus.d.ts +18 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/lib/types/client/open-toast.d.ts +40 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/lib/types/client/outcome.d.ts +7 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/lib/types/client/session-open-with.d.ts +14 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/types/client/BundleDetailSection.d.ts +26 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/types/client/PluginRefreshToast.d.ts +17 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/types/client/detail-store.d.ts +76 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/types/client/header-scroll.d.ts +14 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/types/client/sanitize-install-input.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/types/client/tab-ledger.d.ts +15 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/types/client/versions.d.ts +33 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/AnimatedRows.module.css +7 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/CommandText.module.css +12 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/DetailDocument.module.css +67 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/InlineEditor.module.css +23 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/MenuGroup.module.css +37 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/QuotePreview.module.css +101 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/RowDragPreview.module.css +12 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/UserMessageBubble.module.css +11 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/ZoomControls.module.css +54 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/AnimatedRows.d.ts +49 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/CommandText.d.ts +16 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/DetailDocument.d.ts +78 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/DraggableImage.d.ts +19 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/HoverCardGroup.d.ts +25 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/InlineEditor.d.ts +23 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/MenuGroup.d.ts +22 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/MenuRow.d.ts +37 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/QuotePreview.d.ts +24 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/SubmenuPanel.d.ts +19 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/UserMessageBubble.d.ts +11 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/ZoomControls.d.ts +27 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/document-zoom.d.ts +17 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/file-drag-actions.d.ts +32 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/icons/artwork.d.ts +426 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/image-drag.d.ts +17 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/markdown/copy-tex.d.ts +14 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/markdown/quote-text.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/markdown/windows-path-destinations.d.ts +11 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/menu-submenu-position.d.ts +15 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/tooltip-placement.d.ts +35 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/use-clipboard-copy.d.ts +14 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/useMenuSubmenu.d.ts +43 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/useRowDragPreview.d.ts +20 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-reference/lib/types/client/FileReference.d.ts +29 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-reference/lib/types/client/user-text-rules.d.ts +18 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-schedule/lib/types/client/NewSessionLimit.d.ts +12 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-schedule/lib/types/client/RuleSelectRow.d.ts +22 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-schedule/lib/types/client/ScheduleEmptyIllustration.d.ts +12 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-schedule/lib/types/client/TaskEditorFields.d.ts +54 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-schedule/lib/types/client/TaskRuleControls.d.ts +50 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-schedule/lib/types/client/clear-ended.d.ts +33 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-schedule/lib/types/client/editor-store.d.ts +32 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-schedule/lib/types/client/editor-timing.d.ts +47 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-schedule/lib/types/client/task-record.d.ts +30 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/client.js +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/types/client/account-avatar.d.ts +37 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/types/client/browser-login.d.ts +33 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/types/client/notice-transition.d.ts +7 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/types/index.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/types/onboarding-settings.d.ts +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/types/client/DesktopChannelRow.d.ts +31 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/types/client/HostReleasePrompt.d.ts +24 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/types/client/desktop-channel-source.d.ts +43 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/types/client/ApiKeyInput.d.ts +17 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/types/client/ModelReasoningEfforts.d.ts +43 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/types/client/useModelRows.d.ts +41 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/types/client/PanelIcon.d.ts +9 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/types/client/panel-pins.d.ts +21 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/types/client/scroll-handoff.d.ts +24 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.frontmatter-fields.js +5768 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/types/client/PreviewFrame.d.ts +34 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/types/client/image/pan.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/types/client/markdown/frontmatter-fields.d.ts +20 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/types/client/markdown/frontmatter.d.ts +13 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/lib/types/client/FileNavigator.d.ts +33 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/lib/types/client/FileTree.d.ts +114 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/lib/types/client/NavigatorToggle.d.ts +28 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/lib/types/client/navigator-layout.d.ts +6 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/lib/types/client/workspace-tree.d.ts +51 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/lib/types/client/shell/TabMenuContent.d.ts +13 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/lib/types/client/shell/flash.d.ts +10 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/lib/types/client/tabs/guide/GuideMoreIcon.d.ts +7 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/lib/types/client/tabs/guide/guide-pins.d.ts +28 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/types/client/SkillReference.d.ts +19 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/types/client/user-text-rules.d.ts +17 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/types/client/slots.d.ts +12 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/types/client/FontFamilyRow.d.ts +19 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/types/client/FontSettingsGroup.d.ts +19 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/types/client/icon-sprite.d.ts +17 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/types/client/tool/components/ExitCodeBadge.d.ts +9 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/types/client/tool/components/QuestionToolRow.d.ts +13 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/types/client/tool/file-menu.d.ts +15 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/types/client/tool/models/recorded-path.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/types/client/watch-tool-result.d.ts +15 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/types/types.d.ts +16 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/types/client/QuestionReplyView.d.ts +16 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/types/client/question-reply.d.ts +74 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/contract/toast.d.ts +67 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/path-suffix.d.ts +15 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/rows/WorkspaceDialogs.d.ts +10 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/session-actions/SessionMenu.d.ts +6 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/session-actions/context-menus.d.ts +12 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/toast/Toast.d.ts +21 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/toast/register.d.ts +10 -0
- package/runtime/node_modules/@deepseek-ai/dsh-commands/lib/typert.host.js +5 -5
- package/runtime/node_modules/@deepseek-ai/dsh-commands/lib/types/builtin.d.ts +46 -0
- package/runtime/node_modules/@deepseek-ai/dsh-commands/lib/types/builtin.js +39 -0
- package/runtime/node_modules/@deepseek-ai/dsh-compaction-basic/lib/index.js +11 -8
- package/runtime/node_modules/@deepseek-ai/dsh-compaction-basic/lib/types/index.d.ts +3 -1
- package/runtime/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/typert.host.js +10 -10
- package/runtime/node_modules/@deepseek-ai/dsh-experimental-auto-review/lib/types/locales.d.ts +48 -0
- package/runtime/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/lib/types/client/MicrophonePicker.d.ts +6 -0
- package/runtime/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/lib/types/client/failure-text.d.ts +11 -0
- package/runtime/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/lib/types/client/microphone-device.d.ts +13 -0
- package/runtime/node_modules/@deepseek-ai/dsh-goal/lib/typert.host.js +5 -5
- package/runtime/node_modules/@deepseek-ai/dsh-headless/lib/{json-stream-Bh4BGGk9.js → json-stream-Dc3g2Bl1.js} +11 -7
- package/runtime/node_modules/@deepseek-ai/dsh-hmr/lib/types/module-files.d.ts +48 -0
- package/runtime/node_modules/@deepseek-ai/dsh-hmr/lib/types/package-manifest.d.ts +35 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/index.js +241 -64
- package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/typert.host.js +26 -11
- package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/typert.remote-client.js +3 -3
- package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/types/call-config.d.ts +19 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/types/call-config.js +5 -1
- package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/types/index.d.ts +30 -6
- package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/types/index.js +109 -8
- package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/types/message.d.ts +5 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/types/prompt-protocol-options.d.ts +5 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/types/prompt-protocol-options.js +32 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/types/types.d.ts +7 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js +19 -7
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/config.d.ts +3 -3
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/credential.d.ts +34 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/listed-catalog.d.ts +56 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/listing-cache.d.ts +71 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/listing-config.d.ts +48 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/listing.d.ts +91 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/protocol-adapter.d.ts +3 -1
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek-account/lib/types/config.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/lib/types/config.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +149 -28
- package/runtime/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/types/adapter.d.ts +3 -1
- package/runtime/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/types/prompt-options.d.ts +17 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/types/provider-data.d.ts +10 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/types/provider-data.generated.d.ts +10 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/types/types.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/credentials.d.ts +34 -0
- package/runtime/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/deadline.d.ts +12 -0
- package/runtime/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/diagnostic.d.ts +22 -0
- package/runtime/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/generation.d.ts +42 -0
- package/runtime/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/probe.d.ts +37 -0
- package/runtime/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/status.d.ts +87 -0
- package/runtime/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/templates.d.ts +37 -0
- package/runtime/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/types.d.ts +85 -0
- package/runtime/node_modules/@deepseek-ai/dsh-permission-presets/lib/typert.host.js +4 -4
- package/runtime/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/bundle-detail.d.ts +40 -0
- package/runtime/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/bundle-detail.js +85 -0
- package/runtime/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/diagnostic.d.ts +17 -0
- package/runtime/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/diagnostic.js +72 -0
- package/runtime/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/git-transport.d.ts +27 -0
- package/runtime/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/git-transport.js +65 -0
- package/runtime/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/official-install-target.d.ts +15 -0
- package/runtime/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/official-install-target.js +54 -0
- package/runtime/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/versions.d.ts +40 -0
- package/runtime/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/versions.js +61 -0
- package/runtime/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/types/config.d.ts +38 -0
- package/runtime/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/types/configuration.d.ts +10 -0
- package/runtime/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/types/evaluators/async-function.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/types/evaluators/index.d.ts +12 -0
- package/runtime/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/types/evaluators/repl.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/types/evaluators/types.d.ts +68 -0
- package/runtime/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/types/evaluators/vm-script-await.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/types/evaluators/vm-script.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/types/execution.d.ts +66 -0
- package/runtime/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/types/imports/evaluation-ended.d.ts +7 -0
- package/runtime/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/types/imports/module-hooks.d.ts +37 -0
- package/runtime/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/types/imports/vm-modules.d.ts +35 -0
- package/runtime/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/types/persistent-process-entry.d.ts +2 -0
- package/runtime/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/types/persistent-process.d.ts +16 -0
- package/runtime/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/types/policy-processes.d.ts +30 -0
- package/runtime/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/types/rpc.d.ts +13 -0
- package/runtime/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/types/worker.d.ts +66 -0
- package/runtime/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/lib/index.js +215 -9
- package/runtime/node_modules/@deepseek-ai/dsh-sandbox/lib/types/locales.d.ts +41 -0
- package/runtime/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/types/acl-skill.d.ts +19 -0
- package/runtime/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/{types-Ci-q7_aQ.js → types-DwkEVVWZ.js} +357 -81
- package/runtime/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/lib/types/query-activity.d.ts +43 -0
- package/runtime/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/lib/types/query-content.d.ts +21 -0
- package/runtime/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/lib/types/query-input.d.ts +12 -0
- package/runtime/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/lib/types/user-questions.d.ts +17 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session/lib/index.js +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-session/lib/types/request-header.js +2 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session/lib/types/types.d.ts +2 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-log-export/lib/types/client/CopyToast.d.ts +21 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-log-export/lib/types/client/copy-controller.d.ts +76 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-log-export/lib/types/markdown.d.ts +22 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/worker.cjs +197 -9
- package/runtime/node_modules/@deepseek-ai/dsh-session-reference/lib/typert.host.js +5 -5
- package/runtime/node_modules/@deepseek-ai/dsh-subagent/lib/typert.host.js +5 -5
- package/runtime/node_modules/@deepseek-ai/dsh-subagent/lib/types/activation.d.ts +112 -0
- package/runtime/node_modules/@deepseek-ai/dsh-subagent/lib/types/activation.js +112 -0
- package/runtime/node_modules/@deepseek-ai/dsh-subagent/lib/types/manager.d.ts +232 -0
- package/runtime/node_modules/@deepseek-ai/dsh-subagent/lib/types/manager.js +1250 -0
- package/runtime/node_modules/@deepseek-ai/dsh-subagent/lib/types/names.d.ts +56 -0
- package/runtime/node_modules/@deepseek-ai/dsh-subagent/lib/types/names.js +96 -0
- package/runtime/node_modules/@deepseek-ai/dsh-subagent/lib/types/structured.d.ts +49 -0
- package/runtime/node_modules/@deepseek-ai/dsh-subagent/lib/types/structured.js +130 -0
- package/runtime/node_modules/@deepseek-ai/dsh-subprocess-local/lib/types/linux-scope-selector.d.ts +60 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tmux-context/lib/index.js +215 -9
- package/runtime/node_modules/@deepseek-ai/dsh-token-meter/lib/types/measurement-projection.d.ts +74 -0
- package/runtime/node_modules/@deepseek-ai/dsh-token-meter/lib/types/measurement-projection.js +94 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tool-ask-user/lib/types/timed.d.ts +13 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +31 -1
- package/runtime/node_modules/@deepseek-ai/dsh-tool-fs/lib/types/apply-patch-output.d.ts +140 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tool-fs/lib/types/apply-patch-presentation.d.ts +15 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tool-fs/lib/types/apply-patch.d.ts +10 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tool-fs/lib/types/mutation-result.d.ts +18 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tool-fs/lib/types/patch/execute.d.ts +17 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tool-fs/lib/types/patch/index.d.ts +17 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tool-fs/lib/types/patch/plan.d.ts +52 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tool-fs/lib/types/patch/preflight.d.ts +18 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tool-fs/lib/types/patch/types.d.ts +106 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tool-subagent/lib/types/preset-selection.d.ts +36 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tool-subagent-control/lib/types/wait-agent.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tool-subagent-control/lib/types/wait-agent.js +104 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tools/lib/types/batch.d.ts +26 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tools/lib/types/batch.js +246 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tools/lib/types/contracts.d.ts +376 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tools/lib/types/contracts.js +51 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tools/lib/types/events.d.ts +58 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tools/lib/types/events.js +2 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tools/lib/types/executor.d.ts +90 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tools/lib/types/executor.js +19 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tools/lib/types/pipeline.d.ts +154 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tools/lib/types/pipeline.js +701 -0
- package/runtime/node_modules/@deepseek-ai/dsh-typert-protocol/lib/types/principal.d.ts +13 -0
- package/runtime/node_modules/@deepseek-ai/dsh-typert-protocol/lib/types/principal.js +15 -0
- package/runtime/node_modules/@deepseek-ai/dsh-typert-protocol/lib/types/remote-access.d.ts +32 -0
- package/runtime/node_modules/@deepseek-ai/dsh-typert-protocol/lib/types/remote-access.js +9 -0
- package/runtime/node_modules/@deepseek-ai/dsh-typert-protocol/lib/types/remote-info.d.ts +21 -0
- package/runtime/node_modules/@deepseek-ai/dsh-typert-protocol/lib/types/remote-info.js +143 -0
- package/runtime/node_modules/@deepseek-ai/dsh-user-questions/lib/types/projection.d.ts +85 -0
- package/runtime/node_modules/@deepseek-ai/dsh-user-questions/lib/types/projection.js +298 -0
- package/runtime/node_modules/@deepseek-ai/dsh-user-questions/lib/types/timed-wait.d.ts +37 -0
- package/runtime/node_modules/@deepseek-ai/dsh-user-questions/lib/types/timed-wait.js +85 -0
- package/runtime/node_modules/@deepseek-ai/dsh-util-time/lib/types/cron.d.ts +54 -0
- package/runtime/node_modules/@deepseek-ai/dsh-util-time/lib/types/duration.d.ts +61 -0
- package/runtime/node_modules/@deepseek-ai/dsh-util-time/lib/types/instant.d.ts +145 -0
- package/runtime/node_modules/@deepseek-ai/dsh-util-time/lib/types/recurrence.d.ts +38 -0
- package/runtime/node_modules/@deepseek-ai/dsh-util-time/lib/types/rrule.d.ts +34 -0
- package/runtime/node_modules/@deepseek-ai/dsh-util-values/lib/types/partial-json.d.ts +152 -0
- package/runtime/node_modules/@deepseek-ai/dsh-web-app/lib/types/public-url.d.ts +16 -0
- package/runtime/node_modules/@deepseek-ai/node-addon-system/lib/.tsbuildinfo +1 -1
- package/lib/dump-config-DuCc-QB7.js +0 -2
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/queue-mirror.d.ts +0 -26
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/queue-mirror.js +0 -61
- package/runtime/node_modules/@deepseek-ai/dsh-app-boot/lib/types/watch-config.d.ts +0 -13
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-attachment/lib/types/ImageLightbox.d.ts +0 -27
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/types/client/contract/queue.d.ts +0 -9
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/types/client/input/queue-store.d.ts +0 -20
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/types/client/ProducedFiles.d.ts +0 -14
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/types/client/icons.d.ts +0 -8
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/OnboardingSurface.module.css +0 -29
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/OnboardingSurface.d.ts +0 -11
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings/lib/types/client/settings-contract.d.ts +0 -86
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings/lib/types/client/settings-scope.d.ts +0 -141
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/types/client/desktop-update-bridge.d.ts +0 -23
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/types/client/AgentLoopCard.d.ts +0 -12
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/types/client/BashCard.d.ts +0 -12
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/types/client/ConfigurablePluginsTab.d.ts +0 -19
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/types/client/PluginCard.d.ts +0 -42
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/types/client/PluginConfigForm.d.ts +0 -34
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/types/client/SubagentCard.d.ts +0 -12
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/types/client/SubagentLimitsFields.d.ts +0 -14
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/types/client/SubagentModelSelectionCard.d.ts +0 -12
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/types/client/SubagentModelSelectionFields.d.ts +0 -14
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/types/client/WebSearchCard.d.ts +0 -16
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/types/client/agent-loop-card-controller.d.ts +0 -43
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/types/client/bash-card-controller.d.ts +0 -45
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/types/client/card-form.d.ts +0 -171
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/types/client/fields.d.ts +0 -69
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/types/client/slot-contract.d.ts +0 -31
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/types/client/subagent-card-controller.d.ts +0 -32
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/types/client/subagent-limits-card-controller.d.ts +0 -33
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/types/client/subagent-model-selection-card-controller.d.ts +0 -129
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/types/client/tab-store.d.ts +0 -65
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/types/client/web-search-card-controller.d.ts +0 -93
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/types/client/code/languages.d.ts +0 -9
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/types/client/icons.d.ts +0 -14
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/types/client/pdf/PdfBody.d.ts +0 -24
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/lib/types/client/TerminalBody.d.ts +0 -14
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/types/client/subagent-lineage.d.ts +0 -21
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/subagent-lineage.d.ts +0 -21
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/common/defaults.d.ts +0 -24
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/common/file-id.d.ts +0 -19
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/common/file-store.d.ts +0 -86
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/common/files-api.d.ts +0 -111
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/common/image-tokens.d.ts +0 -34
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/common/messages-api.d.ts +0 -10
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/common/model-info.d.ts +0 -16
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/common/models.d.ts +0 -4
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/common/request-extensions.d.ts +0 -16
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/common/request-files.d.ts +0 -49
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/common/request-pricing.d.ts +0 -60
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/common/types.d.ts +0 -119
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/common/upload-index.d.ts +0 -68
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/protocols/chat-completions/adapter.d.ts +0 -45
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/protocols/chat-completions/serialize.d.ts +0 -78
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/protocols/chat-completions/sse.d.ts +0 -24
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/protocols/chat-completions/translate.d.ts +0 -37
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/protocols/chat-completions/types.d.ts +0 -178
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/protocols/messages/adapter.d.ts +0 -47
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/protocols/messages/images.d.ts +0 -35
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/protocols/messages/replay.d.ts +0 -27
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/protocols/messages/serialize.d.ts +0 -18
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/protocols/messages/sse.d.ts +0 -8
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/protocols/messages/translate.d.ts +0 -14
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/protocols/messages/transport.d.ts +0 -15
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/protocols/messages/types.d.ts +0 -62
- package/runtime/node_modules/@deepseek-ai/dsh-schedule/lib/types/persistence.d.ts +0 -19
- package/runtime/node_modules/@deepseek-ai/dsh-schedule/lib/types/persistence.js +0 -30
- package/runtime/node_modules/@deepseek-ai/dsh-schedule/lib/types/projection.d.ts +0 -35
- package/runtime/node_modules/@deepseek-ai/dsh-schedule/lib/types/projection.js +0 -68
- package/runtime/node_modules/@deepseek-ai/dsh-schedule/lib/types/transaction.d.ts +0 -10
- package/runtime/node_modules/@deepseek-ai/dsh-schedule/lib/types/transaction.js +0 -22
- package/runtime/node_modules/@deepseek-ai/dsh-settings/lib/types/invariant.d.ts +0 -16
- package/runtime/node_modules/@deepseek-ai/dsh-settings/lib/types/invariant.js +0 -41
- package/runtime/node_modules/@deepseek-ai/dsh-subprocess-local/lib/runner-launch-DGV26RBf.js +0 -1525
- package/runtime/node_modules/@deepseek-ai/dsh-subprocess-local/lib/runner-launch-UEJ3Ntqn.js +0 -1511
- package/runtime/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/fiber-state.d.ts +0 -28
- package/runtime/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/fiber-state.js +0 -25
- package/runtime/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/inspect.d.ts +0 -93
- package/runtime/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/inspect.js +0 -303
- package/runtime/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/prompt.d.ts +0 -3
- package/runtime/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/prompt.js +0 -5
- package/lib/{plugin-d65VulBk.js → plugin-BccFcAte.js} +1 -1
package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/continuation.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { SessionSeq } from '@deepseek-ai/dsh-session/types';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
declare const stateSchema: z.ZodObject<{
|
|
4
|
+
admitted: z.ZodBoolean;
|
|
5
|
+
failedAttempt: z.ZodBoolean;
|
|
6
|
+
ending: z.ZodNullable<z.ZodPipe<z.ZodNumber, z.ZodTransform<SessionSeq, number>>>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
/** Recoverable manual-continuation facts over admitted user input and empty retry messages. */
|
|
9
|
+
export type ContinuationState = z.infer<typeof stateSchema>;
|
|
10
|
+
/** Eligibility requires admitted human work and a failed settlement in the last request step. */
|
|
11
|
+
export declare const continuationProjectionDefinition: {
|
|
12
|
+
key: "conversationContinuation";
|
|
13
|
+
stateVersion: number;
|
|
14
|
+
stateSchema: z.ZodObject<{
|
|
15
|
+
admitted: z.ZodBoolean;
|
|
16
|
+
failedAttempt: z.ZodBoolean;
|
|
17
|
+
ending: z.ZodNullable<z.ZodPipe<z.ZodNumber, z.ZodTransform<SessionSeq, number>>>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
init: () => ContinuationState;
|
|
20
|
+
apply: (state: NoInfer<{
|
|
21
|
+
admitted: boolean;
|
|
22
|
+
failedAttempt: boolean;
|
|
23
|
+
ending: SessionSeq | null;
|
|
24
|
+
}>, event: import("@deepseek-ai/dsh-session").SessionEvent) => {
|
|
25
|
+
admitted: boolean;
|
|
26
|
+
failedAttempt: boolean;
|
|
27
|
+
ending: SessionSeq | null;
|
|
28
|
+
};
|
|
29
|
+
wire: {
|
|
30
|
+
viewSchema: z.ZodNullable<z.ZodPipe<z.ZodNumber, z.ZodTransform<SessionSeq, number>>>;
|
|
31
|
+
view: (state: ContinuationState) => SessionSeq | null;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=continuation.d.ts.map
|
package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/continuation.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { brandNumber } from '@deepseek-ai/dsh-brand';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
// Explicit manual requests use a fixed product policy, independent of automatic retry configuration.
|
|
4
|
+
const CONTINUABLE_FAILURES = new Set([
|
|
5
|
+
'RATE_LIMIT', 'SERVER', 'TIMEOUT', 'TRANSPORT', 'EMPTY_RESPONSE', 'STREAM_CLOSED',
|
|
6
|
+
]);
|
|
7
|
+
const endingSchema = z.number().int().nonnegative().transform((brandNumber)).nullable();
|
|
8
|
+
const stateSchema = z.object({
|
|
9
|
+
admitted: z.boolean(),
|
|
10
|
+
failedAttempt: z.boolean(),
|
|
11
|
+
ending: endingSchema,
|
|
12
|
+
});
|
|
13
|
+
const EMPTY = { admitted: false, failedAttempt: false, ending: null };
|
|
14
|
+
/** Eligibility requires admitted human work and a failed settlement in the last request step. */
|
|
15
|
+
export const continuationProjectionDefinition = {
|
|
16
|
+
key: 'conversationContinuation',
|
|
17
|
+
stateVersion: 4,
|
|
18
|
+
stateSchema,
|
|
19
|
+
init: () => EMPTY,
|
|
20
|
+
apply: (state, event) => {
|
|
21
|
+
switch (event.type) {
|
|
22
|
+
case 'turn/start':
|
|
23
|
+
return EMPTY;
|
|
24
|
+
case 'step/start':
|
|
25
|
+
case 'assistant/message':
|
|
26
|
+
return state.failedAttempt ? { ...state, failedAttempt: false } : state;
|
|
27
|
+
case 'user/message':
|
|
28
|
+
return !state.admitted && event.surfaceOp === 'append'
|
|
29
|
+
&& ((event.data.source.kind === 'user' && event.data.content.length > 0)
|
|
30
|
+
|| (event.data.source.kind === 'retry' && event.data.content.length === 0))
|
|
31
|
+
? { ...state, admitted: true } : state;
|
|
32
|
+
case 'assistant/attempt':
|
|
33
|
+
return state.failedAttempt ? state : { ...state, failedAttempt: true };
|
|
34
|
+
case 'turn/end': {
|
|
35
|
+
const ending = event.data.reason.kind === 'error' && CONTINUABLE_FAILURES.has(event.data.reason.error.code)
|
|
36
|
+
&& state.admitted && state.failedAttempt ? event.seq : null;
|
|
37
|
+
return ending === null ? EMPTY : { ...EMPTY, ending };
|
|
38
|
+
}
|
|
39
|
+
default:
|
|
40
|
+
return state;
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
wire: {
|
|
44
|
+
viewSchema: endingSchema,
|
|
45
|
+
view: (state) => state.ending,
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=continuation.js.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** Assistant stream baselines and per-connection subscriptions. */
|
|
2
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
3
|
+
import type { SessionId } from '@deepseek-ai/dsh-session';
|
|
4
|
+
import type { SessionAssistantStreamBaseline, SessionAssistantStreamFrame } from '../types.ts';
|
|
5
|
+
import { ListenerBuffer } from './listener.ts';
|
|
6
|
+
/** One accumulator per live Session, shared by every subscription bound to it. */
|
|
7
|
+
export declare class SessionAssistantStreamsListener {
|
|
8
|
+
private readonly ctx;
|
|
9
|
+
private readonly streams;
|
|
10
|
+
/** @param ctx - service context owning the accumulator listeners. */
|
|
11
|
+
constructor(ctx: Context);
|
|
12
|
+
/**
|
|
13
|
+
* Bind one connection to a Session assistant stream.
|
|
14
|
+
* @param sessionId - Session to subscribe.
|
|
15
|
+
* @param signal - cancellation owned by the caller.
|
|
16
|
+
* @param queue - caller-owned raw notification buffer.
|
|
17
|
+
* @returns a listener the caller disposes.
|
|
18
|
+
*/
|
|
19
|
+
bind(sessionId: SessionId, signal: AbortSignal, queue: Pick<ListenerBuffer<AssistantEntry>, 'createInput' | 'capture'>): AssistantStreamListener;
|
|
20
|
+
}
|
|
21
|
+
type AssistantEntry = {
|
|
22
|
+
type: 'assistant-stream';
|
|
23
|
+
frame: SessionAssistantStreamFrame;
|
|
24
|
+
};
|
|
25
|
+
/** Writes assistant notifications into the connection's shared queue. */
|
|
26
|
+
declare class AssistantStreamListener implements Disposable {
|
|
27
|
+
private _snapshot;
|
|
28
|
+
private readonly disposes;
|
|
29
|
+
private ordinal;
|
|
30
|
+
private cut;
|
|
31
|
+
constructor(ctx: Context, sessionId: SessionId, signal: AbortSignal, _snapshot: () => SessionAssistantStreamBaseline, output: Pick<ListenerBuffer<AssistantEntry>, 'createInput' | 'capture'>);
|
|
32
|
+
/** @returns the baseline and local arrival cut captured synchronously together. */
|
|
33
|
+
snapshot(): {
|
|
34
|
+
baseline: SessionAssistantStreamBaseline;
|
|
35
|
+
ordinal: number;
|
|
36
|
+
};
|
|
37
|
+
/** @param ordinal - local snapshot cut set before queue consumption. */
|
|
38
|
+
setOrdinalCut(ordinal: number): void;
|
|
39
|
+
private transform;
|
|
40
|
+
[Symbol.dispose](): void;
|
|
41
|
+
}
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=assistant-stream.d.ts.map
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/** Assistant stream baselines and per-connection subscriptions. */
|
|
2
|
+
import { SessionSeq } from '@deepseek-ai/dsh-session';
|
|
3
|
+
import { SessionAssistantStreamAccumulator } from "../assistant-stream.js";
|
|
4
|
+
/** One accumulator per live Session, shared by every subscription bound to it. */
|
|
5
|
+
export class SessionAssistantStreamsListener {
|
|
6
|
+
ctx;
|
|
7
|
+
streams = new Map();
|
|
8
|
+
/** @param ctx - service context owning the accumulator listeners. */
|
|
9
|
+
constructor(ctx) {
|
|
10
|
+
this.ctx = ctx;
|
|
11
|
+
ctx.on('agent/assistant-stream', ({ agent, frame }) => {
|
|
12
|
+
let stream = this.streams.get(agent.session.id);
|
|
13
|
+
if (stream === undefined) {
|
|
14
|
+
stream = new SessionAssistantStreamAccumulator();
|
|
15
|
+
this.streams.set(agent.session.id, stream);
|
|
16
|
+
}
|
|
17
|
+
stream.accept(frame, agent.session.seq === 0 ? -1 : SessionSeq(agent.session.seq - 1));
|
|
18
|
+
}, { global: true });
|
|
19
|
+
ctx.on('agent/disposed', ({ agent }) => { this.streams.delete(agent.session.id); }, { global: true });
|
|
20
|
+
ctx.effect(() => () => { this.streams.clear(); }, 'session-controller.assistant-streams');
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Bind one connection to a Session assistant stream.
|
|
24
|
+
* @param sessionId - Session to subscribe.
|
|
25
|
+
* @param signal - cancellation owned by the caller.
|
|
26
|
+
* @param queue - caller-owned raw notification buffer.
|
|
27
|
+
* @returns a listener the caller disposes.
|
|
28
|
+
*/
|
|
29
|
+
bind(sessionId, signal, queue) {
|
|
30
|
+
return new AssistantStreamListener(this.ctx, sessionId, signal, () => {
|
|
31
|
+
return this.streams.get(sessionId)?.snapshot() ?? { revision: 0 };
|
|
32
|
+
}, queue);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/** Writes assistant notifications into the connection's shared queue. */
|
|
36
|
+
class AssistantStreamListener {
|
|
37
|
+
_snapshot;
|
|
38
|
+
disposes = [];
|
|
39
|
+
ordinal = 0;
|
|
40
|
+
cut = 0;
|
|
41
|
+
constructor(ctx, sessionId, signal, _snapshot, output) {
|
|
42
|
+
this._snapshot = _snapshot;
|
|
43
|
+
signal.throwIfAborted();
|
|
44
|
+
const input = output.createInput(item => this.transform(item));
|
|
45
|
+
try {
|
|
46
|
+
this.disposes.push(ctx.on('agent/assistant-stream', ({ agent, frame }) => {
|
|
47
|
+
if (agent.session.id !== sessionId)
|
|
48
|
+
return;
|
|
49
|
+
output.capture(() => {
|
|
50
|
+
const wire = frame.type === 'start'
|
|
51
|
+
? { ...frame, startedAfterSeq: agent.session.seq === 0 ? -1 : SessionSeq(agent.session.seq - 1) }
|
|
52
|
+
: frame.type === 'chunk' ? { ...frame, chunk: frame.chunk } : frame;
|
|
53
|
+
input.append({ type: 'assistant-stream', session: agent.session, frame: wire, ordinal: ++this.ordinal });
|
|
54
|
+
});
|
|
55
|
+
}, { global: true }));
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
this[Symbol.dispose]();
|
|
59
|
+
throw error;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/** @returns the baseline and local arrival cut captured synchronously together. */
|
|
63
|
+
snapshot() {
|
|
64
|
+
return { baseline: this._snapshot(), ordinal: this.ordinal };
|
|
65
|
+
}
|
|
66
|
+
/** @param ordinal - local snapshot cut set before queue consumption. */
|
|
67
|
+
setOrdinalCut(ordinal) {
|
|
68
|
+
this.cut = ordinal;
|
|
69
|
+
}
|
|
70
|
+
*transform(item) {
|
|
71
|
+
if (this.disposes.length === 0 || item.ordinal <= this.cut)
|
|
72
|
+
return;
|
|
73
|
+
yield { type: 'assistant-stream', frame: item.frame };
|
|
74
|
+
}
|
|
75
|
+
[Symbol.dispose]() {
|
|
76
|
+
for (const dispose of this.disposes.splice(0).reverse())
|
|
77
|
+
dispose();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=assistant-stream.js.map
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/** Independent Session snapshots and passive event subscriptions. */
|
|
2
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
3
|
+
import type { SessionId } from '@deepseek-ai/dsh-session';
|
|
4
|
+
import type { SessionObservation } from '@deepseek-ai/dsh-session-query';
|
|
5
|
+
import { SessionAssistantStreamsListener } from './assistant-stream.ts';
|
|
6
|
+
import type { SessionEventFrame, SessionEventsPage, SessionPageRequest, SessionObserveEventRequest, SessionProjectionsRequest, SessionProjectionFrame, SessionAddress, SessionProjectionBaseline, SessionProjectionsValue, SessionWaitOutput } from '../types.ts';
|
|
7
|
+
/** Session snapshots do not share lifetime with passive subscriptions. */
|
|
8
|
+
export declare class HistoryController {
|
|
9
|
+
private readonly ctx;
|
|
10
|
+
/** Reconnect state for this controller's assistant subscriptions. */
|
|
11
|
+
readonly streamsListener: SessionAssistantStreamsListener;
|
|
12
|
+
/** @param ctx - Host context carrying Session reads and projections. */
|
|
13
|
+
constructor(ctx: Context);
|
|
14
|
+
/**
|
|
15
|
+
* Read a passive page of Session events at an exact cut.
|
|
16
|
+
* @param request - Session identity and optional cut and page window.
|
|
17
|
+
* @param signal - read cancellation.
|
|
18
|
+
* @returns a page at the supplied cut, or the observed log end when omitted.
|
|
19
|
+
*/
|
|
20
|
+
events(request: SessionPageRequest, signal: AbortSignal): Promise<SessionEventsPage>;
|
|
21
|
+
/**
|
|
22
|
+
* Subscribe to Session events without reading or activating the Session.
|
|
23
|
+
* @param request - Session address to subscribe.
|
|
24
|
+
* @param signal - stream cancellation.
|
|
25
|
+
* @returns subscription readiness followed by event frames; readiness does not establish existence.
|
|
26
|
+
*/
|
|
27
|
+
observeEvent(request: SessionObserveEventRequest, signal: AbortSignal): AsyncIterable<SessionEventFrame>;
|
|
28
|
+
/**
|
|
29
|
+
* Read exact projections or migration cache hints without activating the Session.
|
|
30
|
+
* @param request - Session identity whose exact projection baseline is required.
|
|
31
|
+
* @param signal - read cancellation.
|
|
32
|
+
* @returns exact sequenced values, migration cache hints, or null when absent.
|
|
33
|
+
*/
|
|
34
|
+
projections(request: SessionProjectionsRequest, signal: AbortSignal): Promise<SessionProjectionsValue>;
|
|
35
|
+
/**
|
|
36
|
+
* Subscribe to projection changes without reading a baseline.
|
|
37
|
+
* @param request - Session identity to subscribe without reading a baseline.
|
|
38
|
+
* @param signal - stream cancellation.
|
|
39
|
+
* @returns readiness followed by one change frame per committed event, listing every key it changed.
|
|
40
|
+
*/
|
|
41
|
+
observeProjections(request: SessionProjectionsRequest, signal: AbortSignal): AsyncIterable<SessionProjectionFrame>;
|
|
42
|
+
/**
|
|
43
|
+
* Read bounded committed assistant messages through a stopping cursor.
|
|
44
|
+
* @param sessionId - Session whose committed assistant messages are requested.
|
|
45
|
+
* @param afterSeq - exclusive lower bound.
|
|
46
|
+
* @param throughSeq - inclusive stopping-state cursor.
|
|
47
|
+
* @param maxMessages - positive assistant record limit.
|
|
48
|
+
* @param signal - caller cancellation, independent of a completed wait deadline.
|
|
49
|
+
* @returns newest-first assistant messages and whether further matching records were omitted.
|
|
50
|
+
*/
|
|
51
|
+
assistantOutput(sessionId: SessionId, afterSeq: number, throughSeq: number, maxMessages: number, signal: AbortSignal): Promise<SessionWaitOutput>;
|
|
52
|
+
/**
|
|
53
|
+
* Acquire a read without activating a Session; projections are opt-in.
|
|
54
|
+
* @param request - Session identity and whether to compute projections.
|
|
55
|
+
* @param signal - read cancellation.
|
|
56
|
+
* @param callback - omitted to transfer lease ownership to the caller.
|
|
57
|
+
* @returns a lease the caller must dispose.
|
|
58
|
+
*/
|
|
59
|
+
usingObservation(request: {
|
|
60
|
+
readonly sessionId: SessionId;
|
|
61
|
+
readonly projection: boolean;
|
|
62
|
+
}, signal: AbortSignal, callback?: undefined): Promise<SessionObservation>;
|
|
63
|
+
/**
|
|
64
|
+
* Keep the borrowed lease alive until the callback settles, then dispose it.
|
|
65
|
+
* @param request - Session identity and whether to compute projections.
|
|
66
|
+
* @param signal - read cancellation.
|
|
67
|
+
* @param callback - synchronous or asynchronous computation; retain a separate lease if it must escape.
|
|
68
|
+
* @returns the callback result; read and callback failures propagate.
|
|
69
|
+
*/
|
|
70
|
+
usingObservation<T>(request: {
|
|
71
|
+
readonly sessionId: SessionId;
|
|
72
|
+
readonly projection: boolean;
|
|
73
|
+
}, signal: AbortSignal, callback: (observation: SessionObservation) => T): Promise<Awaited<T>>;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Validate an Address against the exact read used by a Controller.
|
|
77
|
+
* @param address - caller-supplied Session address.
|
|
78
|
+
* @param observation - borrowed read; subagent addresses require projections.
|
|
79
|
+
*/
|
|
80
|
+
export declare function validateObservationAddress(address: SessionAddress, observation: SessionObservation): void;
|
|
81
|
+
/**
|
|
82
|
+
* Convert a borrowed observation to one page without acquiring or retaining it.
|
|
83
|
+
* @param observation - exact read cut owned by the caller.
|
|
84
|
+
* @param request - validated page window and optional inclusive cut.
|
|
85
|
+
* @returns a chronological page at the requested cut.
|
|
86
|
+
*/
|
|
87
|
+
export declare function history(observation: SessionObservation, request: Omit<SessionPageRequest, 'address'> & {
|
|
88
|
+
readonly maxMessages: number;
|
|
89
|
+
}): SessionEventsPage;
|
|
90
|
+
/**
|
|
91
|
+
* Convert the projection baseline without acquiring or retaining its observation.
|
|
92
|
+
* @param observation - projected read cut owned by the caller.
|
|
93
|
+
* @returns the exact baseline; missing projection support fails explicitly.
|
|
94
|
+
*/
|
|
95
|
+
export declare function projections(observation: SessionObservation): SessionProjectionBaseline;
|
|
96
|
+
/**
|
|
97
|
+
* Validate and resolve the history page window.
|
|
98
|
+
* @param request - external history window.
|
|
99
|
+
* @returns the validated request with an explicit message budget.
|
|
100
|
+
*/
|
|
101
|
+
export declare function resolveHistoryRequest(request: SessionPageRequest): SessionPageRequest & {
|
|
102
|
+
readonly maxMessages: number;
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=controller.d.ts.map
|
package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/history/controller.js
ADDED
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
/** Independent Session snapshots and passive event subscriptions. */
|
|
2
|
+
var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
|
|
3
|
+
if (value !== null && value !== void 0) {
|
|
4
|
+
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
5
|
+
var dispose, inner;
|
|
6
|
+
if (async) {
|
|
7
|
+
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
8
|
+
dispose = value[Symbol.asyncDispose];
|
|
9
|
+
}
|
|
10
|
+
if (dispose === void 0) {
|
|
11
|
+
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
12
|
+
dispose = value[Symbol.dispose];
|
|
13
|
+
if (async) inner = dispose;
|
|
14
|
+
}
|
|
15
|
+
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
16
|
+
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
|
|
17
|
+
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
18
|
+
}
|
|
19
|
+
else if (async) {
|
|
20
|
+
env.stack.push({ async: true });
|
|
21
|
+
}
|
|
22
|
+
return value;
|
|
23
|
+
};
|
|
24
|
+
var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
|
|
25
|
+
return function (env) {
|
|
26
|
+
function fail(e) {
|
|
27
|
+
env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
28
|
+
env.hasError = true;
|
|
29
|
+
}
|
|
30
|
+
var r, s = 0;
|
|
31
|
+
function next() {
|
|
32
|
+
while (r = env.stack.pop()) {
|
|
33
|
+
try {
|
|
34
|
+
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
|
|
35
|
+
if (r.dispose) {
|
|
36
|
+
var result = r.dispose.call(r.value);
|
|
37
|
+
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
|
38
|
+
}
|
|
39
|
+
else s |= 1;
|
|
40
|
+
}
|
|
41
|
+
catch (e) {
|
|
42
|
+
fail(e);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
46
|
+
if (env.hasError) throw env.error;
|
|
47
|
+
}
|
|
48
|
+
return next();
|
|
49
|
+
};
|
|
50
|
+
})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
51
|
+
var e = new Error(message);
|
|
52
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
53
|
+
});
|
|
54
|
+
import { SessionLogOffset, SessionSeq, isAppendSurfaceEvent } from '@deepseek-ai/dsh-session';
|
|
55
|
+
import { RemoteError, remoteErrorOf } from '@deepseek-ai/dsh-typert-protocol';
|
|
56
|
+
import { DEFAULT_MAX_MESSAGES, paginate, pageRecords, entryFor, addressId, validateHistoryWindow, validateAddress, rejectNotFound, } from "../history.js";
|
|
57
|
+
import { EventListener, ProjectionListener } from "./listener.js";
|
|
58
|
+
import { SessionAssistantStreamsListener } from "./assistant-stream.js";
|
|
59
|
+
/** Session snapshots do not share lifetime with passive subscriptions. */
|
|
60
|
+
export class HistoryController {
|
|
61
|
+
ctx;
|
|
62
|
+
/** Reconnect state for this controller's assistant subscriptions. */
|
|
63
|
+
streamsListener;
|
|
64
|
+
/** @param ctx - Host context carrying Session reads and projections. */
|
|
65
|
+
constructor(ctx) {
|
|
66
|
+
this.ctx = ctx;
|
|
67
|
+
this.streamsListener = new SessionAssistantStreamsListener(this.ctx);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Read a passive page of Session events at an exact cut.
|
|
71
|
+
* @param request - Session identity and optional cut and page window.
|
|
72
|
+
* @param signal - read cancellation.
|
|
73
|
+
* @returns a page at the supplied cut, or the observed log end when omitted.
|
|
74
|
+
*/
|
|
75
|
+
async events(request, signal) {
|
|
76
|
+
const spec = resolveHistoryRequest(request);
|
|
77
|
+
try {
|
|
78
|
+
return await this.usingObservation({ sessionId: addressId(request.address), projection: request.address.kind === 'subagent' }, signal, (observation) => {
|
|
79
|
+
validateObservationAddress(request.address, observation);
|
|
80
|
+
return history(observation, spec);
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
catch (error) {
|
|
84
|
+
if (remoteErrorOf(error)?.code === 'session/not-found')
|
|
85
|
+
rejectNotFound(request.address);
|
|
86
|
+
throw error;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Subscribe to Session events without reading or activating the Session.
|
|
91
|
+
* @param request - Session address to subscribe.
|
|
92
|
+
* @param signal - stream cancellation.
|
|
93
|
+
* @returns subscription readiness followed by event frames; readiness does not establish existence.
|
|
94
|
+
*/
|
|
95
|
+
async *observeEvent(request, signal) {
|
|
96
|
+
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
97
|
+
try {
|
|
98
|
+
const listener = __addDisposableResource(env_1, new EventListener(this.ctx, addressId(request.address), signal), false);
|
|
99
|
+
yield { type: 'ready' };
|
|
100
|
+
yield* listener.events();
|
|
101
|
+
}
|
|
102
|
+
catch (e_1) {
|
|
103
|
+
env_1.error = e_1;
|
|
104
|
+
env_1.hasError = true;
|
|
105
|
+
}
|
|
106
|
+
finally {
|
|
107
|
+
__disposeResources(env_1);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Read exact projections or migration cache hints without activating the Session.
|
|
112
|
+
* @param request - Session identity whose exact projection baseline is required.
|
|
113
|
+
* @param signal - read cancellation.
|
|
114
|
+
* @returns exact sequenced values, migration cache hints, or null when absent.
|
|
115
|
+
*/
|
|
116
|
+
async projections(request, signal) {
|
|
117
|
+
const { sessionId } = request;
|
|
118
|
+
if (sessionId.length === 0) {
|
|
119
|
+
throw new RemoteError('gateway/bad-request', 'sessionId must not be empty', {});
|
|
120
|
+
}
|
|
121
|
+
try {
|
|
122
|
+
signal.throwIfAborted();
|
|
123
|
+
const live = this.ctx.sessions.get(sessionId);
|
|
124
|
+
if (live !== undefined) {
|
|
125
|
+
const snapshot = this.ctx.sessionProjections.snapshot(live);
|
|
126
|
+
return { kind: 'sequenced', asOfSeq: snapshot.asOfSeq, values: snapshot.values };
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
const stored = await this.ctx.get('sessionPersistence')?.stat(sessionId, { signal });
|
|
130
|
+
signal.throwIfAborted();
|
|
131
|
+
if (stored?.formatStatus === 'migration-required') {
|
|
132
|
+
const cached = await this.ctx.get('sessionProjectionCache')?.cachedSnapshot(stored.header);
|
|
133
|
+
return { kind: 'migration-required', values: { ...cached?.values } };
|
|
134
|
+
}
|
|
135
|
+
return await this.usingObservation({ sessionId: request.sessionId, projection: true }, signal, observation => ({
|
|
136
|
+
kind: 'sequenced',
|
|
137
|
+
...projections(observation),
|
|
138
|
+
}));
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
catch (error) {
|
|
142
|
+
const code = typeof error === 'object' && error !== null && 'code' in error ? error.code : undefined;
|
|
143
|
+
if (code === 'SESSION_QUERY_SESSION_NOT_FOUND' || code === 'session/not-found') {
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
if (signal.aborted || code === 'SESSION_QUERY_ABORTED') {
|
|
147
|
+
throw new RemoteError('gateway/cancelled', 'Session projection read was cancelled', {}, { cause: error });
|
|
148
|
+
}
|
|
149
|
+
if (remoteErrorOf(error) !== undefined)
|
|
150
|
+
throw error;
|
|
151
|
+
throw new RemoteError('gateway/internal', 'Session projection read failed', {}, { cause: error });
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Subscribe to projection changes without reading a baseline.
|
|
156
|
+
* @param request - Session identity to subscribe without reading a baseline.
|
|
157
|
+
* @param signal - stream cancellation.
|
|
158
|
+
* @returns readiness followed by one change frame per committed event, listing every key it changed.
|
|
159
|
+
*/
|
|
160
|
+
async *observeProjections(request, signal) {
|
|
161
|
+
const env_2 = { stack: [], error: void 0, hasError: false };
|
|
162
|
+
try {
|
|
163
|
+
const listener = __addDisposableResource(env_2, new ProjectionListener(this.ctx, request.sessionId, signal), false);
|
|
164
|
+
yield { type: 'ready' };
|
|
165
|
+
yield* listener.changes();
|
|
166
|
+
}
|
|
167
|
+
catch (e_2) {
|
|
168
|
+
env_2.error = e_2;
|
|
169
|
+
env_2.hasError = true;
|
|
170
|
+
}
|
|
171
|
+
finally {
|
|
172
|
+
__disposeResources(env_2);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Read bounded committed assistant messages through a stopping cursor.
|
|
177
|
+
* @param sessionId - Session whose committed assistant messages are requested.
|
|
178
|
+
* @param afterSeq - exclusive lower bound.
|
|
179
|
+
* @param throughSeq - inclusive stopping-state cursor.
|
|
180
|
+
* @param maxMessages - positive assistant record limit.
|
|
181
|
+
* @param signal - caller cancellation, independent of a completed wait deadline.
|
|
182
|
+
* @returns newest-first assistant messages and whether further matching records were omitted.
|
|
183
|
+
*/
|
|
184
|
+
async assistantOutput(sessionId, afterSeq, throughSeq, maxMessages, signal) {
|
|
185
|
+
return this.usingObservation({ sessionId, projection: false }, signal, (observation) => {
|
|
186
|
+
if (throughSeq > observation.cursor) {
|
|
187
|
+
throw new RemoteError('gateway/internal', 'Session history no longer covers the wait cursor', {});
|
|
188
|
+
}
|
|
189
|
+
const records = [];
|
|
190
|
+
const events = observation.events;
|
|
191
|
+
for (let index = throughSeq; index > afterSeq; index--) {
|
|
192
|
+
const event = events[index];
|
|
193
|
+
if (event.type !== 'assistant/message' || !isAppendSurfaceEvent(event))
|
|
194
|
+
continue;
|
|
195
|
+
if (records.length === maxMessages)
|
|
196
|
+
return { records, truncated: true };
|
|
197
|
+
records.push(entryFor(event));
|
|
198
|
+
}
|
|
199
|
+
return { records, truncated: false };
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
async usingObservation({ sessionId, projection }, signal, callback) {
|
|
203
|
+
const env_3 = { stack: [], error: void 0, hasError: false };
|
|
204
|
+
try {
|
|
205
|
+
let observation;
|
|
206
|
+
try {
|
|
207
|
+
observation = await this.ctx.sessionQuery.observeSession(sessionId, { signal, projectionMode: projection ? 'all' : 'none' });
|
|
208
|
+
}
|
|
209
|
+
catch (error) {
|
|
210
|
+
const code = error?.code;
|
|
211
|
+
if (code === 'SESSION_QUERY_SESSION_NOT_FOUND') {
|
|
212
|
+
throw new RemoteError('session/not-found', `session "${sessionId}" not found`, { sessionId });
|
|
213
|
+
}
|
|
214
|
+
if (code === 'SESSION_QUERY_ABORTED') {
|
|
215
|
+
// Keep the query's own message: cancellation detail was visible before this mapping.
|
|
216
|
+
throw new RemoteError('gateway/cancelled', error instanceof Error ? error.message : 'Session read was cancelled', {}, { cause: error });
|
|
217
|
+
}
|
|
218
|
+
throw error;
|
|
219
|
+
}
|
|
220
|
+
try {
|
|
221
|
+
signal.throwIfAborted();
|
|
222
|
+
}
|
|
223
|
+
catch (error) {
|
|
224
|
+
observation[Symbol.dispose]();
|
|
225
|
+
throw error;
|
|
226
|
+
}
|
|
227
|
+
if (callback === undefined)
|
|
228
|
+
return observation;
|
|
229
|
+
const ownedObservation = __addDisposableResource(env_3, observation, false);
|
|
230
|
+
return await callback(ownedObservation);
|
|
231
|
+
}
|
|
232
|
+
catch (e_3) {
|
|
233
|
+
env_3.error = e_3;
|
|
234
|
+
env_3.hasError = true;
|
|
235
|
+
}
|
|
236
|
+
finally {
|
|
237
|
+
__disposeResources(env_3);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Validate an Address against the exact read used by a Controller.
|
|
243
|
+
* @param address - caller-supplied Session address.
|
|
244
|
+
* @param observation - borrowed read; subagent addresses require projections.
|
|
245
|
+
*/
|
|
246
|
+
export function validateObservationAddress(address, observation) {
|
|
247
|
+
if (observation.header.cwd === undefined)
|
|
248
|
+
rejectNotFound(address);
|
|
249
|
+
validateAddress(address, observation.header, observation.inheritedEventCount, observation.projections);
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Convert a borrowed observation to one page without acquiring or retaining it.
|
|
253
|
+
* @param observation - exact read cut owned by the caller.
|
|
254
|
+
* @param request - validated page window and optional inclusive cut.
|
|
255
|
+
* @returns a chronological page at the requested cut.
|
|
256
|
+
*/
|
|
257
|
+
export function history(observation, request) {
|
|
258
|
+
const cursor = request.throughSeq === undefined ? observation.cursor
|
|
259
|
+
: request.throughSeq === -1 ? -1 : SessionSeq(request.throughSeq);
|
|
260
|
+
if (cursor > observation.cursor) {
|
|
261
|
+
throw new RemoteError('gateway/bad-request', `session history cut ${String(cursor)} exceeds ${String(observation.cursor)}`, {});
|
|
262
|
+
}
|
|
263
|
+
const page = paginate(observation.events, request.beforeSeq === undefined ? undefined : SessionLogOffset(request.beforeSeq), request.maxMessages, cursor, request.turnWindow);
|
|
264
|
+
return { cursor, records: pageRecords(page.events), hasMore: page.hasMore };
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Convert the projection baseline without acquiring or retaining its observation.
|
|
268
|
+
* @param observation - projected read cut owned by the caller.
|
|
269
|
+
* @returns the exact baseline; missing projection support fails explicitly.
|
|
270
|
+
*/
|
|
271
|
+
export function projections(observation) {
|
|
272
|
+
const snapshot = observation.projections;
|
|
273
|
+
if (snapshot === undefined)
|
|
274
|
+
throw new RemoteError('session/projections-unavailable', 'Session projections are unavailable', {});
|
|
275
|
+
return { asOfSeq: snapshot.asOfSeq, values: snapshot.values };
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Validate and resolve the history page window.
|
|
279
|
+
* @param request - external history window.
|
|
280
|
+
* @returns the validated request with an explicit message budget.
|
|
281
|
+
*/
|
|
282
|
+
export function resolveHistoryRequest(request) {
|
|
283
|
+
if (request.throughSeq !== undefined
|
|
284
|
+
&& (!Number.isSafeInteger(request.throughSeq) || request.throughSeq < -1 || Object.is(request.throughSeq, -0))) {
|
|
285
|
+
throw new RemoteError('gateway/bad-request', 'throughSeq must be an integer greater than or equal to -1', {});
|
|
286
|
+
}
|
|
287
|
+
if (request.beforeSeq !== undefined
|
|
288
|
+
&& (!Number.isSafeInteger(request.beforeSeq) || request.beforeSeq < 0 || Object.is(request.beforeSeq, -0))) {
|
|
289
|
+
throw new RemoteError('gateway/bad-request', 'beforeSeq must be a non-negative safe integer', {});
|
|
290
|
+
}
|
|
291
|
+
validateHistoryWindow(request);
|
|
292
|
+
return { ...request, maxMessages: request.maxMessages ?? DEFAULT_MAX_MESSAGES };
|
|
293
|
+
}
|
|
294
|
+
//# sourceMappingURL=controller.js.map
|