@songtonyli/dsh-cli 0.1.30 → 0.1.32
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/README.md +4 -0
- package/node_modules/@deepseek-ai/cordis/package.json +4 -4
- package/node_modules/@deepseek-ai/cordis/src/index.ts +2 -0
- package/node_modules/@deepseek-ai/cordis-plugin-group/package.json +3 -3
- package/node_modules/@deepseek-ai/cordis-plugin-include/package.json +4 -4
- package/node_modules/@deepseek-ai/cordis-plugin-loader/README.md +4 -0
- package/node_modules/@deepseek-ai/cordis-plugin-loader/lib/index.js +87 -7
- package/node_modules/@deepseek-ai/cordis-plugin-loader/package.json +4 -3
- package/node_modules/@deepseek-ai/cordis-plugin-loader/src/config/diff.ts +45 -0
- package/node_modules/@deepseek-ai/cordis-plugin-loader/src/config/entry.ts +53 -7
- package/node_modules/@deepseek-ai/cordis-plugin-loader/src/index.ts +13 -1
- package/node_modules/@deepseek-ai/cordis-plugin-timer/package.json +3 -3
- package/node_modules/@deepseek-ai/cosmokit/README.md +6 -0
- package/node_modules/@deepseek-ai/cosmokit/lib/index.js +112 -19
- package/node_modules/@deepseek-ai/cosmokit/package.json +1 -1
- package/node_modules/@deepseek-ai/cosmokit/src/index.ts +2 -0
- package/node_modules/@deepseek-ai/cosmokit/src/types.ts +49 -23
- package/node_modules/@deepseek-ai/cosmokit/src/volatile.ts +86 -0
- package/node_modules/@deepseek-ai/dsh/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh/lib/bin.js +21 -5
- package/node_modules/@deepseek-ai/dsh/lib/{dump-config-Bb5YvFIX.js → dump-config-C-0P1h0W.js} +14 -3
- package/node_modules/@deepseek-ai/dsh/lib/dump-config-DaAE0NHG.js +2 -0
- package/node_modules/@deepseek-ai/dsh/lib/dump-config-schema-BgEU7VYz.js +41 -0
- package/node_modules/@deepseek-ai/dsh/lib/{plugin-DJ-rVHUS.js → plugin-CnNK4cws.js} +1 -1
- package/node_modules/@deepseek-ai/dsh/lib/{profile-boot-BNu17Y9U.js → profile-boot-DIiro1p-.js} +8 -15
- package/node_modules/@deepseek-ai/dsh/lib/profile-boot.js +1 -1
- package/node_modules/@deepseek-ai/dsh/package.json +113 -119
- package/node_modules/@deepseek-ai/dsh-acp/lib/index.js +7 -6
- package/node_modules/@deepseek-ai/dsh-acp/package.json +25 -25
- package/node_modules/@deepseek-ai/dsh-acp-app/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-agent/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-agent/README.md +3 -0
- package/node_modules/@deepseek-ai/dsh-agent/README.zh.md +3 -0
- package/node_modules/@deepseek-ai/dsh-agent/lib/index.js +40 -6
- package/node_modules/@deepseek-ai/dsh-agent/lib/types/archive-admission.js +35 -0
- package/node_modules/@deepseek-ai/dsh-agent/lib/types/consumed-work.js +5 -4
- package/node_modules/@deepseek-ai/dsh-agent/lib/types/index.js +4 -0
- package/node_modules/@deepseek-ai/dsh-agent/lib/types/model-selection.js +1 -2
- package/node_modules/@deepseek-ai/dsh-agent/package.json +27 -20
- package/node_modules/@deepseek-ai/dsh-agent-default-model/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-agent-default-model/README.md +9 -9
- package/node_modules/@deepseek-ai/dsh-agent-default-model/README.zh.md +9 -9
- package/node_modules/@deepseek-ai/dsh-agent-default-model/lib/index.js +26 -39
- package/node_modules/@deepseek-ai/dsh-agent-default-model/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-agent-instructions/lib/index.js +3 -2
- package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +25 -25
- package/node_modules/@deepseek-ai/dsh-agent-loop/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-agent-loop/README.md +3 -1
- package/node_modules/@deepseek-ai/dsh-agent-loop/README.zh.md +3 -1
- package/node_modules/@deepseek-ai/dsh-agent-loop/lib/index.js +39 -49
- package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +26 -28
- package/node_modules/@deepseek-ai/{dsh-agent-presets → dsh-agent-preset}/README.i18n.yaml +3 -3
- package/node_modules/@deepseek-ai/dsh-agent-preset/README.md +94 -0
- package/node_modules/@deepseek-ai/dsh-agent-preset/README.zh.md +94 -0
- package/node_modules/@deepseek-ai/dsh-agent-preset/lib/index.js +29 -0
- package/node_modules/@deepseek-ai/dsh-agent-preset/package.json +49 -0
- package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-composition-reference/SKILL.md +29 -0
- package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-composition-reference/references/packages.md +506 -0
- package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/SKILL.md +38 -0
- package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/references/host-plugin.md +60 -0
- package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/references/mcp-bundle.md +5 -0
- package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/references/ui-plugin.md +13 -0
- package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/references/verification.md +5 -0
- package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/templates/decoration/client.js +22 -0
- package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/templates/decoration/cordis.patch.yml +3 -0
- package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/templates/decoration/index.js +2 -0
- package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/templates/decoration/package.json +15 -0
- package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/templates/mcp/cordis.patch.yml +8 -0
- package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/templates/mcp/package.json +7 -0
- package/node_modules/@deepseek-ai/dsh-agent-preset/skills/editing-cordis-compositions/SKILL.md +84 -0
- package/node_modules/@deepseek-ai/{dsh-api-authorization-controller → dsh-agent-preset-registry}/README.i18n.yaml +3 -3
- package/node_modules/@deepseek-ai/dsh-agent-preset-registry/README.md +107 -0
- package/node_modules/@deepseek-ai/dsh-agent-preset-registry/README.zh.md +107 -0
- package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/index.js +781 -0
- package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/invariant.js +806 -0
- package/node_modules/@deepseek-ai/{dsh-agent-presets → dsh-agent-preset-registry}/lib/typert.host.js +118 -270
- package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/typert.remote-client.js +84 -0
- package/node_modules/@deepseek-ai/{dsh-agent-presets → dsh-agent-preset-registry}/lib/types/composition-inventory.js +9 -36
- package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/types/definition.js +29 -0
- package/node_modules/@deepseek-ai/{dsh-agent-presets → dsh-agent-preset-registry}/lib/types/display.js +12 -3
- package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/types/index.js +371 -0
- package/node_modules/@deepseek-ai/{dsh-agent-presets → dsh-agent-preset-registry}/lib/types/invariant.js +7 -19
- package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/types/mount.js +243 -0
- package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/types/preset.js +2 -0
- package/node_modules/@deepseek-ai/{dsh-agent-presets → dsh-agent-preset-registry}/lib/types/session.js +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-preset-registry/package.json +96 -0
- package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/README.md +3 -3
- package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/README.zh.md +3 -3
- package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +7 -7
- package/node_modules/@deepseek-ai/{dsh-settings-file → dsh-api-account-controller}/README.i18n.yaml +3 -3
- package/node_modules/@deepseek-ai/dsh-api-account-controller/README.md +53 -0
- package/node_modules/@deepseek-ai/dsh-api-account-controller/README.zh.md +53 -0
- package/node_modules/@deepseek-ai/dsh-api-account-controller/lib/index.js +209 -0
- package/node_modules/@deepseek-ai/dsh-api-account-controller/lib/typert.host.js +273 -0
- package/node_modules/@deepseek-ai/dsh-api-account-controller/lib/typert.remote-client.js +267 -0
- package/node_modules/@deepseek-ai/dsh-api-account-controller/lib/types/index.js +116 -0
- package/node_modules/@deepseek-ai/dsh-api-account-controller/lib/types/types.js +2 -0
- package/node_modules/@deepseek-ai/{dsh-api-authorization-controller → dsh-api-account-controller}/package.json +13 -20
- package/node_modules/@deepseek-ai/dsh-api-gateway/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-api-gateway/README.md +9 -4
- package/node_modules/@deepseek-ai/dsh-api-gateway/README.zh.md +9 -4
- package/node_modules/@deepseek-ai/dsh-api-gateway/lib/client.js +294 -51
- package/node_modules/@deepseek-ai/dsh-api-gateway/lib/index.js +516 -92
- package/node_modules/@deepseek-ai/dsh-api-gateway/lib/types/client/index.js +104 -14
- package/node_modules/@deepseek-ai/dsh-api-gateway/lib/types/client/remote-events.js +2 -2
- package/node_modules/@deepseek-ai/dsh-api-gateway/lib/types/client/stream-client.js +164 -11
- package/node_modules/@deepseek-ai/dsh-api-gateway/lib/types/index.js +322 -33
- package/node_modules/@deepseek-ai/dsh-api-gateway/lib/types/stream-protocol.js +10 -46
- package/node_modules/@deepseek-ai/dsh-api-gateway/lib/types/stream-server.js +210 -23
- package/node_modules/@deepseek-ai/dsh-api-gateway/package.json +18 -13
- package/node_modules/@deepseek-ai/{dsh-llm-cursor → dsh-api-job-controller}/README.i18n.yaml +3 -3
- package/node_modules/@deepseek-ai/dsh-api-job-controller/README.md +69 -0
- package/node_modules/@deepseek-ai/dsh-api-job-controller/README.zh.md +69 -0
- package/node_modules/@deepseek-ai/dsh-api-job-controller/lib/client.js +367 -0
- package/node_modules/@deepseek-ai/dsh-api-job-controller/lib/index.js +377 -0
- package/node_modules/@deepseek-ai/dsh-api-job-controller/lib/typert.host.js +273 -0
- package/node_modules/@deepseek-ai/dsh-api-job-controller/lib/typert.remote-client.js +181 -0
- package/node_modules/@deepseek-ai/dsh-api-job-controller/lib/types/client/index.js +23 -0
- package/node_modules/@deepseek-ai/dsh-api-job-controller/lib/types/client/model.js +164 -0
- package/node_modules/@deepseek-ai/dsh-api-job-controller/lib/types/client/service.js +182 -0
- package/node_modules/@deepseek-ai/dsh-api-job-controller/lib/types/index.js +150 -0
- package/node_modules/@deepseek-ai/dsh-api-job-controller/lib/types/observe.js +107 -0
- package/node_modules/@deepseek-ai/dsh-api-job-controller/lib/types/rows.js +43 -0
- package/node_modules/@deepseek-ai/dsh-api-job-controller/lib/types/types.js +8 -0
- package/node_modules/@deepseek-ai/dsh-api-job-controller/lib/types/wake.js +59 -0
- package/node_modules/@deepseek-ai/dsh-api-job-controller/package.json +82 -0
- package/node_modules/@deepseek-ai/dsh-api-remotes/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-api-remotes/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-api-remotes/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +1751 -1017
- package/node_modules/@deepseek-ai/dsh-api-remotes/lib/types/client/index.js +7 -3
- package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +40 -39
- package/node_modules/@deepseek-ai/dsh-api-session-controller/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-api-session-controller/README.md +31 -8
- package/node_modules/@deepseek-ai/dsh-api-session-controller/README.zh.md +31 -8
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/client.js +603 -515
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/index.js +299 -137
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.host.js +373 -183
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.remote-client.js +216 -124
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/archived-session-gate.js +52 -0
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/lineage.js +2 -1
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/manager.js +249 -277
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/projection-store.js +45 -13
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/service.js +35 -47
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/session.js +112 -50
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/commands.js +72 -36
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/control.js +2 -44
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/history.js +1 -1
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/index.js +117 -13
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/list.js +24 -15
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/skill-catalog.js +60 -50
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/types.js +0 -1
- package/node_modules/@deepseek-ai/dsh-api-session-controller/package.json +68 -72
- package/node_modules/@deepseek-ai/dsh-api-settings-controller/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-api-settings-controller/README.md +1 -2
- package/node_modules/@deepseek-ai/dsh-api-settings-controller/README.zh.md +1 -2
- package/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/index.js +6 -78
- package/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/typert.host.js +33 -99
- package/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/typert.remote-client.js +32 -80
- package/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/types/index.js +6 -61
- 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 +50 -22
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/typert.remote-client.js +4 -4
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/package.json +20 -19
- package/node_modules/@deepseek-ai/dsh-api-workspace-controller/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-api-workspace-controller/README.md +16 -2
- package/node_modules/@deepseek-ai/dsh-api-workspace-controller/README.zh.md +16 -2
- package/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/client.js +98 -6
- package/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/index.js +202 -15
- package/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/typert.host.js +161 -11
- package/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/typert.remote-client.js +121 -8
- package/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/client/index.js +4 -1
- package/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/client/model.js +70 -2
- package/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/client/service.js +33 -3
- package/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/commands.js +45 -7
- package/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/default-directory.js +65 -0
- package/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/feed.js +9 -1
- package/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/index.js +62 -5
- package/node_modules/@deepseek-ai/dsh-api-workspace-controller/package.json +21 -18
- package/node_modules/@deepseek-ai/dsh-api-workspace-files/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-api-workspace-files/README.md +26 -25
- package/node_modules/@deepseek-ai/dsh-api-workspace-files/README.zh.md +26 -25
- package/node_modules/@deepseek-ai/dsh-api-workspace-files/lib/client.js +41 -35
- package/node_modules/@deepseek-ai/dsh-api-workspace-files/lib/index.js +129 -121
- package/node_modules/@deepseek-ai/dsh-api-workspace-files/lib/typert.host.js +72 -141
- package/node_modules/@deepseek-ai/dsh-api-workspace-files/lib/typert.remote-client.js +61 -120
- package/node_modules/@deepseek-ai/dsh-api-workspace-files/lib/types/changes.js +106 -46
- package/node_modules/@deepseek-ai/dsh-api-workspace-files/lib/types/client/change-feed.js +34 -27
- package/node_modules/@deepseek-ai/dsh-api-workspace-files/lib/types/client/provider.js +13 -6
- package/node_modules/@deepseek-ai/dsh-api-workspace-files/lib/types/index.js +32 -53
- package/node_modules/@deepseek-ai/dsh-api-workspace-files/package.json +15 -14
- package/node_modules/@deepseek-ai/dsh-app-boot/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-app-boot/README.md +33 -15
- package/node_modules/@deepseek-ai/dsh-app-boot/README.zh.md +33 -15
- package/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +1647 -681
- package/node_modules/@deepseek-ai/dsh-app-boot/lib/worker/profile-resolution-bootstrap.js +255 -357
- package/node_modules/@deepseek-ai/dsh-app-boot/package.json +20 -18
- package/node_modules/@deepseek-ai/dsh-atomic-write/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-atomic-write/README.md +4 -4
- package/node_modules/@deepseek-ai/dsh-atomic-write/README.zh.md +4 -4
- 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/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-authorization/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-authorization/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-authorization/lib/index.js +16 -4
- package/node_modules/@deepseek-ai/dsh-authorization/lib/types/index.js +19 -4
- package/node_modules/@deepseek-ai/dsh-authorization/package.json +9 -9
- 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 +20 -26
- package/node_modules/@deepseek-ai/dsh-base/package.json +94 -94
- package/node_modules/@deepseek-ai/dsh-bash-local/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-bash-local/README.md +7 -6
- package/node_modules/@deepseek-ai/dsh-bash-local/README.zh.md +7 -6
- package/node_modules/@deepseek-ai/dsh-bash-local/lib/index.js +153 -202
- package/node_modules/@deepseek-ai/dsh-bash-local/package.json +11 -13
- package/node_modules/@deepseek-ai/dsh-bash-sandbox/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-bash-sandbox/README.md +3 -3
- package/node_modules/@deepseek-ai/dsh-bash-sandbox/README.zh.md +3 -3
- package/node_modules/@deepseek-ai/dsh-bash-sandbox/lib/index.js +58 -63
- 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/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-connection/README.md +7 -3
- package/node_modules/@deepseek-ai/dsh-client-connection/README.zh.md +7 -3
- package/node_modules/@deepseek-ai/dsh-client-connection/lib/client.js +169 -28
- package/node_modules/@deepseek-ai/dsh-client-connection/lib/index.js +98 -36
- package/node_modules/@deepseek-ai/dsh-client-connection/package.json +13 -10
- package/node_modules/@deepseek-ai/dsh-client-file-upload/lib/client.js +8 -12
- package/node_modules/@deepseek-ai/dsh-client-file-upload/lib/index.js +1 -0
- package/node_modules/@deepseek-ai/dsh-client-file-upload/lib/typert.host.js +46 -18
- package/node_modules/@deepseek-ai/dsh-client-file-upload/lib/types/client/runtime.js +5 -12
- package/node_modules/@deepseek-ai/dsh-client-file-upload/lib/types/protocol.js +5 -0
- package/node_modules/@deepseek-ai/dsh-client-file-upload/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-client-hmr/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-hmr/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-client-hmr/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-client-hmr/lib/client.js +6 -4
- package/node_modules/@deepseek-ai/dsh-client-hmr/lib/index.js +8 -5
- package/node_modules/@deepseek-ai/dsh-client-hmr/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-client-locale/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-locale/README.md +9 -1
- package/node_modules/@deepseek-ai/dsh-client-locale/README.zh.md +9 -1
- package/node_modules/@deepseek-ai/dsh-client-locale/lib/client.js +225 -75
- package/node_modules/@deepseek-ai/dsh-client-locale/lib/index.js +9 -8
- package/node_modules/@deepseek-ai/dsh-client-locale/package.json +13 -11
- package/node_modules/@deepseek-ai/dsh-client-modules/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-modules/README.md +2 -1
- package/node_modules/@deepseek-ai/dsh-client-modules/README.zh.md +2 -1
- package/node_modules/@deepseek-ai/dsh-client-modules/lib/index.js +57 -36
- package/node_modules/@deepseek-ai/dsh-client-modules/lib/invariant.js +2 -2
- package/node_modules/@deepseek-ai/dsh-client-modules/package.json +8 -7
- package/node_modules/@deepseek-ai/dsh-client-resources/package.json +7 -6
- package/node_modules/@deepseek-ai/dsh-client-store/LICENSE +21 -0
- package/node_modules/@deepseek-ai/{dsh-client-ui-settings-unarchive-sessions → dsh-client-store}/README.i18n.yaml +3 -3
- package/node_modules/@deepseek-ai/dsh-client-store/README.md +48 -0
- package/node_modules/@deepseek-ai/dsh-client-store/README.zh.md +48 -0
- package/node_modules/@deepseek-ai/dsh-client-store/lib/index.js +180 -0
- package/node_modules/@deepseek-ai/dsh-client-store/lib/types/contract.d.ts +121 -0
- package/node_modules/@deepseek-ai/dsh-client-store/lib/types/index.d.ts +92 -0
- package/node_modules/@deepseek-ai/dsh-client-store/package.json +37 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/README.md +13 -31
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/README.zh.md +22 -40
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +865 -1033
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/package.json +21 -19
- package/node_modules/@deepseek-ai/dsh-client-ui-approval/lib/client.js +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-approval/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-attachment/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-attachment/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-attachment/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-attachment/lib/client.js +28 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-brand-official/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.md +62 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.zh.md +60 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/client.js +4808 -1393
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/index.js +37 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/package.json +41 -37
- 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 +2 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +20 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/package.json +17 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.md +19 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.zh.md +19 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +1321 -349
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/index.js +9 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +34 -32
- package/node_modules/@deepseek-ai/dsh-client-ui-cordis/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-cordis/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-cordis/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-cordis/lib/client.js +28 -25
- package/node_modules/@deepseek-ai/dsh-client-ui-cordis/package.json +14 -14
- 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 +14 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/README.zh.md +14 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +628 -497
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/index.js +17 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +31 -28
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/lib/client.js +7 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-native/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-goal/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-goal/README.md +3 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-goal/README.zh.md +3 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +18 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-goal/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/lib/client.js +13 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/package.json +14 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/README.md +25 -18
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/README.zh.md +29 -22
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +413 -63
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/index.js +5 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/package.json +26 -23
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/README.md +6 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/README.zh.md +6 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js +75 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/package.json +10 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/README.md +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/README.zh.md +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/lib/client.js +15 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/package.json +18 -17
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.md +4 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.zh.md +4 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +12 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/package.json +17 -16
- 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 +20 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/README.zh.md +20 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/lib/client.js +530 -195
- package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/package.json +25 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/lib/client.js +39 -100
- package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/package.json +17 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-plan/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-plan/README.md +7 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-plan/README.zh.md +8 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-plan/lib/client.js +73 -60
- package/node_modules/@deepseek-ai/dsh-client-ui-plan/package.json +22 -21
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.md +29 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.zh.md +29 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/client.js +1095 -381
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/package.json +16 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/README.md +25 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/README.zh.md +25 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/ConnectionIndicator.module.css +1 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/HoverCard.module.css +27 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/Menu.module.css +68 -48
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/Modal.module.css +6 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/OnboardingSurface.module.css +1 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/PathLabel.module.css +28 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/RiskConfirmation.module.css +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/SegmentedControl.module.css +76 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/SegmentedTabs.module.css +55 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/StateDot.module.css +64 -37
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/TerminalBlock.module.css +13 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/TextShimmer.module.css +27 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/Toast.module.css +31 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/Tooltip.module.css +12 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/index.js +5418 -2739
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/markdown/MarkdownText.module.css +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/settings-form/SettingsForm.module.css +53 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/settings-form/fields.module.css +145 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/ConfigField.d.ts +33 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/DisclosureRow.d.ts +4 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/HoverCard.d.ts +14 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/LinkIcon.d.ts +15 -30
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/Menu.d.ts +50 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/PathLabel.d.ts +13 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/PermissionIcon.d.ts +39 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/ReferenceIcon.d.ts +12 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/SegmentedControl.d.ts +35 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/SegmentedTabs.d.ts +26 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/SiteGlyph.d.ts +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/StateDot.d.ts +6 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/TerminalBlock.d.ts +15 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/TextShimmer.d.ts +13 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/Toast.d.ts +19 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/Tooltip.d.ts +12 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/code-file-types.d.ts +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/code-highlighting.d.ts +19 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/icons/index.d.ts +376 -195
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/icons/props.d.ts +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/icons/shared-artwork.d.ts +36 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/index.d.ts +21 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/overlay-top-margin.d.ts +14 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/plugin-artwork.d.ts +17 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/settings-form/SettingsForm.d.ts +46 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/settings-form/fields.d.ts +69 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/settings-form/form-model.d.ts +214 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/useAnchoredMaxHeight.d.ts +4 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/useAnchoredPosition.d.ts +3 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/package.json +5 -3
- 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 +12 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-reference/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-renderer/lib/client.js +7 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-renderer/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/lib/client.js +7 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-session/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-session/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-session/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-session/lib/client.js +2 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-session/package.json +10 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-settings/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings/README.md +20 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-settings/README.zh.md +20 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-settings/lib/client.js +281 -117
- package/node_modules/@deepseek-ai/dsh-client-ui-settings/lib/index.js +18 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +13 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/README.md +75 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/README.zh.md +75 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/client.js +2383 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/index.js +28 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/package.json +69 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-agent-loop/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-agent-loop/README.md +78 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-agent-loop/README.zh.md +78 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-agent-loop/lib/client.js +175 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-agent-loop/lib/index.js +12 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-agent-loop/package.json +60 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.md +17 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.zh.md +17 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +166 -36
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/index.js +8 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +19 -15
- 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 +14 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.zh.md +25 -22
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +1246 -180
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/index.js +24 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +15 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/README.md +5 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/README.zh.md +5 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +116 -61
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +14 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/README.md +11 -46
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/README.zh.md +15 -50
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/client.js +15 -1753
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +10 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-shell/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-shell/README.md +78 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-shell/README.zh.md +78 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-shell/lib/client.js +199 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-shell/lib/index.js +12 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-shell/package.json +60 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/package.json +9 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/README.md +82 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/README.zh.md +82 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/lib/client.js +857 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/lib/index.js +13 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/package.json +61 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/README.md +79 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/README.zh.md +79 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/lib/client.js +324 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/lib/index.js +13 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/package.json +61 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +35 -28
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/package.json +12 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/README.md +13 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/README.zh.md +13 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/lib/client.js +1191 -429
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/package.json +16 -9
- 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 +46 -20
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/README.zh.md +46 -20
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.excel.js +133782 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.js +3766 -789
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.pdf.js +37 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/index.js +13 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/package.json +34 -21
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/README.md +11 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/README.zh.md +11 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/lib/client.js +316 -106
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/package.json +15 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/README.md +10 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/README.zh.md +10 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/lib/client.js +323 -111
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/package.json +15 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/README.md +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/README.zh.md +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/lib/client.js +24 -141
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/lib/client.terminal.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/package.json +16 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/README.md +3 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/README.zh.md +3 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +25 -24
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-slots/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/README.md +13 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/README.zh.md +13 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +168 -260
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +19 -19
- 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 +6 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/README.zh.md +6 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +172 -70
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/index.js +14 -27
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/styles/Montserrat-OFL.txt +93 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/styles/brand-font.css +24 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/styles/montserrat-light.woff2 +0 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/styles/montserrat-medium.woff2 +0 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/styles/montserrat-regular.woff2 +0 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/package.json +17 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.md +10 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.zh.md +10 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +1887 -204
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +24 -23
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/README.md +3 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/README.zh.md +3 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +32 -44
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/package.json +18 -17
- package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +19 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/package.json +20 -19
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +9 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/package.json +16 -15
- 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 +102 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.zh.md +102 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +2182 -1015
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +26 -22
- 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 +46 -18
- package/node_modules/@deepseek-ai/dsh-commands/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-compaction/lib/index.js +2 -5
- package/node_modules/@deepseek-ai/dsh-compaction/lib/invariant.js +4 -22
- package/node_modules/@deepseek-ai/dsh-compaction/lib/types/checkpoint.js +2 -2
- package/node_modules/@deepseek-ai/dsh-compaction/lib/types/invariant.js +2 -3
- package/node_modules/@deepseek-ai/dsh-compaction/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-compaction-basic/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-compaction-basic/README.md +9 -8
- package/node_modules/@deepseek-ai/dsh-compaction-basic/README.zh.md +9 -8
- package/node_modules/@deepseek-ai/dsh-compaction-basic/lib/index.js +50 -19
- package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +27 -27
- package/node_modules/@deepseek-ai/dsh-compaction-image-offload/lib/index.js +1 -7
- package/node_modules/@deepseek-ai/dsh-compaction-image-offload/lib/types/image-offload.js +0 -3
- package/node_modules/@deepseek-ai/dsh-compaction-image-offload/lib/types/project-message.js +0 -5
- package/node_modules/@deepseek-ai/dsh-compaction-image-offload/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/lib/index.js +3 -7
- package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-config-editor/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/dsh-config-editor/README.md +79 -0
- package/node_modules/@deepseek-ai/dsh-config-editor/README.zh.md +79 -0
- package/node_modules/@deepseek-ai/dsh-config-editor/lib/index.js +132 -0
- package/node_modules/@deepseek-ai/dsh-config-editor/package.json +54 -0
- package/node_modules/@deepseek-ai/dsh-cordis-client-runner/lib/client.js +878 -170
- package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/index.js +6 -68
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/typert.host.js +107 -51
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/typert.remote-client.js +15 -15
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/types/index.js +5 -6
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/types/sandbox.js +0 -27
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-credentials/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-credentials-local/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-deepseek-account/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/dsh-deepseek-account/README.md +63 -0
- package/node_modules/@deepseek-ai/dsh-deepseek-account/README.zh.md +63 -0
- package/node_modules/@deepseek-ai/dsh-deepseek-account/lib/index.js +35 -0
- package/node_modules/@deepseek-ai/dsh-deepseek-account/lib/types/index.js +36 -0
- package/node_modules/@deepseek-ai/dsh-deepseek-account/lib/types/types.js +2 -0
- package/node_modules/@deepseek-ai/dsh-deepseek-account/package.json +42 -0
- package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/README.md +96 -0
- package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/README.zh.md +96 -0
- package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/lib/index.js +891 -0
- package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/lib/types/details.js +55 -0
- package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/lib/types/index.js +488 -0
- package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/lib/types/logout.js +34 -0
- package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/lib/types/protocol.js +210 -0
- package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/lib/types/types.js +2 -0
- package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/package.json +52 -0
- 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 +1 -1
- package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-deque/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/README.md +8 -4
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/README.zh.md +8 -4
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/index.js +14 -74
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/invariant.js +6 -8
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/typert.host.js +51 -189
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/typert.remote-client.js +3 -151
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/index.js +0 -41
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/projection.js +10 -10
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/roster.js +8 -4
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/package.json +28 -26
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/README.md +16 -4
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/README.zh.md +16 -4
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/cordis.patch.yml +3 -0
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/icon.svg +12 -0
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/package.json +12 -7
- package/node_modules/@deepseek-ai/{dsh-experimental-agent-team-web-profile → dsh-experimental-api-speech-to-text}/README.i18n.yaml +3 -3
- package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/README.md +78 -0
- package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/README.zh.md +78 -0
- package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/lib/index.js +218 -0
- package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/lib/typert.host.js +432 -0
- package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/lib/typert.remote-client.js +311 -0
- package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/lib/types/index.js +142 -0
- package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/lib/types/types.js +2 -0
- package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/package.json +60 -0
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/README.md +11 -9
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/README.zh.md +11 -9
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/lib/client.js +127 -562
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/package.json +30 -27
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/README.md +76 -0
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/README.zh.md +76 -0
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/lib/client.js +5714 -0
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/lib/index.js +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/package.json +92 -0
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/README.md +80 -0
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/README.zh.md +80 -0
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/lib/index.js +200 -0
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/lib/types/index.js +181 -0
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/lib/types/types.js +2 -0
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/lib/types/wave.js +24 -0
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/package.json +57 -0
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/README.md +82 -0
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/README.zh.md +82 -0
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/lib/index.js +818 -0
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/lib/worker.js +219 -0
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/package.json +53 -0
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/runtime/assets.json +28 -0
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/README.md +3 -3
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/README.zh.md +3 -3
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/lib/index.js +23 -24
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/package.json +27 -25
- package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/README.md +77 -0
- package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/README.zh.md +77 -0
- package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/cordis.patch.yml +13 -0
- package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/icon.svg +9 -0
- package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/locale/en.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/locale/zh.json +6 -0
- package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/package.json +54 -0
- package/node_modules/@deepseek-ai/dsh-file-reference/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-file-reference/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-file-reference/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-file-reference/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-file-reference-local/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-file-reference-local/README.md +3 -4
- package/node_modules/@deepseek-ai/dsh-file-reference-local/README.zh.md +3 -4
- package/node_modules/@deepseek-ai/dsh-file-reference-local/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-fs/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-fs/README.md +7 -5
- package/node_modules/@deepseek-ai/dsh-fs/README.zh.md +7 -5
- package/node_modules/@deepseek-ai/dsh-fs/lib/index.js +12 -0
- package/node_modules/@deepseek-ai/dsh-fs/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-fs-local/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-fs-local/README.md +6 -3
- package/node_modules/@deepseek-ai/dsh-fs-local/README.zh.md +6 -3
- package/node_modules/@deepseek-ai/dsh-fs-local/lib/index.js +27 -0
- package/node_modules/@deepseek-ai/dsh-fs-local/package.json +8 -7
- package/node_modules/@deepseek-ai/dsh-fs-observation-policy/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-fs-sandbox/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-fs-sandbox/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-fs-sandbox/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-fs-sandbox/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-goal/lib/typert.host.js +46 -18
- package/node_modules/@deepseek-ai/dsh-goal/package.json +25 -25
- package/node_modules/@deepseek-ai/dsh-goal-round-driver/lib/index.js +2 -3
- package/node_modules/@deepseek-ai/dsh-goal-round-driver/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-headless/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-headless/lib/{json-stream-Bh4BGGk9.js → json-stream-BA-F3lfb.js} +4 -4
- package/node_modules/@deepseek-ai/dsh-headless/lib/startup.js +1 -1
- package/node_modules/@deepseek-ai/dsh-headless/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-hmr/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-hmr/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-hmr/README.zh.md +1 -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-hook-protocol/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-hook-protocol/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-hooks-claude-code/lib/index.js +4 -7
- package/node_modules/@deepseek-ai/dsh-hooks-claude-code/package.json +23 -23
- package/node_modules/@deepseek-ai/dsh-hooks-codex/lib/index.js +3 -6
- package/node_modules/@deepseek-ai/dsh-hooks-codex/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-host-directory-picker/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/package.json +18 -18
- 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/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-host-frontend-static/README.md +3 -1
- package/node_modules/@deepseek-ai/dsh-host-frontend-static/README.zh.md +3 -1
- package/node_modules/@deepseek-ai/dsh-host-frontend-static/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-host-frontend-static/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-host-open-in-app/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-host-open-in-app/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-host-open-in-app/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-host-open-in-app/lib/index.js +28 -81
- package/node_modules/@deepseek-ai/dsh-host-open-in-app/lib/types/icons.js +4 -49
- package/node_modules/@deepseek-ai/dsh-host-open-in-app/lib/types/index.js +8 -8
- package/node_modules/@deepseek-ai/dsh-host-open-in-app/lib/types/resolver.js +8 -27
- package/node_modules/@deepseek-ai/dsh-host-open-in-app/lib/types/shared.js +16 -7
- package/node_modules/@deepseek-ai/dsh-host-open-in-app/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/README.md +8 -4
- package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/README.zh.md +8 -4
- package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/lib/index.js +19 -11
- package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/lib/typert.host.js +23 -4
- package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/lib/typert.remote-client.js +23 -4
- package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/lib/types/index.js +18 -10
- package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/package.json +14 -12
- package/node_modules/@deepseek-ai/dsh-host-webserver/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-host-webserver/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-host-webserver/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-host-webserver/lib/index.js +1 -0
- package/node_modules/@deepseek-ai/dsh-host-webserver/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-http-proxy/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-invariants/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-invariants/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-invariants/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-invariants/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-jobs/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-jobs/README.md +18 -11
- package/node_modules/@deepseek-ai/dsh-jobs/README.zh.md +18 -11
- package/node_modules/@deepseek-ai/dsh-jobs/lib/index.js +74 -16
- package/node_modules/@deepseek-ai/dsh-jobs/lib/invariant.js +67 -17
- package/node_modules/@deepseek-ai/dsh-jobs/lib/types/archive-admission.js +43 -0
- package/node_modules/@deepseek-ai/dsh-jobs/lib/types/index.js +34 -16
- package/node_modules/@deepseek-ai/dsh-jobs/lib/types/invariant.js +90 -27
- package/node_modules/@deepseek-ai/dsh-jobs/lib/types/types.js +3 -2
- package/node_modules/@deepseek-ai/dsh-jobs/lib/types/view.js +9 -0
- package/node_modules/@deepseek-ai/dsh-jobs/package.json +22 -11
- package/node_modules/@deepseek-ai/dsh-jobs-local/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-jobs-local/README.md +18 -11
- package/node_modules/@deepseek-ai/dsh-jobs-local/README.zh.md +17 -10
- package/node_modules/@deepseek-ai/dsh-jobs-local/lib/index.js +566 -193
- 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 +11 -8
- package/node_modules/@deepseek-ai/dsh-llm/README.zh.md +11 -8
- package/node_modules/@deepseek-ai/dsh-llm/lib/index.js +41 -97
- package/node_modules/@deepseek-ai/dsh-llm/lib/typert.host.js +69 -13
- package/node_modules/@deepseek-ai/dsh-llm/lib/typert.remote-client.js +3 -3
- package/node_modules/@deepseek-ai/dsh-llm/lib/types/assembler.js +4 -4
- package/node_modules/@deepseek-ai/dsh-llm/lib/types/content.js +12 -64
- package/node_modules/@deepseek-ai/dsh-llm/lib/types/index.js +3 -1
- package/node_modules/@deepseek-ai/dsh-llm/lib/types/message.js +21 -16
- package/node_modules/@deepseek-ai/dsh-llm/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/README.md +35 -49
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/README.zh.md +36 -50
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js +1132 -2048
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/package.json +53 -43
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.md +12 -9
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.zh.md +11 -8
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +84 -184
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +30 -24
- package/node_modules/@deepseek-ai/dsh-llm-retry/package.json +25 -25
- package/node_modules/@deepseek-ai/dsh-mcp-client/package.json +23 -23
- package/node_modules/@deepseek-ai/dsh-mcp-resources/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-message-feedback/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-native-command/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-native-command/README.md +8 -9
- package/node_modules/@deepseek-ai/dsh-native-command/README.zh.md +8 -9
- package/node_modules/@deepseek-ai/dsh-native-command/lib/index.js +612 -3
- package/node_modules/@deepseek-ai/dsh-native-command/lib/types/desktop-entry.js +79 -0
- package/node_modules/@deepseek-ai/dsh-native-command/lib/types/file-applications-linux.js +70 -0
- package/node_modules/@deepseek-ai/dsh-native-command/lib/types/file-applications-windows.js +228 -0
- package/node_modules/@deepseek-ai/dsh-native-command/lib/types/file-applications.js +191 -0
- package/node_modules/@deepseek-ai/dsh-native-command/lib/types/index.js +10 -0
- package/node_modules/@deepseek-ai/dsh-native-command/lib/types/path-opener.js +230 -0
- package/node_modules/@deepseek-ai/dsh-native-command/lib/types/runner.js +27 -0
- package/node_modules/@deepseek-ai/dsh-native-command/lib/types/types.js +25 -0
- package/node_modules/@deepseek-ai/dsh-native-command/lib/types/url-opener.js +88 -0
- package/node_modules/@deepseek-ai/dsh-native-command/package.json +10 -5
- package/node_modules/@deepseek-ai/dsh-no-progress-reminder/lib/index.js +33 -57
- package/node_modules/@deepseek-ai/dsh-no-progress-reminder/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-office-to-pdf/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-office-to-pdf/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-office-to-pdf/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-office-to-pdf/lib/index.js +4 -4
- package/node_modules/@deepseek-ai/dsh-office-to-pdf/lib/typert.host.js +41 -3
- package/node_modules/@deepseek-ai/dsh-office-to-pdf/lib/typert.remote-client.js +39 -1
- package/node_modules/@deepseek-ai/dsh-office-to-pdf/lib/types/index.js +4 -3
- package/node_modules/@deepseek-ai/dsh-office-to-pdf/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-output-retention/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-package-manifest/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-package-manifest/README.md +3 -1
- package/node_modules/@deepseek-ai/dsh-package-manifest/README.zh.md +3 -1
- package/node_modules/@deepseek-ai/dsh-package-manifest/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-permission-presets/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-permission-presets/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-permission-presets/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-permission-presets/lib/index.js +16 -35
- package/node_modules/@deepseek-ai/dsh-permission-presets/lib/typert.host.js +54 -20
- package/node_modules/@deepseek-ai/dsh-permission-presets/lib/typert.remote-client.js +7 -1
- package/node_modules/@deepseek-ai/dsh-permission-presets/lib/types/index.js +14 -38
- package/node_modules/@deepseek-ai/dsh-permission-presets/package.json +23 -24
- 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-plan-mode/lib/index.js +1 -2
- package/node_modules/@deepseek-ai/dsh-plan-mode/lib/types/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-plan-mode/package.json +24 -24
- package/node_modules/@deepseek-ai/dsh-plugin-manager/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-plugin-manager/README.md +12 -2
- package/node_modules/@deepseek-ai/dsh-plugin-manager/README.zh.md +12 -2
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/index.js +371 -74
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/typert.host.js +203 -29
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/typert.remote-client.js +155 -15
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/index.js +210 -70
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/install-failure.js +1 -1
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/install-spec.js +16 -2
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/operations.js +35 -5
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/registry.js +95 -0
- package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/tools.js +5 -1
- package/node_modules/@deepseek-ai/dsh-plugin-manager/package.json +37 -32
- package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/lib/types/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-ptc-runtime/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/package.json +23 -23
- package/node_modules/@deepseek-ai/dsh-pwsh-local/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-pwsh-local/README.md +6 -5
- package/node_modules/@deepseek-ai/dsh-pwsh-local/README.zh.md +6 -5
- package/node_modules/@deepseek-ai/dsh-pwsh-local/lib/index.js +161 -196
- package/node_modules/@deepseek-ai/dsh-pwsh-local/package.json +11 -13
- package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/README.md +5 -5
- package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/README.zh.md +5 -5
- package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/lib/index.js +58 -63
- package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/lib/index.js +36 -60
- 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-local/README.i18n.yaml +3 -3
- package/node_modules/@deepseek-ai/dsh-sandbox-local/README.md +3 -3
- package/node_modules/@deepseek-ai/dsh-sandbox-local/README.zh.md +3 -3
- package/node_modules/@deepseek-ai/dsh-sandbox-local/lib/index.js +3 -2
- package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/README.i18n.yaml +3 -3
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/README.md +19 -15
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/README.zh.md +17 -13
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/runner.js +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/{types-CutH1Lgc.js → types-DxezulnA.js} +267 -78
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-schedule/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-schedule/README.md +3 -1
- package/node_modules/@deepseek-ai/dsh-schedule/README.zh.md +4 -1
- package/node_modules/@deepseek-ai/dsh-schedule/lib/index.js +104 -37
- package/node_modules/@deepseek-ai/dsh-schedule/lib/types/index.js +61 -5
- package/node_modules/@deepseek-ai/dsh-schedule/lib/types/runtime.js +11 -1
- package/node_modules/@deepseek-ai/dsh-schedule/package.json +25 -23
- package/node_modules/@deepseek-ai/dsh-scope/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-sdk-app/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-sdk-app/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-sdk-app/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-sdk-app/cordis.patch.yml +15 -0
- package/node_modules/@deepseek-ai/dsh-sdk-app/package.json +10 -8
- package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/package.json +25 -25
- package/node_modules/@deepseek-ai/dsh-sdk-minimal/package.json +31 -31
- package/node_modules/@deepseek-ai/dsh-sdk-protocol/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-session/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-session/README.md +11 -9
- package/node_modules/@deepseek-ai/dsh-session/README.zh.md +12 -8
- package/node_modules/@deepseek-ai/dsh-session/lib/index.js +215 -125
- package/node_modules/@deepseek-ai/dsh-session/lib/invariant.js +4 -1
- package/node_modules/@deepseek-ai/dsh-session/lib/types/fork.js +28 -0
- package/node_modules/@deepseek-ai/dsh-session/lib/types/index.js +56 -61
- package/node_modules/@deepseek-ai/dsh-session/lib/types/invariant.js +5 -1
- package/node_modules/@deepseek-ai/dsh-session/lib/types/known-event-types.js +1 -0
- package/node_modules/@deepseek-ai/dsh-session/lib/types/repair.js +52 -23
- package/node_modules/@deepseek-ai/dsh-session/lib/types/surface.js +73 -17
- package/node_modules/@deepseek-ai/dsh-session/lib/types/types.js +1 -1
- package/node_modules/@deepseek-ai/dsh-session/package.json +15 -11
- package/node_modules/@deepseek-ai/dsh-session-checkpoint-policy/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-session-format/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-session-format-catalog/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-session-format-catalog/README.md +5 -1
- package/node_modules/@deepseek-ai/dsh-session-format-catalog/README.zh.md +5 -1
- package/node_modules/@deepseek-ai/dsh-session-format-catalog/lib/index.js +55 -10
- package/node_modules/@deepseek-ai/dsh-session-format-catalog/lib/types/children.js +17 -0
- package/node_modules/@deepseek-ai/dsh-session-format-catalog/lib/types/generated.js +25 -11
- package/node_modules/@deepseek-ai/dsh-session-format-catalog/lib/types/historical.js +20 -0
- package/node_modules/@deepseek-ai/dsh-session-format-catalog/lib/types/index.js +2 -0
- package/node_modules/@deepseek-ai/dsh-session-format-catalog/package.json +11 -10
- package/node_modules/@deepseek-ai/dsh-session-format-v0-to-v1/package.json +6 -6
- 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/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/README.md +350 -0
- package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/README.zh.md +350 -0
- package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/lib/index.js +1552 -0
- package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/package.json +51 -0
- package/node_modules/@deepseek-ai/dsh-session-log-deepseek/lib/index.js +1 -0
- package/node_modules/@deepseek-ai/dsh-session-log-deepseek/lib/types/index.js +1 -0
- package/node_modules/@deepseek-ai/dsh-session-log-deepseek/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-session-log-export/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-session-log-export/README.md +6 -2
- package/node_modules/@deepseek-ai/dsh-session-log-export/README.zh.md +6 -2
- package/node_modules/@deepseek-ai/dsh-session-log-export/lib/client.js +43 -20
- package/node_modules/@deepseek-ai/dsh-session-log-export/lib/index.js +48 -17
- package/node_modules/@deepseek-ai/dsh-session-log-export/package.json +25 -23
- package/node_modules/@deepseek-ai/dsh-session-persistence/lib/index.js +2 -0
- package/node_modules/@deepseek-ai/dsh-session-persistence/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/README.md +6 -2
- package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/README.zh.md +6 -2
- package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/index.js +210 -45
- package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/worker.cjs +1456 -313
- package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-session-projection/package.json +5 -5
- 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 +2 -2
- package/node_modules/@deepseek-ai/dsh-session-projection-cache/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-session-projection-cache/lib/index.js +71 -51
- package/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-session-query/lib/index.js +4 -5
- 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/index.js +5 -5
- package/node_modules/@deepseek-ai/dsh-session-reference/lib/typert.host.js +47 -19
- package/node_modules/@deepseek-ai/dsh-session-reference/lib/typert.remote-client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-session-reference/lib/types/index.js +3 -7
- package/node_modules/@deepseek-ai/dsh-session-reference/lib/types/projection.js +1 -0
- package/node_modules/@deepseek-ai/dsh-session-reference/package.json +39 -39
- package/node_modules/@deepseek-ai/dsh-session-stats/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-session-telemetry/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-session-telemetry/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-session-telemetry/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-session-telemetry/lib/index.js +6 -5
- package/node_modules/@deepseek-ai/dsh-session-telemetry/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/package.json +23 -23
- package/node_modules/@deepseek-ai/dsh-session-title/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-session-title-llm/lib/index.js +1 -4
- 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/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-settings/README.md +19 -96
- package/node_modules/@deepseek-ai/dsh-settings/README.zh.md +25 -102
- package/node_modules/@deepseek-ai/dsh-settings/lib/index.js +360 -426
- package/node_modules/@deepseek-ai/dsh-settings/lib/types/index.js +271 -512
- package/node_modules/@deepseek-ai/dsh-settings/lib/types/redact.js +14 -8
- package/node_modules/@deepseek-ai/dsh-settings/lib/types/schema.js +85 -0
- package/node_modules/@deepseek-ai/dsh-settings/lib/types/types.js +1 -9
- package/node_modules/@deepseek-ai/dsh-settings/package.json +21 -17
- package/node_modules/@deepseek-ai/dsh-shell/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-shell/README.md +17 -10
- package/node_modules/@deepseek-ai/dsh-shell/README.zh.md +17 -10
- package/node_modules/@deepseek-ai/dsh-shell/lib/index.js +19 -21
- package/node_modules/@deepseek-ai/dsh-shell/package.json +7 -9
- package/node_modules/@deepseek-ai/dsh-shell-env/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-shell-env/README.md +5 -5
- package/node_modules/@deepseek-ai/dsh-shell-env/README.zh.md +5 -5
- package/node_modules/@deepseek-ai/dsh-shell-env/lib/index.js +10 -1
- package/node_modules/@deepseek-ai/dsh-shell-env/package.json +14 -12
- 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/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/dsh-skill-office/README.md +100 -0
- package/node_modules/@deepseek-ai/dsh-skill-office/README.zh.md +100 -0
- package/node_modules/@deepseek-ai/dsh-skill-office/assets/office-docx/SKILL.md +46 -0
- package/node_modules/@deepseek-ai/dsh-skill-office/assets/office-pptx/SKILL.md +70 -0
- package/node_modules/@deepseek-ai/dsh-skill-office/assets/office-xlsx/SKILL.md +56 -0
- package/node_modules/@deepseek-ai/dsh-skill-office/assets/scripts/check_office.py +279 -0
- package/node_modules/@deepseek-ai/dsh-skill-office/lib/index.js +80 -0
- package/node_modules/@deepseek-ai/dsh-skill-office/package.json +43 -0
- 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 +21 -21
- package/node_modules/@deepseek-ai/dsh-storage/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-storage-domain/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-storage-json/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-subagent/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-subagent/README.md +9 -6
- package/node_modules/@deepseek-ai/dsh-subagent/README.zh.md +9 -6
- package/node_modules/@deepseek-ai/dsh-subagent/lib/index.js +301 -239
- package/node_modules/@deepseek-ai/dsh-subagent/lib/typert.host.js +60 -89
- package/node_modules/@deepseek-ai/dsh-subagent/lib/typert.remote-client.js +2 -56
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/archive-admission.js +151 -0
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/catalog.js +12 -6
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/control-types.js +2 -3
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/control.js +2 -40
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/index.js +29 -91
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/lifecycle.js +14 -19
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/list-children.js +45 -49
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/projection.js +10 -4
- package/node_modules/@deepseek-ai/dsh-subagent/lib/types/run-settlement.js +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent/package.json +57 -54
- package/node_modules/@deepseek-ai/dsh-subagent-acp/package.json +24 -24
- package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-subagent-in-process-driver/package.json +26 -26
- package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/package.json +20 -20
- 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 +3 -3
- package/node_modules/@deepseek-ai/dsh-system-prompt/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-terminal/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-time-context/lib/index.js +2 -3
- package/node_modules/@deepseek-ai/dsh-time-context/lib/invariant.js +4 -4
- 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 +35 -57
- package/node_modules/@deepseek-ai/dsh-tmux-context/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-token-meter/lib/index.js +0 -7
- package/node_modules/@deepseek-ai/dsh-token-meter/lib/types/estimate.js +0 -3
- package/node_modules/@deepseek-ai/dsh-token-meter/lib/types/surface-fold.js +0 -5
- package/node_modules/@deepseek-ai/dsh-token-meter/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-tool-ask-user/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-tool-bash/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-bash/README.md +16 -10
- package/node_modules/@deepseek-ai/dsh-tool-bash/README.zh.md +16 -10
- package/node_modules/@deepseek-ai/dsh-tool-bash/lib/index.js +421 -183
- package/node_modules/@deepseek-ai/dsh-tool-bash/package.json +32 -32
- package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/lib/index.js +9 -3
- package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-tool-call-timeout-policy/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-tool-cordis/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-cordis/README.md +6 -5
- package/node_modules/@deepseek-ai/dsh-tool-cordis/README.zh.md +6 -5
- package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/index.js +4 -9980
- package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +7809 -0
- package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/config.js +93 -0
- package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/host.js +17 -0
- package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/index.js +57 -0
- package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/present.js +16 -0
- package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/providers.js +85 -0
- package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +21 -12
- package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +30 -30
- package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +23 -23
- package/node_modules/@deepseek-ai/dsh-tool-goal/lib/index.js +1 -2
- package/node_modules/@deepseek-ai/dsh-tool-goal/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-tool-jobs/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-jobs/README.md +9 -8
- package/node_modules/@deepseek-ai/dsh-tool-jobs/README.zh.md +10 -9
- package/node_modules/@deepseek-ai/dsh-tool-jobs/lib/index.js +110 -51
- package/node_modules/@deepseek-ai/dsh-tool-jobs/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-tool-present/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-present/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-present/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-present/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-present/lib/types/index.js +5 -4
- package/node_modules/@deepseek-ai/dsh-tool-present/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-tool-pwsh/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-pwsh/README.md +10 -5
- package/node_modules/@deepseek-ai/dsh-tool-pwsh/README.zh.md +10 -5
- package/node_modules/@deepseek-ai/dsh-tool-pwsh/lib/index.js +440 -207
- package/node_modules/@deepseek-ai/dsh-tool-pwsh/package.json +31 -31
- package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/lib/index.js +9 -3
- package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/package.json +23 -23
- package/node_modules/@deepseek-ai/dsh-tool-ralph/package.json +23 -23
- package/node_modules/@deepseek-ai/dsh-tool-skill/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-tool-subagent/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-subagent/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-subagent/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-subagent/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-subagent/lib/model-selection-settings.js +12 -38
- package/node_modules/@deepseek-ai/dsh-tool-subagent/package.json +30 -32
- package/node_modules/@deepseek-ai/dsh-tool-subagent-control/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-subagent-control/README.md +4 -4
- package/node_modules/@deepseek-ai/dsh-tool-subagent-control/README.zh.md +4 -4
- package/node_modules/@deepseek-ai/dsh-tool-subagent-control/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-subagent-control/lib/types/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-subagent-control/lib/types/list-agents.js +10 -20
- package/node_modules/@deepseek-ai/dsh-tool-subagent-control/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-tool-todo/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-tool-web/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-tool-workflow/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-workflow/README.md +21 -8
- package/node_modules/@deepseek-ai/dsh-tool-workflow/README.zh.md +21 -8
- package/node_modules/@deepseek-ai/dsh-tool-workflow/lib/index.js +179 -11
- package/node_modules/@deepseek-ai/dsh-tool-workflow/lib/types/index.js +147 -14
- package/node_modules/@deepseek-ai/dsh-tool-workflow/lib/types/record.js +43 -0
- package/node_modules/@deepseek-ai/dsh-tool-workflow/package.json +25 -21
- package/node_modules/@deepseek-ai/dsh-tool-workspace-dependencies/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/dsh-tool-workspace-dependencies/README.md +128 -0
- package/node_modules/@deepseek-ai/dsh-tool-workspace-dependencies/README.zh.md +128 -0
- package/node_modules/@deepseek-ai/dsh-tool-workspace-dependencies/lib/index.js +252 -0
- package/node_modules/@deepseek-ai/dsh-tool-workspace-dependencies/package.json +44 -0
- package/node_modules/@deepseek-ai/dsh-tools/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-tools/README.md +4 -0
- package/node_modules/@deepseek-ai/dsh-tools/README.zh.md +4 -0
- package/node_modules/@deepseek-ai/dsh-tools/lib/index.js +5 -6
- package/node_modules/@deepseek-ai/dsh-tools/lib/types/index.js +2 -1
- package/node_modules/@deepseek-ai/dsh-tools/lib/types/ptc.js +1 -1
- package/node_modules/@deepseek-ai/dsh-tools/lib/types/schema.js +1 -0
- package/node_modules/@deepseek-ai/dsh-tools/package.json +27 -27
- package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-tui-app/README.md +18 -16
- package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +18 -16
- package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +866 -144
- package/node_modules/@deepseek-ai/dsh-tui-app/package.json +75 -75
- package/node_modules/@deepseek-ai/dsh-typert-loader/lib/index.js +1 -0
- package/node_modules/@deepseek-ai/dsh-typert-loader/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-typert-protocol/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-typert-protocol/README.md +7 -2
- package/node_modules/@deepseek-ai/dsh-typert-protocol/README.zh.md +7 -2
- package/node_modules/@deepseek-ai/dsh-typert-protocol/lib/index.js +66 -3
- package/node_modules/@deepseek-ai/dsh-typert-protocol/lib/types/index.js +20 -2
- package/node_modules/@deepseek-ai/dsh-typert-protocol/lib/types/json-value.js +61 -0
- package/node_modules/@deepseek-ai/dsh-typert-protocol/package.json +6 -3
- package/node_modules/@deepseek-ai/dsh-typert-registry/lib/client.js +3 -0
- package/node_modules/@deepseek-ai/dsh-typert-registry/lib/index.js +3 -0
- package/node_modules/@deepseek-ai/dsh-typert-registry/lib/types/service.js +6 -0
- package/node_modules/@deepseek-ai/dsh-typert-registry/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-user-approval/lib/index.js +1 -4
- package/node_modules/@deepseek-ai/dsh-user-approval/lib/invariant.js +1 -4
- package/node_modules/@deepseek-ai/dsh-user-approval/lib/types/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-user-approval/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-user-questions/package.json +9 -9
- 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/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-web-app/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-web-app/README.md +9 -6
- package/node_modules/@deepseek-ai/dsh-web-app/README.zh.md +9 -6
- package/node_modules/@deepseek-ai/dsh-web-app/cordis.patch.yml +51 -29
- package/node_modules/@deepseek-ai/dsh-web-app/lib/index.js +293 -1
- package/node_modules/@deepseek-ai/dsh-web-app/package.json +150 -102
- package/node_modules/@deepseek-ai/dsh-web-app/presets/cordis.patch.yml +154 -0
- package/node_modules/@deepseek-ai/dsh-web-app/presets/minimal.patch.yml +61 -0
- package/node_modules/@deepseek-ai/dsh-web-app/presets/ptc.patch.yml +152 -0
- package/node_modules/@deepseek-ai/dsh-web-app/presets/standard.patch.yml +146 -0
- package/node_modules/@deepseek-ai/dsh-web-fetch-http/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-DU8FBaxM.js +127 -0
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-Uv-aF9RH.css +1 -0
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/favicon-dark.svg +3 -0
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/favicon.svg +0 -5
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/index.html +4 -3
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/manifest.webmanifest +3 -4
- package/node_modules/@deepseek-ai/dsh-web-frontend/package.json +15 -10
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/README.md +4 -4
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/README.zh.md +4 -4
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/lib/index.js +21 -29
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +16 -18
- package/node_modules/@deepseek-ai/dsh-web-search-exa/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-web-search-perplexity/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-webhook/lib/index.js +121 -50
- package/node_modules/@deepseek-ai/dsh-webhook/lib/types/session.js +111 -46
- package/node_modules/@deepseek-ai/dsh-webhook/package.json +25 -25
- package/node_modules/@deepseek-ai/dsh-webhook-github/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-win32-process/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-workflow/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-workflow-ptc/package.json +36 -36
- package/node_modules/@deepseek-ai/dsh-workspace/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-workspace/README.md +16 -4
- package/node_modules/@deepseek-ai/dsh-workspace/README.zh.md +17 -4
- package/node_modules/@deepseek-ai/dsh-workspace/lib/index.js +166 -25
- package/node_modules/@deepseek-ai/dsh-workspace/lib/invariant.js +8 -3
- package/node_modules/@deepseek-ai/dsh-workspace/lib/types/index.js +185 -21
- package/node_modules/@deepseek-ai/dsh-workspace/lib/types/spec.js +11 -4
- package/node_modules/@deepseek-ai/dsh-workspace/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-workspace-changes/package.json +16 -16
- package/node_modules/@deepseek-ai/schemastery/README.md +4 -0
- package/node_modules/@deepseek-ai/schemastery/lib/index.cjs +40 -1
- package/node_modules/@deepseek-ai/schemastery/lib/index.mjs +41 -2
- package/node_modules/@deepseek-ai/schemastery/package.json +2 -2
- package/node_modules/@deepseek-ai/schemastery/src/index.ts +93 -33
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +0 -2
- package/node_modules/@eslint-community/regexpp/LICENSE +21 -0
- package/node_modules/@eslint-community/regexpp/README.md +177 -0
- package/node_modules/@eslint-community/regexpp/index.js +3042 -0
- package/node_modules/@eslint-community/regexpp/index.mjs +3032 -0
- package/node_modules/@eslint-community/regexpp/package.json +71 -0
- package/node_modules/ajv/.runkit_example.js +23 -0
- package/node_modules/ajv/LICENSE +22 -0
- package/node_modules/ajv/README.md +207 -0
- package/node_modules/ajv/dist/2019.js +61 -0
- package/node_modules/ajv/dist/2020.js +55 -0
- package/node_modules/ajv/dist/ajv.js +50 -0
- package/node_modules/ajv/dist/compile/codegen/code.js +156 -0
- package/node_modules/ajv/dist/compile/codegen/index.js +697 -0
- package/node_modules/ajv/dist/compile/codegen/scope.js +143 -0
- package/node_modules/ajv/dist/compile/errors.js +123 -0
- package/node_modules/ajv/dist/compile/index.js +242 -0
- package/node_modules/ajv/dist/compile/jtd/parse.js +350 -0
- package/node_modules/ajv/dist/compile/jtd/serialize.js +236 -0
- package/node_modules/ajv/dist/compile/jtd/types.js +14 -0
- package/node_modules/ajv/dist/compile/names.js +28 -0
- package/node_modules/ajv/dist/compile/ref_error.js +12 -0
- package/node_modules/ajv/dist/compile/resolve.js +155 -0
- package/node_modules/ajv/dist/compile/rules.js +26 -0
- package/node_modules/ajv/dist/compile/util.js +178 -0
- package/node_modules/ajv/dist/compile/validate/applicability.js +19 -0
- package/node_modules/ajv/dist/compile/validate/boolSchema.js +50 -0
- package/node_modules/ajv/dist/compile/validate/dataType.js +203 -0
- package/node_modules/ajv/dist/compile/validate/defaults.js +35 -0
- package/node_modules/ajv/dist/compile/validate/index.js +520 -0
- package/node_modules/ajv/dist/compile/validate/keyword.js +124 -0
- package/node_modules/ajv/dist/compile/validate/subschema.js +81 -0
- package/node_modules/ajv/dist/core.js +618 -0
- package/node_modules/ajv/dist/jtd.js +72 -0
- package/node_modules/ajv/dist/refs/data.json +13 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/index.js +28 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json +53 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json +17 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json +57 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json +14 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json +37 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json +90 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/schema.json +39 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/index.js +30 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json +48 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json +17 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json +51 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json +14 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json +37 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json +15 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json +90 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json +55 -0
- package/node_modules/ajv/dist/refs/json-schema-draft-06.json +137 -0
- package/node_modules/ajv/dist/refs/json-schema-draft-07.json +151 -0
- package/node_modules/ajv/dist/refs/json-schema-secure.json +88 -0
- package/node_modules/ajv/dist/refs/jtd-schema.js +118 -0
- package/node_modules/ajv/dist/runtime/equal.js +7 -0
- package/node_modules/ajv/dist/runtime/parseJson.js +185 -0
- package/node_modules/ajv/dist/runtime/quote.js +30 -0
- package/node_modules/ajv/dist/runtime/re2.js +6 -0
- package/node_modules/ajv/dist/runtime/timestamp.js +42 -0
- package/node_modules/ajv/dist/runtime/ucs2length.js +24 -0
- package/node_modules/ajv/dist/runtime/uri.js +6 -0
- package/node_modules/ajv/dist/runtime/validation_error.js +11 -0
- package/node_modules/ajv/dist/standalone/index.js +90 -0
- package/node_modules/ajv/dist/standalone/instance.js +35 -0
- package/node_modules/ajv/dist/types/index.js +3 -0
- package/node_modules/ajv/dist/types/json-schema.js +3 -0
- package/node_modules/ajv/dist/types/jtd-schema.js +3 -0
- package/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +49 -0
- package/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +106 -0
- package/node_modules/ajv/dist/vocabularies/applicator/allOf.js +23 -0
- package/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +12 -0
- package/node_modules/ajv/dist/vocabularies/applicator/contains.js +95 -0
- package/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +85 -0
- package/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +11 -0
- package/node_modules/ajv/dist/vocabularies/applicator/if.js +66 -0
- package/node_modules/ajv/dist/vocabularies/applicator/index.js +44 -0
- package/node_modules/ajv/dist/vocabularies/applicator/items.js +52 -0
- package/node_modules/ajv/dist/vocabularies/applicator/items2020.js +30 -0
- package/node_modules/ajv/dist/vocabularies/applicator/not.js +26 -0
- package/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +60 -0
- package/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +75 -0
- package/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +12 -0
- package/node_modules/ajv/dist/vocabularies/applicator/properties.js +54 -0
- package/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +38 -0
- package/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +13 -0
- package/node_modules/ajv/dist/vocabularies/code.js +131 -0
- package/node_modules/ajv/dist/vocabularies/core/id.js +10 -0
- package/node_modules/ajv/dist/vocabularies/core/index.js +16 -0
- package/node_modules/ajv/dist/vocabularies/core/ref.js +122 -0
- package/node_modules/ajv/dist/vocabularies/discriminator/index.js +104 -0
- package/node_modules/ajv/dist/vocabularies/discriminator/types.js +9 -0
- package/node_modules/ajv/dist/vocabularies/draft2020.js +23 -0
- package/node_modules/ajv/dist/vocabularies/draft7.js +17 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +30 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +51 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/index.js +9 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +16 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +10 -0
- package/node_modules/ajv/dist/vocabularies/errors.js +3 -0
- package/node_modules/ajv/dist/vocabularies/format/format.js +92 -0
- package/node_modules/ajv/dist/vocabularies/format/index.js +6 -0
- package/node_modules/ajv/dist/vocabularies/jtd/discriminator.js +71 -0
- package/node_modules/ajv/dist/vocabularies/jtd/elements.js +24 -0
- package/node_modules/ajv/dist/vocabularies/jtd/enum.js +43 -0
- package/node_modules/ajv/dist/vocabularies/jtd/error.js +20 -0
- package/node_modules/ajv/dist/vocabularies/jtd/index.js +29 -0
- package/node_modules/ajv/dist/vocabularies/jtd/metadata.js +25 -0
- package/node_modules/ajv/dist/vocabularies/jtd/nullable.js +22 -0
- package/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js +15 -0
- package/node_modules/ajv/dist/vocabularies/jtd/properties.js +149 -0
- package/node_modules/ajv/dist/vocabularies/jtd/ref.js +67 -0
- package/node_modules/ajv/dist/vocabularies/jtd/type.js +69 -0
- package/node_modules/ajv/dist/vocabularies/jtd/union.js +12 -0
- package/node_modules/ajv/dist/vocabularies/jtd/values.js +51 -0
- package/node_modules/ajv/dist/vocabularies/metadata.js +18 -0
- package/node_modules/ajv/dist/vocabularies/next.js +8 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/index.js +7 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +40 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +65 -0
- package/node_modules/ajv/dist/vocabularies/validation/const.js +25 -0
- package/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +12 -0
- package/node_modules/ajv/dist/vocabularies/validation/enum.js +48 -0
- package/node_modules/ajv/dist/vocabularies/validation/index.js +33 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitContains.js +15 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitItems.js +24 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitLength.js +27 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +27 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +24 -0
- package/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +26 -0
- package/node_modules/ajv/dist/vocabularies/validation/pattern.js +33 -0
- package/node_modules/ajv/dist/vocabularies/validation/required.js +79 -0
- package/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +64 -0
- package/node_modules/ajv/lib/2019.ts +81 -0
- package/node_modules/ajv/lib/2020.ts +75 -0
- package/node_modules/ajv/lib/ajv.ts +70 -0
- package/node_modules/ajv/lib/compile/codegen/code.ts +169 -0
- package/node_modules/ajv/lib/compile/codegen/index.ts +852 -0
- package/node_modules/ajv/lib/compile/codegen/scope.ts +215 -0
- package/node_modules/ajv/lib/compile/errors.ts +184 -0
- package/node_modules/ajv/lib/compile/index.ts +324 -0
- package/node_modules/ajv/lib/compile/jtd/parse.ts +411 -0
- package/node_modules/ajv/lib/compile/jtd/serialize.ts +277 -0
- package/node_modules/ajv/lib/compile/jtd/types.ts +16 -0
- package/node_modules/ajv/lib/compile/names.ts +27 -0
- package/node_modules/ajv/lib/compile/ref_error.ts +13 -0
- package/node_modules/ajv/lib/compile/resolve.ts +149 -0
- package/node_modules/ajv/lib/compile/rules.ts +50 -0
- package/node_modules/ajv/lib/compile/util.ts +213 -0
- package/node_modules/ajv/lib/compile/validate/applicability.ts +22 -0
- package/node_modules/ajv/lib/compile/validate/boolSchema.ts +47 -0
- package/node_modules/ajv/lib/compile/validate/dataType.ts +230 -0
- package/node_modules/ajv/lib/compile/validate/defaults.ts +32 -0
- package/node_modules/ajv/lib/compile/validate/index.ts +582 -0
- package/node_modules/ajv/lib/compile/validate/keyword.ts +171 -0
- package/node_modules/ajv/lib/compile/validate/subschema.ts +135 -0
- package/node_modules/ajv/lib/core.ts +892 -0
- package/node_modules/ajv/lib/jtd.ts +132 -0
- package/node_modules/ajv/lib/refs/data.json +13 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/index.ts +28 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/applicator.json +53 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/content.json +17 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/core.json +57 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/format.json +14 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/meta-data.json +37 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/validation.json +90 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/schema.json +39 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/index.ts +30 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/applicator.json +48 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/content.json +17 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/core.json +51 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/format-annotation.json +14 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/meta-data.json +37 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/unevaluated.json +15 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/validation.json +90 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/schema.json +55 -0
- package/node_modules/ajv/lib/refs/json-schema-draft-06.json +137 -0
- package/node_modules/ajv/lib/refs/json-schema-draft-07.json +151 -0
- package/node_modules/ajv/lib/refs/json-schema-secure.json +88 -0
- package/node_modules/ajv/lib/refs/jtd-schema.ts +130 -0
- package/node_modules/ajv/lib/runtime/equal.ts +7 -0
- package/node_modules/ajv/lib/runtime/parseJson.ts +177 -0
- package/node_modules/ajv/lib/runtime/quote.ts +31 -0
- package/node_modules/ajv/lib/runtime/re2.ts +6 -0
- package/node_modules/ajv/lib/runtime/timestamp.ts +46 -0
- package/node_modules/ajv/lib/runtime/ucs2length.ts +20 -0
- package/node_modules/ajv/lib/runtime/uri.ts +6 -0
- package/node_modules/ajv/lib/runtime/validation_error.ts +13 -0
- package/node_modules/ajv/lib/standalone/index.ts +100 -0
- package/node_modules/ajv/lib/standalone/instance.ts +36 -0
- package/node_modules/ajv/lib/types/index.ts +244 -0
- package/node_modules/ajv/lib/types/json-schema.ts +187 -0
- package/node_modules/ajv/lib/types/jtd-schema.ts +273 -0
- package/node_modules/ajv/lib/vocabularies/applicator/additionalItems.ts +56 -0
- package/node_modules/ajv/lib/vocabularies/applicator/additionalProperties.ts +118 -0
- package/node_modules/ajv/lib/vocabularies/applicator/allOf.ts +22 -0
- package/node_modules/ajv/lib/vocabularies/applicator/anyOf.ts +14 -0
- package/node_modules/ajv/lib/vocabularies/applicator/contains.ts +109 -0
- package/node_modules/ajv/lib/vocabularies/applicator/dependencies.ts +112 -0
- package/node_modules/ajv/lib/vocabularies/applicator/dependentSchemas.ts +11 -0
- package/node_modules/ajv/lib/vocabularies/applicator/if.ts +80 -0
- package/node_modules/ajv/lib/vocabularies/applicator/index.ts +53 -0
- package/node_modules/ajv/lib/vocabularies/applicator/items.ts +59 -0
- package/node_modules/ajv/lib/vocabularies/applicator/items2020.ts +36 -0
- package/node_modules/ajv/lib/vocabularies/applicator/not.ts +38 -0
- package/node_modules/ajv/lib/vocabularies/applicator/oneOf.ts +82 -0
- package/node_modules/ajv/lib/vocabularies/applicator/patternProperties.ts +91 -0
- package/node_modules/ajv/lib/vocabularies/applicator/prefixItems.ts +12 -0
- package/node_modules/ajv/lib/vocabularies/applicator/properties.ts +57 -0
- package/node_modules/ajv/lib/vocabularies/applicator/propertyNames.ts +50 -0
- package/node_modules/ajv/lib/vocabularies/applicator/thenElse.ts +13 -0
- package/node_modules/ajv/lib/vocabularies/code.ts +168 -0
- package/node_modules/ajv/lib/vocabularies/core/id.ts +10 -0
- package/node_modules/ajv/lib/vocabularies/core/index.ts +16 -0
- package/node_modules/ajv/lib/vocabularies/core/ref.ts +129 -0
- package/node_modules/ajv/lib/vocabularies/discriminator/index.ts +113 -0
- package/node_modules/ajv/lib/vocabularies/discriminator/types.ts +12 -0
- package/node_modules/ajv/lib/vocabularies/draft2020.ts +23 -0
- package/node_modules/ajv/lib/vocabularies/draft7.ts +17 -0
- package/node_modules/ajv/lib/vocabularies/dynamic/dynamicAnchor.ts +31 -0
- package/node_modules/ajv/lib/vocabularies/dynamic/dynamicRef.ts +51 -0
- package/node_modules/ajv/lib/vocabularies/dynamic/index.ts +9 -0
- package/node_modules/ajv/lib/vocabularies/dynamic/recursiveAnchor.ts +14 -0
- package/node_modules/ajv/lib/vocabularies/dynamic/recursiveRef.ts +10 -0
- package/node_modules/ajv/lib/vocabularies/errors.ts +18 -0
- package/node_modules/ajv/lib/vocabularies/format/format.ts +120 -0
- package/node_modules/ajv/lib/vocabularies/format/index.ts +6 -0
- package/node_modules/ajv/lib/vocabularies/jtd/discriminator.ts +89 -0
- package/node_modules/ajv/lib/vocabularies/jtd/elements.ts +32 -0
- package/node_modules/ajv/lib/vocabularies/jtd/enum.ts +45 -0
- package/node_modules/ajv/lib/vocabularies/jtd/error.ts +23 -0
- package/node_modules/ajv/lib/vocabularies/jtd/index.ts +37 -0
- package/node_modules/ajv/lib/vocabularies/jtd/metadata.ts +24 -0
- package/node_modules/ajv/lib/vocabularies/jtd/nullable.ts +21 -0
- package/node_modules/ajv/lib/vocabularies/jtd/optionalProperties.ts +15 -0
- package/node_modules/ajv/lib/vocabularies/jtd/properties.ts +184 -0
- package/node_modules/ajv/lib/vocabularies/jtd/ref.ts +76 -0
- package/node_modules/ajv/lib/vocabularies/jtd/type.ts +75 -0
- package/node_modules/ajv/lib/vocabularies/jtd/union.ts +12 -0
- package/node_modules/ajv/lib/vocabularies/jtd/values.ts +58 -0
- package/node_modules/ajv/lib/vocabularies/metadata.ts +17 -0
- package/node_modules/ajv/lib/vocabularies/next.ts +8 -0
- package/node_modules/ajv/lib/vocabularies/unevaluated/index.ts +7 -0
- package/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedItems.ts +47 -0
- package/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedProperties.ts +85 -0
- package/node_modules/ajv/lib/vocabularies/validation/const.ts +28 -0
- package/node_modules/ajv/lib/vocabularies/validation/dependentRequired.ts +23 -0
- package/node_modules/ajv/lib/vocabularies/validation/enum.ts +54 -0
- package/node_modules/ajv/lib/vocabularies/validation/index.ts +49 -0
- package/node_modules/ajv/lib/vocabularies/validation/limitContains.ts +16 -0
- package/node_modules/ajv/lib/vocabularies/validation/limitItems.ts +26 -0
- package/node_modules/ajv/lib/vocabularies/validation/limitLength.ts +30 -0
- package/node_modules/ajv/lib/vocabularies/validation/limitNumber.ts +42 -0
- package/node_modules/ajv/lib/vocabularies/validation/limitProperties.ts +26 -0
- package/node_modules/ajv/lib/vocabularies/validation/multipleOf.ts +34 -0
- package/node_modules/ajv/lib/vocabularies/validation/pattern.ts +39 -0
- package/node_modules/ajv/lib/vocabularies/validation/required.ts +98 -0
- package/node_modules/ajv/lib/vocabularies/validation/uniqueItems.ts +79 -0
- package/node_modules/ajv/package.json +104 -0
- package/node_modules/fast-uri/.gitattributes +2 -0
- package/node_modules/fast-uri/.github/dependabot.yml +13 -0
- package/node_modules/fast-uri/.github/workflows/ci.yml +106 -0
- package/node_modules/fast-uri/.github/workflows/lock-threads.yml +19 -0
- package/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +24 -0
- package/node_modules/fast-uri/LICENSE +30 -0
- package/node_modules/fast-uri/README.md +152 -0
- package/node_modules/fast-uri/benchmark/benchmark.mjs +159 -0
- package/node_modules/fast-uri/benchmark/equal.mjs +51 -0
- package/node_modules/fast-uri/benchmark/non-simple-domain.mjs +22 -0
- package/node_modules/fast-uri/benchmark/package.json +17 -0
- package/node_modules/fast-uri/benchmark/string-array-to-hex-stripped.mjs +24 -0
- package/node_modules/fast-uri/benchmark/ws-is-secure.mjs +65 -0
- package/node_modules/fast-uri/eslint.config.js +6 -0
- package/node_modules/fast-uri/index.js +631 -0
- package/node_modules/fast-uri/lib/schemes.js +272 -0
- package/node_modules/fast-uri/lib/utils.js +747 -0
- package/node_modules/fast-uri/package.json +56 -0
- package/node_modules/fast-uri/test/ajv.test.js +43 -0
- package/node_modules/fast-uri/test/component-safe-serialization.test.js +163 -0
- package/node_modules/fast-uri/test/equal.test.js +145 -0
- package/node_modules/fast-uri/test/fixtures/uri-js-parse.json +503 -0
- package/node_modules/fast-uri/test/fixtures/uri-js-serialize.json +120 -0
- package/node_modules/fast-uri/test/ipv6-canonical.test.js +34 -0
- package/node_modules/fast-uri/test/ipv6-validation.test.js +124 -0
- package/node_modules/fast-uri/test/malformed-percent.test.js +77 -0
- package/node_modules/fast-uri/test/malformed-urn.test.js +61 -0
- package/node_modules/fast-uri/test/parse.test.js +327 -0
- package/node_modules/fast-uri/test/query-fragment-normalization.test.js +33 -0
- package/node_modules/fast-uri/test/reserved-path-normalization.test.js +109 -0
- package/node_modules/fast-uri/test/resolve.test.js +87 -0
- package/node_modules/fast-uri/test/rfc-3986.test.js +90 -0
- package/node_modules/fast-uri/test/scheme-validation.test.js +124 -0
- package/node_modules/fast-uri/test/security-normalization.test.js +178 -0
- package/node_modules/fast-uri/test/security.test.js +431 -0
- package/node_modules/fast-uri/test/serialize.test.js +151 -0
- package/node_modules/fast-uri/test/uri-js-compatibility.test.js +33 -0
- package/node_modules/fast-uri/test/uri-js.test.js +912 -0
- package/node_modules/fast-uri/test/urn-full-input.test.js +29 -0
- package/node_modules/fast-uri/test/util.test.js +38 -0
- package/node_modules/fast-uri/test/websocket-query-preservation.test.js +24 -0
- package/node_modules/fast-uri/tsconfig.json +9 -0
- package/node_modules/fast-uri/types/index.test-d.ts +17 -0
- package/node_modules/json-schema-traverse/.eslintrc.yml +27 -0
- package/node_modules/json-schema-traverse/.github/FUNDING.yml +2 -0
- package/node_modules/json-schema-traverse/.github/workflows/build.yml +28 -0
- package/node_modules/json-schema-traverse/.github/workflows/publish.yml +27 -0
- package/node_modules/json-schema-traverse/LICENSE +21 -0
- package/node_modules/json-schema-traverse/README.md +95 -0
- package/node_modules/json-schema-traverse/index.js +93 -0
- package/node_modules/json-schema-traverse/package.json +38 -0
- package/node_modules/json-schema-traverse/spec/.eslintrc.yml +6 -0
- package/node_modules/json-schema-traverse/spec/fixtures/schema.js +125 -0
- package/node_modules/json-schema-traverse/spec/index.spec.js +171 -0
- package/node_modules/require-from-string/index.js +34 -0
- package/node_modules/require-from-string/license +21 -0
- package/node_modules/require-from-string/package.json +25 -0
- package/node_modules/require-from-string/readme.md +56 -0
- package/node_modules/sherpa-onnx-node/README.md +11 -0
- package/node_modules/sherpa-onnx-node/addon-static-import.js +70 -0
- package/node_modules/sherpa-onnx-node/addon.js +98 -0
- package/node_modules/sherpa-onnx-node/audio-tagg.js +45 -0
- package/node_modules/sherpa-onnx-node/keyword-spotter.js +68 -0
- package/node_modules/sherpa-onnx-node/non-streaming-asr.js +158 -0
- package/node_modules/sherpa-onnx-node/non-streaming-speaker-diarization.js +38 -0
- package/node_modules/sherpa-onnx-node/non-streaming-speech-denoiser.js +32 -0
- package/node_modules/sherpa-onnx-node/non-streaming-tts.js +116 -0
- package/node_modules/sherpa-onnx-node/online-speech-denoiser.js +46 -0
- package/node_modules/sherpa-onnx-node/package.json +56 -0
- package/node_modules/sherpa-onnx-node/punctuation.js +43 -0
- package/node_modules/sherpa-onnx-node/resampler.js +80 -0
- package/node_modules/sherpa-onnx-node/sherpa-onnx.js +49 -0
- package/node_modules/sherpa-onnx-node/speaker-identification.js +152 -0
- package/node_modules/sherpa-onnx-node/spoken-language-identification.js +38 -0
- package/node_modules/sherpa-onnx-node/streaming-asr.js +181 -0
- package/node_modules/sherpa-onnx-node/types.js +788 -0
- package/node_modules/sherpa-onnx-node/vad.js +134 -0
- package/package.json +318 -272
- package/node_modules/@bufbuild/protobuf/README.md +0 -41
- package/node_modules/@bufbuild/protobuf/dist/commonjs/clone.js +0 -66
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/boot.js +0 -18
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/enum.js +0 -31
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/extension.js +0 -28
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/file.js +0 -18
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/index.js +0 -39
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/message.js +0 -24
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/service.js +0 -27
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/symbols.js +0 -43
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/types.js +0 -15
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/boot.js +0 -105
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/embed.js +0 -244
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/enum.js +0 -58
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/extension.js +0 -28
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/file.js +0 -35
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/index.js +0 -39
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/message.js +0 -24
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/restore-json-names.js +0 -29
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/scalar.js +0 -67
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/service.js +0 -27
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/symbols.js +0 -74
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/types.js +0 -15
- package/node_modules/@bufbuild/protobuf/dist/commonjs/create.js +0 -296
- package/node_modules/@bufbuild/protobuf/dist/commonjs/descriptors.js +0 -53
- package/node_modules/@bufbuild/protobuf/dist/commonjs/equals.js +0 -209
- package/node_modules/@bufbuild/protobuf/dist/commonjs/extensions.js +0 -168
- package/node_modules/@bufbuild/protobuf/dist/commonjs/fields.js +0 -45
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-binary.js +0 -415
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-json.js +0 -1037
- package/node_modules/@bufbuild/protobuf/dist/commonjs/index.js +0 -55
- package/node_modules/@bufbuild/protobuf/dist/commonjs/is-message.js +0 -33
- package/node_modules/@bufbuild/protobuf/dist/commonjs/json-value.js +0 -15
- package/node_modules/@bufbuild/protobuf/dist/commonjs/merge.js +0 -70
- package/node_modules/@bufbuild/protobuf/dist/commonjs/package.json +0 -4
- package/node_modules/@bufbuild/protobuf/dist/commonjs/proto-int64.js +0 -131
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/error.js +0 -36
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/guard.js +0 -78
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/index.js +0 -41
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/message.js +0 -157
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/names.js +0 -115
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/nested-types.js +0 -110
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/path.js +0 -376
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.js +0 -292
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-types.js +0 -16
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect.js +0 -469
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/scalar.js +0 -129
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/unsafe.js +0 -149
- package/node_modules/@bufbuild/protobuf/dist/commonjs/registry.js +0 -954
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-binary.js +0 -437
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-json.js +0 -625
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/from-text.js +0 -684
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/index.js +0 -21
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/is-group-like.js +0 -47
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/reader.js +0 -481
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/to-text.js +0 -358
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/writer.js +0 -220
- package/node_modules/@bufbuild/protobuf/dist/commonjs/types.js +0 -15
- package/node_modules/@bufbuild/protobuf/dist/commonjs/unknown-enum.js +0 -26
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/base64-encoding.js +0 -188
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.js +0 -726
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/index.js +0 -37
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/size-delimited.js +0 -191
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-encoding.js +0 -106
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-format.js +0 -199
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/varint.js +0 -334
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/any.js +0 -75
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/duration.js +0 -39
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/any_pb.js +0 -27
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/api_pb.js +0 -39
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/compiler/plugin_pb.js +0 -68
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/cpp_features_pb.js +0 -60
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/descriptor_pb.js +0 -892
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/duration_pb.js +0 -27
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/empty_pb.js +0 -27
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/field_mask_pb.js +0 -27
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/go_features_pb.js +0 -126
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/java_features_pb.js +0 -106
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/source_context_pb.js +0 -27
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/struct_pb.js +0 -59
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/timestamp_pb.js +0 -27
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/type_pb.js +0 -242
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/wrappers_pb.js +0 -67
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/index.js +0 -48
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/json.js +0 -44
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/timestamp.js +0 -57
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/wrappers.js +0 -66
- package/node_modules/@bufbuild/protobuf/dist/esm/clone.js +0 -63
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/boot.js +0 -14
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/enum.js +0 -26
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/extension.js +0 -25
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/file.js +0 -14
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/index.js +0 -23
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/message.js +0 -21
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/service.js +0 -24
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/symbols.js +0 -40
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/types.js +0 -14
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/boot.js +0 -101
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/embed.js +0 -239
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/enum.js +0 -53
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/extension.js +0 -25
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.js +0 -32
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/index.js +0 -23
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.js +0 -21
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/restore-json-names.js +0 -26
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/scalar.js +0 -63
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/service.js +0 -24
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/symbols.js +0 -71
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/types.js +0 -14
- package/node_modules/@bufbuild/protobuf/dist/esm/create.js +0 -293
- package/node_modules/@bufbuild/protobuf/dist/esm/descriptors.js +0 -50
- package/node_modules/@bufbuild/protobuf/dist/esm/equals.js +0 -206
- package/node_modules/@bufbuild/protobuf/dist/esm/extensions.js +0 -159
- package/node_modules/@bufbuild/protobuf/dist/esm/fields.js +0 -41
- package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.js +0 -409
- package/node_modules/@bufbuild/protobuf/dist/esm/from-json.js +0 -1029
- package/node_modules/@bufbuild/protobuf/dist/esm/index.js +0 -29
- package/node_modules/@bufbuild/protobuf/dist/esm/is-message.js +0 -30
- package/node_modules/@bufbuild/protobuf/dist/esm/json-value.js +0 -14
- package/node_modules/@bufbuild/protobuf/dist/esm/merge.js +0 -67
- package/node_modules/@bufbuild/protobuf/dist/esm/package.json +0 -4
- package/node_modules/@bufbuild/protobuf/dist/esm/proto-int64.js +0 -128
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.js +0 -31
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.js +0 -71
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/index.js +0 -21
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/message.js +0 -152
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.js +0 -109
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.js +0 -105
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/path.js +0 -369
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.js +0 -284
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-types.js +0 -14
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.js +0 -464
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.js +0 -124
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.js +0 -140
- package/node_modules/@bufbuild/protobuf/dist/esm/registry.js +0 -948
- package/node_modules/@bufbuild/protobuf/dist/esm/to-binary.js +0 -433
- package/node_modules/@bufbuild/protobuf/dist/esm/to-json.js +0 -620
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/from-text.js +0 -680
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/index.js +0 -15
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/is-group-like.js +0 -44
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/reader.js +0 -477
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/to-text.js +0 -355
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/writer.js +0 -214
- package/node_modules/@bufbuild/protobuf/dist/esm/types.js +0 -14
- package/node_modules/@bufbuild/protobuf/dist/esm/unknown-enum.js +0 -23
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.js +0 -184
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.js +0 -721
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/index.js +0 -18
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/size-delimited.js +0 -186
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.js +0 -101
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-format.js +0 -195
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.js +0 -325
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/any.js +0 -69
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/duration.js +0 -35
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/any_pb.js +0 -24
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/api_pb.js +0 -36
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.js +0 -65
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/cpp_features_pb.js +0 -57
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.js +0 -888
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/duration_pb.js +0 -24
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/empty_pb.js +0 -24
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/field_mask_pb.js +0 -24
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/go_features_pb.js +0 -123
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/java_features_pb.js +0 -103
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/source_context_pb.js +0 -24
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/struct_pb.js +0 -56
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/timestamp_pb.js +0 -24
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/type_pb.js +0 -239
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/wrappers_pb.js +0 -64
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/index.js +0 -32
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/json.js +0 -41
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/timestamp.js +0 -50
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.js +0 -61
- package/node_modules/@bufbuild/protobuf/package.json +0 -136
- package/node_modules/@deepseek-ai/dsh-agent-presets/README.md +0 -195
- package/node_modules/@deepseek-ai/dsh-agent-presets/README.zh.md +0 -195
- package/node_modules/@deepseek-ai/dsh-agent-presets/lib/index.js +0 -1820
- package/node_modules/@deepseek-ai/dsh-agent-presets/lib/invariant.js +0 -1838
- package/node_modules/@deepseek-ai/dsh-agent-presets/lib/typert.remote-client.js +0 -207
- package/node_modules/@deepseek-ai/dsh-agent-presets/lib/types/authoring.js +0 -176
- package/node_modules/@deepseek-ai/dsh-agent-presets/lib/types/discovery.js +0 -316
- package/node_modules/@deepseek-ai/dsh-agent-presets/lib/types/index.js +0 -799
- package/node_modules/@deepseek-ai/dsh-agent-presets/lib/types/metadata.js +0 -92
- package/node_modules/@deepseek-ai/dsh-agent-presets/lib/types/mount.js +0 -386
- package/node_modules/@deepseek-ai/dsh-agent-presets/lib/types/preset.js +0 -11
- package/node_modules/@deepseek-ai/dsh-agent-presets/lib/types/specifier.js +0 -41
- package/node_modules/@deepseek-ai/dsh-agent-presets/package.json +0 -98
- package/node_modules/@deepseek-ai/dsh-agent-presets/presets/cordis/agent.cordis.yml +0 -283
- package/node_modules/@deepseek-ai/dsh-agent-presets/presets/cordis/preset.yml +0 -3
- package/node_modules/@deepseek-ai/dsh-agent-presets/presets/cordis/skills/cordis-plugin-development/SKILL.md +0 -108
- package/node_modules/@deepseek-ai/dsh-agent-presets/presets/cordis/skills/editing-cordis-compositions/SKILL.md +0 -102
- package/node_modules/@deepseek-ai/dsh-agent-presets/presets/minimal/agent.cordis.yml +0 -69
- package/node_modules/@deepseek-ai/dsh-agent-presets/presets/minimal/preset.yml +0 -3
- package/node_modules/@deepseek-ai/dsh-agent-presets/presets/ptc/agent.cordis.yml +0 -287
- package/node_modules/@deepseek-ai/dsh-agent-presets/presets/ptc/preset.yml +0 -3
- package/node_modules/@deepseek-ai/dsh-agent-presets/presets/standard/agent.cordis.yml +0 -266
- package/node_modules/@deepseek-ai/dsh-agent-presets/presets/standard/preset.yml +0 -3
- package/node_modules/@deepseek-ai/dsh-api-authorization-controller/README.md +0 -138
- package/node_modules/@deepseek-ai/dsh-api-authorization-controller/README.zh.md +0 -138
- package/node_modules/@deepseek-ai/dsh-api-authorization-controller/lib/index.js +0 -501
- package/node_modules/@deepseek-ai/dsh-api-authorization-controller/lib/typert.host.js +0 -350
- package/node_modules/@deepseek-ai/dsh-api-authorization-controller/lib/typert.remote-client.js +0 -249
- package/node_modules/@deepseek-ai/dsh-api-authorization-controller/lib/types/index.js +0 -424
- package/node_modules/@deepseek-ai/dsh-api-authorization-controller/lib/types/types.js +0 -12
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/queue-mirror.js +0 -61
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-unarchive-sessions/README.md +0 -112
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-unarchive-sessions/README.zh.md +0 -112
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-unarchive-sessions/lib/client.js +0 -216
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-unarchive-sessions/lib/index.js +0 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-unarchive-sessions/package.json +0 -66
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-web-profile/README.md +0 -98
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-web-profile/README.zh.md +0 -98
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-web-profile/cordis.patch.yml +0 -6
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-web-profile/package.json +0 -47
- package/node_modules/@deepseek-ai/dsh-llm-cursor/README.md +0 -142
- package/node_modules/@deepseek-ai/dsh-llm-cursor/README.zh.md +0 -142
- package/node_modules/@deepseek-ai/dsh-llm-cursor/lib/index.js +0 -3050
- package/node_modules/@deepseek-ai/dsh-llm-cursor/package.json +0 -62
- package/node_modules/@deepseek-ai/dsh-settings/lib/invariant.js +0 -35
- package/node_modules/@deepseek-ai/dsh-settings/lib/types/invariant.js +0 -41
- package/node_modules/@deepseek-ai/dsh-settings-file/README.md +0 -150
- package/node_modules/@deepseek-ai/dsh-settings-file/README.zh.md +0 -150
- package/node_modules/@deepseek-ai/dsh-settings-file/lib/index.js +0 -285
- package/node_modules/@deepseek-ai/dsh-settings-file/package.json +0 -47
- package/node_modules/@deepseek-ai/dsh-subprocess-local/lib/runner-launch-UEJ3Ntqn.js +0 -1511
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-8VXBH-f-.js +0 -127
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-lP1BfJ4l.css +0 -1
- /package/node_modules/@deepseek-ai/{dsh-agent-presets → dsh-agent-preset-registry}/lib/types/types.js +0 -0
- /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team-web-profile → dsh-experimental-voice-input-bundle}/lib/index.js +0 -0
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { createRequire, isBuiltin } from "node:module";
|
|
2
2
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
3
|
-
import { existsSync,
|
|
3
|
+
import { existsSync, mkdirSync, readFileSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { parseEnv } from "node:util";
|
|
5
|
-
import { basename, dirname, extname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
5
|
+
import { basename, dirname, extname, isAbsolute, join, relative, resolve, sep, win32 } from "node:path";
|
|
6
6
|
import * as yaml from "js-yaml";
|
|
7
7
|
import { Context, Service } from "@deepseek-ai/cordis";
|
|
8
|
-
import Loader, { EntryGroup, EntryTree, isJsExpr } from "@deepseek-ai/cordis-plugin-loader";
|
|
9
|
-
import { access, constants, readFile, rename, writeFile } from "node:fs/promises";
|
|
8
|
+
import Loader, { EntryGroup, EntryTree, ModuleLoader, isJsExpr } from "@deepseek-ai/cordis-plugin-loader";
|
|
9
|
+
import { access, constants, readFile, realpath, rename, writeFile } from "node:fs/promises";
|
|
10
10
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
11
11
|
import Group from "@deepseek-ai/cordis-plugin-group";
|
|
12
12
|
import { dshHomePath, resolveDshHome } from "@deepseek-ai/dsh-home-paths";
|
|
13
13
|
import { createLaunchEnvironmentSnapshot } from "@deepseek-ai/dsh-launch-environment";
|
|
14
|
-
import { withFileLock } from "@deepseek-ai/dsh-atomic-write";
|
|
15
|
-
import { imports, resolve as resolve$1 } from "resolve.exports";
|
|
16
14
|
import { getEnvironmentData, setEnvironmentData } from "node:worker_threads";
|
|
15
|
+
import { imports } from "resolve.exports";
|
|
17
16
|
//#region ../../../vendor/include/src/index.ts
|
|
18
17
|
const JsExpr = new yaml.Type("tag:yaml.org,2002:js", {
|
|
19
18
|
kind: "scalar",
|
|
@@ -247,9 +246,7 @@ var Include = class extends EntryTree {
|
|
|
247
246
|
};
|
|
248
247
|
//#endregion
|
|
249
248
|
//#region lib/types/profile-resolution/legacy-links.js
|
|
250
|
-
/**
|
|
251
|
-
/** Profile-private package links projected into its pnpm-managed node_modules. */
|
|
252
|
-
const PROFILE_MODULE_FALLBACK_DIR = ".dsh-module-fallback";
|
|
249
|
+
/** Package directory canonicalization through the active runtime carrier's filesystem. */
|
|
253
250
|
/**
|
|
254
251
|
* Return whether the process reads application modules from pkg's virtual filesystem.
|
|
255
252
|
* @returns whether pkg owns the module filesystem.
|
|
@@ -265,50 +262,6 @@ function isPackagedExecutable() {
|
|
|
265
262
|
function realModuleDirectory(path) {
|
|
266
263
|
return isPackagedExecutable() ? realpathSync(path) : realpathSync.native(path);
|
|
267
264
|
}
|
|
268
|
-
/**
|
|
269
|
-
* Resolve a link target without following the final path component.
|
|
270
|
-
* @param path - candidate path whose parent is canonicalized.
|
|
271
|
-
* @returns the canonical candidate, or undefined when its parent is absent.
|
|
272
|
-
*/
|
|
273
|
-
function canonicalLinkPath(path) {
|
|
274
|
-
try {
|
|
275
|
-
return join(realModuleDirectory(dirname(path)), basename(path));
|
|
276
|
-
} catch (error) {
|
|
277
|
-
/* v8 ignore next 2 -- a non-ENOENT realpath failure requires a host filesystem fault */
|
|
278
|
-
if (error.code === "ENOENT") return void 0;
|
|
279
|
-
/* v8 ignore next -- see the host-filesystem exception above */
|
|
280
|
-
throw error;
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* Return whether a symlink or junction points at the same path as `target`.
|
|
285
|
-
* @param link - symlink or junction to inspect.
|
|
286
|
-
* @param target - expected target path.
|
|
287
|
-
* @returns whether both paths identify the same entry.
|
|
288
|
-
*/
|
|
289
|
-
function symlinkPointsTo(link, target) {
|
|
290
|
-
const canonicalActual = canonicalLinkPath(resolve(dirname(link), readlinkSync(link)));
|
|
291
|
-
const canonicalTarget = canonicalLinkPath(resolve(target));
|
|
292
|
-
return canonicalActual !== void 0 && canonicalActual === canonicalTarget;
|
|
293
|
-
}
|
|
294
|
-
/**
|
|
295
|
-
* Return whether an observed profile package must not claim local precedence.
|
|
296
|
-
* @param profileDir - profile directory containing the package projection.
|
|
297
|
-
* @param packageName - bare package name to inspect.
|
|
298
|
-
* @returns whether the entry is a managed fallback link or disappeared during inspection.
|
|
299
|
-
*/
|
|
300
|
-
function isProfileModuleFallbackLink(profileDir, packageName) {
|
|
301
|
-
const link = join(profileDir, "node_modules", packageName);
|
|
302
|
-
const target = join(profileDir, PROFILE_MODULE_FALLBACK_DIR, "node_modules", packageName);
|
|
303
|
-
try {
|
|
304
|
-
return lstatSync(link).isSymbolicLink() && symlinkPointsTo(link, target);
|
|
305
|
-
} catch (error) {
|
|
306
|
-
/* v8 ignore next 2 -- a vanished candidate cannot claim local precedence */
|
|
307
|
-
if (error.code === "ENOENT") return true;
|
|
308
|
-
/* v8 ignore next -- non-ENOENT lstat/readlink failures require a host filesystem fault */
|
|
309
|
-
throw error;
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
265
|
//#endregion
|
|
313
266
|
//#region lib/types/profile.js
|
|
314
267
|
/**
|
|
@@ -320,19 +273,17 @@ function isProfileModuleFallbackLink(profileDir, packageName) {
|
|
|
320
273
|
* `dsh.profile` with its ordered `bundles` list) and a `cordis.patch.yml`
|
|
321
274
|
* (the user's own patch layer, applied after every bundle layer). Bundles are
|
|
322
275
|
* npm packages whose manifest declares
|
|
323
|
-
* `"dsh": { "bundle": { "patch": "./cordis.patch.yml" } }
|
|
324
|
-
* composed by applying each bundle's patch
|
|
325
|
-
* an empty entry list, then the
|
|
326
|
-
* layers (`--patch` files and
|
|
276
|
+
* `"dsh": { "bundle": { "patch": "./cordis.patch.yml" } }` (one file, or an
|
|
277
|
+
* ordered list of files); the tree is composed by applying each bundle's patch
|
|
278
|
+
* lists in `dsh.profile.bundles` order over an empty entry list, then the
|
|
279
|
+
* profile's own patches, then any launcher layers (`--patch` files and
|
|
280
|
+
* flag-derived patches).
|
|
327
281
|
*
|
|
328
282
|
* Module resolution is two-anchor by construction: a bundle name resolves
|
|
329
283
|
* first from the dsh installation (the launcher's own package), then from the
|
|
330
284
|
* profile directory. Pnpm-managed entries in the profile's `node_modules`
|
|
331
|
-
* resolve first.
|
|
332
|
-
* bundles
|
|
333
|
-
* dependency closure through Node's ordinary parent-walk. Plain Node uses
|
|
334
|
-
* symlinks for that shared fallback; packaged executables use ESM proxies so
|
|
335
|
-
* external plugins retain the installation's module instances.
|
|
285
|
+
* resolve first. The runtime resolution supplies packages carried by the
|
|
286
|
+
* installation and selected bundles to Node's ESM and CommonJS resolvers.
|
|
336
287
|
* @module @deepseek-ai/dsh-app-boot/profile
|
|
337
288
|
*/
|
|
338
289
|
/** Directory under the Harness home holding every profile. */
|
|
@@ -340,6 +291,28 @@ const PROFILES_DIR = "profiles";
|
|
|
340
291
|
/** The user patch layer inside a profile directory (hot-reloaded on long-lived surfaces). */
|
|
341
292
|
const PROFILE_PATCH_FILENAME = "cordis.patch.yml";
|
|
342
293
|
/**
|
|
294
|
+
* The patch files a bundle declares, as written: one file for a string
|
|
295
|
+
* `patch`, the listed files in order for an array.
|
|
296
|
+
* @param bundle - the bundle's `dsh.bundle` declaration, as read from package.json.
|
|
297
|
+
* @returns the package-relative patch file paths in application order.
|
|
298
|
+
* @throws {Error} when `patch` is neither a string nor a list of strings.
|
|
299
|
+
*/
|
|
300
|
+
function bundlePatchFiles(bundle) {
|
|
301
|
+
const declared = typeof bundle.patch === "string" ? [bundle.patch] : bundle.patch;
|
|
302
|
+
if (!Array.isArray(declared) || !declared.every((file) => typeof file === "string")) throw new Error("dsh.bundle.patch must be a file path or a list of file paths");
|
|
303
|
+
return declared;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Resolve a bundle declaration to its ordered absolute patch files.
|
|
307
|
+
* @param packageDir - absolute directory of the bundle package.
|
|
308
|
+
* @param bundle - the bundle's `dsh.bundle` declaration, as read from package.json.
|
|
309
|
+
* @returns the absolute patch file paths in application order.
|
|
310
|
+
* @throws {Error} when `patch` is neither a string nor a list of strings.
|
|
311
|
+
*/
|
|
312
|
+
function bundlePatchPaths(packageDir, bundle) {
|
|
313
|
+
return bundlePatchFiles(bundle).map((file) => join(packageDir, file));
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
343
316
|
* Resolve a profile's directory under the Harness home.
|
|
344
317
|
* @param name - the profile name (`dsh --profile <name>`).
|
|
345
318
|
* @param home - the Harness home; defaults to {@link resolveDshHome}.
|
|
@@ -372,7 +345,7 @@ const DEFAULT_PROFILE_BUNDLES = ["@deepseek-ai/dsh-base"];
|
|
|
372
345
|
* selected by no shipped template, and offered switched off by the plugin
|
|
373
346
|
* manager ([rationale](../../../../.agents/notes/implemented/process/2026-09-15-shipped-optional-bundles.md)).
|
|
374
347
|
*/
|
|
375
|
-
const OPTIONAL_BUNDLES = ["@deepseek-ai/dsh-experimental-
|
|
348
|
+
const OPTIONAL_BUNDLES = ["@deepseek-ai/dsh-experimental-voice-input-bundle", "@deepseek-ai/dsh-experimental-agent-team-profile"];
|
|
376
349
|
const PROFILE_PATCH_TEMPLATE = `# Your patch layer for this dsh profile, applied after every bundle layer:
|
|
377
350
|
# a top-level YAML array of loader patch entries (id-targeted config
|
|
378
351
|
# overrides, disables, and insert lists; \`!!js\` expressions allowed).
|
|
@@ -408,188 +381,108 @@ function initProfile(dir, bundles) {
|
|
|
408
381
|
const workspacePath = join(dir, "pnpm-workspace.yaml");
|
|
409
382
|
if (!existsSync(workspacePath)) writeFileSync(workspacePath, PROFILE_PNPM_WORKSPACE);
|
|
410
383
|
}
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
384
|
+
/** Directory where the link backend of the dsh 0.1.5 releases projected bundle-carried packages into a profile. */
|
|
385
|
+
const LINK_PROJECTION_DIR = ".dsh-module-fallback";
|
|
386
|
+
/**
|
|
387
|
+
* Remove the package projections a link-backend launch left in a profile.
|
|
388
|
+
* Only symlinks under the profile's `node_modules` whose target lies inside
|
|
389
|
+
* `<profile>/.dsh-module-fallback/node_modules` are unlinked, then that directory is removed;
|
|
390
|
+
* pnpm-installed packages and every other symlink stay. A profile without the directory is untouched.
|
|
391
|
+
* @param dir - the profile directory.
|
|
392
|
+
*/
|
|
393
|
+
function removeLinkProjections(dir) {
|
|
394
|
+
const owned = join(dir, LINK_PROJECTION_DIR);
|
|
395
|
+
if (!existsSync(owned)) return;
|
|
396
|
+
const ownedModules = join(owned, "node_modules");
|
|
397
|
+
for (const link of symlinksUnder(join(dir, "node_modules"))) if (pointsInto(link, ownedModules)) unlinkSync(link);
|
|
398
|
+
rmSync(owned, {
|
|
399
|
+
recursive: true,
|
|
400
|
+
force: true
|
|
401
|
+
});
|
|
417
402
|
}
|
|
418
|
-
/**
|
|
419
|
-
function
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
if (!stat.isSymbolicLink()) {
|
|
428
|
-
if ((stat.isDirectory() ? readModuleProxyRecord(link) : void 0)?.dsh?.moduleFallback?.targets === void 0) throw new Error(`dsh: ${link} exists and is not a symlink or dsh-managed module proxy; remove it so dsh can manage the installation fallback`);
|
|
429
|
-
rmSync(link, { recursive: true });
|
|
430
|
-
stat = void 0;
|
|
431
|
-
}
|
|
432
|
-
if (stat !== void 0) {
|
|
433
|
-
if (symlinkPointsTo(link, target)) return;
|
|
434
|
-
unlinkSync(link);
|
|
403
|
+
/** Top-level and scoped entries under a node_modules directory that are symlinks or junctions. */
|
|
404
|
+
function symlinksUnder(modules) {
|
|
405
|
+
const links = [];
|
|
406
|
+
if (!existsSync(modules)) return links;
|
|
407
|
+
for (const entry of readdirSync(modules, { withFileTypes: true })) {
|
|
408
|
+
const path = join(modules, entry.name);
|
|
409
|
+
if (entry.isSymbolicLink()) links.push(path);
|
|
410
|
+
else if (entry.name.startsWith("@") && entry.isDirectory()) {
|
|
411
|
+
for (const child of readdirSync(path, { withFileTypes: true })) if (child.isSymbolicLink()) links.push(join(path, child.name));
|
|
435
412
|
}
|
|
436
413
|
}
|
|
437
|
-
|
|
438
|
-
symlinkSync(target, link, "junction");
|
|
439
|
-
} catch (error) {
|
|
440
|
-
/* v8 ignore next 4 */
|
|
441
|
-
if (error.code !== "EEXIST" || !lstatSync(link).isSymbolicLink() || !symlinkPointsTo(link, target)) throw error;
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
/** Add one profile-owned fallback link without replacing a pnpm-managed entry. */
|
|
445
|
-
function ensureProfileSymlink(link, target) {
|
|
446
|
-
try {
|
|
447
|
-
lstatSync(link);
|
|
448
|
-
return;
|
|
449
|
-
} catch (error) {
|
|
450
|
-
/* v8 ignore next -- a non-ENOENT lstat failure requires a host filesystem fault */
|
|
451
|
-
if (error.code !== "ENOENT") throw error;
|
|
452
|
-
}
|
|
453
|
-
ensureSymlink(link, target);
|
|
454
|
-
}
|
|
455
|
-
/** Package names represented by owned symlinks below one fallback node_modules. */
|
|
456
|
-
function ownedPackageNames(modulesDir) {
|
|
457
|
-
return readdirSync(modulesDir, { withFileTypes: true }).flatMap((entry) => {
|
|
458
|
-
if (entry.name.startsWith("@") && entry.isDirectory()) return readdirSync(join(modulesDir, entry.name), { withFileTypes: true }).filter((child) => child.isSymbolicLink()).map((child) => `${entry.name}/${child.name}`);
|
|
459
|
-
return entry.isSymbolicLink() ? [entry.name] : [];
|
|
460
|
-
});
|
|
414
|
+
return links;
|
|
461
415
|
}
|
|
462
|
-
/**
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
}
|
|
416
|
+
/**
|
|
417
|
+
* Active profile `node_modules` entries linked outside the shared profiles tree and the active profile.
|
|
418
|
+
* Missing targets and files are not linked roots; invalid link chains retain Node's diagnostic.
|
|
419
|
+
*/
|
|
420
|
+
function linkedProfileRoots(profile, profilesDir) {
|
|
421
|
+
const modules = join(profile.dir, "node_modules");
|
|
422
|
+
const links = symlinksUnder(modules);
|
|
423
|
+
if (links.length === 0) return [];
|
|
424
|
+
let tree;
|
|
472
425
|
try {
|
|
473
|
-
|
|
426
|
+
tree = realModuleDirectory(profilesDir) + sep;
|
|
474
427
|
} catch (error) {
|
|
475
|
-
/* v8 ignore next -- concurrent identical cleanup may remove the link first */
|
|
476
428
|
if (error.code !== "ENOENT") throw error;
|
|
429
|
+
tree = resolve(profilesDir) + sep;
|
|
477
430
|
}
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
try {
|
|
483
|
-
candidates = resolve$1({
|
|
484
|
-
name: packageName,
|
|
485
|
-
exports: declared
|
|
486
|
-
}, subpath);
|
|
487
|
-
} catch (error) {
|
|
488
|
-
if (error.message.startsWith("No known conditions for ")) return void 0;
|
|
489
|
-
const specifier = subpath === "." ? packageName : packageName + subpath.slice(1);
|
|
490
|
-
throw new Error(`dsh: cannot resolve ESM export ${specifier} from installed package ${packageName}`, { cause: error });
|
|
491
|
-
}
|
|
492
|
-
for (const candidate of candidates ?? []) {
|
|
493
|
-
const target = candidate;
|
|
494
|
-
const entry = resolve(packageDir, target);
|
|
495
|
-
const relativeEntry = relative(packageDir, entry);
|
|
496
|
-
if (!target.startsWith("./") || /^\.\.(?:[\\/]|$)/u.test(relativeEntry)) throw new Error(`dsh: installed package ${packageName} export ${subpath} resolves outside its package: ${target}`);
|
|
497
|
-
if (existsSync(entry) && statSync(entry).isFile()) return pathToFileURL(entry).href;
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
/** Resolve every explicit ESM runtime export that an out-of-tree plugin can import. */
|
|
501
|
-
function packageProxySource(packageName, packageDir) {
|
|
502
|
-
const manifest = JSON.parse(readFileSync(join(packageDir, "package.json"), "utf8"));
|
|
503
|
-
if (typeof manifest.version !== "string" || manifest.version.length === 0) throw new Error(`dsh: installed package ${packageName} must declare a non-empty version`);
|
|
504
|
-
const declared = manifest.exports;
|
|
505
|
-
if (declared === void 0) {
|
|
506
|
-
const main = typeof manifest.main === "string" && manifest.main.length > 0 ? manifest.main : void 0;
|
|
507
|
-
const entry = join(packageDir, main ?? "index");
|
|
431
|
+
const excludedTrees = [tree, realModuleDirectory(profile.dir) + sep];
|
|
432
|
+
const roots = [];
|
|
433
|
+
for (const linkPath of links) {
|
|
434
|
+
let realPath;
|
|
508
435
|
try {
|
|
509
|
-
|
|
510
|
-
return {
|
|
511
|
-
version: manifest.version,
|
|
512
|
-
targets: { ".": pathToFileURL(resolved).href }
|
|
513
|
-
};
|
|
436
|
+
realPath = realModuleDirectory(linkPath);
|
|
514
437
|
} catch (error) {
|
|
515
|
-
if (
|
|
516
|
-
|
|
517
|
-
targets: {}
|
|
518
|
-
};
|
|
519
|
-
throw new Error(`dsh: installed package ${packageName} main entry is missing at ${entry}`, { cause: error });
|
|
438
|
+
if (error.code !== "ENOENT") throw error;
|
|
439
|
+
continue;
|
|
520
440
|
}
|
|
441
|
+
if (excludedTrees.some((prefix) => realPath + sep === prefix || realPath.startsWith(prefix)) || !statSync(realPath).isDirectory()) continue;
|
|
442
|
+
roots.push({
|
|
443
|
+
name: relative(modules, linkPath).split(sep).join("/"),
|
|
444
|
+
realPath
|
|
445
|
+
});
|
|
521
446
|
}
|
|
522
|
-
|
|
523
|
-
const targets = {};
|
|
524
|
-
for (const subpath of subpaths) {
|
|
525
|
-
const target = packageEntryFromPackage(packageName, packageDir, declared, subpath);
|
|
526
|
-
if (target !== void 0) targets[subpath] = target;
|
|
527
|
-
}
|
|
528
|
-
return {
|
|
529
|
-
version: manifest.version,
|
|
530
|
-
targets
|
|
531
|
-
};
|
|
447
|
+
return roots.sort((left, right) => left.name.localeCompare(right.name));
|
|
532
448
|
}
|
|
533
|
-
/**
|
|
534
|
-
|
|
535
|
-
* URL. Files outside the executable cannot traverse a symlink into
|
|
536
|
-
* `/snapshot`, while an ESM re-export can import that URL and preserves the
|
|
537
|
-
* executable's single module instance for out-of-tree plugin peers.
|
|
538
|
-
*/
|
|
539
|
-
function ensureModuleProxy(link, packageName, version, targets) {
|
|
540
|
-
const manifest = {
|
|
541
|
-
name: packageName,
|
|
542
|
-
version,
|
|
543
|
-
private: true,
|
|
544
|
-
type: "module",
|
|
545
|
-
exports: Object.fromEntries(Object.keys(targets).map((subpath, index) => [subpath, `./entry-${index}.js`])),
|
|
546
|
-
dsh: { moduleFallback: { targets } }
|
|
547
|
-
};
|
|
548
|
-
let stat;
|
|
449
|
+
/** Whether a symlink's target directory is `root` or lies below it. */
|
|
450
|
+
function pointsInto(link, root) {
|
|
549
451
|
try {
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
const existing = readModuleProxyRecord(link);
|
|
560
|
-
if (existing?.dsh?.moduleFallback?.targets === void 0) throw new Error(`dsh: ${link} exists and is not a dsh-managed module proxy; remove it so dsh can manage the installation fallback`);
|
|
561
|
-
if (existing.version === version && JSON.stringify(existing.dsh.moduleFallback.targets) === JSON.stringify(targets) && Object.keys(targets).every((_, index) => existsSync(join(link, `entry-${index}.js`)))) return;
|
|
562
|
-
rmSync(link, { recursive: true });
|
|
563
|
-
}
|
|
564
|
-
mkdirSync(link, { recursive: true });
|
|
565
|
-
writeFileSync(join(link, "package.json"), JSON.stringify(manifest, void 0, 2) + "\n");
|
|
566
|
-
for (const [index, target] of Object.values(targets).entries()) {
|
|
567
|
-
const specifier = JSON.stringify(target);
|
|
568
|
-
writeFileSync(join(link, `entry-${index}.js`), `export * from ${specifier}\nimport * as target from ${specifier}\nexport default target.default\n`);
|
|
452
|
+
const target = resolve(dirname(link), readlinkSync(link));
|
|
453
|
+
const parent = realpathSync.native(dirname(target));
|
|
454
|
+
const rootPath = realpathSync.native(root);
|
|
455
|
+
return parent === rootPath || parent.startsWith(rootPath + sep);
|
|
456
|
+
} catch (error) {
|
|
457
|
+
/* v8 ignore next 2 -- a non-ENOENT realpath failure requires a host filesystem fault */
|
|
458
|
+
if (error.code === "ENOENT") return false;
|
|
459
|
+
/* v8 ignore next -- see the host-filesystem exception above */
|
|
460
|
+
throw error;
|
|
569
461
|
}
|
|
570
462
|
}
|
|
571
|
-
/** Read one package manifest
|
|
572
|
-
function
|
|
463
|
+
/** Read one package manifest while traversing a dependency graph. */
|
|
464
|
+
function readPackageManifest(anchor) {
|
|
573
465
|
return JSON.parse(readFileSync(anchor, "utf8"));
|
|
574
466
|
}
|
|
575
467
|
/** Return dependency names that may be imported by a loader-visible plugin. */
|
|
576
468
|
function profileDependencyNames(manifest) {
|
|
577
469
|
return [...Object.keys(manifest.dependencies ?? {}), ...Object.keys(manifest.peerDependencies ?? {})];
|
|
578
470
|
}
|
|
579
|
-
/** Resolve the installation
|
|
580
|
-
function
|
|
581
|
-
const
|
|
471
|
+
/** Resolve the installation packages that the runtime resolver supplies to every profile. */
|
|
472
|
+
function collectInstallationScopePackages(installAnchor, skippedBundles) {
|
|
473
|
+
const canonicalAnchor = join(realModuleDirectory(dirname(installAnchor)), basename(installAnchor));
|
|
474
|
+
const appManifest = readPackageManifest(canonicalAnchor);
|
|
582
475
|
const links = /* @__PURE__ */ new Map();
|
|
583
476
|
const declarers = /* @__PURE__ */ new Map();
|
|
584
477
|
const versions = /* @__PURE__ */ new Map();
|
|
585
478
|
/* v8 ignore next -- a real app manifest always declares its name */
|
|
586
479
|
if (appManifest.name !== void 0) {
|
|
587
480
|
links.set(appManifest.name, dirname(installAnchor));
|
|
588
|
-
declarers.set(appManifest.name,
|
|
481
|
+
declarers.set(appManifest.name, canonicalAnchor);
|
|
589
482
|
versions.set(appManifest.name, appManifest.version);
|
|
590
483
|
}
|
|
591
484
|
const queue = [{
|
|
592
|
-
anchor:
|
|
485
|
+
anchor: canonicalAnchor,
|
|
593
486
|
manifest: appManifest
|
|
594
487
|
}];
|
|
595
488
|
for (let next = queue.shift(); next !== void 0; next = queue.shift())
|
|
@@ -598,10 +491,16 @@ function resolveModuleFallbackEntries(installAnchor, materialize = true) {
|
|
|
598
491
|
if (links.has(dep)) continue;
|
|
599
492
|
const dir = packageDirFromAnchor(next.anchor, dep);
|
|
600
493
|
if (dir === void 0) continue;
|
|
494
|
+
const manifestPath = join(realModuleDirectory(dir), "package.json");
|
|
495
|
+
let manifest;
|
|
496
|
+
try {
|
|
497
|
+
manifest = skippedBundles.has(dep) ? readProfileManifest("dsh", dir) : readPackageManifest(manifestPath);
|
|
498
|
+
} catch (error) {
|
|
499
|
+
if (!skippedBundles.has(dep)) throw error;
|
|
500
|
+
continue;
|
|
501
|
+
}
|
|
601
502
|
links.set(dep, dir);
|
|
602
503
|
declarers.set(dep, next.anchor);
|
|
603
|
-
const manifestPath = join(dir, "package.json");
|
|
604
|
-
const manifest = readModuleFallbackManifest(manifestPath);
|
|
605
504
|
versions.set(dep, manifest.version);
|
|
606
505
|
queue.push({
|
|
607
506
|
anchor: manifestPath,
|
|
@@ -609,72 +508,32 @@ function resolveModuleFallbackEntries(installAnchor, materialize = true) {
|
|
|
609
508
|
});
|
|
610
509
|
}
|
|
611
510
|
return {
|
|
612
|
-
entries: !materialize ? [] : !isPackagedExecutable() ? [...links].map(([packageName, packageDir]) => ({
|
|
613
|
-
kind: "symlink",
|
|
614
|
-
packageName,
|
|
615
|
-
packageDir
|
|
616
|
-
})) : [...links].flatMap(([packageName, packageDir]) => {
|
|
617
|
-
const source = packageProxySource(packageName, packageDir);
|
|
618
|
-
return Object.keys(source.targets).length === 0 ? [] : [{
|
|
619
|
-
kind: "proxy",
|
|
620
|
-
packageName,
|
|
621
|
-
version: source.version,
|
|
622
|
-
targets: source.targets
|
|
623
|
-
}];
|
|
624
|
-
}),
|
|
625
511
|
packageNames: new Set(links.keys()),
|
|
626
512
|
packageDirs: links,
|
|
627
513
|
declarers,
|
|
628
514
|
versions
|
|
629
515
|
};
|
|
630
516
|
}
|
|
631
|
-
/** Return whether one existing fallback entry already matches its resolved installation generation. */
|
|
632
|
-
function moduleFallbackEntryCurrent(modulesDir, entry) {
|
|
633
|
-
const link = join(modulesDir, entry.packageName);
|
|
634
|
-
try {
|
|
635
|
-
const stat = lstatSync(link);
|
|
636
|
-
if (entry.kind === "symlink") return stat.isSymbolicLink() && readlinkSync(link) === entry.packageDir;
|
|
637
|
-
if (!stat.isDirectory()) return false;
|
|
638
|
-
const existing = readModuleProxyRecord(link);
|
|
639
|
-
return existing?.version === entry.version && JSON.stringify(existing.dsh?.moduleFallback?.targets) === JSON.stringify(entry.targets) && Object.keys(entry.targets).every((_, index) => existsSync(join(link, `entry-${index}.js`)));
|
|
640
|
-
} catch {
|
|
641
|
-
return false;
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
/** Return whether every required fallback entry is already ready for this installation. */
|
|
645
|
-
function moduleFallbackCurrent(modulesDir, entries) {
|
|
646
|
-
return entries.every((entry) => moduleFallbackEntryCurrent(modulesDir, entry));
|
|
647
|
-
}
|
|
648
517
|
/**
|
|
649
|
-
*
|
|
650
|
-
* `$DSH_HOME/profiles/node_modules` mirrors the dsh installation dependency
|
|
651
|
-
* closure. Plain Node writes symlinks; a packaged executable writes ESM
|
|
652
|
-
* proxies under a cross-process lock because operating-system links cannot
|
|
653
|
-
* enter pkg's virtual filesystem. Missing packages carried only by selected
|
|
654
|
-
* bundles are linked through a profile-owned directory into that profile's
|
|
655
|
-
* `node_modules`; pnpm-managed entries remain authoritative, and another
|
|
656
|
-
* profile's links cannot change its resolution.
|
|
518
|
+
* Compute the runtime resolution without writing module-resolution files.
|
|
657
519
|
* @param options - installation anchor, optional loaded profile, and Harness home.
|
|
658
|
-
* @returns the
|
|
520
|
+
* @returns the complete immutable runtime resolution.
|
|
659
521
|
*/
|
|
660
|
-
async function
|
|
661
|
-
const { installAnchor, profile, home = resolveDshHome()
|
|
522
|
+
async function createRuntimeResolution(options) {
|
|
523
|
+
const { installAnchor, profile, home = resolveDshHome() } = options;
|
|
662
524
|
const profilesDir = join(home, PROFILES_DIR);
|
|
663
|
-
const
|
|
664
|
-
|
|
665
|
-
const { entries, packageNames, packageDirs, declarers, versions } = resolveModuleFallbackEntries(installAnchor, materialize);
|
|
666
|
-
if (materialize && !moduleFallbackCurrent(modulesDir, entries)) await withFileLock(modulesDir, () => {
|
|
667
|
-
if (!moduleFallbackCurrent(modulesDir, entries)) healProfilesModuleFallbackLocked(entries, modulesDir);
|
|
668
|
-
return Promise.resolve();
|
|
669
|
-
});
|
|
525
|
+
const manifest = readOptionalProfileManifest(profile);
|
|
526
|
+
const { packageNames, packageDirs, declarers, versions } = collectInstallationScopePackages(installAnchor, skippedProfileBundles(profile, manifest));
|
|
670
527
|
const profileDeclarers = /* @__PURE__ */ new Map();
|
|
671
528
|
const profileVersions = /* @__PURE__ */ new Map();
|
|
672
|
-
const localPackageNames = profile === void 0 ? [] : installedProfilePackageNames(profile);
|
|
673
|
-
const profilePackages = profile === void 0 ? /* @__PURE__ */ new Map() :
|
|
674
|
-
|
|
529
|
+
const localPackageNames = profile === void 0 ? [] : installedProfilePackageNames(profile, manifest);
|
|
530
|
+
const profilePackages = profile === void 0 ? /* @__PURE__ */ new Map() : collectProfileScopePackages(profile, packageNames, profileDeclarers, profileVersions);
|
|
531
|
+
const linkedRoots = profile === void 0 ? [] : linkedProfileRoots(profile, profilesDir);
|
|
532
|
+
return await Promise.resolve(Object.freeze({
|
|
675
533
|
profilesDir,
|
|
676
534
|
profileDir: profile?.dir,
|
|
677
535
|
localPackageNames: Object.freeze(localPackageNames),
|
|
536
|
+
linkedRoots: Object.freeze(linkedRoots.map((root) => Object.freeze(root))),
|
|
678
537
|
entries: Object.freeze([...[...packageDirs].map(([name, packageDir]) => Object.freeze({
|
|
679
538
|
name,
|
|
680
539
|
packageDir,
|
|
@@ -688,69 +547,41 @@ async function healProfilesModuleFallback(options) {
|
|
|
688
547
|
declarer: profileDeclarers.get(name),
|
|
689
548
|
scope: "profile"
|
|
690
549
|
}))])
|
|
691
|
-
});
|
|
550
|
+
}));
|
|
692
551
|
}
|
|
693
|
-
/**
|
|
694
|
-
function
|
|
695
|
-
|
|
552
|
+
/** Synthetic profiles used by direct callers may have no on-disk manifest. */
|
|
553
|
+
function readOptionalProfileManifest(profile) {
|
|
554
|
+
if (profile === void 0) return void 0;
|
|
696
555
|
try {
|
|
697
|
-
|
|
556
|
+
return readPackageManifest(join(profile.dir, "package.json"));
|
|
698
557
|
} catch (error) {
|
|
699
|
-
if (error.code === "ENOENT") return
|
|
558
|
+
if (error.code === "ENOENT") return void 0;
|
|
700
559
|
throw error;
|
|
701
560
|
}
|
|
702
|
-
return profileDependencyNames(manifest).filter((name) => {
|
|
703
|
-
if (!existsSync(join(join(profile.dir, "node_modules", name), "package.json"))) return false;
|
|
704
|
-
return !isProfileModuleFallbackLink(profile.dir, name);
|
|
705
|
-
});
|
|
706
|
-
}
|
|
707
|
-
/**
|
|
708
|
-
* Compute a profile resolution generation without materializing links or proxies.
|
|
709
|
-
* @param options - installation anchor, profile, and optional Harness home.
|
|
710
|
-
* @returns the complete immutable generation.
|
|
711
|
-
*/
|
|
712
|
-
function createProfileResolutionGeneration(options) {
|
|
713
|
-
return healProfilesModuleFallback({
|
|
714
|
-
...options,
|
|
715
|
-
materialize: false
|
|
716
|
-
});
|
|
717
|
-
}
|
|
718
|
-
/**
|
|
719
|
-
* Supply an application-owned profile with filesystem packages from its installation and selected bundles.
|
|
720
|
-
* All fallback links belong to the profile; no shared Harness-home directory is written.
|
|
721
|
-
* Existing pnpm-managed packages remain authoritative. The caller serializes profile mutations.
|
|
722
|
-
* @param options - owning installation package.json and the loaded application profile.
|
|
723
|
-
*/
|
|
724
|
-
function healIsolatedProfileModuleFallback(options) {
|
|
725
|
-
const installationLinks = resolveModuleFallbackEntries(options.installAnchor, false).packageDirs;
|
|
726
|
-
healProfileModuleFallback(options.profile, new Set(installationLinks.keys()), true, void 0, void 0, installationLinks);
|
|
727
561
|
}
|
|
728
562
|
/**
|
|
729
|
-
*
|
|
730
|
-
*
|
|
731
|
-
* @param
|
|
563
|
+
* Identify selected bundles that did not produce a loaded layer.
|
|
564
|
+
* @param profile - loaded profile, when present.
|
|
565
|
+
* @param manifest - its parsed manifest, when present.
|
|
566
|
+
* @returns selected bundle names missing from the loaded layers, for resolution and diagnostics.
|
|
732
567
|
*/
|
|
733
|
-
function
|
|
734
|
-
const
|
|
735
|
-
|
|
736
|
-
|
|
568
|
+
function skippedProfileBundles(profile, manifest) {
|
|
569
|
+
const selected = manifest?.dsh?.profile?.bundles ?? [];
|
|
570
|
+
const loaded = new Set(profile?.layers.map((layer) => layer.packageName));
|
|
571
|
+
return new Set(selected.filter((name) => !loaded.has(name)));
|
|
737
572
|
}
|
|
738
|
-
/**
|
|
739
|
-
function
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
mkdirSync(dirname(link), { recursive: true });
|
|
743
|
-
if (entry.kind === "proxy") ensureModuleProxy(link, entry.packageName, entry.version, entry.targets);
|
|
744
|
-
else ensureSymlink(link, entry.packageDir);
|
|
745
|
-
}
|
|
573
|
+
/** Return installed direct dependencies that Node resolves before profile fallback. */
|
|
574
|
+
function installedProfilePackageNames(profile, manifest) {
|
|
575
|
+
if (manifest === void 0) return [];
|
|
576
|
+
return profileDependencyNames(manifest).filter((name) => existsSync(join(profile.dir, "node_modules", name, "package.json")));
|
|
746
577
|
}
|
|
747
578
|
/** Collect the first resolvable package directory for each dependency name. */
|
|
748
|
-
function dependencyClosure(anchors, reserved,
|
|
579
|
+
function dependencyClosure(anchors, reserved, declarers, versions) {
|
|
749
580
|
const links = /* @__PURE__ */ new Map();
|
|
750
581
|
const visited = new Set(reserved);
|
|
751
582
|
for (const anchor of anchors) {
|
|
752
583
|
const canonicalAnchor = join(realModuleDirectory(dirname(anchor)), basename(anchor));
|
|
753
|
-
const manifest =
|
|
584
|
+
const manifest = readPackageManifest(canonicalAnchor);
|
|
754
585
|
/* v8 ignore next -- an installable package manifest always declares its name */
|
|
755
586
|
if (manifest.name === void 0) continue;
|
|
756
587
|
if (!visited.has(manifest.name)) {
|
|
@@ -767,13 +598,13 @@ function dependencyClosure(anchors, reserved, exclude, declarers, versions) {
|
|
|
767
598
|
/* v8 ignore next -- an installable package manifest always declares dependencies or peers */
|
|
768
599
|
for (const dep of profileDependencyNames(next.manifest)) {
|
|
769
600
|
if (visited.has(dep)) continue;
|
|
770
|
-
const dir = packageDirFromAnchor(next.anchor, dep
|
|
601
|
+
const dir = packageDirFromAnchor(next.anchor, dep);
|
|
771
602
|
if (dir === void 0) continue;
|
|
772
603
|
visited.add(dep);
|
|
773
604
|
links.set(dep, dir);
|
|
774
605
|
declarers?.set(dep, next.anchor);
|
|
775
|
-
const manifestPath = join(dir, "package.json");
|
|
776
|
-
const dependencyManifest =
|
|
606
|
+
const manifestPath = join(realModuleDirectory(dir), "package.json");
|
|
607
|
+
const dependencyManifest = readPackageManifest(manifestPath);
|
|
777
608
|
versions?.set(dep, dependencyManifest.version);
|
|
778
609
|
queue.push({
|
|
779
610
|
anchor: manifestPath,
|
|
@@ -783,39 +614,11 @@ function dependencyClosure(anchors, reserved, exclude, declarers, versions) {
|
|
|
783
614
|
}
|
|
784
615
|
return links;
|
|
785
616
|
}
|
|
786
|
-
/**
|
|
787
|
-
function
|
|
788
|
-
const
|
|
789
|
-
const ownedModulesDir = join(profile.dir, PROFILE_MODULE_FALLBACK_DIR, "node_modules");
|
|
790
|
-
if (materialize) {
|
|
791
|
-
mkdirSync(profileModulesDir, { recursive: true });
|
|
792
|
-
mkdirSync(ownedModulesDir, { recursive: true });
|
|
793
|
-
}
|
|
794
|
-
const bundleLinks = dependencyClosure(profile.layers.filter((layer) => !installationPackageNames.has(layer.packageName)).map((layer) => join(layer.packageDir, "package.json")), installationPackageNames, (candidate, packageName) => {
|
|
795
|
-
const profileLink = join(profileModulesDir, packageName);
|
|
796
|
-
if (canonicalLinkPath(candidate) !== canonicalLinkPath(profileLink)) return false;
|
|
797
|
-
try {
|
|
798
|
-
return lstatSync(profileLink).isSymbolicLink() && symlinkPointsTo(profileLink, join(ownedModulesDir, packageName));
|
|
799
|
-
} catch (error) {
|
|
800
|
-
/* v8 ignore next 2 -- a non-ENOENT lstat failure requires a host filesystem fault */
|
|
801
|
-
if (error.code === "ENOENT") return true;
|
|
802
|
-
/* v8 ignore next -- see the host-filesystem exception above */
|
|
803
|
-
throw error;
|
|
804
|
-
}
|
|
805
|
-
}, declarers, versions);
|
|
617
|
+
/** Collect packages carried by the profile's selected bundles that the installation does not supply. */
|
|
618
|
+
function collectProfileScopePackages(profile, installationPackageNames, declarers, versions) {
|
|
619
|
+
const bundleLinks = dependencyClosure(profile.layers.filter((layer) => !installationPackageNames.has(layer.packageName)).map((layer) => join(layer.packageDir, "package.json")), installationPackageNames, declarers, versions);
|
|
806
620
|
for (const layer of profile.layers) bundleLinks.delete(layer.packageName);
|
|
807
|
-
|
|
808
|
-
if (!materialize) return links;
|
|
809
|
-
for (const packageName of ownedPackageNames(ownedModulesDir)) if (!links.has(packageName)) removeProfileSymlink(profileModulesDir, ownedModulesDir, packageName);
|
|
810
|
-
for (const [packageName, target] of links) {
|
|
811
|
-
const ownedLink = join(ownedModulesDir, packageName);
|
|
812
|
-
mkdirSync(dirname(ownedLink), { recursive: true });
|
|
813
|
-
ensureSymlink(ownedLink, target);
|
|
814
|
-
const profileLink = join(profileModulesDir, packageName);
|
|
815
|
-
mkdirSync(dirname(profileLink), { recursive: true });
|
|
816
|
-
ensureProfileSymlink(profileLink, ownedLink);
|
|
817
|
-
}
|
|
818
|
-
return links;
|
|
621
|
+
return bundleLinks;
|
|
819
622
|
}
|
|
820
623
|
/**
|
|
821
624
|
* Read a profile's manifest.
|
|
@@ -878,11 +681,11 @@ function normalizeShippedProfile(name, dir, manifest) {
|
|
|
878
681
|
* matches what the Loader would import from the same anchor, and
|
|
879
682
|
* `existsSync` follows the symlinks pnpm's isolated layout uses.
|
|
880
683
|
*/
|
|
881
|
-
function packageDirFromAnchor(anchor, packageName
|
|
684
|
+
function packageDirFromAnchor(anchor, packageName) {
|
|
882
685
|
/* v8 ignore next */
|
|
883
686
|
for (const searchPath of createRequire(anchor).resolve.paths(packageName) ?? []) {
|
|
884
687
|
const candidate = join(searchPath, packageName);
|
|
885
|
-
if (existsSync(join(candidate, "package.json"))
|
|
688
|
+
if (existsSync(join(candidate, "package.json"))) return candidate;
|
|
886
689
|
}
|
|
887
690
|
}
|
|
888
691
|
/**
|
|
@@ -908,25 +711,31 @@ function resolveBundleDir(binName, packageName, installAnchor, profileDir) {
|
|
|
908
711
|
* Load an already initialized profile directory without resolving it through
|
|
909
712
|
* the shared Harness home. This is used by application-owned profiles whose
|
|
910
713
|
* package project and lifecycle belong to that application.
|
|
714
|
+
* Unreadable bundles are reported on stderr and skipped without changing the manifest.
|
|
911
715
|
* @param binName - the diagnostic prefix on thrown errors.
|
|
912
716
|
* @param dir - absolute profile package directory.
|
|
913
717
|
* @param installAnchor - absolute path of the owning dsh app's package.json.
|
|
914
718
|
* @param options - `userLayer: false` skips reading `cordis.patch.yml`.
|
|
915
|
-
* @returns the
|
|
719
|
+
* @returns the successfully loaded bundle layers and optional user patch layer.
|
|
916
720
|
*/
|
|
917
721
|
function loadProfileDirectory(binName, dir, installAnchor, options = {}) {
|
|
918
|
-
const
|
|
722
|
+
const bundles = readProfileManifest(binName, dir).dsh?.profile?.bundles ?? [];
|
|
723
|
+
const layers = [];
|
|
724
|
+
for (const packageName of bundles) try {
|
|
919
725
|
const packageDir = resolveBundleDir(binName, packageName, installAnchor, dir);
|
|
920
|
-
const
|
|
921
|
-
if (
|
|
922
|
-
const
|
|
923
|
-
|
|
726
|
+
const bundle = readProfileManifest(binName, packageDir).dsh?.bundle;
|
|
727
|
+
if (bundle === void 0) throw new Error(`${binName}: profile bundle ${JSON.stringify(packageName)} declares no dsh.bundle in its package.json`);
|
|
728
|
+
const patchPaths = bundlePatchPaths(packageDir, bundle);
|
|
729
|
+
const patches = patchPaths.flatMap((patchPath) => loadOverlayPatches(binName, patchPath));
|
|
730
|
+
layers.push({
|
|
924
731
|
packageName,
|
|
925
732
|
packageDir,
|
|
926
|
-
|
|
927
|
-
patches
|
|
928
|
-
};
|
|
929
|
-
})
|
|
733
|
+
patchPaths,
|
|
734
|
+
patches
|
|
735
|
+
});
|
|
736
|
+
} catch (error) {
|
|
737
|
+
process.stderr.write(`${binName}: skipping profile bundle ${JSON.stringify(packageName)}: ${String(error)}\n`);
|
|
738
|
+
}
|
|
930
739
|
const patchPath = join(dir, PROFILE_PATCH_FILENAME);
|
|
931
740
|
const patches = options.userLayer !== false && existsSync(patchPath) ? loadOverlayPatches(binName, patchPath) : [];
|
|
932
741
|
return {
|
|
@@ -939,9 +748,8 @@ function loadProfileDirectory(binName, dir, installAnchor, options = {}) {
|
|
|
939
748
|
}
|
|
940
749
|
/**
|
|
941
750
|
* Load a profile: resolve every `dsh.profile.bundles` entry to its patch
|
|
942
|
-
* layer and parse the profile's own patch file.
|
|
943
|
-
*
|
|
944
|
-
* is a misconfiguration, not "no patches".
|
|
751
|
+
* layer and parse the profile's own patch file. Unreadable bundles are reported
|
|
752
|
+
* on stderr and skipped; profile manifest and user patch errors still throw.
|
|
945
753
|
* @param binName - the diagnostic prefix on thrown errors.
|
|
946
754
|
* @param name - the profile name.
|
|
947
755
|
* @param installAnchor - absolute path of the dsh app's package.json (first resolution anchor).
|
|
@@ -958,6 +766,7 @@ function loadProfile(binName, name, installAnchor, home = resolveDshHome(), opti
|
|
|
958
766
|
if (template === void 0) throw new Error(`${binName}: profile ${JSON.stringify(name)} does not exist; create it with 'dsh plugin --profile ${name} add <package>'`);
|
|
959
767
|
initProfile(dir, template.bundles);
|
|
960
768
|
}
|
|
769
|
+
removeLinkProjections(dir);
|
|
961
770
|
normalizeShippedProfile(name, dir, readProfileManifest(binName, dir));
|
|
962
771
|
return loadProfileDirectory(binName, dir, installAnchor, options);
|
|
963
772
|
}
|
|
@@ -1165,27 +974,68 @@ function prefixes(path) {
|
|
|
1165
974
|
const canonical = canonicalPath(path) + sep;
|
|
1166
975
|
return canonical === configured ? [configured] : [configured, canonical];
|
|
1167
976
|
}
|
|
1168
|
-
function
|
|
1169
|
-
const profilePaths = prefixes(generation.profilesDir);
|
|
1170
|
-
const profile = generation.profileDir === void 0 ? [] : prefixes(generation.profileDir);
|
|
977
|
+
function compileResolution(resolution) {
|
|
1171
978
|
return {
|
|
1172
|
-
entries: new Map(
|
|
1173
|
-
profilesDir:
|
|
1174
|
-
profileDir:
|
|
1175
|
-
profilePaths,
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
localPackageNames: new Set(
|
|
1180
|
-
shared: new Set(profilePaths.map((prefix) => join(prefix, "node_modules"))),
|
|
979
|
+
entries: new Map(resolution.entries.map((entry) => [entry.name, entry])),
|
|
980
|
+
profilesDir: resolution.profilesDir,
|
|
981
|
+
profileDir: resolution.profileDir,
|
|
982
|
+
profilePaths: prefixes(resolution.profilesDir),
|
|
983
|
+
profile: resolution.profileDir === void 0 ? [] : prefixes(resolution.profileDir),
|
|
984
|
+
installationPaths: [...new Set(resolution.entries.filter((entry) => entry.scope === "installation").flatMap((entry) => prefixes(entry.packageDir)))],
|
|
985
|
+
linkedPaths: resolution.linkedRoots.flatMap((root) => prefixes(root.realPath)),
|
|
986
|
+
localPackageNames: new Set(resolution.localPackageNames),
|
|
1181
987
|
esmRoutes: /* @__PURE__ */ new Map(),
|
|
1182
988
|
cjsRoutes: /* @__PURE__ */ new Map()
|
|
1183
989
|
};
|
|
1184
990
|
}
|
|
991
|
+
/**
|
|
992
|
+
* The interception layer of a profile is `<profileParent>/node_modules`: an entry occupies its name there, so its
|
|
993
|
+
* subpath misses continue above it, and a name without an entry continues at it.
|
|
994
|
+
*/
|
|
995
|
+
function computeProfileLayer(dir, active) {
|
|
996
|
+
const profileParent = dirname(dir);
|
|
997
|
+
return {
|
|
998
|
+
kind: "profile",
|
|
999
|
+
active,
|
|
1000
|
+
localPrefix: dir + sep,
|
|
1001
|
+
nativeAfter: join(profileParent, "package.json"),
|
|
1002
|
+
after: join(dirname(profileParent), "package.json")
|
|
1003
|
+
};
|
|
1004
|
+
}
|
|
1005
|
+
/** The interception layer of a module path: from its profile directory inside a profiles tree, or its linked root. */
|
|
1006
|
+
function findInterceptionLayer(path, resolution) {
|
|
1007
|
+
const treeRoot = resolution.profilePaths.find((prefix) => path.startsWith(prefix));
|
|
1008
|
+
const activeProfile = resolution.profile.find((prefix) => path.startsWith(prefix));
|
|
1009
|
+
const dir = treeRoot !== void 0 ? profileChild(path, treeRoot) : activeProfile?.slice(0, -1);
|
|
1010
|
+
if (dir !== void 0) return computeProfileLayer(dir, activeProfile !== void 0);
|
|
1011
|
+
if (!startsWithin(path, resolution.linkedPaths)) return void 0;
|
|
1012
|
+
if (startsWithin(path, resolution.installationPaths)) return void 0;
|
|
1013
|
+
return { kind: "linked" };
|
|
1014
|
+
}
|
|
1015
|
+
/** Package names a directory's current manifest lists as peers; an unreadable manifest lists none. */
|
|
1016
|
+
function readPeerNames(directory) {
|
|
1017
|
+
try {
|
|
1018
|
+
const peers = JSON.parse(readFileSync(join(directory, "package.json"), "utf8")).peerDependencies;
|
|
1019
|
+
return new Set(peers !== null && typeof peers === "object" ? Object.keys(peers) : []);
|
|
1020
|
+
} catch (_error) {
|
|
1021
|
+
return /* @__PURE__ */ new Set();
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1185
1024
|
function startsWithin(path, roots) {
|
|
1186
1025
|
for (const root of roots) if (path.startsWith(root)) return true;
|
|
1187
1026
|
return false;
|
|
1188
1027
|
}
|
|
1028
|
+
/**
|
|
1029
|
+
* The profile directory owning a module inside the profiles tree: the first path segment below the tree root.
|
|
1030
|
+
* @param path - module path below `treePrefix`.
|
|
1031
|
+
* @param treePrefix - profiles directory with a trailing separator.
|
|
1032
|
+
* @returns the profile directory without a trailing separator.
|
|
1033
|
+
*/
|
|
1034
|
+
function profileChild(path, treePrefix) {
|
|
1035
|
+
const rest = path.slice(treePrefix.length);
|
|
1036
|
+
const end = rest.indexOf(sep);
|
|
1037
|
+
return treePrefix + (end < 0 ? rest : rest.slice(0, end));
|
|
1038
|
+
}
|
|
1189
1039
|
function nativePackageDir(parent, name) {
|
|
1190
1040
|
for (const searchPath of createRequire(parent).resolve.paths(name)) {
|
|
1191
1041
|
const candidate = join(searchPath, name);
|
|
@@ -1199,10 +1049,7 @@ function localPackageCandidate(searchPath, name, flavor) {
|
|
|
1199
1049
|
".js",
|
|
1200
1050
|
".json",
|
|
1201
1051
|
".node"
|
|
1202
|
-
].some((extension) => existsSync(candidate + extension))) ?
|
|
1203
|
-
packageDir: candidate,
|
|
1204
|
-
canBeManagedLink: stat !== void 0
|
|
1205
|
-
} : void 0;
|
|
1052
|
+
].some((extension) => existsSync(candidate + extension))) ? candidate : void 0;
|
|
1206
1053
|
}
|
|
1207
1054
|
function selfReferenceName(parent) {
|
|
1208
1055
|
let current = dirname(parent);
|
|
@@ -1259,7 +1106,7 @@ function packageImportsTarget(parent, request, conditions) {
|
|
|
1259
1106
|
}
|
|
1260
1107
|
function packageSearchPaths(entry, request, cjs) {
|
|
1261
1108
|
const name = barePackageName(request);
|
|
1262
|
-
/* v8 ignore next --
|
|
1109
|
+
/* v8 ignore next -- interception routes are created only for bare package requests */
|
|
1263
1110
|
if (name === void 0) return cjs._nodeModulePaths(dirname(entry.declarer));
|
|
1264
1111
|
const suffix = sep + name.split("/").join(sep);
|
|
1265
1112
|
return entry.packageDir.endsWith(suffix) ? [entry.packageDir.slice(0, -suffix.length)] : cjs._nodeModulePaths(dirname(entry.declarer));
|
|
@@ -1290,62 +1137,100 @@ function isUnselectedPackageMiss(error) {
|
|
|
1290
1137
|
}
|
|
1291
1138
|
function sameResolution(left, right) {
|
|
1292
1139
|
if (left === right) return true;
|
|
1293
|
-
|
|
1294
|
-
const rightPath = right.startsWith("file:") ? fileURLToPath(right) : right;
|
|
1295
|
-
return canonicalPath(leftPath) === canonicalPath(rightPath);
|
|
1140
|
+
return canonicalPath(left) === canonicalPath(right);
|
|
1296
1141
|
}
|
|
1297
|
-
/** One mutable pointer to immutable
|
|
1142
|
+
/** One mutable pointer to the immutable runtime resolution. */
|
|
1298
1143
|
var ResolutionRouter = class {
|
|
1144
|
+
nodeModulePaths;
|
|
1299
1145
|
current;
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1146
|
+
linkedTargets;
|
|
1147
|
+
constructor(resolution, nodeModulePaths) {
|
|
1148
|
+
this.nodeModulePaths = nodeModulePaths;
|
|
1149
|
+
this.current = compileResolution(resolution);
|
|
1150
|
+
this.linkedTargets = new Map(resolution.linkedRoots.map((root) => [root.name, root.realPath]));
|
|
1151
|
+
}
|
|
1152
|
+
replace(successor) {
|
|
1153
|
+
const entries = new Map(successor.entries.map((entry) => [entry.name, entry]));
|
|
1154
|
+
if (successor.profilesDir !== this.current.profilesDir || successor.profileDir !== this.current.profileDir) throw new Error("profile resolution: a successor cannot change its profile scope");
|
|
1306
1155
|
for (const [name, current] of this.current.entries) {
|
|
1307
1156
|
const next = entries.get(name);
|
|
1308
1157
|
if (next === void 0 || !sameResolution(current.packageDir, next.packageDir) || !sameResolution(current.declarer, next.declarer) || current.version !== next.version || current.scope !== next.scope) throw new Error(`profile resolution: replacing ${JSON.stringify(name)} requires a process restart`);
|
|
1309
1158
|
}
|
|
1310
|
-
const localPackageNames = new Set(
|
|
1159
|
+
const localPackageNames = new Set(successor.localPackageNames);
|
|
1311
1160
|
for (const name of this.current.localPackageNames) if (!localPackageNames.has(name)) throw new Error(`profile resolution: removing local package ${JSON.stringify(name)} requires a process restart`);
|
|
1312
1161
|
for (const name of localPackageNames) if (!this.current.localPackageNames.has(name) && this.current.entries.has(name)) throw new Error(`profile resolution: overriding ${JSON.stringify(name)} locally requires a process restart`);
|
|
1313
|
-
|
|
1162
|
+
for (const root of successor.linkedRoots) {
|
|
1163
|
+
const previous = this.linkedTargets.get(root.name);
|
|
1164
|
+
if (previous !== void 0 && !sameResolution(previous, root.realPath)) throw new Error(`profile resolution: relinking ${JSON.stringify(root.name)} requires a process restart`);
|
|
1165
|
+
}
|
|
1166
|
+
const next = compileResolution(successor);
|
|
1167
|
+
for (const { name, realPath } of successor.linkedRoots) if (!this.linkedTargets.has(name)) this.linkedTargets.set(name, realPath);
|
|
1168
|
+
this.current = next;
|
|
1169
|
+
}
|
|
1170
|
+
/** Whether a module path has an interception layer: it lies in the profiles tree, the active profile, or a linked root. */
|
|
1171
|
+
hasInterceptionLayerForPath(path) {
|
|
1172
|
+
return findInterceptionLayer(path, this.current) !== void 0;
|
|
1173
|
+
}
|
|
1174
|
+
/** Whether an importer URL is scoped; the answer is memoized with the importer's routes. */
|
|
1175
|
+
hasInterceptionLayerForUrl(parentURL) {
|
|
1176
|
+
return this.getOrCreateParentRoutesForUrl(parentURL) !== false;
|
|
1177
|
+
}
|
|
1178
|
+
createParentRoutes(parent, resolution) {
|
|
1179
|
+
const layer = findInterceptionLayer(parent, resolution);
|
|
1180
|
+
return layer === void 0 ? void 0 : {
|
|
1181
|
+
parent,
|
|
1182
|
+
layer,
|
|
1183
|
+
requests: /* @__PURE__ */ new Map()
|
|
1184
|
+
};
|
|
1314
1185
|
}
|
|
1315
|
-
|
|
1316
|
-
const
|
|
1186
|
+
getOrCreateParentRoutesForUrl(parentURL) {
|
|
1187
|
+
const resolution = this.current;
|
|
1188
|
+
let parentRoutes = resolution.esmRoutes.get(parentURL);
|
|
1189
|
+
if (parentRoutes !== void 0) return parentRoutes;
|
|
1190
|
+
let parent;
|
|
1191
|
+
try {
|
|
1192
|
+
parent = fileURLToPath(parentURL);
|
|
1193
|
+
} catch {
|
|
1194
|
+
parent = void 0;
|
|
1195
|
+
}
|
|
1196
|
+
parentRoutes = parent === void 0 ? false : this.createParentRoutes(parent, resolution) ?? false;
|
|
1197
|
+
resolution.esmRoutes.set(parentURL, parentRoutes);
|
|
1198
|
+
return parentRoutes;
|
|
1199
|
+
}
|
|
1200
|
+
routeScoped(request, parentRoutes, resolution, flavor, cjs) {
|
|
1201
|
+
const { parent, layer, requests } = parentRoutes;
|
|
1202
|
+
const memo = layer.kind === "profile" && (cjs === void 0 || cjs.cacheable);
|
|
1317
1203
|
const name = barePackageName(request);
|
|
1318
1204
|
if (name === void 0) return void 0;
|
|
1319
|
-
if (parentRoutes.selfReferenceName === void 0) parentRoutes.selfReferenceName = selfReferenceName(parent);
|
|
1205
|
+
if (parentRoutes.selfReferenceName === void 0 || !memo) parentRoutes.selfReferenceName = selfReferenceName(parent);
|
|
1320
1206
|
if (parentRoutes.selfReferenceName === name || parentRoutes.selfReferenceName === null) {
|
|
1321
1207
|
const state = { route: { kind: "native" } };
|
|
1322
|
-
requests.set(request, state);
|
|
1208
|
+
if (memo) requests.set(request, state);
|
|
1323
1209
|
return state;
|
|
1324
1210
|
}
|
|
1325
|
-
|
|
1211
|
+
if (layer.kind === "linked") return this.routeLinked(request, name, parent, resolution, flavor, cjs);
|
|
1212
|
+
const target = resolution.entries.get(name);
|
|
1326
1213
|
const candidates = [];
|
|
1327
1214
|
const localSearchPaths = [];
|
|
1328
1215
|
for (const searchPath of createRequire(parent).resolve.paths(name)) {
|
|
1329
|
-
if (
|
|
1216
|
+
if (!searchPath.startsWith(layer.localPrefix)) break;
|
|
1330
1217
|
localSearchPaths.push(searchPath);
|
|
1331
1218
|
const candidate = localPackageCandidate(searchPath, name, flavor);
|
|
1332
|
-
if (candidate !== void 0)
|
|
1333
|
-
if (!(candidate.canBeManagedLink && generation.profile.some((prefix) => candidate.packageDir === join(prefix, "node_modules", name) && isProfileModuleFallbackLink(prefix.slice(0, -1), name)))) candidates.push(candidate);
|
|
1334
|
-
}
|
|
1219
|
+
if (candidate !== void 0) candidates.push(candidate);
|
|
1335
1220
|
}
|
|
1336
|
-
if (candidates.length > 0) if (
|
|
1337
|
-
const resolved =
|
|
1338
|
-
const selected = candidates.find((candidate) => localCandidateOwnsResolution(candidate
|
|
1221
|
+
if (candidates.length > 0) if (cjs !== void 0) try {
|
|
1222
|
+
const resolved = cjs.resolveNative(localSearchPaths);
|
|
1223
|
+
const selected = candidates.find((candidate) => localCandidateOwnsResolution(candidate, resolved, request, name));
|
|
1339
1224
|
if (selected !== void 0) {
|
|
1340
1225
|
const state = {
|
|
1341
1226
|
route: {
|
|
1342
1227
|
kind: "native",
|
|
1343
|
-
packageDir: selected
|
|
1228
|
+
packageDir: selected
|
|
1344
1229
|
},
|
|
1345
|
-
packageDir: selected
|
|
1346
|
-
|
|
1230
|
+
packageDir: selected,
|
|
1231
|
+
cjs: resolved
|
|
1347
1232
|
};
|
|
1348
|
-
requests.set(request, state);
|
|
1233
|
+
if (memo) requests.set(request, state);
|
|
1349
1234
|
return state;
|
|
1350
1235
|
}
|
|
1351
1236
|
} catch (error) {
|
|
@@ -1356,122 +1241,120 @@ var ResolutionRouter = class {
|
|
|
1356
1241
|
const state = {
|
|
1357
1242
|
route: {
|
|
1358
1243
|
kind: "native",
|
|
1359
|
-
packageDir: selected
|
|
1244
|
+
packageDir: selected
|
|
1360
1245
|
},
|
|
1361
|
-
packageDir: selected
|
|
1246
|
+
packageDir: selected
|
|
1362
1247
|
};
|
|
1363
1248
|
requests.set(request, state);
|
|
1364
1249
|
return state;
|
|
1365
1250
|
}
|
|
1366
|
-
const
|
|
1367
|
-
|
|
1368
|
-
const route = eligible ? {
|
|
1369
|
-
kind: "fallback",
|
|
1251
|
+
const route = target !== void 0 && (target.scope === "installation" || layer.active) ? {
|
|
1252
|
+
kind: "interception",
|
|
1370
1253
|
entry: target,
|
|
1371
|
-
after
|
|
1254
|
+
after: layer.after
|
|
1372
1255
|
} : {
|
|
1373
|
-
kind: "after-
|
|
1374
|
-
parent:
|
|
1256
|
+
kind: "native-after-interception",
|
|
1257
|
+
parent: layer.nativeAfter
|
|
1375
1258
|
};
|
|
1376
1259
|
const state = { route };
|
|
1377
|
-
if (route.kind === "
|
|
1260
|
+
if (route.kind === "interception" && memo) requests.set(request, state);
|
|
1378
1261
|
return state;
|
|
1379
1262
|
}
|
|
1380
|
-
|
|
1263
|
+
routeLinked(request, name, parent, resolution, flavor, cjs) {
|
|
1264
|
+
const target = resolution.entries.get(name);
|
|
1265
|
+
if (target === void 0) return { route: { kind: "native" } };
|
|
1266
|
+
const ancestors = this.nodeModulePaths(dirname(parent));
|
|
1267
|
+
const ancestorSet = new Set(ancestors);
|
|
1268
|
+
const searchPaths = flavor === "esm" ? ancestors : createRequire(parent).resolve.paths(name);
|
|
1269
|
+
for (const searchPath of searchPaths) {
|
|
1270
|
+
const directory = dirname(searchPath);
|
|
1271
|
+
if (ancestorSet.has(searchPath) && readPeerNames(directory).has(name)) {
|
|
1272
|
+
const route = {
|
|
1273
|
+
kind: "interception",
|
|
1274
|
+
entry: target,
|
|
1275
|
+
after: join(dirname(directory), "package.json")
|
|
1276
|
+
};
|
|
1277
|
+
if (cjs === void 0) return { route };
|
|
1278
|
+
try {
|
|
1279
|
+
const resolved = cjs.resolveEntry(target, route.after);
|
|
1280
|
+
if (localCandidateOwnsResolution(target.packageDir, resolved, request, name)) return {
|
|
1281
|
+
route,
|
|
1282
|
+
packageDir: target.packageDir,
|
|
1283
|
+
cjs: resolved
|
|
1284
|
+
};
|
|
1285
|
+
} catch (error) {
|
|
1286
|
+
if (!isUnselectedPackageMiss(error)) throw error;
|
|
1287
|
+
}
|
|
1288
|
+
continue;
|
|
1289
|
+
}
|
|
1290
|
+
const candidate = localPackageCandidate(searchPath, name, flavor);
|
|
1291
|
+
if (candidate === void 0) continue;
|
|
1292
|
+
if (cjs === void 0) return {
|
|
1293
|
+
route: {
|
|
1294
|
+
kind: "native",
|
|
1295
|
+
packageDir: candidate
|
|
1296
|
+
},
|
|
1297
|
+
packageDir: candidate
|
|
1298
|
+
};
|
|
1299
|
+
try {
|
|
1300
|
+
const resolved = cjs.resolveNative([searchPath]);
|
|
1301
|
+
if (localCandidateOwnsResolution(candidate, resolved, request, name)) return {
|
|
1302
|
+
route: {
|
|
1303
|
+
kind: "native",
|
|
1304
|
+
packageDir: candidate
|
|
1305
|
+
},
|
|
1306
|
+
packageDir: candidate,
|
|
1307
|
+
cjs: resolved
|
|
1308
|
+
};
|
|
1309
|
+
} catch (error) {
|
|
1310
|
+
if (!isUnselectedPackageMiss(error)) throw error;
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
return cjs === void 0 ? { route: { kind: "native" } } : {
|
|
1314
|
+
route: { kind: "native" },
|
|
1315
|
+
cjs: cjs.resolveNative([])
|
|
1316
|
+
};
|
|
1317
|
+
}
|
|
1318
|
+
routeLocalPackage(request, parentRoutes, resolution) {
|
|
1381
1319
|
const name = barePackageName(request);
|
|
1382
|
-
|
|
1320
|
+
const { layer } = parentRoutes;
|
|
1321
|
+
if (name === void 0 || layer.kind !== "profile" || !layer.active || !resolution.localPackageNames.has(name)) return void 0;
|
|
1383
1322
|
const state = { route: { kind: "native" } };
|
|
1384
1323
|
parentRoutes.requests.set(request, state);
|
|
1385
1324
|
return state;
|
|
1386
1325
|
}
|
|
1387
1326
|
routeUrl(request, parentURL) {
|
|
1388
|
-
const
|
|
1389
|
-
|
|
1327
|
+
const resolution = this.current;
|
|
1328
|
+
const parentRoutes = this.getOrCreateParentRoutesForUrl(parentURL);
|
|
1390
1329
|
if (parentRoutes === false) return void 0;
|
|
1391
|
-
const cached = parentRoutes
|
|
1330
|
+
const cached = parentRoutes.requests.get(request);
|
|
1392
1331
|
if (cached !== void 0) return cached;
|
|
1393
|
-
|
|
1394
|
-
const profileIndex = generation.profileUrls.findIndex((prefix) => parentURL.startsWith(prefix));
|
|
1395
|
-
const activeProfileIndex = generation.activeProfileUrls.findIndex((prefix) => parentURL.startsWith(prefix));
|
|
1396
|
-
if (profileIndex < 0 && activeProfileIndex < 0) {
|
|
1397
|
-
generation.esmRoutes.set(parentURL, false);
|
|
1398
|
-
return;
|
|
1399
|
-
}
|
|
1400
|
-
let parent;
|
|
1401
|
-
try {
|
|
1402
|
-
parent = fileURLToPath(parentURL);
|
|
1403
|
-
} catch {
|
|
1404
|
-
generation.esmRoutes.set(parentURL, false);
|
|
1405
|
-
return;
|
|
1406
|
-
}
|
|
1407
|
-
const profileRoot = profileIndex >= 0 ? generation.profilePaths[profileIndex] : generation.profile[activeProfileIndex];
|
|
1408
|
-
/* v8 ignore next -- one matching index was established above */
|
|
1409
|
-
if (profileRoot === void 0) return void 0;
|
|
1410
|
-
parentRoutes = {
|
|
1411
|
-
parent,
|
|
1412
|
-
profilesDir: profileRoot.slice(0, -1),
|
|
1413
|
-
activeProfile: activeProfileIndex >= 0,
|
|
1414
|
-
requests: /* @__PURE__ */ new Map()
|
|
1415
|
-
};
|
|
1416
|
-
generation.esmRoutes.set(parentURL, parentRoutes);
|
|
1417
|
-
}
|
|
1418
|
-
const local = this.routeLocalPackage(request, parentRoutes, generation);
|
|
1332
|
+
const local = this.routeLocalPackage(request, parentRoutes, resolution);
|
|
1419
1333
|
if (local !== void 0) return local;
|
|
1420
|
-
return this.routeScoped(request, parentRoutes,
|
|
1334
|
+
return this.routeScoped(request, parentRoutes, resolution, "esm");
|
|
1421
1335
|
}
|
|
1422
|
-
routePath(request, parent,
|
|
1423
|
-
const
|
|
1424
|
-
let parentRoutes =
|
|
1336
|
+
routePath(request, parent, cjs) {
|
|
1337
|
+
const resolution = this.current;
|
|
1338
|
+
let parentRoutes = resolution.cjsRoutes.get(parent);
|
|
1425
1339
|
if (parentRoutes === false) return void 0;
|
|
1426
|
-
const cached = parentRoutes?.requests.get(request);
|
|
1340
|
+
const cached = cjs.cacheable ? parentRoutes?.requests.get(request) : void 0;
|
|
1427
1341
|
if (cached !== void 0) return cached;
|
|
1428
1342
|
if (parentRoutes === void 0) {
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
if (
|
|
1432
|
-
const profileRoot = profilesDir ?? activeProfile;
|
|
1433
|
-
/* v8 ignore next -- one matching root was established above */
|
|
1434
|
-
if (profileRoot === void 0) return void 0;
|
|
1435
|
-
parentRoutes = {
|
|
1436
|
-
parent,
|
|
1437
|
-
profilesDir: profileRoot.slice(0, -1),
|
|
1438
|
-
activeProfile: activeProfile !== void 0,
|
|
1439
|
-
requests: /* @__PURE__ */ new Map()
|
|
1440
|
-
};
|
|
1441
|
-
generation.cjsRoutes.set(parent, parentRoutes);
|
|
1442
|
-
}
|
|
1443
|
-
}
|
|
1444
|
-
if (parentRoutes === void 0) {
|
|
1445
|
-
generation.cjsRoutes.set(parent, false);
|
|
1446
|
-
return;
|
|
1447
|
-
}
|
|
1448
|
-
return this.routeScoped(request, parentRoutes, generation, "cjs", nativeResolve, cacheable);
|
|
1449
|
-
}
|
|
1450
|
-
explicitRoute(request, paths) {
|
|
1451
|
-
if (barePackageName(request) === void 0) return void 0;
|
|
1452
|
-
for (const [index, path] of paths.entries()) {
|
|
1453
|
-
const parent = join(resolve(path), ".dsh-profile-resolution.cjs");
|
|
1454
|
-
if (startsWithin(parent, this.current.profilePaths) || startsWithin(parent, this.current.profile)) return {
|
|
1455
|
-
index,
|
|
1456
|
-
parent
|
|
1457
|
-
};
|
|
1343
|
+
parentRoutes = this.createParentRoutes(parent, resolution) ?? false;
|
|
1344
|
+
resolution.cjsRoutes.set(parent, parentRoutes);
|
|
1345
|
+
if (parentRoutes === false) return void 0;
|
|
1458
1346
|
}
|
|
1459
|
-
|
|
1460
|
-
nativeSelfReference(request, parent) {
|
|
1461
|
-
const name = barePackageName(request);
|
|
1462
|
-
if (name === void 0) return false;
|
|
1463
|
-
const self = selfReferenceName(parent);
|
|
1464
|
-
return self === name || self === null;
|
|
1347
|
+
return this.routeScoped(request, parentRoutes, resolution, "cjs", cjs);
|
|
1465
1348
|
}
|
|
1466
1349
|
packageDir(specifier, parentURL) {
|
|
1467
1350
|
const name = barePackageName(specifier);
|
|
1468
1351
|
if (name === void 0) return void 0;
|
|
1469
|
-
const state = this.routeUrl(
|
|
1470
|
-
if (state?.route.kind === "
|
|
1352
|
+
const state = this.routeUrl(name, parentURL);
|
|
1353
|
+
if (state?.route.kind === "interception") return state.route.entry.packageDir;
|
|
1471
1354
|
if (state?.packageDir !== void 0) return state.packageDir;
|
|
1472
1355
|
let parent;
|
|
1473
1356
|
try {
|
|
1474
|
-
parent = state?.route.kind === "after-
|
|
1357
|
+
parent = state?.route.kind === "native-after-interception" ? state.route.parent : fileURLToPath(parentURL);
|
|
1475
1358
|
} catch {
|
|
1476
1359
|
return;
|
|
1477
1360
|
}
|
|
@@ -1532,46 +1415,21 @@ function throwWithoutCjsAnchor(error, anchor) {
|
|
|
1532
1415
|
}
|
|
1533
1416
|
throw error;
|
|
1534
1417
|
}
|
|
1535
|
-
function assertEquivalent(actual, expected, request, parent) {
|
|
1536
|
-
if (sameResolution(actual, expected)) return;
|
|
1537
|
-
throw new Error(`profile resolution mismatch for ${JSON.stringify(request)} from ${parent}: disk resolved ${actual}, generation resolved ${expected}`);
|
|
1538
|
-
}
|
|
1539
|
-
function assertOptionalEquivalent(actual, expected, request, parent) {
|
|
1540
|
-
if (actual === void 0 && expected === void 0) return;
|
|
1541
|
-
if (actual !== void 0 && expected !== void 0 && sameResolution(actual, expected)) return;
|
|
1542
|
-
throw new Error(`profile resolution mismatch for ${JSON.stringify(request)} from ${parent}: disk selected ${actual ?? "nothing"}, generation selected ${expected ?? "nothing"}`);
|
|
1543
|
-
}
|
|
1544
1418
|
/**
|
|
1545
|
-
* Install one
|
|
1546
|
-
* @param
|
|
1547
|
-
* @
|
|
1548
|
-
* @returns a registration that replaces the generation or restores the native methods.
|
|
1419
|
+
* Install one runtime resolution as the interception on Node's default ESM and CommonJS resolvers.
|
|
1420
|
+
* @param resolution - complete package table and profile scope.
|
|
1421
|
+
* @returns an interception that publishes a successor or restores the native methods.
|
|
1549
1422
|
*/
|
|
1550
|
-
function
|
|
1551
|
-
const router = new ResolutionRouter(generation);
|
|
1423
|
+
function installRuntimeInterception(resolution) {
|
|
1552
1424
|
const { esm, esmDefaultResolve, esmConditions, cjs, cjsConditions, modern } = internalModules();
|
|
1553
|
-
const
|
|
1554
|
-
const profilePaths = [...prefixes(generation.profilesDir), ...generation.profileDir === void 0 ? [] : prefixes(generation.profileDir)];
|
|
1555
|
-
const profileUrls = profilePaths.map((path) => pathToFileURL(path).href);
|
|
1556
|
-
let recentEsmParent;
|
|
1557
|
-
let recentEsmScoped = false;
|
|
1425
|
+
const router = new ResolutionRouter(resolution, (directory) => cjs._nodeModulePaths(directory));
|
|
1558
1426
|
let delegatedEsm;
|
|
1559
1427
|
const adaptEsm = (native) => {
|
|
1560
1428
|
const adapted = (request, parent, attributes) => {
|
|
1561
1429
|
const delegated = delegatedEsm;
|
|
1562
1430
|
/* v8 ignore next -- reentry requires a separate synchronous Node hook; supported launches install none */
|
|
1563
1431
|
if (delegated !== void 0 && delegated.parent === parent && delegated.request === request) return native(request, parent, attributes);
|
|
1564
|
-
if (parent === void 0) return native(request, parent, attributes);
|
|
1565
|
-
let scoped = recentEsmParent === parent ? recentEsmScoped : esmScope.get(parent);
|
|
1566
|
-
if (scoped === void 0) {
|
|
1567
|
-
scoped = startsWithin(parent, profileUrls);
|
|
1568
|
-
esmScope.set(parent, scoped);
|
|
1569
|
-
}
|
|
1570
|
-
if (recentEsmParent !== parent) {
|
|
1571
|
-
recentEsmParent = parent;
|
|
1572
|
-
recentEsmScoped = scoped;
|
|
1573
|
-
}
|
|
1574
|
-
if (!scoped) return native(request, parent, attributes);
|
|
1432
|
+
if (parent === void 0 || !router.hasInterceptionLayerForUrl(parent)) return native(request, parent, attributes);
|
|
1575
1433
|
const state = router.routeUrl(request, parent);
|
|
1576
1434
|
if (state === void 0) {
|
|
1577
1435
|
const target = request[0] === "#" ? packageImportsTarget(fileURLToPath(parent), request, esmConditions) : void 0;
|
|
@@ -1585,16 +1443,7 @@ function installProfileResolution(generation, behavior = "enforce") {
|
|
|
1585
1443
|
} catch (error) {
|
|
1586
1444
|
return restoreImporter(error);
|
|
1587
1445
|
}
|
|
1588
|
-
|
|
1589
|
-
const actual = native(request, parent, attributes);
|
|
1590
|
-
/* v8 ignore start -- Node 22 is the asynchronous adapter and is covered by the external version matrix */
|
|
1591
|
-
if (expected instanceof Promise || actual instanceof Promise) return Promise.all([actual, expected]).then(([resolved, wanted]) => {
|
|
1592
|
-
assertEquivalent(resolved.url, wanted.url, request, parent);
|
|
1593
|
-
return resolved;
|
|
1594
|
-
});
|
|
1595
|
-
/* v8 ignore stop */
|
|
1596
|
-
assertEquivalent(actual.url, expected.url, request, parent);
|
|
1597
|
-
return actual;
|
|
1446
|
+
return expected;
|
|
1598
1447
|
}
|
|
1599
1448
|
const cacheable = attributes === EMPTY_ATTRIBUTES || Object.keys(attributes).length === 0;
|
|
1600
1449
|
if (cacheable && state.esm !== void 0) return state.esm;
|
|
@@ -1604,30 +1453,7 @@ function installProfileResolution(generation, behavior = "enforce") {
|
|
|
1604
1453
|
if (cacheable && !(result instanceof Promise)) state.esm = result;
|
|
1605
1454
|
return result;
|
|
1606
1455
|
}
|
|
1607
|
-
const routedParent = pathToFileURL(route.kind === "
|
|
1608
|
-
if (behavior === "enforce") {
|
|
1609
|
-
const previous = delegatedEsm;
|
|
1610
|
-
delegatedEsm = {
|
|
1611
|
-
parent: routedParent,
|
|
1612
|
-
request
|
|
1613
|
-
};
|
|
1614
|
-
const restoreImporter = (error) => throwWithImporter(error, routedParent, parent);
|
|
1615
|
-
try {
|
|
1616
|
-
let result;
|
|
1617
|
-
try {
|
|
1618
|
-
result = native(request, routedParent, attributes);
|
|
1619
|
-
} catch (error) {
|
|
1620
|
-
return restoreImporter(error);
|
|
1621
|
-
}
|
|
1622
|
-
/* v8 ignore next -- Node 24+ resolves synchronously; the Node 22 matrix covers its Promise result */
|
|
1623
|
-
if (result instanceof Promise) return result.catch(restoreImporter);
|
|
1624
|
-
if (cacheable) state.esm = result;
|
|
1625
|
-
return result;
|
|
1626
|
-
} finally {
|
|
1627
|
-
delegatedEsm = previous;
|
|
1628
|
-
}
|
|
1629
|
-
}
|
|
1630
|
-
const actual = native(request, parent, attributes);
|
|
1456
|
+
const routedParent = pathToFileURL(route.kind === "interception" ? route.entry.declarer : route.parent).href;
|
|
1631
1457
|
const previous = delegatedEsm;
|
|
1632
1458
|
delegatedEsm = {
|
|
1633
1459
|
parent: routedParent,
|
|
@@ -1635,25 +1461,16 @@ function installProfileResolution(generation, behavior = "enforce") {
|
|
|
1635
1461
|
};
|
|
1636
1462
|
const restoreImporter = (error) => throwWithImporter(error, routedParent, parent);
|
|
1637
1463
|
try {
|
|
1638
|
-
let
|
|
1464
|
+
let result;
|
|
1639
1465
|
try {
|
|
1640
|
-
|
|
1641
|
-
expected = result;
|
|
1642
|
-
/* v8 ignore next -- Node 24+ resolves synchronously; the Node 22 matrix covers its Promise result */
|
|
1643
|
-
if (result instanceof Promise) expected = result.catch(restoreImporter);
|
|
1466
|
+
result = native(request, routedParent, attributes);
|
|
1644
1467
|
} catch (error) {
|
|
1645
1468
|
return restoreImporter(error);
|
|
1646
1469
|
}
|
|
1647
|
-
/* v8 ignore
|
|
1648
|
-
if (
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
return resolved;
|
|
1652
|
-
});
|
|
1653
|
-
/* v8 ignore stop */
|
|
1654
|
-
assertEquivalent(actual.url, expected.url, request, parent);
|
|
1655
|
-
if (cacheable) state.esm = actual;
|
|
1656
|
-
return actual;
|
|
1470
|
+
/* v8 ignore next -- Node 24+ resolves synchronously; the Node 22 matrix covers its Promise result */
|
|
1471
|
+
if (result instanceof Promise) return result.catch(restoreImporter);
|
|
1472
|
+
if (cacheable) state.esm = result;
|
|
1473
|
+
return result;
|
|
1657
1474
|
} finally {
|
|
1658
1475
|
delegatedEsm = previous;
|
|
1659
1476
|
}
|
|
@@ -1676,7 +1493,7 @@ function installProfileResolution(generation, behavior = "enforce") {
|
|
|
1676
1493
|
]) : resolveRequest(request.specifier, parent, request.attributes ?? EMPTY_ATTRIBUTES);
|
|
1677
1494
|
loader.resolveSync = wrapped;
|
|
1678
1495
|
restoreEsm = () => {
|
|
1679
|
-
/* v8 ignore else --
|
|
1496
|
+
/* v8 ignore else -- interceptions are disposed in reverse installation order */
|
|
1680
1497
|
if (loader.resolveSync === wrapped) loader.resolveSync = original;
|
|
1681
1498
|
};
|
|
1682
1499
|
} else {
|
|
@@ -1697,11 +1514,11 @@ function installProfileResolution(generation, behavior = "enforce") {
|
|
|
1697
1514
|
const originalFilename = Reflect.get(cjs, "_resolveFilename");
|
|
1698
1515
|
let delegatedCjs = 0;
|
|
1699
1516
|
const resolveRoutedCjs = (request, routed, parent, main, options) => {
|
|
1700
|
-
const anchor = routed.kind === "
|
|
1517
|
+
const anchor = routed.kind === "interception" ? routed.entry.declarer : routed.parent;
|
|
1701
1518
|
const synthetic = new cjs(anchor);
|
|
1702
1519
|
synthetic.parent = parent;
|
|
1703
1520
|
synthetic.filename = anchor;
|
|
1704
|
-
synthetic.paths = routed.kind === "
|
|
1521
|
+
synthetic.paths = routed.kind === "interception" ? packageSearchPaths(routed.entry, request, cjs) : cjs._nodeModulePaths(dirname(anchor));
|
|
1705
1522
|
try {
|
|
1706
1523
|
return originalFilename.call(cjs, request, synthetic, main, options);
|
|
1707
1524
|
} catch (error) {
|
|
@@ -1710,7 +1527,7 @@ function installProfileResolution(generation, behavior = "enforce") {
|
|
|
1710
1527
|
};
|
|
1711
1528
|
const resolveNativeCjs = (request, searchPaths, parent, parentFilename, main, conditions) => {
|
|
1712
1529
|
const synthetic = new cjs(parentFilename);
|
|
1713
|
-
synthetic.parent = parent;
|
|
1530
|
+
if (parent.parent !== void 0) synthetic.parent = parent.parent;
|
|
1714
1531
|
synthetic.filename = parentFilename;
|
|
1715
1532
|
synthetic.paths = [...searchPaths];
|
|
1716
1533
|
const options = conditions === void 0 ? void 0 : { conditions };
|
|
@@ -1726,93 +1543,58 @@ function installProfileResolution(generation, behavior = "enforce") {
|
|
|
1726
1543
|
if (state === void 0) return resolveFrom(target.parentURL);
|
|
1727
1544
|
if (state.route.kind === "native") return resolveFrom(target.parentURL);
|
|
1728
1545
|
const route = state.route;
|
|
1729
|
-
if (route.kind === "after-
|
|
1546
|
+
if (route.kind === "native-after-interception") return resolveFrom(pathToFileURL(route.parent).href);
|
|
1730
1547
|
return resolveFrom(pathToFileURL(route.entry.declarer).href);
|
|
1731
1548
|
};
|
|
1732
1549
|
const wrappedFilename = (request, parent, main, options) => {
|
|
1733
|
-
if (delegatedCjs || !parent?.filename) return originalFilename.call(cjs, request, parent, main, options);
|
|
1550
|
+
if (delegatedCjs || !parent?.filename || options?.paths !== void 0) return originalFilename.call(cjs, request, parent, main, options);
|
|
1734
1551
|
const parentFilename = parent.filename;
|
|
1735
|
-
const cacheable = options?.
|
|
1736
|
-
const
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1552
|
+
const cacheable = options?.conditions === void 0;
|
|
1553
|
+
const routedOptions = options?.conditions === void 0 ? void 0 : { conditions: options.conditions };
|
|
1554
|
+
const state = router.routePath(request, parentFilename, {
|
|
1555
|
+
cacheable,
|
|
1556
|
+
resolveNative: (searchPaths) => resolveNativeCjs(request, searchPaths, parent, parentFilename, main, options?.conditions),
|
|
1557
|
+
resolveEntry: (entry, after) => {
|
|
1558
|
+
delegatedCjs++;
|
|
1559
|
+
try {
|
|
1560
|
+
return resolveRoutedCjs(request, {
|
|
1561
|
+
kind: "interception",
|
|
1562
|
+
entry,
|
|
1563
|
+
after
|
|
1564
|
+
}, parent, main, routedOptions);
|
|
1565
|
+
} finally {
|
|
1566
|
+
delegatedCjs--;
|
|
1567
|
+
}
|
|
1568
|
+
}
|
|
1569
|
+
});
|
|
1749
1570
|
if (state === void 0) {
|
|
1750
|
-
const scoped =
|
|
1571
|
+
const scoped = router.hasInterceptionLayerForPath(parentFilename);
|
|
1751
1572
|
const conditions = options?.conditions ?? cjsConditions;
|
|
1752
1573
|
const target = request[0] === "#" && scoped ? packageImportsTarget(parentFilename, request, conditions) : void 0;
|
|
1753
1574
|
if (target === void 0) return originalFilename.call(cjs, request, parent, main, options);
|
|
1754
|
-
|
|
1755
|
-
if (behavior === "enforce") return expected;
|
|
1756
|
-
const actual = originalFilename.call(cjs, request, parent, main, options);
|
|
1757
|
-
assertEquivalent(actual, expected, request, parentFilename);
|
|
1758
|
-
return actual;
|
|
1575
|
+
return resolvePackageImportCjs(target, conditions);
|
|
1759
1576
|
}
|
|
1760
|
-
if (
|
|
1577
|
+
if (state.cjs !== void 0) return state.cjs;
|
|
1761
1578
|
const route = state.route;
|
|
1762
1579
|
if (route.kind === "native") {
|
|
1763
1580
|
const result = originalFilename.call(cjs, request, parent, main, options);
|
|
1764
1581
|
if (cacheable) state.cjs = result;
|
|
1765
1582
|
return result;
|
|
1766
1583
|
}
|
|
1767
|
-
if (route.kind === "after-fallback" && explicit !== void 0 && explicitPaths !== void 0) try {
|
|
1768
|
-
return originalFilename.call(cjs, request, parent, main, {
|
|
1769
|
-
...options,
|
|
1770
|
-
paths: [dirname(route.parent)]
|
|
1771
|
-
});
|
|
1772
|
-
} catch (error) {
|
|
1773
|
-
if (!isUnselectedPackageMiss(error)) throw error;
|
|
1774
|
-
const remaining = explicitPaths.slice(explicit.index + 1);
|
|
1775
|
-
if (remaining.length === 0) throw error;
|
|
1776
|
-
return wrappedFilename(request, parent, main, {
|
|
1777
|
-
...options,
|
|
1778
|
-
paths: remaining
|
|
1779
|
-
});
|
|
1780
|
-
}
|
|
1781
1584
|
delegatedCjs++;
|
|
1782
1585
|
try {
|
|
1783
|
-
const routedOptions = options?.conditions === void 0 ? void 0 : { conditions: options.conditions };
|
|
1784
1586
|
let expected;
|
|
1785
1587
|
try {
|
|
1786
1588
|
expected = resolveRoutedCjs(request, route, parent, main, routedOptions);
|
|
1787
1589
|
} catch (error) {
|
|
1788
|
-
if (route.kind !== "
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
}, parent, main, routedOptions);
|
|
1794
|
-
} catch (afterError) {
|
|
1795
|
-
const remaining = explicit === void 0 || explicitPaths === void 0 ? [] : explicitPaths.slice(explicit.index + 1);
|
|
1796
|
-
if (!isUnselectedPackageMiss(afterError) || remaining.length === 0) throw afterError;
|
|
1797
|
-
delegatedCjs--;
|
|
1798
|
-
try {
|
|
1799
|
-
return wrappedFilename(request, parent, main, {
|
|
1800
|
-
...options,
|
|
1801
|
-
paths: remaining
|
|
1802
|
-
});
|
|
1803
|
-
} finally {
|
|
1804
|
-
delegatedCjs++;
|
|
1805
|
-
}
|
|
1806
|
-
}
|
|
1807
|
-
}
|
|
1808
|
-
if (behavior === "enforce") {
|
|
1809
|
-
if (cacheable) state.cjs = expected;
|
|
1810
|
-
return expected;
|
|
1590
|
+
if (route.kind !== "interception" || !isUnselectedPackageMiss(error)) throw error;
|
|
1591
|
+
expected = resolveRoutedCjs(request, {
|
|
1592
|
+
kind: "native-after-interception",
|
|
1593
|
+
parent: route.after
|
|
1594
|
+
}, parent, main, routedOptions);
|
|
1811
1595
|
}
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
if (cacheable) state.cjs = actual;
|
|
1815
|
-
return actual;
|
|
1596
|
+
if (cacheable) state.cjs = expected;
|
|
1597
|
+
return expected;
|
|
1816
1598
|
} finally {
|
|
1817
1599
|
delegatedCjs--;
|
|
1818
1600
|
}
|
|
@@ -1820,48 +1602,1223 @@ function installProfileResolution(generation, behavior = "enforce") {
|
|
|
1820
1602
|
cjs._resolveFilename = wrappedFilename;
|
|
1821
1603
|
return {
|
|
1822
1604
|
packageDir(specifier, parentURL) {
|
|
1823
|
-
|
|
1824
|
-
if (behavior !== "verify" || !startsWithin(parentURL, profileUrls)) return expected;
|
|
1825
|
-
const name = barePackageName(specifier);
|
|
1826
|
-
if (name === void 0) return expected;
|
|
1827
|
-
let parent;
|
|
1828
|
-
try {
|
|
1829
|
-
parent = fileURLToPath(parentURL);
|
|
1830
|
-
} catch {
|
|
1831
|
-
return expected;
|
|
1832
|
-
}
|
|
1833
|
-
assertOptionalEquivalent(nativePackageDir(parent, name), expected, specifier, parentURL);
|
|
1834
|
-
return expected;
|
|
1605
|
+
return router.packageDir(specifier, parentURL);
|
|
1835
1606
|
},
|
|
1836
1607
|
replace(next) {
|
|
1837
1608
|
router.replace(next);
|
|
1838
1609
|
},
|
|
1839
1610
|
dispose() {
|
|
1840
|
-
/* v8 ignore else --
|
|
1611
|
+
/* v8 ignore else -- interceptions are disposed in reverse installation order */
|
|
1841
1612
|
if (cjs._resolveFilename === wrappedFilename) cjs._resolveFilename = originalFilename;
|
|
1842
1613
|
restoreEsm();
|
|
1843
1614
|
}
|
|
1844
1615
|
};
|
|
1845
1616
|
}
|
|
1846
1617
|
/**
|
|
1847
|
-
* Publish one
|
|
1848
|
-
* @param
|
|
1849
|
-
* @param behavior - enforce or verify the generation in newly created Workers.
|
|
1618
|
+
* Publish one runtime resolution for Harness-owned Workers.
|
|
1619
|
+
* @param resolution - complete package table and profile scope.
|
|
1850
1620
|
* @returns a disposer restoring the previous thread environment data.
|
|
1851
1621
|
*/
|
|
1852
|
-
function registerWorkerResolution(
|
|
1622
|
+
function registerWorkerResolution(resolution) {
|
|
1853
1623
|
const previous = getEnvironmentData(WORKER_RESOLUTION_KEY);
|
|
1854
|
-
setEnvironmentData(WORKER_RESOLUTION_KEY, {
|
|
1855
|
-
generation,
|
|
1856
|
-
behavior
|
|
1857
|
-
});
|
|
1624
|
+
setEnvironmentData(WORKER_RESOLUTION_KEY, { resolution });
|
|
1858
1625
|
return () => {
|
|
1859
1626
|
setEnvironmentData(WORKER_RESOLUTION_KEY, previous);
|
|
1860
1627
|
};
|
|
1861
1628
|
}
|
|
1862
1629
|
//#endregion
|
|
1630
|
+
//#region lib/types/package-meta.js
|
|
1631
|
+
/** Read plugin display text and icons through exported resources without evaluating plugin code. */
|
|
1632
|
+
const LANGUAGE_ID = /^[A-Za-z]{2,8}(?:-[A-Za-z0-9]{1,8})*$/u;
|
|
1633
|
+
/** Maximum raw icon bytes admitted to plugin metadata. */
|
|
1634
|
+
const MAX_ICON_BYTES = 256 * 1024;
|
|
1635
|
+
const ICON_MEDIA_TYPES = new Map([
|
|
1636
|
+
[".svg", "image/svg+xml"],
|
|
1637
|
+
[".png", "image/png"],
|
|
1638
|
+
[".jpg", "image/jpeg"],
|
|
1639
|
+
[".jpeg", "image/jpeg"],
|
|
1640
|
+
[".webp", "image/webp"]
|
|
1641
|
+
]);
|
|
1642
|
+
function iconOf(value, manifestPath) {
|
|
1643
|
+
const icon = textOf(value, `${manifestPath}: icon`);
|
|
1644
|
+
if (icon === void 0) return void 0;
|
|
1645
|
+
if (isAbsolute(icon) || win32.isAbsolute(icon) || /^[A-Za-z][A-Za-z\d+.-]*:/u.test(icon)) throw new Error(`${manifestPath}: icon must be a relative file path`);
|
|
1646
|
+
const mediaType = ICON_MEDIA_TYPES.get(extname(icon).toLowerCase());
|
|
1647
|
+
if (mediaType === void 0) throw new Error(`${manifestPath}: icon must be SVG, PNG, JPEG, or WebP`);
|
|
1648
|
+
const directory = realpathSync(dirname(manifestPath));
|
|
1649
|
+
const file = realpathSync(resolve(directory, icon));
|
|
1650
|
+
const local = relative(directory, file);
|
|
1651
|
+
if (local === ".." || local.startsWith(`..${sep}`) || isAbsolute(local)) throw new Error(`${manifestPath}: icon must remain inside its manifest directory`);
|
|
1652
|
+
const stat = statSync(file);
|
|
1653
|
+
if (!stat.isFile()) throw new Error(`${manifestPath}: icon must be a regular file`);
|
|
1654
|
+
if (stat.size > MAX_ICON_BYTES) throw new Error(`${manifestPath}: icon exceeds 256 KiB`);
|
|
1655
|
+
const bytes = readFileSync(file);
|
|
1656
|
+
if (bytes.length > MAX_ICON_BYTES) throw new Error(`${manifestPath}: icon exceeds 256 KiB`);
|
|
1657
|
+
return `data:${mediaType};base64,${bytes.toString("base64")}`;
|
|
1658
|
+
}
|
|
1659
|
+
/**
|
|
1660
|
+
* Resolve a plugin resource through the active Node ESM resolver without evaluating it.
|
|
1661
|
+
* @param specifier - complete resource module specifier, including its locale filename.
|
|
1662
|
+
* @param parentURL - owning module-resolution base.
|
|
1663
|
+
* @returns the local filesystem path selected by Node and the active profile.
|
|
1664
|
+
* @throws when the resolver is unavailable or the resource cannot resolve to a local file.
|
|
1665
|
+
*/
|
|
1666
|
+
function resolvePluginResource(specifier, parentURL) {
|
|
1667
|
+
const loader = ModuleLoader.fromInternal();
|
|
1668
|
+
if (loader === void 0) throw new Error("Plugin metadata requires the Node module resolver");
|
|
1669
|
+
return fileURLToPath((loader.version === "v2" ? loader.resolveSync(parentURL, {
|
|
1670
|
+
specifier,
|
|
1671
|
+
attributes: {}
|
|
1672
|
+
}) : loader.resolveSync(specifier, parentURL, {})).url);
|
|
1673
|
+
}
|
|
1674
|
+
function missingResource(error) {
|
|
1675
|
+
const code = error?.code;
|
|
1676
|
+
return code === "ERR_PACKAGE_PATH_NOT_EXPORTED" || code === "ERR_MODULE_NOT_FOUND" || code === "MODULE_NOT_FOUND" || code === "ENOENT" || code === "ENOTDIR";
|
|
1677
|
+
}
|
|
1678
|
+
function optionalResourcePath(specifier, parentURL) {
|
|
1679
|
+
try {
|
|
1680
|
+
return resolvePluginResource(specifier, parentURL);
|
|
1681
|
+
} catch (error) {
|
|
1682
|
+
if (missingResource(error)) return void 0;
|
|
1683
|
+
throw error;
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
function objectOf(value, path) {
|
|
1687
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) throw new Error(`${path} must be an object`);
|
|
1688
|
+
return value;
|
|
1689
|
+
}
|
|
1690
|
+
function textOf(value, path) {
|
|
1691
|
+
if (value === void 0) return void 0;
|
|
1692
|
+
if (typeof value !== "string" || value.trim() === "") throw new Error(`${path} must be a non-empty string`);
|
|
1693
|
+
return value;
|
|
1694
|
+
}
|
|
1695
|
+
function readObject(file) {
|
|
1696
|
+
let contents;
|
|
1697
|
+
try {
|
|
1698
|
+
contents = JSON.parse(readFileSync(file, "utf8"));
|
|
1699
|
+
} catch (error) {
|
|
1700
|
+
throw new Error(`${file}: ${String(error)}`);
|
|
1701
|
+
}
|
|
1702
|
+
return objectOf(contents, file);
|
|
1703
|
+
}
|
|
1704
|
+
function fallbackText(value) {
|
|
1705
|
+
return typeof value === "string" && value.trim() !== "" ? value : void 0;
|
|
1706
|
+
}
|
|
1707
|
+
function dictionariesOf(englishPath, specifier, parentURL) {
|
|
1708
|
+
const dictionaries = /* @__PURE__ */ new Map();
|
|
1709
|
+
for (const entry of readdirSync(dirname(englishPath), { withFileTypes: true })) {
|
|
1710
|
+
if (!entry.name.endsWith(".json")) continue;
|
|
1711
|
+
const resource = `${specifier}/locale/${entry.name}`;
|
|
1712
|
+
const language = entry.name.slice(0, -5);
|
|
1713
|
+
if (!LANGUAGE_ID.test(language)) throw new Error(`${resource} must use a language id as its filename`);
|
|
1714
|
+
const id = language.toLowerCase();
|
|
1715
|
+
if (dictionaries.has(id)) throw new Error(`${resource} duplicates locale ${id}`);
|
|
1716
|
+
const file = resolvePluginResource(resource, parentURL);
|
|
1717
|
+
if (dirname(file) !== dirname(englishPath)) throw new Error(`${resource}: ${file} must share the English locale directory ${dirname(englishPath)}`);
|
|
1718
|
+
const parsed = readObject(file);
|
|
1719
|
+
const meta = parsed.meta === void 0 ? void 0 : objectOf(parsed.meta, `${file}: meta`);
|
|
1720
|
+
dictionaries.set(id, {
|
|
1721
|
+
title: textOf(meta?.title, `${file}: meta.title`),
|
|
1722
|
+
description: textOf(meta?.description, `${file}: meta.description`)
|
|
1723
|
+
});
|
|
1724
|
+
}
|
|
1725
|
+
return dictionaries;
|
|
1726
|
+
}
|
|
1727
|
+
function localizedText(field, dictionaries, fallback, finalFallback) {
|
|
1728
|
+
const entries = [...dictionaries].flatMap(([language, fields]) => {
|
|
1729
|
+
const value = fields[field];
|
|
1730
|
+
return value === void 0 ? [] : [[language, value]];
|
|
1731
|
+
});
|
|
1732
|
+
if (entries.length === 0) return fallback;
|
|
1733
|
+
return {
|
|
1734
|
+
en: fallback ?? finalFallback,
|
|
1735
|
+
...Object.fromEntries(entries)
|
|
1736
|
+
};
|
|
1737
|
+
}
|
|
1738
|
+
/**
|
|
1739
|
+
* Read localized display text and the icon declared in a plugin's exported package.json.
|
|
1740
|
+
* Icons are manifest-relative SVG, PNG, JPEG, or WebP files of at most 256 KiB,
|
|
1741
|
+
* contained in the manifest directory after realpath resolution. Icon failures retain display text.
|
|
1742
|
+
* Non-package specifiers are skipped without invoking the resource resolver.
|
|
1743
|
+
* Language files share the directory containing the resolved English resource;
|
|
1744
|
+
* each file is resolved through the complete plugin specifier before reading.
|
|
1745
|
+
* Missing fields use the same address's package.json name/description. Translation
|
|
1746
|
+
* maps retain an English fallback, ultimately the full module specifier for titles and empty for descriptions.
|
|
1747
|
+
* @param specifier - configured plugin module name, including any package subpath.
|
|
1748
|
+
* @param parentURL - owning Loader tree's module-resolution base.
|
|
1749
|
+
* @returns display fields and any icon diagnostic, or undefined for non-package specifiers or absent metadata.
|
|
1750
|
+
*/
|
|
1751
|
+
function readPluginMeta(specifier, parentURL) {
|
|
1752
|
+
if (barePackageName(specifier) === void 0) return void 0;
|
|
1753
|
+
try {
|
|
1754
|
+
const englishPath = optionalResourcePath(`${specifier}/locale/en.json`, parentURL);
|
|
1755
|
+
const dictionaries = englishPath === void 0 ? /* @__PURE__ */ new Map() : dictionariesOf(englishPath, specifier, parentURL);
|
|
1756
|
+
const manifestPath = optionalResourcePath(`${specifier}/package.json`, parentURL);
|
|
1757
|
+
const manifest = manifestPath === void 0 ? void 0 : readObject(manifestPath);
|
|
1758
|
+
const title = localizedText("title", dictionaries, fallbackText(manifest?.name), specifier);
|
|
1759
|
+
const description = localizedText("description", dictionaries, fallbackText(manifest?.description), "");
|
|
1760
|
+
const text = {
|
|
1761
|
+
...title === void 0 ? {} : { title },
|
|
1762
|
+
...description === void 0 ? {} : { description }
|
|
1763
|
+
};
|
|
1764
|
+
let icon;
|
|
1765
|
+
try {
|
|
1766
|
+
icon = manifestPath === void 0 ? void 0 : iconOf(manifest?.icon, manifestPath);
|
|
1767
|
+
} catch (error) {
|
|
1768
|
+
return {
|
|
1769
|
+
...text,
|
|
1770
|
+
error: `Plugin metadata for ${specifier}: ${String(error)}`
|
|
1771
|
+
};
|
|
1772
|
+
}
|
|
1773
|
+
if (title === void 0 && description === void 0 && icon === void 0) return void 0;
|
|
1774
|
+
return {
|
|
1775
|
+
...text,
|
|
1776
|
+
...icon === void 0 ? {} : { icon }
|
|
1777
|
+
};
|
|
1778
|
+
} catch (error) {
|
|
1779
|
+
return { error: `Plugin metadata for ${specifier}: ${String(error)}` };
|
|
1780
|
+
}
|
|
1781
|
+
}
|
|
1782
|
+
//#endregion
|
|
1783
|
+
//#region lib/types/config-schema/native.js
|
|
1784
|
+
/** Identity checks at the plugin-export and lazy-builder boundaries. */
|
|
1785
|
+
/**
|
|
1786
|
+
* Recognize the native Schemastery graph protocol without invoking a validator or serialization hook.
|
|
1787
|
+
* @param value - plugin Config export or lazy-builder result.
|
|
1788
|
+
* @returns whether native schema fields can be inspected.
|
|
1789
|
+
*/
|
|
1790
|
+
function isNativeConfigSchema(value) {
|
|
1791
|
+
if (value === null || typeof value !== "object" && typeof value !== "function") return false;
|
|
1792
|
+
const meta = Reflect.get(value, "meta");
|
|
1793
|
+
return Reflect.get(value, Symbol.for("schemastery")) === true && typeof Reflect.get(value, "type") === "string" && meta !== null && typeof meta === "object";
|
|
1794
|
+
}
|
|
1795
|
+
//#endregion
|
|
1796
|
+
//#region lib/types/config-schema/pattern.js
|
|
1797
|
+
/** Conservative compatibility checks between native RegExp validation and Unicode JSON Schema patterns. */
|
|
1798
|
+
function bmpOnly(node) {
|
|
1799
|
+
switch (node.type) {
|
|
1800
|
+
case "Character": return node.value <= 65535 && (node.value < 55296 || node.value > 57343);
|
|
1801
|
+
case "CharacterClassRange": return bmpOnly(node.min) && bmpOnly(node.max) && (node.max.value < 55296 || node.min.value > 57343);
|
|
1802
|
+
case "CharacterClass": return !node.negate && node.elements.every(bmpOnly);
|
|
1803
|
+
case "CharacterSet": return (node.kind === "digit" || node.kind === "space" || node.kind === "word") && !node.negate;
|
|
1804
|
+
case "Quantifier": return bmpOnly(node.element);
|
|
1805
|
+
case "Assertion": return [
|
|
1806
|
+
"start",
|
|
1807
|
+
"end",
|
|
1808
|
+
"word"
|
|
1809
|
+
].includes(node.kind);
|
|
1810
|
+
default: return false;
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
function broadSet(node) {
|
|
1814
|
+
return node.type === "CharacterSet" && (node.kind === "any" || (node.kind === "digit" || node.kind === "space" || node.kind === "word") && node.negate);
|
|
1815
|
+
}
|
|
1816
|
+
function portableAlternative(alternative) {
|
|
1817
|
+
if (alternative.elements.length === 1 && alternative.elements.some(broadSet)) return true;
|
|
1818
|
+
let broadRepetitions = 0;
|
|
1819
|
+
const wordAssertion = alternative.elements.some((element) => element.type === "Assertion" && element.kind === "word");
|
|
1820
|
+
return alternative.elements.every((element) => {
|
|
1821
|
+
if (element.type === "Quantifier" && element.max === Infinity && element.min <= 1 && broadSet(element.element)) return !wordAssertion && ++broadRepetitions === 1;
|
|
1822
|
+
return bmpOnly(element);
|
|
1823
|
+
});
|
|
1824
|
+
}
|
|
1825
|
+
function signature(pattern) {
|
|
1826
|
+
const incidental = new Set([
|
|
1827
|
+
"parent",
|
|
1828
|
+
"start",
|
|
1829
|
+
"end",
|
|
1830
|
+
"raw",
|
|
1831
|
+
"references",
|
|
1832
|
+
"resolved"
|
|
1833
|
+
]);
|
|
1834
|
+
return JSON.stringify(pattern, (key, value) => incidental.has(key) ? void 0 : value);
|
|
1835
|
+
}
|
|
1836
|
+
/**
|
|
1837
|
+
* Create a checker for patterns that can retain native acceptance under Unicode regex semantics.
|
|
1838
|
+
* Unrecognized flagless syntax stays explicitly partial rather than becoming a misleading constraint.
|
|
1839
|
+
* @returns the compatibility predicate; parsing never executes the regular expression against config values.
|
|
1840
|
+
*/
|
|
1841
|
+
async function createPatternCheck() {
|
|
1842
|
+
const { RegExpParser } = await import("@eslint-community/regexpp");
|
|
1843
|
+
const parser = new RegExpParser();
|
|
1844
|
+
return (source, flags = "") => {
|
|
1845
|
+
if (flags !== "" && flags !== "u") return false;
|
|
1846
|
+
try {
|
|
1847
|
+
const unicode = parser.parsePattern(source, 0, source.length, { unicode: true });
|
|
1848
|
+
if (flags === "u") return true;
|
|
1849
|
+
const native = parser.parsePattern(source, 0, source.length, { unicode: false });
|
|
1850
|
+
return signature(native) === signature(unicode) && native.alternatives.every(portableAlternative);
|
|
1851
|
+
} catch (error) {
|
|
1852
|
+
if (error instanceof SyntaxError) return false;
|
|
1853
|
+
throw error;
|
|
1854
|
+
}
|
|
1855
|
+
};
|
|
1856
|
+
}
|
|
1857
|
+
//#endregion
|
|
1858
|
+
//#region lib/types/config-schema/projector.js
|
|
1859
|
+
/** Project native Config input constraints without executing their validators or transform callbacks. */
|
|
1860
|
+
/** Definition that projected value positions reference as `#/$defs/loaderExpression`; an enclosing document must define it. */
|
|
1861
|
+
const LOADER_EXPRESSION_SCHEMA = {
|
|
1862
|
+
type: "object",
|
|
1863
|
+
properties: { __jsExpr: { type: "string" } },
|
|
1864
|
+
required: ["__jsExpr"],
|
|
1865
|
+
description: "Inert representation of a YAML !!js scalar from the Cordis entry-list parser. Its result is evaluated and validated only at runtime. Extra marker-object fields are ignored by interpolation."
|
|
1866
|
+
};
|
|
1867
|
+
/** Copy JSON-compatible schema annotations without silently converting non-JSON defaults. */
|
|
1868
|
+
function jsonValue(value, nullifyUndefined = false) {
|
|
1869
|
+
const visit = (item, active) => {
|
|
1870
|
+
if (nullifyUndefined && item === void 0) return;
|
|
1871
|
+
if (item === null || typeof item === "string" || typeof item === "boolean") return;
|
|
1872
|
+
if (typeof item === "number" && Number.isFinite(item)) return;
|
|
1873
|
+
if (typeof item !== "object") throw new Error("schema annotation is not JSON-compatible");
|
|
1874
|
+
if (active.has(item)) throw new Error("schema annotation contains a cycle");
|
|
1875
|
+
if (!Array.isArray(item) && Object.getPrototypeOf(item) !== Object.prototype && Object.getPrototypeOf(item) !== null) throw new Error("schema annotation contains a non-JSON object");
|
|
1876
|
+
active.add(item);
|
|
1877
|
+
for (const child of Object.values(item)) visit(child, active);
|
|
1878
|
+
active.delete(item);
|
|
1879
|
+
};
|
|
1880
|
+
visit(value, /* @__PURE__ */ new Set());
|
|
1881
|
+
return JSON.parse(JSON.stringify(value, (_key, item) => nullifyUndefined && item === void 0 ? null : item));
|
|
1882
|
+
}
|
|
1883
|
+
/** Native constant equality treats omitted and null-valued object members alike. */
|
|
1884
|
+
function constant(value, objectComparison) {
|
|
1885
|
+
if (Array.isArray(value)) return {
|
|
1886
|
+
type: "array",
|
|
1887
|
+
minItems: value.length,
|
|
1888
|
+
maxItems: value.length,
|
|
1889
|
+
items: false,
|
|
1890
|
+
...value.length ? { prefixItems: Array.from(value, (item) => constant(item, objectComparison)) } : {}
|
|
1891
|
+
};
|
|
1892
|
+
if (value !== null && typeof value === "object") {
|
|
1893
|
+
objectComparison();
|
|
1894
|
+
const properties = Object.fromEntries(Object.entries(value).map(([key, child]) => [key, constant(child, objectComparison)]));
|
|
1895
|
+
const inherited = Object.getOwnPropertyNames(Object.prototype);
|
|
1896
|
+
const required = Object.keys(properties).filter((key) => !inherited.includes(key) && Reflect.get(value, key) != null);
|
|
1897
|
+
return {
|
|
1898
|
+
type: "object",
|
|
1899
|
+
properties,
|
|
1900
|
+
additionalProperties: { type: "null" },
|
|
1901
|
+
patternProperties: { [`^(?:${inherited.map((key) => key.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|")})$`]: {} },
|
|
1902
|
+
...required.length ? { required } : {}
|
|
1903
|
+
};
|
|
1904
|
+
}
|
|
1905
|
+
return { const: value };
|
|
1906
|
+
}
|
|
1907
|
+
/** Add or remove null acceptance; a type list stays deduplicated because a wrapped projection may already accept null. */
|
|
1908
|
+
function nullable(core, accepts) {
|
|
1909
|
+
if (typeof core === "boolean") return accepts ? core || { type: "null" } : core && { not: { type: "null" } };
|
|
1910
|
+
const types = typeof core.type === "string" ? [core.type] : core.type;
|
|
1911
|
+
if (types === void 0) return accepts ? { anyOf: [core, { type: "null" }] } : {
|
|
1912
|
+
...core,
|
|
1913
|
+
not: { type: "null" }
|
|
1914
|
+
};
|
|
1915
|
+
const [single, ...rest] = accepts ? [...new Set([...types, "null"])] : types.filter((type) => type !== "null");
|
|
1916
|
+
if (single === void 0) return false;
|
|
1917
|
+
return {
|
|
1918
|
+
...core,
|
|
1919
|
+
type: rest.length ? [single, ...rest] : single
|
|
1920
|
+
};
|
|
1921
|
+
}
|
|
1922
|
+
/** Add expression alternatives only at config VALUE positions, not property names or applicator branches. */
|
|
1923
|
+
function expressions(schema, valuePosition = true, enabled = true) {
|
|
1924
|
+
const result = { ...schema };
|
|
1925
|
+
if (schema.properties) result.properties = Object.fromEntries(Object.entries(schema.properties).map(([key, child]) => [key, expressions(child, true, enabled)]));
|
|
1926
|
+
for (const key of ["items", "additionalProperties"]) if (schema[key] !== void 0) result[key] = schema[key] === false ? false : expressions(schema[key], true, enabled);
|
|
1927
|
+
if (schema.propertyNames) result.propertyNames = expressions(schema.propertyNames, false, false);
|
|
1928
|
+
if (schema.prefixItems) result.prefixItems = schema.prefixItems.map((child) => expressions(child, true, enabled));
|
|
1929
|
+
if (schema.anyOf) result.anyOf = schema.anyOf.map((child) => expressions(child, false, enabled));
|
|
1930
|
+
if (schema.not !== void 0) result.not = expressions(schema.not, false, false);
|
|
1931
|
+
if (!valuePosition || !enabled) return result;
|
|
1932
|
+
const annotations = {};
|
|
1933
|
+
for (const key of [
|
|
1934
|
+
"title",
|
|
1935
|
+
"description",
|
|
1936
|
+
"default",
|
|
1937
|
+
"$comment",
|
|
1938
|
+
"x-cordis"
|
|
1939
|
+
]) if (Object.hasOwn(result, key)) {
|
|
1940
|
+
annotations[key] = result[key];
|
|
1941
|
+
Reflect.deleteProperty(result, key);
|
|
1942
|
+
}
|
|
1943
|
+
return {
|
|
1944
|
+
...annotations,
|
|
1945
|
+
anyOf: [result, { $ref: "#/$defs/loaderExpression" }]
|
|
1946
|
+
};
|
|
1947
|
+
}
|
|
1948
|
+
/** Check native volatile containment without evaluating values or invoking unresolved lazy builders. */
|
|
1949
|
+
function validateVolatilePlacement(node, path, blocked = false, seen = /* @__PURE__ */ new Map()) {
|
|
1950
|
+
const states = seen.get(node) ?? /* @__PURE__ */ new Set();
|
|
1951
|
+
if (states.has(blocked)) return;
|
|
1952
|
+
states.add(blocked);
|
|
1953
|
+
seen.set(node, states);
|
|
1954
|
+
if (node.meta.volatile && blocked) throw new Error(`${path}: volatile fields require a fixed object path without an enclosing volatile field`);
|
|
1955
|
+
const nested = blocked || !!node.meta.volatile;
|
|
1956
|
+
for (const [key, child] of Object.entries(node.dict ?? {})) validateVolatilePlacement(child, `${path}/${key}`, nested, seen);
|
|
1957
|
+
if (node.sKey) validateVolatilePlacement(node.sKey, `${path}/keys`, true, seen);
|
|
1958
|
+
if (node.inner && (node.type !== "lazy" || isNativeConfigSchema(node.inner))) validateVolatilePlacement(node.inner, `${path}/inner`, true, seen);
|
|
1959
|
+
for (const [index, child] of (node.list ?? []).entries()) validateVolatilePlacement(child, `${path}/${index}`, true, seen);
|
|
1960
|
+
}
|
|
1961
|
+
/**
|
|
1962
|
+
* Create an invocation-local projector. Ajv checks only literal defaults against generated schemas;
|
|
1963
|
+
* it does not fill defaults, coerce input, or call native plugin validators. Opaque input or metadata effects
|
|
1964
|
+
* widen validation with explicit limitations instead of simulating native mutation.
|
|
1965
|
+
* @returns a function projecting one trusted native Config graph into the enclosing document's definitions.
|
|
1966
|
+
*/
|
|
1967
|
+
async function createConfigProjector() {
|
|
1968
|
+
const { Ajv2020 } = await import("ajv/dist/2020.js");
|
|
1969
|
+
const validator = new Ajv2020({
|
|
1970
|
+
strict: false,
|
|
1971
|
+
logger: false,
|
|
1972
|
+
validateFormats: false,
|
|
1973
|
+
addUsedSchema: false
|
|
1974
|
+
});
|
|
1975
|
+
const portablePattern = await createPatternCheck();
|
|
1976
|
+
const builderResults = /* @__PURE__ */ new Map();
|
|
1977
|
+
return (root, prefix) => {
|
|
1978
|
+
validateVolatilePlacement(root, "config");
|
|
1979
|
+
const completed = /* @__PURE__ */ new Map();
|
|
1980
|
+
const strictNodes = /* @__PURE__ */ new Map();
|
|
1981
|
+
const active = /* @__PURE__ */ new Set();
|
|
1982
|
+
const recursiveNames = /* @__PURE__ */ new Map();
|
|
1983
|
+
const definitions = {};
|
|
1984
|
+
const limitations = [];
|
|
1985
|
+
const metadataEffects = [];
|
|
1986
|
+
const limitation = (path, message) => {
|
|
1987
|
+
const text = `${path}: ${message}`;
|
|
1988
|
+
limitations.push(text);
|
|
1989
|
+
return text;
|
|
1990
|
+
};
|
|
1991
|
+
const visit = (node, path, strict = false) => {
|
|
1992
|
+
let key = node;
|
|
1993
|
+
if (strict) {
|
|
1994
|
+
key = strictNodes.get(node) ?? { ...node };
|
|
1995
|
+
strictNodes.set(node, key);
|
|
1996
|
+
}
|
|
1997
|
+
const cached = completed.get(key);
|
|
1998
|
+
if (cached) return cached;
|
|
1999
|
+
if (active.has(key)) {
|
|
2000
|
+
let name = recursiveNames.get(key);
|
|
2001
|
+
if (name === void 0) {
|
|
2002
|
+
name = `${prefix}Recursive${recursiveNames.size}`;
|
|
2003
|
+
recursiveNames.set(key, name);
|
|
2004
|
+
}
|
|
2005
|
+
return {
|
|
2006
|
+
schema: { $ref: `#/$defs/${name}` },
|
|
2007
|
+
acceptsMissing: node.type !== "lazy" && node.meta.required ? false : "unknown",
|
|
2008
|
+
exact: true,
|
|
2009
|
+
recursive: true,
|
|
2010
|
+
effectful: true,
|
|
2011
|
+
mutating: true
|
|
2012
|
+
};
|
|
2013
|
+
}
|
|
2014
|
+
active.add(key);
|
|
2015
|
+
let projection;
|
|
2016
|
+
if (node.type === "lazy") {
|
|
2017
|
+
let inner = node;
|
|
2018
|
+
let meta = node.meta.volatile ? {
|
|
2019
|
+
...node.meta,
|
|
2020
|
+
volatile: false
|
|
2021
|
+
} : node.meta;
|
|
2022
|
+
const chain = /* @__PURE__ */ new Set();
|
|
2023
|
+
let looseProjection;
|
|
2024
|
+
while (inner.type === "lazy") {
|
|
2025
|
+
const cachedInner = isNativeConfigSchema(inner.inner);
|
|
2026
|
+
if (meta.loose) {
|
|
2027
|
+
const message = limitation(path, "lazy loose fallback can accept inputs rejected by its inner schema");
|
|
2028
|
+
if (!cachedInner) metadataEffects.push(limitation(path, "unresolved loose lazy metadata propagation may affect shared schemas"));
|
|
2029
|
+
looseProjection = {
|
|
2030
|
+
schema: { "x-cordis": {
|
|
2031
|
+
loose: true,
|
|
2032
|
+
limitations: [message]
|
|
2033
|
+
} },
|
|
2034
|
+
acceptsMissing: true,
|
|
2035
|
+
exact: false,
|
|
2036
|
+
recursive: false,
|
|
2037
|
+
effectful: true,
|
|
2038
|
+
mutating: false
|
|
2039
|
+
};
|
|
2040
|
+
break;
|
|
2041
|
+
}
|
|
2042
|
+
if (chain.has(inner)) throw new Error(`${path}: lazy cycle has no concrete schema`);
|
|
2043
|
+
chain.add(inner);
|
|
2044
|
+
let next = cachedInner ? inner.inner : builderResults.get(inner);
|
|
2045
|
+
if (next === void 0 && typeof inner.builder === "function") {
|
|
2046
|
+
next = Reflect.apply(inner.builder, inner, []);
|
|
2047
|
+
builderResults.set(inner, next);
|
|
2048
|
+
}
|
|
2049
|
+
if (!isNativeConfigSchema(next)) throw new Error(`${path}: lazy schema has no native builder result or resolved inner schema`);
|
|
2050
|
+
if (!cachedInner && [
|
|
2051
|
+
"required",
|
|
2052
|
+
"default",
|
|
2053
|
+
"min",
|
|
2054
|
+
"max",
|
|
2055
|
+
"step",
|
|
2056
|
+
"pattern",
|
|
2057
|
+
"loose",
|
|
2058
|
+
"volatile"
|
|
2059
|
+
].some((key) => Object.hasOwn(meta, key) && !Object.hasOwn(next.meta, key) && ([
|
|
2060
|
+
"required",
|
|
2061
|
+
"loose",
|
|
2062
|
+
"volatile"
|
|
2063
|
+
].includes(key) ? !!Reflect.get(meta, key) : Reflect.get(meta, key) != null))) metadataEffects.push(limitation(path, "lazy metadata propagation may affect shared schemas; validation requires native execution"));
|
|
2064
|
+
meta = cachedInner ? next.meta : {
|
|
2065
|
+
...meta,
|
|
2066
|
+
...next.meta
|
|
2067
|
+
};
|
|
2068
|
+
validateVolatilePlacement({
|
|
2069
|
+
...next,
|
|
2070
|
+
meta
|
|
2071
|
+
}, `${path}/lazy`, true);
|
|
2072
|
+
inner = next;
|
|
2073
|
+
}
|
|
2074
|
+
projection = looseProjection ?? visit({
|
|
2075
|
+
...inner,
|
|
2076
|
+
meta
|
|
2077
|
+
}, `${path}/lazy`, strict);
|
|
2078
|
+
if (node.meta.volatile) projection = {
|
|
2079
|
+
...projection,
|
|
2080
|
+
schema: {
|
|
2081
|
+
...projection.schema,
|
|
2082
|
+
"x-cordis": {
|
|
2083
|
+
...projection.schema["x-cordis"],
|
|
2084
|
+
volatile: true
|
|
2085
|
+
}
|
|
2086
|
+
}
|
|
2087
|
+
};
|
|
2088
|
+
} else {
|
|
2089
|
+
const ownLimitations = [];
|
|
2090
|
+
const inputLimitations = [];
|
|
2091
|
+
let unsupported = false;
|
|
2092
|
+
const inputLimitation = (message) => {
|
|
2093
|
+
inputLimitations.push(message);
|
|
2094
|
+
ownLimitations.push(limitation(path, message));
|
|
2095
|
+
};
|
|
2096
|
+
const annotation = (value, name) => {
|
|
2097
|
+
try {
|
|
2098
|
+
return {
|
|
2099
|
+
ok: true,
|
|
2100
|
+
value: jsonValue(value)
|
|
2101
|
+
};
|
|
2102
|
+
} catch (error) {
|
|
2103
|
+
ownLimitations.push(limitation(`${path}/${name}`, `annotation omitted: ${error instanceof Error ? error.message : String(error)}`));
|
|
2104
|
+
return { ok: false };
|
|
2105
|
+
}
|
|
2106
|
+
};
|
|
2107
|
+
const children = [];
|
|
2108
|
+
const child = (value, suffix, childStrict = false) => {
|
|
2109
|
+
if (value === void 0) throw new Error(`${path}: ${node.type} schema is missing ${suffix}`);
|
|
2110
|
+
const result = visit(value, `${path}/${suffix}`, childStrict);
|
|
2111
|
+
children.push(result);
|
|
2112
|
+
return result;
|
|
2113
|
+
};
|
|
2114
|
+
const meta = { ...node.meta };
|
|
2115
|
+
for (const key of [
|
|
2116
|
+
"min",
|
|
2117
|
+
"max",
|
|
2118
|
+
"step"
|
|
2119
|
+
]) {
|
|
2120
|
+
if (meta[key] === void 0 || Number.isFinite(meta[key])) continue;
|
|
2121
|
+
if (!(key === "max" ? meta.max === Infinity : key === "min" && meta.min === -Infinity && !meta.step)) inputLimitation(`non-finite ${key} constraint is omitted; native validation is required`);
|
|
2122
|
+
Reflect.deleteProperty(meta, key);
|
|
2123
|
+
}
|
|
2124
|
+
let core;
|
|
2125
|
+
let dictionaryValidation;
|
|
2126
|
+
switch (node.type) {
|
|
2127
|
+
case "any":
|
|
2128
|
+
core = true;
|
|
2129
|
+
break;
|
|
2130
|
+
case "never":
|
|
2131
|
+
core = false;
|
|
2132
|
+
break;
|
|
2133
|
+
case "const":
|
|
2134
|
+
try {
|
|
2135
|
+
core = node.value == null ? false : constant(jsonValue(node.value, true), () => {
|
|
2136
|
+
inputLimitation("object constant inherited-member comparison requires native validation");
|
|
2137
|
+
});
|
|
2138
|
+
} catch (error) {
|
|
2139
|
+
core = true;
|
|
2140
|
+
inputLimitation(`constant constraint requires native validation: ${error instanceof Error ? error.message : String(error)}`);
|
|
2141
|
+
}
|
|
2142
|
+
break;
|
|
2143
|
+
case "boolean":
|
|
2144
|
+
core = { type: "boolean" };
|
|
2145
|
+
break;
|
|
2146
|
+
case "string":
|
|
2147
|
+
core = { type: "string" };
|
|
2148
|
+
if (meta.min !== void 0) if (meta.min <= 1) core.minLength = Math.max(0, Math.ceil(meta.min));
|
|
2149
|
+
else inputLimitation("UTF-16 minimum length requires native validation");
|
|
2150
|
+
if (meta.max !== void 0) if (meta.max < 0) core = false;
|
|
2151
|
+
else {
|
|
2152
|
+
const maximum = Math.floor(meta.max);
|
|
2153
|
+
core.maxLength = maximum;
|
|
2154
|
+
if (maximum > 0) inputLimitation("UTF-16 maximum length requires native validation");
|
|
2155
|
+
}
|
|
2156
|
+
if (meta.pattern && core !== false) if (portablePattern(meta.pattern.source, meta.pattern.flags)) core.pattern = meta.pattern.source;
|
|
2157
|
+
else inputLimitation("regular-expression syntax or Unicode semantics require native validation");
|
|
2158
|
+
break;
|
|
2159
|
+
case "number":
|
|
2160
|
+
core = { type: "number" };
|
|
2161
|
+
if (meta.min !== void 0) core.minimum = meta.min;
|
|
2162
|
+
if (meta.max !== void 0) core.maximum = meta.max;
|
|
2163
|
+
if (meta.step) {
|
|
2164
|
+
const step = Math.abs(meta.step);
|
|
2165
|
+
const origin = meta.min ?? 0;
|
|
2166
|
+
if (!Number.isInteger(step) || origin % step !== 0) inputLimitation("fractional or offset numeric step requires native validation");
|
|
2167
|
+
else if (step === 1) core.type = "integer";
|
|
2168
|
+
else core.multipleOf = step;
|
|
2169
|
+
}
|
|
2170
|
+
break;
|
|
2171
|
+
case "object": {
|
|
2172
|
+
const required = [];
|
|
2173
|
+
core = {
|
|
2174
|
+
type: "object",
|
|
2175
|
+
properties: Object.fromEntries(Object.entries(node.dict ?? {}).map(([key, field]) => {
|
|
2176
|
+
const value = child(field, key);
|
|
2177
|
+
if (value.acceptsMissing === false) required.push(key);
|
|
2178
|
+
return [key, value.schema];
|
|
2179
|
+
}))
|
|
2180
|
+
};
|
|
2181
|
+
if (required.length) core.required = required;
|
|
2182
|
+
break;
|
|
2183
|
+
}
|
|
2184
|
+
case "array":
|
|
2185
|
+
core = {
|
|
2186
|
+
type: "array",
|
|
2187
|
+
items: child(node.inner, "items").schema
|
|
2188
|
+
};
|
|
2189
|
+
if (meta.min !== void 0 && node.inner?.meta.default == null) core.minItems = Math.max(0, Math.ceil(meta.min));
|
|
2190
|
+
if (meta.max !== void 0) if (meta.max < 0) core = false;
|
|
2191
|
+
else core.maxItems = Math.floor(meta.max);
|
|
2192
|
+
break;
|
|
2193
|
+
case "dict": {
|
|
2194
|
+
const valueSchema = child(node.inner, "values").schema;
|
|
2195
|
+
core = {
|
|
2196
|
+
type: "object",
|
|
2197
|
+
additionalProperties: valueSchema
|
|
2198
|
+
};
|
|
2199
|
+
if (node.sKey) {
|
|
2200
|
+
const key = child(node.sKey, "keys");
|
|
2201
|
+
if (!(node.sKey.type === "string" && node.sKey.meta.min === void 0 && node.sKey.meta.max === void 0 && node.sKey.meta.pattern === void 0) && (strict || key.effectful)) {
|
|
2202
|
+
dictionaryValidation = {
|
|
2203
|
+
keySchema: key.schema,
|
|
2204
|
+
valueSchema
|
|
2205
|
+
};
|
|
2206
|
+
core = { type: "object" };
|
|
2207
|
+
inputLimitation(key.effectful ? "dictionary key normalization can overwrite unvalidated values; native validation is required" : "strict dictionary filtering and value validation require native validation");
|
|
2208
|
+
} else core.propertyNames = key.schema;
|
|
2209
|
+
}
|
|
2210
|
+
break;
|
|
2211
|
+
}
|
|
2212
|
+
case "tuple": {
|
|
2213
|
+
if (node.list === void 0) throw new Error(`${path}: tuple schema is missing its list`);
|
|
2214
|
+
const values = node.list.map((item, index) => child(item, String(index)));
|
|
2215
|
+
core = {
|
|
2216
|
+
type: "array",
|
|
2217
|
+
...values.length ? { prefixItems: values.map((item) => item.schema) } : {}
|
|
2218
|
+
};
|
|
2219
|
+
const minimum = values.reduce((length, value, index) => value.acceptsMissing === false ? index + 1 : length, 0);
|
|
2220
|
+
if (minimum) core.minItems = minimum;
|
|
2221
|
+
break;
|
|
2222
|
+
}
|
|
2223
|
+
case "union": {
|
|
2224
|
+
if (node.list === void 0) throw new Error(`${path}: union schema is missing its list`);
|
|
2225
|
+
const variants = node.list.map((item, index) => child(item, String(index), strict));
|
|
2226
|
+
if (variants.slice(0, -1).some((variant) => variant.mutating)) {
|
|
2227
|
+
core = true;
|
|
2228
|
+
inputLimitation("earlier union branches may alter later validation inputs; native validation is required");
|
|
2229
|
+
} else core = variants.length ? { anyOf: variants.map((variant) => variant.schema) } : false;
|
|
2230
|
+
break;
|
|
2231
|
+
}
|
|
2232
|
+
case "transform":
|
|
2233
|
+
core = child(node.inner, "input", true).schema;
|
|
2234
|
+
inputLimitation("transform callback validation and normalization are not executed or projected");
|
|
2235
|
+
break;
|
|
2236
|
+
default:
|
|
2237
|
+
core = true;
|
|
2238
|
+
unsupported = true;
|
|
2239
|
+
inputLimitation(`native schema type ${node.type} is not statically projected`);
|
|
2240
|
+
}
|
|
2241
|
+
if (meta.loose) {
|
|
2242
|
+
core = true;
|
|
2243
|
+
inputLimitation("loose validation can replace invalid values with defaults");
|
|
2244
|
+
}
|
|
2245
|
+
const recursive = children.some((value) => value.recursive);
|
|
2246
|
+
const container = [
|
|
2247
|
+
"object",
|
|
2248
|
+
"array",
|
|
2249
|
+
"dict",
|
|
2250
|
+
"tuple"
|
|
2251
|
+
].includes(node.type);
|
|
2252
|
+
const mutating = unsupported || children.some((value) => value.mutating || container && value.effectful);
|
|
2253
|
+
const exact = inputLimitations.length === 0 && children.every((value) => value.exact);
|
|
2254
|
+
const fallback = meta.default === void 0 ? void 0 : annotation(meta.default, "default");
|
|
2255
|
+
let acceptsMissing;
|
|
2256
|
+
if (meta.required) acceptsMissing = false;
|
|
2257
|
+
else if (unsupported) acceptsMissing = "unknown";
|
|
2258
|
+
else if (meta.default == null) acceptsMissing = true;
|
|
2259
|
+
else if (!fallback?.ok) acceptsMissing = "unknown";
|
|
2260
|
+
else if (recursive) {
|
|
2261
|
+
acceptsMissing = "unknown";
|
|
2262
|
+
inputLimitation("recursive default validation cannot be decided statically");
|
|
2263
|
+
} else if (!exact) acceptsMissing = "unknown";
|
|
2264
|
+
else acceptsMissing = validator.validate(core, fallback.value);
|
|
2265
|
+
const annotations = {};
|
|
2266
|
+
if (fallback?.ok) annotations.default = fallback.value;
|
|
2267
|
+
const native = {};
|
|
2268
|
+
if (typeof meta.description === "string") annotations.description = meta.description;
|
|
2269
|
+
else if (meta.description) {
|
|
2270
|
+
const descriptions = annotation(meta.description, "description");
|
|
2271
|
+
if (descriptions.ok) {
|
|
2272
|
+
native.descriptions = descriptions.value;
|
|
2273
|
+
const description = meta.description.en ?? meta.description[""] ?? Object.values(meta.description)[0];
|
|
2274
|
+
if (typeof description === "string") annotations.description = description;
|
|
2275
|
+
}
|
|
2276
|
+
}
|
|
2277
|
+
if (dictionaryValidation) native.dictionaryValidation = dictionaryValidation;
|
|
2278
|
+
const copy = (name, value) => {
|
|
2279
|
+
if (value === void 0) return;
|
|
2280
|
+
const result = annotation(value, name);
|
|
2281
|
+
if (result.ok) native[name] = result.value;
|
|
2282
|
+
};
|
|
2283
|
+
for (const key of [
|
|
2284
|
+
"role",
|
|
2285
|
+
"extra",
|
|
2286
|
+
"hidden",
|
|
2287
|
+
"disabled",
|
|
2288
|
+
"collapse",
|
|
2289
|
+
"link",
|
|
2290
|
+
"comment",
|
|
2291
|
+
"badges",
|
|
2292
|
+
"loose",
|
|
2293
|
+
"volatile"
|
|
2294
|
+
]) copy(key, meta[key]);
|
|
2295
|
+
if (meta.pattern?.flags) copy("patternFlags", meta.pattern.flags);
|
|
2296
|
+
if (node.type === "union") native.branchSelection = "first-success";
|
|
2297
|
+
if (acceptsMissing === "unknown") native.omissionValidation = "runtime";
|
|
2298
|
+
if (ownLimitations.length) {
|
|
2299
|
+
native.type = node.type;
|
|
2300
|
+
for (const key of [
|
|
2301
|
+
"min",
|
|
2302
|
+
"max",
|
|
2303
|
+
"step",
|
|
2304
|
+
"pattern"
|
|
2305
|
+
]) copy(key, meta[key]);
|
|
2306
|
+
native.limitations = ownLimitations;
|
|
2307
|
+
}
|
|
2308
|
+
if (Object.keys(native).length) annotations["x-cordis"] = native;
|
|
2309
|
+
const input = nullable(core, acceptsMissing !== false);
|
|
2310
|
+
projection = {
|
|
2311
|
+
schema: {
|
|
2312
|
+
...typeof input === "boolean" ? input ? {} : { not: {} } : input,
|
|
2313
|
+
...annotations
|
|
2314
|
+
},
|
|
2315
|
+
acceptsMissing,
|
|
2316
|
+
exact: exact && acceptsMissing !== "unknown",
|
|
2317
|
+
recursive,
|
|
2318
|
+
effectful: unsupported || node.type === "transform" || !!meta.loose || children.some((child) => child.effectful),
|
|
2319
|
+
mutating
|
|
2320
|
+
};
|
|
2321
|
+
}
|
|
2322
|
+
active.delete(key);
|
|
2323
|
+
const name = recursiveNames.get(key);
|
|
2324
|
+
if (name !== void 0) {
|
|
2325
|
+
definitions[name] = projection.schema;
|
|
2326
|
+
projection = {
|
|
2327
|
+
...projection,
|
|
2328
|
+
schema: { $ref: `#/$defs/${name}` }
|
|
2329
|
+
};
|
|
2330
|
+
}
|
|
2331
|
+
completed.set(key, projection);
|
|
2332
|
+
return projection;
|
|
2333
|
+
};
|
|
2334
|
+
const result = visit(root, "config");
|
|
2335
|
+
const schema = expressions(result.schema);
|
|
2336
|
+
return {
|
|
2337
|
+
schema: metadataEffects.length ? { anyOf: [schema, {}] } : schema,
|
|
2338
|
+
definitions: Object.fromEntries(Object.entries(definitions).map(([key, value]) => [key, expressions(value, false)])),
|
|
2339
|
+
acceptsMissing: metadataEffects.length ? "unknown" : result.acceptsMissing,
|
|
2340
|
+
limitations: [...new Set(limitations)]
|
|
2341
|
+
};
|
|
2342
|
+
};
|
|
2343
|
+
}
|
|
2344
|
+
//#endregion
|
|
2345
|
+
//#region lib/types/config-schema/document.js
|
|
2346
|
+
/** Compose Loader entry/patch structure and discovered plugin input schemas into one JSON Schema document. */
|
|
2347
|
+
const ref = (name) => ({ $ref: `#/$defs/${name}` });
|
|
2348
|
+
function metadata() {
|
|
2349
|
+
return {
|
|
2350
|
+
id: {
|
|
2351
|
+
type: "string",
|
|
2352
|
+
description: "Entry id. Loader generates an id when an entry omits it; patches use the configured id."
|
|
2353
|
+
},
|
|
2354
|
+
name: {
|
|
2355
|
+
type: "string",
|
|
2356
|
+
description: "Plugin module specifier. Inserted relative plugin paths are anchored beside their patch file."
|
|
2357
|
+
},
|
|
2358
|
+
config: {},
|
|
2359
|
+
group: {
|
|
2360
|
+
type: ["boolean", "null"],
|
|
2361
|
+
description: "Allows patch indexing and insertion into an entry-list config; does not select the plugin implementation."
|
|
2362
|
+
},
|
|
2363
|
+
disabled: {
|
|
2364
|
+
anyOf: [{ type: ["boolean", "null"] }, ref("loaderExpression")],
|
|
2365
|
+
description: "Boolean or !!js expression. The Loader coerces other truthy values as disabled; this schema rejects them."
|
|
2366
|
+
},
|
|
2367
|
+
inject: { anyOf: [
|
|
2368
|
+
{
|
|
2369
|
+
type: "array",
|
|
2370
|
+
items: { type: "string" }
|
|
2371
|
+
},
|
|
2372
|
+
{ type: "object" },
|
|
2373
|
+
{ type: "null" }
|
|
2374
|
+
] },
|
|
2375
|
+
intercept: { type: ["object", "null"] },
|
|
2376
|
+
isolate: {
|
|
2377
|
+
type: ["object", "null"],
|
|
2378
|
+
additionalProperties: { anyOf: [{ const: true }, { type: "string" }] }
|
|
2379
|
+
}
|
|
2380
|
+
};
|
|
2381
|
+
}
|
|
2382
|
+
function patchStructure() {
|
|
2383
|
+
return {
|
|
2384
|
+
type: "object",
|
|
2385
|
+
allOf: [ref("entryMetadata")],
|
|
2386
|
+
properties: { insert: ref("entryList") },
|
|
2387
|
+
description: "An insert appends entries, optionally inside the group identified by id. Other patches replace supplied fields; config is replaced wholesale, not deep-merged. A truthy name asserts the existing plugin name rather than renaming it. Unknown targets and non-insert patches without a nonempty id are warned and skipped."
|
|
2388
|
+
};
|
|
2389
|
+
}
|
|
2390
|
+
/**
|
|
2391
|
+
* Build a schema for the composed entry list and a separately addressable root-tree patch list.
|
|
2392
|
+
* Unknown plugin names remain open; only collected schemas supply plugin-specific constraints.
|
|
2393
|
+
* @param profile - selected profile name.
|
|
2394
|
+
* @param collected - declarations discovered without mounting plugins, including include descendants.
|
|
2395
|
+
* @param targets - last-id-wins patch targets from the root tree's patch index, excluding include descendants.
|
|
2396
|
+
* @param initialDiagnostics - composition and import diagnostics already collected.
|
|
2397
|
+
* @returns one JSON Schema document with explicit collection and projection annotations.
|
|
2398
|
+
*/
|
|
2399
|
+
async function buildConfigSchemaDocument(profile, collected, targets, initialDiagnostics) {
|
|
2400
|
+
const project = await createConfigProjector();
|
|
2401
|
+
const diagnostics = [...initialDiagnostics];
|
|
2402
|
+
const definitions = {
|
|
2403
|
+
loaderExpression: LOADER_EXPRESSION_SCHEMA,
|
|
2404
|
+
entryMetadata: {
|
|
2405
|
+
type: "object",
|
|
2406
|
+
properties: metadata()
|
|
2407
|
+
},
|
|
2408
|
+
entryList: {
|
|
2409
|
+
type: "array",
|
|
2410
|
+
items: ref("entry")
|
|
2411
|
+
},
|
|
2412
|
+
patchList: {
|
|
2413
|
+
type: "array",
|
|
2414
|
+
items: ref("patch")
|
|
2415
|
+
},
|
|
2416
|
+
unknownConfig: { $comment: "No projected Config schema is available; this is unknown configuration, not a prohibition on fields." },
|
|
2417
|
+
includeConfig: {
|
|
2418
|
+
type: "object",
|
|
2419
|
+
required: ["path"],
|
|
2420
|
+
properties: {
|
|
2421
|
+
path: {
|
|
2422
|
+
type: "string",
|
|
2423
|
+
description: "YAML/JSON filename resolved relative to the owning Loader tree. This field is literal, not a !!js expression."
|
|
2424
|
+
},
|
|
2425
|
+
initial: ref("entryList"),
|
|
2426
|
+
patches: {
|
|
2427
|
+
type: "array",
|
|
2428
|
+
items: ref("includePatch")
|
|
2429
|
+
},
|
|
2430
|
+
enableLogs: { type: "boolean" }
|
|
2431
|
+
},
|
|
2432
|
+
description: "Native Include configuration stays literal. initial is used only when the file is absent. Included files have their own module-resolution base and patch target index."
|
|
2433
|
+
},
|
|
2434
|
+
includePatch: patchStructure()
|
|
2435
|
+
};
|
|
2436
|
+
const entries = [];
|
|
2437
|
+
const outputByEntry = /* @__PURE__ */ new Map();
|
|
2438
|
+
const projections = /* @__PURE__ */ new Map();
|
|
2439
|
+
const trees = new Set(["#/$defs/entryList", "#/$defs/includeConfig"]);
|
|
2440
|
+
const requiredConfigs = new Set(trees);
|
|
2441
|
+
const names = new Map([["cordis:group", new Set(["#/$defs/entryList"])], ["cordis:include", new Set(["#/$defs/includeConfig"])]]);
|
|
2442
|
+
for (const entry of collected) {
|
|
2443
|
+
const { native, ...output } = entry;
|
|
2444
|
+
if (entry.tree) output.configRef = entry.tree === "group" ? "#/$defs/entryList" : "#/$defs/includeConfig";
|
|
2445
|
+
else if (native) {
|
|
2446
|
+
let projection = projections.get(native);
|
|
2447
|
+
if (projection === void 0) {
|
|
2448
|
+
const name = `config${projections.size}`;
|
|
2449
|
+
try {
|
|
2450
|
+
const result = project(native, name);
|
|
2451
|
+
definitions[name] = result.schema;
|
|
2452
|
+
Object.assign(definitions, result.definitions);
|
|
2453
|
+
projection = {
|
|
2454
|
+
reference: `#/$defs/${name}`,
|
|
2455
|
+
required: result.acceptsMissing === false,
|
|
2456
|
+
limitations: result.limitations
|
|
2457
|
+
};
|
|
2458
|
+
projections.set(native, projection);
|
|
2459
|
+
} catch (error) {
|
|
2460
|
+
output.status = "error";
|
|
2461
|
+
diagnostics.push({
|
|
2462
|
+
level: "error",
|
|
2463
|
+
path: entry.path,
|
|
2464
|
+
message: error instanceof Error ? error.message : String(error)
|
|
2465
|
+
});
|
|
2466
|
+
}
|
|
2467
|
+
}
|
|
2468
|
+
if (projection) {
|
|
2469
|
+
output.configRef = projection.reference;
|
|
2470
|
+
output.status = projection.limitations.length ? "partial" : "schema";
|
|
2471
|
+
if (projection.required) requiredConfigs.add(projection.reference);
|
|
2472
|
+
for (const message of projection.limitations) diagnostics.push({
|
|
2473
|
+
level: "warning",
|
|
2474
|
+
path: entry.path,
|
|
2475
|
+
message
|
|
2476
|
+
});
|
|
2477
|
+
}
|
|
2478
|
+
}
|
|
2479
|
+
output.configRef ??= "#/$defs/unknownConfig";
|
|
2480
|
+
entries.push(output);
|
|
2481
|
+
outputByEntry.set(entry, output);
|
|
2482
|
+
if (entry.name !== void 0) {
|
|
2483
|
+
const choices = names.get(entry.name) ?? /* @__PURE__ */ new Set();
|
|
2484
|
+
choices.add(output.configRef);
|
|
2485
|
+
names.set(entry.name, choices);
|
|
2486
|
+
}
|
|
2487
|
+
}
|
|
2488
|
+
const dormant = {
|
|
2489
|
+
properties: {
|
|
2490
|
+
disabled: { anyOf: [{ const: true }, ref("loaderExpression")] },
|
|
2491
|
+
group: { not: { const: true } }
|
|
2492
|
+
},
|
|
2493
|
+
required: ["disabled"]
|
|
2494
|
+
};
|
|
2495
|
+
const entryRules = [];
|
|
2496
|
+
for (const [name, choices] of names) {
|
|
2497
|
+
const validated = { properties: { config: { anyOf: [...choices].map((reference) => ({ $ref: reference })) } } };
|
|
2498
|
+
let then = validated;
|
|
2499
|
+
if ([...choices].every((reference) => requiredConfigs.has(reference))) {
|
|
2500
|
+
then = {
|
|
2501
|
+
if: dormant,
|
|
2502
|
+
else: {
|
|
2503
|
+
...validated,
|
|
2504
|
+
required: ["config"]
|
|
2505
|
+
}
|
|
2506
|
+
};
|
|
2507
|
+
if (![...choices].every((reference) => trees.has(reference))) then.then = validated;
|
|
2508
|
+
}
|
|
2509
|
+
entryRules.push({
|
|
2510
|
+
if: {
|
|
2511
|
+
properties: { name: { const: name } },
|
|
2512
|
+
required: ["name"]
|
|
2513
|
+
},
|
|
2514
|
+
then
|
|
2515
|
+
});
|
|
2516
|
+
if (choices.size > 1) diagnostics.push({
|
|
2517
|
+
level: "warning",
|
|
2518
|
+
message: `Plugin ${JSON.stringify(name)} has multiple collected schemas; entry validation accepts their union because module resolution depends on the owning tree.`
|
|
2519
|
+
});
|
|
2520
|
+
}
|
|
2521
|
+
definitions.entry = {
|
|
2522
|
+
type: "object",
|
|
2523
|
+
required: ["name"],
|
|
2524
|
+
allOf: [ref("entryMetadata"), ...entryRules],
|
|
2525
|
+
description: "Loader entry. Unknown metadata and plugin names are accepted; plugin-specific validation is available only for the names collected in this profile. Distinct resolutions of one name use a union of their schemas."
|
|
2526
|
+
};
|
|
2527
|
+
const patchRules = [];
|
|
2528
|
+
for (const [id, target] of targets) {
|
|
2529
|
+
if (target.name === void 0) continue;
|
|
2530
|
+
const configRef = outputByEntry.get(target)?.configRef ?? "#/$defs/unknownConfig";
|
|
2531
|
+
patchRules.push({
|
|
2532
|
+
if: {
|
|
2533
|
+
required: ["id"],
|
|
2534
|
+
properties: { id: { const: id } },
|
|
2535
|
+
allOf: [{ not: { required: ["insert"] } }, { anyOf: [{ not: { required: ["name"] } }, { properties: { name: { enum: ["", target.name] } } }] }]
|
|
2536
|
+
},
|
|
2537
|
+
then: { properties: { config: { $ref: configRef } } }
|
|
2538
|
+
});
|
|
2539
|
+
}
|
|
2540
|
+
definitions.patch = {
|
|
2541
|
+
...patchStructure(),
|
|
2542
|
+
allOf: [ref("entryMetadata"), ...patchRules]
|
|
2543
|
+
};
|
|
2544
|
+
const positions = new Map(entries.map((entry, index) => [entry.path, index]));
|
|
2545
|
+
diagnostics.sort((left, right) => (positions.get(left.path ?? "") ?? -1) - (positions.get(right.path ?? "") ?? -1));
|
|
2546
|
+
return {
|
|
2547
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
2548
|
+
title: `Cordis configuration for profile ${profile}`,
|
|
2549
|
+
description: "Describes the parsed entry-list YAML printed by --dump-config. Use $defs.patchList for a profile/home/CLI overlay. Parse !!js with the Cordis entry-list YAML dialect. Expression results, service dependencies, plugin startup checks, and sequence-dependent patch targets still require runtime validation.",
|
|
2550
|
+
$comment: "Bundle, profile, home, and CLI layers apply in that order. A patch config replaces the whole config. JSON Schema defaults are annotations; Schemastery validates a fallback on null/omission unless required rejects it first. Schemastery unions select the first successful branch. Root patch id constraints describe the current index, not ids introduced or changed by earlier patches. Include-local patches have a separate index. Relative plugin insertions require their source patch directory; this document does not infer future overlay locations.",
|
|
2551
|
+
type: "array",
|
|
2552
|
+
items: ref("entry"),
|
|
2553
|
+
$defs: definitions,
|
|
2554
|
+
"x-cordis": {
|
|
2555
|
+
profile,
|
|
2556
|
+
complete: !diagnostics.some((item) => item.level === "error") && !entries.some((entry) => [
|
|
2557
|
+
"partial",
|
|
2558
|
+
"unsupported",
|
|
2559
|
+
"error"
|
|
2560
|
+
].includes(entry.status)) && ![...names.values()].some((choices) => choices.size > 1),
|
|
2561
|
+
entries,
|
|
2562
|
+
diagnostics,
|
|
2563
|
+
patchSchema: "#/$defs/patchList"
|
|
2564
|
+
}
|
|
2565
|
+
};
|
|
2566
|
+
}
|
|
2567
|
+
//#endregion
|
|
2568
|
+
//#region lib/types/config-schema/collect.js
|
|
2569
|
+
/** Boot-free inspection of declared plugin Config schemas using profile module resolution. */
|
|
2570
|
+
function objectLike(value) {
|
|
2571
|
+
return value !== null && (typeof value === "object" || typeof value === "function");
|
|
2572
|
+
}
|
|
2573
|
+
function record(value) {
|
|
2574
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
2575
|
+
}
|
|
2576
|
+
function configOf(plugin) {
|
|
2577
|
+
return objectLike(plugin) ? Reflect.get(plugin, "Config") : void 0;
|
|
2578
|
+
}
|
|
2579
|
+
function validateMetadata(row) {
|
|
2580
|
+
for (const key of ["id", "name"]) {
|
|
2581
|
+
const value = Reflect.get(row, key);
|
|
2582
|
+
if (value !== void 0 && typeof value !== "string") throw new Error(`${key} must be a literal string`);
|
|
2583
|
+
}
|
|
2584
|
+
const group = Reflect.get(row, "group");
|
|
2585
|
+
if (group !== void 0 && group !== null && typeof group !== "boolean") throw new Error("group must be a literal boolean or null");
|
|
2586
|
+
}
|
|
2587
|
+
function validateEntry(value) {
|
|
2588
|
+
if (!record(value) || typeof value.name !== "string") throw new Error("each entry must be a mapping with a literal plugin name");
|
|
2589
|
+
validateMetadata(value);
|
|
2590
|
+
}
|
|
2591
|
+
function entryList(value) {
|
|
2592
|
+
if (value === void 0) throw new Error("entry list config is missing");
|
|
2593
|
+
if (!Array.isArray(value)) throw new Error("expected a literal entry list; config expressions are not evaluated");
|
|
2594
|
+
return value;
|
|
2595
|
+
}
|
|
2596
|
+
function includePatches(value) {
|
|
2597
|
+
if (value === void 0) return void 0;
|
|
2598
|
+
if (!Array.isArray(value)) throw new Error("include patches must be a literal patch list; config expressions are not evaluated");
|
|
2599
|
+
for (const patch of value) {
|
|
2600
|
+
if (!record(patch) || isJsExpr(patch)) throw new Error("include patches must be literal mappings; config expressions are not evaluated");
|
|
2601
|
+
validateMetadata(patch);
|
|
2602
|
+
if (patch.insert !== void 0) entryList(patch.insert);
|
|
2603
|
+
}
|
|
2604
|
+
return value;
|
|
2605
|
+
}
|
|
2606
|
+
/**
|
|
2607
|
+
* Generate JSON Schema from parsed entry rows and root-tree patches without applying plugins or evaluating expressions.
|
|
2608
|
+
* Imports, Config getters, and lazy schema builders execute trusted plugin code; transform callbacks do not. Calls must not overlap
|
|
2609
|
+
* another profile-resolution interception; module imports remain cached after the interception is released.
|
|
2610
|
+
* @param profile - prepared profile whose directory anchors root module and include resolution.
|
|
2611
|
+
* @param entries - unvalidated rows from profile composition; malformed rows become positioned diagnostics without losing siblings.
|
|
2612
|
+
* @param resolution - the same immutable package resolution used for profile boot.
|
|
2613
|
+
* @param diagnostics - existing composition diagnostics; copied into the returned catalog.
|
|
2614
|
+
* @returns a JSON Schema document with partial-result diagnostics and Config references under `x-cordis`.
|
|
2615
|
+
* @throws when Node's profile module resolution cannot be installed.
|
|
2616
|
+
*/
|
|
2617
|
+
async function collectConfigSchemas(profile, entries, resolution, diagnostics = []) {
|
|
2618
|
+
const result = {
|
|
2619
|
+
entries: [],
|
|
2620
|
+
diagnostics: [...diagnostics]
|
|
2621
|
+
};
|
|
2622
|
+
const byOptions = /* @__PURE__ */ new Map();
|
|
2623
|
+
const interception = installRuntimeInterception(resolution);
|
|
2624
|
+
try {
|
|
2625
|
+
const loader = ModuleLoader.fromInternal();
|
|
2626
|
+
if (loader === void 0) throw new Error("config schema dump requires the Node module loader used by profile resolution");
|
|
2627
|
+
const builtins = {
|
|
2628
|
+
group: Group,
|
|
2629
|
+
include: Include
|
|
2630
|
+
};
|
|
2631
|
+
const nativeCarriers = /* @__PURE__ */ new Map();
|
|
2632
|
+
const carrier = async (plugin, baseUrl) => {
|
|
2633
|
+
if (plugin === Group) return "group";
|
|
2634
|
+
if (plugin === Include) return "include";
|
|
2635
|
+
if (!objectLike(plugin) || !Reflect.get(plugin, EntryGroup.key)) return void 0;
|
|
2636
|
+
let resolved = nativeCarriers.get(baseUrl);
|
|
2637
|
+
if (resolved === void 0) {
|
|
2638
|
+
resolved = Promise.allSettled([loader.import("@deepseek-ai/cordis-plugin-group", baseUrl, {}), loader.import("@deepseek-ai/cordis-plugin-include", baseUrl, {})]).then(([group, include]) => {
|
|
2639
|
+
return {
|
|
2640
|
+
group: group.status === "fulfilled" ? Loader.prototype.unwrapExports(group.value) : void 0,
|
|
2641
|
+
include: include.status === "fulfilled" ? Loader.prototype.unwrapExports(include.value) : void 0
|
|
2642
|
+
};
|
|
2643
|
+
});
|
|
2644
|
+
nativeCarriers.set(baseUrl, resolved);
|
|
2645
|
+
}
|
|
2646
|
+
const native = await resolved;
|
|
2647
|
+
if (plugin === native.group) return "group";
|
|
2648
|
+
if (plugin === native.include) return "include";
|
|
2649
|
+
throw new Error("unrecognized Loader tree carrier; use cordis:group or cordis:include for native child collection");
|
|
2650
|
+
};
|
|
2651
|
+
const ancestors = /* @__PURE__ */ new Set();
|
|
2652
|
+
const report = (path, error) => {
|
|
2653
|
+
result.diagnostics.push({
|
|
2654
|
+
level: "error",
|
|
2655
|
+
path,
|
|
2656
|
+
message: error instanceof Error ? error.message : String(error)
|
|
2657
|
+
});
|
|
2658
|
+
};
|
|
2659
|
+
const warn = (path) => (message, ...args) => {
|
|
2660
|
+
let index = 0;
|
|
2661
|
+
result.diagnostics.push({
|
|
2662
|
+
level: "warning",
|
|
2663
|
+
path,
|
|
2664
|
+
message: message.replace(/%C/g, () => JSON.stringify(args[index++]))
|
|
2665
|
+
});
|
|
2666
|
+
};
|
|
2667
|
+
const walkInclude = async (config, baseUrl, path) => {
|
|
2668
|
+
if (config === void 0) throw new Error("include config is missing");
|
|
2669
|
+
if (!record(config) || isJsExpr(config)) throw new Error("include config must be literal; config expressions are not evaluated");
|
|
2670
|
+
if (typeof config.path !== "string") throw new Error("include path must be literal; config expressions are not evaluated");
|
|
2671
|
+
const filename = fileURLToPath(new URL(config.path, baseUrl));
|
|
2672
|
+
const extension = extname(filename);
|
|
2673
|
+
if (![
|
|
2674
|
+
".json",
|
|
2675
|
+
".yaml",
|
|
2676
|
+
".yml"
|
|
2677
|
+
].includes(extension)) throw new Error(`include extension ${JSON.stringify(extension)} is not supported`);
|
|
2678
|
+
let source;
|
|
2679
|
+
let canonical;
|
|
2680
|
+
try {
|
|
2681
|
+
canonical = await realpath(filename);
|
|
2682
|
+
} catch (error) {
|
|
2683
|
+
if (error.code !== "ENOENT") throw error;
|
|
2684
|
+
canonical = filename;
|
|
2685
|
+
}
|
|
2686
|
+
if (ancestors.has(canonical)) throw new Error(`include cycle at ${filename}`);
|
|
2687
|
+
let content;
|
|
2688
|
+
try {
|
|
2689
|
+
content = await readFile(filename, "utf8");
|
|
2690
|
+
} catch (error) {
|
|
2691
|
+
if (error.code !== "ENOENT") throw error;
|
|
2692
|
+
source = config.initial;
|
|
2693
|
+
if (source === void 0) throw new Error(`include file not found: ${filename}`);
|
|
2694
|
+
}
|
|
2695
|
+
if (content !== void 0) try {
|
|
2696
|
+
source = extension === ".json" ? JSON.parse(content) : yaml.load(content, { schema: entryListSchema });
|
|
2697
|
+
} catch (error) {
|
|
2698
|
+
const at = error instanceof yaml.YAMLException ? ` at line ${error.mark.line + 1}, column ${error.mark.column + 1}` : "";
|
|
2699
|
+
throw new Error(`invalid ${extension === ".json" ? "JSON" : "YAML"} include ${filename}${at}`);
|
|
2700
|
+
}
|
|
2701
|
+
const patches = includePatches(config.patches);
|
|
2702
|
+
const rows = entryList(source);
|
|
2703
|
+
let children;
|
|
2704
|
+
try {
|
|
2705
|
+
children = applyEntryPatches(rows, patches, warn(path));
|
|
2706
|
+
} catch (error) {
|
|
2707
|
+
throw new Error(`include patches could not be composed for ${filename}; child declarations are unavailable`, { cause: error });
|
|
2708
|
+
}
|
|
2709
|
+
ancestors.add(canonical);
|
|
2710
|
+
try {
|
|
2711
|
+
await walk(children, new URL(".", pathToFileURL(filename)).href, `${path}/include`);
|
|
2712
|
+
} finally {
|
|
2713
|
+
ancestors.delete(canonical);
|
|
2714
|
+
}
|
|
2715
|
+
};
|
|
2716
|
+
const walk = async (rows, baseUrl, prefix) => {
|
|
2717
|
+
for (const [index, value] of rows.entries()) {
|
|
2718
|
+
const path = `${prefix}/${index}`;
|
|
2719
|
+
const identity = record(value) ? value : void 0;
|
|
2720
|
+
const entry = {
|
|
2721
|
+
path,
|
|
2722
|
+
...typeof identity?.id === "string" ? { id: identity.id } : {},
|
|
2723
|
+
...typeof identity?.name === "string" ? { name: identity.name } : {},
|
|
2724
|
+
status: "error"
|
|
2725
|
+
};
|
|
2726
|
+
result.entries.push(entry);
|
|
2727
|
+
const row = value;
|
|
2728
|
+
try {
|
|
2729
|
+
validateEntry(row);
|
|
2730
|
+
} catch (error) {
|
|
2731
|
+
report(path, error);
|
|
2732
|
+
continue;
|
|
2733
|
+
}
|
|
2734
|
+
entry.status = "absent";
|
|
2735
|
+
byOptions.set(row, entry);
|
|
2736
|
+
let plugin;
|
|
2737
|
+
try {
|
|
2738
|
+
let exports;
|
|
2739
|
+
if (row.name.startsWith("cordis:")) {
|
|
2740
|
+
const name = row.name.slice(7);
|
|
2741
|
+
if (!Object.hasOwn(builtins, name)) throw new Error(`unknown Cordis builtin ${JSON.stringify(row.name)}`);
|
|
2742
|
+
exports = builtins[name];
|
|
2743
|
+
} else exports = await loader.import(row.name, baseUrl, {});
|
|
2744
|
+
plugin = Loader.prototype.unwrapExports(exports);
|
|
2745
|
+
const schema = configOf(plugin);
|
|
2746
|
+
if (schema !== void 0 && schema !== null) if (!isNativeConfigSchema(schema)) {
|
|
2747
|
+
entry.status = "unsupported";
|
|
2748
|
+
report(path, "Config is not a native Schemastery schema");
|
|
2749
|
+
} else {
|
|
2750
|
+
entry.status = "schema";
|
|
2751
|
+
entry.native = schema;
|
|
2752
|
+
}
|
|
2753
|
+
} catch (error) {
|
|
2754
|
+
entry.status = "error";
|
|
2755
|
+
report(path, error);
|
|
2756
|
+
}
|
|
2757
|
+
try {
|
|
2758
|
+
const kind = await carrier(plugin, baseUrl);
|
|
2759
|
+
if (kind === void 0) continue;
|
|
2760
|
+
entry.tree = kind;
|
|
2761
|
+
if (row.config === void 0 && row.group !== true && (row.disabled === true || isJsExpr(row.disabled))) continue;
|
|
2762
|
+
if (kind === "group") await walk(entryList(row.config), baseUrl, `${path}/config`);
|
|
2763
|
+
else await walkInclude(row.config, baseUrl, path);
|
|
2764
|
+
} catch (error) {
|
|
2765
|
+
report(path, error);
|
|
2766
|
+
}
|
|
2767
|
+
}
|
|
2768
|
+
};
|
|
2769
|
+
await walk(entries, pathToFileURL(join(profile.dir, "cordis.yml")).href, "");
|
|
2770
|
+
const targets = /* @__PURE__ */ new Map();
|
|
2771
|
+
const indexTargets = (rows) => {
|
|
2772
|
+
for (const row of rows) {
|
|
2773
|
+
if (!record(row)) continue;
|
|
2774
|
+
if (typeof row.id === "string" && row.id) {
|
|
2775
|
+
const entry = byOptions.get(row);
|
|
2776
|
+
if (entry) targets.set(row.id, entry);
|
|
2777
|
+
else targets.delete(row.id);
|
|
2778
|
+
}
|
|
2779
|
+
if (row.group && Array.isArray(row.config)) indexTargets(row.config);
|
|
2780
|
+
}
|
|
2781
|
+
};
|
|
2782
|
+
indexTargets(entries);
|
|
2783
|
+
return await buildConfigSchemaDocument(profile.name, result.entries, targets, result.diagnostics);
|
|
2784
|
+
} finally {
|
|
2785
|
+
interception.dispose();
|
|
2786
|
+
}
|
|
2787
|
+
}
|
|
2788
|
+
//#endregion
|
|
2789
|
+
//#region lib/types/config-schema/index.js
|
|
2790
|
+
/** Profile schema generation: composition diagnostics, runtime resolution, and boot-free discovery. */
|
|
2791
|
+
/**
|
|
2792
|
+
* Generate JSON Schema for a prepared profile's ordered patch layers without mounting plugins or evaluating expressions.
|
|
2793
|
+
* Reads the profile manifest; imports, Config getters, and lazy builders execute trusted code. Native validators and
|
|
2794
|
+
* transform callbacks are not executed. Calls must not overlap another profile-resolution interception; collection
|
|
2795
|
+
* releases its interception on success or rejection, while Node retains imported modules. Supplied layers are not mutated.
|
|
2796
|
+
* Profile preparation, layer selection, process streams, and exit policy belong to the caller.
|
|
2797
|
+
* @param binName - the diagnostic prefix on thrown manifest errors.
|
|
2798
|
+
* @param profile - prepared on-disk profile whose directory anchors root module and include resolution.
|
|
2799
|
+
* @param layers - already parsed patch lists in application order, including caller-selected home and argv overlays.
|
|
2800
|
+
* @param installAnchor - package manifest anchoring the installation's runtime dependencies.
|
|
2801
|
+
* @returns a JSON Schema document with declaration references, partial results, and diagnostics under `x-cordis`.
|
|
2802
|
+
* @throws when profile metadata, composition, or runtime resolution cannot be prepared.
|
|
2803
|
+
*/
|
|
2804
|
+
async function generateConfigSchema(binName, profile, layers, installAnchor) {
|
|
2805
|
+
const diagnostics = [];
|
|
2806
|
+
const manifest = readProfileManifest(binName, profile.dir);
|
|
2807
|
+
for (const packageName of skippedProfileBundles(profile, manifest)) diagnostics.push({
|
|
2808
|
+
level: "error",
|
|
2809
|
+
message: `Selected profile bundle ${JSON.stringify(packageName)} could not be loaded; repair or remove its bundle selection.`
|
|
2810
|
+
});
|
|
2811
|
+
return collectConfigSchemas(profile, composeEntries(layers, (message) => diagnostics.push({
|
|
2812
|
+
level: "warning",
|
|
2813
|
+
message
|
|
2814
|
+
})), await createRuntimeResolution({
|
|
2815
|
+
installAnchor,
|
|
2816
|
+
profile
|
|
2817
|
+
}), diagnostics);
|
|
2818
|
+
}
|
|
2819
|
+
//#endregion
|
|
1863
2820
|
//#region lib/types/profile-resolution/service.js
|
|
1864
|
-
/** Package metadata resolved through one
|
|
2821
|
+
/** Package metadata resolved through one runtime interception. */
|
|
1865
2822
|
function readPackage(dir, fallbackName) {
|
|
1866
2823
|
const manifestPath = join(dir, "package.json");
|
|
1867
2824
|
if (!existsSync(manifestPath)) return void 0;
|
|
@@ -1879,31 +2836,30 @@ function readPackage(dir, fallbackName) {
|
|
|
1879
2836
|
/** Package lookup shared by metadata consumers in one profile process. */
|
|
1880
2837
|
var PluginPackages = class extends Service {
|
|
1881
2838
|
packages = /* @__PURE__ */ new Map();
|
|
1882
|
-
|
|
1883
|
-
behavior;
|
|
2839
|
+
interception;
|
|
1884
2840
|
disposeWorkerResolution;
|
|
1885
2841
|
constructor(ctx, config = {}) {
|
|
1886
2842
|
super(ctx, "pluginPackages");
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
this.
|
|
1891
|
-
this.resolver = resolver;
|
|
2843
|
+
if (config.resolution === void 0) return;
|
|
2844
|
+
const interception = installRuntimeInterception(config.resolution);
|
|
2845
|
+
this.disposeWorkerResolution = registerWorkerResolution(config.resolution);
|
|
2846
|
+
this.interception = interception;
|
|
1892
2847
|
ctx.effect(() => () => {
|
|
1893
2848
|
this.disposeWorkerResolution?.();
|
|
1894
|
-
|
|
2849
|
+
interception.dispose();
|
|
1895
2850
|
}, "profile package resolution");
|
|
1896
2851
|
}
|
|
1897
2852
|
/**
|
|
1898
|
-
* Publish
|
|
1899
|
-
*
|
|
2853
|
+
* Publish a complete successor generation for this process and subsequently created Workers.
|
|
2854
|
+
* Linked roots may be removed without unloading modules or clearing Node caches.
|
|
2855
|
+
* @param successor - fully constructed generation accepted by {@link RuntimeInterception.replace}.
|
|
1900
2856
|
*/
|
|
1901
|
-
replace(
|
|
1902
|
-
if (this.
|
|
1903
|
-
this.
|
|
2857
|
+
replace(successor) {
|
|
2858
|
+
if (this.interception === void 0) throw new Error("plugin-packages: runtime resolution is not installed");
|
|
2859
|
+
this.interception.replace(successor);
|
|
1904
2860
|
this.packages = /* @__PURE__ */ new Map();
|
|
1905
2861
|
this.disposeWorkerResolution?.();
|
|
1906
|
-
this.disposeWorkerResolution = registerWorkerResolution(
|
|
2862
|
+
this.disposeWorkerResolution = registerWorkerResolution(successor);
|
|
1907
2863
|
}
|
|
1908
2864
|
/**
|
|
1909
2865
|
* Locate the package named by a specifier without requiring a package export.
|
|
@@ -1914,7 +2870,7 @@ var PluginPackages = class extends Service {
|
|
|
1914
2870
|
packageOf(specifier, parentURL) {
|
|
1915
2871
|
const name = barePackageName(specifier);
|
|
1916
2872
|
if (name === void 0) return void 0;
|
|
1917
|
-
const dir = this.
|
|
2873
|
+
const dir = this.interception === void 0 ? packageDirFromParent(name, parentURL) : this.interception.packageDir(name, parentURL);
|
|
1918
2874
|
if (dir === void 0) return void 0;
|
|
1919
2875
|
const key = JSON.stringify({
|
|
1920
2876
|
dir,
|
|
@@ -1923,6 +2879,15 @@ var PluginPackages = class extends Service {
|
|
|
1923
2879
|
if (!this.packages.has(key)) this.packages.set(key, readPackage(dir, name));
|
|
1924
2880
|
return this.packages.get(key);
|
|
1925
2881
|
}
|
|
2882
|
+
/**
|
|
2883
|
+
* Read display metadata without loading or activating the target plugin.
|
|
2884
|
+
* @param specifier - configured package module, including package subpaths.
|
|
2885
|
+
* @param parentURL - owning Loader tree's resolution base.
|
|
2886
|
+
* @returns local display metadata or its diagnostic; undefined for non-package requests or absent metadata.
|
|
2887
|
+
*/
|
|
2888
|
+
metaOf(specifier, parentURL) {
|
|
2889
|
+
return readPluginMeta(specifier, parentURL);
|
|
2890
|
+
}
|
|
1926
2891
|
};
|
|
1927
2892
|
function packageDirFromParent(name, parentURL) {
|
|
1928
2893
|
for (const searchPath of createRequire(parentURL).resolve.paths(name)) {
|
|
@@ -2206,6 +3171,7 @@ async function reconcileProfilePatches(ctx, patches, binName, requiredIds = [])
|
|
|
2206
3171
|
const introduced = failures.filter((failure) => requiredIds.includes(failure.entry.options.id) || !previousFailures.some((previous) => previous.entry === failure.entry && previous.fiber === failure.entry.fiber && previous.options === JSON.stringify(failure.entry.options) && previous.diagnostic === inactiveDiagnostic(failure)));
|
|
2207
3172
|
if (introduced.length > 0) throw new Error(activationDiagnostic(binName, introduced).trimEnd());
|
|
2208
3173
|
for (const [index, result] of results.entries()) if (result.status === "rejected" && !previousFibers[index]?.failed) throw result.reason;
|
|
3174
|
+
ctx.emit("app-boot/config-reload");
|
|
2209
3175
|
return failures.map(inactiveDiagnostic);
|
|
2210
3176
|
}
|
|
2211
3177
|
/**
|
|
@@ -2821,4 +3787,4 @@ function addHarnessSourceSection(ctx, sourceRoot) {
|
|
|
2821
3787
|
});
|
|
2822
3788
|
}
|
|
2823
3789
|
//#endregion
|
|
2824
|
-
export { DEFAULT_PROFILE_BUNDLES, FAIL_LOUD_RELEASE_TIMEOUT_MS, HARNESS_SOURCE_SECTION, OPTIONAL_BUNDLES, PROFILES_DIR, PROFILE_PATCH_FILENAME, PROFILE_TEMPLATES, PluginPackages, StartupError, addHarnessSourceSection, auditStartupEntries, boot, composeEntries,
|
|
3790
|
+
export { DEFAULT_PROFILE_BUNDLES, FAIL_LOUD_RELEASE_TIMEOUT_MS, HARNESS_SOURCE_SECTION, LOADER_EXPRESSION_SCHEMA, OPTIONAL_BUNDLES, PROFILES_DIR, PROFILE_PATCH_FILENAME, PROFILE_TEMPLATES, PluginPackages, StartupError, addHarnessSourceSection, auditStartupEntries, boot, bundlePatchFiles, bundlePatchPaths, composeEntries, createConfigProjector, createRuntimeResolution, generateConfigSchema, initProfile, installFailLoud, isNativeConfigSchema, loadEnv, loadLayeredEnv, loadOptionalPatches, loadOverlayPatches, loadProfile, loadProfileDirectory, mountRootInclude, readPluginMeta, readProfileManifest, readProfilePatches, readProfilePlugins, reconcileProfilePatches, reconcileProfilePlugins, removeLinkProjections, renderConfigDump, resolveBundleDir, resolveConfigPath, resolveInvokingDirectory, resolveProfileDir, resolveTelemetryPatch, restoreInvokingDirectory, sanitizeProfile, writeProfileBundles, writeProfileManifest };
|