@songtonyli/dsh-cli 0.1.90 → 0.1.92
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/@aws-sdk/core/dist-cjs/submodules/client/index.js +26 -13
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +6 -3
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +51 -1
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +2 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-host-header/hostHeaderMiddleware.js +4 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/parseArn.js +4 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-browser/defaultUserAgent.js +18 -9
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js +6 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.js +51 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/util/util-arn-parser/arn.js +2 -1
- package/node_modules/@aws-sdk/core/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-eventstream/dist-cjs/index.js +4 -2
- package/node_modules/@aws-sdk/middleware-eventstream/dist-es/eventStreamHandlingMiddleware.js +2 -1
- package/node_modules/@aws-sdk/middleware-eventstream/dist-es/eventStreamHeaderMiddleware.js +2 -1
- package/node_modules/@aws-sdk/middleware-eventstream/package.json +1 -1
- package/node_modules/@aws-sdk/middleware-websocket/package.json +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +3 -3
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +1 -1
- package/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/@aws-sdk/xml-builder/package.json +1 -1
- package/node_modules/@deepseek-ai/cordis/README.md +6 -2
- package/node_modules/@deepseek-ai/cordis/lib/index.js +955 -909
- package/node_modules/@deepseek-ai/cordis/src/context.ts +1 -1
- package/node_modules/@deepseek-ai/cordis/src/events.ts +81 -62
- package/node_modules/@deepseek-ai/cordis/src/fiber.ts +95 -58
- package/node_modules/@deepseek-ai/cordis/src/logger.ts +10 -5
- package/node_modules/@deepseek-ai/cordis/src/reflect.ts +37 -19
- package/node_modules/@deepseek-ai/cordis/src/utils.ts +28 -21
- package/node_modules/@deepseek-ai/cordis-plugin-include/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/cordis-plugin-include/src/index.ts +2 -6
- package/node_modules/@deepseek-ai/cordis-plugin-loader/README.md +4 -0
- package/node_modules/@deepseek-ai/cordis-plugin-loader/lib/index.js +40 -39
- package/node_modules/@deepseek-ai/cordis-plugin-loader/src/config/entry.ts +13 -13
- package/node_modules/@deepseek-ai/cordis-plugin-loader/src/config/group.ts +1 -3
- package/node_modules/@deepseek-ai/cordis-plugin-loader/src/config/isolate.ts +10 -7
- package/node_modules/@deepseek-ai/cordis-plugin-loader/src/index.ts +17 -20
- package/node_modules/@deepseek-ai/dsh/package.json +0 -1
- package/node_modules/@deepseek-ai/dsh-action-cards/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-composition-reference/references/packages.md +5 -3
- package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/references/host-plugin.md +13 -0
- package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/types/mount.js +2 -2
- package/node_modules/@deepseek-ai/dsh-api-gateway/lib/client.browser.js +1 -1
- package/node_modules/@deepseek-ai/dsh-api-gateway/lib/client.node.js +1 -1
- package/node_modules/@deepseek-ai/dsh-api-gateway/lib/types/client/remote-events.js +1 -1
- package/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +7464 -2004
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/client.js +77 -92
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.host.js +47 -3
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +8 -19
- package/node_modules/@deepseek-ai/dsh-base/cordis.patch.yml +3 -0
- package/node_modules/@deepseek-ai/dsh-client-file-upload/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-modules/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-modules/README.md +3 -1
- package/node_modules/@deepseek-ai/dsh-client-modules/README.zh.md +3 -1
- package/node_modules/@deepseek-ai/dsh-client-modules/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-modules/lib/index.js +37 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-attachment/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-attachment/README.md +3 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-attachment/README.zh.md +3 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-attachment/lib/client.js +19 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +4 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.i18n.yaml +10 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.md +8 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.zh.md +8 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/client.js +146 -30
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/package.json +4 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +295 -274
- package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/README.i18n.yaml +40 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/README.md +100 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/README.zh.md +100 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/lib/client.js +1445 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/lib/index.js +6 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/locale/de.json +5 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/locale/en.json +5 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/locale/es.json +5 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/locale/fr.json +5 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/locale/ja.json +5 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/locale/pt.json +5 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/locale/ru.json +5 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/locale/zh.json +5 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/package.json +61 -0
- 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 +4 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.zh.md +4 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +119 -55
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +4 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +19 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +4 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/README.i18n.yaml +40 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/README.md +92 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/README.zh.md +92 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/lib/client.js +1875 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/lib/index.js +6 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/locale/de.json +5 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/locale/en.json +5 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/locale/es.json +5 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/locale/fr.json +5 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/locale/ja.json +5 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/locale/pt.json +5 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/locale/ru.json +5 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/locale/zh.json +5 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/package.json +65 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/README.md +9 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/README.zh.md +9 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js +91 -26
- package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/README.md +8 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/README.zh.md +8 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/lib/client.js +431 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/package.json +13 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.i18n.yaml +8 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.md +6 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.zh.md +6 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/client.js +111 -48
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-market/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-market/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-market/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-market/lib/client.js +2 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-reference/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-reference/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-reference/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-reference/lib/client.js +28 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-reference/package.json +4 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.i18n.yaml +19 -19
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.md +25 -39
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.zh.md +23 -37
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/lib/client.js +10359 -3743
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/package.json +1 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +76 -58
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.md +5 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.zh.md +5 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +46 -18
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/README.i18n.yaml +8 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/README.md +7 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/README.zh.md +7 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.js +349 -251
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/package.json +5 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/README.i18n.yaml +20 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/README.md +44 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/README.zh.md +44 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/lib/client.js +1571 -472
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/package.json +5 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/README.i18n.yaml +12 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/README.md +15 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/README.zh.md +15 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/lib/client.js +435 -52
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/package.json +4 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +8 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +1 -1
- 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 +5 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.zh.md +5 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +195 -59
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +5 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/README.md +6 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/README.zh.md +6 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +127 -27
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.i18n.yaml +15 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.md +16 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.zh.md +17 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +523 -480
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +4 -2
- package/node_modules/@deepseek-ai/dsh-commands/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-commands/README.md +3 -0
- package/node_modules/@deepseek-ai/dsh-commands/README.zh.md +3 -0
- package/node_modules/@deepseek-ai/dsh-commands/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-commands/lib/types/builtin.js +39 -0
- package/node_modules/@deepseek-ai/dsh-commands/package.json +5 -1
- package/node_modules/@deepseek-ai/dsh-compaction-basic/README.i18n.yaml +4 -10
- package/node_modules/@deepseek-ai/dsh-compaction-basic/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-compaction-basic/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-cordis-client-runner/lib/client.js +233 -56
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/typert.host.js +2 -2
- package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-experimental-auto-review/README.i18n.yaml +16 -19
- package/node_modules/@deepseek-ai/dsh-experimental-auto-review/README.md +11 -22
- package/node_modules/@deepseek-ai/dsh-experimental-auto-review/README.zh.md +11 -22
- package/node_modules/@deepseek-ai/dsh-experimental-auto-review/lib/index.js +2 -0
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-cot-translation/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/README.i18n.yaml +12 -12
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/README.md +18 -10
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/README.zh.md +20 -12
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/lib/client.js +3338 -297
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/lib/index.js +159 -52
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/lib/typert.host.js +298 -18
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/lib/typert.remote-client.js +267 -13
- package/node_modules/@deepseek-ai/dsh-experimental-forge/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-forge/README.md +5 -1
- package/node_modules/@deepseek-ai/dsh-experimental-forge/README.zh.md +5 -1
- package/node_modules/@deepseek-ai/dsh-experimental-forge/lib/index.js +48 -6
- package/node_modules/@deepseek-ai/dsh-experimental-forge-github/README.i18n.yaml +8 -8
- package/node_modules/@deepseek-ai/dsh-experimental-forge-github/README.md +9 -5
- package/node_modules/@deepseek-ai/dsh-experimental-forge-github/README.zh.md +9 -5
- package/node_modules/@deepseek-ai/dsh-experimental-forge-github/lib/index.js +301 -31
- package/node_modules/@deepseek-ai/dsh-experimental-forge-github/package.json +1 -0
- package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/client.js +5 -58
- package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/index.js +5 -2
- package/node_modules/@deepseek-ai/dsh-experimental-liveshare/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-session-inspector/lib/client.js +77 -92
- package/node_modules/@deepseek-ai/dsh-experimental-translator/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-translator/lib/types/deepseek.js +2 -2
- package/node_modules/@deepseek-ai/dsh-fs/README.i18n.yaml +12 -12
- package/node_modules/@deepseek-ai/dsh-fs/README.md +15 -7
- package/node_modules/@deepseek-ai/dsh-fs/README.zh.md +15 -7
- package/node_modules/@deepseek-ai/dsh-fs/lib/index.js +21 -2
- package/node_modules/@deepseek-ai/dsh-fs/package.json +3 -0
- package/node_modules/@deepseek-ai/dsh-fs-local/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-fs-local/README.md +4 -2
- package/node_modules/@deepseek-ai/dsh-fs-local/README.zh.md +4 -2
- package/node_modules/@deepseek-ai/dsh-fs-local/lib/index.js +156 -30
- package/node_modules/@deepseek-ai/dsh-fs-local/package.json +2 -1
- package/node_modules/@deepseek-ai/dsh-fs-observation-policy/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-fs-observation-policy/README.md +4 -2
- package/node_modules/@deepseek-ai/dsh-fs-observation-policy/README.zh.md +4 -2
- package/node_modules/@deepseek-ai/dsh-fs-observation-policy/lib/index.js +12 -4
- package/node_modules/@deepseek-ai/dsh-fs-patch/LICENSE +235 -0
- package/node_modules/@deepseek-ai/dsh-fs-patch/README.i18n.yaml +40 -0
- package/node_modules/@deepseek-ai/dsh-fs-patch/README.md +112 -0
- package/node_modules/@deepseek-ai/dsh-fs-patch/README.zh.md +112 -0
- package/node_modules/@deepseek-ai/dsh-fs-patch/lib/index.js +275 -0
- package/node_modules/@deepseek-ai/dsh-fs-patch/package.json +35 -0
- package/node_modules/@deepseek-ai/dsh-fs-sandbox/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-fs-sandbox/README.md +4 -2
- package/node_modules/@deepseek-ai/dsh-fs-sandbox/README.zh.md +4 -2
- package/node_modules/@deepseek-ai/dsh-fs-sandbox/lib/index.js +24 -1
- package/node_modules/@deepseek-ai/dsh-goal/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-hmr/lib/index.js +4 -3
- package/node_modules/@deepseek-ai/dsh-llm/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-llm/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-llm/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-llm/lib/typert.host.js +9 -1
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js +4 -3
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.i18n.yaml +5 -2
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.md +7 -0
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.zh.md +7 -0
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +27 -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 +86 -52
- package/node_modules/@deepseek-ai/dsh-permission-presets/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-plugin-manager/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-plugin-manager/README.md +4 -4
- package/node_modules/@deepseek-ai/dsh-plugin-manager/README.zh.md +4 -4
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/index.js +32 -12
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/typert.host.js +31 -31
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/typert.remote-client.js +27 -27
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/github-connection.js +13 -3
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/index.js +14 -2
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/install-spec.js +1 -1
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/operations.js +2 -0
- package/node_modules/@deepseek-ai/dsh-plugin-recommendations/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-schedule/README.i18n.yaml +72 -39
- package/node_modules/@deepseek-ai/dsh-schedule/README.md +180 -56
- package/node_modules/@deepseek-ai/dsh-schedule/README.zh.md +185 -61
- package/node_modules/@deepseek-ai/dsh-schedule/lib/index.js +1270 -992
- package/node_modules/@deepseek-ai/dsh-schedule/lib/typert.host.js +1842 -274
- package/node_modules/@deepseek-ai/dsh-schedule/lib/typert.remote-client.js +1712 -194
- package/node_modules/@deepseek-ai/dsh-schedule/lib/types/delivery-history.js +7 -20
- package/node_modules/@deepseek-ai/dsh-schedule/lib/types/domain.js +199 -655
- package/node_modules/@deepseek-ai/dsh-schedule/lib/types/index.js +452 -204
- package/node_modules/@deepseek-ai/dsh-schedule/lib/types/runtime.js +389 -70
- package/node_modules/@deepseek-ai/dsh-schedule/lib/types/storage.js +85 -16
- package/node_modules/@deepseek-ai/dsh-schedule/lib/types/types.js +1 -1
- package/node_modules/@deepseek-ai/dsh-schedule/lib/types/update.js +72 -144
- package/node_modules/@deepseek-ai/dsh-schedule/package.json +5 -2
- package/node_modules/@deepseek-ai/dsh-sdk-app/README.i18n.yaml +12 -12
- package/node_modules/@deepseek-ai/dsh-sdk-app/README.md +7 -4
- package/node_modules/@deepseek-ai/dsh-sdk-app/README.zh.md +7 -4
- package/node_modules/@deepseek-ai/dsh-sdk-app/cordis.patch.yml +3 -0
- package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/README.i18n.yaml +52 -4
- package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/README.md +77 -1
- package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/README.zh.md +77 -1
- package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/lib/index.js +306 -2
- package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/package.json +15 -0
- package/node_modules/@deepseek-ai/dsh-sdk-protocol/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-sdk-protocol/README.md +10 -2
- package/node_modules/@deepseek-ai/dsh-sdk-protocol/README.zh.md +10 -2
- package/node_modules/@deepseek-ai/dsh-sdk-protocol/package.json +2 -0
- package/node_modules/@deepseek-ai/dsh-session-log-deepseek/README.i18n.yaml +9 -6
- package/node_modules/@deepseek-ai/dsh-session-log-deepseek/README.md +20 -1
- package/node_modules/@deepseek-ai/dsh-session-log-deepseek/README.zh.md +20 -1
- package/node_modules/@deepseek-ai/dsh-session-log-deepseek/lib/index.js +91 -57
- package/node_modules/@deepseek-ai/dsh-session-log-deepseek/lib/types/index.js +100 -66
- package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/worker.cjs +947 -917
- package/node_modules/@deepseek-ai/dsh-session-reference/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-session-title-llm/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-session-title-llm/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-session-title-llm/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-settings/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-settings/lib/types/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-subagent/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-system-prompt/lib/index.js +2 -0
- package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +260 -92
- package/node_modules/@deepseek-ai/dsh-tool-fs/README.i18n.yaml +38 -20
- package/node_modules/@deepseek-ai/dsh-tool-fs/README.md +63 -5
- package/node_modules/@deepseek-ai/dsh-tool-fs/README.zh.md +63 -5
- package/node_modules/@deepseek-ai/dsh-tool-fs/lib/index.js +784 -27
- package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +4 -1
- package/node_modules/@deepseek-ai/dsh-tool-schedule/README.i18n.yaml +50 -32
- package/node_modules/@deepseek-ai/dsh-tool-schedule/README.md +47 -20
- package/node_modules/@deepseek-ai/dsh-tool-schedule/README.zh.md +47 -20
- package/node_modules/@deepseek-ai/dsh-tool-schedule/lib/index.js +477 -445
- package/node_modules/@deepseek-ai/dsh-tool-schedule/package.json +7 -2
- package/node_modules/@deepseek-ai/dsh-user-questions/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-util-time/README.i18n.yaml +10 -10
- package/node_modules/@deepseek-ai/dsh-util-time/README.md +11 -7
- package/node_modules/@deepseek-ai/dsh-util-time/README.zh.md +11 -7
- package/node_modules/@deepseek-ai/dsh-util-time/lib/index.js +1020 -3
- package/node_modules/@deepseek-ai/dsh-util-time/package.json +4 -2
- package/node_modules/@deepseek-ai/dsh-util-values/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-util-values/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-util-values/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-util-values/lib/index.js +77 -92
- package/node_modules/@deepseek-ai/dsh-web-app/cordis.patch.yml +5 -1
- package/node_modules/@deepseek-ai/dsh-web-app/package.json +3 -1
- package/node_modules/@deepseek-ai/dsh-web-app/presets/cordis.patch.yml +3 -0
- package/node_modules/@deepseek-ai/dsh-web-app/presets/ptc.patch.yml +3 -0
- package/node_modules/@deepseek-ai/dsh-web-app/presets/standard.patch.yml +3 -0
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-BCbHmUSs.js +197 -0
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-BUDGJY4R.css +1 -0
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/index.html +2 -2
- package/node_modules/@deepseek-ai/dsh-workflow-ptc/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-workspace-changes/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-workspace-changes/README.md +3 -1
- package/node_modules/@deepseek-ai/dsh-workspace-changes/README.zh.md +4 -2
- package/node_modules/@deepseek-ai/dsh-workspace-changes/lib/index.js +5 -0
- package/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/index.js +5 -0
- package/node_modules/@deepseek-ai/dsh-workspace-changes/package.json +4 -1
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_attributes.cjs +16917 -0
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_attributes.mjs +15193 -0
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_events.cjs +325 -0
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_events.mjs +295 -0
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_metrics.cjs +4642 -0
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_metrics.mjs +4155 -0
- package/node_modules/@opentelemetry/semantic-conventions/dist/index-incubating.cjs +2495 -0
- package/node_modules/@opentelemetry/semantic-conventions/dist/index-incubating.mjs +7 -0
- package/node_modules/@opentelemetry/semantic-conventions/dist/index.cjs +662 -0
- package/node_modules/@opentelemetry/semantic-conventions/dist/index.mjs +6 -0
- package/node_modules/@opentelemetry/semantic-conventions/dist/internal/utils.cjs +20 -0
- package/node_modules/@opentelemetry/semantic-conventions/dist/internal/utils.mjs +20 -0
- package/node_modules/@opentelemetry/semantic-conventions/dist/resource/SemanticResourceAttributes.cjs +1326 -0
- package/node_modules/@opentelemetry/semantic-conventions/dist/resource/SemanticResourceAttributes.mjs +1188 -0
- package/node_modules/@opentelemetry/semantic-conventions/dist/stable_attributes.cjs +1947 -0
- package/node_modules/@opentelemetry/semantic-conventions/dist/stable_attributes.mjs +1756 -0
- package/node_modules/@opentelemetry/semantic-conventions/dist/stable_events.cjs +9 -0
- package/node_modules/@opentelemetry/semantic-conventions/dist/stable_events.mjs +9 -0
- package/node_modules/@opentelemetry/semantic-conventions/dist/stable_metrics.cjs +362 -0
- package/node_modules/@opentelemetry/semantic-conventions/dist/stable_metrics.mjs +312 -0
- package/node_modules/@opentelemetry/semantic-conventions/dist/trace/SemanticAttributes.cjs +2508 -0
- package/node_modules/@opentelemetry/semantic-conventions/dist/trace/SemanticAttributes.mjs +2236 -0
- package/node_modules/@opentelemetry/semantic-conventions/package.json +22 -35
- package/node_modules/@smithy/core/dist-cjs/index.js +4 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +32 -16
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +26 -13
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +8 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +16 -8
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +8 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +2 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +10 -5
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +18 -9
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +18 -9
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +42 -24
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +20 -10
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +24 -12
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +13 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +7 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +13 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +6 -3
- package/node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js +2 -1
- package/node_modules/@smithy/core/dist-es/normalizeProvider.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeDeserializer.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeSerializer.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeDeserializer2.js +12 -6
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeSerializer2.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/middleware-stack/MiddlewareStack.js +10 -5
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/create-aggregated-client.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getHomeDir.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/booleanSelector.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/numberSelector.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointUrlConfig.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/resolveEndpoint.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/Int64.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageDecoderStream.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/utils.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getUnmarshalledStream.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeDeserializer.js +7 -5
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js +7 -5
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.js +7 -5
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/configurations.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/parseRetryAfterHeader.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/StandardRetryStrategy.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retryMiddleware.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/util.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.browser.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.native.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-body-length/calculateBodyLength.browser.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/transport/httpResponse.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/transport/normalizeProvider.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js +2 -1
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +19 -7
- package/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +2 -1
- package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +11 -6
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +6 -0
- package/node_modules/@smithy/node-http-handler/package.json +2 -2
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +23 -11
- package/node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +4 -2
- package/node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js +4 -2
- package/node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js +5 -1
- package/node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js +2 -1
- package/node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js +2 -1
- package/node_modules/@smithy/signature-v4/dist-es/headerUtil.js +6 -3
- package/node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js +2 -1
- package/node_modules/@smithy/signature-v4/dist-es/prepareRequest.js +2 -1
- package/node_modules/@smithy/signature-v4/package.json +2 -2
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/encodeurl/README.md +14 -0
- package/node_modules/encodeurl/index.js +5 -10
- package/node_modules/encodeurl/package.json +7 -3
- package/node_modules/hast-util-to-html/lib/handle/comment.js +6 -1
- package/node_modules/hast-util-to-html/lib/handle/doctype.js +1 -1
- package/node_modules/hast-util-to-html/lib/handle/element.js +33 -9
- package/node_modules/hast-util-to-html/lib/handle/index.js +1 -1
- package/node_modules/hast-util-to-html/lib/handle/raw.js +1 -1
- package/node_modules/hast-util-to-html/lib/handle/root.js +1 -1
- package/node_modules/hast-util-to-html/lib/handle/text.js +1 -1
- package/node_modules/hast-util-to-html/lib/index.js +9 -4
- package/node_modules/hast-util-to-html/lib/omission/closing.js +7 -5
- package/node_modules/hast-util-to-html/lib/omission/omission.js +0 -1
- package/node_modules/hast-util-to-html/lib/omission/opening.js +4 -2
- package/node_modules/hast-util-to-html/lib/omission/util/siblings.js +3 -0
- package/node_modules/hast-util-to-html/package.json +5 -23
- package/node_modules/hast-util-to-html/readme.md +3 -2
- package/node_modules/jose/dist/webapi/jwks/remote.js +1 -1
- package/node_modules/jose/package.json +1 -1
- package/node_modules/rrule/LICENCE +65 -0
- package/node_modules/rrule/README.md +837 -0
- package/node_modules/rrule/dist/es5/rrule.js +3803 -0
- package/node_modules/rrule/dist/es5/rrule.min.js +2 -0
- package/node_modules/rrule/dist/esm/cache.js +95 -0
- package/node_modules/rrule/dist/esm/callbackiterresult.js +24 -0
- package/node_modules/rrule/dist/esm/datetime.js +186 -0
- package/node_modules/rrule/dist/esm/dateutil.js +161 -0
- package/node_modules/rrule/dist/esm/datewithzone.js +36 -0
- package/node_modules/rrule/dist/esm/helpers.js +118 -0
- package/node_modules/rrule/dist/esm/index.js +22 -0
- package/node_modules/rrule/dist/esm/iter/index.js +138 -0
- package/node_modules/rrule/dist/esm/iter/poslist.js +42 -0
- package/node_modules/rrule/dist/esm/iterinfo/easter.js +21 -0
- package/node_modules/rrule/dist/esm/iterinfo/index.js +188 -0
- package/node_modules/rrule/dist/esm/iterinfo/monthinfo.js +51 -0
- package/node_modules/rrule/dist/esm/iterinfo/yearinfo.js +128 -0
- package/node_modules/rrule/dist/esm/iterresult.js +88 -0
- package/node_modules/rrule/dist/esm/iterset.js +63 -0
- package/node_modules/rrule/dist/esm/masks.js +30 -0
- package/node_modules/rrule/dist/esm/nlp/i18n.js +74 -0
- package/node_modules/rrule/dist/esm/nlp/index.js +122 -0
- package/node_modules/rrule/dist/esm/nlp/parsetext.js +391 -0
- package/node_modules/rrule/dist/esm/nlp/totext.js +395 -0
- package/node_modules/rrule/dist/esm/optionstostring.js +98 -0
- package/node_modules/rrule/dist/esm/parseoptions.js +201 -0
- package/node_modules/rrule/dist/esm/parsestring.js +128 -0
- package/node_modules/rrule/dist/esm/rrule.js +232 -0
- package/node_modules/rrule/dist/esm/rruleset.js +182 -0
- package/node_modules/rrule/dist/esm/rrulestr.js +188 -0
- package/node_modules/rrule/dist/esm/types.js +14 -0
- package/node_modules/rrule/dist/esm/weekday.js +45 -0
- package/node_modules/rrule/package.json +79 -0
- package/package.json +32 -31
- package/node_modules/@deepseek-ai/dsh-computer-use/README.i18n.yaml +0 -37
- package/node_modules/@deepseek-ai/dsh-computer-use/README.md +0 -90
- package/node_modules/@deepseek-ai/dsh-computer-use/README.zh.md +0 -90
- package/node_modules/@deepseek-ai/dsh-computer-use/lib/index.js +0 -35
- package/node_modules/@deepseek-ai/dsh-computer-use/lib/types/brand.js +0 -10
- package/node_modules/@deepseek-ai/dsh-computer-use/lib/types/index.js +0 -36
- package/node_modules/@deepseek-ai/dsh-computer-use/locale/de.json +0 -6
- package/node_modules/@deepseek-ai/dsh-computer-use/locale/en.json +0 -6
- package/node_modules/@deepseek-ai/dsh-computer-use/locale/es.json +0 -6
- package/node_modules/@deepseek-ai/dsh-computer-use/locale/fr.json +0 -6
- package/node_modules/@deepseek-ai/dsh-computer-use/locale/ja.json +0 -6
- package/node_modules/@deepseek-ai/dsh-computer-use/locale/pt.json +0 -6
- package/node_modules/@deepseek-ai/dsh-computer-use/locale/ru.json +0 -6
- package/node_modules/@deepseek-ai/dsh-computer-use/locale/zh.json +0 -6
- package/node_modules/@deepseek-ai/dsh-computer-use/package.json +0 -44
- package/node_modules/@deepseek-ai/dsh-cua/README.i18n.yaml +0 -49
- package/node_modules/@deepseek-ai/dsh-cua/README.md +0 -130
- package/node_modules/@deepseek-ai/dsh-cua/README.zh.md +0 -130
- package/node_modules/@deepseek-ai/dsh-cua/lib/api.js +0 -597
- package/node_modules/@deepseek-ai/dsh-cua/lib/bridge.js +0 -611
- package/node_modules/@deepseek-ai/dsh-cua/lib/client.js +0 -1758
- package/node_modules/@deepseek-ai/dsh-cua/lib/index.js +0 -1916
- package/node_modules/@deepseek-ai/dsh-cua/lib/native-client.js +0 -285
- package/node_modules/@deepseek-ai/dsh-cua/lib/protocol.js +0 -305
- package/node_modules/@deepseek-ai/dsh-cua/lib/remote-types.js +0 -1
- package/node_modules/@deepseek-ai/dsh-cua/lib/typert.host.js +0 -416
- package/node_modules/@deepseek-ai/dsh-cua/lib/typert.remote-client.js +0 -301
- package/node_modules/@deepseek-ai/dsh-cua/locale/de.json +0 -6
- package/node_modules/@deepseek-ai/dsh-cua/locale/en.json +0 -6
- package/node_modules/@deepseek-ai/dsh-cua/locale/es.json +0 -6
- package/node_modules/@deepseek-ai/dsh-cua/locale/fr.json +0 -6
- package/node_modules/@deepseek-ai/dsh-cua/locale/ja.json +0 -6
- package/node_modules/@deepseek-ai/dsh-cua/locale/pt.json +0 -6
- package/node_modules/@deepseek-ai/dsh-cua/locale/ru.json +0 -6
- package/node_modules/@deepseek-ai/dsh-cua/locale/zh.json +0 -6
- package/node_modules/@deepseek-ai/dsh-cua/package.json +0 -151
- package/node_modules/@deepseek-ai/dsh-cua-bundle/README.i18n.yaml +0 -46
- package/node_modules/@deepseek-ai/dsh-cua-bundle/README.md +0 -94
- package/node_modules/@deepseek-ai/dsh-cua-bundle/README.zh.md +0 -94
- package/node_modules/@deepseek-ai/dsh-cua-bundle/cordis.patch.yml +0 -10
- package/node_modules/@deepseek-ai/dsh-cua-bundle/docs/DETAIL.md +0 -1
- package/node_modules/@deepseek-ai/dsh-cua-bundle/docs/DETAIL.zh.md +0 -1
- package/node_modules/@deepseek-ai/dsh-cua-bundle/docs/preview.svg +0 -33
- package/node_modules/@deepseek-ai/dsh-cua-bundle/docs/preview.zh.svg +0 -33
- package/node_modules/@deepseek-ai/dsh-cua-bundle/icon.svg +0 -35
- package/node_modules/@deepseek-ai/dsh-cua-bundle/lib/index.js +0 -1
- package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/de.json +0 -7
- package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/en.json +0 -7
- package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/es.json +0 -7
- package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/fr.json +0 -7
- package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/ja.json +0 -7
- package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/pt.json +0 -7
- package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/ru.json +0 -7
- package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/zh.json +0 -7
- package/node_modules/@deepseek-ai/dsh-cua-bundle/package.json +0 -58
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index--TtJvO-i.js +0 -197
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-Jtzf36XE.css +0 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.js +0 -14991
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_events.js +0 -298
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.js +0 -4060
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/index-incubating.js +0 -13
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/index.js +0 -16
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/internal/utils.js +0 -23
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/resource/SemanticResourceAttributes.js +0 -1250
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/resource/index.js +0 -10
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js +0 -1733
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_events.js +0 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_metrics.js +0 -315
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/trace/SemanticAttributes.js +0 -2360
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/trace/index.js +0 -10
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.js +0 -7
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.js +0 -14991
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_events.js +0 -298
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.js +0 -4060
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index-incubating.js +0 -13
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index.js +0 -16
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/internal/utils.js +0 -23
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/resource/SemanticResourceAttributes.js +0 -1250
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/resource/index.js +0 -10
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.js +0 -1733
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_events.js +0 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_metrics.js +0 -315
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/trace/SemanticAttributes.js +0 -2360
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/trace/index.js +0 -10
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.js +0 -7
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.js +0 -15049
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_events.js +0 -301
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.js +0 -4072
- package/node_modules/@opentelemetry/semantic-conventions/build/src/index-incubating.js +0 -29
- package/node_modules/@opentelemetry/semantic-conventions/build/src/index.js +0 -32
- package/node_modules/@opentelemetry/semantic-conventions/build/src/internal/utils.js +0 -27
- package/node_modules/@opentelemetry/semantic-conventions/build/src/resource/SemanticResourceAttributes.js +0 -1255
- package/node_modules/@opentelemetry/semantic-conventions/build/src/resource/index.js +0 -26
- package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.js +0 -1759
- package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_events.js +0 -15
- package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_metrics.js +0 -319
- package/node_modules/@opentelemetry/semantic-conventions/build/src/trace/SemanticAttributes.js +0 -2368
- package/node_modules/@opentelemetry/semantic-conventions/build/src/trace/index.js +0 -26
- package/node_modules/@opentelemetry/semantic-conventions/build/src/version.js +0 -10
- /package/node_modules/@smithy/core/dist-es/submodules/{protocols → serde}/writeKey.js +0 -0
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
//#region lib/types/parse.js
|
|
2
|
+
/**
|
|
3
|
+
* Batch parser following OpenAI Codex rust-v0.158.0 parser.rs and streaming_parser.rs.
|
|
4
|
+
* Adapted into a pure TypeScript parser with original-input diagnostics and no environment routing.
|
|
5
|
+
* Copyright 2025 OpenAI. Apache-2.0 portions and modification notice: ../LICENSE.
|
|
6
|
+
*/
|
|
7
|
+
const BEGIN = "*** Begin Patch";
|
|
8
|
+
const END = "*** End Patch";
|
|
9
|
+
const EOF = "*** End of File";
|
|
10
|
+
const MOVE = "*** Move to: ";
|
|
11
|
+
const ADD = "*** Add File: ";
|
|
12
|
+
const DELETE = "*** Delete File: ";
|
|
13
|
+
const UPDATE = "*** Update File: ";
|
|
14
|
+
/** Rust uses Unicode White_Space (all in the BMP); JavaScript trim also removes BOM. */
|
|
15
|
+
const WHITE_SPACE$1 = /\p{White_Space}/u;
|
|
16
|
+
/** Syntax failure with a one-based line in the original input, including any wrapper. */
|
|
17
|
+
var PatchParseError = class extends Error {
|
|
18
|
+
lineNumber;
|
|
19
|
+
reason;
|
|
20
|
+
constructor(lineNumber, reason) {
|
|
21
|
+
super(`Invalid patch at line ${lineNumber}: ${reason}`);
|
|
22
|
+
this.lineNumber = lineNumber;
|
|
23
|
+
this.reason = reason;
|
|
24
|
+
this.name = "PatchParseError";
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
/** Scan the ends to avoid regex backtracking over long interior whitespace. */
|
|
28
|
+
function trim(value) {
|
|
29
|
+
let start = 0;
|
|
30
|
+
while (start < value.length && WHITE_SPACE$1.test(value.charAt(start))) start++;
|
|
31
|
+
return trimEnd(value.slice(start));
|
|
32
|
+
}
|
|
33
|
+
function trimEnd(value) {
|
|
34
|
+
let end = value.length;
|
|
35
|
+
while (end > 0 && WHITE_SPACE$1.test(value.charAt(end - 1))) end--;
|
|
36
|
+
return value.slice(0, end);
|
|
37
|
+
}
|
|
38
|
+
function patchLines(patch) {
|
|
39
|
+
const offset = patch.slice(0, patch.length - patch.replace(/^\p{White_Space}+/u, "").length).split("\n").length - 1;
|
|
40
|
+
let lines = trim(patch).split(/\r?\n/u).map((text, index) => ({
|
|
41
|
+
text,
|
|
42
|
+
number: offset + index + 1
|
|
43
|
+
}));
|
|
44
|
+
const first = lines[0];
|
|
45
|
+
const last = lines.at(-1);
|
|
46
|
+
if ([
|
|
47
|
+
"<<EOF",
|
|
48
|
+
"<<'EOF'",
|
|
49
|
+
"<<\"EOF\""
|
|
50
|
+
].includes(first.text) && last.text.endsWith("EOF") && lines.length >= 4) lines = lines.slice(1, -1);
|
|
51
|
+
const start = lines[0];
|
|
52
|
+
const end = lines.at(-1);
|
|
53
|
+
if (trim(start.text) !== BEGIN) throw new PatchParseError(start.number, `Expected '${BEGIN}'`);
|
|
54
|
+
if (trim(end.text) !== END) throw new PatchParseError(end.number, `Expected '${END}'`);
|
|
55
|
+
return lines.map((line, index) => index < lines.length - 1 ? {
|
|
56
|
+
...line,
|
|
57
|
+
text: line.text.replace(/\r$/u, "")
|
|
58
|
+
} : line);
|
|
59
|
+
}
|
|
60
|
+
function emptyHunk(hunk) {
|
|
61
|
+
return hunk.oldLines.length === 0 && hunk.newLines.length === 0;
|
|
62
|
+
}
|
|
63
|
+
function ensureUpdate(operation, lineNumber) {
|
|
64
|
+
if (operation?.kind !== "update") return;
|
|
65
|
+
const last = operation.hunks.at(-1);
|
|
66
|
+
if (last === void 0) throw new PatchParseError(operation.lineNumber, `Update for '${operation.path}' requires at least one hunk`);
|
|
67
|
+
if (emptyHunk(last)) throw new PatchParseError(lineNumber, "Update hunk must contain context, added, or removed lines");
|
|
68
|
+
}
|
|
69
|
+
function newHunk(lineNumber) {
|
|
70
|
+
return {
|
|
71
|
+
lineNumber,
|
|
72
|
+
oldLines: [],
|
|
73
|
+
newLines: [],
|
|
74
|
+
isEndOfFile: false
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
function readUpdate(operation, line) {
|
|
78
|
+
const text = trimEnd(line.text);
|
|
79
|
+
const previous = operation.hunks.at(-1);
|
|
80
|
+
const marker = text === "@@" || text.startsWith("@@ ");
|
|
81
|
+
if (previous?.isEndOfFile) {
|
|
82
|
+
if (text === "") return;
|
|
83
|
+
if (!marker) throw new PatchParseError(line.number, "Expected '@@' after '*** End of File'");
|
|
84
|
+
}
|
|
85
|
+
if (previous === void 0 && operation.moveTo === void 0 && text.startsWith(MOVE)) {
|
|
86
|
+
operation.moveTo = text.slice(13);
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (marker) {
|
|
90
|
+
if (previous !== void 0 && emptyHunk(previous)) throw new PatchParseError(line.number, "Update hunk must contain context, added, or removed lines");
|
|
91
|
+
const hunk = newHunk(line.number);
|
|
92
|
+
if (text.startsWith("@@ ")) hunk.context = text.slice(3);
|
|
93
|
+
operation.hunks.push(hunk);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
if (text === EOF) {
|
|
97
|
+
if (previous !== void 0) {
|
|
98
|
+
if (emptyHunk(previous)) throw new PatchParseError(line.number, "Update hunk must contain context, added, or removed lines");
|
|
99
|
+
previous.isEndOfFile = true;
|
|
100
|
+
}
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
const prefix = line.text[0];
|
|
104
|
+
if (line.text !== "" && prefix !== " " && prefix !== "+" && prefix !== "-") throw new PatchParseError(line.number, "Expected a context (' '), added ('+'), removed ('-') line, or '@@'");
|
|
105
|
+
const hunk = previous ?? newHunk(line.number);
|
|
106
|
+
if (previous === void 0) operation.hunks.push(hunk);
|
|
107
|
+
const content = line.text.slice(1);
|
|
108
|
+
if (prefix === "+") hunk.newLines.push(content);
|
|
109
|
+
else if (prefix === "-") hunk.oldLines.push(content);
|
|
110
|
+
else {
|
|
111
|
+
hunk.oldLines.push(content);
|
|
112
|
+
hunk.newLines.push(content);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Parse a complete Codex-style patch without reading or modifying files.
|
|
117
|
+
* @param patch - patch text, optionally wrapped in a literal EOF heredoc.
|
|
118
|
+
* @returns ordered, JSON-serializable operations; an empty patch returns an empty array.
|
|
119
|
+
* @throws PatchParseError for malformed syntax or an unsupported Environment ID header.
|
|
120
|
+
*/
|
|
121
|
+
function parsePatch(patch) {
|
|
122
|
+
const lines = patchLines(patch);
|
|
123
|
+
const operations = [];
|
|
124
|
+
let ended = false;
|
|
125
|
+
for (const line of lines.slice(1)) {
|
|
126
|
+
const operation = operations.at(-1);
|
|
127
|
+
const header = operation?.kind === "update" && line !== lines.at(-1) ? trimEnd(line.text) : trim(line.text);
|
|
128
|
+
if (ended && line !== lines.at(-1)) {
|
|
129
|
+
if (trim(line.text) !== "") throw new PatchParseError(line.number, `Unexpected content after '${END}'`);
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
if (header === END) {
|
|
133
|
+
ensureUpdate(operation, line.number);
|
|
134
|
+
ended = true;
|
|
135
|
+
} else if (header.startsWith(ADD)) {
|
|
136
|
+
ensureUpdate(operation, line.number);
|
|
137
|
+
operations.push({
|
|
138
|
+
kind: "add",
|
|
139
|
+
path: header.slice(14),
|
|
140
|
+
lineNumber: line.number,
|
|
141
|
+
content: ""
|
|
142
|
+
});
|
|
143
|
+
} else if (header.startsWith(DELETE)) {
|
|
144
|
+
ensureUpdate(operation, line.number);
|
|
145
|
+
operations.push({
|
|
146
|
+
kind: "delete",
|
|
147
|
+
path: header.slice(17),
|
|
148
|
+
lineNumber: line.number
|
|
149
|
+
});
|
|
150
|
+
} else if (header.startsWith(UPDATE)) {
|
|
151
|
+
ensureUpdate(operation, line.number);
|
|
152
|
+
operations.push({
|
|
153
|
+
kind: "update",
|
|
154
|
+
path: header.slice(17),
|
|
155
|
+
lineNumber: line.number,
|
|
156
|
+
hunks: []
|
|
157
|
+
});
|
|
158
|
+
} else if (operations.length === 0 && header.startsWith("*** Environment ID:")) throw new PatchParseError(line.number, "Environment ID headers are unsupported; the caller selects the filesystem provider");
|
|
159
|
+
else if (operation?.kind === "add" && line.text.startsWith("+")) operation.content += `${line.text.slice(1)}\n`;
|
|
160
|
+
else if (operation?.kind === "update") readUpdate(operation, line);
|
|
161
|
+
else throw new PatchParseError(line.number, "Expected an Add File, Delete File, or Update File header; added content must start with +");
|
|
162
|
+
}
|
|
163
|
+
return operations;
|
|
164
|
+
}
|
|
165
|
+
//#endregion
|
|
166
|
+
//#region lib/types/apply.js
|
|
167
|
+
/**
|
|
168
|
+
* Pure text updates following OpenAI Codex rust-v0.158.0 NormalizeToLf behavior.
|
|
169
|
+
* Adapted from seek_sequence.rs and file_update.rs with structured match failures.
|
|
170
|
+
* Copyright 2025 OpenAI. Apache-2.0 portions and modification notice: ../LICENSE.
|
|
171
|
+
*/
|
|
172
|
+
const WHITE_SPACE = /\p{White_Space}/u;
|
|
173
|
+
function trimWhitespace(value, leading) {
|
|
174
|
+
let start = 0;
|
|
175
|
+
let end = value.length;
|
|
176
|
+
if (leading) while (start < end && WHITE_SPACE.test(value.charAt(start))) start++;
|
|
177
|
+
while (end > start && WHITE_SPACE.test(value.charAt(end - 1))) end--;
|
|
178
|
+
return value.slice(start, end);
|
|
179
|
+
}
|
|
180
|
+
function normalizePunctuation(value) {
|
|
181
|
+
return trimWhitespace(value, true).replace(/[\u2010-\u2015\u2212]/gu, "-").replace(/[\u2018-\u201B]/gu, "'").replace(/[\u201C-\u201F]/gu, "\"").replace(/[\u00A0\u2002-\u200A\u202F\u205F\u3000]/gu, " ");
|
|
182
|
+
}
|
|
183
|
+
const MATCH_PASSES = [
|
|
184
|
+
(value) => value,
|
|
185
|
+
(value) => trimWhitespace(value, false),
|
|
186
|
+
(value) => trimWhitespace(value, true),
|
|
187
|
+
normalizePunctuation
|
|
188
|
+
];
|
|
189
|
+
/** NormalizeToLf checks only the tail candidate for EOF, even before the cursor. */
|
|
190
|
+
function seekSequence(lines, pattern, start, eof) {
|
|
191
|
+
if (pattern.length === 0) return start;
|
|
192
|
+
if (pattern.length > lines.length) return void 0;
|
|
193
|
+
const last = lines.length - pattern.length;
|
|
194
|
+
const first = eof ? last : start;
|
|
195
|
+
for (const normalize of MATCH_PASSES) {
|
|
196
|
+
const expected = pattern.map(normalize);
|
|
197
|
+
for (let index = first; index <= last; index++) if (expected.every((line, offset) => normalize(lines[index + offset]) === line)) return index;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Apply parsed hunks to LF-normalized text without I/O or input mutation.
|
|
202
|
+
* All searches use the original text; a failed search returns no partial text.
|
|
203
|
+
* Successful nonempty output ends in LF, including initially unterminated text.
|
|
204
|
+
* @param before - text normalized by the caller; CR characters receive no line-ending handling.
|
|
205
|
+
* @param hunks - ordered hunks from parsePatch; EOF searches follow NormalizeToLf tail semantics.
|
|
206
|
+
* @returns new text or the first unmatched hunk, without throwing for a match failure.
|
|
207
|
+
*/
|
|
208
|
+
function applyHunks(before, hunks) {
|
|
209
|
+
const original = before.split("\n");
|
|
210
|
+
if (original.at(-1) === "") original.pop();
|
|
211
|
+
const replacements = [];
|
|
212
|
+
let lineIndex = 0;
|
|
213
|
+
for (const hunk of hunks) {
|
|
214
|
+
if (hunk.context !== void 0) {
|
|
215
|
+
const pattern = [hunk.context];
|
|
216
|
+
const found = seekSequence(original, pattern, lineIndex, false);
|
|
217
|
+
if (found === void 0) return {
|
|
218
|
+
ok: false,
|
|
219
|
+
failure: {
|
|
220
|
+
hunkLineNumber: hunk.lineNumber,
|
|
221
|
+
stage: "context",
|
|
222
|
+
searchStart: lineIndex,
|
|
223
|
+
pattern
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
lineIndex = found + 1;
|
|
227
|
+
}
|
|
228
|
+
if (hunk.oldLines.length === 0) {
|
|
229
|
+
const start = original.at(-1) === "" ? original.length - 1 : original.length;
|
|
230
|
+
replacements.push({
|
|
231
|
+
start,
|
|
232
|
+
oldLength: 0,
|
|
233
|
+
newLines: hunk.newLines
|
|
234
|
+
});
|
|
235
|
+
continue;
|
|
236
|
+
}
|
|
237
|
+
let pattern = hunk.oldLines;
|
|
238
|
+
let newLines = hunk.newLines;
|
|
239
|
+
let found = seekSequence(original, pattern, lineIndex, hunk.isEndOfFile);
|
|
240
|
+
if (found === void 0 && pattern.at(-1) === "") {
|
|
241
|
+
pattern = pattern.slice(0, -1);
|
|
242
|
+
if (newLines.at(-1) === "") newLines = newLines.slice(0, -1);
|
|
243
|
+
found = seekSequence(original, pattern, lineIndex, hunk.isEndOfFile);
|
|
244
|
+
}
|
|
245
|
+
if (found === void 0) return {
|
|
246
|
+
ok: false,
|
|
247
|
+
failure: {
|
|
248
|
+
hunkLineNumber: hunk.lineNumber,
|
|
249
|
+
stage: "oldLines",
|
|
250
|
+
searchStart: lineIndex,
|
|
251
|
+
pattern: [...hunk.oldLines]
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
replacements.push({
|
|
255
|
+
start: found,
|
|
256
|
+
oldLength: pattern.length,
|
|
257
|
+
newLines
|
|
258
|
+
});
|
|
259
|
+
lineIndex = found + pattern.length;
|
|
260
|
+
}
|
|
261
|
+
replacements.sort((left, right) => left.start - right.start);
|
|
262
|
+
let lines = original;
|
|
263
|
+
for (const replacement of replacements.reverse()) lines = [
|
|
264
|
+
...lines.slice(0, replacement.start),
|
|
265
|
+
...replacement.newLines,
|
|
266
|
+
...lines.slice(replacement.start + replacement.oldLength)
|
|
267
|
+
];
|
|
268
|
+
if (lines.at(-1) !== "") lines.push("");
|
|
269
|
+
return {
|
|
270
|
+
ok: true,
|
|
271
|
+
after: lines.join("\n")
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
//#endregion
|
|
275
|
+
export { PatchParseError, applyHunks, parsePatch };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@deepseek-ai/dsh-fs-patch",
|
|
3
|
+
"description": "Pure Codex-style patch parser and LF text updater with structured match failures",
|
|
4
|
+
"version": "0.2.2-alpha.2",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
|
|
11
|
+
"directory": "packages/fs/fs-patch"
|
|
12
|
+
},
|
|
13
|
+
"type": "module",
|
|
14
|
+
"main": "lib/index.js",
|
|
15
|
+
"types": "lib/types/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./lib/types/index.d.ts",
|
|
19
|
+
"default": "./lib/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./src/*": "./src/*",
|
|
22
|
+
"./package.json": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"lib/index.js",
|
|
26
|
+
"lib/types/**/*.d.ts"
|
|
27
|
+
],
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"@deepseek-ai/cordis": "4.0.6-alpha.1"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@deepseek-ai/cordis": "4.0.6-alpha.1"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
en: 68f0a0a66d33b6ec
|
|
10
10
|
zh: 62fed2012166c111
|
|
11
11
|
/deepseek-ai-dsh-fs-sandbox/summary:
|
|
12
|
-
en:
|
|
13
|
-
zh:
|
|
12
|
+
en: 3fa6d9a13393ed2d
|
|
13
|
+
zh: d91675872102ae2a
|
|
14
14
|
/deepseek-ai-dsh-fs-sandbox/table-of-contents:
|
|
15
15
|
en: d152484eb41ac6b4
|
|
16
16
|
zh: 09388d293f9be9cb
|
|
17
17
|
/deepseek-ai-dsh-fs-sandbox/use-this-package:
|
|
18
|
-
en:
|
|
19
|
-
zh:
|
|
18
|
+
en: c159e3686e5b036d
|
|
19
|
+
zh: 2ff0d0e7ce62cb30
|
|
20
20
|
/deepseek-ai-dsh-fs-sandbox/use-this-package/minimal-composition:
|
|
21
21
|
en: a954957753339bbf
|
|
22
22
|
zh: c6633e86de8b2707
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
en: ef26d25e866ae9c0
|
|
34
34
|
zh: 8206760b2e2c5feb
|
|
35
35
|
/deepseek-ai-dsh-fs-sandbox/understand-the-implementation/source-map:
|
|
36
|
-
en:
|
|
37
|
-
zh:
|
|
36
|
+
en: 6804c986bcfb5a97
|
|
37
|
+
zh: b4309922f08383c3
|
|
38
38
|
/deepseek-ai-dsh-fs-sandbox/understand-the-implementation/how-a-mutation-is-fenced:
|
|
39
39
|
en: d30a62f5f7e9aee7
|
|
40
40
|
zh: 837e33fb5eea2f64
|
|
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
|
|
|
9
9
|
|
|
10
10
|
## Summary
|
|
11
11
|
|
|
12
|
-
`dsh-fs-sandbox` confines model file writes and
|
|
12
|
+
`dsh-fs-sandbox` confines model file writes, edits, patches, deletions, and moves according to each session's sandbox mode while preserving the local filesystem's read behavior. In `read-only`, it rejects every mutation; in `workspace-write`, it permits targets only inside the session workspace or a platform temporary root; in `danger-full-access`, it does not restrict mutations. Use it instead of `fs-local` with `ctx.sandboxPolicy` when sessions need workspace-confined file changes. Denied operations return `FS_SANDBOX_DENIED`, which filesystem tools present with the active mode and a same-turn escalation hint.
|
|
13
13
|
|
|
14
14
|
## Table of Contents
|
|
15
15
|
|
|
@@ -25,6 +25,8 @@ English | [中文](README.zh.md)
|
|
|
25
25
|
<a id="use-this-package"></a>
|
|
26
26
|
## Use this package
|
|
27
27
|
|
|
28
|
+
The fence covers `writeText`, `editText`, `patchText`, `deleteFile`, and `moveFile`. A move checks both source and destination before either effect, so a denied path leaves both files untouched.
|
|
29
|
+
|
|
28
30
|
Mount this backend instead of `fs-local` when the model's file writes and edits must be confined by the session's sandbox mode, while reads stay unconfined. The fence applies per call: the tool layer resolves the calling session's mode and workspace root into the same policy the bash runner receives, so the filesystem and shell families never confine to different roots.
|
|
29
31
|
|
|
30
32
|
### Minimal composition
|
|
@@ -67,7 +69,7 @@ The fence is a policy check in trusted code over a model-controlled path — not
|
|
|
67
69
|
|
|
68
70
|
| File | Role |
|
|
69
71
|
|---|---|
|
|
70
|
-
| [`src/index.ts`](src/index.ts) | `SandboxedFileSystem`: mode fence on `writeText`/`editText`, `sandboxMode` fact |
|
|
72
|
+
| [`src/index.ts`](src/index.ts) | `SandboxedFileSystem`: mode fence on `writeText`/`editText`/`patchText`/`deleteFile`/`moveFile`, `sandboxMode` fact |
|
|
71
73
|
| [`src/containment.ts`](src/containment.ts) | Ancestor containment check with lexical fast path and identity-based fallback |
|
|
72
74
|
|
|
73
75
|
### How a mutation is fenced
|
|
@@ -9,7 +9,7 @@ kind: "package-reference"
|
|
|
9
9
|
|
|
10
10
|
## 概述
|
|
11
11
|
|
|
12
|
-
`dsh-fs-sandbox`
|
|
12
|
+
`dsh-fs-sandbox` 按各会话的沙箱模式限制模型对文件的写入、编辑、打补丁、删除与移动,同时保留本地文件系统的读取行为。`read-only` 拒绝所有变更;`workspace-write` 只允许目标位于会话工作区或平台临时根目录内;`danger-full-access` 不限制变更。当会话需要将文件变更限制在工作区内时,使用它代替 `fs-local`,并加载 `ctx.sandboxPolicy`。被拒绝的操作返回 `FS_SANDBOX_DENIED`,文件系统工具会显示当前模式和同轮次升级提示。
|
|
13
13
|
|
|
14
14
|
## 目录
|
|
15
15
|
|
|
@@ -25,6 +25,8 @@ kind: "package-reference"
|
|
|
25
25
|
<a id="use-this-package"></a>
|
|
26
26
|
## 使用本包
|
|
27
27
|
|
|
28
|
+
围栏覆盖 `writeText`、`editText`、`patchText`、`deleteFile` 和 `moveFile`。移动在任何效果发生前检查源与目标,因此任一路径被拒都会使两端文件保持不变。
|
|
29
|
+
|
|
28
30
|
当模型的文件写入与编辑必须受会话沙箱模式约束、而读取保持不受约束时,挂载此后端以替代 `fs-local`。围栏按调用生效:工具层把调用会话的模式与工作区根目录解析为与 bash runner 收到的相同策略,因此文件系统与 shell 两个能力族绝不会约束到不同根目录。
|
|
29
31
|
|
|
30
32
|
### 最小组合
|
|
@@ -67,7 +69,7 @@ kind: "package-reference"
|
|
|
67
69
|
|
|
68
70
|
| 文件 | 职责 |
|
|
69
71
|
|---|---|
|
|
70
|
-
| [`src/index.ts`](src/index.ts) | `SandboxedFileSystem`:`writeText`/`editText` 上的模式围栏、`sandboxMode` 事实 |
|
|
72
|
+
| [`src/index.ts`](src/index.ts) | `SandboxedFileSystem`:`writeText`/`editText`/`patchText`/`deleteFile`/`moveFile` 上的模式围栏、`sandboxMode` 事实 |
|
|
71
73
|
| [`src/containment.ts`](src/containment.ts) | 祖先包含检查,带词法快速路径与基于身份的兜底 |
|
|
72
74
|
|
|
73
75
|
### 变更如何被围栏
|
|
@@ -71,7 +71,7 @@ async function isPathUnder(path, root, caseSensitive = process.platform !== "win
|
|
|
71
71
|
* text-storage mechanics — resolve, stat, read/stream, list, the atomic
|
|
72
72
|
* write and the read-match-write edit critical section — are the local
|
|
73
73
|
* implementation's, verbatim; this package adds only the per-call POLICY fence
|
|
74
|
-
* on
|
|
74
|
+
* on all five mutations. Reads pass through untouched: every mode permits
|
|
75
75
|
* reading.
|
|
76
76
|
*
|
|
77
77
|
* The fence is a policy check in TRUSTED code over a MODEL-CONTROLLED path,
|
|
@@ -140,6 +140,29 @@ var SandboxedFileSystem = class extends LocalFileSystem {
|
|
|
140
140
|
return super.editText(await this.checkedTarget(target, sandboxPolicy), edit, expected, signal);
|
|
141
141
|
}
|
|
142
142
|
/**
|
|
143
|
+
* Fence the mutation before delegating to the local provider.
|
|
144
|
+
* @param sandboxPolicy - per-call mode and workspace root; omit for the deployment fallback.
|
|
145
|
+
*/
|
|
146
|
+
async patchText(target, hunks, expected, signal, sandboxPolicy) {
|
|
147
|
+
return super.patchText(await this.checkedTarget(target, sandboxPolicy), hunks, expected, signal);
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Fence the mutation before delegating to the local provider.
|
|
151
|
+
* @param sandboxPolicy - per-call mode and workspace root; omit for the deployment fallback.
|
|
152
|
+
*/
|
|
153
|
+
async deleteFile(target, expected, signal, sandboxPolicy) {
|
|
154
|
+
return super.deleteFile(await this.checkedTarget(target, sandboxPolicy), expected, signal);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Fence the mutation before delegating to the local provider.
|
|
158
|
+
* @param sandboxPolicy - per-call mode and workspace root; omit for the deployment fallback.
|
|
159
|
+
*/
|
|
160
|
+
async moveFile(source, destination, options, signal, sandboxPolicy) {
|
|
161
|
+
const checkedSource = await this.checkedTarget(source, sandboxPolicy);
|
|
162
|
+
const checkedDestination = await this.checkedTarget(destination, sandboxPolicy);
|
|
163
|
+
return super.moveFile(checkedSource, checkedDestination, options, signal);
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
143
166
|
* Enforce the per-call policy against `target` and return the EXACT target the
|
|
144
167
|
* mutation must use, so the checked identity is the mutated one (no
|
|
145
168
|
* check-here-write-there TOCTOU). `read-only` denies; `workspace-write`
|
|
@@ -1132,7 +1132,7 @@ export const TYPERT = {
|
|
|
1132
1132
|
},
|
|
1133
1133
|
{
|
|
1134
1134
|
"name": "SessionEventMap",
|
|
1135
|
-
"declaration": "export interface SessionEventMap {\n 'turn/start': { turn: number; };\n 'turn/end': { turn: number; reason: TurnEndReason; };\n 'step/start': { turn: number; step: number; };\n 'step/end': { turn: number; step: number; };\n 'user/message': UserMessage;\n 'developer/message': { turn: number; step: number; message: DeveloperMessage; headerSeq?: SessionSeq; };\n 'system/message': { turn: number; step: number; message: SystemMessage; };\n 'assistant/message': { turn: number; step: number; message: AssistantMessage; stream: AssistantStreamRecord[]; usage?: TokenUsage; interrupted?: true; };\n 'assistant/attempt': { turn: number; step: number; stream: AssistantStreamRecord[]; };\n 'tool/call': { turn: number; step: number; callId: ToolCallId; name: string; arguments: string; };\n 'tool/result': { turn: number; step: number; message: ToolResultMessage; error?: { name: string; code: string; reason?: string; }; meta?: JsonValue; };\n 'request/header': { header: EpochHeader; reason: RequestHeaderReason; startsSeries?: true; };\n 'request/context': RequestContext;\n 'session/end-seed': { inherited?: true; };\n 'agent/inbox/spliced': { target: InboxTarget; start: number; removedCount?: number; inserted: UserMessage[]; outcome?: 'canceled'; };\n 'model/selection': ModelSelection;\n 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\n 'agent-preset/selected': { agentPreset: string; };\n 'job/registered': JobRegisteredData;\n 'job/settled': JobSettledData;\n 'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n 'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: import('@deepseek-ai/dsh-session/types').SessionSeq; };\n 'image/offload': { targets: ImageOffloadTarget[]; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'working-directory/change': { cwd: string; };\n 'approval/asked': { id: ApprovalRequestId; toolName: string; callId?: ToolCallId; reason?: string; };\n 'approval/decided': { id: ApprovalRequestId; outcome: ApprovalOutcome; };\n 'approval/policy': { policy: ApprovalPolicy; source?: 'delegation'; };\n 'permission/preset': { preset: string; };\n 'subagent/descriptor': SubagentDescriptorData;\n 'subagent/catalog': SubagentCatalogEvent;\n 'compaction/start': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; };\n 'compaction/summary': { compactionId: CompactionId; sourceCommandId?: CommandId; summary: ContentBlock[]; shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; provider: string; model: string; maxTokens?: number; usage?: TokenUsage; } & ({ rawOutput: ContentBlock[]; llmStreamCall: true; } | { rawOutput?: ContentBlock[]; llmStreamCall?: never; });\n 'compaction/end': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; error?: string; };\n 'compaction/prune': { shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; };\n 'tool/ptc-dispatch-start': PtcDispatchStartEventData;\n 'tool/ptc-dispatch': PtcDispatchEventData;\n 'feedback/record': FeedbackRecord;\n 'llm/retry': LlmRetryEventData;\n 'llm/retry-started': LlmRetryStartedEventData;\n 'team/member': { version: 2; teamId: TeamId; member: TeamMemberSnapshot; };\n 'team/task': { version: 2; teamId: TeamId; task: TeamTaskSnapshot; };\n 'team/message/queued': { version: 2; teamId: TeamId; message: TeamMessageSnapshot; };\n 'team/message/delivered': { version: 2; teamId: TeamId; messageId: TeamMessageId; targetId: SessionId; };\n 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'plan/mode': { active: boolean; };\n 'schedule/change': ScheduleChange;\n 'subagent/model-selection-policy': { allowedModels: AllowedModelRoute[]; };\n 'workspace/changes': { turn: number; };\n}"
|
|
1135
|
+
"declaration": "export interface SessionEventMap {\n 'turn/start': { turn: number; };\n 'turn/end': { turn: number; reason: TurnEndReason; };\n 'step/start': { turn: number; step: number; };\n 'step/end': { turn: number; step: number; };\n 'user/message': UserMessage;\n 'developer/message': { turn: number; step: number; message: DeveloperMessage; headerSeq?: SessionSeq; };\n 'system/message': { turn: number; step: number; message: SystemMessage; };\n 'assistant/message': { turn: number; step: number; message: AssistantMessage; stream: AssistantStreamRecord[]; usage?: TokenUsage; interrupted?: true; };\n 'assistant/attempt': { turn: number; step: number; stream: AssistantStreamRecord[]; };\n 'tool/call': { turn: number; step: number; callId: ToolCallId; name: string; arguments: string; };\n 'tool/result': { turn: number; step: number; message: ToolResultMessage; error?: { name: string; code: string; reason?: string; }; meta?: JsonValue; };\n 'request/header': { header: EpochHeader; reason: RequestHeaderReason; startsSeries?: true; };\n 'request/context': RequestContext;\n 'session/end-seed': { inherited?: true; };\n 'agent/inbox/spliced': { target: InboxTarget; start: number; removedCount?: number; inserted: UserMessage[]; outcome?: 'canceled'; };\n 'model/selection': ModelSelection;\n 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\n 'agent-preset/selected': { agentPreset: string; };\n 'job/registered': JobRegisteredData;\n 'job/settled': JobSettledData;\n 'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n 'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: import('@deepseek-ai/dsh-session/types').SessionSeq; };\n 'image/offload': { targets: ImageOffloadTarget[]; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'working-directory/change': { cwd: string; };\n 'approval/asked': { id: ApprovalRequestId; toolName: string; callId?: ToolCallId; reason?: string; };\n 'approval/decided': { id: ApprovalRequestId; outcome: ApprovalOutcome; };\n 'approval/policy': { policy: ApprovalPolicy; source?: 'delegation'; };\n 'permission/preset': { preset: string; };\n 'subagent/descriptor': SubagentDescriptorData;\n 'subagent/catalog': SubagentCatalogEvent;\n 'compaction/start': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; };\n 'compaction/summary': { compactionId: CompactionId; sourceCommandId?: CommandId; summary: ContentBlock[]; shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; provider: string; model: string; maxTokens?: number; usage?: TokenUsage; } & ({ rawOutput: ContentBlock[]; llmStreamCall: true; } | { rawOutput?: ContentBlock[]; llmStreamCall?: never; });\n 'compaction/end': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; error?: string; };\n 'compaction/prune': { shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; };\n 'tool/ptc-dispatch-start': PtcDispatchStartEventData;\n 'tool/ptc-dispatch': PtcDispatchEventData;\n 'feedback/record': FeedbackRecord;\n 'llm/retry': LlmRetryEventData;\n 'llm/retry-started': LlmRetryStartedEventData;\n 'team/member': { version: 2; teamId: TeamId; member: TeamMemberSnapshot; };\n 'team/task': { version: 2; teamId: TeamId; task: TeamTaskSnapshot; };\n 'team/message/queued': { version: 2; teamId: TeamId; message: TeamMessageSnapshot; };\n 'team/message/delivered': { version: 2; teamId: TeamId; messageId: TeamMessageId; targetId: SessionId; };\n 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'plan/mode': { active: boolean; };\n 'schedule/change': ScheduleChange;\n 'session-log-deepseek/delivery-accepted': { sessionId: import('@deepseek-ai/dsh-session/types').SessionId; sessionFormatVersion?: number; throughSeq: import('@deepseek-ai/dsh-session/types').SessionSeq; };\n 'subagent/model-selection-policy': { allowedModels: AllowedModelRoute[]; };\n 'workspace/changes': { turn: number; };\n}"
|
|
1136
1136
|
},
|
|
1137
1137
|
{
|
|
1138
1138
|
"name": "SessionEventType",
|
|
@@ -1093,10 +1093,11 @@ let Hmr = (() => {
|
|
|
1093
1093
|
}
|
|
1094
1094
|
const reload = async (plugin, fibers, replacements = new ReloadModules(), activated = []) => {
|
|
1095
1095
|
for (const [previousFiber, implementation] of replacements.getActiveImplementations(this.ctx, plugin, fibers)) {
|
|
1096
|
-
const
|
|
1096
|
+
const wrapper = previousFiber.fiber.parent.registry.plugin(implementation, previousFiber.config, this.getOuterStack);
|
|
1097
|
+
const fiber = wrapper.ctx.fiber;
|
|
1097
1098
|
if (previousFiber.entry !== void 0) {
|
|
1098
1099
|
fiber.entry = previousFiber.entry;
|
|
1099
|
-
previousFiber.entry.fiber =
|
|
1100
|
+
previousFiber.entry.fiber = wrapper;
|
|
1100
1101
|
}
|
|
1101
1102
|
activated.push(fiber);
|
|
1102
1103
|
}
|
|
@@ -1234,7 +1235,7 @@ let Hmr = (() => {
|
|
|
1234
1235
|
const owner = (fiber) => {
|
|
1235
1236
|
for (let current = fiber; current.uid !== 0; current = current.parent.fiber) {
|
|
1236
1237
|
const entry = current.entry;
|
|
1237
|
-
if (entry?.fiber === current && managed.has(entry) && affectedFibers.has(current)) return entry;
|
|
1238
|
+
if (entry?.fiber?.ctx.fiber === current && managed.has(entry) && affectedFibers.has(current)) return entry;
|
|
1238
1239
|
}
|
|
1239
1240
|
};
|
|
1240
1241
|
const entries = running.flatMap(({ fiber }) => owner(fiber) ?? []);
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
en: 8741f3c1d726c816
|
|
22
22
|
zh: 498d221466467bdf
|
|
23
23
|
/deepseek-ai-dsh-llm/use-this-package/minimal-composition:
|
|
24
|
-
en:
|
|
25
|
-
zh:
|
|
24
|
+
en: cf221d60fb42a278
|
|
25
|
+
zh: 0ea17503495d386b
|
|
26
26
|
/deepseek-ai-dsh-llm/use-this-package/what-you-can-do:
|
|
27
27
|
en: dc61eb86585f6e0d
|
|
28
28
|
zh: 9c0d6b240dfd2cda
|
|
@@ -58,6 +58,8 @@ for await (const chunk of ctx.llm.stream({
|
|
|
58
58
|
|
|
59
59
|
After a successful mount, `ctx.llm.listProviders()` reports the registered routes in registration order.
|
|
60
60
|
|
|
61
|
+
Auxiliary request producers declare their `purpose` in `LlmRequestPurposeMap` through module augmentation of `@deepseek-ai/dsh-llm/types`; each key maps to `true`. `GenerateOptions.purpose` accepts the declared keys, while ordinary conversation requests omit it. Import the producer package or its public types before constructing that auxiliary request. Adapters carry the purpose as model-hidden transport metadata and handle unfamiliar purposes without rejecting the request.
|
|
62
|
+
|
|
61
63
|
`GenerateOptions.messages` accepts durable `Message` values and request-only `RequestUserInput` values. Request-only inputs carry user-role content with no `id` or `source`; Session writes and Agent delivery still require durable messages. Callers keep auxiliary inputs unchanged until the stream settles. A caller that records its exact request, such as session-title generation, must use durable messages.
|
|
62
64
|
|
|
63
65
|
`prepareCall(config, signal, configure?)` accepts concrete `LlmCallConfig` values. The optional synchronous, pure `ConfigureCall` function receives detached, deeply frozen `LlmCallControls` and model metadata from the captured adapter generation. Callers can compose ordinary functions to choose concrete controls; later writes replace earlier ones. Preparation retains the captured route, applies defaults to omitted controls, validates the result, and returns a frozen configuration for recording and dispatch. Callback failures or cancellation reject before dispatch. Preparation requires a registered adapter.
|
|
@@ -58,6 +58,8 @@ for await (const chunk of ctx.llm.stream({
|
|
|
58
58
|
|
|
59
59
|
挂载成功后,`ctx.llm.listProviders()` 会按注册顺序报告已注册路由。
|
|
60
60
|
|
|
61
|
+
辅助请求的生产方通过扩展 `@deepseek-ai/dsh-llm/types` 中的 `LlmRequestPurposeMap` 声明自己的 `purpose`,每个键映射到 `true`。`GenerateOptions.purpose` 接受已声明的键,普通对话请求则省略它。构造辅助请求前,应导入生产方包或其公开类型。适配器将用途作为模型不可见的传输元数据传递,并在遇到不熟悉的用途时继续处理请求。
|
|
62
|
+
|
|
61
63
|
`GenerateOptions.messages` 接受持久 `Message` 值和仅供请求使用的 `RequestUserInput` 值。仅供请求使用的输入包含 user-role 内容,不含 `id` 或 `source`;Session 写入和 Agent 投递仍然要求持久消息。调用方必须在流结束前保持辅助输入不变。会记录完整请求的调用方(例如会话标题生成)必须使用持久消息。
|
|
62
64
|
|
|
63
65
|
`prepareCall(config, signal, configure?)` 接受具体的 `LlmCallConfig` 值。可选的同步纯函数 `ConfigureCall` 接收已分离且深度冻结的 `LlmCallControls`,以及捕获的适配器代次所提供的模型元数据。调用方可组合普通函数来选择具体控制项;后执行的写入替换先前的值。准备操作保留捕获的路由,为省略的控制项应用默认值,校验结果,再返回用于记录与分发的冻结配置。回调失败或取消会在分发前拒绝。准备操作要求注册适配器。
|
|
@@ -357,7 +357,7 @@ export const TYPERT = {
|
|
|
357
357
|
},
|
|
358
358
|
{
|
|
359
359
|
"name": "GenerateOptions",
|
|
360
|
-
"declaration": "export interface GenerateOptions {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n messages: RequestMessage[];\n system?: string;\n tools?: ToolSchema[];\n toolHistory?: ToolHistory;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n signal?: AbortSignal;\n sessionId?: Branded<'SessionId'>;\n purpose?:
|
|
360
|
+
"declaration": "export interface GenerateOptions<Purpose extends string = LlmRequestPurpose> {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n messages: RequestMessage[];\n system?: string;\n tools?: ToolSchema[];\n toolHistory?: ToolHistory;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n signal?: AbortSignal;\n sessionId?: Branded<'SessionId'>;\n purpose?: Purpose;\n}"
|
|
361
361
|
},
|
|
362
362
|
{
|
|
363
363
|
"name": "GoalId",
|
|
@@ -455,6 +455,14 @@ export const TYPERT = {
|
|
|
455
455
|
"name": "LlmReasoningEffortInfo",
|
|
456
456
|
"declaration": "export interface LlmReasoningEffortInfo {\n id: ReasoningEffortId;\n name: string;\n description?: string;\n}"
|
|
457
457
|
},
|
|
458
|
+
{
|
|
459
|
+
"name": "LlmRequestPurpose",
|
|
460
|
+
"declaration": "export type LlmRequestPurpose = Extract<keyof LlmRequestPurposeMap, string>;"
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"name": "LlmRequestPurposeMap",
|
|
464
|
+
"declaration": "export interface LlmRequestPurposeMap {\n}"
|
|
465
|
+
},
|
|
458
466
|
{
|
|
459
467
|
"name": "LlmResolvedModelInfo",
|
|
460
468
|
"declaration": "export interface LlmResolvedModelInfo extends LlmModelInfo {\n context?: LlmModelContext;\n defaultMaxTokens?: number;\n reasoning?: LlmModelReasoningInfo;\n systemPromptUpdate?: SystemPromptUpdate;\n toolUpdate?: ToolUpdate;\n}"
|
|
@@ -2207,11 +2207,12 @@ var DeepSeekAdapter = class extends LlmAdapter {
|
|
|
2207
2207
|
reason
|
|
2208
2208
|
});
|
|
2209
2209
|
}, fileIds);
|
|
2210
|
-
const
|
|
2210
|
+
const requestIdentity = {
|
|
2211
2211
|
signal,
|
|
2212
2212
|
...options.sessionId === void 0 ? {} : { sessionId: String(options.sessionId) },
|
|
2213
2213
|
...options.purpose === void 0 ? {} : { purpose: options.purpose }
|
|
2214
|
-
}
|
|
2214
|
+
};
|
|
2215
|
+
const extensions = await prepareRequestExtensions(body, requestIdentity, this.dependencies.prepareExtensions, (fields, error) => {
|
|
2215
2216
|
this.dependencies.onExtensionsOmitted?.({
|
|
2216
2217
|
provider: options.provider,
|
|
2217
2218
|
model: options.model,
|
|
@@ -2241,7 +2242,7 @@ var DeepSeekAdapter = class extends LlmAdapter {
|
|
|
2241
2242
|
...betas.length === 0 ? {} : { "anthropic-beta": betas.join(",") },
|
|
2242
2243
|
"x-deepseek-harness-user-id": this.dependencies.resolveUserId(),
|
|
2243
2244
|
...options.sessionId === void 0 ? {} : { "x-deepseek-harness-session-id": String(options.sessionId) },
|
|
2244
|
-
...
|
|
2245
|
+
...requestIdentity.purpose === "compaction" ? { "x-deepseek-harness-compact": "1" } : {}
|
|
2245
2246
|
}
|
|
2246
2247
|
});
|
|
2247
2248
|
if (!response.ok) {
|
|
@@ -45,8 +45,11 @@
|
|
|
45
45
|
en: 1598ac8a8bb9b6bf
|
|
46
46
|
zh: fdd089c5ae7722cd
|
|
47
47
|
/deepseek-ai-dsh-llm-pi-ai/understand-the-implementation/design-philosophy:
|
|
48
|
-
en:
|
|
49
|
-
zh:
|
|
48
|
+
en: db1ac8ccca2d858b
|
|
49
|
+
zh: 1d7cd4153aad22b0
|
|
50
|
+
/deepseek-ai-dsh-llm-pi-ai/understand-the-implementation/request-headers:
|
|
51
|
+
en: 615ca9834bf6544f
|
|
52
|
+
zh: 2d70b548f99000d1
|
|
50
53
|
/deepseek-ai-dsh-llm-pi-ai/understand-the-implementation/source-map:
|
|
51
54
|
en: 64912b8a3a336419
|
|
52
55
|
zh: 33a245969b4194f6
|
|
@@ -142,6 +142,13 @@ The adapter is built on immutable snapshots and per-operation resolution. Each o
|
|
|
142
142
|
|
|
143
143
|
Initial prompt text and active tools use pi-ai's `Context.systemPrompt` and `Context.tools`; later system and tool updates remain in `Context.messages`. pi-ai normalizes these fields and applies the selected protocol's serialization rules.
|
|
144
144
|
|
|
145
|
+
<a id="request-headers"></a>
|
|
146
|
+
### Request headers
|
|
147
|
+
|
|
148
|
+
Plugins can contribute model-hidden transport metadata through the synchronous `llm-pi-ai/request-headers` waterfall. Each inference call supplies immutable routing metadata (`PiAiRequestHeaderContext`) and a fresh `Headers` copy of its profile headers; when configured names differ only in capitalization, the last entry wins. The endpoint belongs to the prepared model, so concurrent calls and configuration changes cannot exchange header state. Listeners edit that copy, call `next()`, and release their references on return; `ctx.on()` removes their registration when the owning plugin unloads. Harness attribution is applied after all contributors, and pi-ai receives a detached header record.
|
|
149
|
+
|
|
150
|
+
This event covers inference calls with or without a Session id, including auxiliary calls, but excludes model discovery. A contributor exception or invalid HTTP header fails the call with `REQUEST_HEADERS` before inference dispatch; no partially prepared request is sent. The failure identifies the provider and includes the contributor's top-level error message, which must exclude credentials and header values. Native header validation can echo values in a `TypeError`, so TypeError details and non-Error throws receive safe guidance instead; nested causes remain attached to the thrown error but are not copied into the public failure. Contributions do not change messages, tool schemas, or the Session log. Direct `PiAiAdapter` consumers can supply the equivalent `prepareHeaders` callback.
|
|
151
|
+
|
|
145
152
|
### Source map
|
|
146
153
|
|
|
147
154
|
| File | Role |
|
|
@@ -142,6 +142,13 @@ Config 更新严格验证发生变化的 provider。初始加载将已存储的
|
|
|
142
142
|
|
|
143
143
|
初始提示词文本和可用工具分别使用 pi-ai 的 `Context.systemPrompt` 与 `Context.tools`;后续系统消息和工具更新保留在 `Context.messages` 中。pi-ai 负责规范化这些字段,并应用所选协议的序列化规则。
|
|
144
144
|
|
|
145
|
+
<a id="request-headers"></a>
|
|
146
|
+
### 请求头
|
|
147
|
+
|
|
148
|
+
插件可通过同步的 `llm-pi-ai/request-headers` waterfall 贡献模型不可见的传输元数据。每次推理调用提供不可变的路由元数据(`PiAiRequestHeaderContext`)和从 profile 标头复制出的独立 `Headers`;配置名称仅大小写不同时,以最后一个条目为准。端点来自已准备的模型,因此并发调用与配置变更不会交换请求头状态。监听器修改该副本、调用 `next()`,并在返回时释放对它的引用;所属插件卸载时,`ctx.on()` 会移除注册。Harness 的应用标识在所有贡献器之后写入,pi-ai 接收独立的标头记录。
|
|
149
|
+
|
|
150
|
+
该事件覆盖有无 Session id 的推理调用及辅助调用,不用于模型发现。贡献器异常或无效 HTTP 标头会在推理发送前以 `REQUEST_HEADERS` 使调用失败,不发送部分准备好的请求。失败信息包含 provider 和贡献器的顶层错误消息,该消息必须排除凭据与标头值。原生标头校验可能在 `TypeError` 中回显值,因此 TypeError 详情与非 Error 抛出值改用安全的排查提示;嵌套 cause 仍附在抛出的错误上,但不会复制到公开失败信息中。贡献不会改变消息、工具 schema 或 Session 日志。直接使用 `PiAiAdapter` 的调用方可提供等效的 `prepareHeaders` 回调。
|
|
151
|
+
|
|
145
152
|
### 源码地图
|
|
146
153
|
|
|
147
154
|
| 文件 | 职责 |
|