@songtonyli/dsh-cli 0.1.93 → 0.1.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/dsh.mjs +1 -1
- package/node_modules/@deepseek-ai/cordis/package.json +4 -4
- package/node_modules/@deepseek-ai/cordis-plugin-group/package.json +3 -3
- package/node_modules/@deepseek-ai/cordis-plugin-include/README.md +10 -0
- package/node_modules/@deepseek-ai/cordis-plugin-include/lib/index.js +647 -149
- package/node_modules/@deepseek-ai/cordis-plugin-include/package.json +4 -4
- package/node_modules/@deepseek-ai/cordis-plugin-include/src/index.ts +362 -236
- package/node_modules/@deepseek-ai/cordis-plugin-include/src/journal.ts +242 -0
- package/node_modules/@deepseek-ai/cordis-plugin-include/src/patch.ts +261 -0
- package/node_modules/@deepseek-ai/cordis-plugin-loader/README.md +5 -1
- package/node_modules/@deepseek-ai/cordis-plugin-loader/lib/index.js +96 -20
- package/node_modules/@deepseek-ai/cordis-plugin-loader/package.json +4 -4
- package/node_modules/@deepseek-ai/cordis-plugin-loader/src/config/entry.ts +2 -2
- package/node_modules/@deepseek-ai/cordis-plugin-loader/src/config/group.ts +3 -2
- package/node_modules/@deepseek-ai/cordis-plugin-loader/src/config/tree.ts +77 -8
- package/node_modules/@deepseek-ai/cordis-plugin-loader/src/index.ts +24 -13
- package/node_modules/@deepseek-ai/cordis-plugin-timer/package.json +3 -3
- package/node_modules/@deepseek-ai/cosmokit/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh/lib/bin-DQ1vWxS0.js +254 -0
- package/node_modules/@deepseek-ai/dsh/lib/bin.js +19 -245
- package/node_modules/@deepseek-ai/dsh/lib/{dump-config-D97dwXdd.js → dump-config-DCQrFN8g.js} +3 -3
- package/node_modules/@deepseek-ai/dsh/lib/dump-config-ekMiCsuS.js +2 -0
- package/node_modules/@deepseek-ai/dsh/lib/{dump-config-schema-r4V15-lg.js → dump-config-schema-C_NhxM7L.js} +2 -2
- package/node_modules/@deepseek-ai/dsh/lib/{plugin-DscIHF4k.js → plugin-cQMw2oZz.js} +4 -4
- package/node_modules/@deepseek-ai/dsh/lib/profile-boot.js +1 -1
- package/node_modules/@deepseek-ai/dsh/package.json +127 -127
- package/node_modules/@deepseek-ai/dsh-acp/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-acp/package.json +26 -26
- package/node_modules/@deepseek-ai/dsh-acp-app/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-action-cards/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-action-cards/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-action-cards/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-action-cards/lib/index.js +7 -4
- package/node_modules/@deepseek-ai/dsh-action-cards/lib/typert.host.js +16 -4
- package/node_modules/@deepseek-ai/dsh-action-cards/lib/typert.remote-client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-action-cards/lib/types/index.js +7 -4
- package/node_modules/@deepseek-ai/dsh-action-cards/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-agent/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-agent/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-agent/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-agent/lib/index.js +5 -30
- package/node_modules/@deepseek-ai/dsh-agent/lib/types/index.js +5 -32
- package/node_modules/@deepseek-ai/dsh-agent/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-agent-default-model/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +28 -28
- package/node_modules/@deepseek-ai/dsh-agent-loop/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-agent-loop/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-loop/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-loop/lib/index.js +5 -7
- package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +27 -27
- package/node_modules/@deepseek-ai/dsh-agent-preset/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-composition-reference/references/packages.md +12 -8
- package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/typert.host.js +15 -3
- package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/types/mount.js +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-preset-registry/package.json +39 -39
- package/node_modules/@deepseek-ai/dsh-agent-team/README.i18n.yaml +97 -0
- package/node_modules/@deepseek-ai/dsh-agent-team/README.md +217 -0
- package/node_modules/@deepseek-ai/dsh-agent-team/README.zh.md +217 -0
- package/node_modules/@deepseek-ai/dsh-agent-team/lib/index.js +824 -0
- package/node_modules/@deepseek-ai/dsh-agent-team/lib/typert.host.js +825 -0
- package/node_modules/@deepseek-ai/dsh-agent-team/lib/typert.remote-client.js +79 -0
- package/node_modules/@deepseek-ai/dsh-agent-team/lib/types/client.js +3 -0
- package/node_modules/@deepseek-ai/dsh-agent-team/lib/types/error.js +10 -0
- package/node_modules/@deepseek-ai/dsh-agent-team/lib/types/index.js +176 -0
- package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/lib/types/journal.js +17 -16
- package/node_modules/@deepseek-ai/dsh-agent-team/lib/types/projection.js +172 -0
- package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/lib/types/task-board.js +47 -25
- package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/lib/types/task-view.js +4 -10
- package/node_modules/@deepseek-ai/dsh-agent-team/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-agent-team/locale/ja.json +6 -0
- package/node_modules/@deepseek-ai/dsh-agent-team/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-agent-team/package.json +83 -0
- package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-api-account-controller/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-api-authorization-controller/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-api-gateway/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-api-job-controller/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-api-remote-access/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-api-remotes/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-api-remotes/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-api-remotes/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +1048 -558
- package/node_modules/@deepseek-ai/dsh-api-remotes/lib/index.js +4 -0
- package/node_modules/@deepseek-ai/dsh-api-remotes/lib/types/client/index.js +8 -3
- package/node_modules/@deepseek-ai/dsh-api-remotes/lib/types/remote-events.js +1 -0
- package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +49 -46
- package/node_modules/@deepseek-ai/dsh-api-session-controller/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-api-session-controller/README.md +4 -4
- package/node_modules/@deepseek-ai/dsh-api-session-controller/README.zh.md +4 -4
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/client.js +16 -48
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/index.js +46 -44
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.host.js +252 -264
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.remote-client.js +209 -245
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/agent.js +10 -19
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/archived-session-gate.js +6 -3
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/manager.js +8 -32
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/session.js +4 -21
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/commands.js +2 -2
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/control.js +3 -3
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/history/controller.js +2 -2
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/history/listener.js +7 -7
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/list.js +14 -7
- package/node_modules/@deepseek-ai/dsh-api-session-controller/package.json +77 -77
- package/node_modules/@deepseek-ai/dsh-api-settings-controller/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/typert.host.js +15 -3
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-api-workspace-controller/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-api-workspace-files/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-app-boot/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-app-boot/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-app-boot/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +841 -145
- package/node_modules/@deepseek-ai/dsh-app-boot/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-atomic-write/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-attachment/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-attachment-local/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-authorization/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-base/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-base/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-base/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-base/cordis.patch.yml +29 -15
- package/node_modules/@deepseek-ai/dsh-base/package.json +103 -101
- package/node_modules/@deepseek-ai/dsh-bash-local/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-bash-sandbox/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-brand/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-chunked-list/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-client-connection/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-client-file-upload/lib/typert.host.js +15 -3
- package/node_modules/@deepseek-ai/dsh-client-file-upload/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-client-hmr/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-client-locale/lib/client.js +16 -0
- package/node_modules/@deepseek-ai/dsh-client-locale/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-client-modules/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-modules/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-modules/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-modules/lib/client.js +5 -1
- package/node_modules/@deepseek-ai/dsh-client-modules/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-modules/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-client-product-analytics/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-client-resources/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-client-shortcuts/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-action-cards/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-action-cards/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/README.i18n.yaml +40 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/README.md +100 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/README.zh.md +100 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/lib/client.js +1425 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/locale/ja.json +6 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/package.json +72 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-approval/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-brand-official/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.md +3 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.zh.md +3 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/client.js +74 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/package.json +40 -40
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.md +5 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.zh.md +5 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +56 -48
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +35 -35
- package/node_modules/@deepseek-ai/dsh-client-ui-cordis/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/README.i18n.yaml +8 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/README.md +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/README.zh.md +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/lib/client.js +24 -61
- package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/locale/de.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/locale/en.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/locale/es.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/locale/fr.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/locale/ja.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/locale/pt.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/locale/ru.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/locale/zh.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +28 -28
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-native/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-entry-customization/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-entry-customization/README.md +5 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-entry-customization/README.zh.md +5 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-entry-customization/lib/client.js +73 -21
- package/node_modules/@deepseek-ai/dsh-client-ui-entry-customization/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-file-drag/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-goal/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/README.md +5 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/README.zh.md +5 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +185 -89
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.i18n.yaml +8 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.md +5 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.zh.md +5 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +106 -111
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/package.json +25 -25
- package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-plan/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.md +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.zh.md +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/client.js +4 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-market/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-recommendations/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-reference/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-renderer/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-renderer/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-renderer/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-renderer/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.i18n.yaml +8 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.md +12 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.zh.md +12 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/lib/client.js +4002 -400
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-client-ui-secret-mask/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-session/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-settings/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-settings/README.md +3 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings/README.zh.md +3 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/client.js +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-agent-loop/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.md +3 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.zh.md +3 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +469 -41
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-session-log/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-shell/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/README.i18n.yaml +12 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/README.md +15 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/README.zh.md +15 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/lib/client.js +773 -335
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/locale/de.json +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/locale/es.json +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/locale/fr.json +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/locale/ja.json +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/locale/pt.json +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/locale/ru.json +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/locale/zh.json +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/package.json +10 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-shortcuts/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.i18n.yaml +8 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.md +11 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.zh.md +11 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +269 -111
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/README.i18n.yaml +12 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/README.md +16 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/README.zh.md +16 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +310 -150
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +18 -17
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.md +4 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.zh.md +4 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +128 -50
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +31 -31
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.md +6 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.zh.md +6 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +44 -37
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +26 -26
- package/node_modules/@deepseek-ai/dsh-cmdline/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-command-compact/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-command-feedback/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-command-goal/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-commands/lib/typert.host.js +15 -3
- package/node_modules/@deepseek-ai/dsh-commands/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-compaction/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +27 -27
- package/node_modules/@deepseek-ai/dsh-compaction-image-offload/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-computer-use/README.i18n.yaml +37 -0
- package/node_modules/@deepseek-ai/dsh-computer-use/README.md +90 -0
- package/node_modules/@deepseek-ai/dsh-computer-use/README.zh.md +90 -0
- package/node_modules/@deepseek-ai/dsh-computer-use/lib/index.js +35 -0
- package/node_modules/@deepseek-ai/dsh-computer-use/lib/types/brand.js +10 -0
- package/node_modules/@deepseek-ai/dsh-computer-use/lib/types/index.js +36 -0
- package/node_modules/@deepseek-ai/dsh-computer-use/locale/de.json +6 -0
- package/node_modules/@deepseek-ai/dsh-computer-use/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-computer-use/locale/es.json +6 -0
- package/node_modules/@deepseek-ai/dsh-computer-use/locale/fr.json +6 -0
- package/node_modules/@deepseek-ai/dsh-computer-use/locale/ja.json +6 -0
- package/node_modules/@deepseek-ai/dsh-computer-use/locale/pt.json +6 -0
- package/node_modules/@deepseek-ai/dsh-computer-use/locale/ru.json +6 -0
- package/node_modules/@deepseek-ai/dsh-computer-use/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-computer-use/package.json +44 -0
- package/node_modules/@deepseek-ai/dsh-config-editor/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-cordis-client-runner/lib/client.js +230 -62
- package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/typert.host.js +30 -6
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/package.json +23 -23
- package/node_modules/@deepseek-ai/dsh-creation-recommendations/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-creation-recommendations/README.md +5 -3
- package/node_modules/@deepseek-ai/dsh-creation-recommendations/README.zh.md +5 -3
- package/node_modules/@deepseek-ai/dsh-creation-recommendations/lib/index.js +75 -77
- package/node_modules/@deepseek-ai/dsh-creation-recommendations/lib/types/index.js +59 -54
- package/node_modules/@deepseek-ai/dsh-creation-recommendations/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-credentials/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-credentials-local/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-cua/README.i18n.yaml +49 -0
- package/node_modules/@deepseek-ai/dsh-cua/README.md +132 -0
- package/node_modules/@deepseek-ai/dsh-cua/README.zh.md +132 -0
- package/node_modules/@deepseek-ai/dsh-cua/lib/api.js +597 -0
- package/node_modules/@deepseek-ai/dsh-cua/lib/bridge.js +611 -0
- package/node_modules/@deepseek-ai/dsh-cua/lib/client.js +1803 -0
- package/node_modules/@deepseek-ai/dsh-cua/lib/index.js +1922 -0
- package/node_modules/@deepseek-ai/dsh-cua/lib/native-client.js +285 -0
- package/node_modules/@deepseek-ai/dsh-cua/lib/protocol.js +305 -0
- package/node_modules/@deepseek-ai/dsh-cua/lib/remote-types.js +1 -0
- package/node_modules/@deepseek-ai/dsh-cua/lib/typert.host.js +458 -0
- package/node_modules/@deepseek-ai/dsh-cua/lib/typert.remote-client.js +343 -0
- package/node_modules/@deepseek-ai/dsh-cua/locale/de.json +6 -0
- package/node_modules/@deepseek-ai/dsh-cua/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-cua/locale/es.json +6 -0
- package/node_modules/@deepseek-ai/dsh-cua/locale/fr.json +6 -0
- package/node_modules/@deepseek-ai/dsh-cua/locale/ja.json +6 -0
- package/node_modules/@deepseek-ai/dsh-cua/locale/pt.json +6 -0
- package/node_modules/@deepseek-ai/dsh-cua/locale/ru.json +6 -0
- package/node_modules/@deepseek-ai/dsh-cua/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-cua/package.json +151 -0
- package/node_modules/@deepseek-ai/dsh-cua-bundle/README.i18n.yaml +46 -0
- package/node_modules/@deepseek-ai/dsh-cua-bundle/README.md +94 -0
- package/node_modules/@deepseek-ai/dsh-cua-bundle/README.zh.md +94 -0
- package/node_modules/@deepseek-ai/dsh-cua-bundle/cordis.patch.yml +10 -0
- package/node_modules/@deepseek-ai/dsh-cua-bundle/docs/DETAIL.md +1 -0
- package/node_modules/@deepseek-ai/dsh-cua-bundle/docs/DETAIL.zh.md +1 -0
- package/node_modules/@deepseek-ai/dsh-cua-bundle/docs/preview.svg +33 -0
- package/node_modules/@deepseek-ai/dsh-cua-bundle/docs/preview.zh.svg +33 -0
- package/node_modules/@deepseek-ai/dsh-cua-bundle/icon.svg +35 -0
- package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/de.json +7 -0
- package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/en.json +7 -0
- package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/es.json +7 -0
- package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/fr.json +7 -0
- package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/ja.json +7 -0
- package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/pt.json +7 -0
- package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/ru.json +7 -0
- package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/zh.json +7 -0
- package/node_modules/@deepseek-ai/{dsh-experimental-agent-team-profile → dsh-cua-bundle}/package.json +15 -12
- package/node_modules/@deepseek-ai/dsh-deepseek-account/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-deliverable-file-references/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-deque/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-experimental-auto-review/package.json +46 -46
- package/node_modules/@deepseek-ai/dsh-experimental-badge-skill-bundle/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-cot-translation/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/lib/client.js +5773 -5757
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/lib/typert.host.js +15 -3
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/package.json +42 -42
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-stats/package.json +19 -18
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-experimental-cot-translation-bundle/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-experimental-forge/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/README.i18n.yaml +10 -10
- package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/README.md +6 -4
- package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/README.zh.md +6 -4
- package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/cordis.patch.yml +4 -0
- package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/DETAIL.de.md +1 -0
- package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/DETAIL.es.md +1 -0
- package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/DETAIL.fr.md +1 -0
- package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/DETAIL.ja.md +1 -0
- package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/DETAIL.md +1 -0
- package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/DETAIL.pt.md +1 -0
- package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/DETAIL.ru.md +1 -0
- package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/DETAIL.zh.md +1 -0
- package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/preview.svg +28 -0
- package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/preview.zh.svg +28 -0
- package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/de.json +2 -1
- package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/en.json +2 -1
- package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/es.json +2 -1
- package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/fr.json +2 -1
- package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/ja.json +2 -1
- package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/pt.json +2 -1
- package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/ru.json +2 -1
- package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/zh.json +2 -1
- package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/package.json +10 -8
- package/node_modules/@deepseek-ai/dsh-experimental-forge-github/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-experimental-forge-session/lib/index.js +11 -1
- package/node_modules/@deepseek-ai/dsh-experimental-forge-session/package.json +33 -33
- package/node_modules/@deepseek-ai/dsh-experimental-inspector/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-experimental-inspector-profile/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-experimental-liveshare/README.i18n.yaml +8 -8
- package/node_modules/@deepseek-ai/dsh-experimental-liveshare/README.md +8 -8
- package/node_modules/@deepseek-ai/dsh-experimental-liveshare/README.zh.md +8 -8
- package/node_modules/@deepseek-ai/dsh-experimental-liveshare/cordis.patch.yml +0 -4
- package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/client.js +892 -501
- package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/index.js +607 -229
- package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/typert.host.js +45 -31
- package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/typert.remote-client.js +33 -27
- package/node_modules/@deepseek-ai/dsh-experimental-liveshare/package.json +73 -75
- package/node_modules/@deepseek-ai/dsh-experimental-liveshare-protocol/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-experimental-plugin-market-bundle/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-experimental-ralph-bundle/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-experimental-session-inspector/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-session-inspector/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-session-inspector/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-session-inspector/lib/client.js +6 -2
- package/node_modules/@deepseek-ai/dsh-experimental-session-inspector/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-experimental-session-search/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-experimental-session-titles-bundle/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-experimental-terminal-bundle/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/package.json +23 -23
- package/node_modules/@deepseek-ai/dsh-experimental-translator/package.json +29 -29
- package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-experimental-worktree/package.json +23 -23
- package/node_modules/@deepseek-ai/dsh-file-reference/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-file-reference-local/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-fs/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-fs-local/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-fs-observation-policy/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-fs-observation-policy/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-fs-observation-policy/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-fs-observation-policy/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-fs-patch/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-fs-sandbox/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-goal/lib/typert.host.js +15 -3
- package/node_modules/@deepseek-ai/dsh-goal/package.json +23 -23
- package/node_modules/@deepseek-ai/dsh-goal-round-driver/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-goal-round-driver/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-goal-round-driver/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-goal-round-driver/lib/index.js +5 -1
- package/node_modules/@deepseek-ai/dsh-goal-round-driver/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-harness-dev-context/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-headless/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-headless/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-headless/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-headless/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-headless/package.json +30 -30
- package/node_modules/@deepseek-ai/dsh-hmr/lib/index.js +5 -1
- package/node_modules/@deepseek-ai/dsh-hmr/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-home-paths/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-host-directory-picker/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-browse/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-host-frontend-static/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-host-open-in-app/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/lib/typert.host.js +2 -2
- package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/lib/typert.remote-client.js +2 -2
- package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-host-product-telemetry-otel/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-host-webserver/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-http-proxy/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-http-proxy/README.md +4 -1
- package/node_modules/@deepseek-ai/dsh-http-proxy/README.zh.md +4 -1
- package/node_modules/@deepseek-ai/dsh-http-proxy/lib/index.js +54 -16
- package/node_modules/@deepseek-ai/dsh-http-proxy/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-jobs/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-jobs-local/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-launch-environment/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-lazy-require/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-llm/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-llm/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-llm/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-llm/lib/index.js +37 -14
- package/node_modules/@deepseek-ai/dsh-llm/lib/typert.host.js +14 -2
- package/node_modules/@deepseek-ai/dsh-llm/lib/types/content.js +38 -20
- package/node_modules/@deepseek-ai/dsh-llm/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-llm-cursor/package.json +26 -26
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/README.md +4 -1
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/README.zh.md +4 -1
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js +52 -2
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/package.json +45 -45
- package/node_modules/@deepseek-ai/dsh-llm-deepseek-account/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-llm-deepseek-account/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-deepseek-account/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-deepseek-account/lib/index.js +5 -8
- package/node_modules/@deepseek-ai/dsh-llm-deepseek-account/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/lib/index.js +4 -10
- package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.i18n.yaml +8 -8
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.md +7 -2
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.zh.md +7 -2
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +18 -8
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +28 -28
- package/node_modules/@deepseek-ai/dsh-llm-retry/package.json +25 -25
- package/node_modules/@deepseek-ai/dsh-mcp-client/README.i18n.yaml +15 -12
- package/node_modules/@deepseek-ai/dsh-mcp-client/README.md +29 -6
- package/node_modules/@deepseek-ai/dsh-mcp-client/README.zh.md +29 -6
- package/node_modules/@deepseek-ai/dsh-mcp-client/lib/index.js +870 -202
- package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/connection.js +379 -0
- package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/credentials.js +99 -0
- package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/deadline.js +27 -0
- package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/diagnostic.js +56 -0
- package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/generation.js +111 -0
- package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/index.js +163 -0
- package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/probe.js +89 -0
- package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/server-context.js +25 -0
- package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/status.js +95 -0
- package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/templates.js +66 -0
- package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/tools.js +432 -0
- package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/transport.js +39 -0
- package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/types.js +7 -0
- package/node_modules/@deepseek-ai/dsh-mcp-client/package.json +34 -24
- package/node_modules/@deepseek-ai/dsh-mcp-manager/README.i18n.yaml +64 -0
- package/node_modules/@deepseek-ai/dsh-mcp-manager/README.md +196 -0
- package/node_modules/@deepseek-ai/dsh-mcp-manager/README.zh.md +196 -0
- package/node_modules/@deepseek-ai/dsh-mcp-manager/lib/index.js +572 -0
- package/node_modules/@deepseek-ai/dsh-mcp-manager/lib/typert.host.js +323 -0
- package/node_modules/@deepseek-ai/dsh-mcp-manager/lib/typert.remote-client.js +170 -0
- package/node_modules/@deepseek-ai/dsh-mcp-manager/lib/types/index.js +582 -0
- package/node_modules/@deepseek-ai/dsh-mcp-manager/lib/types/types.js +8 -0
- package/node_modules/@deepseek-ai/dsh-mcp-manager/locale/de.json +6 -0
- package/node_modules/@deepseek-ai/dsh-mcp-manager/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-mcp-manager/locale/es.json +6 -0
- package/node_modules/@deepseek-ai/dsh-mcp-manager/locale/fr.json +6 -0
- package/node_modules/@deepseek-ai/dsh-mcp-manager/locale/ja.json +6 -0
- package/node_modules/@deepseek-ai/dsh-mcp-manager/locale/pt.json +6 -0
- package/node_modules/@deepseek-ai/dsh-mcp-manager/locale/ru.json +6 -0
- package/node_modules/@deepseek-ai/dsh-mcp-manager/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-mcp-manager/package.json +77 -0
- package/node_modules/@deepseek-ai/dsh-mcp-resources/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-message-feedback/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-message-quotes/lib/client.js +2 -2
- package/node_modules/@deepseek-ai/dsh-message-quotes/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-native-command/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-no-progress-reminder/lib/index.js +38 -15
- package/node_modules/@deepseek-ai/dsh-no-progress-reminder/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-office-to-pdf/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-official-bundles/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-official-bundles/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-official-bundles/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-official-bundles/lib/index.js +57 -95
- package/node_modules/@deepseek-ai/dsh-official-bundles/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-otel/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-output-retention/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-package-manifest/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-permission-presets/lib/typert.host.js +15 -3
- package/node_modules/@deepseek-ai/dsh-permission-presets/package.json +23 -23
- package/node_modules/@deepseek-ai/dsh-persona/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-persona/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-persona/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-persona/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-personalized-recommendations/package.json +23 -23
- package/node_modules/@deepseek-ai/dsh-plan-mode/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-plan-mode/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-plan-mode/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-plan-mode/package.json +24 -24
- package/node_modules/@deepseek-ai/dsh-plugin-detail/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/index.js +0 -1
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/typert.host.js +12 -12
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/typert.remote-client.js +12 -12
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/index.js +0 -1
- package/node_modules/@deepseek-ai/dsh-plugin-manager/package.json +38 -38
- package/node_modules/@deepseek-ai/dsh-plugin-market/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-plugin-market/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-plugin-market/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-plugin-market/lib/index.js +37 -7
- package/node_modules/@deepseek-ai/dsh-plugin-market/lib/types/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-plugin-market/lib/types/repository-cache.js +40 -7
- package/node_modules/@deepseek-ai/dsh-plugin-market/package.json +31 -31
- package/node_modules/@deepseek-ai/dsh-plugin-market-index/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-plugin-recommendations/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-plugin-recommendations/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-plugin-recommendations/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-plugin-recommendations/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-plugin-recommendations/lib/typert.host.js +15 -3
- package/node_modules/@deepseek-ai/dsh-plugin-recommendations/lib/types/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-plugin-recommendations/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-ptc-runtime/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/README.i18n.yaml +11 -8
- package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/README.md +21 -1
- package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/README.zh.md +22 -2
- package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/index.js +2 -3
- package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/persistent-process.js +428 -31
- package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/process.js +423 -28
- package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/package.json +23 -23
- package/node_modules/@deepseek-ai/dsh-pwsh-local/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/lib/index.js +39 -16
- package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-sandbox/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-sandbox-apple-container/package.json +26 -26
- package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-schedule/package.json +40 -40
- package/node_modules/@deepseek-ai/dsh-scope/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-sdk-app/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/README.md +3 -3
- package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/README.zh.md +3 -3
- package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/lib/index.js +21 -18
- package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/package.json +48 -48
- package/node_modules/@deepseek-ai/dsh-sdk-minimal/package.json +39 -39
- package/node_modules/@deepseek-ai/dsh-sdk-protocol/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-session/lib/index.js +1 -0
- package/node_modules/@deepseek-ai/dsh-session/lib/types/known-event-types.js +1 -0
- package/node_modules/@deepseek-ai/dsh-session/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-session-checkpoint-policy/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-session-format/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-session-format-catalog/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-session-format-v0-to-v1/lib/index.js +36 -13
- package/node_modules/@deepseek-ai/dsh-session-format-v0-to-v1/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-session-format-v1-to-v2/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-session-format-v2-to-v3/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-session-log-deepseek/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-session-log-export/package.json +24 -24
- package/node_modules/@deepseek-ai/dsh-session-persistence/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/worker.cjs +76 -29
- package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-session-projection/README.i18n.yaml +12 -12
- package/node_modules/@deepseek-ai/dsh-session-projection/README.md +10 -6
- package/node_modules/@deepseek-ai/dsh-session-projection/README.zh.md +10 -6
- package/node_modules/@deepseek-ai/dsh-session-projection/lib/index.js +107 -42
- package/node_modules/@deepseek-ai/dsh-session-projection/lib/types/index.js +128 -47
- package/node_modules/@deepseek-ai/dsh-session-projection/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-session-projection-cache/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-session-projection-cache/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-session-projection-cache/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-session-query/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-session-reference/lib/typert.host.js +15 -3
- package/node_modules/@deepseek-ai/dsh-session-reference/package.json +41 -41
- package/node_modules/@deepseek-ai/dsh-session-stats/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-session-telemetry/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/package.json +25 -25
- package/node_modules/@deepseek-ai/dsh-session-title/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-session-title-all-prompts-llm/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-session-title-llm/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-session-turn-outline/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-settings/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-shell/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-shell-env/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-skill/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-skill-badge/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-skill-filesystem/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-skill-office/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-spill/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-spill-local/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-spill-policy/package.json +35 -35
- package/node_modules/@deepseek-ai/dsh-storage/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-storage-domain/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-storage-json/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-subagent/README.i18n.yaml +39 -24
- package/node_modules/@deepseek-ai/dsh-subagent/README.md +41 -20
- package/node_modules/@deepseek-ai/dsh-subagent/README.zh.md +41 -20
- package/node_modules/@deepseek-ai/dsh-subagent/lib/index.js +574 -873
- package/node_modules/@deepseek-ai/dsh-subagent/lib/typert.host.js +64 -120
- package/node_modules/@deepseek-ai/dsh-subagent/lib/typert.remote-client.js +17 -63
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/activation.js +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/archive-admission.js +39 -115
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/child-agent.js +6 -4
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/continuation-messages.js +12 -14
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/control.js +1 -5
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/descriptor.js +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/index.js +83 -146
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/lifecycle.js +5 -31
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/manager.js +396 -570
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/structured.js +2 -2
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/types.js +2 -4
- package/node_modules/@deepseek-ai/dsh-subagent/package.json +51 -55
- package/node_modules/@deepseek-ai/dsh-subagent-acp/package.json +24 -24
- package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-subprocess/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-subprocess-local/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-system-prompt/lib/index.js +0 -1
- package/node_modules/@deepseek-ai/dsh-system-prompt/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-terminal/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-time-context/package.json +23 -23
- package/node_modules/@deepseek-ai/dsh-timeout/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-tmux-context/lib/index.js +38 -15
- package/node_modules/@deepseek-ai/dsh-tmux-context/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-token-meter/lib/index.js +4 -2
- package/node_modules/@deepseek-ai/dsh-token-meter/lib/types/breakdown-projection.js +1 -0
- package/node_modules/@deepseek-ai/dsh-token-meter/lib/types/usage-projection.js +1 -0
- package/node_modules/@deepseek-ai/dsh-token-meter/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-tool-agent-team/README.i18n.yaml +85 -0
- package/node_modules/@deepseek-ai/dsh-tool-agent-team/README.md +178 -0
- package/node_modules/@deepseek-ai/dsh-tool-agent-team/README.zh.md +178 -0
- package/node_modules/@deepseek-ai/dsh-tool-agent-team/lib/index.js +308 -0
- package/node_modules/@deepseek-ai/dsh-tool-agent-team/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-tool-agent-team/locale/ja.json +6 -0
- package/node_modules/@deepseek-ai/dsh-tool-agent-team/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-tool-agent-team/package.json +63 -0
- package/node_modules/@deepseek-ai/dsh-tool-ask-user/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-tool-bash/package.json +37 -37
- package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/package.json +27 -27
- package/node_modules/@deepseek-ai/dsh-tool-call-timeout-policy/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +230 -184
- package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-tool-executor-native/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-tool-executor-ptc/package.json +28 -28
- package/node_modules/@deepseek-ai/dsh-tool-fs/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-tool-fs/README.md +7 -7
- package/node_modules/@deepseek-ai/dsh-tool-fs/README.zh.md +7 -7
- package/node_modules/@deepseek-ai/dsh-tool-fs/lib/index.js +5 -5
- package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +39 -39
- package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +31 -31
- package/node_modules/@deepseek-ai/dsh-tool-goal/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-goal/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-goal/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-goal/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-goal/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-tool-jobs/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-tool-present/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-tool-pwsh/package.json +35 -35
- package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/package.json +28 -28
- package/node_modules/@deepseek-ai/dsh-tool-ralph/package.json +24 -24
- package/node_modules/@deepseek-ai/dsh-tool-schedule/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-tool-session-query/package.json +27 -27
- package/node_modules/@deepseek-ai/dsh-tool-skill/lib/index.js +1 -0
- package/node_modules/@deepseek-ai/dsh-tool-skill/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/package.json +23 -23
- package/node_modules/@deepseek-ai/dsh-tool-subagent/README.i18n.yaml +19 -19
- package/node_modules/@deepseek-ai/dsh-tool-subagent/README.md +15 -13
- package/node_modules/@deepseek-ai/dsh-tool-subagent/README.zh.md +14 -12
- package/node_modules/@deepseek-ai/dsh-tool-subagent/lib/index.js +40 -43
- package/node_modules/@deepseek-ai/dsh-tool-subagent/package.json +25 -25
- package/node_modules/@deepseek-ai/dsh-tool-subagent-control/README.i18n.yaml +53 -38
- package/node_modules/@deepseek-ai/dsh-tool-subagent-control/README.md +41 -21
- package/node_modules/@deepseek-ai/dsh-tool-subagent-control/README.zh.md +41 -21
- package/node_modules/@deepseek-ai/dsh-tool-subagent-control/lib/index.js +235 -98
- package/node_modules/@deepseek-ai/dsh-tool-subagent-control/package.json +25 -22
- package/node_modules/@deepseek-ai/dsh-tool-terminal/package.json +32 -32
- package/node_modules/@deepseek-ai/dsh-tool-todo/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-tool-web/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-tool-web/README.md +5 -4
- package/node_modules/@deepseek-ai/dsh-tool-web/README.zh.md +5 -4
- package/node_modules/@deepseek-ai/dsh-tool-web/lib/index.js +4 -4
- package/node_modules/@deepseek-ai/dsh-tool-web/package.json +25 -24
- package/node_modules/@deepseek-ai/dsh-tool-workflow/package.json +24 -24
- package/node_modules/@deepseek-ai/dsh-tool-working-directory/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-tool-workspace-dependencies/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-tools/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-tui-app/README.md +10 -8
- package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +10 -8
- package/node_modules/@deepseek-ai/dsh-tui-app/cordis.patch.yml +17 -0
- package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +113 -99
- package/node_modules/@deepseek-ai/dsh-tui-app/package.json +87 -87
- package/node_modules/@deepseek-ai/dsh-typert-loader/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-typert-protocol/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-typert-registry/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-user-approval/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-user-questions/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-user-questions/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-user-questions/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-user-questions/lib/index.js +5 -6
- package/node_modules/@deepseek-ai/dsh-user-questions/lib/typert.host.js +16 -4
- package/node_modules/@deepseek-ai/dsh-user-questions/lib/types/index.js +5 -6
- package/node_modules/@deepseek-ai/dsh-user-questions/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-util-code-language/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-util-crypto/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-util-time/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-util-values/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-util-workspace-path/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-web/README.i18n.yaml +18 -12
- package/node_modules/@deepseek-ai/dsh-web/README.md +38 -7
- package/node_modules/@deepseek-ai/dsh-web/README.zh.md +38 -7
- package/node_modules/@deepseek-ai/dsh-web/lib/index.js +220 -112
- package/node_modules/@deepseek-ai/dsh-web/lib/typert.host.js +178 -0
- package/node_modules/@deepseek-ai/dsh-web/lib/typert.remote-client.js +45 -0
- package/node_modules/@deepseek-ai/dsh-web/lib/types/index.js +277 -0
- package/node_modules/@deepseek-ai/dsh-web/lib/types/types.js +18 -0
- package/node_modules/@deepseek-ai/dsh-web/package.json +26 -7
- package/node_modules/@deepseek-ai/dsh-web-app/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-web-app/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-web-app/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-web-app/cordis.patch.yml +14 -6
- package/node_modules/@deepseek-ai/dsh-web-app/package.json +157 -154
- package/node_modules/@deepseek-ai/dsh-web-app/presets/standard.patch.yml +1 -1
- package/node_modules/@deepseek-ai/dsh-web-deepseek-api/README.i18n.yaml +12 -12
- package/node_modules/@deepseek-ai/dsh-web-deepseek-api/README.md +22 -12
- package/node_modules/@deepseek-ai/dsh-web-deepseek-api/README.zh.md +22 -12
- package/node_modules/@deepseek-ai/dsh-web-deepseek-api/lib/index.js +394 -163
- package/node_modules/@deepseek-ai/dsh-web-deepseek-api/package.json +30 -19
- package/node_modules/@deepseek-ai/dsh-web-fetch-http/lib/index.js +11 -0
- package/node_modules/@deepseek-ai/dsh-web-fetch-http/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-B2q7cWGa.js +199 -0
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-uWlUD22X.css +1 -0
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{graphql-C-Uijqkk.js → graphql-DFkUqiqq.js} +2 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{http-CLu1VCSi.js → http-BbPA7N5Y.js} +2 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/php-BcJWnZHR.js +2 -0
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{rst-BuDKiyD7.js → rst-CtdShwKQ.js} +2 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{ruby-ZtjE4NPI.js → ruby-DllPV2XI.js} +2 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{svelte-Tt81icjn.js → svelte-ZPgsG5h9.js} +2 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{vue-B5SDFeDA.js → vue-CnLRC5W9.js} +2 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/{vendor-7utBqO4o.js → vendor-BUMdD3V7.js} +3 -3
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/index.html +3 -3
- package/node_modules/@deepseek-ai/dsh-web-frontend/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/README.i18n.yaml +8 -8
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/README.md +6 -4
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/README.zh.md +6 -4
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/lib/index.js +30 -18
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +20 -18
- package/node_modules/@deepseek-ai/dsh-win32-process/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-workflow/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-workflow-ptc/lib/index.js +11 -13
- package/node_modules/@deepseek-ai/dsh-workflow-ptc/package.json +39 -39
- package/node_modules/@deepseek-ai/dsh-working-directory/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-workspace/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-workspace-changes/package.json +26 -26
- package/node_modules/@deepseek-ai/schemastery/package.json +2 -2
- package/package.json +346 -343
- package/node_modules/@deepseek-ai/dsh/lib/dump-config-DuXZcU0e.js +0 -2
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/README.i18n.yaml +0 -100
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/README.md +0 -227
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/README.zh.md +0 -227
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/index.js +0 -1650
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/activity.js +0 -85
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/client.js +0 -3
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/error.js +0 -23
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/index.js +0 -232
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/lifecycle.js +0 -103
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/persisted.js +0 -20
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/projection.js +0 -327
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/roster.js +0 -452
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/session-message.js +0 -23
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/locale/en.json +0 -6
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/locale/ja.json +0 -6
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/locale/zh.json +0 -6
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/package.json +0 -68
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/README.i18n.yaml +0 -52
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/README.md +0 -118
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/README.zh.md +0 -118
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/cordis.patch.yml +0 -29
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/docs/DETAIL.md +0 -1
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/docs/DETAIL.zh.md +0 -1
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/docs/preview.svg +0 -1
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/docs/preview.zh.svg +0 -1
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/icon.svg +0 -12
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/de.json +0 -7
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/en.json +0 -7
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/es.json +0 -7
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/fr.json +0 -7
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/ja.json +0 -7
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/pt.json +0 -7
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/ru.json +0 -7
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/zh.json +0 -7
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/README.i18n.yaml +0 -43
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/README.md +0 -102
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/README.zh.md +0 -102
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/lib/client.js +0 -690
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/locale/en.json +0 -6
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/locale/ja.json +0 -6
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/locale/zh.json +0 -6
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/package.json +0 -66
- package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/viewer-declarations-krUNq6VU.js +0 -287
- package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/viewer-declarations.js +0 -26
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/README.i18n.yaml +0 -70
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/README.md +0 -155
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/README.zh.md +0 -155
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/lib/index.js +0 -626
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/locale/en.json +0 -6
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/locale/ja.json +0 -6
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/locale/zh.json +0 -6
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/package.json +0 -62
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-BCbHmUSs.js +0 -197
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-BUDGJY4R.css +0 -1
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/php-CjQPq1Mz.js +0 -2
- package/node_modules/@deepseek-ai/dsh-web-search-exa/README.i18n.yaml +0 -61
- package/node_modules/@deepseek-ai/dsh-web-search-exa/README.md +0 -142
- package/node_modules/@deepseek-ai/dsh-web-search-exa/README.zh.md +0 -142
- package/node_modules/@deepseek-ai/dsh-web-search-exa/lib/index.js +0 -154
- package/node_modules/@deepseek-ai/dsh-web-search-exa/locale/de.json +0 -6
- package/node_modules/@deepseek-ai/dsh-web-search-exa/locale/en.json +0 -6
- package/node_modules/@deepseek-ai/dsh-web-search-exa/locale/es.json +0 -6
- package/node_modules/@deepseek-ai/dsh-web-search-exa/locale/fr.json +0 -6
- package/node_modules/@deepseek-ai/dsh-web-search-exa/locale/ja.json +0 -6
- package/node_modules/@deepseek-ai/dsh-web-search-exa/locale/pt.json +0 -6
- package/node_modules/@deepseek-ai/dsh-web-search-exa/locale/ru.json +0 -6
- package/node_modules/@deepseek-ai/dsh-web-search-exa/locale/zh.json +0 -6
- package/node_modules/@deepseek-ai/dsh-web-search-exa/package.json +0 -45
- package/node_modules/@deepseek-ai/dsh-web-search-perplexity/README.i18n.yaml +0 -82
- package/node_modules/@deepseek-ai/dsh-web-search-perplexity/README.md +0 -165
- package/node_modules/@deepseek-ai/dsh-web-search-perplexity/README.zh.md +0 -165
- package/node_modules/@deepseek-ai/dsh-web-search-perplexity/lib/index.js +0 -152
- package/node_modules/@deepseek-ai/dsh-web-search-perplexity/locale/de.json +0 -6
- package/node_modules/@deepseek-ai/dsh-web-search-perplexity/locale/en.json +0 -6
- package/node_modules/@deepseek-ai/dsh-web-search-perplexity/locale/es.json +0 -6
- package/node_modules/@deepseek-ai/dsh-web-search-perplexity/locale/fr.json +0 -6
- package/node_modules/@deepseek-ai/dsh-web-search-perplexity/locale/ja.json +0 -6
- package/node_modules/@deepseek-ai/dsh-web-search-perplexity/locale/pt.json +0 -6
- package/node_modules/@deepseek-ai/dsh-web-search-perplexity/locale/ru.json +0 -6
- package/node_modules/@deepseek-ai/dsh-web-search-perplexity/locale/zh.json +0 -6
- package/node_modules/@deepseek-ai/dsh-web-search-perplexity/package.json +0 -45
- package/node_modules/@deepseek-ai/dsh/lib/{profile-boot-e2mS45fC.js → profile-boot-xiaehH2x.js} +3 -3
- /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/lib/types/task-graph.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/lib/types/types.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/lib/types/validation.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/locale/de.json +0 -0
- /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/locale/es.json +0 -0
- /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/locale/fr.json +0 -0
- /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/locale/pt.json +0 -0
- /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/locale/ru.json +0 -0
- /package/node_modules/@deepseek-ai/{dsh-experimental-client-ui-agent-team → dsh-client-ui-agent-team}/lib/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-experimental-client-ui-agent-team → dsh-client-ui-agent-team}/locale/de.json +0 -0
- /package/node_modules/@deepseek-ai/{dsh-experimental-client-ui-agent-team → dsh-client-ui-agent-team}/locale/es.json +0 -0
- /package/node_modules/@deepseek-ai/{dsh-experimental-client-ui-agent-team → dsh-client-ui-agent-team}/locale/fr.json +0 -0
- /package/node_modules/@deepseek-ai/{dsh-experimental-client-ui-agent-team → dsh-client-ui-agent-team}/locale/pt.json +0 -0
- /package/node_modules/@deepseek-ai/{dsh-experimental-client-ui-agent-team → dsh-client-ui-agent-team}/locale/ru.json +0 -0
- /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team-profile → dsh-cua-bundle}/lib/index.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-experimental-tool-agent-team → dsh-tool-agent-team}/locale/de.json +0 -0
- /package/node_modules/@deepseek-ai/{dsh-experimental-tool-agent-team → dsh-tool-agent-team}/locale/es.json +0 -0
- /package/node_modules/@deepseek-ai/{dsh-experimental-tool-agent-team → dsh-tool-agent-team}/locale/fr.json +0 -0
- /package/node_modules/@deepseek-ai/{dsh-experimental-tool-agent-team → dsh-tool-agent-team}/locale/pt.json +0 -0
- /package/node_modules/@deepseek-ai/{dsh-experimental-tool-agent-team → dsh-tool-agent-team}/locale/ru.json +0 -0
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type EntryChange, type EntryOptions, EntryTree, EntryGroup, isJsExpr } from '@deepseek-ai/cordis-plugin-loader'
|
|
2
2
|
import { Context, Service } from '@deepseek-ai/cordis'
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { deepEqual } from '@deepseek-ai/cosmokit'
|
|
4
|
+
import { basename, dirname, extname, join } from 'node:path'
|
|
5
|
+
import { access, constants, readFile, rename, rm, writeFile } from 'node:fs/promises'
|
|
6
|
+
import { setTimeout as sleep } from 'node:timers/promises'
|
|
6
7
|
import { fileURLToPath, pathToFileURL } from 'node:url'
|
|
7
8
|
import * as yaml from 'js-yaml'
|
|
9
|
+
import { applyJournal, flatten, type Journal, merge, reconcile, record } from './journal.ts'
|
|
10
|
+
import { applyPatches, ensureIds, ensureInsertIds, PatchIndex, type PatchOptions, routeJournal } from './patch.ts'
|
|
11
|
+
/** Shared patch semantics used by config dumps and mounting. */
|
|
12
|
+
export { applyPatches as applyEntryPatches } from './patch.ts'
|
|
13
|
+
/** Serialized entry patch options. */
|
|
14
|
+
export type { PatchOptions } from './patch.ts'
|
|
8
15
|
|
|
9
16
|
const JsExpr = new yaml.Type('tag:yaml.org,2002:js', {
|
|
10
17
|
kind: 'scalar',
|
|
@@ -14,325 +21,444 @@ const JsExpr = new yaml.Type('tag:yaml.org,2002:js', {
|
|
|
14
21
|
represent: (data) => data['__jsExpr'],
|
|
15
22
|
})
|
|
16
23
|
|
|
17
|
-
/**
|
|
18
|
-
* The entry-list YAML dialect: `!!js` scalars round-trip as expression nodes
|
|
19
|
-
* the Loader evaluates at entry activation. Exported so config tooling
|
|
20
|
-
* (`dsh --dump-config`) parses and prints exactly the dialect this include
|
|
21
|
-
* mounts.
|
|
22
|
-
*/
|
|
24
|
+
/** YAML dialect preserving child-owned JavaScript expression nodes. */
|
|
23
25
|
export const entryListSchema = yaml.JSON_SCHEMA.extend(JsExpr)
|
|
24
|
-
|
|
25
26
|
const schema = entryListSchema
|
|
26
27
|
|
|
27
|
-
const
|
|
28
|
+
const types: Record<string, string> = {
|
|
28
29
|
'.json': 'application/json',
|
|
29
30
|
'.yaml': 'application/yaml',
|
|
30
31
|
'.yml': 'application/yaml',
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const WRITE_RETRY_LIMIT = 10
|
|
36
|
-
const WRITE_RETRY_DELAY_MS = 50
|
|
34
|
+
type ConfigStage = 'read' | 'parse' | 'validate'
|
|
37
35
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
interface Snapshot {
|
|
37
|
+
content: string
|
|
38
|
+
data: EntryOptions[]
|
|
41
39
|
}
|
|
42
40
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
* shared by mounting (`applyPatches`) and offline config tooling
|
|
46
|
-
* (`dsh --dump-config`) so a dump can never drift from what boots. The input
|
|
47
|
-
* is never mutated: patching shared entry objects would bake earlier patch
|
|
48
|
-
* values into the cached parse, so repeated application (config hot-reloads)
|
|
49
|
-
* could never revert a removed or changed patch. Inserted entries are indexed
|
|
50
|
-
* as they are added, so a later patch in the same list can target a row an
|
|
51
|
-
* earlier patch inserted. A patch that matches nothing warns and is skipped.
|
|
52
|
-
* @param data - the parsed entry list (JSON-safe plain data).
|
|
53
|
-
* @param patches - the patch list to apply, in order.
|
|
54
|
-
* @param warn - sink for skipped-patch diagnostics (printf-style, `%C` = code).
|
|
55
|
-
* @returns a detached entry list with every applicable patch applied.
|
|
56
|
-
*/
|
|
57
|
-
export function applyEntryPatches(
|
|
58
|
-
data: EntryOptions[],
|
|
59
|
-
patches: PatchOptions[] | undefined,
|
|
60
|
-
warn: (message: string, ...args: any[]) => void,
|
|
61
|
-
): EntryOptions[] {
|
|
62
|
-
if (!patches?.length) return [...data]
|
|
63
|
-
data = structuredClone(data)
|
|
64
|
-
|
|
65
|
-
const entryMap = new Map<string, EntryOptions>()
|
|
66
|
-
const buildMap = (entries: EntryOptions[]) => {
|
|
67
|
-
for (const entry of entries) {
|
|
68
|
-
if (entry.id) entryMap.set(entry.id, entry)
|
|
69
|
-
if (entry.group && Array.isArray(entry.config)) {
|
|
70
|
-
buildMap(entry.config)
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
buildMap(data)
|
|
75
|
-
|
|
76
|
-
for (const patch of patches) {
|
|
77
|
-
const { id, insert, name, ...overrides } = patch
|
|
78
|
-
|
|
79
|
-
if (insert) {
|
|
80
|
-
if (id) {
|
|
81
|
-
const target = entryMap.get(id)
|
|
82
|
-
if (!target) {
|
|
83
|
-
warn('patch insert: entry %C not found', id)
|
|
84
|
-
continue
|
|
85
|
-
}
|
|
86
|
-
if (!target.group) {
|
|
87
|
-
warn('patch insert: entry %C is not a group', id)
|
|
88
|
-
continue
|
|
89
|
-
}
|
|
90
|
-
if (!Array.isArray(target.config)) target.config = []
|
|
91
|
-
target.config.push(...insert)
|
|
92
|
-
} else {
|
|
93
|
-
data.push(...insert)
|
|
94
|
-
}
|
|
95
|
-
// Index what this patch added so a LATER patch in the same list can
|
|
96
|
-
// target it. Patch lists compose one layer per source (each bundle
|
|
97
|
-
// layer, then the user's, then `--patch` overlays), and a layer must be
|
|
98
|
-
// able to configure or disable a row an earlier layer inserted; without
|
|
99
|
-
// this, inserted rows were silently unpatchable.
|
|
100
|
-
buildMap(insert)
|
|
101
|
-
continue
|
|
102
|
-
}
|
|
41
|
+
export class ConfigFileError extends Error {
|
|
42
|
+
name = 'ConfigFileError'
|
|
103
43
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
const target = entryMap.get(id)
|
|
110
|
-
if (!target) {
|
|
111
|
-
warn('patch: entry %C not found', id)
|
|
112
|
-
continue
|
|
113
|
-
}
|
|
44
|
+
constructor(public stage: ConfigStage, path: string, cause: unknown) {
|
|
45
|
+
super(`failed to ${stage} config file ${path}`, { cause })
|
|
46
|
+
}
|
|
47
|
+
}
|
|
114
48
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
49
|
+
/** The file changed under us between the pre-check and the rename. */
|
|
50
|
+
class StaleWriteError extends Error {
|
|
51
|
+
name = 'StaleWriteError'
|
|
52
|
+
}
|
|
119
53
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
54
|
+
interface Anonymous {
|
|
55
|
+
parent: string | null
|
|
56
|
+
options: EntryOptions
|
|
57
|
+
}
|
|
125
58
|
|
|
126
|
-
|
|
59
|
+
function isENOENT(error: unknown) {
|
|
60
|
+
return (error as NodeJS.ErrnoException | undefined)?.code === 'ENOENT'
|
|
127
61
|
}
|
|
128
62
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
63
|
+
const RENAME_RETRIES = 10
|
|
64
|
+
const RENAME_BACKOFF = 20
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* On Windows a rename over a file that another process holds open (typically
|
|
68
|
+
* an antivirus scanning what we just wrote) fails with one of these; the lock
|
|
69
|
+
* is normally gone within milliseconds. A bounded retry is cheap enough to
|
|
70
|
+
* apply on every platform.
|
|
71
|
+
*/
|
|
72
|
+
function isTransientRenameError(error: unknown) {
|
|
73
|
+
const code = (error as NodeJS.ErrnoException | undefined)?.code
|
|
74
|
+
return code === 'EACCES' || code === 'EPERM' || code === 'EBUSY'
|
|
141
75
|
}
|
|
142
76
|
|
|
143
|
-
/** Config namespace for the file-backed include loader. */
|
|
144
77
|
export namespace Include {
|
|
145
|
-
/** Config for a file-backed loader subtree. */
|
|
146
78
|
export interface Config {
|
|
147
|
-
/** YAML or JSON path resolved from `ctx.baseUrl`. */
|
|
148
79
|
path: string
|
|
149
|
-
/** Entry list written when the file does not already exist. */
|
|
150
80
|
initial?: any[]
|
|
151
|
-
/** Runtime patches applied after reading the file. */
|
|
152
81
|
patches?: PatchOptions[]
|
|
153
|
-
/** Enables loader apply/reload/unload logs for this subtree. */
|
|
154
82
|
enableLogs?: boolean
|
|
155
83
|
}
|
|
156
84
|
}
|
|
157
85
|
|
|
158
|
-
/** Loader entry tree backed by a YAML or JSON file. */
|
|
159
86
|
export class Include extends EntryTree {
|
|
160
87
|
static inject = ['loader']
|
|
161
88
|
|
|
162
|
-
//
|
|
163
|
-
// entry and patch lists, so the Loader's `internal/config` interpolation
|
|
164
|
-
// keeps it literal — a `!!js` expression inside a nested row's config
|
|
165
|
-
// belongs to that row's fiber, resolving lazily in the row's own context.
|
|
166
|
-
// Include's own fields (`path`, `enableLogs`) therefore stay literal too.
|
|
89
|
+
// Child entries evaluate their expressions against their own injections.
|
|
167
90
|
static readonly [EntryGroup.key] = true
|
|
168
91
|
|
|
169
92
|
public filename: string
|
|
170
|
-
private type
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
private
|
|
174
|
-
|
|
175
|
-
private
|
|
176
|
-
|
|
93
|
+
private type: string
|
|
94
|
+
|
|
95
|
+
/** The last file state we read or wrote. */
|
|
96
|
+
private cache?: Snapshot
|
|
97
|
+
/** Tree-side changes that have not reached the file yet. */
|
|
98
|
+
private journal: Journal = new Map()
|
|
99
|
+
/** Ids we assigned to entries the file leaves anonymous. */
|
|
100
|
+
private anonymous = new Map<string, Anonymous>()
|
|
101
|
+
|
|
102
|
+
private dirtyRead = false
|
|
103
|
+
private dirtyWrite = false
|
|
104
|
+
private _draining?: Promise<void>
|
|
105
|
+
|
|
106
|
+
/** Only the latest intended tree is ever applied; older ones are skipped. */
|
|
107
|
+
private _pendingTree?: EntryOptions[]
|
|
108
|
+
private _applyTask?: Promise<void>
|
|
109
|
+
|
|
110
|
+
private _disposed = false
|
|
111
|
+
private _seq = 0
|
|
112
|
+
private persistenceError: unknown
|
|
177
113
|
|
|
178
114
|
constructor(ctx: Context, public config: Include.Config) {
|
|
179
115
|
super(ctx)
|
|
180
116
|
this.enableLogs = config.enableLogs ?? ctx.fiber.entry?.parent.tree.enableLogs ?? false
|
|
181
117
|
this.filename = fileURLToPath(new URL(this.config.path, this.ctx.baseUrl))
|
|
182
118
|
const ext = extname(this.filename)
|
|
183
|
-
if (!
|
|
119
|
+
if (!types[ext]) {
|
|
184
120
|
throw new Error(`extension "${ext}" not supported`)
|
|
185
121
|
}
|
|
186
|
-
this.type =
|
|
187
|
-
this.readonly = !this.type
|
|
122
|
+
this.type = types[ext]
|
|
188
123
|
this.ctx.baseUrl = new URL('.', pathToFileURL(this.filename)).href
|
|
124
|
+
ensureInsertIds(config.patches, id => !!this.store[id])
|
|
189
125
|
|
|
190
126
|
ctx.on('internal/update', (config, next) => {
|
|
191
127
|
if (config.path !== this.config.path) return next()
|
|
192
128
|
this.config = config
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
})
|
|
129
|
+
ensureInsertIds(config.patches, id => !!this.store[id])
|
|
130
|
+
this._scheduleApply()
|
|
131
|
+
return this._applyTask
|
|
197
132
|
})
|
|
198
133
|
}
|
|
199
134
|
|
|
200
|
-
private
|
|
201
|
-
|
|
202
|
-
try {
|
|
203
|
-
await access(this.filename, constants.W_OK)
|
|
204
|
-
} catch {
|
|
205
|
-
this.readonly = true
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
private async read(forced = false) {
|
|
210
|
-
const content = await readFile(this.filename, 'utf8')
|
|
211
|
-
if (!forced && this.content === content) return false
|
|
212
|
-
let data: any
|
|
213
|
-
if (this.type === 'application/yaml') {
|
|
214
|
-
data = yaml.load(content, { schema: entryListSchema })
|
|
215
|
-
} else if (this.type === 'application/json') {
|
|
216
|
-
data = JSON.parse(content)
|
|
217
|
-
} else {
|
|
218
|
-
const module = await import(/* @vite-ignore */ this.filename)
|
|
219
|
-
data = module.default || module
|
|
220
|
-
}
|
|
221
|
-
// An empty or truncated file (common mid-edit: editors and `sed -i` write
|
|
222
|
-
// through temp states) parses to `undefined`, not an error; reject every
|
|
223
|
-
// non-array shape here so callers see one "invalid file" signal. Content
|
|
224
|
-
// and data commit only on success, so an edit that is later reverted to
|
|
225
|
-
// the exact last good content correctly reads as "unchanged".
|
|
226
|
-
if (!Array.isArray(data)) {
|
|
227
|
-
throw new TypeError(`config file must be a top-level array of entries: ${this.filename}`)
|
|
228
|
-
}
|
|
229
|
-
this.content = content
|
|
230
|
-
this.data = data
|
|
231
|
-
await this.checkAccess()
|
|
232
|
-
return true
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
private applyPatches(data: EntryOptions[], patches = this.config.patches): EntryOptions[] {
|
|
236
|
-
return applyEntryPatches(data, patches, (message, ...args) => {
|
|
237
|
-
this.ctx.root.logger?.('loader').warn(message, ...args)
|
|
238
|
-
})
|
|
135
|
+
private warn = (format: string, ...args: any[]) => {
|
|
136
|
+
this.ctx.root.logger?.('loader').warn(format, ...args)
|
|
239
137
|
}
|
|
240
138
|
|
|
241
139
|
async* [Service.init]() {
|
|
242
140
|
try {
|
|
243
|
-
await this.
|
|
141
|
+
await this._read()
|
|
244
142
|
} catch (error) {
|
|
245
|
-
//
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
if (
|
|
249
|
-
if (this.config.initial) {
|
|
250
|
-
await this._writeFile(this.config.initial as any)
|
|
251
|
-
await this.read(true)
|
|
252
|
-
} else {
|
|
143
|
+
// only a missing file falls back to `initial`
|
|
144
|
+
const cause = error instanceof ConfigFileError && error.stage === 'read' ? error.cause : undefined
|
|
145
|
+
if (!isENOENT(cause)) throw error
|
|
146
|
+
if (!this.config.initial) {
|
|
253
147
|
throw new Error(`config file not found: ${this.filename}`)
|
|
254
148
|
}
|
|
149
|
+
const initial = structuredClone(this.config.initial) as EntryOptions[]
|
|
150
|
+
ensureIds(initial, id => !!this.store[id])
|
|
151
|
+
await this._writeText(this.dump(initial))
|
|
152
|
+
await this._read()
|
|
255
153
|
}
|
|
256
154
|
|
|
257
155
|
yield () => this.stop()
|
|
258
|
-
await this.
|
|
156
|
+
await this._applyTask
|
|
259
157
|
}
|
|
260
158
|
|
|
261
159
|
async stop() {
|
|
160
|
+
this._disposed = true
|
|
161
|
+
this._pendingTree = undefined
|
|
162
|
+
// Flush what the user last did before the tree goes away; this is also the
|
|
163
|
+
// last attempt for changes a failed write left in the journal.
|
|
164
|
+
if (this.journal.size) {
|
|
165
|
+
this.dirtyWrite = true
|
|
166
|
+
this._drain()
|
|
167
|
+
}
|
|
262
168
|
try {
|
|
263
|
-
await this.
|
|
169
|
+
await this.flush()
|
|
264
170
|
} finally {
|
|
265
171
|
this.root.stop()
|
|
266
|
-
await this.flushWrite()
|
|
267
172
|
}
|
|
268
173
|
}
|
|
269
174
|
|
|
270
175
|
/**
|
|
271
|
-
*
|
|
272
|
-
*
|
|
273
|
-
* tree: a hot-reload of a live app must never take the process down.
|
|
176
|
+
* Resolves once every pending read and write has been processed and the
|
|
177
|
+
* tree reflects the outcome. Retries pending writes and rejects while changes remain unsaved.
|
|
274
178
|
*/
|
|
275
|
-
async
|
|
179
|
+
async flush() {
|
|
180
|
+
if (this.journal.size && !this._draining) {
|
|
181
|
+
this.dirtyWrite = true
|
|
182
|
+
this._drain()
|
|
183
|
+
}
|
|
184
|
+
while (this._draining || this._applyTask) {
|
|
185
|
+
await this._draining
|
|
186
|
+
await this._applyTask
|
|
187
|
+
}
|
|
188
|
+
if (this.journal.size) {
|
|
189
|
+
throw this.persistenceError ?? new Error(`config file ${this.filename} has ${this.journal.size} unsaved change(s)`)
|
|
190
|
+
}
|
|
191
|
+
this.persistenceError = undefined
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/** Re-read the file and reconcile the tree with it. */
|
|
195
|
+
refresh() {
|
|
196
|
+
this.dirtyRead = true
|
|
197
|
+
this._drain()
|
|
198
|
+
return this.flush()
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/** Called synchronously by the loader once a tree-side change is in place. */
|
|
202
|
+
commit(change: EntryChange) {
|
|
203
|
+
this.context.emit('loader/config-update')
|
|
204
|
+
const parent = change.group === this.root ? null : change.group.ctx.fiber.entry!.options.id
|
|
205
|
+
record(this.journal, change, parent)
|
|
206
|
+
this.dirtyWrite = true
|
|
207
|
+
this._drain()
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
private _drain() {
|
|
211
|
+
if (this._draining) return
|
|
212
|
+
this._draining = this._loop().finally(() => {
|
|
213
|
+
this._draining = undefined
|
|
214
|
+
})
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
private async _loop() {
|
|
218
|
+
while (this.dirtyRead || this.dirtyWrite) {
|
|
219
|
+
if (this.dirtyRead) {
|
|
220
|
+
this.dirtyRead = false
|
|
221
|
+
try {
|
|
222
|
+
await this._read()
|
|
223
|
+
} catch (error) {
|
|
224
|
+
// Half-written files are routine while the user is editing, hence
|
|
225
|
+
// only a warning. With the file in an unknown state there is nothing
|
|
226
|
+
// safe to write: unless another read is due, stop here and leave
|
|
227
|
+
// `dirtyWrite` set for the next trigger.
|
|
228
|
+
this.persistenceError = error
|
|
229
|
+
this.ctx.logger.warn(error)
|
|
230
|
+
if (this.dirtyRead) continue
|
|
231
|
+
return
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
if (this.dirtyWrite) {
|
|
235
|
+
this.dirtyWrite = false
|
|
236
|
+
try {
|
|
237
|
+
await this._write()
|
|
238
|
+
} catch (error) {
|
|
239
|
+
this.persistenceError = error
|
|
240
|
+
this.ctx.logger.error(error)
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
private async _read() {
|
|
247
|
+
let content: string
|
|
248
|
+
try {
|
|
249
|
+
content = await readFile(this.filename, 'utf8')
|
|
250
|
+
} catch (error) {
|
|
251
|
+
throw new ConfigFileError('read', this.filename, error)
|
|
252
|
+
}
|
|
253
|
+
if (content === this.cache?.content) return
|
|
254
|
+
|
|
255
|
+
let data: any
|
|
276
256
|
try {
|
|
277
|
-
|
|
278
|
-
|
|
257
|
+
data = this.type === 'application/yaml'
|
|
258
|
+
? yaml.load(content, { schema })
|
|
259
|
+
: JSON.parse(content)
|
|
279
260
|
} catch (error) {
|
|
280
|
-
|
|
281
|
-
|
|
261
|
+
throw new ConfigFileError('parse', this.filename, error)
|
|
262
|
+
}
|
|
263
|
+
// An empty or truncated file (routine mid-edit) parses to `undefined`, so
|
|
264
|
+
// every non-array shape is rejected here as one "invalid file" signal.
|
|
265
|
+
if (!Array.isArray(data)) {
|
|
266
|
+
throw new ConfigFileError('validate', this.filename, new TypeError('config file must be a top-level array'))
|
|
282
267
|
}
|
|
268
|
+
|
|
269
|
+
this._assignIds(data)
|
|
270
|
+
|
|
271
|
+
if (this.cache) {
|
|
272
|
+
const index = new PatchIndex(this.config.patches ?? [])
|
|
273
|
+
const conflicts = reconcile(this.journal, flatten(this.cache.data), flatten(data), (id, key) => index.fileOwned(id, key))
|
|
274
|
+
for (const { id, reason } of conflicts) {
|
|
275
|
+
this.ctx.logger.error('config conflict in %C: entry %C %s; file wins', this.filename, id, reason)
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
this.cache = { content, data }
|
|
280
|
+
this._scheduleApply()
|
|
281
|
+
// the file changed while tree-side changes were pending: write the merge
|
|
282
|
+
if (this.journal.size) this.dirtyWrite = true
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
-
private async
|
|
286
|
-
if (this.
|
|
287
|
-
|
|
285
|
+
private async _write() {
|
|
286
|
+
if (!this.cache || !this.journal.size) return
|
|
287
|
+
const current = await readFile(this.filename, 'utf8').catch((error) => {
|
|
288
|
+
if (isENOENT(error)) return undefined
|
|
289
|
+
throw error
|
|
290
|
+
})
|
|
291
|
+
if (current === undefined) {
|
|
292
|
+
this.ctx.logger.warn('config file %C is missing, %d pending change(s) kept in memory', this.filename, this.journal.size)
|
|
293
|
+
return
|
|
288
294
|
}
|
|
289
|
-
if (this.
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
this.
|
|
295
|
+
if (current !== this.cache.content) {
|
|
296
|
+
// someone else wrote the file: merge first, then come back
|
|
297
|
+
this.dirtyRead = true
|
|
298
|
+
this.dirtyWrite = true
|
|
299
|
+
return
|
|
293
300
|
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
301
|
+
|
|
302
|
+
// Snapshot and swap: changes reported while we are writing belong to the
|
|
303
|
+
// next round.
|
|
304
|
+
const batch = this.journal
|
|
305
|
+
this.journal = new Map()
|
|
306
|
+
const restore = () => {
|
|
307
|
+
for (const [id, record] of this.journal) merge(batch, id, record)
|
|
308
|
+
this.journal = batch
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
const data = structuredClone(this.cache.data)
|
|
312
|
+
const patches = structuredClone(this.config.patches ?? [])
|
|
313
|
+
if (routeJournal(batch, data, patches, this.warn)) {
|
|
314
|
+
// Take the new patches now so that the tree scheduled below already
|
|
315
|
+
// reflects them; the round trip through the parent only persists them.
|
|
316
|
+
this.config = { ...this.config, patches }
|
|
317
|
+
if (this.ctx.fiber.entry) {
|
|
318
|
+
// Not awaited: the returned promise is the tree reconciliation, and
|
|
319
|
+
// the drain loop must not block on fibers.
|
|
320
|
+
try {
|
|
321
|
+
Promise.resolve(this.ctx.fiber.update(this.config)).catch((error) => {
|
|
322
|
+
this.ctx.logger.error(error)
|
|
323
|
+
})
|
|
324
|
+
} catch (error) {
|
|
325
|
+
this.ctx.logger.error(error)
|
|
326
|
+
}
|
|
327
|
+
} else {
|
|
328
|
+
this.ctx.logger.warn('patches of %C changed at runtime but cannot be persisted', this.filename)
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
// nothing for the file itself (patch-only changes, or ids we assigned to
|
|
333
|
+
// anonymous entries that are already part of the cache)
|
|
334
|
+
if (deepEqual(data, this.cache.data)) {
|
|
335
|
+
this._scheduleApply()
|
|
336
|
+
return
|
|
337
|
+
}
|
|
338
|
+
const text = this.dump(data)
|
|
339
|
+
|
|
340
|
+
try {
|
|
341
|
+
await access(this.filename, constants.W_OK)
|
|
342
|
+
} catch {
|
|
343
|
+
restore()
|
|
344
|
+
this.ctx.logger.warn('config file %C is read-only, %d pending change(s) kept in memory', this.filename, this.journal.size)
|
|
345
|
+
return
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
try {
|
|
349
|
+
await this._writeText(text, this.cache.content)
|
|
350
|
+
} catch (error) {
|
|
351
|
+
restore()
|
|
352
|
+
if (error instanceof StaleWriteError) {
|
|
353
|
+
this.dirtyRead = true
|
|
354
|
+
this.dirtyWrite = true
|
|
298
355
|
return
|
|
299
|
-
} catch (error) {
|
|
300
|
-
if (!retryableWriteError(error) || retry >= WRITE_RETRY_LIMIT) throw error
|
|
301
|
-
await delay((retry + 1) * WRITE_RETRY_DELAY_MS)
|
|
302
356
|
}
|
|
357
|
+
this.ctx.logger.warn('failed to write config file %C, %d pending change(s) kept in memory', this.filename, this.journal.size)
|
|
358
|
+
throw error
|
|
303
359
|
}
|
|
360
|
+
this.cache = { content: text, data }
|
|
361
|
+
this._scheduleApply()
|
|
304
362
|
}
|
|
305
363
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
364
|
+
/**
|
|
365
|
+
* Write through a temp file and a rename, so that no reader ever sees a
|
|
366
|
+
* truncated file. When `expected` is given, the rename (and every retry of
|
|
367
|
+
* it) only goes ahead while the file still holds that content.
|
|
368
|
+
*/
|
|
369
|
+
private async _writeText(text: string, expected?: string) {
|
|
370
|
+
const tmp = join(dirname(this.filename), `.${basename(this.filename)}.${process.pid}.${this._seq++}.tmp`)
|
|
371
|
+
try {
|
|
372
|
+
await writeFile(tmp, text)
|
|
373
|
+
for (let attempt = 0; ; attempt++) {
|
|
374
|
+
if (expected !== undefined) {
|
|
375
|
+
const current = await readFile(this.filename, 'utf8').catch((error) => {
|
|
376
|
+
if (isENOENT(error)) return undefined
|
|
377
|
+
throw error
|
|
378
|
+
})
|
|
379
|
+
if (current !== expected) throw new StaleWriteError()
|
|
380
|
+
}
|
|
381
|
+
try {
|
|
382
|
+
await rename(tmp, this.filename)
|
|
383
|
+
return
|
|
384
|
+
} catch (error) {
|
|
385
|
+
if (attempt >= RENAME_RETRIES || !isTransientRenameError(error)) throw error
|
|
386
|
+
}
|
|
387
|
+
await sleep(RENAME_BACKOFF * (attempt + 1))
|
|
388
|
+
}
|
|
389
|
+
} catch (error) {
|
|
390
|
+
await rm(tmp, { force: true }).catch(() => {})
|
|
391
|
+
throw error
|
|
392
|
+
}
|
|
312
393
|
}
|
|
313
394
|
|
|
314
|
-
private
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
this.pendingWrite = undefined
|
|
319
|
-
if (config === undefined) return this.writeQueue
|
|
320
|
-
const run = this.writeQueue.then(
|
|
321
|
-
() => this._writeFile(config),
|
|
322
|
-
() => this._writeFile(config),
|
|
323
|
-
)
|
|
324
|
-
this.writeQueue = run
|
|
325
|
-
void run.catch((error) => {
|
|
326
|
-
this.ctx.root.logger?.('loader').warn('failed to write config file %C', this.filename)
|
|
327
|
-
this.ctx.root.logger?.('loader').warn(error)
|
|
328
|
-
})
|
|
329
|
-
return run
|
|
395
|
+
private dump(data: EntryOptions[]) {
|
|
396
|
+
return this.type === 'application/yaml'
|
|
397
|
+
? yaml.dump(data, { schema })
|
|
398
|
+
: JSON.stringify(data, null, 2)
|
|
330
399
|
}
|
|
331
400
|
|
|
332
|
-
/**
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
401
|
+
/**
|
|
402
|
+
* Entries the file leaves anonymous get an id here, before the loader sees
|
|
403
|
+
* them. One that looks exactly like an entry we named on the previous read
|
|
404
|
+
* keeps that id, so editing a neighbor does not restart it; anything else
|
|
405
|
+
* gets a fresh id. Assigned ids stay in memory until the next write.
|
|
406
|
+
*/
|
|
407
|
+
private _assignIds(data: EntryOptions[]) {
|
|
408
|
+
const used = new Set<string>()
|
|
409
|
+
const pending: { options: EntryOptions; parent: string | null }[] = []
|
|
410
|
+
const walk = (entries: EntryOptions[], parent: string | null) => {
|
|
411
|
+
for (const options of entries) {
|
|
412
|
+
if (options.id) {
|
|
413
|
+
used.add(options.id)
|
|
414
|
+
} else {
|
|
415
|
+
pending.push({ options, parent })
|
|
416
|
+
}
|
|
417
|
+
if (options.group && Array.isArray(options.config)) {
|
|
418
|
+
walk(options.config, options.id ?? null)
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
walk(data, null)
|
|
423
|
+
|
|
424
|
+
const previous = this.anonymous
|
|
425
|
+
this.anonymous = new Map()
|
|
426
|
+
for (const { options, parent } of pending) {
|
|
427
|
+
let id: string | undefined
|
|
428
|
+
for (const [candidate, info] of previous) {
|
|
429
|
+
if (info.parent !== parent || !deepEqual(info.options, options)) continue
|
|
430
|
+
id = candidate
|
|
431
|
+
previous.delete(candidate)
|
|
432
|
+
break
|
|
433
|
+
}
|
|
434
|
+
if (!id) {
|
|
435
|
+
do {
|
|
436
|
+
id = Math.random().toString(16).slice(2, 10)
|
|
437
|
+
} while (used.has(id) || this.store[id])
|
|
438
|
+
}
|
|
439
|
+
used.add(id)
|
|
440
|
+
this.anonymous.set(id, { parent, options: structuredClone(options) })
|
|
441
|
+
const rest = { ...options }
|
|
442
|
+
for (const key of Object.keys(options)) delete options[key]
|
|
443
|
+
Object.assign(options, { id }, rest)
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
private _scheduleApply() {
|
|
448
|
+
if (this._disposed || !this.cache) return
|
|
449
|
+
const tree = applyPatches(this.cache.data, this.config.patches, this.warn)
|
|
450
|
+
this._pendingTree = applyJournal(tree, this.journal, undefined, this.warn)
|
|
451
|
+
this._applyTask ??= (async () => {
|
|
452
|
+
try {
|
|
453
|
+
while (this._pendingTree) {
|
|
454
|
+
const tree = this._pendingTree
|
|
455
|
+
this._pendingTree = undefined
|
|
456
|
+
await this.root.update(tree)
|
|
457
|
+
}
|
|
458
|
+
} finally {
|
|
459
|
+
this._applyTask = undefined
|
|
460
|
+
}
|
|
461
|
+
})()
|
|
336
462
|
}
|
|
337
463
|
}
|
|
338
464
|
|