@qqbrowser/qbot-dsh 0.0.11 → 0.0.13

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 (304) hide show
  1. package/lib/bin.js +1 -1
  2. package/lib/{dump-config-BD79jvHi.js → dump-config-xQTUTTDD.js} +1 -1
  3. package/lib/{plugin-B3Ecl7VN.js → plugin-DNAeLZbb.js} +1 -1
  4. package/lib/profile-boot-BkordgJK.js +1 -0
  5. package/node_modules/@deepseek-ai/cordis-plugin-hmr/lib/index.js +2 -2
  6. package/node_modules/@deepseek-ai/dsh-agent/lib/index.js +1 -1
  7. package/node_modules/@deepseek-ai/dsh-agent/package.json +1 -1
  8. package/node_modules/@deepseek-ai/dsh-agent-default-model/package.json +1 -1
  9. package/node_modules/@deepseek-ai/dsh-agent-instructions/lib/index.js +3 -3
  10. package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +1 -1
  11. package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +1 -1
  12. package/node_modules/@deepseek-ai/dsh-agent-presets/package.json +1 -1
  13. package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/package.json +1 -1
  14. package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +1 -1
  15. package/node_modules/@deepseek-ai/dsh-api-gateway/package.json +1 -1
  16. package/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +2 -2
  17. package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +1 -1
  18. package/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +12 -12
  19. package/node_modules/@deepseek-ai/dsh-app-boot/package.json +1 -1
  20. package/node_modules/@deepseek-ai/dsh-atomic-write/package.json +1 -1
  21. package/node_modules/@deepseek-ai/dsh-attachment/package.json +1 -1
  22. package/node_modules/@deepseek-ai/dsh-attachment-local/lib/index.js +1 -1
  23. package/node_modules/@deepseek-ai/dsh-attachment-local/package.json +1 -1
  24. package/node_modules/@deepseek-ai/dsh-base/cordis.patch.yml +3 -3
  25. package/node_modules/@deepseek-ai/dsh-base/package.json +1 -1
  26. package/node_modules/@deepseek-ai/dsh-bash-local/lib/index.js +1 -1
  27. package/node_modules/@deepseek-ai/dsh-bash-local/package.json +1 -1
  28. package/node_modules/@deepseek-ai/dsh-bash-sandbox/package.json +1 -1
  29. package/node_modules/@deepseek-ai/dsh-brand/package.json +1 -1
  30. package/node_modules/@deepseek-ai/dsh-client-connection/lib/client.js +6 -6
  31. package/node_modules/@deepseek-ai/dsh-client-connection/lib/index.js +2 -2
  32. package/node_modules/@deepseek-ai/dsh-client-connection/package.json +1 -1
  33. package/node_modules/@deepseek-ai/dsh-client-hmr/lib/client.js +1 -1
  34. package/node_modules/@deepseek-ai/dsh-client-hmr/package.json +1 -1
  35. package/node_modules/@deepseek-ai/dsh-client-locale/lib/client.js +1 -1
  36. package/node_modules/@deepseek-ai/dsh-client-locale/package.json +1 -1
  37. package/node_modules/@deepseek-ai/dsh-client-modules/package.json +1 -1
  38. package/node_modules/@deepseek-ai/dsh-client-runtime/lib/client.js +2 -2
  39. package/node_modules/@deepseek-ai/dsh-client-runtime/package.json +1 -1
  40. package/node_modules/@deepseek-ai/dsh-client-schema-form/package.json +1 -1
  41. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +1 -1
  42. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/package.json +1 -1
  43. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +1 -1
  44. package/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +1 -1
  45. package/node_modules/@deepseek-ai/dsh-client-ui-commands/package.json +1 -1
  46. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +6 -6
  47. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +1 -1
  48. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/lib/client.js +1 -1
  49. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/package.json +1 -1
  50. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +1 -1
  51. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +1 -1
  52. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/lib/client.js +1 -1
  53. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/package.json +1 -1
  54. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-native/package.json +1 -1
  55. package/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +1 -1
  56. package/node_modules/@deepseek-ai/dsh-client-ui-goal/package.json +1 -1
  57. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/lib/client.js +1 -1
  58. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/package.json +1 -1
  59. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +1 -1
  60. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/package.json +1 -1
  61. package/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js +1 -1
  62. package/node_modules/@deepseek-ai/dsh-client-ui-layout/package.json +1 -1
  63. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/lib/client.js +1 -1
  64. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/package.json +1 -1
  65. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +1 -1
  66. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/package.json +1 -1
  67. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/lib/client.js +1 -1
  68. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/package.json +1 -1
  69. package/node_modules/@deepseek-ai/dsh-client-ui-plan/lib/client.js +1 -1
  70. package/node_modules/@deepseek-ai/dsh-client-ui-plan/package.json +1 -1
  71. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/index.js +11 -11
  72. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/package.json +1 -1
  73. package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +1 -1
  74. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +1 -1
  75. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +1 -1
  76. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +1 -1
  77. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +1 -1
  78. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +1 -1
  79. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +1 -1
  80. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/client.js +1 -1
  81. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +1 -1
  82. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
  83. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/package.json +1 -1
  84. package/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +1 -1
  85. package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +1 -1
  86. package/node_modules/@deepseek-ai/dsh-client-ui-slots/lib/index.js +1 -1
  87. package/node_modules/@deepseek-ai/dsh-client-ui-slots/package.json +1 -1
  88. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +1 -1
  89. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +1 -1
  90. package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +1 -1
  91. package/node_modules/@deepseek-ai/dsh-client-ui-theme/package.json +1 -1
  92. package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +1 -1
  93. package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +1 -1
  94. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +13 -13
  95. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/package.json +1 -1
  96. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +1 -1
  97. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/package.json +1 -1
  98. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +1 -1
  99. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/package.json +1 -1
  100. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +1 -1
  101. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +1 -1
  102. package/node_modules/@deepseek-ai/dsh-client-web/package.json +1 -1
  103. package/node_modules/@deepseek-ai/dsh-client-web-react/lib/index.js +1 -1
  104. package/node_modules/@deepseek-ai/dsh-client-web-react/package.json +1 -1
  105. package/node_modules/@deepseek-ai/dsh-cmdline/package.json +1 -1
  106. package/node_modules/@deepseek-ai/dsh-code-runtime/package.json +1 -1
  107. package/node_modules/@deepseek-ai/dsh-code-runtime-worker-thread/lib/index.js +2 -2
  108. package/node_modules/@deepseek-ai/dsh-code-runtime-worker-thread/lib/worker.cjs +4 -2
  109. package/node_modules/@deepseek-ai/dsh-code-runtime-worker-thread/package.json +1 -1
  110. package/node_modules/@deepseek-ai/dsh-command-compact/package.json +1 -1
  111. package/node_modules/@deepseek-ai/dsh-command-feedback/package.json +1 -1
  112. package/node_modules/@deepseek-ai/dsh-command-goal/package.json +1 -1
  113. package/node_modules/@deepseek-ai/dsh-commands/package.json +1 -1
  114. package/node_modules/@deepseek-ai/dsh-compaction/package.json +1 -1
  115. package/node_modules/@deepseek-ai/dsh-compaction-basic/lib/index.js +1 -1
  116. package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +1 -1
  117. package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/package.json +1 -1
  118. package/node_modules/@deepseek-ai/dsh-content-review/package.json +1 -1
  119. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/lib/client.js +7 -7
  120. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +1 -1
  121. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/package.json +1 -1
  122. package/node_modules/@deepseek-ai/dsh-credentials/package.json +1 -1
  123. package/node_modules/@deepseek-ai/dsh-credentials-local/package.json +1 -1
  124. package/node_modules/@deepseek-ai/dsh-fs/package.json +1 -1
  125. package/node_modules/@deepseek-ai/dsh-fs-local/lib/index.js +4 -4
  126. package/node_modules/@deepseek-ai/dsh-fs-local/package.json +1 -1
  127. package/node_modules/@deepseek-ai/dsh-fs-observation-policy/package.json +1 -1
  128. package/node_modules/@deepseek-ai/dsh-fs-sandbox/package.json +1 -1
  129. package/node_modules/@deepseek-ai/dsh-goal/package.json +1 -1
  130. package/node_modules/@deepseek-ai/dsh-goal-round-driver/package.json +1 -1
  131. package/node_modules/@deepseek-ai/dsh-headless/package.json +1 -1
  132. package/node_modules/@deepseek-ai/dsh-home-paths/lib/index.js +1 -1
  133. package/node_modules/@deepseek-ai/dsh-home-paths/package.json +1 -1
  134. package/node_modules/@deepseek-ai/dsh-home-quarantine-macos/lib/index.js +1 -1
  135. package/node_modules/@deepseek-ai/dsh-home-quarantine-macos/package.json +1 -1
  136. package/node_modules/@deepseek-ai/dsh-host-apiproxy/lib/index.js +4 -4
  137. package/node_modules/@deepseek-ai/dsh-host-apiproxy/package.json +1 -1
  138. package/node_modules/@deepseek-ai/dsh-host-directory-picker/package.json +1 -1
  139. package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/package.json +1 -1
  140. package/node_modules/@deepseek-ai/dsh-host-directory-picker-browse/package.json +1 -1
  141. package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/lib/worker.cjs +9 -7
  142. package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/package.json +1 -1
  143. package/node_modules/@deepseek-ai/dsh-host-frontend-static/package.json +1 -1
  144. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/package.json +1 -1
  145. package/node_modules/@deepseek-ai/dsh-host-webserver/package.json +1 -1
  146. package/node_modules/@deepseek-ai/dsh-invariants/package.json +1 -1
  147. package/node_modules/@deepseek-ai/dsh-jobs/package.json +1 -1
  148. package/node_modules/@deepseek-ai/dsh-jobs-local/package.json +1 -1
  149. package/node_modules/@deepseek-ai/dsh-launch-environment/package.json +1 -1
  150. package/node_modules/@deepseek-ai/dsh-llm/lib/invariant.js +1 -1
  151. package/node_modules/@deepseek-ai/dsh-llm/package.json +1 -1
  152. package/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js +1 -1
  153. package/node_modules/@deepseek-ai/dsh-llm-deepseek/package.json +1 -1
  154. package/node_modules/@deepseek-ai/dsh-llm-gateway-openai/lib/index.js +1 -1
  155. package/node_modules/@deepseek-ai/dsh-llm-gateway-openai/package.json +1 -1
  156. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +1 -1
  157. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +1 -1
  158. package/node_modules/@deepseek-ai/dsh-llm-retry/package.json +1 -1
  159. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/index.js +2 -2
  160. package/node_modules/@deepseek-ai/dsh-mcp-client/package.json +1 -1
  161. package/node_modules/@deepseek-ai/dsh-message-feedback/package.json +1 -1
  162. package/node_modules/@deepseek-ai/dsh-native-command/package.json +1 -1
  163. package/node_modules/@deepseek-ai/dsh-output-retention/lib/index.js +1 -1
  164. package/node_modules/@deepseek-ai/dsh-output-retention/package.json +1 -1
  165. package/node_modules/@deepseek-ai/dsh-permission-presets/lib/index.js +1 -1
  166. package/node_modules/@deepseek-ai/dsh-permission-presets/package.json +1 -1
  167. package/node_modules/@deepseek-ai/dsh-persona/package.json +1 -1
  168. package/node_modules/@deepseek-ai/dsh-plan-mode/package.json +1 -1
  169. package/node_modules/@deepseek-ai/dsh-pwsh-local/lib/index.js +1 -1
  170. package/node_modules/@deepseek-ai/dsh-pwsh-local/package.json +1 -1
  171. package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +1 -1
  172. package/node_modules/@deepseek-ai/dsh-qb-auth/lib/index.js +3 -3
  173. package/node_modules/@deepseek-ai/dsh-qb-auth/package.json +1 -1
  174. package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/package.json +1 -1
  175. package/node_modules/@deepseek-ai/dsh-sandbox/package.json +1 -1
  176. package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +1 -1
  177. package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +1 -1
  178. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/index.js +1 -1
  179. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/runner.js +1 -1
  180. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/types-D2_FQYSK.js +1 -0
  181. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/package.json +1 -1
  182. package/node_modules/@deepseek-ai/dsh-schedule/lib/index.js +1 -1
  183. package/node_modules/@deepseek-ai/dsh-schedule/package.json +1 -1
  184. package/node_modules/@deepseek-ai/dsh-scope/package.json +1 -1
  185. package/node_modules/@deepseek-ai/dsh-session/lib/index.js +1 -1
  186. package/node_modules/@deepseek-ai/dsh-session/lib/invariant.js +1 -1
  187. package/node_modules/@deepseek-ai/dsh-session/package.json +1 -1
  188. package/node_modules/@deepseek-ai/dsh-session-checkpoint-policy/package.json +1 -1
  189. package/node_modules/@deepseek-ai/dsh-session-log-export/lib/client.js +1 -1
  190. package/node_modules/@deepseek-ai/dsh-session-log-export/package.json +1 -1
  191. package/node_modules/@deepseek-ai/dsh-session-persistence/lib/index.js +1 -1
  192. package/node_modules/@deepseek-ai/dsh-session-persistence/package.json +1 -1
  193. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/index.js +1 -1
  194. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/package.json +1 -1
  195. package/node_modules/@deepseek-ai/dsh-session-projection/package.json +1 -1
  196. package/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +1 -1
  197. package/node_modules/@deepseek-ai/dsh-session-query/package.json +1 -1
  198. package/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +1 -1
  199. package/node_modules/@deepseek-ai/dsh-session-reference/lib/index.js +4 -4
  200. package/node_modules/@deepseek-ai/dsh-session-reference/package.json +1 -1
  201. package/node_modules/@deepseek-ai/dsh-session-stats/package.json +1 -1
  202. package/node_modules/@deepseek-ai/dsh-session-telemetry/package.json +1 -1
  203. package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/package.json +1 -1
  204. package/node_modules/@deepseek-ai/dsh-session-title/lib/index.js +2 -2
  205. package/node_modules/@deepseek-ai/dsh-session-title/package.json +1 -1
  206. package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/package.json +1 -1
  207. package/node_modules/@deepseek-ai/dsh-session-title-llm/lib/index.js +3 -3
  208. package/node_modules/@deepseek-ai/dsh-session-title-llm/package.json +1 -1
  209. package/node_modules/@deepseek-ai/dsh-settings/lib/invariant.js +1 -1
  210. package/node_modules/@deepseek-ai/dsh-settings/package.json +1 -1
  211. package/node_modules/@deepseek-ai/dsh-settings-file/package.json +1 -1
  212. package/node_modules/@deepseek-ai/dsh-shell/package.json +1 -1
  213. package/node_modules/@deepseek-ai/dsh-shell-env/package.json +1 -1
  214. package/node_modules/@deepseek-ai/dsh-skill/package.json +1 -1
  215. package/node_modules/@deepseek-ai/dsh-skill-badge/package.json +1 -1
  216. package/node_modules/@deepseek-ai/dsh-skill-filesystem/lib/index.js +1 -1
  217. package/node_modules/@deepseek-ai/dsh-skill-filesystem/package.json +1 -1
  218. package/node_modules/@deepseek-ai/dsh-spill/package.json +1 -1
  219. package/node_modules/@deepseek-ai/dsh-spill-local/lib/index.js +1 -1
  220. package/node_modules/@deepseek-ai/dsh-spill-local/package.json +1 -1
  221. package/node_modules/@deepseek-ai/dsh-spill-policy/lib/index.js +2 -2
  222. package/node_modules/@deepseek-ai/dsh-spill-policy/package.json +1 -1
  223. package/node_modules/@deepseek-ai/dsh-storage/package.json +1 -1
  224. package/node_modules/@deepseek-ai/dsh-storage-domain/lib/invariant.js +1 -1
  225. package/node_modules/@deepseek-ai/dsh-storage-domain/package.json +1 -1
  226. package/node_modules/@deepseek-ai/dsh-storage-json/package.json +1 -1
  227. package/node_modules/@deepseek-ai/dsh-subagent/lib/index.js +1 -1
  228. package/node_modules/@deepseek-ai/dsh-subagent/package.json +1 -1
  229. package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/package.json +1 -1
  230. package/node_modules/@deepseek-ai/dsh-subagent-in-process-driver/package.json +1 -1
  231. package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/package.json +1 -1
  232. package/node_modules/@deepseek-ai/dsh-subprocess/package.json +1 -1
  233. package/node_modules/@deepseek-ai/dsh-subprocess-local/package.json +1 -1
  234. package/node_modules/@deepseek-ai/dsh-system-prompt/package.json +1 -1
  235. package/node_modules/@deepseek-ai/dsh-terminal/package.json +1 -1
  236. package/node_modules/@deepseek-ai/dsh-terminal-bash/lib/index.js +2 -2
  237. package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +1 -1
  238. package/node_modules/@deepseek-ai/dsh-time-context/lib/index.js +1 -1
  239. package/node_modules/@deepseek-ai/dsh-time-context/lib/invariant.js +1 -1
  240. package/node_modules/@deepseek-ai/dsh-time-context/package.json +1 -1
  241. package/node_modules/@deepseek-ai/dsh-timeout/package.json +1 -1
  242. package/node_modules/@deepseek-ai/dsh-tmux-context/package.json +1 -1
  243. package/node_modules/@deepseek-ai/dsh-token-meter/lib/index.js +1 -1
  244. package/node_modules/@deepseek-ai/dsh-token-meter/package.json +1 -1
  245. package/node_modules/@deepseek-ai/dsh-tool-ask-user/package.json +1 -1
  246. package/node_modules/@deepseek-ai/dsh-tool-bash/package.json +1 -1
  247. package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/package.json +1 -1
  248. package/node_modules/@deepseek-ai/dsh-tool-call-timeout-policy/package.json +1 -1
  249. package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +1 -1
  250. package/node_modules/@deepseek-ai/dsh-tool-fs/lib/index.js +2 -2
  251. package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +1 -1
  252. package/node_modules/@deepseek-ai/dsh-tool-fs-search/lib/index.js +1 -1
  253. package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +1 -1
  254. package/node_modules/@deepseek-ai/dsh-tool-goal/package.json +1 -1
  255. package/node_modules/@deepseek-ai/dsh-tool-jobs/package.json +1 -1
  256. package/node_modules/@deepseek-ai/dsh-tool-pwsh/package.json +1 -1
  257. package/node_modules/@deepseek-ai/dsh-tool-ralph/lib/index.js +1 -1
  258. package/node_modules/@deepseek-ai/dsh-tool-ralph/package.json +1 -1
  259. package/node_modules/@deepseek-ai/dsh-tool-skill/package.json +1 -1
  260. package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/lib/index.js +6 -6
  261. package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/package.json +1 -1
  262. package/node_modules/@deepseek-ai/dsh-tool-subagent/package.json +1 -1
  263. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/package.json +1 -1
  264. package/node_modules/@deepseek-ai/dsh-tool-subagent-report/package.json +1 -1
  265. package/node_modules/@deepseek-ai/dsh-tool-todo/package.json +1 -1
  266. package/node_modules/@deepseek-ai/dsh-tool-web/package.json +1 -1
  267. package/node_modules/@deepseek-ai/dsh-tool-workflow/lib/index.js +2 -2
  268. package/node_modules/@deepseek-ai/dsh-tool-workflow/package.json +1 -1
  269. package/node_modules/@deepseek-ai/dsh-tools/lib/index.js +26 -26
  270. package/node_modules/@deepseek-ai/dsh-tools/package.json +1 -1
  271. package/node_modules/@deepseek-ai/dsh-typert-loader/package.json +1 -1
  272. package/node_modules/@deepseek-ai/dsh-typert-protocol/package.json +1 -1
  273. package/node_modules/@deepseek-ai/dsh-typert-registry/package.json +1 -1
  274. package/node_modules/@deepseek-ai/dsh-user-approval/package.json +1 -1
  275. package/node_modules/@deepseek-ai/dsh-user-questions/package.json +1 -1
  276. package/node_modules/@deepseek-ai/dsh-web/lib/index.js +1 -1
  277. package/node_modules/@deepseek-ai/dsh-web/package.json +1 -1
  278. package/node_modules/@deepseek-ai/dsh-web-app/package.json +1 -1
  279. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/{index-Dqw48FrP.js → index-BQQQ5Qt-.js} +2 -2
  280. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/cpp-DddhVWhK.js +1 -0
  281. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{php-D-uCvoST.js → php-9bx0az3O.js} +1 -1
  282. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{ruby-DEItuUFs.js → ruby-HDLHRjSL.js} +1 -1
  283. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/swift-C2oV4EkX.js +1 -0
  284. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/{vendor-Cjbwl5VI.js → vendor-CeMKrCZm.js} +24 -24
  285. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/index.html +2 -2
  286. package/node_modules/@deepseek-ai/dsh-web-frontend/package.json +1 -1
  287. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/LICENSE +21 -0
  288. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/lib/index.js +1 -0
  289. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/lib/invariant.js +1 -0
  290. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +1 -0
  291. package/node_modules/@deepseek-ai/dsh-web-search-dsh/lib/index.js +1 -1
  292. package/node_modules/@deepseek-ai/dsh-web-search-dsh/package.json +1 -1
  293. package/node_modules/@deepseek-ai/dsh-workflow/package.json +1 -1
  294. package/node_modules/@deepseek-ai/dsh-workflow-worker-thread/lib/index.js +2 -2
  295. package/node_modules/@deepseek-ai/dsh-workflow-worker-thread/lib/worker.cjs +3 -4
  296. package/node_modules/@deepseek-ai/dsh-workflow-worker-thread/package.json +1 -1
  297. package/node_modules/@deepseek-ai/dsh-workspace/lib/invariant.js +1 -1
  298. package/node_modules/@deepseek-ai/dsh-workspace/package.json +1 -1
  299. package/package.json +1 -1
  300. package/lib/profile-boot-_PCyp_wB.js +0 -1
  301. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/types-BjBvdldw.js +0 -1
  302. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/cpp-DIPi6g--.js +0 -1
  303. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/swift-D82vCrfD.js +0 -1
  304. /package/lib/{profile-boot-B71dQloK.js → profile-boot-DDo03lXi.js} +0 -0
package/lib/bin.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  var m=Object.defineProperty;var s=(t,e)=>m(t,"name",{value:e,configurable:!0});import{readFileSync as E,writeSync as g}from"node:fs";import{fileURLToPath as l}from"node:url";const d="jsonl-v1",f=1,y={WEB_LISTEN_FAILED:"Failed to start local web server",WEB_STARTUP_FAILED:"Failed to start DSH web service"},p={stdout:process.stdout,stderr:process.stderr,writeLine:s((t,e)=>{const o=Buffer.from(e,"utf8");let r=0;for(;r<o.byteLength;){const i=g(t,o,r,o.byteLength-r);if(i===0)throw new Error("native protocol stdout write made no progress");r+=i}},"writeLine"),onExit:s(t=>{process.on("exit",t)},"onExit"),offExit:s(t=>{process.off("exit",t)},"offExit")};function b(t){return t[0]==="web"?!0:t.some((e,o)=>e==="--profile"&&t[o+1]==="web"||e==="--profile=web")}s(b,"selectsWebProfile");function v(t){return b(t)?t.some((e,o)=>e===`--native-protocol=${d}`||e==="--native-protocol"&&t[o+1]===d):!1}s(v,"requestsNativeJsonlV1");function L(t){const e=[t],o=new Set;for(;e.length>0;){const r=e.pop();if(typeof r!="object"||r===null||o.has(r))continue;o.add(r);const i=r;if(i.code==="WEB_LISTEN_FAILED")return"WEB_LISTEN_FAILED";if(e.push(i.cause),Array.isArray(i.errors)){const n=i.errors;e.push(...n)}}return"WEB_STARTUP_FAILED"}s(L,"classifyNativeStartupError");var S=class{static{s(this,"NativeProtocolWriter")}name=d;state="pending";stdout=p.stdout;stderr=p.stderr;originalWrite=this.stdout.write;redirectWrite;exitListener;constructor(){this.redirectWrite=((...t)=>!!Reflect.apply(this.stderr.write,this.stderr,t)),this.stdout.write=this.redirectWrite,this.exitListener=t=>{t!==0&&this.emitError("WEB_STARTUP_FAILED")},p.onExit(this.exitListener)}emitReady(t){if(this.state!=="pending")return!1;if(!Number.isInteger(t.port)||t.port<1||t.port>65535)throw new Error("native protocol ready port must be an integer from 1 through 65535");if(!Number.isInteger(t.pid)||t.pid<1)throw new Error("native protocol ready pid must be a positive integer");return this.write({protocolVersion:f,event:"ready",url:`http://${t.host}:${String(t.port)}`,host:t.host,port:t.port,pid:t.pid}),this.state="ready",!0}emitError(t){return this.state!=="pending"?!1:(this.write({protocolVersion:f,event:"error",code:t,message:y[t]}),this.state="error",!0)}dispose(){this.stdout.write===this.redirectWrite&&(this.stdout.write=this.originalWrite),p.offExit(this.exitListener)}write(t){p.writeLine(this.stdout.fd,`${JSON.stringify(t)}
3
- `)}};function A(t){return v(t)?new S:void 0}s(A,"createNativeProtocolWriter");function R(t,e=process.platform,o=process.arch){if(t===null||typeof t!="object"||Array.isArray(t))throw new Error("qbot-dsh: package manifest is not an object");const r=t,i=typeof r.version=="string"?r.version:"0.0.0";if(r.dshRelease===void 0)return i;if(r.dshRelease===null||typeof r.dshRelease!="object"||Array.isArray(r.dshRelease))throw new Error("qbot-dsh: package manifest has invalid dshRelease metadata");const n=r.dshRelease.targets;if(!Array.isArray(n)||n.length===0||n.some(w=>typeof w!="string"))throw new Error("qbot-dsh: package manifest has invalid dshRelease.targets metadata");const c=`${e}-${o}`;if(!n.includes(c))throw new Error(`qbot-dsh: unsupported target ${c}; this package supports ${n.join(", ")}`);return i}s(R,"releaseVersionForTarget");function _(){return R(JSON.parse(E(l(new URL("../package.json",import.meta.url)),"utf8")))}s(_,"readVersion");const u=process.argv.slice(2),h=A(u),{parseDshArgs:W}=await import("./args-DcHS9iff.js"),a=W(u,_());switch(a.mode){case"profile":{if(import.meta.url.endsWith("/src/bin.ts")){const[o,r,i]=await Promise.all([import("node:fs"),import("node:path"),import("@deepseek-ai/dsh-home-paths")]),n=r.join(i.resolveDshHome(),"profiles");o.mkdirSync(n,{recursive:!0});try{o.symlinkSync(l(new URL("../../../node_modules/.pnpm/node_modules/",import.meta.url)),r.join(n,"node_modules"),"junction")}catch(c){if(c.code!=="EEXIST")throw c}}const{runProfile:t}=await import("./profile-boot-_PCyp_wB.js"),{loadLayeredEnv:e}=await import("@deepseek-ai/dsh-app-boot");try{await t({environment:e("qbot-dsh"),profile:a.profile,patchFiles:a.patches,args:a.args,...h===void 0?{}:{nativeProtocol:h}})}catch(o){throw h?.emitError(L(o)),o}break}case"plugin":{const{runPlugin:t}=await import("./plugin-B3Ecl7VN.js");process.exit(t(a.profile,a.args));break}case"dump-config":{const{runDumpConfig:t}=await import("./dump-config-BD79jvHi.js");t(a.profile,a.defaultOnly,a.patches);break}default:throw new Error(`qbot-dsh: unhandled invocation mode ${JSON.stringify(a)}`)}export{};
3
+ `)}};function A(t){return v(t)?new S:void 0}s(A,"createNativeProtocolWriter");function R(t,e=process.platform,o=process.arch){if(t===null||typeof t!="object"||Array.isArray(t))throw new Error("qbot-dsh: package manifest is not an object");const r=t,i=typeof r.version=="string"?r.version:"0.0.0";if(r.dshRelease===void 0)return i;if(r.dshRelease===null||typeof r.dshRelease!="object"||Array.isArray(r.dshRelease))throw new Error("qbot-dsh: package manifest has invalid dshRelease metadata");const n=r.dshRelease.targets;if(!Array.isArray(n)||n.length===0||n.some(w=>typeof w!="string"))throw new Error("qbot-dsh: package manifest has invalid dshRelease.targets metadata");const c=`${e}-${o}`;if(!n.includes(c))throw new Error(`qbot-dsh: unsupported target ${c}; this package supports ${n.join(", ")}`);return i}s(R,"releaseVersionForTarget");function _(){return R(JSON.parse(E(l(new URL("../package.json",import.meta.url)),"utf8")))}s(_,"readVersion");const u=process.argv.slice(2),h=A(u),{parseDshArgs:W}=await import("./args-DcHS9iff.js"),a=W(u,_());switch(a.mode){case"profile":{if(import.meta.url.endsWith("/src/bin.ts")){const[o,r,i]=await Promise.all([import("node:fs"),import("node:path"),import("@deepseek-ai/dsh-home-paths")]),n=r.join(i.resolveDshHome(),"profiles");o.mkdirSync(n,{recursive:!0});try{o.symlinkSync(l(new URL("../../../node_modules/.pnpm/node_modules/",import.meta.url)),r.join(n,"node_modules"),"junction")}catch(c){if(c.code!=="EEXIST")throw c}}const{runProfile:t}=await import("./profile-boot-BkordgJK.js"),{loadLayeredEnv:e}=await import("@deepseek-ai/dsh-app-boot");try{await t({environment:e("qbot-dsh"),profile:a.profile,patchFiles:a.patches,args:a.args,...h===void 0?{}:{nativeProtocol:h}})}catch(o){throw h?.emitError(L(o)),o}break}case"plugin":{const{runPlugin:t}=await import("./plugin-DNAeLZbb.js");process.exit(t(a.profile,a.args));break}case"dump-config":{const{runDumpConfig:t}=await import("./dump-config-xQTUTTDD.js");t(a.profile,a.defaultOnly,a.patches);break}default:throw new Error(`qbot-dsh: unhandled invocation mode ${JSON.stringify(a)}`)}export{};
@@ -1 +1 @@
1
- var n=Object.defineProperty;var r=(s,a)=>n(s,"name",{value:a,configurable:!0});import{i as m,n as f,r as P}from"./profile-boot-B71dQloK.js";import{existsSync as d}from"node:fs";import{join as u,resolve as b}from"node:path";import{loadOptionalPatches as E,loadOverlayPatches as O,renderConfigDump as g}from"@deepseek-ai/dsh-app-boot";const c="qbot-dsh";function v(s,a,i){const o=m(s,!a),e=o.layers.map(t=>({label:t.packageName,patches:t.patches}));if(!a){d(o.patchPath)&&e.push({label:o.patchPath,patches:o.patches});const t=P(),p=E(c,t);p!==void 0&&e.push({label:t,patches:p});for(const l of i){const h=b(l);e.push({label:h,patches:O(c,h)})}}process.stdout.write(g(c,u(o.dir,f),e))}r(v,"runDumpConfig");export{v as runDumpConfig};
1
+ var n=Object.defineProperty;var r=(s,a)=>n(s,"name",{value:a,configurable:!0});import{i as m,n as f,r as P}from"./profile-boot-DDo03lXi.js";import{existsSync as d}from"node:fs";import{join as u,resolve as b}from"node:path";import{loadOptionalPatches as E,loadOverlayPatches as O,renderConfigDump as g}from"@deepseek-ai/dsh-app-boot";const c="qbot-dsh";function v(s,a,i){const o=m(s,!a),e=o.layers.map(t=>({label:t.packageName,patches:t.patches}));if(!a){d(o.patchPath)&&e.push({label:o.patchPath,patches:o.patches});const t=P(),p=E(c,t);p!==void 0&&e.push({label:t,patches:p});for(const l of i){const h=b(l);e.push({label:h,patches:O(c,h)})}}process.stdout.write(g(c,u(o.dir,f),e))}r(v,"runDumpConfig");export{v as runDumpConfig};
@@ -1,4 +1,4 @@
1
- var w=Object.defineProperty;var c=(n,t)=>w(n,"name",{value:t,configurable:!0});import{t as g}from"./profile-boot-B71dQloK.js";import{existsSync as $}from"node:fs";import{join as u,resolve as b}from"node:path";import{DEFAULT_PROFILE_BUNDLES as y,PROFILE_TEMPLATES as P,initProfile as k,readProfileManifest as d,resolveBundleDir as v,resolveProfileDir as x,writeProfileManifest as E}from"@deepseek-ai/dsh-app-boot";import{spawnSync as S}from"node:child_process";const i="qbot-dsh";function h(n,t){let e;try{e=v(i,n,g,t)}catch{return!1}return d(i,e).dsh?.bundle?.patch!==void 0}c(h,"exportsPatch");function N(n,t){const e=d(i,t),p=new Set(Object.keys(n.dependencies??{})),o=Object.keys(e.dependencies??{}),s=e.dsh?.profile?.bundles??[];let a=!1;for(const r of o){const l=h(r,t);l&&!s.includes(r)?(s.push(r),a=!0):!l&&!p.has(r)&&process.stderr.write(`${i}: warning: ${r} declares no dsh.bundle — installed as a plain dependency, not a profile layer (a later update that gains one activates it automatically)
1
+ var w=Object.defineProperty;var c=(n,t)=>w(n,"name",{value:t,configurable:!0});import{t as g}from"./profile-boot-DDo03lXi.js";import{existsSync as $}from"node:fs";import{join as u,resolve as b}from"node:path";import{DEFAULT_PROFILE_BUNDLES as y,PROFILE_TEMPLATES as P,initProfile as k,readProfileManifest as d,resolveBundleDir as v,resolveProfileDir as x,writeProfileManifest as E}from"@deepseek-ai/dsh-app-boot";import{spawnSync as S}from"node:child_process";const i="qbot-dsh";function h(n,t){let e;try{e=v(i,n,g,t)}catch{return!1}return d(i,e).dsh?.bundle?.patch!==void 0}c(h,"exportsPatch");function N(n,t){const e=d(i,t),p=new Set(Object.keys(n.dependencies??{})),o=Object.keys(e.dependencies??{}),s=e.dsh?.profile?.bundles??[];let a=!1;for(const r of o){const l=h(r,t);l&&!s.includes(r)?(s.push(r),a=!0):!l&&!p.has(r)&&process.stderr.write(`${i}: warning: ${r} declares no dsh.bundle — installed as a plain dependency, not a profile layer (a later update that gains one activates it automatically)
2
2
  `)}const f=new Set(o);for(const r of[...s]){const l=p.has(r)||f.has(r),m=f.has(r)&&h(r,t);l&&!m&&(s.splice(s.indexOf(r),1),a=!0)}a&&(e.dsh={...e.dsh,profile:{...e.dsh?.profile,bundles:s}},E(t,e))}c(N,"reconcilePlugins");function L(n,t){const e=/^(?<prefix>(?:file|link):)?(?<path>\.{1,2}(?:[/\\].*)?)$/.exec(n);return e?.groups?.path===void 0?n:`${e.groups.prefix??""}${b(t,e.groups.path)}`}c(L,"anchorPathSpec");function O(n,t){const e=x(n);$(u(e,"package.json"))||(k(e,P[n]??y),process.stderr.write(`${i}: initialized profile ${n} at ${e}
3
3
  `));const p=d(i,e),o=S("pnpm",t.map(a=>L(a,process.cwd())),{cwd:e,stdio:"inherit",shell:process.platform==="win32"});if(o.error!==void 0){if(o.error.code==="ENOENT")return process.stderr.write(`${i}: pnpm not found on PATH — install pnpm to manage profile plugins
4
4
  `),127;throw o.error}const s=o.status??1;return s===0?N(p,e):(process.stderr.write(`${i}: pnpm failed in profile directory ${e}
@@ -0,0 +1 @@
1
+ import{o}from"./profile-boot-DDo03lXi.js";export{o as runProfile};
@@ -1,2 +1,2 @@
1
- var F=Object.defineProperty;var g=(e,t)=>F(e,"name",{value:t,configurable:!0});import{createRequire as O}from"node:module";import{Service as C}from"@deepseek-ai/cordis";import{watch as S}from"chokidar";import{dirname as k,relative as x,resolve as w}from"node:path";import{realpath as R,stat as P}from"node:fs/promises";import{codeFrameColumns as T}from"@babel/code-frame";import{readFileSync as U}from"node:fs";import{fileURLToPath as b,pathToFileURL as E}from"node:url";import _ from"picomatch";import m from"@deepseek-ai/schemastery";function A(e){return Array.isArray(e?.errors)&&e.errors.every(t=>t.text)}g(A,"isBuildFailure");function L(e,t){if(!A(t)){e.logger.warn(t);return}for(const a of t.errors){if(!a.location){e.logger.warn(a.text);continue}try{const{file:r,line:s,column:h}=a.location,l=T(U(r,"utf8"),{start:{line:s,column:h}},{highlightCode:!0,message:a.text});e.logger.warn(`File: ${r}:${s}:${h}
2
- `+l)}catch(r){e.logger.warn(r)}}}g(L,"handleError");async function D(e,t=new Set){const a=new Set;async function r(s){if(t.has(s.url)||a.has(s.url)||s.url.startsWith("node:")||s.url.includes("/node_modules/"))return;a.add(s.url);const h=await s.linked;await Promise.all(Array.prototype.map.call(h,r))}return g(r,"traverse"),await r(e),a}g(D,"loadDependencies");async function $(e){let t=k(e),a=0;for(;;)try{if(!(await P(t)).isDirectory())throw new Error(`config watch parent is not a directory: ${t}`);const r=await R(t);return{filename:w(r,x(t,e)),root:r,depth:a}}catch(r){if(r.code!=="ENOENT")throw r;const s=k(t);if(s===t)throw r;t=s,a+=1}}g($,"findWatchRoot");var v=class extends C{static{g(this,"Hmr")}config;static inject=["loader","timer"];baseDir;internal;watcher;configs=new Map;configRefreshes=new WeakMap;refreshTasks=new Set;externals;accepted;declined;stashed=new Set;constructor(e,t){if(super(e,"hmr"),this.config=t,!this.ctx.loader.internal)throw new Error("--expose-internals is required for HMR service");this.internal=this.ctx.loader.internal,this.baseDir=b(new URL(t.base||".",e.baseUrl))}async registerConfig(e,t){if(!this.watcher)throw new Error("HMR is not active");e=w(this.baseDir,e);const a=await $(e),r=a.filename;if(this.configs.has(r))throw new Error(`config path already registered: ${e}`);const{root:s,depth:h}=a,l=S(s,{...this.config,cwd:void 0,depth:h,ignored:void 0,ignoreInitial:!1}),d={watcher:l};this.configs.set(r,d);const f=g(n=>{const c=w(n);c!==e&&c!==r||this.refreshConfig(d,e,t)},"onChange");l.on("add",f),l.on("change",f),l.on("unlink",f);const i=Promise.withResolvers();let o="pending";l.once("ready",()=>{o="resolved",i.resolve()}),l.on("error",n=>{o==="pending"?(o="rejected",i.reject(n)):this.ctx.logger.warn(n)});try{return await i.promise,this.ctx.effect(()=>async()=>{this.configs.get(r)===d&&this.configs.delete(r),await l.close(),await this.configRefreshes.get(d)?.running},"hmr.registerConfig()")}catch(n){throw this.configs.delete(r),await l.close(),n}}async _resolve(e,t,a){switch(this.internal.version){case"v1":return await this.internal.resolve(e,t,a);case"v2":return this.internal.resolveSync(t,{specifier:e,attributes:a})}}async*[C.init](){yield async()=>{await this.watcher?.close(),await Promise.allSettled([...this.configs.values()].map(n=>n.watcher.close())),this.configs.clear(),await Promise.allSettled([...this.refreshTasks])};const{loader:e}=this.ctx,{root:t,ignored:a}=this.config;this.config.base?this.ctx.logger.info("watching %o in %s",t,this.baseDir):this.ctx.logger.info("watching %o",t);const r=_(a),s=await R(this.baseDir),h=E(w(process.argv[1])).href,l=this.internal.loadCache.get(h);l?this.externals=await D(l):this.externals=new Set,this.watcher=S(t,{...this.config,cwd:s,ignored:g(n=>r(x(s,n)),"ignored"),ignoreInitial:!0});const d=this.ctx.debounce(()=>this.partialReload(),this.config.debounce),f=g((n,c)=>{this.ctx.logger.debug("%s detected at %C",n,c);const u=w(s,c),M=w(this.baseDir,c);for(const j of e.entries()){const p=j.subtree;if(!(p?.filename!==u&&p?.filename!==M)){this.refreshConfig(p,p.filename,()=>p.refresh());return}}if(n!=="change")return;const y=E(u).href;if(this.externals.has(y))return e.exit();if(e.internal.loadCache.has(y))return this.stashed.add(y),d();this.ctx.emit("hmr/change",y)},"onChange");this.watcher.on("add",n=>f("add",n)),this.watcher.on("change",n=>f("change",n)),this.watcher.on("unlink",n=>f("unlink",n));const i=Promise.withResolvers();let o=t.length===0?"resolved":"pending";t.length===0?i.resolve():this.watcher.once("ready",()=>{o="resolved",i.resolve()}),this.watcher.on("error",n=>{o==="pending"?(o="rejected",i.reject(n)):this.ctx.logger.warn(n)}),await i.promise}refreshConfig(e,t,a){const r=this.configRefreshes.get(e)??{dirty:!1};if(this.configRefreshes.set(e,r),r.dirty=!0,r.running)return;const s=(async()=>{do{r.dirty=!1;try{await a()}catch(h){const l=h instanceof Error?h:new Error(String(h),{cause:h});this.ctx.logger.warn("config reload at %C failed",t),this.ctx.logger.warn(l);try{await this.ctx.parallel("hmr/config-update-failed",t,l)}catch(d){this.ctx.logger.warn(d)}}}while(r.dirty)})().finally(()=>{r.running=void 0,this.refreshTasks.delete(s)});r.running=s,this.refreshTasks.add(s)}getOuterStack=g(()=>[],"getOuterStack");async getLinked(e){const t=this.internal.loadCache.get(e);if(!t)return[];const a=await t.linked;return Array.prototype.map.call(a,r=>r.url)}async analyzeChanges(){const e=[];this.accepted=new Set(this.stashed),this.declined=new Set(this.externals);const t=g(a=>a.startsWith("node:")||a.includes("/node_modules/"),"isExcluded");for(await Promise.all([...this.stashed].map(async a=>{const r=await this.getLinked(a);for(const s of r)this.accepted.has(s)||this.declined.has(s)||t(s)||e.push(s)}));e.length;){let a=0,r=!1;for(;a<e.length;){const s=e[a],h=await this.getLinked(s);let l=!0,d=!1;for(const f of h)if(!(this.declined.has(f)||t(f)))if(this.accepted.has(f)){d=!0;break}else l=!1,e.includes(f)||(r=!0,e.push(f));d||l?(r=!0,e.splice(a,1),d?this.accepted.add(s):this.declined.add(s)):a++}if(!r)break}for(const a of e)this.declined.add(a)}async partialReload(){await this.analyzeChanges();const e=new Map,t=new Map,a=Object.create(null);for(const i of this.ctx.loader.entries())(a[i.parent.tree.ctx.baseUrl]??=new Set).add(i.options.name);for(const i in a)for(const o of a[i])try{const{url:n}=await this._resolve(o,i,{});if(this.declined.has(n))continue;const c=this.internal.loadCache.get(n),u=this.ctx.loader.unwrapExports(c?.module?.getNamespace());if(!c||!u)continue;e.set(c,u),this.declined.add(n)}catch(n){this.ctx.logger.warn(n)}for(const[i,o]of e){this.declined.delete(i.url);const n=[...await D(i,this.declined)];this.declined.add(i.url),n.some(c=>this.accepted.has(c))&&(n.forEach(c=>this.accepted.add(c)),t.set(o,{filename:i.url,runtime:this.ctx.registry.get(o)}))}const r=Object.create(null),s=Object.create(null),h=O(import.meta.url);for(const i of this.accepted){r[i]=Map.prototype.get.call(this.internal.loadCache,i),Map.prototype.delete.call(this.internal.loadCache,i);try{const o=b(i);h.cache[o]&&(s[o]=h.cache[o],delete h.cache[o])}catch{}}const l=g(()=>{for(const i in r)Map.prototype.set.call(this.internal.loadCache,i,r[i]);for(const i in s)h.cache[i]=s[i]},"rollback"),d={};try{for(const[,{filename:i}]of t)d[i]=this.ctx.loader.unwrapExports(await this.ctx.loader.import(i,this.getOuterStack))}catch(i){return L(this.ctx,i),l()}const f=g((i,o)=>{if(o)for(const n of o.fibers){const c=n.parent.registry.plugin(i,n._config,this.getOuterStack);c.entry=n.entry,c.entry&&(c.entry.fiber=c)}},"reload");try{for(const[i,{filename:o,runtime:n}]of t){if(!n)continue;const c=x(this.baseDir,b(o));try{this.ctx.registry.delete(i)}catch(u){this.ctx.logger.warn("failed to dispose plugin at %C",c),this.ctx.logger.warn(u)}try{f(d[o],n),this.ctx.logger.info("reload plugin at %C",c)}catch(u){throw this.ctx.logger.warn("failed to reload plugin at %C",c),this.ctx.logger.warn(u),u}}}catch{l();for(const[i,{filename:o,runtime:n}]of t)if(n)try{this.ctx.registry.delete(d[o]),f(i,n)}catch(c){this.ctx.logger.warn(c)}return}this.ctx.emit("hmr/reload",t),this.stashed=new Set}};(function(e){e.Config=m.object({base:m.string(),root:m.array(String).role("table").default(["."]),ignored:m.array(String).role("table").default(["**/node_modules","**/.*","cache","data"]),debounce:m.natural().role("ms").default(100)})})(v||(v={}));var B=v;export{B as default};
1
+ var F=Object.defineProperty;var g=(e,t)=>F(e,"name",{value:t,configurable:!0});import{createRequire as O}from"node:module";import{Service as C}from"@deepseek-ai/cordis";import{watch as S}from"chokidar";import{dirname as k,relative as x,resolve as w}from"node:path";import{realpath as R,stat as P}from"node:fs/promises";import{codeFrameColumns as T}from"@babel/code-frame";import{readFileSync as U}from"node:fs";import{fileURLToPath as b,pathToFileURL as E}from"node:url";import _ from"picomatch";import m from"@deepseek-ai/schemastery";function A(e){return Array.isArray(e?.errors)&&e.errors.every(t=>t.text)}g(A,"isBuildFailure");function L(e,t){if(!A(t)){e.logger.warn(t);return}for(const s of t.errors){if(!s.location){e.logger.warn(s.text);continue}try{const{file:r,line:a,column:h}=s.location,l=U(r,"utf8"),d=T(l,{start:{line:a,column:h}},{highlightCode:!0,message:s.text});e.logger.warn(`File: ${r}:${a}:${h}
2
+ `+d)}catch(r){e.logger.warn(r)}}}g(L,"handleError");async function D(e,t=new Set){const s=new Set;async function r(a){if(t.has(a.url)||s.has(a.url)||a.url.startsWith("node:")||a.url.includes("/node_modules/"))return;s.add(a.url);const h=await a.linked;await Promise.all(Array.prototype.map.call(h,r))}return g(r,"traverse"),await r(e),s}g(D,"loadDependencies");async function $(e){let t=k(e),s=0;for(;;)try{if(!(await P(t)).isDirectory())throw new Error(`config watch parent is not a directory: ${t}`);const r=await R(t);return{filename:w(r,x(t,e)),root:r,depth:s}}catch(r){if(r.code!=="ENOENT")throw r;const a=k(t);if(a===t)throw r;t=a,s+=1}}g($,"findWatchRoot");var v=class extends C{static{g(this,"Hmr")}config;static inject=["loader","timer"];baseDir;internal;watcher;configs=new Map;configRefreshes=new WeakMap;refreshTasks=new Set;externals;accepted;declined;stashed=new Set;constructor(e,t){if(super(e,"hmr"),this.config=t,!this.ctx.loader.internal)throw new Error("--expose-internals is required for HMR service");this.internal=this.ctx.loader.internal,this.baseDir=b(new URL(t.base||".",e.baseUrl))}async registerConfig(e,t){if(!this.watcher)throw new Error("HMR is not active");e=w(this.baseDir,e);const s=await $(e),r=s.filename;if(this.configs.has(r))throw new Error(`config path already registered: ${e}`);const{root:a,depth:h}=s,l=S(a,{...this.config,cwd:void 0,depth:h,ignored:void 0,ignoreInitial:!1}),d={watcher:l};this.configs.set(r,d);const f=g(n=>{const c=w(n);c!==e&&c!==r||this.refreshConfig(d,e,t)},"onChange");l.on("add",f),l.on("change",f),l.on("unlink",f);const i=Promise.withResolvers();let o="pending";l.once("ready",()=>{o="resolved",i.resolve()}),l.on("error",n=>{o==="pending"?(o="rejected",i.reject(n)):this.ctx.logger.warn(n)});try{return await i.promise,this.ctx.effect(()=>async()=>{this.configs.get(r)===d&&this.configs.delete(r),await l.close(),await this.configRefreshes.get(d)?.running},"hmr.registerConfig()")}catch(n){throw this.configs.delete(r),await l.close(),n}}async _resolve(e,t,s){switch(this.internal.version){case"v1":return await this.internal.resolve(e,t,s);case"v2":return this.internal.resolveSync(t,{specifier:e,attributes:s})}}async*[C.init](){yield async()=>{await this.watcher?.close(),await Promise.allSettled([...this.configs.values()].map(n=>n.watcher.close())),this.configs.clear(),await Promise.allSettled([...this.refreshTasks])};const{loader:e}=this.ctx,{root:t,ignored:s}=this.config;this.config.base?this.ctx.logger.info("watching %o in %s",t,this.baseDir):this.ctx.logger.info("watching %o",t);const r=_(s),a=await R(this.baseDir),h=E(w(process.argv[1])).href,l=this.internal.loadCache.get(h);l?this.externals=await D(l):this.externals=new Set,this.watcher=S(t,{...this.config,cwd:a,ignored:g(n=>r(x(a,n)),"ignored"),ignoreInitial:!0});const d=this.ctx.debounce(()=>this.partialReload(),this.config.debounce),f=g((n,c)=>{this.ctx.logger.debug("%s detected at %C",n,c);const u=w(a,c),M=w(this.baseDir,c);for(const j of e.entries()){const p=j.subtree;if(!(p?.filename!==u&&p?.filename!==M)){this.refreshConfig(p,p.filename,()=>p.refresh());return}}if(n!=="change")return;const y=E(u).href;if(this.externals.has(y))return e.exit();if(e.internal.loadCache.has(y))return this.stashed.add(y),d();this.ctx.emit("hmr/change",y)},"onChange");this.watcher.on("add",n=>f("add",n)),this.watcher.on("change",n=>f("change",n)),this.watcher.on("unlink",n=>f("unlink",n));const i=Promise.withResolvers();let o=t.length===0?"resolved":"pending";t.length===0?i.resolve():this.watcher.once("ready",()=>{o="resolved",i.resolve()}),this.watcher.on("error",n=>{o==="pending"?(o="rejected",i.reject(n)):this.ctx.logger.warn(n)}),await i.promise}refreshConfig(e,t,s){const r=this.configRefreshes.get(e)??{dirty:!1};if(this.configRefreshes.set(e,r),r.dirty=!0,r.running)return;const a=(async()=>{do{r.dirty=!1;try{await s()}catch(h){const l=h instanceof Error?h:new Error(String(h),{cause:h});this.ctx.logger.warn("config reload at %C failed",t),this.ctx.logger.warn(l);try{await this.ctx.parallel("hmr/config-update-failed",t,l)}catch(d){this.ctx.logger.warn(d)}}}while(r.dirty)})().finally(()=>{r.running=void 0,this.refreshTasks.delete(a)});r.running=a,this.refreshTasks.add(a)}getOuterStack=g(()=>[],"getOuterStack");async getLinked(e){const t=this.internal.loadCache.get(e);if(!t)return[];const s=await t.linked;return Array.prototype.map.call(s,r=>r.url)}async analyzeChanges(){const e=[];this.accepted=new Set(this.stashed),this.declined=new Set(this.externals);const t=g(s=>s.startsWith("node:")||s.includes("/node_modules/"),"isExcluded");for(await Promise.all([...this.stashed].map(async s=>{const r=await this.getLinked(s);for(const a of r)this.accepted.has(a)||this.declined.has(a)||t(a)||e.push(a)}));e.length;){let s=0,r=!1;for(;s<e.length;){const a=e[s],h=await this.getLinked(a);let l=!0,d=!1;for(const f of h)if(!(this.declined.has(f)||t(f)))if(this.accepted.has(f)){d=!0;break}else l=!1,e.includes(f)||(r=!0,e.push(f));d||l?(r=!0,e.splice(s,1),d?this.accepted.add(a):this.declined.add(a)):s++}if(!r)break}for(const s of e)this.declined.add(s)}async partialReload(){await this.analyzeChanges();const e=new Map,t=new Map,s=Object.create(null);for(const i of this.ctx.loader.entries())(s[i.parent.tree.ctx.baseUrl]??=new Set).add(i.options.name);for(const i in s)for(const o of s[i])try{const{url:n}=await this._resolve(o,i,{});if(this.declined.has(n))continue;const c=this.internal.loadCache.get(n),u=this.ctx.loader.unwrapExports(c?.module?.getNamespace());if(!c||!u)continue;e.set(c,u),this.declined.add(n)}catch(n){this.ctx.logger.warn(n)}for(const[i,o]of e){this.declined.delete(i.url);const n=[...await D(i,this.declined)];this.declined.add(i.url),n.some(c=>this.accepted.has(c))&&(n.forEach(c=>this.accepted.add(c)),t.set(o,{filename:i.url,runtime:this.ctx.registry.get(o)}))}const r=Object.create(null),a=Object.create(null),h=O(import.meta.url);for(const i of this.accepted){r[i]=Map.prototype.get.call(this.internal.loadCache,i),Map.prototype.delete.call(this.internal.loadCache,i);try{const o=b(i);h.cache[o]&&(a[o]=h.cache[o],delete h.cache[o])}catch{}}const l=g(()=>{for(const i in r)Map.prototype.set.call(this.internal.loadCache,i,r[i]);for(const i in a)h.cache[i]=a[i]},"rollback"),d={};try{for(const[,{filename:i}]of t)d[i]=this.ctx.loader.unwrapExports(await this.ctx.loader.import(i,this.getOuterStack))}catch(i){return L(this.ctx,i),l()}const f=g((i,o)=>{if(o)for(const n of o.fibers){const c=n.parent.registry.plugin(i,n._config,this.getOuterStack);c.entry=n.entry,c.entry&&(c.entry.fiber=c)}},"reload");try{for(const[i,{filename:o,runtime:n}]of t){if(!n)continue;const c=x(this.baseDir,b(o));try{this.ctx.registry.delete(i)}catch(u){this.ctx.logger.warn("failed to dispose plugin at %C",c),this.ctx.logger.warn(u)}try{f(d[o],n),this.ctx.logger.info("reload plugin at %C",c)}catch(u){throw this.ctx.logger.warn("failed to reload plugin at %C",c),this.ctx.logger.warn(u),u}}}catch{l();for(const[i,{filename:o,runtime:n}]of t)if(n)try{this.ctx.registry.delete(d[o]),f(i,n)}catch(c){this.ctx.logger.warn(c)}return}this.ctx.emit("hmr/reload",t),this.stashed=new Set}};(function(e){e.Config=m.object({base:m.string(),root:m.array(String).role("table").default(["."]),ignored:m.array(String).role("table").default(["**/node_modules","**/.*","cache","data"]),debounce:m.natural().role("ms").default(100)})})(v||(v={}));var B=v;export{B as default};
@@ -1 +1 @@
1
- var R=Object.defineProperty;var c=(t,e)=>R(t,"name",{value:e,configurable:!0});import{Service as E,getTraceable as m,symbols as k}from"@deepseek-ai/cordis";import{AsyncLocalStorage as w}from"node:async_hooks";import{isPromise as $}from"node:util/types";import{scopeTarget as y}from"@deepseek-ai/dsh-scope";var A=class{static{c(this,"Inbox")}session;notifications;state={"next-turn":[],"next-step":[]};constructor(t,e){this.session=t,this.notifications=e;for(const i of t.events.slice(t.header.seedLength??0))if(i.type==="agent/inbox/spliced")try{this.apply(i.data)}catch(r){throw new Error(`invalid persisted inbox splice at session seq ${i.seq}`,{cause:r})}}get nextTurn(){return this.state["next-turn"]}get nextStep(){return this.state["next-step"]}get hasPending(){return this.nextTurn.length>0||this.nextStep.length>0}clear(){this.splice("next-step",0,this.nextStep.length,[]),this.splice("next-turn",0,this.nextTurn.length,[])}claim(t,e){const i=this.mutate("next-step",0,this.nextStep.length,[],!1);t==="next-turn"&&i.push(...this.mutate("next-turn",0,1,[],!1));for(const r of i)this.notifications.claimed(r,e);return i}append(t,e){this.splice(t,this.state[t].length,0,[e])}prepend(t,e){this.splice(t,0,0,[e])}replace(t,e){const i=this.locate(t);return i===void 0?!1:(this.splice(i.target,i.index,1,[e]),!0)}remove(t){const e=this.locate(t);return e===void 0?!1:(this.splice(e.target,e.index,1,[]),!0)}splice(t,e,i,r){return this.mutate(t,e,i,r,!0)}locate(t){for(const e of["next-turn","next-step"]){const i=this.state[e].findIndex(r=>r.id===t);if(i>=0)return{target:e,index:i}}}mutate(t,e,i,r,n){const s=this.state[t],o=Math.trunc(e),a=Number.isNaN(o)?0:o,d=a<0?Math.max(s.length+a,0):Math.min(a,s.length),h=Math.trunc(i),u=Math.min(Math.max(Number.isNaN(h)?0:h,0),s.length-d);if(u===0&&r.length===0)return[];const f=n&&u>0?"canceled":void 0,g={target:t,start:d,...u===0?{}:{removedCount:u},inserted:r,...f===void 0?{}:{outcome:f}};this.validate(g);const p=this.session.append("agent/inbox/spliced",g),v=s.splice(d,u,...p.data.inserted);if(n)for(const l of v)this.notifications.discarded(l);for(const l of p.data.inserted)this.notifications.inserted(l);return v}apply(t){return this.validate(t),this.state[t.target].splice(t.start,t.removedCount??0,...t.inserted)}validate(t){const e=this.state[t.target],i=t.removedCount??0;if(!Number.isSafeInteger(t.start)||t.start<0||t.start>e.length||!Number.isSafeInteger(i)||i<0||t.start+i>e.length)throw new Error("invalid inbox splice");const r=e.toSpliced(t.start,i,...t.inserted),n=new Set;for(const s of t.target==="next-turn"?[...r,...this.nextStep]:[...this.nextTurn,...r]){if(n.has(s.id))throw new Error(`message "${s.id}" is already pending`);n.add(s.id)}}};function T(t){switch(t.kind){case"completed":return!1;case"blocked":case"aborted":case"interrupted":case"error":return!0;default:return!0}}c(T,"accountsForClaim");function D(t){const e=new Set,i=new Set;let r,n,s=!1;for(const o of t)switch(o.type){case"turn/start":r=o.data.turn;break;case"step/start":e.add(o.data.turn);break;case"agent/inbox/spliced":{const{removedCount:a,outcome:d,inserted:h}=o.data;if(a===void 0)break;d==="canceled"?s||=h.length===0:r!==void 0&&i.add(r);break}case"turn/end":{const{turn:a,reason:d}=o.data;r=void 0,(e.delete(a)||i.delete(a)&&T(d))&&(n=o,s=!1);break}default:break}return{...n===void 0?{}:{end:n},droppedUnrun:s}}c(D,"foldConsumedWork");function q(t,e){const i=t.on("system-prompt/assemble",async(n,s,o)=>{const a=e.current,d=await o();return e.assembled=a,a===void 0?d:{...d,variables:{...d.variables,provider:a.provider,model:a.model}}}),r=t.on("agent/request",async(n,s)=>{const o=await s(),a=e.assembled;if(a===void 0)return o;const{reasoningEffort:d,...h}=o;return{...h,provider:a.provider,model:a.model,...a.reasoningEffort===void 0?{}:{reasoningEffort:a.reasoningEffort}}});return()=>{i(),r()}}c(q,"installModelSelection");function b(t){return y(t,t)}c(b,"agentCarrier");function I(t,e,i=b(e)){const r=c(n=>({...n,agent:e}),"fused");return{emit(n,s){const o=[i,n,r(s)],a=t.events.dispatch("emit",o);for(const d of a)try{const h=d(...o);Promise.resolve(h).catch(u=>{t.logger.warn(`agent event "${n}" listener rejected: ${String(u)}`)})}catch(h){t.logger.warn(`agent event "${n}" listener threw: ${String(h)}`)}},async serial(n,s){const o=t.serial;return await o(i,n,r(s))},waterfall(n,s,...o){const a=t.waterfall;return a(i,n,r(s),...o)}}}c(I,"agentEvents");function C(t,e,i,r){I(t,e).emit(i,r)}c(C,"emitAgentEvent");function N(t,e){return{agent:t,scope:t,...e===void 0?{}:{signal:e}}}c(N,"assembleContextFor");const M="no agent factory registered (load an agent-loop plugin)",_="no initiating agent is active",x="agent initiator scope is disposed";var S=class extends E{static{c(this,"AgentRegistry")}store=new Map;factory;initiators=new w;initiatorRuns=new w;initiatorState="active";activeInitiatorRuns=0;initiatorDrain;initiatorDisposal;constructor(t){super(t,"agents"),t.inject(["typert"],e=>{e.typert.lookups.register("agent",{parameter:"agent",wire:"agentId",hostTypeSymbol:"@deepseek-ai/dsh-agent#Agent",wireTypeSymbol:"@deepseek-ai/dsh-session/types#SessionId",resolve:c(i=>this.get(i),"resolve")}),e.typert.contexts.registerHost("agent",{wire:"agentId",wireTypeSymbol:"@deepseek-ai/dsh-session/types#SessionId",resolve:c(i=>this.get(i)?.ctx,"resolve")})}),t.accessor("agent",{get:c(()=>{},"get")}),t.on("internal/status",e=>{e.state===5&&this.hasLifecycleAncestor(e)&&this.closeInitiators()}),t.effect(function*(){yield()=>this.disposeInitiators(),yield()=>{this.closeInitiators()}}.bind(this),"agents.initiatorLifecycle()")}currentInitiator(){return this.assertInitiatorsReadable(),this.initiators.getStore()}requireInitiator(){const t=this.currentInitiator();if(t===void 0)throw new Error(_);return t}withInitiator(t,e){return this.runWithInitiator(t,e)}withoutInitiator(t){return this.runWithInitiator(void 0,t)}setFactory(t){return this.ctx.effect(()=>{if(this.factory!==void 0)throw new Error("an agent factory is already registered");const e=t[k.original]??t;return this.factory={target:e},()=>{this.factory=void 0}},"agents.setFactory()")}requireFactory(){if(this.factory===void 0)throw new Error(M);return this.factory}async create(t){const e=this.ctx,{target:i}=this.requireFactory(),r=m(e,i);return Reflect.apply(i.createAgent,r,[e,t])}async resume(t){const e=this.ctx,{target:i}=this.requireFactory(),r=m(e,i);return Reflect.apply(i.resume,r,[e,t])}register(t){return this.ctx.effect(function*(){yield this.enter(t,this.ctx.agent),this.announce(t)}.bind(this),"agents.register()")}enter(t,e){const i=t.id;if(i!==t.session.id)throw new Error(`agent id "${i}" does not match session id "${t.session.id}"`);const r=y(t,t);if(this.store.has(i))throw new Error(`agent "${i}" is already registered`);const n={id:i,agent:t,owner:e,carrier:r,announced:!1,announcing:!1,detachRequested:!1};this.store.set(i,n);let s=!0;return c(()=>{if(s){if(s=!1,n.announcing){n.detachRequested=!0;return}this.detachEntered(n)}},"detach")}detachEntered(t){t.detachRequested=!1,this.store.get(t.id)===t&&(this.store.delete(t.id),t.announced&&this.emitDisposed(t))}emitDisposed(t){const e=[t.carrier,"agent/disposed",{agent:t.agent}];for(const i of this.ctx.events.dispatch("emit",e))try{const r=i(...e);Promise.resolve(r).catch(n=>{this.ctx.logger.warn(`agent "${t.id}": agent/disposed listener rejected: ${String(n)}`)})}catch(r){this.ctx.logger.warn(`agent "${t.id}": agent/disposed listener threw: ${String(r)}`)}}announce(t){const e=this.store.get(t.id);if(e===void 0||e.agent!==t)throw new Error(`agent "${t.id}" is not live in this registry`);if(e.announced||e.announcing)throw new Error(`agent "${e.id}" was already announced`);e.announcing=!0,e.announced=!0;const i=[e.carrier,"agent/created",{agent:e.agent}];try{for(const r of this.ctx.events.dispatch("emit",i)){const n=r(...i);Promise.resolve(n).catch(s=>{this.ctx.logger.warn(`agent "${e.id}": agent/created listener rejected: ${String(s)}`)})}}finally{e.announcing=!1,e.detachRequested&&this.detachEntered(e)}}get(t){return this.store.get(t)?.agent}isOwnedBy(t,e){return this.store.get(t)?.owner===e}list(){return[...this.store.values()].map(t=>t.agent)}roots(){return[...this.store.values()].filter(t=>t.owner===void 0).map(t=>t.agent)}closeInitiators(){this.initiatorState==="active"&&(this.initiatorState="closing")}disposeInitiators(){return this.initiatorDisposal??=(async()=>{this.closeInitiators(),this.releaseReentrantInitiatorRuns(),this.activeInitiatorRuns!==0&&(this.initiatorDrain??=Promise.withResolvers(),await this.initiatorDrain.promise),this.initiatorState="disposed",this.initiators.disable(),this.initiatorRuns.disable()})()}runWithInitiator(t,e){if(this.initiatorState!=="active")throw new Error(x);const i={active:!0,parent:this.initiatorRuns.getStore()};this.activeInitiatorRuns+=1;let r;try{r=this.initiatorRuns.run(i,()=>this.initiators.run(t,e))}catch(n){throw this.releaseInitiatorRun(i),n}if($(r))try{Promise.prototype.then.call(r,()=>{this.releaseInitiatorRun(i)},()=>{this.releaseInitiatorRun(i)})}catch{this.releaseInitiatorRun(i)}else this.releaseInitiatorRun(i);return r}hasLifecycleAncestor(t){let e=this.ctx.fiber;for(;;){if(e===t)return!0;const i=e.parent.fiber;if(i===e)return!1;e=i}}assertInitiatorsReadable(){if(this.initiatorState==="disposed")throw new Error(x)}releaseReentrantInitiatorRuns(){let t=this.initiatorRuns.getStore();for(;t!==void 0;)this.releaseInitiatorRun(t),t=t.parent}releaseInitiatorRun(t){t.active&&(t.active=!1,this.activeInitiatorRuns-=1,this.activeInitiatorRuns===0&&(this.initiatorDrain?.resolve(),this.initiatorDrain=void 0))}};export{S as AgentRegistry,S as default,A as Inbox,b as agentCarrier,I as agentEvents,N as assembleContextFor,C as emitAgentEvent,D as foldConsumedWork,q as installModelSelection};
1
+ var R=Object.defineProperty;var c=(t,e)=>R(t,"name",{value:e,configurable:!0});import{Service as E,getTraceable as m,symbols as $}from"@deepseek-ai/cordis";import{AsyncLocalStorage as w}from"node:async_hooks";import{isPromise as k}from"node:util/types";import{scopeTarget as y}from"@deepseek-ai/dsh-scope";var A=class{static{c(this,"Inbox")}session;notifications;state={"next-turn":[],"next-step":[]};constructor(t,e){this.session=t,this.notifications=e;for(const i of t.events.slice(t.header.seedLength??0))if(i.type==="agent/inbox/spliced")try{this.apply(i.data)}catch(r){throw new Error(`invalid persisted inbox splice at session seq ${i.seq}`,{cause:r})}}get nextTurn(){return this.state["next-turn"]}get nextStep(){return this.state["next-step"]}get hasPending(){return this.nextTurn.length>0||this.nextStep.length>0}clear(){this.splice("next-step",0,this.nextStep.length,[]),this.splice("next-turn",0,this.nextTurn.length,[])}claim(t,e){const i=this.mutate("next-step",0,this.nextStep.length,[],!1);t==="next-turn"&&i.push(...this.mutate("next-turn",0,1,[],!1));for(const r of i)this.notifications.claimed(r,e);return i}append(t,e){this.splice(t,this.state[t].length,0,[e])}prepend(t,e){this.splice(t,0,0,[e])}replace(t,e){const i=this.locate(t);return i===void 0?!1:(this.splice(i.target,i.index,1,[e]),!0)}remove(t){const e=this.locate(t);return e===void 0?!1:(this.splice(e.target,e.index,1,[]),!0)}splice(t,e,i,r){return this.mutate(t,e,i,r,!0)}locate(t){for(const e of["next-turn","next-step"]){const i=this.state[e].findIndex(r=>r.id===t);if(i>=0)return{target:e,index:i}}}mutate(t,e,i,r,n){const s=this.state[t],o=Math.trunc(e),a=Number.isNaN(o)?0:o,d=a<0?Math.max(s.length+a,0):Math.min(a,s.length),h=Math.trunc(i),u=Math.min(Math.max(Number.isNaN(h)?0:h,0),s.length-d);if(u===0&&r.length===0)return[];const f=n&&u>0?"canceled":void 0,g={target:t,start:d,...u===0?{}:{removedCount:u},inserted:r,...f===void 0?{}:{outcome:f}};this.validate(g);const p=this.session.append("agent/inbox/spliced",g),v=s.splice(d,u,...p.data.inserted);if(n)for(const l of v)this.notifications.discarded(l);for(const l of p.data.inserted)this.notifications.inserted(l);return v}apply(t){return this.validate(t),this.state[t.target].splice(t.start,t.removedCount??0,...t.inserted)}validate(t){const e=this.state[t.target],i=t.removedCount??0;if(!Number.isSafeInteger(t.start)||t.start<0||t.start>e.length||!Number.isSafeInteger(i)||i<0||t.start+i>e.length)throw new Error("invalid inbox splice");const r=e.toSpliced(t.start,i,...t.inserted),n=new Set;for(const s of t.target==="next-turn"?[...r,...this.nextStep]:[...this.nextTurn,...r]){if(n.has(s.id))throw new Error(`message "${s.id}" is already pending`);n.add(s.id)}}};function T(t){switch(t.kind){case"completed":return!1;case"blocked":case"aborted":case"interrupted":case"error":return!0;default:return!0}}c(T,"accountsForClaim");function D(t){const e=new Set,i=new Set;let r,n,s=!1;for(const o of t)switch(o.type){case"turn/start":r=o.data.turn;break;case"step/start":e.add(o.data.turn);break;case"agent/inbox/spliced":{const{removedCount:a,outcome:d,inserted:h}=o.data;if(a===void 0)break;d==="canceled"?s||=h.length===0:r!==void 0&&i.add(r);break}case"turn/end":{const{turn:a,reason:d}=o.data;r=void 0,(e.delete(a)||i.delete(a)&&T(d))&&(n=o,s=!1);break}}return{...n===void 0?{}:{end:n},droppedUnrun:s}}c(D,"foldConsumedWork");function q(t,e){const i=t.on("system-prompt/assemble",async(n,s,o)=>{const a=e.current,d=await o();return e.assembled=a,a===void 0?d:{...d,variables:{...d.variables,provider:a.provider,model:a.model}}}),r=t.on("agent/request",async(n,s)=>{const o=await s(),a=e.assembled;if(a===void 0)return o;const{reasoningEffort:d,...h}=o;return{...h,provider:a.provider,model:a.model,...a.reasoningEffort===void 0?{}:{reasoningEffort:a.reasoningEffort}}});return()=>{i(),r()}}c(q,"installModelSelection");function I(t){return y(t,t)}c(I,"agentCarrier");function b(t,e,i=I(e)){const r=c(n=>({...n,agent:e}),"fused");return{emit(n,s){const o=[i,n,r(s)],a=t.events.dispatch("emit",o);for(const d of a)try{const h=d(...o);Promise.resolve(h).catch(u=>{t.logger.warn(`agent event "${n}" listener rejected: ${String(u)}`)})}catch(h){t.logger.warn(`agent event "${n}" listener threw: ${String(h)}`)}},async serial(n,s){const o=t.serial;return await o(i,n,r(s))},waterfall(n,s,...o){const a=t.waterfall;return a(i,n,r(s),...o)}}}c(b,"agentEvents");function C(t,e,i,r){b(t,e).emit(i,r)}c(C,"emitAgentEvent");function N(t,e){return{agent:t,scope:t,...e===void 0?{}:{signal:e}}}c(N,"assembleContextFor");const M="no agent factory registered (load an agent-loop plugin)",_="no initiating agent is active",x="agent initiator scope is disposed";var S=class extends E{static{c(this,"AgentRegistry")}store=new Map;factory;initiators=new w;initiatorRuns=new w;initiatorState="active";activeInitiatorRuns=0;initiatorDrain;initiatorDisposal;constructor(t){super(t,"agents"),t.inject(["typert"],e=>{e.typert.lookups.register("agent",{parameter:"agent",wire:"agentId",hostTypeSymbol:"@deepseek-ai/dsh-agent#Agent",wireTypeSymbol:"@deepseek-ai/dsh-session/types#SessionId",resolve:c(i=>this.get(i),"resolve")}),e.typert.contexts.registerHost("agent",{wire:"agentId",wireTypeSymbol:"@deepseek-ai/dsh-session/types#SessionId",resolve:c(i=>this.get(i)?.ctx,"resolve")})}),t.accessor("agent",{get:c(()=>{},"get")}),t.on("internal/status",e=>{e.state===5&&this.hasLifecycleAncestor(e)&&this.closeInitiators()}),t.effect(function*(){yield()=>this.disposeInitiators(),yield()=>{this.closeInitiators()}}.bind(this),"agents.initiatorLifecycle()")}currentInitiator(){return this.assertInitiatorsReadable(),this.initiators.getStore()}requireInitiator(){const t=this.currentInitiator();if(t===void 0)throw new Error(_);return t}withInitiator(t,e){return this.runWithInitiator(t,e)}withoutInitiator(t){return this.runWithInitiator(void 0,t)}setFactory(t){return this.ctx.effect(()=>{if(this.factory!==void 0)throw new Error("an agent factory is already registered");const e=t[$.original]??t;return this.factory={target:e},()=>{this.factory=void 0}},"agents.setFactory()")}requireFactory(){if(this.factory===void 0)throw new Error(M);return this.factory}async create(t){const e=this.ctx,{target:i}=this.requireFactory(),r=m(e,i);return Reflect.apply(i.createAgent,r,[e,t])}async resume(t){const e=this.ctx,{target:i}=this.requireFactory(),r=m(e,i);return Reflect.apply(i.resume,r,[e,t])}register(t){return this.ctx.effect(function*(){yield this.enter(t,this.ctx.agent),this.announce(t)}.bind(this),"agents.register()")}enter(t,e){const i=t.id;if(i!==t.session.id)throw new Error(`agent id "${i}" does not match session id "${t.session.id}"`);const r=y(t,t);if(this.store.has(i))throw new Error(`agent "${i}" is already registered`);const n={id:i,agent:t,owner:e,carrier:r,announced:!1,announcing:!1,detachRequested:!1};this.store.set(i,n);let s=!0;return c(()=>{if(s){if(s=!1,n.announcing){n.detachRequested=!0;return}this.detachEntered(n)}},"detach")}detachEntered(t){t.detachRequested=!1,this.store.get(t.id)===t&&(this.store.delete(t.id),t.announced&&this.emitDisposed(t))}emitDisposed(t){const e=[t.carrier,"agent/disposed",{agent:t.agent}];for(const i of this.ctx.events.dispatch("emit",e))try{const r=i(...e);Promise.resolve(r).catch(n=>{this.ctx.logger.warn(`agent "${t.id}": agent/disposed listener rejected: ${String(n)}`)})}catch(r){this.ctx.logger.warn(`agent "${t.id}": agent/disposed listener threw: ${String(r)}`)}}announce(t){const e=this.store.get(t.id);if(e===void 0||e.agent!==t)throw new Error(`agent "${t.id}" is not live in this registry`);if(e.announced||e.announcing)throw new Error(`agent "${e.id}" was already announced`);e.announcing=!0,e.announced=!0;const i=[e.carrier,"agent/created",{agent:e.agent}];try{for(const r of this.ctx.events.dispatch("emit",i)){const n=r(...i);Promise.resolve(n).catch(s=>{this.ctx.logger.warn(`agent "${e.id}": agent/created listener rejected: ${String(s)}`)})}}finally{e.announcing=!1,e.detachRequested&&this.detachEntered(e)}}get(t){return this.store.get(t)?.agent}isOwnedBy(t,e){return this.store.get(t)?.owner===e}list(){return[...this.store.values()].map(t=>t.agent)}roots(){return[...this.store.values()].filter(t=>t.owner===void 0).map(t=>t.agent)}closeInitiators(){this.initiatorState==="active"&&(this.initiatorState="closing")}disposeInitiators(){return this.initiatorDisposal??=(async()=>{this.closeInitiators(),this.releaseReentrantInitiatorRuns(),this.activeInitiatorRuns!==0&&(this.initiatorDrain??=Promise.withResolvers(),await this.initiatorDrain.promise),this.initiatorState="disposed",this.initiators.disable(),this.initiatorRuns.disable()})()}runWithInitiator(t,e){if(this.initiatorState!=="active")throw new Error(x);const i={active:!0,parent:this.initiatorRuns.getStore()};this.activeInitiatorRuns+=1;let r;try{r=this.initiatorRuns.run(i,()=>this.initiators.run(t,e))}catch(n){throw this.releaseInitiatorRun(i),n}if(k(r))try{Promise.prototype.then.call(r,()=>{this.releaseInitiatorRun(i)},()=>{this.releaseInitiatorRun(i)})}catch{this.releaseInitiatorRun(i)}else this.releaseInitiatorRun(i);return r}hasLifecycleAncestor(t){let e=this.ctx.fiber;for(;;){if(e===t)return!0;const i=e.parent.fiber;if(i===e)return!1;e=i}}assertInitiatorsReadable(){if(this.initiatorState==="disposed")throw new Error(x)}releaseReentrantInitiatorRuns(){let t=this.initiatorRuns.getStore();for(;t!==void 0;)this.releaseInitiatorRun(t),t=t.parent}releaseInitiatorRun(t){t.active&&(t.active=!1,this.activeInitiatorRuns-=1,this.activeInitiatorRuns===0&&(this.initiatorDrain?.resolve(),this.initiatorDrain=void 0))}};export{S as AgentRegistry,S as default,A as Inbox,I as agentCarrier,b as agentEvents,N as assembleContextFor,C as emitAgentEvent,D as foldConsumedWork,q as installModelSelection};
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-agent","version":"0.0.11","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.11","@deepseek-ai/dsh-scope":"^0.0.11","@deepseek-ai/dsh-system-prompt":"^0.0.11","@deepseek-ai/dsh-llm":"^0.0.11","@deepseek-ai/dsh-session":"^0.0.11","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-typert-protocol":"^0.0.11"}}
1
+ {"name":"@deepseek-ai/dsh-agent","version":"0.0.13","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.13","@deepseek-ai/dsh-scope":"^0.0.13","@deepseek-ai/dsh-session":"^0.0.13","@deepseek-ai/dsh-llm":"^0.0.13","@deepseek-ai/dsh-system-prompt":"^0.0.13","@deepseek-ai/dsh-typert-protocol":"^0.0.13","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-agent-default-model","version":"0.0.11","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-agent":"^0.0.11","@deepseek-ai/dsh-llm":"^0.0.11","@deepseek-ai/dsh-invariants":"^0.0.11","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-settings":"^0.0.11"}}
1
+ {"name":"@deepseek-ai/dsh-agent-default-model","version":"0.0.13","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-agent":"^0.0.13","@deepseek-ai/dsh-llm":"^0.0.13","@deepseek-ai/dsh-settings":"^0.0.13","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-invariants":"^0.0.13"}}
@@ -4,9 +4,9 @@ ${e.content}`}r(rt,"sectionText");const ie="user-global",ce="AGENTS.md";function
4
4
  `)}r(ct,"additionalSectionText");const _e={intro:tt,section:rt};function at(e,t){return t!==!0?_e:{..._e,intro:e.length===0?ot:nt}}r(at,"baselineRenderStyle");function dt(e){const{change:t,file:n}=e;return t.action==="set"?ct(n):t.action==="remove"?`Instructions removed: ${t.path}
5
5
 
6
6
  The previously loaded instructions from this file no longer apply.`:[`Updated instructions from: ${t.path}`,"","This file changed after it was loaded. Use the following content instead of the previously loaded instructions from this file.","",n.content].join(`
7
- `)}r(dt,"changedSectionText");function ut(e,t){const n=new Map(e.map(i=>[i.file.absolutePath,i])),o=je(e.map(i=>i.file),t,{intro:"",section(i){const u=n.get(i.absolutePath);return u===void 0?"":dt({...u,file:i})}}),s=new Set(o.represented.map(i=>i.absolutePath));return{text:o.text,changes:e.filter(i=>s.has(i.file.absolutePath)).map(i=>i.change)}}r(ut,"renderInstructionChanges");function Ne(e,t,n){if(t.length===0&&n.length===0)return"";const o=[];return t.length>0&&o.push(`omitted ${t.map(s=>s.displayPath).join(", ")}`),n.length>0&&o.push(`truncated ${n.map(s=>`${s.displayPath} from ${s.originalBytes} to ${s.includedBytes} bytes`).join(", ")}`),`Workspace instruction budget ${e} bytes: ${o.join("; ")}`}r(Ne,"markerText");function Q(e,t,n,o,s){return[et,re([Ne(t,n,o),s.intro,...e.map(i=>s.section(i))].filter(i=>i.length>0).join(`
7
+ `)}r(dt,"changedSectionText");function ut(e,t){const n=new Map(e.map(i=>[i.file.absolutePath,i])),o=je(e.map(i=>i.file),t,{intro:"",section(i){const d=n.get(i.absolutePath);return d===void 0?"":dt({...d,file:i})}}),s=new Set(o.represented.map(i=>i.absolutePath));return{text:o.text,changes:e.filter(i=>s.has(i.file.absolutePath)).map(i=>i.change)}}r(ut,"renderInstructionChanges");function Ne(e,t,n){if(t.length===0&&n.length===0)return"";const o=[];return t.length>0&&o.push(`omitted ${t.map(s=>s.displayPath).join(", ")}`),n.length>0&&o.push(`truncated ${n.map(s=>`${s.displayPath} from ${s.originalBytes} to ${s.includedBytes} bytes`).join(", ")}`),`Workspace instruction budget ${e} bytes: ${o.join("; ")}`}r(Ne,"markerText");function Q(e,t,n,o,s){const i=[Ne(t,n,o),s.intro,...e.map(d=>s.section(d))].filter(d=>d.length>0);return[et,re(i.join(`
8
8
 
9
9
  `)),Be].join(`
10
- `)}r(Q,"buildInstructionText");function de(e,t){return{...e,content:Re(e.content,t)}}r(de,"withTruncatedContent");function lt(e,t,n,o,s){const i=M(e.content);let u=0,f=i,h=de(e,0);for(;u<=f;){const y=Math.floor((u+f)/2),b=de(e,y),P=[{displayPath:e.displayPath,originalBytes:i,includedBytes:M(b.content)}];M(Q([...t,b],n,o,P,s))<=n?(h=b,u=y+1):f=y-1}return h}r(lt,"truncateToFit");function je(e,t,n){if(t<=0||!Number.isFinite(t))return{text:"",omitted:e,truncated:[],represented:[]};const o=Q(e,t,[],[],n);if(M(o)<=t)return{text:o,omitted:[],truncated:[],represented:e};for(let b=1;b<e.length;b+=1){const P=e.slice(b),T=e.slice(0,b).map(E=>({absolutePath:E.absolutePath,displayPath:E.displayPath})),S=Q(P,t,T,[],n);if(M(S)<=t)return{text:S,omitted:T,truncated:[],represented:P}}const s=e.at(-1);if(s===void 0)return{text:"",omitted:[],truncated:[],represented:[]};const i=e.slice(0,-1).map(b=>({absolutePath:b.absolutePath,displayPath:b.displayPath})),u=M(s.content);for(const b of[n,{...n,intro:st}]){const P=lt(s,[],t,i,b),T=M(P.content),S=[{displayPath:s.displayPath,originalBytes:u,includedBytes:T}],E=Q([P],t,i,S,b);if(M(E)<=t)return{text:E,omitted:i,truncated:S,represented:T>0||u===0?[s]:[]}}const f=[{displayPath:s.displayPath,originalBytes:u,includedBytes:0}],h=re(Ne(t,i,f)),y=re([h,n.section(de(s,0))].join(`
10
+ `)}r(Q,"buildInstructionText");function de(e,t){return{...e,content:Re(e.content,t)}}r(de,"withTruncatedContent");function lt(e,t,n,o,s){const i=M(e.content);let d=0,v=i,p=de(e,0);for(;d<=v;){const b=Math.floor((d+v)/2),h=de(e,b),P=[{displayPath:e.displayPath,originalBytes:i,includedBytes:M(h.content)}];M(Q([...t,h],n,o,P,s))<=n?(p=h,d=b+1):v=b-1}return p}r(lt,"truncateToFit");function je(e,t,n){if(t<=0||!Number.isFinite(t))return{text:"",omitted:e,truncated:[],represented:[]};const o=Q(e,t,[],[],n);if(M(o)<=t)return{text:o,omitted:[],truncated:[],represented:e};for(let h=1;h<e.length;h+=1){const P=e.slice(h),T=e.slice(0,h).map(E=>({absolutePath:E.absolutePath,displayPath:E.displayPath})),S=Q(P,t,T,[],n);if(M(S)<=t)return{text:S,omitted:T,truncated:[],represented:P}}const s=e.at(-1);if(s===void 0)return{text:"",omitted:[],truncated:[],represented:[]};const i=e.slice(0,-1).map(h=>({absolutePath:h.absolutePath,displayPath:h.displayPath})),d=M(s.content);for(const h of[n,{...n,intro:st}]){const P=lt(s,[],t,i,h),T=M(P.content),S=[{displayPath:s.displayPath,originalBytes:d,includedBytes:T}],E=Q([P],t,i,S,h);if(M(E)<=t)return{text:E,omitted:i,truncated:S,represented:T>0||d===0?[s]:[]}}const v=[{displayPath:s.displayPath,originalBytes:d,includedBytes:0}],p=re(Ne(t,i,v)),b=re([p,n.section(de(s,0))].join(`
11
11
 
12
- `));return M(y)<=t?{text:y,omitted:i,truncated:f,represented:u===0?[s]:[]}:{text:M(h)<=t?h:Re(h,t),omitted:i,truncated:f,represented:[]}}r(je,"renderInstructionContext");function ue(e,t){const n=at(e,t.replacePreviousBaseline),{represented:o,...s}=je(e,t.maxBytes,n);return{rendered:s,included:o}}r(ue,"renderWorkspaceInstructionSet");function ft(e,t){return ue(e,t).rendered}r(ft,"renderWorkspaceContext");function le(e){return e===void 0?void 0:{signal:e}}r(le,"signalOptions");function pt(e){return e instanceof Error&&"code"in e&&(e.code==="ENOENT"||e.code==="ENOTDIR")}r(pt,"isMissingPathError");async function ht(e,t){try{t?.throwIfAborted();const n=await Pe(e);return t?.throwIfAborted(),n.isFile()?{kind:"present",info:{size:n.size}}:{kind:"absent"}}catch(n){return t?.throwIfAborted(),pt(n)?{kind:"absent"}:{kind:"unavailable"}}}r(ht,"nodeStatFile");async function vt(e,t,n){try{const o=await t.resolve(e,le(n));n?.throwIfAborted();const s=await t.stat(o,n);return n?.throwIfAborted(),s?.type!=="file"?{kind:"absent"}:{kind:"present",info:{target:o,version:s.version,...s.size===void 0?{}:{size:s.size}}}}catch{return n?.throwIfAborted(),{kind:"unavailable"}}}r(vt,"fsStatFile");async function Oe(e,t,n){return t===void 0?ht(e,n):vt(e,t,n)}r(Oe,"statFile");async function mt(e,t,n){if(t!==void 0)try{const o=await t.resolve(e,le(n));return await t.stat(o,n)!==void 0}catch{return n?.throwIfAborted(),!1}try{return n?.throwIfAborted(),await Pe(e),n?.throwIfAborted(),!0}catch{return n?.throwIfAborted(),!1}}r(mt,"existsAsMarker");async function fe(e,t,n,o){let s=j(e);for(;;){for(const u of t)if(await mt(G(s,u),n,o))return s;const i=z(s);if(i===s)return j(e);s=i}}r(fe,"findProjectRoot");function pe(e,t){const n=[];let o=j(t);const s=j(e);for(;o!==s;){n.push(o);const i=z(o);if(i===o)break;o=i}return n.push(s),n.reverse()}r(pe,"ancestorChain");function yt(e,t){const n=j(e),o=z(Se(t)?j(t):j(n,t)),s=ne(n,o);return s.length===0||s.startsWith("..")||Se(s)?[]:pe(n,o).slice(1)}r(yt,"descendantDirsBetween");function he(e,t){return ne(e,t)}r(he,"relativeDisplay");async function bt(e,t,n,o,s){const i=[];for(const u of n){const f=G(e,u),h=await Oe(f,o,s);switch(h.kind){case"present":i.push({absolutePath:f,displayPath:he(t,f),...h.info});continue;case"absent":case"unavailable":continue;default:we(h,"StatFileProbe")}}return i}r(bt,"allExistingInstructionFiles");async function De(e,t){const n=Ae(e),o=[],s=new Set,i=r(b=>{s.has(b.absolutePath)||(s.add(b.absolutePath),o.push(b))},"addFile"),u=G(n.dshHome,ce),f=await Oe(u,t,e.signal);switch(f.kind){case"present":i({absolutePath:u,displayPath:$e(n.dshHome),...f.info});break;case"absent":case"unavailable":break;default:we(f,"StatFileProbe")}const h=j(e.cwd),y=e.projectRoot??await fe(h,n.projectRootMarkers,t,e.signal);for(const b of pe(y,h))for(const P of[n.instructionFileCandidates,n.localInstructionFileCandidates])for(const T of await bt(b,y,P,t,e.signal))i(T);return o}r(De,"discoverInstructionFiles");async function gt(e){return(await De(e)).map(({absolutePath:t,displayPath:n})=>({absolutePath:t,displayPath:n}))}r(gt,"discoverBaselineInstructionFiles");async function*wt(e,t){const n=Ye(e,{encoding:"utf8",signal:t});for await(const o of n)yield String(o)}r(wt,"nodeTextChunks");async function Le(e,t,n,o){if(o?.throwIfAborted(),!(e.size!==void 0&&e.size>t))try{const s=n===void 0||e.target===void 0?wt(e.absolutePath,o):await n.streamText(e.target,o),i=[];let u=0;for await(const f of s){if(o?.throwIfAborted(),u+=Buffer.byteLength(f,"utf8"),u>t)return;i.push(f)}return o?.throwIfAborted(),i.join("")}catch{o?.throwIfAborted();return}}r(Le,"readBounded");function St(e){const t=new Map,n=[];for(const o of e){const s=z(o.displayPath);let i=t.get(s);i===void 0&&(i=new Set,t.set(s,i));const u=se(o.content);i.has(u)||(i.add(u),n.push(o))}return n}r(St,"dedupInstructionFilesByDirectory");async function Pt(e,t){return(await Ue(e,t))?.rendered}r(Pt,"loadBaselineInstructions");async function Ue(e,t){const n=Ce(e);if(n.maxBytes<=0||!Number.isFinite(n.maxBytes)||n.maxSourceBytes<=0||!Number.isFinite(n.maxSourceBytes))return;const o=await De(e,t),s=[];for(const h of o){const y=await Le(h,n.maxSourceBytes,t,e.signal);y!==void 0&&s.push({absolutePath:h.absolutePath,displayPath:h.displayPath,content:y,...h.version===void 0?{}:{version:h.version}})}const i=St(s);if(i.length===0){if(e.replacePreviousBaseline!==!0)return;const{rendered:h,included:y}=ue([],{maxBytes:n.maxBytes,replacePreviousBaseline:!0});return{rendered:h,observed:[],included:y}}const{rendered:u,included:f}=ue(i,{maxBytes:n.maxBytes,...e.replacePreviousBaseline===void 0?{}:{replacePreviousBaseline:e.replacePreviousBaseline}});return{rendered:u,observed:s,included:f}}r(Ue,"loadBaselineInstructionSet");async function kt(e,t,n,o,s){const{directory:i,candidateName:u}=ae(e),f=G(i==="user-global"?n.dshHome:i==="."?t:G(t,i),u);let h,y;try{h=await o.resolve(f,le(s)),y=await o.stat(h,s)}catch{return s?.throwIfAborted(),{kind:"unavailable"}}return y?.type!=="file"?{kind:"absent"}:{kind:"present",file:{absolutePath:f,displayPath:i==="user-global"?$e(n.dshHome):he(t,f),target:h,version:y.version,...y.size===void 0?{}:{size:y.size}}}}r(kt,"probeScopeInstruction");async function It(e,t,n,o){const s=await Le(e,t,n,o);if(s!==void 0)return{absolutePath:e.absolutePath,displayPath:e.displayPath,content:s,version:e.version}}r(It,"readScopeInstruction");function $e(e){return`${qe(e)}/AGENTS.md`}r($e,"userGlobalDisplayPath");const He="agent-instructions";function Tt(e,t){return J({content:[{type:"text",text:e}],source:{kind:"agent-instructions",form:"instructions",changes:t}})}r(Tt,"workspaceContextHook");function Et(e){return J({content:[{type:"text",text:e}],source:{kind:"plugin",plugin:He}})}r(Et,"workspaceContextMessage");function ve(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="agent-instructions"&&"changes"in e&&Array.isArray(e.changes)}r(ve,"isWorkspaceContextSource");function Ct(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}r(Ct,"isRecord");function me(e){const t=[];for(const n of e.changes)Ct(n)&&(n.action!=="set"&&n.action!=="replace"&&n.action!=="remove"||typeof n.scope!="string"||typeof n.path!="string"||n.digest!==void 0&&typeof n.digest!="string"||t.push({action:n.action,scope:n.scope,path:n.path,...n.digest!==void 0?{digest:n.digest}:{}}));return t}r(me,"workspaceInstructionChanges");function At(e,t){return e.action===t.action&&e.scope===t.scope&&e.path===t.path&&e.digest===t.digest}r(At,"sameInstructionChange");function xt(e,t){const n=new Set(e.session.surface.nodes),o=new Map;for(const[s,i]of e.session.events.entries()){if(i.type!=="user/message"||!ve(i.data.source))continue;const u=me(i.data.source);for(const f of u)n.has(s)&&o.set(f.scope,f)}for(const s of t)if(ve(s.source))for(const i of me(s.source))o.set(i.scope,i);return o}r(xt,"visibleInstructionChanges");function We(e){const t=new Map,n=new Map;for(const o of e){const s=oe(o.content),i={action:"set",scope:it(o.displayPath),path:o.displayPath,digest:s};t.set(i.scope,i),o.version!==void 0&&n.set(i.scope,{path:o.displayPath,version:o.version,digest:s,trimmedDigest:se(o.content)})}return{changes:t,versions:n}}r(We,"baselineInstructionState");function ze(e,t){let n=t.get(e);return n===void 0&&(n=new Map,t.set(e,n)),n}r(ze,"versionStatesFor");function Bt(e,t){return e.filter(n=>t.some(o=>At(n.change,o)))}r(Bt,"retainedInstructionVersionUpdates");function Rt(e,t,n){if(t.length===0)return;const o=ze(e,n);for(const s of t)s.state===void 0?o.delete(s.change.scope):o.set(s.change.scope,s.state);o.size===0&&n.delete(e)}r(Rt,"applyInstructionVersionUpdates");function Mt(e,t){const n=he(e,t);return n.length===0?".":n}r(Mt,"relativeScope");async function Ft(e,t,n,o,s){const i=e.session,u=xt(e,s.authorityMessages),f=i.header.cwd??process.cwd(),h=s.projectRoot??await fe(f,t.projectRootMarkers,o,s.signal),y=new Set,b=new Set,P=r((a,m)=>{for(const d of t.instructionFileCandidates)a.add(K(m,d));for(const d of t.localInstructionFileCandidates)a.add(K(m,d))},"addDirScopes"),T=r((a,m)=>{P(a,Mt(h,m))},"addProjectScopes");b.add(K(ie,ce));for(const a of pe(h,f))T(b,a);if(s.includeBaselineScopes)for(const a of b)y.add(a);for(const a of s.scopeMessages)if(ve(a.source))for(const m of me(a.source))!s.includeBaselineScopes&&b.has(m.scope)||y.add(m.scope);for(const a of u.keys()){if(!s.includeBaselineScopes&&b.has(a))continue;const{directory:m}=ae(a);m==="user-global"?y.add(K(ie,ce)):P(y,m)}for(const a of s.touchedPaths)for(const m of yt(f,a))T(y,m);const S=ze(i,n),E=new Set,$=new Map,q=r((a,m)=>{let d=$.get(a);return d===void 0&&(d=new Set,$.set(a,d)),d.has(m)?!0:(d.add(m),!1)},"registerKeptTrimmed"),c=[],p=[],l=r((a,m)=>{const d={action:"remove",scope:a,path:m};c.push({change:d,file:{absolutePath:`removed:${a}`,displayPath:m,content:""}}),p.push({change:d})},"pushRemoval"),v=new Map;for(const a of y){const{directory:m}=ae(a),d=v.get(m);d===void 0?v.set(m,[a]):d.push(a)}for(const[a,m]of v){const d=[];for(const w of m)if(s.excludedBaselineScopes!==void 0&&b.has(w)&&s.excludedBaselineScopes.has(w)){const g=u.get(w);g===void 0||g.action==="remove"?S.delete(w):l(w,g.path)}else d.push(w);const x=c.length,C=p.length,D=[],H=new Map(d.map(w=>[w,S.get(w)]));for(const w of d){const g=u.get(w),L=await kt(w,h,t,o,s.signal);if(L.kind==="unavailable"){if(g===void 0||g.action==="remove")continue;c.splice(x),p.splice(C);for(const[B,V]of H)V===void 0?S.delete(B):S.set(B,V);for(const B of D)E.delete(B);$.delete(a);break}if(L.kind==="absent"){g===void 0||g.action==="remove"?S.delete(w):l(w,g.path);continue}const{file:I}=L;if(E.has(I.absolutePath))continue;E.add(I.absolutePath),D.push(I.absolutePath);const F=S.get(w);if(F!==void 0&&F.path===I.displayPath&&F.version===I.version&&g!==void 0&&g.action!=="remove"&&g.path===F.path&&g.digest===F.digest){q(a,F.trimmedDigest)&&l(w,g.path);continue}const A=await It(I,t.maxSourceBytes,o,s.signal);if(A===void 0)continue;const O=oe(A.content),_=se(A.content);if(q(a,_)){g!==void 0&&g.action!=="remove"?l(w,g.path):S.delete(w);continue}const W={path:A.displayPath,version:I.version,digest:O,trimmedDigest:_};if(g!==void 0&&g.action!=="remove"&&g.path===A.displayPath&&g.digest===O){S.set(w,W);continue}const N={action:g===void 0||g.action==="remove"?"set":"replace",scope:w,path:A.displayPath,digest:O};c.push({change:N,file:A}),p.push({change:N,state:W})}}if(c.length===0)return;const k=ut(c,t.maxBytes);if(!(k.text.length===0||k.changes.length===0))return{context:Tt(k.text,k.changes),versionUpdates:Bt(p,k.changes)}}r(Ft,"reconcileInstructionContext");function _t(e,t){for(const n of t.toReversed())if(n.source.kind==="agent-instructions"&&n.source.baseline===!0)return n.source;for(const n of e.session.surface.nodes.toReversed()){const o=e.session.events[n];if(o?.type==="user/message"&&o.data.source.kind==="agent-instructions"&&o.data.source.baseline===!0)return o.data.source}}r(_t,"visibleBaselineSource");function ye(e){return e.source.kind==="agent-instructions"}r(ye,"isWorkspaceContext");function Z(e,t){return ge(e.content,t.content)&&ge(e.source,t.source)}r(Z,"sameContextPayload");const Nt=new Set(["read","write","edit"]);function jt(e){if(!Nt.has(e.name)||typeof e.arguments!="object"||e.arguments===null||!("file_path"in e.arguments)||typeof e.arguments.file_path!="string")return;const t=e.arguments.file_path.trim();return t.length>0?t:void 0}r(jt,"filePathFromExecution");function Ot(e,t){const n=Ce(t),o=new WeakMap,s=new WeakMap,i=new AbortController,u=new Map;e.effect(()=>()=>{i.abort(new Error("agent-instructions disposed")),u.clear()},"agent-instructions.projectionLifecycle");const f=new WeakMap,h=new WeakMap,y=new WeakMap,b=r(async(c,p,l,v,k=[])=>{if(p.throwIfAborted(),n.maxBytes<=0||!Number.isFinite(n.maxBytes))return;const a=e.get("fs");if(a===void 0)return;if(k.length===0&&v.length>0)return v[0];const m=[],d=[];let x=!1;const C=[...l],D=c.session.header.cwd??process.cwd(),H=await fe(D,n.projectRootMarkers,a,p),w=Ze(n,D,H),g=_t(c,C),L=g!==void 0,I=g?.baselineIdentity===w,F=s.get(c.session);let A=I&&F?.identity===w?F.excludedScopes:void 0,O;if(!L||!I||A===void 0){const W=L&&!I,N=await Ue({cwd:D,dshHome:n.dshHome,projectRootMarkers:n.projectRootMarkers,maxBytes:n.maxBytes,maxSourceBytes:n.maxSourceBytes,instructionFileCandidates:n.instructionFileCandidates,localInstructionFileCandidates:n.localInstructionFileCandidates,projectRoot:H,replacePreviousBaseline:W,signal:p},a),B=We(N?.included??[]),V=We(N?.observed??[]),ee=new Set(V.changes.keys());for(const U of B.changes.keys())ee.delete(U);A=ee,O={identity:w,excludedScopes:ee};let Y=o.get(c.session);Y===void 0&&B.versions.size>0&&(Y=new Map,o.set(c.session,Y));for(const[U,te]of B.versions)Y?.set(U,te);if(!I&&N!==void 0&&N.rendered.text.length>0){const U=Et(N.rendered.text).content;m.push(...U);const te=new Set(B.changes.keys()),be=[...W?g.changes.flatMap(X=>X.action==="remove"||te.has(X.scope)?[]:[{action:"remove",scope:X.scope,path:X.path}]):[],...B.changes.values()];d.push(...be),C.push(J({content:U,source:{kind:"agent-instructions",form:"instructions",baseline:!0,baselineIdentity:w,changes:be}})),x=!0}}const _=await Ft(c,n,o,a,{authorityMessages:C,scopeMessages:v,includeBaselineScopes:I,...I?{excludedBaselineScopes:A}:{},touchedPaths:k,projectRoot:H,signal:p});if(_!==void 0&&(m.push(..._.context.content),_.context.source.kind==="agent-instructions"&&d.push(..._.context.source.changes),Rt(c.session,_.versionUpdates,o)),O!==void 0&&s.set(c.session,O),m.length!==0)return J({content:m,source:{kind:"agent-instructions",form:"instructions",...x?{baseline:!0}:{},...x?{baselineIdentity:w}:{},changes:d}})},"compose"),P=r((c,p,l)=>{const v=c.inbox.nextStep.filter(ye),k=l!==void 0&&(p.some(d=>Z(d,l))||c.session.surface.nodes.some(d=>{const x=c.session.events[d];return x?.type==="user/message"&&Z(x.data,l)}));if(l===void 0||k){for(const d of v)c.inbox.remove(d.id);return}const a=v.find(d=>Z(d,l));if(a!==void 0){for(const d of v)d!==a&&c.inbox.remove(d.id);return}const m=v[0];m===void 0?c.inbox.prepend("next-step",l):c.inbox.replace(m.id,l);for(const d of v.slice(1))c.inbox.remove(d.id)},"syncInbox"),T=r(async(c,p,l,v=[])=>{const k=await b(c,p,l,c.inbox.nextStep.filter(ye),v);p.throwIfAborted(),P(c,l,k)},"composeAndSync"),S=r((c,p)=>{const l=(f.get(c)??Promise.resolve()).then(()=>T(c,i.signal,[],[p])).catch(v=>{i.signal.aborted||e.logger.warn("workspace instruction refresh failed: %o",v)});f.set(c,l),l.then(()=>{f.get(c)===l&&f.delete(c)})},"queueProjection"),E=r(async c=>{let p;for(;(p=f.get(c))!==void 0;)await p},"waitForProjections"),$=r(c=>{const p=h.get(c);if(p!==void 0)return p;let l=!1;for(const v of c.events)v.type==="step/start"?l=!0:(v.type==="step/end"||v.type==="turn/end")&&(l=!1);return h.set(c,l),l},"stepIsOpen"),q=r(c=>{const p=c.agent.session;if(!$(p)){S(c.agent,c.path);return}const l=y.get(p);l===void 0?y.set(p,[c]):l.push(c)},"projectTouch");e.on("session/event",(c,p)=>{if(p.type==="step/start"){h.set(c,!0);return}if(p.type==="turn/end"){h.set(c,!1);return}if(p.type!=="step/end")return;h.set(c,!1);const l=y.get(c);if(l!==void 0){y.delete(c);for(const v of l)S(v.agent,v.path)}}),e.on("agent/pre-step",async({agent:c,messages:p,step:l,signal:v},k)=>{const a=await k();await E(c);const m=c.inbox.nextStep.filter(ye),d=await b(c,v,p,m);if(v.throwIfAborted(),a.kind==="reject"||l===1&&a.messages.length===0)return P(c,p,d),a;for(const C of m)c.inbox.remove(C.id);if(d===void 0||a.messages.some(C=>Z(C,d)))return a;const x=a.messages.findLastIndex(C=>p.includes(C));return{kind:"enter",messages:a.messages.toSpliced(x+1,0,d)}}),e.on("tools/result",(c,p)=>{const l=u.get(c.token)??[];if(u.delete(c.token),!p.isError&&c.agent!==void 0&&!c.signal.aborted){const v=jt(c);v!==void 0&&l.push({agent:c.agent,path:v})}if(c.parent!==void 0){if(l.length>0){const v=u.get(c.parent);v===void 0?u.set(c.parent,l):v.push(...l)}return}for(const v of l)q(v)})}r(Ot,"apply");export{Qe as Config,Ot as apply,gt as discoverBaselineInstructionFiles,Pt as loadBaselineInstructions,He as name,ft as renderWorkspaceContext};
12
+ `));return M(b)<=t?{text:b,omitted:i,truncated:v,represented:d===0?[s]:[]}:{text:M(p)<=t?p:Re(p,t),omitted:i,truncated:v,represented:[]}}r(je,"renderInstructionContext");function ue(e,t){const n=at(e,t.replacePreviousBaseline),{represented:o,...s}=je(e,t.maxBytes,n);return{rendered:s,included:o}}r(ue,"renderWorkspaceInstructionSet");function ft(e,t){return ue(e,t).rendered}r(ft,"renderWorkspaceContext");function le(e){return e===void 0?void 0:{signal:e}}r(le,"signalOptions");function pt(e){return e instanceof Error&&"code"in e&&(e.code==="ENOENT"||e.code==="ENOTDIR")}r(pt,"isMissingPathError");async function ht(e,t){try{t?.throwIfAborted();const n=await Pe(e);return t?.throwIfAborted(),n.isFile()?{kind:"present",info:{size:n.size}}:{kind:"absent"}}catch(n){return t?.throwIfAborted(),pt(n)?{kind:"absent"}:{kind:"unavailable"}}}r(ht,"nodeStatFile");async function vt(e,t,n){try{const o=await t.resolve(e,le(n));n?.throwIfAborted();const s=await t.stat(o,n);return n?.throwIfAborted(),s?.type!=="file"?{kind:"absent"}:{kind:"present",info:{target:o,version:s.version,...s.size===void 0?{}:{size:s.size}}}}catch{return n?.throwIfAborted(),{kind:"unavailable"}}}r(vt,"fsStatFile");async function Oe(e,t,n){return t===void 0?ht(e,n):vt(e,t,n)}r(Oe,"statFile");async function mt(e,t,n){if(t!==void 0)try{const o=await t.resolve(e,le(n));return await t.stat(o,n)!==void 0}catch{return n?.throwIfAborted(),!1}try{return n?.throwIfAborted(),await Pe(e),n?.throwIfAborted(),!0}catch{return n?.throwIfAborted(),!1}}r(mt,"existsAsMarker");async function fe(e,t,n,o){let s=j(e);for(;;){for(const d of t)if(await mt(G(s,d),n,o))return s;const i=z(s);if(i===s)return j(e);s=i}}r(fe,"findProjectRoot");function pe(e,t){const n=[];let o=j(t);const s=j(e);for(;o!==s;){n.push(o);const i=z(o);if(i===o)break;o=i}return n.push(s),n.reverse()}r(pe,"ancestorChain");function yt(e,t){const n=j(e),o=Se(t)?j(t):j(n,t),s=z(o),i=ne(n,s);return i.length===0||i.startsWith("..")||Se(i)?[]:pe(n,s).slice(1)}r(yt,"descendantDirsBetween");function he(e,t){return ne(e,t)}r(he,"relativeDisplay");async function bt(e,t,n,o,s){const i=[];for(const d of n){const v=G(e,d),p=await Oe(v,o,s);switch(p.kind){case"present":i.push({absolutePath:v,displayPath:he(t,v),...p.info});continue;case"absent":case"unavailable":continue;default:we(p,"StatFileProbe")}}return i}r(bt,"allExistingInstructionFiles");async function De(e,t){const n=Ae(e),o=[],s=new Set,i=r(h=>{s.has(h.absolutePath)||(s.add(h.absolutePath),o.push(h))},"addFile"),d=G(n.dshHome,ce),v=await Oe(d,t,e.signal);switch(v.kind){case"present":i({absolutePath:d,displayPath:$e(n.dshHome),...v.info});break;case"absent":case"unavailable":break;default:we(v,"StatFileProbe")}const p=j(e.cwd),b=e.projectRoot??await fe(p,n.projectRootMarkers,t,e.signal);for(const h of pe(b,p))for(const P of[n.instructionFileCandidates,n.localInstructionFileCandidates])for(const T of await bt(h,b,P,t,e.signal))i(T);return o}r(De,"discoverInstructionFiles");async function gt(e){return(await De(e)).map(({absolutePath:t,displayPath:n})=>({absolutePath:t,displayPath:n}))}r(gt,"discoverBaselineInstructionFiles");async function*wt(e,t){const n=Ye(e,{encoding:"utf8",signal:t});for await(const o of n)yield String(o)}r(wt,"nodeTextChunks");async function Le(e,t,n,o){if(o?.throwIfAborted(),!(e.size!==void 0&&e.size>t))try{const s=n===void 0||e.target===void 0?wt(e.absolutePath,o):await n.streamText(e.target,o),i=[];let d=0;for await(const v of s){if(o?.throwIfAborted(),d+=Buffer.byteLength(v,"utf8"),d>t)return;i.push(v)}return o?.throwIfAborted(),i.join("")}catch{o?.throwIfAborted();return}}r(Le,"readBounded");function St(e){const t=new Map,n=[];for(const o of e){const s=z(o.displayPath);let i=t.get(s);i===void 0&&(i=new Set,t.set(s,i));const d=se(o.content);i.has(d)||(i.add(d),n.push(o))}return n}r(St,"dedupInstructionFilesByDirectory");async function Pt(e,t){return(await Ue(e,t))?.rendered}r(Pt,"loadBaselineInstructions");async function Ue(e,t){const n=Ce(e);if(n.maxBytes<=0||!Number.isFinite(n.maxBytes)||n.maxSourceBytes<=0||!Number.isFinite(n.maxSourceBytes))return;const o=await De(e,t),s=[];for(const p of o){const b=await Le(p,n.maxSourceBytes,t,e.signal);b!==void 0&&s.push({absolutePath:p.absolutePath,displayPath:p.displayPath,content:b,...p.version===void 0?{}:{version:p.version}})}const i=St(s);if(i.length===0){if(e.replacePreviousBaseline!==!0)return;const{rendered:p,included:b}=ue([],{maxBytes:n.maxBytes,replacePreviousBaseline:!0});return{rendered:p,observed:[],included:b}}const{rendered:d,included:v}=ue(i,{maxBytes:n.maxBytes,...e.replacePreviousBaseline===void 0?{}:{replacePreviousBaseline:e.replacePreviousBaseline}});return{rendered:d,observed:s,included:v}}r(Ue,"loadBaselineInstructionSet");async function kt(e,t,n,o,s){const{directory:i,candidateName:d}=ae(e),v=i==="user-global"?n.dshHome:i==="."?t:G(t,i),p=G(v,d);let b,h;try{b=await o.resolve(p,le(s)),h=await o.stat(b,s)}catch{return s?.throwIfAborted(),{kind:"unavailable"}}return h?.type!=="file"?{kind:"absent"}:{kind:"present",file:{absolutePath:p,displayPath:i==="user-global"?$e(n.dshHome):he(t,p),target:b,version:h.version,...h.size===void 0?{}:{size:h.size}}}}r(kt,"probeScopeInstruction");async function It(e,t,n,o){const s=await Le(e,t,n,o);if(s!==void 0)return{absolutePath:e.absolutePath,displayPath:e.displayPath,content:s,version:e.version}}r(It,"readScopeInstruction");function $e(e){return`${qe(e)}/AGENTS.md`}r($e,"userGlobalDisplayPath");const He="agent-instructions";function Tt(e,t){return J({content:[{type:"text",text:e}],source:{kind:"agent-instructions",form:"instructions",changes:t}})}r(Tt,"workspaceContextHook");function Et(e){return J({content:[{type:"text",text:e}],source:{kind:"plugin",plugin:He}})}r(Et,"workspaceContextMessage");function ve(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="agent-instructions"&&"changes"in e&&Array.isArray(e.changes)}r(ve,"isWorkspaceContextSource");function Ct(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}r(Ct,"isRecord");function me(e){const t=[];for(const n of e.changes)Ct(n)&&(n.action!=="set"&&n.action!=="replace"&&n.action!=="remove"||typeof n.scope!="string"||typeof n.path!="string"||n.digest!==void 0&&typeof n.digest!="string"||t.push({action:n.action,scope:n.scope,path:n.path,...n.digest!==void 0?{digest:n.digest}:{}}));return t}r(me,"workspaceInstructionChanges");function At(e,t){return e.action===t.action&&e.scope===t.scope&&e.path===t.path&&e.digest===t.digest}r(At,"sameInstructionChange");function xt(e,t){const n=new Set(e.session.surface.nodes),o=new Map;for(const[s,i]of e.session.events.entries()){if(i.type!=="user/message"||!ve(i.data.source))continue;const d=me(i.data.source);for(const v of d)n.has(s)&&o.set(v.scope,v)}for(const s of t)if(ve(s.source))for(const i of me(s.source))o.set(i.scope,i);return o}r(xt,"visibleInstructionChanges");function We(e){const t=new Map,n=new Map;for(const o of e){const s=oe(o.content),i={action:"set",scope:it(o.displayPath),path:o.displayPath,digest:s};t.set(i.scope,i),o.version!==void 0&&n.set(i.scope,{path:o.displayPath,version:o.version,digest:s,trimmedDigest:se(o.content)})}return{changes:t,versions:n}}r(We,"baselineInstructionState");function ze(e,t){let n=t.get(e);return n===void 0&&(n=new Map,t.set(e,n)),n}r(ze,"versionStatesFor");function Bt(e,t){return e.filter(n=>t.some(o=>At(n.change,o)))}r(Bt,"retainedInstructionVersionUpdates");function Rt(e,t,n){if(t.length===0)return;const o=ze(e,n);for(const s of t)s.state===void 0?o.delete(s.change.scope):o.set(s.change.scope,s.state);o.size===0&&n.delete(e)}r(Rt,"applyInstructionVersionUpdates");function Mt(e,t){const n=he(e,t);return n.length===0?".":n}r(Mt,"relativeScope");async function Ft(e,t,n,o,s){const i=e.session,d=xt(e,s.authorityMessages),v=i.header.cwd??process.cwd(),p=s.projectRoot??await fe(v,t.projectRootMarkers,o,s.signal),b=new Set,h=new Set,P=r((a,y)=>{for(const u of t.instructionFileCandidates)a.add(K(y,u));for(const u of t.localInstructionFileCandidates)a.add(K(y,u))},"addDirScopes"),T=r((a,y)=>{P(a,Mt(p,y))},"addProjectScopes");h.add(K(ie,ce));for(const a of pe(p,v))T(h,a);if(s.includeBaselineScopes)for(const a of h)b.add(a);for(const a of s.scopeMessages)if(ve(a.source))for(const y of me(a.source))!s.includeBaselineScopes&&h.has(y.scope)||b.add(y.scope);for(const a of d.keys()){if(!s.includeBaselineScopes&&h.has(a))continue;const{directory:y}=ae(a);y==="user-global"?b.add(K(ie,ce)):P(b,y)}for(const a of s.touchedPaths)for(const y of yt(v,a))T(b,y);const S=ze(i,n),E=new Set,$=new Map,q=r((a,y)=>{let u=$.get(a);return u===void 0&&(u=new Set,$.set(a,u)),u.has(y)?!0:(u.add(y),!1)},"registerKeptTrimmed"),c=[],f=[],l=r((a,y)=>{const u={action:"remove",scope:a,path:y};c.push({change:u,file:{absolutePath:`removed:${a}`,displayPath:y,content:""}}),f.push({change:u})},"pushRemoval"),m=new Map;for(const a of b){const{directory:y}=ae(a),u=m.get(y);u===void 0?m.set(y,[a]):u.push(a)}for(const[a,y]of m){const u=[];for(const w of y)if(s.excludedBaselineScopes!==void 0&&h.has(w)&&s.excludedBaselineScopes.has(w)){const g=d.get(w);g===void 0||g.action==="remove"?S.delete(w):l(w,g.path)}else u.push(w);const x=c.length,C=f.length,D=[],H=new Map(u.map(w=>[w,S.get(w)]));for(const w of u){const g=d.get(w),L=await kt(w,p,t,o,s.signal);if(L.kind==="unavailable"){if(g===void 0||g.action==="remove")continue;c.splice(x),f.splice(C);for(const[B,V]of H)V===void 0?S.delete(B):S.set(B,V);for(const B of D)E.delete(B);$.delete(a);break}if(L.kind==="absent"){g===void 0||g.action==="remove"?S.delete(w):l(w,g.path);continue}const{file:I}=L;if(E.has(I.absolutePath))continue;E.add(I.absolutePath),D.push(I.absolutePath);const F=S.get(w);if(F!==void 0&&F.path===I.displayPath&&F.version===I.version&&g!==void 0&&g.action!=="remove"&&g.path===F.path&&g.digest===F.digest){q(a,F.trimmedDigest)&&l(w,g.path);continue}const A=await It(I,t.maxSourceBytes,o,s.signal);if(A===void 0)continue;const O=oe(A.content),_=se(A.content);if(q(a,_)){g!==void 0&&g.action!=="remove"?l(w,g.path):S.delete(w);continue}const W={path:A.displayPath,version:I.version,digest:O,trimmedDigest:_};if(g!==void 0&&g.action!=="remove"&&g.path===A.displayPath&&g.digest===O){S.set(w,W);continue}const N={action:g===void 0||g.action==="remove"?"set":"replace",scope:w,path:A.displayPath,digest:O};c.push({change:N,file:A}),f.push({change:N,state:W})}}if(c.length===0)return;const k=ut(c,t.maxBytes);if(!(k.text.length===0||k.changes.length===0))return{context:Tt(k.text,k.changes),versionUpdates:Bt(f,k.changes)}}r(Ft,"reconcileInstructionContext");function _t(e,t){for(const n of t.toReversed())if(n.source.kind==="agent-instructions"&&n.source.baseline===!0)return n.source;for(const n of e.session.surface.nodes.toReversed()){const o=e.session.events[n];if(o?.type==="user/message"&&o.data.source.kind==="agent-instructions"&&o.data.source.baseline===!0)return o.data.source}}r(_t,"visibleBaselineSource");function ye(e){return e.source.kind==="agent-instructions"}r(ye,"isWorkspaceContext");function Z(e,t){return ge(e.content,t.content)&&ge(e.source,t.source)}r(Z,"sameContextPayload");const Nt=new Set(["read","write","edit"]);function jt(e){if(!Nt.has(e.name)||typeof e.arguments!="object"||e.arguments===null||!("file_path"in e.arguments)||typeof e.arguments.file_path!="string")return;const t=e.arguments.file_path.trim();return t.length>0?t:void 0}r(jt,"filePathFromExecution");function Ot(e,t){const n=Ce(t),o=new WeakMap,s=new WeakMap,i=new AbortController,d=new Map;e.effect(()=>()=>{i.abort(new Error("agent-instructions disposed")),d.clear()},"agent-instructions.projectionLifecycle");const v=new WeakMap,p=new WeakMap,b=new WeakMap,h=r(async(c,f,l,m,k=[])=>{if(f.throwIfAborted(),n.maxBytes<=0||!Number.isFinite(n.maxBytes))return;const a=e.get("fs");if(a===void 0)return;if(k.length===0&&m.length>0)return m[0];const y=[],u=[];let x=!1;const C=[...l],D=c.session.header.cwd??process.cwd(),H=await fe(D,n.projectRootMarkers,a,f),w=Ze(n,D,H),g=_t(c,C),L=g!==void 0,I=g?.baselineIdentity===w,F=s.get(c.session);let A=I&&F?.identity===w?F.excludedScopes:void 0,O;if(!L||!I||A===void 0){const W=L&&!I,N=await Ue({cwd:D,dshHome:n.dshHome,projectRootMarkers:n.projectRootMarkers,maxBytes:n.maxBytes,maxSourceBytes:n.maxSourceBytes,instructionFileCandidates:n.instructionFileCandidates,localInstructionFileCandidates:n.localInstructionFileCandidates,projectRoot:H,replacePreviousBaseline:W,signal:f},a),B=We(N?.included??[]),V=We(N?.observed??[]),ee=new Set(V.changes.keys());for(const U of B.changes.keys())ee.delete(U);A=ee,O={identity:w,excludedScopes:ee};let Y=o.get(c.session);Y===void 0&&B.versions.size>0&&(Y=new Map,o.set(c.session,Y));for(const[U,te]of B.versions)Y?.set(U,te);if(!I&&N!==void 0&&N.rendered.text.length>0){const U=Et(N.rendered.text).content;y.push(...U);const te=new Set(B.changes.keys()),be=[...W?g.changes.flatMap(X=>X.action==="remove"||te.has(X.scope)?[]:[{action:"remove",scope:X.scope,path:X.path}]):[],...B.changes.values()];u.push(...be),C.push(J({content:U,source:{kind:"agent-instructions",form:"instructions",baseline:!0,baselineIdentity:w,changes:be}})),x=!0}}const _=await Ft(c,n,o,a,{authorityMessages:C,scopeMessages:m,includeBaselineScopes:I,...I?{excludedBaselineScopes:A}:{},touchedPaths:k,projectRoot:H,signal:f});if(_!==void 0&&(y.push(..._.context.content),_.context.source.kind==="agent-instructions"&&u.push(..._.context.source.changes),Rt(c.session,_.versionUpdates,o)),O!==void 0&&s.set(c.session,O),y.length!==0)return J({content:y,source:{kind:"agent-instructions",form:"instructions",...x?{baseline:!0}:{},...x?{baselineIdentity:w}:{},changes:u}})},"compose"),P=r((c,f,l)=>{const m=c.inbox.nextStep.filter(ye),k=l!==void 0&&(f.some(u=>Z(u,l))||c.session.surface.nodes.some(u=>{const x=c.session.events[u];return x?.type==="user/message"&&Z(x.data,l)}));if(l===void 0||k){for(const u of m)c.inbox.remove(u.id);return}const a=m.find(u=>Z(u,l));if(a!==void 0){for(const u of m)u!==a&&c.inbox.remove(u.id);return}const y=m[0];y===void 0?c.inbox.prepend("next-step",l):c.inbox.replace(y.id,l);for(const u of m.slice(1))c.inbox.remove(u.id)},"syncInbox"),T=r(async(c,f,l,m=[])=>{const k=c.inbox.nextStep.filter(ye),a=await h(c,f,l,k,m);f.throwIfAborted(),P(c,l,a)},"composeAndSync"),S=r((c,f)=>{const l=(v.get(c)??Promise.resolve()).then(()=>T(c,i.signal,[],[f])).catch(m=>{i.signal.aborted||e.logger.warn("workspace instruction refresh failed: %o",m)});v.set(c,l),l.then(()=>{v.get(c)===l&&v.delete(c)})},"queueProjection"),E=r(async c=>{let f;for(;(f=v.get(c))!==void 0;)await f},"waitForProjections"),$=r(c=>{const f=p.get(c);if(f!==void 0)return f;let l=!1;for(const m of c.events)m.type==="step/start"?l=!0:(m.type==="step/end"||m.type==="turn/end")&&(l=!1);return p.set(c,l),l},"stepIsOpen"),q=r(c=>{const f=c.agent.session;if(!$(f)){S(c.agent,c.path);return}const l=b.get(f);l===void 0?b.set(f,[c]):l.push(c)},"projectTouch");e.on("session/event",(c,f)=>{if(f.type==="step/start"){p.set(c,!0);return}if(f.type==="turn/end"){p.set(c,!1);return}if(f.type!=="step/end")return;p.set(c,!1);const l=b.get(c);if(l!==void 0){b.delete(c);for(const m of l)S(m.agent,m.path)}}),e.on("agent/pre-step",async({agent:c,messages:f,step:l,signal:m},k)=>{const a=await k();await E(c);const y=c.inbox.nextStep.filter(ye),u=await h(c,m,f,y);if(m.throwIfAborted(),a.kind==="reject"||l===1&&a.messages.length===0)return P(c,f,u),a;for(const C of y)c.inbox.remove(C.id);if(u===void 0||a.messages.some(C=>Z(C,u)))return a;const x=a.messages.findLastIndex(C=>f.includes(C));return{kind:"enter",messages:a.messages.toSpliced(x+1,0,u)}}),e.on("tools/result",(c,f)=>{const l=d.get(c.token)??[];if(d.delete(c.token),!f.isError&&c.agent!==void 0&&!c.signal.aborted){const m=jt(c);m!==void 0&&l.push({agent:c.agent,path:m})}if(c.parent!==void 0){if(l.length>0){const m=d.get(c.parent);m===void 0?d.set(c.parent,l):m.push(...l)}return}for(const m of l)q(m)})}r(Ot,"apply");export{Qe as Config,Ot as apply,gt as discoverBaselineInstructionFiles,Pt as loadBaselineInstructions,He as name,ft as renderWorkspaceContext};
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-agent-instructions","version":"0.0.11","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-agent":"^0.0.11","@deepseek-ai/dsh-invariants":"^0.0.11","@deepseek-ai/dsh-fs":"^0.0.11","@deepseek-ai/dsh-home-paths":"^0.0.11","@deepseek-ai/dsh-llm":"^0.0.11","@deepseek-ai/dsh-session":"^0.0.11","@deepseek-ai/dsh-tools":"^0.0.11","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-agent-instructions","version":"0.0.13","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-agent":"^0.0.13","@deepseek-ai/dsh-home-paths":"^0.0.13","@deepseek-ai/dsh-fs":"^0.0.13","@deepseek-ai/dsh-session":"^0.0.13","@deepseek-ai/dsh-invariants":"^0.0.13","@deepseek-ai/dsh-llm":"^0.0.13","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-tools":"^0.0.13"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-agent-loop","version":"0.0.11","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.11","@deepseek-ai/dsh-session":"^0.0.11","@deepseek-ai/dsh-tools":"^0.0.11","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-system-prompt":"^0.0.11","@deepseek-ai/dsh-session-persistence":"^0.0.11","@deepseek-ai/dsh-settings":"^0.0.11","@deepseek-ai/dsh-agent":"^0.0.11","@deepseek-ai/dsh-llm":"^0.0.11","@deepseek-ai/dsh-scope":"^0.0.11"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-agent-loop","version":"0.0.13","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-agent":"^0.0.13","@deepseek-ai/dsh-session":"^0.0.13","@deepseek-ai/dsh-invariants":"^0.0.13","@deepseek-ai/dsh-llm":"^0.0.13","@deepseek-ai/dsh-scope":"^0.0.13","@deepseek-ai/dsh-system-prompt":"^0.0.13","@deepseek-ai/dsh-session-persistence":"^0.0.13","@deepseek-ai/dsh-settings":"^0.0.13","@deepseek-ai/dsh-tools":"^0.0.13","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-agent-presets","version":"0.0.11","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/cordis-plugin-include":"^1.0.6","@deepseek-ai/dsh-agent":"^0.0.11","@deepseek-ai/cordis-plugin-loader":"^1.0.2","@deepseek-ai/dsh-atomic-write":"^0.0.11","@deepseek-ai/dsh-invariants":"^0.0.11","@deepseek-ai/dsh-home-paths":"^0.0.11","@deepseek-ai/dsh-session":"^0.0.11","@deepseek-ai/dsh-system-prompt":"^0.0.11","@deepseek-ai/dsh-scope":"^0.0.11","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-settings":"^0.0.11"},"dependencies":{"js-yaml":"^4.1.0","@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-agent-presets","version":"0.0.13","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/cordis-plugin-include":"^1.0.6","@deepseek-ai/cordis-plugin-loader":"^1.0.2","@deepseek-ai/dsh-agent":"^0.0.13","@deepseek-ai/dsh-invariants":"^0.0.13","@deepseek-ai/dsh-scope":"^0.0.13","@deepseek-ai/dsh-home-paths":"^0.0.13","@deepseek-ai/dsh-session":"^0.0.13","@deepseek-ai/dsh-settings":"^0.0.13","@deepseek-ai/dsh-atomic-write":"^0.0.13","@deepseek-ai/dsh-system-prompt":"^0.0.13","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"js-yaml":"^4.1.0","@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-agent-tool-presentation","version":"0.0.11","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-tools":"^0.0.11","@deepseek-ai/dsh-invariants":"^0.0.11","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-agent-tool-presentation","version":"0.0.13","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-tools":"^0.0.13","@deepseek-ai/dsh-invariants":"^0.0.13","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-anonymous-user-id","version":"0.0.11","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-brand":"^0.0.11","@deepseek-ai/dsh-invariants":"^0.0.11","@deepseek-ai/dsh-home-paths":"^0.0.11","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-anonymous-user-id","version":"0.0.13","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-brand":"^0.0.13","@deepseek-ai/dsh-invariants":"^0.0.13","@deepseek-ai/dsh-home-paths":"^0.0.13","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-api-gateway","version":"0.0.11","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"dsh":{"client":{"inject":["@deepseek-ai/dsh-typert-registry","@deepseek-ai/dsh-client-connection"],"platform":"web","immediately":true}},"license":"MIT","dependencies":{"@deepseek-ai/dsh-typert-protocol":"^0.0.11"},"peerDependencies":{"@deepseek-ai/dsh-client-connection":"^0.0.11","@deepseek-ai/dsh-invariants":"^0.0.11","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-typert-registry":"^0.0.11"}}
1
+ {"name":"@deepseek-ai/dsh-api-gateway","version":"0.0.13","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"dsh":{"client":{"inject":["@deepseek-ai/dsh-typert-registry","@deepseek-ai/dsh-client-connection"],"platform":"web","immediately":true}},"license":"MIT","dependencies":{"@deepseek-ai/dsh-typert-protocol":"^0.0.13"},"peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.13","@deepseek-ai/dsh-client-connection":"^0.0.13","@deepseek-ai/dsh-typert-registry":"^0.0.13","@deepseek-ai/cordis":"^4.0.1"}}