@chatcode/chatcode-cli 3.0.5 → 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 +25 -25
- 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
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/** Portable task, child-session and partial tool projections for desktop hosts. */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Read task-list replacements and parent-owned child identities.
|
|
5
|
+
* @param frame - one public Session follow frame.
|
|
6
|
+
* @returns independent presentation updates; snapshots replace the loaded values.
|
|
7
|
+
*/
|
|
8
|
+
export function readSessionActivity(frame) {
|
|
9
|
+
const output = []
|
|
10
|
+
const todos = value => {
|
|
11
|
+
if (!Array.isArray(value)) throw new TypeError('Invalid todo list')
|
|
12
|
+
return value.map(row => {
|
|
13
|
+
if (typeof row?.content !== 'string' || !['pending', 'in_progress', 'completed'].includes(row.status))
|
|
14
|
+
throw new TypeError('Invalid todo')
|
|
15
|
+
return { content: row.content, status: row.status }
|
|
16
|
+
})
|
|
17
|
+
}
|
|
18
|
+
const catalog = value => {
|
|
19
|
+
if (!Array.isArray(value)) throw new TypeError('Invalid child catalog')
|
|
20
|
+
return value.map(row => {
|
|
21
|
+
if (typeof row?.id !== 'string' || !['one-shot', 'continuable', 'unknown'].includes(row.mode))
|
|
22
|
+
throw new TypeError('Invalid child Session')
|
|
23
|
+
return { id: row.id, mode: row.mode, ...(typeof row.label === 'string' ? { label: row.label } : {}) }
|
|
24
|
+
})
|
|
25
|
+
}
|
|
26
|
+
if (frame.type === 'snapshot') {
|
|
27
|
+
const values = frame.projections?.values
|
|
28
|
+
if (values?.todos !== undefined) output.push({ type: 'todos', items: values.todos === null ? [] : todos(values.todos) })
|
|
29
|
+
if (values?.subagentCatalog !== undefined)
|
|
30
|
+
output.push({ type: 'children', items: values.subagentCatalog === null ? [] : catalog(values.subagentCatalog), replace: true })
|
|
31
|
+
} else if (frame.type === 'event') {
|
|
32
|
+
const { type, data } = frame.event
|
|
33
|
+
if (type === 'todo/write') output.push({ type: 'todos', items: todos(data.todos) })
|
|
34
|
+
if (type === 'subagent/catalog')
|
|
35
|
+
output.push({ type: 'children', items: catalog([{ id: data.childId, mode: data.mode, label: data.label }]), replace: false })
|
|
36
|
+
}
|
|
37
|
+
return output
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Restore tool preparation without treating partial arguments as executable JSON.
|
|
42
|
+
* @param stream - compact assistant records from the public Session protocol.
|
|
43
|
+
* @returns ordered tool argument fragments coalesced by call identity.
|
|
44
|
+
*/
|
|
45
|
+
export function readAssistantToolCalls(stream) {
|
|
46
|
+
if (!Array.isArray(stream)) throw new TypeError('Assistant stream must be an array')
|
|
47
|
+
const calls = new Map()
|
|
48
|
+
const append = (id, name, text) => {
|
|
49
|
+
if (typeof id !== 'string' || typeof text !== 'string' || (name !== undefined && typeof name !== 'string'))
|
|
50
|
+
throw new TypeError('Invalid tool input fragment')
|
|
51
|
+
const call = calls.get(id) ?? { id, arguments: '' }
|
|
52
|
+
if (name !== undefined) call.name = name
|
|
53
|
+
call.arguments += text
|
|
54
|
+
calls.set(id, call)
|
|
55
|
+
}
|
|
56
|
+
for (const record of stream) {
|
|
57
|
+
if (record?.type === 'tool-call-chunks') {
|
|
58
|
+
if (!Array.isArray(record.args)) throw new TypeError('Invalid tool input run')
|
|
59
|
+
for (const text of record.args) append(record.id, record.name, text)
|
|
60
|
+
} else if (record?.type === 'chunk' && record.chunk?.type === 'tool-call-delta') {
|
|
61
|
+
append(record.chunk.id, record.chunk.name, record.chunk.argumentsDelta)
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return [...calls.values()]
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Read current-version compact assistant body text without reasoning or tool arguments.
|
|
69
|
+
* @param stream - Compact assistant stream from a snapshot or durable message.
|
|
70
|
+
* @returns Body blocks ordered by their content-block index.
|
|
71
|
+
*/
|
|
72
|
+
export function readAssistantText(stream) {
|
|
73
|
+
if (!Array.isArray(stream)) throw new TypeError('Assistant stream must be an array')
|
|
74
|
+
const blocks = new Map()
|
|
75
|
+
const append = (index, text) => {
|
|
76
|
+
if (!Number.isSafeInteger(index) || index < 0 || typeof text !== 'string') throw new TypeError('Invalid assistant text fragment')
|
|
77
|
+
blocks.set(index, (blocks.get(index) ?? '') + text)
|
|
78
|
+
}
|
|
79
|
+
for (const record of stream) {
|
|
80
|
+
if (!record || typeof record !== 'object') throw new TypeError('Invalid assistant record')
|
|
81
|
+
switch (record.type) {
|
|
82
|
+
case 'text-chunks':
|
|
83
|
+
if (!Array.isArray(record.texts)) throw new TypeError('Invalid assistant text run')
|
|
84
|
+
for (const text of record.texts) append(record.index, text)
|
|
85
|
+
break
|
|
86
|
+
case 'reasoning-chunks':
|
|
87
|
+
case 'tool-call-chunks':
|
|
88
|
+
break
|
|
89
|
+
case 'chunk':
|
|
90
|
+
if (record.chunk?.type === 'text-delta') append(record.chunk.index, record.chunk.text)
|
|
91
|
+
break
|
|
92
|
+
default: throw new TypeError('Unknown compact assistant record')
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return [...blocks].sort(([a], [b]) => a - b).map(([index, text]) => ({ index, text }))
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
/** Restore separately typed body and model-supplied reasoning from compact streams. */
|
|
100
|
+
export function readAssistantContent(stream) {
|
|
101
|
+
if (!Array.isArray(stream)) throw new TypeError('Assistant stream must be an array')
|
|
102
|
+
const blocks = new Map()
|
|
103
|
+
const append = (kind, index, text) => {
|
|
104
|
+
if (!Number.isSafeInteger(index) || index < 0 || typeof text !== 'string') throw new TypeError('Invalid assistant fragment')
|
|
105
|
+
const key = `${kind}:${index}`
|
|
106
|
+
const block = blocks.get(key) ?? { kind, index, text: '' }
|
|
107
|
+
block.text += text
|
|
108
|
+
blocks.set(key, block)
|
|
109
|
+
}
|
|
110
|
+
for (const record of stream) {
|
|
111
|
+
if (record?.type === 'text-chunks' || record?.type === 'reasoning-chunks') {
|
|
112
|
+
if (!Array.isArray(record.texts)) throw new TypeError('Invalid assistant run')
|
|
113
|
+
for (const text of record.texts) append(record.type === 'text-chunks' ? 'text' : 'reasoning', record.index, text)
|
|
114
|
+
} else if (record?.type === 'chunk') {
|
|
115
|
+
const chunk = record.chunk
|
|
116
|
+
if (chunk?.type === 'text-delta' || chunk?.type === 'reasoning-delta')
|
|
117
|
+
append(chunk.type === 'text-delta' ? 'text' : 'reasoning', chunk.index, chunk.text)
|
|
118
|
+
} else if (record?.type !== 'tool-call-chunks') throw new TypeError('Unknown assistant record')
|
|
119
|
+
}
|
|
120
|
+
return [...blocks.values()].sort((a, b) => a.index - b.index)
|
|
121
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/** Workspace membership and chronological Session navigation independent of host UI. */
|
|
2
|
+
function invalid(message) {
|
|
3
|
+
throw Object.assign(new TypeError(message), { code: 'runtime/protocol' })
|
|
4
|
+
}
|
|
5
|
+
function record(value) {
|
|
6
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) invalid('Expected a browser record')
|
|
7
|
+
return value
|
|
8
|
+
}
|
|
9
|
+
function string(value) {
|
|
10
|
+
if (typeof value !== 'string' || !value) invalid('Expected a browser identity')
|
|
11
|
+
return value
|
|
12
|
+
}
|
|
13
|
+
function timestamp(value) {
|
|
14
|
+
const time = typeof value === 'string' ? Date.parse(value) : value
|
|
15
|
+
if (!Number.isFinite(time) || time < 0) invalid('Invalid browser timestamp')
|
|
16
|
+
return time
|
|
17
|
+
}
|
|
18
|
+
function ids(value) {
|
|
19
|
+
if (!Array.isArray(value)) invalid('Expected Session identities')
|
|
20
|
+
return value.map(string)
|
|
21
|
+
}
|
|
22
|
+
/** Validate the Workspace generation baseline without converting membership into cwd guesses. */
|
|
23
|
+
export function readWorkspaceBaseline(value) {
|
|
24
|
+
const baseline = record(value)
|
|
25
|
+
if (!Array.isArray(baseline.items)) invalid('Expected Workspace items')
|
|
26
|
+
return {
|
|
27
|
+
items: baseline.items.map((raw) => {
|
|
28
|
+
const row = record(raw)
|
|
29
|
+
return {
|
|
30
|
+
workspaceId: string(row.workspaceId),
|
|
31
|
+
path: string(row.path),
|
|
32
|
+
title: string(row.title),
|
|
33
|
+
sessionIds: ids(row.sessionIds),
|
|
34
|
+
createdAt: timestamp(row.createdAt),
|
|
35
|
+
updatedAt: timestamp(row.updatedAt)
|
|
36
|
+
}
|
|
37
|
+
}),
|
|
38
|
+
archivedSessionIds: ids(baseline.archivedSessionIds),
|
|
39
|
+
pinnedSessionIds: ids(baseline.pinnedSessionIds)
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/** Validate Session summaries returned by the public cold-safe Session list. */
|
|
43
|
+
export function readSessionSummaries(value) {
|
|
44
|
+
const listing = record(value)
|
|
45
|
+
if (!Array.isArray(listing.items)) invalid('Expected Session items')
|
|
46
|
+
return listing.items.map((raw) => {
|
|
47
|
+
const row = record(raw)
|
|
48
|
+
for (const key of ['agentAvailable', 'running', 'blank'])
|
|
49
|
+
if (typeof row[key] !== 'boolean') invalid(`Invalid Session ${key}`)
|
|
50
|
+
if (row.origin !== undefined && row.origin !== 'subagent') invalid('Invalid Session origin')
|
|
51
|
+
const title = row.projections?.values?.title
|
|
52
|
+
if (title !== undefined && title !== null && typeof title !== 'string') invalid('Invalid Session title')
|
|
53
|
+
return {
|
|
54
|
+
sessionId: string(row.sessionId),
|
|
55
|
+
title: title ?? null,
|
|
56
|
+
updatedAt: timestamp(row.updatedAt),
|
|
57
|
+
agentAvailable: row.agentAvailable,
|
|
58
|
+
running: row.running,
|
|
59
|
+
blank: row.blank,
|
|
60
|
+
...(row.cwd === undefined ? {} : { cwd: string(row.cwd) }),
|
|
61
|
+
...(row.origin === undefined ? {} : { origin: row.origin }),
|
|
62
|
+
...(row.parentSessionId === undefined ? {} : { parentSessionId: string(row.parentSessionId) })
|
|
63
|
+
}
|
|
64
|
+
})
|
|
65
|
+
}
|
|
66
|
+
/** Most recent first by default, with identity ties independent of locale. */
|
|
67
|
+
export function chronological(items, order, identity, time) {
|
|
68
|
+
if (order !== 'asc' && order !== 'desc') throw new TypeError('order must be asc or desc')
|
|
69
|
+
return [...items].sort(
|
|
70
|
+
(a, b) =>
|
|
71
|
+
(order === 'desc' ? time(b) - time(a) : time(a) - time(b)) ||
|
|
72
|
+
(identity(a) < identity(b) ? -1 : identity(a) > identity(b) ? 1 : 0)
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
/** Build detached workspace groups while preserving unassigned ordinary Sessions. */
|
|
76
|
+
export function workspaceSessionTree(baseline, summaries, options = {}) {
|
|
77
|
+
const order = options.order ?? 'desc'
|
|
78
|
+
const archived = new Set(baseline.archivedSessionIds),
|
|
79
|
+
pinned = new Set(baseline.pinnedSessionIds)
|
|
80
|
+
const rows = summaries
|
|
81
|
+
.filter(
|
|
82
|
+
(row) =>
|
|
83
|
+
(options.includeSubagents || row.origin !== 'subagent') &&
|
|
84
|
+
(options.includeArchived || !archived.has(row.sessionId))
|
|
85
|
+
)
|
|
86
|
+
.map((row) => ({ ...row, archived: archived.has(row.sessionId), pinned: pinned.has(row.sessionId) }))
|
|
87
|
+
const byId = new Map(rows.map((row) => [row.sessionId, row])),
|
|
88
|
+
assigned = new Set()
|
|
89
|
+
const groups = baseline.items.map((workspace) => {
|
|
90
|
+
const sessions = chronological(
|
|
91
|
+
workspace.sessionIds.flatMap((id) => {
|
|
92
|
+
const row = byId.get(id)
|
|
93
|
+
if (!row) return []
|
|
94
|
+
assigned.add(id)
|
|
95
|
+
return [row]
|
|
96
|
+
}),
|
|
97
|
+
order,
|
|
98
|
+
(row) => row.sessionId,
|
|
99
|
+
(row) => row.updatedAt
|
|
100
|
+
)
|
|
101
|
+
return {
|
|
102
|
+
...workspace,
|
|
103
|
+
sessionIds: [...workspace.sessionIds],
|
|
104
|
+
sessions,
|
|
105
|
+
lastActivityAt: sessions.reduce((time, row) => Math.max(time, row.updatedAt), workspace.updatedAt)
|
|
106
|
+
}
|
|
107
|
+
})
|
|
108
|
+
return {
|
|
109
|
+
items: chronological(
|
|
110
|
+
groups,
|
|
111
|
+
order,
|
|
112
|
+
(row) => row.workspaceId,
|
|
113
|
+
(row) => row.lastActivityAt
|
|
114
|
+
),
|
|
115
|
+
unassignedSessions: chronological(
|
|
116
|
+
rows.filter((row) => !assigned.has(row.sessionId)),
|
|
117
|
+
order,
|
|
118
|
+
(row) => row.sessionId,
|
|
119
|
+
(row) => row.updatedAt
|
|
120
|
+
)
|
|
121
|
+
}
|
|
122
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/** Optional JSON-RPC 2.0 JSONL carrier for desktops whose extensions launch external programs. */
|
|
2
|
+
import { readFile } from 'node:fs/promises'
|
|
3
|
+
import { createInterface } from 'node:readline'
|
|
4
|
+
import { RuntimeConnector } from './runtime-connector.mjs'
|
|
5
|
+
|
|
6
|
+
if (!process.argv[2]) throw new Error('Pass the absolute connector configuration JSON path')
|
|
7
|
+
const options = JSON.parse(await readFile(process.argv[2], 'utf8'))
|
|
8
|
+
const input = createInterface({ input: process.stdin, crlfDelay: Infinity })
|
|
9
|
+
const ended = Promise.withResolvers()
|
|
10
|
+
const active = new Set()
|
|
11
|
+
const subscriptions = new Map()
|
|
12
|
+
const send = value => process.stdout.write(JSON.stringify({ jsonrpc: '2.0', ...value }) + '\n')
|
|
13
|
+
const notify = (method, params) => send({ method, params })
|
|
14
|
+
const connector = new RuntimeConnector({
|
|
15
|
+
...options,
|
|
16
|
+
onState: state => notify('runtime.state', {
|
|
17
|
+
type: state.type,
|
|
18
|
+
...(state.error ? { error: { code: state.error.code, message: state.error.message } } : {}),
|
|
19
|
+
}),
|
|
20
|
+
})
|
|
21
|
+
process.stdout.on('error', error => {
|
|
22
|
+
// The parent can disappear before the connector's final notifications drain.
|
|
23
|
+
if (error.code !== 'EPIPE') console.error(error)
|
|
24
|
+
input.close()
|
|
25
|
+
})
|
|
26
|
+
input.once('close', ended.resolve)
|
|
27
|
+
process.once('SIGTERM', () => input.close())
|
|
28
|
+
process.once('SIGINT', () => input.close())
|
|
29
|
+
|
|
30
|
+
async function dispatch(method, params) {
|
|
31
|
+
switch (method) {
|
|
32
|
+
case 'runtime.start': await connector.start(); return { ready: true }
|
|
33
|
+
case 'runtime.reconnect': await connector.reconnect(); return { ready: true }
|
|
34
|
+
case 'runtime.close': await connector.close(); return { closed: true }
|
|
35
|
+
case 'workspace.create': return await connector.createWorkspace(params)
|
|
36
|
+
case 'workspace.list': return await connector.listWorkspaces(params)
|
|
37
|
+
case 'workspace.sessions': return await connector.listWorkspaceSessions(params)
|
|
38
|
+
case 'session.list': return await connector.listSessions(params)
|
|
39
|
+
case 'session.resume': return await connector.resumeSession(params)
|
|
40
|
+
case 'session.create': return await connector.createSession(params)
|
|
41
|
+
case 'session.prompt': return await connector.prompt(params)
|
|
42
|
+
case 'session.cancel': return await connector.cancel(params.sessionId)
|
|
43
|
+
case 'session.page': return await connector.page(params)
|
|
44
|
+
case 'session.follow': {
|
|
45
|
+
if (subscriptions.has(params.sessionId)) throw Object.assign(new Error('Session is already subscribed'), { rpcCode: -32602 })
|
|
46
|
+
const slot = { controller: new AbortController(), unsubscribe: undefined }
|
|
47
|
+
subscriptions.set(params.sessionId, slot)
|
|
48
|
+
try {
|
|
49
|
+
const unsubscribe = await connector.follow(params.sessionId,
|
|
50
|
+
frame => {
|
|
51
|
+
if (subscriptions.get(params.sessionId) === slot) notify('session.frame', { sessionId: params.sessionId, frame })
|
|
52
|
+
},
|
|
53
|
+
error => {
|
|
54
|
+
if (subscriptions.get(params.sessionId) === slot) subscriptions.delete(params.sessionId)
|
|
55
|
+
notify('session.failure', { sessionId: params.sessionId, code: error.code, message: error.message })
|
|
56
|
+
}, slot.controller.signal)
|
|
57
|
+
if (subscriptions.get(params.sessionId) === slot) slot.unsubscribe = unsubscribe
|
|
58
|
+
else unsubscribe()
|
|
59
|
+
return { subscribed: true }
|
|
60
|
+
} catch (error) {
|
|
61
|
+
if (subscriptions.get(params.sessionId) === slot) subscriptions.delete(params.sessionId)
|
|
62
|
+
throw error
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
case 'session.unfollow': {
|
|
66
|
+
const slot = subscriptions.get(params.sessionId)
|
|
67
|
+
subscriptions.delete(params.sessionId)
|
|
68
|
+
slot?.controller.abort()
|
|
69
|
+
slot?.unsubscribe?.()
|
|
70
|
+
return { subscribed: false }
|
|
71
|
+
}
|
|
72
|
+
default: throw Object.assign(new Error(`Unsupported method: ${method}`), { rpcCode: -32601 })
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
async function handle(line) {
|
|
77
|
+
let message
|
|
78
|
+
try { message = JSON.parse(line) }
|
|
79
|
+
catch { send({ id: null, error: { code: -32700, message: 'Invalid JSON' } }); return }
|
|
80
|
+
if (message?.jsonrpc !== '2.0' || typeof message.id !== 'string' || typeof message.method !== 'string'
|
|
81
|
+
|| message.params === null || typeof message.params !== 'object' || Array.isArray(message.params)) {
|
|
82
|
+
send({ id: null, error: { code: -32600, message: 'Expected one request with a string id and object params' } })
|
|
83
|
+
return
|
|
84
|
+
}
|
|
85
|
+
try {
|
|
86
|
+
const result = await dispatch(message.method, message.params)
|
|
87
|
+
send({ id: message.id, result })
|
|
88
|
+
if (message.method === 'runtime.close') input.close()
|
|
89
|
+
} catch (error) {
|
|
90
|
+
send({ id: message.id, error: { code: error.rpcCode ?? -32000, message: error.message,
|
|
91
|
+
...(error.code ? { data: { runtimeCode: error.code, details: error.details } } : {}) } })
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
input.on('line', line => {
|
|
95
|
+
const task = handle(line).catch(error => { console.error(error); input.close() })
|
|
96
|
+
active.add(task)
|
|
97
|
+
void task.finally(() => active.delete(task))
|
|
98
|
+
})
|
|
99
|
+
try { await ended.promise }
|
|
100
|
+
finally {
|
|
101
|
+
await connector.close()
|
|
102
|
+
await Promise.allSettled(active)
|
|
103
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/** UI-independent normalization for Runtime user-questions interactions. */
|
|
2
|
+
function invalid(message) {
|
|
3
|
+
throw Object.assign(new TypeError(message), { code: 'interaction/invalid-questions' })
|
|
4
|
+
}
|
|
5
|
+
function record(value) {
|
|
6
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) invalid('Expected a question object')
|
|
7
|
+
return value
|
|
8
|
+
}
|
|
9
|
+
function text(value) {
|
|
10
|
+
if (typeof value !== 'string' || !value.trim()) invalid('Expected nonempty question text')
|
|
11
|
+
return value
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Read the native question request, retaining stable IDs and optional free-text questions.
|
|
16
|
+
* @param request - Runtime user-questions/request payload.
|
|
17
|
+
* @returns Normalized questions without UI-specific option or batch limits.
|
|
18
|
+
*/
|
|
19
|
+
export function readUserQuestions(request) {
|
|
20
|
+
const questions = record(request).questions
|
|
21
|
+
if (!Array.isArray(questions) || !questions.length) invalid('Expected at least one question')
|
|
22
|
+
const ids = new Set()
|
|
23
|
+
return questions.map((raw) => {
|
|
24
|
+
const question = record(raw)
|
|
25
|
+
const id = text(question.id)
|
|
26
|
+
if (ids.has(id)) invalid('Duplicate question ID')
|
|
27
|
+
ids.add(id)
|
|
28
|
+
if (question.options !== undefined && !Array.isArray(question.options)) invalid('Invalid question options')
|
|
29
|
+
const options = (question.options ?? []).map((raw) => {
|
|
30
|
+
const option = record(raw)
|
|
31
|
+
if (option.description !== undefined && typeof option.description !== 'string')
|
|
32
|
+
invalid('Invalid option description')
|
|
33
|
+
return {
|
|
34
|
+
label: text(option.label),
|
|
35
|
+
...(option.description === undefined ? {} : { description: option.description })
|
|
36
|
+
}
|
|
37
|
+
})
|
|
38
|
+
if (new Set(options.map((option) => option.label)).size !== options.length) invalid('Duplicate option label')
|
|
39
|
+
for (const key of ['header', 'detail'])
|
|
40
|
+
if (question[key] !== undefined && typeof question[key] !== 'string') invalid(`Invalid question ${key}`)
|
|
41
|
+
if (question.multiSelect !== undefined && typeof question.multiSelect !== 'boolean') invalid('Invalid multiSelect')
|
|
42
|
+
const result = {
|
|
43
|
+
id,
|
|
44
|
+
question: text(question.question),
|
|
45
|
+
options,
|
|
46
|
+
multiSelect: question.multiSelect ?? false,
|
|
47
|
+
...(question.header === undefined ? {} : { header: question.header }),
|
|
48
|
+
...(question.detail === undefined ? {} : { detail: question.detail })
|
|
49
|
+
}
|
|
50
|
+
if (question.intent !== undefined) {
|
|
51
|
+
const intent = record(question.intent)
|
|
52
|
+
if (
|
|
53
|
+
intent.kind !== 'plan-review' ||
|
|
54
|
+
!options.some((option) => option.label === intent.approve) ||
|
|
55
|
+
question.detail === undefined
|
|
56
|
+
)
|
|
57
|
+
invalid('Invalid question intent')
|
|
58
|
+
if (intent.callId !== undefined && typeof intent.callId !== 'string') invalid('Invalid intent call ID')
|
|
59
|
+
result.intent = {
|
|
60
|
+
kind: 'plan-review',
|
|
61
|
+
approve: intent.approve,
|
|
62
|
+
...(intent.callId === undefined ? {} : { callId: intent.callId })
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return result
|
|
66
|
+
})
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Validate structured human answers against the exact pending native questions.
|
|
71
|
+
* @param questions - Questions returned by readUserQuestions.
|
|
72
|
+
* @param value - A host-provided { answers: [{ id, selected, custom? }] } value.
|
|
73
|
+
* @returns Native answer payload; omitted questions are returned as skipped.
|
|
74
|
+
*/
|
|
75
|
+
export function createUserQuestionAnswer(questions, value) {
|
|
76
|
+
const answers = record(value).answers
|
|
77
|
+
if (!Array.isArray(answers)) invalid('Expected structured question answers')
|
|
78
|
+
const byId = new Map()
|
|
79
|
+
for (const raw of answers) {
|
|
80
|
+
const answer = record(raw)
|
|
81
|
+
if (!questions.some((question) => question.id === answer.id) || byId.has(answer.id))
|
|
82
|
+
invalid('Unknown or duplicate answer ID')
|
|
83
|
+
byId.set(answer.id, answer)
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
answers: questions.map((question) => {
|
|
87
|
+
const answer = byId.get(question.id) ?? { selected: [] }
|
|
88
|
+
if (
|
|
89
|
+
!Array.isArray(answer.selected) ||
|
|
90
|
+
answer.selected.some(
|
|
91
|
+
(label) => typeof label !== 'string' || !question.options.some((option) => option.label === label)
|
|
92
|
+
)
|
|
93
|
+
)
|
|
94
|
+
invalid('Invalid selected option')
|
|
95
|
+
if (
|
|
96
|
+
new Set(answer.selected).size !== answer.selected.length ||
|
|
97
|
+
(!question.multiSelect && answer.selected.length > 1)
|
|
98
|
+
)
|
|
99
|
+
invalid('Invalid selected option count')
|
|
100
|
+
if (answer.custom !== undefined && typeof answer.custom !== 'string') invalid('Invalid custom answer')
|
|
101
|
+
return {
|
|
102
|
+
id: question.id,
|
|
103
|
+
selected: [...answer.selected],
|
|
104
|
+
...(answer.custom?.trim() ? { custom: answer.custom } : {})
|
|
105
|
+
}
|
|
106
|
+
})
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { EntryChange, EntryOptions } from '@deepseek-ai/cordis-plugin-loader';
|
|
2
|
+
import { type Dict } from '@deepseek-ai/cosmokit';
|
|
3
|
+
/** One tree-side mutation that has not reached the file yet, keyed by entry id. */
|
|
4
|
+
export type JournalRecord = JournalRecord.Remove | JournalRecord.Upsert;
|
|
5
|
+
export declare namespace JournalRecord {
|
|
6
|
+
interface Remove {
|
|
7
|
+
kind: 'remove';
|
|
8
|
+
}
|
|
9
|
+
interface Upsert {
|
|
10
|
+
kind: 'upsert';
|
|
11
|
+
/** The entry did not exist when the tree first reported it. */
|
|
12
|
+
created: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The group the tree placed the entry in (`null` for the root), or
|
|
15
|
+
* `undefined` when the tree did not relocate it.
|
|
16
|
+
*/
|
|
17
|
+
parent: string | null | undefined;
|
|
18
|
+
/** Index within `parent`; only meaningful alongside a `parent`. */
|
|
19
|
+
position: number;
|
|
20
|
+
/**
|
|
21
|
+
* Per-key delta relative to the options the entry had when the change
|
|
22
|
+
* was reported; `undefined` deletes a key. Collected at report time: the
|
|
23
|
+
* live tree is reconciled asynchronously and may lag behind the file.
|
|
24
|
+
*/
|
|
25
|
+
changes: Dict;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export type Journal = Map<string, JournalRecord>;
|
|
29
|
+
export declare function diffOptions(legacy: EntryOptions, options: EntryOptions): Dict;
|
|
30
|
+
/** Fold a later record into an earlier one for the same entry. */
|
|
31
|
+
export declare function mergeRecords(older: JournalRecord | undefined, newer: JournalRecord): JournalRecord | undefined;
|
|
32
|
+
export declare function merge(journal: Journal, id: string, record: JournalRecord): void;
|
|
33
|
+
export declare function record(journal: Journal, change: EntryChange, parent: string | null): void;
|
|
34
|
+
export interface FlatEntry {
|
|
35
|
+
parent: string | null;
|
|
36
|
+
position: number;
|
|
37
|
+
options: EntryOptions;
|
|
38
|
+
list: EntryOptions[];
|
|
39
|
+
}
|
|
40
|
+
/** Index every entry (including nested group members) by id. */
|
|
41
|
+
export declare function flatten(data: EntryOptions[], parent?: string | null, result?: Map<string, FlatEntry>): Map<string, FlatEntry>;
|
|
42
|
+
export declare function applyChanges(options: EntryOptions, changes: Dict, filter?: (key: string) => boolean): void;
|
|
43
|
+
export declare function detach(data: EntryOptions[], id: string): EntryOptions | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Insert `options` under `parent` (a group id, or `null` for the root) at
|
|
46
|
+
* `position`, clamped to the group's length. Returns false when the parent
|
|
47
|
+
* group does not exist.
|
|
48
|
+
*/
|
|
49
|
+
export declare function place(data: EntryOptions[], options: EntryOptions, parent: string | null, position: number): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Overlay a journal onto `data` in place. `filter(id, key)` restricts which
|
|
52
|
+
* changes apply; `key` is `null` when asking about the entry as a whole
|
|
53
|
+
* (creation, removal, relocation).
|
|
54
|
+
*/
|
|
55
|
+
export declare function applyJournal(data: EntryOptions[], journal: Journal, filter?: (id: string, key: string | null) => boolean, warn?: (format: string, ...args: any[]) => void): EntryOptions[];
|
|
56
|
+
export interface Conflict {
|
|
57
|
+
id: string;
|
|
58
|
+
reason: string;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Three-way reconciliation of a journal against a new file state. The file
|
|
62
|
+
* wins every conflict: conflicting keys are dropped from the journal so that
|
|
63
|
+
* the tree follows the file, and each drop is reported.
|
|
64
|
+
*
|
|
65
|
+
* `fileOwned(id, key)` scopes the check to what the file can actually express
|
|
66
|
+
* (patch-owned keys and patch-inserted entries live elsewhere).
|
|
67
|
+
*/
|
|
68
|
+
export declare function reconcile(journal: Journal, base: Map<string, FlatEntry>, theirs: Map<string, FlatEntry>, fileOwned: (id: string, key: string | null) => boolean): Conflict[];
|
|
69
|
+
//# sourceMappingURL=journal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journal.d.ts","sourceRoot":"","sources":["../../src/journal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA;AAClF,OAAO,EAAa,KAAK,IAAI,EAAQ,MAAM,uBAAuB,CAAA;AAElE,mFAAmF;AACnF,MAAM,MAAM,aAAa,GAAG,aAAa,CAAC,MAAM,GAAG,aAAa,CAAC,MAAM,CAAA;AAEvE,yBAAiB,aAAa,CAAC;IAC7B,UAAiB,MAAM;QACrB,IAAI,EAAE,QAAQ,CAAA;KACf;IAED,UAAiB,MAAM;QACrB,IAAI,EAAE,QAAQ,CAAA;QACd,+DAA+D;QAC/D,OAAO,EAAE,OAAO,CAAA;QAChB;;;WAGG;QACH,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;QACjC,mEAAmE;QACnE,QAAQ,EAAE,MAAM,CAAA;QAChB;;;;WAIG;QACH,OAAO,EAAE,IAAI,CAAA;KACd;CACF;AAED,MAAM,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;AAEhD,wBAAgB,WAAW,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,QAQtE;AAED,kEAAkE;AAClE,wBAAgB,YAAY,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,EAAE,KAAK,EAAE,aAAa,GAAG,aAAa,GAAG,SAAS,CAiB9G;AAED,wBAAgB,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,QAOxE;AAED,wBAAgB,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,QAgBlF;AAED,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,YAAY,CAAA;IACrB,IAAI,EAAE,YAAY,EAAE,CAAA;CACrB;AAED,gEAAgE;AAChE,wBAAgB,OAAO,CAAC,IAAI,EAAE,YAAY,EAAE,EAAE,MAAM,GAAE,MAAM,GAAG,IAAW,EAAE,MAAM,yBAA+B,0BAQhH;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,QASnG;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE,EAAE,MAAM,4BAKtD;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,WASzG;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,YAAY,EAAE,EACpB,OAAO,EAAE,OAAO,EAChB,MAAM,GAAE,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,KAAK,OAAoB,EAChE,IAAI,GAAE,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAe,kBA4B1D;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CACvB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,EAC5B,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,EAC9B,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,KAAK,OAAO,cA2CvD"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { EntryOptions } from '@deepseek-ai/cordis-plugin-loader';
|
|
2
|
+
import { type Journal } from './journal.ts';
|
|
3
|
+
export interface PatchOptions {
|
|
4
|
+
id?: string;
|
|
5
|
+
insert?: EntryOptions[];
|
|
6
|
+
name?: string;
|
|
7
|
+
config?: any;
|
|
8
|
+
group?: boolean | null;
|
|
9
|
+
disabled?: boolean | null;
|
|
10
|
+
inject?: any;
|
|
11
|
+
intercept?: any;
|
|
12
|
+
isolate?: any;
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
}
|
|
15
|
+
export type Warn = (format: string, ...args: any[]) => void;
|
|
16
|
+
/** Give every entry (nested groups included) an id, in place. */
|
|
17
|
+
export declare function ensureIds(entries: EntryOptions[], used: (id: string) => boolean): void;
|
|
18
|
+
/** Runtime changes are routed back to an inserted entry by its id, so every insert needs one. */
|
|
19
|
+
export declare function ensureInsertIds(patches: PatchOptions[] | undefined, used: (id: string) => boolean): void;
|
|
20
|
+
/**
|
|
21
|
+
* Overlay `patches` onto a fresh clone of `data`. Inserted entries are cloned
|
|
22
|
+
* too, so the tree owns every object it mounts.
|
|
23
|
+
*/
|
|
24
|
+
export declare function applyPatches(data: EntryOptions[], patches: PatchOptions[] | undefined, warn: Warn): EntryOptions[];
|
|
25
|
+
/**
|
|
26
|
+
* Who owns an entry, or one key of it, in the patched tree: the file, a patch
|
|
27
|
+
* that overrides that key (the last one wins), or the patch that inserted the
|
|
28
|
+
* whole entry.
|
|
29
|
+
*/
|
|
30
|
+
export type EntryOwner = EntryOwner.File | EntryOwner.Patch | EntryOwner.Insert;
|
|
31
|
+
export declare namespace EntryOwner {
|
|
32
|
+
interface File {
|
|
33
|
+
type: 'file';
|
|
34
|
+
}
|
|
35
|
+
interface Patch {
|
|
36
|
+
type: 'patch';
|
|
37
|
+
/** Index into the patch list. */
|
|
38
|
+
index: number;
|
|
39
|
+
}
|
|
40
|
+
interface Insert {
|
|
41
|
+
type: 'insert';
|
|
42
|
+
/** Index into the patch list. */
|
|
43
|
+
index: number;
|
|
44
|
+
/** The insert list (or nested group config) holding the entry. */
|
|
45
|
+
list: EntryOptions[];
|
|
46
|
+
options: EntryOptions;
|
|
47
|
+
/** The group the entry is inserted into (`null` for the root). */
|
|
48
|
+
parent: string | null;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export declare class PatchIndex {
|
|
52
|
+
patches: PatchOptions[];
|
|
53
|
+
private keys;
|
|
54
|
+
private inserts;
|
|
55
|
+
constructor(patches: PatchOptions[]);
|
|
56
|
+
/** Owner of the entry as a whole. */
|
|
57
|
+
entry(id: string | null): EntryOwner;
|
|
58
|
+
/** Owner of one key of an entry. */
|
|
59
|
+
key(id: string, key: string): EntryOwner;
|
|
60
|
+
fileOwned(id: string, key: string | null): boolean;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Route a journal to its owners: file-owned changes are applied to `data`,
|
|
64
|
+
* patch-owned ones to `patches`. Both are mutated in place, so pass clones.
|
|
65
|
+
* Returns whether any patch changed.
|
|
66
|
+
*/
|
|
67
|
+
export declare function routeJournal(journal: Journal, data: EntryOptions[], patches: PatchOptions[], warn: Warn): boolean;
|
|
68
|
+
//# sourceMappingURL=patch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patch.d.ts","sourceRoot":"","sources":["../../src/patch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA;AAErE,OAAO,EAAiC,KAAK,OAAO,EAAS,MAAM,cAAc,CAAA;AAEjF,MAAM,WAAW,YAAY;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,YAAY,EAAE,CAAA;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,GAAG,CAAA;IACZ,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;IACzB,MAAM,CAAC,EAAE,GAAG,CAAA;IACZ,SAAS,CAAC,EAAE,GAAG,CAAA;IACf,OAAO,CAAC,EAAE,GAAG,CAAA;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACnB;AAED,MAAM,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;AAU3D,iEAAiE;AACjE,wBAAgB,SAAS,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,QAK/E;AAED,iGAAiG;AACjG,wBAAgB,eAAe,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,QAIjG;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,SAAS,EAAE,IAAI,EAAE,IAAI,GAAG,YAAY,EAAE,CA8DlH;AAED;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,IAAI,GAAG,UAAU,CAAC,KAAK,GAAG,UAAU,CAAC,MAAM,CAAA;AAE/E,yBAAiB,UAAU,CAAC;IAC1B,UAAiB,IAAI;QACnB,IAAI,EAAE,MAAM,CAAA;KACb;IAED,UAAiB,KAAK;QACpB,IAAI,EAAE,OAAO,CAAA;QACb,iCAAiC;QACjC,KAAK,EAAE,MAAM,CAAA;KACd;IAED,UAAiB,MAAM;QACrB,IAAI,EAAE,QAAQ,CAAA;QACd,iCAAiC;QACjC,KAAK,EAAE,MAAM,CAAA;QACb,kEAAkE;QAClE,IAAI,EAAE,YAAY,EAAE,CAAA;QACpB,OAAO,EAAE,YAAY,CAAA;QACrB,kEAAkE;QAClE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;KACtB;CACF;AAED,qBAAa,UAAU;IAIF,OAAO,EAAE,YAAY,EAAE;IAH1C,OAAO,CAAC,IAAI,CAAyC;IACrD,OAAO,CAAC,OAAO,CAAuC;gBAEnC,OAAO,EAAE,YAAY,EAAE;IAsB1C,qCAAqC;IACrC,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,UAAU;IAKpC,oCAAoC;IACpC,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,UAAU;IAOxC,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;CAGzC;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,IAAI,WAsEvG"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Resolve a specifier to its URL in one configuration project. */
|
|
2
|
+
export type Resolve = (specifier: string) => string;
|
|
3
|
+
/**
|
|
4
|
+
* Create or reuse a native ESM resolver anchored in the config project's package scope.
|
|
5
|
+
* @param baseUrl Config file URL; absent, non-file or unscoped URLs cannot supply a resolver.
|
|
6
|
+
* @returns The project resolver, or undefined when no package scope exists or its helper cannot be written.
|
|
7
|
+
*/
|
|
8
|
+
export declare function createResolve(baseUrl: string | undefined): Promise<Resolve | undefined>;
|
|
9
|
+
//# sourceMappingURL=resolve.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/resolve.ts"],"names":[],"mappings":"AAMA,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAA;AA0DnD;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,gCAI9D"}
|
|
@@ -164,8 +164,8 @@ function modelSwitchNotice(previous, selected) {
|
|
|
164
164
|
* @returns Disposer for all scoped waterfall listeners.
|
|
165
165
|
*/
|
|
166
166
|
function installModelSelection(agentCtx, selection) {
|
|
167
|
-
const disposeAssembly = agentCtx.on("system-prompt/assemble", async (_assembly,
|
|
168
|
-
const selected = selection.current;
|
|
167
|
+
const disposeAssembly = agentCtx.on("system-prompt/assemble", async (_assembly, context, next) => {
|
|
168
|
+
const selected = context.promptModelSelection ?? selection.current;
|
|
169
169
|
const assembled = await next();
|
|
170
170
|
selection.assembled = selected;
|
|
171
171
|
if (selected === void 0) return assembled;
|
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
import type { Context } from '@deepseek-ai/cordis';
|
|
6
6
|
import { type ReasoningEffortId } from '@deepseek-ai/dsh-llm';
|
|
7
7
|
import type { ContextFormed } from '@deepseek-ai/dsh-llm';
|
|
8
|
+
declare module '@deepseek-ai/dsh-system-prompt' {
|
|
9
|
+
interface AssembleContext {
|
|
10
|
+
/** Route of the prompt-owned configuration for the active turn. */
|
|
11
|
+
promptModelSelection?: ModelSelection;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
8
14
|
declare module '@deepseek-ai/dsh-llm' {
|
|
9
15
|
interface MessageSourceMap {
|
|
10
16
|
'model-selection': {
|
|
@@ -43,8 +43,8 @@ function modelSwitchNotice(previous, selected) {
|
|
|
43
43
|
* @returns Disposer for all scoped waterfall listeners.
|
|
44
44
|
*/
|
|
45
45
|
export function installModelSelection(agentCtx, selection) {
|
|
46
|
-
const disposeAssembly = agentCtx.on('system-prompt/assemble', async (_assembly,
|
|
47
|
-
const selected = selection.current;
|
|
46
|
+
const disposeAssembly = agentCtx.on('system-prompt/assemble', async (_assembly, context, next) => {
|
|
47
|
+
const selected = context.promptModelSelection ?? selection.current;
|
|
48
48
|
const assembled = await next();
|
|
49
49
|
selection.assembled = selected;
|
|
50
50
|
if (selected === undefined)
|