@qqbrowser/qbot-dsh 0.1.0 → 0.1.2

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 (629) hide show
  1. package/cordis.patch.yml +50 -0
  2. package/lib/args-w1okyL78.js +9 -0
  3. package/lib/bin.js +1 -2
  4. package/lib/client.js +1 -0
  5. package/lib/content-review-CqDoh3wY.js +1 -0
  6. package/lib/content-review.js +1 -0
  7. package/lib/dump-config-CIL0Goqj.js +1 -0
  8. package/lib/gateway-port-CSFbDyoZ.js +1 -0
  9. package/lib/index.js +1 -0
  10. package/lib/llm-gateway-openai.js +17 -0
  11. package/lib/native-protocol-DdrIh89-.js +2 -0
  12. package/lib/{plugin-DNAeLZbb.js → plugin-viWCLnSr.js} +1 -1
  13. package/lib/profile-boot-CxJUSdnu.js +1 -0
  14. package/lib/profile-boot-DCgBQ4qO.js +8 -0
  15. package/lib/qb-auth-C2ofR1zn.js +4 -0
  16. package/lib/qb-auth.js +1 -0
  17. package/lib/web-search-dsh.js +1 -0
  18. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-cjs/index.js +7 -2
  19. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +3 -0
  20. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +3 -0
  21. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/package.json +1 -1
  22. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-cjs/index.js +7 -2
  23. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +3 -0
  24. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +3 -0
  25. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/package.json +1 -1
  26. package/node_modules/@deepseek-ai/cordis-plugin-hmr/package.json +1 -1
  27. package/node_modules/@deepseek-ai/dsh-agent/package.json +1 -1
  28. package/node_modules/@deepseek-ai/dsh-agent-default-model/package.json +1 -1
  29. package/node_modules/@deepseek-ai/dsh-agent-instructions/lib/index.js +3 -3
  30. package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +1 -1
  31. package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +1 -1
  32. package/node_modules/@deepseek-ai/dsh-agent-presets/package.json +1 -1
  33. package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/package.json +1 -1
  34. package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +1 -1
  35. package/node_modules/@deepseek-ai/dsh-api-gateway/package.json +1 -1
  36. package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +1 -1
  37. package/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +12 -12
  38. package/node_modules/@deepseek-ai/dsh-app-boot/package.json +1 -1
  39. package/node_modules/@deepseek-ai/dsh-atomic-write/package.json +1 -1
  40. package/node_modules/@deepseek-ai/dsh-attachment/package.json +1 -1
  41. package/node_modules/@deepseek-ai/dsh-attachment-local/lib/index.js +1 -1
  42. package/node_modules/@deepseek-ai/dsh-attachment-local/package.json +1 -1
  43. package/node_modules/@deepseek-ai/dsh-base/cordis.patch.yml +6 -37
  44. package/node_modules/@deepseek-ai/dsh-base/package.json +1 -1
  45. package/node_modules/@deepseek-ai/dsh-bash-local/package.json +1 -1
  46. package/node_modules/@deepseek-ai/dsh-bash-sandbox/package.json +1 -1
  47. package/node_modules/@deepseek-ai/dsh-brand/package.json +1 -1
  48. package/node_modules/@deepseek-ai/dsh-client-connection/package.json +1 -1
  49. package/node_modules/@deepseek-ai/dsh-client-hmr/package.json +1 -1
  50. package/node_modules/@deepseek-ai/dsh-client-locale/lib/client.js +1 -1
  51. package/node_modules/@deepseek-ai/dsh-client-locale/package.json +1 -1
  52. package/node_modules/@deepseek-ai/dsh-client-modules/package.json +1 -1
  53. package/node_modules/@deepseek-ai/dsh-client-runtime/package.json +1 -1
  54. package/node_modules/@deepseek-ai/dsh-client-schema-form/package.json +1 -1
  55. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +1 -1
  56. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/package.json +1 -1
  57. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +1 -1
  58. package/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +1 -1
  59. package/node_modules/@deepseek-ai/dsh-client-ui-commands/package.json +1 -1
  60. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +8 -8
  61. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +1 -1
  62. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/lib/client.js +3 -3
  63. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/package.json +1 -1
  64. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +1 -1
  65. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +1 -1
  66. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/lib/client.js +1 -1
  67. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/package.json +1 -1
  68. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-native/package.json +1 -1
  69. package/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +1 -1
  70. package/node_modules/@deepseek-ai/dsh-client-ui-goal/package.json +1 -1
  71. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/lib/client.js +1 -1
  72. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/package.json +1 -1
  73. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +1 -1
  74. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/package.json +1 -1
  75. package/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js +1 -1
  76. package/node_modules/@deepseek-ai/dsh-client-ui-layout/package.json +1 -1
  77. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/lib/client.js +1 -1
  78. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/package.json +1 -1
  79. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +1 -1
  80. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/package.json +1 -1
  81. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/lib/client.js +1 -1
  82. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/package.json +1 -1
  83. package/node_modules/@deepseek-ai/dsh-client-ui-plan/lib/client.js +1 -1
  84. package/node_modules/@deepseek-ai/dsh-client-ui-plan/package.json +1 -1
  85. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/package.json +1 -1
  86. package/node_modules/@deepseek-ai/dsh-client-ui-settings/lib/client.js +1 -1
  87. package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +1 -1
  88. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +1 -1
  89. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +1 -1
  90. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +3 -3
  91. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +1 -1
  92. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +1 -1
  93. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +1 -1
  94. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/client.js +1 -1
  95. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +1 -1
  96. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
  97. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/package.json +1 -1
  98. package/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +3 -3
  99. package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +1 -1
  100. package/node_modules/@deepseek-ai/dsh-client-ui-slots/package.json +1 -1
  101. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +1 -1
  102. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +1 -1
  103. package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +1 -1
  104. package/node_modules/@deepseek-ai/dsh-client-ui-theme/package.json +1 -1
  105. package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +4 -4
  106. package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +1 -1
  107. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +14 -14
  108. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/package.json +1 -1
  109. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +1 -1
  110. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/package.json +1 -1
  111. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +1 -1
  112. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/package.json +1 -1
  113. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +1 -1
  114. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +1 -1
  115. package/node_modules/@deepseek-ai/dsh-client-web/package.json +1 -1
  116. package/node_modules/@deepseek-ai/dsh-client-web-react/package.json +1 -1
  117. package/node_modules/@deepseek-ai/dsh-cmdline/lib/index.js +1 -1
  118. package/node_modules/@deepseek-ai/dsh-cmdline/package.json +1 -1
  119. package/node_modules/@deepseek-ai/dsh-code-runtime/package.json +1 -1
  120. package/node_modules/@deepseek-ai/dsh-code-runtime-worker-thread/package.json +1 -1
  121. package/node_modules/@deepseek-ai/dsh-command-compact/package.json +1 -1
  122. package/node_modules/@deepseek-ai/dsh-command-feedback/package.json +1 -1
  123. package/node_modules/@deepseek-ai/dsh-command-goal/package.json +1 -1
  124. package/node_modules/@deepseek-ai/dsh-commands/package.json +1 -1
  125. package/node_modules/@deepseek-ai/dsh-compaction/package.json +1 -1
  126. package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +1 -1
  127. package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/package.json +1 -1
  128. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +1 -1
  129. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/package.json +1 -1
  130. package/node_modules/@deepseek-ai/dsh-credentials/package.json +1 -1
  131. package/node_modules/@deepseek-ai/dsh-credentials-local/lib/index.js +1 -1
  132. package/node_modules/@deepseek-ai/dsh-credentials-local/package.json +1 -1
  133. package/node_modules/@deepseek-ai/dsh-fs/package.json +1 -1
  134. package/node_modules/@deepseek-ai/dsh-fs-local/package.json +1 -1
  135. package/node_modules/@deepseek-ai/dsh-fs-observation-policy/package.json +1 -1
  136. package/node_modules/@deepseek-ai/dsh-fs-sandbox/package.json +1 -1
  137. package/node_modules/@deepseek-ai/dsh-goal/package.json +1 -1
  138. package/node_modules/@deepseek-ai/dsh-goal-round-driver/package.json +1 -1
  139. package/node_modules/@deepseek-ai/dsh-headless/lib/index.js +4 -4
  140. package/node_modules/@deepseek-ai/dsh-headless/lib/startup.js +3 -3
  141. package/node_modules/@deepseek-ai/dsh-headless/package.json +1 -1
  142. package/node_modules/@deepseek-ai/dsh-home-paths/lib/index.js +1 -1
  143. package/node_modules/@deepseek-ai/dsh-home-paths/package.json +1 -1
  144. package/node_modules/@deepseek-ai/dsh-host-apiproxy/package.json +1 -1
  145. package/node_modules/@deepseek-ai/dsh-host-directory-picker/package.json +1 -1
  146. package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/package.json +1 -1
  147. package/node_modules/@deepseek-ai/dsh-host-directory-picker-browse/package.json +1 -1
  148. package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/package.json +1 -1
  149. package/node_modules/@deepseek-ai/dsh-host-frontend-static/package.json +1 -1
  150. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/package.json +1 -1
  151. package/node_modules/@deepseek-ai/dsh-host-webserver/lib/index.js +1 -1
  152. package/node_modules/@deepseek-ai/dsh-host-webserver/package.json +1 -1
  153. package/node_modules/@deepseek-ai/dsh-invariants/package.json +1 -1
  154. package/node_modules/@deepseek-ai/dsh-jobs/package.json +1 -1
  155. package/node_modules/@deepseek-ai/dsh-jobs-local/package.json +1 -1
  156. package/node_modules/@deepseek-ai/dsh-launch-environment/package.json +1 -1
  157. package/node_modules/@deepseek-ai/dsh-llm/package.json +1 -1
  158. package/node_modules/@deepseek-ai/dsh-llm-deepseek/package.json +1 -1
  159. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +1 -1
  160. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +1 -1
  161. package/node_modules/@deepseek-ai/dsh-llm-retry/package.json +1 -1
  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/package.json +1 -1
  166. package/node_modules/@deepseek-ai/dsh-permission-presets/package.json +1 -1
  167. package/node_modules/@deepseek-ai/dsh-persona/package.json +1 -1
  168. package/node_modules/@deepseek-ai/dsh-plan-mode/package.json +1 -1
  169. package/node_modules/@deepseek-ai/dsh-pwsh-local/package.json +1 -1
  170. package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +1 -1
  171. package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/package.json +1 -1
  172. package/node_modules/@deepseek-ai/dsh-sandbox/package.json +1 -1
  173. package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +1 -1
  174. package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +1 -1
  175. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/index.js +1 -1
  176. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/runner.js +1 -1
  177. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/package.json +1 -1
  178. package/node_modules/@deepseek-ai/dsh-schedule/package.json +1 -1
  179. package/node_modules/@deepseek-ai/dsh-scope/package.json +1 -1
  180. package/node_modules/@deepseek-ai/dsh-session/package.json +1 -1
  181. package/node_modules/@deepseek-ai/dsh-session-checkpoint-policy/package.json +1 -1
  182. package/node_modules/@deepseek-ai/dsh-session-log-export/lib/client.js +1 -1
  183. package/node_modules/@deepseek-ai/dsh-session-log-export/package.json +1 -1
  184. package/node_modules/@deepseek-ai/dsh-session-persistence/package.json +1 -1
  185. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/package.json +1 -1
  186. package/node_modules/@deepseek-ai/dsh-session-projection/package.json +1 -1
  187. package/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +1 -1
  188. package/node_modules/@deepseek-ai/dsh-session-query/package.json +1 -1
  189. package/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +1 -1
  190. package/node_modules/@deepseek-ai/dsh-session-reference/package.json +1 -1
  191. package/node_modules/@deepseek-ai/dsh-session-stats/package.json +1 -1
  192. package/node_modules/@deepseek-ai/dsh-session-telemetry/package.json +1 -1
  193. package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/package.json +1 -1
  194. package/node_modules/@deepseek-ai/dsh-session-title/package.json +1 -1
  195. package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/package.json +1 -1
  196. package/node_modules/@deepseek-ai/dsh-session-title-llm/package.json +1 -1
  197. package/node_modules/@deepseek-ai/dsh-settings/package.json +1 -1
  198. package/node_modules/@deepseek-ai/dsh-settings-file/package.json +1 -1
  199. package/node_modules/@deepseek-ai/dsh-shell/package.json +1 -1
  200. package/node_modules/@deepseek-ai/dsh-shell-env/lib/index.js +1 -1
  201. package/node_modules/@deepseek-ai/dsh-shell-env/package.json +1 -1
  202. package/node_modules/@deepseek-ai/dsh-skill/package.json +1 -1
  203. package/node_modules/@deepseek-ai/dsh-skill-badge/package.json +1 -1
  204. package/node_modules/@deepseek-ai/dsh-skill-filesystem/package.json +1 -1
  205. package/node_modules/@deepseek-ai/dsh-spill/package.json +1 -1
  206. package/node_modules/@deepseek-ai/dsh-spill-local/package.json +1 -1
  207. package/node_modules/@deepseek-ai/dsh-spill-policy/package.json +1 -1
  208. package/node_modules/@deepseek-ai/dsh-storage/package.json +1 -1
  209. package/node_modules/@deepseek-ai/dsh-storage-domain/package.json +1 -1
  210. package/node_modules/@deepseek-ai/dsh-storage-json/package.json +1 -1
  211. package/node_modules/@deepseek-ai/dsh-subagent/package.json +1 -1
  212. package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/package.json +1 -1
  213. package/node_modules/@deepseek-ai/dsh-subagent-in-process-driver/package.json +1 -1
  214. package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/package.json +1 -1
  215. package/node_modules/@deepseek-ai/dsh-subprocess/lib/index.js +1 -1
  216. package/node_modules/@deepseek-ai/dsh-subprocess/package.json +1 -1
  217. package/node_modules/@deepseek-ai/dsh-subprocess-local/package.json +1 -1
  218. package/node_modules/@deepseek-ai/dsh-system-prompt/package.json +1 -1
  219. package/node_modules/@deepseek-ai/dsh-terminal/package.json +1 -1
  220. package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +1 -1
  221. package/node_modules/@deepseek-ai/dsh-time-context/package.json +1 -1
  222. package/node_modules/@deepseek-ai/dsh-timeout/package.json +1 -1
  223. package/node_modules/@deepseek-ai/dsh-tmux-context/package.json +1 -1
  224. package/node_modules/@deepseek-ai/dsh-token-meter/package.json +1 -1
  225. package/node_modules/@deepseek-ai/dsh-tool-ask-user/package.json +1 -1
  226. package/node_modules/@deepseek-ai/dsh-tool-bash/package.json +1 -1
  227. package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/package.json +1 -1
  228. package/node_modules/@deepseek-ai/dsh-tool-call-timeout-policy/package.json +1 -1
  229. package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/index.js +5 -29
  230. package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +1 -1
  231. package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +1 -1
  232. package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +1 -1
  233. package/node_modules/@deepseek-ai/dsh-tool-goal/package.json +1 -1
  234. package/node_modules/@deepseek-ai/dsh-tool-jobs/package.json +1 -1
  235. package/node_modules/@deepseek-ai/dsh-tool-pwsh/package.json +1 -1
  236. package/node_modules/@deepseek-ai/dsh-tool-ralph/package.json +1 -1
  237. package/node_modules/@deepseek-ai/dsh-tool-skill/package.json +1 -1
  238. package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/package.json +1 -1
  239. package/node_modules/@deepseek-ai/dsh-tool-subagent/package.json +1 -1
  240. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/package.json +1 -1
  241. package/node_modules/@deepseek-ai/dsh-tool-subagent-report/package.json +1 -1
  242. package/node_modules/@deepseek-ai/dsh-tool-todo/package.json +1 -1
  243. package/node_modules/@deepseek-ai/dsh-tool-web/package.json +1 -1
  244. package/node_modules/@deepseek-ai/dsh-tool-workflow/package.json +1 -1
  245. package/node_modules/@deepseek-ai/dsh-tools/package.json +1 -1
  246. package/node_modules/@deepseek-ai/dsh-typert-loader/package.json +1 -1
  247. package/node_modules/@deepseek-ai/dsh-typert-protocol/package.json +1 -1
  248. package/node_modules/@deepseek-ai/dsh-typert-registry/package.json +1 -1
  249. package/node_modules/@deepseek-ai/dsh-user-approval/package.json +1 -1
  250. package/node_modules/@deepseek-ai/dsh-user-questions/package.json +1 -1
  251. package/node_modules/@deepseek-ai/dsh-web/lib/index.js +1 -1
  252. package/node_modules/@deepseek-ai/dsh-web/package.json +1 -1
  253. package/node_modules/@deepseek-ai/dsh-web-app/cordis.patch.yml +0 -1
  254. package/node_modules/@deepseek-ai/dsh-web-app/lib/index.js +1 -1
  255. package/node_modules/@deepseek-ai/dsh-web-app/lib/startup.js +4 -5
  256. package/node_modules/@deepseek-ai/dsh-web-app/package.json +1 -1
  257. package/node_modules/@deepseek-ai/dsh-web-frontend/package.json +1 -1
  258. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +1 -1
  259. package/node_modules/@deepseek-ai/dsh-workflow/package.json +1 -1
  260. package/node_modules/@deepseek-ai/dsh-workflow-worker-thread/lib/worker.cjs +9 -8
  261. package/node_modules/@deepseek-ai/dsh-workflow-worker-thread/package.json +1 -1
  262. package/node_modules/@deepseek-ai/dsh-workspace/package.json +1 -1
  263. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +5 -5
  264. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +1 -1
  265. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +1 -1
  266. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +1 -1
  267. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +1 -1
  268. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +3 -3
  269. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +4 -4
  270. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +5 -5
  271. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +6 -6
  272. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +1 -1
  273. package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js +1 -1
  274. package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +2 -2
  275. package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js +1 -1
  276. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.js +1 -1
  277. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js +1 -1
  278. package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  279. package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
  280. package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
  281. package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
  282. package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
  283. package/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
  284. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
  285. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  286. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
  287. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
  288. package/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
  289. package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  290. package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
  291. package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
  292. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +5 -5
  293. package/node_modules/@earendil-works/pi-ai/package.json +1 -1
  294. package/node_modules/@koromix/koffi-darwin-arm64/darwin_arm64/koffi.node +0 -0
  295. package/node_modules/@koromix/koffi-darwin-arm64/package.json +1 -1
  296. package/node_modules/@koromix/koffi-darwin-x64/darwin_x64/koffi.node +0 -0
  297. package/node_modules/@koromix/koffi-darwin-x64/package.json +1 -1
  298. package/node_modules/@koromix/koffi-win32-x64/package.json +1 -1
  299. package/node_modules/@koromix/koffi-win32-x64/win32_x64/koffi.node +0 -0
  300. package/node_modules/@smithy/core/dist-cjs/index.js +3 -1
  301. package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +126 -39
  302. package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +14 -3
  303. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +3 -1
  304. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +3 -1
  305. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +10 -1
  306. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +10 -1
  307. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +16 -2
  308. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +4 -1
  309. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +4 -1
  310. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +4 -1
  311. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +4 -1
  312. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +4 -1
  313. package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +7 -0
  314. package/node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js +3 -0
  315. package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-decode.js +29 -13
  316. package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-encode.js +12 -4
  317. package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeDeserializer.js +9 -0
  318. package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeSerializer.js +7 -0
  319. package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeDeserializer2.js +44 -15
  320. package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeSerializer2.js +22 -4
  321. package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +5 -0
  322. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js +3 -0
  323. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js +4 -1
  324. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js +6 -1
  325. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js +4 -1
  326. package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/resolveEndpoint.js +3 -0
  327. package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +7 -0
  328. package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js +4 -1
  329. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +9 -0
  330. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +5 -0
  331. package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +3 -0
  332. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/parseRetryAfterHeader.js +4 -1
  333. package/node_modules/@smithy/core/dist-es/submodules/serde/index.browser.js +1 -0
  334. package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +1 -0
  335. package/node_modules/@smithy/core/dist-es/submodules/serde/index.native.js +1 -0
  336. package/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +3 -0
  337. package/node_modules/@smithy/core/dist-es/submodules/transport/hasOwn.js +3 -0
  338. package/node_modules/@smithy/core/dist-es/submodules/transport/index.js +1 -0
  339. package/node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js +3 -0
  340. package/node_modules/@smithy/core/package.json +1 -1
  341. package/node_modules/@smithy/signature-v4/dist-cjs/index.js +19 -7
  342. package/node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +4 -1
  343. package/node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js +4 -1
  344. package/node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js +4 -1
  345. package/node_modules/@smithy/signature-v4/dist-es/headerUtil.js +10 -3
  346. package/node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js +4 -1
  347. package/node_modules/@smithy/signature-v4/dist-es/prepareRequest.js +4 -1
  348. package/node_modules/@smithy/signature-v4/package.json +1 -1
  349. package/node_modules/koffi/package.json +1 -1
  350. package/node_modules/koffi/src/koffi/index.cjs +1 -1
  351. package/node_modules/koffi/src/koffi/index.js +1 -1
  352. package/node_modules/koffi/src/koffi/indirect.cjs +1 -1
  353. package/node_modules/koffi/src/koffi/indirect.js +1 -1
  354. package/node_modules/negotiator/lib/accept.js +54 -0
  355. package/node_modules/negotiator/lib/charset.js +10 -34
  356. package/node_modules/negotiator/lib/encoding.js +9 -30
  357. package/node_modules/negotiator/lib/language.js +15 -36
  358. package/node_modules/negotiator/lib/mediaType.js +16 -134
  359. package/node_modules/negotiator/node_modules/content-type/LICENSE +22 -0
  360. package/node_modules/negotiator/node_modules/content-type/dist/index.js +176 -0
  361. package/node_modules/negotiator/node_modules/content-type/package.json +1 -0
  362. package/node_modules/negotiator/package.json +1 -1
  363. package/node_modules/typebox/build/compile/validator.mjs +1 -1
  364. package/node_modules/typebox/build/format/_idna.mjs +1 -1
  365. package/node_modules/typebox/build/format/_puny.mjs +1 -1
  366. package/node_modules/typebox/build/format/uuid.mjs +1 -1
  367. package/node_modules/typebox/build/guard/emit.mjs +1 -1
  368. package/node_modules/typebox/build/guard/guard.mjs +1 -1
  369. package/node_modules/typebox/build/guard/string.mjs +1 -1
  370. package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -1
  371. package/node_modules/typebox/build/schema/engine/_guard.mjs +1 -0
  372. package/node_modules/typebox/build/schema/engine/boolean.mjs +1 -1
  373. package/node_modules/typebox/build/schema/engine/index.mjs +1 -1
  374. package/node_modules/typebox/build/schema/engine/schema.mjs +1 -1
  375. package/node_modules/typebox/build/schema/engine/type.mjs +1 -1
  376. package/node_modules/typebox/build/schema/types/_guard.mjs +1 -0
  377. package/node_modules/typebox/build/schema/types/index.mjs +1 -1
  378. package/node_modules/typebox/build/schema/types/schema.mjs +1 -1
  379. package/node_modules/typebox/build/system/locale/ar_001.mjs +1 -1
  380. package/node_modules/typebox/build/system/locale/bn_BD.mjs +1 -1
  381. package/node_modules/typebox/build/system/locale/cs_CZ.mjs +1 -1
  382. package/node_modules/typebox/build/system/locale/de_DE.mjs +1 -1
  383. package/node_modules/typebox/build/system/locale/el_GR.mjs +1 -1
  384. package/node_modules/typebox/build/system/locale/en_US.mjs +1 -1
  385. package/node_modules/typebox/build/system/locale/es_419.mjs +1 -1
  386. package/node_modules/typebox/build/system/locale/es_AR.mjs +1 -1
  387. package/node_modules/typebox/build/system/locale/es_ES.mjs +1 -1
  388. package/node_modules/typebox/build/system/locale/es_MX.mjs +1 -1
  389. package/node_modules/typebox/build/system/locale/fa_IR.mjs +1 -1
  390. package/node_modules/typebox/build/system/locale/fil_PH.mjs +1 -1
  391. package/node_modules/typebox/build/system/locale/fr_CA.mjs +1 -1
  392. package/node_modules/typebox/build/system/locale/fr_FR.mjs +1 -1
  393. package/node_modules/typebox/build/system/locale/ha_NG.mjs +1 -1
  394. package/node_modules/typebox/build/system/locale/hi_IN.mjs +1 -1
  395. package/node_modules/typebox/build/system/locale/hu_HU.mjs +1 -1
  396. package/node_modules/typebox/build/system/locale/id_ID.mjs +1 -1
  397. package/node_modules/typebox/build/system/locale/it_IT.mjs +1 -1
  398. package/node_modules/typebox/build/system/locale/ja_JP.mjs +1 -1
  399. package/node_modules/typebox/build/system/locale/ko_KR.mjs +1 -1
  400. package/node_modules/typebox/build/system/locale/ms_MY.mjs +1 -1
  401. package/node_modules/typebox/build/system/locale/nl_NL.mjs +1 -1
  402. package/node_modules/typebox/build/system/locale/pl_PL.mjs +1 -1
  403. package/node_modules/typebox/build/system/locale/pt_BR.mjs +1 -1
  404. package/node_modules/typebox/build/system/locale/pt_PT.mjs +1 -1
  405. package/node_modules/typebox/build/system/locale/ro_RO.mjs +1 -1
  406. package/node_modules/typebox/build/system/locale/ru_RU.mjs +1 -1
  407. package/node_modules/typebox/build/system/locale/sv_SE.mjs +1 -1
  408. package/node_modules/typebox/build/system/locale/sw_TZ.mjs +1 -1
  409. package/node_modules/typebox/build/system/locale/th_TH.mjs +1 -1
  410. package/node_modules/typebox/build/system/locale/tr_TR.mjs +1 -1
  411. package/node_modules/typebox/build/system/locale/uk_UA.mjs +1 -1
  412. package/node_modules/typebox/build/system/locale/ur_PK.mjs +1 -1
  413. package/node_modules/typebox/build/system/locale/vi_VN.mjs +1 -1
  414. package/node_modules/typebox/build/system/locale/yo_NG.mjs +1 -1
  415. package/node_modules/typebox/build/system/locale/zh_Hans.mjs +1 -1
  416. package/node_modules/typebox/build/system/locale/zh_Hant.mjs +1 -1
  417. package/node_modules/typebox/build/system/memory/clone.mjs +1 -1
  418. package/node_modules/typebox/build/system/settings/settings.mjs +1 -1
  419. package/node_modules/typebox/build/type/action/_optional.mjs +1 -0
  420. package/node_modules/typebox/build/type/action/_readonly.mjs +1 -0
  421. package/node_modules/typebox/build/type/action/awaited.mjs +1 -0
  422. package/node_modules/typebox/build/type/action/conditional.mjs +1 -1
  423. package/node_modules/typebox/build/type/action/index.mjs +1 -1
  424. package/node_modules/typebox/build/type/action/mapped.mjs +1 -1
  425. package/node_modules/typebox/build/type/action/module.mjs +1 -1
  426. package/node_modules/typebox/build/type/action/options.mjs +1 -0
  427. package/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +1 -0
  428. package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +1 -1
  429. package/node_modules/typebox/build/type/engine/call/instantiate.mjs +1 -1
  430. package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +1 -1
  431. package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +1 -1
  432. package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +1 -1
  433. package/node_modules/typebox/build/type/engine/cyclic/check.mjs +1 -1
  434. package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +1 -1
  435. package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +1 -1
  436. package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +1 -1
  437. package/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +1 -0
  438. package/node_modules/typebox/build/type/engine/enum/index.mjs +1 -1
  439. package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +1 -1
  440. package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +1 -1
  441. package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +1 -1
  442. package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +1 -1
  443. package/node_modules/typebox/build/type/engine/exclude/operation.mjs +1 -1
  444. package/node_modules/typebox/build/type/engine/extract/operation.mjs +1 -1
  445. package/node_modules/typebox/build/type/engine/index.mjs +1 -1
  446. package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +1 -1
  447. package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +1 -1
  448. package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +1 -1
  449. package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +1 -1
  450. package/node_modules/typebox/build/type/engine/instantiate.mjs +1 -1
  451. package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +1 -1
  452. package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +1 -1
  453. package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +1 -1
  454. package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +1 -1
  455. package/node_modules/typebox/build/type/engine/module/instantiate.mjs +1 -1
  456. package/node_modules/typebox/build/type/engine/object/from_type.mjs +1 -1
  457. package/node_modules/typebox/build/type/engine/object/from_union.mjs +1 -1
  458. package/node_modules/typebox/build/type/engine/options/index.mjs +1 -0
  459. package/node_modules/typebox/build/type/engine/options/instantiate.mjs +1 -0
  460. package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +1 -1
  461. package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +1 -1
  462. package/node_modules/typebox/build/type/engine/partial/from_object.mjs +1 -1
  463. package/node_modules/typebox/build/type/engine/partial/from_type.mjs +1 -1
  464. package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +1 -1
  465. package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +1 -1
  466. package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +1 -1
  467. package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +1 -1
  468. package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +1 -1
  469. package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +1 -1
  470. package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +1 -1
  471. package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +1 -1
  472. package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +1 -1
  473. package/node_modules/typebox/build/type/engine/required/from_object.mjs +1 -1
  474. package/node_modules/typebox/build/type/engine/required/from_type.mjs +1 -1
  475. package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +1 -1
  476. package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +1 -1
  477. package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +1 -1
  478. package/node_modules/typebox/build/type/engine/this/expand_this.mjs +1 -1
  479. package/node_modules/typebox/build/type/extends/async_iterator.mjs +1 -0
  480. package/node_modules/typebox/build/type/extends/enum.mjs +1 -1
  481. package/node_modules/typebox/build/type/extends/extends_left.mjs +1 -1
  482. package/node_modules/typebox/build/type/extends/extends_right.mjs +1 -1
  483. package/node_modules/typebox/build/type/extends/inference.mjs +1 -1
  484. package/node_modules/typebox/build/type/extends/iterator.mjs +1 -0
  485. package/node_modules/typebox/build/type/extends/object.mjs +1 -1
  486. package/node_modules/typebox/build/type/extends/parameters.mjs +1 -1
  487. package/node_modules/typebox/build/type/extends/promise.mjs +1 -0
  488. package/node_modules/typebox/build/type/extends/template_literal.mjs +1 -1
  489. package/node_modules/typebox/build/type/extends/tuple.mjs +1 -1
  490. package/node_modules/typebox/build/type/extends/union.mjs +1 -1
  491. package/node_modules/typebox/build/type/script/mapping.mjs +1 -1
  492. package/node_modules/typebox/build/type/script/parser.mjs +6 -6
  493. package/node_modules/typebox/build/type/script/script.mjs +1 -1
  494. package/node_modules/typebox/build/type/script/token/internal/guard.mjs +1 -1
  495. package/node_modules/typebox/build/type/script/token/until.mjs +1 -1
  496. package/node_modules/typebox/build/type/types/_immutable.mjs +1 -1
  497. package/node_modules/typebox/build/type/types/_optional.mjs +1 -1
  498. package/node_modules/typebox/build/type/types/_readonly.mjs +1 -1
  499. package/node_modules/typebox/build/type/types/_refine.mjs +1 -1
  500. package/node_modules/typebox/build/type/types/async_iterator.mjs +1 -0
  501. package/node_modules/typebox/build/type/types/base.mjs +1 -0
  502. package/node_modules/typebox/build/type/types/call.mjs +1 -1
  503. package/node_modules/typebox/build/type/types/deferred.mjs +1 -1
  504. package/node_modules/typebox/build/type/types/enum.mjs +1 -1
  505. package/node_modules/typebox/build/type/types/index.mjs +1 -1
  506. package/node_modules/typebox/build/type/types/iterator.mjs +1 -0
  507. package/node_modules/typebox/build/type/types/number.mjs +1 -1
  508. package/node_modules/typebox/build/type/types/promise.mjs +1 -0
  509. package/node_modules/typebox/build/type/types/record.mjs +1 -1
  510. package/node_modules/typebox/build/typebox.mjs +1 -1
  511. package/node_modules/typebox/build/value/clean/clean.mjs +1 -1
  512. package/node_modules/typebox/build/value/clean/from_base.mjs +1 -0
  513. package/node_modules/typebox/build/value/clean/from_intersect.mjs +1 -1
  514. package/node_modules/typebox/build/value/clean/from_type.mjs +1 -1
  515. package/node_modules/typebox/build/value/clean/from_union.mjs +1 -1
  516. package/node_modules/typebox/build/value/clone/clone.mjs +1 -1
  517. package/node_modules/typebox/build/value/codec/decode.mjs +1 -1
  518. package/node_modules/typebox/build/value/codec/encode.mjs +1 -1
  519. package/node_modules/typebox/build/value/codec/from_array.mjs +1 -1
  520. package/node_modules/typebox/build/value/codec/from_object.mjs +1 -1
  521. package/node_modules/typebox/build/value/codec/from_record.mjs +1 -1
  522. package/node_modules/typebox/build/value/codec/from_tuple.mjs +1 -1
  523. package/node_modules/typebox/build/value/codec/from_union.mjs +1 -1
  524. package/node_modules/typebox/build/value/convert/from_base.mjs +1 -0
  525. package/node_modules/typebox/build/value/convert/from_enum.mjs +1 -1
  526. package/node_modules/typebox/build/value/convert/from_template_literal.mjs +1 -1
  527. package/node_modules/typebox/build/value/convert/from_type.mjs +1 -1
  528. package/node_modules/typebox/build/value/create/from_async_iterator.mjs +1 -0
  529. package/node_modules/typebox/build/value/create/from_base.mjs +1 -0
  530. package/node_modules/typebox/build/value/create/from_enum.mjs +1 -1
  531. package/node_modules/typebox/build/value/create/from_iterator.mjs +1 -0
  532. package/node_modules/typebox/build/value/create/from_promise.mjs +1 -0
  533. package/node_modules/typebox/build/value/create/from_type.mjs +1 -1
  534. package/node_modules/typebox/build/value/default/from_base.mjs +1 -0
  535. package/node_modules/typebox/build/value/default/from_object.mjs +1 -1
  536. package/node_modules/typebox/build/value/default/from_type.mjs +1 -1
  537. package/node_modules/typebox/build/value/index.mjs +1 -1
  538. package/node_modules/typebox/build/value/mutate/error.mjs +1 -0
  539. package/node_modules/typebox/build/value/mutate/from_array.mjs +1 -0
  540. package/node_modules/typebox/build/value/mutate/from_object.mjs +1 -0
  541. package/node_modules/typebox/build/value/mutate/from_unknown.mjs +1 -0
  542. package/node_modules/typebox/build/value/mutate/from_value.mjs +1 -0
  543. package/node_modules/typebox/build/value/mutate/index.mjs +1 -0
  544. package/node_modules/typebox/build/value/mutate/mutate.mjs +1 -0
  545. package/node_modules/typebox/build/value/repair/from_base.mjs +1 -0
  546. package/node_modules/typebox/build/value/repair/from_enum.mjs +1 -1
  547. package/node_modules/typebox/build/value/repair/from_type.mjs +1 -1
  548. package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +1 -1
  549. package/node_modules/typebox/build/value/value.mjs +1 -1
  550. package/node_modules/typebox/package.json +1 -1
  551. package/package.json +1 -1
  552. package/lib/args-DcHS9iff.js +0 -9
  553. package/lib/dump-config-xQTUTTDD.js +0 -1
  554. package/lib/profile-boot-BkordgJK.js +0 -1
  555. package/lib/profile-boot-DDo03lXi.js +0 -8
  556. package/node_modules/@deepseek-ai/dsh-content-review/LICENSE +0 -21
  557. package/node_modules/@deepseek-ai/dsh-content-review/lib/index.js +0 -1
  558. package/node_modules/@deepseek-ai/dsh-content-review/lib/invariant.js +0 -1
  559. package/node_modules/@deepseek-ai/dsh-content-review/package.json +0 -1
  560. package/node_modules/@deepseek-ai/dsh-home-quarantine-macos/LICENSE +0 -21
  561. package/node_modules/@deepseek-ai/dsh-home-quarantine-macos/lib/index.js +0 -1
  562. package/node_modules/@deepseek-ai/dsh-home-quarantine-macos/lib/invariant.js +0 -1
  563. package/node_modules/@deepseek-ai/dsh-home-quarantine-macos/package.json +0 -1
  564. package/node_modules/@deepseek-ai/dsh-llm-gateway-openai/LICENSE +0 -21
  565. package/node_modules/@deepseek-ai/dsh-llm-gateway-openai/lib/index.js +0 -17
  566. package/node_modules/@deepseek-ai/dsh-llm-gateway-openai/lib/invariant.js +0 -1
  567. package/node_modules/@deepseek-ai/dsh-llm-gateway-openai/package.json +0 -1
  568. package/node_modules/@deepseek-ai/dsh-qb-auth/LICENSE +0 -21
  569. package/node_modules/@deepseek-ai/dsh-qb-auth/lib/index.js +0 -4
  570. package/node_modules/@deepseek-ai/dsh-qb-auth/lib/invariant.js +0 -1
  571. package/node_modules/@deepseek-ai/dsh-qb-auth/package.json +0 -1
  572. package/node_modules/@deepseek-ai/dsh-web-search-dsh/LICENSE +0 -21
  573. package/node_modules/@deepseek-ai/dsh-web-search-dsh/lib/index.js +0 -1
  574. package/node_modules/@deepseek-ai/dsh-web-search-dsh/lib/invariant.js +0 -1
  575. package/node_modules/@deepseek-ai/dsh-web-search-dsh/package.json +0 -1
  576. package/node_modules/@napi-rs/xattr/LICENSE +0 -21
  577. package/node_modules/@napi-rs/xattr/index.js +0 -567
  578. package/node_modules/@napi-rs/xattr/package.json +0 -1
  579. package/node_modules/@napi-rs/xattr-darwin-arm64/package.json +0 -1
  580. package/node_modules/@napi-rs/xattr-darwin-arm64/xattr.darwin-arm64.node +0 -0
  581. package/node_modules/@napi-rs/xattr-darwin-x64/package.json +0 -1
  582. package/node_modules/@napi-rs/xattr-darwin-x64/xattr.darwin-x64.node +0 -0
  583. package/node_modules/@parcel/watcher/LICENSE +0 -21
  584. package/node_modules/@parcel/watcher/index.js +0 -44
  585. package/node_modules/@parcel/watcher/index.js.flow +0 -45
  586. package/node_modules/@parcel/watcher/package.json +0 -1
  587. package/node_modules/@parcel/watcher/scripts/build-from-source.js +0 -16
  588. package/node_modules/@parcel/watcher/wrapper.js +0 -88
  589. package/node_modules/@parcel/watcher-darwin-arm64/LICENSE +0 -21
  590. package/node_modules/@parcel/watcher-darwin-arm64/package.json +0 -1
  591. package/node_modules/@parcel/watcher-darwin-arm64/watcher.node +0 -0
  592. package/node_modules/@parcel/watcher-darwin-x64/LICENSE +0 -21
  593. package/node_modules/@parcel/watcher-darwin-x64/package.json +0 -1
  594. package/node_modules/@parcel/watcher-darwin-x64/watcher.node +0 -0
  595. package/node_modules/@parcel/watcher-win32-x64/LICENSE +0 -21
  596. package/node_modules/@parcel/watcher-win32-x64/package.json +0 -1
  597. package/node_modules/@parcel/watcher-win32-x64/watcher.node +0 -0
  598. package/node_modules/is-extglob/LICENSE +0 -21
  599. package/node_modules/is-extglob/index.js +0 -20
  600. package/node_modules/is-extglob/package.json +0 -1
  601. package/node_modules/is-glob/LICENSE +0 -21
  602. package/node_modules/is-glob/index.js +0 -150
  603. package/node_modules/is-glob/package.json +0 -1
  604. package/node_modules/typebox/build/type/action/_add_immutable.mjs +0 -1
  605. package/node_modules/typebox/build/type/action/_add_optional.mjs +0 -1
  606. package/node_modules/typebox/build/type/action/_add_readonly.mjs +0 -1
  607. package/node_modules/typebox/build/type/action/_remove_immutable.mjs +0 -1
  608. package/node_modules/typebox/build/type/action/_remove_optional.mjs +0 -1
  609. package/node_modules/typebox/build/type/action/_remove_readonly.mjs +0 -1
  610. package/node_modules/typebox/build/type/action/with.mjs +0 -1
  611. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +0 -1
  612. package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +0 -1
  613. package/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +0 -1
  614. package/node_modules/typebox/build/type/engine/object/from_dependent.mjs +0 -1
  615. package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +0 -1
  616. package/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +0 -1
  617. package/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +0 -1
  618. package/node_modules/typebox/build/type/engine/priority/index.mjs +0 -1
  619. package/node_modules/typebox/build/type/engine/priority/priority.mjs +0 -1
  620. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +0 -1
  621. package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +0 -1
  622. package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +0 -1
  623. package/node_modules/typebox/build/type/engine/required/from_dependent.mjs +0 -1
  624. package/node_modules/typebox/build/type/engine/with/instantiate.mjs +0 -1
  625. package/node_modules/typebox/build/type/extends/dependent.mjs +0 -1
  626. package/node_modules/typebox/build/type/extends/record.mjs +0 -1
  627. package/node_modules/typebox/build/type/types/dependent.mjs +0 -1
  628. /package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/{types-D2_FQYSK.js → types-DE3U0cmQ.js} +0 -0
  629. /package/node_modules/typebox/build/type/engine/{with → awaited}/index.mjs +0 -0
@@ -1 +1 @@
1
- var ce=Object.defineProperty;var s=(e,t)=>ce(e,"name",{value:t,configurable:!0});import{launchEnvironmentOf as ue}from"@deepseek-ai/dsh-launch-environment";import{CONTEXT_WINDOW_EXCEEDED_CODE as pe,CallId as x,EMPTY_RESPONSE_CODE as fe,INVALID_CREDENTIAL_CODE as me,LlmAdapter as he,LlmError as m,QUOTA_EXCEEDED_CODE as ge,ReasoningEffortId as C,RetryPolicySchema as ve,assertUsableApiKey as ye,attributionHeaders as $,contentHasImage as I,isContextWindowExceededError as be,isQuotaExceededError as we,normalizeApiKey as Ee,resolveRetryPolicy as ke}from"@deepseek-ai/dsh-llm";import{deepEqualJson as D,installSettingsSection as Re,settingsNamespace as xe}from"@deepseek-ai/dsh-settings";import{createModels as Te,createProvider as Se,getSupportedThinkingLevels as O,isContextOverflow as Ie}from"@earendil-works/pi-ai";import{MAX_TIMER_DELAY_MS as A,idleWatchdog as Oe,timeoutOf as j}from"@deepseek-ai/dsh-timeout";import{builtinProviders as Ae,getBuiltinModels as Me,getBuiltinProviders as _e}from"@earendil-works/pi-ai/providers/all";import l from"@deepseek-ai/schemastery";import{credentialRef as Le}from"@deepseek-ai/dsh-credentials";import{anthropicMessagesApi as Ue}from"@earendil-works/pi-ai/api/anthropic-messages.lazy";import{openAICompletionsApi as Ne}from"@earendil-works/pi-ai/api/openai-completions.lazy";import{openAIResponsesApi as Pe}from"@earendil-works/pi-ai/api/openai-responses.lazy";function F(e){try{const t=JSON.parse(e);if(typeof t=="object"&&t!==null&&!Array.isArray(t))return t}catch{}return{}}s(F,"parseArguments");function W(){return{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}}}s(W,"emptyPiUsage");function Ce(e){return{response:{kind:"pi-ai",version:2,api:e.api,provider:e.provider,model:e.model,...e.responseModel===void 0?{}:{responseModel:e.responseModel},...e.responseId===void 0?{}:{responseId:e.responseId},stopReason:e.stopReason},blocks:e.content.map(t=>{switch(t.type){case"text":return{type:"text",...t.textSignature===void 0?{}:{textSignature:t.textSignature}};case"thinking":return{type:"reasoning",...t.thinkingSignature===void 0?{}:{thinkingSignature:t.thinkingSignature},...t.redacted===void 0?{}:{redacted:t.redacted}};case"toolCall":return{type:"tool-call",...t.thoughtSignature===void 0?{}:{thoughtSignature:t.thoughtSignature}}}})}}s(Ce,"toPiReplayState");function b(e){throw new m(`invalid pi-ai replay state: ${e}`,"INVALID_REPLAY_STATE")}s(b,"invalidReplay");function $e(e){if(typeof e!="object"||e===null||Array.isArray(e))return b("expected a replay envelope");const t=e,r=t.response;if(typeof r!="object"||r===null||Array.isArray(r))return b("expected a response object");const o=r;if(o.kind!=="pi-ai")return b("unknown state kind");if(o.version!==2)return b(`unsupported version ${String(o.version)}`);for(const i of["api","provider","model"])if(typeof o[i]!="string"||o[i].length===0)return b(`${i} must be a non-empty string`);if(!["stop","length","toolUse","error","aborted"].includes(String(o.stopReason)))return b("unknown stopReason");if(o.responseModel!==void 0&&typeof o.responseModel!="string")return b("responseModel must be a string");if(o.responseId!==void 0&&typeof o.responseId!="string")return b("responseId must be a string");const n=t.blocks;if(!Array.isArray(n))return b("blocks must be an array");for(const[i,a]of n.entries()){if(typeof a!="object"||a===null||Array.isArray(a))return b(`block ${i} must be an object`);const d=a;if(!["text","reasoning","tool-call"].includes(String(d.type)))return b(`block ${i} has an unknown type`);for(const u of["textSignature","thinkingSignature","thoughtSignature"])if(d[u]!==void 0&&typeof d[u]!="string")return b(`block ${i} ${u} must be a string`);if(d.redacted!==void 0&&typeof d.redacted!="boolean")return b(`block ${i} redacted must be boolean`)}return{response:o,blocks:n}}s($e,"readReplayState");function K(e){const t=e.source.kind==="model"?e.source:void 0,r=[];for(const o of e.content)switch(o.type){case"text":r.push({type:"text",text:o.text});break;case"reasoning":r.push({type:"thinking",thinking:o.text});break;case"tool-call":r.push({type:"toolCall",id:o.id,name:o.name,arguments:F(o.arguments)});break;case"image":throw new m("pi-ai chat history cannot represent structured assistant image output","UNSUPPORTED_CONTENT")}return{role:"assistant",content:r,api:"dsh-foreign",provider:t?.provider??"dsh-foreign",model:t?.model??"dsh-foreign",usage:W(),stopReason:r.some(o=>o.type==="toolCall")?"toolUse":"stop",timestamp:0}}s(K,"foreignAssistant");function De(e,t,r){const o=$e(r);return o.response.provider!==t.provider?b("provider does not match assistant source"):o.response.model!==t.model?b("model does not match assistant source"):o.blocks.length!==e.content.length?b("block count does not match assistant content"):{role:"assistant",content:e.content.map((n,i)=>{const a=o.blocks[i];if(a===void 0||a.type!==n.type)return b(`block ${i} does not match assistant content`);switch(n.type){case"text":return{type:"text",text:n.text,...a.type==="text"&&a.textSignature!==void 0?{textSignature:a.textSignature}:{}};case"reasoning":return{type:"thinking",thinking:n.text,...a.type==="reasoning"&&a.thinkingSignature!==void 0?{thinkingSignature:a.thinkingSignature}:{},...a.type==="reasoning"&&a.redacted!==void 0?{redacted:a.redacted}:{}};case"tool-call":return{type:"toolCall",id:n.id,name:n.name,arguments:F(n.arguments),...a.type==="tool-call"&&a.thoughtSignature!==void 0?{thoughtSignature:a.thoughtSignature}:{}};default:return b(`block ${i} has an unsupported Harness type`)}}),api:o.response.api,provider:o.response.provider,model:o.response.model,...o.response.responseModel===void 0?{}:{responseModel:o.response.responseModel},...o.response.responseId===void 0?{}:{responseId:o.response.responseId},usage:W(),stopReason:o.response.stopReason,timestamp:0}}s(De,"replayedAssistant");function B(e,t){const r=e.source;if(r.kind!=="model"||r.replayState===void 0)return K(e);try{return De(e,r,r.replayState)}catch(o){if(!(o instanceof m)||o.code!=="INVALID_REPLAY_STATE")throw o;return t?.(o.message),K(e)}}s(B,"toPiAssistant");function M(e){return e.content.filter(t=>t.type==="text").map(t=>t.text).join("")}s(M,"flattenText");function V(e){return e.map(t=>t.type==="text"?t.text:t.type==="tool-result"?V(t.content):"").join("")}s(V,"toolResultText");async function _(e,t){const r=[];for(const o of e)switch(o.type){case"text":o.text.length>0&&r.push({type:"text",text:o.text});break;case"image":{const n=await t.readImage(o.attachment);r.push({type:"image",data:Buffer.from(n.data).toString("base64"),mimeType:n.ref.mediaType});break}case"tool-result":{const n=await _(o.content,t);typeof n=="string"?n.length>0&&r.push({type:"text",text:n}):r.push(...n)}}return r.every(o=>o.type==="text")?r.map(o=>o.text).join(""):r}s(_,"userContent");function je(e){return e.tools?.map(t=>({name:t.name,description:t.description,parameters:t.parameters}))}s(je,"toolsOf");function Y(e,t){const r=je(e);return{...e.system!==void 0?{systemPrompt:e.system}:{},messages:t,...r!==void 0&&r.length>0?{tools:r}:{}}}s(Y,"piContext");function Fe(e,t){const r=new Map,o=[];for(const n of e.messages){if(I(n.content))throw new m("pi-ai image conversion requires the durable attachment service","UNSUPPORTED_CONTENT");if(n.role==="system"){o.push({role:"user",content:M(n),timestamp:0});continue}if(n.role==="assistant"){const d=B(n,t);for(const u of d.content)u.type==="toolCall"&&r.set(x(u.id),u.name);o.push(d);continue}const i=M(n),a=n.content.filter(d=>d.type==="tool-result");(i.length>0||a.length===0)&&o.push({role:"user",content:i,timestamp:0});for(const d of a)o.push({role:"toolResult",toolCallId:d.toolCallId,toolName:r.get(d.toolCallId)??"unknown",content:[{type:"text",text:V(d.content)||"(no output)"}],isError:d.isError??!1,timestamp:0})}return Y(e,o)}s(Fe,"textOnlyContext");function H(e,t,r){return t===void 0?Fe(e,r):We(e,t,r)}s(H,"toPiContext");async function We(e,t,r){const o=new Map,n=[];for(const i of e.messages){if(i.role==="system"){if(I(i.content))throw new m("pi-ai cannot represent an image in an in-history system message","UNSUPPORTED_CONTENT");n.push({role:"user",content:M(i),timestamp:0});continue}if(i.role==="assistant"){const u=B(i,r);for(const f of u.content)f.type==="toolCall"&&o.set(x(f.id),f.name);n.push(u);continue}const a=await _(i.content.filter(u=>u.type!=="tool-result"),t),d=i.content.filter(u=>u.type==="tool-result");(a.length>0||d.length===0)&&n.push({role:"user",content:a,timestamp:0});for(const u of d){const f=await _(u.content,t);n.push({role:"toolResult",toolCallId:u.toolCallId,toolName:o.get(u.toolCallId)??"unknown",content:typeof f=="string"?[{type:"text",text:f||"(no output)"}]:f,isError:u.isError??!1,timestamp:0})}}return Y(e,n)}s(We,"toPiContextWithImages");function z(e){return{inputTokens:e.input,outputTokens:e.output,...e.cacheRead>0?{cacheReadTokens:e.cacheRead}:{},...e.cacheWrite>0?{cacheWriteTokens:e.cacheWrite}:{}}}s(z,"mapUsage");function Ke(e){return/\b(?:401|403)\b/.test(e)?"AUTH":we(e)?ge:/\b429\b|rate.?limit/i.test(e)?"RATE_LIMIT":/\b400\b|invalid.?request/i.test(e)?"INVALID_REQUEST":/\b5\d\d\b/.test(e)?"SERVER":/\btime(?:d)?\s*out\b|timeout/i.test(e)?"TIMEOUT":/stream ended (?:before|without)\b/i.test(e)||/\b(?:network|connection|socket|fetch)\b|\bECONN[A-Z]+\b/i.test(e)||/\b(?:other side closed|HTTP2 request did not get a response|WebSocket closed unexpectedly)\b/i.test(e)||/\bterminated\b|premature close/i.test(e)?"TRANSPORT":"PI_AI_ERROR"}s(Ke,"classifyPiAiError");function X(e,t){const r=Ie(e,t),o=e.stopReason==="error"&&e.errorMessage!==void 0&&be(e.errorMessage);if(r||o)return{kind:"error",failure:{message:e.errorMessage??`pi-ai detected context overflow for model "${e.model}"`,code:pe}};switch(e.stopReason){case"pending":return{kind:"error",failure:{message:"pi-ai terminal message remained pending",code:"PI_AI_ERROR"}};case"stop":return e.content.length===0?{kind:"error",failure:{message:`model "${e.model}" returned a completed response with no content`,code:fe}}:{kind:"stop"};case"length":return{kind:"max-tokens"};case"toolUse":return{kind:"tool-calls"};case"aborted":return{kind:"aborted",failure:{message:e.errorMessage??"pi-ai stream aborted",code:"ABORTED"}};case"error":{const n=e.errorMessage??"pi-ai stream error";return{kind:"error",failure:{message:n,code:Ke(n)}}}}}s(X,"mapStopReason");async function*Be(e,t){const r=new Map;for await(const o of e)switch(o.type){case"start":break;case"text_start":yield{type:"block-start",index:o.contentIndex,blockType:"text"};break;case"text_delta":yield{type:"text-delta",index:o.contentIndex,text:o.delta};break;case"text_end":yield{type:"block-end",index:o.contentIndex,block:{type:"text",text:o.content}};break;case"thinking_start":yield{type:"block-start",index:o.contentIndex,blockType:"reasoning"};break;case"thinking_delta":yield{type:"reasoning-delta",index:o.contentIndex,text:o.delta};break;case"thinking_end":yield{type:"block-end",index:o.contentIndex,block:{type:"reasoning",text:o.content}};break;case"toolcall_start":{const n=o.partial.content[o.contentIndex],i=n?.type==="toolCall"?n.id:"",a=n?.type==="toolCall"?n.name:"";r.set(o.contentIndex,{id:i,name:a}),yield{type:"block-start",index:o.contentIndex,blockType:"tool-call"};break}case"toolcall_delta":{const n=r.get(o.contentIndex);yield{type:"tool-call-delta",index:o.contentIndex,id:x(n?.id??""),...n?.name!==void 0&&n.name.length>0?{name:n.name}:{},argumentsDelta:o.delta};break}case"toolcall_end":yield{type:"block-end",index:o.contentIndex,block:{type:"tool-call",id:x(o.toolCall.id),name:o.toolCall.name,arguments:JSON.stringify(o.toolCall.arguments)}};break;case"done":yield{type:"usage",usage:z(o.message.usage)},yield{type:"finish",reason:X(o.message,t),replayState:Ce(o.message)};return;case"error":yield{type:"usage",usage:z(o.error.usage)},yield{type:"finish",reason:X(o.error,t)};return}throw new m("pi-ai event stream ended without done/error","STREAM_CLOSED")}s(Be,"toStreamChunks");var Ve=s(function(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var o,n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");o=t[Symbol.asyncDispose]}if(o===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");o=t[Symbol.dispose],r&&(n=o)}if(typeof o!="function")throw new TypeError("Object not disposable.");n&&(o=s(function(){try{n.call(this)}catch(i){return Promise.reject(i)}},"dispose")),e.stack.push({value:t,dispose:o,async:r})}else r&&e.stack.push({async:!0});return t},"__addDisposableResource"),Ye=(function(e){return function(t){function r(a){t.error=t.hasError?new e(a,t.error,"An error was suppressed during disposal."):a,t.hasError=!0}s(r,"fail");var o,n=0;function i(){for(;o=t.stack.pop();)try{if(!o.async&&n===1)return n=0,t.stack.push(o),Promise.resolve().then(i);if(o.dispose){var a=o.dispose.call(o.value);if(o.async)return n|=2,Promise.resolve(a).then(i,function(d){return r(d),i()})}else n|=1}catch(d){r(d)}if(n===1)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}return s(i,"next"),i()}})(typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var o=new Error(r);return o.name="SuppressedError",o.error=e,o.suppressed=t,o});function He(e,t,r){const o=t==="off"?void 0:t;return{...r===void 0?{}:{apiKey:r},...o===void 0?{}:{reasoning:o},...e.thinkingBudgets===void 0?{}:{thinkingBudgets:e.thinkingBudgets},...e.cacheRetention===void 0?{}:{cacheRetention:e.cacheRetention},...e.transport===void 0?{}:{transport:e.transport},...e.timeoutMs===void 0?{}:{timeoutMs:e.timeoutMs},...e.websocketConnectTimeoutMs===void 0?{}:{websocketConnectTimeoutMs:e.websocketConnectTimeoutMs},maxRetries:0}}s(He,"profileOptions");function ze(e,t){if(t!==void 0)return O(e).some(r=>r===t)?t:void 0}s(ze,"describableReasoningLevel");function Xe(e,t){if(t!==void 0){if(O(e).some(r=>r===t))return t;throw new m(`pi-ai provider "${e.provider}" model "${e.id}" does not support reasoning effort "${t}"`,"UNSUPPORTED_REASONING_EFFORT")}}s(Xe,"resolveReasoningLevel");function Ge(e,t){return e.reasoning?{reasoning:{efforts:O(e).map(r=>({id:C(r),name:`${r.charAt(0).toUpperCase()}${r.slice(1)}`})),...t===void 0?{}:{defaultEffort:C(t)}}}:{}}s(Ge,"reasoningInfo");function Je(e){const t=$(),r=new Set(Object.keys(t).map(o=>o.toLowerCase()));return{...Object.fromEntries(Object.entries(e??{}).filter(([o])=>!r.has(o.toLowerCase()))),...t}}s(Je,"requestHeaders");var G=class extends he{static{s(this,"PiAiAdapter")}config;snapshot;constructor(e){super(),this.config=e}current(){const e=this.config.profiles();if(this.snapshot?.profiles===e)return this.snapshot;const t=Te();for(const r of e.values())t.setProvider(r.piProvider);return this.snapshot={profiles:e,models:t},this.snapshot}profileOf(e,t){const r=e.profiles.get(t);if(r===void 0)throw new m(`pi-ai adapter does not own provider "${t}"`,"NO_ADAPTER");return r}modelOf(e,t,r){this.profileOf(e,t);const o=e.models.getModel(t,r);if(o===void 0)throw new m(`pi-ai provider "${t}" has no configured model "${r}"`,"UNKNOWN_MODEL");return o}serviceRoutedModel(e,t){const r=e.baseURLService;if(r===void 0)return t;const o=this.config.resolveServiceBaseURL?.(r);if(o===void 0)throw new m(`pi-ai provider "${e.provider}" follows service "${r}", which is not mounted or exposes no baseURL`,"SERVICE_UNAVAILABLE");return{...t,baseUrl:o}}providerInfo(e){return{id:e,name:this.current().profiles.get(e)?.displayName??e}}providerRetryPolicy(e){return this.current().profiles.get(e)?.retryPolicy}listModels(e){return Promise.resolve().then(()=>{const t=this.current();return this.profileOf(t,e),t.models.getModels(e).map(r=>({provider:e,id:r.id,name:r.name,inputModalities:[...r.input]}))})}resolveModel(e,t,r){return Promise.resolve().then(()=>{const o=this.current(),n=this.profileOf(o,e),i=this.modelOf(o,e,t),a=ze(i,n.reasoning),d=n.configuredMaxTokens.get(t);return{provider:e,id:t,name:i.name,inputModalities:[...i.input],context:{contextWindow:i.contextWindow},...d===void 0?{}:{defaultMaxTokens:d},...Ge(i,a)}})}async*stream(e){const t={stack:[],error:void 0,hasError:!1};try{if(e.stop!==void 0)throw new m("llm-pi-ai does not support GenerateOptions.stop","UNSUPPORTED_OPTION");const r=this.current(),o=this.profileOf(r,e.provider),n=this.serviceRoutedModel(o,this.modelOf(r,e.provider,e.model)),i=Xe(n,e.reasoningEffort??o.reasoning),a=await this.config.resolveApiKey(e.provider,o),d=new AbortController,u=e.signal===void 0?d.signal:AbortSignal.any([e.signal,d.signal]),f=o.streamIdleTimeoutMs,y=Ve(t,Oe(u,f,"LLM_STREAM_IDLE_TIMEOUT"),!1);try{const E=e.messages.some(v=>I(v.content));if(E&&!n.input.includes("image"))throw new m(`pi-ai model "${n.id}" does not support image input`,"UNSUPPORTED_CONTENT");const c=E?this.config.resolveAttachments?.():void 0;if(E&&c===void 0)throw new m("pi-ai image input requires the durable attachment service","UNSUPPORTED_CONTENT");const h=s(v=>{this.config.onReplayDegrade?.({provider:e.provider,model:e.model,reason:v})},"onReplayDegrade"),k=c===void 0?H(e,void 0,h):await H(e,c,h),p=Be(r.models.streamSimple(n,k,{...He(o,i,a),...e.temperature===void 0?{}:{temperature:e.temperature},...e.maxTokens===void 0?{}:{maxTokens:e.maxTokens},...e.sessionId===void 0?{}:{sessionId:String(e.sessionId)},signal:y.signal,headers:Je(o.headers)}),n.contextWindow)[Symbol.asyncIterator]();let g=!1;try{for(;;){const v=await y.next(p),R=j(y.signal,"LLM_STREAM_IDLE_TIMEOUT");if(R!==void 0)throw R;if(v.done){g=!0;return}yield v.value}}finally{if(!g){d.abort("pi-ai stream consumer stopped");try{await p.return(void 0)}catch{}}}}catch(E){throw j(y.signal,"LLM_STREAM_IDLE_TIMEOUT")!==void 0?new m(`pi-ai stream idle timeout after ${f}ms`,"TIMEOUT",{cause:E}):e.signal?.aborted?new m("pi-ai request aborted by caller","ABORTED",{cause:E}):E}finally{d.abort("pi-ai stream consumer stopped")}}catch(r){t.error=r,t.hasError=!0}finally{Ye(t)}}};const Qe={input:0,output:0,cacheRead:0,cacheWrite:0},J=Object.keys({text:!0,image:!0});function Ze(e){return e===void 0||e.length===0?void 0:[...e]}s(Ze,"declaredInput");const T=Object.keys({off:!0,minimal:!0,low:!0,medium:!0,high:!0,xhigh:!0,max:!0}),qe=Object.keys({openai:!0,deepseek:!0,openrouter:!0,together:!0,zai:!0,qwen:!0,"string-thinking":!0,"ant-ling":!0});let Q;function Z(){return Q??=new Map(Ae().map(e=>[e.id,e])),Q}s(Z,"catalogProviders");function L(e){return Z().get(e)}s(L,"catalogProvider");function et(){return _e()}s(et,"catalogProviderIds");function tt(e){return L(e)?.auth.apiKey!==void 0}s(tt,"catalogProviderTakesApiKey");function q(e){if(!Z().has(e))return new Map;const t=Me(e);return new Map(t.map(r=>[r.id,r]))}s(q,"catalogModels");function w(e,t){throw new Error(`llm-pi-ai: provider "${e}" ${t}`)}s(w,"invalid");function ot(e){const t=new Set;for(const r of e.values())t.add(r.api);return t.size===1?[...t][0]:void 0}s(ot,"sharedCatalogApi");function nt(e,t,r){const o=t.reasoningEfforts;if(o===void 0)return{reasoning:r?.reasoning??!1};if(o===!1)return{reasoning:!1};(o===null||Object.keys(o).length===0)&&w(e,`model "${t.id}" has an empty reasoningEfforts; declare the offered levels, set false for a non-reasoning model, or omit the field to keep the installed catalog's capability`);const n=T.flatMap(a=>{const d=o[a];return d===void 0?[]:[[a,d]]});for(const[a,d]of n)d===null?a!=="off"&&w(e,`model "${t.id}" reasoningEfforts.${a} needs the wire value dispatch should send; only "off" may leave it empty`):d.length===0&&w(e,`model "${t.id}" reasoningEfforts.${a} must not be an empty string`);n.some(([a])=>a!=="off")||w(e,`model "${t.id}" reasoningEfforts offers no level beyond "off"; declare a thinking level, or set reasoningEfforts to false for a non-reasoning model`);const i={};for(const a of T){const d=o[a];d===void 0?i[a]=null:d!==null&&(i[a]=d)}return{reasoning:!0,thinkingLevelMap:i}}s(nt,"resolveModelReasoning");function rt(e,t,r,o,n){const i=t.compat?.thinkingFormat??r?.thinkingFormat,a=t.compat?.supportsReasoningEffort??r?.supportsReasoningEffort;return i===void 0&&a===void 0?{}:n!=="openai-completions"?((t.compat?.thinkingFormat!==void 0||t.compat?.supportsReasoningEffort!==void 0)&&w(e,`model "${t.id}" sets compat reasoning switches, but its api is "${n}"; thinkingFormat and supportsReasoningEffort exist only on openai-completions`),{}):{compat:{...o?.api===n?o.compat:void 0,...i===void 0?{}:{thinkingFormat:i},...a===void 0?{}:{supportsReasoningEffort:a}}}}s(rt,"resolveModelCompat");function it(e){const{provider:t}=e,r=q(t),o=L(t)?.baseUrl,n=e.models??[],i=e.modelOverrides??{};for(const[c,h]of Object.entries(i))c.length===0&&w(t,"has a modelOverrides entry with an empty model id"),r.size===0&&w(t,`sets modelOverrides for "${c}", but the installed catalog does not describe this route; a declared route spells every model out in its models list`),n.length>0&&w(t,`sets modelOverrides for "${c}" beside a models list; models already replaces the served catalog, so declare the fields on its entries`),r.has(c)||w(t,`modelOverrides names "${c}", which the installed catalog does not describe`),"id"in h&&w(t,`modelOverrides entry "${c}" sets "id", which is the dict key`);const a=n.length>0?n:[...r.values()].map(c=>({id:c.id,...i[c.id]}));a.length===0&&w(t,"resolves no models; the installed catalog does not describe this route, so its models must be listed in configuration");const d=ot(r),u=e.compat?.thinkingFormat!==void 0||e.compat?.supportsReasoningEffort!==void 0,f=new Set,y=new Map,E=a.map(c=>{c.id.length===0&&w(t,"has a model with an empty id"),f.has(c.id)&&w(t,`lists model "${c.id}" more than once`),f.add(c.id);const h=r.get(c.id),k=e.api??h?.api??d;k===void 0&&w(t,`model "${c.id}" needs an api; the installed catalog does not describe it, so set the route's api to the wire protocol its endpoint speaks`);const p=e.baseURL??h?.baseUrl??o;p===void 0&&w(t,`model "${c.id}" needs a baseURL; the installed catalog does not describe this route`);const g=c.contextWindow??h?.contextWindow??e.defaultContextWindow;(!Number.isInteger(g)||g<=0)&&w(t,`model "${c.id}" contextWindow must be a positive integer`);const v=c.maxTokens??h?.maxTokens??e.defaultMaxTokens;return(!Number.isInteger(v)||v<=0)&&w(t,`model "${c.id}" maxTokens must be a positive integer`),c.maxTokens!==void 0&&y.set(c.id,c.maxTokens),{...h,id:c.id,name:c.name??h?.name??c.id,api:k,provider:t,baseUrl:p,input:Ze(c.input)??h?.input??[...e.defaultInput],cost:h?.cost??Qe,contextWindow:g,maxTokens:v,...nt(t,c,h),...rt(t,c,e.compat,h,k)}});return u&&!E.some(c=>c.api==="openai-completions")&&w(t,"sets compat reasoning switches, but no model on the route speaks openai-completions; thinkingFormat and supportsReasoningEffort exist only on that protocol"),{models:E,configuredMaxTokens:y}}s(it,"resolveRouteModels");const ee={"openai-completions":Ne,"openai-responses":Pe,"anthropic-messages":Ue};function U(){return Object.keys(ee)}s(U,"supportedProtocols");function te(e){return{name:e,resolve:s(({credential:t})=>Promise.resolve({auth:t?.key===void 0?{}:{apiKey:t.key},source:e}),"resolve")}}s(te,"harnessApiKeyAuth");function oe(e,t){return t===void 0?{apiKey:te(e.displayName)}:t.auth.apiKey!==void 0||!e.namesCredential?t.auth:{...t.auth,apiKey:te(e.displayName)}}s(oe,"routeAuth");function st(e,t){const r=t.baseURL??e.baseUrl;return{id:t.provider,name:t.displayName,...r===void 0?{}:{baseUrl:r},auth:oe(t,e),getModels:s(()=>t.models,"getModels"),stream:s((o,n,i)=>e.stream(o,n,i),"stream"),streamSimple:s((o,n,i)=>e.streamSimple(o,n,i),"streamSimple")}}s(st,"reuseCatalogProvider");function at(e){const t=L(e.provider);if(t!==void 0&&e.api===void 0)return st(t,e);const r=e.api===void 0?void 0:ee[e.api];if(r===void 0)throw new Error(`llm-pi-ai: provider "${e.provider}" names api "${e.api}", which this build cannot serve; supported protocols are ${U().join(", ")}`);return Se({id:e.provider,name:e.displayName,...e.baseURL===void 0?{}:{baseUrl:e.baseURL},auth:oe(e,t),models:e.models,api:r()})}s(at,"buildProvider");const dt=3e5,lt=262144,ct="http://127.0.0.1:9",ut=32768,ne=["text"],pt=l.object({minimal:l.number(),low:l.number(),medium:l.number(),high:l.number()}),re=l.object({thinkingFormat:l.union(qe),supportsReasoningEffort:l.boolean()}),ft=l.dict(l.union([l.string(),l.const(null)]),l.union(T)),ie={name:l.string(),contextWindow:l.number().step(1).min(1),maxTokens:l.number().step(1).min(1),input:l.array(l.union(J)),reasoningEfforts:l.union([l.const(!1),ft]),compat:re},mt=l.object({id:l.string().required(),...ie}),ht=l.object(ie),gt=l.object({apiKeyEnv:l.string().role("credential-ref"),displayName:l.string(),api:l.union(U()),baseURL:l.string(),baseURLService:l.string(),models:l.array(mt),modelOverrides:l.dict(ht),compat:re,defaultContextWindow:l.number().step(1).min(1).default(lt),defaultMaxTokens:l.number().step(1).min(1).default(ut),defaultInput:l.array(l.union(J)).default([...ne]),headers:l.dict(l.string()),reasoning:l.union(T),thinkingBudgets:pt,cacheRetention:l.union(["none","short","long"]),transport:l.union(["sse","websocket","websocket-cached","auto"]),timeoutMs:l.natural(),websocketConnectTimeoutMs:l.natural(),streamIdleTimeoutMs:l.number().min(Number.MIN_VALUE).max(A).default(dt),retryPolicy:ve}),se=l.object({providers:l.dict(gt).default({})});function vt(e){ae(e.providers)}s(vt,"assertServiceable");function yt(e,t){const r=t;if("provider"in r)throw new Error(`llm-pi-ai: provider "${e}" sets "provider", which moved to the providers dict key`);if("maxRetries"in r||"maxRetryDelayMs"in r)throw new Error(`llm-pi-ai: provider "${e}" sets maxRetries or maxRetryDelayMs, which were removed; compose agent recovery with dsh-llm-retry`)}s(yt,"rejectRemovedFields");function ae(e){if(Array.isArray(e))throw new Error("llm-pi-ai: providers is now a dict keyed by provider route, not an array of profiles");const t=Object.entries(e??{}),r=new Map;for(const[o,n]of t){if(yt(o,n),o.length===0)throw new Error("llm-pi-ai: provider names must be non-empty");if(n.baseURL!==void 0&&n.baseURL.length===0)throw new Error(`llm-pi-ai: provider "${o}" has an empty baseURL`);if(n.baseURL!==void 0&&n.baseURLService!==void 0)throw new Error(`llm-pi-ai: provider "${o}" sets both baseURL and baseURLService; name at most one endpoint source`);if(n.baseURLService!==void 0&&n.baseURLService.length===0)throw new Error(`llm-pi-ai: provider "${o}" has an empty baseURLService`);if(n.displayName!==void 0&&n.displayName.length===0)throw new Error(`llm-pi-ai: provider "${o}" has an empty displayName`);const i=n.streamIdleTimeoutMs??3e5;if(!Number.isFinite(i)||i<=0||i>A)throw new Error(`llm-pi-ai: provider "${o}" streamIdleTimeoutMs must be a positive finite number no greater than ${A}`);const a=[...n.defaultInput??ne];if(a.length===0)throw new Error(`llm-pi-ai: provider "${o}" defaultInput must name at least one modality`);const d=n.displayName??o,u=it({provider:o,...n.api===void 0?{}:{api:n.api},...n.baseURL===void 0?{}:{baseURL:n.baseURL},...n.baseURLService===void 0?{}:{baseURL:ct},...n.models===void 0?{}:{models:n.models},...n.modelOverrides===void 0?{}:{modelOverrides:n.modelOverrides},...n.compat===void 0?{}:{compat:n.compat},defaultInput:a,defaultContextWindow:n.defaultContextWindow??262144,defaultMaxTokens:n.defaultMaxTokens??32768}),{apiKeyEnv:f,retryPolicy:y,models:E,displayName:c,...h}=n;r.set(o,{...h,provider:o,displayName:d,...f===void 0?{}:{apiKeyEnv:Le(f)},streamIdleTimeoutMs:i,retryPolicy:ke(y,`llm-pi-ai: provider "${o}" retryPolicy`),...h.headers===void 0?{}:{headers:{...h.headers}},...h.thinkingBudgets===void 0?{}:{thinkingBudgets:{...h.thinkingBudgets}},configuredMaxTokens:u.configuredMaxTokens,piProvider:at({provider:o,displayName:d,...n.api===void 0?{}:{api:n.api},...n.baseURL===void 0?{}:{baseURL:n.baseURL},models:u.models,namesCredential:f!==void 0})})}return r}s(ae,"resolveProfiles");const bt=new Set(["openai-completions","openai-responses"]),N=4194304;function de(...e){for(const t of e)if(typeof t=="number"&&Number.isInteger(t)&&t>0)return t}s(de,"capacity");function le(...e){for(const t of e)if(typeof t=="string"&&t.length>0)return t}s(le,"label");function wt(e){return`${e.replace(/\/+$/,"")}/models`}s(wt,"listingUrl");async function Et(e,t){const r=s(()=>new m(`${t} answered with more than ${N} bytes`,"DISCOVERY_FAILED"),"oversized"),o=Number(e.headers.get("content-length")??NaN);if(Number.isFinite(o)&&o>N)throw await e.body?.cancel(),r();if(e.body===null)return"";const n=e.body.getReader(),i=[];let a=0;try{for(;;){const{done:f,value:y}=await n.read();if(f)break;if(a+=y.byteLength,a>N)throw r();i.push(y)}}finally{await n.cancel().catch(()=>{})}const d=new Uint8Array(a);let u=0;for(const f of i)d.set(f,u),u+=f.byteLength;return new TextDecoder().decode(d)}s(Et,"readBounded");function kt(e){const t=e?.data;if(!Array.isArray(t))throw new m(`the endpoint's model listing has no "data" array; enter this provider's models by hand`,"DISCOVERY_FAILED");const r=[];for(const o of t){const n=o,i=le(n?.id);if(i===void 0)continue;const a=le(n?.name,n?.display_name),d=de(n?.context_window,n?.context_length),u=de(n?.max_output_tokens,n?.max_tokens);r.push({id:i,...a===void 0?{}:{name:a},...d===void 0?{}:{contextWindow:d},...u===void 0?{}:{maxTokens:u}})}return r}s(kt,"readListing");function Rt(e){const t=Ee(e);if(t.ok)return t.value;throw new m(t.reason==="empty"?"this provider's API key is blank; enter it on the Models page, or clear it to probe unauthenticated":"this provider's API key contains characters no HTTP header can carry; paste the raw key only",me)}s(Rt,"usableProbeKey");async function xt(e,t){if(e.provider!==void 0){const f=q(e.provider);if(f.size>0)return[...f.values()].map(y=>({id:y.id,name:y.name,contextWindow:y.contextWindow,maxTokens:y.maxTokens}))}if(e.baseURL===void 0||e.baseURL.length===0)throw new m(`pi-ai ships no catalog for provider "${e.provider??""}", so its models can only come from its endpoint; set a baseURL, or enter this provider's models by hand`,"DISCOVERY_FAILED");const r=e.api??"openai-completions";if(!bt.has(r))throw new m(`pi-ai protocol "${r}" has no model listing this build can read; enter this provider's models by hand`,"DISCOVERY_UNSUPPORTED");const o=wt(e.baseURL),n=e.apiKey??await t?.(),i=n===void 0?void 0:Rt(n);let a;try{a=await fetch(o,{method:"GET",headers:{accept:"application/json",...i===void 0?{}:{authorization:`Bearer ${i}`},...$()},...e.signal===void 0?{}:{signal:e.signal}})}catch(f){throw e.signal?.aborted?new m("model discovery aborted by caller","ABORTED",{cause:f}):new m(`could not reach ${o}`,"DISCOVERY_FAILED",{cause:f})}if(!a.ok)throw new m(`${o} answered ${a.status}${a.status===401||a.status===403?"; check the API key":""}`,"DISCOVERY_FAILED");let d;try{d=await Et(a,o)}catch(f){throw e.signal?.aborted?new m("model discovery aborted by caller","ABORTED",{cause:f}):f}let u;try{u=JSON.parse(d)}catch(f){throw new m(`${o} did not answer with JSON`,"DISCOVERY_FAILED",{cause:f})}return kt(u)}s(xt,"discoverModels");const Tt="llm-pi-ai",St=["llm"],P=xe("llm-pi-ai");function It(e){return[...e.entries()].map(([t,r])=>({provider:t,displayName:r.displayName,retryPolicy:r.retryPolicy})).sort((t,r)=>t.provider.localeCompare(r.provider))}s(It,"registrationFacts");function Ot(e){const t=new Set(et()),r=new Map,o=s((n,i)=>{r.set(n,{provider:n,displayName:i,settingsNs:P,settingsPath:["providers",n],declared:!t.has(n)})},"declare");for(const n of t)tt(n)&&o(n,n);for(const[n,i]of e)o(n,i.displayName);return[...r.values()]}s(Ot,"directoryEntries");function At(e,t){let r=s(()=>t,"current"),o,n;const i=s(()=>{const p=r();if(p===o&&n!==void 0)return n;const g=ae(p.providers);return o=p,n=g,g},"profiles");i();const a=s(async(p,g)=>{const v=g.apiKeyEnv;if(v===void 0)return;const R=e.get("credentials"),S=R!==void 0?(await R.resolve(v))?.value:ue(e).get(v)?.value;if(S!==void 0&&S.length>0)return ye(S,"llm-pi-ai",v);throw new m(`llm-pi-ai: no credential for provider route "${p}"; its profile resolves ${v}, which is not set — store ${v} through the credentials service (the web Models page writes it) or export it, and remove apiKeyEnv only if this provider should authenticate from pi-ai's own environment discovery`,"MISSING_CREDENTIAL")},"resolveApiKey"),d=new G({profiles:i,resolveApiKey:a,resolveAttachments:s(()=>e.get("attachments"),"resolveAttachments"),resolveServiceBaseURL:s(p=>{const g=e.get(p);if(g==null)return;const v=g.baseURL;return typeof v=="string"&&v.length>0?v:void 0},"resolveServiceBaseURL"),onReplayDegrade:s(({provider:p,model:g,reason:v})=>{e.logger.warn(`llm-pi-ai: unusable replay state on assistant history for route "${p}/${g}"; sending that message as provider-neutral content (${v})`)},"onReplayDegrade")});let u,f;const y=s(()=>{const p=Ot(i());D(p,f)||(u===void 0?u=e.llm.registerConfigurableProviders(p):u.replace(p),f=p)},"ensureDirectory");y();const E=s(async p=>{if(p===void 0)return;const g=i().get(p);if(g!==void 0)return a(p,g)},"storedApiKey");e.llm.registerModelDiscovery(P,p=>xt(p,()=>E(p.provider)));let c,h;const k=s(()=>{const p=It(i());if(D(p,h))return;const g=[...i().keys()];if(c===void 0){if(g.length===0){h=p;return}c=e.llm.registerAdapter(g,d)}else c.replace(g);h=p},"ensureRegistrationFacts");k(),Re(e,P,se,t,{validate:vt,setSource:s(p=>{r=p},"setSource"),onChange:s(()=>{try{k()}catch(p){e.logger.error("llm-pi-ai: keeping the previously registered routes after a refused update"),e.logger.error(p)}try{y()}catch(p){e.logger.error("llm-pi-ai: keeping the previous configurable-provider directory after a refused update"),e.logger.error(p)}},"onChange")})}s(At,"apply");export{se as Config,G as PiAiAdapter,At as apply,St as inject,Tt as name,U as supportedProtocols};
1
+ var ce=Object.defineProperty;var s=(e,t)=>ce(e,"name",{value:t,configurable:!0});import{launchEnvironmentOf as ue}from"@deepseek-ai/dsh-launch-environment";import{CONTEXT_WINDOW_EXCEEDED_CODE as pe,CallId as T,EMPTY_RESPONSE_CODE as fe,INVALID_CREDENTIAL_CODE as me,LlmAdapter as he,LlmError as h,QUOTA_EXCEEDED_CODE as ge,ReasoningEffortId as $,RetryPolicySchema as ye,assertUsableApiKey as ve,attributionHeaders as D,contentHasImage as S,isContextWindowExceededError as be,isQuotaExceededError as we,normalizeApiKey as Ee,resolveRetryPolicy as ke}from"@deepseek-ai/dsh-llm";import{deepEqualJson as U,installSettingsSection as xe,settingsNamespace as Te}from"@deepseek-ai/dsh-settings";import{createModels as Re,createProvider as Ie,getSupportedThinkingLevels as O,isContextOverflow as Se}from"@earendil-works/pi-ai";import{MAX_TIMER_DELAY_MS as A,idleWatchdog as Oe,timeoutOf as j}from"@deepseek-ai/dsh-timeout";import{builtinProviders as Ae,getBuiltinModels as Me,getBuiltinProviders as _e}from"@earendil-works/pi-ai/providers/all";import l from"@deepseek-ai/schemastery";import{credentialRef as Ne}from"@deepseek-ai/dsh-credentials";import{anthropicMessagesApi as Pe}from"@earendil-works/pi-ai/api/anthropic-messages.lazy";import{openAICompletionsApi as Ce}from"@earendil-works/pi-ai/api/openai-completions.lazy";import{openAIResponsesApi as Le}from"@earendil-works/pi-ai/api/openai-responses.lazy";function F(e){try{const t=JSON.parse(e);if(typeof t=="object"&&t!==null&&!Array.isArray(t))return t}catch{}return{}}s(F,"parseArguments");function W(){return{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}}}s(W,"emptyPiUsage");function $e(e){return{response:{kind:"pi-ai",version:2,api:e.api,provider:e.provider,model:e.model,...e.responseModel===void 0?{}:{responseModel:e.responseModel},...e.responseId===void 0?{}:{responseId:e.responseId},stopReason:e.stopReason},blocks:e.content.map(t=>{switch(t.type){case"text":return{type:"text",...t.textSignature===void 0?{}:{textSignature:t.textSignature}};case"thinking":return{type:"reasoning",...t.thinkingSignature===void 0?{}:{thinkingSignature:t.thinkingSignature},...t.redacted===void 0?{}:{redacted:t.redacted}};case"toolCall":return{type:"tool-call",...t.thoughtSignature===void 0?{}:{thoughtSignature:t.thoughtSignature}}}})}}s($e,"toPiReplayState");function b(e){throw new h(`invalid pi-ai replay state: ${e}`,"INVALID_REPLAY_STATE")}s(b,"invalidReplay");function De(e){if(typeof e!="object"||e===null||Array.isArray(e))return b("expected a replay envelope");const t=e,r=t.response;if(typeof r!="object"||r===null||Array.isArray(r))return b("expected a response object");const o=r;if(o.kind!=="pi-ai")return b("unknown state kind");if(o.version!==2)return b(`unsupported version ${String(o.version)}`);for(const i of["api","provider","model"])if(typeof o[i]!="string"||o[i].length===0)return b(`${i} must be a non-empty string`);if(!["stop","length","toolUse","error","aborted"].includes(String(o.stopReason)))return b("unknown stopReason");if(o.responseModel!==void 0&&typeof o.responseModel!="string")return b("responseModel must be a string");if(o.responseId!==void 0&&typeof o.responseId!="string")return b("responseId must be a string");const n=t.blocks;if(!Array.isArray(n))return b("blocks must be an array");for(const[i,a]of n.entries()){if(typeof a!="object"||a===null||Array.isArray(a))return b(`block ${i} must be an object`);const d=a;if(!["text","reasoning","tool-call"].includes(String(d.type)))return b(`block ${i} has an unknown type`);for(const u of["textSignature","thinkingSignature","thoughtSignature"])if(d[u]!==void 0&&typeof d[u]!="string")return b(`block ${i} ${u} must be a string`);if(d.redacted!==void 0&&typeof d.redacted!="boolean")return b(`block ${i} redacted must be boolean`)}return{response:o,blocks:n}}s(De,"readReplayState");function K(e){const t=e.source.kind==="model"?e.source:void 0,r=[];for(const o of e.content)switch(o.type){case"text":r.push({type:"text",text:o.text});break;case"reasoning":r.push({type:"thinking",thinking:o.text});break;case"tool-call":r.push({type:"toolCall",id:o.id,name:o.name,arguments:F(o.arguments)});break;case"image":throw new h("pi-ai chat history cannot represent structured assistant image output","UNSUPPORTED_CONTENT")}return{role:"assistant",content:r,api:"dsh-foreign",provider:t?.provider??"dsh-foreign",model:t?.model??"dsh-foreign",usage:W(),stopReason:r.some(o=>o.type==="toolCall")?"toolUse":"stop",timestamp:0}}s(K,"foreignAssistant");function Ue(e,t,r){const o=De(r);return o.response.provider!==t.provider?b("provider does not match assistant source"):o.response.model!==t.model?b("model does not match assistant source"):o.blocks.length!==e.content.length?b("block count does not match assistant content"):{role:"assistant",content:e.content.map((n,i)=>{const a=o.blocks[i];if(a===void 0||a.type!==n.type)return b(`block ${i} does not match assistant content`);switch(n.type){case"text":return{type:"text",text:n.text,...a.type==="text"&&a.textSignature!==void 0?{textSignature:a.textSignature}:{}};case"reasoning":return{type:"thinking",thinking:n.text,...a.type==="reasoning"&&a.thinkingSignature!==void 0?{thinkingSignature:a.thinkingSignature}:{},...a.type==="reasoning"&&a.redacted!==void 0?{redacted:a.redacted}:{}};case"tool-call":return{type:"toolCall",id:n.id,name:n.name,arguments:F(n.arguments),...a.type==="tool-call"&&a.thoughtSignature!==void 0?{thoughtSignature:a.thoughtSignature}:{}};default:return b(`block ${i} has an unsupported Harness type`)}}),api:o.response.api,provider:o.response.provider,model:o.response.model,...o.response.responseModel===void 0?{}:{responseModel:o.response.responseModel},...o.response.responseId===void 0?{}:{responseId:o.response.responseId},usage:W(),stopReason:o.response.stopReason,timestamp:0}}s(Ue,"replayedAssistant");function B(e,t){const r=e.source;if(r.kind!=="model"||r.replayState===void 0)return K(e);try{return Ue(e,r,r.replayState)}catch(o){if(!(o instanceof h)||o.code!=="INVALID_REPLAY_STATE")throw o;return t?.(o.message),K(e)}}s(B,"toPiAssistant");function M(e){return e.content.filter(t=>t.type==="text").map(t=>t.text).join("")}s(M,"flattenText");function V(e){return e.map(t=>t.type==="text"?t.text:t.type==="tool-result"?V(t.content):"").join("")}s(V,"toolResultText");async function _(e,t){const r=[];for(const o of e)switch(o.type){case"text":o.text.length>0&&r.push({type:"text",text:o.text});break;case"image":{const n=await t.readImage(o.attachment);r.push({type:"image",data:Buffer.from(n.data).toString("base64"),mimeType:n.ref.mediaType});break}case"tool-result":{const n=await _(o.content,t);typeof n=="string"?n.length>0&&r.push({type:"text",text:n}):r.push(...n)}}return r.every(o=>o.type==="text")?r.map(o=>o.text).join(""):r}s(_,"userContent");function je(e){return e.tools?.map(t=>({name:t.name,description:t.description,parameters:t.parameters}))}s(je,"toolsOf");function Y(e,t){const r=je(e);return{...e.system!==void 0?{systemPrompt:e.system}:{},messages:t,...r!==void 0&&r.length>0?{tools:r}:{}}}s(Y,"piContext");function Fe(e,t){const r=new Map,o=[];for(const n of e.messages){if(S(n.content))throw new h("pi-ai image conversion requires the durable attachment service","UNSUPPORTED_CONTENT");if(n.role==="system"){o.push({role:"user",content:M(n),timestamp:0});continue}if(n.role==="assistant"){const d=B(n,t);for(const u of d.content)u.type==="toolCall"&&r.set(T(u.id),u.name);o.push(d);continue}const i=M(n),a=n.content.filter(d=>d.type==="tool-result");(i.length>0||a.length===0)&&o.push({role:"user",content:i,timestamp:0});for(const d of a)o.push({role:"toolResult",toolCallId:d.toolCallId,toolName:r.get(d.toolCallId)??"unknown",content:[{type:"text",text:V(d.content)||"(no output)"}],isError:d.isError??!1,timestamp:0})}return Y(e,o)}s(Fe,"textOnlyContext");function z(e,t,r){return t===void 0?Fe(e,r):We(e,t,r)}s(z,"toPiContext");async function We(e,t,r){const o=new Map,n=[];for(const i of e.messages){if(i.role==="system"){if(S(i.content))throw new h("pi-ai cannot represent an image in an in-history system message","UNSUPPORTED_CONTENT");n.push({role:"user",content:M(i),timestamp:0});continue}if(i.role==="assistant"){const u=B(i,r);for(const p of u.content)p.type==="toolCall"&&o.set(T(p.id),p.name);n.push(u);continue}const a=await _(i.content.filter(u=>u.type!=="tool-result"),t),d=i.content.filter(u=>u.type==="tool-result");(a.length>0||d.length===0)&&n.push({role:"user",content:a,timestamp:0});for(const u of d){const p=await _(u.content,t);n.push({role:"toolResult",toolCallId:u.toolCallId,toolName:o.get(u.toolCallId)??"unknown",content:typeof p=="string"?[{type:"text",text:p||"(no output)"}]:p,isError:u.isError??!1,timestamp:0})}}return Y(e,n)}s(We,"toPiContextWithImages");function H(e){return{inputTokens:e.input,outputTokens:e.output,...e.cacheRead>0?{cacheReadTokens:e.cacheRead}:{},...e.cacheWrite>0?{cacheWriteTokens:e.cacheWrite}:{}}}s(H,"mapUsage");function Ke(e){return/\b(?:401|403)\b/.test(e)?"AUTH":we(e)?ge:/\b429\b|rate.?limit/i.test(e)?"RATE_LIMIT":/\b400\b|invalid.?request/i.test(e)?"INVALID_REQUEST":/\b5\d\d\b/.test(e)?"SERVER":/\btime(?:d)?\s*out\b|timeout/i.test(e)?"TIMEOUT":/stream ended (?:before|without)\b/i.test(e)||/\b(?:network|connection|socket|fetch)\b|\bECONN[A-Z]+\b/i.test(e)||/\b(?:other side closed|HTTP2 request did not get a response|WebSocket closed unexpectedly)\b/i.test(e)||/\bterminated\b|premature close/i.test(e)?"TRANSPORT":"PI_AI_ERROR"}s(Ke,"classifyPiAiError");function X(e,t){const r=Se(e,t),o=e.stopReason==="error"&&e.errorMessage!==void 0&&be(e.errorMessage);if(r||o)return{kind:"error",failure:{message:e.errorMessage??`pi-ai detected context overflow for model "${e.model}"`,code:pe}};switch(e.stopReason){case"stop":return e.content.length===0?{kind:"error",failure:{message:`model "${e.model}" returned a completed response with no content`,code:fe}}:{kind:"stop"};case"length":return{kind:"max-tokens"};case"toolUse":return{kind:"tool-calls"};case"aborted":return{kind:"aborted",failure:{message:e.errorMessage??"pi-ai stream aborted",code:"ABORTED"}};case"error":{const n=e.errorMessage??"pi-ai stream error";return{kind:"error",failure:{message:n,code:Ke(n)}}}}}s(X,"mapStopReason");async function*Be(e,t){const r=new Map;for await(const o of e)switch(o.type){case"start":break;case"text_start":yield{type:"block-start",index:o.contentIndex,blockType:"text"};break;case"text_delta":yield{type:"text-delta",index:o.contentIndex,text:o.delta};break;case"text_end":yield{type:"block-end",index:o.contentIndex,block:{type:"text",text:o.content}};break;case"thinking_start":yield{type:"block-start",index:o.contentIndex,blockType:"reasoning"};break;case"thinking_delta":yield{type:"reasoning-delta",index:o.contentIndex,text:o.delta};break;case"thinking_end":yield{type:"block-end",index:o.contentIndex,block:{type:"reasoning",text:o.content}};break;case"toolcall_start":{const n=o.partial.content[o.contentIndex],i=n?.type==="toolCall"?n.id:"",a=n?.type==="toolCall"?n.name:"";r.set(o.contentIndex,{id:i,name:a}),yield{type:"block-start",index:o.contentIndex,blockType:"tool-call"};break}case"toolcall_delta":{const n=r.get(o.contentIndex);yield{type:"tool-call-delta",index:o.contentIndex,id:T(n?.id??""),...n?.name!==void 0&&n.name.length>0?{name:n.name}:{},argumentsDelta:o.delta};break}case"toolcall_end":yield{type:"block-end",index:o.contentIndex,block:{type:"tool-call",id:T(o.toolCall.id),name:o.toolCall.name,arguments:JSON.stringify(o.toolCall.arguments)}};break;case"done":yield{type:"usage",usage:H(o.message.usage)},yield{type:"finish",reason:X(o.message,t),replayState:$e(o.message)};return;case"error":yield{type:"usage",usage:H(o.error.usage)},yield{type:"finish",reason:X(o.error,t)};return}throw new h("pi-ai event stream ended without done/error","STREAM_CLOSED")}s(Be,"toStreamChunks");var Ve=s(function(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var o,n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");o=t[Symbol.asyncDispose]}if(o===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");o=t[Symbol.dispose],r&&(n=o)}if(typeof o!="function")throw new TypeError("Object not disposable.");n&&(o=s(function(){try{n.call(this)}catch(i){return Promise.reject(i)}},"dispose")),e.stack.push({value:t,dispose:o,async:r})}else r&&e.stack.push({async:!0});return t},"__addDisposableResource"),Ye=(function(e){return function(t){function r(a){t.error=t.hasError?new e(a,t.error,"An error was suppressed during disposal."):a,t.hasError=!0}s(r,"fail");var o,n=0;function i(){for(;o=t.stack.pop();)try{if(!o.async&&n===1)return n=0,t.stack.push(o),Promise.resolve().then(i);if(o.dispose){var a=o.dispose.call(o.value);if(o.async)return n|=2,Promise.resolve(a).then(i,function(d){return r(d),i()})}else n|=1}catch(d){r(d)}if(n===1)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}return s(i,"next"),i()}})(typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var o=new Error(r);return o.name="SuppressedError",o.error=e,o.suppressed=t,o});function ze(e,t,r){const o=t==="off"?void 0:t;return{...r===void 0?{}:{apiKey:r},...o===void 0?{}:{reasoning:o},...e.thinkingBudgets===void 0?{}:{thinkingBudgets:e.thinkingBudgets},...e.cacheRetention===void 0?{}:{cacheRetention:e.cacheRetention},...e.transport===void 0?{}:{transport:e.transport},...e.timeoutMs===void 0?{}:{timeoutMs:e.timeoutMs},...e.websocketConnectTimeoutMs===void 0?{}:{websocketConnectTimeoutMs:e.websocketConnectTimeoutMs},maxRetries:0}}s(ze,"profileOptions");function He(e,t){if(t!==void 0)return O(e).some(r=>r===t)?t:void 0}s(He,"describableReasoningLevel");function Xe(e,t){if(t!==void 0){if(O(e).some(r=>r===t))return t;throw new h(`pi-ai provider "${e.provider}" model "${e.id}" does not support reasoning effort "${t}"`,"UNSUPPORTED_REASONING_EFFORT")}}s(Xe,"resolveReasoningLevel");function Ge(e,t){return e.reasoning?{reasoning:{efforts:O(e).map(r=>({id:$(r),name:`${r.charAt(0).toUpperCase()}${r.slice(1)}`})),...t===void 0?{}:{defaultEffort:$(t)}}}:{}}s(Ge,"reasoningInfo");function Je(e){const t=D(),r=new Set(Object.keys(t).map(o=>o.toLowerCase()));return{...Object.fromEntries(Object.entries(e??{}).filter(([o])=>!r.has(o.toLowerCase()))),...t}}s(Je,"requestHeaders");var G=class extends he{static{s(this,"PiAiAdapter")}config;snapshot;constructor(e){super(),this.config=e}current(){const e=this.config.profiles();if(this.snapshot?.profiles===e)return this.snapshot;const t=Re();for(const r of e.values())t.setProvider(r.piProvider);return this.snapshot={profiles:e,models:t},this.snapshot}profileOf(e,t){const r=e.profiles.get(t);if(r===void 0)throw new h(`pi-ai adapter does not own provider "${t}"`,"NO_ADAPTER");return r}modelOf(e,t,r){this.profileOf(e,t);const o=e.models.getModel(t,r);if(o===void 0)throw new h(`pi-ai provider "${t}" has no configured model "${r}"`,"UNKNOWN_MODEL");return o}providerInfo(e){return{id:e,name:this.current().profiles.get(e)?.displayName??e}}providerRetryPolicy(e){return this.current().profiles.get(e)?.retryPolicy}listModels(e){return Promise.resolve().then(()=>{const t=this.current();return this.profileOf(t,e),t.models.getModels(e).map(r=>({provider:e,id:r.id,name:r.name,inputModalities:[...r.input]}))})}resolveModel(e,t,r){return Promise.resolve().then(()=>{const o=this.current(),n=this.profileOf(o,e),i=this.modelOf(o,e,t),a=He(i,n.reasoning),d=n.configuredMaxTokens.get(t);return{provider:e,id:t,name:i.name,inputModalities:[...i.input],context:{contextWindow:i.contextWindow},...d===void 0?{}:{defaultMaxTokens:d},...Ge(i,a)}})}async*stream(e){const t={stack:[],error:void 0,hasError:!1};try{if(e.stop!==void 0)throw new h("llm-pi-ai does not support GenerateOptions.stop","UNSUPPORTED_OPTION");const r=this.current(),o=this.profileOf(r,e.provider),n=this.modelOf(r,e.provider,e.model),i=Xe(n,e.reasoningEffort??o.reasoning),a=await this.config.resolveApiKey(e.provider,o),d=new AbortController,u=e.signal===void 0?d.signal:AbortSignal.any([e.signal,d.signal]),p=o.streamIdleTimeoutMs,g=Ve(t,Oe(u,p,"LLM_STREAM_IDLE_TIMEOUT"),!1);try{const E=e.messages.some(v=>S(v.content));if(E&&!n.input.includes("image"))throw new h(`pi-ai model "${n.id}" does not support image input`,"UNSUPPORTED_CONTENT");const c=E?this.config.resolveAttachments?.():void 0;if(E&&c===void 0)throw new h("pi-ai image input requires the durable attachment service","UNSUPPORTED_CONTENT");const m=s(v=>{this.config.onReplayDegrade?.({provider:e.provider,model:e.model,reason:v})},"onReplayDegrade"),k=c===void 0?z(e,void 0,m):await z(e,c,m),f=Be(r.models.streamSimple(n,k,{...ze(o,i,a),...e.temperature===void 0?{}:{temperature:e.temperature},...e.maxTokens===void 0?{}:{maxTokens:e.maxTokens},...e.sessionId===void 0?{}:{sessionId:String(e.sessionId)},signal:g.signal,headers:Je(o.headers)}),n.contextWindow)[Symbol.asyncIterator]();let y=!1;try{for(;;){const v=await g.next(f),x=j(g.signal,"LLM_STREAM_IDLE_TIMEOUT");if(x!==void 0)throw x;if(v.done){y=!0;return}yield v.value}}finally{if(!y){d.abort("pi-ai stream consumer stopped");try{await f.return(void 0)}catch{}}}}catch(E){throw j(g.signal,"LLM_STREAM_IDLE_TIMEOUT")!==void 0?new h(`pi-ai stream idle timeout after ${p}ms`,"TIMEOUT",{cause:E}):e.signal?.aborted?new h("pi-ai request aborted by caller","ABORTED",{cause:E}):E}finally{d.abort("pi-ai stream consumer stopped")}}catch(r){t.error=r,t.hasError=!0}finally{Ye(t)}}};const Qe={input:0,output:0,cacheRead:0,cacheWrite:0},J=Object.keys({text:!0,image:!0});function Ze(e){return e===void 0||e.length===0?void 0:[...e]}s(Ze,"declaredInput");const R=Object.keys({off:!0,minimal:!0,low:!0,medium:!0,high:!0,xhigh:!0,max:!0}),qe=Object.keys({openai:!0,deepseek:!0,openrouter:!0,together:!0,zai:!0,qwen:!0,"string-thinking":!0,"ant-ling":!0});let Q;function Z(){return Q??=new Map(Ae().map(e=>[e.id,e])),Q}s(Z,"catalogProviders");function N(e){return Z().get(e)}s(N,"catalogProvider");function et(){return _e()}s(et,"catalogProviderIds");function tt(e){return N(e)?.auth.apiKey!==void 0}s(tt,"catalogProviderTakesApiKey");function q(e){if(!Z().has(e))return new Map;const t=Me(e);return new Map(t.map(r=>[r.id,r]))}s(q,"catalogModels");function w(e,t){throw new Error(`llm-pi-ai: provider "${e}" ${t}`)}s(w,"invalid");function ot(e){const t=new Set;for(const r of e.values())t.add(r.api);return t.size===1?[...t][0]:void 0}s(ot,"sharedCatalogApi");function nt(e,t,r){const o=t.reasoningEfforts;if(o===void 0)return{reasoning:r?.reasoning??!1};if(o===!1)return{reasoning:!1};(o===null||Object.keys(o).length===0)&&w(e,`model "${t.id}" has an empty reasoningEfforts; declare the offered levels, set false for a non-reasoning model, or omit the field to keep the installed catalog's capability`);const n=R.flatMap(a=>{const d=o[a];return d===void 0?[]:[[a,d]]});for(const[a,d]of n)d===null?a!=="off"&&w(e,`model "${t.id}" reasoningEfforts.${a} needs the wire value dispatch should send; only "off" may leave it empty`):d.length===0&&w(e,`model "${t.id}" reasoningEfforts.${a} must not be an empty string`);n.some(([a])=>a!=="off")||w(e,`model "${t.id}" reasoningEfforts offers no level beyond "off"; declare a thinking level, or set reasoningEfforts to false for a non-reasoning model`);const i={};for(const a of R){const d=o[a];d===void 0?i[a]=null:d!==null&&(i[a]=d)}return{reasoning:!0,thinkingLevelMap:i}}s(nt,"resolveModelReasoning");function rt(e,t,r,o,n){const i=t.compat?.thinkingFormat??r?.thinkingFormat,a=t.compat?.supportsReasoningEffort??r?.supportsReasoningEffort;return i===void 0&&a===void 0?{}:n!=="openai-completions"?((t.compat?.thinkingFormat!==void 0||t.compat?.supportsReasoningEffort!==void 0)&&w(e,`model "${t.id}" sets compat reasoning switches, but its api is "${n}"; thinkingFormat and supportsReasoningEffort exist only on openai-completions`),{}):{compat:{...o?.api===n?o.compat:void 0,...i===void 0?{}:{thinkingFormat:i},...a===void 0?{}:{supportsReasoningEffort:a}}}}s(rt,"resolveModelCompat");function it(e){const{provider:t}=e,r=q(t),o=N(t)?.baseUrl,n=e.models??[],i=e.modelOverrides??{};for(const[c,m]of Object.entries(i))c.length===0&&w(t,"has a modelOverrides entry with an empty model id"),r.size===0&&w(t,`sets modelOverrides for "${c}", but the installed catalog does not describe this route; a declared route spells every model out in its models list`),n.length>0&&w(t,`sets modelOverrides for "${c}" beside a models list; models already replaces the served catalog, so declare the fields on its entries`),r.has(c)||w(t,`modelOverrides names "${c}", which the installed catalog does not describe`),"id"in m&&w(t,`modelOverrides entry "${c}" sets "id", which is the dict key`);const a=n.length>0?n:[...r.values()].map(c=>({id:c.id,...i[c.id]}));a.length===0&&w(t,"resolves no models; the installed catalog does not describe this route, so its models must be listed in configuration");const d=ot(r),u=e.compat?.thinkingFormat!==void 0||e.compat?.supportsReasoningEffort!==void 0,p=new Set,g=new Map,E=a.map(c=>{c.id.length===0&&w(t,"has a model with an empty id"),p.has(c.id)&&w(t,`lists model "${c.id}" more than once`),p.add(c.id);const m=r.get(c.id),k=e.api??m?.api??d;k===void 0&&w(t,`model "${c.id}" needs an api; the installed catalog does not describe it, so set the route's api to the wire protocol its endpoint speaks`);const f=e.baseURL??m?.baseUrl??o;f===void 0&&w(t,`model "${c.id}" needs a baseURL; the installed catalog does not describe this route`);const y=c.contextWindow??m?.contextWindow??e.defaultContextWindow;(!Number.isInteger(y)||y<=0)&&w(t,`model "${c.id}" contextWindow must be a positive integer`);const v=c.maxTokens??m?.maxTokens??e.defaultMaxTokens;return(!Number.isInteger(v)||v<=0)&&w(t,`model "${c.id}" maxTokens must be a positive integer`),c.maxTokens!==void 0&&g.set(c.id,c.maxTokens),{...m,id:c.id,name:c.name??m?.name??c.id,api:k,provider:t,baseUrl:f,input:Ze(c.input)??m?.input??[...e.defaultInput],cost:m?.cost??Qe,contextWindow:y,maxTokens:v,...nt(t,c,m),...rt(t,c,e.compat,m,k)}});return u&&!E.some(c=>c.api==="openai-completions")&&w(t,"sets compat reasoning switches, but no model on the route speaks openai-completions; thinkingFormat and supportsReasoningEffort exist only on that protocol"),{models:E,configuredMaxTokens:g}}s(it,"resolveRouteModels");const ee={"openai-completions":Ce,"openai-responses":Le,"anthropic-messages":Pe};function P(){return Object.keys(ee)}s(P,"supportedProtocols");function te(e){return{name:e,resolve:s(({credential:t})=>Promise.resolve({auth:t?.key===void 0?{}:{apiKey:t.key},source:e}),"resolve")}}s(te,"harnessApiKeyAuth");function oe(e,t){return t===void 0?{apiKey:te(e.displayName)}:t.auth.apiKey!==void 0||!e.namesCredential?t.auth:{...t.auth,apiKey:te(e.displayName)}}s(oe,"routeAuth");function st(e,t){const r=t.baseURL??e.baseUrl;return{id:t.provider,name:t.displayName,...r===void 0?{}:{baseUrl:r},auth:oe(t,e),getModels:s(()=>t.models,"getModels"),stream:s((o,n,i)=>e.stream(o,n,i),"stream"),streamSimple:s((o,n,i)=>e.streamSimple(o,n,i),"streamSimple")}}s(st,"reuseCatalogProvider");function at(e){const t=N(e.provider);if(t!==void 0&&e.api===void 0)return st(t,e);const r=e.api===void 0?void 0:ee[e.api];if(r===void 0)throw new Error(`llm-pi-ai: provider "${e.provider}" names api "${e.api}", which this build cannot serve; supported protocols are ${P().join(", ")}`);return Ie({id:e.provider,name:e.displayName,...e.baseURL===void 0?{}:{baseUrl:e.baseURL},auth:oe(e,t),models:e.models,api:r()})}s(at,"buildProvider");const dt=3e5,lt=262144,ct=32768,ne=["text"],ut=l.object({minimal:l.number(),low:l.number(),medium:l.number(),high:l.number()}),re=l.object({thinkingFormat:l.union(qe),supportsReasoningEffort:l.boolean()}),pt=l.dict(l.union([l.string(),l.const(null)]),l.union(R)),ie={name:l.string(),contextWindow:l.number().step(1).min(1),maxTokens:l.number().step(1).min(1),input:l.array(l.union(J)),reasoningEfforts:l.union([l.const(!1),pt]),compat:re},ft=l.object({id:l.string().required(),...ie}),mt=l.object(ie),ht=l.object({apiKeyEnv:l.string().role("credential-ref"),displayName:l.string(),api:l.union(P()),baseURL:l.string(),models:l.array(ft),modelOverrides:l.dict(mt),compat:re,defaultContextWindow:l.number().step(1).min(1).default(lt),defaultMaxTokens:l.number().step(1).min(1).default(ct),defaultInput:l.array(l.union(J)).default([...ne]),headers:l.dict(l.string()),reasoning:l.union(R),thinkingBudgets:ut,cacheRetention:l.union(["none","short","long"]),transport:l.union(["sse","websocket","websocket-cached","auto"]),timeoutMs:l.natural(),websocketConnectTimeoutMs:l.natural(),streamIdleTimeoutMs:l.number().min(Number.MIN_VALUE).max(A).default(dt),retryPolicy:ye}),se=l.object({providers:l.dict(ht).default({})});function gt(e){ae(e.providers)}s(gt,"assertServiceable");function yt(e,t){const r=t;if("provider"in r)throw new Error(`llm-pi-ai: provider "${e}" sets "provider", which moved to the providers dict key`);if("maxRetries"in r||"maxRetryDelayMs"in r)throw new Error(`llm-pi-ai: provider "${e}" sets maxRetries or maxRetryDelayMs, which were removed; compose agent recovery with dsh-llm-retry`)}s(yt,"rejectRemovedFields");function ae(e){if(Array.isArray(e))throw new Error("llm-pi-ai: providers is now a dict keyed by provider route, not an array of profiles");const t=Object.entries(e??{}),r=new Map;for(const[o,n]of t){if(yt(o,n),o.length===0)throw new Error("llm-pi-ai: provider names must be non-empty");if(n.baseURL!==void 0&&n.baseURL.length===0)throw new Error(`llm-pi-ai: provider "${o}" has an empty baseURL`);if(n.displayName!==void 0&&n.displayName.length===0)throw new Error(`llm-pi-ai: provider "${o}" has an empty displayName`);const i=n.streamIdleTimeoutMs??3e5;if(!Number.isFinite(i)||i<=0||i>A)throw new Error(`llm-pi-ai: provider "${o}" streamIdleTimeoutMs must be a positive finite number no greater than ${A}`);const a=[...n.defaultInput??ne];if(a.length===0)throw new Error(`llm-pi-ai: provider "${o}" defaultInput must name at least one modality`);const d=n.displayName??o,u=it({provider:o,...n.api===void 0?{}:{api:n.api},...n.baseURL===void 0?{}:{baseURL:n.baseURL},...n.models===void 0?{}:{models:n.models},...n.modelOverrides===void 0?{}:{modelOverrides:n.modelOverrides},...n.compat===void 0?{}:{compat:n.compat},defaultInput:a,defaultContextWindow:n.defaultContextWindow??262144,defaultMaxTokens:n.defaultMaxTokens??32768}),{apiKeyEnv:p,retryPolicy:g,models:E,displayName:c,...m}=n;r.set(o,{...m,provider:o,displayName:d,...p===void 0?{}:{apiKeyEnv:Ne(p)},streamIdleTimeoutMs:i,retryPolicy:ke(g,`llm-pi-ai: provider "${o}" retryPolicy`),...m.headers===void 0?{}:{headers:{...m.headers}},...m.thinkingBudgets===void 0?{}:{thinkingBudgets:{...m.thinkingBudgets}},configuredMaxTokens:u.configuredMaxTokens,piProvider:at({provider:o,displayName:d,...n.api===void 0?{}:{api:n.api},...n.baseURL===void 0?{}:{baseURL:n.baseURL},models:u.models,namesCredential:p!==void 0})})}return r}s(ae,"resolveProfiles");const vt=new Set(["openai-completions","openai-responses"]),C=4194304;function de(...e){for(const t of e)if(typeof t=="number"&&Number.isInteger(t)&&t>0)return t}s(de,"capacity");function le(...e){for(const t of e)if(typeof t=="string"&&t.length>0)return t}s(le,"label");function bt(e){return`${e.replace(/\/+$/,"")}/models`}s(bt,"listingUrl");async function wt(e,t){const r=s(()=>new h(`${t} answered with more than ${C} bytes`,"DISCOVERY_FAILED"),"oversized"),o=Number(e.headers.get("content-length")??NaN);if(Number.isFinite(o)&&o>C)throw await e.body?.cancel(),r();if(e.body===null)return"";const n=e.body.getReader(),i=[];let a=0;try{for(;;){const{done:p,value:g}=await n.read();if(p)break;if(a+=g.byteLength,a>C)throw r();i.push(g)}}finally{await n.cancel().catch(()=>{})}const d=new Uint8Array(a);let u=0;for(const p of i)d.set(p,u),u+=p.byteLength;return new TextDecoder().decode(d)}s(wt,"readBounded");function Et(e){const t=e?.data;if(!Array.isArray(t))throw new h(`the endpoint's model listing has no "data" array; enter this provider's models by hand`,"DISCOVERY_FAILED");const r=[];for(const o of t){const n=o,i=le(n?.id);if(i===void 0)continue;const a=le(n?.name,n?.display_name),d=de(n?.context_window,n?.context_length),u=de(n?.max_output_tokens,n?.max_tokens);r.push({id:i,...a===void 0?{}:{name:a},...d===void 0?{}:{contextWindow:d},...u===void 0?{}:{maxTokens:u}})}return r}s(Et,"readListing");function kt(e){const t=Ee(e);if(t.ok)return t.value;throw new h(t.reason==="empty"?"this provider's API key is blank; enter it on the Models page, or clear it to probe unauthenticated":"this provider's API key contains characters no HTTP header can carry; paste the raw key only",me)}s(kt,"usableProbeKey");async function xt(e,t){if(e.provider!==void 0){const p=q(e.provider);if(p.size>0)return[...p.values()].map(g=>({id:g.id,name:g.name,contextWindow:g.contextWindow,maxTokens:g.maxTokens}))}if(e.baseURL===void 0||e.baseURL.length===0)throw new h(`pi-ai ships no catalog for provider "${e.provider??""}", so its models can only come from its endpoint; set a baseURL, or enter this provider's models by hand`,"DISCOVERY_FAILED");const r=e.api??"openai-completions";if(!vt.has(r))throw new h(`pi-ai protocol "${r}" has no model listing this build can read; enter this provider's models by hand`,"DISCOVERY_UNSUPPORTED");const o=bt(e.baseURL),n=e.apiKey??await t?.(),i=n===void 0?void 0:kt(n);let a;try{a=await fetch(o,{method:"GET",headers:{accept:"application/json",...i===void 0?{}:{authorization:`Bearer ${i}`},...D()},...e.signal===void 0?{}:{signal:e.signal}})}catch(p){throw e.signal?.aborted?new h("model discovery aborted by caller","ABORTED",{cause:p}):new h(`could not reach ${o}`,"DISCOVERY_FAILED",{cause:p})}if(!a.ok)throw new h(`${o} answered ${a.status}${a.status===401||a.status===403?"; check the API key":""}`,"DISCOVERY_FAILED");let d;try{d=await wt(a,o)}catch(p){throw e.signal?.aborted?new h("model discovery aborted by caller","ABORTED",{cause:p}):p}let u;try{u=JSON.parse(d)}catch(p){throw new h(`${o} did not answer with JSON`,"DISCOVERY_FAILED",{cause:p})}return Et(u)}s(xt,"discoverModels");const Tt="llm-pi-ai",Rt=["llm"],L=Te("llm-pi-ai");function It(e){return[...e.entries()].map(([t,r])=>({provider:t,displayName:r.displayName,retryPolicy:r.retryPolicy})).sort((t,r)=>t.provider.localeCompare(r.provider))}s(It,"registrationFacts");function St(e){const t=new Set(et()),r=new Map,o=s((n,i)=>{r.set(n,{provider:n,displayName:i,settingsNs:L,settingsPath:["providers",n],declared:!t.has(n)})},"declare");for(const n of t)tt(n)&&o(n,n);for(const[n,i]of e)o(n,i.displayName);return[...r.values()]}s(St,"directoryEntries");function Ot(e,t){let r=s(()=>t,"current"),o,n;const i=s(()=>{const f=r();if(f===o&&n!==void 0)return n;const y=ae(f.providers);return o=f,n=y,y},"profiles");i();const a=s(async(f,y)=>{const v=y.apiKeyEnv;if(v===void 0)return;const x=e.get("credentials"),I=x!==void 0?(await x.resolve(v))?.value:ue(e).get(v)?.value;if(I!==void 0&&I.length>0)return ve(I,"llm-pi-ai",v);throw new h(`llm-pi-ai: no credential for provider route "${f}"; its profile resolves ${v}, which is not set — store ${v} through the credentials service (the web Models page writes it) or export it, and remove apiKeyEnv only if this provider should authenticate from pi-ai's own environment discovery`,"MISSING_CREDENTIAL")},"resolveApiKey"),d=new G({profiles:i,resolveApiKey:a,resolveAttachments:s(()=>e.get("attachments"),"resolveAttachments"),onReplayDegrade:s(({provider:f,model:y,reason:v})=>{e.logger.warn(`llm-pi-ai: unusable replay state on assistant history for route "${f}/${y}"; sending that message as provider-neutral content (${v})`)},"onReplayDegrade")});let u,p;const g=s(()=>{const f=St(i());U(f,p)||(u===void 0?u=e.llm.registerConfigurableProviders(f):u.replace(f),p=f)},"ensureDirectory");g();const E=s(async f=>{if(f===void 0)return;const y=i().get(f);if(y!==void 0)return a(f,y)},"storedApiKey");e.llm.registerModelDiscovery(L,f=>xt(f,()=>E(f.provider)));let c,m;const k=s(()=>{const f=It(i());if(U(f,m))return;const y=[...i().keys()];if(c===void 0){if(y.length===0){m=f;return}c=e.llm.registerAdapter(y,d)}else c.replace(y);m=f},"ensureRegistrationFacts");k(),xe(e,L,se,t,{validate:gt,setSource:s(f=>{r=f},"setSource"),onChange:s(()=>{try{k()}catch(f){e.logger.error("llm-pi-ai: keeping the previously registered routes after a refused update"),e.logger.error(f)}try{g()}catch(f){e.logger.error("llm-pi-ai: keeping the previous configurable-provider directory after a refused update"),e.logger.error(f)}},"onChange")})}s(Ot,"apply");export{se as Config,G as PiAiAdapter,Ot as apply,Rt as inject,Tt as name,P as supportedProtocols};
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-llm-pi-ai","version":"0.1.0","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-attachment":"^0.1.0","@deepseek-ai/dsh-credentials":"^0.1.0","@deepseek-ai/dsh-llm":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-launch-environment":"^0.1.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-timeout":"^0.1.0","@deepseek-ai/dsh-settings":"^0.1.0"},"dependencies":{"@earendil-works/pi-ai":"^0.83.0","@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-llm-pi-ai","version":"0.1.0-rc.7","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-credentials":"^0.1.0-rc.7","@deepseek-ai/dsh-launch-environment":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-settings":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-attachment":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-timeout":"^0.1.0-rc.7"},"dependencies":{"@earendil-works/pi-ai":"^0.82.1","@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-llm-retry","version":"0.1.0","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"},"./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-brand":"^0.1.0","@deepseek-ai/dsh-agent":"^0.1.0","@deepseek-ai/dsh-llm":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-timeout":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-llm-retry","version":"0.1.0-rc.7","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"},"./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-brand":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-timeout":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-mcp-client","version":"0.1.0","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-attachment":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-llm":"^0.1.0","@deepseek-ai/dsh-subprocess":"^0.1.0","@deepseek-ai/dsh-tools":"^0.1.0","@deepseek-ai/dsh-timeout":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@modelcontextprotocol/sdk":"^1.12.0","zod":"^4.4.3","@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-mcp-client","version":"0.1.0-rc.7","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-attachment":"^0.1.0-rc.7","@deepseek-ai/dsh-subprocess":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-timeout":"^0.1.0-rc.7"},"dependencies":{"@modelcontextprotocol/sdk":"^1.12.0","zod":"^4.4.3","@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-message-feedback","version":"0.1.0","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","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-llm":"^0.1.0","@deepseek-ai/dsh-brand":"^0.1.0","@deepseek-ai/dsh-session-persistence":"^0.1.0","@deepseek-ai/dsh-storage-domain":"^0.1.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-typert-protocol":"^0.1.0"},"dependencies":{"zod":"^4.4.3","@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-message-feedback","version":"0.1.0-rc.7","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","peerDependencies":{"@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-brand":"^0.1.0-rc.7","@deepseek-ai/dsh-session-persistence":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-typert-protocol":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-storage-domain":"^0.1.0-rc.7"},"dependencies":{"zod":"^4.4.3","@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-native-command","version":"0.1.0","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.1.0","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-native-command","version":"0.1.0-rc.7","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.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-output-retention","version":"0.1.0","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.1.0","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-output-retention","version":"0.1.0-rc.7","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.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-permission-presets","version":"0.1.0","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"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-shell":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-sandbox-policy":"^0.1.0","@deepseek-ai/dsh-commands":"^0.1.0","@deepseek-ai/dsh-sandbox":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-session-projection":"^0.1.0","@deepseek-ai/dsh-settings":"^0.1.0","@deepseek-ai/dsh-user-approval":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"zod":"^4.4.3","@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-permission-presets","version":"0.1.0-rc.7","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"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-commands":"^0.1.0-rc.7","@deepseek-ai/dsh-shell":"^0.1.0-rc.7","@deepseek-ai/dsh-sandbox":"^0.1.0-rc.7","@deepseek-ai/dsh-sandbox-policy":"^0.1.0-rc.7","@deepseek-ai/dsh-settings":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-user-approval":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session-projection":"^0.1.0-rc.7"},"dependencies":{"zod":"^4.4.3","@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-persona","version":"0.1.0","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-system-prompt":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-persona","version":"0.1.0-rc.7","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.1.0-rc.7","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-plan-mode","version":"0.1.0","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"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-commands":"^0.1.0","@deepseek-ai/dsh-session-projection":"^0.1.0","@deepseek-ai/dsh-llm":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-system-prompt":"^0.1.0","@deepseek-ai/dsh-tools":"^0.1.0","@deepseek-ai/dsh-agent":"^0.1.0","@deepseek-ai/dsh-user-questions":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"peerDependenciesMeta":{"@deepseek-ai/dsh-commands":{"optional":true}},"dependencies":{"zod":"^4.4.3"}}
1
+ {"name":"@deepseek-ai/dsh-plan-mode","version":"0.1.0-rc.7","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"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-commands":"^0.1.0-rc.7","@deepseek-ai/dsh-session-projection":"^0.1.0-rc.7","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/dsh-user-questions":"^0.1.0-rc.7","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7"},"peerDependenciesMeta":{"@deepseek-ai/dsh-commands":{"optional":true}},"dependencies":{"zod":"^4.4.3"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-pwsh-local","version":"0.1.0","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-shell":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-subprocess":"^0.1.0","@deepseek-ai/dsh-timeout":"^0.1.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-settings":"^0.1.0"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-pwsh-local","version":"0.1.0-rc.7","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.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-settings":"^0.1.0-rc.7","@deepseek-ai/dsh-shell":"^0.1.0-rc.7","@deepseek-ai/dsh-timeout":"^0.1.0-rc.7","@deepseek-ai/dsh-subprocess":"^0.1.0-rc.7"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-pwsh-sandbox","version":"0.1.0","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-shell":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-pwsh-local":"^0.1.0","@deepseek-ai/dsh-sandbox-policy":"^0.1.0","@deepseek-ai/dsh-sandbox":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-pwsh-sandbox","version":"0.1.0-rc.7","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.1.0-rc.7","@deepseek-ai/dsh-sandbox":"^0.1.0-rc.7","@deepseek-ai/dsh-pwsh-local":"^0.1.0-rc.7","@deepseek-ai/dsh-sandbox-policy":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-shell":"^0.1.0-rc.7"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-repeat-tool-reminder","version":"0.1.0","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-agent":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-tools":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-repeat-tool-reminder","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-sandbox","version":"0.1.0","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.1.0","@deepseek-ai/dsh-llm":"^0.1.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session":"^0.1.0"}}
1
+ {"name":"@deepseek-ai/dsh-sandbox","version":"0.1.0-rc.7","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-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-sandbox-local","version":"0.1.0","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.1.0","@deepseek-ai/dsh-llm":"^0.1.0","@deepseek-ai/dsh-sandbox":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/dsh-sandbox-windows-acl":"^0.1.0","@deepseek-ai/schemastery":"^3.18.1","@deepseek-ai/node-addon-landlock-run":"^0.1.1"}}
1
+ {"name":"@deepseek-ai/dsh-sandbox-local","version":"0.1.0-rc.7","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.1.0-rc.7","@deepseek-ai/dsh-sandbox":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/dsh-sandbox-windows-acl":"^0.1.0-rc.7","@deepseek-ai/schemastery":"^3.18.1","@deepseek-ai/node-addon-landlock-run":"^0.1.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-sandbox-policy","version":"0.1.0","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.1.0","@deepseek-ai/dsh-sandbox":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-system-prompt":"^0.1.0"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-sandbox-policy","version":"0.1.0-rc.7","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-sandbox":"^0.1.0-rc.7","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- import{a as r,c as a,i as s,n as t,o as e,r as o,t as i}from"./types-D2_FQYSK.js";export{i as AclSandbox,s as AclWriteGrant,a as Win32Error,e as assertTempRootOutsideWorkspace,r as quoteArg,t as tempWriteSid,o as workspaceWriteSid};
1
+ import{a as r,c as a,i as s,n as t,o as e,r as o,t as i}from"./types-DE3U0cmQ.js";export{i as AclSandbox,s as AclWriteGrant,a as Win32Error,e as assertTempRootOutsideWorkspace,r as quoteArg,t as tempWriteSid,o as workspaceWriteSid};
@@ -1,4 +1,4 @@
1
- var S=Object.defineProperty;var m=(e,t)=>S(e,"name",{value:t,configurable:!0});import{n as f,o as g,r as v,s as E,t as W}from"./types-D2_FQYSK.js";import{existsSync as $,mkdtempSync as y,rmSync as b,statSync as T}from"node:fs";import{join as x}from"node:path";const w="windows-acl-run",h=127;var k=class extends Error{static{m(this,"RunnerFailure")}};function r(e){throw process.stderr.write(`${w}: ${e}
1
+ var S=Object.defineProperty;var m=(e,t)=>S(e,"name",{value:t,configurable:!0});import{n as f,o as g,r as v,s as E,t as W}from"./types-DE3U0cmQ.js";import{existsSync as $,mkdtempSync as y,rmSync as b,statSync as T}from"node:fs";import{join as x}from"node:path";const w="windows-acl-run",h=127;var k=class extends Error{static{m(this,"RunnerFailure")}};function r(e){throw process.stderr.write(`${w}: ${e}
2
2
  `),new k(e)}m(r,"fail");function R(e){let t,s,o,a,p,i=0;for(;i<e.length;i++){const l=e[i];if(l==="--"){i++;break}i++;const c=e[i];switch(c===void 0&&r(`missing value after ${l}`),l){case"--workspace":t=c;break;case"--temp":s=c;break;case"--mode":o=c;break;case"--write-sid":a=c;break;case"--temp-write-sid":p=c;break;default:r(`unknown argument: ${l}`)}}t===void 0&&r("missing --workspace"),s===void 0&&r("missing --temp"),o!=="read-only"&&o!=="workspace-write"&&r(`unknown mode: ${String(o)}`);const d=e.slice(i),n=d[0];return n===void 0&&r("missing command after --"),{workspace:t,temp:s,mode:o,writeSid:a,tempWriteSid:p,command:n,args:d.slice(1)}}m(R,"parseArgs");function u(e,t){(!$(t)||!T(t).isDirectory())&&r(`${e} is not an existing directory: ${t}`)}m(u,"requireDirectory");async function C(){const e=R(process.argv.slice(2));u("--workspace",e.workspace),u("--temp",e.temp);const t=e.writeSid!==void 0||e.tempWriteSid!==void 0;e.mode==="read-only"&&t&&r("read-only does not accept --write-sid or --temp-write-sid"),e.mode==="workspace-write"&&e.writeSid===void 0!=(e.tempWriteSid===void 0)&&r("workspace-write requires --write-sid and --temp-write-sid together"),e.mode==="workspace-write"&&g(e.workspace,e.temp);const s=await E();s.setConsoleCtrlHandler(null,1)===0&&r(`SetConsoleCtrlHandler failed (Win32 ${s.getLastError()})`);let o,a,p=!1;try{let i=null,d,n;return e.mode==="workspace-write"&&(d=v(e.workspace),t?(e.writeSid!==d&&r("--write-sid does not match --workspace"),i=e.temp,n=f(i),e.tempWriteSid!==n&&r("--temp-write-sid does not match --temp")):(o=y(x(e.temp,"dsh-")),i=o,n=f(i))),a=new W({writableDirs:e.mode==="workspace-write"?[e.workspace]:[],tempDir:i,mode:e.mode,...d===void 0?{}:{writeSid:d},...n===void 0?{}:{tempWriteSid:n},manageDacls:!t}),await a.init(),p=!0,i!==null&&(s.setEnvironmentVariableW("TMP",i)===0&&r(`SetEnvironmentVariableW TMP failed (Win32 ${s.getLastError()})`),s.setEnvironmentVariableW("TEMP",i)===0&&r(`SetEnvironmentVariableW TEMP failed (Win32 ${s.getLastError()})`)),(await a.spawn({command:e.command,args:e.args,stdio:"inherit"}).wait()).exitCode}finally{if(p)try{a?.dispose()}catch(i){process.stderr.write(`${w}: cleanup: ${i instanceof Error?i.message:String(i)}
3
3
  `)}if(o!==void 0)try{b(o,{recursive:!0,force:!0})}catch(i){process.stderr.write(`${w}: cleanup: ${i instanceof Error?i.message:String(i)}
4
4
  `)}}}m(C,"main"),C().then(e=>{process.exitCode=e},e=>{e instanceof k||process.stderr.write(`${w}: ${e instanceof Error?e.message:String(e)}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-sandbox-windows-acl","version":"0.1.0","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./runner":{"types":"./lib/types/runner.d.ts","default":"./lib/runner.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.1.0","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"koffi":"^3.1.0"}}
1
+ {"name":"@deepseek-ai/dsh-sandbox-windows-acl","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./runner":{"types":"./lib/types/runner.d.ts","default":"./lib/runner.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.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"koffi":"^3.1.0"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-schedule","version":"0.1.0","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.1.0","@deepseek-ai/dsh-brand":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-llm":"^0.1.0","@deepseek-ai/dsh-session-persistence":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-tools":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-schedule","version":"0.1.0-rc.7","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.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-brand":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-session-persistence":"^0.1.0-rc.7","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-scope","version":"0.1.0","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.1.0","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-scope","version":"0.1.0-rc.7","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.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session","version":"0.1.0","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","./surface":{"types":"./lib/types/surface.d.ts","default":"./lib/types/surface.js"}},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-brand":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-llm":"^0.1.0","@deepseek-ai/dsh-typert-protocol":"^0.1.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-scope":"^0.1.0"}}
1
+ {"name":"@deepseek-ai/dsh-session","version":"0.1.0-rc.7","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","./surface":{"types":"./lib/types/surface.d.ts","default":"./lib/types/surface.js"}},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-brand":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-typert-protocol":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-scope":"^0.1.0-rc.7"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session-checkpoint-policy","version":"0.1.0","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.1.0","@deepseek-ai/dsh-agent":"^0.1.0","@deepseek-ai/dsh-llm":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-tools":"^0.1.0","@deepseek-ai/dsh-session-persistence":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-session-checkpoint-policy","version":"0.1.0-rc.7","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.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-session-persistence":"^0.1.0-rc.7","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session":"^0.1.0-rc.7"}}
@@ -1 +1 @@
1
- var G=Object.defineProperty;var n=(l,d)=>G(l,"name",{value:d,configurable:!0});window.__ModuleLoader__.load({id:"@deepseek-ai/dsh-session-log-export",factory:n(l=>{var d={exports:{}},c=d.exports;Object.defineProperty(c,Symbol.toStringTag,{value:"Module"});let h=l("@deepseek-ai/dsh-client-runtime/client"),a=l("react/jsx-runtime"),u=l("@deepseek-ai/dsh-client-ui-primitives");const m={bySession:{}};function f(e){return`dsh-session-${String(e).replace(/[^A-Za-z0-9_-]/g,"_")}.zip`}n(f,"sessionLogZipFilename");function w(e,s){const o=document.createElement("a");o.href=e,o.download=s,o.click()}n(w,"downloadUrl");function S(){const e=globalThis.location?.origin;return e!==void 0&&e!=="null"?e:"http://dsh.internal"}n(S,"hostBase");function b(e){return e instanceof Error?e.message:String(e)}n(b,"messageOf");var v=class{static{n(this,"SessionLogDownloadController")}fetcher;save;store=(0,h.createSnapshotStore)(m);active=new Map;disposed=!1;constructor(e=(o,t)=>fetch(o,t),s=w){this.fetcher=e,this.save=s}download(e){const s=this.active.get(e);if(s!==void 0)return s.done;if(this.disposed)return Promise.resolve();const o=new AbortController,t=this.run(e,o.signal).finally(()=>{this.active.delete(e)});return this.active.set(e,{abort:o,done:t}),t}dismiss(e){const s=this.store.getSnapshot().bySession[String(e)];s===void 0||!s.open||this.publish(e,{...s,open:!1})}async dispose(){this.disposed=!0;const e=[...this.active.values()];for(const s of e)s.abort.abort();await Promise.allSettled(e.map(s=>s.done))}async run(e,s){this.publish(e,{open:!0,status:"downloading",error:null});try{const o=new URL("/api/session.export",S());o.searchParams.set("sessionId",e),o.searchParams.set("includeDescendants","true");const t=await this.fetcher(o,{method:"HEAD",signal:s});if(!t.ok){const r=await t.text().catch(()=>"");throw new Error(`Export failed: HTTP ${t.status}${r===""?"":` ${r}`}`)}this.save(o.toString(),f(e));const i=this.store.getSnapshot().bySession[String(e)]?.open??!0;this.publish(e,{open:i,status:"success",error:null})}catch(o){if(s.aborted)return;const t=this.store.getSnapshot().bySession[String(e)]?.open??!0;this.publish(e,{open:t,status:"error",error:b(o)})}}publish(e,s){this.store.update(o=>{o.bySession={...o.bySession,[String(e)]:s}})}};function y({sessionId:e,useSessionLogDownload:s,dismiss:o,t}){const i=s(E=>E.bySession[String(e)]),r=i?.status,T=i?.open===!0,B=r==="error"?i?.error||t("dialog.commandFailed"):null,C=t(r==="downloading"?"dialog.preparingTitle":r==="success"?"dialog.successTitle":"dialog.errorTitle"),A=r==="downloading"?t("dialog.preparingDescription"):r==="success"?t("dialog.successDescription"):B??t("dialog.commandFailed");return(0,a.jsx)(u.Modal,{open:T,onClose:n(()=>{o(e)},"onClose"),title:C,description:A,closeLabel:t("dialog.close"),footer:(0,a.jsx)(u.Button,{variant:"primary",onClick:n(()=>{o(e)},"onClick"),children:t("dialog.close")})})}n(y,"SessionLogDownloadDialog");const x=".V9GP8W_sessionLogButton{border:1px solid var(--dsw-alias-border-l2);min-width:111px;height:32px;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family);cursor:pointer;background:0 0;border-radius:18px;justify-content:center;align-items:center;gap:4px;padding:6px 12px;font-size:13px;font-weight:400;line-height:20px;display:inline-flex}.V9GP8W_sessionLogButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.V9GP8W_sessionLogButton:disabled{color:var(--dsw-alias-label-dimmed);cursor:wait}.V9GP8W_sessionLogButton span,.V9GP8W_sessionLogButton svg{flex:none}.V9GP8W_sessionLogButton span{white-space:nowrap}",p="@deepseek-ai/dsh-session-log-export/HeaderAction.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(p)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-session-log-export",e.dataset.pluginCss=p,e.textContent=x,document.head.appendChild(e)}var _={sessionLogButton:"V9GP8W_sessionLogButton"};function L(e){const{sessionId:s,useSessionLogDownload:o,request:t}=e,i=o(r=>r.bySession[String(s)])?.status==="downloading";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("button",{type:"button",className:_.sessionLogButton,disabled:i,"aria-busy":i,onClick:n(()=>{t(s)},"onClick"),children:[(0,a.jsx)("span",{children:"Session log"}),(0,a.jsx)(u.IconDownloadOutline16,{size:12})]}),(0,a.jsx)(y,{...e})]})}n(L,"SessionLogDownloadHeaderAction");const g="session-log-download",P={"dialog.preparingTitle":"正在导出 Session","dialog.preparingDescription":"正在准备包含当前 Session、子 Session 和附件的 ZIP 文件。","dialog.successTitle":"Session 导出已开始下载","dialog.successDescription":"浏览器正在下载 Session ZIP 文件。","dialog.errorTitle":"Session 导出失败","dialog.close":"关闭","dialog.commandFailed":"无法启动 Session 导出。"},D={"dialog.preparingTitle":"Exporting Session","dialog.preparingDescription":"Preparing a ZIP containing this Session, its sub-Sessions, and attachments.","dialog.successTitle":"Session download started","dialog.successDescription":"The browser is downloading the Session ZIP.","dialog.errorTitle":"Session export failed","dialog.close":"Close","dialog.commandFailed":"Could not start the Session export."},j=["slots","locale"];function k(e){const s=new v;e.provide("sessionLogDownload",s),e.effect(()=>async()=>{await s.dispose()},"session-log-download: browser download lifecycle"),e.effect(()=>e.locale.register(g,{zh:P,en:D}),"session-log-download: browser dictionaries"),e.on("command/executed",(o,t,i)=>{t==="export"&&i.kind==="success"&&s.download(o)}),e.slots.inject("conversation.session.header.utilities",()=>e.slots.register({name:"conversation.session.header.utilities",id:"session-log-download",locale:g,inject:n(()=>({hooks:{sessionLogDownload:s.store},request:n(o=>s.download(o),"request"),dismiss:n(o=>{s.dismiss(o)},"dismiss")}),"inject")},L))}return n(k,"apply"),c.apply=k,c.inject=j,d.exports},"factory")});
1
+ var U=Object.defineProperty;var n=(l,d)=>U(l,"name",{value:d,configurable:!0});window.__ModuleLoader__.load({id:"@deepseek-ai/dsh-session-log-export",factory:n(l=>{var d={exports:{}},c=d.exports;Object.defineProperty(c,Symbol.toStringTag,{value:"Module"});let h=l("@deepseek-ai/dsh-client-runtime/client"),r=l("react/jsx-runtime"),u=l("@deepseek-ai/dsh-client-ui-primitives");const w={bySession:{}};function m(e){return`dsh-session-${String(e).replace(/[^A-Za-z0-9_-]/g,"_")}.zip`}n(m,"sessionLogZipFilename");function f(e,s){const o=document.createElement("a");o.href=e,o.download=s,o.click()}n(f,"downloadUrl");function S(){const e=globalThis.location?.origin;return e!==void 0&&e!=="null"?e:"http://dsh.internal"}n(S,"hostBase");function b(e){return e instanceof Error?e.message:String(e)}n(b,"messageOf");var v=class{static{n(this,"SessionLogDownloadController")}fetcher;save;store=(0,h.createSnapshotStore)(w);active=new Map;disposed=!1;constructor(e=(o,t)=>fetch(o,t),s=f){this.fetcher=e,this.save=s}download(e){const s=this.active.get(e);if(s!==void 0)return s.done;if(this.disposed)return Promise.resolve();const o=new AbortController,t=this.run(e,o.signal).finally(()=>{this.active.delete(e)});return this.active.set(e,{abort:o,done:t}),t}dismiss(e){const s=this.store.getSnapshot().bySession[String(e)];s===void 0||!s.open||this.publish(e,{...s,open:!1})}async dispose(){this.disposed=!0;const e=[...this.active.values()];for(const s of e)s.abort.abort();await Promise.allSettled(e.map(s=>s.done))}async run(e,s){this.publish(e,{open:!0,status:"downloading",error:null});try{const o=new URL("/api/session.export",S());o.searchParams.set("sessionId",e),o.searchParams.set("includeDescendants","true");const t=await this.fetcher(o,{method:"HEAD",signal:s});if(!t.ok){const a=await t.text().catch(()=>"");throw new Error(`Export failed: HTTP ${t.status}${a===""?"":` ${a}`}`)}this.save(o.toString(),m(e));const i=this.store.getSnapshot().bySession[String(e)]?.open??!0;this.publish(e,{open:i,status:"success",error:null})}catch(o){if(s.aborted)return;const t=this.store.getSnapshot().bySession[String(e)]?.open??!0;this.publish(e,{open:t,status:"error",error:b(o)})}}publish(e,s){this.store.update(o=>{o.bySession={...o.bySession,[String(e)]:s}})}};function y({sessionId:e,useSessionLogDownload:s,dismiss:o,t}){const i=s(C=>C.bySession[String(e)]),a=i?.status,F=i?.open===!0,B=a==="error"?i?.error||t("dialog.commandFailed"):null,N=t(a==="downloading"?"dialog.preparingTitle":a==="success"?"dialog.successTitle":"dialog.errorTitle"),P=a==="downloading"?t("dialog.preparingDescription"):a==="success"?t("dialog.successDescription"):B??t("dialog.commandFailed");return(0,r.jsx)(u.Modal,{open:F,onClose:n(()=>{o(e)},"onClose"),title:N,description:P,closeLabel:t("dialog.close"),footer:(0,r.jsx)(u.Button,{variant:"primary",onClick:n(()=>{o(e)},"onClick"),children:t("dialog.close")})})}n(y,"SessionLogDownloadDialog");const x=".UFwDNa_sessionLogButton{border:1px solid var(--dsw-alias-border-l2);min-width:111px;height:32px;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family);cursor:pointer;background:0 0;border-radius:18px;justify-content:center;align-items:center;gap:4px;padding:6px 12px;font-size:13px;font-weight:400;line-height:20px;display:inline-flex}.UFwDNa_sessionLogButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.UFwDNa_sessionLogButton:disabled{color:var(--dsw-alias-label-dimmed);cursor:wait}.UFwDNa_sessionLogButton span,.UFwDNa_sessionLogButton svg{flex:none}.UFwDNa_sessionLogButton span{white-space:nowrap}",p="@deepseek-ai/dsh-session-log-export/HeaderAction.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(p)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-session-log-export",e.dataset.pluginCss=p,e.textContent=x,document.head.appendChild(e)}var _={sessionLogButton:"UFwDNa_sessionLogButton"};function D(e){const{sessionId:s,useSessionLogDownload:o,request:t}=e,i=o(a=>a.bySession[String(s)])?.status==="downloading";return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{type:"button",className:_.sessionLogButton,disabled:i,"aria-busy":i,onClick:n(()=>{t(s)},"onClick"),children:[(0,r.jsx)("span",{children:"Session log"}),(0,r.jsx)(u.IconDownloadOutline16,{size:12})]}),(0,r.jsx)(y,{...e})]})}n(D,"SessionLogDownloadHeaderAction");const g="session-log-download",L={"dialog.preparingTitle":"正在导出 Session","dialog.preparingDescription":"正在准备包含当前 Session、子 Session 和附件的 ZIP 文件。","dialog.successTitle":"Session 导出已开始下载","dialog.successDescription":"浏览器正在下载 Session ZIP 文件。","dialog.errorTitle":"Session 导出失败","dialog.close":"关闭","dialog.commandFailed":"无法启动 Session 导出。"},j={"dialog.preparingTitle":"Exporting Session","dialog.preparingDescription":"Preparing a ZIP containing this Session, its sub-Sessions, and attachments.","dialog.successTitle":"Session download started","dialog.successDescription":"The browser is downloading the Session ZIP.","dialog.errorTitle":"Session export failed","dialog.close":"Close","dialog.commandFailed":"Could not start the Session export."},k=["slots","locale"];function T(e){const s=new v;e.provide("sessionLogDownload",s),e.effect(()=>async()=>{await s.dispose()},"session-log-download: browser download lifecycle"),e.effect(()=>e.locale.register(g,{zh:L,en:j}),"session-log-download: browser dictionaries"),e.on("command/executed",(o,t,i)=>{t==="export"&&i.kind==="success"&&s.download(o)}),e.slots.inject("conversation.session.header.utilities",()=>e.slots.register({name:"conversation.session.header.utilities",id:"session-log-download",locale:g,inject:n(()=>({hooks:{sessionLogDownload:s.store},request:n(o=>s.download(o),"request"),dismiss:n(o=>{s.dismiss(o)},"dismiss")}),"inject")},D))}return n(T,"apply"),c.apply=T,c.inject=k,d.exports},"factory")});
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session-log-export","version":"0.1.0","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"},"license":"MIT","peerDependencies":{"react":"^18.2.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-client-locale":"^0.1.0","@deepseek-ai/dsh-client-ui-commands":"^0.1.0","@deepseek-ai/dsh-client-ui-conversation":"^0.1.0","@deepseek-ai/dsh-client-ui-slots":"^0.1.0","@deepseek-ai/dsh-client-runtime":"^0.1.0","@deepseek-ai/dsh-client-ui-primitives":"^0.1.0","@deepseek-ai/dsh-commands":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0"},"dsh":{"client":{"inject":["@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-commands","@deepseek-ai/dsh-client-ui-conversation"],"platform":"web"}}}
1
+ {"name":"@deepseek-ai/dsh-session-log-export","version":"0.1.0-rc.7","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"},"license":"MIT","peerDependencies":{"react":"^18.2.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-client-runtime":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-commands":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-conversation":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-slots":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-primitives":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-commands":"^0.1.0-rc.7","@deepseek-ai/dsh-client-locale":"^0.1.0-rc.7"},"dsh":{"client":{"inject":["@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-commands","@deepseek-ai/dsh-client-ui-conversation"],"platform":"web"}}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session-persistence","version":"0.1.0","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.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-timeout":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-session-persistence","version":"0.1.0-rc.7","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.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-timeout":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session-persistence-jsonl","version":"0.1.0","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.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-session-persistence":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"koffi":"^3.1.0","@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-session-persistence-jsonl","version":"0.1.0-rc.7","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.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session-persistence":"^0.1.0-rc.7"},"dependencies":{"koffi":"^3.1.0","@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session-projection","version":"0.1.0","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","dependencies":{"zod":"^4.4.3"},"peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-session-projection","version":"0.1.0-rc.7","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","dependencies":{"zod":"^4.4.3"},"peerDependencies":{"@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session-projection-cache","version":"0.1.0","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":{"zod":"^4.4.3","@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-session-persistence":"^0.1.0","@deepseek-ai/dsh-storage-domain":"^0.1.0","@deepseek-ai/dsh-session-projection":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-session-projection-cache","version":"0.1.0-rc.7","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":{"zod":"^4.4.3","@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-session-projection":"^0.1.0-rc.7","@deepseek-ai/dsh-session-persistence":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-storage-domain":"^0.1.0-rc.7"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session-query","version":"0.1.0","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.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-llm":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-session-title":"^0.1.0","@deepseek-ai/dsh-session-persistence":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"peerDependenciesMeta":{"@deepseek-ai/dsh-session-persistence":{"optional":true}}}
1
+ {"name":"@deepseek-ai/dsh-session-query","version":"0.1.0-rc.7","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-session":"^0.1.0-rc.7","@deepseek-ai/dsh-brand":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-session-title":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session-persistence":"^0.1.0-rc.7"},"peerDependenciesMeta":{"@deepseek-ai/dsh-session-persistence":{"optional":true}}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session-query-sqlite","version":"0.1.0","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.1.0","@deepseek-ai/dsh-session-query":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-session-persistence":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"peerDependenciesMeta":{"@deepseek-ai/dsh-session-persistence":{"optional":true}},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-session-query-sqlite","version":"0.1.0-rc.7","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.1.0-rc.7","@deepseek-ai/dsh-session-persistence":"^0.1.0-rc.7","@deepseek-ai/dsh-session-query":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session":"^0.1.0-rc.7"},"peerDependenciesMeta":{"@deepseek-ai/dsh-session-persistence":{"optional":true}},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session-reference","version":"0.1.0","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-agent":"^0.1.0","@deepseek-ai/dsh-compaction":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-llm":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-session-query":"^0.1.0","@deepseek-ai/dsh-output-retention":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-session-reference","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-compaction":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-session-query":"^0.1.0-rc.7","@deepseek-ai/dsh-output-retention":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session":"^0.1.0-rc.7"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session-stats","version":"0.1.0","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"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-llm":"^0.1.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session-projection":"^0.1.0"},"dependencies":{"zod":"^4.4.3"}}
1
+ {"name":"@deepseek-ai/dsh-session-stats","version":"0.1.0-rc.7","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"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-session-projection":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session":"^0.1.0-rc.7"},"dependencies":{"zod":"^4.4.3"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session-telemetry","version":"0.1.0","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.1.0","@deepseek-ai/dsh-agent":"^0.1.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session":"^0.1.0"}}
1
+ {"name":"@deepseek-ai/dsh-session-telemetry","version":"0.1.0-rc.7","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.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session-telemetry-otel","version":"0.1.0","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":{"@opentelemetry/api":"^1.9.1","@opentelemetry/api-logs":"^0.220.0","@opentelemetry/exporter-logs-otlp-http":"^0.220.0","@opentelemetry/otlp-exporter-base":"^0.220.0","@opentelemetry/resources":"^2.9.0","@opentelemetry/sdk-logs":"^0.220.0","@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-command-feedback":"^0.1.0","@deepseek-ai/dsh-llm":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-session-telemetry":"^0.1.0","@deepseek-ai/dsh-anonymous-user-id":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-session-telemetry-otel","version":"0.1.0-rc.7","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":{"@opentelemetry/api":"^1.9.1","@opentelemetry/api-logs":"^0.220.0","@opentelemetry/exporter-logs-otlp-http":"^0.220.0","@opentelemetry/otlp-exporter-base":"^0.220.0","@opentelemetry/resources":"^2.9.0","@opentelemetry/sdk-logs":"^0.220.0","@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-anonymous-user-id":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-command-feedback":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session-telemetry":"^0.1.0-rc.7"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session-title","version":"0.1.0","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"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-brand":"^0.1.0","@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session-projection":"^0.1.0","@deepseek-ai/dsh-llm":"^0.1.0"},"dependencies":{"zod":"^4.4.3","@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-session-title","version":"0.1.0-rc.7","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"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-brand":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-session-projection":"^0.1.0-rc.7"},"dependencies":{"zod":"^4.4.3","@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session-title-first-prompt-llm","version":"0.1.0","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0","@deepseek-ai/dsh-llm":"^0.1.0","@deepseek-ai/dsh-session":"^0.1.0","@deepseek-ai/dsh-session-title":"^0.1.0","@deepseek-ai/dsh-session-title-llm":"^0.1.0","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-session-title-first-prompt-llm","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-session-title-llm":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session-title":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}