@qqbrowser/qbot-dsh 0.0.9 → 0.0.10

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 (262) hide show
  1. package/node_modules/@deepseek-ai/cordis/package.json +1 -1
  2. package/node_modules/@deepseek-ai/cordis-plugin-hmr/package.json +1 -1
  3. package/node_modules/@deepseek-ai/dsh-agent/package.json +1 -1
  4. package/node_modules/@deepseek-ai/dsh-agent-default-model/package.json +1 -1
  5. package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +1 -1
  6. package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +1 -1
  7. package/node_modules/@deepseek-ai/dsh-agent-presets/package.json +1 -1
  8. package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/package.json +1 -1
  9. package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +1 -1
  10. package/node_modules/@deepseek-ai/dsh-api-gateway/package.json +1 -1
  11. package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +1 -1
  12. package/node_modules/@deepseek-ai/dsh-app-boot/package.json +1 -1
  13. package/node_modules/@deepseek-ai/dsh-atomic-write/package.json +1 -1
  14. package/node_modules/@deepseek-ai/dsh-attachment/package.json +1 -1
  15. package/node_modules/@deepseek-ai/dsh-attachment-local/package.json +1 -1
  16. package/node_modules/@deepseek-ai/dsh-base/cordis.patch.yml +8 -7
  17. package/node_modules/@deepseek-ai/dsh-base/package.json +1 -1
  18. package/node_modules/@deepseek-ai/dsh-bash-local/package.json +1 -1
  19. package/node_modules/@deepseek-ai/dsh-bash-sandbox/package.json +1 -1
  20. package/node_modules/@deepseek-ai/dsh-brand/package.json +1 -1
  21. package/node_modules/@deepseek-ai/dsh-client-connection/package.json +1 -1
  22. package/node_modules/@deepseek-ai/dsh-client-hmr/package.json +1 -1
  23. package/node_modules/@deepseek-ai/dsh-client-locale/lib/client.js +1 -1
  24. package/node_modules/@deepseek-ai/dsh-client-locale/package.json +1 -1
  25. package/node_modules/@deepseek-ai/dsh-client-modules/package.json +1 -1
  26. package/node_modules/@deepseek-ai/dsh-client-runtime/package.json +1 -1
  27. package/node_modules/@deepseek-ai/dsh-client-schema-form/package.json +1 -1
  28. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +1 -1
  29. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/package.json +1 -1
  30. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +1 -1
  31. package/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +1 -1
  32. package/node_modules/@deepseek-ai/dsh-client-ui-commands/package.json +1 -1
  33. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +7 -7
  34. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +1 -1
  35. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/lib/client.js +1 -1
  36. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/package.json +1 -1
  37. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +1 -1
  38. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +1 -1
  39. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/lib/client.js +1 -1
  40. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/package.json +1 -1
  41. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-native/package.json +1 -1
  42. package/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +1 -1
  43. package/node_modules/@deepseek-ai/dsh-client-ui-goal/package.json +1 -1
  44. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/lib/client.js +1 -1
  45. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/package.json +1 -1
  46. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +1 -1
  47. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/package.json +1 -1
  48. package/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js +1 -1
  49. package/node_modules/@deepseek-ai/dsh-client-ui-layout/package.json +1 -1
  50. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/lib/client.js +1 -1
  51. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/package.json +1 -1
  52. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +1 -1
  53. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/package.json +1 -1
  54. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/lib/client.js +1 -1
  55. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/package.json +1 -1
  56. package/node_modules/@deepseek-ai/dsh-client-ui-plan/lib/client.js +1 -1
  57. package/node_modules/@deepseek-ai/dsh-client-ui-plan/package.json +1 -1
  58. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/package.json +1 -1
  59. package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +1 -1
  60. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +1 -1
  61. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +1 -1
  62. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +1 -1
  63. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +1 -1
  64. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +1 -1
  65. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +1 -1
  66. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/client.js +1 -1
  67. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +1 -1
  68. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
  69. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/package.json +1 -1
  70. package/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +1 -1
  71. package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +1 -1
  72. package/node_modules/@deepseek-ai/dsh-client-ui-slots/package.json +1 -1
  73. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +1 -1
  74. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +1 -1
  75. package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +1 -1
  76. package/node_modules/@deepseek-ai/dsh-client-ui-theme/package.json +1 -1
  77. package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +1 -1
  78. package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +1 -1
  79. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +2 -2
  80. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/package.json +1 -1
  81. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +1 -1
  82. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/package.json +1 -1
  83. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +1 -1
  84. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/package.json +1 -1
  85. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +1 -1
  86. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +1 -1
  87. package/node_modules/@deepseek-ai/dsh-client-web/package.json +1 -1
  88. package/node_modules/@deepseek-ai/dsh-client-web-react/package.json +1 -1
  89. package/node_modules/@deepseek-ai/dsh-cmdline/package.json +1 -1
  90. package/node_modules/@deepseek-ai/dsh-code-runtime/package.json +1 -1
  91. package/node_modules/@deepseek-ai/dsh-code-runtime-worker-thread/package.json +1 -1
  92. package/node_modules/@deepseek-ai/dsh-command-compact/package.json +1 -1
  93. package/node_modules/@deepseek-ai/dsh-command-feedback/package.json +1 -1
  94. package/node_modules/@deepseek-ai/dsh-command-goal/package.json +1 -1
  95. package/node_modules/@deepseek-ai/dsh-commands/package.json +1 -1
  96. package/node_modules/@deepseek-ai/dsh-compaction/package.json +1 -1
  97. package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +1 -1
  98. package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/package.json +1 -1
  99. package/node_modules/@deepseek-ai/dsh-content-review/package.json +1 -1
  100. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +1 -1
  101. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/package.json +1 -1
  102. package/node_modules/@deepseek-ai/dsh-credentials/package.json +1 -1
  103. package/node_modules/@deepseek-ai/dsh-credentials-local/package.json +1 -1
  104. package/node_modules/@deepseek-ai/dsh-fs/package.json +1 -1
  105. package/node_modules/@deepseek-ai/dsh-fs-local/package.json +1 -1
  106. package/node_modules/@deepseek-ai/dsh-fs-observation-policy/package.json +1 -1
  107. package/node_modules/@deepseek-ai/dsh-fs-sandbox/package.json +1 -1
  108. package/node_modules/@deepseek-ai/dsh-goal/package.json +1 -1
  109. package/node_modules/@deepseek-ai/dsh-goal-round-driver/package.json +1 -1
  110. package/node_modules/@deepseek-ai/dsh-headless/package.json +1 -1
  111. package/node_modules/@deepseek-ai/dsh-home-paths/package.json +1 -1
  112. package/node_modules/@deepseek-ai/dsh-home-quarantine-macos/lib/index.js +1 -0
  113. package/node_modules/@deepseek-ai/dsh-home-quarantine-macos/lib/invariant.js +1 -0
  114. package/node_modules/@deepseek-ai/dsh-home-quarantine-macos/package.json +1 -0
  115. package/node_modules/@deepseek-ai/dsh-host-apiproxy/package.json +1 -1
  116. package/node_modules/@deepseek-ai/dsh-host-directory-picker/package.json +1 -1
  117. package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/package.json +1 -1
  118. package/node_modules/@deepseek-ai/dsh-host-directory-picker-browse/package.json +1 -1
  119. package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/package.json +1 -1
  120. package/node_modules/@deepseek-ai/dsh-host-frontend-static/package.json +1 -1
  121. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/package.json +1 -1
  122. package/node_modules/@deepseek-ai/dsh-host-webserver/package.json +1 -1
  123. package/node_modules/@deepseek-ai/dsh-invariants/package.json +1 -1
  124. package/node_modules/@deepseek-ai/dsh-jobs/package.json +1 -1
  125. package/node_modules/@deepseek-ai/dsh-jobs-local/package.json +1 -1
  126. package/node_modules/@deepseek-ai/dsh-launch-environment/package.json +1 -1
  127. package/node_modules/@deepseek-ai/dsh-llm/package.json +1 -1
  128. package/node_modules/@deepseek-ai/dsh-llm-deepseek/package.json +1 -1
  129. package/node_modules/@deepseek-ai/dsh-llm-gateway-openai/lib/index.js +1 -1
  130. package/node_modules/@deepseek-ai/dsh-llm-gateway-openai/package.json +1 -1
  131. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +1 -1
  132. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +1 -1
  133. package/node_modules/@deepseek-ai/dsh-llm-retry/package.json +1 -1
  134. package/node_modules/@deepseek-ai/dsh-mcp-client/package.json +1 -1
  135. package/node_modules/@deepseek-ai/dsh-message-feedback/package.json +1 -1
  136. package/node_modules/@deepseek-ai/dsh-native-command/package.json +1 -1
  137. package/node_modules/@deepseek-ai/dsh-output-retention/package.json +1 -1
  138. package/node_modules/@deepseek-ai/dsh-permission-presets/package.json +1 -1
  139. package/node_modules/@deepseek-ai/dsh-persona/package.json +1 -1
  140. package/node_modules/@deepseek-ai/dsh-plan-mode/package.json +1 -1
  141. package/node_modules/@deepseek-ai/dsh-pwsh-local/package.json +1 -1
  142. package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +1 -1
  143. package/node_modules/@deepseek-ai/dsh-qb-auth/lib/index.js +1 -1
  144. package/node_modules/@deepseek-ai/dsh-qb-auth/package.json +1 -1
  145. package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/package.json +1 -1
  146. package/node_modules/@deepseek-ai/dsh-sandbox/package.json +1 -1
  147. package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +1 -1
  148. package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +1 -1
  149. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/package.json +1 -1
  150. package/node_modules/@deepseek-ai/dsh-schedule/package.json +1 -1
  151. package/node_modules/@deepseek-ai/dsh-scope/package.json +1 -1
  152. package/node_modules/@deepseek-ai/dsh-session/package.json +1 -1
  153. package/node_modules/@deepseek-ai/dsh-session-checkpoint-policy/package.json +1 -1
  154. package/node_modules/@deepseek-ai/dsh-session-log-export/package.json +1 -1
  155. package/node_modules/@deepseek-ai/dsh-session-persistence/package.json +1 -1
  156. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/package.json +1 -1
  157. package/node_modules/@deepseek-ai/dsh-session-projection/package.json +1 -1
  158. package/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +1 -1
  159. package/node_modules/@deepseek-ai/dsh-session-query/package.json +1 -1
  160. package/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +1 -1
  161. package/node_modules/@deepseek-ai/dsh-session-reference/package.json +1 -1
  162. package/node_modules/@deepseek-ai/dsh-session-stats/package.json +1 -1
  163. package/node_modules/@deepseek-ai/dsh-session-telemetry/package.json +1 -1
  164. package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/package.json +1 -1
  165. package/node_modules/@deepseek-ai/dsh-session-title/package.json +1 -1
  166. package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/package.json +1 -1
  167. package/node_modules/@deepseek-ai/dsh-session-title-llm/package.json +1 -1
  168. package/node_modules/@deepseek-ai/dsh-settings/package.json +1 -1
  169. package/node_modules/@deepseek-ai/dsh-settings-file/package.json +1 -1
  170. package/node_modules/@deepseek-ai/dsh-shell/package.json +1 -1
  171. package/node_modules/@deepseek-ai/dsh-shell-env/package.json +1 -1
  172. package/node_modules/@deepseek-ai/dsh-skill/package.json +1 -1
  173. package/node_modules/@deepseek-ai/dsh-skill-badge/package.json +1 -1
  174. package/node_modules/@deepseek-ai/dsh-skill-filesystem/package.json +1 -1
  175. package/node_modules/@deepseek-ai/dsh-spill/package.json +1 -1
  176. package/node_modules/@deepseek-ai/dsh-spill-local/package.json +1 -1
  177. package/node_modules/@deepseek-ai/dsh-spill-policy/package.json +1 -1
  178. package/node_modules/@deepseek-ai/dsh-storage/package.json +1 -1
  179. package/node_modules/@deepseek-ai/dsh-storage-domain/package.json +1 -1
  180. package/node_modules/@deepseek-ai/dsh-storage-json/package.json +1 -1
  181. package/node_modules/@deepseek-ai/dsh-subagent/package.json +1 -1
  182. package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/package.json +1 -1
  183. package/node_modules/@deepseek-ai/dsh-subagent-in-process-driver/package.json +1 -1
  184. package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/package.json +1 -1
  185. package/node_modules/@deepseek-ai/dsh-subprocess/package.json +1 -1
  186. package/node_modules/@deepseek-ai/dsh-subprocess-local/package.json +1 -1
  187. package/node_modules/@deepseek-ai/dsh-system-prompt/package.json +1 -1
  188. package/node_modules/@deepseek-ai/dsh-terminal/package.json +1 -1
  189. package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +1 -1
  190. package/node_modules/@deepseek-ai/dsh-time-context/package.json +1 -1
  191. package/node_modules/@deepseek-ai/dsh-timeout/package.json +1 -1
  192. package/node_modules/@deepseek-ai/dsh-tmux-context/package.json +1 -1
  193. package/node_modules/@deepseek-ai/dsh-token-meter/package.json +1 -1
  194. package/node_modules/@deepseek-ai/dsh-tool-ask-user/package.json +1 -1
  195. package/node_modules/@deepseek-ai/dsh-tool-bash/package.json +1 -1
  196. package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/package.json +1 -1
  197. package/node_modules/@deepseek-ai/dsh-tool-call-timeout-policy/package.json +1 -1
  198. package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +1 -1
  199. package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +1 -1
  200. package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +1 -1
  201. package/node_modules/@deepseek-ai/dsh-tool-goal/package.json +1 -1
  202. package/node_modules/@deepseek-ai/dsh-tool-jobs/package.json +1 -1
  203. package/node_modules/@deepseek-ai/dsh-tool-pwsh/package.json +1 -1
  204. package/node_modules/@deepseek-ai/dsh-tool-ralph/package.json +1 -1
  205. package/node_modules/@deepseek-ai/dsh-tool-skill/package.json +1 -1
  206. package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/package.json +1 -1
  207. package/node_modules/@deepseek-ai/dsh-tool-subagent/package.json +1 -1
  208. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/package.json +1 -1
  209. package/node_modules/@deepseek-ai/dsh-tool-subagent-report/package.json +1 -1
  210. package/node_modules/@deepseek-ai/dsh-tool-todo/package.json +1 -1
  211. package/node_modules/@deepseek-ai/dsh-tool-web/package.json +1 -1
  212. package/node_modules/@deepseek-ai/dsh-tool-workflow/package.json +1 -1
  213. package/node_modules/@deepseek-ai/dsh-tools/package.json +1 -1
  214. package/node_modules/@deepseek-ai/dsh-typert-loader/package.json +1 -1
  215. package/node_modules/@deepseek-ai/dsh-typert-protocol/package.json +1 -1
  216. package/node_modules/@deepseek-ai/dsh-typert-registry/package.json +1 -1
  217. package/node_modules/@deepseek-ai/dsh-user-approval/package.json +1 -1
  218. package/node_modules/@deepseek-ai/dsh-user-questions/package.json +1 -1
  219. package/node_modules/@deepseek-ai/dsh-web/package.json +1 -1
  220. package/node_modules/@deepseek-ai/dsh-web-app/package.json +1 -1
  221. package/node_modules/@deepseek-ai/dsh-web-frontend/package.json +1 -1
  222. package/node_modules/@deepseek-ai/dsh-web-search-dsh/LICENSE +21 -0
  223. package/node_modules/@deepseek-ai/dsh-web-search-dsh/lib/index.js +1 -0
  224. package/node_modules/@deepseek-ai/dsh-web-search-dsh/lib/invariant.js +1 -0
  225. package/node_modules/@deepseek-ai/dsh-web-search-dsh/package.json +1 -0
  226. package/node_modules/@deepseek-ai/dsh-workflow/package.json +1 -1
  227. package/node_modules/@deepseek-ai/dsh-workflow-worker-thread/package.json +1 -1
  228. package/node_modules/@deepseek-ai/dsh-workspace/package.json +1 -1
  229. package/node_modules/@deepseek-ai/node-addon-landlock-run/package.json +1 -1
  230. package/node_modules/@napi-rs/xattr/LICENSE +21 -0
  231. package/node_modules/@napi-rs/xattr/index.js +567 -0
  232. package/node_modules/@napi-rs/xattr/package.json +1 -0
  233. package/node_modules/@napi-rs/xattr-darwin-arm64/package.json +1 -0
  234. package/node_modules/@napi-rs/xattr-darwin-arm64/xattr.darwin-arm64.node +0 -0
  235. package/node_modules/@napi-rs/xattr-darwin-x64/package.json +1 -0
  236. package/node_modules/@napi-rs/xattr-darwin-x64/xattr.darwin-x64.node +0 -0
  237. package/node_modules/@parcel/watcher/LICENSE +21 -0
  238. package/node_modules/@parcel/watcher/index.js +44 -0
  239. package/node_modules/@parcel/watcher/index.js.flow +45 -0
  240. package/node_modules/@parcel/watcher/package.json +1 -0
  241. package/node_modules/@parcel/watcher/scripts/build-from-source.js +16 -0
  242. package/node_modules/@parcel/watcher/wrapper.js +88 -0
  243. package/node_modules/@parcel/watcher-darwin-arm64/LICENSE +21 -0
  244. package/node_modules/@parcel/watcher-darwin-arm64/package.json +1 -0
  245. package/node_modules/@parcel/watcher-darwin-arm64/watcher.node +0 -0
  246. package/node_modules/@parcel/watcher-darwin-x64/LICENSE +21 -0
  247. package/node_modules/@parcel/watcher-darwin-x64/package.json +1 -0
  248. package/node_modules/@parcel/watcher-darwin-x64/watcher.node +0 -0
  249. package/node_modules/@parcel/watcher-win32-x64/LICENSE +21 -0
  250. package/node_modules/@parcel/watcher-win32-x64/package.json +1 -0
  251. package/node_modules/@parcel/watcher-win32-x64/watcher.node +0 -0
  252. package/node_modules/is-extglob/LICENSE +21 -0
  253. package/node_modules/is-extglob/index.js +20 -0
  254. package/node_modules/is-extglob/package.json +1 -0
  255. package/node_modules/is-glob/LICENSE +21 -0
  256. package/node_modules/is-glob/index.js +150 -0
  257. package/node_modules/is-glob/package.json +1 -0
  258. package/package.json +1 -1
  259. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/lib/index.js +0 -1
  260. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/lib/invariant.js +0 -1
  261. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +0 -1
  262. /package/node_modules/@deepseek-ai/{dsh-web-search-deepseek → dsh-home-quarantine-macos}/LICENSE +0 -0
@@ -1 +1 @@
1
- var le=Object.defineProperty;var s=(e,t)=>le(e,"name",{value:t,configurable:!0});import{launchEnvironmentOf as ce}from"@deepseek-ai/dsh-launch-environment";import{CONTEXT_WINDOW_EXCEEDED_CODE as ue,CallId as x,EMPTY_RESPONSE_CODE as pe,INVALID_CREDENTIAL_CODE as fe,LlmAdapter as me,LlmError as h,QUOTA_EXCEEDED_CODE as he,ReasoningEffortId as U,RetryPolicySchema as ge,assertUsableApiKey as ye,attributionHeaders as $,contentHasImage as I,isContextWindowExceededError as ve,isQuotaExceededError as be,normalizeApiKey as we,resolveRetryPolicy as ke}from"@deepseek-ai/dsh-llm";import{deepEqualJson as D,installSettingsSection as Ee,settingsNamespace as xe}from"@deepseek-ai/dsh-settings";import{createModels as Te,createProvider as Re,getSupportedThinkingLevels as O,isContextOverflow as Ie}from"@earendil-works/pi-ai";import{MAX_TIMER_DELAY_MS as S,idleWatchdog as Oe,timeoutOf as j}from"@deepseek-ai/dsh-timeout";import{builtinProviders as Se,getBuiltinModels as Me,getBuiltinProviders as Ae}from"@earendil-works/pi-ai/providers/all";import l from"@deepseek-ai/schemastery";import{credentialRef as _e}from"@deepseek-ai/dsh-credentials";import{anthropicMessagesApi as Ne}from"@earendil-works/pi-ai/api/anthropic-messages.lazy";import{openAICompletionsApi as Pe}from"@earendil-works/pi-ai/api/openai-completions.lazy";import{openAIResponsesApi as Ce}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 Le(e){return{kind:"pi-ai",version:1,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(Le,"toPiReplayState");function b(e){throw new h(`invalid pi-ai replay state: ${e}`,"INVALID_REPLAY_STATE")}s(b,"invalidReplay");function Ue(e){if(typeof e!="object"||e===null||Array.isArray(e))return b("expected an object");const t=e;if(t.kind!=="pi-ai")return b("unknown state kind");if(t.version!==1)return b(`unsupported version ${String(t.version)}`);for(const r of["api","provider","model"])if(typeof t[r]!="string"||t[r].length===0)return b(`${r} must be a non-empty string`);if(!["stop","length","toolUse","error","aborted"].includes(String(t.stopReason)))return b("unknown stopReason");if(t.responseModel!==void 0&&typeof t.responseModel!="string")return b("responseModel must be a string");if(t.responseId!==void 0&&typeof t.responseId!="string")return b("responseId must be a string");if(!Array.isArray(t.blocks))return b("blocks must be an array");for(const[r,o]of t.blocks.entries()){if(typeof o!="object"||o===null||Array.isArray(o))return b(`block ${r} must be an object`);const n=o;if(!["text","reasoning","tool-call"].includes(String(n.type)))return b(`block ${r} has an unknown type`);for(const a of["textSignature","thinkingSignature","thoughtSignature"])if(n[a]!==void 0&&typeof n[a]!="string")return b(`block ${r} ${a} must be a string`);if(n.redacted!==void 0&&typeof n.redacted!="boolean")return b(`block ${r} redacted must be boolean`)}return t}s(Ue,"readReplayState");function $e(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");default:break}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($e,"foreignAssistant");function De(e,t,r){const o=Ue(r);return o.provider!==t.provider?b("provider does not match assistant source"):o.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,a)=>{const i=o.blocks[a];if(i===void 0||i.type!==n.type)return b(`block ${a} does not match assistant content`);switch(n.type){case"text":return{type:"text",text:n.text,...i.type==="text"&&i.textSignature!==void 0?{textSignature:i.textSignature}:{}};case"reasoning":return{type:"thinking",thinking:n.text,...i.type==="reasoning"&&i.thinkingSignature!==void 0?{thinkingSignature:i.thinkingSignature}:{},...i.type==="reasoning"&&i.redacted!==void 0?{redacted:i.redacted}:{}};case"tool-call":return{type:"toolCall",id:n.id,name:n.name,arguments:F(n.arguments),...i.type==="tool-call"&&i.thoughtSignature!==void 0?{thoughtSignature:i.thoughtSignature}:{}};default:return b(`block ${a} has an unsupported Harness type`)}}),api:o.api,provider:o.provider,model:o.model,...o.responseModel===void 0?{}:{responseModel:o.responseModel},...o.responseId===void 0?{}:{responseId:o.responseId},usage:W(),stopReason:o.stopReason,timestamp:0}}s(De,"replayedAssistant");function K(e){const t=e.source;return t.kind!=="model"||t.replayState===void 0?$e(e):De(e,t,t.replayState)}s(K,"toPiAssistant");function M(e){return e.content.filter(t=>t.type==="text").map(t=>t.text).join("")}s(M,"flattenText");function B(e){return e.map(t=>t.type==="text"?t.text:t.type==="tool-result"?B(t.content):"").join("")}s(B,"toolResultText");async function A(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 A(o.content,t);typeof n=="string"?n.length>0&&r.push({type:"text",text:n}):r.push(...n)}break;default:break}return r.every(o=>o.type==="text")?r.map(o=>o.text).join(""):r}s(A,"userContent");function je(e){return e.tools?.map(t=>({name:t.name,description:t.description,parameters:t.parameters}))}s(je,"toolsOf");function V(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(V,"piContext");function Fe(e){const t=new Map,r=[];for(const o of e.messages){if(I(o.content))throw new h("pi-ai image conversion requires the durable attachment service","UNSUPPORTED_CONTENT");if(o.role==="system"){r.push({role:"user",content:M(o),timestamp:0});continue}if(o.role==="assistant"){const i=K(o);for(const d of i.content)d.type==="toolCall"&&t.set(x(d.id),d.name);r.push(i);continue}const n=M(o),a=o.content.filter(i=>i.type==="tool-result");(n.length>0||a.length===0)&&r.push({role:"user",content:n,timestamp:0});for(const i of a)r.push({role:"toolResult",toolCallId:i.toolCallId,toolName:t.get(i.toolCallId)??"unknown",content:[{type:"text",text:B(i.content)||"(no output)"}],isError:i.isError??!1,timestamp:0})}return V(e,r)}s(Fe,"textOnlyContext");function Y(e,t){return t===void 0?Fe(e):We(e,t)}s(Y,"toPiContext");async function We(e,t){const r=new Map,o=[];for(const n of e.messages){if(n.role==="system"){if(I(n.content))throw new h("pi-ai cannot represent an image in an in-history system message","UNSUPPORTED_CONTENT");o.push({role:"user",content:M(n),timestamp:0});continue}if(n.role==="assistant"){const d=K(n);for(const f of d.content)f.type==="toolCall"&&r.set(x(f.id),f.name);o.push(d);continue}const a=await A(n.content.filter(d=>d.type!=="tool-result"),t),i=n.content.filter(d=>d.type==="tool-result");(a.length>0||i.length===0)&&o.push({role:"user",content:a,timestamp:0});for(const d of i){const f=await A(d.content,t);o.push({role:"toolResult",toolCallId:d.toolCallId,toolName:r.get(d.toolCallId)??"unknown",content:typeof f=="string"?[{type:"text",text:f||"(no output)"}]:f,isError:d.isError??!1,timestamp:0})}}return V(e,o)}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":be(e)?he:/\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 H(e,t){const r=Ie(e,t),o=e.stopReason==="error"&&e.errorMessage!==void 0&&ve(e.errorMessage);if(r||o)return{kind:"error",failure:{message:e.errorMessage??`pi-ai detected context overflow for model "${e.model}"`,code:ue}};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:pe}}:{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(H,"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],a=n?.type==="toolCall"?n.id:"",i=n?.type==="toolCall"?n.name:"";r.set(o.contentIndex,{id:a,name:i}),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:H(o.message,t),replayState:Le(o.message)};return;case"error":yield{type:"usage",usage:z(o.error.usage)},yield{type:"finish",reason:H(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(a){return Promise.reject(a)}},"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(i){t.error=t.hasError?new e(i,t.error,"An error was suppressed during disposal."):i,t.hasError=!0}s(r,"fail");var o,n=0;function a(){for(;o=t.stack.pop();)try{if(!o.async&&n===1)return n=0,t.stack.push(o),Promise.resolve().then(a);if(o.dispose){var i=o.dispose.call(o.value);if(o.async)return n|=2,Promise.resolve(i).then(a,function(d){return r(d),a()})}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(a,"next"),a()}})(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:U(r),name:`${r.charAt(0).toUpperCase()}${r.slice(1)}`})),...t===void 0?{}:{defaultEffort:U(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 X=class extends me{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 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),a=this.modelOf(o,e,t),i=He(a,n.reasoning),d=n.configuredMaxTokens.get(t);return{provider:e,id:t,name:a.name,inputModalities:[...a.input],context:{contextWindow:a.contextWindow},...d===void 0?{}:{defaultMaxTokens:d},...Ge(a,i)}})}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),a=Xe(n,e.reasoningEffort??o.reasoning),i=await this.config.resolveApiKey(e.provider,o),d=new AbortController,f=e.signal===void 0?d.signal:AbortSignal.any([e.signal,d.signal]),p=o.streamIdleTimeoutMs,y=Ve(t,Oe(f,p,"LLM_STREAM_IDLE_TIMEOUT"),!1);try{const w=e.messages.some(g=>I(g.content));if(w&&!n.input.includes("image"))throw new h(`pi-ai model "${n.id}" does not support image input`,"UNSUPPORTED_CONTENT");const c=w?this.config.resolveAttachments?.():void 0;if(w&&c===void 0)throw new h("pi-ai image input requires the durable attachment service","UNSUPPORTED_CONTENT");const m=c===void 0?Y(e):await Y(e,c),E=Be(r.models.streamSimple(n,m,{...ze(o,a,i),...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 u=!1;try{for(;;){const g=await y.next(E),k=j(y.signal,"LLM_STREAM_IDLE_TIMEOUT");if(k!==void 0)throw k;if(g.done){u=!0;return}yield g.value}}finally{if(!u){d.abort("pi-ai stream consumer stopped");try{await E.return(void 0)}catch{}}}}catch(w){throw j(y.signal,"LLM_STREAM_IDLE_TIMEOUT")!==void 0?new h(`pi-ai stream idle timeout after ${p}ms`,"TIMEOUT",{cause:w}):e.signal?.aborted?new h("pi-ai request aborted by caller","ABORTED",{cause:w}):w}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},G=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 J;function Q(){return J??=new Map(Se().map(e=>[e.id,e])),J}s(Q,"catalogProviders");function _(e){return Q().get(e)}s(_,"catalogProvider");function et(){return Ae()}s(et,"catalogProviderIds");function tt(e){return _(e)?.auth.apiKey!==void 0}s(tt,"catalogProviderTakesApiKey");function Z(e){if(!Q().has(e))return new Map;const t=Me(e);return new Map(t.map(r=>[r.id,r]))}s(Z,"catalogModels");function v(e,t){throw new Error(`llm-pi-ai: provider "${e}" ${t}`)}s(v,"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)&&v(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(i=>{const d=o[i];return d===void 0?[]:[[i,d]]});for(const[i,d]of n)d===null?i!=="off"&&v(e,`model "${t.id}" reasoningEfforts.${i} needs the wire value dispatch should send; only "off" may leave it empty`):d.length===0&&v(e,`model "${t.id}" reasoningEfforts.${i} must not be an empty string`);n.some(([i])=>i!=="off")||v(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 a={};for(const i of T){const d=o[i];d===void 0?a[i]=null:d!==null&&(a[i]=d)}return{reasoning:!0,thinkingLevelMap:a}}s(nt,"resolveModelReasoning");function rt(e,t,r,o,n){const a=t.compat?.thinkingFormat??r?.thinkingFormat,i=t.compat?.supportsReasoningEffort??r?.supportsReasoningEffort;return a===void 0&&i===void 0?{}:n!=="openai-completions"?((t.compat?.thinkingFormat!==void 0||t.compat?.supportsReasoningEffort!==void 0)&&v(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,...a===void 0?{}:{thinkingFormat:a},...i===void 0?{}:{supportsReasoningEffort:i}}}}s(rt,"resolveModelCompat");function it(e){const{provider:t}=e,r=Z(t),o=_(t)?.baseUrl,n=e.models??[],a=e.modelOverrides??{};for(const[c,m]of Object.entries(a))c.length===0&&v(t,"has a modelOverrides entry with an empty model id"),r.size===0&&v(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&&v(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)||v(t,`modelOverrides names "${c}", which the installed catalog does not describe`),"id"in m&&v(t,`modelOverrides entry "${c}" sets "id", which is the dict key`);const i=n.length>0?n:[...r.values()].map(c=>({id:c.id,...a[c.id]}));i.length===0&&v(t,"resolves no models; the installed catalog does not describe this route, so its models must be listed in configuration");const d=ot(r),f=e.compat?.thinkingFormat!==void 0||e.compat?.supportsReasoningEffort!==void 0,p=new Set,y=new Map,w=i.map(c=>{c.id.length===0&&v(t,"has a model with an empty id"),p.has(c.id)&&v(t,`lists model "${c.id}" more than once`),p.add(c.id);const m=r.get(c.id),E=e.api??m?.api??d;E===void 0&&v(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 u=e.baseURL??m?.baseUrl??o;u===void 0&&v(t,`model "${c.id}" needs a baseURL; the installed catalog does not describe this route`);const g=c.contextWindow??m?.contextWindow??e.defaultContextWindow;(!Number.isInteger(g)||g<=0)&&v(t,`model "${c.id}" contextWindow must be a positive integer`);const k=c.maxTokens??m?.maxTokens??e.defaultMaxTokens;return(!Number.isInteger(k)||k<=0)&&v(t,`model "${c.id}" maxTokens must be a positive integer`),c.maxTokens!==void 0&&y.set(c.id,c.maxTokens),{...m,id:c.id,name:c.name??m?.name??c.id,api:E,provider:t,baseUrl:u,input:Ze(c.input)??m?.input??[...e.defaultInput],cost:m?.cost??Qe,contextWindow:g,maxTokens:k,...nt(t,c,m),...rt(t,c,e.compat,m,E)}});return f&&!w.some(c=>c.api==="openai-completions")&&v(t,"sets compat reasoning switches, but no model on the route speaks openai-completions; thinkingFormat and supportsReasoningEffort exist only on that protocol"),{models:w,configuredMaxTokens:y}}s(it,"resolveRouteModels");const q={"openai-completions":Pe,"openai-responses":Ce,"anthropic-messages":Ne};function N(){return Object.keys(q)}s(N,"supportedProtocols");function ee(e){return{name:e,resolve:s(({credential:t})=>Promise.resolve({auth:t?.key===void 0?{}:{apiKey:t.key},source:e}),"resolve")}}s(ee,"harnessApiKeyAuth");function te(e,t){return t===void 0?{apiKey:ee(e.displayName)}:t.auth.apiKey!==void 0||!e.namesCredential?t.auth:{...t.auth,apiKey:ee(e.displayName)}}s(te,"routeAuth");function st(e,t){const r=t.baseURL??e.baseUrl;return{id:t.provider,name:t.displayName,...r===void 0?{}:{baseUrl:r},auth:te(t,e),getModels:s(()=>t.models,"getModels"),stream:s((o,n,a)=>e.stream(o,n,a),"stream"),streamSimple:s((o,n,a)=>e.streamSimple(o,n,a),"streamSimple")}}s(st,"reuseCatalogProvider");function at(e){const t=_(e.provider);if(t!==void 0&&e.api===void 0)return st(t,e);const r=e.api===void 0?void 0:q[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 ${N().join(", ")}`);return Re({id:e.provider,name:e.displayName,...e.baseURL===void 0?{}:{baseUrl:e.baseURL},auth:te(e,t),models:e.models,api:r()})}s(at,"buildProvider");const dt=3e5,lt=262144,ct=32768,oe=["text"],ut=l.object({minimal:l.number(),low:l.number(),medium:l.number(),high:l.number()}),ne=l.object({thinkingFormat:l.union(qe),supportsReasoningEffort:l.boolean()}),pt=l.dict(l.union([l.string(),l.const(null)]),l.union(T)),re={name:l.string(),contextWindow:l.number().step(1).min(1),maxTokens:l.number().step(1).min(1),input:l.array(l.union(G)),reasoningEfforts:l.union([l.const(!1),pt]),compat:ne},ft=l.object({id:l.string().required(),...re}),mt=l.object(re),ht=l.object({apiKeyEnv:l.string().role("credential-ref"),displayName:l.string(),api:l.union(N()),baseURL:l.string(),models:l.array(ft),modelOverrides:l.dict(mt),compat:ne,defaultContextWindow:l.number().step(1).min(1).default(lt),defaultMaxTokens:l.number().step(1).min(1).default(ct),defaultInput:l.array(l.union(G)).default([...oe]),headers:l.dict(l.string()),reasoning:l.union(T),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(S).default(dt),retryPolicy:ge}),ie=l.object({providers:l.dict(ht).default({})});function gt(e){se(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 se(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 a=n.streamIdleTimeoutMs??3e5;if(!Number.isFinite(a)||a<=0||a>S)throw new Error(`llm-pi-ai: provider "${o}" streamIdleTimeoutMs must be a positive finite number no greater than ${S}`);const i=[...n.defaultInput??oe];if(i.length===0)throw new Error(`llm-pi-ai: provider "${o}" defaultInput must name at least one modality`);const d=n.displayName??o,f=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:i,defaultContextWindow:n.defaultContextWindow??262144,defaultMaxTokens:n.defaultMaxTokens??32768}),{apiKeyEnv:p,retryPolicy:y,models:w,displayName:c,...m}=n;r.set(o,{...m,provider:o,displayName:d,...p===void 0?{}:{apiKeyEnv:_e(p)},streamIdleTimeoutMs:a,retryPolicy:ke(y,`llm-pi-ai: provider "${o}" retryPolicy`),...m.headers===void 0?{}:{headers:{...m.headers}},...m.thinkingBudgets===void 0?{}:{thinkingBudgets:{...m.thinkingBudgets}},configuredMaxTokens:f.configuredMaxTokens,piProvider:at({provider:o,displayName:d,...n.api===void 0?{}:{api:n.api},...n.baseURL===void 0?{}:{baseURL:n.baseURL},models:f.models,namesCredential:p!==void 0})})}return r}s(se,"resolveProfiles");const vt=new Set(["openai-completions","openai-responses"]),P=4*1024*1024;function ae(...e){for(const t of e)if(typeof t=="number"&&Number.isInteger(t)&&t>0)return t}s(ae,"capacity");function de(...e){for(const t of e)if(typeof t=="string"&&t.length>0)return t}s(de,"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 ${P} bytes`,"DISCOVERY_FAILED"),"oversized"),o=Number(e.headers.get("content-length")??NaN);if(Number.isFinite(o)&&o>P)throw await e.body?.cancel(),r();if(e.body===null)return"";const n=e.body.getReader(),a=[];let i=0;try{for(;;){const{done:p,value:y}=await n.read();if(p)break;if(i+=y.byteLength,i>P)throw r();a.push(y)}}finally{await n.cancel().catch(()=>{})}const d=new Uint8Array(i);let f=0;for(const p of a)d.set(p,f),f+=p.byteLength;return new TextDecoder().decode(d)}s(wt,"readBounded");function kt(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,a=de(n?.id);if(a===void 0)continue;const i=de(n?.name,n?.display_name),d=ae(n?.context_window,n?.context_length),f=ae(n?.max_output_tokens,n?.max_tokens);r.push({id:a,...i===void 0?{}:{name:i},...d===void 0?{}:{contextWindow:d},...f===void 0?{}:{maxTokens:f}})}return r}s(kt,"readListing");function Et(e){const t=we(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",fe)}s(Et,"usableProbeKey");async function xt(e,t){if(e.provider!==void 0){const p=Z(e.provider);if(p.size>0)return[...p.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 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?.(),a=n===void 0?void 0:Et(n);let i;try{i=await fetch(o,{method:"GET",headers:{accept:"application/json",...a===void 0?{}:{authorization:`Bearer ${a}`},...$()},...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(!i.ok)throw new h(`${o} answered ${i.status}${i.status===401||i.status===403?"; check the API key":""}`,"DISCOVERY_FAILED");let d;try{d=await wt(i,o)}catch(p){throw e.signal?.aborted?new h("model discovery aborted by caller","ABORTED",{cause:p}):p}let f;try{f=JSON.parse(d)}catch(p){throw new h(`${o} did not answer with JSON`,"DISCOVERY_FAILED",{cause:p})}return kt(f)}s(xt,"discoverModels");const Tt="llm-pi-ai",Rt=["llm"],C=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,a)=>{r.set(n,{provider:n,displayName:a,settingsNs:C,settingsPath:["providers",n],declared:!t.has(n)})},"declare");for(const n of t)tt(n)&&o(n,n);for(const[n,a]of e)o(n,a.displayName);return[...r.values()]}s(Ot,"directoryEntries");function St(e,t){let r=s(()=>t,"current"),o,n;const a=s(()=>{const u=r();if(u===o&&n!==void 0)return n;const g=se(u.providers);return o=u,n=g,g},"profiles");a();const i=s(async(u,g)=>{const k=g.apiKeyEnv;if(k===void 0)return;const L=e.get("credentials"),R=L!==void 0?(await L.resolve(k))?.value:ce(e).get(k)?.value;if(R!==void 0&&R.length>0)return ye(R,"llm-pi-ai",k);throw new h(`llm-pi-ai: no credential for provider route "${u}"; its profile resolves ${k}, which is not set — store ${k} 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 X({profiles:a,resolveApiKey:i,resolveAttachments:s(()=>e.get("attachments"),"resolveAttachments")});let f,p;const y=s(()=>{const u=Ot(a());D(u,p)||(f===void 0?f=e.llm.registerConfigurableProviders(u):f.replace(u),p=u)},"ensureDirectory");y();const w=s(async u=>{if(u===void 0)return;const g=a().get(u);if(g!==void 0)return i(u,g)},"storedApiKey");e.llm.registerModelDiscovery(C,u=>xt(u,()=>w(u.provider)));let c,m;const E=s(()=>{const u=It(a());if(D(u,m))return;const g=[...a().keys()];if(c===void 0){if(g.length===0){m=u;return}c=e.llm.registerAdapter(g,d)}else c.replace(g);m=u},"ensureRegistrationFacts");E(),Ee(e,C,ie,t,{validate:gt,setSource:s(u=>{r=u},"setSource"),onChange:s(()=>{try{E()}catch(u){e.logger.error("llm-pi-ai: keeping the previously registered routes after a refused update"),e.logger.error(u)}try{y()}catch(u){e.logger.error("llm-pi-ai: keeping the previous configurable-provider directory after a refused update"),e.logger.error(u)}},"onChange")})}s(St,"apply");export{ie as Config,X as PiAiAdapter,St as apply,Rt as inject,Tt as name,N as supportedProtocols};
1
+ var le=Object.defineProperty;var s=(e,t)=>le(e,"name",{value:t,configurable:!0});import{launchEnvironmentOf as ce}from"@deepseek-ai/dsh-launch-environment";import{CONTEXT_WINDOW_EXCEEDED_CODE as ue,CallId as R,EMPTY_RESPONSE_CODE as pe,INVALID_CREDENTIAL_CODE as fe,LlmAdapter as me,LlmError as h,QUOTA_EXCEEDED_CODE as he,ReasoningEffortId as C,RetryPolicySchema as ge,assertUsableApiKey as ve,attributionHeaders as $,contentHasImage as S,isContextWindowExceededError as ye,isQuotaExceededError as be,normalizeApiKey as we,resolveRetryPolicy as Ee}from"@deepseek-ai/dsh-llm";import{deepEqualJson as D,installSettingsSection as ke,settingsNamespace as Re}from"@deepseek-ai/dsh-settings";import{createModels as xe,createProvider as Te,getSupportedThinkingLevels as I,isContextOverflow as Se}from"@earendil-works/pi-ai";import{MAX_TIMER_DELAY_MS as O,idleWatchdog as Ie,timeoutOf as j}from"@deepseek-ai/dsh-timeout";import{builtinProviders as Oe,getBuiltinModels as Me,getBuiltinProviders as Ae}from"@earendil-works/pi-ai/providers/all";import l from"@deepseek-ai/schemastery";import{credentialRef as _e}from"@deepseek-ai/dsh-credentials";import{anthropicMessagesApi as Le}from"@earendil-works/pi-ai/api/anthropic-messages.lazy";import{openAICompletionsApi as Ue}from"@earendil-works/pi-ai/api/openai-completions.lazy";import{openAIResponsesApi as Ne}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 Pe(e){return{kind:"pi-ai",version:1,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(Pe,"toPiReplayState");function w(e){throw new h(`invalid pi-ai replay state: ${e}`,"INVALID_REPLAY_STATE")}s(w,"invalidReplay");function Ce(e){if(typeof e!="object"||e===null||Array.isArray(e))return w("expected an object");const t=e;if(t.kind!=="pi-ai")return w("unknown state kind");if(t.version!==1)return w(`unsupported version ${String(t.version)}`);for(const r of["api","provider","model"])if(typeof t[r]!="string"||t[r].length===0)return w(`${r} must be a non-empty string`);if(!["stop","length","toolUse","error","aborted"].includes(String(t.stopReason)))return w("unknown stopReason");if(t.responseModel!==void 0&&typeof t.responseModel!="string")return w("responseModel must be a string");if(t.responseId!==void 0&&typeof t.responseId!="string")return w("responseId must be a string");if(!Array.isArray(t.blocks))return w("blocks must be an array");for(const[r,o]of t.blocks.entries()){if(typeof o!="object"||o===null||Array.isArray(o))return w(`block ${r} must be an object`);const n=o;if(!["text","reasoning","tool-call"].includes(String(n.type)))return w(`block ${r} has an unknown type`);for(const a of["textSignature","thinkingSignature","thoughtSignature"])if(n[a]!==void 0&&typeof n[a]!="string")return w(`block ${r} ${a} must be a string`);if(n.redacted!==void 0&&typeof n.redacted!="boolean")return w(`block ${r} redacted must be boolean`)}return t}s(Ce,"readReplayState");function $e(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");default:break}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($e,"foreignAssistant");function De(e,t,r){const o=Ce(r);return o.provider!==t.provider?w("provider does not match assistant source"):o.model!==t.model?w("model does not match assistant source"):o.blocks.length!==e.content.length?w("block count does not match assistant content"):{role:"assistant",content:e.content.map((n,a)=>{const i=o.blocks[a];if(i===void 0||i.type!==n.type)return w(`block ${a} does not match assistant content`);switch(n.type){case"text":return{type:"text",text:n.text,...i.type==="text"&&i.textSignature!==void 0?{textSignature:i.textSignature}:{}};case"reasoning":return{type:"thinking",thinking:n.text,...i.type==="reasoning"&&i.thinkingSignature!==void 0?{thinkingSignature:i.thinkingSignature}:{},...i.type==="reasoning"&&i.redacted!==void 0?{redacted:i.redacted}:{}};case"tool-call":return{type:"toolCall",id:n.id,name:n.name,arguments:F(n.arguments),...i.type==="tool-call"&&i.thoughtSignature!==void 0?{thoughtSignature:i.thoughtSignature}:{}};default:return w(`block ${a} has an unsupported Harness type`)}}),api:o.api,provider:o.provider,model:o.model,...o.responseModel===void 0?{}:{responseModel:o.responseModel},...o.responseId===void 0?{}:{responseId:o.responseId},usage:W(),stopReason:o.stopReason,timestamp:0}}s(De,"replayedAssistant");function K(e){const t=e.source;return t.kind!=="model"||t.replayState===void 0?$e(e):De(e,t,t.replayState)}s(K,"toPiAssistant");function M(e){return e.content.filter(t=>t.type==="text").map(t=>t.text).join("")}s(M,"flattenText");function B(e){return e.map(t=>t.type==="text"?t.text:t.type==="tool-result"?B(t.content):"").join("")}s(B,"toolResultText");async function A(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 A(o.content,t);typeof n=="string"?n.length>0&&r.push({type:"text",text:n}):r.push(...n)}break;default:break}return r.every(o=>o.type==="text")?r.map(o=>o.text).join(""):r}s(A,"userContent");function je(e){return e.tools?.map(t=>({name:t.name,description:t.description,parameters:t.parameters}))}s(je,"toolsOf");function V(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(V,"piContext");function Fe(e){const t=new Map,r=[];for(const o of e.messages){if(S(o.content))throw new h("pi-ai image conversion requires the durable attachment service","UNSUPPORTED_CONTENT");if(o.role==="system"){r.push({role:"user",content:M(o),timestamp:0});continue}if(o.role==="assistant"){const i=K(o);for(const d of i.content)d.type==="toolCall"&&t.set(R(d.id),d.name);r.push(i);continue}const n=M(o),a=o.content.filter(i=>i.type==="tool-result");(n.length>0||a.length===0)&&r.push({role:"user",content:n,timestamp:0});for(const i of a)r.push({role:"toolResult",toolCallId:i.toolCallId,toolName:t.get(i.toolCallId)??"unknown",content:[{type:"text",text:B(i.content)||"(no output)"}],isError:i.isError??!1,timestamp:0})}return V(e,r)}s(Fe,"textOnlyContext");function Y(e,t){return t===void 0?Fe(e):We(e,t)}s(Y,"toPiContext");async function We(e,t){const r=new Map,o=[];for(const n of e.messages){if(n.role==="system"){if(S(n.content))throw new h("pi-ai cannot represent an image in an in-history system message","UNSUPPORTED_CONTENT");o.push({role:"user",content:M(n),timestamp:0});continue}if(n.role==="assistant"){const d=K(n);for(const f of d.content)f.type==="toolCall"&&r.set(R(f.id),f.name);o.push(d);continue}const a=await A(n.content.filter(d=>d.type!=="tool-result"),t),i=n.content.filter(d=>d.type==="tool-result");(a.length>0||i.length===0)&&o.push({role:"user",content:a,timestamp:0});for(const d of i){const f=await A(d.content,t);o.push({role:"toolResult",toolCallId:d.toolCallId,toolName:r.get(d.toolCallId)??"unknown",content:typeof f=="string"?[{type:"text",text:f||"(no output)"}]:f,isError:d.isError??!1,timestamp:0})}}return V(e,o)}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":be(e)?he:/\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 z(e,t){const r=Se(e,t),o=e.stopReason==="error"&&e.errorMessage!==void 0&&ye(e.errorMessage);if(r||o)return{kind:"error",failure:{message:e.errorMessage??`pi-ai detected context overflow for model "${e.model}"`,code:ue}};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:pe}}:{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(z,"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],a=n?.type==="toolCall"?n.id:"",i=n?.type==="toolCall"?n.name:"";r.set(o.contentIndex,{id:a,name:i}),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:R(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:R(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:z(o.message,t),replayState:Pe(o.message)};return;case"error":yield{type:"usage",usage:H(o.error.usage)},yield{type:"finish",reason:z(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(a){return Promise.reject(a)}},"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(i){t.error=t.hasError?new e(i,t.error,"An error was suppressed during disposal."):i,t.hasError=!0}s(r,"fail");var o,n=0;function a(){for(;o=t.stack.pop();)try{if(!o.async&&n===1)return n=0,t.stack.push(o),Promise.resolve().then(a);if(o.dispose){var i=o.dispose.call(o.value);if(o.async)return n|=2,Promise.resolve(i).then(a,function(d){return r(d),a()})}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(a,"next"),a()}})(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 I(e).some(r=>r===t)?t:void 0}s(ze,"describableReasoningLevel");function Xe(e,t){if(t!==void 0){if(I(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:I(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 X=class extends me{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=xe();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}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 h(`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),a=this.modelOf(o,e,t),i=ze(a,n.reasoning),d=n.configuredMaxTokens.get(t);return{provider:e,id:t,name:a.name,inputModalities:[...a.input],context:{contextWindow:a.contextWindow},...d===void 0?{}:{defaultMaxTokens:d},...Ge(a,i)}})}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.serviceRoutedModel(o,this.modelOf(r,e.provider,e.model)),a=Xe(n,e.reasoningEffort??o.reasoning),i=await this.config.resolveApiKey(e.provider,o),d=new AbortController,f=e.signal===void 0?d.signal:AbortSignal.any([e.signal,d.signal]),p=o.streamIdleTimeoutMs,v=Ve(t,Ie(f,p,"LLM_STREAM_IDLE_TIMEOUT"),!1);try{const E=e.messages.some(m=>S(m.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 g=c===void 0?Y(e):await Y(e,c),k=Be(r.models.streamSimple(n,g,{...He(o,a,i),...e.temperature===void 0?{}:{temperature:e.temperature},...e.maxTokens===void 0?{}:{maxTokens:e.maxTokens},...e.sessionId===void 0?{}:{sessionId:String(e.sessionId)},signal:v.signal,headers:Je(o.headers)}),n.contextWindow)[Symbol.asyncIterator]();let u=!1;try{for(;;){const m=await v.next(k),b=j(v.signal,"LLM_STREAM_IDLE_TIMEOUT");if(b!==void 0)throw b;if(m.done){u=!0;return}yield m.value}}finally{if(!u){d.abort("pi-ai stream consumer stopped");try{await k.return(void 0)}catch{}}}}catch(E){throw j(v.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},G=Object.keys({text:!0,image:!0});function Ze(e){return e===void 0||e.length===0?void 0:[...e]}s(Ze,"declaredInput");const x=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 J;function Q(){return J??=new Map(Oe().map(e=>[e.id,e])),J}s(Q,"catalogProviders");function _(e){return Q().get(e)}s(_,"catalogProvider");function et(){return Ae()}s(et,"catalogProviderIds");function tt(e){return _(e)?.auth.apiKey!==void 0}s(tt,"catalogProviderTakesApiKey");function Z(e){if(!Q().has(e))return new Map;const t=Me(e);return new Map(t.map(r=>[r.id,r]))}s(Z,"catalogModels");function y(e,t){throw new Error(`llm-pi-ai: provider "${e}" ${t}`)}s(y,"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)&&y(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=x.flatMap(i=>{const d=o[i];return d===void 0?[]:[[i,d]]});for(const[i,d]of n)d===null?i!=="off"&&y(e,`model "${t.id}" reasoningEfforts.${i} needs the wire value dispatch should send; only "off" may leave it empty`):d.length===0&&y(e,`model "${t.id}" reasoningEfforts.${i} must not be an empty string`);n.some(([i])=>i!=="off")||y(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 a={};for(const i of x){const d=o[i];d===void 0?a[i]=null:d!==null&&(a[i]=d)}return{reasoning:!0,thinkingLevelMap:a}}s(nt,"resolveModelReasoning");function rt(e,t,r,o,n){const a=t.compat?.thinkingFormat??r?.thinkingFormat,i=t.compat?.supportsReasoningEffort??r?.supportsReasoningEffort;return a===void 0&&i===void 0?{}:n!=="openai-completions"?((t.compat?.thinkingFormat!==void 0||t.compat?.supportsReasoningEffort!==void 0)&&y(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,...a===void 0?{}:{thinkingFormat:a},...i===void 0?{}:{supportsReasoningEffort:i}}}}s(rt,"resolveModelCompat");function it(e){const{provider:t}=e,r=Z(t),o=_(t)?.baseUrl,n=e.models??[],a=e.modelOverrides??{};for(const[c,g]of Object.entries(a))c.length===0&&y(t,"has a modelOverrides entry with an empty model id"),r.size===0&&y(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&&y(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)||y(t,`modelOverrides names "${c}", which the installed catalog does not describe`),"id"in g&&y(t,`modelOverrides entry "${c}" sets "id", which is the dict key`);const i=n.length>0?n:[...r.values()].map(c=>({id:c.id,...a[c.id]}));i.length===0&&y(t,"resolves no models; the installed catalog does not describe this route, so its models must be listed in configuration");const d=ot(r),f=e.compat?.thinkingFormat!==void 0||e.compat?.supportsReasoningEffort!==void 0,p=new Set,v=new Map,E=i.map(c=>{c.id.length===0&&y(t,"has a model with an empty id"),p.has(c.id)&&y(t,`lists model "${c.id}" more than once`),p.add(c.id);const g=r.get(c.id),k=e.api??g?.api??d;k===void 0&&y(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 u=e.baseURL??g?.baseUrl??o;u===void 0&&y(t,`model "${c.id}" needs a baseURL; the installed catalog does not describe this route`);const m=c.contextWindow??g?.contextWindow??e.defaultContextWindow;(!Number.isInteger(m)||m<=0)&&y(t,`model "${c.id}" contextWindow must be a positive integer`);const b=c.maxTokens??g?.maxTokens??e.defaultMaxTokens;return(!Number.isInteger(b)||b<=0)&&y(t,`model "${c.id}" maxTokens must be a positive integer`),c.maxTokens!==void 0&&v.set(c.id,c.maxTokens),{...g,id:c.id,name:c.name??g?.name??c.id,api:k,provider:t,baseUrl:u,input:Ze(c.input)??g?.input??[...e.defaultInput],cost:g?.cost??Qe,contextWindow:m,maxTokens:b,...nt(t,c,g),...rt(t,c,e.compat,g,k)}});return f&&!E.some(c=>c.api==="openai-completions")&&y(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:v}}s(it,"resolveRouteModels");const q={"openai-completions":Ue,"openai-responses":Ne,"anthropic-messages":Le};function L(){return Object.keys(q)}s(L,"supportedProtocols");function ee(e){return{name:e,resolve:s(({credential:t})=>Promise.resolve({auth:t?.key===void 0?{}:{apiKey:t.key},source:e}),"resolve")}}s(ee,"harnessApiKeyAuth");function te(e,t){return t===void 0?{apiKey:ee(e.displayName)}:t.auth.apiKey!==void 0||!e.namesCredential?t.auth:{...t.auth,apiKey:ee(e.displayName)}}s(te,"routeAuth");function st(e,t){const r=t.baseURL??e.baseUrl;return{id:t.provider,name:t.displayName,...r===void 0?{}:{baseUrl:r},auth:te(t,e),getModels:s(()=>t.models,"getModels"),stream:s((o,n,a)=>e.stream(o,n,a),"stream"),streamSimple:s((o,n,a)=>e.streamSimple(o,n,a),"streamSimple")}}s(st,"reuseCatalogProvider");function at(e){const t=_(e.provider);if(t!==void 0&&e.api===void 0)return st(t,e);const r=e.api===void 0?void 0:q[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 ${L().join(", ")}`);return Te({id:e.provider,name:e.displayName,...e.baseURL===void 0?{}:{baseUrl:e.baseURL},auth:te(e,t),models:e.models,api:r()})}s(at,"buildProvider");const dt=3e5,lt=262144,ct="http://127.0.0.1:9",ut=32768,oe=["text"],pt=l.object({minimal:l.number(),low:l.number(),medium:l.number(),high:l.number()}),ne=l.object({thinkingFormat:l.union(qe),supportsReasoningEffort:l.boolean()}),ft=l.dict(l.union([l.string(),l.const(null)]),l.union(x)),re={name:l.string(),contextWindow:l.number().step(1).min(1),maxTokens:l.number().step(1).min(1),input:l.array(l.union(G)),reasoningEfforts:l.union([l.const(!1),ft]),compat:ne},mt=l.object({id:l.string().required(),...re}),ht=l.object(re),gt=l.object({apiKeyEnv:l.string().role("credential-ref"),displayName:l.string(),api:l.union(L()),baseURL:l.string(),baseURLService:l.string(),models:l.array(mt),modelOverrides:l.dict(ht),compat:ne,defaultContextWindow:l.number().step(1).min(1).default(lt),defaultMaxTokens:l.number().step(1).min(1).default(ut),defaultInput:l.array(l.union(G)).default([...oe]),headers:l.dict(l.string()),reasoning:l.union(x),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(O).default(dt),retryPolicy:ge}),ie=l.object({providers:l.dict(gt).default({})});function vt(e){se(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 se(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 a=n.streamIdleTimeoutMs??3e5;if(!Number.isFinite(a)||a<=0||a>O)throw new Error(`llm-pi-ai: provider "${o}" streamIdleTimeoutMs must be a positive finite number no greater than ${O}`);const i=[...n.defaultInput??oe];if(i.length===0)throw new Error(`llm-pi-ai: provider "${o}" defaultInput must name at least one modality`);const d=n.displayName??o,f=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:i,defaultContextWindow:n.defaultContextWindow??262144,defaultMaxTokens:n.defaultMaxTokens??32768}),{apiKeyEnv:p,retryPolicy:v,models:E,displayName:c,...g}=n;r.set(o,{...g,provider:o,displayName:d,...p===void 0?{}:{apiKeyEnv:_e(p)},streamIdleTimeoutMs:a,retryPolicy:Ee(v,`llm-pi-ai: provider "${o}" retryPolicy`),...g.headers===void 0?{}:{headers:{...g.headers}},...g.thinkingBudgets===void 0?{}:{thinkingBudgets:{...g.thinkingBudgets}},configuredMaxTokens:f.configuredMaxTokens,piProvider:at({provider:o,displayName:d,...n.api===void 0?{}:{api:n.api},...n.baseURL===void 0?{}:{baseURL:n.baseURL},models:f.models,namesCredential:p!==void 0})})}return r}s(se,"resolveProfiles");const bt=new Set(["openai-completions","openai-responses"]),U=4*1024*1024;function ae(...e){for(const t of e)if(typeof t=="number"&&Number.isInteger(t)&&t>0)return t}s(ae,"capacity");function de(...e){for(const t of e)if(typeof t=="string"&&t.length>0)return t}s(de,"label");function wt(e){return`${e.replace(/\/+$/,"")}/models`}s(wt,"listingUrl");async function Et(e,t){const r=s(()=>new h(`${t} answered with more than ${U} bytes`,"DISCOVERY_FAILED"),"oversized"),o=Number(e.headers.get("content-length")??NaN);if(Number.isFinite(o)&&o>U)throw await e.body?.cancel(),r();if(e.body===null)return"";const n=e.body.getReader(),a=[];let i=0;try{for(;;){const{done:p,value:v}=await n.read();if(p)break;if(i+=v.byteLength,i>U)throw r();a.push(v)}}finally{await n.cancel().catch(()=>{})}const d=new Uint8Array(i);let f=0;for(const p of a)d.set(p,f),f+=p.byteLength;return new TextDecoder().decode(d)}s(Et,"readBounded");function kt(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,a=de(n?.id);if(a===void 0)continue;const i=de(n?.name,n?.display_name),d=ae(n?.context_window,n?.context_length),f=ae(n?.max_output_tokens,n?.max_tokens);r.push({id:a,...i===void 0?{}:{name:i},...d===void 0?{}:{contextWindow:d},...f===void 0?{}:{maxTokens:f}})}return r}s(kt,"readListing");function Rt(e){const t=we(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",fe)}s(Rt,"usableProbeKey");async function xt(e,t){if(e.provider!==void 0){const p=Z(e.provider);if(p.size>0)return[...p.values()].map(v=>({id:v.id,name:v.name,contextWindow:v.contextWindow,maxTokens:v.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(!bt.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=wt(e.baseURL),n=e.apiKey??await t?.(),a=n===void 0?void 0:Rt(n);let i;try{i=await fetch(o,{method:"GET",headers:{accept:"application/json",...a===void 0?{}:{authorization:`Bearer ${a}`},...$()},...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(!i.ok)throw new h(`${o} answered ${i.status}${i.status===401||i.status===403?"; check the API key":""}`,"DISCOVERY_FAILED");let d;try{d=await Et(i,o)}catch(p){throw e.signal?.aborted?new h("model discovery aborted by caller","ABORTED",{cause:p}):p}let f;try{f=JSON.parse(d)}catch(p){throw new h(`${o} did not answer with JSON`,"DISCOVERY_FAILED",{cause:p})}return kt(f)}s(xt,"discoverModels");const Tt="llm-pi-ai",St=["llm"],N=Re("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,a)=>{r.set(n,{provider:n,displayName:a,settingsNs:N,settingsPath:["providers",n],declared:!t.has(n)})},"declare");for(const n of t)tt(n)&&o(n,n);for(const[n,a]of e)o(n,a.displayName);return[...r.values()]}s(Ot,"directoryEntries");function Mt(e,t){let r=s(()=>t,"current"),o,n;const a=s(()=>{const u=r();if(u===o&&n!==void 0)return n;const m=se(u.providers);return o=u,n=m,m},"profiles");a();const i=s(async(u,m)=>{const b=m.apiKeyEnv;if(b===void 0)return;const P=e.get("credentials"),T=P!==void 0?(await P.resolve(b))?.value:ce(e).get(b)?.value;if(T!==void 0&&T.length>0)return ve(T,"llm-pi-ai",b);throw new h(`llm-pi-ai: no credential for provider route "${u}"; its profile resolves ${b}, which is not set — store ${b} 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 X({profiles:a,resolveApiKey:i,resolveAttachments:s(()=>e.get("attachments"),"resolveAttachments"),resolveServiceBaseURL:s(u=>{const m=e.get(u);if(m==null)return;const b=m.baseURL;return typeof b=="string"&&b.length>0?b:void 0},"resolveServiceBaseURL")});let f,p;const v=s(()=>{const u=Ot(a());D(u,p)||(f===void 0?f=e.llm.registerConfigurableProviders(u):f.replace(u),p=u)},"ensureDirectory");v();const E=s(async u=>{if(u===void 0)return;const m=a().get(u);if(m!==void 0)return i(u,m)},"storedApiKey");e.llm.registerModelDiscovery(N,u=>xt(u,()=>E(u.provider)));let c,g;const k=s(()=>{const u=It(a());if(D(u,g))return;const m=[...a().keys()];if(c===void 0){if(m.length===0){g=u;return}c=e.llm.registerAdapter(m,d)}else c.replace(m);g=u},"ensureRegistrationFacts");k(),ke(e,N,ie,t,{validate:vt,setSource:s(u=>{r=u},"setSource"),onChange:s(()=>{try{k()}catch(u){e.logger.error("llm-pi-ai: keeping the previously registered routes after a refused update"),e.logger.error(u)}try{v()}catch(u){e.logger.error("llm-pi-ai: keeping the previous configurable-provider directory after a refused update"),e.logger.error(u)}},"onChange")})}s(Mt,"apply");export{ie as Config,X as PiAiAdapter,Mt as apply,St as inject,Tt as name,L as supportedProtocols};
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-llm-pi-ai","version":"0.0.9","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.0.9","@deepseek-ai/dsh-launch-environment":"^0.0.9","@deepseek-ai/dsh-invariants":"^0.0.9","@deepseek-ai/dsh-settings":"^0.0.9","@deepseek-ai/dsh-llm":"^0.0.9","@deepseek-ai/dsh-credentials":"^0.0.9","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-timeout":"^0.0.9"},"dependencies":{"@earendil-works/pi-ai":"^0.83.0","@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-llm-pi-ai","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-attachment":"^0.0.10","@deepseek-ai/dsh-llm":"^0.0.10","@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-launch-environment":"^0.0.10","@deepseek-ai/dsh-credentials":"^0.0.10","@deepseek-ai/dsh-settings":"^0.0.10","@deepseek-ai/dsh-timeout":"^0.0.10","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@earendil-works/pi-ai":"^0.83.0","@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-llm-retry","version":"0.0.9","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-agent":"^0.0.9","@deepseek-ai/dsh-brand":"^0.0.9","@deepseek-ai/dsh-invariants":"^0.0.9","@deepseek-ai/dsh-llm":"^0.0.9","@deepseek-ai/dsh-timeout":"^0.0.9","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session":"^0.0.9"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-llm-retry","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-brand":"^0.0.10","@deepseek-ai/dsh-agent":"^0.0.10","@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-session":"^0.0.10","@deepseek-ai/dsh-llm":"^0.0.10","@deepseek-ai/dsh-timeout":"^0.0.10","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-mcp-client","version":"0.0.9","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.9","@deepseek-ai/dsh-subprocess":"^0.0.9","@deepseek-ai/dsh-llm":"^0.0.9","@deepseek-ai/dsh-timeout":"^0.0.9","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-tools":"^0.0.9"},"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.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-llm":"^0.0.10","@deepseek-ai/dsh-timeout":"^0.0.10","@deepseek-ai/dsh-subprocess":"^0.0.10","@deepseek-ai/dsh-tools":"^0.0.10","@deepseek-ai/cordis":"^4.0.1"},"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.0.9","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.0.9","@deepseek-ai/dsh-session":"^0.0.9","@deepseek-ai/dsh-llm":"^0.0.9","@deepseek-ai/dsh-brand":"^0.0.9","@deepseek-ai/dsh-session-persistence":"^0.0.9","@deepseek-ai/dsh-storage-domain":"^0.0.9","@deepseek-ai/dsh-typert-protocol":"^0.0.9","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"zod":"^4.4.3","@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-message-feedback","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./typert":{"types":"./lib/typert.host.d.ts","default":"./lib/typert.host.js"},"./remote":{"types":"./lib/typert.remote-client.d.ts","default":"./lib/typert.remote-client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-brand":"^0.0.10","@deepseek-ai/dsh-session-persistence":"^0.0.10","@deepseek-ai/dsh-session":"^0.0.10","@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-llm":"^0.0.10","@deepseek-ai/dsh-storage-domain":"^0.0.10","@deepseek-ai/dsh-typert-protocol":"^0.0.10","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"zod":"^4.4.3","@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-native-command","version":"0.0.9","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.9","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-native-command","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-output-retention","version":"0.0.9","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.9","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-output-retention","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-permission-presets","version":"0.0.9","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.0.9","@deepseek-ai/dsh-sandbox":"^0.0.9","@deepseek-ai/dsh-commands":"^0.0.9","@deepseek-ai/dsh-session":"^0.0.9","@deepseek-ai/dsh-invariants":"^0.0.9","@deepseek-ai/dsh-sandbox-policy":"^0.0.9","@deepseek-ai/dsh-settings":"^0.0.9","@deepseek-ai/dsh-session-projection":"^0.0.9","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-user-approval":"^0.0.9"},"dependencies":{"zod":"^4.4.3","@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-permission-presets","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./client":{"types":"./lib/types/client.d.ts","default":"./lib/types/client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-shell":"^0.0.10","@deepseek-ai/dsh-commands":"^0.0.10","@deepseek-ai/dsh-sandbox-policy":"^0.0.10","@deepseek-ai/dsh-session":"^0.0.10","@deepseek-ai/dsh-sandbox":"^0.0.10","@deepseek-ai/dsh-session-projection":"^0.0.10","@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-settings":"^0.0.10","@deepseek-ai/dsh-user-approval":"^0.0.10","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"zod":"^4.4.3","@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-persona","version":"0.0.9","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.9","@deepseek-ai/dsh-system-prompt":"^0.0.9","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-persona","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-system-prompt":"^0.0.10","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-plan-mode","version":"0.0.9","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.0.9","@deepseek-ai/dsh-invariants":"^0.0.9","@deepseek-ai/dsh-session":"^0.0.9","@deepseek-ai/dsh-agent":"^0.0.9","@deepseek-ai/dsh-session-projection":"^0.0.9","@deepseek-ai/dsh-system-prompt":"^0.0.9","@deepseek-ai/dsh-user-questions":"^0.0.9","@deepseek-ai/dsh-llm":"^0.0.9","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-tools":"^0.0.9"},"peerDependenciesMeta":{"@deepseek-ai/dsh-commands":{"optional":true}},"dependencies":{"zod":"^4.4.3"}}
1
+ {"name":"@deepseek-ai/dsh-plan-mode","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./client":{"types":"./lib/types/client.d.ts","default":"./lib/types/client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-agent":"^0.0.10","@deepseek-ai/dsh-commands":"^0.0.10","@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-llm":"^0.0.10","@deepseek-ai/dsh-session":"^0.0.10","@deepseek-ai/dsh-system-prompt":"^0.0.10","@deepseek-ai/dsh-session-projection":"^0.0.10","@deepseek-ai/dsh-tools":"^0.0.10","@deepseek-ai/dsh-user-questions":"^0.0.10","@deepseek-ai/cordis":"^4.0.1"},"peerDependenciesMeta":{"@deepseek-ai/dsh-commands":{"optional":true}},"dependencies":{"zod":"^4.4.3"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-pwsh-local","version":"0.0.9","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.0.9","@deepseek-ai/dsh-invariants":"^0.0.9","@deepseek-ai/dsh-timeout":"^0.0.9","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-subprocess":"^0.0.9","@deepseek-ai/dsh-settings":"^0.0.9"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-pwsh-local","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-subprocess":"^0.0.10","@deepseek-ai/dsh-timeout":"^0.0.10","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-settings":"^0.0.10","@deepseek-ai/dsh-shell":"^0.0.10"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-pwsh-sandbox","version":"0.0.9","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.0.9","@deepseek-ai/dsh-invariants":"^0.0.9","@deepseek-ai/dsh-pwsh-local":"^0.0.9","@deepseek-ai/dsh-sandbox":"^0.0.9","@deepseek-ai/dsh-sandbox-policy":"^0.0.9","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-pwsh-sandbox","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-shell":"^0.0.10","@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-pwsh-local":"^0.0.10","@deepseek-ai/dsh-sandbox":"^0.0.10","@deepseek-ai/dsh-sandbox-policy":"^0.0.10","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1,4 +1,4 @@
1
1
  var R=Object.defineProperty;var s=(e,t)=>R(e,"name",{value:t,configurable:!0});import{Service as b}from"@deepseek-ai/cordis";import c from"@deepseek-ai/schemastery";import{Scene as D,authSend as N}from"@tencent/qb-auth-send-h5";import{existsSync as O,readFileSync as B}from"node:fs";import{createConnection as $}from"node:net";import{homedir as L}from"node:os";import{join as m}from"node:path";import{StringDecoder as F}from"node:string_decoder";const d={SOCIAL_TOKEN_EXPIRED:"-28",QB_TOKEN_EXPIRED:"-34"},X=1101;var p=class extends Error{static{s(this,"QbAuthExpiredError")}code="QB_AUTH_EXPIRED";authCode;constructor(e,t,i){super(t,i),this.name="QbAuthExpiredError",this.authCode=e}},y=class extends Error{static{s(this,"QbTokenExhaustedError")}code="QB_TOKEN_EXHAUSTED";constructor(e){super(e),this.name="QbTokenExhaustedError"}},r=class extends Error{static{s(this,"QbPipeError")}code="QB_PIPE_FAILED";constructor(e,t){super(e,t),this.name="QbPipeError"}},v=class extends Error{static{s(this,"QbRpcError")}code="QB_RPC_FAILED";constructor(e,t){super(e,t),this.name="QbRpcError"}};const q=s(e=>{if(typeof e=="string")return e;if(typeof e=="number")return String(e)},"readCodeField"),K=s(e=>{if(typeof e!="object"||e===null)return"";const t=e,i=t.err;if(typeof i=="object"&&i!==null){const n=q(i.code);if(n!==void 0)return n}return q(t.code)??""},"readRejectCode"),j=s(e=>e===d.SOCIAL_TOKEN_EXPIRED||e===d.QB_TOKEN_EXPIRED,"isAuthErrorCode"),E=s(e=>{const t=K(e);if(j(t))return t;let i;if(typeof e=="string")i=e;else if(typeof e=="object"&&e!==null)try{i=JSON.stringify(e)}catch{return null}else return null;for(const n of Object.values(d))if(i.includes(`"code":"${n}"`)||i.includes(`"code": "${n}"`))return n;return null},"extractAuthErrorCode"),P=s(e=>e===void 0||e===0?4:e===3?2:e===2||e===5?4:e,"convertAccountType"),I=s(e=>{switch(e.platform){case"darwin":return m(e.homedir,"Library","Application Support","QQBrowser3","ipc_token");case"win32":if(e.localAppData===void 0||e.localAppData==="")throw new r("qb-auth: %LOCALAPPDATA% is unset, cannot locate the QQBrowser IPC token file");return m(e.localAppData,"Tencent","QQBrowser","User Data","ipc_token");case"linux":return m(e.homedir,".config","qqbrowser","ipc_token");default:throw new r(`qb-auth: unsupported platform for QQBrowser IPC: ${e.platform}`)}},"resolveTokenFilePath"),k=s(e=>{const t=e.trim().split(/\r?\n/);if(t.length<3)throw new r(`qb-auth: malformed IPC token file: expected 3 lines (pid / token / pipe path), found ${t.length}`);const[i,n,o]=t;if(i===void 0||n===void 0||o===void 0)throw new r("qb-auth: malformed IPC token file: missing one of pid / token / pipe path");const a=Number.parseInt(i,10),f=n.trim(),l=o.trim();if(!Number.isInteger(a))throw new r("qb-auth: malformed IPC token file: first line is not a process id");if(f==="")throw new r("qb-auth: malformed IPC token file: empty auth token");if(l==="")throw new r("qb-auth: malformed IPC token file: empty pipe path");return{pid:a,token:f,pipePath:l}},"parseDiscovery");var _=class{static{s(this,"QbPipeClient")}options;socket;nextId=0;pending=new Map;decoder=new F("utf8");buffer="";accountInfoCache;closed=!1;constructor(e){this.options=e}isConnected(){return this.socket!==void 0&&!this.socket.destroyed}async connect(){if(this.closed)throw new r("qb-auth: pipe client is closed");const e=this.discover(),t=await this.openSocket(e.pipePath);this.socket=t,t.on("data",n=>{this.consume(n)});const i=await this.call("auth",{token:e.token});if(i.error!==void 0)throw this.close(),new r(`qb-auth: IPC handshake refused: ${i.error}`);if(i.result?.authenticated!==!0)throw this.close(),new r("qb-auth: IPC handshake refused: the browser did not authenticate this client")}close(){this.closed=!0;const e=this.socket;this.socket=void 0,this.failPending(new r("qb-auth: pipe connection closed")),e!==void 0&&e.destroy()}async getAccountInfo(){const e=this.accountInfoCache;if(e!==void 0)return e;const t=await this.call("getAccountInfo");return t.result!==void 0&&(t.result.account_type=P(t.result.account_type)),this.accountInfoCache=t,t}clearAccountInfoCache(){this.accountInfoCache=void 0}async refreshToken(e){const t=await this.call("refreshToken",{tokenType:e});return this.clearAccountInfoCache(),t}async getBrowserParam(){return this.call("getBrowserParam")}discover(){const e=this.options.tokenFilePath??I({platform:process.platform,homedir:L(),localAppData:process.env.LOCALAPPDATA});if(!O(e))throw new r(`qb-auth: QQBrowser is not running or its IPC service is off (no token file at ${e})`);return k(B(e,"utf-8"))}openSocket(e){return new Promise((t,i)=>{const n=$({path:e}),o=s(a=>{n.destroy(),i(new r(`qb-auth: cannot connect to QQBrowser IPC: ${a.message}`,{cause:a}))},"onConnectError");n.once("error",o),n.once("connect",()=>{n.off("error",o),n.on("error",a=>{this.failPending(new r(`qb-auth: IPC connection error: ${a.message}`,{cause:a})),n.destroy()}),n.once("close",()=>{this.failPending(new r("qb-auth: pipe connection closed"))}),t(n)})})}consume(e){this.buffer+=this.decoder.write(e);let t=this.buffer.indexOf(`
2
2
  `);for(;t!==-1;){const i=this.buffer.slice(0,t);this.buffer=this.buffer.slice(t+1),this.dispatch(i),t=this.buffer.indexOf(`
3
3
  `)}}dispatch(e){if(e.trim()==="")return;let t;try{t=JSON.parse(e)}catch{return}const i=this.pending.get(t.id);i!==void 0&&(this.pending.delete(t.id),clearTimeout(i.timer),i.settle(t))}call(e,t){return new Promise((i,n)=>{const o=this.socket;if(o===void 0||o.destroyed){n(new r("qb-auth: not connected to QQBrowser IPC"));return}this.nextId+=1;const a=this.nextId,f=setTimeout(()=>{this.pending.delete(a),n(new r(`qb-auth: IPC request timed out: ${e}`))},this.options.requestTimeoutMs);this.pending.set(a,{settle:i,fail:n,timer:f});const l=t===void 0?{id:a,method:e}:{id:a,method:e,params:t};o.write(`${JSON.stringify(l)}
4
- `)})}failPending(e){const t=[...this.pending.values()];this.pending.clear();for(const i of t)clearTimeout(i.timer),i.fail(e)}};const A="trpc_mtt_llm_access_proxy_LlmAccessProxy",C="ds_harness",Q="当日Token已耗尽,请切换模型或明日再试",w=s(e=>typeof e=="object"&&e!==null?e:{},"asRecord"),T=s(e=>typeof e=="string"?JSON.parse(e):e,"parseAuthSendReply"),h=s((...e)=>{for(const t of e)if(t!==void 0&&t!=="")return t;return""},"firstNonEmpty"),u=s((e,t)=>{const i=e[t];return typeof i=="string"?i:""},"readString");var x=class extends b{static{s(this,"QbAuth")}config;static Config=c.object({usePipe:c.boolean().default(!0),loginInfo:c.object({guid:c.string(),openid:c.string(),access_token:c.string().role("secret"),qbaccess_token:c.string().role("secret"),qbid:c.string(),appid:c.string(),account_type:c.string()}),identity:c.object({guid:c.string().default(""),qimei36:c.string().default(""),qua2:c.string().default("")}),tokenFilePath:c.string().default(""),maxRetry:c.natural().max(8).default(1),requestTimeoutMs:c.natural().min(100).max(12e4).default(5e3)});pipe;loginInfo;deviceInfo;accountResolved=!1;resolving;disposed=!1;constructor(e,t){super(e,"qbAuth"),this.config=t}async[b.init](){return this.ctx.effect(()=>()=>{this.disposed=!0,this.pipe?.close(),this.pipe=void 0},"qbAuth.pipe"),Promise.resolve()}async identity(){await this.ensureAccount();const e=w(this.deviceInfo);return{guid:h(u(e,"guid"),this.loginInfo?.guid,this.config.identity.guid),qimei36:h(u(e,"qimei36"),this.config.identity.qimei36),qua2:h(u(e,"qua2"),u(e,"qua"),this.config.identity.qua2)}}async rpc(e){return T(await this.callWithAuth(async(t,i)=>{const n={...t===void 0?{}:{loginInfo:t},...i===void 0?{}:{overRideInfo:i}};try{return await N({servantName:e.servantName,funcName:e.funcName,scene:D.external,isAuth:!0},e.body,n)}catch(o){throw console.error(`qb-auth: raw SDK rejection for ${e.funcName}:`,o),o}}))}async llmToken(){const e=await this.identity(),t=w(await this.rpc({servantName:A,funcName:"EncodeToken",body:{base:{qimei36:e.qimei36,qua2:e.qua2},authcall:{bus:C}}})),i=w(t.rsp),n=typeof i.ret=="number"?i.ret:void 0;if(n===1101)throw new y(Q);const o=t.token;if(typeof o!="string"||o==="")throw new v(`qb-auth: EncodeToken returned no ticket (ret=${String(n)}, reason=${u(i,"reason")})`);return o}async callWithAuth(e){await this.ensureAccount();const t=this.buildOverRideInfo();for(let i=0;;i+=1)try{return await e(this.loginInfo,t)}catch(n){const o=E(n);if(o===null)throw n;if(i>=this.config.maxRetry)throw new p(o,`qb-auth: ${g(o)} expired and could not be refreshed (code=${o})`,{cause:n});if(!this.config.usePipe)throw new p(o,`qb-auth: ${g(o)} expired but IPC refresh is disabled (code=${o})`,{cause:n});this.ctx.logger.debug(`qb-auth: refreshing ${g(o)} after upstream expiry`);try{await this.refreshViaPipe(o)}catch(a){throw new p(o,`qb-auth: ${g(o)} expired and the refresh failed (code=${o})`,{cause:a})}}}inspect(){return{pipeConnected:this.pipe?.isConnected()??!1,accountResolved:this.accountResolved,hasLoginInfo:this.loginInfo!==void 0}}buildOverRideInfo(){const e=w(this.deviceInfo),t=h(u(e,"qua2"),u(e,"qua"),this.config.identity.qua2),i=h(u(e,"qimei36"),this.config.identity.qimei36);if(!(t===""&&i===""))return{"q-qua2":t,"q-qimei36":i}}async ensureAccount(){if(!this.config.usePipe){this.loginInfo=this.config.loginInfo;return}if(this.accountResolved)return;const e=this.resolving;if(e!==void 0)return e;const t=this.loadFromPipe();this.resolving=t;try{await t,this.accountResolved=!0}finally{this.resolving=void 0}}async loadFromPipe(){const e=await this.ensurePipe(),[t,i]=await Promise.all([e.getAccountInfo(),e.getBrowserParam()]);if(t.error!==void 0||t.result===void 0)throw new r(`qb-auth: cannot read the QQBrowser account: ${t.error??"empty reply"}`);if(!t.result.isLogin)throw new r("qb-auth: QQBrowser is not signed in; sign in and retry");this.loginInfo=S(t.result),i.result===void 0?this.ctx.logger.debug("qb-auth: QQBrowser returned no device parameters; continuing without them"):this.deviceInfo=i.result}isDisposed(){return this.disposed}async ensurePipe(){if(this.isDisposed())throw new r("qb-auth: service disposed");const e=this.pipe;if(e!==void 0&&e.isConnected())return e;const t=new _({tokenFilePath:this.config.tokenFilePath===""?void 0:this.config.tokenFilePath,requestTimeoutMs:this.config.requestTimeoutMs});if(await t.connect(),this.isDisposed())throw t.close(),new r("qb-auth: service disposed");return this.pipe=t,t}async refreshViaPipe(e){const t=await this.ensurePipe(),i=e===d.QB_TOKEN_EXPIRED?"qbtoken":"token",n=await t.refreshToken(i);if(n.error!==void 0)throw new r(`qb-auth: ticket refresh failed: ${n.error}`);const o=await t.getAccountInfo();if(o.error!==void 0||o.result===void 0)throw new r(`qb-auth: cannot re-read the account after refresh: ${o.error??"empty reply"}`);this.loginInfo=S(o.result)}};const g=s(e=>e===d.QB_TOKEN_EXPIRED?"the QQBrowser ticket":"the social ticket","ticketName"),S=s(e=>({guid:e.guid,openid:e.openid,access_token:e.access_token,qbaccess_token:e.qbaccess_token,qbid:e.qbid,appid:e.appid,account_type:String(e.account_type)}),"toLoginInfo");export{d as AUTH_ERROR_CODES,C as BUS_IDENTIFIER,A as LLM_ACCESS_PROXY_SERVANT,x as QbAuth,x as default,p as QbAuthExpiredError,_ as QbPipeClient,r as QbPipeError,v as QbRpcError,y as QbTokenExhaustedError,Q as TOKEN_EXHAUSTED_MESSAGE,X as TOKEN_EXHAUSTED_RET,P as convertAccountType,E as extractAuthErrorCode,T as parseAuthSendReply,k as parseDiscovery,I as resolveTokenFilePath};
4
+ `)})}failPending(e){const t=[...this.pending.values()];this.pending.clear();for(const i of t)clearTimeout(i.timer),i.fail(e)}};const A="trpc_mtt_llm_access_proxy_LlmAccessProxy",C="ds_harness",Q="非常抱歉,您已将QQ浏览器提供的免费模型token额度已用完,需等待额度补充!若急需使用,可立即前往【自定义模型】创建专属配置,畅享无阻~感谢您的理解,我们正全力优化体验!",w=s(e=>typeof e=="object"&&e!==null?e:{},"asRecord"),T=s(e=>typeof e=="string"?JSON.parse(e):e,"parseAuthSendReply"),h=s((...e)=>{for(const t of e)if(t!==void 0&&t!=="")return t;return""},"firstNonEmpty"),u=s((e,t)=>{const i=e[t];return typeof i=="string"?i:""},"readString");var x=class extends b{static{s(this,"QbAuth")}config;static Config=c.object({usePipe:c.boolean().default(!0),loginInfo:c.object({guid:c.string(),openid:c.string(),access_token:c.string().role("secret"),qbaccess_token:c.string().role("secret"),qbid:c.string(),appid:c.string(),account_type:c.string()}),identity:c.object({guid:c.string().default(""),qimei36:c.string().default(""),qua2:c.string().default("")}),tokenFilePath:c.string().default(""),maxRetry:c.natural().max(8).default(1),requestTimeoutMs:c.natural().min(100).max(12e4).default(5e3)});pipe;loginInfo;deviceInfo;accountResolved=!1;resolving;disposed=!1;constructor(e,t){super(e,"qbAuth"),this.config=t}async[b.init](){return this.ctx.effect(()=>()=>{this.disposed=!0,this.pipe?.close(),this.pipe=void 0},"qbAuth.pipe"),Promise.resolve()}async identity(){await this.ensureAccount();const e=w(this.deviceInfo);return{guid:h(u(e,"guid"),this.loginInfo?.guid,this.config.identity.guid),qimei36:h(u(e,"qimei36"),this.config.identity.qimei36),qua2:h(u(e,"qua2"),u(e,"qua"),this.config.identity.qua2)}}async rpc(e){return T(await this.callWithAuth(async(t,i)=>{const n={...t===void 0?{}:{loginInfo:t},...i===void 0?{}:{overRideInfo:i}};try{return await N({servantName:e.servantName,funcName:e.funcName,scene:D.external,isAuth:!0},e.body,n)}catch(o){throw console.error(`qb-auth: raw SDK rejection for ${e.funcName}:`,o),o}}))}async llmToken(){const e=await this.identity(),t=w(await this.rpc({servantName:A,funcName:"EncodeToken",body:{base:{qimei36:e.qimei36,qua2:e.qua2},authcall:{bus:C}}})),i=w(t.rsp),n=typeof i.ret=="number"?i.ret:void 0;if(n===1101)throw new y(Q);const o=t.token;if(typeof o!="string"||o==="")throw new v(`qb-auth: EncodeToken returned no ticket (ret=${String(n)}, reason=${u(i,"reason")})`);return o}async callWithAuth(e){await this.ensureAccount();const t=this.buildOverRideInfo();for(let i=0;;i+=1)try{return await e(this.loginInfo,t)}catch(n){const o=E(n);if(o===null)throw n;if(i>=this.config.maxRetry)throw new p(o,`qb-auth: ${g(o)} expired and could not be refreshed (code=${o})`,{cause:n});if(!this.config.usePipe)throw new p(o,`qb-auth: ${g(o)} expired but IPC refresh is disabled (code=${o})`,{cause:n});this.ctx.logger.debug(`qb-auth: refreshing ${g(o)} after upstream expiry`);try{await this.refreshViaPipe(o)}catch(a){throw new p(o,`qb-auth: ${g(o)} expired and the refresh failed (code=${o})`,{cause:a})}}}inspect(){return{pipeConnected:this.pipe?.isConnected()??!1,accountResolved:this.accountResolved,hasLoginInfo:this.loginInfo!==void 0}}buildOverRideInfo(){const e=w(this.deviceInfo),t=h(u(e,"qua2"),u(e,"qua"),this.config.identity.qua2),i=h(u(e,"qimei36"),this.config.identity.qimei36);if(!(t===""&&i===""))return{"q-qua2":t,"q-qimei36":i}}async ensureAccount(){if(!this.config.usePipe){this.loginInfo=this.config.loginInfo;return}if(this.accountResolved)return;const e=this.resolving;if(e!==void 0)return e;const t=this.loadFromPipe();this.resolving=t;try{await t,this.accountResolved=!0}finally{this.resolving=void 0}}async loadFromPipe(){const e=await this.ensurePipe(),[t,i]=await Promise.all([e.getAccountInfo(),e.getBrowserParam()]);if(t.error!==void 0||t.result===void 0)throw new r(`qb-auth: cannot read the QQBrowser account: ${t.error??"empty reply"}`);if(!t.result.isLogin)throw new r("qb-auth: QQBrowser is not signed in; sign in and retry");this.loginInfo=S(t.result),i.result===void 0?this.ctx.logger.debug("qb-auth: QQBrowser returned no device parameters; continuing without them"):this.deviceInfo=i.result}isDisposed(){return this.disposed}async ensurePipe(){if(this.isDisposed())throw new r("qb-auth: service disposed");const e=this.pipe;if(e!==void 0&&e.isConnected())return e;const t=new _({tokenFilePath:this.config.tokenFilePath===""?void 0:this.config.tokenFilePath,requestTimeoutMs:this.config.requestTimeoutMs});if(await t.connect(),this.isDisposed())throw t.close(),new r("qb-auth: service disposed");return this.pipe=t,t}async refreshViaPipe(e){const t=await this.ensurePipe(),i=e===d.QB_TOKEN_EXPIRED?"qbtoken":"token",n=await t.refreshToken(i);if(n.error!==void 0)throw new r(`qb-auth: ticket refresh failed: ${n.error}`);const o=await t.getAccountInfo();if(o.error!==void 0||o.result===void 0)throw new r(`qb-auth: cannot re-read the account after refresh: ${o.error??"empty reply"}`);this.loginInfo=S(o.result)}};const g=s(e=>e===d.QB_TOKEN_EXPIRED?"the QQBrowser ticket":"the social ticket","ticketName"),S=s(e=>({guid:e.guid,openid:e.openid,access_token:e.access_token,qbaccess_token:e.qbaccess_token,qbid:e.qbid,appid:e.appid,account_type:String(e.account_type)}),"toLoginInfo");export{d as AUTH_ERROR_CODES,C as BUS_IDENTIFIER,A as LLM_ACCESS_PROXY_SERVANT,x as QbAuth,x as default,p as QbAuthExpiredError,_ as QbPipeClient,r as QbPipeError,v as QbRpcError,y as QbTokenExhaustedError,Q as TOKEN_EXHAUSTED_MESSAGE,X as TOKEN_EXHAUSTED_RET,P as convertAccountType,E as extractAuthErrorCode,T as parseAuthSendReply,k as parseDiscovery,I as resolveTokenFilePath};
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-qb-auth","version":"0.0.9","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/cordis":"^4.0.1","@deepseek-ai/dsh-invariants":"^0.0.9"},"dependencies":{"@tencent/qb-auth-send-h5":"^2.5.0","@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-qb-auth","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-invariants":"^0.0.10"},"dependencies":{"@tencent/qb-auth-send-h5":"^2.5.0","@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-repeat-tool-reminder","version":"0.0.9","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-invariants":"^0.0.9","@deepseek-ai/dsh-agent":"^0.0.9","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-tools":"^0.0.9"}}
1
+ {"name":"@deepseek-ai/dsh-repeat-tool-reminder","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-agent":"^0.0.10","@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-tools":"^0.0.10","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-sandbox","version":"0.0.9","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.0.9","@deepseek-ai/dsh-session":"^0.0.9","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-invariants":"^0.0.9"}}
1
+ {"name":"@deepseek-ai/dsh-sandbox","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-llm":"^0.0.10","@deepseek-ai/dsh-session":"^0.0.10","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-sandbox-local","version":"0.0.9","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.9","@deepseek-ai/dsh-llm":"^0.0.9","@deepseek-ai/dsh-sandbox":"^0.0.9","@deepseek-ai/dsh-session":"^0.0.9","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/dsh-sandbox-windows-acl":"^0.0.9","@deepseek-ai/node-addon-landlock-run":"^0.1.1","@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-sandbox-local","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-llm":"^0.0.10","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-sandbox":"^0.0.10","@deepseek-ai/dsh-session":"^0.0.10"},"dependencies":{"@deepseek-ai/dsh-sandbox-windows-acl":"^0.0.10","@deepseek-ai/node-addon-landlock-run":"^0.1.1","@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-sandbox-policy","version":"0.0.9","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-agent":"^0.0.9","@deepseek-ai/dsh-invariants":"^0.0.9","@deepseek-ai/dsh-system-prompt":"^0.0.9","@deepseek-ai/dsh-session":"^0.0.9","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-sandbox":"^0.0.9"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-sandbox-policy","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-sandbox":"^0.0.10","@deepseek-ai/dsh-agent":"^0.0.10","@deepseek-ai/dsh-session":"^0.0.10","@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-system-prompt":"^0.0.10"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-sandbox-windows-acl","version":"0.0.9","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.0.9","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"koffi":"^3.1.0"}}
1
+ {"name":"@deepseek-ai/dsh-sandbox-windows-acl","version":"0.0.10","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.0.10","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"koffi":"^3.1.0"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-schedule","version":"0.0.9","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-agent":"^0.0.9","@deepseek-ai/dsh-brand":"^0.0.9","@deepseek-ai/dsh-llm":"^0.0.9","@deepseek-ai/dsh-session":"^0.0.9","@deepseek-ai/dsh-session-persistence":"^0.0.9","@deepseek-ai/dsh-invariants":"^0.0.9","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-tools":"^0.0.9"}}
1
+ {"name":"@deepseek-ai/dsh-schedule","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-session-persistence":"^0.0.10","@deepseek-ai/dsh-llm":"^0.0.10","@deepseek-ai/dsh-session":"^0.0.10","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-agent":"^0.0.10","@deepseek-ai/dsh-tools":"^0.0.10","@deepseek-ai/dsh-brand":"^0.0.10"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-scope","version":"0.0.9","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.9","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-scope","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session","version":"0.0.9","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-invariants":"^0.0.9","@deepseek-ai/dsh-llm":"^0.0.9","@deepseek-ai/dsh-brand":"^0.0.9","@deepseek-ai/dsh-typert-protocol":"^0.0.9","@deepseek-ai/dsh-scope":"^0.0.9","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-session","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json","./surface":{"types":"./lib/types/surface.d.ts","default":"./lib/types/surface.js"}},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-brand":"^0.0.10","@deepseek-ai/dsh-llm":"^0.0.10","@deepseek-ai/dsh-scope":"^0.0.10","@deepseek-ai/dsh-typert-protocol":"^0.0.10","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-invariants":"^0.0.10"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session-checkpoint-policy","version":"0.0.9","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-agent":"^0.0.9","@deepseek-ai/dsh-invariants":"^0.0.9","@deepseek-ai/dsh-session":"^0.0.9","@deepseek-ai/dsh-llm":"^0.0.9","@deepseek-ai/dsh-tools":"^0.0.9","@deepseek-ai/dsh-session-persistence":"^0.0.9","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-session-checkpoint-policy","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-llm":"^0.0.10","@deepseek-ai/dsh-session":"^0.0.10","@deepseek-ai/dsh-session-persistence":"^0.0.10","@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-tools":"^0.0.10","@deepseek-ai/dsh-agent":"^0.0.10","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session-log-export","version":"0.0.9","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-ui-conversation":"^0.0.9","@deepseek-ai/dsh-client-runtime":"^0.0.9","@deepseek-ai/dsh-client-locale":"^0.0.9","@deepseek-ai/dsh-client-ui-commands":"^0.0.9","@deepseek-ai/dsh-client-ui-slots":"^0.0.9","@deepseek-ai/dsh-client-ui-primitives":"^0.0.9","@deepseek-ai/dsh-invariants":"^0.0.9","@deepseek-ai/dsh-commands":"^0.0.9"},"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.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"react":"^18.2.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-client-runtime":"^0.0.10","@deepseek-ai/dsh-client-ui-commands":"^0.0.10","@deepseek-ai/dsh-client-locale":"^0.0.10","@deepseek-ai/dsh-client-ui-primitives":"^0.0.10","@deepseek-ai/dsh-client-ui-conversation":"^0.0.10","@deepseek-ai/dsh-client-ui-slots":"^0.0.10","@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-commands":"^0.0.10"},"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.0.9","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-brand":"^0.0.9","@deepseek-ai/dsh-session":"^0.0.9","@deepseek-ai/dsh-timeout":"^0.0.9","@deepseek-ai/dsh-invariants":"^0.0.9","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-session-persistence","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-brand":"^0.0.10","@deepseek-ai/dsh-session":"^0.0.10","@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-timeout":"^0.0.10"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session-persistence-jsonl","version":"0.0.9","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.9","@deepseek-ai/dsh-session":"^0.0.9","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session-persistence":"^0.0.9"},"dependencies":{"koffi":"^3.1.0","@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-session-persistence-jsonl","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-session":"^0.0.10","@deepseek-ai/dsh-session-persistence":"^0.0.10","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"koffi":"^3.1.0","@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session-projection","version":"0.0.9","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.0.9","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session":"^0.0.9"}}
1
+ {"name":"@deepseek-ai/dsh-session-projection","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"zod":"^4.4.3"},"peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session":"^0.0.10"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session-projection-cache","version":"0.0.9","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.0.9","@deepseek-ai/dsh-session":"^0.0.9","@deepseek-ai/dsh-session-persistence":"^0.0.9","@deepseek-ai/dsh-session-projection":"^0.0.9","@deepseek-ai/dsh-storage-domain":"^0.0.9","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-session-projection-cache","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"zod":"^4.4.3","@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-session-persistence":"^0.0.10","@deepseek-ai/dsh-session":"^0.0.10","@deepseek-ai/dsh-storage-domain":"^0.0.10","@deepseek-ai/dsh-session-projection":"^0.0.10","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session-query","version":"0.0.9","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-brand":"^0.0.9","@deepseek-ai/dsh-llm":"^0.0.9","@deepseek-ai/dsh-invariants":"^0.0.9","@deepseek-ai/dsh-session-persistence":"^0.0.9","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session":"^0.0.9","@deepseek-ai/dsh-session-title":"^0.0.9"},"peerDependenciesMeta":{"@deepseek-ai/dsh-session-persistence":{"optional":true}}}
1
+ {"name":"@deepseek-ai/dsh-session-query","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-brand":"^0.0.10","@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-session-title":"^0.0.10","@deepseek-ai/dsh-session-persistence":"^0.0.10","@deepseek-ai/dsh-session":"^0.0.10","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-llm":"^0.0.10"},"peerDependenciesMeta":{"@deepseek-ai/dsh-session-persistence":{"optional":true}}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session-query-sqlite","version":"0.0.9","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.9","@deepseek-ai/dsh-session-persistence":"^0.0.9","@deepseek-ai/dsh-session":"^0.0.9","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session-query":"^0.0.9"},"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.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-session":"^0.0.10","@deepseek-ai/dsh-session-persistence":"^0.0.10","@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-session-query":"^0.0.10","@deepseek-ai/cordis":"^4.0.1"},"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.0.9","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-invariants":"^0.0.9","@deepseek-ai/dsh-llm":"^0.0.9","@deepseek-ai/dsh-compaction":"^0.0.9","@deepseek-ai/dsh-session-query":"^0.0.9","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-agent":"^0.0.9","@deepseek-ai/dsh-session":"^0.0.9","@deepseek-ai/dsh-output-retention":"^0.0.9"}}
1
+ {"name":"@deepseek-ai/dsh-session-reference","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-llm":"^0.0.10","@deepseek-ai/dsh-output-retention":"^0.0.10","@deepseek-ai/dsh-agent":"^0.0.10","@deepseek-ai/dsh-session":"^0.0.10","@deepseek-ai/dsh-session-query":"^0.0.10","@deepseek-ai/dsh-compaction":"^0.0.10","@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session-stats","version":"0.0.9","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.0.9","@deepseek-ai/dsh-llm":"^0.0.9","@deepseek-ai/dsh-session":"^0.0.9","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session-projection":"^0.0.9"},"dependencies":{"zod":"^4.4.3"}}
1
+ {"name":"@deepseek-ai/dsh-session-stats","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./client":{"types":"./lib/types/client.d.ts","default":"./lib/types/client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-session":"^0.0.10","@deepseek-ai/dsh-llm":"^0.0.10","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session-projection":"^0.0.10"},"dependencies":{"zod":"^4.4.3"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session-telemetry","version":"0.0.9","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-agent":"^0.0.9","@deepseek-ai/dsh-invariants":"^0.0.9","@deepseek-ai/dsh-session":"^0.0.9","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-session-telemetry","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-agent":"^0.0.10","@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-session":"^0.0.10","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session-telemetry-otel","version":"0.0.9","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.0.9","@deepseek-ai/dsh-invariants":"^0.0.9","@deepseek-ai/dsh-session":"^0.0.9","@deepseek-ai/dsh-session-telemetry":"^0.0.9","@deepseek-ai/dsh-llm":"^0.0.9","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-anonymous-user-id":"^0.0.9"}}
1
+ {"name":"@deepseek-ai/dsh-session-telemetry-otel","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"@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.0.10","@deepseek-ai/dsh-llm":"^0.0.10","@deepseek-ai/dsh-session":"^0.0.10","@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-session-telemetry":"^0.0.10","@deepseek-ai/dsh-anonymous-user-id":"^0.0.10","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-session-title","version":"0.0.9","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.0.9","@deepseek-ai/dsh-llm":"^0.0.9","@deepseek-ai/dsh-session":"^0.0.9","@deepseek-ai/dsh-session-projection":"^0.0.9","@deepseek-ai/dsh-invariants":"^0.0.9","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"zod":"^4.4.3","@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-session-title","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./client":{"types":"./lib/types/client.d.ts","default":"./lib/types/client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-brand":"^0.0.10","@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-llm":"^0.0.10","@deepseek-ai/dsh-session":"^0.0.10","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session-projection":"^0.0.10"},"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.0.9","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.9","@deepseek-ai/dsh-llm":"^0.0.9","@deepseek-ai/dsh-session":"^0.0.9","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session-title":"^0.0.9","@deepseek-ai/dsh-session-title-llm":"^0.0.9"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-session-title-first-prompt-llm","version":"0.0.10","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.10","@deepseek-ai/dsh-session":"^0.0.10","@deepseek-ai/dsh-session-title":"^0.0.10","@deepseek-ai/dsh-llm":"^0.0.10","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-session-title-llm":"^0.0.10"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}