@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.
Files changed (1814) hide show
  1. package/README.md +1 -1
  2. package/bin/dsh.mjs +1 -1
  3. package/node_modules/@deepseek-ai/cordis/README.md +4 -0
  4. package/node_modules/@deepseek-ai/cordis/package.json +4 -4
  5. package/node_modules/@deepseek-ai/cordis/src/index.ts +2 -0
  6. package/node_modules/@deepseek-ai/cordis-plugin-group/package.json +3 -3
  7. package/node_modules/@deepseek-ai/cordis-plugin-include/package.json +4 -4
  8. package/node_modules/@deepseek-ai/cordis-plugin-loader/README.md +4 -0
  9. package/node_modules/@deepseek-ai/cordis-plugin-loader/lib/index.js +87 -7
  10. package/node_modules/@deepseek-ai/cordis-plugin-loader/package.json +4 -3
  11. package/node_modules/@deepseek-ai/cordis-plugin-loader/src/config/diff.ts +45 -0
  12. package/node_modules/@deepseek-ai/cordis-plugin-loader/src/config/entry.ts +53 -7
  13. package/node_modules/@deepseek-ai/cordis-plugin-loader/src/index.ts +13 -1
  14. package/node_modules/@deepseek-ai/cordis-plugin-timer/package.json +3 -3
  15. package/node_modules/@deepseek-ai/cosmokit/README.md +6 -0
  16. package/node_modules/@deepseek-ai/cosmokit/lib/index.js +112 -19
  17. package/node_modules/@deepseek-ai/cosmokit/package.json +1 -1
  18. package/node_modules/@deepseek-ai/cosmokit/src/index.ts +2 -0
  19. package/node_modules/@deepseek-ai/cosmokit/src/types.ts +49 -23
  20. package/node_modules/@deepseek-ai/cosmokit/src/volatile.ts +86 -0
  21. package/node_modules/@deepseek-ai/dsh/README.i18n.yaml +2 -2
  22. package/node_modules/@deepseek-ai/dsh/README.md +1 -1
  23. package/node_modules/@deepseek-ai/dsh/README.zh.md +1 -1
  24. package/node_modules/@deepseek-ai/dsh/lib/bin.js +21 -5
  25. package/node_modules/@deepseek-ai/dsh/lib/{dump-config-Bb5YvFIX.js → dump-config-C-0P1h0W.js} +14 -3
  26. package/node_modules/@deepseek-ai/dsh/lib/dump-config-DaAE0NHG.js +2 -0
  27. package/node_modules/@deepseek-ai/dsh/lib/dump-config-schema-BgEU7VYz.js +41 -0
  28. package/node_modules/@deepseek-ai/dsh/lib/{plugin-DJ-rVHUS.js → plugin-CnNK4cws.js} +1 -1
  29. package/node_modules/@deepseek-ai/dsh/lib/{profile-boot-BNu17Y9U.js → profile-boot-DIiro1p-.js} +8 -15
  30. package/node_modules/@deepseek-ai/dsh/lib/profile-boot.js +1 -1
  31. package/node_modules/@deepseek-ai/dsh/package.json +113 -119
  32. package/node_modules/@deepseek-ai/dsh-acp/lib/index.js +7 -6
  33. package/node_modules/@deepseek-ai/dsh-acp/package.json +25 -25
  34. package/node_modules/@deepseek-ai/dsh-acp-app/package.json +6 -6
  35. package/node_modules/@deepseek-ai/dsh-agent/README.i18n.yaml +2 -2
  36. package/node_modules/@deepseek-ai/dsh-agent/README.md +3 -0
  37. package/node_modules/@deepseek-ai/dsh-agent/README.zh.md +3 -0
  38. package/node_modules/@deepseek-ai/dsh-agent/lib/index.js +40 -6
  39. package/node_modules/@deepseek-ai/dsh-agent/lib/types/archive-admission.js +35 -0
  40. package/node_modules/@deepseek-ai/dsh-agent/lib/types/consumed-work.js +5 -4
  41. package/node_modules/@deepseek-ai/dsh-agent/lib/types/index.js +4 -0
  42. package/node_modules/@deepseek-ai/dsh-agent/lib/types/model-selection.js +1 -2
  43. package/node_modules/@deepseek-ai/dsh-agent/package.json +27 -20
  44. package/node_modules/@deepseek-ai/dsh-agent-default-model/README.i18n.yaml +2 -2
  45. package/node_modules/@deepseek-ai/dsh-agent-default-model/README.md +9 -9
  46. package/node_modules/@deepseek-ai/dsh-agent-default-model/README.zh.md +9 -9
  47. package/node_modules/@deepseek-ai/dsh-agent-default-model/lib/index.js +26 -39
  48. package/node_modules/@deepseek-ai/dsh-agent-default-model/package.json +10 -10
  49. package/node_modules/@deepseek-ai/dsh-agent-instructions/lib/index.js +3 -2
  50. package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +25 -25
  51. package/node_modules/@deepseek-ai/dsh-agent-loop/README.i18n.yaml +2 -2
  52. package/node_modules/@deepseek-ai/dsh-agent-loop/README.md +3 -1
  53. package/node_modules/@deepseek-ai/dsh-agent-loop/README.zh.md +3 -1
  54. package/node_modules/@deepseek-ai/dsh-agent-loop/lib/index.js +39 -49
  55. package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +26 -28
  56. package/node_modules/@deepseek-ai/{dsh-agent-presets → dsh-agent-preset}/README.i18n.yaml +3 -3
  57. package/node_modules/@deepseek-ai/dsh-agent-preset/README.md +94 -0
  58. package/node_modules/@deepseek-ai/dsh-agent-preset/README.zh.md +94 -0
  59. package/node_modules/@deepseek-ai/dsh-agent-preset/lib/index.js +29 -0
  60. package/node_modules/@deepseek-ai/dsh-agent-preset/package.json +49 -0
  61. package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-composition-reference/SKILL.md +29 -0
  62. package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-composition-reference/references/packages.md +506 -0
  63. package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/SKILL.md +38 -0
  64. package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/references/host-plugin.md +60 -0
  65. package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/references/mcp-bundle.md +5 -0
  66. package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/references/ui-plugin.md +13 -0
  67. package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/references/verification.md +5 -0
  68. package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/templates/decoration/client.js +22 -0
  69. package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/templates/decoration/cordis.patch.yml +3 -0
  70. package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/templates/decoration/index.js +2 -0
  71. package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/templates/decoration/package.json +15 -0
  72. package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/templates/mcp/cordis.patch.yml +8 -0
  73. package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/templates/mcp/package.json +7 -0
  74. package/node_modules/@deepseek-ai/dsh-agent-preset/skills/editing-cordis-compositions/SKILL.md +84 -0
  75. package/node_modules/@deepseek-ai/{dsh-api-authorization-controller → dsh-agent-preset-registry}/README.i18n.yaml +3 -3
  76. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/README.md +107 -0
  77. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/README.zh.md +107 -0
  78. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/index.js +781 -0
  79. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/invariant.js +806 -0
  80. package/node_modules/@deepseek-ai/{dsh-agent-presets → dsh-agent-preset-registry}/lib/typert.host.js +118 -270
  81. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/typert.remote-client.js +84 -0
  82. package/node_modules/@deepseek-ai/{dsh-agent-presets → dsh-agent-preset-registry}/lib/types/composition-inventory.js +9 -36
  83. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/types/definition.js +29 -0
  84. package/node_modules/@deepseek-ai/{dsh-agent-presets → dsh-agent-preset-registry}/lib/types/display.js +12 -3
  85. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/types/index.js +371 -0
  86. package/node_modules/@deepseek-ai/{dsh-agent-presets → dsh-agent-preset-registry}/lib/types/invariant.js +7 -19
  87. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/types/mount.js +243 -0
  88. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/types/preset.js +2 -0
  89. package/node_modules/@deepseek-ai/{dsh-agent-presets → dsh-agent-preset-registry}/lib/types/session.js +1 -1
  90. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/package.json +96 -0
  91. package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/README.i18n.yaml +2 -2
  92. package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/README.md +3 -3
  93. package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/README.zh.md +3 -3
  94. package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/package.json +11 -11
  95. package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +7 -7
  96. package/node_modules/@deepseek-ai/{dsh-settings-file → dsh-api-account-controller}/README.i18n.yaml +3 -3
  97. package/node_modules/@deepseek-ai/dsh-api-account-controller/README.md +53 -0
  98. package/node_modules/@deepseek-ai/dsh-api-account-controller/README.zh.md +53 -0
  99. package/node_modules/@deepseek-ai/dsh-api-account-controller/lib/index.js +209 -0
  100. package/node_modules/@deepseek-ai/dsh-api-account-controller/lib/typert.host.js +273 -0
  101. package/node_modules/@deepseek-ai/dsh-api-account-controller/lib/typert.remote-client.js +267 -0
  102. package/node_modules/@deepseek-ai/dsh-api-account-controller/lib/types/index.js +116 -0
  103. package/node_modules/@deepseek-ai/dsh-api-account-controller/lib/types/types.js +2 -0
  104. package/node_modules/@deepseek-ai/{dsh-api-authorization-controller → dsh-api-account-controller}/package.json +13 -20
  105. package/node_modules/@deepseek-ai/dsh-api-gateway/README.i18n.yaml +2 -2
  106. package/node_modules/@deepseek-ai/dsh-api-gateway/README.md +9 -4
  107. package/node_modules/@deepseek-ai/dsh-api-gateway/README.zh.md +9 -4
  108. package/node_modules/@deepseek-ai/dsh-api-gateway/lib/client.js +294 -51
  109. package/node_modules/@deepseek-ai/dsh-api-gateway/lib/index.js +516 -92
  110. package/node_modules/@deepseek-ai/dsh-api-gateway/lib/types/client/index.js +104 -14
  111. package/node_modules/@deepseek-ai/dsh-api-gateway/lib/types/client/remote-events.js +2 -2
  112. package/node_modules/@deepseek-ai/dsh-api-gateway/lib/types/client/stream-client.js +164 -11
  113. package/node_modules/@deepseek-ai/dsh-api-gateway/lib/types/index.js +322 -33
  114. package/node_modules/@deepseek-ai/dsh-api-gateway/lib/types/stream-protocol.js +10 -46
  115. package/node_modules/@deepseek-ai/dsh-api-gateway/lib/types/stream-server.js +210 -23
  116. package/node_modules/@deepseek-ai/dsh-api-gateway/package.json +18 -13
  117. package/node_modules/@deepseek-ai/{dsh-llm-cursor → dsh-api-job-controller}/README.i18n.yaml +3 -3
  118. package/node_modules/@deepseek-ai/dsh-api-job-controller/README.md +69 -0
  119. package/node_modules/@deepseek-ai/dsh-api-job-controller/README.zh.md +69 -0
  120. package/node_modules/@deepseek-ai/dsh-api-job-controller/lib/client.js +367 -0
  121. package/node_modules/@deepseek-ai/dsh-api-job-controller/lib/index.js +377 -0
  122. package/node_modules/@deepseek-ai/dsh-api-job-controller/lib/typert.host.js +273 -0
  123. package/node_modules/@deepseek-ai/dsh-api-job-controller/lib/typert.remote-client.js +181 -0
  124. package/node_modules/@deepseek-ai/dsh-api-job-controller/lib/types/client/index.js +23 -0
  125. package/node_modules/@deepseek-ai/dsh-api-job-controller/lib/types/client/model.js +164 -0
  126. package/node_modules/@deepseek-ai/dsh-api-job-controller/lib/types/client/service.js +182 -0
  127. package/node_modules/@deepseek-ai/dsh-api-job-controller/lib/types/index.js +150 -0
  128. package/node_modules/@deepseek-ai/dsh-api-job-controller/lib/types/observe.js +107 -0
  129. package/node_modules/@deepseek-ai/dsh-api-job-controller/lib/types/rows.js +43 -0
  130. package/node_modules/@deepseek-ai/dsh-api-job-controller/lib/types/types.js +8 -0
  131. package/node_modules/@deepseek-ai/dsh-api-job-controller/lib/types/wake.js +59 -0
  132. package/node_modules/@deepseek-ai/dsh-api-job-controller/package.json +82 -0
  133. package/node_modules/@deepseek-ai/dsh-api-remotes/README.i18n.yaml +2 -2
  134. package/node_modules/@deepseek-ai/dsh-api-remotes/README.md +2 -0
  135. package/node_modules/@deepseek-ai/dsh-api-remotes/README.zh.md +2 -0
  136. package/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +1751 -1017
  137. package/node_modules/@deepseek-ai/dsh-api-remotes/lib/types/client/index.js +7 -3
  138. package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +40 -39
  139. package/node_modules/@deepseek-ai/dsh-api-session-controller/README.i18n.yaml +2 -2
  140. package/node_modules/@deepseek-ai/dsh-api-session-controller/README.md +31 -8
  141. package/node_modules/@deepseek-ai/dsh-api-session-controller/README.zh.md +31 -8
  142. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/client.js +603 -515
  143. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/index.js +299 -137
  144. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.host.js +373 -183
  145. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.remote-client.js +216 -124
  146. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/archived-session-gate.js +52 -0
  147. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/lineage.js +2 -1
  148. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/manager.js +249 -277
  149. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/projection-store.js +45 -13
  150. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/service.js +35 -47
  151. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/session.js +112 -50
  152. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/commands.js +72 -36
  153. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/control.js +2 -44
  154. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/history.js +1 -1
  155. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/index.js +117 -13
  156. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/list.js +24 -15
  157. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/skill-catalog.js +60 -50
  158. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/types.js +0 -1
  159. package/node_modules/@deepseek-ai/dsh-api-session-controller/package.json +68 -72
  160. package/node_modules/@deepseek-ai/dsh-api-settings-controller/README.i18n.yaml +2 -2
  161. package/node_modules/@deepseek-ai/dsh-api-settings-controller/README.md +1 -2
  162. package/node_modules/@deepseek-ai/dsh-api-settings-controller/README.zh.md +1 -2
  163. package/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/index.js +6 -78
  164. package/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/typert.host.js +33 -99
  165. package/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/typert.remote-client.js +32 -80
  166. package/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/types/index.js +6 -61
  167. package/node_modules/@deepseek-ai/dsh-api-settings-controller/package.json +16 -16
  168. package/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/typert.host.js +50 -22
  169. package/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/typert.remote-client.js +4 -4
  170. package/node_modules/@deepseek-ai/dsh-api-terminal-controller/package.json +20 -19
  171. package/node_modules/@deepseek-ai/dsh-api-workspace-controller/README.i18n.yaml +2 -2
  172. package/node_modules/@deepseek-ai/dsh-api-workspace-controller/README.md +16 -2
  173. package/node_modules/@deepseek-ai/dsh-api-workspace-controller/README.zh.md +16 -2
  174. package/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/client.js +98 -6
  175. package/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/index.js +202 -15
  176. package/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/typert.host.js +161 -11
  177. package/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/typert.remote-client.js +121 -8
  178. package/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/client/index.js +4 -1
  179. package/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/client/model.js +70 -2
  180. package/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/client/service.js +33 -3
  181. package/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/commands.js +45 -7
  182. package/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/default-directory.js +65 -0
  183. package/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/feed.js +9 -1
  184. package/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/index.js +62 -5
  185. package/node_modules/@deepseek-ai/dsh-api-workspace-controller/package.json +21 -18
  186. package/node_modules/@deepseek-ai/dsh-api-workspace-files/README.i18n.yaml +2 -2
  187. package/node_modules/@deepseek-ai/dsh-api-workspace-files/README.md +26 -25
  188. package/node_modules/@deepseek-ai/dsh-api-workspace-files/README.zh.md +26 -25
  189. package/node_modules/@deepseek-ai/dsh-api-workspace-files/lib/client.js +41 -35
  190. package/node_modules/@deepseek-ai/dsh-api-workspace-files/lib/index.js +129 -121
  191. package/node_modules/@deepseek-ai/dsh-api-workspace-files/lib/typert.host.js +72 -141
  192. package/node_modules/@deepseek-ai/dsh-api-workspace-files/lib/typert.remote-client.js +61 -120
  193. package/node_modules/@deepseek-ai/dsh-api-workspace-files/lib/types/changes.js +106 -46
  194. package/node_modules/@deepseek-ai/dsh-api-workspace-files/lib/types/client/change-feed.js +34 -27
  195. package/node_modules/@deepseek-ai/dsh-api-workspace-files/lib/types/client/provider.js +13 -6
  196. package/node_modules/@deepseek-ai/dsh-api-workspace-files/lib/types/index.js +32 -53
  197. package/node_modules/@deepseek-ai/dsh-api-workspace-files/package.json +15 -14
  198. package/node_modules/@deepseek-ai/dsh-app-boot/README.i18n.yaml +2 -2
  199. package/node_modules/@deepseek-ai/dsh-app-boot/README.md +33 -15
  200. package/node_modules/@deepseek-ai/dsh-app-boot/README.zh.md +33 -15
  201. package/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +1647 -681
  202. package/node_modules/@deepseek-ai/dsh-app-boot/lib/worker/profile-resolution-bootstrap.js +255 -357
  203. package/node_modules/@deepseek-ai/dsh-app-boot/package.json +20 -18
  204. package/node_modules/@deepseek-ai/dsh-atomic-write/README.i18n.yaml +2 -2
  205. package/node_modules/@deepseek-ai/dsh-atomic-write/README.md +4 -4
  206. package/node_modules/@deepseek-ai/dsh-atomic-write/README.zh.md +4 -4
  207. package/node_modules/@deepseek-ai/dsh-atomic-write/package.json +3 -3
  208. package/node_modules/@deepseek-ai/dsh-attachment/package.json +5 -5
  209. package/node_modules/@deepseek-ai/dsh-attachment-local/package.json +9 -9
  210. package/node_modules/@deepseek-ai/dsh-authorization/README.i18n.yaml +2 -2
  211. package/node_modules/@deepseek-ai/dsh-authorization/README.md +2 -0
  212. package/node_modules/@deepseek-ai/dsh-authorization/README.zh.md +2 -0
  213. package/node_modules/@deepseek-ai/dsh-authorization/lib/index.js +16 -4
  214. package/node_modules/@deepseek-ai/dsh-authorization/lib/types/index.js +19 -4
  215. package/node_modules/@deepseek-ai/dsh-authorization/package.json +9 -9
  216. package/node_modules/@deepseek-ai/dsh-base/README.i18n.yaml +2 -2
  217. package/node_modules/@deepseek-ai/dsh-base/README.md +2 -0
  218. package/node_modules/@deepseek-ai/dsh-base/README.zh.md +2 -0
  219. package/node_modules/@deepseek-ai/dsh-base/cordis.patch.yml +20 -26
  220. package/node_modules/@deepseek-ai/dsh-base/package.json +94 -94
  221. package/node_modules/@deepseek-ai/dsh-bash-local/README.i18n.yaml +2 -2
  222. package/node_modules/@deepseek-ai/dsh-bash-local/README.md +7 -6
  223. package/node_modules/@deepseek-ai/dsh-bash-local/README.zh.md +7 -6
  224. package/node_modules/@deepseek-ai/dsh-bash-local/lib/index.js +153 -202
  225. package/node_modules/@deepseek-ai/dsh-bash-local/package.json +11 -13
  226. package/node_modules/@deepseek-ai/dsh-bash-sandbox/README.i18n.yaml +2 -2
  227. package/node_modules/@deepseek-ai/dsh-bash-sandbox/README.md +3 -3
  228. package/node_modules/@deepseek-ai/dsh-bash-sandbox/README.zh.md +3 -3
  229. package/node_modules/@deepseek-ai/dsh-bash-sandbox/lib/index.js +58 -63
  230. package/node_modules/@deepseek-ai/dsh-bash-sandbox/package.json +14 -14
  231. package/node_modules/@deepseek-ai/dsh-brand/package.json +3 -3
  232. package/node_modules/@deepseek-ai/dsh-chunked-list/package.json +3 -3
  233. package/node_modules/@deepseek-ai/dsh-client-connection/README.i18n.yaml +2 -2
  234. package/node_modules/@deepseek-ai/dsh-client-connection/README.md +7 -3
  235. package/node_modules/@deepseek-ai/dsh-client-connection/README.zh.md +7 -3
  236. package/node_modules/@deepseek-ai/dsh-client-connection/lib/client.js +169 -28
  237. package/node_modules/@deepseek-ai/dsh-client-connection/lib/index.js +98 -36
  238. package/node_modules/@deepseek-ai/dsh-client-connection/package.json +13 -10
  239. package/node_modules/@deepseek-ai/dsh-client-file-upload/lib/client.js +8 -12
  240. package/node_modules/@deepseek-ai/dsh-client-file-upload/lib/index.js +1 -0
  241. package/node_modules/@deepseek-ai/dsh-client-file-upload/lib/typert.host.js +46 -18
  242. package/node_modules/@deepseek-ai/dsh-client-file-upload/lib/types/client/runtime.js +5 -12
  243. package/node_modules/@deepseek-ai/dsh-client-file-upload/lib/types/protocol.js +5 -0
  244. package/node_modules/@deepseek-ai/dsh-client-file-upload/package.json +14 -14
  245. package/node_modules/@deepseek-ai/dsh-client-hmr/README.i18n.yaml +2 -2
  246. package/node_modules/@deepseek-ai/dsh-client-hmr/README.md +2 -2
  247. package/node_modules/@deepseek-ai/dsh-client-hmr/README.zh.md +2 -2
  248. package/node_modules/@deepseek-ai/dsh-client-hmr/lib/client.js +6 -4
  249. package/node_modules/@deepseek-ai/dsh-client-hmr/lib/index.js +8 -5
  250. package/node_modules/@deepseek-ai/dsh-client-hmr/package.json +8 -8
  251. package/node_modules/@deepseek-ai/dsh-client-locale/README.i18n.yaml +2 -2
  252. package/node_modules/@deepseek-ai/dsh-client-locale/README.md +9 -1
  253. package/node_modules/@deepseek-ai/dsh-client-locale/README.zh.md +9 -1
  254. package/node_modules/@deepseek-ai/dsh-client-locale/lib/client.js +225 -75
  255. package/node_modules/@deepseek-ai/dsh-client-locale/lib/index.js +9 -8
  256. package/node_modules/@deepseek-ai/dsh-client-locale/package.json +13 -11
  257. package/node_modules/@deepseek-ai/dsh-client-modules/README.i18n.yaml +2 -2
  258. package/node_modules/@deepseek-ai/dsh-client-modules/README.md +2 -1
  259. package/node_modules/@deepseek-ai/dsh-client-modules/README.zh.md +2 -1
  260. package/node_modules/@deepseek-ai/dsh-client-modules/lib/index.js +57 -36
  261. package/node_modules/@deepseek-ai/dsh-client-modules/lib/invariant.js +2 -2
  262. package/node_modules/@deepseek-ai/dsh-client-modules/package.json +8 -7
  263. package/node_modules/@deepseek-ai/dsh-client-resources/package.json +7 -6
  264. package/node_modules/@deepseek-ai/dsh-client-store/LICENSE +21 -0
  265. package/node_modules/@deepseek-ai/{dsh-client-ui-settings-unarchive-sessions → dsh-client-store}/README.i18n.yaml +3 -3
  266. package/node_modules/@deepseek-ai/dsh-client-store/README.md +48 -0
  267. package/node_modules/@deepseek-ai/dsh-client-store/README.zh.md +48 -0
  268. package/node_modules/@deepseek-ai/dsh-client-store/lib/index.js +180 -0
  269. package/node_modules/@deepseek-ai/dsh-client-store/lib/types/contract.d.ts +121 -0
  270. package/node_modules/@deepseek-ai/dsh-client-store/lib/types/index.d.ts +92 -0
  271. package/node_modules/@deepseek-ai/dsh-client-store/package.json +37 -0
  272. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/README.i18n.yaml +2 -2
  273. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/README.md +13 -31
  274. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/README.zh.md +22 -40
  275. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +865 -1033
  276. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/package.json +21 -19
  277. package/node_modules/@deepseek-ai/dsh-client-ui-approval/lib/client.js +3 -3
  278. package/node_modules/@deepseek-ai/dsh-client-ui-approval/package.json +14 -14
  279. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/README.i18n.yaml +2 -2
  280. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/README.md +1 -1
  281. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/README.zh.md +1 -1
  282. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/lib/client.js +28 -8
  283. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +11 -11
  284. package/node_modules/@deepseek-ai/dsh-client-ui-brand-official/package.json +6 -6
  285. package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.i18n.yaml +2 -2
  286. package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.md +62 -10
  287. package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.zh.md +60 -10
  288. package/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/client.js +4808 -1393
  289. package/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/index.js +37 -10
  290. package/node_modules/@deepseek-ai/dsh-client-ui-chat/package.json +41 -37
  291. package/node_modules/@deepseek-ai/dsh-client-ui-commands/README.i18n.yaml +2 -2
  292. package/node_modules/@deepseek-ai/dsh-client-ui-commands/README.md +2 -0
  293. package/node_modules/@deepseek-ai/dsh-client-ui-commands/README.zh.md +2 -0
  294. package/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +20 -12
  295. package/node_modules/@deepseek-ai/dsh-client-ui-commands/package.json +17 -16
  296. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.i18n.yaml +2 -2
  297. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.md +19 -5
  298. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.zh.md +19 -5
  299. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +1321 -349
  300. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/index.js +9 -8
  301. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +34 -32
  302. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/README.i18n.yaml +2 -2
  303. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/README.md +2 -2
  304. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/README.zh.md +2 -2
  305. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/lib/client.js +28 -25
  306. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/package.json +14 -14
  307. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/README.i18n.yaml +2 -2
  308. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/README.md +14 -7
  309. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/README.zh.md +14 -7
  310. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +628 -497
  311. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/index.js +17 -8
  312. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +31 -28
  313. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/lib/client.js +7 -7
  314. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/package.json +9 -9
  315. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-native/package.json +5 -5
  316. package/node_modules/@deepseek-ai/dsh-client-ui-goal/README.i18n.yaml +2 -2
  317. package/node_modules/@deepseek-ai/dsh-client-ui-goal/README.md +3 -1
  318. package/node_modules/@deepseek-ai/dsh-client-ui-goal/README.zh.md +3 -1
  319. package/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +18 -9
  320. package/node_modules/@deepseek-ai/dsh-client-ui-goal/package.json +16 -16
  321. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/lib/client.js +13 -7
  322. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/package.json +14 -13
  323. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/README.i18n.yaml +2 -2
  324. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/README.md +25 -18
  325. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/README.zh.md +29 -22
  326. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +413 -63
  327. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/index.js +5 -5
  328. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/package.json +26 -23
  329. package/node_modules/@deepseek-ai/dsh-client-ui-layout/README.i18n.yaml +2 -2
  330. package/node_modules/@deepseek-ai/dsh-client-ui-layout/README.md +6 -2
  331. package/node_modules/@deepseek-ai/dsh-client-ui-layout/README.zh.md +6 -2
  332. package/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js +75 -4
  333. package/node_modules/@deepseek-ai/dsh-client-ui-layout/package.json +10 -9
  334. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/README.i18n.yaml +2 -2
  335. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/README.md +3 -3
  336. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/README.zh.md +3 -3
  337. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/lib/client.js +15 -13
  338. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/package.json +18 -17
  339. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.i18n.yaml +2 -2
  340. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.md +4 -0
  341. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.zh.md +4 -0
  342. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +12 -9
  343. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/package.json +17 -16
  344. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/README.i18n.yaml +2 -2
  345. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/README.md +20 -8
  346. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/README.zh.md +20 -8
  347. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/lib/client.js +530 -195
  348. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/package.json +25 -15
  349. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/README.i18n.yaml +2 -2
  350. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/README.md +1 -1
  351. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/README.zh.md +1 -1
  352. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/lib/client.js +39 -100
  353. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/package.json +17 -16
  354. package/node_modules/@deepseek-ai/dsh-client-ui-plan/README.i18n.yaml +2 -2
  355. package/node_modules/@deepseek-ai/dsh-client-ui-plan/README.md +7 -5
  356. package/node_modules/@deepseek-ai/dsh-client-ui-plan/README.zh.md +8 -6
  357. package/node_modules/@deepseek-ai/dsh-client-ui-plan/lib/client.js +73 -60
  358. package/node_modules/@deepseek-ai/dsh-client-ui-plan/package.json +22 -21
  359. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.i18n.yaml +2 -2
  360. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.md +29 -8
  361. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.zh.md +29 -8
  362. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/client.js +1095 -381
  363. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/package.json +16 -12
  364. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/README.i18n.yaml +2 -2
  365. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/README.md +25 -11
  366. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/README.zh.md +25 -11
  367. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/ConnectionIndicator.module.css +1 -10
  368. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/HoverCard.module.css +27 -0
  369. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/Menu.module.css +68 -48
  370. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/Modal.module.css +6 -2
  371. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/OnboardingSurface.module.css +1 -2
  372. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/PathLabel.module.css +28 -0
  373. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/RiskConfirmation.module.css +1 -1
  374. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/SegmentedControl.module.css +76 -0
  375. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/SegmentedTabs.module.css +55 -0
  376. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/StateDot.module.css +64 -37
  377. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/TerminalBlock.module.css +13 -6
  378. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/TextShimmer.module.css +27 -0
  379. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/Toast.module.css +31 -2
  380. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/Tooltip.module.css +12 -0
  381. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/index.js +5418 -2739
  382. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/markdown/MarkdownText.module.css +1 -1
  383. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/settings-form/SettingsForm.module.css +53 -0
  384. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/settings-form/fields.module.css +145 -0
  385. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/ConfigField.d.ts +33 -0
  386. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/DisclosureRow.d.ts +4 -1
  387. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/HoverCard.d.ts +14 -4
  388. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/LinkIcon.d.ts +15 -30
  389. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/Menu.d.ts +50 -5
  390. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/PathLabel.d.ts +13 -0
  391. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/PermissionIcon.d.ts +39 -0
  392. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/ReferenceIcon.d.ts +12 -7
  393. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/SegmentedControl.d.ts +35 -0
  394. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/SegmentedTabs.d.ts +26 -0
  395. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/SiteGlyph.d.ts +1 -1
  396. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/StateDot.d.ts +6 -4
  397. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/TerminalBlock.d.ts +15 -3
  398. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/TextShimmer.d.ts +13 -0
  399. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/Toast.d.ts +19 -2
  400. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/Tooltip.d.ts +12 -2
  401. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/code-file-types.d.ts +1 -1
  402. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/code-highlighting.d.ts +19 -0
  403. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/icons/index.d.ts +376 -195
  404. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/icons/props.d.ts +1 -1
  405. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/icons/shared-artwork.d.ts +36 -0
  406. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/index.d.ts +21 -4
  407. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/overlay-top-margin.d.ts +14 -0
  408. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/plugin-artwork.d.ts +17 -0
  409. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/settings-form/SettingsForm.d.ts +46 -0
  410. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/settings-form/fields.d.ts +69 -0
  411. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/settings-form/form-model.d.ts +214 -0
  412. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/useAnchoredMaxHeight.d.ts +4 -1
  413. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/useAnchoredPosition.d.ts +3 -1
  414. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/package.json +5 -3
  415. package/node_modules/@deepseek-ai/dsh-client-ui-reference/README.i18n.yaml +2 -2
  416. package/node_modules/@deepseek-ai/dsh-client-ui-reference/README.md +2 -0
  417. package/node_modules/@deepseek-ai/dsh-client-ui-reference/README.zh.md +2 -0
  418. package/node_modules/@deepseek-ai/dsh-client-ui-reference/lib/client.js +12 -3
  419. package/node_modules/@deepseek-ai/dsh-client-ui-reference/package.json +15 -15
  420. package/node_modules/@deepseek-ai/dsh-client-ui-renderer/lib/client.js +7 -5
  421. package/node_modules/@deepseek-ai/dsh-client-ui-renderer/package.json +5 -5
  422. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.i18n.yaml +2 -2
  423. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.md +1 -1
  424. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.zh.md +1 -1
  425. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/lib/client.js +7 -8
  426. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/package.json +12 -12
  427. package/node_modules/@deepseek-ai/dsh-client-ui-session/README.i18n.yaml +2 -2
  428. package/node_modules/@deepseek-ai/dsh-client-ui-session/README.md +2 -0
  429. package/node_modules/@deepseek-ai/dsh-client-ui-session/README.zh.md +2 -0
  430. package/node_modules/@deepseek-ai/dsh-client-ui-session/lib/client.js +2 -3
  431. package/node_modules/@deepseek-ai/dsh-client-ui-session/package.json +10 -9
  432. package/node_modules/@deepseek-ai/dsh-client-ui-settings/README.i18n.yaml +2 -2
  433. package/node_modules/@deepseek-ai/dsh-client-ui-settings/README.md +20 -11
  434. package/node_modules/@deepseek-ai/dsh-client-ui-settings/README.zh.md +20 -11
  435. package/node_modules/@deepseek-ai/dsh-client-ui-settings/lib/client.js +281 -117
  436. package/node_modules/@deepseek-ai/dsh-client-ui-settings/lib/index.js +18 -4
  437. package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +13 -10
  438. package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/README.i18n.yaml +6 -0
  439. package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/README.md +75 -0
  440. package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/README.zh.md +75 -0
  441. package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/client.js +2383 -0
  442. package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/index.js +28 -0
  443. package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/package.json +69 -0
  444. package/node_modules/@deepseek-ai/dsh-client-ui-settings-agent-loop/README.i18n.yaml +6 -0
  445. package/node_modules/@deepseek-ai/dsh-client-ui-settings-agent-loop/README.md +78 -0
  446. package/node_modules/@deepseek-ai/dsh-client-ui-settings-agent-loop/README.zh.md +78 -0
  447. package/node_modules/@deepseek-ai/dsh-client-ui-settings-agent-loop/lib/client.js +175 -0
  448. package/node_modules/@deepseek-ai/dsh-client-ui-settings-agent-loop/lib/index.js +12 -0
  449. package/node_modules/@deepseek-ai/dsh-client-ui-settings-agent-loop/package.json +60 -0
  450. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.i18n.yaml +2 -2
  451. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.md +17 -6
  452. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.zh.md +17 -6
  453. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +166 -36
  454. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/index.js +8 -8
  455. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +19 -15
  456. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.i18n.yaml +2 -2
  457. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.md +14 -11
  458. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.zh.md +25 -22
  459. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +1246 -180
  460. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/index.js +24 -4
  461. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +15 -10
  462. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/README.i18n.yaml +2 -2
  463. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/README.md +5 -3
  464. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/README.zh.md +5 -3
  465. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +116 -61
  466. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +14 -12
  467. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/README.i18n.yaml +2 -2
  468. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/README.md +11 -46
  469. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/README.zh.md +15 -50
  470. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/client.js +15 -1753
  471. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +10 -14
  472. package/node_modules/@deepseek-ai/dsh-client-ui-settings-shell/README.i18n.yaml +6 -0
  473. package/node_modules/@deepseek-ai/dsh-client-ui-settings-shell/README.md +78 -0
  474. package/node_modules/@deepseek-ai/dsh-client-ui-settings-shell/README.zh.md +78 -0
  475. package/node_modules/@deepseek-ai/dsh-client-ui-settings-shell/lib/client.js +199 -0
  476. package/node_modules/@deepseek-ai/dsh-client-ui-settings-shell/lib/index.js +12 -0
  477. package/node_modules/@deepseek-ai/dsh-client-ui-settings-shell/package.json +60 -0
  478. package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/package.json +9 -8
  479. package/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/README.i18n.yaml +6 -0
  480. package/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/README.md +82 -0
  481. package/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/README.zh.md +82 -0
  482. package/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/lib/client.js +857 -0
  483. package/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/lib/index.js +13 -0
  484. package/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/package.json +61 -0
  485. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/README.i18n.yaml +6 -0
  486. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/README.md +79 -0
  487. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/README.zh.md +79 -0
  488. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/lib/client.js +324 -0
  489. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/lib/index.js +13 -0
  490. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/package.json +61 -0
  491. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.i18n.yaml +2 -2
  492. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.md +2 -2
  493. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.zh.md +2 -2
  494. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +35 -28
  495. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/package.json +12 -13
  496. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/README.i18n.yaml +2 -2
  497. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/README.md +13 -12
  498. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/README.zh.md +13 -12
  499. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/lib/client.js +1191 -429
  500. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/package.json +16 -9
  501. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/README.i18n.yaml +2 -2
  502. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/README.md +46 -20
  503. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/README.zh.md +46 -20
  504. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.excel.js +133782 -0
  505. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.js +3766 -789
  506. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.pdf.js +37 -15
  507. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/index.js +13 -6
  508. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/package.json +34 -21
  509. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/README.i18n.yaml +2 -2
  510. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/README.md +11 -9
  511. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/README.zh.md +11 -9
  512. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/lib/client.js +316 -106
  513. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/package.json +15 -13
  514. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/README.i18n.yaml +2 -2
  515. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/README.md +10 -7
  516. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/README.zh.md +10 -7
  517. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/lib/client.js +323 -111
  518. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/package.json +15 -14
  519. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/README.i18n.yaml +2 -2
  520. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/README.md +3 -3
  521. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/README.zh.md +3 -3
  522. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/lib/client.js +24 -141
  523. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/lib/client.terminal.js +1 -1
  524. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/package.json +16 -15
  525. package/node_modules/@deepseek-ai/dsh-client-ui-skill/README.i18n.yaml +2 -2
  526. package/node_modules/@deepseek-ai/dsh-client-ui-skill/README.md +3 -1
  527. package/node_modules/@deepseek-ai/dsh-client-ui-skill/README.zh.md +3 -1
  528. package/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +25 -24
  529. package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +15 -15
  530. package/node_modules/@deepseek-ai/dsh-client-ui-slots/package.json +4 -4
  531. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/README.i18n.yaml +2 -2
  532. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/README.md +13 -7
  533. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/README.zh.md +13 -7
  534. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +168 -260
  535. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +19 -19
  536. package/node_modules/@deepseek-ai/dsh-client-ui-theme/README.i18n.yaml +2 -2
  537. package/node_modules/@deepseek-ai/dsh-client-ui-theme/README.md +6 -4
  538. package/node_modules/@deepseek-ai/dsh-client-ui-theme/README.zh.md +6 -4
  539. package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +172 -70
  540. package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/index.js +14 -27
  541. package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/styles/Montserrat-OFL.txt +93 -0
  542. package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/styles/brand-font.css +24 -0
  543. package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/styles/montserrat-light.woff2 +0 -0
  544. package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/styles/montserrat-medium.woff2 +0 -0
  545. package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/styles/montserrat-regular.woff2 +0 -0
  546. package/node_modules/@deepseek-ai/dsh-client-ui-theme/package.json +17 -15
  547. package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.i18n.yaml +2 -2
  548. package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.md +10 -2
  549. package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.zh.md +10 -2
  550. package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +1887 -204
  551. package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +24 -23
  552. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/README.i18n.yaml +2 -2
  553. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/README.md +3 -1
  554. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/README.zh.md +3 -1
  555. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +32 -44
  556. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/package.json +18 -17
  557. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/README.i18n.yaml +2 -2
  558. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/README.md +1 -1
  559. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/README.zh.md +1 -1
  560. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +19 -13
  561. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/package.json +20 -19
  562. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/README.i18n.yaml +2 -2
  563. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/README.md +1 -1
  564. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/README.zh.md +1 -1
  565. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +9 -8
  566. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/package.json +16 -15
  567. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.i18n.yaml +2 -2
  568. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.md +102 -11
  569. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.zh.md +102 -11
  570. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +2182 -1015
  571. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +26 -22
  572. package/node_modules/@deepseek-ai/dsh-cmdline/package.json +6 -6
  573. package/node_modules/@deepseek-ai/dsh-command-compact/package.json +12 -12
  574. package/node_modules/@deepseek-ai/dsh-command-feedback/package.json +15 -15
  575. package/node_modules/@deepseek-ai/dsh-command-goal/package.json +14 -14
  576. package/node_modules/@deepseek-ai/dsh-commands/lib/typert.host.js +46 -18
  577. package/node_modules/@deepseek-ai/dsh-commands/package.json +20 -20
  578. package/node_modules/@deepseek-ai/dsh-compaction/lib/index.js +2 -5
  579. package/node_modules/@deepseek-ai/dsh-compaction/lib/invariant.js +4 -22
  580. package/node_modules/@deepseek-ai/dsh-compaction/lib/types/checkpoint.js +2 -2
  581. package/node_modules/@deepseek-ai/dsh-compaction/lib/types/invariant.js +2 -3
  582. package/node_modules/@deepseek-ai/dsh-compaction/package.json +13 -13
  583. package/node_modules/@deepseek-ai/dsh-compaction-basic/README.i18n.yaml +2 -2
  584. package/node_modules/@deepseek-ai/dsh-compaction-basic/README.md +9 -8
  585. package/node_modules/@deepseek-ai/dsh-compaction-basic/README.zh.md +9 -8
  586. package/node_modules/@deepseek-ai/dsh-compaction-basic/lib/index.js +50 -19
  587. package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +27 -27
  588. package/node_modules/@deepseek-ai/dsh-compaction-image-offload/lib/index.js +1 -7
  589. package/node_modules/@deepseek-ai/dsh-compaction-image-offload/lib/types/image-offload.js +0 -3
  590. package/node_modules/@deepseek-ai/dsh-compaction-image-offload/lib/types/project-message.js +0 -5
  591. package/node_modules/@deepseek-ai/dsh-compaction-image-offload/package.json +18 -18
  592. package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/lib/index.js +3 -7
  593. package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/package.json +18 -18
  594. package/node_modules/@deepseek-ai/dsh-config-editor/README.i18n.yaml +6 -0
  595. package/node_modules/@deepseek-ai/dsh-config-editor/README.md +79 -0
  596. package/node_modules/@deepseek-ai/dsh-config-editor/README.zh.md +79 -0
  597. package/node_modules/@deepseek-ai/dsh-config-editor/lib/index.js +132 -0
  598. package/node_modules/@deepseek-ai/dsh-config-editor/package.json +54 -0
  599. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/lib/client.js +878 -170
  600. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +9 -9
  601. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/index.js +6 -68
  602. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/typert.host.js +107 -51
  603. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/typert.remote-client.js +15 -15
  604. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/types/index.js +5 -6
  605. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/types/sandbox.js +0 -27
  606. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/package.json +20 -20
  607. package/node_modules/@deepseek-ai/dsh-credentials/package.json +6 -6
  608. package/node_modules/@deepseek-ai/dsh-credentials-local/package.json +12 -12
  609. package/node_modules/@deepseek-ai/dsh-deepseek-account/README.i18n.yaml +6 -0
  610. package/node_modules/@deepseek-ai/dsh-deepseek-account/README.md +63 -0
  611. package/node_modules/@deepseek-ai/dsh-deepseek-account/README.zh.md +63 -0
  612. package/node_modules/@deepseek-ai/dsh-deepseek-account/lib/index.js +35 -0
  613. package/node_modules/@deepseek-ai/dsh-deepseek-account/lib/types/index.js +36 -0
  614. package/node_modules/@deepseek-ai/dsh-deepseek-account/lib/types/types.js +2 -0
  615. package/node_modules/@deepseek-ai/dsh-deepseek-account/package.json +42 -0
  616. package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/README.i18n.yaml +6 -0
  617. package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/README.md +96 -0
  618. package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/README.zh.md +96 -0
  619. package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/lib/index.js +891 -0
  620. package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/lib/types/details.js +55 -0
  621. package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/lib/types/index.js +488 -0
  622. package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/lib/types/logout.js +34 -0
  623. package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/lib/types/protocol.js +210 -0
  624. package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/lib/types/types.js +2 -0
  625. package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/package.json +52 -0
  626. package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/README.i18n.yaml +2 -2
  627. package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/README.md +1 -1
  628. package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/README.zh.md +1 -1
  629. package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/package.json +3 -3
  630. package/node_modules/@deepseek-ai/dsh-deque/package.json +3 -3
  631. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/README.i18n.yaml +2 -2
  632. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/README.md +8 -4
  633. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/README.zh.md +8 -4
  634. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/index.js +14 -74
  635. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/invariant.js +6 -8
  636. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/typert.host.js +51 -189
  637. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/typert.remote-client.js +3 -151
  638. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/client.js +1 -1
  639. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/index.js +0 -41
  640. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/projection.js +10 -10
  641. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/roster.js +8 -4
  642. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/locale/en.json +6 -0
  643. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/locale/zh.json +6 -0
  644. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/package.json +28 -26
  645. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/README.i18n.yaml +2 -2
  646. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/README.md +16 -4
  647. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/README.zh.md +16 -4
  648. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/cordis.patch.yml +3 -0
  649. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/icon.svg +12 -0
  650. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/en.json +6 -0
  651. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/zh.json +6 -0
  652. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/package.json +12 -7
  653. package/node_modules/@deepseek-ai/{dsh-experimental-agent-team-web-profile → dsh-experimental-api-speech-to-text}/README.i18n.yaml +3 -3
  654. package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/README.md +78 -0
  655. package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/README.zh.md +78 -0
  656. package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/lib/index.js +218 -0
  657. package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/lib/typert.host.js +432 -0
  658. package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/lib/typert.remote-client.js +311 -0
  659. package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/lib/types/index.js +142 -0
  660. package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/lib/types/types.js +2 -0
  661. package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/package.json +60 -0
  662. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/README.i18n.yaml +2 -2
  663. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/README.md +11 -9
  664. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/README.zh.md +11 -9
  665. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/lib/client.js +127 -562
  666. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/locale/en.json +6 -0
  667. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/locale/zh.json +6 -0
  668. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/package.json +30 -27
  669. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/README.i18n.yaml +6 -0
  670. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/README.md +76 -0
  671. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/README.zh.md +76 -0
  672. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/lib/client.js +5714 -0
  673. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/lib/index.js +6 -0
  674. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/package.json +92 -0
  675. package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/README.i18n.yaml +6 -0
  676. package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/README.md +80 -0
  677. package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/README.zh.md +80 -0
  678. package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/lib/index.js +200 -0
  679. package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/lib/types/index.js +181 -0
  680. package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/lib/types/types.js +2 -0
  681. package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/lib/types/wave.js +24 -0
  682. package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/package.json +57 -0
  683. package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/README.i18n.yaml +6 -0
  684. package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/README.md +82 -0
  685. package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/README.zh.md +82 -0
  686. package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/lib/index.js +818 -0
  687. package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/lib/worker.js +219 -0
  688. package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/package.json +53 -0
  689. package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/runtime/assets.json +28 -0
  690. package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/README.i18n.yaml +2 -2
  691. package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/README.md +3 -3
  692. package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/README.zh.md +3 -3
  693. package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/lib/index.js +23 -24
  694. package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/locale/en.json +6 -0
  695. package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/locale/zh.json +6 -0
  696. package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/package.json +27 -25
  697. package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/README.i18n.yaml +6 -0
  698. package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/README.md +77 -0
  699. package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/README.zh.md +77 -0
  700. package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/cordis.patch.yml +13 -0
  701. package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/icon.svg +9 -0
  702. package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/locale/en.json +6 -0
  703. package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/locale/zh.json +6 -0
  704. package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/package.json +54 -0
  705. package/node_modules/@deepseek-ai/dsh-file-reference/README.i18n.yaml +2 -2
  706. package/node_modules/@deepseek-ai/dsh-file-reference/README.md +1 -1
  707. package/node_modules/@deepseek-ai/dsh-file-reference/README.zh.md +1 -1
  708. package/node_modules/@deepseek-ai/dsh-file-reference/package.json +5 -5
  709. package/node_modules/@deepseek-ai/dsh-file-reference-local/README.i18n.yaml +2 -2
  710. package/node_modules/@deepseek-ai/dsh-file-reference-local/README.md +3 -4
  711. package/node_modules/@deepseek-ai/dsh-file-reference-local/README.zh.md +3 -4
  712. package/node_modules/@deepseek-ai/dsh-file-reference-local/package.json +12 -12
  713. package/node_modules/@deepseek-ai/dsh-fs/README.i18n.yaml +2 -2
  714. package/node_modules/@deepseek-ai/dsh-fs/README.md +7 -5
  715. package/node_modules/@deepseek-ai/dsh-fs/README.zh.md +7 -5
  716. package/node_modules/@deepseek-ai/dsh-fs/lib/index.js +12 -0
  717. package/node_modules/@deepseek-ai/dsh-fs/package.json +11 -11
  718. package/node_modules/@deepseek-ai/dsh-fs-local/README.i18n.yaml +2 -2
  719. package/node_modules/@deepseek-ai/dsh-fs-local/README.md +6 -3
  720. package/node_modules/@deepseek-ai/dsh-fs-local/README.zh.md +6 -3
  721. package/node_modules/@deepseek-ai/dsh-fs-local/lib/index.js +27 -0
  722. package/node_modules/@deepseek-ai/dsh-fs-local/package.json +8 -7
  723. package/node_modules/@deepseek-ai/dsh-fs-observation-policy/package.json +6 -6
  724. package/node_modules/@deepseek-ai/dsh-fs-sandbox/README.i18n.yaml +2 -2
  725. package/node_modules/@deepseek-ai/dsh-fs-sandbox/README.md +1 -1
  726. package/node_modules/@deepseek-ai/dsh-fs-sandbox/README.zh.md +1 -1
  727. package/node_modules/@deepseek-ai/dsh-fs-sandbox/package.json +12 -12
  728. package/node_modules/@deepseek-ai/dsh-goal/lib/typert.host.js +46 -18
  729. package/node_modules/@deepseek-ai/dsh-goal/package.json +25 -25
  730. package/node_modules/@deepseek-ai/dsh-goal-round-driver/lib/index.js +2 -3
  731. package/node_modules/@deepseek-ai/dsh-goal-round-driver/package.json +17 -17
  732. package/node_modules/@deepseek-ai/dsh-headless/lib/index.js +1 -1
  733. package/node_modules/@deepseek-ai/dsh-headless/lib/{json-stream-Bh4BGGk9.js → json-stream-BA-F3lfb.js} +4 -4
  734. package/node_modules/@deepseek-ai/dsh-headless/lib/startup.js +1 -1
  735. package/node_modules/@deepseek-ai/dsh-headless/package.json +22 -22
  736. package/node_modules/@deepseek-ai/dsh-hmr/README.i18n.yaml +2 -2
  737. package/node_modules/@deepseek-ai/dsh-hmr/README.md +1 -1
  738. package/node_modules/@deepseek-ai/dsh-hmr/README.zh.md +1 -1
  739. package/node_modules/@deepseek-ai/dsh-hmr/package.json +15 -15
  740. package/node_modules/@deepseek-ai/dsh-home-paths/package.json +3 -3
  741. package/node_modules/@deepseek-ai/dsh-hook-protocol/lib/index.js +1 -1
  742. package/node_modules/@deepseek-ai/dsh-hook-protocol/package.json +9 -9
  743. package/node_modules/@deepseek-ai/dsh-hooks-claude-code/lib/index.js +4 -7
  744. package/node_modules/@deepseek-ai/dsh-hooks-claude-code/package.json +23 -23
  745. package/node_modules/@deepseek-ai/dsh-hooks-codex/lib/index.js +3 -6
  746. package/node_modules/@deepseek-ai/dsh-hooks-codex/package.json +21 -21
  747. package/node_modules/@deepseek-ai/dsh-host-directory-picker/package.json +3 -3
  748. package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/package.json +18 -18
  749. package/node_modules/@deepseek-ai/dsh-host-directory-picker-browse/package.json +5 -5
  750. package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/package.json +5 -5
  751. package/node_modules/@deepseek-ai/dsh-host-frontend-static/README.i18n.yaml +2 -2
  752. package/node_modules/@deepseek-ai/dsh-host-frontend-static/README.md +3 -1
  753. package/node_modules/@deepseek-ai/dsh-host-frontend-static/README.zh.md +3 -1
  754. package/node_modules/@deepseek-ai/dsh-host-frontend-static/lib/index.js +1 -1
  755. package/node_modules/@deepseek-ai/dsh-host-frontend-static/package.json +10 -10
  756. package/node_modules/@deepseek-ai/dsh-host-open-in-app/README.i18n.yaml +2 -2
  757. package/node_modules/@deepseek-ai/dsh-host-open-in-app/README.md +2 -0
  758. package/node_modules/@deepseek-ai/dsh-host-open-in-app/README.zh.md +2 -0
  759. package/node_modules/@deepseek-ai/dsh-host-open-in-app/lib/index.js +28 -81
  760. package/node_modules/@deepseek-ai/dsh-host-open-in-app/lib/types/icons.js +4 -49
  761. package/node_modules/@deepseek-ai/dsh-host-open-in-app/lib/types/index.js +8 -8
  762. package/node_modules/@deepseek-ai/dsh-host-open-in-app/lib/types/resolver.js +8 -27
  763. package/node_modules/@deepseek-ai/dsh-host-open-in-app/lib/types/shared.js +16 -7
  764. package/node_modules/@deepseek-ai/dsh-host-open-in-app/package.json +9 -9
  765. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/README.i18n.yaml +2 -2
  766. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/README.md +8 -4
  767. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/README.zh.md +8 -4
  768. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/lib/index.js +19 -11
  769. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/lib/typert.host.js +23 -4
  770. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/lib/typert.remote-client.js +23 -4
  771. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/lib/types/index.js +18 -10
  772. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/package.json +14 -12
  773. package/node_modules/@deepseek-ai/dsh-host-webserver/README.i18n.yaml +2 -2
  774. package/node_modules/@deepseek-ai/dsh-host-webserver/README.md +1 -1
  775. package/node_modules/@deepseek-ai/dsh-host-webserver/README.zh.md +1 -1
  776. package/node_modules/@deepseek-ai/dsh-host-webserver/lib/index.js +1 -0
  777. package/node_modules/@deepseek-ai/dsh-host-webserver/package.json +4 -4
  778. package/node_modules/@deepseek-ai/dsh-http-proxy/package.json +4 -4
  779. package/node_modules/@deepseek-ai/dsh-invariants/README.i18n.yaml +2 -2
  780. package/node_modules/@deepseek-ai/dsh-invariants/README.md +1 -1
  781. package/node_modules/@deepseek-ai/dsh-invariants/README.zh.md +1 -1
  782. package/node_modules/@deepseek-ai/dsh-invariants/package.json +4 -4
  783. package/node_modules/@deepseek-ai/dsh-jobs/README.i18n.yaml +2 -2
  784. package/node_modules/@deepseek-ai/dsh-jobs/README.md +18 -11
  785. package/node_modules/@deepseek-ai/dsh-jobs/README.zh.md +18 -11
  786. package/node_modules/@deepseek-ai/dsh-jobs/lib/index.js +74 -16
  787. package/node_modules/@deepseek-ai/dsh-jobs/lib/invariant.js +67 -17
  788. package/node_modules/@deepseek-ai/dsh-jobs/lib/types/archive-admission.js +43 -0
  789. package/node_modules/@deepseek-ai/dsh-jobs/lib/types/index.js +34 -16
  790. package/node_modules/@deepseek-ai/dsh-jobs/lib/types/invariant.js +90 -27
  791. package/node_modules/@deepseek-ai/dsh-jobs/lib/types/types.js +3 -2
  792. package/node_modules/@deepseek-ai/dsh-jobs/lib/types/view.js +9 -0
  793. package/node_modules/@deepseek-ai/dsh-jobs/package.json +22 -11
  794. package/node_modules/@deepseek-ai/dsh-jobs-local/README.i18n.yaml +2 -2
  795. package/node_modules/@deepseek-ai/dsh-jobs-local/README.md +18 -11
  796. package/node_modules/@deepseek-ai/dsh-jobs-local/README.zh.md +17 -10
  797. package/node_modules/@deepseek-ai/dsh-jobs-local/lib/index.js +566 -193
  798. package/node_modules/@deepseek-ai/dsh-jobs-local/package.json +16 -16
  799. package/node_modules/@deepseek-ai/dsh-launch-environment/package.json +3 -3
  800. package/node_modules/@deepseek-ai/dsh-lazy-require/package.json +3 -3
  801. package/node_modules/@deepseek-ai/dsh-llm/README.i18n.yaml +2 -2
  802. package/node_modules/@deepseek-ai/dsh-llm/README.md +11 -8
  803. package/node_modules/@deepseek-ai/dsh-llm/README.zh.md +11 -8
  804. package/node_modules/@deepseek-ai/dsh-llm/lib/index.js +41 -97
  805. package/node_modules/@deepseek-ai/dsh-llm/lib/typert.host.js +69 -13
  806. package/node_modules/@deepseek-ai/dsh-llm/lib/typert.remote-client.js +3 -3
  807. package/node_modules/@deepseek-ai/dsh-llm/lib/types/assembler.js +4 -4
  808. package/node_modules/@deepseek-ai/dsh-llm/lib/types/content.js +12 -64
  809. package/node_modules/@deepseek-ai/dsh-llm/lib/types/index.js +3 -1
  810. package/node_modules/@deepseek-ai/dsh-llm/lib/types/message.js +21 -16
  811. package/node_modules/@deepseek-ai/dsh-llm/package.json +11 -11
  812. package/node_modules/@deepseek-ai/dsh-llm-deepseek/README.i18n.yaml +2 -2
  813. package/node_modules/@deepseek-ai/dsh-llm-deepseek/README.md +35 -49
  814. package/node_modules/@deepseek-ai/dsh-llm-deepseek/README.zh.md +36 -50
  815. package/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js +1132 -2048
  816. package/node_modules/@deepseek-ai/dsh-llm-deepseek/package.json +53 -43
  817. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.i18n.yaml +2 -2
  818. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.md +12 -9
  819. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.zh.md +11 -8
  820. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +84 -184
  821. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +30 -24
  822. package/node_modules/@deepseek-ai/dsh-llm-retry/package.json +25 -25
  823. package/node_modules/@deepseek-ai/dsh-mcp-client/package.json +23 -23
  824. package/node_modules/@deepseek-ai/dsh-mcp-resources/package.json +14 -14
  825. package/node_modules/@deepseek-ai/dsh-message-feedback/package.json +19 -19
  826. package/node_modules/@deepseek-ai/dsh-native-command/README.i18n.yaml +2 -2
  827. package/node_modules/@deepseek-ai/dsh-native-command/README.md +8 -9
  828. package/node_modules/@deepseek-ai/dsh-native-command/README.zh.md +8 -9
  829. package/node_modules/@deepseek-ai/dsh-native-command/lib/index.js +612 -3
  830. package/node_modules/@deepseek-ai/dsh-native-command/lib/types/desktop-entry.js +79 -0
  831. package/node_modules/@deepseek-ai/dsh-native-command/lib/types/file-applications-linux.js +70 -0
  832. package/node_modules/@deepseek-ai/dsh-native-command/lib/types/file-applications-windows.js +228 -0
  833. package/node_modules/@deepseek-ai/dsh-native-command/lib/types/file-applications.js +191 -0
  834. package/node_modules/@deepseek-ai/dsh-native-command/lib/types/index.js +10 -0
  835. package/node_modules/@deepseek-ai/dsh-native-command/lib/types/path-opener.js +230 -0
  836. package/node_modules/@deepseek-ai/dsh-native-command/lib/types/runner.js +27 -0
  837. package/node_modules/@deepseek-ai/dsh-native-command/lib/types/types.js +25 -0
  838. package/node_modules/@deepseek-ai/dsh-native-command/lib/types/url-opener.js +88 -0
  839. package/node_modules/@deepseek-ai/dsh-native-command/package.json +10 -5
  840. package/node_modules/@deepseek-ai/dsh-no-progress-reminder/lib/index.js +33 -57
  841. package/node_modules/@deepseek-ai/dsh-no-progress-reminder/package.json +15 -15
  842. package/node_modules/@deepseek-ai/dsh-office-to-pdf/README.i18n.yaml +2 -2
  843. package/node_modules/@deepseek-ai/dsh-office-to-pdf/README.md +2 -2
  844. package/node_modules/@deepseek-ai/dsh-office-to-pdf/README.zh.md +2 -2
  845. package/node_modules/@deepseek-ai/dsh-office-to-pdf/lib/index.js +4 -4
  846. package/node_modules/@deepseek-ai/dsh-office-to-pdf/lib/typert.host.js +41 -3
  847. package/node_modules/@deepseek-ai/dsh-office-to-pdf/lib/typert.remote-client.js +39 -1
  848. package/node_modules/@deepseek-ai/dsh-office-to-pdf/lib/types/index.js +4 -3
  849. package/node_modules/@deepseek-ai/dsh-office-to-pdf/package.json +11 -11
  850. package/node_modules/@deepseek-ai/dsh-output-retention/package.json +3 -3
  851. package/node_modules/@deepseek-ai/dsh-package-manifest/README.i18n.yaml +2 -2
  852. package/node_modules/@deepseek-ai/dsh-package-manifest/README.md +3 -1
  853. package/node_modules/@deepseek-ai/dsh-package-manifest/README.zh.md +3 -1
  854. package/node_modules/@deepseek-ai/dsh-package-manifest/package.json +3 -3
  855. package/node_modules/@deepseek-ai/dsh-permission-presets/README.i18n.yaml +2 -2
  856. package/node_modules/@deepseek-ai/dsh-permission-presets/README.md +1 -1
  857. package/node_modules/@deepseek-ai/dsh-permission-presets/README.zh.md +1 -1
  858. package/node_modules/@deepseek-ai/dsh-permission-presets/lib/index.js +16 -35
  859. package/node_modules/@deepseek-ai/dsh-permission-presets/lib/typert.host.js +54 -20
  860. package/node_modules/@deepseek-ai/dsh-permission-presets/lib/typert.remote-client.js +7 -1
  861. package/node_modules/@deepseek-ai/dsh-permission-presets/lib/types/index.js +14 -38
  862. package/node_modules/@deepseek-ai/dsh-permission-presets/package.json +23 -24
  863. package/node_modules/@deepseek-ai/dsh-persona/README.i18n.yaml +2 -2
  864. package/node_modules/@deepseek-ai/dsh-persona/README.md +1 -1
  865. package/node_modules/@deepseek-ai/dsh-persona/README.zh.md +1 -1
  866. package/node_modules/@deepseek-ai/dsh-persona/package.json +7 -7
  867. package/node_modules/@deepseek-ai/dsh-plan-mode/lib/index.js +1 -2
  868. package/node_modules/@deepseek-ai/dsh-plan-mode/lib/types/index.js +1 -1
  869. package/node_modules/@deepseek-ai/dsh-plan-mode/package.json +24 -24
  870. package/node_modules/@deepseek-ai/dsh-plugin-manager/README.i18n.yaml +2 -2
  871. package/node_modules/@deepseek-ai/dsh-plugin-manager/README.md +12 -2
  872. package/node_modules/@deepseek-ai/dsh-plugin-manager/README.zh.md +12 -2
  873. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/index.js +371 -74
  874. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/typert.host.js +203 -29
  875. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/typert.remote-client.js +155 -15
  876. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/index.js +210 -70
  877. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/install-failure.js +1 -1
  878. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/install-spec.js +16 -2
  879. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/operations.js +35 -5
  880. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/registry.js +95 -0
  881. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/tools.js +5 -1
  882. package/node_modules/@deepseek-ai/dsh-plugin-manager/package.json +37 -32
  883. package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/README.i18n.yaml +2 -2
  884. package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/README.md +1 -1
  885. package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/README.zh.md +1 -1
  886. package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/lib/index.js +1 -1
  887. package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/lib/types/index.js +1 -1
  888. package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/package.json +20 -20
  889. package/node_modules/@deepseek-ai/dsh-ptc-runtime/package.json +5 -5
  890. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/package.json +23 -23
  891. package/node_modules/@deepseek-ai/dsh-pwsh-local/README.i18n.yaml +2 -2
  892. package/node_modules/@deepseek-ai/dsh-pwsh-local/README.md +6 -5
  893. package/node_modules/@deepseek-ai/dsh-pwsh-local/README.zh.md +6 -5
  894. package/node_modules/@deepseek-ai/dsh-pwsh-local/lib/index.js +161 -196
  895. package/node_modules/@deepseek-ai/dsh-pwsh-local/package.json +11 -13
  896. package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/README.i18n.yaml +2 -2
  897. package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/README.md +5 -5
  898. package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/README.zh.md +5 -5
  899. package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/lib/index.js +58 -63
  900. package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +14 -14
  901. package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/lib/index.js +36 -60
  902. package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/package.json +12 -12
  903. package/node_modules/@deepseek-ai/dsh-sandbox/package.json +8 -8
  904. package/node_modules/@deepseek-ai/dsh-sandbox-local/README.i18n.yaml +3 -3
  905. package/node_modules/@deepseek-ai/dsh-sandbox-local/README.md +3 -3
  906. package/node_modules/@deepseek-ai/dsh-sandbox-local/README.zh.md +3 -3
  907. package/node_modules/@deepseek-ai/dsh-sandbox-local/lib/index.js +3 -2
  908. package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +12 -12
  909. package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +16 -16
  910. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/README.i18n.yaml +3 -3
  911. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/README.md +19 -15
  912. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/README.zh.md +17 -13
  913. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/index.js +1 -1
  914. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/runner.js +1 -1
  915. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/{types-CutH1Lgc.js → types-DxezulnA.js} +267 -78
  916. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/package.json +10 -10
  917. package/node_modules/@deepseek-ai/dsh-schedule/README.i18n.yaml +2 -2
  918. package/node_modules/@deepseek-ai/dsh-schedule/README.md +3 -1
  919. package/node_modules/@deepseek-ai/dsh-schedule/README.zh.md +4 -1
  920. package/node_modules/@deepseek-ai/dsh-schedule/lib/index.js +104 -37
  921. package/node_modules/@deepseek-ai/dsh-schedule/lib/types/index.js +61 -5
  922. package/node_modules/@deepseek-ai/dsh-schedule/lib/types/runtime.js +11 -1
  923. package/node_modules/@deepseek-ai/dsh-schedule/package.json +25 -23
  924. package/node_modules/@deepseek-ai/dsh-scope/package.json +5 -5
  925. package/node_modules/@deepseek-ai/dsh-sdk-app/README.i18n.yaml +2 -2
  926. package/node_modules/@deepseek-ai/dsh-sdk-app/README.md +2 -0
  927. package/node_modules/@deepseek-ai/dsh-sdk-app/README.zh.md +2 -0
  928. package/node_modules/@deepseek-ai/dsh-sdk-app/cordis.patch.yml +15 -0
  929. package/node_modules/@deepseek-ai/dsh-sdk-app/package.json +10 -8
  930. package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/lib/index.js +1 -1
  931. package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/package.json +25 -25
  932. package/node_modules/@deepseek-ai/dsh-sdk-minimal/package.json +31 -31
  933. package/node_modules/@deepseek-ai/dsh-sdk-protocol/package.json +9 -9
  934. package/node_modules/@deepseek-ai/dsh-session/README.i18n.yaml +2 -2
  935. package/node_modules/@deepseek-ai/dsh-session/README.md +11 -9
  936. package/node_modules/@deepseek-ai/dsh-session/README.zh.md +12 -8
  937. package/node_modules/@deepseek-ai/dsh-session/lib/index.js +215 -125
  938. package/node_modules/@deepseek-ai/dsh-session/lib/invariant.js +4 -1
  939. package/node_modules/@deepseek-ai/dsh-session/lib/types/fork.js +28 -0
  940. package/node_modules/@deepseek-ai/dsh-session/lib/types/index.js +56 -61
  941. package/node_modules/@deepseek-ai/dsh-session/lib/types/invariant.js +5 -1
  942. package/node_modules/@deepseek-ai/dsh-session/lib/types/known-event-types.js +1 -0
  943. package/node_modules/@deepseek-ai/dsh-session/lib/types/repair.js +52 -23
  944. package/node_modules/@deepseek-ai/dsh-session/lib/types/surface.js +73 -17
  945. package/node_modules/@deepseek-ai/dsh-session/lib/types/types.js +1 -1
  946. package/node_modules/@deepseek-ai/dsh-session/package.json +15 -11
  947. package/node_modules/@deepseek-ai/dsh-session-checkpoint-policy/package.json +18 -18
  948. package/node_modules/@deepseek-ai/dsh-session-format/package.json +4 -4
  949. package/node_modules/@deepseek-ai/dsh-session-format-catalog/README.i18n.yaml +2 -2
  950. package/node_modules/@deepseek-ai/dsh-session-format-catalog/README.md +5 -1
  951. package/node_modules/@deepseek-ai/dsh-session-format-catalog/README.zh.md +5 -1
  952. package/node_modules/@deepseek-ai/dsh-session-format-catalog/lib/index.js +55 -10
  953. package/node_modules/@deepseek-ai/dsh-session-format-catalog/lib/types/children.js +17 -0
  954. package/node_modules/@deepseek-ai/dsh-session-format-catalog/lib/types/generated.js +25 -11
  955. package/node_modules/@deepseek-ai/dsh-session-format-catalog/lib/types/historical.js +20 -0
  956. package/node_modules/@deepseek-ai/dsh-session-format-catalog/lib/types/index.js +2 -0
  957. package/node_modules/@deepseek-ai/dsh-session-format-catalog/package.json +11 -10
  958. package/node_modules/@deepseek-ai/dsh-session-format-v0-to-v1/package.json +6 -6
  959. package/node_modules/@deepseek-ai/dsh-session-format-v1-to-v2/package.json +8 -8
  960. package/node_modules/@deepseek-ai/dsh-session-format-v2-to-v3/package.json +6 -6
  961. package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/README.i18n.yaml +6 -0
  962. package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/README.md +350 -0
  963. package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/README.zh.md +350 -0
  964. package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/lib/index.js +1552 -0
  965. package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/package.json +51 -0
  966. package/node_modules/@deepseek-ai/dsh-session-log-deepseek/lib/index.js +1 -0
  967. package/node_modules/@deepseek-ai/dsh-session-log-deepseek/lib/types/index.js +1 -0
  968. package/node_modules/@deepseek-ai/dsh-session-log-deepseek/package.json +19 -19
  969. package/node_modules/@deepseek-ai/dsh-session-log-export/README.i18n.yaml +2 -2
  970. package/node_modules/@deepseek-ai/dsh-session-log-export/README.md +6 -2
  971. package/node_modules/@deepseek-ai/dsh-session-log-export/README.zh.md +6 -2
  972. package/node_modules/@deepseek-ai/dsh-session-log-export/lib/client.js +43 -20
  973. package/node_modules/@deepseek-ai/dsh-session-log-export/lib/index.js +48 -17
  974. package/node_modules/@deepseek-ai/dsh-session-log-export/package.json +25 -23
  975. package/node_modules/@deepseek-ai/dsh-session-persistence/lib/index.js +2 -0
  976. package/node_modules/@deepseek-ai/dsh-session-persistence/package.json +11 -11
  977. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/README.i18n.yaml +2 -2
  978. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/README.md +6 -2
  979. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/README.zh.md +6 -2
  980. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/index.js +210 -45
  981. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/worker.cjs +1456 -313
  982. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/package.json +14 -14
  983. package/node_modules/@deepseek-ai/dsh-session-projection/package.json +5 -5
  984. package/node_modules/@deepseek-ai/dsh-session-projection-cache/README.i18n.yaml +2 -2
  985. package/node_modules/@deepseek-ai/dsh-session-projection-cache/README.md +2 -2
  986. package/node_modules/@deepseek-ai/dsh-session-projection-cache/README.zh.md +2 -2
  987. package/node_modules/@deepseek-ai/dsh-session-projection-cache/lib/index.js +71 -51
  988. package/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +13 -13
  989. package/node_modules/@deepseek-ai/dsh-session-query/lib/index.js +4 -5
  990. package/node_modules/@deepseek-ai/dsh-session-query/package.json +20 -20
  991. package/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +13 -13
  992. package/node_modules/@deepseek-ai/dsh-session-reference/lib/index.js +5 -5
  993. package/node_modules/@deepseek-ai/dsh-session-reference/lib/typert.host.js +47 -19
  994. package/node_modules/@deepseek-ai/dsh-session-reference/lib/typert.remote-client.js +1 -1
  995. package/node_modules/@deepseek-ai/dsh-session-reference/lib/types/index.js +3 -7
  996. package/node_modules/@deepseek-ai/dsh-session-reference/lib/types/projection.js +1 -0
  997. package/node_modules/@deepseek-ai/dsh-session-reference/package.json +39 -39
  998. package/node_modules/@deepseek-ai/dsh-session-stats/package.json +11 -11
  999. package/node_modules/@deepseek-ai/dsh-session-telemetry/README.i18n.yaml +2 -2
  1000. package/node_modules/@deepseek-ai/dsh-session-telemetry/README.md +1 -1
  1001. package/node_modules/@deepseek-ai/dsh-session-telemetry/README.zh.md +1 -1
  1002. package/node_modules/@deepseek-ai/dsh-session-telemetry/lib/index.js +6 -5
  1003. package/node_modules/@deepseek-ai/dsh-session-telemetry/package.json +7 -7
  1004. package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/package.json +23 -23
  1005. package/node_modules/@deepseek-ai/dsh-session-title/package.json +19 -19
  1006. package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/package.json +17 -17
  1007. package/node_modules/@deepseek-ai/dsh-session-title-llm/lib/index.js +1 -4
  1008. package/node_modules/@deepseek-ai/dsh-session-title-llm/package.json +13 -13
  1009. package/node_modules/@deepseek-ai/dsh-session-turn-outline/package.json +11 -11
  1010. package/node_modules/@deepseek-ai/dsh-settings/README.i18n.yaml +2 -2
  1011. package/node_modules/@deepseek-ai/dsh-settings/README.md +19 -96
  1012. package/node_modules/@deepseek-ai/dsh-settings/README.zh.md +25 -102
  1013. package/node_modules/@deepseek-ai/dsh-settings/lib/index.js +360 -426
  1014. package/node_modules/@deepseek-ai/dsh-settings/lib/types/index.js +271 -512
  1015. package/node_modules/@deepseek-ai/dsh-settings/lib/types/redact.js +14 -8
  1016. package/node_modules/@deepseek-ai/dsh-settings/lib/types/schema.js +85 -0
  1017. package/node_modules/@deepseek-ai/dsh-settings/lib/types/types.js +1 -9
  1018. package/node_modules/@deepseek-ai/dsh-settings/package.json +21 -17
  1019. package/node_modules/@deepseek-ai/dsh-shell/README.i18n.yaml +2 -2
  1020. package/node_modules/@deepseek-ai/dsh-shell/README.md +17 -10
  1021. package/node_modules/@deepseek-ai/dsh-shell/README.zh.md +17 -10
  1022. package/node_modules/@deepseek-ai/dsh-shell/lib/index.js +19 -21
  1023. package/node_modules/@deepseek-ai/dsh-shell/package.json +7 -9
  1024. package/node_modules/@deepseek-ai/dsh-shell-env/README.i18n.yaml +2 -2
  1025. package/node_modules/@deepseek-ai/dsh-shell-env/README.md +5 -5
  1026. package/node_modules/@deepseek-ai/dsh-shell-env/README.zh.md +5 -5
  1027. package/node_modules/@deepseek-ai/dsh-shell-env/lib/index.js +10 -1
  1028. package/node_modules/@deepseek-ai/dsh-shell-env/package.json +14 -12
  1029. package/node_modules/@deepseek-ai/dsh-skill/package.json +9 -9
  1030. package/node_modules/@deepseek-ai/dsh-skill-badge/package.json +5 -5
  1031. package/node_modules/@deepseek-ai/dsh-skill-filesystem/package.json +10 -10
  1032. package/node_modules/@deepseek-ai/dsh-skill-office/README.i18n.yaml +6 -0
  1033. package/node_modules/@deepseek-ai/dsh-skill-office/README.md +100 -0
  1034. package/node_modules/@deepseek-ai/dsh-skill-office/README.zh.md +100 -0
  1035. package/node_modules/@deepseek-ai/dsh-skill-office/assets/office-docx/SKILL.md +46 -0
  1036. package/node_modules/@deepseek-ai/dsh-skill-office/assets/office-pptx/SKILL.md +70 -0
  1037. package/node_modules/@deepseek-ai/dsh-skill-office/assets/office-xlsx/SKILL.md +56 -0
  1038. package/node_modules/@deepseek-ai/dsh-skill-office/assets/scripts/check_office.py +279 -0
  1039. package/node_modules/@deepseek-ai/dsh-skill-office/lib/index.js +80 -0
  1040. package/node_modules/@deepseek-ai/dsh-skill-office/package.json +43 -0
  1041. package/node_modules/@deepseek-ai/dsh-spill/package.json +9 -9
  1042. package/node_modules/@deepseek-ai/dsh-spill-local/package.json +11 -11
  1043. package/node_modules/@deepseek-ai/dsh-spill-policy/package.json +21 -21
  1044. package/node_modules/@deepseek-ai/dsh-storage/package.json +3 -3
  1045. package/node_modules/@deepseek-ai/dsh-storage-domain/package.json +8 -8
  1046. package/node_modules/@deepseek-ai/dsh-storage-json/package.json +6 -6
  1047. package/node_modules/@deepseek-ai/dsh-subagent/README.i18n.yaml +2 -2
  1048. package/node_modules/@deepseek-ai/dsh-subagent/README.md +9 -6
  1049. package/node_modules/@deepseek-ai/dsh-subagent/README.zh.md +9 -6
  1050. package/node_modules/@deepseek-ai/dsh-subagent/lib/index.js +301 -239
  1051. package/node_modules/@deepseek-ai/dsh-subagent/lib/typert.host.js +60 -89
  1052. package/node_modules/@deepseek-ai/dsh-subagent/lib/typert.remote-client.js +2 -56
  1053. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/archive-admission.js +151 -0
  1054. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/catalog.js +12 -6
  1055. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/control-types.js +2 -3
  1056. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/control.js +2 -40
  1057. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/index.js +29 -91
  1058. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/lifecycle.js +14 -19
  1059. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/list-children.js +45 -49
  1060. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/projection.js +10 -4
  1061. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/run-settlement.js +1 -1
  1062. package/node_modules/@deepseek-ai/dsh-subagent/package.json +57 -54
  1063. package/node_modules/@deepseek-ai/dsh-subagent-acp/package.json +24 -24
  1064. package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/package.json +18 -18
  1065. package/node_modules/@deepseek-ai/dsh-subagent-in-process-driver/package.json +26 -26
  1066. package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/package.json +20 -20
  1067. package/node_modules/@deepseek-ai/dsh-subprocess/package.json +6 -6
  1068. package/node_modules/@deepseek-ai/dsh-subprocess-local/package.json +9 -9
  1069. package/node_modules/@deepseek-ai/dsh-system-prompt/lib/index.js +3 -3
  1070. package/node_modules/@deepseek-ai/dsh-system-prompt/package.json +10 -10
  1071. package/node_modules/@deepseek-ai/dsh-terminal/package.json +8 -8
  1072. package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +20 -20
  1073. package/node_modules/@deepseek-ai/dsh-time-context/lib/index.js +2 -3
  1074. package/node_modules/@deepseek-ai/dsh-time-context/lib/invariant.js +4 -4
  1075. package/node_modules/@deepseek-ai/dsh-time-context/package.json +23 -23
  1076. package/node_modules/@deepseek-ai/dsh-timeout/package.json +3 -3
  1077. package/node_modules/@deepseek-ai/dsh-tmux-context/lib/index.js +35 -57
  1078. package/node_modules/@deepseek-ai/dsh-tmux-context/package.json +14 -14
  1079. package/node_modules/@deepseek-ai/dsh-token-meter/lib/index.js +0 -7
  1080. package/node_modules/@deepseek-ai/dsh-token-meter/lib/types/estimate.js +0 -3
  1081. package/node_modules/@deepseek-ai/dsh-token-meter/lib/types/surface-fold.js +0 -5
  1082. package/node_modules/@deepseek-ai/dsh-token-meter/package.json +17 -17
  1083. package/node_modules/@deepseek-ai/dsh-tool-ask-user/package.json +11 -11
  1084. package/node_modules/@deepseek-ai/dsh-tool-bash/README.i18n.yaml +2 -2
  1085. package/node_modules/@deepseek-ai/dsh-tool-bash/README.md +16 -10
  1086. package/node_modules/@deepseek-ai/dsh-tool-bash/README.zh.md +16 -10
  1087. package/node_modules/@deepseek-ai/dsh-tool-bash/lib/index.js +421 -183
  1088. package/node_modules/@deepseek-ai/dsh-tool-bash/package.json +32 -32
  1089. package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/README.i18n.yaml +2 -2
  1090. package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/README.md +1 -1
  1091. package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/README.zh.md +1 -1
  1092. package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/lib/index.js +9 -3
  1093. package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/package.json +22 -22
  1094. package/node_modules/@deepseek-ai/dsh-tool-call-timeout-policy/package.json +9 -9
  1095. package/node_modules/@deepseek-ai/dsh-tool-cordis/README.i18n.yaml +2 -2
  1096. package/node_modules/@deepseek-ai/dsh-tool-cordis/README.md +6 -5
  1097. package/node_modules/@deepseek-ai/dsh-tool-cordis/README.zh.md +6 -5
  1098. package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/index.js +4 -9980
  1099. package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +7809 -0
  1100. package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/config.js +93 -0
  1101. package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/host.js +17 -0
  1102. package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/index.js +57 -0
  1103. package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/present.js +16 -0
  1104. package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/providers.js +85 -0
  1105. package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +21 -12
  1106. package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +30 -30
  1107. package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +23 -23
  1108. package/node_modules/@deepseek-ai/dsh-tool-goal/lib/index.js +1 -2
  1109. package/node_modules/@deepseek-ai/dsh-tool-goal/package.json +20 -20
  1110. package/node_modules/@deepseek-ai/dsh-tool-jobs/README.i18n.yaml +2 -2
  1111. package/node_modules/@deepseek-ai/dsh-tool-jobs/README.md +9 -8
  1112. package/node_modules/@deepseek-ai/dsh-tool-jobs/README.zh.md +10 -9
  1113. package/node_modules/@deepseek-ai/dsh-tool-jobs/lib/index.js +110 -51
  1114. package/node_modules/@deepseek-ai/dsh-tool-jobs/package.json +18 -18
  1115. package/node_modules/@deepseek-ai/dsh-tool-present/README.i18n.yaml +2 -2
  1116. package/node_modules/@deepseek-ai/dsh-tool-present/README.md +1 -1
  1117. package/node_modules/@deepseek-ai/dsh-tool-present/README.zh.md +1 -1
  1118. package/node_modules/@deepseek-ai/dsh-tool-present/lib/index.js +1 -1
  1119. package/node_modules/@deepseek-ai/dsh-tool-present/lib/types/index.js +5 -4
  1120. package/node_modules/@deepseek-ai/dsh-tool-present/package.json +20 -20
  1121. package/node_modules/@deepseek-ai/dsh-tool-pwsh/README.i18n.yaml +2 -2
  1122. package/node_modules/@deepseek-ai/dsh-tool-pwsh/README.md +10 -5
  1123. package/node_modules/@deepseek-ai/dsh-tool-pwsh/README.zh.md +10 -5
  1124. package/node_modules/@deepseek-ai/dsh-tool-pwsh/lib/index.js +440 -207
  1125. package/node_modules/@deepseek-ai/dsh-tool-pwsh/package.json +31 -31
  1126. package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/README.i18n.yaml +2 -2
  1127. package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/README.md +1 -1
  1128. package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/README.zh.md +1 -1
  1129. package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/lib/index.js +9 -3
  1130. package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/package.json +23 -23
  1131. package/node_modules/@deepseek-ai/dsh-tool-ralph/package.json +23 -23
  1132. package/node_modules/@deepseek-ai/dsh-tool-skill/package.json +15 -15
  1133. package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/package.json +20 -20
  1134. package/node_modules/@deepseek-ai/dsh-tool-subagent/README.i18n.yaml +2 -2
  1135. package/node_modules/@deepseek-ai/dsh-tool-subagent/README.md +1 -1
  1136. package/node_modules/@deepseek-ai/dsh-tool-subagent/README.zh.md +1 -1
  1137. package/node_modules/@deepseek-ai/dsh-tool-subagent/lib/index.js +2 -2
  1138. package/node_modules/@deepseek-ai/dsh-tool-subagent/lib/model-selection-settings.js +12 -38
  1139. package/node_modules/@deepseek-ai/dsh-tool-subagent/package.json +30 -32
  1140. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/README.i18n.yaml +2 -2
  1141. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/README.md +4 -4
  1142. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/README.zh.md +4 -4
  1143. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/lib/index.js +1 -1
  1144. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/lib/types/index.js +1 -1
  1145. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/lib/types/list-agents.js +10 -20
  1146. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/package.json +21 -21
  1147. package/node_modules/@deepseek-ai/dsh-tool-todo/package.json +20 -20
  1148. package/node_modules/@deepseek-ai/dsh-tool-web/package.json +21 -21
  1149. package/node_modules/@deepseek-ai/dsh-tool-workflow/README.i18n.yaml +2 -2
  1150. package/node_modules/@deepseek-ai/dsh-tool-workflow/README.md +21 -8
  1151. package/node_modules/@deepseek-ai/dsh-tool-workflow/README.zh.md +21 -8
  1152. package/node_modules/@deepseek-ai/dsh-tool-workflow/lib/index.js +179 -11
  1153. package/node_modules/@deepseek-ai/dsh-tool-workflow/lib/types/index.js +147 -14
  1154. package/node_modules/@deepseek-ai/dsh-tool-workflow/lib/types/record.js +43 -0
  1155. package/node_modules/@deepseek-ai/dsh-tool-workflow/package.json +25 -21
  1156. package/node_modules/@deepseek-ai/dsh-tool-workspace-dependencies/README.i18n.yaml +6 -0
  1157. package/node_modules/@deepseek-ai/dsh-tool-workspace-dependencies/README.md +128 -0
  1158. package/node_modules/@deepseek-ai/dsh-tool-workspace-dependencies/README.zh.md +128 -0
  1159. package/node_modules/@deepseek-ai/dsh-tool-workspace-dependencies/lib/index.js +252 -0
  1160. package/node_modules/@deepseek-ai/dsh-tool-workspace-dependencies/package.json +44 -0
  1161. package/node_modules/@deepseek-ai/dsh-tools/README.i18n.yaml +2 -2
  1162. package/node_modules/@deepseek-ai/dsh-tools/README.md +4 -0
  1163. package/node_modules/@deepseek-ai/dsh-tools/README.zh.md +4 -0
  1164. package/node_modules/@deepseek-ai/dsh-tools/lib/index.js +5 -6
  1165. package/node_modules/@deepseek-ai/dsh-tools/lib/types/index.js +2 -1
  1166. package/node_modules/@deepseek-ai/dsh-tools/lib/types/ptc.js +1 -1
  1167. package/node_modules/@deepseek-ai/dsh-tools/lib/types/schema.js +1 -0
  1168. package/node_modules/@deepseek-ai/dsh-tools/package.json +27 -27
  1169. package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +2 -2
  1170. package/node_modules/@deepseek-ai/dsh-tui-app/README.md +18 -16
  1171. package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +18 -16
  1172. package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +866 -144
  1173. package/node_modules/@deepseek-ai/dsh-tui-app/package.json +75 -75
  1174. package/node_modules/@deepseek-ai/dsh-typert-loader/lib/index.js +1 -0
  1175. package/node_modules/@deepseek-ai/dsh-typert-loader/package.json +9 -9
  1176. package/node_modules/@deepseek-ai/dsh-typert-protocol/README.i18n.yaml +2 -2
  1177. package/node_modules/@deepseek-ai/dsh-typert-protocol/README.md +7 -2
  1178. package/node_modules/@deepseek-ai/dsh-typert-protocol/README.zh.md +7 -2
  1179. package/node_modules/@deepseek-ai/dsh-typert-protocol/lib/index.js +66 -3
  1180. package/node_modules/@deepseek-ai/dsh-typert-protocol/lib/types/index.js +20 -2
  1181. package/node_modules/@deepseek-ai/dsh-typert-protocol/lib/types/json-value.js +61 -0
  1182. package/node_modules/@deepseek-ai/dsh-typert-protocol/package.json +6 -3
  1183. package/node_modules/@deepseek-ai/dsh-typert-registry/lib/client.js +3 -0
  1184. package/node_modules/@deepseek-ai/dsh-typert-registry/lib/index.js +3 -0
  1185. package/node_modules/@deepseek-ai/dsh-typert-registry/lib/types/service.js +6 -0
  1186. package/node_modules/@deepseek-ai/dsh-typert-registry/package.json +4 -4
  1187. package/node_modules/@deepseek-ai/dsh-user-approval/lib/index.js +1 -4
  1188. package/node_modules/@deepseek-ai/dsh-user-approval/lib/invariant.js +1 -4
  1189. package/node_modules/@deepseek-ai/dsh-user-approval/lib/types/index.js +1 -1
  1190. package/node_modules/@deepseek-ai/dsh-user-approval/package.json +18 -18
  1191. package/node_modules/@deepseek-ai/dsh-user-questions/package.json +9 -9
  1192. package/node_modules/@deepseek-ai/dsh-util-crypto/package.json +3 -3
  1193. package/node_modules/@deepseek-ai/dsh-util-time/package.json +3 -3
  1194. package/node_modules/@deepseek-ai/dsh-util-values/package.json +3 -3
  1195. package/node_modules/@deepseek-ai/dsh-util-workspace-path/package.json +3 -3
  1196. package/node_modules/@deepseek-ai/dsh-web/package.json +6 -6
  1197. package/node_modules/@deepseek-ai/dsh-web-app/README.i18n.yaml +2 -2
  1198. package/node_modules/@deepseek-ai/dsh-web-app/README.md +9 -6
  1199. package/node_modules/@deepseek-ai/dsh-web-app/README.zh.md +9 -6
  1200. package/node_modules/@deepseek-ai/dsh-web-app/cordis.patch.yml +51 -29
  1201. package/node_modules/@deepseek-ai/dsh-web-app/lib/index.js +293 -1
  1202. package/node_modules/@deepseek-ai/dsh-web-app/package.json +150 -102
  1203. package/node_modules/@deepseek-ai/dsh-web-app/presets/cordis.patch.yml +154 -0
  1204. package/node_modules/@deepseek-ai/dsh-web-app/presets/minimal.patch.yml +61 -0
  1205. package/node_modules/@deepseek-ai/dsh-web-app/presets/ptc.patch.yml +152 -0
  1206. package/node_modules/@deepseek-ai/dsh-web-app/presets/standard.patch.yml +146 -0
  1207. package/node_modules/@deepseek-ai/dsh-web-fetch-http/package.json +10 -10
  1208. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-DU8FBaxM.js +127 -0
  1209. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-Uv-aF9RH.css +1 -0
  1210. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/favicon-dark.svg +3 -0
  1211. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/favicon.svg +0 -5
  1212. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/index.html +4 -3
  1213. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/manifest.webmanifest +3 -4
  1214. package/node_modules/@deepseek-ai/dsh-web-frontend/package.json +15 -10
  1215. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/README.i18n.yaml +2 -2
  1216. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/README.md +4 -4
  1217. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/README.zh.md +4 -4
  1218. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/lib/index.js +21 -29
  1219. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +16 -18
  1220. package/node_modules/@deepseek-ai/dsh-web-search-exa/package.json +9 -9
  1221. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/package.json +9 -9
  1222. package/node_modules/@deepseek-ai/dsh-webhook/lib/index.js +121 -50
  1223. package/node_modules/@deepseek-ai/dsh-webhook/lib/types/session.js +111 -46
  1224. package/node_modules/@deepseek-ai/dsh-webhook/package.json +25 -25
  1225. package/node_modules/@deepseek-ai/dsh-webhook-github/package.json +15 -15
  1226. package/node_modules/@deepseek-ai/dsh-win32-process/package.json +4 -4
  1227. package/node_modules/@deepseek-ai/dsh-workflow/package.json +13 -13
  1228. package/node_modules/@deepseek-ai/dsh-workflow-ptc/package.json +36 -36
  1229. package/node_modules/@deepseek-ai/dsh-workspace/README.i18n.yaml +2 -2
  1230. package/node_modules/@deepseek-ai/dsh-workspace/README.md +16 -4
  1231. package/node_modules/@deepseek-ai/dsh-workspace/README.zh.md +17 -4
  1232. package/node_modules/@deepseek-ai/dsh-workspace/lib/index.js +166 -25
  1233. package/node_modules/@deepseek-ai/dsh-workspace/lib/invariant.js +8 -3
  1234. package/node_modules/@deepseek-ai/dsh-workspace/lib/types/index.js +185 -21
  1235. package/node_modules/@deepseek-ai/dsh-workspace/lib/types/spec.js +11 -4
  1236. package/node_modules/@deepseek-ai/dsh-workspace/package.json +16 -16
  1237. package/node_modules/@deepseek-ai/dsh-workspace-changes/package.json +16 -16
  1238. package/node_modules/@deepseek-ai/schemastery/README.md +4 -0
  1239. package/node_modules/@deepseek-ai/schemastery/lib/index.cjs +40 -1
  1240. package/node_modules/@deepseek-ai/schemastery/lib/index.mjs +41 -2
  1241. package/node_modules/@deepseek-ai/schemastery/package.json +2 -2
  1242. package/node_modules/@deepseek-ai/schemastery/src/index.ts +93 -33
  1243. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +0 -1
  1244. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +0 -1
  1245. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +0 -1
  1246. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +0 -1
  1247. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +0 -1
  1248. package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +0 -2
  1249. package/node_modules/@eslint-community/regexpp/LICENSE +21 -0
  1250. package/node_modules/@eslint-community/regexpp/README.md +177 -0
  1251. package/node_modules/@eslint-community/regexpp/index.js +3042 -0
  1252. package/node_modules/@eslint-community/regexpp/index.mjs +3032 -0
  1253. package/node_modules/@eslint-community/regexpp/package.json +71 -0
  1254. package/node_modules/ajv/.runkit_example.js +23 -0
  1255. package/node_modules/ajv/LICENSE +22 -0
  1256. package/node_modules/ajv/README.md +207 -0
  1257. package/node_modules/ajv/dist/2019.js +61 -0
  1258. package/node_modules/ajv/dist/2020.js +55 -0
  1259. package/node_modules/ajv/dist/ajv.js +50 -0
  1260. package/node_modules/ajv/dist/compile/codegen/code.js +156 -0
  1261. package/node_modules/ajv/dist/compile/codegen/index.js +697 -0
  1262. package/node_modules/ajv/dist/compile/codegen/scope.js +143 -0
  1263. package/node_modules/ajv/dist/compile/errors.js +123 -0
  1264. package/node_modules/ajv/dist/compile/index.js +242 -0
  1265. package/node_modules/ajv/dist/compile/jtd/parse.js +350 -0
  1266. package/node_modules/ajv/dist/compile/jtd/serialize.js +236 -0
  1267. package/node_modules/ajv/dist/compile/jtd/types.js +14 -0
  1268. package/node_modules/ajv/dist/compile/names.js +28 -0
  1269. package/node_modules/ajv/dist/compile/ref_error.js +12 -0
  1270. package/node_modules/ajv/dist/compile/resolve.js +155 -0
  1271. package/node_modules/ajv/dist/compile/rules.js +26 -0
  1272. package/node_modules/ajv/dist/compile/util.js +178 -0
  1273. package/node_modules/ajv/dist/compile/validate/applicability.js +19 -0
  1274. package/node_modules/ajv/dist/compile/validate/boolSchema.js +50 -0
  1275. package/node_modules/ajv/dist/compile/validate/dataType.js +203 -0
  1276. package/node_modules/ajv/dist/compile/validate/defaults.js +35 -0
  1277. package/node_modules/ajv/dist/compile/validate/index.js +520 -0
  1278. package/node_modules/ajv/dist/compile/validate/keyword.js +124 -0
  1279. package/node_modules/ajv/dist/compile/validate/subschema.js +81 -0
  1280. package/node_modules/ajv/dist/core.js +618 -0
  1281. package/node_modules/ajv/dist/jtd.js +72 -0
  1282. package/node_modules/ajv/dist/refs/data.json +13 -0
  1283. package/node_modules/ajv/dist/refs/json-schema-2019-09/index.js +28 -0
  1284. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json +53 -0
  1285. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json +17 -0
  1286. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json +57 -0
  1287. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json +14 -0
  1288. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json +37 -0
  1289. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json +90 -0
  1290. package/node_modules/ajv/dist/refs/json-schema-2019-09/schema.json +39 -0
  1291. package/node_modules/ajv/dist/refs/json-schema-2020-12/index.js +30 -0
  1292. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json +48 -0
  1293. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json +17 -0
  1294. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json +51 -0
  1295. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json +14 -0
  1296. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json +37 -0
  1297. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json +15 -0
  1298. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json +90 -0
  1299. package/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json +55 -0
  1300. package/node_modules/ajv/dist/refs/json-schema-draft-06.json +137 -0
  1301. package/node_modules/ajv/dist/refs/json-schema-draft-07.json +151 -0
  1302. package/node_modules/ajv/dist/refs/json-schema-secure.json +88 -0
  1303. package/node_modules/ajv/dist/refs/jtd-schema.js +118 -0
  1304. package/node_modules/ajv/dist/runtime/equal.js +7 -0
  1305. package/node_modules/ajv/dist/runtime/parseJson.js +185 -0
  1306. package/node_modules/ajv/dist/runtime/quote.js +30 -0
  1307. package/node_modules/ajv/dist/runtime/re2.js +6 -0
  1308. package/node_modules/ajv/dist/runtime/timestamp.js +42 -0
  1309. package/node_modules/ajv/dist/runtime/ucs2length.js +24 -0
  1310. package/node_modules/ajv/dist/runtime/uri.js +6 -0
  1311. package/node_modules/ajv/dist/runtime/validation_error.js +11 -0
  1312. package/node_modules/ajv/dist/standalone/index.js +90 -0
  1313. package/node_modules/ajv/dist/standalone/instance.js +35 -0
  1314. package/node_modules/ajv/dist/types/index.js +3 -0
  1315. package/node_modules/ajv/dist/types/json-schema.js +3 -0
  1316. package/node_modules/ajv/dist/types/jtd-schema.js +3 -0
  1317. package/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +49 -0
  1318. package/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +106 -0
  1319. package/node_modules/ajv/dist/vocabularies/applicator/allOf.js +23 -0
  1320. package/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +12 -0
  1321. package/node_modules/ajv/dist/vocabularies/applicator/contains.js +95 -0
  1322. package/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +85 -0
  1323. package/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +11 -0
  1324. package/node_modules/ajv/dist/vocabularies/applicator/if.js +66 -0
  1325. package/node_modules/ajv/dist/vocabularies/applicator/index.js +44 -0
  1326. package/node_modules/ajv/dist/vocabularies/applicator/items.js +52 -0
  1327. package/node_modules/ajv/dist/vocabularies/applicator/items2020.js +30 -0
  1328. package/node_modules/ajv/dist/vocabularies/applicator/not.js +26 -0
  1329. package/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +60 -0
  1330. package/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +75 -0
  1331. package/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +12 -0
  1332. package/node_modules/ajv/dist/vocabularies/applicator/properties.js +54 -0
  1333. package/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +38 -0
  1334. package/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +13 -0
  1335. package/node_modules/ajv/dist/vocabularies/code.js +131 -0
  1336. package/node_modules/ajv/dist/vocabularies/core/id.js +10 -0
  1337. package/node_modules/ajv/dist/vocabularies/core/index.js +16 -0
  1338. package/node_modules/ajv/dist/vocabularies/core/ref.js +122 -0
  1339. package/node_modules/ajv/dist/vocabularies/discriminator/index.js +104 -0
  1340. package/node_modules/ajv/dist/vocabularies/discriminator/types.js +9 -0
  1341. package/node_modules/ajv/dist/vocabularies/draft2020.js +23 -0
  1342. package/node_modules/ajv/dist/vocabularies/draft7.js +17 -0
  1343. package/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +30 -0
  1344. package/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +51 -0
  1345. package/node_modules/ajv/dist/vocabularies/dynamic/index.js +9 -0
  1346. package/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +16 -0
  1347. package/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +10 -0
  1348. package/node_modules/ajv/dist/vocabularies/errors.js +3 -0
  1349. package/node_modules/ajv/dist/vocabularies/format/format.js +92 -0
  1350. package/node_modules/ajv/dist/vocabularies/format/index.js +6 -0
  1351. package/node_modules/ajv/dist/vocabularies/jtd/discriminator.js +71 -0
  1352. package/node_modules/ajv/dist/vocabularies/jtd/elements.js +24 -0
  1353. package/node_modules/ajv/dist/vocabularies/jtd/enum.js +43 -0
  1354. package/node_modules/ajv/dist/vocabularies/jtd/error.js +20 -0
  1355. package/node_modules/ajv/dist/vocabularies/jtd/index.js +29 -0
  1356. package/node_modules/ajv/dist/vocabularies/jtd/metadata.js +25 -0
  1357. package/node_modules/ajv/dist/vocabularies/jtd/nullable.js +22 -0
  1358. package/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js +15 -0
  1359. package/node_modules/ajv/dist/vocabularies/jtd/properties.js +149 -0
  1360. package/node_modules/ajv/dist/vocabularies/jtd/ref.js +67 -0
  1361. package/node_modules/ajv/dist/vocabularies/jtd/type.js +69 -0
  1362. package/node_modules/ajv/dist/vocabularies/jtd/union.js +12 -0
  1363. package/node_modules/ajv/dist/vocabularies/jtd/values.js +51 -0
  1364. package/node_modules/ajv/dist/vocabularies/metadata.js +18 -0
  1365. package/node_modules/ajv/dist/vocabularies/next.js +8 -0
  1366. package/node_modules/ajv/dist/vocabularies/unevaluated/index.js +7 -0
  1367. package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +40 -0
  1368. package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +65 -0
  1369. package/node_modules/ajv/dist/vocabularies/validation/const.js +25 -0
  1370. package/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +12 -0
  1371. package/node_modules/ajv/dist/vocabularies/validation/enum.js +48 -0
  1372. package/node_modules/ajv/dist/vocabularies/validation/index.js +33 -0
  1373. package/node_modules/ajv/dist/vocabularies/validation/limitContains.js +15 -0
  1374. package/node_modules/ajv/dist/vocabularies/validation/limitItems.js +24 -0
  1375. package/node_modules/ajv/dist/vocabularies/validation/limitLength.js +27 -0
  1376. package/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +27 -0
  1377. package/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +24 -0
  1378. package/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +26 -0
  1379. package/node_modules/ajv/dist/vocabularies/validation/pattern.js +33 -0
  1380. package/node_modules/ajv/dist/vocabularies/validation/required.js +79 -0
  1381. package/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +64 -0
  1382. package/node_modules/ajv/lib/2019.ts +81 -0
  1383. package/node_modules/ajv/lib/2020.ts +75 -0
  1384. package/node_modules/ajv/lib/ajv.ts +70 -0
  1385. package/node_modules/ajv/lib/compile/codegen/code.ts +169 -0
  1386. package/node_modules/ajv/lib/compile/codegen/index.ts +852 -0
  1387. package/node_modules/ajv/lib/compile/codegen/scope.ts +215 -0
  1388. package/node_modules/ajv/lib/compile/errors.ts +184 -0
  1389. package/node_modules/ajv/lib/compile/index.ts +324 -0
  1390. package/node_modules/ajv/lib/compile/jtd/parse.ts +411 -0
  1391. package/node_modules/ajv/lib/compile/jtd/serialize.ts +277 -0
  1392. package/node_modules/ajv/lib/compile/jtd/types.ts +16 -0
  1393. package/node_modules/ajv/lib/compile/names.ts +27 -0
  1394. package/node_modules/ajv/lib/compile/ref_error.ts +13 -0
  1395. package/node_modules/ajv/lib/compile/resolve.ts +149 -0
  1396. package/node_modules/ajv/lib/compile/rules.ts +50 -0
  1397. package/node_modules/ajv/lib/compile/util.ts +213 -0
  1398. package/node_modules/ajv/lib/compile/validate/applicability.ts +22 -0
  1399. package/node_modules/ajv/lib/compile/validate/boolSchema.ts +47 -0
  1400. package/node_modules/ajv/lib/compile/validate/dataType.ts +230 -0
  1401. package/node_modules/ajv/lib/compile/validate/defaults.ts +32 -0
  1402. package/node_modules/ajv/lib/compile/validate/index.ts +582 -0
  1403. package/node_modules/ajv/lib/compile/validate/keyword.ts +171 -0
  1404. package/node_modules/ajv/lib/compile/validate/subschema.ts +135 -0
  1405. package/node_modules/ajv/lib/core.ts +892 -0
  1406. package/node_modules/ajv/lib/jtd.ts +132 -0
  1407. package/node_modules/ajv/lib/refs/data.json +13 -0
  1408. package/node_modules/ajv/lib/refs/json-schema-2019-09/index.ts +28 -0
  1409. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/applicator.json +53 -0
  1410. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/content.json +17 -0
  1411. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/core.json +57 -0
  1412. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/format.json +14 -0
  1413. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/meta-data.json +37 -0
  1414. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/validation.json +90 -0
  1415. package/node_modules/ajv/lib/refs/json-schema-2019-09/schema.json +39 -0
  1416. package/node_modules/ajv/lib/refs/json-schema-2020-12/index.ts +30 -0
  1417. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/applicator.json +48 -0
  1418. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/content.json +17 -0
  1419. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/core.json +51 -0
  1420. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/format-annotation.json +14 -0
  1421. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/meta-data.json +37 -0
  1422. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/unevaluated.json +15 -0
  1423. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/validation.json +90 -0
  1424. package/node_modules/ajv/lib/refs/json-schema-2020-12/schema.json +55 -0
  1425. package/node_modules/ajv/lib/refs/json-schema-draft-06.json +137 -0
  1426. package/node_modules/ajv/lib/refs/json-schema-draft-07.json +151 -0
  1427. package/node_modules/ajv/lib/refs/json-schema-secure.json +88 -0
  1428. package/node_modules/ajv/lib/refs/jtd-schema.ts +130 -0
  1429. package/node_modules/ajv/lib/runtime/equal.ts +7 -0
  1430. package/node_modules/ajv/lib/runtime/parseJson.ts +177 -0
  1431. package/node_modules/ajv/lib/runtime/quote.ts +31 -0
  1432. package/node_modules/ajv/lib/runtime/re2.ts +6 -0
  1433. package/node_modules/ajv/lib/runtime/timestamp.ts +46 -0
  1434. package/node_modules/ajv/lib/runtime/ucs2length.ts +20 -0
  1435. package/node_modules/ajv/lib/runtime/uri.ts +6 -0
  1436. package/node_modules/ajv/lib/runtime/validation_error.ts +13 -0
  1437. package/node_modules/ajv/lib/standalone/index.ts +100 -0
  1438. package/node_modules/ajv/lib/standalone/instance.ts +36 -0
  1439. package/node_modules/ajv/lib/types/index.ts +244 -0
  1440. package/node_modules/ajv/lib/types/json-schema.ts +187 -0
  1441. package/node_modules/ajv/lib/types/jtd-schema.ts +273 -0
  1442. package/node_modules/ajv/lib/vocabularies/applicator/additionalItems.ts +56 -0
  1443. package/node_modules/ajv/lib/vocabularies/applicator/additionalProperties.ts +118 -0
  1444. package/node_modules/ajv/lib/vocabularies/applicator/allOf.ts +22 -0
  1445. package/node_modules/ajv/lib/vocabularies/applicator/anyOf.ts +14 -0
  1446. package/node_modules/ajv/lib/vocabularies/applicator/contains.ts +109 -0
  1447. package/node_modules/ajv/lib/vocabularies/applicator/dependencies.ts +112 -0
  1448. package/node_modules/ajv/lib/vocabularies/applicator/dependentSchemas.ts +11 -0
  1449. package/node_modules/ajv/lib/vocabularies/applicator/if.ts +80 -0
  1450. package/node_modules/ajv/lib/vocabularies/applicator/index.ts +53 -0
  1451. package/node_modules/ajv/lib/vocabularies/applicator/items.ts +59 -0
  1452. package/node_modules/ajv/lib/vocabularies/applicator/items2020.ts +36 -0
  1453. package/node_modules/ajv/lib/vocabularies/applicator/not.ts +38 -0
  1454. package/node_modules/ajv/lib/vocabularies/applicator/oneOf.ts +82 -0
  1455. package/node_modules/ajv/lib/vocabularies/applicator/patternProperties.ts +91 -0
  1456. package/node_modules/ajv/lib/vocabularies/applicator/prefixItems.ts +12 -0
  1457. package/node_modules/ajv/lib/vocabularies/applicator/properties.ts +57 -0
  1458. package/node_modules/ajv/lib/vocabularies/applicator/propertyNames.ts +50 -0
  1459. package/node_modules/ajv/lib/vocabularies/applicator/thenElse.ts +13 -0
  1460. package/node_modules/ajv/lib/vocabularies/code.ts +168 -0
  1461. package/node_modules/ajv/lib/vocabularies/core/id.ts +10 -0
  1462. package/node_modules/ajv/lib/vocabularies/core/index.ts +16 -0
  1463. package/node_modules/ajv/lib/vocabularies/core/ref.ts +129 -0
  1464. package/node_modules/ajv/lib/vocabularies/discriminator/index.ts +113 -0
  1465. package/node_modules/ajv/lib/vocabularies/discriminator/types.ts +12 -0
  1466. package/node_modules/ajv/lib/vocabularies/draft2020.ts +23 -0
  1467. package/node_modules/ajv/lib/vocabularies/draft7.ts +17 -0
  1468. package/node_modules/ajv/lib/vocabularies/dynamic/dynamicAnchor.ts +31 -0
  1469. package/node_modules/ajv/lib/vocabularies/dynamic/dynamicRef.ts +51 -0
  1470. package/node_modules/ajv/lib/vocabularies/dynamic/index.ts +9 -0
  1471. package/node_modules/ajv/lib/vocabularies/dynamic/recursiveAnchor.ts +14 -0
  1472. package/node_modules/ajv/lib/vocabularies/dynamic/recursiveRef.ts +10 -0
  1473. package/node_modules/ajv/lib/vocabularies/errors.ts +18 -0
  1474. package/node_modules/ajv/lib/vocabularies/format/format.ts +120 -0
  1475. package/node_modules/ajv/lib/vocabularies/format/index.ts +6 -0
  1476. package/node_modules/ajv/lib/vocabularies/jtd/discriminator.ts +89 -0
  1477. package/node_modules/ajv/lib/vocabularies/jtd/elements.ts +32 -0
  1478. package/node_modules/ajv/lib/vocabularies/jtd/enum.ts +45 -0
  1479. package/node_modules/ajv/lib/vocabularies/jtd/error.ts +23 -0
  1480. package/node_modules/ajv/lib/vocabularies/jtd/index.ts +37 -0
  1481. package/node_modules/ajv/lib/vocabularies/jtd/metadata.ts +24 -0
  1482. package/node_modules/ajv/lib/vocabularies/jtd/nullable.ts +21 -0
  1483. package/node_modules/ajv/lib/vocabularies/jtd/optionalProperties.ts +15 -0
  1484. package/node_modules/ajv/lib/vocabularies/jtd/properties.ts +184 -0
  1485. package/node_modules/ajv/lib/vocabularies/jtd/ref.ts +76 -0
  1486. package/node_modules/ajv/lib/vocabularies/jtd/type.ts +75 -0
  1487. package/node_modules/ajv/lib/vocabularies/jtd/union.ts +12 -0
  1488. package/node_modules/ajv/lib/vocabularies/jtd/values.ts +58 -0
  1489. package/node_modules/ajv/lib/vocabularies/metadata.ts +17 -0
  1490. package/node_modules/ajv/lib/vocabularies/next.ts +8 -0
  1491. package/node_modules/ajv/lib/vocabularies/unevaluated/index.ts +7 -0
  1492. package/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedItems.ts +47 -0
  1493. package/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedProperties.ts +85 -0
  1494. package/node_modules/ajv/lib/vocabularies/validation/const.ts +28 -0
  1495. package/node_modules/ajv/lib/vocabularies/validation/dependentRequired.ts +23 -0
  1496. package/node_modules/ajv/lib/vocabularies/validation/enum.ts +54 -0
  1497. package/node_modules/ajv/lib/vocabularies/validation/index.ts +49 -0
  1498. package/node_modules/ajv/lib/vocabularies/validation/limitContains.ts +16 -0
  1499. package/node_modules/ajv/lib/vocabularies/validation/limitItems.ts +26 -0
  1500. package/node_modules/ajv/lib/vocabularies/validation/limitLength.ts +30 -0
  1501. package/node_modules/ajv/lib/vocabularies/validation/limitNumber.ts +42 -0
  1502. package/node_modules/ajv/lib/vocabularies/validation/limitProperties.ts +26 -0
  1503. package/node_modules/ajv/lib/vocabularies/validation/multipleOf.ts +34 -0
  1504. package/node_modules/ajv/lib/vocabularies/validation/pattern.ts +39 -0
  1505. package/node_modules/ajv/lib/vocabularies/validation/required.ts +98 -0
  1506. package/node_modules/ajv/lib/vocabularies/validation/uniqueItems.ts +79 -0
  1507. package/node_modules/ajv/package.json +104 -0
  1508. package/node_modules/fast-uri/.gitattributes +2 -0
  1509. package/node_modules/fast-uri/.github/dependabot.yml +13 -0
  1510. package/node_modules/fast-uri/.github/workflows/ci.yml +106 -0
  1511. package/node_modules/fast-uri/.github/workflows/lock-threads.yml +19 -0
  1512. package/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +24 -0
  1513. package/node_modules/fast-uri/LICENSE +30 -0
  1514. package/node_modules/fast-uri/README.md +152 -0
  1515. package/node_modules/fast-uri/benchmark/benchmark.mjs +159 -0
  1516. package/node_modules/fast-uri/benchmark/equal.mjs +51 -0
  1517. package/node_modules/fast-uri/benchmark/non-simple-domain.mjs +22 -0
  1518. package/node_modules/fast-uri/benchmark/package.json +17 -0
  1519. package/node_modules/fast-uri/benchmark/string-array-to-hex-stripped.mjs +24 -0
  1520. package/node_modules/fast-uri/benchmark/ws-is-secure.mjs +65 -0
  1521. package/node_modules/fast-uri/eslint.config.js +6 -0
  1522. package/node_modules/fast-uri/index.js +631 -0
  1523. package/node_modules/fast-uri/lib/schemes.js +272 -0
  1524. package/node_modules/fast-uri/lib/utils.js +747 -0
  1525. package/node_modules/fast-uri/package.json +56 -0
  1526. package/node_modules/fast-uri/test/ajv.test.js +43 -0
  1527. package/node_modules/fast-uri/test/component-safe-serialization.test.js +163 -0
  1528. package/node_modules/fast-uri/test/equal.test.js +145 -0
  1529. package/node_modules/fast-uri/test/fixtures/uri-js-parse.json +503 -0
  1530. package/node_modules/fast-uri/test/fixtures/uri-js-serialize.json +120 -0
  1531. package/node_modules/fast-uri/test/ipv6-canonical.test.js +34 -0
  1532. package/node_modules/fast-uri/test/ipv6-validation.test.js +124 -0
  1533. package/node_modules/fast-uri/test/malformed-percent.test.js +77 -0
  1534. package/node_modules/fast-uri/test/malformed-urn.test.js +61 -0
  1535. package/node_modules/fast-uri/test/parse.test.js +327 -0
  1536. package/node_modules/fast-uri/test/query-fragment-normalization.test.js +33 -0
  1537. package/node_modules/fast-uri/test/reserved-path-normalization.test.js +109 -0
  1538. package/node_modules/fast-uri/test/resolve.test.js +87 -0
  1539. package/node_modules/fast-uri/test/rfc-3986.test.js +90 -0
  1540. package/node_modules/fast-uri/test/scheme-validation.test.js +124 -0
  1541. package/node_modules/fast-uri/test/security-normalization.test.js +178 -0
  1542. package/node_modules/fast-uri/test/security.test.js +431 -0
  1543. package/node_modules/fast-uri/test/serialize.test.js +151 -0
  1544. package/node_modules/fast-uri/test/uri-js-compatibility.test.js +33 -0
  1545. package/node_modules/fast-uri/test/uri-js.test.js +912 -0
  1546. package/node_modules/fast-uri/test/urn-full-input.test.js +29 -0
  1547. package/node_modules/fast-uri/test/util.test.js +38 -0
  1548. package/node_modules/fast-uri/test/websocket-query-preservation.test.js +24 -0
  1549. package/node_modules/fast-uri/tsconfig.json +9 -0
  1550. package/node_modules/fast-uri/types/index.test-d.ts +17 -0
  1551. package/node_modules/json-schema-traverse/.eslintrc.yml +27 -0
  1552. package/node_modules/json-schema-traverse/.github/FUNDING.yml +2 -0
  1553. package/node_modules/json-schema-traverse/.github/workflows/build.yml +28 -0
  1554. package/node_modules/json-schema-traverse/.github/workflows/publish.yml +27 -0
  1555. package/node_modules/json-schema-traverse/LICENSE +21 -0
  1556. package/node_modules/json-schema-traverse/README.md +95 -0
  1557. package/node_modules/json-schema-traverse/index.js +93 -0
  1558. package/node_modules/json-schema-traverse/package.json +38 -0
  1559. package/node_modules/json-schema-traverse/spec/.eslintrc.yml +6 -0
  1560. package/node_modules/json-schema-traverse/spec/fixtures/schema.js +125 -0
  1561. package/node_modules/json-schema-traverse/spec/index.spec.js +171 -0
  1562. package/node_modules/require-from-string/index.js +34 -0
  1563. package/node_modules/require-from-string/license +21 -0
  1564. package/node_modules/require-from-string/package.json +25 -0
  1565. package/node_modules/require-from-string/readme.md +56 -0
  1566. package/node_modules/sherpa-onnx-node/README.md +11 -0
  1567. package/node_modules/sherpa-onnx-node/addon-static-import.js +70 -0
  1568. package/node_modules/sherpa-onnx-node/addon.js +98 -0
  1569. package/node_modules/sherpa-onnx-node/audio-tagg.js +45 -0
  1570. package/node_modules/sherpa-onnx-node/keyword-spotter.js +68 -0
  1571. package/node_modules/sherpa-onnx-node/non-streaming-asr.js +158 -0
  1572. package/node_modules/sherpa-onnx-node/non-streaming-speaker-diarization.js +38 -0
  1573. package/node_modules/sherpa-onnx-node/non-streaming-speech-denoiser.js +32 -0
  1574. package/node_modules/sherpa-onnx-node/non-streaming-tts.js +116 -0
  1575. package/node_modules/sherpa-onnx-node/online-speech-denoiser.js +46 -0
  1576. package/node_modules/sherpa-onnx-node/package.json +56 -0
  1577. package/node_modules/sherpa-onnx-node/punctuation.js +43 -0
  1578. package/node_modules/sherpa-onnx-node/resampler.js +80 -0
  1579. package/node_modules/sherpa-onnx-node/sherpa-onnx.js +49 -0
  1580. package/node_modules/sherpa-onnx-node/speaker-identification.js +152 -0
  1581. package/node_modules/sherpa-onnx-node/spoken-language-identification.js +38 -0
  1582. package/node_modules/sherpa-onnx-node/streaming-asr.js +181 -0
  1583. package/node_modules/sherpa-onnx-node/types.js +788 -0
  1584. package/node_modules/sherpa-onnx-node/vad.js +134 -0
  1585. package/package.json +318 -272
  1586. package/node_modules/@bufbuild/protobuf/README.md +0 -41
  1587. package/node_modules/@bufbuild/protobuf/dist/commonjs/clone.js +0 -66
  1588. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/boot.js +0 -18
  1589. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/enum.js +0 -31
  1590. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/extension.js +0 -28
  1591. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/file.js +0 -18
  1592. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/index.js +0 -39
  1593. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/message.js +0 -24
  1594. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/service.js +0 -27
  1595. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/symbols.js +0 -43
  1596. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/types.js +0 -15
  1597. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/boot.js +0 -105
  1598. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/embed.js +0 -244
  1599. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/enum.js +0 -58
  1600. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/extension.js +0 -28
  1601. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/file.js +0 -35
  1602. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/index.js +0 -39
  1603. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/message.js +0 -24
  1604. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/restore-json-names.js +0 -29
  1605. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/scalar.js +0 -67
  1606. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/service.js +0 -27
  1607. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/symbols.js +0 -74
  1608. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/types.js +0 -15
  1609. package/node_modules/@bufbuild/protobuf/dist/commonjs/create.js +0 -296
  1610. package/node_modules/@bufbuild/protobuf/dist/commonjs/descriptors.js +0 -53
  1611. package/node_modules/@bufbuild/protobuf/dist/commonjs/equals.js +0 -209
  1612. package/node_modules/@bufbuild/protobuf/dist/commonjs/extensions.js +0 -168
  1613. package/node_modules/@bufbuild/protobuf/dist/commonjs/fields.js +0 -45
  1614. package/node_modules/@bufbuild/protobuf/dist/commonjs/from-binary.js +0 -415
  1615. package/node_modules/@bufbuild/protobuf/dist/commonjs/from-json.js +0 -1037
  1616. package/node_modules/@bufbuild/protobuf/dist/commonjs/index.js +0 -55
  1617. package/node_modules/@bufbuild/protobuf/dist/commonjs/is-message.js +0 -33
  1618. package/node_modules/@bufbuild/protobuf/dist/commonjs/json-value.js +0 -15
  1619. package/node_modules/@bufbuild/protobuf/dist/commonjs/merge.js +0 -70
  1620. package/node_modules/@bufbuild/protobuf/dist/commonjs/package.json +0 -4
  1621. package/node_modules/@bufbuild/protobuf/dist/commonjs/proto-int64.js +0 -131
  1622. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/error.js +0 -36
  1623. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/guard.js +0 -78
  1624. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/index.js +0 -41
  1625. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/message.js +0 -157
  1626. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/names.js +0 -115
  1627. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/nested-types.js +0 -110
  1628. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/path.js +0 -376
  1629. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.js +0 -292
  1630. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-types.js +0 -16
  1631. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect.js +0 -469
  1632. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/scalar.js +0 -129
  1633. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/unsafe.js +0 -149
  1634. package/node_modules/@bufbuild/protobuf/dist/commonjs/registry.js +0 -954
  1635. package/node_modules/@bufbuild/protobuf/dist/commonjs/to-binary.js +0 -437
  1636. package/node_modules/@bufbuild/protobuf/dist/commonjs/to-json.js +0 -625
  1637. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/from-text.js +0 -684
  1638. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/index.js +0 -21
  1639. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/is-group-like.js +0 -47
  1640. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/reader.js +0 -481
  1641. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/to-text.js +0 -358
  1642. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/writer.js +0 -220
  1643. package/node_modules/@bufbuild/protobuf/dist/commonjs/types.js +0 -15
  1644. package/node_modules/@bufbuild/protobuf/dist/commonjs/unknown-enum.js +0 -26
  1645. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/base64-encoding.js +0 -188
  1646. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.js +0 -726
  1647. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/index.js +0 -37
  1648. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/size-delimited.js +0 -191
  1649. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-encoding.js +0 -106
  1650. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-format.js +0 -199
  1651. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/varint.js +0 -334
  1652. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/any.js +0 -75
  1653. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/duration.js +0 -39
  1654. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/any_pb.js +0 -27
  1655. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/api_pb.js +0 -39
  1656. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/compiler/plugin_pb.js +0 -68
  1657. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/cpp_features_pb.js +0 -60
  1658. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/descriptor_pb.js +0 -892
  1659. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/duration_pb.js +0 -27
  1660. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/empty_pb.js +0 -27
  1661. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/field_mask_pb.js +0 -27
  1662. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/go_features_pb.js +0 -126
  1663. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/java_features_pb.js +0 -106
  1664. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/source_context_pb.js +0 -27
  1665. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/struct_pb.js +0 -59
  1666. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/timestamp_pb.js +0 -27
  1667. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/type_pb.js +0 -242
  1668. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/wrappers_pb.js +0 -67
  1669. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/index.js +0 -48
  1670. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/json.js +0 -44
  1671. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/timestamp.js +0 -57
  1672. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/wrappers.js +0 -66
  1673. package/node_modules/@bufbuild/protobuf/dist/esm/clone.js +0 -63
  1674. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/boot.js +0 -14
  1675. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/enum.js +0 -26
  1676. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/extension.js +0 -25
  1677. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/file.js +0 -14
  1678. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/index.js +0 -23
  1679. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/message.js +0 -21
  1680. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/service.js +0 -24
  1681. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/symbols.js +0 -40
  1682. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/types.js +0 -14
  1683. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/boot.js +0 -101
  1684. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/embed.js +0 -239
  1685. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/enum.js +0 -53
  1686. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/extension.js +0 -25
  1687. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.js +0 -32
  1688. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/index.js +0 -23
  1689. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.js +0 -21
  1690. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/restore-json-names.js +0 -26
  1691. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/scalar.js +0 -63
  1692. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/service.js +0 -24
  1693. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/symbols.js +0 -71
  1694. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/types.js +0 -14
  1695. package/node_modules/@bufbuild/protobuf/dist/esm/create.js +0 -293
  1696. package/node_modules/@bufbuild/protobuf/dist/esm/descriptors.js +0 -50
  1697. package/node_modules/@bufbuild/protobuf/dist/esm/equals.js +0 -206
  1698. package/node_modules/@bufbuild/protobuf/dist/esm/extensions.js +0 -159
  1699. package/node_modules/@bufbuild/protobuf/dist/esm/fields.js +0 -41
  1700. package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.js +0 -409
  1701. package/node_modules/@bufbuild/protobuf/dist/esm/from-json.js +0 -1029
  1702. package/node_modules/@bufbuild/protobuf/dist/esm/index.js +0 -29
  1703. package/node_modules/@bufbuild/protobuf/dist/esm/is-message.js +0 -30
  1704. package/node_modules/@bufbuild/protobuf/dist/esm/json-value.js +0 -14
  1705. package/node_modules/@bufbuild/protobuf/dist/esm/merge.js +0 -67
  1706. package/node_modules/@bufbuild/protobuf/dist/esm/package.json +0 -4
  1707. package/node_modules/@bufbuild/protobuf/dist/esm/proto-int64.js +0 -128
  1708. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.js +0 -31
  1709. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.js +0 -71
  1710. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/index.js +0 -21
  1711. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/message.js +0 -152
  1712. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.js +0 -109
  1713. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.js +0 -105
  1714. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/path.js +0 -369
  1715. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.js +0 -284
  1716. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-types.js +0 -14
  1717. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.js +0 -464
  1718. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.js +0 -124
  1719. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.js +0 -140
  1720. package/node_modules/@bufbuild/protobuf/dist/esm/registry.js +0 -948
  1721. package/node_modules/@bufbuild/protobuf/dist/esm/to-binary.js +0 -433
  1722. package/node_modules/@bufbuild/protobuf/dist/esm/to-json.js +0 -620
  1723. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/from-text.js +0 -680
  1724. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/index.js +0 -15
  1725. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/is-group-like.js +0 -44
  1726. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/reader.js +0 -477
  1727. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/to-text.js +0 -355
  1728. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/writer.js +0 -214
  1729. package/node_modules/@bufbuild/protobuf/dist/esm/types.js +0 -14
  1730. package/node_modules/@bufbuild/protobuf/dist/esm/unknown-enum.js +0 -23
  1731. package/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.js +0 -184
  1732. package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.js +0 -721
  1733. package/node_modules/@bufbuild/protobuf/dist/esm/wire/index.js +0 -18
  1734. package/node_modules/@bufbuild/protobuf/dist/esm/wire/size-delimited.js +0 -186
  1735. package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.js +0 -101
  1736. package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-format.js +0 -195
  1737. package/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.js +0 -325
  1738. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/any.js +0 -69
  1739. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/duration.js +0 -35
  1740. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/any_pb.js +0 -24
  1741. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/api_pb.js +0 -36
  1742. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.js +0 -65
  1743. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/cpp_features_pb.js +0 -57
  1744. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.js +0 -888
  1745. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/duration_pb.js +0 -24
  1746. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/empty_pb.js +0 -24
  1747. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/field_mask_pb.js +0 -24
  1748. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/go_features_pb.js +0 -123
  1749. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/java_features_pb.js +0 -103
  1750. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/source_context_pb.js +0 -24
  1751. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/struct_pb.js +0 -56
  1752. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/timestamp_pb.js +0 -24
  1753. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/type_pb.js +0 -239
  1754. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/wrappers_pb.js +0 -64
  1755. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/index.js +0 -32
  1756. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/json.js +0 -41
  1757. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/timestamp.js +0 -50
  1758. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.js +0 -61
  1759. package/node_modules/@bufbuild/protobuf/package.json +0 -136
  1760. package/node_modules/@deepseek-ai/dsh-agent-presets/README.md +0 -195
  1761. package/node_modules/@deepseek-ai/dsh-agent-presets/README.zh.md +0 -195
  1762. package/node_modules/@deepseek-ai/dsh-agent-presets/lib/index.js +0 -1820
  1763. package/node_modules/@deepseek-ai/dsh-agent-presets/lib/invariant.js +0 -1838
  1764. package/node_modules/@deepseek-ai/dsh-agent-presets/lib/typert.remote-client.js +0 -207
  1765. package/node_modules/@deepseek-ai/dsh-agent-presets/lib/types/authoring.js +0 -176
  1766. package/node_modules/@deepseek-ai/dsh-agent-presets/lib/types/discovery.js +0 -316
  1767. package/node_modules/@deepseek-ai/dsh-agent-presets/lib/types/index.js +0 -799
  1768. package/node_modules/@deepseek-ai/dsh-agent-presets/lib/types/metadata.js +0 -92
  1769. package/node_modules/@deepseek-ai/dsh-agent-presets/lib/types/mount.js +0 -386
  1770. package/node_modules/@deepseek-ai/dsh-agent-presets/lib/types/preset.js +0 -11
  1771. package/node_modules/@deepseek-ai/dsh-agent-presets/lib/types/specifier.js +0 -41
  1772. package/node_modules/@deepseek-ai/dsh-agent-presets/package.json +0 -98
  1773. package/node_modules/@deepseek-ai/dsh-agent-presets/presets/cordis/agent.cordis.yml +0 -283
  1774. package/node_modules/@deepseek-ai/dsh-agent-presets/presets/cordis/preset.yml +0 -3
  1775. package/node_modules/@deepseek-ai/dsh-agent-presets/presets/cordis/skills/cordis-plugin-development/SKILL.md +0 -108
  1776. package/node_modules/@deepseek-ai/dsh-agent-presets/presets/cordis/skills/editing-cordis-compositions/SKILL.md +0 -102
  1777. package/node_modules/@deepseek-ai/dsh-agent-presets/presets/minimal/agent.cordis.yml +0 -69
  1778. package/node_modules/@deepseek-ai/dsh-agent-presets/presets/minimal/preset.yml +0 -3
  1779. package/node_modules/@deepseek-ai/dsh-agent-presets/presets/ptc/agent.cordis.yml +0 -287
  1780. package/node_modules/@deepseek-ai/dsh-agent-presets/presets/ptc/preset.yml +0 -3
  1781. package/node_modules/@deepseek-ai/dsh-agent-presets/presets/standard/agent.cordis.yml +0 -266
  1782. package/node_modules/@deepseek-ai/dsh-agent-presets/presets/standard/preset.yml +0 -3
  1783. package/node_modules/@deepseek-ai/dsh-api-authorization-controller/README.md +0 -138
  1784. package/node_modules/@deepseek-ai/dsh-api-authorization-controller/README.zh.md +0 -138
  1785. package/node_modules/@deepseek-ai/dsh-api-authorization-controller/lib/index.js +0 -501
  1786. package/node_modules/@deepseek-ai/dsh-api-authorization-controller/lib/typert.host.js +0 -350
  1787. package/node_modules/@deepseek-ai/dsh-api-authorization-controller/lib/typert.remote-client.js +0 -249
  1788. package/node_modules/@deepseek-ai/dsh-api-authorization-controller/lib/types/index.js +0 -424
  1789. package/node_modules/@deepseek-ai/dsh-api-authorization-controller/lib/types/types.js +0 -12
  1790. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/queue-mirror.js +0 -61
  1791. package/node_modules/@deepseek-ai/dsh-client-ui-settings-unarchive-sessions/README.md +0 -112
  1792. package/node_modules/@deepseek-ai/dsh-client-ui-settings-unarchive-sessions/README.zh.md +0 -112
  1793. package/node_modules/@deepseek-ai/dsh-client-ui-settings-unarchive-sessions/lib/client.js +0 -216
  1794. package/node_modules/@deepseek-ai/dsh-client-ui-settings-unarchive-sessions/lib/index.js +0 -6
  1795. package/node_modules/@deepseek-ai/dsh-client-ui-settings-unarchive-sessions/package.json +0 -66
  1796. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-web-profile/README.md +0 -98
  1797. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-web-profile/README.zh.md +0 -98
  1798. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-web-profile/cordis.patch.yml +0 -6
  1799. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-web-profile/package.json +0 -47
  1800. package/node_modules/@deepseek-ai/dsh-llm-cursor/README.md +0 -142
  1801. package/node_modules/@deepseek-ai/dsh-llm-cursor/README.zh.md +0 -142
  1802. package/node_modules/@deepseek-ai/dsh-llm-cursor/lib/index.js +0 -3050
  1803. package/node_modules/@deepseek-ai/dsh-llm-cursor/package.json +0 -62
  1804. package/node_modules/@deepseek-ai/dsh-settings/lib/invariant.js +0 -35
  1805. package/node_modules/@deepseek-ai/dsh-settings/lib/types/invariant.js +0 -41
  1806. package/node_modules/@deepseek-ai/dsh-settings-file/README.md +0 -150
  1807. package/node_modules/@deepseek-ai/dsh-settings-file/README.zh.md +0 -150
  1808. package/node_modules/@deepseek-ai/dsh-settings-file/lib/index.js +0 -285
  1809. package/node_modules/@deepseek-ai/dsh-settings-file/package.json +0 -47
  1810. package/node_modules/@deepseek-ai/dsh-subprocess-local/lib/runner-launch-UEJ3Ntqn.js +0 -1511
  1811. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-8VXBH-f-.js +0 -127
  1812. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-lP1BfJ4l.css +0 -1
  1813. /package/node_modules/@deepseek-ai/{dsh-agent-presets → dsh-agent-preset-registry}/lib/types/types.js +0 -0
  1814. /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, lstatSync, mkdirSync, readFileSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, statSync, symlinkSync, unlinkSync, writeFileSync } from "node:fs";
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
- /** Legacy profile-link inspection shared by the disk materializer and runtime resolver. */
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" } }`; the tree is
324
- * composed by applying each bundle's patch list in `dsh.profile.bundles` order over
325
- * an empty entry list, then the profile's own patches, then any launcher
326
- * layers (`--patch` files and flag-derived patches).
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. Dsh-owned links add packages carried only by selected
332
- * bundles, while `$DSH_HOME/profiles/node_modules` supplies the installation
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-agent-team-profile", "@deepseek-ai/dsh-experimental-agent-team-web-profile"];
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
- function readModuleProxyRecord(link) {
412
- try {
413
- return JSON.parse(readFileSync(join(link, "package.json"), "utf8"));
414
- } catch {
415
- return;
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
- /** Ensure `link` is a symlink to `target`, replacing a wrong link or a dsh-managed packaged proxy. */
419
- function ensureSymlink(link, target) {
420
- let stat;
421
- try {
422
- stat = lstatSync(link);
423
- } catch {
424
- stat = void 0;
425
- }
426
- if (stat !== void 0) {
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
- try {
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
- /** Remove an obsolete owned target and its profile projection when still connected. */
463
- function removeProfileSymlink(profileModulesDir, ownedModulesDir, packageName) {
464
- const ownedLink = join(ownedModulesDir, packageName);
465
- const profileLink = join(profileModulesDir, packageName);
466
- try {
467
- if (lstatSync(profileLink).isSymbolicLink() && symlinkPointsTo(profileLink, ownedLink)) unlinkSync(profileLink);
468
- } catch (error) {
469
- /* v8 ignore next -- a non-ENOENT lstat failure requires a host filesystem fault */
470
- if (error.code !== "ENOENT") throw error;
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
- unlinkSync(ownedLink);
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
- /** Resolve one available explicit package export under Node ESM import conditions. */
480
- function packageEntryFromPackage(packageName, packageDir, declared, subpath) {
481
- let candidates;
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
- const resolved = createRequire(join(packageDir, "package.json")).resolve(entry);
510
- return {
511
- version: manifest.version,
512
- targets: { ".": pathToFileURL(resolved).href }
513
- };
436
+ realPath = realModuleDirectory(linkPath);
514
437
  } catch (error) {
515
- if (main === void 0 && (manifest.bin !== void 0 || manifest.types !== void 0 || manifest.typings !== void 0)) return {
516
- version: manifest.version,
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
- const subpaths = declared !== null && typeof declared === "object" && !Array.isArray(declared) && Object.keys(declared).some((key) => key.startsWith(".")) ? Object.keys(declared).filter((key) => key === "." || key.startsWith("./") && !key.includes("*") && !key.endsWith("/") && key !== "./package.json") : ["."];
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
- * Materialize a real package proxy whose exports retain pkg's virtual module
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
- stat = lstatSync(link);
551
- } catch {
552
- stat = void 0;
553
- }
554
- if (stat?.isSymbolicLink()) {
555
- unlinkSync(link);
556
- stat = void 0;
557
- }
558
- if (stat !== void 0) {
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 used while traversing a module-fallback dependency graph. */
572
- function readModuleFallbackManifest(anchor) {
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 generation that every profile must find through the fallback directory. */
580
- function resolveModuleFallbackEntries(installAnchor, materialize = true) {
581
- const appManifest = readModuleFallbackManifest(installAnchor);
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, installAnchor);
481
+ declarers.set(appManifest.name, canonicalAnchor);
589
482
  versions.set(appManifest.name, appManifest.version);
590
483
  }
591
484
  const queue = [{
592
- anchor: installAnchor,
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
- * Maintain module fallbacks for one profile launch. The shared
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 computed fallback generation after optional materialization.
520
+ * @returns the complete immutable runtime resolution.
659
521
  */
660
- async function healProfilesModuleFallback(options) {
661
- const { installAnchor, profile, home = resolveDshHome(), materialize = true } = options;
522
+ async function createRuntimeResolution(options) {
523
+ const { installAnchor, profile, home = resolveDshHome() } = options;
662
524
  const profilesDir = join(home, PROFILES_DIR);
663
- const modulesDir = join(profilesDir, "node_modules");
664
- if (materialize) mkdirSync(modulesDir, { recursive: true });
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() : healProfileModuleFallback(profile, packageNames, materialize, profileDeclarers, profileVersions);
674
- return Object.freeze({
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
- /** Return installed direct dependencies that Node resolves before profile fallback. */
694
- function installedProfilePackageNames(profile) {
695
- let manifest;
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
- manifest = readModuleFallbackManifest(join(profile.dir, "package.json"));
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
- * Detach this profile's fallback links before a package-manager mutation.
730
- * Installed packages and links replaced by pnpm remain untouched; the next profile launch restores fallbacks.
731
- * @param profileDir - profile directory whose package mutation is serialized by the caller.
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 unlinkProfileModuleFallback(profileDir) {
734
- const ownedModulesDir = join(profileDir, PROFILE_MODULE_FALLBACK_DIR, "node_modules");
735
- if (!existsSync(ownedModulesDir)) return;
736
- for (const name of ownedPackageNames(ownedModulesDir)) removeProfileSymlink(join(profileDir, "node_modules"), ownedModulesDir, name);
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
- /** Heal one module-fallback generation while the cross-process writer lock is held. */
739
- function healProfilesModuleFallbackLocked(entries, modulesDir) {
740
- for (const entry of entries) {
741
- const link = join(modulesDir, entry.packageName);
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, exclude, declarers, versions) {
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 = readModuleFallbackManifest(canonicalAnchor);
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, exclude);
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 = readModuleFallbackManifest(manifestPath);
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
- /** Reconcile packages carried only by selected bundles into one profile. */
787
- function healProfileModuleFallback(profile, installationPackageNames, materialize = true, declarers, versions, installationLinks = /* @__PURE__ */ new Map()) {
788
- const profileModulesDir = join(profile.dir, "node_modules");
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
- const links = new Map([...installationLinks, ...bundleLinks]);
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, exclude = () => false) {
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")) && !exclude(candidate, packageName)) return candidate;
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 resolved bundle layers and optional user patch layer.
719
+ * @returns the successfully loaded bundle layers and optional user patch layer.
916
720
  */
917
721
  function loadProfileDirectory(binName, dir, installAnchor, options = {}) {
918
- const layers = (readProfileManifest(binName, dir).dsh?.profile?.bundles ?? []).map((packageName) => {
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 declared = JSON.parse(readFileSync(join(packageDir, "package.json"), "utf8")).dsh?.bundle?.patch;
921
- if (declared === void 0) throw new Error(`${binName}: profile bundle ${JSON.stringify(packageName)} declares no dsh.bundle in its package.json`);
922
- const patchPath = join(packageDir, declared);
923
- return {
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
- patchPath,
927
- patches: loadOverlayPatches(binName, patchPath)
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. A listed bundle without a
943
- * `dsh.bundle` manifest fails loud — naming a bundle-less package as a layer
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 compileGeneration(generation) {
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(generation.entries.map((entry) => [entry.name, entry])),
1173
- profilesDir: generation.profilesDir,
1174
- profileDir: generation.profileDir,
1175
- profilePaths,
1176
- profileUrls: profilePaths.map((path) => pathToFileURL(path).href),
1177
- profile,
1178
- activeProfileUrls: profile.map((path) => pathToFileURL(path).href),
1179
- localPackageNames: new Set(generation.localPackageNames),
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 -- fallback routes are created only for bare package requests */
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
- const leftPath = left.startsWith("file:") ? fileURLToPath(left) : left;
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 generation data. */
1142
+ /** One mutable pointer to the immutable runtime resolution. */
1298
1143
  var ResolutionRouter = class {
1144
+ nodeModulePaths;
1299
1145
  current;
1300
- constructor(generation) {
1301
- this.current = compileGeneration(generation);
1302
- }
1303
- replace(generation) {
1304
- const entries = new Map(generation.entries.map((entry) => [entry.name, entry]));
1305
- if (generation.profilesDir !== this.current.profilesDir || generation.profileDir !== this.current.profileDir) throw new Error("profile resolution: a generation cannot change its profile scope");
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(generation.localPackageNames);
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
- this.current = compileGeneration(generation);
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
- routeScoped(request, parentRoutes, generation, flavor, nativeResolve, cacheable = false) {
1316
- const { parent, profilesDir, requests } = parentRoutes;
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
- const target = generation.entries.get(name);
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 (generation.shared.has(resolve(searchPath))) break;
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 (flavor === "cjs" && nativeResolve !== void 0) try {
1337
- const resolved = nativeResolve(localSearchPaths);
1338
- const selected = candidates.find((candidate) => localCandidateOwnsResolution(candidate.packageDir, resolved, request, name));
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.packageDir
1228
+ packageDir: selected
1344
1229
  },
1345
- packageDir: selected.packageDir,
1346
- ...cacheable ? { cjs: resolved } : {}
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.packageDir
1244
+ packageDir: selected
1360
1245
  },
1361
- packageDir: selected.packageDir
1246
+ packageDir: selected
1362
1247
  };
1363
1248
  requests.set(request, state);
1364
1249
  return state;
1365
1250
  }
1366
- const eligible = target?.scope === "installation" || target?.scope === "profile" && parentRoutes.activeProfile;
1367
- const after = join(dirname(profilesDir), "package.json");
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-fallback",
1374
- parent: after
1256
+ kind: "native-after-interception",
1257
+ parent: layer.nativeAfter
1375
1258
  };
1376
1259
  const state = { route };
1377
- if (route.kind === "fallback") requests.set(request, state);
1260
+ if (route.kind === "interception" && memo) requests.set(request, state);
1378
1261
  return state;
1379
1262
  }
1380
- routeLocalPackage(request, parentRoutes, generation) {
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
- if (name === void 0 || !parentRoutes.activeProfile || !generation.localPackageNames.has(name)) return void 0;
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 generation = this.current;
1389
- let parentRoutes = generation.esmRoutes.get(parentURL);
1327
+ const resolution = this.current;
1328
+ const parentRoutes = this.getOrCreateParentRoutesForUrl(parentURL);
1390
1329
  if (parentRoutes === false) return void 0;
1391
- const cached = parentRoutes?.requests.get(request);
1330
+ const cached = parentRoutes.requests.get(request);
1392
1331
  if (cached !== void 0) return cached;
1393
- if (parentRoutes === void 0) {
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, generation, "esm");
1334
+ return this.routeScoped(request, parentRoutes, resolution, "esm");
1421
1335
  }
1422
- routePath(request, parent, nativeResolve, cacheable = false) {
1423
- const generation = this.current;
1424
- let parentRoutes = generation.cjsRoutes.get(parent);
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
- const profilesDir = generation.profilePaths.find((prefix) => parent.startsWith(prefix));
1430
- const activeProfile = generation.profile.find((prefix) => parent.startsWith(prefix));
1431
- if (profilesDir !== void 0 || activeProfile !== void 0) {
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(specifier, parentURL);
1470
- if (state?.route.kind === "fallback") return state.route.entry.packageDir;
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-fallback" ? state.route.parent : fileURLToPath(parentURL);
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 profile generation on Node's default ESM and CommonJS resolvers.
1546
- * @param generation - complete package table and profile scope.
1547
- * @param behavior - enforce the generation, or verify a materialized generation.
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 installProfileResolution(generation, behavior = "enforce") {
1551
- const router = new ResolutionRouter(generation);
1423
+ function installRuntimeInterception(resolution) {
1552
1424
  const { esm, esmDefaultResolve, esmConditions, cjs, cjsConditions, modern } = internalModules();
1553
- const esmScope = /* @__PURE__ */ new Map();
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
- if (behavior === "enforce") return expected;
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 === "fallback" ? route.entry.declarer : route.parent).href;
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 expected;
1464
+ let result;
1639
1465
  try {
1640
- const result = native(request, routedParent, attributes);
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 start -- Node 22 is the asynchronous adapter and is covered by the external version matrix */
1648
- if (expected instanceof Promise || actual instanceof Promise) return Promise.all([actual, expected]).then(([resolved, wanted]) => {
1649
- assertEquivalent(resolved.url, wanted.url, request, parent);
1650
- if (cacheable) state.esm = resolved;
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 -- registrations are disposed in reverse installation order */
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 === "fallback" ? routed.entry.declarer : routed.parent;
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 === "fallback" ? packageSearchPaths(routed.entry, request, cjs) : cjs._nodeModulePaths(dirname(anchor));
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-fallback") return resolveFrom(pathToFileURL(route.parent).href);
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?.paths === void 0 && options?.conditions === void 0;
1736
- const explicitPaths = Array.isArray(options?.paths) ? options.paths : void 0;
1737
- if (explicitPaths !== void 0 && router.nativeSelfReference(request, parentFilename)) return originalFilename.call(cjs, request, parent, main, options);
1738
- const explicit = explicitPaths === void 0 ? void 0 : router.explicitRoute(request, explicitPaths);
1739
- if (options?.paths !== void 0 && explicit === void 0) return originalFilename.call(cjs, request, parent, main, options);
1740
- if (explicit !== void 0 && explicitPaths !== void 0 && explicit.index > 0) try {
1741
- return originalFilename.call(cjs, request, parent, main, {
1742
- ...options,
1743
- paths: explicitPaths.slice(0, explicit.index)
1744
- });
1745
- } catch (error) {
1746
- if (!isUnselectedPackageMiss(error)) throw error;
1747
- }
1748
- const state = router.routePath(request, explicit?.parent ?? parentFilename, (searchPaths) => resolveNativeCjs(request, searchPaths, parent, parentFilename, main, options?.conditions), explicit === void 0 && cacheable);
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 = startsWithin(parentFilename, profilePaths);
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
- const expected = resolvePackageImportCjs(target, conditions);
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 (cacheable && state.cjs !== void 0) return state.cjs;
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 !== "fallback" || !isUnselectedPackageMiss(error)) throw error;
1789
- try {
1790
- expected = resolveRoutedCjs(request, {
1791
- kind: "after-fallback",
1792
- parent: route.after
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
- const actual = originalFilename.call(cjs, request, parent, main, options);
1813
- assertEquivalent(actual, expected, request, parentFilename);
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
- const expected = router.packageDir(specifier, parentURL);
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 -- registrations are disposed in reverse installation order */
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 generation for Harness-owned Workers.
1848
- * @param generation - complete package table and profile scope.
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(generation, behavior = "enforce") {
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 profile resolution registration. */
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
- resolver;
1883
- behavior;
2839
+ interception;
1884
2840
  disposeWorkerResolution;
1885
2841
  constructor(ctx, config = {}) {
1886
2842
  super(ctx, "pluginPackages");
1887
- this.behavior = config.behavior ?? "enforce";
1888
- if (config.generation === void 0) return;
1889
- const resolver = installProfileResolution(config.generation, this.behavior);
1890
- this.disposeWorkerResolution = registerWorkerResolution(config.generation, this.behavior);
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
- resolver.dispose();
2849
+ interception.dispose();
1895
2850
  }, "profile package resolution");
1896
2851
  }
1897
2852
  /**
1898
- * Publish an additive generation for this process and subsequently created Workers.
1899
- * @param generation - fully constructed successor generation.
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(generation) {
1902
- if (this.resolver === void 0) throw new Error("plugin-packages: runtime resolution is not installed");
1903
- this.resolver.replace(generation);
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(generation, this.behavior);
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.resolver === void 0 ? packageDirFromParent(name, parentURL) : this.resolver.packageDir(name, parentURL);
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, createProfileResolutionGeneration, healIsolatedProfileModuleFallback, healProfilesModuleFallback, initProfile, installFailLoud, loadEnv, loadLayeredEnv, loadOptionalPatches, loadOverlayPatches, loadProfile, loadProfileDirectory, mountRootInclude, readProfileManifest, readProfilePatches, readProfilePlugins, reconcileProfilePatches, reconcileProfilePlugins, renderConfigDump, resolveBundleDir, resolveConfigPath, resolveInvokingDirectory, resolveProfileDir, resolveTelemetryPatch, restoreInvokingDirectory, sanitizeProfile, unlinkProfileModuleFallback, writeProfileBundles, writeProfileManifest };
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 };