@chatcode/chatcode-cli 3.0.3 → 3.0.4-rc.2
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 +10 -10
- package/README.md +16 -1
- package/README.zh.md +16 -1
- package/lib/bin.js +62 -11
- package/lib/{command-errors-CBJRI2gy.js → command-errors-CScdshCl.js} +12 -12
- package/lib/{command-trees-Dvq4C7a4.js → command-trees-Dc17MYfV.js} +2 -2
- package/lib/{component-identity-DPdJglJO.js → component-identity-DFJD_d-P.js} +3 -3
- package/lib/{dump-config-CauO75nE.js → dump-config-BcH-VYuv.js} +5 -5
- package/lib/dump-config-CyopmD85.js +2 -0
- package/lib/{dump-config-schema-CObLWWaW.js → dump-config-schema-DM0fb6Ns.js} +2 -2
- package/lib/{extension-events-Be9LWvHD.js → extension-events-qXmhzmHo.js} +20 -20
- package/lib/{frames-7PAg0Q9b.js → frames-B89znn_0.js} +4 -4
- package/lib/headless-compat.js +2 -2
- package/lib/{host-access-DeCjoRQP.js → host-access-B0CRAwsX.js} +1 -1
- package/lib/{keymap-CRUxM_qn.js → keymap-CIoVICBI.js} +17 -16
- package/lib/{plugin-CDFSDE_y.js → plugin-BKQsL2xn.js} +3264 -2301
- package/lib/{plugin-Cn-hyYY8.js → plugin-eJjD6r12.js} +1 -1
- package/lib/{profile-boot-SJGbpLgN.js → profile-boot-BNQry1NM.js} +97 -14
- package/lib/profile-boot.js +2 -2
- package/lib/{scenes-D6jV1EEi.js → scenes-BRf-zMpF.js} +3 -3
- package/lib/{settings-sections-DJQRNBo9.js → settings-sections-4gMhveN_.js} +7 -3
- package/lib/statusBarSettings-CnmdSHkO.js +382 -0
- package/lib/{themes-BCly4_y9.js → themes-Ce97Zsri.js} +13 -13
- package/lib/tui-compat-command-trees.js +1 -1
- package/lib/tui-compat-extensions.js +3 -3
- package/lib/tui-compat-plugin-host.js +5 -5
- package/lib/tui-compat-scenes.js +1 -1
- package/lib/tui-compat-settings-sections.js +1 -1
- package/lib/tui-compat-working-activity.js +4 -4
- package/lib/tui-compat-workspaces.js +1 -1
- package/lib/tui-compat.js +9 -26
- package/lib/types/args.d.ts +2 -0
- package/lib/types/permission-bypass.d.ts +16 -0
- package/lib/types/profile-boot.d.ts +12 -0
- package/lib/types/tui-compat.d.ts +4 -0
- package/lib/types/web-browser.d.ts +6 -0
- package/lib/types/web-instance.d.ts +42 -0
- package/lib/web-browser-Vcgfdsv_.js +46 -0
- package/lib/web-instance-B0jec7cq.js +2 -0
- package/lib/web-instance-DbP7IHPv.js +280 -0
- package/lib/{workspaces-Bb3kCAFb.js → workspaces-1xrm-e3V.js} +2 -2
- package/package.json +36 -33
- package/runtime/manifest.json +4 -2
- package/runtime/node_modules/@deepseek-ai/dsh-agent-default-model/lib/index.js +137 -11
- package/runtime/node_modules/@deepseek-ai/dsh-agent-default-model/lib/types/index.d.ts +27 -1
- package/runtime/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-composition-reference/references/packages.md +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-gateway/lib/client.js +2 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-gateway/lib/types/client/remote-stream.js +4 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +152 -39
- package/runtime/node_modules/@deepseek-ai/dsh-api-remotes/lib/index.js +4 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-remotes/lib/types/remote-events.d.ts +3 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-remotes/lib/types/remote-events.js +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/index.js +179 -35
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.host.js +57 -30
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.remote-client.js +31 -19
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/agent.d.ts +9 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/agent.js +36 -6
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/archived-session-gate.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/catalog.js +12 -2
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/service.d.ts +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/commands.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/commands.js +24 -8
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/index.d.ts +4 -3
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/index.js +31 -14
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/list.d.ts +6 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/list.js +89 -4
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/remote-events.d.ts +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/types.d.ts +27 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/index.js +28 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/typert.host.js +39 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/typert.remote-client.d.ts +2 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/typert.remote-client.js +32 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/types/index.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/types/index.js +19 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/client.js +30 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/index.js +111 -2
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/typert.host.js +104 -11
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/typert.remote-client.d.ts +5 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/typert.remote-client.js +78 -11
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/client/model.d.ts +14 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/client/model.js +17 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/client/service.d.ts +15 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/client/service.js +12 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/commands.d.ts +13 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/commands.js +44 -2
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/feed.js +17 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/index.d.ts +13 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/index.js +22 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/types.d.ts +17 -0
- package/runtime/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +67 -19
- package/runtime/node_modules/@deepseek-ai/dsh-app-boot/lib/types/index.d.ts +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-app-boot/lib/types/profile-context.d.ts +11 -1
- package/runtime/node_modules/@deepseek-ai/dsh-app-boot/lib/worker/profile-resolution-bootstrap.js +22 -3
- package/runtime/node_modules/@deepseek-ai/dsh-base/cordis.patch.yml +9 -3
- package/runtime/node_modules/@deepseek-ai/dsh-base/package.json +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/lib/client.js +931 -7
- package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/lib/index.js +57 -19
- package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/lib/types/client/index.d.ts +5 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/lib/types/config.d.ts +12 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/lib/types/events.d.ts +4 -4
- package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/lib/types/index.d.ts +3 -8
- package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/package.json +6 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/client.js +3 -2
- 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/client.js +10 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/types/client/present-open.d.ts +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +68 -16
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/types/client/directory.d.ts +3 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/types/client/locales.d.ts +6 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/markdown/CodeBlock.module.css +3 -5
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/markdown/MarkdownText.module.css +23 -27
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings/lib/types/client/contract/slots.d.ts +3 -1
- 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/index.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +8 -7
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/types/client/SettingsDocumentAction.d.ts +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/types/client/settings-document-store.d.ts +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +33 -12
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/types/client/locales.d.ts +2 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +3 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +1925 -207
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/ArchivedSessions.d.ts +13 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/contract/slots.d.ts +4 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/locales.d.ts +42 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/recent.d.ts +11 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/rows/RecentList.d.ts +15 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/rows/Rows.d.ts +6 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/session-actions/DeleteSession.d.ts +24 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/stores.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/tree.d.ts +15 -13
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +3 -1
- package/runtime/node_modules/@deepseek-ai/dsh-commands/lib/index.js +16 -0
- package/runtime/node_modules/@deepseek-ai/dsh-commands/lib/typert.host.js +7 -3
- package/runtime/node_modules/@deepseek-ai/dsh-commands/lib/typert.remote-client.js +6 -2
- package/runtime/node_modules/@deepseek-ai/dsh-commands/lib/types/index.js +20 -0
- package/runtime/node_modules/@deepseek-ai/dsh-commands/lib/types/types.d.ts +5 -0
- package/runtime/node_modules/@deepseek-ai/dsh-computer-use/lib/index.js +35 -0
- package/runtime/node_modules/@deepseek-ai/dsh-computer-use/lib/types/brand.d.ts +11 -0
- package/runtime/node_modules/@deepseek-ai/dsh-computer-use/lib/types/brand.js +10 -0
- package/runtime/node_modules/@deepseek-ai/dsh-computer-use/lib/types/index.d.ts +28 -0
- package/runtime/node_modules/@deepseek-ai/dsh-computer-use/lib/types/index.js +36 -0
- package/runtime/node_modules/@deepseek-ai/dsh-computer-use/package.json +42 -0
- package/runtime/node_modules/@deepseek-ai/dsh-config-editor/lib/index.js +102 -14
- package/runtime/node_modules/@deepseek-ai/dsh-config-editor/lib/types/index.d.ts +34 -4
- package/runtime/node_modules/@deepseek-ai/dsh-config-editor/package.json +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-cordis-client-runner/lib/client.js +5 -2
- package/runtime/node_modules/@deepseek-ai/dsh-host-webserver/lib/index.js +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-native-command/lib/index.js +21 -8
- package/runtime/node_modules/@deepseek-ai/dsh-native-command/lib/types/path-opener.d.ts +4 -6
- package/runtime/node_modules/@deepseek-ai/dsh-native-command/lib/types/path-opener.js +18 -7
- package/runtime/node_modules/@deepseek-ai/dsh-schedule/lib/index.js +4 -0
- package/runtime/node_modules/@deepseek-ai/dsh-schedule/lib/typert.host.js +5 -5
- package/runtime/node_modules/@deepseek-ai/dsh-schedule/lib/typert.remote-client.js +5 -5
- package/runtime/node_modules/@deepseek-ai/dsh-schedule/lib/types/index.js +5 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session/lib/types/index.d.ts +21 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-persistence/lib/index.js +12 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-persistence/lib/types/index.d.ts +15 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/index.js +95 -2
- package/runtime/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/types/index.d.ts +3 -1
- package/runtime/node_modules/@deepseek-ai/dsh-session-projection-cache/lib/index.js +25 -1
- package/runtime/node_modules/@deepseek-ai/dsh-session-projection-cache/lib/types/index.d.ts +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-session-query/lib/index.js +13 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-query/lib/types/observation.d.ts +5 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-query-sqlite/lib/index.js +26 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-settings/lib/index.js +5 -4
- package/runtime/node_modules/@deepseek-ai/dsh-settings/lib/types/index.d.ts +4 -3
- package/runtime/node_modules/@deepseek-ai/dsh-settings/lib/types/index.js +4 -3
- package/runtime/node_modules/@deepseek-ai/dsh-storage/lib/types/backend.d.ts +4 -0
- package/runtime/node_modules/@deepseek-ai/dsh-storage-domain/lib/index.js +65 -1
- package/runtime/node_modules/@deepseek-ai/dsh-storage-domain/lib/types/domain.d.ts +17 -2
- package/runtime/node_modules/@deepseek-ai/dsh-storage-json/lib/index.js +25 -0
- package/runtime/node_modules/@deepseek-ai/dsh-storage-json/package.json +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-subagent/lib/types/control.d.ts +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/index.js +5522 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/command-args.d.ts +17 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/commands/tianti/cicd.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/commands/tianti/tianti.d.ts +7 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/commands/tianti-deliver/tianti-deliver.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/config.d.ts +27 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/index.d.ts +13 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/memory-config.d.ts +10 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/runtime.d.ts +105 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/aliases.d.ts +11 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/auth.d.ts +20 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/client.d.ts +206 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/config.d.ts +22 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/index.d.ts +6 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/log.d.ts +16 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/types.d.ts +136 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/codebase.d.ts +19 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/dynamicWorkflow.d.ts +10 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/engine.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/executor.d.ts +11 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/executors.d.ts +15 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/index.d.ts +23 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/memorySuggestions.d.ts +12 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/openspec.d.ts +31 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/recommend.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/render.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/requirementContext.d.ts +12 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/scenarioUpgrade.d.ts +24 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/state.d.ts +16 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/store.d.ts +33 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/templates.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/types.d.ts +385 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/writeReviewSync.d.ts +6 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/writeReview/index.d.ts +29 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/writeReview/store.d.ts +20 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/writeReview/types.d.ts +49 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/tools.d.ts +12 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/package.json +57 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +157 -22
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-D5kpKf--.css +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-Dz_cDcce.js +133 -0
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-Dz_cDcce.js.map +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/chatcode-apple-touch-icon.png +0 -0
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/chatcode-icon-32.png +0 -0
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/chatcode-mask-icon.svg +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/favicon-dark.svg +1 -3
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/favicon.ico +0 -0
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/favicon.svg +1 -3
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/index.html +8 -4
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/preview.html +8 -4
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/package.json +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/index.js +325 -37
- package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/invariant.js +6 -1
- package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/entity.d.ts +6 -0
- package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/entity.js +23 -17
- package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/index.d.ts +41 -0
- package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/index.js +314 -23
- package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/spec.d.ts +4 -0
- package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/spec.js +4 -0
- package/lib/dump-config-CijLv_kn.js +0 -2
- package/lib/tuiDisplayPrefs-Dm_fULiR.js +0 -204
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-DUvMhLle.css +0 -1
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-Q6zc2uHV.js +0 -127
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-Q6zc2uHV.js.map +0 -1
|
@@ -2,28 +2,77 @@ import { readFile } from "node:fs/promises";
|
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { isDeepStrictEqual } from "node:util";
|
|
4
4
|
import { Service, resolveConfig } from "@deepseek-ai/cordis";
|
|
5
|
+
import z from "@deepseek-ai/schemastery";
|
|
5
6
|
import { entryListSchema } from "@deepseek-ai/cordis-plugin-include";
|
|
6
7
|
import yaml from "js-yaml";
|
|
7
|
-
import { composeEntries, loadProfileDirectory, readProfilePatches, reconcileProfilePatches } from "@deepseek-ai/dsh-app-boot";
|
|
8
|
+
import { composeEntries, loadOptionalPatches, loadProfileDirectory, readProfilePatches, reconcileProfilePatches } from "@deepseek-ai/dsh-app-boot";
|
|
8
9
|
import { withFileLock, writeFileAtomic } from "@deepseek-ai/dsh-atomic-write";
|
|
9
10
|
import { Scalar, isMap, isSeq, parseDocument, visit } from "yaml";
|
|
10
11
|
//#region lib/types/index.js
|
|
11
|
-
/** Profile
|
|
12
|
+
/** Profile and shared home configuration edits, serialized with Loader hot reload. */
|
|
12
13
|
function flatten(rows) {
|
|
13
14
|
return rows.flatMap((row) => [row, ...row.group && Array.isArray(row.config) ? flatten(row.config) : []]);
|
|
14
15
|
}
|
|
15
16
|
/** Persist complete raw configs and apply them through the normal Loader path. */
|
|
16
17
|
var ConfigEditor = class extends Service {
|
|
17
18
|
ownerContext;
|
|
19
|
+
config;
|
|
18
20
|
static inject = ["loader", "profileContext"];
|
|
19
|
-
|
|
21
|
+
/** Entry ids whose configuration is shared by all profiles in the same home. */
|
|
22
|
+
static Config = z.object({ sharedEntries: z.array(String).default([]) });
|
|
23
|
+
homeFields = /* @__PURE__ */ new Map();
|
|
24
|
+
constructor(ownerContext, config) {
|
|
20
25
|
super(ownerContext, "configEditor");
|
|
21
26
|
this.ownerContext = ownerContext;
|
|
27
|
+
this.config = config;
|
|
22
28
|
}
|
|
23
29
|
/** The profile patch edited by this service. */
|
|
24
30
|
get documentPath() {
|
|
25
31
|
return this.ownerContext.profileContext.patchPath;
|
|
26
32
|
}
|
|
33
|
+
shared(entry) {
|
|
34
|
+
return this.config.sharedEntries.includes(entry.options.id) || entry.fiber !== void 0 && this.homeFields.has(entry.fiber);
|
|
35
|
+
}
|
|
36
|
+
pathFor(entry) {
|
|
37
|
+
return this.shared(entry) ? join(this.ownerContext.profileContext.home, "cordis.patch.yml") : this.documentPath;
|
|
38
|
+
}
|
|
39
|
+
/** Materialize the document that owns a namespace, or the profile patch when no namespace is given.
|
|
40
|
+
* @param namespace Registered entry id; omitted selects the profile patch.
|
|
41
|
+
* @returns Existing owning document path; missing documents are initialized under the writer lock.
|
|
42
|
+
* @throws Error when the namespace is unavailable or file preparation fails.
|
|
43
|
+
*/
|
|
44
|
+
async prepareDocument(namespace) {
|
|
45
|
+
const entry = namespace === void 0 ? void 0 : this.entries().find((candidate) => candidate.options.id === namespace);
|
|
46
|
+
if (namespace !== void 0 && entry === void 0) throw new Error(`Configuration namespace "${namespace}" is not available`);
|
|
47
|
+
const path = entry === void 0 ? this.documentPath : this.pathFor(entry);
|
|
48
|
+
await withFileLock(entry !== void 0 && this.shared(entry) ? path : join(this.ownerContext.profileContext.dir, "package.json"), async () => {
|
|
49
|
+
try {
|
|
50
|
+
await readFile(path, "utf8");
|
|
51
|
+
} catch (error) {
|
|
52
|
+
if (error.code !== "ENOENT") throw error;
|
|
53
|
+
await writeFileAtomic(path, "[]\n", { mode: 384 });
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
return path;
|
|
57
|
+
}
|
|
58
|
+
/** Persist selected top-level fields in the home patch shared by profiles.
|
|
59
|
+
* @param fields Plugin-owned fields to save at user scope.
|
|
60
|
+
* @param owner Activation whose Loader entry owns these fields.
|
|
61
|
+
* @returns Disposer restoring profile-scoped editing for this activation.
|
|
62
|
+
*/
|
|
63
|
+
configureHome(fields, owner) {
|
|
64
|
+
if (this.homeFields.has(owner)) throw new Error("Home fields are already configured for this plugin instance");
|
|
65
|
+
this.homeFields.set(owner, [...fields]);
|
|
66
|
+
return () => {
|
|
67
|
+
this.homeFields.delete(owner);
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
homePath() {
|
|
71
|
+
return join(this.ownerContext.profileContext.home, "cordis.patch.yml");
|
|
72
|
+
}
|
|
73
|
+
userPatches(entry, loaded) {
|
|
74
|
+
return this.shared(entry) ? loadOptionalPatches("dsh", this.homePath()) ?? [] : loaded.patches;
|
|
75
|
+
}
|
|
27
76
|
/** Addressable profile rows; nested Includes have independent configuration ownership.
|
|
28
77
|
* @returns Active entries with unique profile patch ids.
|
|
29
78
|
*/
|
|
@@ -33,7 +82,7 @@ var ConfigEditor = class extends Service {
|
|
|
33
82
|
for (const entry of candidates) counts.set(entry.options.id, (counts.get(entry.options.id) ?? 0) + 1);
|
|
34
83
|
return candidates.filter((entry) => counts.get(entry.options.id) === 1);
|
|
35
84
|
}
|
|
36
|
-
/** Read inherited and explicit
|
|
85
|
+
/** Read inherited and explicit values from each entry's selected write layer.
|
|
37
86
|
* @returns Detached layer values alongside their Loader entries.
|
|
38
87
|
*/
|
|
39
88
|
configuration() {
|
|
@@ -42,17 +91,26 @@ var ConfigEditor = class extends Service {
|
|
|
42
91
|
return this.entries().map((entry) => ({
|
|
43
92
|
entry,
|
|
44
93
|
inherited: this.inherited(entry, loaded),
|
|
45
|
-
override: structuredClone(loaded.
|
|
94
|
+
override: structuredClone(this.userPatches(entry, loaded).findLast((row) => row.id === entry.options.id && row.config !== void 0)?.config ?? {})
|
|
46
95
|
}));
|
|
47
96
|
}
|
|
48
97
|
inherited(entry, loaded) {
|
|
49
|
-
const
|
|
98
|
+
const fields = entry.fiber === void 0 ? void 0 : this.homeFields.get(entry.fiber);
|
|
99
|
+
const patches = this.userPatches(entry, loaded).map((patch) => {
|
|
50
100
|
if (patch.id !== entry.options.id || patch.insert !== void 0) return patch;
|
|
101
|
+
if (fields !== void 0) {
|
|
102
|
+
const config = { ...patch.config };
|
|
103
|
+
for (const field of fields) Reflect.deleteProperty(config, field);
|
|
104
|
+
return {
|
|
105
|
+
...patch,
|
|
106
|
+
config
|
|
107
|
+
};
|
|
108
|
+
}
|
|
51
109
|
const rest = { ...patch };
|
|
52
110
|
Reflect.deleteProperty(rest, "config");
|
|
53
111
|
return rest;
|
|
54
112
|
});
|
|
55
|
-
const row = flatten(composeEntries([...loaded.layers.map((layer) => layer.patches), patches])).find((row) => row.id === entry.options.id);
|
|
113
|
+
const row = flatten(composeEntries(this.shared(entry) ? [readProfilePatches("dsh", this.ownerContext.profileContext, loaded, patches)] : [...loaded.layers.map((layer) => layer.patches), patches])).find((row) => row.id === entry.options.id);
|
|
56
114
|
return structuredClone(row?.config ?? {});
|
|
57
115
|
}
|
|
58
116
|
/** Validate, persist, and reconcile a plugin's next config; ordinary fields keep normal lifecycle rules.
|
|
@@ -62,15 +120,23 @@ var ConfigEditor = class extends Service {
|
|
|
62
120
|
*/
|
|
63
121
|
async edit(entry, change) {
|
|
64
122
|
const run = async () => {
|
|
65
|
-
const
|
|
66
|
-
|
|
123
|
+
const fields = entry.fiber === void 0 ? void 0 : this.homeFields.get(entry.fiber);
|
|
124
|
+
const shared = this.shared(entry);
|
|
125
|
+
const path = this.pathFor(entry);
|
|
126
|
+
const lockPath = shared ? this.homePath() : join(this.ownerContext.profileContext.dir, "package.json");
|
|
127
|
+
const persist = () => withFileLock(lockPath, async () => {
|
|
67
128
|
if (!this.entries().includes(entry) || entry.fiber === void 0) throw new Error("Configuration entry is no longer available");
|
|
68
129
|
const beforePatches = readProfilePatches("dsh", this.ownerContext.profileContext);
|
|
69
130
|
await reconcileProfilePatches(this.ownerContext.root, beforePatches, "dsh");
|
|
70
131
|
if (!this.entries().includes(entry)) throw new Error("Configuration entry changed during reload");
|
|
71
132
|
const current = structuredClone(entry.options.config ?? {});
|
|
72
|
-
const
|
|
133
|
+
const profileContext = this.ownerContext.profileContext;
|
|
134
|
+
const inherited = this.inherited(entry, loadProfileDirectory("dsh", profileContext.dir, profileContext.installAnchor));
|
|
73
135
|
const next = change(current, inherited);
|
|
136
|
+
if (fields !== void 0 && Object.keys({
|
|
137
|
+
...current,
|
|
138
|
+
...next
|
|
139
|
+
}).some((key) => !fields.includes(key) && !isDeepStrictEqual(current[key], next[key]))) throw new Error("Home-scoped edits may only change the registered fields");
|
|
74
140
|
const fiber = entry.fiber;
|
|
75
141
|
if (fiber.state !== 2) throw new Error("Configuration plugin is no longer active");
|
|
76
142
|
const resolved = fiber.ctx.waterfall(fiber, "internal/config", next, () => next);
|
|
@@ -90,7 +156,25 @@ var ConfigEditor = class extends Service {
|
|
|
90
156
|
if (!isSeq(document.contents)) throw new Error("Profile patch must be a YAML sequence");
|
|
91
157
|
document.contents.flow = false;
|
|
92
158
|
const index = document.contents.items.findLastIndex((item, index) => isMap(item) && document.getIn([index, "id"]) === entry.options.id && !item.has("insert") && (!item.has("name") || document.getIn([index, "name"]) === entry.options.name));
|
|
93
|
-
if (
|
|
159
|
+
if (fields !== void 0) {
|
|
160
|
+
if (index < 0) document.add(document.createNode({
|
|
161
|
+
id: entry.options.id,
|
|
162
|
+
config: {}
|
|
163
|
+
}));
|
|
164
|
+
const target = index < 0 ? document.contents.items.length - 1 : index;
|
|
165
|
+
document.setIn([target, "mergeConfig"], true);
|
|
166
|
+
if (!isMap(document.getIn([target, "config"], true))) document.setIn([target, "config"], document.createNode({}));
|
|
167
|
+
for (const field of fields) if (Object.hasOwn(next, field)) document.setIn([
|
|
168
|
+
target,
|
|
169
|
+
"config",
|
|
170
|
+
field
|
|
171
|
+
], document.createNode(next[field]));
|
|
172
|
+
else document.deleteIn([
|
|
173
|
+
target,
|
|
174
|
+
"config",
|
|
175
|
+
field
|
|
176
|
+
]);
|
|
177
|
+
} else if (!shared && isDeepStrictEqual(next, inherited)) for (let index = document.contents.items.length - 1; index >= 0; index--) {
|
|
94
178
|
const row = document.contents.items[index];
|
|
95
179
|
if (!isMap(row) || document.getIn([index, "id"]) !== entry.options.id || row.has("insert")) continue;
|
|
96
180
|
row.delete("config");
|
|
@@ -109,9 +193,11 @@ var ConfigEditor = class extends Service {
|
|
|
109
193
|
return expression;
|
|
110
194
|
} });
|
|
111
195
|
const profile = this.ownerContext.profileContext;
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
|
|
196
|
+
const loaded = loadProfileDirectory("dsh", profile.dir, profile.installAnchor);
|
|
197
|
+
const candidate = yaml.load(String(document), { schema: entryListSchema });
|
|
198
|
+
const patches = shared ? readProfilePatches("dsh", profile, loaded, candidate) : readProfilePatches("dsh", profile, {
|
|
199
|
+
...loaded,
|
|
200
|
+
patches: candidate
|
|
115
201
|
});
|
|
116
202
|
if (!isDeepStrictEqual(flatten(composeEntries([patches])).find((row) => row.id === entry.options.id)?.config ?? {}, next)) throw new Error(`Configuration for "${entry.options.id}" is overridden by a home patch or command-line overlay`);
|
|
117
203
|
await writeFileAtomic(path, String(document), { mode: 384 });
|
|
@@ -123,6 +209,8 @@ var ConfigEditor = class extends Service {
|
|
|
123
209
|
throw error;
|
|
124
210
|
}
|
|
125
211
|
});
|
|
212
|
+
if (this.shared(entry)) await withFileLock(join(this.ownerContext.profileContext.dir, "package.json"), persist);
|
|
213
|
+
else await persist();
|
|
126
214
|
};
|
|
127
215
|
const hmr = this.ownerContext.get("hmr");
|
|
128
216
|
await (hmr === void 0 ? run() : hmr.runExclusive(run));
|
|
@@ -1,23 +1,53 @@
|
|
|
1
|
-
import { Context, Service } from '@deepseek-ai/cordis';
|
|
1
|
+
import { Context, Service, type Fiber } from '@deepseek-ai/cordis';
|
|
2
|
+
import z from '@deepseek-ai/schemastery';
|
|
2
3
|
import type { Entry } from '@deepseek-ai/cordis-plugin-loader';
|
|
3
4
|
declare module '@deepseek-ai/cordis' {
|
|
4
5
|
interface Context {
|
|
5
|
-
/** Persistent edits
|
|
6
|
+
/** Persistent plugin edits in profile patches or registered shared home fields. */
|
|
6
7
|
configEditor: ConfigEditor;
|
|
7
8
|
}
|
|
8
9
|
}
|
|
10
|
+
/** Entries whose complete configuration is persisted in the shared home patch. */
|
|
11
|
+
export interface ConfigEditorConfig {
|
|
12
|
+
/** Entry ids whose complete configuration is shared across profiles. */
|
|
13
|
+
sharedEntries: string[];
|
|
14
|
+
}
|
|
9
15
|
/** Persist complete raw configs and apply them through the normal Loader path. */
|
|
10
16
|
export declare class ConfigEditor extends Service {
|
|
11
17
|
private readonly ownerContext;
|
|
18
|
+
private readonly config;
|
|
12
19
|
static inject: string[];
|
|
13
|
-
|
|
20
|
+
/** Entry ids whose configuration is shared by all profiles in the same home. */
|
|
21
|
+
static Config: z<Schemastery.ObjectS<NoInfer<{
|
|
22
|
+
sharedEntries: z<string[], string[], "defined">;
|
|
23
|
+
}>>, Schemastery.ObjectT<NoInfer<{
|
|
24
|
+
sharedEntries: z<string[], string[], "defined">;
|
|
25
|
+
}>>, "plain">;
|
|
26
|
+
private readonly homeFields;
|
|
27
|
+
constructor(ownerContext: Context, config: ConfigEditorConfig);
|
|
14
28
|
/** The profile patch edited by this service. */
|
|
15
29
|
get documentPath(): string;
|
|
30
|
+
private shared;
|
|
31
|
+
private pathFor;
|
|
32
|
+
/** Materialize the document that owns a namespace, or the profile patch when no namespace is given.
|
|
33
|
+
* @param namespace Registered entry id; omitted selects the profile patch.
|
|
34
|
+
* @returns Existing owning document path; missing documents are initialized under the writer lock.
|
|
35
|
+
* @throws Error when the namespace is unavailable or file preparation fails.
|
|
36
|
+
*/
|
|
37
|
+
prepareDocument(namespace?: string): Promise<string>;
|
|
38
|
+
/** Persist selected top-level fields in the home patch shared by profiles.
|
|
39
|
+
* @param fields Plugin-owned fields to save at user scope.
|
|
40
|
+
* @param owner Activation whose Loader entry owns these fields.
|
|
41
|
+
* @returns Disposer restoring profile-scoped editing for this activation.
|
|
42
|
+
*/
|
|
43
|
+
configureHome(fields: readonly string[], owner: Fiber): () => void;
|
|
44
|
+
private homePath;
|
|
45
|
+
private userPatches;
|
|
16
46
|
/** Addressable profile rows; nested Includes have independent configuration ownership.
|
|
17
47
|
* @returns Active entries with unique profile patch ids.
|
|
18
48
|
*/
|
|
19
49
|
entries(): Entry[];
|
|
20
|
-
/** Read inherited and explicit
|
|
50
|
+
/** Read inherited and explicit values from each entry's selected write layer.
|
|
21
51
|
* @returns Detached layer values alongside their Loader entries.
|
|
22
52
|
*/
|
|
23
53
|
configuration(): Array<{
|
|
@@ -4747,7 +4747,8 @@ call: (method, args = null) => env.invoke(method, args) }, harnessTrap(), ...Obj
|
|
|
4747
4747
|
"client-ui-settings-account AccountSection id 'account'",
|
|
4748
4748
|
"client-ui-settings-general GeneralSection id 'general'",
|
|
4749
4749
|
"client-ui-settings-models ModelsSection id 'models'",
|
|
4750
|
-
"client-ui-settings-plugins PluginsSettingsSection id 'plugins'"
|
|
4750
|
+
"client-ui-settings-plugins PluginsSettingsSection id 'plugins'",
|
|
4751
|
+
"client-ui-workspace ArchivedSessions id 'archived-sessions'"
|
|
4751
4752
|
],
|
|
4752
4753
|
replaceRisk: "none",
|
|
4753
4754
|
example: "return {\n inject: ['slots'],\n apply(ctx) {\n ctx.slots.inject('settings.section', () => ctx.slots.register(\n { name: 'settings.section', id: 'my-entry', order: 100, label: 'My entry' },\n () => React.createElement('div', null, 'hello'),\n ))\n },\n}",
|
|
@@ -4854,6 +4855,7 @@ call: (method, args = null) => env.invoke(method, args) }, harnessTrap(), ...Obj
|
|
|
4854
4855
|
"client-ui-settings-account DesktopOnboardingEntry id 'desktop-onboarding'",
|
|
4855
4856
|
"client-ui-settings-account AccountPlatformHost id 'account.platform-page'",
|
|
4856
4857
|
"client-ui-shortcuts ShortcutReference id 'shortcuts'",
|
|
4858
|
+
"client-ui-workspace SessionDeleteDialog id 'workspace.session-delete'",
|
|
4857
4859
|
"client-ui-workspace SessionRenameDialog id 'workspace.session-rename'",
|
|
4858
4860
|
"client-ui-workspace SessionArchiveConfirmDialog id 'workspace.session-archive'",
|
|
4859
4861
|
"client-ui-workspace RowActionToast id 'workspace.row-toast'"
|
|
@@ -5816,7 +5818,8 @@ call: (method, args = null) => env.invoke(method, args) }, harnessTrap(), ...Obj
|
|
|
5816
5818
|
"client-ui-workspace PinSessionMenuItem id 'pin'",
|
|
5817
5819
|
"client-ui-workspace RenameSessionMenuItem id 'rename'",
|
|
5818
5820
|
"client-ui-workspace ForkSessionMenuItem id 'fork'",
|
|
5819
|
-
"client-ui-workspace ArchiveSessionMenuItem id 'archive'"
|
|
5821
|
+
"client-ui-workspace ArchiveSessionMenuItem id 'archive'",
|
|
5822
|
+
"client-ui-workspace DeleteSessionMenuItem id 'delete'"
|
|
5820
5823
|
],
|
|
5821
5824
|
replaceRisk: "none",
|
|
5822
5825
|
example: "return {\n inject: ['slots'],\n apply(ctx) {\n const copyLabel = 'Copy Session ID' // Localize in the contributing package.\n ctx.slots.inject('sidebar.workspaces.session.menu.item', () => ctx.slots.register(\n { name: 'sidebar.workspaces.session.menu.item', id: 'copy-session-id', order: 500 },\n ({ sessionId, useMenuOpenState }) => {\n const [, setMenuOpen] = useMenuOpenState()\n return React.createElement(\n 'button',\n { type: 'button', role: 'menuitem', onClick: () => { setMenuOpen(false); void navigator.clipboard.writeText(sessionId) } },\n copyLabel,\n )\n },\n ))\n },\n}",
|
|
@@ -61,8 +61,9 @@ function splice(html, at, markup) {
|
|
|
61
61
|
* applies the table asynchronously installs it ahead of the entry module and
|
|
62
62
|
* settles it after the last row; the served form below creates and resolves
|
|
63
63
|
* it in one statement, because every row is already in the document text.
|
|
64
|
+
* This classic script precedes browser polyfills, so it uses the base Promise API.
|
|
64
65
|
*/
|
|
65
|
-
const READY_MARKUP = "<script>(globalThis.__DSH_BOOT_READY__ ??= Promise.
|
|
66
|
+
const READY_MARKUP = "<script>(globalThis.__DSH_BOOT_READY__ ??= { promise: Promise.resolve(), resolve() {}, reject() {} }).resolve()<\/script>";
|
|
66
67
|
/**
|
|
67
68
|
* Render rows into an index.html body: head rows immediately after the
|
|
68
69
|
* opening head tag, body rows immediately after the opening body tag, each
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { execFile } from "node:child_process";
|
|
1
|
+
import { execFile, spawn } from "node:child_process";
|
|
2
2
|
import { homedir, release, tmpdir } from "node:os";
|
|
3
3
|
import { dirname, extname, isAbsolute, join, relative, sep } from "node:path";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
@@ -44,10 +44,8 @@ const runNativeCommand = (command, args, signal) => new Promise((resolve, reject
|
|
|
44
44
|
* The default intent prefers the default browser for documents it renders when
|
|
45
45
|
* the platform can name one, then falls back to the default application. WSL
|
|
46
46
|
* translates every path for the Windows desktop instead of assuming a Linux
|
|
47
|
-
* GUI. The text-editor intent never consults the browser. Windows
|
|
48
|
-
*
|
|
49
|
-
* a double-click uses, selects the application, while a process that resolves
|
|
50
|
-
* the association itself reads a narrower record and reports none.
|
|
47
|
+
* GUI. The text-editor intent never consults the browser. Windows launches
|
|
48
|
+
* Notepad for text editing and delegates other intents to Explorer.
|
|
51
49
|
* @module @deepseek-ai/dsh-native-command/path-opener
|
|
52
50
|
*/
|
|
53
51
|
/** Documents a browser renders, as opposed to ones an editor merely edits. */
|
|
@@ -176,7 +174,22 @@ async function openNativePathWithIntent(path, signal, intent, internals = {}) {
|
|
|
176
174
|
return;
|
|
177
175
|
}
|
|
178
176
|
if (platform === "win32") {
|
|
179
|
-
|
|
177
|
+
if (intent === "text-editor" && internals.run === void 0) {
|
|
178
|
+
signal.throwIfAborted();
|
|
179
|
+
await new Promise((resolve, reject) => {
|
|
180
|
+
const editor = spawn("notepad.exe", [path], {
|
|
181
|
+
detached: true,
|
|
182
|
+
stdio: "ignore",
|
|
183
|
+
windowsHide: false
|
|
184
|
+
});
|
|
185
|
+
editor.once("error", reject);
|
|
186
|
+
editor.once("spawn", () => {
|
|
187
|
+
editor.unref();
|
|
188
|
+
resolve();
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
} else if (intent === "text-editor") await run("notepad.exe", [path], signal);
|
|
192
|
+
else await openWindowsPath(path, signal, run);
|
|
180
193
|
return;
|
|
181
194
|
}
|
|
182
195
|
if (platform === "linux") {
|
|
@@ -228,8 +241,8 @@ function openNativeAssociatedPath(path, signal, internals = {}) {
|
|
|
228
241
|
return openNativePathWithIntent(path, signal, "association", internals);
|
|
229
242
|
}
|
|
230
243
|
/**
|
|
231
|
-
* Open a text document for editing
|
|
232
|
-
*
|
|
244
|
+
* Open a text document for editing. macOS uses the text editor; Windows launches
|
|
245
|
+
* Notepad independently of file associations and RPC lifetime.
|
|
233
246
|
* @param path - absolute or host-resolvable text-document path.
|
|
234
247
|
* @param signal - caller/connection lifetime; abort terminates the native command.
|
|
235
248
|
* @param internals - Platform and runner hooks for deterministic tests.
|
|
@@ -5,10 +5,8 @@
|
|
|
5
5
|
* The default intent prefers the default browser for documents it renders when
|
|
6
6
|
* the platform can name one, then falls back to the default application. WSL
|
|
7
7
|
* translates every path for the Windows desktop instead of assuming a Linux
|
|
8
|
-
* GUI. The text-editor intent never consults the browser. Windows
|
|
9
|
-
*
|
|
10
|
-
* a double-click uses, selects the application, while a process that resolves
|
|
11
|
-
* the association itself reads a narrower record and reports none.
|
|
8
|
+
* GUI. The text-editor intent never consults the browser. Windows launches
|
|
9
|
+
* Notepad for text editing and delegates other intents to Explorer.
|
|
12
10
|
* @module @deepseek-ai/dsh-native-command/path-opener
|
|
13
11
|
*/
|
|
14
12
|
import { type NativeCommandRunner } from './runner.ts';
|
|
@@ -52,8 +50,8 @@ export declare function openNativePath(path: string, signal: AbortSignal, intern
|
|
|
52
50
|
*/
|
|
53
51
|
export declare function openNativeAssociatedPath(path: string, signal: AbortSignal, internals?: PathOpenerInternals): Promise<void>;
|
|
54
52
|
/**
|
|
55
|
-
* Open a text document for editing
|
|
56
|
-
*
|
|
53
|
+
* Open a text document for editing. macOS uses the text editor; Windows launches
|
|
54
|
+
* Notepad independently of file associations and RPC lifetime.
|
|
57
55
|
* @param path - absolute or host-resolvable text-document path.
|
|
58
56
|
* @param signal - caller/connection lifetime; abort terminates the native command.
|
|
59
57
|
* @param internals - Platform and runner hooks for deterministic tests.
|
|
@@ -5,15 +5,14 @@
|
|
|
5
5
|
* The default intent prefers the default browser for documents it renders when
|
|
6
6
|
* the platform can name one, then falls back to the default application. WSL
|
|
7
7
|
* translates every path for the Windows desktop instead of assuming a Linux
|
|
8
|
-
* GUI. The text-editor intent never consults the browser. Windows
|
|
9
|
-
*
|
|
10
|
-
* a double-click uses, selects the application, while a process that resolves
|
|
11
|
-
* the association itself reads a narrower record and reports none.
|
|
8
|
+
* GUI. The text-editor intent never consults the browser. Windows launches
|
|
9
|
+
* Notepad for text editing and delegates other intents to Explorer.
|
|
12
10
|
* @module @deepseek-ai/dsh-native-command/path-opener
|
|
13
11
|
*/
|
|
14
12
|
import { release as osRelease } from 'node:os';
|
|
15
13
|
import { dirname, extname } from 'node:path';
|
|
16
14
|
import { pathToFileURL } from 'node:url';
|
|
15
|
+
import { spawn } from 'node:child_process';
|
|
17
16
|
import { runNativeCommand } from "./runner.js";
|
|
18
17
|
/** Documents a browser renders, as opposed to ones an editor merely edits. */
|
|
19
18
|
const BROWSER_DOCUMENTS = new Set(['.html', '.htm', '.xhtml', '.svg']);
|
|
@@ -154,7 +153,19 @@ async function openNativePathWithIntent(path, signal, intent, internals = {}) {
|
|
|
154
153
|
return;
|
|
155
154
|
}
|
|
156
155
|
if (platform === 'win32') {
|
|
157
|
-
|
|
156
|
+
if (intent === 'text-editor' && internals.run === undefined) {
|
|
157
|
+
signal.throwIfAborted();
|
|
158
|
+
await new Promise((resolve, reject) => {
|
|
159
|
+
// The editor outlives the RPC. Do not wait for exit or kill an open document on disconnect.
|
|
160
|
+
const editor = spawn('notepad.exe', [path], { detached: true, stdio: 'ignore', windowsHide: false });
|
|
161
|
+
editor.once('error', reject);
|
|
162
|
+
editor.once('spawn', () => { editor.unref(); resolve(); });
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
else if (intent === 'text-editor')
|
|
166
|
+
await run('notepad.exe', [path], signal);
|
|
167
|
+
else
|
|
168
|
+
await openWindowsPath(path, signal, run);
|
|
158
169
|
return;
|
|
159
170
|
}
|
|
160
171
|
if (platform === 'linux') {
|
|
@@ -208,8 +219,8 @@ export function openNativeAssociatedPath(path, signal, internals = {}) {
|
|
|
208
219
|
return openNativePathWithIntent(path, signal, 'association', internals);
|
|
209
220
|
}
|
|
210
221
|
/**
|
|
211
|
-
* Open a text document for editing
|
|
212
|
-
*
|
|
222
|
+
* Open a text document for editing. macOS uses the text editor; Windows launches
|
|
223
|
+
* Notepad independently of file associations and RPC lifetime.
|
|
213
224
|
* @param path - absolute or host-resolvable text-document path.
|
|
214
225
|
* @param signal - caller/connection lifetime; abort terminates the native command.
|
|
215
226
|
* @param internals - Platform and runner hooks for deterministic tests.
|
|
@@ -2692,7 +2692,11 @@ let ScheduleService = (() => {
|
|
|
2692
2692
|
const stop = ctx.on("workspace/session-stop", async ({ sessionId }) => {
|
|
2693
2693
|
await this.stopSessionTasks(sessionId);
|
|
2694
2694
|
});
|
|
2695
|
+
const deleted = ctx.on("session/deleting", async ({ sessionIds }) => {
|
|
2696
|
+
for (const sessionId of sessionIds) await this.stopSessionTasks(sessionId);
|
|
2697
|
+
});
|
|
2695
2698
|
return () => {
|
|
2699
|
+
deleted();
|
|
2696
2700
|
stop();
|
|
2697
2701
|
activity();
|
|
2698
2702
|
};
|
|
@@ -370,7 +370,7 @@ export const TYPERT = {
|
|
|
370
370
|
typeSymbol: '@deepseek-ai/dsh-schedule#schedule/catalog:result',
|
|
371
371
|
create: _deepseek_ai_dsh_schedule_schedule_catalog_result$schema,
|
|
372
372
|
},
|
|
373
|
-
sourceLocation: {"file":"packages/schedule/schedule/src/index.ts","line":
|
|
373
|
+
sourceLocation: {"file":"packages/schedule/schedule/src/index.ts","line":308,"column":9},
|
|
374
374
|
},
|
|
375
375
|
{
|
|
376
376
|
id: '@deepseek-ai/dsh-schedule#schedule/delete',
|
|
@@ -396,7 +396,7 @@ export const TYPERT = {
|
|
|
396
396
|
typeSymbol: '@deepseek-ai/dsh-schedule/client#ScheduleDeleteResult',
|
|
397
397
|
create: _deepseek_ai_dsh_schedule_schedule_delete_result$schema,
|
|
398
398
|
},
|
|
399
|
-
sourceLocation: {"file":"packages/schedule/schedule/src/index.ts","line":
|
|
399
|
+
sourceLocation: {"file":"packages/schedule/schedule/src/index.ts","line":347,"column":9},
|
|
400
400
|
},
|
|
401
401
|
{
|
|
402
402
|
id: '@deepseek-ai/dsh-schedule#schedule/history',
|
|
@@ -421,7 +421,7 @@ export const TYPERT = {
|
|
|
421
421
|
typeSymbol: '@deepseek-ai/dsh-schedule/client#ScheduleDeliveryHistoryResult',
|
|
422
422
|
create: _deepseek_ai_dsh_schedule_schedule_history_result$schema,
|
|
423
423
|
},
|
|
424
|
-
sourceLocation: {"file":"packages/schedule/schedule/src/index.ts","line":
|
|
424
|
+
sourceLocation: {"file":"packages/schedule/schedule/src/index.ts","line":326,"column":9},
|
|
425
425
|
},
|
|
426
426
|
{
|
|
427
427
|
id: '@deepseek-ai/dsh-schedule#schedule/list',
|
|
@@ -446,7 +446,7 @@ export const TYPERT = {
|
|
|
446
446
|
typeSymbol: '@deepseek-ai/dsh-schedule#schedule/list:result',
|
|
447
447
|
create: _deepseek_ai_dsh_schedule_schedule_list_result$schema,
|
|
448
448
|
},
|
|
449
|
-
sourceLocation: {"file":"packages/schedule/schedule/src/index.ts","line":
|
|
449
|
+
sourceLocation: {"file":"packages/schedule/schedule/src/index.ts","line":294,"column":9},
|
|
450
450
|
},
|
|
451
451
|
{
|
|
452
452
|
id: '@deepseek-ai/dsh-schedule#schedule/update',
|
|
@@ -472,7 +472,7 @@ export const TYPERT = {
|
|
|
472
472
|
typeSymbol: '@deepseek-ai/dsh-schedule/client#ScheduleUpdateResult',
|
|
473
473
|
create: _deepseek_ai_dsh_schedule_schedule_update_result$schema,
|
|
474
474
|
},
|
|
475
|
-
sourceLocation: {"file":"packages/schedule/schedule/src/index.ts","line":
|
|
475
|
+
sourceLocation: {"file":"packages/schedule/schedule/src/index.ts","line":374,"column":9},
|
|
476
476
|
},
|
|
477
477
|
],
|
|
478
478
|
model: {
|
|
@@ -367,7 +367,7 @@ export const TYPERT_REMOTE = {
|
|
|
367
367
|
typeSymbol: '@deepseek-ai/dsh-schedule#schedule/catalog:result',
|
|
368
368
|
create: _deepseek_ai_dsh_schedule_schedule_catalog_result$schema,
|
|
369
369
|
},
|
|
370
|
-
sourceLocation: {"file":"packages/schedule/schedule/src/index.ts","line":
|
|
370
|
+
sourceLocation: {"file":"packages/schedule/schedule/src/index.ts","line":308,"column":9},
|
|
371
371
|
},
|
|
372
372
|
{
|
|
373
373
|
id: '@deepseek-ai/dsh-schedule#schedule/delete',
|
|
@@ -393,7 +393,7 @@ export const TYPERT_REMOTE = {
|
|
|
393
393
|
typeSymbol: '@deepseek-ai/dsh-schedule/client#ScheduleDeleteResult',
|
|
394
394
|
create: _deepseek_ai_dsh_schedule_schedule_delete_result$schema,
|
|
395
395
|
},
|
|
396
|
-
sourceLocation: {"file":"packages/schedule/schedule/src/index.ts","line":
|
|
396
|
+
sourceLocation: {"file":"packages/schedule/schedule/src/index.ts","line":347,"column":9},
|
|
397
397
|
},
|
|
398
398
|
{
|
|
399
399
|
id: '@deepseek-ai/dsh-schedule#schedule/history',
|
|
@@ -418,7 +418,7 @@ export const TYPERT_REMOTE = {
|
|
|
418
418
|
typeSymbol: '@deepseek-ai/dsh-schedule/client#ScheduleDeliveryHistoryResult',
|
|
419
419
|
create: _deepseek_ai_dsh_schedule_schedule_history_result$schema,
|
|
420
420
|
},
|
|
421
|
-
sourceLocation: {"file":"packages/schedule/schedule/src/index.ts","line":
|
|
421
|
+
sourceLocation: {"file":"packages/schedule/schedule/src/index.ts","line":326,"column":9},
|
|
422
422
|
},
|
|
423
423
|
{
|
|
424
424
|
id: '@deepseek-ai/dsh-schedule#schedule/list',
|
|
@@ -443,7 +443,7 @@ export const TYPERT_REMOTE = {
|
|
|
443
443
|
typeSymbol: '@deepseek-ai/dsh-schedule#schedule/list:result',
|
|
444
444
|
create: _deepseek_ai_dsh_schedule_schedule_list_result$schema,
|
|
445
445
|
},
|
|
446
|
-
sourceLocation: {"file":"packages/schedule/schedule/src/index.ts","line":
|
|
446
|
+
sourceLocation: {"file":"packages/schedule/schedule/src/index.ts","line":294,"column":9},
|
|
447
447
|
},
|
|
448
448
|
{
|
|
449
449
|
id: '@deepseek-ai/dsh-schedule#schedule/update',
|
|
@@ -469,7 +469,7 @@ export const TYPERT_REMOTE = {
|
|
|
469
469
|
typeSymbol: '@deepseek-ai/dsh-schedule/client#ScheduleUpdateResult',
|
|
470
470
|
create: _deepseek_ai_dsh_schedule_schedule_update_result$schema,
|
|
471
471
|
},
|
|
472
|
-
sourceLocation: {"file":"packages/schedule/schedule/src/index.ts","line":
|
|
472
|
+
sourceLocation: {"file":"packages/schedule/schedule/src/index.ts","line":374,"column":9},
|
|
473
473
|
},
|
|
474
474
|
],
|
|
475
475
|
}
|
|
@@ -202,7 +202,12 @@ let ScheduleService = (() => {
|
|
|
202
202
|
const stop = ctx.on('workspace/session-stop', async ({ sessionId }) => {
|
|
203
203
|
await this.stopSessionTasks(sessionId);
|
|
204
204
|
});
|
|
205
|
+
const deleted = ctx.on('session/deleting', async ({ sessionIds }) => {
|
|
206
|
+
for (const sessionId of sessionIds)
|
|
207
|
+
await this.stopSessionTasks(sessionId);
|
|
208
|
+
});
|
|
205
209
|
return () => {
|
|
210
|
+
deleted();
|
|
206
211
|
stop();
|
|
207
212
|
activity();
|
|
208
213
|
};
|
|
@@ -50,6 +50,27 @@ declare module '@deepseek-ai/cordis' {
|
|
|
50
50
|
* @mode emit
|
|
51
51
|
*/
|
|
52
52
|
'session/disposed'(this: Scoped<Session>, session: Session): void;
|
|
53
|
+
/** Ask capability owners to release idle, archived Sessions before writer reservation.
|
|
54
|
+
* Owners release only handles they own; foreign or running Sessions remain protected.
|
|
55
|
+
* @param request - confirmed root and owned subagent identities.
|
|
56
|
+
* @mode parallel
|
|
57
|
+
*/
|
|
58
|
+
'session/delete-release'(request: {
|
|
59
|
+
readonly sessionIds: readonly SessionId[];
|
|
60
|
+
}): Promise<void> | void;
|
|
61
|
+
/** Permanently remove secondary Session records after stored payload deletion.
|
|
62
|
+
* Listeners are idempotent; failures leave the deletion journal pending for recovery.
|
|
63
|
+
* @param request - confirmed root and owned subagent identities.
|
|
64
|
+
* @mode parallel
|
|
65
|
+
*/
|
|
66
|
+
'session/deleting'(request: {
|
|
67
|
+
readonly sessionIds: readonly SessionId[];
|
|
68
|
+
}): Promise<void> | void;
|
|
69
|
+
/** Permanent deletion observed locally or from shared storage.
|
|
70
|
+
* @param sessionIds - removed identities, including owned descendants.
|
|
71
|
+
* @mode emit
|
|
72
|
+
*/
|
|
73
|
+
'session/deleted'(sessionIds: readonly SessionId[]): void;
|
|
53
74
|
/**
|
|
54
75
|
* Post-commit, fire-and-forget append feed. The listener snapshot resolves
|
|
55
76
|
* before the log push, but callbacks run after it; observer failures are
|
|
@@ -264,6 +264,18 @@ var SessionPersistence = class extends Service {
|
|
|
264
264
|
constructor(ctx) {
|
|
265
265
|
super(ctx, "sessionPersistence");
|
|
266
266
|
}
|
|
267
|
+
/**
|
|
268
|
+
* Reserve every target's write ownership before any deletion is committed.
|
|
269
|
+
* The caller persists its recovery journal while this reservation is held,
|
|
270
|
+
* calls commit, and always disposes it to release ownership. Backends must
|
|
271
|
+
* retain deletion identities so old generations cannot reappear or be recreated.
|
|
272
|
+
* @param sessionIds - complete deletion scope, including owned descendants.
|
|
273
|
+
* @returns an exclusive deletion reservation; missing targets are idempotent.
|
|
274
|
+
* @throws when a writer holds any target, or the backend does not support deletion.
|
|
275
|
+
*/
|
|
276
|
+
prepareDeletion(sessionIds) {
|
|
277
|
+
return Promise.reject(/* @__PURE__ */ new Error(`Session persistence does not support permanent deletion (${sessionIds.length} targets)`));
|
|
278
|
+
}
|
|
267
279
|
};
|
|
268
280
|
//#endregion
|
|
269
281
|
export { SessionAlreadyExistsError, SessionAlreadyOwnedError, SessionFormatUnsupportedError, SessionHandleClosedError, SessionOwnershipLostError, SessionPersistence, SessionPersistence as default, SessionPersistenceCorruptionError, SessionPersistenceNotFoundError, SessionPersistenceRevision, SessionReadOnlyError, assertContiguous, assertStoredId, assertVersion, materializeAppendBatch, materializeCreateHeader, sessionFormatVersionRefusal, validateStoredEvents };
|
|
@@ -71,6 +71,11 @@ export interface SessionPersistenceListOptions {
|
|
|
71
71
|
/** Optional cancellation for backend listing work. */
|
|
72
72
|
readonly signal?: AbortSignal;
|
|
73
73
|
}
|
|
74
|
+
/** Exclusive reservation for an idempotent, recoverable deletion of stored Sessions. */
|
|
75
|
+
export interface SessionDeletion extends AsyncDisposable {
|
|
76
|
+
/** Permanently remove owned payloads; already deleted identities remain deleted. */
|
|
77
|
+
commit(): Promise<void>;
|
|
78
|
+
}
|
|
74
79
|
declare module '@deepseek-ai/cordis' {
|
|
75
80
|
interface Context {
|
|
76
81
|
sessionPersistence: SessionPersistence;
|
|
@@ -155,6 +160,16 @@ export declare abstract class SessionPersistence extends Service {
|
|
|
155
160
|
* @returns one snapshot per stored session.
|
|
156
161
|
*/
|
|
157
162
|
abstract list(options?: SessionPersistenceListOptions): Promise<readonly SessionPersistenceSnapshot[]>;
|
|
163
|
+
/**
|
|
164
|
+
* Reserve every target's write ownership before any deletion is committed.
|
|
165
|
+
* The caller persists its recovery journal while this reservation is held,
|
|
166
|
+
* calls commit, and always disposes it to release ownership. Backends must
|
|
167
|
+
* retain deletion identities so old generations cannot reappear or be recreated.
|
|
168
|
+
* @param sessionIds - complete deletion scope, including owned descendants.
|
|
169
|
+
* @returns an exclusive deletion reservation; missing targets are idempotent.
|
|
170
|
+
* @throws when a writer holds any target, or the backend does not support deletion.
|
|
171
|
+
*/
|
|
172
|
+
prepareDeletion(sessionIds: readonly SessionId[]): Promise<SessionDeletion>;
|
|
158
173
|
}
|
|
159
174
|
export default SessionPersistence;
|
|
160
175
|
//# sourceMappingURL=index.d.ts.map
|