@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,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Owns subagent startup, message admission, cold resume, and execution lifetimes.
|
|
3
3
|
* One child lock orders input acceptance and closure; one activation map owns
|
|
4
|
-
* capacity,
|
|
4
|
+
* capacity, runtime ownership, and resource release across all providers.
|
|
5
5
|
*
|
|
6
6
|
* @module @deepseek-ai/dsh-subagent/manager
|
|
7
7
|
*/
|
|
@@ -63,12 +63,12 @@ import { brandString } from '@deepseek-ai/dsh-brand';
|
|
|
63
63
|
import { ReasoningEffortId, contentHasImage, createUserMessage, errorChain } from '@deepseek-ai/dsh-llm';
|
|
64
64
|
import { SessionLogOffset } from '@deepseek-ai/dsh-session';
|
|
65
65
|
import { appendDelegatedPolicyOverrides, applyChildComposition, captureDelegatedPolicyOverrides, childSessionMeta, resolveChildAgentOptions, resolveChildDepth, } from "./child-agent.js";
|
|
66
|
-
import { createAgentMessage,
|
|
67
|
-
import {
|
|
66
|
+
import { createAgentMessage, createSettlementMessage, withResultDeliveryGuidance, } from "./continuation-messages.js";
|
|
67
|
+
import { installSubagentArchiveAdmission } from "./archive-admission.js";
|
|
68
68
|
import { foldSubagentDescriptor, snapshotSubagentDescriptor } from "./descriptor.js";
|
|
69
69
|
import { establishCatalogChild, establishExternalCatalogChild } from "./catalog.js";
|
|
70
70
|
import { SubagentError } from "./error.js";
|
|
71
|
-
import {
|
|
71
|
+
import { SubagentRunId } from "./types.js";
|
|
72
72
|
import { attachStructuredRuntime } from "./structured.js";
|
|
73
73
|
import { ActivationPool, ChildLock, activationAgent, captureLocalResult, observeLocalFailure, requireLocalActivation } from "./activation.js";
|
|
74
74
|
/** Render only the safe outer message from execution or teardown failures. */
|
|
@@ -90,34 +90,28 @@ export class SubagentManager {
|
|
|
90
90
|
locks = new ChildLock();
|
|
91
91
|
/** Structural Cordis owner of every Activation handle. */
|
|
92
92
|
ownerCtx;
|
|
93
|
-
/**
|
|
94
|
-
|
|
95
|
-
* observed under each root. Entries remain until that exact root leaves the
|
|
96
|
-
* Agent registry, closing admission throughout its host's teardown without
|
|
97
|
-
* poisoning a later same-id replacement.
|
|
98
|
-
*/
|
|
99
|
-
closingScopes = new Map();
|
|
93
|
+
/** Exact subagent tree roots whose host teardown has closed admission. */
|
|
94
|
+
closingRoots = new Set();
|
|
100
95
|
draining = false;
|
|
101
96
|
/**
|
|
102
97
|
* Build one manager inside the service's Agent-injected context.
|
|
103
98
|
* @param ctx - context providing Agents, Sessions, and teardown ownership.
|
|
104
|
-
* @param host -
|
|
99
|
+
* @param host - descriptor reads and lifecycle publication owned by the service.
|
|
105
100
|
* @param maxActiveSubagents - the current configured child capacity.
|
|
106
101
|
*/
|
|
107
102
|
constructor(ctx, host, maxActiveSubagents) {
|
|
108
103
|
this.ctx = ctx;
|
|
109
104
|
this.host = host;
|
|
110
105
|
this.maxActiveSubagents = maxActiveSubagents;
|
|
111
|
-
//
|
|
112
|
-
// cannot express the dynamic child graph. Register the private scope's
|
|
113
|
-
// structural disposer FIRST and the drain SECOND, so reverse unwind invokes
|
|
114
|
-
// the drain before releasing the scope; a cleanup effect on the same scope
|
|
115
|
-
// as the Agent handles would let structural handle disposal bypass
|
|
116
|
-
// child-first ordering.
|
|
106
|
+
// Drain managed instances before Cordis releases their owning scope.
|
|
117
107
|
const scope = ctx.plugin(function activationOwner() { });
|
|
118
108
|
this.ownerCtx = scope.ctx;
|
|
109
|
+
installSubagentArchiveAdmission(ctx, (agent) => {
|
|
110
|
+
const activation = this.resident.get(agent.id);
|
|
111
|
+
return activation !== undefined && activationAgent(activation) === agent ? activation.ancestors : undefined;
|
|
112
|
+
}, session => host.identityOf(session));
|
|
119
113
|
ctx.on('agent/disposed', ({ agent }) => {
|
|
120
|
-
this.
|
|
114
|
+
this.closingRoots.delete(agent);
|
|
121
115
|
});
|
|
122
116
|
ctx.effect(function* () {
|
|
123
117
|
yield scope.dispose;
|
|
@@ -127,7 +121,7 @@ export class SubagentManager {
|
|
|
127
121
|
/**
|
|
128
122
|
* Interrupt one live continuable child's current turn under the supplied authority.
|
|
129
123
|
* @param targetSessionId - the durable child session id to interrupt.
|
|
130
|
-
* @param authority -
|
|
124
|
+
* @param authority - a trusted user operation or exact live ancestor Agent.
|
|
131
125
|
*/
|
|
132
126
|
interrupt(targetSessionId, authority) {
|
|
133
127
|
if (authority.kind === 'ancestor') {
|
|
@@ -142,12 +136,8 @@ export class SubagentManager {
|
|
|
142
136
|
const activation = this.resident.get(targetSessionId);
|
|
143
137
|
if (activation === undefined)
|
|
144
138
|
return;
|
|
145
|
-
if (authority.kind === '
|
|
146
|
-
|
|
147
|
-
throw new SubagentError(`subagent "${targetSessionId}" belongs to another parent session`, 'UNAUTHORIZED');
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
else if (!activation.ancestry.has(authority.agent)) {
|
|
139
|
+
if (authority.kind === 'ancestor'
|
|
140
|
+
&& (this.rootOf(authority.agent) !== activation.root || !activation.ancestors.includes(authority.agent.id))) {
|
|
151
141
|
throw new SubagentError(`subagent "${targetSessionId}" is not a live descendant of agent "${authority.agent.id}"`, 'UNAUTHORIZED');
|
|
152
142
|
}
|
|
153
143
|
// Disposal already stopped the target with a whole-Activation teardown;
|
|
@@ -166,32 +156,27 @@ export class SubagentManager {
|
|
|
166
156
|
}
|
|
167
157
|
/**
|
|
168
158
|
* Close admission, await every already-admitted materialization through
|
|
169
|
-
* publication or rollback, then dispose
|
|
170
|
-
* child-first.
|
|
159
|
+
* publication or rollback, then dispose every agent in the subagent tree.
|
|
171
160
|
*/
|
|
172
161
|
async drain() {
|
|
173
162
|
this.draining = true;
|
|
174
163
|
for (const pending of this.materializations)
|
|
175
164
|
pending.controller.abort();
|
|
176
165
|
await Promise.all([...this.materializations].map(materialization => materialization.settled));
|
|
177
|
-
|
|
178
|
-
for (const activation of this.resident.values()) {
|
|
179
|
-
for (const child of activation.ownedChildren)
|
|
180
|
-
owned.add(child);
|
|
181
|
-
}
|
|
182
|
-
const roots = [...this.resident.values()].filter(activation => !owned.has(activation.childId));
|
|
183
|
-
await this.disposeRoots(roots, 'activation(s)');
|
|
166
|
+
await this.disposeRoots([...this.resident.values()], 'activation(s)');
|
|
184
167
|
}
|
|
185
168
|
/**
|
|
186
|
-
* Join progressing
|
|
187
|
-
* @param
|
|
188
|
-
* @returns whether work was joined and the host must recheck
|
|
169
|
+
* Join progressing subagent tree work for its root, leaving idle parked inboxes resident.
|
|
170
|
+
* @param root - exact live subagent tree root; ordinary members return false.
|
|
171
|
+
* @returns whether work was joined and the host must recheck root completion.
|
|
189
172
|
*/
|
|
190
|
-
async
|
|
173
|
+
async waitForTreeWork(root) {
|
|
174
|
+
if (this.rootOf(root) !== root)
|
|
175
|
+
return false;
|
|
191
176
|
let observed = false;
|
|
192
177
|
while (true) {
|
|
193
|
-
const pending = [...this.materializations].filter(item => item.
|
|
194
|
-
const children = [...this.resident.values()].filter(item =>
|
|
178
|
+
const pending = [...this.materializations].filter(item => item.root === root);
|
|
179
|
+
const children = [...this.resident.values()].filter(item => item.root === root);
|
|
195
180
|
observed ||= children.some(item => item.kind === 'local' && item.handle.agent.status !== 'idle');
|
|
196
181
|
await Promise.all(children.flatMap(item => item.kind === 'local' ? [item.handle.agent.whenIdle()] : []));
|
|
197
182
|
const waits = pending.map(item => item.settled);
|
|
@@ -204,13 +189,6 @@ export class SubagentManager {
|
|
|
204
189
|
waits.push(item.handle.agent.whenIdle());
|
|
205
190
|
continue;
|
|
206
191
|
}
|
|
207
|
-
if (item.ownedChildren.size > 0) {
|
|
208
|
-
// Published descendants are observed separately; preparation holds
|
|
209
|
-
// keep the owner pending until publication or rollback wakes it.
|
|
210
|
-
if ([...item.ownedChildren].some(id => !this.resident.has(id)))
|
|
211
|
-
waits.push(item.poke.promise);
|
|
212
|
-
continue;
|
|
213
|
-
}
|
|
214
192
|
const inbox = item.handle.agent.inbox;
|
|
215
193
|
if (item.failureAt === undefined && (inbox.nextTurn.length > 0 || inbox.nextStep.length > 0))
|
|
216
194
|
continue;
|
|
@@ -222,147 +200,82 @@ export class SubagentManager {
|
|
|
222
200
|
continue;
|
|
223
201
|
}
|
|
224
202
|
// A descendant can be published while whenIdle follows another child.
|
|
225
|
-
if ([...this.materializations].some(item => item.
|
|
226
|
-
|| [...this.resident.values()].some(item =>
|
|
227
|
-
&& item.ancestry.has(parent) && !children.includes(item)))
|
|
203
|
+
if ([...this.materializations].some(item => item.root === root && !pending.includes(item))
|
|
204
|
+
|| [...this.resident.values()].some(item => item.root === root && !children.includes(item)))
|
|
228
205
|
continue;
|
|
229
206
|
return observed;
|
|
230
207
|
}
|
|
231
208
|
}
|
|
232
209
|
/**
|
|
233
|
-
* Stop the
|
|
234
|
-
* @param parents - exact live roots whose
|
|
210
|
+
* Stop every member of the selected subagent trees; ordinary members do not close a subagent tree.
|
|
211
|
+
* @param parents - exact live subagent tree roots whose instances must stop.
|
|
235
212
|
*/
|
|
236
213
|
async drainDescendants(parents) {
|
|
237
|
-
const roots = new Set(parents.filter(
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
const targets = [];
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
&& activation.ancestry.has(root));
|
|
249
|
-
if (owners.length === 0)
|
|
250
|
-
continue;
|
|
251
|
-
targets.push(activation);
|
|
252
|
-
for (const owner of owners) {
|
|
253
|
-
const members = this.closingMembers(owner);
|
|
254
|
-
if (child !== undefined)
|
|
255
|
-
members.add(child);
|
|
256
|
-
for (const agent of lineage)
|
|
257
|
-
members.add(agent);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
const materializations = [...this.materializations].filter((materialization) => {
|
|
261
|
-
const owners = [...roots].filter(root => materialization.lineage.includes(root));
|
|
262
|
-
for (const owner of owners) {
|
|
263
|
-
const members = this.closingMembers(owner);
|
|
264
|
-
for (const agent of materialization.lineage)
|
|
265
|
-
members.add(agent);
|
|
266
|
-
}
|
|
267
|
-
if (owners.length > 0)
|
|
268
|
-
materialization.controller.abort();
|
|
269
|
-
return owners.length > 0;
|
|
270
|
-
});
|
|
271
|
-
const ownedTargets = new Set();
|
|
272
|
-
for (const activation of targets) {
|
|
273
|
-
for (const child of activation.ownedChildren)
|
|
274
|
-
ownedTargets.add(child);
|
|
275
|
-
}
|
|
276
|
-
const targetRoots = targets.filter(activation => !ownedTargets.has(activation.childId));
|
|
277
|
-
for (const activation of targets) {
|
|
278
|
-
const disposal = this.dispose(activation);
|
|
279
|
-
void disposal.catch(() => undefined);
|
|
280
|
-
}
|
|
281
|
-
await Promise.all(materializations.map(materialization => materialization.settled));
|
|
282
|
-
await this.disposeRoots(targetRoots, 'scoped activation(s)');
|
|
283
|
-
}
|
|
284
|
-
/**
|
|
285
|
-
* Release selected resident direct children of one exact live parent.
|
|
286
|
-
* @param parent - exact live direct parent authorizing the selected release.
|
|
287
|
-
* @param childIds - durable direct-child ids to release when resident.
|
|
288
|
-
*/
|
|
289
|
-
async drainChildren(parent, childIds) {
|
|
290
|
-
if (this.ctx.agents.get(parent.id) !== parent) {
|
|
291
|
-
throw new SubagentError('selected child teardown requires the exact live parent agent', 'UNAUTHORIZED');
|
|
292
|
-
}
|
|
293
|
-
const targets = [];
|
|
294
|
-
for (const childId of new Set(childIds)) {
|
|
295
|
-
const activation = this.resident.get(childId);
|
|
296
|
-
if (activation === undefined)
|
|
297
|
-
continue;
|
|
298
|
-
if (activation.parent.id !== parent.id || !activation.ancestry.has(parent)) {
|
|
299
|
-
throw new SubagentError(`subagent "${childId}" is not a direct child of agent "${parent.id}"`, 'UNAUTHORIZED');
|
|
300
|
-
}
|
|
301
|
-
targets.push(activation);
|
|
302
|
-
}
|
|
303
|
-
for (const activation of targets) {
|
|
304
|
-
const disposal = this.dispose(activation);
|
|
305
|
-
void disposal.catch(() => undefined);
|
|
306
|
-
}
|
|
307
|
-
await this.disposeRoots(targets, 'selected activation(s)');
|
|
214
|
+
const roots = new Set(parents.filter(root => this.ctx.agents.get(root.id) === root && this.rootOf(root) === root));
|
|
215
|
+
for (const root of roots)
|
|
216
|
+
this.closingRoots.add(root);
|
|
217
|
+
const pending = [...this.materializations].filter(item => roots.has(item.root));
|
|
218
|
+
for (const item of pending)
|
|
219
|
+
item.controller.abort();
|
|
220
|
+
const targets = [...this.resident.values()].filter(item => roots.has(item.root));
|
|
221
|
+
const disposal = this.disposeRoots(targets, 'scoped activation(s)');
|
|
222
|
+
const [disposed] = await Promise.allSettled([disposal, ...pending.map(item => item.settled)]);
|
|
223
|
+
if (disposed.status === 'rejected')
|
|
224
|
+
throw disposed.reason;
|
|
308
225
|
}
|
|
309
226
|
/**
|
|
310
227
|
* Start one continuable background child and resolve at initial inbox acceptance.
|
|
311
228
|
* Every earlier failure disposes any created handle and rolls back Activation
|
|
312
|
-
* and
|
|
229
|
+
* and its capacity slot without returning either id.
|
|
313
230
|
* @param spec - provider, delegation request, and caller cancellation.
|
|
231
|
+
* @param prepare - creation contribution bound to the checked provider.
|
|
314
232
|
* @returns the durable child id and accepted initial prompt message id.
|
|
315
233
|
*/
|
|
316
|
-
async startLocal(spec) {
|
|
317
|
-
const
|
|
318
|
-
const parent = request.parent;
|
|
234
|
+
async startLocal(spec, prepare) {
|
|
235
|
+
const parent = spec.parent;
|
|
319
236
|
this.assertAdmitting(parent);
|
|
320
|
-
const
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
const releaseHold = this.holdOwnership(parent, childId);
|
|
346
|
-
try {
|
|
347
|
-
const cwd = await this.resolveDirectory(request, spec.signal);
|
|
348
|
-
const prepared = await this.host.prepareContinuable(spec.provider, {
|
|
237
|
+
const ancestry = this.ancestryForChild(parent);
|
|
238
|
+
return this.trackStartup(ancestry.root, spec.signal, async (signal) => {
|
|
239
|
+
const persistence = spec.delivery === 'caller' ? this.ctx.get('sessionPersistence') : this.requirePersistence();
|
|
240
|
+
const childId = spec.childId ?? brandString(randomUUID());
|
|
241
|
+
this.assertChildIdAvailable(childId);
|
|
242
|
+
const childDepth = resolveChildDepth(parent, spec.maxDepth);
|
|
243
|
+
// Snapshot before any await: invalid descriptor JSON rejects the call
|
|
244
|
+
// before a child exists, and the detached value is what reaches the log.
|
|
245
|
+
const agentOptions = resolveChildAgentOptions(parent, spec.agentOptions, childDepth);
|
|
246
|
+
const agentProvider = agentOptions.provider;
|
|
247
|
+
const agentModel = agentOptions.model;
|
|
248
|
+
const agentReasoningEffort = agentOptions.reasoningEffort;
|
|
249
|
+
const descriptor = snapshotSubagentDescriptor({
|
|
250
|
+
mode: 'continuable',
|
|
251
|
+
provider: spec.provider,
|
|
252
|
+
label: spec.label,
|
|
253
|
+
...agentProvider !== undefined ? { agentProvider } : {},
|
|
254
|
+
...agentModel !== undefined ? { agentModel } : {},
|
|
255
|
+
...agentReasoningEffort !== undefined ? { agentReasoningEffort } : {},
|
|
256
|
+
});
|
|
257
|
+
// Capture before the first await: a later parent switch belongs to the
|
|
258
|
+
// parent's future, not to this child.
|
|
259
|
+
const delegatedPolicies = captureDelegatedPolicyOverrides(parent);
|
|
260
|
+
const cwd = await this.resolveDirectory(spec, signal);
|
|
261
|
+
const prepared = await prepare({
|
|
349
262
|
sessionId: childId,
|
|
350
263
|
cwd,
|
|
351
264
|
parent,
|
|
352
|
-
signal
|
|
265
|
+
signal,
|
|
353
266
|
});
|
|
354
|
-
|
|
267
|
+
signal.throwIfAborted();
|
|
355
268
|
this.assertAdmitting(parent);
|
|
356
269
|
const inheritedEventCount = SessionLogOffset(prepared.seed?.length ?? 0);
|
|
357
270
|
const seed = prepared.seed;
|
|
358
271
|
let established;
|
|
359
272
|
const messageId = await this.locks.run(childId, async () => {
|
|
360
|
-
|
|
273
|
+
signal.throwIfAborted();
|
|
361
274
|
this.assertAdmitting(parent);
|
|
362
275
|
this.assertChildIdAvailable(childId);
|
|
363
276
|
if (spec.childId !== undefined) {
|
|
364
|
-
const persisted = await persistence?.stat(childId, { signal:
|
|
365
|
-
|
|
277
|
+
const persisted = await persistence?.stat(childId, { signal: signal });
|
|
278
|
+
signal.throwIfAborted();
|
|
366
279
|
this.assertAdmitting(parent);
|
|
367
280
|
this.assertChildIdAvailable(childId);
|
|
368
281
|
if (persisted !== undefined) {
|
|
@@ -373,84 +286,80 @@ export class SubagentManager {
|
|
|
373
286
|
kind: 'local',
|
|
374
287
|
childId,
|
|
375
288
|
provider: spec.provider,
|
|
376
|
-
|
|
289
|
+
...ancestry,
|
|
377
290
|
create: {
|
|
291
|
+
parent,
|
|
378
292
|
cwd,
|
|
379
293
|
seed,
|
|
380
|
-
meta: childSessionMeta(parent, childDepth, prepared.seed !== undefined,
|
|
294
|
+
meta: childSessionMeta(parent, childDepth, prepared.seed !== undefined, spec.agentPreset),
|
|
381
295
|
inheritedEventCount,
|
|
382
296
|
delegatedPolicies,
|
|
383
297
|
descriptor,
|
|
384
298
|
},
|
|
385
299
|
agentOptions,
|
|
386
|
-
composition: { agentPreset:
|
|
387
|
-
signal
|
|
300
|
+
composition: { agentPreset: spec.agentPreset },
|
|
301
|
+
signal,
|
|
388
302
|
delivery: spec.delivery,
|
|
389
|
-
outputSchema: spec.
|
|
303
|
+
outputSchema: spec.outputSchema,
|
|
390
304
|
});
|
|
391
305
|
established = activation;
|
|
392
306
|
const child = requireLocalActivation(activation).handle.agent;
|
|
393
307
|
const childHeader = child.session.header;
|
|
394
|
-
return await this.submitMaterialized(activation, spec.delivery !== 'caller'
|
|
395
|
-
?
|
|
396
|
-
:
|
|
308
|
+
return await this.submitMaterialized(activation, spec.delivery !== 'caller'
|
|
309
|
+
? withResultDeliveryGuidance(spec.prompt)
|
|
310
|
+
: spec.prompt, { source: { kind: 'user' }, signal, delivery: 'queue', authorize: () => { this.assertAdmitting(parent); } }, ancestry.root, () => {
|
|
311
|
+
this.assertAdmitting(parent);
|
|
397
312
|
establishCatalogChild(parent.session, childHeader, descriptor);
|
|
398
313
|
});
|
|
399
314
|
});
|
|
400
315
|
return { ...this.receipt(established), childId, messageId };
|
|
401
|
-
}
|
|
402
|
-
catch (error) {
|
|
403
|
-
releaseHold();
|
|
404
|
-
throw error;
|
|
405
|
-
}
|
|
316
|
+
});
|
|
406
317
|
}
|
|
407
318
|
/**
|
|
408
319
|
* Start an external backend under activation ownership.
|
|
409
320
|
* @param spec - task, provider, cancellation, and delivery policy.
|
|
321
|
+
* @param start - execution bound to the checked provider.
|
|
410
322
|
* @returns the accepted activation and its result/disposal capabilities.
|
|
411
323
|
*/
|
|
412
|
-
async startExternal(spec) {
|
|
413
|
-
const
|
|
324
|
+
async startExternal(spec, start) {
|
|
325
|
+
const { provider, delivery, childId: _childId, ...request } = spec;
|
|
326
|
+
const parent = request.parent;
|
|
414
327
|
this.assertAdmitting(parent);
|
|
415
|
-
const
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
})
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
if (spec.delivery === 'parent') {
|
|
435
|
-
establishExternalCatalogChild(parent.session, activation.childId, spec.label);
|
|
436
|
-
}
|
|
437
|
-
this.announce(activation);
|
|
438
|
-
return this.receipt(activation);
|
|
439
|
-
}
|
|
440
|
-
catch (error) {
|
|
441
|
-
if (activation !== undefined) {
|
|
442
|
-
try {
|
|
443
|
-
await this.dispose(activation);
|
|
328
|
+
const ancestry = this.ancestryForChild(parent);
|
|
329
|
+
return this.trackStartup(ancestry.root, spec.signal, async (signal) => {
|
|
330
|
+
let activation;
|
|
331
|
+
try {
|
|
332
|
+
const cwd = await this.resolveDirectory(spec, signal);
|
|
333
|
+
activation = await this.materialize({
|
|
334
|
+
kind: 'external',
|
|
335
|
+
provider,
|
|
336
|
+
...ancestry,
|
|
337
|
+
signal,
|
|
338
|
+
delivery,
|
|
339
|
+
start: signal => start({
|
|
340
|
+
...request, cwd, signal,
|
|
341
|
+
}),
|
|
342
|
+
});
|
|
343
|
+
this.assertAdmitting(parent);
|
|
344
|
+
signal.throwIfAborted();
|
|
345
|
+
if (delivery === 'parent') {
|
|
346
|
+
establishExternalCatalogChild(parent.session, activation.childId, spec.label);
|
|
444
347
|
}
|
|
445
|
-
|
|
446
|
-
|
|
348
|
+
this.accept(activation);
|
|
349
|
+
return this.receipt(activation);
|
|
350
|
+
}
|
|
351
|
+
catch (error) {
|
|
352
|
+
if (activation !== undefined) {
|
|
353
|
+
try {
|
|
354
|
+
await this.dispose(activation);
|
|
355
|
+
}
|
|
356
|
+
catch (cleanupError) {
|
|
357
|
+
this.ctx.logger.warn(`subagent "${activation.childId}" admission rollback failed: ${failureMessage(cleanupError)}`);
|
|
358
|
+
}
|
|
447
359
|
}
|
|
360
|
+
throw error;
|
|
448
361
|
}
|
|
449
|
-
|
|
450
|
-
}
|
|
451
|
-
finally {
|
|
452
|
-
releaseHold();
|
|
453
|
-
}
|
|
362
|
+
});
|
|
454
363
|
}
|
|
455
364
|
/** Capture the explicit or inherited directory while the parent still owns startup. */
|
|
456
365
|
async resolveDirectory(request, signal) {
|
|
@@ -461,59 +370,126 @@ export class SubagentManager {
|
|
|
461
370
|
return cwd;
|
|
462
371
|
}
|
|
463
372
|
/**
|
|
464
|
-
*
|
|
465
|
-
*
|
|
466
|
-
*
|
|
467
|
-
* @
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
373
|
+
* Resolve the live subagent tree root from runtime ownership, independent of creator residency.
|
|
374
|
+
* @param caller - exact live Agent selecting the subagent tree.
|
|
375
|
+
* @returns the live subagent tree root.
|
|
376
|
+
* @throws when the caller has no active runtime owner.
|
|
377
|
+
*/
|
|
378
|
+
rootOf(caller) {
|
|
379
|
+
if (this.ctx.agents.get(caller.id) !== caller) {
|
|
380
|
+
throw new SubagentError('subagent tree access requires the exact live caller', 'UNAUTHORIZED');
|
|
381
|
+
}
|
|
382
|
+
const identity = this.host.identityOf(caller.session);
|
|
383
|
+
const delegated = caller.session.header.origin === 'subagent' || identity != null && caller.session.isOwnSeq(identity.seq);
|
|
384
|
+
const activation = this.resident.get(caller.id);
|
|
385
|
+
if (activation !== undefined && activationAgent(activation) === caller
|
|
386
|
+
&& this.ctx.agents.get(activation.root.id) === activation.root)
|
|
387
|
+
return activation.root;
|
|
388
|
+
if (delegated || activation !== undefined) {
|
|
389
|
+
throw new SubagentError('agent has no active runtime owner', 'UNAUTHORIZED');
|
|
390
|
+
}
|
|
391
|
+
return caller;
|
|
392
|
+
}
|
|
393
|
+
/** Capture creation ancestry separately from the root that owns the new instance. */
|
|
394
|
+
ancestryForChild(creator) {
|
|
395
|
+
const root = this.rootOf(creator);
|
|
396
|
+
const ancestors = this.resident.get(creator.id)?.ancestors ?? [];
|
|
397
|
+
return { root, ancestors: [...ancestors, creator.id] };
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Deliver to another agent in the subagent tree, restoring only the target when absent.
|
|
401
|
+
* @param sender - exact live root or resident continuable Agent.
|
|
402
|
+
* @param targetId - another member's durable Session id.
|
|
403
|
+
* @param content - model-authored message blocks.
|
|
404
|
+
* @param options - cancellation before inbox acceptance.
|
|
405
|
+
* @returns the accepted inbox message id.
|
|
472
406
|
*/
|
|
473
407
|
async sendMessage(sender, targetId, content, options) {
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
408
|
+
options.signal.throwIfAborted();
|
|
409
|
+
const root = this.rootOf(sender);
|
|
410
|
+
if (sender.id === targetId)
|
|
411
|
+
throw new SubagentError('send_message requires another agent in the subagent tree', 'UNAUTHORIZED');
|
|
477
412
|
this.assertAdmitting(sender);
|
|
478
|
-
const
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
}
|
|
489
|
-
return this.deliverToChild(sender, targetId, content, {
|
|
490
|
-
signal: options.signal,
|
|
491
|
-
delivery: 'steer',
|
|
413
|
+
const message = createAgentMessage(sender, content);
|
|
414
|
+
const activation = this.resident.get(sender.id);
|
|
415
|
+
return this.deliverToMember(root, targetId, [...message.content], {
|
|
416
|
+
signal: options.signal, delivery: 'steer', source: message.source,
|
|
417
|
+
authorize: () => { this.assertAdmitting(sender); },
|
|
418
|
+
onAccepted: () => {
|
|
419
|
+
if (activation?.kind === 'local' && activation.ancestors.at(-1) === targetId) {
|
|
420
|
+
activation.omitClosingText = true;
|
|
421
|
+
}
|
|
422
|
+
},
|
|
492
423
|
});
|
|
493
424
|
}
|
|
494
|
-
/**
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
425
|
+
/** Resolve the live owner through verified creation edges without activating ancestors. */
|
|
426
|
+
async resolveCreationAncestry(source, signal, root) {
|
|
427
|
+
const ancestors = [];
|
|
428
|
+
const seen = new Set([source.header.id]);
|
|
429
|
+
let { header, projections, inheritedEventCount } = source;
|
|
430
|
+
while (true) {
|
|
431
|
+
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
432
|
+
try {
|
|
433
|
+
signal.throwIfAborted();
|
|
434
|
+
const parentId = header.parentSession;
|
|
435
|
+
const identity = projections?.values.subagent;
|
|
436
|
+
if (parentId === undefined || identity == null || identity.seq < inheritedEventCount)
|
|
437
|
+
break;
|
|
438
|
+
if (seen.has(parentId))
|
|
439
|
+
throw new SubagentError('cyclic subagent creation ancestry', 'UNAUTHORIZED');
|
|
440
|
+
seen.add(parentId);
|
|
441
|
+
const parent = __addDisposableResource(env_1, await this.observeContinuation(parentId, signal), false);
|
|
442
|
+
if (!parent.projections?.values.subagentCatalog?.some(entry => entry.id === header.id)) {
|
|
443
|
+
throw new SubagentError('subagent is absent from its creator catalog', 'UNAUTHORIZED');
|
|
444
|
+
}
|
|
445
|
+
ancestors.unshift(parentId);
|
|
446
|
+
if (parentId === root?.id)
|
|
447
|
+
return { root, ancestors };
|
|
448
|
+
({ header, projections, inheritedEventCount } = parent);
|
|
449
|
+
}
|
|
450
|
+
catch (e_1) {
|
|
451
|
+
env_1.error = e_1;
|
|
452
|
+
env_1.hasError = true;
|
|
453
|
+
}
|
|
454
|
+
finally {
|
|
455
|
+
__disposeResources(env_1);
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
if (root === undefined && ancestors.length > 0 && header.origin !== 'subagent') {
|
|
459
|
+
const owner = this.ctx.agents.get(header.id);
|
|
460
|
+
if (owner === undefined || this.rootOf(owner) !== owner) {
|
|
461
|
+
throw new SubagentError('subagent tree root is not live', 'CONTINUATION_UNAVAILABLE');
|
|
462
|
+
}
|
|
463
|
+
return { root: owner, ancestors };
|
|
464
|
+
}
|
|
465
|
+
throw new SubagentError(`agent "${source.header.id}" is not a member of this subagent tree`, 'UNAUTHORIZED');
|
|
505
466
|
}
|
|
506
467
|
/**
|
|
507
|
-
*
|
|
508
|
-
*
|
|
509
|
-
* @param childId - durable
|
|
468
|
+
* Deliver one host-authored prompt through the target's live subagent tree root.
|
|
469
|
+
* Remote callers must be authorized for the target Session before invoking this operation.
|
|
470
|
+
* @param childId - durable continuable subagent session id.
|
|
510
471
|
* @param content - model-visible prompt blocks.
|
|
511
|
-
* @param
|
|
512
|
-
* @param signal - caller cancellation before inbox acceptance.
|
|
472
|
+
* @param options - inbox destination, durable attribution, and cancellation before acceptance.
|
|
513
473
|
* @returns the accepted durable message id.
|
|
514
474
|
*/
|
|
515
|
-
async
|
|
516
|
-
|
|
475
|
+
async deliverPrompt(childId, content, options) {
|
|
476
|
+
options.signal.throwIfAborted();
|
|
477
|
+
let root = this.resident.get(childId)?.root;
|
|
478
|
+
if (root === undefined) {
|
|
479
|
+
const env_2 = { stack: [], error: void 0, hasError: false };
|
|
480
|
+
try {
|
|
481
|
+
const source = __addDisposableResource(env_2, await this.observeContinuation(childId, options.signal), false);
|
|
482
|
+
({ root } = await this.resolveCreationAncestry(source, options.signal));
|
|
483
|
+
}
|
|
484
|
+
catch (e_2) {
|
|
485
|
+
env_2.error = e_2;
|
|
486
|
+
env_2.hasError = true;
|
|
487
|
+
}
|
|
488
|
+
finally {
|
|
489
|
+
__disposeResources(env_2);
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
return this.deliverToMember(root, childId, content, options);
|
|
517
493
|
}
|
|
518
494
|
/** Admit local input synchronously before any teardown can begin. */
|
|
519
495
|
deliver(activation, message, delivery) {
|
|
@@ -538,38 +514,6 @@ export class SubagentManager {
|
|
|
538
514
|
throw new SubagentError(`subagent "${childId}" already exists`, 'DUPLICATE_CHILD');
|
|
539
515
|
}
|
|
540
516
|
}
|
|
541
|
-
/**
|
|
542
|
-
* Pre-register `childId` in a continuation-managed parent's owned set so the
|
|
543
|
-
* parent cannot settle while a caller is still establishing or resuming that
|
|
544
|
-
* child. Returns a releaser for the failure path; it removes only a hold
|
|
545
|
-
* this call added, and leaves ownership in place once a live Activation for
|
|
546
|
-
* the child exists.
|
|
547
|
-
* @param parent - the live direct parent the operation is admitted under.
|
|
548
|
-
* @param childId - the durable child the operation addresses.
|
|
549
|
-
* @returns the failure-path releaser; a no-op when nothing was added.
|
|
550
|
-
*/
|
|
551
|
-
holdOwnership(parent, childId) {
|
|
552
|
-
const parentActivation = this.resident.get(parent.id);
|
|
553
|
-
if (parentActivation === undefined || activationAgent(parentActivation) !== parent)
|
|
554
|
-
return () => { };
|
|
555
|
-
if (parentActivation.closing !== undefined) {
|
|
556
|
-
throw new SubagentError(`subagent parent "${parent.id}" is being disposed; the child was not established`, 'ACTIVATION_CLOSING');
|
|
557
|
-
}
|
|
558
|
-
if (parentActivation.ownedChildren.has(childId))
|
|
559
|
-
return () => { };
|
|
560
|
-
parentActivation.ownedChildren.add(childId);
|
|
561
|
-
return () => {
|
|
562
|
-
const live = this.resident.get(childId);
|
|
563
|
-
/* v8 ignore next 4 -- reaching this arm needs another delivery to establish the child
|
|
564
|
-
* between this operation's failure and its releaser running, which no test can schedule
|
|
565
|
-
* deterministically: the ownership edge then belongs to that live Activation, so the
|
|
566
|
-
* conservative keep leaves it for finishDisposal's releaseOwnership. */
|
|
567
|
-
if (live !== undefined && live.closing === undefined)
|
|
568
|
-
return;
|
|
569
|
-
if (parentActivation.ownedChildren.delete(childId))
|
|
570
|
-
this.wake(parentActivation);
|
|
571
|
-
};
|
|
572
|
-
}
|
|
573
517
|
/**
|
|
574
518
|
* Apply activation admission to a resident parent before delivering input.
|
|
575
519
|
* @param parent - exact live Agent receiving the message.
|
|
@@ -593,34 +537,20 @@ export class SubagentManager {
|
|
|
593
537
|
parent.followup(message);
|
|
594
538
|
}
|
|
595
539
|
/**
|
|
596
|
-
* Reject new
|
|
597
|
-
* @param agent - exact live
|
|
540
|
+
* Reject new work from closing members or subagent trees.
|
|
541
|
+
* @param agent - exact live caller whose instance and subagent tree must admit work.
|
|
598
542
|
*/
|
|
599
543
|
assertAdmitting(agent) {
|
|
600
544
|
const closing = this.closingTeardownFor(agent);
|
|
601
|
-
if (closing === undefined)
|
|
545
|
+
if (closing === undefined) {
|
|
546
|
+
if (this.resident.get(agent.id)?.closing !== undefined) {
|
|
547
|
+
throw new SubagentError(`subagent "${agent.id}" is closing`, 'ACTIVATION_CLOSING');
|
|
548
|
+
}
|
|
602
549
|
return;
|
|
550
|
+
}
|
|
603
551
|
throw new SubagentError(closing === 'manager'
|
|
604
552
|
? 'subagents are draining; the operation was not admitted'
|
|
605
|
-
: `
|
|
606
|
-
}
|
|
607
|
-
/**
|
|
608
|
-
* Authorize one operation against the durable direct-parent lineage.
|
|
609
|
-
* @param parent - exact live Agent claiming direct-parent authority.
|
|
610
|
-
* @param childId - durable child session id addressed by the operation.
|
|
611
|
-
* @param parentSession - durable direct-parent id recorded by the child.
|
|
612
|
-
*/
|
|
613
|
-
authorizeLineage(parent, childId, parentSession) {
|
|
614
|
-
this.assertLiveParent(parent, childId);
|
|
615
|
-
if (parentSession !== parent.id) {
|
|
616
|
-
throw new SubagentError(`subagent "${childId}" belongs to another parent session`, 'UNAUTHORIZED');
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
/** Reject parent authority after the live registry entry changes. */
|
|
620
|
-
assertLiveParent(parent, childId) {
|
|
621
|
-
if (this.ctx.agents.get(parent.id) !== parent) {
|
|
622
|
-
throw new SubagentError(`subagent "${childId}" delivery requires the exact live parent agent`, 'UNAUTHORIZED');
|
|
623
|
-
}
|
|
553
|
+
: `subagent tree "${closing.id}" is draining; the operation was not admitted`, 'DRAINING');
|
|
624
554
|
}
|
|
625
555
|
/**
|
|
626
556
|
* Create or resume one child Agent and publish its Activation.
|
|
@@ -628,23 +558,26 @@ export class SubagentManager {
|
|
|
628
558
|
* @returns the published process-local Activation.
|
|
629
559
|
*/
|
|
630
560
|
materialize(inputs) {
|
|
631
|
-
this.assertAdmitting(inputs.
|
|
561
|
+
this.assertAdmitting(inputs.root);
|
|
632
562
|
inputs.signal.throwIfAborted();
|
|
633
|
-
const
|
|
634
|
-
const pool = this.resident.get(inputs.parent.id)?.pool ?? this.rootPool(inputs.parent);
|
|
563
|
+
const pool = this.rootPool(inputs.root);
|
|
635
564
|
const releaseSlot = pool.reserve(this.maxActiveSubagents());
|
|
565
|
+
return this.materializeTracked(inputs, releaseSlot).catch((error) => {
|
|
566
|
+
releaseSlot();
|
|
567
|
+
throw error;
|
|
568
|
+
});
|
|
569
|
+
}
|
|
570
|
+
/** Keep subagent tree shutdown and host waits joined to preparation, publication, and rollback. */
|
|
571
|
+
trackStartup(root, signal, start) {
|
|
572
|
+
this.assertAdmitting(root);
|
|
573
|
+
signal.throwIfAborted();
|
|
636
574
|
const settled = Promise.withResolvers();
|
|
637
575
|
const controller = new AbortController();
|
|
638
|
-
const materialization = {
|
|
639
|
-
lineage,
|
|
640
|
-
settled: settled.promise,
|
|
641
|
-
controller,
|
|
642
|
-
};
|
|
576
|
+
const materialization = { root, settled: settled.promise, controller };
|
|
643
577
|
this.materializations.add(materialization);
|
|
644
|
-
return
|
|
645
|
-
releaseSlot();
|
|
578
|
+
return start(AbortSignal.any([signal, controller.signal])).catch((error) => {
|
|
646
579
|
if (error instanceof Error && error.name === 'AbortError')
|
|
647
|
-
this.assertAdmitting(
|
|
580
|
+
this.assertAdmitting(root);
|
|
648
581
|
throw error;
|
|
649
582
|
}).finally(() => {
|
|
650
583
|
this.materializations.delete(materialization);
|
|
@@ -685,42 +618,14 @@ export class SubagentManager {
|
|
|
685
618
|
+ reasons.map(reason => failureMessage(reason)).join('; '), 'ACTIVATION_TEARDOWN_FAILED');
|
|
686
619
|
}
|
|
687
620
|
}
|
|
688
|
-
/** Return the
|
|
689
|
-
closingMembers(root) {
|
|
690
|
-
const existing = this.closingScopes.get(root);
|
|
691
|
-
if (existing !== undefined)
|
|
692
|
-
return existing;
|
|
693
|
-
const members = new Set();
|
|
694
|
-
this.closingScopes.set(root, members);
|
|
695
|
-
return members;
|
|
696
|
-
}
|
|
697
|
-
/** Return the exact currently resolvable ancestry from `agent` upward. */
|
|
698
|
-
liveLineage(agent) {
|
|
699
|
-
const lineage = [agent];
|
|
700
|
-
const seen = new Set([agent.id]);
|
|
701
|
-
let parentSession = agent.session.header.parentSession;
|
|
702
|
-
while (parentSession !== undefined) {
|
|
703
|
-
const parent = this.ctx.agents.get(parentSession);
|
|
704
|
-
if (parent === undefined || seen.has(parent.id))
|
|
705
|
-
break;
|
|
706
|
-
lineage.push(parent);
|
|
707
|
-
seen.add(parent.id);
|
|
708
|
-
parentSession = parent.session.header.parentSession;
|
|
709
|
-
}
|
|
710
|
-
return lineage;
|
|
711
|
-
}
|
|
712
|
-
/** Return the teardown that closed continuable admission for this agent's lineage. */
|
|
621
|
+
/** Return the subagent tree teardown that closed admission for this exact Agent. */
|
|
713
622
|
closingTeardownFor(agent) {
|
|
714
623
|
if (this.draining)
|
|
715
624
|
return 'manager';
|
|
716
|
-
const
|
|
717
|
-
|
|
718
|
-
if (members.has(agent) || lineage.includes(root))
|
|
719
|
-
return root;
|
|
720
|
-
}
|
|
721
|
-
return undefined;
|
|
625
|
+
const root = this.rootOf(agent);
|
|
626
|
+
return this.closingRoots.has(root) ? root : undefined;
|
|
722
627
|
}
|
|
723
|
-
/**
|
|
628
|
+
/** Share one capacity pool across every instance in a subagent tree. */
|
|
724
629
|
rootPool(parent) {
|
|
725
630
|
let pool = this.rootPools.get(parent);
|
|
726
631
|
if (pool === undefined) {
|
|
@@ -730,9 +635,8 @@ export class SubagentManager {
|
|
|
730
635
|
return pool;
|
|
731
636
|
}
|
|
732
637
|
/** Perform one tracked materialization through publication or rollback. */
|
|
733
|
-
async materializeTracked(inputs,
|
|
734
|
-
const { provider,
|
|
735
|
-
let childId = inputs.childId;
|
|
638
|
+
async materializeTracked(inputs, releaseSlot) {
|
|
639
|
+
const { provider, root } = inputs;
|
|
736
640
|
inputs.signal.throwIfAborted();
|
|
737
641
|
let resource;
|
|
738
642
|
if (inputs.kind === 'external') {
|
|
@@ -743,9 +647,8 @@ export class SubagentManager {
|
|
|
743
647
|
const run = await inputs.start(controller.signal);
|
|
744
648
|
resource = { kind: 'external', run, controller };
|
|
745
649
|
void run.result.catch(() => undefined);
|
|
746
|
-
childId = run.id;
|
|
747
650
|
try {
|
|
748
|
-
this.assertChildIdAvailable(
|
|
651
|
+
this.assertChildIdAvailable(run.id);
|
|
749
652
|
}
|
|
750
653
|
catch (error) {
|
|
751
654
|
await run.dispose();
|
|
@@ -757,20 +660,20 @@ export class SubagentManager {
|
|
|
757
660
|
}
|
|
758
661
|
}
|
|
759
662
|
else {
|
|
760
|
-
const { create } = inputs;
|
|
663
|
+
const { create, childId } = inputs;
|
|
761
664
|
let structured;
|
|
762
665
|
const setup = async (childCtx, child) => {
|
|
763
666
|
// Only fresh creation appends the descriptor and delegated policy after
|
|
764
667
|
// the inherited marker; a cold resume replays those persisted events.
|
|
765
668
|
if (inputs.composition.agentPreset !== undefined) {
|
|
766
|
-
await applyChildComposition(childCtx, parent, inputs.composition);
|
|
669
|
+
await applyChildComposition(childCtx, create?.parent, inputs.composition);
|
|
767
670
|
}
|
|
768
671
|
if (create !== undefined) {
|
|
769
672
|
const { provider, model, reasoningEffort } = inputs.agentOptions;
|
|
770
673
|
const inherited = child.model.current();
|
|
771
|
-
// A fork's inherited request headers must not override its resolved child
|
|
674
|
+
// A fork's inherited request headers must not override its resolved child selection.
|
|
772
675
|
if (provider !== undefined && model !== undefined
|
|
773
|
-
&& (inherited?.provider !== provider || inherited.model !== model)) {
|
|
676
|
+
&& (inherited?.provider !== provider || inherited.model !== model || inherited.reasoningEffort !== reasoningEffort)) {
|
|
774
677
|
child.model.select({ provider, model, ...reasoningEffort === undefined ? {} : { reasoningEffort } });
|
|
775
678
|
}
|
|
776
679
|
if (inputs.composition.agentPreset !== undefined) {
|
|
@@ -784,24 +687,21 @@ export class SubagentManager {
|
|
|
784
687
|
await workingDirectory.set(child, create.cwd, inputs.signal);
|
|
785
688
|
}
|
|
786
689
|
if (inputs.composition.agentPreset === undefined)
|
|
787
|
-
await applyChildComposition(childCtx, parent, inputs.composition);
|
|
690
|
+
await applyChildComposition(childCtx, create?.parent, inputs.composition);
|
|
788
691
|
if (inputs.outputSchema !== undefined) {
|
|
789
|
-
structured = attachStructuredRuntime(childCtx, inputs.outputSchema, () =>
|
|
790
|
-
&& child.inbox.nextStep.length === 0
|
|
692
|
+
structured = attachStructuredRuntime(childCtx, inputs.outputSchema, () => child.inbox.nextStep.length === 0
|
|
791
693
|
&& child.inbox.nextTurn.length === 0);
|
|
792
694
|
}
|
|
793
695
|
};
|
|
794
696
|
const handle = create === undefined
|
|
795
697
|
? await this.ownerCtx.agents.resume({
|
|
796
698
|
resumeSessionId: childId,
|
|
797
|
-
parentAgent: parent,
|
|
798
699
|
agentOptions: inputs.agentOptions,
|
|
799
700
|
signal: inputs.signal,
|
|
800
701
|
setup,
|
|
801
702
|
})
|
|
802
703
|
: await this.ownerCtx.agents.create({
|
|
803
704
|
sessionId: childId,
|
|
804
|
-
parentAgent: parent,
|
|
805
705
|
meta: create.meta,
|
|
806
706
|
...(create.seed === undefined ? {} : { seed: create.seed }),
|
|
807
707
|
inheritedEventCount: create.inheritedEventCount,
|
|
@@ -819,29 +719,25 @@ export class SubagentManager {
|
|
|
819
719
|
omitClosingText: false,
|
|
820
720
|
};
|
|
821
721
|
}
|
|
822
|
-
const
|
|
722
|
+
const childId = resource.kind === 'local' ? resource.handle.agent.id : resource.run.id;
|
|
823
723
|
const activation = {
|
|
824
|
-
pool,
|
|
825
724
|
releaseSlot,
|
|
826
725
|
childId,
|
|
726
|
+
runId: SubagentRunId(randomUUID()),
|
|
727
|
+
provider,
|
|
827
728
|
...resource,
|
|
828
|
-
|
|
729
|
+
root,
|
|
730
|
+
ancestors: inputs.ancestors,
|
|
829
731
|
delivery: inputs.delivery ?? 'parent',
|
|
830
732
|
result: Promise.withResolvers(),
|
|
831
733
|
closing: undefined,
|
|
832
|
-
|
|
833
|
-
ownedChildren: new Set(),
|
|
834
|
-
observer,
|
|
835
|
-
announced: false,
|
|
734
|
+
accepted: false,
|
|
836
735
|
};
|
|
837
736
|
void activation.result.promise.catch(() => undefined);
|
|
838
737
|
this.resident.set(childId, activation);
|
|
839
738
|
try {
|
|
840
|
-
this.assertAdmitting(
|
|
739
|
+
this.assertAdmitting(root);
|
|
841
740
|
inputs.signal.throwIfAborted();
|
|
842
|
-
if (this.ctx.agents.get(parent.id) !== parent)
|
|
843
|
-
throw new SubagentError('subagent parent is no longer live', 'UNAUTHORIZED');
|
|
844
|
-
this.acquireOwnership(parent, childId);
|
|
845
741
|
const wakeSettlement = () => { this.wake(activation); };
|
|
846
742
|
if (activation.kind === 'local') {
|
|
847
743
|
observeLocalFailure(activation, wakeSettlement);
|
|
@@ -861,7 +757,9 @@ export class SubagentManager {
|
|
|
861
757
|
activation.omitClosingText = false;
|
|
862
758
|
});
|
|
863
759
|
}
|
|
864
|
-
|
|
760
|
+
// Listeners may read the resident Agent or drain it immediately. Publish
|
|
761
|
+
// after residency and inbox listeners, as the last rollback-protected step.
|
|
762
|
+
this.host.emitLifecycle('subagent/start', this.runInfo(activation), root);
|
|
865
763
|
}
|
|
866
764
|
catch (error) {
|
|
867
765
|
/* v8 ignore next -- rollback failure must not mask the admission failure
|
|
@@ -871,14 +769,19 @@ export class SubagentManager {
|
|
|
871
769
|
}
|
|
872
770
|
return activation;
|
|
873
771
|
}
|
|
874
|
-
/**
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
772
|
+
/** Identity shared by one residency epoch's start/end pair, including cold resumes. */
|
|
773
|
+
runInfo(activation) {
|
|
774
|
+
return {
|
|
775
|
+
runId: activation.runId,
|
|
776
|
+
provider: activation.provider,
|
|
777
|
+
parentSessionId: activation.ancestors.at(-1),
|
|
778
|
+
id: activation.childId,
|
|
779
|
+
local: activation.kind === 'local',
|
|
780
|
+
};
|
|
781
|
+
}
|
|
782
|
+
/** Record acceptance and begin settlement observation before returning the receipt. */
|
|
783
|
+
accept(activation) {
|
|
784
|
+
activation.accepted = true;
|
|
882
785
|
if (activation.kind === 'local') {
|
|
883
786
|
this.watchLocalSettlement(activation);
|
|
884
787
|
}
|
|
@@ -896,29 +799,10 @@ export class SubagentManager {
|
|
|
896
799
|
finally {
|
|
897
800
|
this.resident.delete(activation.childId);
|
|
898
801
|
activation.releaseSlot();
|
|
899
|
-
this.releaseOwnership(activation.childId);
|
|
900
802
|
activation.result.reject(error);
|
|
901
803
|
}
|
|
902
804
|
});
|
|
903
805
|
}
|
|
904
|
-
/** Register the child in a continuation-managed parent's owned set. */
|
|
905
|
-
acquireOwnership(parent, childId) {
|
|
906
|
-
const parentActivation = this.resident.get(parent.id);
|
|
907
|
-
if (parentActivation === undefined)
|
|
908
|
-
return;
|
|
909
|
-
if (parentActivation.closing !== undefined) {
|
|
910
|
-
throw new SubagentError(`subagent parent "${parent.id}" is being disposed; the child was not established`, 'ACTIVATION_CLOSING');
|
|
911
|
-
}
|
|
912
|
-
parentActivation.ownedChildren.add(childId);
|
|
913
|
-
this.wake(parentActivation);
|
|
914
|
-
}
|
|
915
|
-
/** Remove one child from its live owner's set and let that owner re-check settlement. */
|
|
916
|
-
releaseOwnership(childId) {
|
|
917
|
-
for (const candidate of this.resident.values()) {
|
|
918
|
-
if (candidate.ownedChildren.delete(childId))
|
|
919
|
-
this.wake(candidate);
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
806
|
/** Let a settlement watcher re-check residency after relevant state changes. */
|
|
923
807
|
wake(activation) {
|
|
924
808
|
if (activation.kind === 'external')
|
|
@@ -984,20 +868,18 @@ export class SubagentManager {
|
|
|
984
868
|
reportTeardownFailure(activation, error) {
|
|
985
869
|
this.ctx.logger.warn(`subagent "${activation.childId}" activation teardown failed: ${failureMessage(error)}`);
|
|
986
870
|
}
|
|
987
|
-
/** Check pending input
|
|
871
|
+
/** Check pending input before closing admission. */
|
|
988
872
|
settlementState(activation, observation) {
|
|
989
873
|
if (activation.closing !== undefined)
|
|
990
874
|
return 'closed';
|
|
991
875
|
if (activation.poke !== observation)
|
|
992
876
|
return 'retry';
|
|
993
877
|
const inbox = activation.handle.agent.inbox;
|
|
994
|
-
if (activation.ownedChildren.size > 0)
|
|
995
|
-
return 'wait';
|
|
996
878
|
if (activation.failureAt === undefined && (inbox.nextTurn.length > 0 || inbox.nextStep.length > 0))
|
|
997
879
|
return 'wait';
|
|
998
880
|
return 'ready';
|
|
999
881
|
}
|
|
1000
|
-
/**
|
|
882
|
+
/** Stop and release one instance without affecting its creation descendants. */
|
|
1001
883
|
async finishDisposal(activation, stop) {
|
|
1002
884
|
this.wake(activation);
|
|
1003
885
|
const { childId } = activation;
|
|
@@ -1023,27 +905,6 @@ export class SubagentManager {
|
|
|
1023
905
|
if (stop) {
|
|
1024
906
|
activation.handle.agent.cancel({ kind: 'parent' });
|
|
1025
907
|
const idle = activation.handle.agent.whenIdle();
|
|
1026
|
-
const children = [...activation.ownedChildren]
|
|
1027
|
-
.map(child => this.resident.get(child))
|
|
1028
|
-
.filter((child) => child !== undefined);
|
|
1029
|
-
const pending = [...this.materializations].filter(item => item.lineage.includes(activation.handle.agent));
|
|
1030
|
-
const childDisposals = children.map(child => this.dispose(child));
|
|
1031
|
-
for (const item of pending)
|
|
1032
|
-
item.controller.abort();
|
|
1033
|
-
childDisposals.push(...pending.map(item => item.settled));
|
|
1034
|
-
const childFailures = await Promise.all(childDisposals.map(async (disposal) => {
|
|
1035
|
-
try {
|
|
1036
|
-
await disposal;
|
|
1037
|
-
return undefined;
|
|
1038
|
-
}
|
|
1039
|
-
catch (error) {
|
|
1040
|
-
return error;
|
|
1041
|
-
}
|
|
1042
|
-
}));
|
|
1043
|
-
const reasons = childFailures.filter(reason => reason !== undefined);
|
|
1044
|
-
if (reasons.length > 0) {
|
|
1045
|
-
failures.push(new SubagentError(`subagent "${childId}" child teardown failed: ${reasons.map(reason => failureMessage(reason)).join('; ')}`, 'ACTIVATION_TEARDOWN_FAILED'));
|
|
1046
|
-
}
|
|
1047
908
|
await idle;
|
|
1048
909
|
await this.flushFinalState(activation);
|
|
1049
910
|
}
|
|
@@ -1075,8 +936,13 @@ export class SubagentManager {
|
|
|
1075
936
|
activation.releaseSlot();
|
|
1076
937
|
const terminal = failure === undefined ? result : { output: [], stopReason: 'error' };
|
|
1077
938
|
this.notifySettlement(activation, result);
|
|
1078
|
-
|
|
1079
|
-
|
|
939
|
+
// The sole end publication follows resource release and parent notification,
|
|
940
|
+
// before result delivery. Cleanup failure changes the event, not the captured result.
|
|
941
|
+
this.host.emitLifecycle('subagent/end', {
|
|
942
|
+
...this.runInfo(activation),
|
|
943
|
+
stopReason: terminal.stopReason,
|
|
944
|
+
...terminal.output.length === 0 ? {} : { lastAssistantMessage: terminal.output },
|
|
945
|
+
}, activation.root);
|
|
1080
946
|
if (resultFailure === undefined)
|
|
1081
947
|
activation.result.resolve(result);
|
|
1082
948
|
else
|
|
@@ -1086,11 +952,12 @@ export class SubagentManager {
|
|
|
1086
952
|
}
|
|
1087
953
|
/** Deliver the captured execution result to the durable direct parent after cleanup. */
|
|
1088
954
|
notifySettlement(activation, terminal) {
|
|
1089
|
-
if (!activation.
|
|
955
|
+
if (!activation.accepted || activation.delivery === 'caller')
|
|
1090
956
|
return;
|
|
1091
957
|
try {
|
|
1092
|
-
const
|
|
1093
|
-
|
|
958
|
+
const parentId = activation.ancestors.at(-1);
|
|
959
|
+
const parent = this.ctx.agents.get(parentId);
|
|
960
|
+
if (parent === undefined || this.rootOf(parent) !== activation.root)
|
|
1094
961
|
return;
|
|
1095
962
|
const message = createSettlementMessage(activation.childId, terminal, activation.kind === 'local', activation.kind === 'local' && activation.omitClosingText);
|
|
1096
963
|
if (this.closingTeardownFor(parent) !== undefined) {
|
|
@@ -1122,140 +989,112 @@ export class SubagentManager {
|
|
|
1122
989
|
dispose: () => this.dispose(activation),
|
|
1123
990
|
};
|
|
1124
991
|
}
|
|
1125
|
-
/**
|
|
1126
|
-
async
|
|
1127
|
-
this.assertAdmitting(parent);
|
|
1128
|
-
const releaseHold = this.holdOwnership(parent, childId);
|
|
1129
|
-
try {
|
|
1130
|
-
return await this.deliverFollowup(parent, childId, content, options);
|
|
1131
|
-
}
|
|
1132
|
-
catch (error) {
|
|
1133
|
-
releaseHold();
|
|
1134
|
-
throw error;
|
|
1135
|
-
}
|
|
1136
|
-
}
|
|
1137
|
-
/** The delivery loop behind {@link deliverToChild}, run under the parent hold. */
|
|
1138
|
-
async deliverFollowup(parent, childId, content, options) {
|
|
992
|
+
/** Serialize target restoration and inbox admission; closure is awaited outside the lock. */
|
|
993
|
+
async deliverToMember(root, childId, content, options) {
|
|
1139
994
|
while (true) {
|
|
1140
|
-
|
|
995
|
+
this.assertAdmitting(root);
|
|
996
|
+
options.signal.throwIfAborted();
|
|
997
|
+
const result = await this.locks.run(childId, async () => {
|
|
998
|
+
if (childId === root.id) {
|
|
999
|
+
if (contentHasImage(content))
|
|
1000
|
+
await this.assertImageCapable(root, options.signal);
|
|
1001
|
+
options.signal.throwIfAborted();
|
|
1002
|
+
options.authorize?.();
|
|
1003
|
+
this.assertAdmitting(root);
|
|
1004
|
+
const message = createUserMessage({ content, source: options.source });
|
|
1005
|
+
this.sendWaking(root, message, options.delivery);
|
|
1006
|
+
options.onAccepted?.();
|
|
1007
|
+
return { messageId: message.id };
|
|
1008
|
+
}
|
|
1141
1009
|
const activation = this.resident.get(childId);
|
|
1142
|
-
if (activation === undefined)
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
const disposal = activation.closing;
|
|
1146
|
-
/* v8 ignore next 3 -- the send-versus-dispose cutoff needs a delivery to
|
|
1147
|
-
* observe the transaction inside the same critical section that opened it. */
|
|
1148
|
-
if (disposal !== undefined) {
|
|
1149
|
-
return disposal.then(() => undefined, () => undefined);
|
|
1010
|
+
if (activation === undefined) {
|
|
1011
|
+
const restored = await this.restoreTarget(root, childId, options.signal);
|
|
1012
|
+
return { messageId: await this.submitMaterialized(restored, content, options, root) };
|
|
1150
1013
|
}
|
|
1151
|
-
if (
|
|
1014
|
+
if (activation.root !== root)
|
|
1015
|
+
throw new SubagentError('target belongs to another subagent tree', 'UNAUTHORIZED');
|
|
1016
|
+
requireLocalActivation(activation);
|
|
1017
|
+
if (activation.closing === undefined && contentHasImage(content)) {
|
|
1152
1018
|
await this.assertImageCapable(requireLocalActivation(activation).handle.agent, options.signal);
|
|
1153
|
-
if (activation.closing !== undefined) {
|
|
1154
|
-
await Promise.allSettled([activation.closing]);
|
|
1155
|
-
return undefined;
|
|
1156
|
-
}
|
|
1157
1019
|
}
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1020
|
+
if (activation.closing !== undefined)
|
|
1021
|
+
return { closing: activation.closing };
|
|
1022
|
+
const messageId = this.submitAdmitted(activation, content, options, root);
|
|
1023
|
+
return { messageId };
|
|
1161
1024
|
});
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
this.assertAdmitting(parent);
|
|
1166
|
-
options.signal.throwIfAborted();
|
|
1167
|
-
/* v8 ignore stop */
|
|
1168
|
-
}
|
|
1169
|
-
}
|
|
1170
|
-
/** Deliver one resident continuable child's message to its live direct parent. */
|
|
1171
|
-
sendToParent(activation, sender, content) {
|
|
1172
|
-
/* v8 ignore next 6 -- only synchronous re-entrant teardown can open this
|
|
1173
|
-
* transaction between exact-agent authorization and this no-await span. */
|
|
1174
|
-
if (activation.closing !== undefined) {
|
|
1175
|
-
throw new SubagentError(`subagent "${sender.id}" activation is being disposed; the message was not delivered`, 'ACTIVATION_CLOSING');
|
|
1176
|
-
}
|
|
1177
|
-
const parent = this.ctx.agents.get(activation.parent.id);
|
|
1178
|
-
if (parent !== activation.parent) {
|
|
1179
|
-
throw new SubagentError('direct parent is not live; the message was not delivered', 'PARENT_UNAVAILABLE');
|
|
1025
|
+
if ('messageId' in result)
|
|
1026
|
+
return result.messageId;
|
|
1027
|
+
await Promise.allSettled([result.closing]);
|
|
1180
1028
|
}
|
|
1181
|
-
const message = createAgentMessage(sender, content);
|
|
1182
|
-
this.sendAgentMessage(parent, message);
|
|
1183
|
-
activation.omitClosingText = true;
|
|
1184
|
-
return message.id;
|
|
1185
1029
|
}
|
|
1186
|
-
/**
|
|
1187
|
-
|
|
1030
|
+
/** Read continuation history, preserving cancellation and reporting unavailable storage. */
|
|
1031
|
+
async observeContinuation(childId, signal) {
|
|
1032
|
+
const query = this.requireSessionQuery();
|
|
1188
1033
|
try {
|
|
1189
|
-
|
|
1034
|
+
return await query.observeSession(childId, { signal });
|
|
1190
1035
|
}
|
|
1191
1036
|
catch (error) {
|
|
1192
|
-
|
|
1037
|
+
signal.throwIfAborted();
|
|
1038
|
+
throw new SubagentError(`subagent "${childId}" is unavailable`, 'NOT_RESUMABLE', { cause: error });
|
|
1193
1039
|
}
|
|
1194
1040
|
}
|
|
1195
|
-
/**
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
async coldResume(parent, childId, content, options) {
|
|
1200
|
-
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
1201
|
-
try {
|
|
1202
|
-
const query = this.requireSessionQuery();
|
|
1203
|
-
let observation;
|
|
1041
|
+
/** Reconstruct only the target under its subagent tree root; the caller owns acceptance or rollback. */
|
|
1042
|
+
async restoreTarget(root, childId, signal) {
|
|
1043
|
+
return this.trackStartup(root, signal, async (signal) => {
|
|
1044
|
+
const env_3 = { stack: [], error: void 0, hasError: false };
|
|
1204
1045
|
try {
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
throw new SubagentError(`subagent "${childId}" is unavailable`, 'NOT_RESUMABLE', { cause: error });
|
|
1212
|
-
}
|
|
1213
|
-
const source = __addDisposableResource(env_1, observation, false);
|
|
1214
|
-
this.assertAdmitting(parent);
|
|
1215
|
-
this.authorizeLineage(parent, childId, source.header.parentSession);
|
|
1216
|
-
const ownEvents = source.events.slice(source.inheritedEventCount);
|
|
1217
|
-
const descriptor = foldSubagentDescriptor(ownEvents);
|
|
1218
|
-
if (descriptor === undefined || descriptor.mode !== 'continuable') {
|
|
1219
|
-
throw new SubagentError(`subagent "${childId}" has no supported continuation state and cannot be resumed; choose a different target`, 'NOT_RESUMABLE');
|
|
1220
|
-
}
|
|
1221
|
-
let activation;
|
|
1222
|
-
try {
|
|
1223
|
-
const independentlySelected = hasIndependentPresetSelection(ownEvents);
|
|
1224
|
-
const agentPreset = independentlySelected ? source.projections?.values.agentPreset : undefined;
|
|
1225
|
-
if (independentlySelected && typeof agentPreset !== 'string') {
|
|
1226
|
-
throw new SubagentError(`subagent "${childId}" has no agent preset projection for restoration`, 'NOT_RESUMABLE');
|
|
1046
|
+
const source = __addDisposableResource(env_3, await this.observeContinuation(childId, signal), false);
|
|
1047
|
+
this.assertAdmitting(root);
|
|
1048
|
+
const ownEvents = source.events.slice(source.inheritedEventCount);
|
|
1049
|
+
const descriptor = foldSubagentDescriptor(ownEvents);
|
|
1050
|
+
if (descriptor === undefined || descriptor.mode !== 'continuable') {
|
|
1051
|
+
throw new SubagentError(`subagent "${childId}" has no supported continuation state and cannot be resumed; choose a different target`, 'NOT_RESUMABLE');
|
|
1227
1052
|
}
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1053
|
+
const { ancestors } = await this.resolveCreationAncestry(source, signal, root);
|
|
1054
|
+
let activation;
|
|
1055
|
+
try {
|
|
1056
|
+
const projectedPreset = source.projections?.values.agentPreset;
|
|
1057
|
+
if (projectedPreset === undefined && source.events.some(event => event.type === 'agent-preset/selected')) {
|
|
1058
|
+
throw new SubagentError(`subagent "${childId}" has no agent preset projection for restoration`, 'NOT_RESUMABLE');
|
|
1059
|
+
}
|
|
1060
|
+
const agentPreset = projectedPreset ?? source.header.agentPreset;
|
|
1061
|
+
activation = await this.materialize({
|
|
1062
|
+
kind: 'local',
|
|
1063
|
+
childId,
|
|
1064
|
+
provider: descriptor.provider,
|
|
1065
|
+
root,
|
|
1066
|
+
ancestors,
|
|
1067
|
+
agentOptions: {
|
|
1068
|
+
...descriptor.agentProvider !== undefined ? { provider: descriptor.agentProvider } : {},
|
|
1069
|
+
...descriptor.agentModel !== undefined ? { model: descriptor.agentModel } : {},
|
|
1070
|
+
...descriptor.agentReasoningEffort !== undefined
|
|
1071
|
+
? { reasoningEffort: ReasoningEffortId(descriptor.agentReasoningEffort) }
|
|
1072
|
+
: {},
|
|
1073
|
+
},
|
|
1074
|
+
composition: {
|
|
1075
|
+
agentPreset: agentPreset ?? undefined,
|
|
1076
|
+
persona: descriptor.persona,
|
|
1077
|
+
toolFilter: descriptor.toolFilter,
|
|
1078
|
+
},
|
|
1079
|
+
signal,
|
|
1080
|
+
});
|
|
1081
|
+
}
|
|
1082
|
+
catch (error) {
|
|
1083
|
+
signal.throwIfAborted();
|
|
1084
|
+
if (error instanceof SubagentError)
|
|
1085
|
+
throw error;
|
|
1086
|
+
throw new SubagentError(`subagent "${childId}" is unavailable`, 'NOT_RESUMABLE', { cause: error });
|
|
1087
|
+
}
|
|
1088
|
+
return activation;
|
|
1243
1089
|
}
|
|
1244
|
-
catch (
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
throw error;
|
|
1248
|
-
throw new SubagentError(`subagent "${childId}" is unavailable`, 'NOT_RESUMABLE', { cause: error });
|
|
1090
|
+
catch (e_3) {
|
|
1091
|
+
env_3.error = e_3;
|
|
1092
|
+
env_3.hasError = true;
|
|
1249
1093
|
}
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
env_1.hasError = true;
|
|
1255
|
-
}
|
|
1256
|
-
finally {
|
|
1257
|
-
__disposeResources(env_1);
|
|
1258
|
-
}
|
|
1094
|
+
finally {
|
|
1095
|
+
__disposeResources(env_3);
|
|
1096
|
+
}
|
|
1097
|
+
});
|
|
1259
1098
|
}
|
|
1260
1099
|
/** Admit a materialized child, commit its creation fact, and release it on failure. */
|
|
1261
1100
|
async submitMaterialized(activation, content, options, parent, commit) {
|
|
@@ -1268,7 +1107,7 @@ export class SubagentManager {
|
|
|
1268
1107
|
}
|
|
1269
1108
|
const messageId = this.submitAdmitted(activation, content, options, parent);
|
|
1270
1109
|
commit?.();
|
|
1271
|
-
this.
|
|
1110
|
+
this.accept(activation);
|
|
1272
1111
|
return messageId;
|
|
1273
1112
|
}
|
|
1274
1113
|
catch (error) {
|
|
@@ -1283,19 +1122,17 @@ export class SubagentManager {
|
|
|
1283
1122
|
}
|
|
1284
1123
|
/** Build and submit one message across the final synchronous admission cutoff. */
|
|
1285
1124
|
submitAdmitted(activation, content, options, parent) {
|
|
1286
|
-
const message = options.source
|
|
1287
|
-
? createAgentMessage(parent, content)
|
|
1288
|
-
: createUserMessage({ content, source: options.source });
|
|
1125
|
+
const message = createUserMessage({ content, source: options.source });
|
|
1289
1126
|
options.signal.throwIfAborted();
|
|
1127
|
+
options.authorize?.();
|
|
1290
1128
|
this.assertAdmitting(parent);
|
|
1291
|
-
this.authorizeLineage(parent, activation.childId, activation.parent.id);
|
|
1292
|
-
this.acquireOwnership(parent, activation.childId);
|
|
1293
1129
|
try {
|
|
1294
1130
|
this.deliver(activation, message, options.delivery);
|
|
1295
1131
|
}
|
|
1296
1132
|
finally {
|
|
1297
1133
|
this.wake(activation);
|
|
1298
1134
|
}
|
|
1135
|
+
options.onAccepted?.();
|
|
1299
1136
|
return message.id;
|
|
1300
1137
|
}
|
|
1301
1138
|
/** Refuse image content for a child whose fixed model accepts text only. */
|
|
@@ -1330,15 +1167,4 @@ export class SubagentManager {
|
|
|
1330
1167
|
}
|
|
1331
1168
|
}
|
|
1332
1169
|
export default SubagentManager;
|
|
1333
|
-
/** Creation-time selection precedes the own descriptor; historical forks can select after it. */
|
|
1334
|
-
function hasIndependentPresetSelection(events) {
|
|
1335
|
-
for (const event of events) {
|
|
1336
|
-
if (event.type === 'subagent/descriptor')
|
|
1337
|
-
return false;
|
|
1338
|
-
if (event.type === 'agent-preset/selected')
|
|
1339
|
-
return true;
|
|
1340
|
-
}
|
|
1341
|
-
/* v8 ignore next -- coldResume rejects logs without a supported own descriptor before this lookup. */
|
|
1342
|
-
return false;
|
|
1343
|
-
}
|
|
1344
1170
|
//# sourceMappingURL=manager.js.map
|