@qqbrowser/qbot-dsh 0.1.2 → 0.1.4

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 (203) hide show
  1. package/config/agent-presets/code/agent.cordis.yml +3 -0
  2. package/config/agent-presets/minimal/agent.cordis.yml +6 -1
  3. package/config/agent-presets/standard/agent.cordis.yml +3 -0
  4. package/config/skills/bilibili-video-download/SKILL.md +99 -0
  5. package/config/skills/bilibili-video-download/bilibili.webmcp.tools.js +53 -0
  6. package/config/skills/qqbrowser-use/SKILL.md +444 -0
  7. package/config/skills/qqbrowser-use/references/commands-extended.md +74 -0
  8. package/config/skills/qqbrowser-use/references/playbook.md +671 -0
  9. package/config/skills/qqbrowser-use/references/session-lifecycle.md +102 -0
  10. package/cordis.patch.yml +5 -0
  11. package/lib/bin.js +1 -1
  12. package/lib/client.js +1 -1
  13. package/lib/{dump-config-CIL0Goqj.js → dump-config-B-8ZRxke.js} +1 -1
  14. package/lib/index.js +4 -1
  15. package/lib/{plugin-viWCLnSr.js → plugin-zyZ50bsR.js} +1 -1
  16. package/lib/profile-boot-BBRd7YBK.js +1 -0
  17. package/lib/profile-boot-C5WShQrD.js +8 -0
  18. package/lib/sandbox-local.js +1 -0
  19. package/node_modules/@deepseek-ai/cordis-plugin-hmr/package.json +1 -1
  20. package/node_modules/@deepseek-ai/dsh-agent/package.json +1 -1
  21. package/node_modules/@deepseek-ai/dsh-agent-default-model/package.json +1 -1
  22. package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +1 -1
  23. package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +1 -1
  24. package/node_modules/@deepseek-ai/dsh-agent-presets/package.json +1 -1
  25. package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +1 -1
  26. package/node_modules/@deepseek-ai/dsh-api-gateway/package.json +1 -1
  27. package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +1 -1
  28. package/node_modules/@deepseek-ai/dsh-app-boot/package.json +1 -1
  29. package/node_modules/@deepseek-ai/dsh-attachment/package.json +1 -1
  30. package/node_modules/@deepseek-ai/dsh-base/package.json +1 -1
  31. package/node_modules/@deepseek-ai/dsh-bash-local/package.json +1 -1
  32. package/node_modules/@deepseek-ai/dsh-bash-sandbox/package.json +1 -1
  33. package/node_modules/@deepseek-ai/dsh-client-connection/package.json +1 -1
  34. package/node_modules/@deepseek-ai/dsh-client-hmr/package.json +1 -1
  35. package/node_modules/@deepseek-ai/dsh-client-locale/lib/client.js +1 -1
  36. package/node_modules/@deepseek-ai/dsh-client-locale/package.json +1 -1
  37. package/node_modules/@deepseek-ai/dsh-client-runtime/package.json +1 -1
  38. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +1 -1
  39. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/package.json +1 -1
  40. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +1 -1
  41. package/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +1 -1
  42. package/node_modules/@deepseek-ai/dsh-client-ui-commands/package.json +1 -1
  43. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +5 -5
  44. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +1 -1
  45. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/lib/client.js +1 -1
  46. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/package.json +1 -1
  47. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +1 -1
  48. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +1 -1
  49. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/lib/client.js +1 -1
  50. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/package.json +1 -1
  51. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-native/package.json +1 -1
  52. package/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +1 -1
  53. package/node_modules/@deepseek-ai/dsh-client-ui-goal/package.json +1 -1
  54. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/lib/client.js +1 -1
  55. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/package.json +1 -1
  56. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +1 -1
  57. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/package.json +1 -1
  58. package/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js +1 -1
  59. package/node_modules/@deepseek-ai/dsh-client-ui-layout/package.json +1 -1
  60. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/lib/client.js +1 -1
  61. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/package.json +1 -1
  62. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +1 -1
  63. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/package.json +1 -1
  64. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/lib/client.js +1 -1
  65. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/package.json +1 -1
  66. package/node_modules/@deepseek-ai/dsh-client-ui-plan/lib/client.js +1 -1
  67. package/node_modules/@deepseek-ai/dsh-client-ui-plan/package.json +1 -1
  68. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/package.json +1 -1
  69. package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +1 -1
  70. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +1 -1
  71. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +1 -1
  72. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +1 -1
  73. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +1 -1
  74. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +1 -1
  75. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +1 -1
  76. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/client.js +1 -1
  77. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +1 -1
  78. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
  79. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/package.json +1 -1
  80. package/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +1 -1
  81. package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +1 -1
  82. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +1 -1
  83. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +1 -1
  84. package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +1 -1
  85. package/node_modules/@deepseek-ai/dsh-client-ui-theme/package.json +1 -1
  86. package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +1 -1
  87. package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +1 -1
  88. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +3 -3
  89. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/package.json +1 -1
  90. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +1 -1
  91. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/package.json +1 -1
  92. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +1 -1
  93. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/package.json +1 -1
  94. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +1 -1
  95. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +1 -1
  96. package/node_modules/@deepseek-ai/dsh-client-web/package.json +1 -1
  97. package/node_modules/@deepseek-ai/dsh-cmdline/package.json +1 -1
  98. package/node_modules/@deepseek-ai/dsh-code-runtime-worker-thread/package.json +1 -1
  99. package/node_modules/@deepseek-ai/dsh-command-compact/package.json +1 -1
  100. package/node_modules/@deepseek-ai/dsh-command-feedback/package.json +1 -1
  101. package/node_modules/@deepseek-ai/dsh-command-goal/package.json +1 -1
  102. package/node_modules/@deepseek-ai/dsh-commands/package.json +1 -1
  103. package/node_modules/@deepseek-ai/dsh-compaction/package.json +1 -1
  104. package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +1 -1
  105. package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/package.json +1 -1
  106. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +1 -1
  107. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/package.json +1 -1
  108. package/node_modules/@deepseek-ai/dsh-credentials-local/package.json +1 -1
  109. package/node_modules/@deepseek-ai/dsh-fs/package.json +1 -1
  110. package/node_modules/@deepseek-ai/dsh-fs-sandbox/package.json +1 -1
  111. package/node_modules/@deepseek-ai/dsh-goal/package.json +1 -1
  112. package/node_modules/@deepseek-ai/dsh-goal-round-driver/package.json +1 -1
  113. package/node_modules/@deepseek-ai/dsh-headless/package.json +1 -1
  114. package/node_modules/@deepseek-ai/dsh-host-apiproxy/package.json +1 -1
  115. package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/package.json +1 -1
  116. package/node_modules/@deepseek-ai/dsh-host-frontend-static/package.json +1 -1
  117. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/package.json +1 -1
  118. package/node_modules/@deepseek-ai/dsh-host-webserver/package.json +1 -1
  119. package/node_modules/@deepseek-ai/dsh-jobs/package.json +1 -1
  120. package/node_modules/@deepseek-ai/dsh-jobs-local/package.json +1 -1
  121. package/node_modules/@deepseek-ai/dsh-llm/package.json +1 -1
  122. package/node_modules/@deepseek-ai/dsh-llm-deepseek/package.json +1 -1
  123. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +1 -1
  124. package/node_modules/@deepseek-ai/dsh-llm-retry/package.json +1 -1
  125. package/node_modules/@deepseek-ai/dsh-mcp-client/package.json +1 -1
  126. package/node_modules/@deepseek-ai/dsh-message-feedback/package.json +1 -1
  127. package/node_modules/@deepseek-ai/dsh-permission-presets/package.json +1 -1
  128. package/node_modules/@deepseek-ai/dsh-plan-mode/package.json +1 -1
  129. package/node_modules/@deepseek-ai/dsh-pwsh-local/package.json +1 -1
  130. package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +1 -1
  131. package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/package.json +1 -1
  132. package/node_modules/@deepseek-ai/dsh-sandbox/package.json +1 -1
  133. package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +1 -1
  134. package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +1 -1
  135. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/package.json +1 -1
  136. package/node_modules/@deepseek-ai/dsh-schedule/package.json +1 -1
  137. package/node_modules/@deepseek-ai/dsh-session/package.json +1 -1
  138. package/node_modules/@deepseek-ai/dsh-session-checkpoint-policy/package.json +1 -1
  139. package/node_modules/@deepseek-ai/dsh-session-log-export/package.json +1 -1
  140. package/node_modules/@deepseek-ai/dsh-session-persistence/package.json +1 -1
  141. package/node_modules/@deepseek-ai/dsh-session-projection/package.json +1 -1
  142. package/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +1 -1
  143. package/node_modules/@deepseek-ai/dsh-session-query/package.json +1 -1
  144. package/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +1 -1
  145. package/node_modules/@deepseek-ai/dsh-session-reference/package.json +1 -1
  146. package/node_modules/@deepseek-ai/dsh-session-stats/package.json +1 -1
  147. package/node_modules/@deepseek-ai/dsh-session-telemetry/package.json +1 -1
  148. package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/package.json +1 -1
  149. package/node_modules/@deepseek-ai/dsh-session-title/package.json +1 -1
  150. package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/package.json +1 -1
  151. package/node_modules/@deepseek-ai/dsh-settings/package.json +1 -1
  152. package/node_modules/@deepseek-ai/dsh-settings-file/package.json +1 -1
  153. package/node_modules/@deepseek-ai/dsh-shell/package.json +1 -1
  154. package/node_modules/@deepseek-ai/dsh-shell-env/package.json +1 -1
  155. package/node_modules/@deepseek-ai/dsh-skill/package.json +1 -1
  156. package/node_modules/@deepseek-ai/dsh-skill-badge/package.json +1 -1
  157. package/node_modules/@deepseek-ai/dsh-skill-filesystem/package.json +1 -1
  158. package/node_modules/@deepseek-ai/dsh-spill/package.json +1 -1
  159. package/node_modules/@deepseek-ai/dsh-spill-policy/package.json +1 -1
  160. package/node_modules/@deepseek-ai/dsh-storage-domain/package.json +1 -1
  161. package/node_modules/@deepseek-ai/dsh-storage-json/package.json +1 -1
  162. package/node_modules/@deepseek-ai/dsh-subagent/package.json +1 -1
  163. package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/package.json +1 -1
  164. package/node_modules/@deepseek-ai/dsh-subagent-in-process-driver/package.json +1 -1
  165. package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/package.json +1 -1
  166. package/node_modules/@deepseek-ai/dsh-subprocess/package.json +1 -1
  167. package/node_modules/@deepseek-ai/dsh-subprocess-local/package.json +1 -1
  168. package/node_modules/@deepseek-ai/dsh-system-prompt/package.json +1 -1
  169. package/node_modules/@deepseek-ai/dsh-terminal/package.json +1 -1
  170. package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +1 -1
  171. package/node_modules/@deepseek-ai/dsh-time-context/package.json +1 -1
  172. package/node_modules/@deepseek-ai/dsh-tmux-context/package.json +1 -1
  173. package/node_modules/@deepseek-ai/dsh-token-meter/package.json +1 -1
  174. package/node_modules/@deepseek-ai/dsh-tool-ask-user/package.json +1 -1
  175. package/node_modules/@deepseek-ai/dsh-tool-bash/package.json +1 -1
  176. package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/package.json +1 -1
  177. package/node_modules/@deepseek-ai/dsh-tool-call-timeout-policy/package.json +1 -1
  178. package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +1 -1
  179. package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +1 -1
  180. package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +1 -1
  181. package/node_modules/@deepseek-ai/dsh-tool-goal/package.json +1 -1
  182. package/node_modules/@deepseek-ai/dsh-tool-jobs/package.json +1 -1
  183. package/node_modules/@deepseek-ai/dsh-tool-pwsh/package.json +1 -1
  184. package/node_modules/@deepseek-ai/dsh-tool-ralph/package.json +1 -1
  185. package/node_modules/@deepseek-ai/dsh-tool-skill/package.json +1 -1
  186. package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/package.json +1 -1
  187. package/node_modules/@deepseek-ai/dsh-tool-subagent/package.json +1 -1
  188. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/package.json +1 -1
  189. package/node_modules/@deepseek-ai/dsh-tool-subagent-report/package.json +1 -1
  190. package/node_modules/@deepseek-ai/dsh-tool-todo/package.json +1 -1
  191. package/node_modules/@deepseek-ai/dsh-tool-web/package.json +1 -1
  192. package/node_modules/@deepseek-ai/dsh-tool-workflow/package.json +1 -1
  193. package/node_modules/@deepseek-ai/dsh-tools/package.json +1 -1
  194. package/node_modules/@deepseek-ai/dsh-user-approval/package.json +1 -1
  195. package/node_modules/@deepseek-ai/dsh-user-questions/package.json +1 -1
  196. package/node_modules/@deepseek-ai/dsh-web-app/package.json +1 -1
  197. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +1 -1
  198. package/node_modules/@deepseek-ai/dsh-workflow/package.json +1 -1
  199. package/node_modules/@deepseek-ai/dsh-workflow-worker-thread/package.json +1 -1
  200. package/node_modules/@deepseek-ai/dsh-workspace/package.json +1 -1
  201. package/package.json +1 -1
  202. package/lib/profile-boot-CxJUSdnu.js +0 -1
  203. package/lib/profile-boot-DCgBQ4qO.js +0 -8
@@ -0,0 +1,102 @@
1
+ # Session Lifecycle
2
+
3
+ > Load this reference when you need the full rules for `browser_start_session` / `browser_end_session`, or when handling **composite tasks**.
4
+
5
+ ## Why Sessions Are Mandatory
6
+
7
+ AI agents MUST wrap every task with `browser_start_session` / `browser_end_session`. The extension creates a dedicated **Chrome Tab Group** as the AI workspace, isolating the task from the user's other tabs and letting the user review the AI's work after the task ends (the tab group is preserved on `end_session`).
8
+
9
+ ## Hard Rules
10
+
11
+ - **The daemon MUST be running before `browser_start_session`** — start it exactly as `qqbrowser-skill serve --daemon --from-qbotclaw --ws-port=<port>` (both flags required) and wait for its WebSocket channel to the browser extension.
12
+ - **Always call `browser_start_session` first**, before any other `browser_*` command. Calling other commands without an active session is **forbidden** — it will mix AI-driven tabs with the user's personal browsing.
13
+ - **Isolation mode is fixed to `enforce`** and is no longer configurable from the client side — `browser_start_session` does not accept an `--isolation` flag. Every AI task automatically runs in the enforced Tab Group isolation mode.
14
+ - **Always call `browser_end_session`** when the task finishes (success, failure, or early exit), so the in-memory mapping is released cleanly.
15
+ - **One `sessionId` per task.** Generate a unique, stable ID per task and do **not** reuse it across unrelated tasks. Recommended format: `task-<purpose>-<counter>` (e.g. `task-form-001`, `task-extract-002`). UUIDs or other stable unique strings also work.
16
+
17
+ ## Command Syntax
18
+
19
+ ```bash
20
+ browser_start_session --sessionId <id> [--title "<title>"] [--color <color>] [--initialUrl <url>]
21
+ browser_end_session --sessionId <id>
22
+ ```
23
+
24
+ Optional flags for `browser_start_session`:
25
+
26
+ | Flag | Default | Notes |
27
+ |------|---------|-------|
28
+ | `--title` | `"AI: <first 8 chars of sessionId>"` | Shown as the tab group title |
29
+ | `--color` | `blue` | One of: `blue`, `red`, `green`, `yellow`, `grey`, `pink`, `purple`, `cyan`, `orange` |
30
+ | `--initialUrl` | `about:blank` | Page to open in the first tab |
31
+
32
+ Example:
33
+
34
+ ```bash
35
+ qqbrowser-skill browser_start_session --sessionId task-demo-001 \
36
+ --title "AI: research" --color blue \
37
+ --initialUrl https://www.baidu.com
38
+ ```
39
+
40
+ ## Idempotency & Recovery
41
+
42
+ - `browser_start_session` is **idempotent** — calling it twice with the same `sessionId` reuses the existing tab group.
43
+ - `browser_end_session` only releases the in-memory mapping; the tab group and its tabs stay open for the user to review.
44
+ - If the WebSocket disconnects, the extension auto-ends the session after a ~30-minute grace period, so leaking sessions on crashes is bounded — but AI agents must still explicitly call `browser_end_session`; do not rely on the grace period as the normal exit path.
45
+
46
+ ## Human-in-the-Loop Verification Points
47
+
48
+ If the site requires CAPTCHA, SMS code, email code, MFA/2FA, QR login, device confirmation, or any other human verification step:
49
+
50
+ - Pause automation at that point.
51
+ - Keep the current session alive.
52
+ - Ask the user to complete the verification manually.
53
+ - Resume only after the verification step is finished.
54
+
55
+ Do **not** blindly retry replay or switch branches just because a human verification wall appears.
56
+
57
+ ---
58
+
59
+ ## Handling Composite Tasks
60
+
61
+ A **composite task** is any user request that contains multiple discrete browser sub-tasks, especially when data must be transformed, summarized, rewritten, or routed between steps.
62
+
63
+ It may span multiple domains, multiple sites within one workflow, or multiple phases inside the same site/app. Detect it before starting the session and handle it explicitly — do **not** feed the whole request to a single `playbook_list` call.
64
+
65
+ ### Pipeline
66
+
67
+ 1. **Decompose** the request into atomic sub-tasks (one target site, one app phase, or one discrete action each).
68
+ 2. **Start exactly ONE session for the whole composite task** before the first sub-task. Do **not** start/end a separate session for each sub-task.
69
+ 3. **For each sub-task independently**, run the sub-task flow: call `playbook_list`, then pick **Branch A** (replay) if a playbook matches, otherwise fall back to **Branch B** (only if the user asked to record) or **Branch C** (one-off manual) — the branch choice is made **per sub-task**, not for the composite as a whole.
70
+ 4. **Between sub-tasks**, perform AI mediation (summarize, rewrite, transform format). No browser commands are needed in the mediation stage; consume the previous sub-task's output and produce the next sub-task's input variables.
71
+ 5. **Each Branch A replay runs on its own `browser_replay` invocation** — never chain multiple playbooks inside a single call, and never wrap them in one shared `task_begin` / `task_end` (recording, if any, is also per sub-task).
72
+ 6. **Report progress after each sub-task completes**, since a composite pipeline can run for many minutes.
73
+ 7. **End the session once**, after all sub-tasks and mediation are complete.
74
+
75
+ ### `sessionId` Rule for Composites
76
+
77
+ **One `sessionId` for the whole composite task.** A composite request is a single task — reuse the **same** `sessionId` for every sub-task inside the pipeline, so they share the same Tab Group and the user can review the full workflow in one place. Do **not** open a new session per sub-task.
78
+
79
+ ### Example
80
+
81
+ ```bash
82
+ # One session for the whole composite task
83
+ qqbrowser-skill browser_start_session --sessionId task-composite-001
84
+
85
+ # Sub-task A: playbook exists → Branch A (replay)
86
+ qqbrowser-skill playbook_list
87
+ qqbrowser-skill browser_replay --script ~/.qqbrowser-skill/playbooks/zhihu-article-extractor.json \
88
+ --variables '{"topic": "人工智能", "count": "3"}'
89
+
90
+ # AI mediation: transform extracted content to target platform style
91
+ # (no browser commands here — pure AI processing of Sub-task A's output)
92
+
93
+ # Sub-task B: playbook exists → Branch A (replay)
94
+ qqbrowser-skill playbook_list
95
+ qqbrowser-skill browser_replay --script ~/.qqbrowser-skill/playbooks/xiaohongshu-publish.json \
96
+ --variables '{"notes_title": "AI生成标题", "notes_content": "转换后内容"}'
97
+
98
+ # If Sub-task B had NO playbook, fall back to Branch B / C for that sub-task only
99
+ # (still inside the same session).
100
+
101
+ qqbrowser-skill browser_end_session --sessionId task-composite-001
102
+ ```
package/cordis.patch.yml CHANGED
@@ -1,3 +1,8 @@
1
+ - id: sandbox
2
+ disabled: true
3
+ - insert:
4
+ - id: qbot-sandbox
5
+ name: '@qqbrowser/qbot-dsh/sandbox-local'
1
6
  - id: agent-default-model
2
7
  config:
3
8
  provider: qb-gateway
package/lib/bin.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- var d=Object.defineProperty;var n=(r,a)=>d(r,"name",{value:a,configurable:!0});import{n as l,t as h}from"./native-protocol-DdrIh89-.js";import{readFileSync as f}from"node:fs";import{homedir as m}from"node:os";import{join as w}from"node:path";import{fileURLToPath as u}from"node:url";function g(r,a=process.platform,i=process.arch){if(r===null||typeof r!="object"||Array.isArray(r))throw new Error("qbot-dsh: package manifest is not an object");const o=r,s=typeof o.version=="string"?o.version:"0.0.0";if(o.dshRelease===void 0)return s;if(o.dshRelease===null||typeof o.dshRelease!="object"||Array.isArray(o.dshRelease))throw new Error("qbot-dsh: package manifest has invalid dshRelease metadata");const e=o.dshRelease.targets;if(!Array.isArray(e)||e.length===0||e.some(p=>typeof p!="string"))throw new Error("qbot-dsh: package manifest has invalid dshRelease.targets metadata");const c=`${a}-${i}`;if(!e.includes(c))throw new Error(`qbot-dsh: unsupported target ${c}; this package supports ${e.join(", ")}`);return s}n(g,"releaseVersionForTarget"),process.env.DSH_HOME??=w(m(),".qbot-dsh");function v(){return g(JSON.parse(f(u(new URL("../package.json",import.meta.url)),"utf8")))}n(v,"readVersion");const y=process.argv.slice(2),{parseDshArgs:b}=await import("./args-w1okyL78.js"),t=b(y,v());switch(t.mode){case"profile":{const r=t.nativeProtocol===void 0?void 0:new h,{runProfile:a}=await import("./profile-boot-CxJUSdnu.js"),{loadLayeredEnv:i}=await import("@deepseek-ai/dsh-app-boot"),{ensureGatewayPort:o}=await import("./gateway-port-CSFbDyoZ.js");try{await o();const{ctx:s}=await a({environment:i("qbot-dsh"),profile:t.profile,patchFiles:t.patches,args:t.args}),e=s.get("webServer");r!==void 0?e===void 0?r.emitReady():r.emitReady({host:"127.0.0.1",port:e.port,pid:process.pid}):e!==void 0&&console.log(`qbot-dsh web: http://${e.host}:${String(e.port)}`)}catch(s){throw r?.emitError(l(s)),s}break}case"plugin":{const{runPlugin:r}=await import("./plugin-viWCLnSr.js");process.exit(r(t.profile,t.args));break}case"dump-config":{const{runDumpConfig:r}=await import("./dump-config-CIL0Goqj.js"),{ensureGatewayPort:a}=await import("./gateway-port-CSFbDyoZ.js");await a(),r(t.profile,t.defaultOnly,t.patches);break}default:throw new Error(`qbot-dsh: unhandled invocation mode ${JSON.stringify(t)}`)}export{};
2
+ var d=Object.defineProperty;var n=(r,a)=>d(r,"name",{value:a,configurable:!0});import{n as l,t as h}from"./native-protocol-DdrIh89-.js";import{readFileSync as f}from"node:fs";import{homedir as m}from"node:os";import{join as w}from"node:path";import{fileURLToPath as u}from"node:url";function g(r,a=process.platform,i=process.arch){if(r===null||typeof r!="object"||Array.isArray(r))throw new Error("qbot-dsh: package manifest is not an object");const o=r,s=typeof o.version=="string"?o.version:"0.0.0";if(o.dshRelease===void 0)return s;if(o.dshRelease===null||typeof o.dshRelease!="object"||Array.isArray(o.dshRelease))throw new Error("qbot-dsh: package manifest has invalid dshRelease metadata");const e=o.dshRelease.targets;if(!Array.isArray(e)||e.length===0||e.some(p=>typeof p!="string"))throw new Error("qbot-dsh: package manifest has invalid dshRelease.targets metadata");const c=`${a}-${i}`;if(!e.includes(c))throw new Error(`qbot-dsh: unsupported target ${c}; this package supports ${e.join(", ")}`);return s}n(g,"releaseVersionForTarget"),process.env.DSH_HOME??=w(m(),".qbot-dsh");function v(){return g(JSON.parse(f(u(new URL("../package.json",import.meta.url)),"utf8")))}n(v,"readVersion");const y=process.argv.slice(2),{parseDshArgs:b}=await import("./args-w1okyL78.js"),t=b(y,v());switch(t.mode){case"profile":{const r=t.nativeProtocol===void 0?void 0:new h,{runProfile:a}=await import("./profile-boot-BBRd7YBK.js"),{loadLayeredEnv:i}=await import("@deepseek-ai/dsh-app-boot"),{ensureGatewayPort:o}=await import("./gateway-port-CSFbDyoZ.js");try{await o();const{ctx:s}=await a({environment:i("qbot-dsh"),profile:t.profile,patchFiles:t.patches,args:t.args}),e=s.get("webServer");r!==void 0?e===void 0?r.emitReady():r.emitReady({host:"127.0.0.1",port:e.port,pid:process.pid}):e!==void 0&&console.log(`qbot-dsh web: http://${e.host}:${String(e.port)}`)}catch(s){throw r?.emitError(l(s)),s}break}case"plugin":{const{runPlugin:r}=await import("./plugin-zyZ50bsR.js");process.exit(r(t.profile,t.args));break}case"dump-config":{const{runDumpConfig:r}=await import("./dump-config-B-8ZRxke.js"),{ensureGatewayPort:a}=await import("./gateway-port-CSFbDyoZ.js");await a(),r(t.profile,t.defaultOnly,t.patches);break}default:throw new Error(`qbot-dsh: unhandled invocation mode ${JSON.stringify(t)}`)}export{};
package/lib/client.js CHANGED
@@ -1 +1 @@
1
- var F=Object.defineProperty;var n=(u,h)=>F(u,"name",{value:h,configurable:!0});window.__ModuleLoader__.load({id:"@qqbrowser/qbot-dsh",factory:n(u=>{var h={exports:{}},k=h.exports;Object.defineProperty(k,Symbol.toStringTag,{value:"Module"});let S=u("@deepseek-ai/dsh-client-runtime/client"),l=u("react/jsx-runtime"),v=u("@deepseek-ai/dsh-client-ui-primitives");function q(){return globalThis.crypto.randomUUID()}n(q,"eventId");var I=class{static{n(this,"PostMessageAnalytics")}target;targetOrigin;constructor(e,t="*"){this.target=e,this.targetOrigin=t}emit(e){const{name:t,occurredAt:s,...i}=e;this.target.postMessage({channel:"dsh-web-analytics",version:1,eventId:q(),event:t,timestamp:s,data:i},this.targetOrigin)}};function g(e,t){try{e.emit(t)}catch{}}n(g,"emitAnalytics");var x=class{static{n(this,"QbotAnalyticsTracker")}sink;turns=new Map;lastSeq=new Map;constructor(e){this.sink=e}handle(e,t){const s=String(e),i=this.lastSeq.get(s);if(!(i!==void 0&&t.seq<=i))switch(this.lastSeq.set(s,t.seq),t.type){case"turn/start":this.turns.set(s,{turn:t.data.turn,firstTokenReported:!1});return;case"step/start":{const r=this.stateFor(s,t.data.turn);r.step=t.data.step;return}case"user/message":if(t.data.source.kind!=="user")return;this.questionSent(s,t,this.turns.get(s));return;case"assistant/chunk":if(!(0,S.isTokenDelta)(t.data.chunk))return;this.firstToken(s,t,this.turns.get(s));return;case"assistant/message":{const r=this.stateFor(s,t.data.turn);r.assistantMessageId=String(t.data.message.id),r.step=t.data.step;return}case"turn/end":this.answerCompleted(s,t,this.turns.get(s)),this.turns.delete(s);return;default:return}}clear(e){const t=String(e);this.turns.delete(t),this.lastSeq.delete(t)}stateFor(e,t){const s=this.turns.get(e);if(s!==void 0)return t!==void 0&&(s.turn=t),s;const i={turn:t??0,firstTokenReported:!1};return this.turns.set(e,i),i}questionSent(e,t,s){const i=String(t.data.id),r=s??this.stateFor(e,void 0);r.userMessageId===void 0&&(r.userMessageId=i),r.questionAt===void 0&&(r.questionAt=t.time),g(this.sink,{name:"send",occurredAt:t.time,sessionId:e,userMessageId:i,eventSeq:t.seq,...r.turn>0?{turn:r.turn}:{},...r.step===void 0?{}:{step:r.step}})}firstToken(e,t,s){const i=s??this.stateFor(e,t.data.turn);i.turn=t.data.turn,i.step=t.data.step,!i.firstTokenReported&&(i.firstTokenReported=!0,g(this.sink,{name:"ai_first_token",occurredAt:t.time,sessionId:e,eventSeq:t.seq,turn:t.data.turn,step:t.data.step,...i.userMessageId===void 0?{}:{userMessageId:i.userMessageId},...i.questionAt===void 0?{}:{latencyMs:Math.max(0,t.time-i.questionAt)}}))}answerCompleted(e,t,s){g(this.sink,{name:"ai_reply_complete",occurredAt:t.time,sessionId:e,eventSeq:t.seq,turn:t.data.turn,status:t.data.reason.kind,...s?.userMessageId===void 0?{}:{userMessageId:s.userMessageId},...s?.assistantMessageId===void 0?{}:{assistantMessageId:s.assistantMessageId},...s?.questionAt===void 0?{}:{durationMs:Math.max(0,t.time-s.questionAt)}})}};const y="qbot.analytics",M={kind:"qbot-analytics-event",target:y,match:n(e=>e.type==="turn/start"||e.type==="step/start"||e.type==="user/message"&&e.data.source.kind==="user"||e.type==="assistant/chunk"&&(0,S.isTokenDelta)(e.data.chunk)||e.type==="assistant/message"||e.type==="turn/end"?{id:String(e.seq),role:"start"}:null,"match"),start:n((e,t)=>t.event,"start"),update:n(e=>e.state,"update"),buildViewNode:n(e=>{const t=e.start;return t===void 0?null:{key:e.key,kind:"qbot-analytics-event",id:e.id,target:y,data:{event:t.event,location:t.location}}},"buildViewNode")},A={target:y,create:n(()=>{let e=0;return{empty:{revision:e,live:[]},replace:n(()=>({revision:++e,live:[]}),"replace"),apply:n(({upserts:t})=>({revision:++e,live:t}),"apply")}},"create")};function E(e,t){const s=e.workspaces,i=Reflect.get(s,"startSession"),r=n(p=>{const f=s.list.getSnapshot(),o=e.sessions.list.getSnapshot().current,a=o===void 0?void 0:f.items.find(m=>m.sessionIds.includes(o))?.workspaceId,c=p??a??f.recentWorkspaceId;g(t,{name:"new_session",occurredAt:Date.now(),...o===void 0?{}:{currentSessionId:String(o)},...c===void 0?{}:{workspaceId:String(c)}}),i.call(s,p)},"decorated");return s.startSession=r,()=>{s.startSession===r&&(s.startSession=i)}}n(E,"installNewSessionAnalytics");function j(e,t){const s=new x(t),i=new Map,r=n(o=>{if(i.has(o))return;const a=e.sessions.binding(o)?.session;if(a===void 0)return;const c={session:a,revision:void 0,dispose:n(()=>{},"dispose")},m=n(()=>{const w=a.getSnapshot().views.get(y);if(!(w===void 0||w.revision===c.revision)){c.revision=w.revision;for(const L of w.live)s.handle(o,L.data.event)}},"consume");c.dispose=a.subscribe(m),i.set(o,c),m()},"watch"),p=n(()=>{const o=new Set(e.sessions.list.getSnapshot().ids);for(const a of o)r(a);for(const[a,c]of i)o.has(a)||(c.dispose(),i.delete(a),s.clear(a))},"reconcile"),f=e.sessions.list.subscribe(p);return p(),()=>{f();for(const o of i.values())o.dispose();i.clear()}}n(j,"installSessionAnalytics");const T={"policy.nav":"政策说明","policy.title":"政策说明","policy.intro":"请阅读下述条款,使用本服务表示您已同意相关约定。","policy.harness":"DeepSeek Harness","policy.security":"DeepSeek安全使用政策","policy.data":"DeepSeek数据使用说明","policy.browser":"QQ浏览器服务规则"},D={"policy.nav":"Policy","policy.title":"Policy","policy.intro":"Please read the following terms. Using this service means you agree to them.","policy.harness":"DeepSeek Harness","policy.security":"DeepSeek Security Policy","policy.data":"DeepSeek Data Usage Notice","policy.browser":"QQ Browser Service Rules"},N=[{id:"harness",label:"policy.harness",href:"https://harness.io"},{id:"security",label:"policy.security",href:"https://harness.io/security"},{id:"data",label:"policy.data",href:"https://harness.io/data"},{id:"browser",label:"policy.browser",href:"https://harness.io/browser"}],Z=".EZ91Ia_section{max-width:720px;color:var(--dsw-alias-label-primary);flex-direction:column;gap:19px;display:flex}.EZ91Ia_title{margin:0;font-size:18px;font-weight:500;line-height:19px}.EZ91Ia_intro{color:var(--dsw-alias-label-tertiary);margin:0;font-size:16px;line-height:19px}.EZ91Ia_links{border:1px solid var(--dsw-alias-border-l2);border-radius:16px;padding:0 19px;overflow:hidden}.EZ91Ia_link{box-sizing:border-box;border:0;border-bottom:1px solid var(--dsw-alias-border-l1);min-height:64px;color:var(--dsw-alias-label-primary);font:inherit;cursor:pointer;background:0 0;justify-content:space-between;align-items:center;gap:16px;font-size:16px;line-height:20px;text-decoration:none;display:flex}.EZ91Ia_link:last-child{border-bottom:0}.EZ91Ia_icon{flex:none}",_="@qqbrowser/qbot-dsh/PolicySection.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(_)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@qqbrowser/qbot-dsh",e.dataset.pluginCss=_,e.textContent=Z,document.head.appendChild(e)}var d={section:"EZ91Ia_section",title:"EZ91Ia_title",link:"EZ91Ia_link",icon:"EZ91Ia_icon",links:"EZ91Ia_links",intro:"EZ91Ia_intro"};function P({link:e,t}){return(0,l.jsxs)("a",{className:d.link,href:e.href,rel:"noopener noreferrer",target:"_blank",children:[(0,l.jsx)("span",{children:t(e.label)}),(0,l.jsx)(v.IconRightUpOutline16,{className:d.icon,size:11,"aria-hidden":"true"})]})}n(P,"PolicyLinkRow");function R({t:e}){return(0,l.jsxs)("section",{className:d.section,children:[(0,l.jsx)("h2",{className:d.title,children:e("policy.title")}),(0,l.jsx)("p",{className:d.intro,children:e("policy.intro")}),(0,l.jsx)("div",{className:d.links,children:N.map(t=>(0,l.jsx)(P,{link:t,t:e},t.id))})]})}n(R,"PolicySection");const b="qbot.product",C=["slots","sessions","workspaces","conversationEvents","conversationViews","locale"];function O(){const e=window.opener;return window.parent!==window?window.parent:e??window}n(O,"analyticsTarget");function z(e){const t=new I(O());e.effect(()=>e.locale.register(b,{zh:T,en:D}),"qbot-product: dictionaries");const s=e.locale.bind(b);e.slots.inject("settings.section",()=>e.slots.register({name:"settings.section",id:"policy",order:30,label:n(()=>s("policy.nav"),"label"),locale:b},R)),e.conversationViews.register(A),e.conversationEvents.register(M),e.effect(()=>j(e,t),"qbot-product: session analytics"),e.effect(()=>E(e,t),"qbot-product: new-session analytics")}return n(z,"apply"),k.apply=z,k.inject=C,h.exports},"factory")});
1
+ var F=Object.defineProperty;var n=(u,h)=>F(u,"name",{value:h,configurable:!0});window.__ModuleLoader__.load({id:"@qqbrowser/qbot-dsh",factory:n(u=>{var h={exports:{}},k=h.exports;Object.defineProperty(k,Symbol.toStringTag,{value:"Module"});let S=u("@deepseek-ai/dsh-client-runtime/client"),l=u("react/jsx-runtime"),v=u("@deepseek-ai/dsh-client-ui-primitives");function q(){return globalThis.crypto.randomUUID()}n(q,"eventId");var I=class{static{n(this,"PostMessageAnalytics")}target;targetOrigin;constructor(e,t="*"){this.target=e,this.targetOrigin=t}emit(e){const{name:t,occurredAt:s,...i}=e;this.target.postMessage({channel:"dsh-web-analytics",version:1,eventId:q(),event:t,timestamp:s,data:i},this.targetOrigin)}};function g(e,t){try{e.emit(t)}catch{}}n(g,"emitAnalytics");var x=class{static{n(this,"QbotAnalyticsTracker")}sink;turns=new Map;lastSeq=new Map;constructor(e){this.sink=e}handle(e,t){const s=String(e),i=this.lastSeq.get(s);if(!(i!==void 0&&t.seq<=i))switch(this.lastSeq.set(s,t.seq),t.type){case"turn/start":this.turns.set(s,{turn:t.data.turn,firstTokenReported:!1});return;case"step/start":{const r=this.stateFor(s,t.data.turn);r.step=t.data.step;return}case"user/message":if(t.data.source.kind!=="user")return;this.questionSent(s,t,this.turns.get(s));return;case"assistant/chunk":if(!(0,S.isTokenDelta)(t.data.chunk))return;this.firstToken(s,t,this.turns.get(s));return;case"assistant/message":{const r=this.stateFor(s,t.data.turn);r.assistantMessageId=String(t.data.message.id),r.step=t.data.step;return}case"turn/end":this.answerCompleted(s,t,this.turns.get(s)),this.turns.delete(s);return;default:return}}clear(e){const t=String(e);this.turns.delete(t),this.lastSeq.delete(t)}stateFor(e,t){const s=this.turns.get(e);if(s!==void 0)return t!==void 0&&(s.turn=t),s;const i={turn:t??0,firstTokenReported:!1};return this.turns.set(e,i),i}questionSent(e,t,s){const i=String(t.data.id),r=s??this.stateFor(e,void 0);r.userMessageId===void 0&&(r.userMessageId=i),r.questionAt===void 0&&(r.questionAt=t.time),g(this.sink,{name:"send",occurredAt:t.time,sessionId:e,userMessageId:i,eventSeq:t.seq,...r.turn>0?{turn:r.turn}:{},...r.step===void 0?{}:{step:r.step}})}firstToken(e,t,s){const i=s??this.stateFor(e,t.data.turn);i.turn=t.data.turn,i.step=t.data.step,!i.firstTokenReported&&(i.firstTokenReported=!0,g(this.sink,{name:"ai_first_token",occurredAt:t.time,sessionId:e,eventSeq:t.seq,turn:t.data.turn,step:t.data.step,...i.userMessageId===void 0?{}:{userMessageId:i.userMessageId},...i.questionAt===void 0?{}:{latencyMs:Math.max(0,t.time-i.questionAt)}}))}answerCompleted(e,t,s){g(this.sink,{name:"ai_reply_complete",occurredAt:t.time,sessionId:e,eventSeq:t.seq,turn:t.data.turn,status:t.data.reason.kind,...s?.userMessageId===void 0?{}:{userMessageId:s.userMessageId},...s?.assistantMessageId===void 0?{}:{assistantMessageId:s.assistantMessageId},...s?.questionAt===void 0?{}:{durationMs:Math.max(0,t.time-s.questionAt)}})}};const y="qbot.analytics",M={kind:"qbot-analytics-event",target:y,match:n(e=>e.type==="turn/start"||e.type==="step/start"||e.type==="user/message"&&e.data.source.kind==="user"||e.type==="assistant/chunk"&&(0,S.isTokenDelta)(e.data.chunk)||e.type==="assistant/message"||e.type==="turn/end"?{id:String(e.seq),role:"start"}:null,"match"),start:n((e,t)=>t.event,"start"),update:n(e=>e.state,"update"),buildViewNode:n(e=>{const t=e.start;return t===void 0?null:{key:e.key,kind:"qbot-analytics-event",id:e.id,target:y,data:{event:t.event,location:t.location}}},"buildViewNode")},A={target:y,create:n(()=>{let e=0;return{empty:{revision:e,live:[]},replace:n(()=>({revision:++e,live:[]}),"replace"),apply:n(({upserts:t})=>({revision:++e,live:t}),"apply")}},"create")};function E(e,t){const s=e.workspaces,i=Reflect.get(s,"startSession"),r=n(p=>{const f=s.list.getSnapshot(),o=e.sessions.list.getSnapshot().current,a=o===void 0?void 0:f.items.find(m=>m.sessionIds.includes(o))?.workspaceId,c=p??a??f.recentWorkspaceId;g(t,{name:"new_session",occurredAt:Date.now(),...o===void 0?{}:{currentSessionId:String(o)},...c===void 0?{}:{workspaceId:String(c)}}),i.call(s,p)},"decorated");return s.startSession=r,()=>{s.startSession===r&&(s.startSession=i)}}n(E,"installNewSessionAnalytics");function j(e,t){const s=new x(t),i=new Map,r=n(o=>{if(i.has(o))return;const a=e.sessions.binding(o)?.session;if(a===void 0)return;const c={session:a,revision:void 0,dispose:n(()=>{},"dispose")},m=n(()=>{const w=a.getSnapshot().views.get(y);if(!(w===void 0||w.revision===c.revision)){c.revision=w.revision;for(const L of w.live)s.handle(o,L.data.event)}},"consume");c.dispose=a.subscribe(m),i.set(o,c),m()},"watch"),p=n(()=>{const o=new Set(e.sessions.list.getSnapshot().ids);for(const a of o)r(a);for(const[a,c]of i)o.has(a)||(c.dispose(),i.delete(a),s.clear(a))},"reconcile"),f=e.sessions.list.subscribe(p);return p(),()=>{f();for(const o of i.values())o.dispose();i.clear()}}n(j,"installSessionAnalytics");const T={"policy.nav":"政策说明","policy.title":"政策说明","policy.intro":"请阅读下述条款,使用本服务表示您已同意相关约定。","policy.harness":"DeepSeek Harness","policy.security":"DeepSeek安全使用政策","policy.data":"DeepSeek数据使用说明","policy.browser":"QQ浏览器服务规则"},D={"policy.nav":"Policy","policy.title":"Policy","policy.intro":"Please read the following terms. Using this service means you agree to them.","policy.harness":"DeepSeek Harness","policy.security":"DeepSeek Security Policy","policy.data":"DeepSeek Data Usage Notice","policy.browser":"QQ Browser Service Rules"},N=[{id:"harness",label:"policy.harness",href:"https://harness.io"},{id:"security",label:"policy.security",href:"https://harness.io/security"},{id:"data",label:"policy.data",href:"https://harness.io/data"},{id:"browser",label:"policy.browser",href:"https://harness.io/browser"}],Z=".EZ91Ia_section{max-width:720px;color:var(--dsw-alias-label-primary);flex-direction:column;gap:19px;display:flex}.EZ91Ia_title{margin:0;font-size:18px;font-weight:500;line-height:19px}.EZ91Ia_intro{color:var(--dsw-alias-label-tertiary);margin:0;font-size:16px;line-height:19px}.EZ91Ia_links{border:1px solid var(--dsw-alias-border-l2);border-radius:16px;padding:0 19px;overflow:hidden}.EZ91Ia_link{box-sizing:border-box;border:0;border-bottom:1px solid var(--dsw-alias-border-l1);min-height:64px;color:var(--dsw-alias-label-primary);font:inherit;cursor:pointer;background:0 0;justify-content:space-between;align-items:center;gap:16px;font-size:16px;line-height:20px;text-decoration:none;display:flex}.EZ91Ia_link:last-child{border-bottom:0}.EZ91Ia_icon{flex:none}",_="@qqbrowser/qbot-dsh/PolicySection.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(_)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@qqbrowser/qbot-dsh",e.dataset.pluginCss=_,e.textContent=Z,document.head.appendChild(e)}var d={title:"EZ91Ia_title",intro:"EZ91Ia_intro",section:"EZ91Ia_section",link:"EZ91Ia_link",links:"EZ91Ia_links",icon:"EZ91Ia_icon"};function P({link:e,t}){return(0,l.jsxs)("a",{className:d.link,href:e.href,rel:"noopener noreferrer",target:"_blank",children:[(0,l.jsx)("span",{children:t(e.label)}),(0,l.jsx)(v.IconRightUpOutline16,{className:d.icon,size:11,"aria-hidden":"true"})]})}n(P,"PolicyLinkRow");function R({t:e}){return(0,l.jsxs)("section",{className:d.section,children:[(0,l.jsx)("h2",{className:d.title,children:e("policy.title")}),(0,l.jsx)("p",{className:d.intro,children:e("policy.intro")}),(0,l.jsx)("div",{className:d.links,children:N.map(t=>(0,l.jsx)(P,{link:t,t:e},t.id))})]})}n(R,"PolicySection");const b="qbot.product",C=["slots","sessions","workspaces","conversationEvents","conversationViews","locale"];function O(){const e=window.opener;return window.parent!==window?window.parent:e??window}n(O,"analyticsTarget");function z(e){const t=new I(O());e.effect(()=>e.locale.register(b,{zh:T,en:D}),"qbot-product: dictionaries");const s=e.locale.bind(b);e.slots.inject("settings.section",()=>e.slots.register({name:"settings.section",id:"policy",order:30,label:n(()=>s("policy.nav"),"label"),locale:b},R)),e.conversationViews.register(A),e.conversationEvents.register(M),e.effect(()=>j(e,t),"qbot-product: session analytics"),e.effect(()=>E(e,t),"qbot-product: new-session analytics")}return n(z,"apply"),k.apply=z,k.inject=C,h.exports},"factory")});
@@ -1 +1 @@
1
- var m=Object.defineProperty;var r=(s,t)=>m(s,"name",{value:t,configurable:!0});import{a as n,i as f,r as P}from"./profile-boot-DCgBQ4qO.js";import{existsSync as d}from"node:fs";import{join as u,resolve as b}from"node:path";import{loadOptionalPatches as E,loadOverlayPatches as O,renderConfigDump as g}from"@deepseek-ai/dsh-app-boot";const c="qbot-dsh";function v(s,t,i){const o=n(s,!t),e=o.layers.map(a=>({label:a.packageName,patches:a.patches}));if(!t){d(o.patchPath)&&e.push({label:o.patchPath,patches:o.patches});const a=f(),p=E(c,a);p!==void 0&&e.push({label:a,patches:p});for(const l of i){const h=b(l);e.push({label:h,patches:O(c,h)})}}process.stdout.write(g(c,u(o.dir,P),e))}r(v,"runDumpConfig");export{v as runDumpConfig};
1
+ var m=Object.defineProperty;var r=(s,t)=>m(s,"name",{value:t,configurable:!0});import{a as n,i as f,r as P}from"./profile-boot-C5WShQrD.js";import{existsSync as d}from"node:fs";import{join as u,resolve as b}from"node:path";import{loadOptionalPatches as E,loadOverlayPatches as O,renderConfigDump as g}from"@deepseek-ai/dsh-app-boot";const c="qbot-dsh";function v(s,t,i){const o=n(s,!t),e=o.layers.map(a=>({label:a.packageName,patches:a.patches}));if(!t){d(o.patchPath)&&e.push({label:o.patchPath,patches:o.patches});const a=f(),p=E(c,a);p!==void 0&&e.push({label:a,patches:p});for(const l of i){const h=b(l);e.push({label:h,patches:O(c,h)})}}process.stdout.write(g(c,u(o.dir,P),e))}r(v,"runDumpConfig");export{v as runDumpConfig};
package/lib/index.js CHANGED
@@ -1 +1,4 @@
1
- var t=Object.defineProperty;var p=(n,o)=>t(n,"name",{value:o,configurable:!0});function a(){}p(a,"apply");export{a as apply};
1
+ var r=Object.defineProperty;var o=(e,t)=>r(e,"name",{value:t,configurable:!0});const a=["systemPrompt"],n=`Keep dependencies and tools that you install for the user inside the Qbot-managed environment so uninstalling DSH can remove them:
2
+ - Node.js packages and tools: run npm install --global ... so the configured npm prefix (npm_config_prefix, ~/.qbot-dsh/node-user) owns the installation. Do not change the prefix or install into another user or system-global location. Executables from global npm packages are already on PATH.
3
+ - Python libraries: run python -m pip install --user ... so the configured PYTHONUSERBASE (~/.qbot-dsh/python-user) owns the installation. Use pipx for isolated Python command-line tools; its home and bin directories are already configured below the same root. Do not install into the bundled Python runtime or another user or global site-packages directory.
4
+ - Temporary fallback: if sandbox write restrictions block a non-workspace temporary or generated file, use the configured TMPDIR or TEMP directory (~/.qbot-dsh/tmp). Do not weaken or bypass the sandbox.`;function s(e){e.systemPrompt.section({name:"qbot:managed-environment",order:10,text:n})}o(s,"apply");export{n as MANAGED_ENVIRONMENT_PROMPT,s as apply,a as inject};
@@ -1,4 +1,4 @@
1
- var w=Object.defineProperty;var c=(n,t)=>w(n,"name",{value:t,configurable:!0});import{t as g}from"./profile-boot-DCgBQ4qO.js";import{existsSync as $}from"node:fs";import{join as u,resolve as b}from"node:path";import{DEFAULT_PROFILE_BUNDLES as y,PROFILE_TEMPLATES as P,initProfile as k,readProfileManifest as d,resolveBundleDir as v,resolveProfileDir as x,writeProfileManifest as E}from"@deepseek-ai/dsh-app-boot";import{spawnSync as S}from"node:child_process";const i="qbot-dsh";function h(n,t){let e;try{e=v(i,n,g,t)}catch{return!1}return d(i,e).dsh?.bundle?.patch!==void 0}c(h,"exportsPatch");function N(n,t){const e=d(i,t),p=new Set(Object.keys(n.dependencies??{})),o=Object.keys(e.dependencies??{}),s=e.dsh?.profile?.bundles??[];let a=!1;for(const r of o){const l=h(r,t);l&&!s.includes(r)?(s.push(r),a=!0):!l&&!p.has(r)&&process.stderr.write(`${i}: warning: ${r} declares no dsh.bundle — installed as a plain dependency, not a profile layer (a later update that gains one activates it automatically)
1
+ var w=Object.defineProperty;var c=(n,t)=>w(n,"name",{value:t,configurable:!0});import{t as g}from"./profile-boot-C5WShQrD.js";import{existsSync as $}from"node:fs";import{join as u,resolve as b}from"node:path";import{DEFAULT_PROFILE_BUNDLES as y,PROFILE_TEMPLATES as P,initProfile as k,readProfileManifest as d,resolveBundleDir as v,resolveProfileDir as x,writeProfileManifest as E}from"@deepseek-ai/dsh-app-boot";import{spawnSync as S}from"node:child_process";const i="qbot-dsh";function h(n,t){let e;try{e=v(i,n,g,t)}catch{return!1}return d(i,e).dsh?.bundle?.patch!==void 0}c(h,"exportsPatch");function N(n,t){const e=d(i,t),p=new Set(Object.keys(n.dependencies??{})),o=Object.keys(e.dependencies??{}),s=e.dsh?.profile?.bundles??[];let a=!1;for(const r of o){const l=h(r,t);l&&!s.includes(r)?(s.push(r),a=!0):!l&&!p.has(r)&&process.stderr.write(`${i}: warning: ${r} declares no dsh.bundle — installed as a plain dependency, not a profile layer (a later update that gains one activates it automatically)
2
2
  `)}const f=new Set(o);for(const r of[...s]){const l=p.has(r)||f.has(r),m=f.has(r)&&h(r,t);l&&!m&&(s.splice(s.indexOf(r),1),a=!0)}a&&(e.dsh={...e.dsh,profile:{...e.dsh?.profile,bundles:s}},E(t,e))}c(N,"reconcilePlugins");function L(n,t){const e=/^(?<prefix>(?:file|link):)?(?<path>\.{1,2}(?:[/\\].*)?)$/.exec(n);return e?.groups?.path===void 0?n:`${e.groups.prefix??""}${b(t,e.groups.path)}`}c(L,"anchorPathSpec");function O(n,t){const e=x(n);$(u(e,"package.json"))||(k(e,P[n]??y),process.stderr.write(`${i}: initialized profile ${n} at ${e}
3
3
  `));const p=d(i,e),o=S("pnpm",t.map(a=>L(a,process.cwd())),{cwd:e,stdio:"inherit",shell:process.platform==="win32"});if(o.error!==void 0){if(o.error.code==="ENOENT")return process.stderr.write(`${i}: pnpm not found on PATH — install pnpm to manage profile plugins
4
4
  `),127;throw o.error}const s=o.status??1;return s===0?N(p,e):(process.stderr.write(`${i}: pnpm failed in profile directory ${e}
@@ -0,0 +1 @@
1
+ import{s as r}from"./profile-boot-C5WShQrD.js";export{r as runProfile};
@@ -0,0 +1,8 @@
1
+ var M=Object.defineProperty;var n=(e,t)=>M(e,"name",{value:t,configurable:!0});import{lstatSync as H,mkdirSync as F,realpathSync as $,unlinkSync as q,writeFileSync as C}from"node:fs";import{dirname as A,join as h,normalize as U,resolve as x}from"node:path";import{fileURLToPath as w}from"node:url";import{Socket as G}from"node:net";import{PROFILES_DIR as j,PROFILE_PATCH_FILENAME as Y,boot as z,composeEntries as B,healProfilesModuleFallback as V,installFailLoud as W,loadOptionalPatches as g,loadOverlayPatches as J,loadProfile as K,readProfileManifest as X,watchUserPatches as _,writeProfileManifest as Q}from"@deepseek-ai/dsh-app-boot";import{resolveDshHome as O}from"@deepseek-ai/dsh-home-paths";import{DSH_LAUNCH_ENVIRONMENT_KEY as Z}from"@deepseek-ai/dsh-launch-environment";import{provideCmdline as ee}from"@deepseek-ai/dsh-cmdline";const te=5e3;function re(e,t=o=>{process.exit(o)},r=o=>{process.exitCode=o},i=te){let o,a,c=!1,d=!1;const l=n(()=>{a!==void 0&&clearTimeout(a)},"clearExitTimeout"),s=n(f=>{d||(d=!0,l(),t(f))},"forceExitOnce"),p=n(f=>{c||d||(c=!0,l(),r(f))},"completeOnce"),m=n((f,D)=>(o!==void 0||(a=setTimeout(()=>{s(f)},i),o=Promise.resolve().then(e).then(()=>{D?s(f):p(f)},()=>{s(f)})),o),"start");return{shutdown(f){return m(f,!1)},interrupt(f){if(o!==void 0){s(f);return}m(f,!0)}}}n(re,"createProcessShutdown");const E="DSH_HOST_LIFELINE_FD",oe=2147483647,ne=new Set(["EPIPE","ECONNRESET","ERR_STREAM_PREMATURE_CLOSE"]),y={armed:!1,dispose:n(()=>{},"dispose")};function se(e){if(e===void 0||e==="")return{kind:"absent"};if(!/^\d+$/.test(e))return{kind:"invalid",value:e};const t=Number(e);return t>oe?{kind:"invalid",value:e}:{kind:"descriptor",fd:t}}n(se,"resolveLifelineFd");function ie(e){const t=new G({fd:e,readable:!0,writable:!1});return t.unref(),t.resume(),{onEnd:n(r=>{t.on("end",r)},"onEnd"),onError:n(r=>{t.on("error",r)},"onError"),close:n(()=>{t.destroy()},"close")}}n(ie,"openDescriptorChannel");function ae(e){const t=e.env??process.env,r=e.warn??(l=>{process.stderr.write(l)}),i=e.open??ie,o=se(t[E]);if(o.kind==="absent")return y;if(o.kind==="invalid")return r(`qbot-dsh: ${E}=${JSON.stringify(o.value)} is not a file descriptor number; host-lifeline shutdown is off
2
+ `),y;let a;try{a=i(o.fd)}catch(l){return r(`qbot-dsh: cannot observe ${E}=${String(o.fd)} (${T(l)}); host-lifeline shutdown is off
3
+ `),y}let c=!1;const d=n(()=>c?!1:(c=!0,a.close(),!0),"release");return a.onEnd(()=>{d()&&e.onHostGone()}),a.onError(l=>{const s=l.code??"";if(d()){if(ne.has(s)){e.onHostGone();return}r(`qbot-dsh: ${E}=${String(o.fd)} failed (${T(l)}); host-lifeline shutdown is off and DSH keeps running
4
+ `)}}),{armed:!0,dispose:n(()=>{d()},"dispose")}}n(ae,"installHostLifeline");function T(e){return e?.code??(e instanceof Error?e.message:String(e))}n(T,"describe");function L(e){const t=U(e);return process.platform==="win32"?t.toLowerCase():t}n(L,"comparablePath");function R(e,t){try{return $.native(e)}catch(r){throw new Error(`qbot-dsh: failed to resolve ${t} ${e}: ${String(r)}`)}}n(R,"realPath");function ce(e,t=O()){const r=h(t,j,"node_modules");let i;try{i=H(r)}catch(c){if(c.code==="ENOENT")return;throw c}if(!i.isSymbolicLink()){if(i.isDirectory())return;throw new Error(`qbot-dsh: ${r} must be a directory or the managed installer's directory link`)}const o=h(A(e),"node_modules"),a=L(R(r,"legacy profile module link"));if(a!==L(R(o,"launcher dependency directory")))throw new Error(`qbot-dsh: refusing to replace ${r}: expected link target ${o}, got ${a}`);q(r),F(r,{recursive:!0})}n(ce,"migrateLegacyProfilesModuleLink");const le=w(new URL("../config/agent-presets/",import.meta.url)),u="qbot-dsh",N="@qqbrowser/qbot-dsh";function b(){return h(O(),Y)}n(b,"homePatchPath");const v=w(new URL("../package.json",import.meta.url)),I="session-telemetry-otel",de=`# qbot-dsh profile root — an empty entry list. The tree is composed as patches:
5
+ # each bundle in package.json's dsh.profile.bundles, then cordis.patch.yml, then any
6
+ # --patch overlays. Edit cordis.patch.yml, not this file.
7
+ []
8
+ `,P="cordis.yml";function k(e,t){if(!((e??"")===""||!t))return{id:I,disabled:!0}}n(k,"resolveTelemetryPatch");function S(e,t=!0){ce(v),V(v);const r=K(u,e,v,void 0,{userLayer:t}),i=X(u,r.dir),o=i.dsh?.profile?.bundles??[];return o.includes("@deepseek-ai/dsh-base")&&!o.includes("@qqbrowser/qbot-dsh")?(i.dsh={...i.dsh,profile:{...i.dsh?.profile,bundles:[...o,N]}},Q(r.dir,i),S(e,t)):(C(h(r.dir,P),de),r)}n(S,"prepareProfile");function fe(e){return[...e.bundlePatches,...e.profile.patches,...e.homePatches,...e.overlays]}n(fe,"allPatches");function ue(e,t){const r=S(e),i=g(u,b())??[],o=t.flatMap(s=>J(u,x(s))),a=r.layers.flatMap(s=>s.patches),c=new Map;for(const s of B([a,r.patches,i,o]))typeof s.id=="string"&&c.set(s.id,s);const d=[...o];c.has("agent-presets")&&d.push({id:"agent-presets",config:{...c.get("agent-presets")?.config??{},roots:[{path:le,trust:"system"}]}});const l=k(process.env.DSH_TELEMETRY_DISABLED,c.has(I));return l!==void 0&&d.push(l),{profile:r,bundlePatches:a,homePatches:i,overlays:d,rows:c}}n(ue,"composeProfile");function pe(e,t,r){if(!t.aborted&&!(e.fiber.state!==2||e.get("loader")===void 0))throw r}n(pe,"suppressShutdownError");async function he(e){const t=ue(e.profile,e.patchFiles),r={},i={},o=re(async()=>{i.lifeline?.dispose(),await r.current?.fiber.dispose()}),a=new AbortController,c=n(p=>{a.abort(),o.interrupt(p)},"interrupt");process.on("SIGTERM",()=>{c(0)}),process.on("SIGINT",()=>{c(130)}),i.lifeline=ae({onHostGone:n(()=>{c(0)},"onHostGone")}),W(u,process,async()=>{await r.current?.fiber.dispose()});const d=h(t.profile.dir,P),l=n(()=>structuredClone([...t.bundlePatches,...g(u,t.profile.patchPath)??[],...g(u,b())??[],...t.overlays]),"composeLive"),s=await z(u,d,structuredClone(fe(t)),p=>{r.current=p,p.provide(Z,e.environment),ee(p,{args:e.args,exit:n(m=>{o.shutdown(m)},"exit")})});if(r.current=s,!a.signal.aborted&&s.fiber.state===2&&s.get("loader")!==void 0)try{s.get("hmr")===void 0&&(s.get("timer")===void 0&&await s.loader.create({name:"@deepseek-ai/cordis-plugin-timer"}),await s.loader.create({name:"@deepseek-ai/cordis-plugin-hmr",config:{root:[]}})),await _(s,{binName:u,filename:t.profile.patchPath,compose:l}),await _(s,{binName:u,filename:b(),compose:l})}catch(p){pe(s,a.signal,p)}return{ctx:s,shutdown:o}}n(he,"runProfile");export{S as a,b as i,N as n,k as o,P as r,he as s,v as t};
@@ -0,0 +1 @@
1
+ var g=Object.defineProperty;var i=(r,o)=>g(r,"name",{value:o,configurable:!0});import{realpathSync as u,statSync as l}from"node:fs";import{homedir as p}from"node:os";import{isAbsolute as x,join as d,relative as y,sep as A}from"node:path";import{Context as E}from"@deepseek-ai/cordis";import a from"@deepseek-ai/schemastery";import{SandboxProvider as S}from"@deepseek-ai/dsh-sandbox";import q from"@deepseek-ai/dsh-sandbox-local";import{AclWriteGrant as C,workspaceWriteSid as v}from"@deepseek-ai/dsh-sandbox-windows-acl";const R=["npm-cache","npm-logs","node-user","pip-cache","python-user","pycache"],G="tmp";function w(r){return[...R,G].map(o=>d(r,o))}i(w,"packageWriteRootPaths");function M(r){return`"${r.replaceAll("\\",String.raw`\\`).replaceAll('"',String.raw`\"`)}"`}i(M,"sbplString");function $(r,o){const t=u.native(o);if(!l(t).isDirectory())throw new Error(`qbot-dsh sandbox: package path is not a directory: ${t}`);const e=y(r,t);if(e===""||e===".."||e.startsWith(`..${A}`)||x(e))throw new Error(`qbot-dsh sandbox: package path escapes the Qbot root: ${t}`);return t}i($,"canonicalChild");function f(r,o){const t=r.indexOf("--");if(t<0)throw new Error("qbot-dsh sandbox: upstream runner argv has no command separator");const e=r.slice(0,t);if(e.includes("--workspace")&&e.includes("--temp"))return{argv:[...r],windowsAcl:!0};if(e.includes("--ro-bind"))return{argv:[...r.slice(0,t),...o.flatMap(s=>["--bind",s,s]),...r.slice(t)],windowsAcl:!1};if(e.includes("--ro"))return{argv:[...r.slice(0,t),...o.flatMap(s=>["--rw",s]),...r.slice(t)],windowsAcl:!1};const n=e.indexOf("-p"),c=n<0?void 0:e[n+1];if(c!==void 0&&c.includes("(deny file-write*)")){const s=[...r],m=o.map(b=>`(subpath ${M(b)})`).join(" ");return s[n+1]=`${c} (allow file-write* ${m})`,{argv:s,windowsAcl:!1}}throw new Error("qbot-dsh sandbox: unsupported upstream workspace-write runner profile")}i(f,"extendPackageWriteRoots");var h=class extends S{static{i(this,"QbotLocalSandboxProvider")}static Config=a.object({qbotRoot:a.string().default(d(p(),".qbot-dsh")),runnerCommand:a.array(a.string()).default([]),runnerFailureSignatures:a.array(a.string()).default([]),probeTimeoutMs:a.natural().default(5e3)});writeRoots;upstreamContext=new E;upstream;windowsGrants=new Map;constructor(r,o){super(r);const t=u.native(o.qbotRoot??d(p(),".qbot-dsh"));if(!l(t).isDirectory())throw new Error(`qbot-dsh sandbox: Qbot root is not a directory: ${t}`);this.writeRoots=w(t).map(e=>$(t,e)),this.upstream=new q(this.upstreamContext,{runnerCommand:o.runnerCommand,runnerFailureSignatures:o.runnerFailureSignatures,probeTimeoutMs:o.probeTimeoutMs}),r.effect(()=>async()=>{const e=[];for(const n of this.windowsGrants.values())try{n.dispose()}catch(c){e.push(c)}this.windowsGrants.clear();try{await this.upstreamContext.fiber.dispose()}catch(n){e.push(n)}if(e.length>0){r.logger.warn(`qbot-dsh sandbox: cleanup completed with ${e.length} failure(s)`);for(const n of e)r.logger.warn(n)}})}get internals(){return this.upstream.internals}set internals(r){this.upstream.internals=r}confine(r,o){const t=this.upstream.confine(r,o);if(o.mode!=="workspace-write")return t;const e=f(t.argv,this.writeRoots);return e.windowsAcl&&this.ensureWindowsGrant(o.workspaceRoot),{...t,argv:e.argv}}ensureWindowsGrant(r){if(this.windowsGrants.has(r))return;const o=C.create(v(r));try{for(const t of this.writeRoots)o.add(t,!0)}catch(t){try{o.dispose()}catch(e){throw new AggregateError([t,e],"qbot-dsh sandbox: package-directory grant failed and cleanup also failed")}throw t}this.windowsGrants.set(r,o)}};export{h as QbotLocalSandboxProvider,h as default,f as extendPackageWriteRoots,w as packageWriteRootPaths};
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/cordis-plugin-hmr","version":"1.0.16","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","@deepseek-ai/cordis":{"services":{"required":["timer"]},"description":{"en":"Hot Module Replacement","zh":"模块热替换"}},"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/cordis-plugin-timer":"^1.1.3"},"dependencies":{"@babel/code-frame":"^7.29.0","chokidar":"^4.0.3","picomatch":"^4.0.3","@deepseek-ai/cosmokit":"^1.8.2","@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/cordis-plugin-hmr","version":"1.0.16","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","@deepseek-ai/cordis":{"services":{"required":["timer"]},"description":{"en":"Hot Module Replacement","zh":"模块热替换"}},"peerDependencies":{"@deepseek-ai/cordis-plugin-timer":"^1.1.3","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@babel/code-frame":"^7.29.0","chokidar":"^4.0.3","picomatch":"^4.0.3","@deepseek-ai/cosmokit":"^1.8.2","@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-agent","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/dsh-scope":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-typert-protocol":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7"}}
1
+ {"name":"@deepseek-ai/dsh-agent","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-scope":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-typert-protocol":"^0.1.0-rc.7"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-agent-default-model","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-settings":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-llm":"^0.1.0-rc.7"}}
1
+ {"name":"@deepseek-ai/dsh-agent-default-model","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-settings":"^0.1.0-rc.7","@deepseek-ai/dsh-agent":"^0.1.0-rc.7"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-agent-instructions","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-fs":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-home-paths":"^0.1.0-rc.7","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-agent-instructions","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-home-paths":"^0.1.0-rc.7","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-fs":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-agent-loop","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-scope":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-session-persistence":"^0.1.0-rc.7","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/dsh-settings":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-agent-loop","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-scope":"^0.1.0-rc.7","@deepseek-ai/dsh-session-persistence":"^0.1.0-rc.7","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-settings":"^0.1.0-rc.7","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-agent":"^0.1.0-rc.7"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-agent-presets","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/cordis-plugin-include":"^1.0.6","@deepseek-ai/cordis-plugin-loader":"^1.0.2","@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-home-paths":"^0.1.0-rc.7","@deepseek-ai/dsh-scope":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-atomic-write":"^0.1.0-rc.7","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-settings":"^0.1.0-rc.7"},"dependencies":{"js-yaml":"^4.1.0","@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-agent-presets","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/cordis-plugin-include":"^1.0.6","@deepseek-ai/cordis-plugin-loader":"^1.0.2","@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-home-paths":"^0.1.0-rc.7","@deepseek-ai/dsh-scope":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-settings":"^0.1.0-rc.7","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-atomic-write":"^0.1.0-rc.7"},"dependencies":{"js-yaml":"^4.1.0","@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-anonymous-user-id","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-home-paths":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-brand":"^0.1.0-rc.7"}}
1
+ {"name":"@deepseek-ai/dsh-anonymous-user-id","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-brand":"^0.1.0-rc.7","@deepseek-ai/dsh-home-paths":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-api-gateway","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"dsh":{"client":{"inject":["@deepseek-ai/dsh-typert-registry","@deepseek-ai/dsh-client-connection"],"platform":"web","immediately":true}},"license":"MIT","dependencies":{"@deepseek-ai/dsh-typert-protocol":"^0.1.0-rc.7"},"peerDependencies":{"@deepseek-ai/dsh-client-connection":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-typert-registry":"^0.1.0-rc.7"}}
1
+ {"name":"@deepseek-ai/dsh-api-gateway","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"dsh":{"client":{"inject":["@deepseek-ai/dsh-typert-registry","@deepseek-ai/dsh-client-connection"],"platform":"web","immediately":true}},"license":"MIT","dependencies":{"@deepseek-ai/dsh-typert-protocol":"^0.1.0-rc.7"},"peerDependencies":{"@deepseek-ai/dsh-client-connection":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-typert-registry":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-api-remotes","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"dsh":{"client":{"inject":["@deepseek-ai/dsh-api-gateway"],"platform":"web","immediately":true}},"license":"MIT","dependencies":{"@deepseek-ai/dsh-typert-protocol":"^0.1.0-rc.7"},"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-api-gateway":"^0.1.0-rc.7","@deepseek-ai/dsh-credentials":"^0.1.0-rc.7","@deepseek-ai/dsh-commands":"^0.1.0-rc.7","@deepseek-ai/dsh-goal":"^0.1.0-rc.7","@deepseek-ai/dsh-host-plugin-inventory":"^0.1.0-rc.7","@deepseek-ai/dsh-cordis-host-runner":"^0.1.0-rc.7","@deepseek-ai/dsh-agent-presets":"^0.1.0-rc.7","@deepseek-ai/dsh-message-feedback":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-session-persistence":"^0.1.0-rc.7","@deepseek-ai/dsh-settings":"^0.1.0-rc.7","@deepseek-ai/dsh-typert-registry":"^0.1.0-rc.7"}}
1
+ {"name":"@deepseek-ai/dsh-api-remotes","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./types":{"types":"./lib/types/types.d.ts","default":"./lib/types/types.js"},"./src/*":"./src/*","./package.json":"./package.json"},"dsh":{"client":{"inject":["@deepseek-ai/dsh-api-gateway"],"platform":"web","immediately":true}},"license":"MIT","dependencies":{"@deepseek-ai/dsh-typert-protocol":"^0.1.0-rc.7"},"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-api-gateway":"^0.1.0-rc.7","@deepseek-ai/dsh-commands":"^0.1.0-rc.7","@deepseek-ai/dsh-credentials":"^0.1.0-rc.7","@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-goal":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-agent-presets":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-host-plugin-inventory":"^0.1.0-rc.7","@deepseek-ai/dsh-message-feedback":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-session-persistence":"^0.1.0-rc.7","@deepseek-ai/dsh-settings":"^0.1.0-rc.7","@deepseek-ai/dsh-typert-registry":"^0.1.0-rc.7","@deepseek-ai/dsh-cordis-host-runner":"^0.1.0-rc.7"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-app-boot","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"js-yaml":"^4.2.0"},"peerDependencies":{"@deepseek-ai/cordis-plugin-group":"^1.0.1","@deepseek-ai/cordis-plugin-hmr":"^1.0.16","@deepseek-ai/cordis-plugin-include":"^1.0.6","@deepseek-ai/cordis-plugin-loader":"^1.0.2","@deepseek-ai/dsh-launch-environment":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-home-paths":"^0.1.0-rc.7"},"peerDependenciesMeta":{"@deepseek-ai/cordis-plugin-hmr":{"optional":true}}}
1
+ {"name":"@deepseek-ai/dsh-app-boot","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dependencies":{"js-yaml":"^4.2.0"},"peerDependencies":{"@deepseek-ai/cordis-plugin-group":"^1.0.1","@deepseek-ai/cordis-plugin-include":"^1.0.6","@deepseek-ai/cordis-plugin-loader":"^1.0.2","@deepseek-ai/cordis-plugin-hmr":"^1.0.16","@deepseek-ai/dsh-launch-environment":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-home-paths":"^0.1.0-rc.7","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"},"peerDependenciesMeta":{"@deepseek-ai/cordis-plugin-hmr":{"optional":true}}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-attachment","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-brand":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7"}}
1
+ {"name":"@deepseek-ai/dsh-attachment","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-brand":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-base","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./cordis.patch.yml":"./cordis.patch.yml","./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dsh":{"bundle":{"patch":"./cordis.patch.yml"}},"dependencies":{"@deepseek-ai/cordis-plugin-hmr":"^1.0.16","@deepseek-ai/cordis-plugin-timer":"^1.1.3","@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-agent-default-model":"^0.1.0-rc.7","@deepseek-ai/dsh-agent-loop":"^0.1.0-rc.7","@deepseek-ai/dsh-attachment-local":"^0.1.0-rc.7","@deepseek-ai/dsh-shell-env":"^0.1.0-rc.7","@deepseek-ai/dsh-bash-sandbox":"^0.1.0-rc.7","@deepseek-ai/dsh-command-compact":"^0.1.0-rc.7","@deepseek-ai/dsh-command-feedback":"^0.1.0-rc.7","@deepseek-ai/dsh-compaction-basic":"^0.1.0-rc.7","@deepseek-ai/dsh-commands":"^0.1.0-rc.7","@deepseek-ai/dsh-command-goal":"^0.1.0-rc.7","@deepseek-ai/dsh-compaction-tool-result-pruner":"^0.1.0-rc.7","@deepseek-ai/dsh-fs-sandbox":"^0.1.0-rc.7","@deepseek-ai/dsh-fs-local":"^0.1.0-rc.7","@deepseek-ai/dsh-credentials-local":"^0.1.0-rc.7","@deepseek-ai/dsh-goal":"^0.1.0-rc.7","@deepseek-ai/dsh-fs-observation-policy":"^0.1.0-rc.7","@deepseek-ai/dsh-goal-round-driver":"^0.1.0-rc.7","@deepseek-ai/dsh-api-gateway":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-llm-deepseek":"^0.1.0-rc.7","@deepseek-ai/dsh-llm-pi-ai":"^0.1.0-rc.7","@deepseek-ai/dsh-llm-retry":"^0.1.0-rc.7","@deepseek-ai/dsh-plan-mode":"^0.1.0-rc.7","@deepseek-ai/dsh-pwsh-sandbox":"^0.1.0-rc.7","@deepseek-ai/dsh-repeat-tool-reminder":"^0.1.0-rc.7","@deepseek-ai/dsh-permission-presets":"^0.1.0-rc.7","@deepseek-ai/dsh-sandbox-local":"^0.1.0-rc.7","@deepseek-ai/dsh-sandbox-policy":"^0.1.0-rc.7","@deepseek-ai/dsh-session-persistence-jsonl":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-session-checkpoint-policy":"^0.1.0-rc.7","@deepseek-ai/dsh-session-projection":"^0.1.0-rc.7","@deepseek-ai/dsh-session-telemetry-otel":"^0.1.0-rc.7","@deepseek-ai/dsh-session-query-sqlite":"^0.1.0-rc.7","@deepseek-ai/dsh-session-title-first-prompt-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-settings-file":"^0.1.0-rc.7","@deepseek-ai/dsh-skill":"^0.1.0-rc.7","@deepseek-ai/dsh-skill-badge":"^0.1.0-rc.7","@deepseek-ai/dsh-skill-filesystem":"^0.1.0-rc.7","@deepseek-ai/dsh-session-title":"^0.1.0-rc.7","@deepseek-ai/dsh-spill-policy":"^0.1.0-rc.7","@deepseek-ai/dsh-spill-local":"^0.1.0-rc.7","@deepseek-ai/dsh-subagent":"^0.1.0-rc.7","@deepseek-ai/dsh-subagent-fork-in-process":"^0.1.0-rc.7","@deepseek-ai/dsh-subagent-spawn-in-process":"^0.1.0-rc.7","@deepseek-ai/dsh-subprocess-local":"^0.1.0-rc.7","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-call-timeout-policy":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-bash":"^0.1.0-rc.7","@deepseek-ai/dsh-jobs-local":"^0.1.0-rc.7","@deepseek-ai/dsh-token-meter":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-fs-search":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-goal":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-pwsh":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-fs":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-ralph":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-skill":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-str-replace-editor":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-subagent-control":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-subagent-report":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-subagent":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-web":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-todo":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-jobs":"^0.1.0-rc.7","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-workflow":"^0.1.0-rc.7","@deepseek-ai/dsh-typert-loader":"^0.1.0-rc.7","@deepseek-ai/dsh-typert-registry":"^0.1.0-rc.7","@deepseek-ai/dsh-user-approval":"^0.1.0-rc.7","@deepseek-ai/dsh-user-questions":"^0.1.0-rc.7","@deepseek-ai/dsh-web":"^0.1.0-rc.7","@deepseek-ai/dsh-web-search-deepseek":"^0.1.0-rc.7","@deepseek-ai/dsh-workflow-worker-thread":"^0.1.0-rc.7","@deepseek-ai/dsh-agent-instructions":"^0.1.0-rc.7"},"peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-base","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./cordis.patch.yml":"./cordis.patch.yml","./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","dsh":{"bundle":{"patch":"./cordis.patch.yml"}},"dependencies":{"@deepseek-ai/cordis-plugin-timer":"^1.1.3","@deepseek-ai/dsh-agent-loop":"^0.1.0-rc.7","@deepseek-ai/dsh-agent":"^0.1.0-rc.7","@deepseek-ai/dsh-shell-env":"^0.1.0-rc.7","@deepseek-ai/cordis-plugin-hmr":"^1.0.16","@deepseek-ai/dsh-attachment-local":"^0.1.0-rc.7","@deepseek-ai/dsh-command-compact":"^0.1.0-rc.7","@deepseek-ai/dsh-bash-sandbox":"^0.1.0-rc.7","@deepseek-ai/dsh-command-feedback":"^0.1.0-rc.7","@deepseek-ai/dsh-commands":"^0.1.0-rc.7","@deepseek-ai/dsh-compaction-basic":"^0.1.0-rc.7","@deepseek-ai/dsh-compaction-tool-result-pruner":"^0.1.0-rc.7","@deepseek-ai/dsh-fs-local":"^0.1.0-rc.7","@deepseek-ai/dsh-fs-sandbox":"^0.1.0-rc.7","@deepseek-ai/dsh-fs-observation-policy":"^0.1.0-rc.7","@deepseek-ai/dsh-goal":"^0.1.0-rc.7","@deepseek-ai/dsh-goal-round-driver":"^0.1.0-rc.7","@deepseek-ai/dsh-api-gateway":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-credentials-local":"^0.1.0-rc.7","@deepseek-ai/dsh-llm-deepseek":"^0.1.0-rc.7","@deepseek-ai/dsh-permission-presets":"^0.1.0-rc.7","@deepseek-ai/dsh-llm-retry":"^0.1.0-rc.7","@deepseek-ai/dsh-command-goal":"^0.1.0-rc.7","@deepseek-ai/dsh-agent-default-model":"^0.1.0-rc.7","@deepseek-ai/dsh-pwsh-sandbox":"^0.1.0-rc.7","@deepseek-ai/dsh-plan-mode":"^0.1.0-rc.7","@deepseek-ai/dsh-repeat-tool-reminder":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-session-checkpoint-policy":"^0.1.0-rc.7","@deepseek-ai/dsh-session-persistence-jsonl":"^0.1.0-rc.7","@deepseek-ai/dsh-session-projection":"^0.1.0-rc.7","@deepseek-ai/dsh-llm-pi-ai":"^0.1.0-rc.7","@deepseek-ai/dsh-session-telemetry-otel":"^0.1.0-rc.7","@deepseek-ai/dsh-sandbox-local":"^0.1.0-rc.7","@deepseek-ai/dsh-session-title":"^0.1.0-rc.7","@deepseek-ai/dsh-settings-file":"^0.1.0-rc.7","@deepseek-ai/dsh-session-title-first-prompt-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-skill":"^0.1.0-rc.7","@deepseek-ai/dsh-skill-filesystem":"^0.1.0-rc.7","@deepseek-ai/dsh-spill-local":"^0.1.0-rc.7","@deepseek-ai/dsh-subagent":"^0.1.0-rc.7","@deepseek-ai/dsh-skill-badge":"^0.1.0-rc.7","@deepseek-ai/dsh-spill-policy":"^0.1.0-rc.7","@deepseek-ai/dsh-subagent-spawn-in-process":"^0.1.0-rc.7","@deepseek-ai/dsh-subagent-fork-in-process":"^0.1.0-rc.7","@deepseek-ai/dsh-subprocess-local":"^0.1.0-rc.7","@deepseek-ai/dsh-sandbox-policy":"^0.1.0-rc.7","@deepseek-ai/dsh-session-query-sqlite":"^0.1.0-rc.7","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.7","@deepseek-ai/dsh-jobs-local":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-bash":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-call-timeout-policy":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-fs-search":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-pwsh":"^0.1.0-rc.7","@deepseek-ai/dsh-token-meter":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-goal":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-fs":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-ralph":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-skill":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-str-replace-editor":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-subagent":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-subagent-control":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-jobs":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-web":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-workflow":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-todo":"^0.1.0-rc.7","@deepseek-ai/dsh-typert-loader":"^0.1.0-rc.7","@deepseek-ai/dsh-tool-subagent-report":"^0.1.0-rc.7","@deepseek-ai/dsh-typert-registry":"^0.1.0-rc.7","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/dsh-user-approval":"^0.1.0-rc.7","@deepseek-ai/dsh-user-questions":"^0.1.0-rc.7","@deepseek-ai/dsh-web":"^0.1.0-rc.7","@deepseek-ai/dsh-web-search-deepseek":"^0.1.0-rc.7","@deepseek-ai/dsh-workflow-worker-thread":"^0.1.0-rc.7","@deepseek-ai/dsh-agent-instructions":"^0.1.0-rc.7"},"peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-bash-local","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-timeout":"^0.1.0-rc.7","@deepseek-ai/dsh-settings":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-shell":"^0.1.0-rc.7","@deepseek-ai/dsh-subprocess":"^0.1.0-rc.7"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-bash-local","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-subprocess":"^0.1.0-rc.7","@deepseek-ai/dsh-timeout":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-settings":"^0.1.0-rc.7","@deepseek-ai/dsh-shell":"^0.1.0-rc.7"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-bash-sandbox","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-shell":"^0.1.0-rc.7","@deepseek-ai/dsh-sandbox":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-sandbox-policy":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-bash-local":"^0.1.0-rc.7"}}
1
+ {"name":"@deepseek-ai/dsh-bash-sandbox","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-bash-local":"^0.1.0-rc.7","@deepseek-ai/dsh-shell":"^0.1.0-rc.7","@deepseek-ai/dsh-sandbox-policy":"^0.1.0-rc.7","@deepseek-ai/dsh-sandbox":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-client-connection","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"dsh":{"client":{"inject":[],"platform":"web","immediately":true}},"license":"MIT","dependencies":{"ws":"^8.21.0","@deepseek-ai/dsh-host-apiproxy":"^0.1.0-rc.7","@deepseek-ai/dsh-commands":"^0.1.0-rc.7","@deepseek-ai/dsh-attachment":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-host-webserver":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7"}}
1
+ {"name":"@deepseek-ai/dsh-client-connection","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"dsh":{"client":{"inject":[],"platform":"web","immediately":true}},"license":"MIT","dependencies":{"ws":"^8.21.0","@deepseek-ai/dsh-attachment":"^0.1.0-rc.7","@deepseek-ai/dsh-host-apiproxy":"^0.1.0-rc.7","@deepseek-ai/dsh-commands":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-host-webserver":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-client-hmr","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"dsh":{"client":{"inject":[],"platform":"web","immediately":true}},"license":"MIT","dependencies":{"@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/cordis-plugin-loader":"^1.0.2","@deepseek-ai/dsh-client-modules":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-host-webserver":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-client-hmr","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"dsh":{"client":{"inject":[],"platform":"web","immediately":true}},"license":"MIT","dependencies":{"@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/cordis-plugin-loader":"^1.0.2","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-host-webserver":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-client-modules":"^0.1.0-rc.7"}}
@@ -1 +1 @@
1
- var _e=Object.defineProperty;var l=(S,k)=>_e(S,"name",{value:k,configurable:!0});window.__ModuleLoader__.load({id:"@deepseek-ai/dsh-client-locale",factory:l(S=>{var k={exports:{}},w=k.exports;Object.defineProperty(w,Symbol.toStringTag,{value:"Module"});let _=S("react/jsx-runtime"),W=S("react"),R=S("@deepseek-ai/dsh-client-ui-primitives"),Y=S("@deepseek-ai/dsh-client-runtime/client");function y(e){return e==null}l(y,"isNullable");function N(e){return e&&typeof e=="object"&&!Array.isArray(e)}l(N,"isPlainObject");function Q(e,t){return Object.fromEntries(Object.entries(e).filter(([r,n])=>t(r,n)))}l(Q,"filterKeys");function b(e,t){return Object.fromEntries(Object.entries(e).map(([r,n])=>[r,t(n,r)]))}l(b,"mapValues");function X(e,t,r){if(!t)return{...e};const n={};for(const i of t)(r||e[i]!==void 0)&&(n[i]=e[i]);return n}l(X,"pick");function x(e,t){return arguments.length===1?r=>x(e,r):e in globalThis&&t instanceof globalThis[e]||Object.prototype.toString.call(t).slice(8,-1)===e}l(x,"is");function A(e){return x("ArrayBuffer",e)||x("SharedArrayBuffer",e)}l(A,"isArrayBufferLike");function Z(e){return A(e)||ArrayBuffer.isView(e)}l(Z,"isArrayBufferSource");let g;(function(e){e.is=A,e.isSource=Z;function t(o){return ArrayBuffer.isView(o)?o.buffer.slice(o.byteOffset,o.byteOffset+o.byteLength):o}l(t,"fromSource"),e.fromSource=t;function r(o){if(o=t(o),typeof Buffer<"u")return Buffer.from(o).toString("base64");let f="";const h=new Uint8Array(o);for(let m=0;m<h.byteLength;m++)f+=String.fromCharCode(h[m]);return btoa(f)}l(r,"toBase64"),e.toBase64=r;function n(o){return typeof Buffer<"u"?t(Buffer.from(o,"base64")):Uint8Array.from(atob(o),f=>f.charCodeAt(0))}l(n,"fromBase64"),e.fromBase64=n;function i(o){return o=t(o),typeof Buffer<"u"?Buffer.from(o).toString("hex"):Array.from(new Uint8Array(o),f=>f.toString(16).padStart(2,"0")).join("")}l(i,"toHex"),e.toHex=i;function s(o){if(typeof Buffer<"u")return t(Buffer.from(o,"hex"));const f=o.length%2===0?o:o.slice(0,o.length-1),h=[];for(let m=0;m<f.length;m+=2)h.push(parseInt(`${f[m]}${f[m+1]}`,16));return Uint8Array.from(h).buffer}l(s,"fromHex"),e.fromHex=s})(g||(g={})),g.fromBase64,g.toBase64,g.fromHex,g.toHex;function D(e,t=new Map){if(!e||typeof e!="object")return e;if(x("Date",e))return new Date(e.valueOf());if(x("RegExp",e))return new RegExp(e.source,e.flags);if(A(e))return e.slice(0);if(ArrayBuffer.isView(e))return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);const r=t.get(e);if(r)return r;if(Array.isArray(e)){const i=[];return t.set(e,i),e.forEach((s,o)=>{i[o]=Reflect.apply(D,null,[s,t])}),i}const n=Object.create(Object.getPrototypeOf(e));t.set(e,n);for(const i of Reflect.ownKeys(e)){const s={...Reflect.getOwnPropertyDescriptor(e,i)};"value"in s&&(s.value=Reflect.apply(D,null,[s.value,t])),Reflect.defineProperty(n,i,s)}return n}l(D,"clone");function $(e,t,r){if(e===t||!r&&y(e)&&y(t))return!0;if(typeof e!=typeof t||typeof e!="object"||!e||!t)return!1;function n(i,s){return i(e)?i(t)?s(e,t):!1:i(t)?!1:void 0}return l(n,"check"),n(Array.isArray,(i,s)=>i.length===s.length&&i.every((o,f)=>$(o,s[f])))??n(x("Date"),(i,s)=>i.valueOf()===s.valueOf())??n(x("RegExp"),(i,s)=>i.source===s.source&&i.flags===s.flags)??n(A,(i,s)=>{if(i.byteLength!==s.byteLength)return!1;const o=new Uint8Array(i),f=new Uint8Array(s);for(let h=0;h<o.length;h++)if(o[h]!==f[h])return!1;return!0})??Object.keys({...e,...t}).every(i=>$(e[i],t[i],r))}l($,"deepEqual");let T;(function(e){e.millisecond=1;const t=e.second=1e3,r=e.minute=t*60,n=e.hour=r*60,i=e.day=n*24,s=e.week=i*7;let o=new Date().getTimezoneOffset();function f(a){o=a}l(f,"setTimezoneOffset"),e.setTimezoneOffset=f;function h(){return o}l(h,"getTimezoneOffset"),e.getTimezoneOffset=h;function m(a=new Date,u){return typeof a=="number"&&(a=new Date(a)),u===void 0&&(u=o),Math.floor((a.valueOf()/r-u)/1440)}l(m,"getDateNumber"),e.getDateNumber=m;function ge(a,u){const Se=new Date(a*i);return u===void 0&&(u=o),new Date(+Se+u*r)}l(ge,"fromDateNumber"),e.fromDateNumber=ge;const me=/\d+(?:\.\d+)?/.source,be=new RegExp(`^${["w(?:eek(?:s)?)?","d(?:ay(?:s)?)?","h(?:our(?:s)?)?","m(?:in(?:ute)?(?:s)?)?","s(?:ec(?:ond)?(?:s)?)?"].map(a=>`(${me}${a})?`).join("")}$`);function G(a){const u=be.exec(a);return u?(parseFloat(u[1])*s||0)+(parseFloat(u[2])*i||0)+(parseFloat(u[3])*n||0)+(parseFloat(u[4])*r||0)+(parseFloat(u[5])*t||0):0}l(G,"parseTime"),e.parseTime=G;function we(a){const u=G(a);return u?a=Date.now()+u:/^\d{1,2}(:\d{1,2}){1,2}$/.test(a)?a=`${new Date().toLocaleDateString()}-${a}`:/^\d{1,2}-\d{1,2}-\d{1,2}(:\d{1,2}){1,2}$/.test(a)&&(a=`${new Date().getFullYear()}-${a}`),a?new Date(a):new Date}l(we,"parseDate"),e.parseDate=we;function xe(a){const u=Math.abs(a);return u>=i-n/2?Math.round(a/i)+"d":u>=n-r/2?Math.round(a/n)+"h":u>=r-t/2?Math.round(a/r)+"m":u>=t?Math.round(a/t)+"s":a+"ms"}l(xe,"format"),e.format=xe;function v(a,u=2){return a.toString().padStart(u,"0")}l(v,"toDigits"),e.toDigits=v;function ve(a,u=new Date){return a.replace("yyyy",u.getFullYear().toString()).replace("yy",u.getFullYear().toString().slice(2)).replace("MM",v(u.getMonth()+1)).replace("dd",v(u.getDate())).replace("hh",v(u.getHours())).replace("mm",v(u.getMinutes())).replace("ss",v(u.getSeconds())).replace("SSS",v(u.getMilliseconds(),3))}l(ve,"template"),e.template=ve})(T||(T={}));const E=Symbol.for("schemastery"),U=Symbol.for("ValidationError");globalThis.__schemastery_index__??=0,globalThis.__schemastery_refs__=void 0;var p=class extends TypeError{static{l(this,"ValidationError")}options;name="ValidationError";constructor(e,t){let r="$";for(const n of t.path||[])typeof n=="string"?r+="."+n:typeof n=="number"?r+="["+n+"]":typeof n=="symbol"&&(r+=`[Symbol(${n.toString()})]`);r.startsWith(".")&&(r=r.slice(1)),super((r==="$"?"":`${r} `)+e),this.options=t}static is(e){return!!e?.[U]}};Object.defineProperty(p.prototype,U,{value:!0});const c=l(function(e){const t=l(function(r,n={}){return c.resolve(r,t,n)[0]},"schema");if(e.refs){const r=b(e.refs,i=>new c(i)),n=l(i=>r[i],"getRef");for(const i in r){const s=r[i];s.sKey=n(s.sKey),s.inner=n(s.inner),s.list=s.list&&s.list.map(n),s.dict=s.dict&&b(s.dict,n)}return r[e.uid]}if(Object.assign(t,e),typeof t.callback=="string")try{t.callback=new Function("return "+t.callback)()}catch{}return Object.defineProperty(t,"uid",{value:globalThis.__schemastery_index__++}),Object.setPrototypeOf(t,c.prototype),t.meta||={},t.toString=t.toString.bind(t),t},"Schema");c.prototype=Object.create(Function.prototype),c.prototype[E]=!0,Object.defineProperty(c.prototype,"~standard",{get(){return{version:1,vendor:"schemastery",validate:l(e=>{try{return{value:c.resolve(e,this,{})[0]}}catch(t){if(p.is(t))return{issues:[{message:t.message,path:t.options.path}]};throw t}},"validate")}}}),c.ValidationError=p,c.prototype.toJSON=l(function(){if(globalThis.__schemastery_refs__)return globalThis.__schemastery_refs__[this.uid]??=JSON.parse(JSON.stringify({...this})),this.uid;globalThis.__schemastery_refs__={[this.uid]:{...this}},globalThis.__schemastery_refs__[this.uid]=JSON.parse(JSON.stringify({...this}));const t={uid:this.uid,refs:globalThis.__schemastery_refs__};return globalThis.__schemastery_refs__=void 0,t},"toJSON"),c.prototype.set=l(function(t,r){return this.dict[t]=r,this},"set"),c.prototype.push=l(function(t){return this.list.push(t),this},"push");function ee(e,t){const r=typeof e=="string"?{"":e}:{...e};for(const n in t){const i=t[n];i?.$description||i?.$desc?r[n]=i.$description||i.$desc:typeof i=="string"&&(r[n]=i)}return r}l(ee,"mergeDesc");function O(e){return e?.$value??e?.$inner}l(O,"getInner");function F(e){return Q(e??{},t=>!t.startsWith("$"))}l(F,"extractKeys"),c.prototype.i18n=l(function(t){const r=c(this),n=ee(r.meta.description,t);return Object.keys(n).length&&(r.meta.description=n),r.dict&&(r.dict=b(r.dict,(i,s)=>i.i18n(b(t,o=>O(o)?.[s]??o?.[s])))),r.list&&(r.list=r.list.map((i,s)=>i.i18n(b(t,(o={})=>Array.isArray(O(o))?O(o)[s]:Array.isArray(o)?o[s]:F(o))))),r.inner&&(r.inner=r.inner.i18n(b(t,i=>O(i)?O(i):F(i)))),r.sKey&&(r.sKey=r.sKey.i18n(b(t,i=>i?.$key))),r},"i18n"),c.prototype.extra=l(function(t,r){const n=c(this);return n.meta={...n.meta,[t]:r},n},"extra");for(const e of["required","disabled","collapse","hidden","loose"])Object.assign(c.prototype,{[e](t=!0){const r=c(this);return r.meta={...r.meta,[e]:t},r}});c.prototype.deprecated=l(function(){const t=c(this);return t.meta.badges||=[],t.meta.badges.push({text:"deprecated",type:"danger"}),t},"deprecated"),c.prototype.experimental=l(function(){const t=c(this);return t.meta.badges||=[],t.meta.badges.push({text:"experimental",type:"warning"}),t},"experimental"),c.prototype.pattern=l(function(t){const r=c(this),n=X(t,["source","flags"]);return r.meta={...r.meta,pattern:n},r},"pattern"),c.prototype.simplify=l(function(t){if($(t,this.meta.default,this.type==="dict"))return null;if(y(t))return t;if(this.type==="object"||this.type==="dict"){const r={};for(const n in t){const i=(this.type==="object"?this.dict[n]:this.inner)?.simplify(t[n]);(this.type==="dict"||!y(i))&&(r[n]=i)}return $(r,this.meta.default,this.type==="dict")?null:r}else if(this.type==="array"||this.type==="tuple"){const r=[];return t.forEach((n,i)=>{const s=this.type==="array"?this.inner:this.list[i],o=s?s.simplify(n):n;r.push(o)}),r}else if(this.type==="intersect"){const r={};for(const n of this.list)Object.assign(r,n.simplify(t));return r}else if(this.type==="union")for(const r of this.list)try{return c.resolve(t,r,{}),r.simplify(t)}catch{}return t},"simplify"),c.prototype.toString=l(function(t){return K[this.type]?.(this,t)??`Schema<${this.type}>`},"toString"),c.prototype.role=l(function(e,t){const r=c(this);return r.meta={...r.meta,role:e,extra:t},r},"role");for(const e of["default","link","comment","description","max","min","step"])Object.assign(c.prototype,{[e](t){const r=c(this);return r.meta={...r.meta,[e]:t},r}});const J={};c.extend=l(function(t,r){J[t]=r},"extend"),c.resolve=l(function(t,r,n={},i=!1){if(!r)return[t];if(n.ignore?.(t,r))return[t];if(y(t)&&r.type!=="lazy"){if(r.meta.required)throw new p("missing required value",n);let o=r,f=r.meta.default;for(;o?.type==="intersect"&&y(f);)o=o.list[0],f=o?.meta.default;if(y(f))return[t];t=D(f)}const s=J[r.type];if(!s)throw new p(`unsupported type "${r.type}"`,n);try{return s(t,r,n,i)}catch(o){if(!r.meta.loose)throw o;return[r.meta.default]}},"resolve"),c.from=l(function(t){if(y(t))return c.any();if(["string","number","boolean"].includes(typeof t))return c.const(t).required();if(t[E])return t;if(typeof t=="function")switch(t){case String:return c.string().required();case Number:return c.number().required();case Boolean:return c.boolean().required();case Function:return c.function().required();default:return c.is(t).required()}else throw new TypeError(`cannot infer schema from ${t}`)},"from"),c.lazy=l(function(t){const r=l(()=>(n.inner[E]||(n.inner=n.builder(),n.inner.meta={...n.meta,...n.inner.meta}),n.inner.toJSON()),"toJSON"),n=new c({type:"lazy",builder:t,inner:{toJSON:r}});return n},"lazy"),c.natural=l(function(){return c.number().step(1).min(0)},"natural"),c.percent=l(function(){return c.number().step(.01).min(0).max(1).role("slider")},"percent"),c.date=l(function(){return c.union([c.is(Date),c.transform(c.string().role("datetime"),(t,r)=>{const n=new Date(t);if(isNaN(+n))throw new p(`invalid date "${t}"`,r);return n},!0)])},"date"),c.regExp=l(function(t=""){return c.union([c.is(RegExp),c.transform(c.string().role("regexp",{flag:t}),(r,n)=>{try{return new RegExp(r,t)}catch(i){throw new p(i.message,n)}},!0)])},"regExp"),c.arrayBuffer=l(function(t){return c.union([c.is(ArrayBuffer),c.is(SharedArrayBuffer),c.transform(c.any(),(r,n)=>{if(g.isSource(r))return g.fromSource(r);throw new p(`expected ArrayBufferSource but got ${r}`,n)},!0),...t?[c.transform(c.string(),(r,n)=>{try{return t==="base64"?g.fromBase64(r):g.fromHex(r)}catch(i){throw new p(i.message,n)}},!0)]:[]])},"arrayBuffer"),c.extend("lazy",(e,t,r,n)=>(t.inner[E]||(t.inner=t.builder(),t.inner.meta={...t.meta,...t.inner.meta}),c.resolve(e,t.inner,r,n))),c.extend("any",e=>[e]),c.extend("never",(e,t,r)=>{throw new p(`expected nullable but got ${e}`,r)}),c.extend("const",(e,{value:t},r)=>{if($(e,t))return[t];throw new p(`expected ${t} but got ${e}`,r)});function M(e,t,r,n,i=!1){const{max:s=1/0,min:o=-1/0}=t;if(e>s)throw new p(`expected ${r} <= ${s} but got ${e}`,n);if(e<o&&!i)throw new p(`expected ${r} >= ${o} but got ${e}`,n)}l(M,"checkWithinRange"),c.extend("string",(e,{meta:t},r)=>{if(typeof e!="string")throw new p(`expected string but got ${e}`,r);if(t.pattern){const n=new RegExp(t.pattern.source,t.pattern.flags);if(!n.test(e))throw new p(`expect string to match regexp ${n}`,r)}return M(e.length,t,"string length",r),[e]});function B(e,t){const r=e.toString();if(r.includes("e"))return e*Math.pow(10,t);const n=r.indexOf(".");if(n===-1)return e*Math.pow(10,t);const i=r.slice(n+1),s=r.slice(0,n);return i.length<=t?+(s+i.padEnd(t,"0")):+(s+i.slice(0,t)+"."+i.slice(t))}l(B,"decimalShift");function te(e,t,r){if(r=Math.abs(r),!/^\d+\.\d+$/.test(r.toString()))return(e-t)%r===0;const n=r.toString().indexOf("."),i=r.toString().slice(n+1).length;return Math.abs(B(e,i)-B(t,i))%B(r,i)===0}l(te,"isMultipleOf"),c.extend("number",(e,{meta:t},r)=>{if(typeof e!="number")throw new p(`expected number but got ${e}`,r);M(e,t,"number",r);const{step:n}=t;if(n&&!te(e,t.min??0,n))throw new p(`expected number multiple of ${n} but got ${e}`,r);return[e]}),c.extend("boolean",(e,t,r)=>{if(typeof e=="boolean")return[e];throw new p(`expected boolean but got ${e}`,r)}),c.extend("bitset",(e,{bits:t,meta:r},n)=>{let i=0,s=[];if(typeof e=="number"){i=e;for(const o in t)e&t[o]&&s.push(o)}else if(Array.isArray(e)){s=e;for(const o of s){if(typeof o!="string")throw new p(`expected string but got ${o}`,n);o in t&&(i|=t[o])}}else throw new p(`expected number or array but got ${e}`,n);return i===r.default?[i]:[i,s]}),c.extend("function",(e,t,r)=>{if(typeof e=="function")return[e];throw new p(`expected function but got ${e}`,r)}),c.extend("is",(e,{constructor:t},r)=>{if(typeof t=="function"){if(e instanceof t)return[e];throw new p(`expected ${t.name} but got ${e}`,r)}else{if(y(e))throw new p(`expected ${t} but got ${e}`,r);let n=Object.getPrototypeOf(e);for(;n;){if(n.constructor?.name===t)return[e];n=Object.getPrototypeOf(n)}throw new p(`expected ${t} but got ${e}`,r)}});function L(e,t,r,n){try{const[i,s]=c.resolve(e[t],r,{...n,path:[...n.path||[],t]});return s!==void 0&&(e[t]=s),i}catch(i){if(!n?.autofix)throw i;return delete e[t],r.meta.default}}l(L,"property"),c.extend("array",(e,{inner:t,meta:r},n)=>{if(!Array.isArray(e))throw new p(`expected array but got ${e}`,n);return M(e.length,r,"array length",n,!y(t.meta.default)),[e.map((i,s)=>L(e,s,t,n))]}),c.extend("dict",(e,{inner:t,sKey:r},n,i)=>{if(!N(e))throw new p(`expected object but got ${e}`,n);const s={};for(const o in e){let f;try{f=c.resolve(o,r,n)[0]}catch(h){if(i)continue;throw h}s[f]=L(e,o,t,n),e[f]=e[o],o!==f&&delete e[o]}return[s]}),c.extend("tuple",(e,{list:t},r,n)=>{if(!Array.isArray(e))throw new p(`expected array but got ${e}`,r);const i=t.map((s,o)=>L(e,o,s,r));return n?[i]:(i.push(...e.slice(t.length)),[i])});function C(e,t){for(const r in t)r in e||(e[r]=t[r])}l(C,"merge"),c.extend("object",(e,{dict:t},r,n)=>{if(!N(e))throw new p(`expected object but got ${e}`,r);const i={};for(const s in t){const o=L(e,s,t[s],r);(!y(o)||s in e)&&(i[s]=o)}return n||C(i,e),[i]}),c.extend("union",(e,{list:t,toString:r},n,i)=>{const s=[];for(const o of t)try{return c.resolve(e,o,n,i)}catch(f){s.push(f)}throw new p(`expected ${r()} but got ${JSON.stringify(e)}`,n)}),c.extend("intersect",(e,{list:t,toString:r},n,i)=>{if(!t.length)return[e];let s;for(const o of t){const f=c.resolve(e,o,n,!0)[0];if(!y(f))if(y(s))s=f;else{if(typeof s!=typeof f)throw new p(`expected ${r()} but got ${JSON.stringify(e)}`,n);if(typeof f=="object")C(s??={},f);else if(s!==f)throw new p(`expected ${r()} but got ${JSON.stringify(e)}`,n)}}return!i&&N(e)&&C(s,e),[s]}),c.extend("transform",(e,{inner:t,callback:r,preserve:n},i)=>{const[s,o=e]=c.resolve(e,t,i,!0);return n?[r(s)]:[r(s),r(o)]});const K={};function d(e,t,r){K[e]=r,Object.assign(c,{[e](...n){const i=new c({type:e});return t.forEach((s,o)=>{switch(s){case"sKey":i.sKey=n[o]??c.string();break;case"inner":i.inner=c.from(n[o]);break;case"list":i.list=n[o].map(c.from);break;case"dict":i.dict=b(n[o],c.from);break;case"bits":i.bits={};for(const f in n[o])typeof n[o][f]=="number"&&(i.bits[f]=n[o][f]);break;case"callback":{const f=i.callback=n[o];f.toJSON||=()=>f.toString();break}case"constructor":{const f=i.constructor=n[o];typeof f=="function"&&(f.toJSON||=()=>f.name);break}default:i[s]=n[o]}}),e==="object"||e==="dict"?i.meta.default={}:e==="array"||e==="tuple"?i.meta.default=[]:e==="bitset"&&(i.meta.default=0),i}})}l(d,"defineMethod"),d("is",["constructor"],({constructor:e})=>typeof e=="function"?e.name:e),d("any",[],()=>"any"),d("never",[],()=>"never"),d("const",["value"],({value:e})=>typeof e=="string"?JSON.stringify(e):e),d("string",[],()=>"string"),d("number",[],()=>"number"),d("boolean",[],()=>"boolean"),d("bitset",["bits"],()=>"bitset"),d("function",[],()=>"function"),d("array",["inner"],({inner:e})=>`${e.toString(!0)}[]`),d("dict",["inner","sKey"],({inner:e,sKey:t})=>`{ [key: ${t.toString()}]: ${e.toString()} }`),d("tuple",["list"],({list:e})=>`[${e.map(t=>t.toString()).join(", ")}]`),d("object",["dict"],({dict:e})=>Object.keys(e).length===0?"{}":`{ ${Object.entries(e).map(([t,r])=>`${t}${r.meta.required?"":"?"}: ${r.toString()}`).join(", ")} }`),d("union",["list"],({list:e},t)=>{const r=e.map(({toString:n})=>n()).join(" | ");return t?`(${r})`:r}),d("intersect",["list"],({list:e})=>`${e.map(t=>t.toString(!0)).join(" & ")}`),d("transform",["inner","callback","preserve"],({inner:e},t)=>e.toString(t));const re="locale",P="preference",ne=["zh","en"];c.object({[P]:c.union([...ne]).required(!1)});const ie={ok:"确定",cancel:"取消",close:"关闭",copy:"复制",copied:"复制成功",retry:"重试",loading:"加载中…","load.failed":"加载失败",submit:"提交",submitting:"正在提交…",next:"下一步",previous:"上一步",skip:"跳过",delete:"删除",edit:"编辑",save:"保存",search:"搜索",more:"更多",collapse:"收起",expand:"展开",back:"返回",unknown:"未知",none:"无",truncated:"已截断"},oe={ok:"OK",cancel:"Cancel",close:"Close",copy:"Copy",copied:"Copied",retry:"Retry",loading:"Loading…","load.failed":"Failed to load",submit:"Submit",submitting:"Submitting…",next:"Next",previous:"Previous",skip:"Skip",delete:"Delete",edit:"Edit",save:"Save",search:"Search",more:"More",collapse:"Collapse",expand:"Expand",back:"Back",unknown:"Unknown",none:"None",truncated:"Truncated"},se={"language.title":"语言"},ce={"language.title":"Language"},le=".j_Uvsa_row{border-bottom:1px solid var(--dsw-alias-border-l2);align-items:center;gap:8px;padding:16px 0;display:flex}.j_Uvsa_rowText{flex-direction:column;flex:1;gap:4px;min-width:0;padding-right:48px;display:flex}.j_Uvsa_title{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:400;line-height:22px}.j_Uvsa_selector{background:var(--dsw-alias-bg-module-platform);height:36px;font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;border:none;border-radius:18px;align-items:center;gap:12px;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}.j_Uvsa_selector:hover{background:var(--dsw-alias-interactive-bg-hover)}.j_Uvsa_chevron{flex:none}",I="@deepseek-ai/dsh-client-locale/LanguageRow.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(I)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-client-locale",e.dataset.pluginCss=I,e.textContent=le,document.head.appendChild(e)}var j={rowText:"j_Uvsa_rowText",selector:"j_Uvsa_selector",chevron:"j_Uvsa_chevron",row:"j_Uvsa_row",title:"j_Uvsa_title"};function fe({t:e,setLocale:t,useStore:r}){const n=r(h=>h.active),i=r(h=>h.options),[s,o]=(0,W.useState)(!1),f=i.find(h=>h.id===n)?.label??n;return(0,_.jsxs)("div",{className:j.row,children:[(0,_.jsx)("div",{className:j.rowText,children:(0,_.jsx)("div",{className:j.title,children:e("language.title")})}),(0,_.jsx)(R.Menu,{open:s,onClose:l(()=>{o(!1)},"onClose"),items:i.map(h=>({id:h.id,label:h.label})),selectedId:n,onSelect:l(h=>{t(h),o(!1)},"onSelect"),align:"end",portal:!0,anchor:(0,_.jsxs)("button",{type:"button",className:j.selector,"aria-haspopup":"menu","aria-expanded":s,onClick:l(()=>{o(h=>!h)},"onClick"),children:[f,(0,_.jsx)(R.IconChevronDownOutline14,{className:j.chevron})]})})]})}l(fe,"LanguageRow");function ae(){return(0,Y.defineStore)({init:l(()=>({active:"",options:[],revision:-1}),"init"),actions:{sync:l((e,t,r,n)=>{n<=e.revision||(e.active=t,e.options=r,e.revision=n)},"sync")}})}l(ae,"createLanguageRowStore");const ue="zh",q="common",z="settings.locale",V=Object.freeze([{id:"zh",label:"中文"},{id:"en",label:"English"}]);var H=class{static{l(this,"LocaleRuntime")}dicts=new Map;bound=new Map;snapshot;listeners=new Set;ctx;host;provisional;constructor(e,t){this.ctx=e,this.host=t,this.provisional=pe(),this.snapshot=Object.freeze({active:this.provisional,locales:V,revision:0}),t!==void 0&&(e.effect(()=>t.subscribe(()=>{this.adopt(t)}),"locale: settings scope adoption"),this.adopt(t))}getLocale(){return this.snapshot}getSnapshot(){return this.snapshot}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setLocale(e){const t=this.snapshot.locales.find(r=>r.id===e);if(t===void 0)throw new Error(`locale "${e}" is not registered`);this.snapshot.active!==t.id&&(this.publish(t.id,!0),this.host?.set(P,t.id))}adopt(e){const t=e.getSnapshot().value;if(t===void 0)return;const r=t.preference??this.provisional;this.snapshot.active!==r&&this.publish(r,!0)}register(e,t,r){const n=typeof t=="string"?[[t,r]]:Object.entries(t);let i=this.dicts.get(e);i||(i=new Map,this.dicts.set(e,i));for(const[s]of n)if(i.has(s))throw new Error(`locale namespace "${e}" already has locale "${s}"`);for(const[s,o]of n)i.set(s,o);return this.publish(this.snapshot.active,!1),()=>{const s=this.dicts.get(e);if(!s)return;let o=!1;for(const[f,h]of n)s.get(f)===h&&(s.delete(f),o=!0);o&&this.publish(this.snapshot.active,!1)}}bind(e){let t=this.bound.get(e);return t||(t=l((r,n)=>this.translate(e,r,n),"t"),this.bound.set(e,t),t)}translate(e,t,r){const n=this.lookup(e,t)??(e!=="common"?this.lookup("common",t):void 0)??t;return r?n.replace(/\{(\w+)\}/g,(i,s)=>s in r?String(r[s]):i):n}lookup(e,t){const r=this.dicts.get(e);return r?.get(this.snapshot.active)?.[t]??r?.get("zh")?.[t]}publish(e,t){this.snapshot=Object.freeze({active:e,locales:this.snapshot.locales,revision:this.snapshot.revision+1}),t&&this.ctx.emit("locale/change",this.snapshot);for(const r of[...this.listeners])try{r()}catch(n){console.error("locale subscriber crashed:",n)}}};function pe(){return he()??"zh"}l(pe,"resolveInitialLocale");function he(){if(!(typeof window>"u"))for(const e of[...navigator.languages??[],navigator.language]){const t=e.toLowerCase().split("-")[0],r=V.find(n=>n.id===t);if(r)return r.id}}l(he,"detectBrowserLocale");const de=["slots","connection","remote","settingsScope"];function ye(e){const t=new H(e,e.settingsScope.bind({namespace:re}));t.register(q,{zh:ie,en:oe}),t.register(z,{zh:se,en:ce}),e.provide("locale",t),e.slots.installLocale(t);const r=ae();let n;const i=l(o=>{n?.sync(o.active,o.locales.map(f=>({id:f.id,label:f.label})),o.revision)},"sync");e.on("locale/change",i);const s=l(o=>(n=o,i(t.getLocale()),{setLocale:l(f=>{t.setLocale(f)},"setLocale")}),"injected");e.slots.inject("settings.general.item",()=>e.slots.register({name:"settings.general.item",id:"language",order:0,store:r,locale:z,inject:s},fe))}return l(ye,"apply"),w.COMMON_NS=q,w.FALLBACK_LOCALE=ue,w.LocaleRuntime=H,w.SETTINGS_NS=z,w.apply=ye,w.inject=de,k.exports},"factory")});
1
+ var _e=Object.defineProperty;var l=(S,k)=>_e(S,"name",{value:k,configurable:!0});window.__ModuleLoader__.load({id:"@deepseek-ai/dsh-client-locale",factory:l(S=>{var k={exports:{}},w=k.exports;Object.defineProperty(w,Symbol.toStringTag,{value:"Module"});let _=S("react/jsx-runtime"),W=S("react"),R=S("@deepseek-ai/dsh-client-ui-primitives"),Y=S("@deepseek-ai/dsh-client-runtime/client");function y(e){return e==null}l(y,"isNullable");function N(e){return e&&typeof e=="object"&&!Array.isArray(e)}l(N,"isPlainObject");function Q(e,t){return Object.fromEntries(Object.entries(e).filter(([r,n])=>t(r,n)))}l(Q,"filterKeys");function b(e,t){return Object.fromEntries(Object.entries(e).map(([r,n])=>[r,t(n,r)]))}l(b,"mapValues");function X(e,t,r){if(!t)return{...e};const n={};for(const i of t)(r||e[i]!==void 0)&&(n[i]=e[i]);return n}l(X,"pick");function x(e,t){return arguments.length===1?r=>x(e,r):e in globalThis&&t instanceof globalThis[e]||Object.prototype.toString.call(t).slice(8,-1)===e}l(x,"is");function A(e){return x("ArrayBuffer",e)||x("SharedArrayBuffer",e)}l(A,"isArrayBufferLike");function Z(e){return A(e)||ArrayBuffer.isView(e)}l(Z,"isArrayBufferSource");let g;(function(e){e.is=A,e.isSource=Z;function t(o){return ArrayBuffer.isView(o)?o.buffer.slice(o.byteOffset,o.byteOffset+o.byteLength):o}l(t,"fromSource"),e.fromSource=t;function r(o){if(o=t(o),typeof Buffer<"u")return Buffer.from(o).toString("base64");let f="";const h=new Uint8Array(o);for(let m=0;m<h.byteLength;m++)f+=String.fromCharCode(h[m]);return btoa(f)}l(r,"toBase64"),e.toBase64=r;function n(o){return typeof Buffer<"u"?t(Buffer.from(o,"base64")):Uint8Array.from(atob(o),f=>f.charCodeAt(0))}l(n,"fromBase64"),e.fromBase64=n;function i(o){return o=t(o),typeof Buffer<"u"?Buffer.from(o).toString("hex"):Array.from(new Uint8Array(o),f=>f.toString(16).padStart(2,"0")).join("")}l(i,"toHex"),e.toHex=i;function s(o){if(typeof Buffer<"u")return t(Buffer.from(o,"hex"));const f=o.length%2===0?o:o.slice(0,o.length-1),h=[];for(let m=0;m<f.length;m+=2)h.push(parseInt(`${f[m]}${f[m+1]}`,16));return Uint8Array.from(h).buffer}l(s,"fromHex"),e.fromHex=s})(g||(g={})),g.fromBase64,g.toBase64,g.fromHex,g.toHex;function D(e,t=new Map){if(!e||typeof e!="object")return e;if(x("Date",e))return new Date(e.valueOf());if(x("RegExp",e))return new RegExp(e.source,e.flags);if(A(e))return e.slice(0);if(ArrayBuffer.isView(e))return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);const r=t.get(e);if(r)return r;if(Array.isArray(e)){const i=[];return t.set(e,i),e.forEach((s,o)=>{i[o]=Reflect.apply(D,null,[s,t])}),i}const n=Object.create(Object.getPrototypeOf(e));t.set(e,n);for(const i of Reflect.ownKeys(e)){const s={...Reflect.getOwnPropertyDescriptor(e,i)};"value"in s&&(s.value=Reflect.apply(D,null,[s.value,t])),Reflect.defineProperty(n,i,s)}return n}l(D,"clone");function $(e,t,r){if(e===t||!r&&y(e)&&y(t))return!0;if(typeof e!=typeof t||typeof e!="object"||!e||!t)return!1;function n(i,s){return i(e)?i(t)?s(e,t):!1:i(t)?!1:void 0}return l(n,"check"),n(Array.isArray,(i,s)=>i.length===s.length&&i.every((o,f)=>$(o,s[f])))??n(x("Date"),(i,s)=>i.valueOf()===s.valueOf())??n(x("RegExp"),(i,s)=>i.source===s.source&&i.flags===s.flags)??n(A,(i,s)=>{if(i.byteLength!==s.byteLength)return!1;const o=new Uint8Array(i),f=new Uint8Array(s);for(let h=0;h<o.length;h++)if(o[h]!==f[h])return!1;return!0})??Object.keys({...e,...t}).every(i=>$(e[i],t[i],r))}l($,"deepEqual");let T;(function(e){e.millisecond=1;const t=e.second=1e3,r=e.minute=t*60,n=e.hour=r*60,i=e.day=n*24,s=e.week=i*7;let o=new Date().getTimezoneOffset();function f(a){o=a}l(f,"setTimezoneOffset"),e.setTimezoneOffset=f;function h(){return o}l(h,"getTimezoneOffset"),e.getTimezoneOffset=h;function m(a=new Date,u){return typeof a=="number"&&(a=new Date(a)),u===void 0&&(u=o),Math.floor((a.valueOf()/r-u)/1440)}l(m,"getDateNumber"),e.getDateNumber=m;function ge(a,u){const Se=new Date(a*i);return u===void 0&&(u=o),new Date(+Se+u*r)}l(ge,"fromDateNumber"),e.fromDateNumber=ge;const me=/\d+(?:\.\d+)?/.source,be=new RegExp(`^${["w(?:eek(?:s)?)?","d(?:ay(?:s)?)?","h(?:our(?:s)?)?","m(?:in(?:ute)?(?:s)?)?","s(?:ec(?:ond)?(?:s)?)?"].map(a=>`(${me}${a})?`).join("")}$`);function G(a){const u=be.exec(a);return u?(parseFloat(u[1])*s||0)+(parseFloat(u[2])*i||0)+(parseFloat(u[3])*n||0)+(parseFloat(u[4])*r||0)+(parseFloat(u[5])*t||0):0}l(G,"parseTime"),e.parseTime=G;function we(a){const u=G(a);return u?a=Date.now()+u:/^\d{1,2}(:\d{1,2}){1,2}$/.test(a)?a=`${new Date().toLocaleDateString()}-${a}`:/^\d{1,2}-\d{1,2}-\d{1,2}(:\d{1,2}){1,2}$/.test(a)&&(a=`${new Date().getFullYear()}-${a}`),a?new Date(a):new Date}l(we,"parseDate"),e.parseDate=we;function xe(a){const u=Math.abs(a);return u>=i-n/2?Math.round(a/i)+"d":u>=n-r/2?Math.round(a/n)+"h":u>=r-t/2?Math.round(a/r)+"m":u>=t?Math.round(a/t)+"s":a+"ms"}l(xe,"format"),e.format=xe;function v(a,u=2){return a.toString().padStart(u,"0")}l(v,"toDigits"),e.toDigits=v;function ve(a,u=new Date){return a.replace("yyyy",u.getFullYear().toString()).replace("yy",u.getFullYear().toString().slice(2)).replace("MM",v(u.getMonth()+1)).replace("dd",v(u.getDate())).replace("hh",v(u.getHours())).replace("mm",v(u.getMinutes())).replace("ss",v(u.getSeconds())).replace("SSS",v(u.getMilliseconds(),3))}l(ve,"template"),e.template=ve})(T||(T={}));const E=Symbol.for("schemastery"),U=Symbol.for("ValidationError");globalThis.__schemastery_index__??=0,globalThis.__schemastery_refs__=void 0;var p=class extends TypeError{static{l(this,"ValidationError")}options;name="ValidationError";constructor(e,t){let r="$";for(const n of t.path||[])typeof n=="string"?r+="."+n:typeof n=="number"?r+="["+n+"]":typeof n=="symbol"&&(r+=`[Symbol(${n.toString()})]`);r.startsWith(".")&&(r=r.slice(1)),super((r==="$"?"":`${r} `)+e),this.options=t}static is(e){return!!e?.[U]}};Object.defineProperty(p.prototype,U,{value:!0});const c=l(function(e){const t=l(function(r,n={}){return c.resolve(r,t,n)[0]},"schema");if(e.refs){const r=b(e.refs,i=>new c(i)),n=l(i=>r[i],"getRef");for(const i in r){const s=r[i];s.sKey=n(s.sKey),s.inner=n(s.inner),s.list=s.list&&s.list.map(n),s.dict=s.dict&&b(s.dict,n)}return r[e.uid]}if(Object.assign(t,e),typeof t.callback=="string")try{t.callback=new Function("return "+t.callback)()}catch{}return Object.defineProperty(t,"uid",{value:globalThis.__schemastery_index__++}),Object.setPrototypeOf(t,c.prototype),t.meta||={},t.toString=t.toString.bind(t),t},"Schema");c.prototype=Object.create(Function.prototype),c.prototype[E]=!0,Object.defineProperty(c.prototype,"~standard",{get(){return{version:1,vendor:"schemastery",validate:l(e=>{try{return{value:c.resolve(e,this,{})[0]}}catch(t){if(p.is(t))return{issues:[{message:t.message,path:t.options.path}]};throw t}},"validate")}}}),c.ValidationError=p,c.prototype.toJSON=l(function(){if(globalThis.__schemastery_refs__)return globalThis.__schemastery_refs__[this.uid]??=JSON.parse(JSON.stringify({...this})),this.uid;globalThis.__schemastery_refs__={[this.uid]:{...this}},globalThis.__schemastery_refs__[this.uid]=JSON.parse(JSON.stringify({...this}));const t={uid:this.uid,refs:globalThis.__schemastery_refs__};return globalThis.__schemastery_refs__=void 0,t},"toJSON"),c.prototype.set=l(function(t,r){return this.dict[t]=r,this},"set"),c.prototype.push=l(function(t){return this.list.push(t),this},"push");function ee(e,t){const r=typeof e=="string"?{"":e}:{...e};for(const n in t){const i=t[n];i?.$description||i?.$desc?r[n]=i.$description||i.$desc:typeof i=="string"&&(r[n]=i)}return r}l(ee,"mergeDesc");function O(e){return e?.$value??e?.$inner}l(O,"getInner");function F(e){return Q(e??{},t=>!t.startsWith("$"))}l(F,"extractKeys"),c.prototype.i18n=l(function(t){const r=c(this),n=ee(r.meta.description,t);return Object.keys(n).length&&(r.meta.description=n),r.dict&&(r.dict=b(r.dict,(i,s)=>i.i18n(b(t,o=>O(o)?.[s]??o?.[s])))),r.list&&(r.list=r.list.map((i,s)=>i.i18n(b(t,(o={})=>Array.isArray(O(o))?O(o)[s]:Array.isArray(o)?o[s]:F(o))))),r.inner&&(r.inner=r.inner.i18n(b(t,i=>O(i)?O(i):F(i)))),r.sKey&&(r.sKey=r.sKey.i18n(b(t,i=>i?.$key))),r},"i18n"),c.prototype.extra=l(function(t,r){const n=c(this);return n.meta={...n.meta,[t]:r},n},"extra");for(const e of["required","disabled","collapse","hidden","loose"])Object.assign(c.prototype,{[e](t=!0){const r=c(this);return r.meta={...r.meta,[e]:t},r}});c.prototype.deprecated=l(function(){const t=c(this);return t.meta.badges||=[],t.meta.badges.push({text:"deprecated",type:"danger"}),t},"deprecated"),c.prototype.experimental=l(function(){const t=c(this);return t.meta.badges||=[],t.meta.badges.push({text:"experimental",type:"warning"}),t},"experimental"),c.prototype.pattern=l(function(t){const r=c(this),n=X(t,["source","flags"]);return r.meta={...r.meta,pattern:n},r},"pattern"),c.prototype.simplify=l(function(t){if($(t,this.meta.default,this.type==="dict"))return null;if(y(t))return t;if(this.type==="object"||this.type==="dict"){const r={};for(const n in t){const i=(this.type==="object"?this.dict[n]:this.inner)?.simplify(t[n]);(this.type==="dict"||!y(i))&&(r[n]=i)}return $(r,this.meta.default,this.type==="dict")?null:r}else if(this.type==="array"||this.type==="tuple"){const r=[];return t.forEach((n,i)=>{const s=this.type==="array"?this.inner:this.list[i],o=s?s.simplify(n):n;r.push(o)}),r}else if(this.type==="intersect"){const r={};for(const n of this.list)Object.assign(r,n.simplify(t));return r}else if(this.type==="union")for(const r of this.list)try{return c.resolve(t,r,{}),r.simplify(t)}catch{}return t},"simplify"),c.prototype.toString=l(function(t){return K[this.type]?.(this,t)??`Schema<${this.type}>`},"toString"),c.prototype.role=l(function(e,t){const r=c(this);return r.meta={...r.meta,role:e,extra:t},r},"role");for(const e of["default","link","comment","description","max","min","step"])Object.assign(c.prototype,{[e](t){const r=c(this);return r.meta={...r.meta,[e]:t},r}});const J={};c.extend=l(function(t,r){J[t]=r},"extend"),c.resolve=l(function(t,r,n={},i=!1){if(!r)return[t];if(n.ignore?.(t,r))return[t];if(y(t)&&r.type!=="lazy"){if(r.meta.required)throw new p("missing required value",n);let o=r,f=r.meta.default;for(;o?.type==="intersect"&&y(f);)o=o.list[0],f=o?.meta.default;if(y(f))return[t];t=D(f)}const s=J[r.type];if(!s)throw new p(`unsupported type "${r.type}"`,n);try{return s(t,r,n,i)}catch(o){if(!r.meta.loose)throw o;return[r.meta.default]}},"resolve"),c.from=l(function(t){if(y(t))return c.any();if(["string","number","boolean"].includes(typeof t))return c.const(t).required();if(t[E])return t;if(typeof t=="function")switch(t){case String:return c.string().required();case Number:return c.number().required();case Boolean:return c.boolean().required();case Function:return c.function().required();default:return c.is(t).required()}else throw new TypeError(`cannot infer schema from ${t}`)},"from"),c.lazy=l(function(t){const r=l(()=>(n.inner[E]||(n.inner=n.builder(),n.inner.meta={...n.meta,...n.inner.meta}),n.inner.toJSON()),"toJSON"),n=new c({type:"lazy",builder:t,inner:{toJSON:r}});return n},"lazy"),c.natural=l(function(){return c.number().step(1).min(0)},"natural"),c.percent=l(function(){return c.number().step(.01).min(0).max(1).role("slider")},"percent"),c.date=l(function(){return c.union([c.is(Date),c.transform(c.string().role("datetime"),(t,r)=>{const n=new Date(t);if(isNaN(+n))throw new p(`invalid date "${t}"`,r);return n},!0)])},"date"),c.regExp=l(function(t=""){return c.union([c.is(RegExp),c.transform(c.string().role("regexp",{flag:t}),(r,n)=>{try{return new RegExp(r,t)}catch(i){throw new p(i.message,n)}},!0)])},"regExp"),c.arrayBuffer=l(function(t){return c.union([c.is(ArrayBuffer),c.is(SharedArrayBuffer),c.transform(c.any(),(r,n)=>{if(g.isSource(r))return g.fromSource(r);throw new p(`expected ArrayBufferSource but got ${r}`,n)},!0),...t?[c.transform(c.string(),(r,n)=>{try{return t==="base64"?g.fromBase64(r):g.fromHex(r)}catch(i){throw new p(i.message,n)}},!0)]:[]])},"arrayBuffer"),c.extend("lazy",(e,t,r,n)=>(t.inner[E]||(t.inner=t.builder(),t.inner.meta={...t.meta,...t.inner.meta}),c.resolve(e,t.inner,r,n))),c.extend("any",e=>[e]),c.extend("never",(e,t,r)=>{throw new p(`expected nullable but got ${e}`,r)}),c.extend("const",(e,{value:t},r)=>{if($(e,t))return[t];throw new p(`expected ${t} but got ${e}`,r)});function M(e,t,r,n,i=!1){const{max:s=1/0,min:o=-1/0}=t;if(e>s)throw new p(`expected ${r} <= ${s} but got ${e}`,n);if(e<o&&!i)throw new p(`expected ${r} >= ${o} but got ${e}`,n)}l(M,"checkWithinRange"),c.extend("string",(e,{meta:t},r)=>{if(typeof e!="string")throw new p(`expected string but got ${e}`,r);if(t.pattern){const n=new RegExp(t.pattern.source,t.pattern.flags);if(!n.test(e))throw new p(`expect string to match regexp ${n}`,r)}return M(e.length,t,"string length",r),[e]});function B(e,t){const r=e.toString();if(r.includes("e"))return e*Math.pow(10,t);const n=r.indexOf(".");if(n===-1)return e*Math.pow(10,t);const i=r.slice(n+1),s=r.slice(0,n);return i.length<=t?+(s+i.padEnd(t,"0")):+(s+i.slice(0,t)+"."+i.slice(t))}l(B,"decimalShift");function te(e,t,r){if(r=Math.abs(r),!/^\d+\.\d+$/.test(r.toString()))return(e-t)%r===0;const n=r.toString().indexOf("."),i=r.toString().slice(n+1).length;return Math.abs(B(e,i)-B(t,i))%B(r,i)===0}l(te,"isMultipleOf"),c.extend("number",(e,{meta:t},r)=>{if(typeof e!="number")throw new p(`expected number but got ${e}`,r);M(e,t,"number",r);const{step:n}=t;if(n&&!te(e,t.min??0,n))throw new p(`expected number multiple of ${n} but got ${e}`,r);return[e]}),c.extend("boolean",(e,t,r)=>{if(typeof e=="boolean")return[e];throw new p(`expected boolean but got ${e}`,r)}),c.extend("bitset",(e,{bits:t,meta:r},n)=>{let i=0,s=[];if(typeof e=="number"){i=e;for(const o in t)e&t[o]&&s.push(o)}else if(Array.isArray(e)){s=e;for(const o of s){if(typeof o!="string")throw new p(`expected string but got ${o}`,n);o in t&&(i|=t[o])}}else throw new p(`expected number or array but got ${e}`,n);return i===r.default?[i]:[i,s]}),c.extend("function",(e,t,r)=>{if(typeof e=="function")return[e];throw new p(`expected function but got ${e}`,r)}),c.extend("is",(e,{constructor:t},r)=>{if(typeof t=="function"){if(e instanceof t)return[e];throw new p(`expected ${t.name} but got ${e}`,r)}else{if(y(e))throw new p(`expected ${t} but got ${e}`,r);let n=Object.getPrototypeOf(e);for(;n;){if(n.constructor?.name===t)return[e];n=Object.getPrototypeOf(n)}throw new p(`expected ${t} but got ${e}`,r)}});function L(e,t,r,n){try{const[i,s]=c.resolve(e[t],r,{...n,path:[...n.path||[],t]});return s!==void 0&&(e[t]=s),i}catch(i){if(!n?.autofix)throw i;return delete e[t],r.meta.default}}l(L,"property"),c.extend("array",(e,{inner:t,meta:r},n)=>{if(!Array.isArray(e))throw new p(`expected array but got ${e}`,n);return M(e.length,r,"array length",n,!y(t.meta.default)),[e.map((i,s)=>L(e,s,t,n))]}),c.extend("dict",(e,{inner:t,sKey:r},n,i)=>{if(!N(e))throw new p(`expected object but got ${e}`,n);const s={};for(const o in e){let f;try{f=c.resolve(o,r,n)[0]}catch(h){if(i)continue;throw h}s[f]=L(e,o,t,n),e[f]=e[o],o!==f&&delete e[o]}return[s]}),c.extend("tuple",(e,{list:t},r,n)=>{if(!Array.isArray(e))throw new p(`expected array but got ${e}`,r);const i=t.map((s,o)=>L(e,o,s,r));return n?[i]:(i.push(...e.slice(t.length)),[i])});function C(e,t){for(const r in t)r in e||(e[r]=t[r])}l(C,"merge"),c.extend("object",(e,{dict:t},r,n)=>{if(!N(e))throw new p(`expected object but got ${e}`,r);const i={};for(const s in t){const o=L(e,s,t[s],r);(!y(o)||s in e)&&(i[s]=o)}return n||C(i,e),[i]}),c.extend("union",(e,{list:t,toString:r},n,i)=>{const s=[];for(const o of t)try{return c.resolve(e,o,n,i)}catch(f){s.push(f)}throw new p(`expected ${r()} but got ${JSON.stringify(e)}`,n)}),c.extend("intersect",(e,{list:t,toString:r},n,i)=>{if(!t.length)return[e];let s;for(const o of t){const f=c.resolve(e,o,n,!0)[0];if(!y(f))if(y(s))s=f;else{if(typeof s!=typeof f)throw new p(`expected ${r()} but got ${JSON.stringify(e)}`,n);if(typeof f=="object")C(s??={},f);else if(s!==f)throw new p(`expected ${r()} but got ${JSON.stringify(e)}`,n)}}return!i&&N(e)&&C(s,e),[s]}),c.extend("transform",(e,{inner:t,callback:r,preserve:n},i)=>{const[s,o=e]=c.resolve(e,t,i,!0);return n?[r(s)]:[r(s),r(o)]});const K={};function d(e,t,r){K[e]=r,Object.assign(c,{[e](...n){const i=new c({type:e});return t.forEach((s,o)=>{switch(s){case"sKey":i.sKey=n[o]??c.string();break;case"inner":i.inner=c.from(n[o]);break;case"list":i.list=n[o].map(c.from);break;case"dict":i.dict=b(n[o],c.from);break;case"bits":i.bits={};for(const f in n[o])typeof n[o][f]=="number"&&(i.bits[f]=n[o][f]);break;case"callback":{const f=i.callback=n[o];f.toJSON||=()=>f.toString();break}case"constructor":{const f=i.constructor=n[o];typeof f=="function"&&(f.toJSON||=()=>f.name);break}default:i[s]=n[o]}}),e==="object"||e==="dict"?i.meta.default={}:e==="array"||e==="tuple"?i.meta.default=[]:e==="bitset"&&(i.meta.default=0),i}})}l(d,"defineMethod"),d("is",["constructor"],({constructor:e})=>typeof e=="function"?e.name:e),d("any",[],()=>"any"),d("never",[],()=>"never"),d("const",["value"],({value:e})=>typeof e=="string"?JSON.stringify(e):e),d("string",[],()=>"string"),d("number",[],()=>"number"),d("boolean",[],()=>"boolean"),d("bitset",["bits"],()=>"bitset"),d("function",[],()=>"function"),d("array",["inner"],({inner:e})=>`${e.toString(!0)}[]`),d("dict",["inner","sKey"],({inner:e,sKey:t})=>`{ [key: ${t.toString()}]: ${e.toString()} }`),d("tuple",["list"],({list:e})=>`[${e.map(t=>t.toString()).join(", ")}]`),d("object",["dict"],({dict:e})=>Object.keys(e).length===0?"{}":`{ ${Object.entries(e).map(([t,r])=>`${t}${r.meta.required?"":"?"}: ${r.toString()}`).join(", ")} }`),d("union",["list"],({list:e},t)=>{const r=e.map(({toString:n})=>n()).join(" | ");return t?`(${r})`:r}),d("intersect",["list"],({list:e})=>`${e.map(t=>t.toString(!0)).join(" & ")}`),d("transform",["inner","callback","preserve"],({inner:e},t)=>e.toString(t));const re="locale",P="preference",ne=["zh","en"];c.object({[P]:c.union([...ne]).required(!1)});const ie={ok:"确定",cancel:"取消",close:"关闭",copy:"复制",copied:"复制成功",retry:"重试",loading:"加载中…","load.failed":"加载失败",submit:"提交",submitting:"正在提交…",next:"下一步",previous:"上一步",skip:"跳过",delete:"删除",edit:"编辑",save:"保存",search:"搜索",more:"更多",collapse:"收起",expand:"展开",back:"返回",unknown:"未知",none:"无",truncated:"已截断"},oe={ok:"OK",cancel:"Cancel",close:"Close",copy:"Copy",copied:"Copied",retry:"Retry",loading:"Loading…","load.failed":"Failed to load",submit:"Submit",submitting:"Submitting…",next:"Next",previous:"Previous",skip:"Skip",delete:"Delete",edit:"Edit",save:"Save",search:"Search",more:"More",collapse:"Collapse",expand:"Expand",back:"Back",unknown:"Unknown",none:"None",truncated:"Truncated"},se={"language.title":"语言"},ce={"language.title":"Language"},le=".j_Uvsa_row{border-bottom:1px solid var(--dsw-alias-border-l2);align-items:center;gap:8px;padding:16px 0;display:flex}.j_Uvsa_rowText{flex-direction:column;flex:1;gap:4px;min-width:0;padding-right:48px;display:flex}.j_Uvsa_title{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:400;line-height:22px}.j_Uvsa_selector{background:var(--dsw-alias-bg-module-platform);height:36px;font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;border:none;border-radius:18px;align-items:center;gap:12px;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}.j_Uvsa_selector:hover{background:var(--dsw-alias-interactive-bg-hover)}.j_Uvsa_chevron{flex:none}",I="@deepseek-ai/dsh-client-locale/LanguageRow.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(I)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-client-locale",e.dataset.pluginCss=I,e.textContent=le,document.head.appendChild(e)}var j={title:"j_Uvsa_title",chevron:"j_Uvsa_chevron",row:"j_Uvsa_row",rowText:"j_Uvsa_rowText",selector:"j_Uvsa_selector"};function fe({t:e,setLocale:t,useStore:r}){const n=r(h=>h.active),i=r(h=>h.options),[s,o]=(0,W.useState)(!1),f=i.find(h=>h.id===n)?.label??n;return(0,_.jsxs)("div",{className:j.row,children:[(0,_.jsx)("div",{className:j.rowText,children:(0,_.jsx)("div",{className:j.title,children:e("language.title")})}),(0,_.jsx)(R.Menu,{open:s,onClose:l(()=>{o(!1)},"onClose"),items:i.map(h=>({id:h.id,label:h.label})),selectedId:n,onSelect:l(h=>{t(h),o(!1)},"onSelect"),align:"end",portal:!0,anchor:(0,_.jsxs)("button",{type:"button",className:j.selector,"aria-haspopup":"menu","aria-expanded":s,onClick:l(()=>{o(h=>!h)},"onClick"),children:[f,(0,_.jsx)(R.IconChevronDownOutline14,{className:j.chevron})]})})]})}l(fe,"LanguageRow");function ae(){return(0,Y.defineStore)({init:l(()=>({active:"",options:[],revision:-1}),"init"),actions:{sync:l((e,t,r,n)=>{n<=e.revision||(e.active=t,e.options=r,e.revision=n)},"sync")}})}l(ae,"createLanguageRowStore");const ue="zh",q="common",z="settings.locale",V=Object.freeze([{id:"zh",label:"中文"},{id:"en",label:"English"}]);var H=class{static{l(this,"LocaleRuntime")}dicts=new Map;bound=new Map;snapshot;listeners=new Set;ctx;host;provisional;constructor(e,t){this.ctx=e,this.host=t,this.provisional=pe(),this.snapshot=Object.freeze({active:this.provisional,locales:V,revision:0}),t!==void 0&&(e.effect(()=>t.subscribe(()=>{this.adopt(t)}),"locale: settings scope adoption"),this.adopt(t))}getLocale(){return this.snapshot}getSnapshot(){return this.snapshot}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setLocale(e){const t=this.snapshot.locales.find(r=>r.id===e);if(t===void 0)throw new Error(`locale "${e}" is not registered`);this.snapshot.active!==t.id&&(this.publish(t.id,!0),this.host?.set(P,t.id))}adopt(e){const t=e.getSnapshot().value;if(t===void 0)return;const r=t.preference??this.provisional;this.snapshot.active!==r&&this.publish(r,!0)}register(e,t,r){const n=typeof t=="string"?[[t,r]]:Object.entries(t);let i=this.dicts.get(e);i||(i=new Map,this.dicts.set(e,i));for(const[s]of n)if(i.has(s))throw new Error(`locale namespace "${e}" already has locale "${s}"`);for(const[s,o]of n)i.set(s,o);return this.publish(this.snapshot.active,!1),()=>{const s=this.dicts.get(e);if(!s)return;let o=!1;for(const[f,h]of n)s.get(f)===h&&(s.delete(f),o=!0);o&&this.publish(this.snapshot.active,!1)}}bind(e){let t=this.bound.get(e);return t||(t=l((r,n)=>this.translate(e,r,n),"t"),this.bound.set(e,t),t)}translate(e,t,r){const n=this.lookup(e,t)??(e!=="common"?this.lookup("common",t):void 0)??t;return r?n.replace(/\{(\w+)\}/g,(i,s)=>s in r?String(r[s]):i):n}lookup(e,t){const r=this.dicts.get(e);return r?.get(this.snapshot.active)?.[t]??r?.get("zh")?.[t]}publish(e,t){this.snapshot=Object.freeze({active:e,locales:this.snapshot.locales,revision:this.snapshot.revision+1}),t&&this.ctx.emit("locale/change",this.snapshot);for(const r of[...this.listeners])try{r()}catch(n){console.error("locale subscriber crashed:",n)}}};function pe(){return he()??"zh"}l(pe,"resolveInitialLocale");function he(){if(!(typeof window>"u"))for(const e of[...navigator.languages??[],navigator.language]){const t=e.toLowerCase().split("-")[0],r=V.find(n=>n.id===t);if(r)return r.id}}l(he,"detectBrowserLocale");const de=["slots","connection","remote","settingsScope"];function ye(e){const t=new H(e,e.settingsScope.bind({namespace:re}));t.register(q,{zh:ie,en:oe}),t.register(z,{zh:se,en:ce}),e.provide("locale",t),e.slots.installLocale(t);const r=ae();let n;const i=l(o=>{n?.sync(o.active,o.locales.map(f=>({id:f.id,label:f.label})),o.revision)},"sync");e.on("locale/change",i);const s=l(o=>(n=o,i(t.getLocale()),{setLocale:l(f=>{t.setLocale(f)},"setLocale")}),"injected");e.slots.inject("settings.general.item",()=>e.slots.register({name:"settings.general.item",id:"language",order:0,store:r,locale:z,inject:s},fe))}return l(ye,"apply"),w.COMMON_NS=q,w.FALLBACK_LOCALE=ue,w.LocaleRuntime=H,w.SETTINGS_NS=z,w.apply=ye,w.inject=de,k.exports},"factory")});