@qqbrowser/qbot-dsh 0.0.10 → 0.0.12

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 (307) 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/package.json +1 -1
  6. package/node_modules/@deepseek-ai/cordis-plugin-hmr/lib/index.js +2 -2
  7. package/node_modules/@deepseek-ai/cordis-plugin-hmr/package.json +1 -1
  8. package/node_modules/@deepseek-ai/dsh-agent/lib/index.js +1 -1
  9. package/node_modules/@deepseek-ai/dsh-agent/package.json +1 -1
  10. package/node_modules/@deepseek-ai/dsh-agent-default-model/package.json +1 -1
  11. package/node_modules/@deepseek-ai/dsh-agent-instructions/lib/index.js +3 -3
  12. package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +1 -1
  13. package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +1 -1
  14. package/node_modules/@deepseek-ai/dsh-agent-presets/package.json +1 -1
  15. package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/package.json +1 -1
  16. package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +1 -1
  17. package/node_modules/@deepseek-ai/dsh-api-gateway/package.json +1 -1
  18. package/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +2 -2
  19. package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +1 -1
  20. package/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +12 -12
  21. package/node_modules/@deepseek-ai/dsh-app-boot/package.json +1 -1
  22. package/node_modules/@deepseek-ai/dsh-atomic-write/package.json +1 -1
  23. package/node_modules/@deepseek-ai/dsh-attachment/package.json +1 -1
  24. package/node_modules/@deepseek-ai/dsh-attachment-local/lib/index.js +1 -1
  25. package/node_modules/@deepseek-ai/dsh-attachment-local/package.json +1 -1
  26. package/node_modules/@deepseek-ai/dsh-base/cordis.patch.yml +4 -4
  27. package/node_modules/@deepseek-ai/dsh-base/package.json +1 -1
  28. package/node_modules/@deepseek-ai/dsh-bash-local/lib/index.js +1 -1
  29. package/node_modules/@deepseek-ai/dsh-bash-local/package.json +1 -1
  30. package/node_modules/@deepseek-ai/dsh-bash-sandbox/package.json +1 -1
  31. package/node_modules/@deepseek-ai/dsh-brand/package.json +1 -1
  32. package/node_modules/@deepseek-ai/dsh-client-connection/lib/client.js +6 -6
  33. package/node_modules/@deepseek-ai/dsh-client-connection/lib/index.js +2 -2
  34. package/node_modules/@deepseek-ai/dsh-client-connection/package.json +1 -1
  35. package/node_modules/@deepseek-ai/dsh-client-hmr/lib/client.js +1 -1
  36. package/node_modules/@deepseek-ai/dsh-client-hmr/package.json +1 -1
  37. package/node_modules/@deepseek-ai/dsh-client-locale/lib/client.js +1 -1
  38. package/node_modules/@deepseek-ai/dsh-client-locale/package.json +1 -1
  39. package/node_modules/@deepseek-ai/dsh-client-modules/package.json +1 -1
  40. package/node_modules/@deepseek-ai/dsh-client-runtime/lib/client.js +2 -2
  41. package/node_modules/@deepseek-ai/dsh-client-runtime/package.json +1 -1
  42. package/node_modules/@deepseek-ai/dsh-client-schema-form/package.json +1 -1
  43. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +1 -1
  44. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/package.json +1 -1
  45. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +1 -1
  46. package/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +1 -1
  47. package/node_modules/@deepseek-ai/dsh-client-ui-commands/package.json +1 -1
  48. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +6 -6
  49. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +1 -1
  50. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/lib/client.js +1 -1
  51. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/package.json +1 -1
  52. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +1 -1
  53. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +1 -1
  54. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/lib/client.js +1 -1
  55. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/package.json +1 -1
  56. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-native/package.json +1 -1
  57. package/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +1 -1
  58. package/node_modules/@deepseek-ai/dsh-client-ui-goal/package.json +1 -1
  59. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/lib/client.js +1 -1
  60. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/package.json +1 -1
  61. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +1 -1
  62. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/package.json +1 -1
  63. package/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js +1 -1
  64. package/node_modules/@deepseek-ai/dsh-client-ui-layout/package.json +1 -1
  65. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/lib/client.js +1 -1
  66. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/package.json +1 -1
  67. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +1 -1
  68. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/package.json +1 -1
  69. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/lib/client.js +1 -1
  70. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/package.json +1 -1
  71. package/node_modules/@deepseek-ai/dsh-client-ui-plan/lib/client.js +1 -1
  72. package/node_modules/@deepseek-ai/dsh-client-ui-plan/package.json +1 -1
  73. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/index.js +11 -11
  74. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/package.json +1 -1
  75. package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +1 -1
  76. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +1 -1
  77. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +1 -1
  78. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +1 -1
  79. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +1 -1
  80. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +1 -1
  81. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +1 -1
  82. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/client.js +1 -1
  83. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +1 -1
  84. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
  85. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/package.json +1 -1
  86. package/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +1 -1
  87. package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +1 -1
  88. package/node_modules/@deepseek-ai/dsh-client-ui-slots/lib/index.js +1 -1
  89. package/node_modules/@deepseek-ai/dsh-client-ui-slots/package.json +1 -1
  90. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +1 -1
  91. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +1 -1
  92. package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +1 -1
  93. package/node_modules/@deepseek-ai/dsh-client-ui-theme/package.json +1 -1
  94. package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +1 -1
  95. package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +1 -1
  96. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +13 -13
  97. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/package.json +1 -1
  98. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +1 -1
  99. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/package.json +1 -1
  100. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +1 -1
  101. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/package.json +1 -1
  102. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +1 -1
  103. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +1 -1
  104. package/node_modules/@deepseek-ai/dsh-client-web/package.json +1 -1
  105. package/node_modules/@deepseek-ai/dsh-client-web-react/lib/index.js +1 -1
  106. package/node_modules/@deepseek-ai/dsh-client-web-react/package.json +1 -1
  107. package/node_modules/@deepseek-ai/dsh-cmdline/package.json +1 -1
  108. package/node_modules/@deepseek-ai/dsh-code-runtime/package.json +1 -1
  109. package/node_modules/@deepseek-ai/dsh-code-runtime-worker-thread/lib/index.js +2 -2
  110. package/node_modules/@deepseek-ai/dsh-code-runtime-worker-thread/lib/worker.cjs +4 -2
  111. package/node_modules/@deepseek-ai/dsh-code-runtime-worker-thread/package.json +1 -1
  112. package/node_modules/@deepseek-ai/dsh-command-compact/package.json +1 -1
  113. package/node_modules/@deepseek-ai/dsh-command-feedback/package.json +1 -1
  114. package/node_modules/@deepseek-ai/dsh-command-goal/package.json +1 -1
  115. package/node_modules/@deepseek-ai/dsh-commands/package.json +1 -1
  116. package/node_modules/@deepseek-ai/dsh-compaction/package.json +1 -1
  117. package/node_modules/@deepseek-ai/dsh-compaction-basic/lib/index.js +1 -1
  118. package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +1 -1
  119. package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/package.json +1 -1
  120. package/node_modules/@deepseek-ai/dsh-content-review/package.json +1 -1
  121. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/lib/client.js +7 -7
  122. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +1 -1
  123. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/package.json +1 -1
  124. package/node_modules/@deepseek-ai/dsh-credentials/package.json +1 -1
  125. package/node_modules/@deepseek-ai/dsh-credentials-local/package.json +1 -1
  126. package/node_modules/@deepseek-ai/dsh-fs/package.json +1 -1
  127. package/node_modules/@deepseek-ai/dsh-fs-local/lib/index.js +4 -4
  128. package/node_modules/@deepseek-ai/dsh-fs-local/package.json +1 -1
  129. package/node_modules/@deepseek-ai/dsh-fs-observation-policy/package.json +1 -1
  130. package/node_modules/@deepseek-ai/dsh-fs-sandbox/package.json +1 -1
  131. package/node_modules/@deepseek-ai/dsh-goal/package.json +1 -1
  132. package/node_modules/@deepseek-ai/dsh-goal-round-driver/package.json +1 -1
  133. package/node_modules/@deepseek-ai/dsh-headless/package.json +1 -1
  134. package/node_modules/@deepseek-ai/dsh-home-paths/lib/index.js +1 -1
  135. package/node_modules/@deepseek-ai/dsh-home-paths/package.json +1 -1
  136. package/node_modules/@deepseek-ai/dsh-home-quarantine-macos/lib/index.js +1 -1
  137. package/node_modules/@deepseek-ai/dsh-home-quarantine-macos/package.json +1 -1
  138. package/node_modules/@deepseek-ai/dsh-host-apiproxy/lib/index.js +4 -4
  139. package/node_modules/@deepseek-ai/dsh-host-apiproxy/package.json +1 -1
  140. package/node_modules/@deepseek-ai/dsh-host-directory-picker/package.json +1 -1
  141. package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/package.json +1 -1
  142. package/node_modules/@deepseek-ai/dsh-host-directory-picker-browse/package.json +1 -1
  143. package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/lib/worker.cjs +9 -7
  144. package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/package.json +1 -1
  145. package/node_modules/@deepseek-ai/dsh-host-frontend-static/package.json +1 -1
  146. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/package.json +1 -1
  147. package/node_modules/@deepseek-ai/dsh-host-webserver/package.json +1 -1
  148. package/node_modules/@deepseek-ai/dsh-invariants/package.json +1 -1
  149. package/node_modules/@deepseek-ai/dsh-jobs/package.json +1 -1
  150. package/node_modules/@deepseek-ai/dsh-jobs-local/package.json +1 -1
  151. package/node_modules/@deepseek-ai/dsh-launch-environment/package.json +1 -1
  152. package/node_modules/@deepseek-ai/dsh-llm/lib/invariant.js +1 -1
  153. package/node_modules/@deepseek-ai/dsh-llm/package.json +1 -1
  154. package/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js +1 -1
  155. package/node_modules/@deepseek-ai/dsh-llm-deepseek/package.json +1 -1
  156. package/node_modules/@deepseek-ai/dsh-llm-gateway-openai/lib/index.js +1 -1
  157. package/node_modules/@deepseek-ai/dsh-llm-gateway-openai/package.json +1 -1
  158. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +1 -1
  159. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +1 -1
  160. package/node_modules/@deepseek-ai/dsh-llm-retry/package.json +1 -1
  161. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/index.js +2 -2
  162. package/node_modules/@deepseek-ai/dsh-mcp-client/package.json +1 -1
  163. package/node_modules/@deepseek-ai/dsh-message-feedback/package.json +1 -1
  164. package/node_modules/@deepseek-ai/dsh-native-command/package.json +1 -1
  165. package/node_modules/@deepseek-ai/dsh-output-retention/lib/index.js +1 -1
  166. package/node_modules/@deepseek-ai/dsh-output-retention/package.json +1 -1
  167. package/node_modules/@deepseek-ai/dsh-permission-presets/lib/index.js +1 -1
  168. package/node_modules/@deepseek-ai/dsh-permission-presets/package.json +1 -1
  169. package/node_modules/@deepseek-ai/dsh-persona/package.json +1 -1
  170. package/node_modules/@deepseek-ai/dsh-plan-mode/package.json +1 -1
  171. package/node_modules/@deepseek-ai/dsh-pwsh-local/lib/index.js +1 -1
  172. package/node_modules/@deepseek-ai/dsh-pwsh-local/package.json +1 -1
  173. package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +1 -1
  174. package/node_modules/@deepseek-ai/dsh-qb-auth/lib/index.js +3 -3
  175. package/node_modules/@deepseek-ai/dsh-qb-auth/package.json +1 -1
  176. package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/package.json +1 -1
  177. package/node_modules/@deepseek-ai/dsh-sandbox/package.json +1 -1
  178. package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +1 -1
  179. package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +1 -1
  180. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/index.js +1 -1
  181. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/runner.js +1 -1
  182. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/types-D2_FQYSK.js +1 -0
  183. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/package.json +1 -1
  184. package/node_modules/@deepseek-ai/dsh-schedule/lib/index.js +1 -1
  185. package/node_modules/@deepseek-ai/dsh-schedule/package.json +1 -1
  186. package/node_modules/@deepseek-ai/dsh-scope/package.json +1 -1
  187. package/node_modules/@deepseek-ai/dsh-session/lib/index.js +1 -1
  188. package/node_modules/@deepseek-ai/dsh-session/lib/invariant.js +1 -1
  189. package/node_modules/@deepseek-ai/dsh-session/package.json +1 -1
  190. package/node_modules/@deepseek-ai/dsh-session-checkpoint-policy/package.json +1 -1
  191. package/node_modules/@deepseek-ai/dsh-session-log-export/lib/client.js +1 -1
  192. package/node_modules/@deepseek-ai/dsh-session-log-export/package.json +1 -1
  193. package/node_modules/@deepseek-ai/dsh-session-persistence/lib/index.js +1 -1
  194. package/node_modules/@deepseek-ai/dsh-session-persistence/package.json +1 -1
  195. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/index.js +1 -1
  196. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/package.json +1 -1
  197. package/node_modules/@deepseek-ai/dsh-session-projection/package.json +1 -1
  198. package/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +1 -1
  199. package/node_modules/@deepseek-ai/dsh-session-query/package.json +1 -1
  200. package/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +1 -1
  201. package/node_modules/@deepseek-ai/dsh-session-reference/lib/index.js +4 -4
  202. package/node_modules/@deepseek-ai/dsh-session-reference/package.json +1 -1
  203. package/node_modules/@deepseek-ai/dsh-session-stats/package.json +1 -1
  204. package/node_modules/@deepseek-ai/dsh-session-telemetry/package.json +1 -1
  205. package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/package.json +1 -1
  206. package/node_modules/@deepseek-ai/dsh-session-title/lib/index.js +2 -2
  207. package/node_modules/@deepseek-ai/dsh-session-title/package.json +1 -1
  208. package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/package.json +1 -1
  209. package/node_modules/@deepseek-ai/dsh-session-title-llm/lib/index.js +3 -3
  210. package/node_modules/@deepseek-ai/dsh-session-title-llm/package.json +1 -1
  211. package/node_modules/@deepseek-ai/dsh-settings/lib/invariant.js +1 -1
  212. package/node_modules/@deepseek-ai/dsh-settings/package.json +1 -1
  213. package/node_modules/@deepseek-ai/dsh-settings-file/package.json +1 -1
  214. package/node_modules/@deepseek-ai/dsh-shell/package.json +1 -1
  215. package/node_modules/@deepseek-ai/dsh-shell-env/package.json +1 -1
  216. package/node_modules/@deepseek-ai/dsh-skill/package.json +1 -1
  217. package/node_modules/@deepseek-ai/dsh-skill-badge/package.json +1 -1
  218. package/node_modules/@deepseek-ai/dsh-skill-filesystem/lib/index.js +1 -1
  219. package/node_modules/@deepseek-ai/dsh-skill-filesystem/package.json +1 -1
  220. package/node_modules/@deepseek-ai/dsh-spill/package.json +1 -1
  221. package/node_modules/@deepseek-ai/dsh-spill-local/lib/index.js +1 -1
  222. package/node_modules/@deepseek-ai/dsh-spill-local/package.json +1 -1
  223. package/node_modules/@deepseek-ai/dsh-spill-policy/lib/index.js +2 -2
  224. package/node_modules/@deepseek-ai/dsh-spill-policy/package.json +1 -1
  225. package/node_modules/@deepseek-ai/dsh-storage/package.json +1 -1
  226. package/node_modules/@deepseek-ai/dsh-storage-domain/lib/invariant.js +1 -1
  227. package/node_modules/@deepseek-ai/dsh-storage-domain/package.json +1 -1
  228. package/node_modules/@deepseek-ai/dsh-storage-json/package.json +1 -1
  229. package/node_modules/@deepseek-ai/dsh-subagent/lib/index.js +1 -1
  230. package/node_modules/@deepseek-ai/dsh-subagent/package.json +1 -1
  231. package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/package.json +1 -1
  232. package/node_modules/@deepseek-ai/dsh-subagent-in-process-driver/package.json +1 -1
  233. package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/package.json +1 -1
  234. package/node_modules/@deepseek-ai/dsh-subprocess/package.json +1 -1
  235. package/node_modules/@deepseek-ai/dsh-subprocess-local/package.json +1 -1
  236. package/node_modules/@deepseek-ai/dsh-system-prompt/package.json +1 -1
  237. package/node_modules/@deepseek-ai/dsh-terminal/package.json +1 -1
  238. package/node_modules/@deepseek-ai/dsh-terminal-bash/lib/index.js +2 -2
  239. package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +1 -1
  240. package/node_modules/@deepseek-ai/dsh-time-context/lib/index.js +1 -1
  241. package/node_modules/@deepseek-ai/dsh-time-context/lib/invariant.js +1 -1
  242. package/node_modules/@deepseek-ai/dsh-time-context/package.json +1 -1
  243. package/node_modules/@deepseek-ai/dsh-timeout/package.json +1 -1
  244. package/node_modules/@deepseek-ai/dsh-tmux-context/package.json +1 -1
  245. package/node_modules/@deepseek-ai/dsh-token-meter/lib/index.js +1 -1
  246. package/node_modules/@deepseek-ai/dsh-token-meter/package.json +1 -1
  247. package/node_modules/@deepseek-ai/dsh-tool-ask-user/package.json +1 -1
  248. package/node_modules/@deepseek-ai/dsh-tool-bash/package.json +1 -1
  249. package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/package.json +1 -1
  250. package/node_modules/@deepseek-ai/dsh-tool-call-timeout-policy/package.json +1 -1
  251. package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +1 -1
  252. package/node_modules/@deepseek-ai/dsh-tool-fs/lib/index.js +2 -2
  253. package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +1 -1
  254. package/node_modules/@deepseek-ai/dsh-tool-fs-search/lib/index.js +1 -1
  255. package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +1 -1
  256. package/node_modules/@deepseek-ai/dsh-tool-goal/package.json +1 -1
  257. package/node_modules/@deepseek-ai/dsh-tool-jobs/package.json +1 -1
  258. package/node_modules/@deepseek-ai/dsh-tool-pwsh/package.json +1 -1
  259. package/node_modules/@deepseek-ai/dsh-tool-ralph/lib/index.js +1 -1
  260. package/node_modules/@deepseek-ai/dsh-tool-ralph/package.json +1 -1
  261. package/node_modules/@deepseek-ai/dsh-tool-skill/package.json +1 -1
  262. package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/lib/index.js +6 -6
  263. package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/package.json +1 -1
  264. package/node_modules/@deepseek-ai/dsh-tool-subagent/package.json +1 -1
  265. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/package.json +1 -1
  266. package/node_modules/@deepseek-ai/dsh-tool-subagent-report/package.json +1 -1
  267. package/node_modules/@deepseek-ai/dsh-tool-todo/package.json +1 -1
  268. package/node_modules/@deepseek-ai/dsh-tool-web/package.json +1 -1
  269. package/node_modules/@deepseek-ai/dsh-tool-workflow/lib/index.js +2 -2
  270. package/node_modules/@deepseek-ai/dsh-tool-workflow/package.json +1 -1
  271. package/node_modules/@deepseek-ai/dsh-tools/lib/index.js +26 -26
  272. package/node_modules/@deepseek-ai/dsh-tools/package.json +1 -1
  273. package/node_modules/@deepseek-ai/dsh-typert-loader/package.json +1 -1
  274. package/node_modules/@deepseek-ai/dsh-typert-protocol/package.json +1 -1
  275. package/node_modules/@deepseek-ai/dsh-typert-registry/package.json +1 -1
  276. package/node_modules/@deepseek-ai/dsh-user-approval/package.json +1 -1
  277. package/node_modules/@deepseek-ai/dsh-user-questions/package.json +1 -1
  278. package/node_modules/@deepseek-ai/dsh-web/lib/index.js +1 -1
  279. package/node_modules/@deepseek-ai/dsh-web/package.json +1 -1
  280. package/node_modules/@deepseek-ai/dsh-web-app/package.json +1 -1
  281. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/{index-Dqw48FrP.js → index-BQQQ5Qt-.js} +2 -2
  282. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/cpp-DddhVWhK.js +1 -0
  283. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{php-D-uCvoST.js → php-9bx0az3O.js} +1 -1
  284. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{ruby-DEItuUFs.js → ruby-HDLHRjSL.js} +1 -1
  285. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/swift-C2oV4EkX.js +1 -0
  286. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/{vendor-Cjbwl5VI.js → vendor-CeMKrCZm.js} +24 -24
  287. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/index.html +2 -2
  288. package/node_modules/@deepseek-ai/dsh-web-frontend/package.json +1 -1
  289. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/LICENSE +21 -0
  290. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/lib/index.js +1 -0
  291. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/lib/invariant.js +1 -0
  292. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +1 -0
  293. package/node_modules/@deepseek-ai/dsh-web-search-dsh/lib/index.js +1 -1
  294. package/node_modules/@deepseek-ai/dsh-web-search-dsh/package.json +1 -1
  295. package/node_modules/@deepseek-ai/dsh-workflow/package.json +1 -1
  296. package/node_modules/@deepseek-ai/dsh-workflow-worker-thread/lib/index.js +2 -2
  297. package/node_modules/@deepseek-ai/dsh-workflow-worker-thread/lib/worker.cjs +3 -4
  298. package/node_modules/@deepseek-ai/dsh-workflow-worker-thread/package.json +1 -1
  299. package/node_modules/@deepseek-ai/dsh-workspace/lib/invariant.js +1 -1
  300. package/node_modules/@deepseek-ai/dsh-workspace/package.json +1 -1
  301. package/node_modules/@deepseek-ai/node-addon-landlock-run/package.json +1 -1
  302. package/package.json +1 -1
  303. package/lib/profile-boot-_PCyp_wB.js +0 -1
  304. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/types-BjBvdldw.js +0 -1
  305. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/cpp-DIPi6g--.js +0 -1
  306. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/swift-D82vCrfD.js +0 -1
  307. /package/lib/{profile-boot-B71dQloK.js → profile-boot-DDo03lXi.js} +0 -0
@@ -1,8 +1,8 @@
1
- var De=Object.defineProperty;var a=(k,f)=>De(k,"name",{value:f,configurable:!0});window.__ModuleLoader__.load({id:"@deepseek-ai/dsh-cordis-client-runner",factory:a(k=>{var f={exports:{}},u=f.exports;Object.defineProperty(u,Symbol.toStringTag,{value:"Module"});var V=Object.create,x=Object.defineProperty,z=Object.getOwnPropertyDescriptor,Y=Object.getOwnPropertyNames,G=Object.getPrototypeOf,J=Object.prototype.hasOwnProperty,Q=a((e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=Y(t),s=0,r=i.length,c;s<r;s++)c=i[s],!J.call(e,c)&&c!==n&&x(e,c,{get:(l=>t[l]).bind(null,c),enumerable:!(o=z(t,c))||o.enumerable});return e},"__copyProps"),Z=a((e,t,n)=>(n=e!=null?V(G(e)):{},Q(t||!e||!e.__esModule?x(n,"default",{value:e,enumerable:!0}):n,e)),"__toESM");let b=k("react");b=Z(b,1);let I=k("@deepseek-ai/cordis");const w="browser timer globals are unavailable in dynamic packages. Declare inject: ['timer'] on the returned plugin, query Client Service.listService for the exact API, and close over that plugin ctx. In React, create timers from an event handler or React.useEffect and return callback-form disposers from the effect cleanup.",P={setTimeout:w,setInterval:w,clearTimeout:w,clearInterval:w,fetch:"network belongs to the HOST half: register a handler there with harness.handle(method, fn) and call it here via host.call(method, args).",require:"modules cannot be imported here. React arrives as the `React` closure symbol; everything else goes through ctx services or host.call."};function X(){const e={};for(const[t,n]of Object.entries(P))e[t]=()=>{throw new Error(`${t} is not available in a dynamic client half — ${n}`)};return e}a(X,"closureTraps");function ee(){return new Proxy({},{get(e,t){throw new Error(`harness.${String(t)} belongs to the HOST half (\`code\`): register handlers there with harness.handle(method, fn); the browser half calls them via host.call(method, args).`)}})}a(ee,"harnessTrap");var C=class{static{a(this,"DynamicCordisStyles")}pluginId;tags=new Set;constructor(e){this.pluginId=e}insert(e){if(typeof e!="string")throw new Error("styles.insert(css) needs a CSS string");const t=document.createElement("style");return t.dataset.dyn=this.pluginId,t.textContent=e,document.head.append(t),this.tags.add(t),()=>{this.tags.delete(t),t.remove()}}get count(){return this.tags.size}dispose(){for(const e of this.tags)e.remove();this.tags.clear()}};function te(e){if(e instanceof Error)return e.message;if(typeof e=="string")return e;if(e===void 0)return"undefined";try{return JSON.stringify(e)}catch{return"[unserializable console argument]"}}a(te,"errorText");function ne(e,t){const n=`[cordis:${e}]`,o=a(i=>(...s)=>{console[i](n,...s),i==="error"&&t(s.map(te).join(" ").slice(0,500))},"forward");return{...console,log:o("log"),info:o("info"),warn:o("warn"),error:o("error"),debug:o("debug")}}a(ne,"taggedConsole");function T(e){return typeof e=="function"?!0:typeof e=="object"&&e!==null&&typeof e.apply=="function"}a(T,"isDynamicCordisPlugin");async function R(e,t,n,o){const i=X(),s=["React","console","styles","host","harness",...Object.keys(i),"process","Buffer"];let r;try{r=new Function(...s,`return (async () => {
1
+ var De=Object.defineProperty;var a=(k,f)=>De(k,"name",{value:f,configurable:!0});window.__ModuleLoader__.load({id:"@deepseek-ai/dsh-cordis-client-runner",factory:a(k=>{var f={exports:{}},u=f.exports;Object.defineProperty(u,Symbol.toStringTag,{value:"Module"});var z=Object.create,x=Object.defineProperty,Y=Object.getOwnPropertyDescriptor,G=Object.getOwnPropertyNames,J=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty,Q=a((e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=G(t),s=0,r=i.length,c;s<r;s++)c=i[s],!I.call(e,c)&&c!==n&&x(e,c,{get:(l=>t[l]).bind(null,c),enumerable:!(o=Y(t,c))||o.enumerable});return e},"__copyProps"),Z=a((e,t,n)=>(n=e!=null?z(J(e)):{},Q(t||!e||!e.__esModule||!I.call(e,"default")?x(n,"default",{value:e,enumerable:!0}):n,e)),"__toESM");let b=k("react");b=Z(b,1);let P=k("@deepseek-ai/cordis");const w="browser timer globals are unavailable in dynamic packages. Declare inject: ['timer'] on the returned plugin, query Client Service.listService for the exact API, and close over that plugin ctx. In React, create timers from an event handler or React.useEffect and return callback-form disposers from the effect cleanup.",C={setTimeout:w,setInterval:w,clearTimeout:w,clearInterval:w,fetch:"network belongs to the HOST half: register a handler there with harness.handle(method, fn) and call it here via host.call(method, args).",require:"modules cannot be imported here. React arrives as the `React` closure symbol; everything else goes through ctx services or host.call."};function X(){const e={};for(const[t,n]of Object.entries(C))e[t]=()=>{throw new Error(`${t} is not available in a dynamic client half — ${n}`)};return e}a(X,"closureTraps");function ee(){return new Proxy({},{get(e,t){throw new Error(`harness.${String(t)} belongs to the HOST half (\`code\`): register handlers there with harness.handle(method, fn); the browser half calls them via host.call(method, args).`)}})}a(ee,"harnessTrap");var T=class{static{a(this,"DynamicCordisStyles")}pluginId;tags=new Set;constructor(e){this.pluginId=e}insert(e){if(typeof e!="string")throw new Error("styles.insert(css) needs a CSS string");const t=document.createElement("style");return t.dataset.dyn=this.pluginId,t.textContent=e,document.head.append(t),this.tags.add(t),()=>{this.tags.delete(t),t.remove()}}get count(){return this.tags.size}dispose(){for(const e of this.tags)e.remove();this.tags.clear()}};function te(e){if(e instanceof Error)return e.message;if(typeof e=="string")return e;if(e===void 0)return"undefined";try{return JSON.stringify(e)}catch{return"[unserializable console argument]"}}a(te,"errorText");function ne(e,t){const n=`[cordis:${e}]`,o=a(i=>(...s)=>{console[i](n,...s),i==="error"&&t(s.map(te).join(" ").slice(0,500))},"forward");return{...console,log:o("log"),info:o("info"),warn:o("warn"),error:o("error"),debug:o("debug")}}a(ne,"taggedConsole");function R(e){return typeof e=="function"?!0:typeof e=="object"&&e!==null&&typeof e.apply=="function"}a(R,"isDynamicCordisPlugin");async function j(e,t,n,o){const i=X(),s=["React","console","styles","host","harness",...Object.keys(i),"process","Buffer"];let r;try{r=new Function(...s,`return (async () => {
2
2
  ${t}
3
3
  })()`)}catch(l){throw l instanceof SyntaxError?new Error(`client half failed to parse in this browser: ${l.message}
4
- The browser half is plain JavaScript (no JSX, no TypeScript); build elements with React.createElement.`):l}const c=await r(b,ne(e,l=>{n.noteError(l)}),o,{call:a((l,d=null)=>n.invoke(l,d),"call")},ee(),...Object.values(i),void 0,void 0);if(!T(c))throw c===void 0?new Error("client half returned `undefined` — did you forget `return`?\n ✓ return (ctx) => { … }\n ✓ return { name: '…', inject: ['slots'], apply(ctx) { … } }"):new Error("client half must `return` a plugin: a function, or an object with an `apply(ctx)` method");return c}a(R,"evaluateClientHalf");const j=new Set(["effect","on","once","provide","timeout","interval","setTimeout","setInterval","throttle","debounce"]),O=new Set(["timeout","interval","setTimeout","setInterval","throttle","debounce"]);function m(e,t,n){return e instanceof I.Context?y(n,`service "${t}" returned a cordis Context, which the dynamic facade does not expose. Operate through your own plugin ctx and the services you declared — never another context.`):e}a(m,"denyContext");function oe(e,t,n){return new Proxy(e,{get(o,i){const s=Reflect.get(o,i,o);return typeof s!="function"?m(s,t,n):(...r)=>{const c=Reflect.apply(s,o,r);return c instanceof Promise?c.then(l=>m(l,t,n)):m(c,t,n)}}})}a(oe,"guardedService");function se(e,t){return new Proxy(e,{get(n,o){const i=Reflect.get(n,o,n);return o!=="register"?typeof i!="function"?m(i,"slots",t):(...s)=>m(Reflect.apply(i,n,s),"slots",t):(s,r)=>{if(typeof s!="object"||s===null)return y(t,"slots.register(options, component) needs an options object with a `name`");const c={...s},l=c.name;if(typeof l!="string"||l.length===0)return y(t,"slots.register options need a string `name` (the target slot key)");if(l==="tool.view.cordis"){if(c.key!=="self")return y(t,'tool.view.cordis only accepts key "self"; the runtime binds it to this Package');c.key=`${t.pkg.pluginId}.${t.pkg.packageId}`}const d=e.spec(l);let h=c.priority;(d===void 0||d.kind!=="chain")&&(h=t.allocatePriority(),c.priority=h);const p=Reflect.get(n,"register",n).call(n,c,r);return t.ledger.push({slot:l,priority:h}),t.claim(r),p}}})}a(se,"guardedSlots");function re(e,t,n){return new Proxy(e,{get(o,i){if(i!=="overrideTokens"){const s=Reflect.get(o,i,o);return typeof s!="function"?m(s,"theme",t):(...r)=>{const c=Reflect.apply(s,o,r);return c instanceof Promise?c.then(l=>m(l,"theme",t)):m(c,"theme",t)}}return(s,r)=>{if(r===void 0&&typeof s=="object"&&s!==null)return y(t,"theme.overrideTokens(source, tokens) takes two arguments; source is replaced with your package id, so pass any string first and the token map second: overrideTokens('mine', { '--dsw-alias-…': { light: '…', dark: '…' } })");const c=Reflect.get(o,"overrideTokens",o),l=Reflect.apply(c,o,[`${t.pkg.pluginId}.${t.pkg.packageId}`,r]);return n.effect(()=>l,"cordis-client-runner: dynamic theme override layer"),l}}})}a(re,"guardedTheme");function H(e,t){const n=new Set(Object.keys(e.fiber.inject)),o=a(s=>e.get(s)!==void 0?y(t,`service "${s}" is not declared by your plugin. Declare it on the plugin you return: { inject: ['${s}', …], apply(ctx) { … } } — a plain \`function\` has no declaration site, so use the object form. The runtime then parks the package if the provider unloads.`):y(t,`dynamic ctx does not expose "${s}". Available: ctx.on / ctx.provide / timer helpers after injecting timer, and any service your returned plugin declared in inject (slots and theme are the usual UI seats). Framework internals are withheld by design.`),"denyRead"),i=a((s,r)=>{if(r&&!n.has(s))return o(s);const c=m(e.get(s),s,t);return c===null||typeof c!="object"&&typeof c!="function"?c:s==="slots"?se(c,t):s==="theme"?re(c,t,e):oe(c,s,t)},"readService");return new Proxy({},{get(s,r){if(r==="get")return c=>i(c,!1);if(typeof r=="string")return j.has(r)?(...c)=>{if(O.has(r)&&!n.has("timer"))return o("timer");const l=e[r];return Reflect.apply(l,e,c)}:i(r,!0)},set(s,r){return y(t,`dynamic ctx is read-only; cannot assign "${String(r)}"`)},has:a((s,r)=>r==="get"||typeof r=="string"&&(j.has(r)&&(!O.has(r)||n.has("timer"))||n.has(r)),"has")})}a(H,"dynamicCordisContext");function y(e,t){const n=new Error(t);throw e.reportFailure(n),n}a(y,"rejectGuard");function v(e){return`dyn/${e}`}a(v,"moduleIdOf");var A=class{static{a(this,"DynamicCordisPackageRunner")}env;live=new Map;queues=new Map;changeListeners=new Set;nextPriority=0;owners=new WeakMap;failures=new Map;unwatch;snapshotCache;failureCache;constructor(e){this.env=e,this.unwatch=e.slots.onEntryError((t,n,o,i)=>{const s=n.component,r=D(s)?this.owners.get(s):void 0;if(r===void 0)return;const c=g(o),l={slot:t,message:ie(t,c.message),...c.stack===void 0?{}:{stack:c.stack},abdicated:i.abdicated};e.reportRenderFailure(r.agentId,r.pluginId,r.pluginRunId,l),this.failures.set(r.pluginId,l),this.notify()})}subscribe(e){return this.changeListeners.add(e),()=>{this.changeListeners.delete(e)}}renderFailures={getSnapshot:a(()=>this.failureCache??=new Map(this.failures),"getSnapshot"),subscribe:a(e=>this.subscribe(e),"subscribe")};getSnapshot(){return this.snapshotCache??=[...this.live.values()].map(({pkg:e,ledger:t,styles:n})=>({pluginId:e.pluginId,packageId:e.packageId,pluginRunId:e.pluginRunId,name:e.name,slots:[...new Set(t.map(o=>o.slot))],styleCount:n.count}))}isLoaded(e){return this.live.has(e)}load(e){return this.enqueue(e.pluginId,async()=>{const t=this.live.get(e.pluginId);if(t!==void 0){if(t.pkg.pluginRunId===e.pluginRunId)return E(t);await this.teardown(t.pkg.pluginId,t.entryId,t.styles)}const n=await this.mount(e);return this.notify(),n})}retract(e,t){this.enqueue(e,async()=>{const n=this.live.get(e);n===void 0||n.pkg.pluginRunId!==t||(await this.teardown(e,n.entryId,n.styles),this.notify())})}async dispose(){this.unwatch();for(const e of[...this.live.values()])await this.teardown(e.pkg.pluginId,e.entryId,e.styles);this.notify()}notify(){this.snapshotCache=void 0,this.failureCache=void 0;for(const e of[...this.changeListeners])e()}enqueue(e,t){const n=(this.queues.get(e)??Promise.resolve()).then(t);return this.queues.set(e,n.then(()=>{},()=>{})),n}async mount(e){const t=new C(e.pluginId),n=[];let o;try{o=await R(e.pluginId,e.code,{invoke:a((p,Ee)=>this.env.invoke(e.pluginId,e.pluginRunId,p,Ee),"invoke"),noteError:a(p=>{console.error(`[cordis-client-runner] ${e.pluginId} logged an error:`,p)},"noteError")},t)}catch(p){return t.dispose(),{ok:!1,cause:"evaluate",...g(p),error:p}}const i={pluginId:e.pluginId,packageId:e.packageId,pluginRunId:e.pluginRunId,name:e.name},s=this.guardedSurface(i,e.agentId,o,n),r=v(e.pluginId);this.env.modules.invalidate(r);const c=globalThis.__ModuleLoader__;if(c===void 0)throw new Error("cordis-client-runner: window.__ModuleLoader__ is missing (booted outside the web shell?)");c.load({id:r,factory:a(()=>s,"factory")});const l=await this.env.loader.create({name:r}),d=this.env.loader.resolve(l).fiber;if(d===void 0)return await this.teardown(e.pluginId,l,t),{ok:!1,cause:"module-import",message:"module import failed (see the browser console)"};try{await d.await()}catch(p){return await this.teardown(e.pluginId,l,t),{ok:!1,cause:"activate",...g(p),error:p}}const h={pkg:i,entryId:l,styles:t,ledger:n,waitingFor:Object.keys(d.inject).filter(p=>this.env.ctx.get(p)===void 0)};return this.live.set(e.pluginId,h),this.failures.delete(e.pluginId),E(h)}guardedSurface(e,t,n,o){const i=a(r=>{D(r)&&this.owners.set(r,{pluginId:e.pluginId,pluginRunId:e.pluginRunId,agentId:t})},"claim"),s=a(r=>H(r,{pkg:e,ledger:o,claim:i,allocatePriority:a(()=>--this.nextPriority,"allocatePriority"),reportFailure:a(c=>{this.env.reportGuardFailure(t,e.pluginId,e.pluginRunId,g(c))},"reportFailure")}),"guarded");return typeof n=="function"?{name:v(e.pluginId),apply:a(r=>n(s(r)),"apply")}:{...n,name:v(e.pluginId),apply:a((r,c)=>n.apply(s(r),c),"apply")}}async teardown(e,t,n){this.live.delete(e),this.failures.delete(e),await this.env.loader.remove(t),this.env.modules.invalidate(v(e)),n.dispose()}};function E(e){return{ok:!0,pluginRunId:e.pkg.pluginRunId,...e.waitingFor.length>0?{waitingFor:e.waitingFor}:{}}}a(E,"settled");function D(e){return typeof e=="object"&&e!==null||typeof e=="function"}a(D,"indexable");function g(e){if(typeof e!="object"||e===null)return{message:String(e)};const t="message"in e&&typeof e.message=="string"?e.message:Object.prototype.toString.call(e),n="stack"in e&&typeof e.stack=="string"?e.stack:void 0;return{message:t,...n===void 0?{}:{stack:n}}}a(g,"errorDetails");function ie(e,t){const n=Object.entries(P).find(([o,i])=>t.includes(o)&&!t.includes(i))?.[1];return`your entry in slot "${e}" crashed while React rendered it: ${t}`+(n===void 0?"":`
5
- ${n}`)}a(ie,"renderFailureMessage");var L=class{static{a(this,"CordisRunOrchestrator")}env;requests=new Map;activity=new Map;failures=new Map;inFlight=new Map;listeners=new Set;activityCache;failureCache;constructor(e){this.env=e}activeRuns={getSnapshot:a(()=>this.activityCache??=new Map(this.activity),"getSnapshot"),subscribe:a(e=>this.observe(e),"subscribe")};lastRunError={getSnapshot:a(()=>this.failureCache??=new Map(this.failures),"getSnapshot"),subscribe:a(e=>this.observe(e),"subscribe")};open(e){if(this.requests.set(e.requestId,e),!e.requiresApproval){this.orchestrate({agentId:e.agentId,pluginId:e.pluginId,packageId:e.packageId,mode:e.mode,requestId:e.requestId,hasClientHalf:!0}).catch(t=>{console.error(`[cordis-client-runner] automatic activation ${e.requestId} failed:`,t)});return}this.activity.get(e.pluginId)?.phase!=="orchestrating"&&this.activity.set(e.pluginId,{phase:"awaiting-approval",requestId:e.requestId,agentId:e.agentId,packageId:e.packageId,mode:e.mode,name:e.name,purpose:e.purpose}),this.commit()}reconcileApprovals(e){const t=new Map;for(const o of e){const i=o.latestRun;if(i?.approvalRequestId===void 0||i.status!=="awaiting-approval"&&i.status!=="starting-host"&&i.status!=="client-pending")continue;const s=o.packages.find(r=>r.packageId===i.packageId);s!==void 0&&t.set(i.approvalRequestId,{requestId:i.approvalRequestId,agentId:o.agentId,pluginId:o.pluginId,packageId:i.packageId,mode:i.mode,name:s.name,purpose:s.purpose,requiresApproval:i.requiresApproval??i.status==="awaiting-approval"})}let n=!1;for(const[o,i]of[...this.requests]){if(t.has(o))continue;this.requests.delete(o);const s=this.activity.get(i.pluginId);s?.phase==="awaiting-approval"&&s.requestId===o&&this.activity.delete(i.pluginId),n=!0}for(const[o,i]of t){const s=this.requests.get(o),r=this.activity.get(i.pluginId);if(!(!i.requiresApproval&&r?.phase==="orchestrating")&&!(i.requiresApproval&&ae(s,i)&&r?.phase==="awaiting-approval"&&r.requestId===o)){if(!i.requiresApproval){this.open(i),n=!0;continue}this.requests.set(o,i),r?.phase!=="orchestrating"&&this.activity.set(i.pluginId,{phase:"awaiting-approval",requestId:o,agentId:i.agentId,packageId:i.packageId,mode:i.mode,name:i.name,purpose:i.purpose}),n=!0}}n&&this.commit()}close(e){const t=this.requests.get(e);if(t===void 0)return;this.requests.delete(e);const n=this.activity.get(t.pluginId);n?.phase==="awaiting-approval"&&n.requestId===e&&this.activity.delete(t.pluginId),this.commit()}approve(e,t){const n=this.requests.get(e);return n===void 0||!n.requiresApproval?Promise.resolve():this.orchestrate({agentId:n.agentId,pluginId:n.pluginId,packageId:n.packageId,mode:n.mode,requestId:e,approveFutureVersions:t,hasClientHalf:!0})}async decline(e){const t=this.requests.get(e);if(t===void 0||!t.requiresApproval)return;const n=this.activity.get(t.pluginId);n?.phase!=="awaiting-approval"||n.requestId!==e||(this.requests.delete(e),this.activity.delete(t.pluginId),this.commit(),await this.answer(e,{ok:!1,reason:"rejected"}))}startUserRun(e){return this.orchestrate(e)}observe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}commit(){this.activityCache=void 0,this.failureCache=void 0;for(const e of[...this.listeners])e()}orchestrate(e){const t=this.inFlight.get(e.pluginId);if(t!==void 0)return t;this.activity.set(e.pluginId,{phase:"orchestrating",agentId:e.agentId,packageId:e.packageId,mode:e.mode}),this.failures.delete(e.pluginId),e.requestId!==void 0&&this.requests.delete(e.requestId),this.commit();const n=this.drive(e).finally(()=>{this.inFlight.delete(e.pluginId),this.activity.delete(e.pluginId),this.commit()});return this.inFlight.set(e.pluginId,n),n}async drive(e){const t=await this.startHost(e);if(!t.ok){this.fail(e,"host-half-failed",t),e.requestId!==void 0&&await this.answer(e.requestId,{...t,reason:"host-half-failed"});return}if(!e.hasClientHalf)return;let n;try{n=await this.env.host.getClientCode(e.agentId,e.pluginId,t.pluginRunId)}catch(s){await this.finishClientFailure(e,t.pluginRunId,t.startedHere,g(s),s);return}const o=await this.env.runner.load({pluginId:n.pluginId,packageId:n.packageId,pluginRunId:n.pluginRunId,agentId:e.agentId,name:n.name,code:n.code}).catch(s=>({ok:!1,cause:"evaluate",...g(s),error:s}));if(!o.ok){await this.finishClientFailure(e,t.pluginRunId,t.startedHere,{message:`${o.cause}: ${o.message}`,...o.stack===void 0?{}:{stack:o.stack}},o.error);return}const i={ok:!0,pluginRunId:o.pluginRunId,...o.waitingFor===void 0?{}:{waitingFor:o.waitingFor}};if(e.requestId!==void 0){await this.answer(e.requestId,i);return}await this.settleDirect(e,i)}async startHost(e){try{return await this.env.host.runHostHalf(e.agentId,e.pluginId,e.packageId,e.mode,e.requestId??null,e.approveFutureVersions??!1)}catch(t){return{ok:!1,...g(t)}}}async finishClientFailure(e,t,n,o,i){console.error(`[cordis-client-runner] Client activation ${e.pluginId}/${e.packageId} (${t}) failed:`,i??o),this.fail(e,"client-half-failed",o);const s={ok:!1,reason:"client-half-failed",pluginRunId:t,startedHere:n,...o};e.requestId!==void 0?await this.answer(e.requestId,s):await this.settleDirect(e,s)}async settleDirect(e,t){try{const n=await this.env.host.settleUserRun(e.agentId,e.pluginId,t);n.ok||this.fail(e,"client-half-failed",n)}catch(n){this.fail(e,"client-half-failed",g(n))}}async answer(e,t){try{await this.env.host.resolveRequestRun(e,t)}catch(n){console.error(`[cordis-client-runner] answering run request ${e} failed:`,n)}}fail(e,t,n){this.failures.set(e.pluginId,{packageId:e.packageId,reason:t,...n}),this.commit()}};function ae(e,t){return e?.requestId===t.requestId&&e.agentId===t.agentId&&e.pluginId===t.pluginId&&e.packageId===t.packageId&&e.mode===t.mode&&e.name===t.name&&e.purpose===t.purpose&&e.requiresApproval===t.requiresApproval}a(ae,"sameRequest");var M=class{static{a(this,"ClientCordisInspectRegistry")}host;providers=new Map;active=new Map;publishQueued=!1;syncChain=Promise.resolve();constructor(e){this.host=e}register(e){const{manifest:t}=e;if(t.id.trim()==="")throw new Error("Client Cordis inspect provider id must not be empty");if(this.providers.has(t.id))throw new Error(`Client Cordis inspect provider "${t.id}" is already registered`);const n=new Set;for(const i of t.methods){if(n.has(i.name))throw new Error(`Client Cordis inspect provider "${t.id}" repeats method "${i.name}"`);n.add(i.name)}this.providers.set(t.id,e),this.publish();let o=!1;return()=>{o||(o=!0,this.providers.get(t.id)===e&&(this.providers.delete(t.id),this.publish()))}}publish(){this.publishQueued||(this.publishQueued=!0,queueMicrotask(()=>{this.publishQueued=!1;const e=[...this.providers.values()].map(t=>t.manifest);this.syncChain=this.syncChain.then(async()=>{await this.host.sync(e)}).catch(t=>{console.error("[cordis-client-runner] syncing inspect providers failed:",t)})}))}async query(e){if(this.active.has(e.requestId))return;const t=new AbortController;this.active.set(e.requestId,t);let n;try{const o=this.providers.get(e.provider);if(o===void 0)n={ok:!1,reason:"provider-missing",message:`Client inspect provider "${e.provider}" is unavailable`};else if(!o.manifest.methods.some(i=>i.name===e.method))n={ok:!1,reason:"method-missing",message:`Client inspect provider "${e.provider}" has no method "${e.method}"`};else{const i=await o.query(e.method,e.input,{signal:t.signal,sessionId:e.agentId});n=t.signal.aborted?{ok:!1,reason:"cancelled",message:"Client inspect query was cancelled"}:{ok:!0,data:i}}}catch(o){n=t.signal.aborted?{ok:!1,reason:"cancelled",message:"Client inspect query was cancelled"}:{ok:!1,reason:"provider-error",message:o instanceof Error?o.message:String(o)}}finally{this.active.delete(e.requestId)}t.signal.aborted||await this.host.resolve(e.agentId,e.requestId,n)}close(e){this.active.get(e)?.abort(),this.active.delete(e)}};function ce(e,t){e.provide("cordisInspect",t)}a(ce,"provideClientCordisInspect");const le=[{key:"layout",summary:"The outward layout face (`ctx.layout`): the panel transitions other plugins may trigger — and exactly what a test fake must supply.",description:"The outward layout face (`ctx.layout`): the panel transitions other plugins may trigger — and exactly what a test fake must supply. The attachPanels wiring hook stays on the concrete class (root-entry assembly only).",methods:[{signature:"toggleSidebar(): void",description:"Toggle the sidebar panel (closed ⟷ contract default width).",parameters:[]},{signature:"openDetails(): void",description:"Open the details panel (no-op when already open).",parameters:[]},{signature:"closeDetails(): void",description:"Close the details panel.",parameters:[]}]},{key:"locale",summary:"Dictionary registry plus locale preference.",description:"Dictionary registry plus locale preference. Lookup chain per key: the entry's namespace in the active locale -> that namespace's zh fallback -> the shared common namespace (active, then zh) -> the key itself (missing text stays visible, fail loud in the UI rather than blank). Reads go through getLocale; writes only through setLocale; continuous sync through the `locale/change` event, or through the LocaleFace getSnapshot/subscribe pair the render machinery consumes (installed via `ctx.slots.installLocale`).",methods:[{signature:"getLocale(): LocaleSnapshot",description:"Read the current immutable locale snapshot.",parameters:[],returns:"the current snapshot (stable reference until the next change)."},{signature:"getSnapshot(): LocaleSnapshot",description:"LocaleFace getSnapshot: the current snapshot (carries `revision`; stable reference between changes, uSES-safe).",parameters:[],returns:"the current snapshot."},{signature:"subscribe(fn: () => void): () => void",description:"LocaleFace subscribe: notified on every snapshot change (locale switch or dictionary registration — registrations bump the revision so already rendered outlets pick up late-arriving dictionaries).",parameters:[{name:"fn",description:"change callback."}],returns:"unsubscribe."},{signature:"setLocale(id: string): void",description:"Switch the active locale — the only user preference write entry.",parameters:[{name:"id",description:"a registered locale id; unknown ids throw."}]},{signature:"register<N extends keyof LocaleNamespaceMap & string>(ns: N, dicts: Record<LocaleId, LocaleDictOf<N>>): () => void",description:"Register a declared namespace's dictionaries, all locales in one call — the typed form: each dictionary is checked against the namespace's LocaleNamespaceMap key union (a missing or extra key is a compile error), and every shipped locale is required (bilingual balance enforced at registration). Duplicate (ns, locale) throws (single occupant; a namespace's texts have one owner). Registration bumps the revision so mounted outlets pick up late-arriving dictionaries.",parameters:[{name:"ns",description:"a namespace merged into LocaleNamespaceMap."},{name:"dicts",description:"complete dictionaries keyed by locale id."}],returns:"disposer removing every locale registered by this call (idempotent)."},{signature:"register(ns: string, locale: string, dict: LocaleDict): () => void",description:"Single-locale untyped form for namespaces outside the merge table (dynamic composition, tests).",parameters:[{name:"ns",description:"namespace."},{name:"locale",description:"locale tag."},{name:"dict",description:"dictionary."}],returns:"disposer (idempotent)."},{signature:"bind<N extends keyof LocaleNamespaceMap & string>(ns: N): TranslateNS<N>",description:"Bind a declared namespace to a translate function typed to its dictionary key union (plus the shared common vocabulary) — the same key domain the framework-injected `t` seat carries. The returned reference is stable per namespace (repeat binds return the same function), so it can ride inject surfaces without breaking memoization.",parameters:[{name:"ns",description:"a namespace merged into LocaleNamespaceMap."}],returns:"the typed translate function (reads the active locale at call time)."},{signature:"bind(ns: string): Translate",description:"Untyped form for namespaces outside the merge table (dynamic composition, tests).",parameters:[{name:"ns",description:"namespace."}],returns:"the translate function."}]},{key:"sessions",summary:"The sessions-service face injected as `ctx.sessions`.",description:"The sessions-service face injected as `ctx.sessions`.",methods:[{signature:"open(id: SessionId): void",description:"Select a session as current.",parameters:[{name:"id",description:"session id (must exist in the list; unknown ids fail loud)."}]},{signature:"openSubagent(address: SubagentAddress): void",description:"Open a healthy catalog child through its exact direct-parent address.",parameters:[{name:"address",description:"catalog-derived parent and child ids."}]},{signature:"setSubagentCatalogOpen(parentSessionId: SessionId, open: boolean): void",description:"Mark whether a catalog menu is consuming live membership updates.",parameters:[{name:"parentSessionId",description:"catalog owner."},{name:"open",description:"current menu state."}]},{signature:"refreshSubagents(parentSessionId: SessionId): Promise<void>",description:"Refresh one direct-child catalog.",parameters:[{name:"parentSessionId",description:"catalog owner."}],returns:"completion of the current or newly started refresh."},{signature:"search( query: string, signal: AbortSignal, ): Promise<RpcResult<{ items: SessionSearchResultItem[]; hasMore: boolean }>>",description:"Search the Host's visible message-content index. Results stay request-local; the list snapshot remains the metadata authority.",parameters:[{name:"query",description:"non-blank literal phrase."},{name:"signal",description:"cancellation for a superseded search."}],returns:"bounded results, or a business/transport error."},{signature:"fork(opts: { sessionId: SessionId; atSeq?: number; increaseTitle?: boolean }): Promise<SessionId>",description:"Fork a session from a completed-turn prefix of the source; on resolution the child is in the list store and `open()` can target it.",parameters:[{name:"opts",description:"source session id, the optional event seq anchoring the cut (the boundary is the first turn/end at or after it; an in-log anchor in an open turn is unavailable rather than clipped backward), and whether to increment an inherited durable title before resolving."}],returns:"the child session id.",throws:["when the fork fails, or when a requested child-title rename fails after creation."]},{signature:"scope(id: SessionId): AgentContext | undefined",description:"Resolve an Agent-scoped context view (use-and-discard).",parameters:[{name:"id",description:"session id."}],returns:"scoped ctx, or undefined for a session neither listed nor already scoped."},{signature:"binding(id: SessionId): SessionBinding | undefined",description:"Resolve the stable session binding (scope-addressed assembly feed).",parameters:[{name:"id",description:"session id."}],returns:"binding, or undefined for a session neither listed nor already scoped."}]},{key:"slots",summary:"cordis Service layer of the slot system; see the module doc for the split with SlotCore.",description:"cordis Service layer of the slot system; see the module doc for the split with SlotCore.",methods:[{signature:"declare readonly register: SlotCore['register']",description:"The single registration API. The typed face IS the core's register (both overloads reused verbatim — one authority, no structural copy; see SlotCore.register for children declaration, store seat, inject face, load-time validation, and the unload cascade). This layer adds: disposal through the caller's ctx.effect (fiber unload = cascade), exclusive-factory minting (`store: createXxxStore` becomes a per-entry handle), the registrant diagnostics stamp, and store-instance lifecycle on the entry axis.\n\nDeclared here, implemented by prototype assignment below the class: it MUST stay a prototype method (never an instance arrow) — the cordis service proxy binds `this.ctx` to the CALLER's context at call time, which is what routes the effect (and the unload cascade) into the caller's fiber. An arrow property would freeze `this` to the service's own root ctx and silently break per-plugin disposal.",parameters:[]},{signature:"inject(key: keyof SlotMap & string, callback: () => SlotInjectionEffect): () => void",description:"Install an effect for each declaration lifetime of a slot. The callback runs synchronously when the declaration already exists; otherwise it runs inside the declaring `register()` call after the declaration is committed. Collapse disposes the effect and a later declaration runs it again. Callback effects are synchronous disposers; iterable effects install transactionally and dispose in reverse order. The controller belongs to the caller's fiber, so plugin unload cancels a pending wait and removes any active contribution.",parameters:[{name:"key",description:"declared SlotMap key to depend on."},{name:"callback",description:"creates one disposer or an iterable of disposers."}],returns:"idempotent disposer for the wait and active effect.",throws:["callback setup failures synchronously when the slot is already declared."]}]},{key:"theme",summary:"Theme registry and preference owner.",description:"Theme registry and preference owner. `light`/`dark` are built in (the base stylesheets carry both palettes); third-party themes register alias-layer overrides. Reads go through getTheme; preference writes only through setTheme; continuous sync only through the `theme/change` event. overrideTokens stacks partial token layers over the active theme without touching the registry. The service holds the `prefers-color-scheme` media query (environment sensing, not presentation) and re-emits when the OS scheme flips while the preference is `system`.",methods:[{signature:"getTheme(): ThemeSnapshot",description:"Read the current immutable theme snapshot.",parameters:[],returns:"the current snapshot (stable reference until the next change)."},{signature:"setTheme(id: string): void",description:"Switch the theme preference — the only user preference write entry. Built-in preferences are written through the settings scope and every accepted value emits `theme/change`.",parameters:[{name:"id",description:"a registered theme id or `system`; unknown ids throw."}]},{signature:"register(definition: ThemeDefinition): () => void",description:"Register a theme. Duplicate id throws (single occupant per id; the built-in pair counts; `system` is a preference, not a registrable id).",parameters:[{name:"definition",description:"theme id, colorScheme, and alias-token overrides."}],returns:"disposer. Disposing the theme backing the active preference resets the preference to the default so the UI never keeps tokens of an unregistered theme."},{signature:"overrideTokens(source: string, tokens: ThemeTokenOverrides): () => void",description:"Stack a token override layer on top of the active theme — the token-level analogue of slot shading: the base theme stays untouched, layers compose in seq order with later layers winning per-token, and removing a layer restores whatever it covered. Calling again with the same source replaces that source's whole layer and restacks it on top (effect re-registration semantics). Emits `theme/change` with the recomposed snapshot.",parameters:[{name:"source",description:"layer identity; one layer per source (dynamic packages pass their package id — the façade pins it, so it also names the layer's origin for inspection)."},{name:"tokens",description:"token-name → `{ light, dark }` value pairs. Validated at runtime (model-authored callers reach this boundary with untyped JS); a bare string value throws a teaching error."}],returns:"disposer removing exactly the layer this call created; a no-op once the source has re-overridden (the newer layer is not torn down)."}]},{key:"timer",summary:"Disposable timer helpers mixed into Cordis contexts.",description:"Disposable timer helpers mixed into Cordis contexts.",methods:[{signature:"timeout(callback: () => void, delay: number): () => void",description:"Run a callback once and return its disposer.",parameters:[]},{signature:"timeout(delay: number): Promise<void>",description:"Resolve after a delay; disposal rejects the pending promise.",parameters:[]},{signature:"interval(callback: () => void, delay: number): () => void",description:"Run a callback repeatedly and return its disposer.",parameters:[]},{signature:"interval<R = any>(delay: number): AsyncIterableIterator<void, R, void>",description:"Return an async iterator of timer ticks.",parameters:[]},{signature:"throttle<F extends (...args: any[]) => void>(callback: F, delay: number, noTrailing?: boolean): F & { dispose: () => void }",description:"Return a throttled function whose timer is disposed with the current fiber.",parameters:[]},{signature:"debounce<F extends (...args: any[]) => void>(callback: F, delay: number): F & { dispose: () => void }",description:"Return a debounced function whose timer is disposed with the current fiber.",parameters:[]}]},{key:"workspaces",summary:"The workspaces-service face injected as `ctx.workspaces`.",description:"The workspaces-service face injected as `ctx.workspaces`.",methods:[{signature:"connectWorkspace(workspaceId: WorkspaceId): Promise<SessionId>",description:"Connect a Workspace to its reusable or freshly created blank session.",parameters:[{name:"workspaceId",description:"target workspace."}],returns:"the connected session id."},{signature:"startSession(workspaceId?: WorkspaceId): void",description:"The New Session flow: connect the explicit, current-Session, or recent Workspace and open the resulting session; failures surface on the session list state.",parameters:[{name:"workspaceId",description:"explicit target; omitted inherits the current Session's Workspace before falling back to the recency projection."}]},{signature:"create(input: { path: string }): Promise<WorkspaceView>",description:"Register an existing path as a Workspace.",parameters:[{name:"input",description:"the Host create payload."}],returns:"the created or idempotently resolved Workspace."},{signature:"pickDirectory(): Promise<string | null>",description:"Open the Host's native directory picker.",parameters:[],returns:"the selected path, or null when the user cancelled."},{signature:"listDirectory(path?: string, signal?: AbortSignal): Promise<DirectoryListing>",description:"List one directory level through the Host's `browse` capability.",parameters:[{name:"path",description:"absolute directory to list; absent lists the Host home directory."},{name:"signal",description:"aborts the wire request (and the Host's scan) when the caller supersedes it."}],returns:"the level's listing with breadcrumb ancestry."},{signature:"createDirectory(path: string, name: string): Promise<string>",description:"Create one child directory through the Host's `browse` capability.",parameters:[{name:"path",description:"absolute existing parent directory."},{name:"name",description:"single non-blank path segment."}],returns:"the created directory's absolute path."},{signature:"openPath(path: string): Promise<void>",description:"Open a filesystem path with the Host operating system's default application.",parameters:[{name:"path",description:"absolute or host-resolvable path."}]},{signature:"rename(workspaceId: WorkspaceId, title: string): Promise<WorkspaceView>",description:"Rename a Workspace.",parameters:[{name:"workspaceId",description:"target workspace."},{name:"title",description:"the new display title."}],returns:"the updated Workspace view."},{signature:"delete(workspaceId: WorkspaceId): Promise<void>",description:"Delete a Workspace (its sessions fall back to the unaccounted group).",parameters:[{name:"workspaceId",description:"target workspace."}]},{signature:"insertSessionBefore(workspaceId: WorkspaceId, sessionId: SessionId, beforeSessionId?: SessionId): Promise<WorkspaceView>",description:"Move an accounted session within/into a Workspace's ordered list.",parameters:[{name:"workspaceId",description:"target workspace."},{name:"sessionId",description:"accounted session to move."},{name:"beforeSessionId",description:"accounted anchor to insert before; omitted appends."}],returns:"the updated Workspace view."},{signature:"archiveSession(sessionId: SessionId): Promise<void>",description:"Archive a session into the registry-global set (hidden from grouping surfaces; session log and accounting slot remain). Archiving the current session clears the selection into the New Session view state.",parameters:[{name:"sessionId",description:"session to archive."}]}]}],de=[{name:"connection/reset",mode:"emit",signature:"'connection/reset'(): void",summary:"A connection generation was (re-)established.",description:"A connection generation was (re-)established. Wire-derived caches must treat their state as stale and repull (commands directory; the queue mirrors reset themselves through the session resync path).",parameters:[]},{name:"locale/change",mode:"emit",signature:"'locale/change'(snapshot: LocaleSnapshot): void",summary:"The active locale switched.",description:"The active locale switched. Dictionary registrations do NOT emit this event (listeners may re-register slots in response, and boot registers one namespace per package); continuous render refresh rides the LocaleFace revision instead.",parameters:[{name:"snapshot",description:"Current immutable locale snapshot."}]},{name:"slots/changed",mode:"emit",signature:"'slots/changed'(key: string): void",summary:"A slot's definition or registration set changed.",description:"A slot's definition or registration set changed.",parameters:[{name:"key",description:"the mutated SlotMap key."}]},{name:"theme/change",mode:"emit",signature:"'theme/change'(snapshot: ThemeSnapshot): void",summary:"Theme state changed (preference switched, registry updated, or the OS color scheme changed while the preference is `system`).",description:"Theme state changed (preference switched, registry updated, or the OS color scheme changed while the preference is `system`).",parameters:[{name:"snapshot",description:"Current immutable theme snapshot."}]}],q=[{name:"ActionsDecl",declaration:"export type ActionsDecl<T> = Record<string, (draft: T, ...params: any[]) => void>;"},{name:"AgentContext",declaration:`export type AgentContext = Omit<Context, 'remote'> & {
4
+ The browser half is plain JavaScript (no JSX, no TypeScript); build elements with React.createElement.`):l}const c=await r(b,ne(e,l=>{n.noteError(l)}),o,{call:a((l,d=null)=>n.invoke(l,d),"call")},ee(),...Object.values(i),void 0,void 0);if(!R(c))throw c===void 0?new Error("client half returned `undefined` — did you forget `return`?\n ✓ return (ctx) => { … }\n ✓ return { name: '…', inject: ['slots'], apply(ctx) { … } }"):new Error("client half must `return` a plugin: a function, or an object with an `apply(ctx)` method");return c}a(j,"evaluateClientHalf");const O=new Set(["effect","on","once","provide","timeout","interval","setTimeout","setInterval","throttle","debounce"]),H=new Set(["timeout","interval","setTimeout","setInterval","throttle","debounce"]);function m(e,t,n){return e instanceof P.Context?y(n,`service "${t}" returned a cordis Context, which the dynamic facade does not expose. Operate through your own plugin ctx and the services you declared — never another context.`):e}a(m,"denyContext");function oe(e,t,n){return new Proxy(e,{get(o,i){const s=Reflect.get(o,i,o);return typeof s!="function"?m(s,t,n):(...r)=>{const c=Reflect.apply(s,o,r);return c instanceof Promise?c.then(l=>m(l,t,n)):m(c,t,n)}}})}a(oe,"guardedService");function se(e,t){return new Proxy(e,{get(n,o){const i=Reflect.get(n,o,n);return o!=="register"?typeof i!="function"?m(i,"slots",t):(...s)=>m(Reflect.apply(i,n,s),"slots",t):(s,r)=>{if(typeof s!="object"||s===null)return y(t,"slots.register(options, component) needs an options object with a `name`");const c={...s},l=c.name;if(typeof l!="string"||l.length===0)return y(t,"slots.register options need a string `name` (the target slot key)");if(l==="tool.view.cordis"){if(c.key!=="self")return y(t,'tool.view.cordis only accepts key "self"; the runtime binds it to this Package');c.key=`${t.pkg.pluginId}.${t.pkg.packageId}`}const d=e.spec(l);let h=c.priority;(d===void 0||d.kind!=="chain")&&(h=t.allocatePriority(),c.priority=h);const p=Reflect.get(n,"register",n).call(n,c,r);return t.ledger.push({slot:l,priority:h}),t.claim(r),p}}})}a(se,"guardedSlots");function re(e,t,n){return new Proxy(e,{get(o,i){if(i!=="overrideTokens"){const s=Reflect.get(o,i,o);return typeof s!="function"?m(s,"theme",t):(...r)=>{const c=Reflect.apply(s,o,r);return c instanceof Promise?c.then(l=>m(l,"theme",t)):m(c,"theme",t)}}return(s,r)=>{if(r===void 0&&typeof s=="object"&&s!==null)return y(t,"theme.overrideTokens(source, tokens) takes two arguments; source is replaced with your package id, so pass any string first and the token map second: overrideTokens('mine', { '--dsw-alias-…': { light: '…', dark: '…' } })");const c=Reflect.get(o,"overrideTokens",o),l=Reflect.apply(c,o,[`${t.pkg.pluginId}.${t.pkg.packageId}`,r]);return n.effect(()=>l,"cordis-client-runner: dynamic theme override layer"),l}}})}a(re,"guardedTheme");function A(e,t){const n=new Set(Object.keys(e.fiber.inject)),o=a(s=>e.get(s)!==void 0?y(t,`service "${s}" is not declared by your plugin. Declare it on the plugin you return: { inject: ['${s}', …], apply(ctx) { … } } — a plain \`function\` has no declaration site, so use the object form. The runtime then parks the package if the provider unloads.`):y(t,`dynamic ctx does not expose "${s}". Available: ctx.on / ctx.provide / timer helpers after injecting timer, and any service your returned plugin declared in inject (slots and theme are the usual UI seats). Framework internals are withheld by design.`),"denyRead"),i=a((s,r)=>{if(r&&!n.has(s))return o(s);const c=m(e.get(s),s,t);return c===null||typeof c!="object"&&typeof c!="function"?c:s==="slots"?se(c,t):s==="theme"?re(c,t,e):oe(c,s,t)},"readService");return new Proxy({},{get(s,r){if(r==="get")return c=>i(c,!1);if(typeof r=="string")return O.has(r)?(...c)=>{if(H.has(r)&&!n.has("timer"))return o("timer");const l=e[r];return Reflect.apply(l,e,c)}:i(r,!0)},set(s,r){return y(t,`dynamic ctx is read-only; cannot assign "${String(r)}"`)},has:a((s,r)=>r==="get"||typeof r=="string"&&(O.has(r)&&(!H.has(r)||n.has("timer"))||n.has(r)),"has")})}a(A,"dynamicCordisContext");function y(e,t){const n=new Error(t);throw e.reportFailure(n),n}a(y,"rejectGuard");function v(e){return`dyn/${e}`}a(v,"moduleIdOf");var E=class{static{a(this,"DynamicCordisPackageRunner")}env;live=new Map;queues=new Map;changeListeners=new Set;nextPriority=0;owners=new WeakMap;failures=new Map;unwatch;snapshotCache;failureCache;constructor(e){this.env=e,this.unwatch=e.slots.onEntryError((t,n,o,i)=>{const s=n.component,r=L(s)?this.owners.get(s):void 0;if(r===void 0)return;const c=g(o),l={slot:t,message:ie(t,c.message),...c.stack===void 0?{}:{stack:c.stack},abdicated:i.abdicated};e.reportRenderFailure(r.agentId,r.pluginId,r.pluginRunId,l),this.failures.set(r.pluginId,l),this.notify()})}subscribe(e){return this.changeListeners.add(e),()=>{this.changeListeners.delete(e)}}renderFailures={getSnapshot:a(()=>this.failureCache??=new Map(this.failures),"getSnapshot"),subscribe:a(e=>this.subscribe(e),"subscribe")};getSnapshot(){return this.snapshotCache??=[...this.live.values()].map(({pkg:e,ledger:t,styles:n})=>({pluginId:e.pluginId,packageId:e.packageId,pluginRunId:e.pluginRunId,name:e.name,slots:[...new Set(t.map(o=>o.slot))],styleCount:n.count}))}isLoaded(e){return this.live.has(e)}load(e){return this.enqueue(e.pluginId,async()=>{const t=this.live.get(e.pluginId);if(t!==void 0){if(t.pkg.pluginRunId===e.pluginRunId)return D(t);await this.teardown(t.pkg.pluginId,t.entryId,t.styles)}const n=await this.mount(e);return this.notify(),n})}retract(e,t){this.enqueue(e,async()=>{const n=this.live.get(e);n===void 0||n.pkg.pluginRunId!==t||(await this.teardown(e,n.entryId,n.styles),this.notify())})}async dispose(){this.unwatch();for(const e of[...this.live.values()])await this.teardown(e.pkg.pluginId,e.entryId,e.styles);this.notify()}notify(){this.snapshotCache=void 0,this.failureCache=void 0;for(const e of[...this.changeListeners])e()}enqueue(e,t){const n=(this.queues.get(e)??Promise.resolve()).then(t);return this.queues.set(e,n.then(()=>{},()=>{})),n}async mount(e){const t=new T(e.pluginId),n=[];let o;try{o=await j(e.pluginId,e.code,{invoke:a((p,Ee)=>this.env.invoke(e.pluginId,e.pluginRunId,p,Ee),"invoke"),noteError:a(p=>{console.error(`[cordis-client-runner] ${e.pluginId} logged an error:`,p)},"noteError")},t)}catch(p){return t.dispose(),{ok:!1,cause:"evaluate",...g(p),error:p}}const i={pluginId:e.pluginId,packageId:e.packageId,pluginRunId:e.pluginRunId,name:e.name},s=this.guardedSurface(i,e.agentId,o,n),r=v(e.pluginId);this.env.modules.invalidate(r);const c=globalThis.__ModuleLoader__;if(c===void 0)throw new Error("cordis-client-runner: window.__ModuleLoader__ is missing (booted outside the web shell?)");c.load({id:r,factory:a(()=>s,"factory")});const l=await this.env.loader.create({name:r}),d=this.env.loader.resolve(l).fiber;if(d===void 0)return await this.teardown(e.pluginId,l,t),{ok:!1,cause:"module-import",message:"module import failed (see the browser console)"};try{await d.await()}catch(p){return await this.teardown(e.pluginId,l,t),{ok:!1,cause:"activate",...g(p),error:p}}const h={pkg:i,entryId:l,styles:t,ledger:n,waitingFor:Object.keys(d.inject).filter(p=>this.env.ctx.get(p)===void 0)};return this.live.set(e.pluginId,h),this.failures.delete(e.pluginId),D(h)}guardedSurface(e,t,n,o){const i=a(r=>{L(r)&&this.owners.set(r,{pluginId:e.pluginId,pluginRunId:e.pluginRunId,agentId:t})},"claim"),s=a(r=>A(r,{pkg:e,ledger:o,claim:i,allocatePriority:a(()=>--this.nextPriority,"allocatePriority"),reportFailure:a(c=>{this.env.reportGuardFailure(t,e.pluginId,e.pluginRunId,g(c))},"reportFailure")}),"guarded");return typeof n=="function"?{name:v(e.pluginId),apply:a(r=>n(s(r)),"apply")}:{...n,name:v(e.pluginId),apply:a((r,c)=>n.apply(s(r),c),"apply")}}async teardown(e,t,n){this.live.delete(e),this.failures.delete(e),await this.env.loader.remove(t),this.env.modules.invalidate(v(e)),n.dispose()}};function D(e){return{ok:!0,pluginRunId:e.pkg.pluginRunId,...e.waitingFor.length>0?{waitingFor:e.waitingFor}:{}}}a(D,"settled");function L(e){return typeof e=="object"&&e!==null||typeof e=="function"}a(L,"indexable");function g(e){if(typeof e!="object"||e===null)return{message:String(e)};const t="message"in e&&typeof e.message=="string"?e.message:Object.prototype.toString.call(e),n="stack"in e&&typeof e.stack=="string"?e.stack:void 0;return{message:t,...n===void 0?{}:{stack:n}}}a(g,"errorDetails");function ie(e,t){const n=Object.entries(C).find(([o,i])=>t.includes(o)&&!t.includes(i))?.[1];return`your entry in slot "${e}" crashed while React rendered it: ${t}`+(n===void 0?"":`
5
+ ${n}`)}a(ie,"renderFailureMessage");var M=class{static{a(this,"CordisRunOrchestrator")}env;requests=new Map;activity=new Map;failures=new Map;inFlight=new Map;listeners=new Set;activityCache;failureCache;constructor(e){this.env=e}activeRuns={getSnapshot:a(()=>this.activityCache??=new Map(this.activity),"getSnapshot"),subscribe:a(e=>this.observe(e),"subscribe")};lastRunError={getSnapshot:a(()=>this.failureCache??=new Map(this.failures),"getSnapshot"),subscribe:a(e=>this.observe(e),"subscribe")};open(e){if(this.requests.set(e.requestId,e),!e.requiresApproval){this.orchestrate({agentId:e.agentId,pluginId:e.pluginId,packageId:e.packageId,mode:e.mode,requestId:e.requestId,hasClientHalf:!0}).catch(t=>{console.error(`[cordis-client-runner] automatic activation ${e.requestId} failed:`,t)});return}this.activity.get(e.pluginId)?.phase!=="orchestrating"&&this.activity.set(e.pluginId,{phase:"awaiting-approval",requestId:e.requestId,agentId:e.agentId,packageId:e.packageId,mode:e.mode,name:e.name,purpose:e.purpose}),this.commit()}reconcileApprovals(e){const t=new Map;for(const o of e){const i=o.latestRun;if(i?.approvalRequestId===void 0||i.status!=="awaiting-approval"&&i.status!=="starting-host"&&i.status!=="client-pending")continue;const s=o.packages.find(r=>r.packageId===i.packageId);s!==void 0&&t.set(i.approvalRequestId,{requestId:i.approvalRequestId,agentId:o.agentId,pluginId:o.pluginId,packageId:i.packageId,mode:i.mode,name:s.name,purpose:s.purpose,requiresApproval:i.requiresApproval??i.status==="awaiting-approval"})}let n=!1;for(const[o,i]of[...this.requests]){if(t.has(o))continue;this.requests.delete(o);const s=this.activity.get(i.pluginId);s?.phase==="awaiting-approval"&&s.requestId===o&&this.activity.delete(i.pluginId),n=!0}for(const[o,i]of t){const s=this.requests.get(o),r=this.activity.get(i.pluginId);if(!(!i.requiresApproval&&r?.phase==="orchestrating")&&!(i.requiresApproval&&ae(s,i)&&r?.phase==="awaiting-approval"&&r.requestId===o)){if(!i.requiresApproval){this.open(i),n=!0;continue}this.requests.set(o,i),r?.phase!=="orchestrating"&&this.activity.set(i.pluginId,{phase:"awaiting-approval",requestId:o,agentId:i.agentId,packageId:i.packageId,mode:i.mode,name:i.name,purpose:i.purpose}),n=!0}}n&&this.commit()}close(e){const t=this.requests.get(e);if(t===void 0)return;this.requests.delete(e);const n=this.activity.get(t.pluginId);n?.phase==="awaiting-approval"&&n.requestId===e&&this.activity.delete(t.pluginId),this.commit()}approve(e,t){const n=this.requests.get(e);return n===void 0||!n.requiresApproval?Promise.resolve():this.orchestrate({agentId:n.agentId,pluginId:n.pluginId,packageId:n.packageId,mode:n.mode,requestId:e,approveFutureVersions:t,hasClientHalf:!0})}async decline(e){const t=this.requests.get(e);if(t===void 0||!t.requiresApproval)return;const n=this.activity.get(t.pluginId);n?.phase!=="awaiting-approval"||n.requestId!==e||(this.requests.delete(e),this.activity.delete(t.pluginId),this.commit(),await this.answer(e,{ok:!1,reason:"rejected"}))}startUserRun(e){return this.orchestrate(e)}observe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}commit(){this.activityCache=void 0,this.failureCache=void 0;for(const e of[...this.listeners])e()}orchestrate(e){const t=this.inFlight.get(e.pluginId);if(t!==void 0)return t;this.activity.set(e.pluginId,{phase:"orchestrating",agentId:e.agentId,packageId:e.packageId,mode:e.mode}),this.failures.delete(e.pluginId),e.requestId!==void 0&&this.requests.delete(e.requestId),this.commit();const n=this.drive(e).finally(()=>{this.inFlight.delete(e.pluginId),this.activity.delete(e.pluginId),this.commit()});return this.inFlight.set(e.pluginId,n),n}async drive(e){const t=await this.startHost(e);if(!t.ok){this.fail(e,"host-half-failed",t),e.requestId!==void 0&&await this.answer(e.requestId,{...t,reason:"host-half-failed"});return}if(!e.hasClientHalf)return;let n;try{n=await this.env.host.getClientCode(e.agentId,e.pluginId,t.pluginRunId)}catch(s){await this.finishClientFailure(e,t.pluginRunId,t.startedHere,g(s),s);return}const o=await this.env.runner.load({pluginId:n.pluginId,packageId:n.packageId,pluginRunId:n.pluginRunId,agentId:e.agentId,name:n.name,code:n.code}).catch(s=>({ok:!1,cause:"evaluate",...g(s),error:s}));if(!o.ok){await this.finishClientFailure(e,t.pluginRunId,t.startedHere,{message:`${o.cause}: ${o.message}`,...o.stack===void 0?{}:{stack:o.stack}},o.error);return}const i={ok:!0,pluginRunId:o.pluginRunId,...o.waitingFor===void 0?{}:{waitingFor:o.waitingFor}};if(e.requestId!==void 0){await this.answer(e.requestId,i);return}await this.settleDirect(e,i)}async startHost(e){try{return await this.env.host.runHostHalf(e.agentId,e.pluginId,e.packageId,e.mode,e.requestId??null,e.approveFutureVersions??!1)}catch(t){return{ok:!1,...g(t)}}}async finishClientFailure(e,t,n,o,i){console.error(`[cordis-client-runner] Client activation ${e.pluginId}/${e.packageId} (${t}) failed:`,i??o),this.fail(e,"client-half-failed",o);const s={ok:!1,reason:"client-half-failed",pluginRunId:t,startedHere:n,...o};e.requestId!==void 0?await this.answer(e.requestId,s):await this.settleDirect(e,s)}async settleDirect(e,t){try{const n=await this.env.host.settleUserRun(e.agentId,e.pluginId,t);n.ok||this.fail(e,"client-half-failed",n)}catch(n){this.fail(e,"client-half-failed",g(n))}}async answer(e,t){try{await this.env.host.resolveRequestRun(e,t)}catch(n){console.error(`[cordis-client-runner] answering run request ${e} failed:`,n)}}fail(e,t,n){this.failures.set(e.pluginId,{packageId:e.packageId,reason:t,...n}),this.commit()}};function ae(e,t){return e?.requestId===t.requestId&&e.agentId===t.agentId&&e.pluginId===t.pluginId&&e.packageId===t.packageId&&e.mode===t.mode&&e.name===t.name&&e.purpose===t.purpose&&e.requiresApproval===t.requiresApproval}a(ae,"sameRequest");var q=class{static{a(this,"ClientCordisInspectRegistry")}host;providers=new Map;active=new Map;publishQueued=!1;syncChain=Promise.resolve();constructor(e){this.host=e}register(e){const{manifest:t}=e;if(t.id.trim()==="")throw new Error("Client Cordis inspect provider id must not be empty");if(this.providers.has(t.id))throw new Error(`Client Cordis inspect provider "${t.id}" is already registered`);const n=new Set;for(const i of t.methods){if(n.has(i.name))throw new Error(`Client Cordis inspect provider "${t.id}" repeats method "${i.name}"`);n.add(i.name)}this.providers.set(t.id,e),this.publish();let o=!1;return()=>{o||(o=!0,this.providers.get(t.id)===e&&(this.providers.delete(t.id),this.publish()))}}publish(){this.publishQueued||(this.publishQueued=!0,queueMicrotask(()=>{this.publishQueued=!1;const e=[...this.providers.values()].map(t=>t.manifest);this.syncChain=this.syncChain.then(async()=>{await this.host.sync(e)}).catch(t=>{console.error("[cordis-client-runner] syncing inspect providers failed:",t)})}))}async query(e){if(this.active.has(e.requestId))return;const t=new AbortController;this.active.set(e.requestId,t);let n;try{const o=this.providers.get(e.provider);if(o===void 0)n={ok:!1,reason:"provider-missing",message:`Client inspect provider "${e.provider}" is unavailable`};else if(!o.manifest.methods.some(i=>i.name===e.method))n={ok:!1,reason:"method-missing",message:`Client inspect provider "${e.provider}" has no method "${e.method}"`};else{const i=await o.query(e.method,e.input,{signal:t.signal,sessionId:e.agentId});n=t.signal.aborted?{ok:!1,reason:"cancelled",message:"Client inspect query was cancelled"}:{ok:!0,data:i}}}catch(o){n=t.signal.aborted?{ok:!1,reason:"cancelled",message:"Client inspect query was cancelled"}:{ok:!1,reason:"provider-error",message:o instanceof Error?o.message:String(o)}}finally{this.active.delete(e.requestId)}t.signal.aborted||await this.host.resolve(e.agentId,e.requestId,n)}close(e){this.active.get(e)?.abort(),this.active.delete(e)}};function ce(e,t){e.provide("cordisInspect",t)}a(ce,"provideClientCordisInspect");const le=[{key:"layout",summary:"The outward layout face (`ctx.layout`): the panel transitions other plugins may trigger — and exactly what a test fake must supply.",description:"The outward layout face (`ctx.layout`): the panel transitions other plugins may trigger — and exactly what a test fake must supply. The attachPanels wiring hook stays on the concrete class (root-entry assembly only).",methods:[{signature:"toggleSidebar(): void",description:"Toggle the sidebar panel (closed ⟷ contract default width).",parameters:[]},{signature:"openDetails(): void",description:"Open the details panel (no-op when already open).",parameters:[]},{signature:"closeDetails(): void",description:"Close the details panel.",parameters:[]}]},{key:"locale",summary:"Dictionary registry plus locale preference.",description:"Dictionary registry plus locale preference. Lookup chain per key: the entry's namespace in the active locale -> that namespace's zh fallback -> the shared common namespace (active, then zh) -> the key itself (missing text stays visible, fail loud in the UI rather than blank). Reads go through getLocale; writes only through setLocale; continuous sync through the `locale/change` event, or through the LocaleFace getSnapshot/subscribe pair the render machinery consumes (installed via `ctx.slots.installLocale`).",methods:[{signature:"getLocale(): LocaleSnapshot",description:"Read the current immutable locale snapshot.",parameters:[],returns:"the current snapshot (stable reference until the next change)."},{signature:"getSnapshot(): LocaleSnapshot",description:"LocaleFace getSnapshot: the current snapshot (carries `revision`; stable reference between changes, uSES-safe).",parameters:[],returns:"the current snapshot."},{signature:"subscribe(fn: () => void): () => void",description:"LocaleFace subscribe: notified on every snapshot change (locale switch or dictionary registration — registrations bump the revision so already rendered outlets pick up late-arriving dictionaries).",parameters:[{name:"fn",description:"change callback."}],returns:"unsubscribe."},{signature:"setLocale(id: string): void",description:"Switch the active locale — the only user preference write entry.",parameters:[{name:"id",description:"a registered locale id; unknown ids throw."}]},{signature:"register<N extends keyof LocaleNamespaceMap & string>(ns: N, dicts: Record<LocaleId, LocaleDictOf<N>>): () => void",description:"Register a declared namespace's dictionaries, all locales in one call — the typed form: each dictionary is checked against the namespace's LocaleNamespaceMap key union (a missing or extra key is a compile error), and every shipped locale is required (bilingual balance enforced at registration). Duplicate (ns, locale) throws (single occupant; a namespace's texts have one owner). Registration bumps the revision so mounted outlets pick up late-arriving dictionaries.",parameters:[{name:"ns",description:"a namespace merged into LocaleNamespaceMap."},{name:"dicts",description:"complete dictionaries keyed by locale id."}],returns:"disposer removing every locale registered by this call (idempotent)."},{signature:"register(ns: string, locale: string, dict: LocaleDict): () => void",description:"Single-locale untyped form for namespaces outside the merge table (dynamic composition, tests).",parameters:[{name:"ns",description:"namespace."},{name:"locale",description:"locale tag."},{name:"dict",description:"dictionary."}],returns:"disposer (idempotent)."},{signature:"bind<N extends keyof LocaleNamespaceMap & string>(ns: N): TranslateNS<N>",description:"Bind a declared namespace to a translate function typed to its dictionary key union (plus the shared common vocabulary) — the same key domain the framework-injected `t` seat carries. The returned reference is stable per namespace (repeat binds return the same function), so it can ride inject surfaces without breaking memoization.",parameters:[{name:"ns",description:"a namespace merged into LocaleNamespaceMap."}],returns:"the typed translate function (reads the active locale at call time)."},{signature:"bind(ns: string): Translate",description:"Untyped form for namespaces outside the merge table (dynamic composition, tests).",parameters:[{name:"ns",description:"namespace."}],returns:"the translate function."}]},{key:"sessions",summary:"The sessions-service face injected as `ctx.sessions`.",description:"The sessions-service face injected as `ctx.sessions`.",methods:[{signature:"open(id: SessionId): void",description:"Select a session as current.",parameters:[{name:"id",description:"session id (must exist in the list; unknown ids fail loud)."}]},{signature:"openSubagent(address: SubagentAddress): void",description:"Open a healthy catalog child through its exact direct-parent address.",parameters:[{name:"address",description:"catalog-derived parent and child ids."}]},{signature:"setSubagentCatalogOpen(parentSessionId: SessionId, open: boolean): void",description:"Mark whether a catalog menu is consuming live membership updates.",parameters:[{name:"parentSessionId",description:"catalog owner."},{name:"open",description:"current menu state."}]},{signature:"refreshSubagents(parentSessionId: SessionId): Promise<void>",description:"Refresh one direct-child catalog.",parameters:[{name:"parentSessionId",description:"catalog owner."}],returns:"completion of the current or newly started refresh."},{signature:"search( query: string, signal: AbortSignal, ): Promise<RpcResult<{ items: SessionSearchResultItem[]; hasMore: boolean }>>",description:"Search the Host's visible message-content index. Results stay request-local; the list snapshot remains the metadata authority.",parameters:[{name:"query",description:"non-blank literal phrase."},{name:"signal",description:"cancellation for a superseded search."}],returns:"bounded results, or a business/transport error."},{signature:"fork(opts: { sessionId: SessionId; atSeq?: number; increaseTitle?: boolean }): Promise<SessionId>",description:"Fork a session from a completed-turn prefix of the source; on resolution the child is in the list store and `open()` can target it.",parameters:[{name:"opts",description:"source session id, the optional event seq anchoring the cut (the boundary is the first turn/end at or after it; an in-log anchor in an open turn is unavailable rather than clipped backward), and whether to increment an inherited durable title before resolving."}],returns:"the child session id.",throws:["when the fork fails, or when a requested child-title rename fails after creation."]},{signature:"scope(id: SessionId): AgentContext | undefined",description:"Resolve an Agent-scoped context view (use-and-discard).",parameters:[{name:"id",description:"session id."}],returns:"scoped ctx, or undefined for a session neither listed nor already scoped."},{signature:"binding(id: SessionId): SessionBinding | undefined",description:"Resolve the stable session binding (scope-addressed assembly feed).",parameters:[{name:"id",description:"session id."}],returns:"binding, or undefined for a session neither listed nor already scoped."}]},{key:"slots",summary:"cordis Service layer of the slot system; see the module doc for the split with SlotCore.",description:"cordis Service layer of the slot system; see the module doc for the split with SlotCore.",methods:[{signature:"declare readonly register: SlotCore['register']",description:"The single registration API. The typed face IS the core's register (both overloads reused verbatim — one authority, no structural copy; see SlotCore.register for children declaration, store seat, inject face, load-time validation, and the unload cascade). This layer adds: disposal through the caller's ctx.effect (fiber unload = cascade), exclusive-factory minting (`store: createXxxStore` becomes a per-entry handle), the registrant diagnostics stamp, and store-instance lifecycle on the entry axis.\n\nDeclared here, implemented by prototype assignment below the class: it MUST stay a prototype method (never an instance arrow) — the cordis service proxy binds `this.ctx` to the CALLER's context at call time, which is what routes the effect (and the unload cascade) into the caller's fiber. An arrow property would freeze `this` to the service's own root ctx and silently break per-plugin disposal.",parameters:[]},{signature:"inject(key: keyof SlotMap & string, callback: () => SlotInjectionEffect): () => void",description:"Install an effect for each declaration lifetime of a slot. The callback runs synchronously when the declaration already exists; otherwise it runs inside the declaring `register()` call after the declaration is committed. Collapse disposes the effect and a later declaration runs it again. Callback effects are synchronous disposers; iterable effects install transactionally and dispose in reverse order. The controller belongs to the caller's fiber, so plugin unload cancels a pending wait and removes any active contribution.",parameters:[{name:"key",description:"declared SlotMap key to depend on."},{name:"callback",description:"creates one disposer or an iterable of disposers."}],returns:"idempotent disposer for the wait and active effect.",throws:["callback setup failures synchronously when the slot is already declared."]}]},{key:"theme",summary:"Theme registry and preference owner.",description:"Theme registry and preference owner. `light`/`dark` are built in (the base stylesheets carry both palettes); third-party themes register alias-layer overrides. Reads go through getTheme; preference writes only through setTheme; continuous sync only through the `theme/change` event. overrideTokens stacks partial token layers over the active theme without touching the registry. The service holds the `prefers-color-scheme` media query (environment sensing, not presentation) and re-emits when the OS scheme flips while the preference is `system`.",methods:[{signature:"getTheme(): ThemeSnapshot",description:"Read the current immutable theme snapshot.",parameters:[],returns:"the current snapshot (stable reference until the next change)."},{signature:"setTheme(id: string): void",description:"Switch the theme preference — the only user preference write entry. Built-in preferences are written through the settings scope and every accepted value emits `theme/change`.",parameters:[{name:"id",description:"a registered theme id or `system`; unknown ids throw."}]},{signature:"register(definition: ThemeDefinition): () => void",description:"Register a theme. Duplicate id throws (single occupant per id; the built-in pair counts; `system` is a preference, not a registrable id).",parameters:[{name:"definition",description:"theme id, colorScheme, and alias-token overrides."}],returns:"disposer. Disposing the theme backing the active preference resets the preference to the default so the UI never keeps tokens of an unregistered theme."},{signature:"overrideTokens(source: string, tokens: ThemeTokenOverrides): () => void",description:"Stack a token override layer on top of the active theme — the token-level analogue of slot shading: the base theme stays untouched, layers compose in seq order with later layers winning per-token, and removing a layer restores whatever it covered. Calling again with the same source replaces that source's whole layer and restacks it on top (effect re-registration semantics). Emits `theme/change` with the recomposed snapshot.",parameters:[{name:"source",description:"layer identity; one layer per source (dynamic packages pass their package id — the façade pins it, so it also names the layer's origin for inspection)."},{name:"tokens",description:"token-name → `{ light, dark }` value pairs. Validated at runtime (model-authored callers reach this boundary with untyped JS); a bare string value throws a teaching error."}],returns:"disposer removing exactly the layer this call created; a no-op once the source has re-overridden (the newer layer is not torn down)."}]},{key:"timer",summary:"Disposable timer helpers mixed into Cordis contexts.",description:"Disposable timer helpers mixed into Cordis contexts.",methods:[{signature:"timeout(callback: () => void, delay: number): () => void",description:"Run a callback once and return its disposer.",parameters:[]},{signature:"timeout(delay: number): Promise<void>",description:"Resolve after a delay; disposal rejects the pending promise.",parameters:[]},{signature:"interval(callback: () => void, delay: number): () => void",description:"Run a callback repeatedly and return its disposer.",parameters:[]},{signature:"interval<R = any>(delay: number): AsyncIterableIterator<void, R, void>",description:"Return an async iterator of timer ticks.",parameters:[]},{signature:"throttle<F extends (...args: any[]) => void>(callback: F, delay: number, noTrailing?: boolean): F & { dispose: () => void }",description:"Return a throttled function whose timer is disposed with the current fiber.",parameters:[]},{signature:"debounce<F extends (...args: any[]) => void>(callback: F, delay: number): F & { dispose: () => void }",description:"Return a debounced function whose timer is disposed with the current fiber.",parameters:[]}]},{key:"workspaces",summary:"The workspaces-service face injected as `ctx.workspaces`.",description:"The workspaces-service face injected as `ctx.workspaces`.",methods:[{signature:"connectWorkspace(workspaceId: WorkspaceId): Promise<SessionId>",description:"Connect a Workspace to its reusable or freshly created blank session.",parameters:[{name:"workspaceId",description:"target workspace."}],returns:"the connected session id."},{signature:"startSession(workspaceId?: WorkspaceId): void",description:"The New Session flow: connect the explicit, current-Session, or recent Workspace and open the resulting session; failures surface on the session list state.",parameters:[{name:"workspaceId",description:"explicit target; omitted inherits the current Session's Workspace before falling back to the recency projection."}]},{signature:"create(input: { path: string }): Promise<WorkspaceView>",description:"Register an existing path as a Workspace.",parameters:[{name:"input",description:"the Host create payload."}],returns:"the created or idempotently resolved Workspace."},{signature:"pickDirectory(): Promise<string | null>",description:"Open the Host's native directory picker.",parameters:[],returns:"the selected path, or null when the user cancelled."},{signature:"listDirectory(path?: string, signal?: AbortSignal): Promise<DirectoryListing>",description:"List one directory level through the Host's `browse` capability.",parameters:[{name:"path",description:"absolute directory to list; absent lists the Host home directory."},{name:"signal",description:"aborts the wire request (and the Host's scan) when the caller supersedes it."}],returns:"the level's listing with breadcrumb ancestry."},{signature:"createDirectory(path: string, name: string): Promise<string>",description:"Create one child directory through the Host's `browse` capability.",parameters:[{name:"path",description:"absolute existing parent directory."},{name:"name",description:"single non-blank path segment."}],returns:"the created directory's absolute path."},{signature:"openPath(path: string): Promise<void>",description:"Open a filesystem path with the Host operating system's default application.",parameters:[{name:"path",description:"absolute or host-resolvable path."}]},{signature:"rename(workspaceId: WorkspaceId, title: string): Promise<WorkspaceView>",description:"Rename a Workspace.",parameters:[{name:"workspaceId",description:"target workspace."},{name:"title",description:"the new display title."}],returns:"the updated Workspace view."},{signature:"delete(workspaceId: WorkspaceId): Promise<void>",description:"Delete a Workspace (its sessions fall back to the unaccounted group).",parameters:[{name:"workspaceId",description:"target workspace."}]},{signature:"insertSessionBefore(workspaceId: WorkspaceId, sessionId: SessionId, beforeSessionId?: SessionId): Promise<WorkspaceView>",description:"Move an accounted session within/into a Workspace's ordered list.",parameters:[{name:"workspaceId",description:"target workspace."},{name:"sessionId",description:"accounted session to move."},{name:"beforeSessionId",description:"accounted anchor to insert before; omitted appends."}],returns:"the updated Workspace view."},{signature:"archiveSession(sessionId: SessionId): Promise<void>",description:"Archive a session into the registry-global set (hidden from grouping surfaces; session log and accounting slot remain). Archiving the current session clears the selection into the New Session view state.",parameters:[{name:"sessionId",description:"session to archive."}]}]}],de=[{name:"connection/reset",mode:"emit",signature:"'connection/reset'(): void",summary:"A connection generation was (re-)established.",description:"A connection generation was (re-)established. Wire-derived caches must treat their state as stale and repull (commands directory; the queue mirrors reset themselves through the session resync path).",parameters:[]},{name:"locale/change",mode:"emit",signature:"'locale/change'(snapshot: LocaleSnapshot): void",summary:"The active locale switched.",description:"The active locale switched. Dictionary registrations do NOT emit this event (listeners may re-register slots in response, and boot registers one namespace per package); continuous render refresh rides the LocaleFace revision instead.",parameters:[{name:"snapshot",description:"Current immutable locale snapshot."}]},{name:"slots/changed",mode:"emit",signature:"'slots/changed'(key: string): void",summary:"A slot's definition or registration set changed.",description:"A slot's definition or registration set changed.",parameters:[{name:"key",description:"the mutated SlotMap key."}]},{name:"theme/change",mode:"emit",signature:"'theme/change'(snapshot: ThemeSnapshot): void",summary:"Theme state changed (preference switched, registry updated, or the OS color scheme changed while the preference is `system`).",description:"Theme state changed (preference switched, registry updated, or the OS color scheme changed while the preference is `system`).",parameters:[{name:"snapshot",description:"Current immutable theme snapshot."}]}],N=[{name:"ActionsDecl",declaration:"export type ActionsDecl<T> = Record<string, (draft: T, ...params: any[]) => void>;"},{name:"AgentContext",declaration:`export type AgentContext = Omit<Context, 'remote'> & {
6
6
  readonly remote: TypertClientRemote & TypertRemoteScopeApi<'agent'>;
7
7
  };`},{name:"AssistantBlock",declaration:`export type AssistantBlock = {
8
8
  kind: 'text';
@@ -457,7 +457,7 @@ ${n}`)}a(ie,"renderFailureMessage");var L=class{static{a(this,"CordisRunOrchestr
457
457
  time: number;
458
458
  content: readonly ContentBlock[];
459
459
  source: unknown;
460
- }`}];function N(e){const t=new Set;let n=[...e];for(;n.length>0;){const o=[];for(const i of q){if(t.has(i.name))continue;const s=new RegExp(`\b${i.name}\b`);n.some(r=>s.test(r))&&(t.add(i.name),o.push(i.declaration))}n=o}return q.filter(o=>t.has(o.name))}a(N,"referencedTypeClosure");function pe(e){return/^[A-Za-z_$][\w$]*$/.test(e)?`ctx.${e}`:`ctx[${JSON.stringify(e)}]`}a(pe,"contextProperty");function ue(e,t=le){if(e===void 0)return{mode:"catalog",services:t.map(o=>({key:o.key,description:o.summary,methods:o.methods.map(i=>({signature:i.signature}))}))};const n=t.find(o=>o.key===e);if(n===void 0)throw new Error(`no catalogued Service named "${e}"`);return{mode:"service",service:{key:n.key,description:n.description,access:{optional:{expression:`ctx.get(${JSON.stringify(n.key)})`,requiresUndefinedCheck:!0},hardDependency:{inject:[n.key],expression:pe(n.key)}},methods:n.methods},referencedTypes:N(n.methods.map(o=>o.signature))}}a(ue,"queryServiceApi");function he(e,t=de){if(e===void 0)return{mode:"catalog",events:t.map(o=>({name:o.name,description:o.summary,mode:o.mode,signature:o.signature}))};const n=t.find(o=>o.name===e);if(n===void 0)throw new Error(`no catalogued Event named "${e}"`);return{mode:"event",event:{name:n.name,description:n.description,mode:n.mode,signature:n.signature,parameters:n.parameters},referencedTypes:N([n.signature])}}a(he,"queryEventApi");const me=[{key:"conversation",kind:"single",scope:"session-maybe",summary:"The whole center column, across both the no-session hero and a live conversation.",doc:`The whole center column, across both the no-session hero and a live
460
+ }`}];function W(e){const t=new Set;let n=[...e];for(;n.length>0;){const o=[];for(const i of N){if(t.has(i.name))continue;const s=new RegExp(`\b${i.name}\b`);n.some(r=>s.test(r))&&(t.add(i.name),o.push(i.declaration))}n=o}return N.filter(o=>t.has(o.name))}a(W,"referencedTypeClosure");function pe(e){return/^[A-Za-z_$][\w$]*$/.test(e)?`ctx.${e}`:`ctx[${JSON.stringify(e)}]`}a(pe,"contextProperty");function ue(e,t=le){if(e===void 0)return{mode:"catalog",services:t.map(o=>({key:o.key,description:o.summary,methods:o.methods.map(i=>({signature:i.signature}))}))};const n=t.find(o=>o.key===e);if(n===void 0)throw new Error(`no catalogued Service named "${e}"`);return{mode:"service",service:{key:n.key,description:n.description,access:{optional:{expression:`ctx.get(${JSON.stringify(n.key)})`,requiresUndefinedCheck:!0},hardDependency:{inject:[n.key],expression:pe(n.key)}},methods:n.methods},referencedTypes:W(n.methods.map(o=>o.signature))}}a(ue,"queryServiceApi");function he(e,t=de){if(e===void 0)return{mode:"catalog",events:t.map(o=>({name:o.name,description:o.summary,mode:o.mode,signature:o.signature}))};const n=t.find(o=>o.name===e);if(n===void 0)throw new Error(`no catalogued Event named "${e}"`);return{mode:"event",event:{name:n.name,description:n.description,mode:n.mode,signature:n.signature,parameters:n.parameters},referencedTypes:W([n.signature])}}a(he,"queryEventApi");const me=[{key:"conversation",kind:"single",scope:"session-maybe",summary:"The whole center column, across both the no-session hero and a live conversation.",doc:`The whole center column, across both the no-session hero and a live
461
461
  conversation. OCCUPIED by ui-conversation's ConversationRoot, which
462
462
  declares the session body, composer, and input seats inside it —
463
463
  registering here replaces the entire conversation surface (and removes
@@ -1224,7 +1224,7 @@ export interface CordisToolViewOwnerProps {
1224
1224
  () => React.createElement('div', null, 'hello'),
1225
1225
  ))
1226
1226
  },
1227
- }`,source:"packages/extensions/ui-cordis/src/client/slots.ts:31"}],ye={type:"object",properties:{},additionalProperties:!1},ge={description:"JSON data owned by this inspect provider."},ke=W("service","Exact Service key. Omit it for the compact Service and method-signature directory."),fe=W("event","Exact Event name. Omit it for the compact Event and listener-signature directory."),we={description:"Compact Service directory, or one exact Service contract with only its referenced type declarations."},ve={description:"Compact Event directory, or one exact Event contract with only its referenced type declarations."},Se={description:"Compact purpose/topology trees. With root, selected also contains that Slot's full contract and live occupants."},be={type:"object",properties:{root:{type:"string",description:"Exact live Slot key. When supplied, selected contains the full contract for this Slot."}},additionalProperties:!1},xe=[{name:"ctx",description:"Restricted Cordis Context. Prefer ctx.get(name) with an undefined check; use inject only for hard dependencies.",signatures:["ctx.get(name: string): unknown | undefined","ctx.on(name: string, listener: Function): () => void","ctx.provide(name: string, value: unknown): () => void","ctx.effect(callback: Function, label?: string): () => void"]},{name:"React",description:"React runtime exposed without JSX transformation.",signatures:["React.createElement(type, props, ...children): ReactElement","React.useState(initial)","React.useEffect(effect, deps)"]},{name:"host",description:"Package-private JSON RPC from Client to this Package's Host half.",signatures:["host.call(method: string, args?: JsonValue): Promise<JsonValue>"]},{name:"styles",description:"Package-owned stylesheet insertion cleaned up with the Client run.",signatures:["styles.insert(css: string): () => void"]},{name:"console",description:"Package-tagged browser logging.",signatures:["console.log(...values): void","console.error(...values): void"]}];function Ie(e){return[S("Service","Progressive Client Service discovery: compact capability/signature directory, then one exact coding contract.","listService",t=>ue(K(t,"service")),ke,we),S("Event","Progressive Client Event discovery: compact listener directory, then one exact event contract.","listEvents",t=>he(K(t,"event")),fe,ve),S("Builtin","Plain-JavaScript symbols available to a dynamic Client half.","listBuiltins",()=>({builtins:[...xe],referencedTypes:[]})),{manifest:{id:"Slots",description:"Progressive live Slot inspection: compact purpose/topology trees plus one exact Slot contract.",methods:[{name:"listSubTree",description:"Return compact live Slot trees for navigation. With root, also return the selected Slot's full contract and occupants.",inputSchema:be,outputSchema:Se}]},query(t,n){if(t!=="listSubTree")throw new Error(`unknown Slots inspect method "${t}"`);const o=e.get("slots");if(o===void 0)throw new Error("Client Slots service is not running");const i=typeof n=="object"&&n!==null&&!Array.isArray(n)&&typeof n.root=="string"?n.root:void 0,s=o.snapshot(i),r=s[0];return Promise.resolve({...i===void 0?{}:{requestedRoot:{name:i,available:s.length>0}},trees:s.map(_),...i===void 0||r===void 0?{}:{selected:Pe(r)},referencedTypes:[]})}},S("Theme","Current theme token names and light/dark override requirements.","listTokens",()=>{const t=e.get("theme");if(t===void 0)throw new Error("Client Theme service is not running");return{tokens:t.exportInspectTokens(),referencedTypes:[]}})]}a(Ie,"clientInspectProviders");function S(e,t,n,o,i=ye,s=ge){return{manifest:{id:e,description:t,methods:[{name:n,description:t,inputSchema:i,outputSchema:s}]},async query(r,c){if(r!==n)throw new Error(`unknown ${e} inspect method "${r}"`);return await o(c)}}}a(S,"registration");function W(e,t){return{type:"object",properties:{[e]:{type:"string",description:t}},additionalProperties:!1}}a(W,"exactInput");function K(e,t){if(e==null||Array.isArray(e)||typeof e!="object")return;const n=e[t];return typeof n=="string"?n:void 0}a(K,"readExact");const B=new Map(me.map(e=>[e.key,e])),F=new Map([["tool.view.cordis",{description:"fixed by the dynamic Client Guard",values:[{value:"self",description:"The only accepted key. The Guard binds it to this Package's pluginId and packageId."}]}]]);function _(e){const t=B.get(e.name),n=t===void 0?void 0:F.get(t.key);return{name:e.name,kind:e.kind,scope:e.scope,...t===void 0?{}:{purpose:t.summary,replaceRisk:t.replaceRisk,...t.registerOptions.length===0?{}:{registration:t.registerOptions.map(o=>({name:o.name,type:o.type,required:o.requirement==="required"}))},...t.keyDomain===""?{}:{keyDomain:n?.description??t.keyDomain,...n===void 0?{}:{allowedKeys:n.values.map(o=>({...o}))}}},children:e.children.map(_)}}a(_,"compactSlotTree");function Pe(e){const t=B.get(e.name);return{name:e.name,kind:e.kind,scope:e.scope,...e.declaredBy===void 0?{}:{declaredBy:e.declaredBy},occupants:e.occupants.map(n=>({...n})),...t===void 0?{}:{catalog:Ce(t)}}}a(Pe,"inspectLiveSlot");function Ce(e){const t=F.get(e.key);return{description:e.doc,registration:e.registerOptions.map(n=>({name:n.name,type:n.type,required:n.requirement==="required",description:n.doc})),ownerProps:[...e.ownerProps],ownerPropsReferences:[...e.ownerPropsReferences],standardProps:[...e.standardProps],keyDomain:t?.description??e.keyDomain,...t===void 0?{}:{allowedKeys:t.values.map(n=>({...n}))},hookContext:e.hookContext,slotInject:e.slotInject,replaceRisk:e.replaceRisk}}a(Ce,"inspectSlotCatalog");var $=class extends I.Service{static{a(this,"ClientTimerService")}constructor(e){super(e,"timer"),e.mixin("timer",["timeout","interval","throttle","debounce","setTimeout","setInterval"])}setTimeout(e,t){return this.timeout(e,t)}setInterval(e,t){return this.interval(e,t)}timeout(...e){const t=typeof e[0]=="function"?e.shift():void 0,n=e[0];if(t!==void 0){const c=this.ctx.effect(()=>{const l=globalThis.setTimeout(()=>{c(),t()},n);return()=>{globalThis.clearTimeout(l)}},"ctx.timeout()");return c}const{promise:o,resolve:i,reject:s}=Promise.withResolvers(),r=this.ctx.effect(()=>{const c=globalThis.setTimeout(i,n);return()=>{globalThis.clearTimeout(c),s(new Error("Context has been disposed"))}},"ctx.timeout()");return o.finally(()=>{r()})}interval(...e){const t=typeof e[0]=="function"?e.shift():void 0,n=e[0];if(t!==void 0)return this.ctx.effect(()=>{const r=globalThis.setInterval(t,n);return()=>{globalThis.clearInterval(r)}},"ctx.interval()");let o,i;const s=this.ctx.effect(()=>{const r=globalThis.setInterval(()=>{i?.resolve({done:!1,value:void 0})},n);return()=>{globalThis.clearInterval(r),o===void 0&&(o={kind:"throw",reason:new Error("Context has been disposed")},i?.reject(o.reason))}},"ctx.interval()");return{next:a(()=>o===void 0?(i=Promise.withResolvers()).promise:o.kind==="return"?Promise.resolve({done:!0,value:o.value}):Promise.reject(o.reason),"next"),return:a(r=>(o===void 0&&(o={kind:"return",value:r}),i?.resolve({done:!0,value:r}),s(),Promise.resolve({done:!0,value:r})),"return"),throw:a(r=>(o===void 0&&(o={kind:"throw",reason:r}),i?.reject(r),s(),Promise.resolve({done:!0,value:void 0})),"throw"),[Symbol.asyncIterator](){return this}}}schedule(e,t,n=!1){let o;const i=this.ctx.effect(()=>()=>{n=!0,globalThis.clearTimeout(o)},e),s=a((...r)=>{globalThis.clearTimeout(o),o=t(r,n)},"wrapper");return s.dispose=i,s}throttle(e,t,n){let o=-1/0;const i=a((...s)=>{o=Date.now(),e(...s)},"execute");return this.schedule("ctx.throttle()",(s,r)=>{const c=t-Date.now()+o;if(c<=0)i(...s);else if(!r)return globalThis.setTimeout(i,c,...s)},n)}debounce(e,t){return this.schedule("ctx.debounce()",(n,o)=>{if(!o)return globalThis.setTimeout(e,t,...n)})}};function Te(e){new $(e)}a(Te,"provideClientTimer");function Re(e,t,n){const o=`host.call("${t}") on ${e}`;return n.code==="plugin-not-running"?`${o} found no active Host half — the Plugin is stopped or was removed.`:n.code==="stale-run"?`${o} belongs to an activation that has already been replaced.`:n.code==="method-not-found"?`${o} is not registered: the host half must declare it with harness.handle("${t}", fn).`:`${o} failed inside the host handler: ${n.message}`}a(Re,"invokeFailure");function je(e,t,n){const o=new Error(Re(e,t,n));return n.stack!==void 0&&(o.stack=`${o.stack??o.message}
1227
+ }`,source:"packages/extensions/ui-cordis/src/client/slots.ts:31"}],ye={type:"object",properties:{},additionalProperties:!1},ge={description:"JSON data owned by this inspect provider."},ke=K("service","Exact Service key. Omit it for the compact Service and method-signature directory."),fe=K("event","Exact Event name. Omit it for the compact Event and listener-signature directory."),we={description:"Compact Service directory, or one exact Service contract with only its referenced type declarations."},ve={description:"Compact Event directory, or one exact Event contract with only its referenced type declarations."},Se={description:"Compact purpose/topology trees. With root, selected also contains that Slot's full contract and live occupants."},be={type:"object",properties:{root:{type:"string",description:"Exact live Slot key. When supplied, selected contains the full contract for this Slot."}},additionalProperties:!1},xe=[{name:"ctx",description:"Restricted Cordis Context. Prefer ctx.get(name) with an undefined check; use inject only for hard dependencies.",signatures:["ctx.get(name: string): unknown | undefined","ctx.on(name: string, listener: Function): () => void","ctx.provide(name: string, value: unknown): () => void","ctx.effect(callback: Function, label?: string): () => void"]},{name:"React",description:"React runtime exposed without JSX transformation.",signatures:["React.createElement(type, props, ...children): ReactElement","React.useState(initial)","React.useEffect(effect, deps)"]},{name:"host",description:"Package-private JSON RPC from Client to this Package's Host half.",signatures:["host.call(method: string, args?: JsonValue): Promise<JsonValue>"]},{name:"styles",description:"Package-owned stylesheet insertion cleaned up with the Client run.",signatures:["styles.insert(css: string): () => void"]},{name:"console",description:"Package-tagged browser logging.",signatures:["console.log(...values): void","console.error(...values): void"]}];function Ie(e){return[S("Service","Progressive Client Service discovery: compact capability/signature directory, then one exact coding contract.","listService",t=>ue(B(t,"service")),ke,we),S("Event","Progressive Client Event discovery: compact listener directory, then one exact event contract.","listEvents",t=>he(B(t,"event")),fe,ve),S("Builtin","Plain-JavaScript symbols available to a dynamic Client half.","listBuiltins",()=>({builtins:[...xe],referencedTypes:[]})),{manifest:{id:"Slots",description:"Progressive live Slot inspection: compact purpose/topology trees plus one exact Slot contract.",methods:[{name:"listSubTree",description:"Return compact live Slot trees for navigation. With root, also return the selected Slot's full contract and occupants.",inputSchema:be,outputSchema:Se}]},query(t,n){if(t!=="listSubTree")throw new Error(`unknown Slots inspect method "${t}"`);const o=e.get("slots");if(o===void 0)throw new Error("Client Slots service is not running");const i=typeof n=="object"&&n!==null&&!Array.isArray(n)&&typeof n.root=="string"?n.root:void 0,s=o.snapshot(i),r=s[0];return Promise.resolve({...i===void 0?{}:{requestedRoot:{name:i,available:s.length>0}},trees:s.map($),...i===void 0||r===void 0?{}:{selected:Pe(r)},referencedTypes:[]})}},S("Theme","Current theme token names and light/dark override requirements.","listTokens",()=>{const t=e.get("theme");if(t===void 0)throw new Error("Client Theme service is not running");return{tokens:t.exportInspectTokens(),referencedTypes:[]}})]}a(Ie,"clientInspectProviders");function S(e,t,n,o,i=ye,s=ge){return{manifest:{id:e,description:t,methods:[{name:n,description:t,inputSchema:i,outputSchema:s}]},async query(r,c){if(r!==n)throw new Error(`unknown ${e} inspect method "${r}"`);return await o(c)}}}a(S,"registration");function K(e,t){return{type:"object",properties:{[e]:{type:"string",description:t}},additionalProperties:!1}}a(K,"exactInput");function B(e,t){if(e==null||Array.isArray(e)||typeof e!="object")return;const n=e[t];return typeof n=="string"?n:void 0}a(B,"readExact");const F=new Map(me.map(e=>[e.key,e])),_=new Map([["tool.view.cordis",{description:"fixed by the dynamic Client Guard",values:[{value:"self",description:"The only accepted key. The Guard binds it to this Package's pluginId and packageId."}]}]]);function $(e){const t=F.get(e.name),n=t===void 0?void 0:_.get(t.key);return{name:e.name,kind:e.kind,scope:e.scope,...t===void 0?{}:{purpose:t.summary,replaceRisk:t.replaceRisk,...t.registerOptions.length===0?{}:{registration:t.registerOptions.map(o=>({name:o.name,type:o.type,required:o.requirement==="required"}))},...t.keyDomain===""?{}:{keyDomain:n?.description??t.keyDomain,...n===void 0?{}:{allowedKeys:n.values.map(o=>({...o}))}}},children:e.children.map($)}}a($,"compactSlotTree");function Pe(e){const t=F.get(e.name);return{name:e.name,kind:e.kind,scope:e.scope,...e.declaredBy===void 0?{}:{declaredBy:e.declaredBy},occupants:e.occupants.map(n=>({...n})),...t===void 0?{}:{catalog:Ce(t)}}}a(Pe,"inspectLiveSlot");function Ce(e){const t=_.get(e.key);return{description:e.doc,registration:e.registerOptions.map(n=>({name:n.name,type:n.type,required:n.requirement==="required",description:n.doc})),ownerProps:[...e.ownerProps],ownerPropsReferences:[...e.ownerPropsReferences],standardProps:[...e.standardProps],keyDomain:t?.description??e.keyDomain,...t===void 0?{}:{allowedKeys:t.values.map(n=>({...n}))},hookContext:e.hookContext,slotInject:e.slotInject,replaceRisk:e.replaceRisk}}a(Ce,"inspectSlotCatalog");var U=class extends P.Service{static{a(this,"ClientTimerService")}constructor(e){super(e,"timer"),e.mixin("timer",["timeout","interval","throttle","debounce","setTimeout","setInterval"])}setTimeout(e,t){return this.timeout(e,t)}setInterval(e,t){return this.interval(e,t)}timeout(...e){const t=typeof e[0]=="function"?e.shift():void 0,n=e[0];if(t!==void 0){const c=this.ctx.effect(()=>{const l=globalThis.setTimeout(()=>{c(),t()},n);return()=>{globalThis.clearTimeout(l)}},"ctx.timeout()");return c}const{promise:o,resolve:i,reject:s}=Promise.withResolvers(),r=this.ctx.effect(()=>{const c=globalThis.setTimeout(i,n);return()=>{globalThis.clearTimeout(c),s(new Error("Context has been disposed"))}},"ctx.timeout()");return o.finally(()=>{r()})}interval(...e){const t=typeof e[0]=="function"?e.shift():void 0,n=e[0];if(t!==void 0)return this.ctx.effect(()=>{const r=globalThis.setInterval(t,n);return()=>{globalThis.clearInterval(r)}},"ctx.interval()");let o,i;const s=this.ctx.effect(()=>{const r=globalThis.setInterval(()=>{i?.resolve({done:!1,value:void 0})},n);return()=>{globalThis.clearInterval(r),o===void 0&&(o={kind:"throw",reason:new Error("Context has been disposed")},i?.reject(o.reason))}},"ctx.interval()");return{next:a(()=>o===void 0?(i=Promise.withResolvers()).promise:o.kind==="return"?Promise.resolve({done:!0,value:o.value}):Promise.reject(o.reason),"next"),return:a(r=>(o===void 0&&(o={kind:"return",value:r}),i?.resolve({done:!0,value:r}),s(),Promise.resolve({done:!0,value:r})),"return"),throw:a(r=>(o===void 0&&(o={kind:"throw",reason:r}),i?.reject(r),s(),Promise.resolve({done:!0,value:void 0})),"throw"),[Symbol.asyncIterator](){return this}}}schedule(e,t,n=!1){let o;const i=this.ctx.effect(()=>()=>{n=!0,globalThis.clearTimeout(o)},e),s=a((...r)=>{globalThis.clearTimeout(o),o=t(r,n)},"wrapper");return s.dispose=i,s}throttle(e,t,n){let o=-1/0;const i=a((...s)=>{o=Date.now(),e(...s)},"execute");return this.schedule("ctx.throttle()",(s,r)=>{const c=t-Date.now()+o;if(c<=0)i(...s);else if(!r)return globalThis.setTimeout(i,c,...s)},n)}debounce(e,t){return this.schedule("ctx.debounce()",(n,o)=>{if(!o)return globalThis.setTimeout(e,t,...n)})}};function Te(e){new U(e)}a(Te,"provideClientTimer");function Re(e,t,n){const o=`host.call("${t}") on ${e}`;return n.code==="plugin-not-running"?`${o} found no active Host half — the Plugin is stopped or was removed.`:n.code==="stale-run"?`${o} belongs to an activation that has already been replaced.`:n.code==="method-not-found"?`${o} is not registered: the host half must declare it with harness.handle("${t}", fn).`:`${o} failed inside the host handler: ${n.message}`}a(Re,"invokeFailure");function je(e,t,n){const o=new Error(Re(e,t,n));return n.stack!==void 0&&(o.stack=`${o.stack??o.message}
1228
1228
  Host stack:
1229
- ${n.stack}`),o}a(je,"invokeError");function U(e,t,n){return`host.call("${t}") on ${e} did not complete: ${n instanceof Error?n.message:String(n)}
1230
- Both directions carry JSON only: pass plain JSON data as the argument — or omit it, and the handler receives null — and answer from harness.handle("${t}", fn) with JSON (\`return null\` when there is nothing to report).`}a(U,"wireFailure");const Oe="cordis-client-runner",He=["loader","modules","slots","remote","remote.dynamicCordisRunner"];function Ae(e){Te(e);const t=new M({sync:a(async s=>{const r=await e.remote.dynamicCordisRunner.syncInspectManifest(s);if(!r.ok)throw new Error(`${r.error.code}: ${r.error.message}`)},"sync"),resolve:a(async(s,r,c)=>{const l=await e.remote.dynamicCordisRunner.resolveInspectQuery(s,r,c);if(!l.ok)throw new Error(`${l.error.code}: ${l.error.message}`)},"resolve")});ce(e,t);for(const s of Ie(e))e.effect(()=>t.register(s),`cordis-client-runner: inspect ${s.manifest.id}`);e.on("connection/reset",()=>{t.publish()});const n=new A({ctx:e,loader:e.loader,modules:e.get("modules"),slots:e.get("slots"),invoke:a(async(s,r,c,l)=>{const d=await e.remote.dynamicCordisRunner.invoke(s,r,c,l).catch(p=>{throw new Error(U(s,c,p))});if(!d.ok)throw new Error(U(s,c,`${d.error.code}: ${d.error.message}`));const h=d.value;if(h.ok)return h.value;throw je(s,c,h)},"invoke"),reportRenderFailure:a((s,r,c,l)=>{e.remote.dynamicCordisRunner.reportRenderFailure(s,r,c,l).then(d=>{d.ok||console.error(`[cordis-client-runner] reporting a render failure of ${r} failed:`,d.error)},d=>{console.error(`[cordis-client-runner] reporting a render failure of ${r} failed:`,d)})},"reportRenderFailure"),reportGuardFailure:a((s,r,c,l)=>{e.remote.dynamicCordisRunner.reportClientGuardFailure(s,r,c,l).then(d=>{d.ok||console.error(`[cordis-client-runner] reporting a guard failure of ${r} failed:`,d.error)},d=>{console.error(`[cordis-client-runner] reporting a guard failure of ${r} failed:`,d)})},"reportGuardFailure")}),o=new L({runner:n,host:{runHostHalf:a(async(s,r,c,l,d,h)=>{const p=await e.remote.dynamicCordisRunner.runHostHalf(s,r,c,l,d,h);return p.ok?p.value:{ok:!1,message:`${p.error.code}: ${p.error.message}`}},"runHostHalf"),getClientCode:a(async(s,r,c)=>{const l=await e.remote.dynamicCordisRunner.getClientCode(s,r,c);if(!l.ok)throw new Error(`${l.error.code}: ${l.error.message}`);return l.value},"getClientCode"),resolveRequestRun:a(async(s,r)=>{const c=await e.remote.dynamicCordisRunner.resolveRequestRun(s,r);if(!c.ok)throw new Error(`${c.error.code}: ${c.error.message}`);return c.value},"resolveRequestRun"),settleUserRun:a(async(s,r,c)=>{const l=await e.remote.dynamicCordisRunner.settleUserRun(s,r,c);if(!l.ok)throw new Error(`${l.error.code}: ${l.error.message}`);return l.value},"settleUserRun")}}),i={activeRuns:o.activeRuns,lastRunError:o.lastRunError,renderFailures:n.renderFailures,reconcileApprovals:a(s=>{o.reconcileApprovals(s)},"reconcileApprovals"),approve:a((s,r)=>o.approve(s,r),"approve"),decline:a(s=>o.decline(s),"decline"),startUserRun:a(s=>o.startUserRun(s),"startUserRun"),subscribe:a(s=>n.subscribe(s),"subscribe"),getSnapshot:a(()=>n.getSnapshot(),"getSnapshot"),isLoaded:a(s=>n.isLoaded(s),"isLoaded")};e.provide("dynamicCordisRunner",i),e.effect(()=>()=>{n.dispose()},"cordis-client-runner: dynamic package runner"),e.remote.$on("cordis/request-run",s=>{o.open(s)}),e.remote.$on("cordis/request-run-resolved",s=>{o.close(s.requestId)}),e.remote.$on("cordis/dynamic-retract",s=>{n.retract(s.pluginId,s.pluginRunId)}),e.remote.$on("cordis/inspect-query",s=>{t.query(s).catch(r=>{console.error(`[cordis-client-runner] inspect query ${s.provider}.${s.method} failed:`,r)})}),e.remote.$on("cordis/inspect-query-resolved",s=>{t.close(s.requestId)})}return a(Ae,"apply"),u.ClientCordisInspectRegistry=M,u.ClientTimerService=$,u.CordisRunOrchestrator=L,u.DynamicCordisPackageRunner=A,u.DynamicCordisStyles=C,u.apply=Ae,u.dynamicCordisContext=H,u.evaluateClientHalf=R,u.inject=He,u.isDynamicCordisPlugin=T,u.name=Oe,f.exports},"factory")});
1229
+ ${n.stack}`),o}a(je,"invokeError");function V(e,t,n){return`host.call("${t}") on ${e} did not complete: ${n instanceof Error?n.message:String(n)}
1230
+ Both directions carry JSON only: pass plain JSON data as the argument — or omit it, and the handler receives null — and answer from harness.handle("${t}", fn) with JSON (\`return null\` when there is nothing to report).`}a(V,"wireFailure");const Oe="cordis-client-runner",He=["loader","modules","slots","remote","remote.dynamicCordisRunner"];function Ae(e){Te(e);const t=new q({sync:a(async s=>{const r=await e.remote.dynamicCordisRunner.syncInspectManifest(s);if(!r.ok)throw new Error(`${r.error.code}: ${r.error.message}`)},"sync"),resolve:a(async(s,r,c)=>{const l=await e.remote.dynamicCordisRunner.resolveInspectQuery(s,r,c);if(!l.ok)throw new Error(`${l.error.code}: ${l.error.message}`)},"resolve")});ce(e,t);for(const s of Ie(e))e.effect(()=>t.register(s),`cordis-client-runner: inspect ${s.manifest.id}`);e.on("connection/reset",()=>{t.publish()});const n=new E({ctx:e,loader:e.loader,modules:e.get("modules"),slots:e.get("slots"),invoke:a(async(s,r,c,l)=>{const d=await e.remote.dynamicCordisRunner.invoke(s,r,c,l).catch(p=>{throw new Error(V(s,c,p))});if(!d.ok)throw new Error(V(s,c,`${d.error.code}: ${d.error.message}`));const h=d.value;if(h.ok)return h.value;throw je(s,c,h)},"invoke"),reportRenderFailure:a((s,r,c,l)=>{e.remote.dynamicCordisRunner.reportRenderFailure(s,r,c,l).then(d=>{d.ok||console.error(`[cordis-client-runner] reporting a render failure of ${r} failed:`,d.error)},d=>{console.error(`[cordis-client-runner] reporting a render failure of ${r} failed:`,d)})},"reportRenderFailure"),reportGuardFailure:a((s,r,c,l)=>{e.remote.dynamicCordisRunner.reportClientGuardFailure(s,r,c,l).then(d=>{d.ok||console.error(`[cordis-client-runner] reporting a guard failure of ${r} failed:`,d.error)},d=>{console.error(`[cordis-client-runner] reporting a guard failure of ${r} failed:`,d)})},"reportGuardFailure")}),o=new M({runner:n,host:{runHostHalf:a(async(s,r,c,l,d,h)=>{const p=await e.remote.dynamicCordisRunner.runHostHalf(s,r,c,l,d,h);return p.ok?p.value:{ok:!1,message:`${p.error.code}: ${p.error.message}`}},"runHostHalf"),getClientCode:a(async(s,r,c)=>{const l=await e.remote.dynamicCordisRunner.getClientCode(s,r,c);if(!l.ok)throw new Error(`${l.error.code}: ${l.error.message}`);return l.value},"getClientCode"),resolveRequestRun:a(async(s,r)=>{const c=await e.remote.dynamicCordisRunner.resolveRequestRun(s,r);if(!c.ok)throw new Error(`${c.error.code}: ${c.error.message}`);return c.value},"resolveRequestRun"),settleUserRun:a(async(s,r,c)=>{const l=await e.remote.dynamicCordisRunner.settleUserRun(s,r,c);if(!l.ok)throw new Error(`${l.error.code}: ${l.error.message}`);return l.value},"settleUserRun")}}),i={activeRuns:o.activeRuns,lastRunError:o.lastRunError,renderFailures:n.renderFailures,reconcileApprovals:a(s=>{o.reconcileApprovals(s)},"reconcileApprovals"),approve:a((s,r)=>o.approve(s,r),"approve"),decline:a(s=>o.decline(s),"decline"),startUserRun:a(s=>o.startUserRun(s),"startUserRun"),subscribe:a(s=>n.subscribe(s),"subscribe"),getSnapshot:a(()=>n.getSnapshot(),"getSnapshot"),isLoaded:a(s=>n.isLoaded(s),"isLoaded")};e.provide("dynamicCordisRunner",i),e.effect(()=>()=>{n.dispose()},"cordis-client-runner: dynamic package runner"),e.remote.$on("cordis/request-run",s=>{o.open(s)}),e.remote.$on("cordis/request-run-resolved",s=>{o.close(s.requestId)}),e.remote.$on("cordis/dynamic-retract",s=>{n.retract(s.pluginId,s.pluginRunId)}),e.remote.$on("cordis/inspect-query",s=>{t.query(s).catch(r=>{console.error(`[cordis-client-runner] inspect query ${s.provider}.${s.method} failed:`,r)})}),e.remote.$on("cordis/inspect-query-resolved",s=>{t.close(s.requestId)})}return a(Ae,"apply"),u.ClientCordisInspectRegistry=q,u.ClientTimerService=U,u.CordisRunOrchestrator=M,u.DynamicCordisPackageRunner=E,u.DynamicCordisStyles=T,u.apply=Ae,u.dynamicCordisContext=A,u.evaluateClientHalf=j,u.inject=He,u.isDynamicCordisPlugin=R,u.name=Oe,f.exports},"factory")});
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-cordis-client-runner","version":"0.0.10","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"},"./src/*":"./src/*","./package.json":"./package.json"},"dsh":{"client":{"inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-api-remotes","@deepseek-ai/dsh-client-modules","@deepseek-ai/dsh-client-ui-theme"],"platform":"web"}},"license":"MIT","peerDependencies":{"react":"^18.2.0","@deepseek-ai/dsh-api-remotes":"^0.0.10","@deepseek-ai/dsh-client-connection":"^0.0.10","@deepseek-ai/dsh-client-ui-slots":"^0.0.10","@deepseek-ai/cordis-plugin-loader":"^1.0.2","@deepseek-ai/dsh-client-runtime":"^0.0.10","@deepseek-ai/dsh-client-modules":"^0.0.10","@deepseek-ai/dsh-client-ui-theme":"^0.0.10","@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-cordis-client-runner","version":"0.0.12","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"},"./src/*":"./src/*","./package.json":"./package.json"},"dsh":{"client":{"inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-api-remotes","@deepseek-ai/dsh-client-modules","@deepseek-ai/dsh-client-ui-theme"],"platform":"web"}},"license":"MIT","peerDependencies":{"react":"^18.2.0","@deepseek-ai/dsh-api-remotes":"^0.0.12","@deepseek-ai/dsh-client-modules":"^0.0.12","@deepseek-ai/dsh-client-ui-slots":"^0.0.12","@deepseek-ai/dsh-client-runtime":"^0.0.12","@deepseek-ai/dsh-client-connection":"^0.0.12","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-invariants":"^0.0.12","@deepseek-ai/dsh-client-ui-theme":"^0.0.12","@deepseek-ai/cordis-plugin-loader":"^1.0.2"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-cordis-host-runner","version":"0.0.10","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"},"./typert":{"types":"./lib/typert.host.d.ts","default":"./lib/typert.host.js"},"./remote":{"types":"./lib/typert.remote-client.d.ts","default":"./lib/typert.remote-client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"zod":"^4.4.3","@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-brand":"^0.0.10","@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-agent":"^0.0.10","@deepseek-ai/dsh-llm":"^0.0.10","@deepseek-ai/dsh-scope":"^0.0.10","@deepseek-ai/dsh-session":"^0.0.10","@deepseek-ai/dsh-tools":"^0.0.10","@deepseek-ai/dsh-typert-protocol":"^0.0.10"}}
1
+ {"name":"@deepseek-ai/dsh-cordis-host-runner","version":"0.0.12","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"},"./typert":{"types":"./lib/typert.host.d.ts","default":"./lib/typert.host.js"},"./remote":{"types":"./lib/typert.remote-client.d.ts","default":"./lib/typert.remote-client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"zod":"^4.4.3","@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-invariants":"^0.0.12","@deepseek-ai/dsh-agent":"^0.0.12","@deepseek-ai/dsh-llm":"^0.0.12","@deepseek-ai/dsh-session":"^0.0.12","@deepseek-ai/dsh-tools":"^0.0.12","@deepseek-ai/dsh-scope":"^0.0.12","@deepseek-ai/dsh-typert-protocol":"^0.0.12","@deepseek-ai/dsh-brand":"^0.0.12"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-credentials","version":"0.0.10","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.10","@deepseek-ai/dsh-brand":"^0.0.10","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-credentials","version":"0.0.12","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-brand":"^0.0.12","@deepseek-ai/dsh-invariants":"^0.0.12","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-credentials-local","version":"0.0.10","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-atomic-write":"^0.0.10","@deepseek-ai/dsh-credentials":"^0.0.10","@deepseek-ai/dsh-launch-environment":"^0.0.10","@deepseek-ai/dsh-home-paths":"^0.0.10","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-invariants":"^0.0.10"},"dependencies":{"chokidar":"^4.0.3","yaml":"^2.9.0","@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-credentials-local","version":"0.0.12","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-atomic-write":"^0.0.12","@deepseek-ai/dsh-launch-environment":"^0.0.12","@deepseek-ai/dsh-home-paths":"^0.0.12","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-invariants":"^0.0.12","@deepseek-ai/dsh-credentials":"^0.0.12"},"dependencies":{"chokidar":"^4.0.3","yaml":"^2.9.0","@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-fs","version":"0.0.10","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.10","@deepseek-ai/dsh-llm":"^0.0.10","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-sandbox":"^0.0.10","@deepseek-ai/dsh-invariants":"^0.0.10"}}
1
+ {"name":"@deepseek-ai/dsh-fs","version":"0.0.12","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-invariants":"^0.0.12","@deepseek-ai/dsh-sandbox":"^0.0.12","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-llm":"^0.0.12","@deepseek-ai/dsh-brand":"^0.0.12"}}
@@ -1,7 +1,7 @@
1
- var ft=Object.defineProperty;var s=(t,e)=>ft(t,"name",{value:e,configurable:!0});import{constants as k}from"node:buffer";import{basename as T,dirname as $,isAbsolute as dt,join as E,relative as ut,resolve as x,sep as wt,toNamespacedPath as O}from"node:path";import{pathToFileURL as ht}from"node:url";import D from"@deepseek-ai/schemastery";import{FileSystem as yt,FsError as o,FsTargetKey as b,FsVersion as z}from"@deepseek-ai/dsh-fs";import{randomUUID as pt}from"node:crypto";import{createReadStream as M}from"node:fs";import{chmod as _t,link as Ft,lstat as C,mkdir as G,open as X,readFile as Et,readdir as mt,realpath as V,rename as Y,rm as St,stat as A}from"node:fs/promises";import{TextDecoder as I}from"node:util";const j=4,Tt=2,Ot=3,gt=5;let g;async function L(){if(g!==void 0)return g;const t=(await import("koffi")).default,e=t.load("advapi32.dll"),i=t.load("kernel32.dll");return g={getFileSecurityW:e.func("int __stdcall GetFileSecurityW(const char16_t *path, uint32_t requested, void *descriptor, uint32_t length, _Out_ uint32_t *needed)"),setFileSecurityW:e.func("int __stdcall SetFileSecurityW(const char16_t *path, uint32_t information, const void *descriptor)"),replaceFileW:i.func("int __stdcall ReplaceFileW(const char16_t *replaced, const char16_t *replacement, const char16_t *backup, uint32_t flags, void *exclude, void *reserved)"),getLastError:i.func("uint32_t __stdcall GetLastError()")},g}s(L,"win32");function Nt(t){switch(t){case Tt:case Ot:return"ENOENT";case gt:return"EACCES";default:return"EIO"}}s(Nt,"errnoCode");function N(t,e,i){const r=Nt(e),n=new Error(`${t} ${r} (Win32 ${e}): ${i}`);return n.code=r,n.errno=e,n.syscall=t,n.path=i,n.win32Code=e,n}s(N,"win32Error");async function vt(t){const e=await L(),i=O(t),r=[0];if(e.getFileSecurityW(i,j,null,0,r),r[0]===0)throw N("GetFileSecurityW",e.getLastError(),t);const n=Buffer.alloc(r[0]);if(e.getFileSecurityW(i,j,n,n.length,r)===0)throw N("GetFileSecurityW",e.getLastError(),t);return n.subarray(0,r[0])}s(vt,"readFileDaclWin32");async function Rt(t,e){const i=await vt(t),r=await L();if(r.setFileSecurityW(O(e),2147483652,i)===0)throw N("SetFileSecurityW",r.getLastError(),e)}s(Rt,"copyFileDaclWin32");async function $t(t,e){const i=await L();if(i.replaceFileW(O(t),O(e),null,0,null,null)===0)throw N("ReplaceFileW",i.getLastError(),t)}s($t,"replaceFileWin32");const B=8192,Dt=64*1024;function h(t){return t instanceof Error&&"code"in t&&t.code==="ENOENT"}s(h,"isENOENT");function bt(t){return t instanceof Error&&"code"in t&&t.code==="EEXIST"}s(bt,"isEEXIST");function v(t){return t instanceof Error&&"code"in t&&t.code==="ENOTDIR"}s(v,"isENOTDIR");function R(t){return t instanceof Error&&t.name==="AbortError"}s(R,"isAbortError");function y(t){return t instanceof Error?t.message:String(t)}s(y,"errorMessage");function At(t){return t instanceof Error&&"code"in t&&(t.code==="EACCES"||t.code==="EPERM")}s(At,"isPermissionError");function d(t,e){if(t?.aborted)throw new o(`${e} aborted`,"FS_ABORTED")}s(d,"throwIfAborted");async function H(t,e,i){try{return await Et(t,i?{signal:i}:{})}catch(r){throw R(r)?new o(`${e} aborted`,"FS_ABORTED"):r}}s(H,"readFileAbortable");function q(t){return z(`${t.dev}:${t.ino}:${t.size}:${t.mtimeNs}:${t.ctimeNs}`)}s(q,"versionOf");async function J(t,e){if(e.trim().length===0)throw new o("file_path must be a non-empty string","FS_NOT_FOUND");const i=x(t,e);try{return{displayPath:i,targetKey:b(await V(i))}}catch(a){if(v(a))throw new o(`cannot resolve "${i}": a parent path segment is not a directory`,"FS_NOT_FOUND");if(!h(a))throw a}const r=[T(i)];let n=$(i);for(;;)try{const a=await V(n);if(process.platform==="win32"&&!(await A(a)).isDirectory())throw new o(`cannot resolve "${i}": a parent path segment is not a directory`,"FS_NOT_FOUND");return{displayPath:i,targetKey:b(E(a,...r))}}catch(a){if(a instanceof o||!h(a))throw a;const c=$(n);if(c===n)return{displayPath:i,targetKey:b(i)};r.unshift(T(n)),n=c}}s(J,"resolveLocalTarget");function Q(t){return t.isFile()?"file":t.isDirectory()?"directory":"other"}s(Q,"pathType");function It(t){return t.isSymbolicLink()?"symlink":Q(t)}s(It,"pathLinkType");async function Z(t,e){try{return await e(t)}catch(i){if(!h(i)&&!v(i))throw i;return null}}s(Z,"probeStats");async function p(t){const e=await Z(t,i=>A(i,{bigint:!0}));return e?{version:q(e),mode:Number(e.mode&511n),type:Q(e),size:Number(e.size)}:null}s(p,"probe");async function Lt(t){const e=await Z(t,i=>C(i,{bigint:!0}));return e?{version:q(e),mode:Number(e.mode&511n),type:It(e),size:Number(e.size)}:null}s(Lt,"probeNoFollow");function P(t,e){return e instanceof o?e:h(e)||v(e)?new o(`cannot list "${t}": not found`,"FS_NOT_FOUND",{cause:e}):At(e)?new o(`cannot list "${t}": permission denied`,"FS_PERMISSION_DENIED",{cause:e}):new o(`cannot list "${t}": ${y(e)}`,"FS_IO_ERROR",{cause:e})}s(P,"listingIoError");async function Bt(t,e){const i=await J(t.targetKey,e);return{displayPath:E(t.displayPath,e),targetKey:i.targetKey}}s(Bt,"resolveListedChildTarget");async function Pt(t,e){d(e,"list");let i;try{i=await p(t.targetKey)}catch(a){throw P(t.displayPath,a)}if(!i)throw new o(`cannot list "${t.displayPath}": not found`,"FS_NOT_FOUND");if(i.type!=="directory")throw new o(`cannot list "${t.displayPath}": not a directory`,"FS_NOT_DIRECTORY");let r;try{r=await mt(t.targetKey,{withFileTypes:!0,encoding:"utf8"})}catch(a){throw P(t.displayPath,a)}d(e,"list");const n=[];for(const a of r.sort((c,l)=>c.name.localeCompare(l.name))){d(e,"list");try{const c=await Bt(t,a.name),l=await p(c.targetKey);n.push({name:a.name,type:l?.type??"other",target:c,...l?{version:l.version}:{},...l?.type==="file"?{size:l.size}:{}})}catch(c){throw P(E(t.displayPath,a.name),c)}d(e,"list")}return n}s(Pt,"listDirectory");function tt(t,e){return new o(`cannot ${t} "${e}": invalid UTF-8 text`,"FS_NOT_TEXT")}s(tt,"notTextError");function et(t,e,i){try{return new I("utf-8",{fatal:!0}).decode(t)}catch(r){throw r instanceof TypeError?tt(e,i):r}}s(et,"decodeUtf8");function it(t,e,i,r){try{return e?t.decode(e,{stream:!0}):t.decode()}catch(n){throw n instanceof TypeError?tt(i,r):n}}s(it,"decodeUtf8Stream");async function K(t,e,i){d(i,e);let r;try{r=await A(t.targetKey)}catch(n){throw h(n)?new o(`cannot ${e} "${t.displayPath}": not found`,"FS_NOT_FOUND"):n}if(!r.isFile())throw new o(`cannot ${e} "${t.displayPath}": not a regular file`,"FS_NOT_REGULAR_FILE");return r}s(K,"statRegularFile");async function Kt(t,e){await K(t,"read",e);const i=await H(t.targetKey,"read",e);if(d(e,"read"),i.subarray(0,B).includes(0))throw new o(`cannot read "${t.displayPath}": binary file`,"FS_NOT_TEXT");return et(i,"read",t.displayPath)}s(Kt,"readWholeText");async function Ut(t,e,i,r={}){const n=await K(t,"read",e);if(n.size>i)throw new o(`cannot read "${t.displayPath}": ${n.size} bytes exceeds the ${i}-byte limit`,"FS_TOO_LARGE");await r.inspectReadBytesAfterStat?.(t);const a=M(t.targetKey,{end:i,...e?{signal:e}:{}}),c=[];let l=0;try{for await(const f of a){if(l+=f.length,l>i)throw new o(`cannot read "${t.displayPath}": content exceeds the ${i}-byte limit`,"FS_TOO_LARGE");c.push(f)}}catch(f){throw R(f)?new o("read aborted","FS_ABORTED"):f}return Buffer.concat(c,l)}s(Ut,"readWholeBytes");async function*Wt(t,e){await K(t,"read",e);const i=M(t.targetKey,e?{signal:e}:{}),r=new I("utf-8",{fatal:!0});let n=0;function a(c){if(n>=B)return;const l=c.subarray(0,Math.min(c.length,B-n));if(l.includes(0))throw new o(`cannot read "${t.displayPath}": binary file`,"FS_NOT_TEXT");n+=l.length}s(a,"scanBinarySample");try{for await(const c of i)a(c),yield it(r,c,"read",t.displayPath);yield it(r,void 0,"read",t.displayPath)}catch(c){throw R(c)?new o("read aborted","FS_ABORTED"):c}}s(Wt,"streamWholeText");async function kt(t,e,i){try{await i(t)}catch(r){throw new o(`write failed (${y(e)}) and temp cleanup failed (${y(r)})`,"FS_NOT_FOUND",{cause:e})}throw e}s(kt,"removeStagingDirOrThrow");async function xt(t,e,i,r){let n;try{n=await r(e)}catch(a){if(!h(a)&&!v(a))throw new o(`cannot write "${i}": ${y(a)}`,"FS_IO_ERROR",{cause:a})}throw n!==void 0?n.isFile()?new o(`cannot overwrite existing "${i}" without reading it first`,"FS_NOT_OBSERVED",{cause:t}):new o(`cannot write "${i}": not a regular file`,"FS_NOT_REGULAR_FILE",{cause:t}):bt(t)?new o(`cannot overwrite existing "${i}" without reading it first`,"FS_NOT_OBSERVED",{cause:t}):new o(`cannot write "${i}": ${y(t)}`,"FS_IO_ERROR",{cause:t})}s(xt,"throwGuardedCreateFailure");async function rt(t,e,i,r,n={},a){d(r,"write");const c=$(t);await G(c,{recursive:!0}),d(r,"write");const l=E(c,n.tempDirName?.(t)??`.${T(t)}.${process.pid}.${pt()}.tmpdir`),f=E(l,n.tempName?.(t)??`${T(t)}.tmp`),m=n.platform??process.platform,S=n.copyFileDacl??Rt,ot=n.replaceFile??$t,st=n.linkFile??Ft,ct=n.inspectPublicationTarget??(u=>C(u,{bigint:!0})),U=n.removeStagingDir??(u=>St(u,{recursive:!0,force:!0}));let w,W=!1;try{if(await G(l,{mode:448}),W=!0,await _t(l,448),w=await X(f,"wx",384),await w.chmod(384),m==="win32"&&i!==void 0&&await S(t,f),await w.writeFile(e,{encoding:"utf8",...r?{signal:r}:{}}),await w.sync(),await n.inspectTemp?.({stagingDir:l,tempPath:f}),i!==void 0&&await w.chmod(i),await w.close(),w=void 0,d(r,"write"),a!==void 0)try{await st(f,t)}catch(u){await xt(u,t,a.displayPath,ct)}else if(m==="win32"&&i!==void 0)try{await ot(t,f)}catch(u){if(!h(u))throw u;await Y(f,t)}else await Y(f,t);try{await U(l)}catch{}}catch(u){let F=R(u)?new o("write aborted","FS_ABORTED"):u;if(w)try{await w.close()}catch(lt){F=new o(`write failed (${y(F)}) and temp close failed (${y(lt)})`,"FS_NOT_FOUND",{cause:F})}if(!W)throw F;return kt(l,F,U)}}s(rt,"writeFileAtomic");function _(t){return t.replaceAll(`\r
1
+ var ut=Object.defineProperty;var s=(t,e)=>ut(t,"name",{value:e,configurable:!0});import{constants as x}from"node:buffer";import{basename as S,dirname as $,isAbsolute as wt,join as E,relative as ht,resolve as z,sep as yt,toNamespacedPath as T}from"node:path";import{pathToFileURL as pt}from"node:url";import D from"@deepseek-ai/schemastery";import{FileSystem as _t,FsError as o,FsTargetKey as b,FsVersion as M}from"@deepseek-ai/dsh-fs";import{randomUUID as mt}from"node:crypto";import{createReadStream as C}from"node:fs";import{chmod as Ft,link as Et,lstat as G,mkdir as X,open as V,readFile as St,readdir as Tt,realpath as Y,rename as j,rm as Ot,stat as A}from"node:fs/promises";import{TextDecoder as I}from"node:util";const H=4,gt=2,Nt=3,vt=5;let O;async function L(){if(O!==void 0)return O;const t=(await import("koffi")).default,e=t.load("advapi32.dll"),i=t.load("kernel32.dll");return O={getFileSecurityW:e.func("int __stdcall GetFileSecurityW(const char16_t *path, uint32_t requested, void *descriptor, uint32_t length, _Out_ uint32_t *needed)"),setFileSecurityW:e.func("int __stdcall SetFileSecurityW(const char16_t *path, uint32_t information, const void *descriptor)"),replaceFileW:i.func("int __stdcall ReplaceFileW(const char16_t *replaced, const char16_t *replacement, const char16_t *backup, uint32_t flags, void *exclude, void *reserved)"),getLastError:i.func("uint32_t __stdcall GetLastError()")},O}s(L,"win32");function Rt(t){switch(t){case gt:case Nt:return"ENOENT";case vt:return"EACCES";default:return"EIO"}}s(Rt,"errnoCode");function g(t,e,i){const r=Rt(e),n=new Error(`${t} ${r} (Win32 ${e}): ${i}`);return n.code=r,n.errno=e,n.syscall=t,n.path=i,n.win32Code=e,n}s(g,"win32Error");async function $t(t){const e=await L(),i=T(t),r=[0];if(e.getFileSecurityW(i,H,null,0,r),r[0]===0)throw g("GetFileSecurityW",e.getLastError(),t);const n=Buffer.alloc(r[0]);if(e.getFileSecurityW(i,H,n,n.length,r)===0)throw g("GetFileSecurityW",e.getLastError(),t);return n.subarray(0,r[0])}s($t,"readFileDaclWin32");async function Dt(t,e){const i=await $t(t),r=await L();if(r.setFileSecurityW(T(e),2147483652,i)===0)throw g("SetFileSecurityW",r.getLastError(),e)}s(Dt,"copyFileDaclWin32");async function bt(t,e){const i=await L();if(i.replaceFileW(T(t),T(e),null,0,null,null)===0)throw g("ReplaceFileW",i.getLastError(),t)}s(bt,"replaceFileWin32");const B=8192,At=65536;function y(t){return t instanceof Error&&"code"in t&&t.code==="ENOENT"}s(y,"isENOENT");function It(t){return t instanceof Error&&"code"in t&&t.code==="EEXIST"}s(It,"isEEXIST");function N(t){return t instanceof Error&&"code"in t&&t.code==="ENOTDIR"}s(N,"isENOTDIR");function v(t){return t instanceof Error&&t.name==="AbortError"}s(v,"isAbortError");function p(t){return t instanceof Error?t.message:String(t)}s(p,"errorMessage");function Lt(t){return t instanceof Error&&"code"in t&&(t.code==="EACCES"||t.code==="EPERM")}s(Lt,"isPermissionError");function d(t,e){if(t?.aborted)throw new o(`${e} aborted`,"FS_ABORTED")}s(d,"throwIfAborted");async function q(t,e,i){try{return await St(t,i?{signal:i}:{})}catch(r){throw v(r)?new o(`${e} aborted`,"FS_ABORTED"):r}}s(q,"readFileAbortable");function J(t){return M(`${t.dev}:${t.ino}:${t.size}:${t.mtimeNs}:${t.ctimeNs}`)}s(J,"versionOf");async function Q(t,e){if(e.trim().length===0)throw new o("file_path must be a non-empty string","FS_NOT_FOUND");const i=z(t,e);try{return{displayPath:i,targetKey:b(await Y(i))}}catch(a){if(N(a))throw new o(`cannot resolve "${i}": a parent path segment is not a directory`,"FS_NOT_FOUND");if(!y(a))throw a}const r=[S(i)];let n=$(i);for(;;)try{const a=await Y(n);if(process.platform==="win32"&&!(await A(a)).isDirectory())throw new o(`cannot resolve "${i}": a parent path segment is not a directory`,"FS_NOT_FOUND");return{displayPath:i,targetKey:b(E(a,...r))}}catch(a){if(a instanceof o||!y(a))throw a;const c=$(n);if(c===n)return{displayPath:i,targetKey:b(i)};r.unshift(S(n)),n=c}}s(Q,"resolveLocalTarget");function Z(t){return t.isFile()?"file":t.isDirectory()?"directory":"other"}s(Z,"pathType");function Bt(t){return t.isSymbolicLink()?"symlink":Z(t)}s(Bt,"pathLinkType");async function tt(t,e){try{return await e(t)}catch(i){if(!y(i)&&!N(i))throw i;return null}}s(tt,"probeStats");async function _(t){const e=await tt(t,i=>A(i,{bigint:!0}));return e?{version:J(e),mode:Number(e.mode&511n),type:Z(e),size:Number(e.size)}:null}s(_,"probe");async function Pt(t){const e=await tt(t,i=>G(i,{bigint:!0}));return e?{version:J(e),mode:Number(e.mode&511n),type:Bt(e),size:Number(e.size)}:null}s(Pt,"probeNoFollow");function P(t,e){return e instanceof o?e:y(e)||N(e)?new o(`cannot list "${t}": not found`,"FS_NOT_FOUND",{cause:e}):Lt(e)?new o(`cannot list "${t}": permission denied`,"FS_PERMISSION_DENIED",{cause:e}):new o(`cannot list "${t}": ${p(e)}`,"FS_IO_ERROR",{cause:e})}s(P,"listingIoError");async function Kt(t,e){const i=await Q(t.targetKey,e);return{displayPath:E(t.displayPath,e),targetKey:i.targetKey}}s(Kt,"resolveListedChildTarget");async function Ut(t,e){d(e,"list");let i;try{i=await _(t.targetKey)}catch(a){throw P(t.displayPath,a)}if(!i)throw new o(`cannot list "${t.displayPath}": not found`,"FS_NOT_FOUND");if(i.type!=="directory")throw new o(`cannot list "${t.displayPath}": not a directory`,"FS_NOT_DIRECTORY");let r;try{r=await Tt(t.targetKey,{withFileTypes:!0,encoding:"utf8"})}catch(a){throw P(t.displayPath,a)}d(e,"list");const n=[];for(const a of r.sort((c,l)=>c.name.localeCompare(l.name))){d(e,"list");try{const c=await Kt(t,a.name),l=await _(c.targetKey);n.push({name:a.name,type:l?.type??"other",target:c,...l?{version:l.version}:{},...l?.type==="file"?{size:l.size}:{}})}catch(c){throw P(E(t.displayPath,a.name),c)}d(e,"list")}return n}s(Ut,"listDirectory");function et(t,e){return new o(`cannot ${t} "${e}": invalid UTF-8 text`,"FS_NOT_TEXT")}s(et,"notTextError");function it(t,e,i){try{return new I("utf-8",{fatal:!0}).decode(t)}catch(r){throw r instanceof TypeError?et(e,i):r}}s(it,"decodeUtf8");function rt(t,e,i,r){try{return e?t.decode(e,{stream:!0}):t.decode()}catch(n){throw n instanceof TypeError?et(i,r):n}}s(rt,"decodeUtf8Stream");async function K(t,e,i){d(i,e);let r;try{r=await A(t.targetKey)}catch(n){throw y(n)?new o(`cannot ${e} "${t.displayPath}": not found`,"FS_NOT_FOUND"):n}if(!r.isFile())throw new o(`cannot ${e} "${t.displayPath}": not a regular file`,"FS_NOT_REGULAR_FILE");return r}s(K,"statRegularFile");async function Wt(t,e){await K(t,"read",e);const i=await q(t.targetKey,"read",e);if(d(e,"read"),i.subarray(0,B).includes(0))throw new o(`cannot read "${t.displayPath}": binary file`,"FS_NOT_TEXT");return it(i,"read",t.displayPath)}s(Wt,"readWholeText");async function kt(t,e,i,r={}){const n=await K(t,"read",e);if(n.size>i)throw new o(`cannot read "${t.displayPath}": ${n.size} bytes exceeds the ${i}-byte limit`,"FS_TOO_LARGE");await r.inspectReadBytesAfterStat?.(t);const a=C(t.targetKey,{end:i,...e?{signal:e}:{}}),c=[];let l=0;try{for await(const f of a){if(l+=f.length,l>i)throw new o(`cannot read "${t.displayPath}": content exceeds the ${i}-byte limit`,"FS_TOO_LARGE");c.push(f)}}catch(f){throw v(f)?new o("read aborted","FS_ABORTED"):f}return Buffer.concat(c,l)}s(kt,"readWholeBytes");async function*xt(t,e){await K(t,"read",e);const i=C(t.targetKey,e?{signal:e}:{}),r=new I("utf-8",{fatal:!0});let n=0;function a(c){if(n>=B)return;const l=c.subarray(0,Math.min(c.length,B-n));if(l.includes(0))throw new o(`cannot read "${t.displayPath}": binary file`,"FS_NOT_TEXT");n+=l.length}s(a,"scanBinarySample");try{for await(const c of i)a(c),yield rt(r,c,"read",t.displayPath);yield rt(r,void 0,"read",t.displayPath)}catch(c){throw v(c)?new o("read aborted","FS_ABORTED"):c}}s(xt,"streamWholeText");async function zt(t,e,i){try{await i(t)}catch(r){throw new o(`write failed (${p(e)}) and temp cleanup failed (${p(r)})`,"FS_NOT_FOUND",{cause:e})}throw e}s(zt,"removeStagingDirOrThrow");async function Mt(t,e,i,r){let n;try{n=await r(e)}catch(a){if(!y(a)&&!N(a))throw new o(`cannot write "${i}": ${p(a)}`,"FS_IO_ERROR",{cause:a})}throw n!==void 0?n.isFile()?new o(`cannot overwrite existing "${i}" without reading it first`,"FS_NOT_OBSERVED",{cause:t}):new o(`cannot write "${i}": not a regular file`,"FS_NOT_REGULAR_FILE",{cause:t}):It(t)?new o(`cannot overwrite existing "${i}" without reading it first`,"FS_NOT_OBSERVED",{cause:t}):new o(`cannot write "${i}": ${p(t)}`,"FS_IO_ERROR",{cause:t})}s(Mt,"throwGuardedCreateFailure");async function nt(t,e,i,r,n={},a){d(r,"write");const c=$(t);await X(c,{recursive:!0}),d(r,"write");const l=n.tempDirName?.(t)??`.${S(t)}.${process.pid}.${mt()}.tmpdir`,f=E(c,l),R=n.tempName?.(t)??`${S(t)}.tmp`,w=E(f,R),U=n.platform??process.platform,st=n.copyFileDacl??Dt,ct=n.replaceFile??bt,lt=n.linkFile??Et,ft=n.inspectPublicationTarget??(u=>G(u,{bigint:!0})),W=n.removeStagingDir??(u=>Ot(u,{recursive:!0,force:!0}));let h,k=!1;try{if(await X(f,{mode:448}),k=!0,await Ft(f,448),h=await V(w,"wx",384),await h.chmod(384),U==="win32"&&i!==void 0&&await st(t,w),await h.writeFile(e,{encoding:"utf8",...r?{signal:r}:{}}),await h.sync(),await n.inspectTemp?.({stagingDir:f,tempPath:w}),i!==void 0&&await h.chmod(i),await h.close(),h=void 0,d(r,"write"),a!==void 0)try{await lt(w,t)}catch(u){await Mt(u,t,a.displayPath,ft)}else if(U==="win32"&&i!==void 0)try{await ct(t,w)}catch(u){if(!y(u))throw u;await j(w,t)}else await j(w,t);try{await W(f)}catch{}}catch(u){let F=v(u)?new o("write aborted","FS_ABORTED"):u;if(h)try{await h.close()}catch(dt){F=new o(`write failed (${p(F)}) and temp close failed (${p(dt)})`,"FS_NOT_FOUND",{cause:F})}if(!k)throw F;return zt(f,F,W)}}s(nt,"writeFileAtomic");function m(t){return t.replaceAll(`\r
2
2
  `,`
3
- `)}s(_,"normalizeLineEndings");function zt(t){const e=t.slice(0,4096),i=e.split(`\r
3
+ `)}s(m,"normalizeLineEndings");function Ct(t){const e=t.slice(0,4096),i=e.split(`\r
4
4
  `).length-1;return i>e.split(`
5
- `).length-1-i?"CRLF":"LF"}s(zt,"detectLineEndings");function Mt(t,e){return e==="LF"?t:_(t).split(`
5
+ `).length-1-i?"CRLF":"LF"}s(Ct,"detectLineEndings");function Gt(t,e){return e==="LF"?t:m(t).split(`
6
6
  `).join(`\r
7
- `)}s(Mt,"restoreLineEndings");function Ct(t,e){let i=0,r=0;for(;;){const n=t.indexOf(e,r);if(n===-1)return i;i+=1,r=n+e.length}}s(Ct,"countOccurrences");async function Gt(t,e,i){d(i,"edit");const r=await H(t,"edit",i);if(d(i,"edit"),r.includes(0))throw new o(`cannot edit "${e}": binary file`,"FS_NOT_TEXT");const n=et(r,"edit",e);return{content:_(n),lineEndings:zt(n)}}s(Gt,"readForEdit");async function Xt(t,e,i){d(i,"read");try{const r=await X(t,"r");let n,a=0,c=0;try{d(i,"read");const f=await r.stat();if(d(i,"read"),!f.isFile()||f.size>=e)return null;for(c=f.size,n=Buffer.allocUnsafe(c+1);a<n.length;){d(i,"read");const m=Math.min(n.length-a,Dt),{bytesRead:S}=await r.read(n,a,m,null);if(S===0)break;a+=S}}finally{await r.close()}if(d(i,"read"),a!==c)return null;const l=n.subarray(0,a);if(l.includes(0))return null;try{return _(new I("utf-8",{fatal:!0}).decode(l))}catch(f){if(!(f instanceof TypeError))throw f;return null}}catch(r){if(r instanceof o)throw r;if(r instanceof Error&&"code"in r)return null;throw r}}s(Xt,"readTextForDiff");function Vt(t,e,i,r,n){const a=_(e);if(a.length===0)throw new o("old_string must be a non-empty string","FS_EDIT_NOT_FOUND");const c=_(i),l=Ct(t,a);if(l===0)throw new o(`old_string was not found in "${n}"`,"FS_EDIT_NOT_FOUND");if(!r&&l>1)throw new o(`old_string matched ${l} times in "${n}"; provide a more specific old_string or set replace_all to true`,"FS_AMBIGUOUS_EDIT");return{content:t.split(a).join(c),replacements:l}}s(Vt,"applyLiteralEdit");const Yt=10*1024*1024,nt=Math.min(k.MAX_LENGTH,k.MAX_STRING_LENGTH);var at=class extends yt{static{s(this,"LocalFileSystem")}static Config=D.object({cwd:D.string().default(process.cwd()),diffBasisMaxBytes:D.number().default(Yt)});config;internals={};locks=new Map;constructor(t,e){super(t);const i=e;if(!Number.isSafeInteger(i.diffBasisMaxBytes)||i.diffBasisMaxBytes<=0||i.diffBasisMaxBytes>nt)throw new Error(`fs-local: diffBasisMaxBytes must be a positive safe integer no greater than ${nt}`);this.config=i}async withLock(t,e){const i=(this.locks.get(t)??Promise.resolve()).then(e,e),r=i.then(()=>{},()=>{});this.locks.set(t,r);try{return await i}finally{this.locks.get(t)===r&&this.locks.delete(t)}}async resolve(t,e){if(e?.signal?.aborted)throw new o("resolve aborted","FS_ABORTED");const i=await J(e?.cwd??this.config.cwd,t);if(e?.signal?.aborted)throw new o("resolve aborted","FS_ABORTED");return{targetKey:i.targetKey,displayPath:i.displayPath}}processPath(t){return String(t.targetKey)}fileUrl(t){return ht(this.processPath(t)).href}contains(t,e){const i=ut(this.processPath(t),this.processPath(e));return i===""||i!==".."&&!i.startsWith(`..${wt}`)&&!dt(i)}async stat(t,e){if(e?.aborted)throw new o("stat aborted","FS_ABORTED");const i=await p(t.targetKey);if(e?.aborted)throw new o("stat aborted","FS_ABORTED");if(i)return{version:i.version,type:i.type,size:i.size}}async lstat(t,e,i){if(i?.aborted)throw new o("lstat aborted","FS_ABORTED");if(t.trim().length===0)throw new o("file_path must be a non-empty string","FS_NOT_FOUND");const r=await Lt(x(e?.cwd??this.config.cwd,t));if(i?.aborted)throw new o("lstat aborted","FS_ABORTED");if(r)return{version:r.version,type:r.type,size:r.size}}async readText(t,e){return Kt({displayPath:t.displayPath,targetKey:t.targetKey},e)}streamText(t,e){return Promise.resolve(Wt({displayPath:t.displayPath,targetKey:t.targetKey},e))}async readBytes(t,e,i){return Ut({displayPath:t.displayPath,targetKey:t.targetKey},e,i,this.internals)}async listDir(t,e){return(await Pt({displayPath:t.displayPath,targetKey:t.targetKey},e)).map(i=>({name:i.name,type:i.type,target:{targetKey:i.target.targetKey,displayPath:i.target.displayPath},...i.version!==void 0?{version:i.version}:{},...i.size!==void 0?{size:i.size}:{}}))}async writeText(t,e,i,r){return this.withLock(t.targetKey,async()=>{const n=await p(t.targetKey);if(n&&n.type!=="file")throw new o(`cannot write "${t.displayPath}": not a regular file`,"FS_NOT_REGULAR_FILE");if(i?.kind==="replaceIfVersion"){if(!n)throw new o(`cannot write "${t.displayPath}": file no longer exists`,"FS_STALE_VERSION");if(n.version!==i.version)throw new o(`cannot write "${t.displayPath}": file changed since it was read`,"FS_STALE_VERSION")}else if(i?.kind==="createIfAbsent"&&n)throw new o(`cannot overwrite existing "${t.displayPath}" without reading it first`,"FS_NOT_OBSERVED");const a=n!==null&&Buffer.byteLength(e,"utf8")<this.config.diffBasisMaxBytes?await Xt(t.targetKey,this.config.diffBasisMaxBytes,r):null;await rt(t.targetKey,e,n?.mode,r,this.internals,i?.kind==="createIfAbsent"?{displayPath:t.displayPath}:void 0);const c=await p(t.targetKey);return{operation:n?"update":"create",version:this.versionAfterWrite(c,t),before:a,after:_(e)}})}async editText(t,e,i,r){return this.withLock(t.targetKey,async()=>{const n=await p(t.targetKey);if(!n)throw new o(`cannot edit "${t.displayPath}": file changed since it was read`,"FS_STALE_VERSION");if(n.type!=="file")throw new o(`cannot edit "${t.displayPath}": not a regular file`,"FS_NOT_REGULAR_FILE");if(i&&n.version!==i.version)throw new o(`cannot edit "${t.displayPath}": file changed since it was read`,"FS_STALE_VERSION");const a=await Gt(t.targetKey,t.displayPath,r),c=Vt(a.content,e.oldString,e.newString,e.replaceAll,t.displayPath),l=Mt(c.content,a.lineEndings);await rt(t.targetKey,l,n.mode,r,this.internals);const f=await p(t.targetKey);return{version:this.versionAfterWrite(f,t),before:a.content,after:c.content}})}versionAfterWrite(t,e){return t?t.version:z(`missing:${e.targetKey}`)}};export{at as LocalFileSystem,at as default};
7
+ `)}s(Gt,"restoreLineEndings");function Xt(t,e){let i=0,r=0;for(;;){const n=t.indexOf(e,r);if(n===-1)return i;i+=1,r=n+e.length}}s(Xt,"countOccurrences");async function Vt(t,e,i){d(i,"edit");const r=await q(t,"edit",i);if(d(i,"edit"),r.includes(0))throw new o(`cannot edit "${e}": binary file`,"FS_NOT_TEXT");const n=it(r,"edit",e);return{content:m(n),lineEndings:Ct(n)}}s(Vt,"readForEdit");async function Yt(t,e,i){d(i,"read");try{const r=await V(t,"r");let n,a=0,c=0;try{d(i,"read");const f=await r.stat();if(d(i,"read"),!f.isFile()||f.size>=e)return null;for(c=f.size,n=Buffer.allocUnsafe(c+1);a<n.length;){d(i,"read");const R=Math.min(n.length-a,At),{bytesRead:w}=await r.read(n,a,R,null);if(w===0)break;a+=w}}finally{await r.close()}if(d(i,"read"),a!==c)return null;const l=n.subarray(0,a);if(l.includes(0))return null;try{return m(new I("utf-8",{fatal:!0}).decode(l))}catch(f){if(!(f instanceof TypeError))throw f;return null}}catch(r){if(r instanceof o)throw r;if(r instanceof Error&&"code"in r)return null;throw r}}s(Yt,"readTextForDiff");function jt(t,e,i,r,n){const a=m(e);if(a.length===0)throw new o("old_string must be a non-empty string","FS_EDIT_NOT_FOUND");const c=m(i),l=Xt(t,a);if(l===0)throw new o(`old_string was not found in "${n}"`,"FS_EDIT_NOT_FOUND");if(!r&&l>1)throw new o(`old_string matched ${l} times in "${n}"; provide a more specific old_string or set replace_all to true`,"FS_AMBIGUOUS_EDIT");return{content:t.split(a).join(c),replacements:l}}s(jt,"applyLiteralEdit");const Ht=10485760,at=Math.min(x.MAX_LENGTH,x.MAX_STRING_LENGTH);var ot=class extends _t{static{s(this,"LocalFileSystem")}static Config=D.object({cwd:D.string().default(process.cwd()),diffBasisMaxBytes:D.number().default(Ht)});config;internals={};locks=new Map;constructor(t,e){super(t);const i=e;if(!Number.isSafeInteger(i.diffBasisMaxBytes)||i.diffBasisMaxBytes<=0||i.diffBasisMaxBytes>at)throw new Error(`fs-local: diffBasisMaxBytes must be a positive safe integer no greater than ${at}`);this.config=i}async withLock(t,e){const i=(this.locks.get(t)??Promise.resolve()).then(e,e),r=i.then(()=>{},()=>{});this.locks.set(t,r);try{return await i}finally{this.locks.get(t)===r&&this.locks.delete(t)}}async resolve(t,e){if(e?.signal?.aborted)throw new o("resolve aborted","FS_ABORTED");const i=await Q(e?.cwd??this.config.cwd,t);if(e?.signal?.aborted)throw new o("resolve aborted","FS_ABORTED");return{targetKey:i.targetKey,displayPath:i.displayPath}}processPath(t){return String(t.targetKey)}fileUrl(t){return pt(this.processPath(t)).href}contains(t,e){const i=ht(this.processPath(t),this.processPath(e));return i===""||i!==".."&&!i.startsWith(`..${yt}`)&&!wt(i)}async stat(t,e){if(e?.aborted)throw new o("stat aborted","FS_ABORTED");const i=await _(t.targetKey);if(e?.aborted)throw new o("stat aborted","FS_ABORTED");if(i)return{version:i.version,type:i.type,size:i.size}}async lstat(t,e,i){if(i?.aborted)throw new o("lstat aborted","FS_ABORTED");if(t.trim().length===0)throw new o("file_path must be a non-empty string","FS_NOT_FOUND");const r=await Pt(z(e?.cwd??this.config.cwd,t));if(i?.aborted)throw new o("lstat aborted","FS_ABORTED");if(r)return{version:r.version,type:r.type,size:r.size}}async readText(t,e){return Wt({displayPath:t.displayPath,targetKey:t.targetKey},e)}streamText(t,e){return Promise.resolve(xt({displayPath:t.displayPath,targetKey:t.targetKey},e))}async readBytes(t,e,i){return kt({displayPath:t.displayPath,targetKey:t.targetKey},e,i,this.internals)}async listDir(t,e){return(await Ut({displayPath:t.displayPath,targetKey:t.targetKey},e)).map(i=>({name:i.name,type:i.type,target:{targetKey:i.target.targetKey,displayPath:i.target.displayPath},...i.version!==void 0?{version:i.version}:{},...i.size!==void 0?{size:i.size}:{}}))}async writeText(t,e,i,r){return this.withLock(t.targetKey,async()=>{const n=await _(t.targetKey);if(n&&n.type!=="file")throw new o(`cannot write "${t.displayPath}": not a regular file`,"FS_NOT_REGULAR_FILE");if(i?.kind==="replaceIfVersion"){if(!n)throw new o(`cannot write "${t.displayPath}": file no longer exists`,"FS_STALE_VERSION");if(n.version!==i.version)throw new o(`cannot write "${t.displayPath}": file changed since it was read`,"FS_STALE_VERSION")}else if(i?.kind==="createIfAbsent"&&n)throw new o(`cannot overwrite existing "${t.displayPath}" without reading it first`,"FS_NOT_OBSERVED");const a=n!==null&&Buffer.byteLength(e,"utf8")<this.config.diffBasisMaxBytes?await Yt(t.targetKey,this.config.diffBasisMaxBytes,r):null;await nt(t.targetKey,e,n?.mode,r,this.internals,i?.kind==="createIfAbsent"?{displayPath:t.displayPath}:void 0);const c=await _(t.targetKey);return{operation:n?"update":"create",version:this.versionAfterWrite(c,t),before:a,after:m(e)}})}async editText(t,e,i,r){return this.withLock(t.targetKey,async()=>{const n=await _(t.targetKey);if(!n)throw new o(`cannot edit "${t.displayPath}": file changed since it was read`,"FS_STALE_VERSION");if(n.type!=="file")throw new o(`cannot edit "${t.displayPath}": not a regular file`,"FS_NOT_REGULAR_FILE");if(i&&n.version!==i.version)throw new o(`cannot edit "${t.displayPath}": file changed since it was read`,"FS_STALE_VERSION");const a=await Vt(t.targetKey,t.displayPath,r),c=jt(a.content,e.oldString,e.newString,e.replaceAll,t.displayPath),l=Gt(c.content,a.lineEndings);await nt(t.targetKey,l,n.mode,r,this.internals);const f=await _(t.targetKey);return{version:this.versionAfterWrite(f,t),before:a.content,after:c.content}})}versionAfterWrite(t,e){return t?t.version:M(`missing:${e.targetKey}`)}};export{ot as LocalFileSystem,ot as default};
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-fs-local","version":"0.0.10","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-fs":"^0.0.10","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-invariants":"^0.0.10"},"dependencies":{"koffi":"^3.1.0","@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-fs-local","version":"0.0.12","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-invariants":"^0.0.12","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-fs":"^0.0.12"},"dependencies":{"koffi":"^3.1.0","@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-fs-observation-policy","version":"0.0.10","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-fs":"^0.0.10","@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-fs-observation-policy","version":"0.0.12","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-fs":"^0.0.12","@deepseek-ai/dsh-invariants":"^0.0.12","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-fs-sandbox","version":"0.0.10","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-fs":"^0.0.10","@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-fs-local":"^0.0.10","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-sandbox-policy":"^0.0.10","@deepseek-ai/dsh-sandbox":"^0.0.10"}}
1
+ {"name":"@deepseek-ai/dsh-fs-sandbox","version":"0.0.12","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-fs":"^0.0.12","@deepseek-ai/dsh-invariants":"^0.0.12","@deepseek-ai/dsh-sandbox":"^0.0.12","@deepseek-ai/dsh-sandbox-policy":"^0.0.12","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-fs-local":"^0.0.12"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-goal","version":"0.0.10","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"},"./client":{"types":"./lib/types/client.d.ts","default":"./lib/types/client.js"},"./typert":{"types":"./lib/typert.host.d.ts","default":"./lib/typert.host.js"},"./remote":{"types":"./lib/typert.remote-client.d.ts","default":"./lib/typert.remote-client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-session-projection":"^0.0.10","@deepseek-ai/dsh-brand":"^0.0.10","@deepseek-ai/dsh-llm":"^0.0.10","@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-agent":"^0.0.10","@deepseek-ai/dsh-scope":"^0.0.10","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session":"^0.0.10","@deepseek-ai/dsh-typert-protocol":"^0.0.10"},"dependencies":{"zod":"^4.4.3","@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-goal","version":"0.0.12","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"},"./client":{"types":"./lib/types/client.d.ts","default":"./lib/types/client.js"},"./typert":{"types":"./lib/typert.host.d.ts","default":"./lib/typert.host.js"},"./remote":{"types":"./lib/typert.remote-client.d.ts","default":"./lib/typert.remote-client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-agent":"^0.0.12","@deepseek-ai/dsh-session-projection":"^0.0.12","@deepseek-ai/dsh-invariants":"^0.0.12","@deepseek-ai/dsh-brand":"^0.0.12","@deepseek-ai/dsh-session":"^0.0.12","@deepseek-ai/dsh-typert-protocol":"^0.0.12","@deepseek-ai/dsh-scope":"^0.0.12","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-llm":"^0.0.12"},"dependencies":{"zod":"^4.4.3","@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-goal-round-driver","version":"0.0.10","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.10","@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-llm":"^0.0.10","@deepseek-ai/dsh-goal":"^0.0.10","@deepseek-ai/dsh-session":"^0.0.10","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-goal-round-driver","version":"0.0.12","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-invariants":"^0.0.12","@deepseek-ai/dsh-goal":"^0.0.12","@deepseek-ai/dsh-session":"^0.0.12","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-llm":"^0.0.12","@deepseek-ai/dsh-agent":"^0.0.12"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-headless","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./startup":{"types":"./lib/types/startup.d.ts","default":"./lib/startup.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./cordis.patch.yml":"./cordis.patch.yml","./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dsh":{"bundle":{"patch":"./cordis.patch.yml"}},"dependencies":{"commander":"^15.0.0","@deepseek-ai/dsh-cmdline":"^0.0.10","@deepseek-ai/schemastery":"^3.18.1","@deepseek-ai/dsh-code-runtime-worker-thread":"^0.0.10"},"peerDependencies":{"@deepseek-ai/dsh-agent":"^0.0.10","@deepseek-ai/dsh-agent-default-model":"^0.0.10","@deepseek-ai/cordis-plugin-loader":"^1.0.2","@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-llm":"^0.0.10","@deepseek-ai/dsh-session":"^0.0.10","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-headless","version":"0.0.12","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./startup":{"types":"./lib/types/startup.d.ts","default":"./lib/startup.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./cordis.patch.yml":"./cordis.patch.yml","./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dsh":{"bundle":{"patch":"./cordis.patch.yml"}},"dependencies":{"commander":"^15.0.0","@deepseek-ai/dsh-code-runtime-worker-thread":"^0.0.12","@deepseek-ai/dsh-cmdline":"^0.0.12","@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/cordis-plugin-loader":"^1.0.2","@deepseek-ai/dsh-agent-default-model":"^0.0.12","@deepseek-ai/dsh-invariants":"^0.0.12","@deepseek-ai/dsh-agent":"^0.0.12","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session":"^0.0.12","@deepseek-ai/dsh-llm":"^0.0.12"}}
@@ -1 +1 @@
1
- var d=Object.defineProperty;var e=(t,r)=>d(t,"name",{value:r,configurable:!0});import{opendir as D,realpath as E}from"node:fs/promises";import{homedir as s}from"node:os";import{basename as _,dirname as p,join as i,resolve as c}from"node:path";const a=".qbot-dsh",h=`~/${a}`,u="QBOT_DSH_HOME";async function v(t){let r=c(t);const n=[];for(;;)try{const o=await E(r);return n.length>0&&await(await D(o)).close(),i(o,...n.reverse())}catch(o){if(o.code!=="ENOENT")throw o;const f=p(r);if(f===r)throw o;n.push(_(r)),r=f}}e(v,"canonicalizeWatchPath");function m(){return i(s(),a)}e(m,"defaultDshHome");function l(t){return t==="~"?s():t.startsWith("~/")||t.startsWith("~\\")?i(s(),t.slice(2)):t}e(l,"expandHomePath");function H(t,r=process.env){const n=r[u];return c(l(t??(n!==void 0&&n.trim().length>0?n:m())))}e(H,"resolveDshHome");function w(...t){return i(H(),...t)}e(w,"dshHomePath");function O(t){return t===c(m())?h:`$${u}`}e(O,"dshHomeDisplay");export{h as DEFAULT_DSH_HOME_DISPLAY,a as DSH_HOME_DIR_NAME,u as DSH_HOME_ENV,v as canonicalizeWatchPath,m as defaultDshHome,O as dshHomeDisplay,w as dshHomePath,l as expandHomePath,H as resolveDshHome};
1
+ var d=Object.defineProperty;var o=(t,e)=>d(t,"name",{value:e,configurable:!0});import{opendir as D,realpath as E}from"node:fs/promises";import{homedir as s}from"node:os";import{basename as _,dirname as p,join as i,resolve as c}from"node:path";const a=".qbot-dsh",h=`~/${a}`,u="QBOT_DSH_HOME";async function v(t){let e=c(t);const n=[];for(;;)try{const r=await E(e);return n.length>0&&await(await D(r)).close(),i(r,...n.reverse())}catch(r){if(r.code!=="ENOENT")throw r;const f=p(e);if(f===e)throw r;n.push(_(e)),e=f}}o(v,"canonicalizeWatchPath");function m(){return i(s(),a)}o(m,"defaultDshHome");function l(t){return t==="~"?s():t.startsWith("~/")||t.startsWith("~\\")?i(s(),t.slice(2)):t}o(l,"expandHomePath");function H(t,e=process.env){const n=e[u],r=t??(n!==void 0&&n.trim().length>0?n:m());return c(l(r))}o(H,"resolveDshHome");function w(...t){return i(H(),...t)}o(w,"dshHomePath");function O(t){return t===c(m())?h:`$${u}`}o(O,"dshHomeDisplay");export{h as DEFAULT_DSH_HOME_DISPLAY,a as DSH_HOME_DIR_NAME,u as DSH_HOME_ENV,v as canonicalizeWatchPath,m as defaultDshHome,O as dshHomeDisplay,w as dshHomePath,l as expandHomePath,H as resolveDshHome};
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-home-paths","version":"0.0.10","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-invariants":"^0.0.10","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-home-paths","version":"0.0.12","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-invariants":"^0.0.12","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- var i=Object.defineProperty;var e=(t,s)=>i(t,"name",{value:s,configurable:!0});import{canonicalizeWatchPath as c,resolveDshHome as o}from"@deepseek-ai/dsh-home-paths";import{runNativeCommand as h}from"@deepseek-ai/dsh-native-command";import{mkdir as u}from"node:fs/promises";const n="com.apple.quarantine",l="/usr/bin/xattr",d=/(?:Events were dropped|File system must be re-scanned)/,m="home-quarantine-macos";function w(t){const s=t?.code;if(s==="ENOENT"||s==="ENOTDIR"||s==="ENOATTR"||s==="ENODATA")return!0;const a=t instanceof Error?t.message:String(t);return/os error (?:2|61|93)\b/.test(a)}e(w,"isBenignRace");var f=class{static{e(this,"HomeQuarantineRuntime")}ctx;root;watcher;xattr;subscription;clears=new Set;pendingPaths=new Set;scanAbort=new AbortController;scanTask;scanAgain=!1;closed=!1;scanRoot;constructor(t,s,a,r){this.ctx=t,this.root=s,this.watcher=a,this.xattr=r,this.scanRoot=s}async start(){await u(this.root,{recursive:!0,mode:448});const t=await c(this.root);this.scanRoot=t;try{this.subscription=await this.watcher.subscribe(t,this.onEvents,{backend:"fs-events"}),await this.requestScan()}catch(s){this.closed=!0,this.scanAbort.abort();try{await this.subscription?.unsubscribe()}catch(a){throw new AggregateError([s,a],"home-quarantine-macos: setup and watcher cleanup failed")}throw s}}async close(){this.closed=!0;let t;try{await this.subscription?.unsubscribe()}catch(s){t=s instanceof Error?s:new Error("home-quarantine-macos: watcher cleanup failed",{cause:s})}if(this.scanAbort.abort(),await this.scanTask?.catch(()=>{}),await Promise.all(this.clears),t!==void 0)throw t}onEvents=e((t,s)=>{if(!this.closed){if(t!==null){this.ctx.logger.warn("home-quarantine-macos: watcher error under %s: %s",this.root,t.message),d.test(t.message)&&this.requestScan().catch(a=>{this.closed||this.warnScan(a)});return}for(const a of s)a.type==="create"&&this.queueClear(a)}},"onEvents");queueClear(t){if(this.pendingPaths.has(t.path))return;this.pendingPaths.add(t.path);const s=this.clear(t.path);this.clears.add(s),s.then(()=>{this.pendingPaths.delete(t.path),this.clears.delete(s)},()=>{this.pendingPaths.delete(t.path),this.clears.delete(s)})}async clear(t){try{if(!(await this.xattr.listAttributes(t)).includes(n)||this.closed)return;await this.xattr.removeAttribute(t,n)}catch(s){if(w(s)||this.closed)return;this.ctx.logger.warn("home-quarantine-macos: failed to clear quarantine from %s",t),this.ctx.logger.warn(s)}}requestScan(){if(this.scanTask!==void 0)return this.scanAgain=!0,this.scanTask;const t=(async()=>{do this.scanAgain=!1,await h(l,["-drs",n,this.scanRoot],this.scanAbort.signal);while(this.shouldRescan())})();return this.scanTask=t,t.then(()=>{this.scanTask=void 0},()=>{this.scanTask=void 0}),t}shouldRescan(){return this.scanAgain&&!this.closed}warnScan(t){this.ctx.logger.warn("home-quarantine-macos: compensation scan failed under %s",this.root),this.ctx.logger.warn(t)}};async function p(t){if(process.platform!=="darwin")return;const[s,a]=await Promise.all([import("@parcel/watcher"),import("@napi-rs/xattr")]);await t.effect(async()=>{const r=new f(t,o(),s,a);return await r.start(),()=>r.close()},"home-quarantine-macos: harness-home watcher")}e(p,"apply");export{p as apply,m as name};
1
+ var c=Object.defineProperty;var a=(t,s)=>c(t,"name",{value:s,configurable:!0});import{canonicalizeWatchPath as h,expandHomePath as u,resolveDshHome as l}from"@deepseek-ai/dsh-home-paths";import{runNativeCommand as d}from"@deepseek-ai/dsh-native-command";import o from"@deepseek-ai/schemastery";import{mkdir as m}from"node:fs/promises";import{basename as w,dirname as f,isAbsolute as p,join as g,relative as b,resolve as A,sep as T}from"node:path";const n="com.apple.quarantine",E="/usr/bin/xattr",R=/(?:Events were dropped|File system must be re-scanned)/,v="home-quarantine-macos",x=o.object({root:o.string().pattern(/\S/)});function q(t,s){const e=b(t,s);return e===""||!p(e)&&e!==".."&&!e.startsWith(`..${T}`)}a(q,"isWithin");function y(t){if(t.root!==void 0)return A(u(t.root));const s=l(),e=f(s),r=g(e,"runtime","node");return w(s)==="dsh-home"&&q(r,process.execPath)?e:s}a(y,"resolveRoot");function S(t){const s=t?.code;if(s==="ENOENT"||s==="ENOTDIR"||s==="ENOATTR"||s==="ENODATA")return!0;const e=t instanceof Error?t.message:String(t);return/os error (?:2|61|93)\b/.test(e)}a(S,"isBenignRace");var k=class{static{a(this,"HomeQuarantineRuntime")}ctx;root;watcher;xattr;subscription;clears=new Set;pendingPaths=new Set;scanAbort=new AbortController;scanTask;scanAgain=!1;closed=!1;scanRoot;constructor(t,s,e,r){this.ctx=t,this.root=s,this.watcher=e,this.xattr=r,this.scanRoot=s}async start(){await m(this.root,{recursive:!0,mode:448});const t=await h(this.root);this.scanRoot=t;try{this.subscription=await this.watcher.subscribe(t,this.onEvents,{backend:"fs-events"}),await this.requestScan()}catch(s){this.closed=!0,this.scanAbort.abort();try{await this.subscription?.unsubscribe()}catch(e){throw new AggregateError([s,e],"home-quarantine-macos: setup and watcher cleanup failed")}throw s}}async close(){this.closed=!0;let t;try{await this.subscription?.unsubscribe()}catch(s){t=s instanceof Error?s:new Error("home-quarantine-macos: watcher cleanup failed",{cause:s})}if(this.scanAbort.abort(),await this.scanTask?.catch(()=>{}),await Promise.all(this.clears),t!==void 0)throw t}onEvents=a((t,s)=>{if(!this.closed){if(t!==null){this.ctx.logger.warn("home-quarantine-macos: watcher error under %s: %s",this.root,t.message),R.test(t.message)&&this.requestScan().catch(e=>{this.closed||this.warnScan(e)});return}for(const e of s)e.type==="create"&&this.queueClear(e)}},"onEvents");queueClear(t){if(this.pendingPaths.has(t.path))return;this.pendingPaths.add(t.path);const s=this.clear(t.path);this.clears.add(s),s.then(()=>{this.pendingPaths.delete(t.path),this.clears.delete(s)},()=>{this.pendingPaths.delete(t.path),this.clears.delete(s)})}async clear(t){try{if(!(await this.xattr.listAttributes(t)).includes(n)||this.closed)return;await this.xattr.removeAttribute(t,n)}catch(s){if(S(s)||this.closed)return;this.ctx.logger.warn("home-quarantine-macos: failed to clear quarantine from %s",t),this.ctx.logger.warn(s)}}requestScan(){if(this.scanTask!==void 0)return this.scanAgain=!0,this.scanTask;const t=(async()=>{do this.scanAgain=!1,await d(E,["-drs",n,this.scanRoot],this.scanAbort.signal);while(this.shouldRescan())})();return this.scanTask=t,t.then(()=>{this.scanTask=void 0},()=>{this.scanTask=void 0}),t}shouldRescan(){return this.scanAgain&&!this.closed}warnScan(t){this.ctx.logger.warn("home-quarantine-macos: compensation scan failed under %s",this.root),this.ctx.logger.warn(t)}};async function N(t,s={}){if(process.platform!=="darwin")return;const[e,r]=await Promise.all([import("@parcel/watcher"),import("@napi-rs/xattr")]);await t.effect(async()=>{const i=new k(t,y(s),e,r);return await i.start(),()=>i.close()},"home-quarantine-macos: cleanup-root watcher")}a(N,"apply");export{x as Config,N as apply,v as name};
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-home-quarantine-macos","version":"0.0.10","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":{"@napi-rs/xattr":"^1.0.3","@parcel/watcher":"^2.6.0"},"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-home-paths":"^0.0.10","@deepseek-ai/dsh-native-command":"^0.0.10"}}
1
+ {"name":"@deepseek-ai/dsh-home-quarantine-macos","version":"0.0.12","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":{"@napi-rs/xattr":"^1.0.3","@parcel/watcher":"^2.6.0","@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-home-paths":"^0.0.12","@deepseek-ai/dsh-native-command":"^0.0.12","@deepseek-ai/dsh-invariants":"^0.0.12","@deepseek-ai/cordis":"^4.0.1"}}