better-dsh 0.2.3 → 0.2.4-b

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 (406) hide show
  1. package/cordis.patch.yml +47 -16
  2. package/docs/10_plans/2026-09-23-remote-execution-framework.md +236 -0
  3. package/docs/10_plans/2026-09-23-remote-framework-impl.md +2083 -0
  4. package/docs/50_test-reports/2026-09-06-write/345/267/245/345/205/267sandbox/345/215/207/347/272/247/351/200/217/344/274/240bug/345/244/215/345/217/221/345/217/212/346/214/202/350/265/267-/344/272/213/344/273/266/346/212/245/345/221/212.md +176 -0
  5. package/docs/50_test-reports/2026-09-08-hashline-edit-E_RANGE_UNVERIFIED/350/267/250/350/275/256/344/274/232/350/257/235/351/224/256/345/244/261/346/225/210-/350/257/212/346/226/255/346/212/245/345/221/212.md +226 -0
  6. package/docs/50_test-reports/2026-09-11-control-prompt-into-eval-description/345/256/236/346/265/213/346/212/245/345/221/212.md +222 -0
  7. package/docs/50_test-reports/2026-09-12-fs-scheme-resolution-/345/256/236/346/265/213/346/212/245/345/221/212.md +81 -0
  8. package/docs/50_test-reports/2026-09-12-url-schemes-grammar-matrix/344/270/216catalog-centralize-/345/256/236/346/265/213/346/212/245/345/221/212.md +234 -0
  9. package/docs/50_test-reports/2026-09-12-url-schemes-recallable-context-design/351/252/214/350/257/201/346/212/245/345/221/212.md +160 -0
  10. package/docs/50_test-reports/2026-09-12-url-schemes-recallable-context-/345/256/236/346/265/213/345/211/247/346/234/254.md +44 -0
  11. package/docs/50_test-reports/2026-09-12-url-schemes-recallable-context-/345/256/236/346/265/213/346/212/245/345/221/212.md +89 -0
  12. package/docs/50_test-reports/2026-09-12-url-schemes-/345/205/255scheme/345/206/222/347/203/237/344/270/216/350/276/271/347/225/214/345/256/236/346/265/213/346/212/245/345/221/212.md +198 -0
  13. package/docs/50_test-reports/2026-09-13-hashline-off/344/270/213scheme/345/217/257/350/276/276/346/200/247/345/267/245/345/205/267/351/235/242/344/270/215/345/257/271/347/247/260-/345/256/236/346/265/213/346/212/245/345/221/212.md +246 -0
  14. package/docs/50_test-reports/2026-09-13-preact-ui-shell/345/256/236/346/265/213/346/212/245/345/221/212.md +50 -0
  15. package/docs/50_test-reports/2026-09-14-4999-skill/346/270/205/345/215/225/344/270/216lsp-gate/345/256/236/346/265/213/346/212/245/345/221/212.md +63 -0
  16. package/docs/50_test-reports/2026-09-17-plugins/351/241/265/345/205/255/347/273/204/344/273/266/346/213/206/345/210/206/345/256/236/346/265/213/346/212/245/345/221/212.md +76 -0
  17. package/docs/50_test-reports/2026-09-23-remote-framework/345/256/236/346/265/213/346/212/245/345/221/212.md +92 -0
  18. package/docs/50_test-reports/2026-09-23-remote-framework/347/254/254/344/270/200/344/272/272/347/247/260/345/244/215/346/265/213/346/212/245/345/221/212.md +125 -0
  19. package/docs/50_test-reports/upstream-dsh-0.1.3-alpha.2-local-test-report.md +44 -0
  20. package/docs/50_test-reports/upstream-dsh-0.1.3-alpha.2-report.md +110 -0
  21. package/docs/50_test-reports/upstream-dsh-0.1.5-rc.2-local-test-report.md +79 -0
  22. package/docs/50_test-reports/v0.2.3b-hashline-content-locator/345/256/236/346/265/213/346/212/245/345/221/212.md +73 -0
  23. package/docs/50_test-reports/v0.2.3c-mobile-wave/345/256/236/346/265/213/346/212/245/345/221/212.md +47 -0
  24. package/docs/50_test-reports/v0.2.4-ios-focus-zoom-suppression/345/256/236/346/265/213/346/212/245/345/221/212.md +158 -0
  25. package/docs/specs/agent/spec.md +54 -0
  26. package/docs/specs/ast/spec.md +34 -0
  27. package/docs/specs/compaction-recall/spec.md +46 -0
  28. package/docs/specs/ctx/spec.md +107 -0
  29. package/docs/specs/dsh/spec.md +47 -0
  30. package/docs/specs/dvc/spec.md +87 -0
  31. package/docs/specs/escalation-guidance/spec.md +44 -0
  32. package/docs/specs/fs-scheme-resolution/spec.md +37 -0
  33. package/docs/specs/hash-edit/spec.md +41 -0
  34. package/docs/specs/http-read/spec.md +73 -0
  35. package/docs/specs/kernel-provisioning/spec.md +53 -0
  36. package/docs/specs/lsp/spec.md +121 -0
  37. package/docs/specs/mobile-layout/spec.md +108 -0
  38. package/docs/specs/model-failover/spec.md +20 -0
  39. package/docs/specs/plugins-page-components/spec.md +79 -0
  40. package/docs/specs/preact-ui-shell/spec.md +22 -0
  41. package/docs/specs/repl-dispatch-resilience/spec.md +21 -0
  42. package/docs/specs/skill/spec.md +58 -0
  43. package/docs/specs/tool-surface/spec.md +222 -0
  44. package/docs/specs/url-schema/spec.md +148 -0
  45. package/docs/specs/web-trust-fence/spec.md +43 -0
  46. package/docs/upstream-dsh-0.1.5-rc.2-report.md +156 -0
  47. package/dsh-docs/AGENTS.md +75 -0
  48. package/dsh-docs/agent-lifecycle.md +84 -0
  49. package/dsh-docs/agent-lifecycle.zh.md +86 -0
  50. package/dsh-docs/api-gateway.md +164 -0
  51. package/dsh-docs/api-gateway.zh.md +164 -0
  52. package/dsh-docs/architecture.md +150 -0
  53. package/dsh-docs/architecture.zh.md +154 -0
  54. package/dsh-docs/capability-seams.md +543 -0
  55. package/dsh-docs/capability-seams.zh.md +545 -0
  56. package/dsh-docs/config-catalog.md +3473 -0
  57. package/dsh-docs/config-catalog.zh.md +3474 -0
  58. package/dsh-docs/cookbook/adding-a-package.md +117 -0
  59. package/dsh-docs/cookbook/adding-a-package.zh.md +119 -0
  60. package/dsh-docs/cookbook/adding-a-remote-api.md +197 -0
  61. package/dsh-docs/cookbook/adding-a-remote-api.zh.md +197 -0
  62. package/dsh-docs/cookbook/adding-a-session-format-version.md +109 -0
  63. package/dsh-docs/cookbook/adding-a-session-format-version.zh.md +109 -0
  64. package/dsh-docs/cookbook/adding-a-settings-card.md +102 -0
  65. package/dsh-docs/cookbook/adding-a-settings-card.zh.md +102 -0
  66. package/dsh-docs/cookbook/adding-a-tool.md +101 -0
  67. package/dsh-docs/cookbook/adding-a-tool.zh.md +103 -0
  68. package/dsh-docs/cookbook/adding-a-vendored-package.md +59 -0
  69. package/dsh-docs/cookbook/adding-a-vendored-package.zh.md +59 -0
  70. package/dsh-docs/cookbook/adding-an-llm-adapter.md +43 -0
  71. package/dsh-docs/cookbook/adding-an-llm-adapter.zh.md +43 -0
  72. package/dsh-docs/cookbook/extension-cookbook.md +132 -0
  73. package/dsh-docs/cookbook/extension-cookbook.zh.md +136 -0
  74. package/dsh-docs/cookbook/maintaining-dsh-code-review.md +64 -0
  75. package/dsh-docs/cookbook/maintaining-dsh-code-review.zh.md +64 -0
  76. package/dsh-docs/cookbook/responding-to-pr-review-on-a-stack.md +32 -0
  77. package/dsh-docs/cookbook/responding-to-pr-review-on-a-stack.zh.md +32 -0
  78. package/dsh-docs/cordis-api/context.md +364 -0
  79. package/dsh-docs/cordis-api/context.zh.md +366 -0
  80. package/dsh-docs/cordis-api/events.md +207 -0
  81. package/dsh-docs/cordis-api/events.zh.md +209 -0
  82. package/dsh-docs/cordis-api/fiber.md +375 -0
  83. package/dsh-docs/cordis-api/fiber.zh.md +377 -0
  84. package/dsh-docs/cordis-api/inherited.md +39 -0
  85. package/dsh-docs/cordis-api/registry.md +152 -0
  86. package/dsh-docs/cordis-api/registry.zh.md +154 -0
  87. package/dsh-docs/cordis-api/service.md +102 -0
  88. package/dsh-docs/cordis-api/service.zh.md +104 -0
  89. package/dsh-docs/cordis-primer.md +45 -0
  90. package/dsh-docs/cordis-primer.zh.md +51 -0
  91. package/dsh-docs/cordis-tutorial/01-first-plugin.md +95 -0
  92. package/dsh-docs/cordis-tutorial/01-first-plugin.zh.md +95 -0
  93. package/dsh-docs/cordis-tutorial/02-lifecycle-and-effects.md +98 -0
  94. package/dsh-docs/cordis-tutorial/02-lifecycle-and-effects.zh.md +98 -0
  95. package/dsh-docs/cordis-tutorial/03-services.md +98 -0
  96. package/dsh-docs/cordis-tutorial/03-services.zh.md +98 -0
  97. package/dsh-docs/cordis-tutorial/04-events.md +144 -0
  98. package/dsh-docs/cordis-tutorial/04-events.zh.md +144 -0
  99. package/dsh-docs/cordis-tutorial/05-config.md +84 -0
  100. package/dsh-docs/cordis-tutorial/05-config.zh.md +84 -0
  101. package/dsh-docs/cordis-tutorial/06-composition-and-hmr.md +113 -0
  102. package/dsh-docs/cordis-tutorial/06-composition-and-hmr.zh.md +113 -0
  103. package/dsh-docs/cordis-tutorial/07-into-the-harness.md +108 -0
  104. package/dsh-docs/cordis-tutorial/07-into-the-harness.zh.md +108 -0
  105. package/dsh-docs/cordis-tutorial/index.md +60 -0
  106. package/dsh-docs/cordis-tutorial/index.zh.md +62 -0
  107. package/dsh-docs/deepseek-llm-api-wire-extensions.md +163 -0
  108. package/dsh-docs/deepseek-llm-api-wire-extensions.zh.md +163 -0
  109. package/dsh-docs/defensive-patterns.md +33 -0
  110. package/dsh-docs/defensive-patterns.zh.md +35 -0
  111. package/dsh-docs/development.md +167 -0
  112. package/dsh-docs/development.zh.md +173 -0
  113. package/dsh-docs/event-producer-consumer.md +86 -0
  114. package/dsh-docs/event-producer-consumer.zh.md +88 -0
  115. package/dsh-docs/glossary.md +45 -0
  116. package/dsh-docs/glossary.zh.md +45 -0
  117. package/dsh-docs/graph-atlas.md +22 -0
  118. package/dsh-docs/graph-atlas.zh.md +24 -0
  119. package/dsh-docs/i18n/README.md +60 -0
  120. package/dsh-docs/i18n/README.zh.md +62 -0
  121. package/dsh-docs/i18n/style-samples.md +87 -0
  122. package/dsh-docs/i18n/terminology.md +214 -0
  123. package/dsh-docs/i18n/translation-prompt.md +263 -0
  124. package/dsh-docs/i18n/translation-rules.md +69 -0
  125. package/dsh-docs/i18n/translation-rules.zh.md +69 -0
  126. package/dsh-docs/module-graph.md +1411 -0
  127. package/dsh-docs/module-graph.zh.md +1413 -0
  128. package/dsh-docs/persistence-catalog.md +1075 -0
  129. package/dsh-docs/persistence-catalog.zh.md +1077 -0
  130. package/dsh-docs/postmortem/0001-acp-default-export-drops-inject.md +113 -0
  131. package/dsh-docs/postmortem/0001-acp-default-export-drops-inject.zh.md +113 -0
  132. package/dsh-docs/postmortem/0002-js-expression-disabled-filesystem-tools.md +47 -0
  133. package/dsh-docs/postmortem/0002-js-expression-disabled-filesystem-tools.zh.md +47 -0
  134. package/dsh-docs/postmortem/0003-web-agent-gui-feedback-loop.md +53 -0
  135. package/dsh-docs/postmortem/0003-web-agent-gui-feedback-loop.zh.md +53 -0
  136. package/dsh-docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.md +55 -0
  137. package/dsh-docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.zh.md +55 -0
  138. package/dsh-docs/postmortem/README.md +18 -0
  139. package/dsh-docs/postmortem/README.zh.md +18 -0
  140. package/dsh-docs/rescope.md +53 -0
  141. package/dsh-docs/rescope.zh.md +53 -0
  142. package/dsh-docs/session-format-status.md +47 -0
  143. package/dsh-docs/session-format-status.zh.md +47 -0
  144. package/dsh-docs/subsystems/README.md +61 -0
  145. package/dsh-docs/subsystems/README.zh.md +61 -0
  146. package/dsh-docs/subsystems/agent-team.md +207 -0
  147. package/dsh-docs/subsystems/agent-team.zh.md +207 -0
  148. package/dsh-docs/subsystems/approval.md +170 -0
  149. package/dsh-docs/subsystems/approval.zh.md +170 -0
  150. package/dsh-docs/subsystems/attachment.md +351 -0
  151. package/dsh-docs/subsystems/attachment.zh.md +351 -0
  152. package/dsh-docs/subsystems/client-modules.md +168 -0
  153. package/dsh-docs/subsystems/client-modules.zh.md +168 -0
  154. package/dsh-docs/subsystems/client-resources.md +91 -0
  155. package/dsh-docs/subsystems/client-resources.zh.md +91 -0
  156. package/dsh-docs/subsystems/code-runtime.md +195 -0
  157. package/dsh-docs/subsystems/code-runtime.zh.md +195 -0
  158. package/dsh-docs/subsystems/commands.md +219 -0
  159. package/dsh-docs/subsystems/commands.zh.md +219 -0
  160. package/dsh-docs/subsystems/compaction.md +238 -0
  161. package/dsh-docs/subsystems/compaction.zh.md +238 -0
  162. package/dsh-docs/subsystems/conversation.md +258 -0
  163. package/dsh-docs/subsystems/conversation.zh.md +258 -0
  164. package/dsh-docs/subsystems/core.md +1209 -0
  165. package/dsh-docs/subsystems/core.zh.md +1219 -0
  166. package/dsh-docs/subsystems/credentials.md +329 -0
  167. package/dsh-docs/subsystems/credentials.zh.md +329 -0
  168. package/dsh-docs/subsystems/extensions.md +382 -0
  169. package/dsh-docs/subsystems/extensions.zh.md +382 -0
  170. package/dsh-docs/subsystems/feedback.md +266 -0
  171. package/dsh-docs/subsystems/feedback.zh.md +266 -0
  172. package/dsh-docs/subsystems/filesystem.md +505 -0
  173. package/dsh-docs/subsystems/filesystem.zh.md +505 -0
  174. package/dsh-docs/subsystems/goal.md +277 -0
  175. package/dsh-docs/subsystems/goal.zh.md +277 -0
  176. package/dsh-docs/subsystems/invariants.md +88 -0
  177. package/dsh-docs/subsystems/invariants.zh.md +88 -0
  178. package/dsh-docs/subsystems/jobs.md +290 -0
  179. package/dsh-docs/subsystems/jobs.zh.md +290 -0
  180. package/dsh-docs/subsystems/llm-streaming.md +1080 -0
  181. package/dsh-docs/subsystems/llm-streaming.zh.md +1086 -0
  182. package/dsh-docs/subsystems/lsp.md +202 -0
  183. package/dsh-docs/subsystems/lsp.zh.md +202 -0
  184. package/dsh-docs/subsystems/permission-presets.md +131 -0
  185. package/dsh-docs/subsystems/permission-presets.zh.md +131 -0
  186. package/dsh-docs/subsystems/persistence.md +395 -0
  187. package/dsh-docs/subsystems/persistence.zh.md +395 -0
  188. package/dsh-docs/subsystems/plan.md +87 -0
  189. package/dsh-docs/subsystems/plan.zh.md +87 -0
  190. package/dsh-docs/subsystems/sandbox.md +220 -0
  191. package/dsh-docs/subsystems/sandbox.zh.md +220 -0
  192. package/dsh-docs/subsystems/schedule.md +192 -0
  193. package/dsh-docs/subsystems/schedule.zh.md +192 -0
  194. package/dsh-docs/subsystems/scope.md +59 -0
  195. package/dsh-docs/subsystems/scope.zh.md +59 -0
  196. package/dsh-docs/subsystems/session-projection.md +354 -0
  197. package/dsh-docs/subsystems/session-projection.zh.md +354 -0
  198. package/dsh-docs/subsystems/session-query.md +509 -0
  199. package/dsh-docs/subsystems/session-query.zh.md +509 -0
  200. package/dsh-docs/subsystems/session-reference.md +219 -0
  201. package/dsh-docs/subsystems/session-reference.zh.md +219 -0
  202. package/dsh-docs/subsystems/session-telemetry.md +194 -0
  203. package/dsh-docs/subsystems/session-telemetry.zh.md +194 -0
  204. package/dsh-docs/subsystems/session-title.md +204 -0
  205. package/dsh-docs/subsystems/session-title.zh.md +204 -0
  206. package/dsh-docs/subsystems/session.md +1155 -0
  207. package/dsh-docs/subsystems/session.zh.md +1159 -0
  208. package/dsh-docs/subsystems/settings.md +405 -0
  209. package/dsh-docs/subsystems/settings.zh.md +405 -0
  210. package/dsh-docs/subsystems/shell.md +303 -0
  211. package/dsh-docs/subsystems/shell.zh.md +303 -0
  212. package/dsh-docs/subsystems/sidebar-right.md +148 -0
  213. package/dsh-docs/subsystems/sidebar-right.zh.md +148 -0
  214. package/dsh-docs/subsystems/skills.md +354 -0
  215. package/dsh-docs/subsystems/skills.zh.md +354 -0
  216. package/dsh-docs/subsystems/slots.md +175 -0
  217. package/dsh-docs/subsystems/slots.zh.md +175 -0
  218. package/dsh-docs/subsystems/spill.md +117 -0
  219. package/dsh-docs/subsystems/spill.zh.md +117 -0
  220. package/dsh-docs/subsystems/storage.md +260 -0
  221. package/dsh-docs/subsystems/storage.zh.md +260 -0
  222. package/dsh-docs/subsystems/subagent.md +766 -0
  223. package/dsh-docs/subsystems/subagent.zh.md +770 -0
  224. package/dsh-docs/subsystems/subprocess.md +324 -0
  225. package/dsh-docs/subsystems/subprocess.zh.md +324 -0
  226. package/dsh-docs/subsystems/system-prompt.md +220 -0
  227. package/dsh-docs/subsystems/system-prompt.zh.md +220 -0
  228. package/dsh-docs/subsystems/terminal.md +184 -0
  229. package/dsh-docs/subsystems/terminal.zh.md +184 -0
  230. package/dsh-docs/subsystems/todo.md +32 -0
  231. package/dsh-docs/subsystems/todo.zh.md +32 -0
  232. package/dsh-docs/subsystems/token-meter.md +105 -0
  233. package/dsh-docs/subsystems/token-meter.zh.md +105 -0
  234. package/dsh-docs/subsystems/tools.md +720 -0
  235. package/dsh-docs/subsystems/tools.zh.md +720 -0
  236. package/dsh-docs/subsystems/typert.md +343 -0
  237. package/dsh-docs/subsystems/typert.zh.md +343 -0
  238. package/dsh-docs/subsystems/user-questions.md +178 -0
  239. package/dsh-docs/subsystems/user-questions.zh.md +178 -0
  240. package/dsh-docs/subsystems/web-client.md +95 -0
  241. package/dsh-docs/subsystems/web-client.zh.md +95 -0
  242. package/dsh-docs/subsystems/web-server.md +154 -0
  243. package/dsh-docs/subsystems/web-server.zh.md +154 -0
  244. package/dsh-docs/subsystems/web.md +206 -0
  245. package/dsh-docs/subsystems/web.zh.md +206 -0
  246. package/dsh-docs/subsystems/webhook.md +70 -0
  247. package/dsh-docs/subsystems/webhook.zh.md +70 -0
  248. package/dsh-docs/subsystems/workflow.md +278 -0
  249. package/dsh-docs/subsystems/workflow.zh.md +278 -0
  250. package/dsh-docs/subsystems/workspace.md +321 -0
  251. package/dsh-docs/subsystems/workspace.zh.md +321 -0
  252. package/dsh-docs/testing.md +54 -0
  253. package/dsh-docs/testing.zh.md +54 -0
  254. package/dsh-docs/tool-catalog.md +2225 -0
  255. package/dsh-docs/tool-catalog.zh.md +2233 -0
  256. package/dsh-docs/tool-execution-pipeline.md +62 -0
  257. package/dsh-docs/tool-execution-pipeline.zh.md +64 -0
  258. package/dsh-docs/user/develop/basic/config.md +106 -0
  259. package/dsh-docs/user/develop/basic/config.zh.md +106 -0
  260. package/dsh-docs/user/develop/basic/index.md +144 -0
  261. package/dsh-docs/user/develop/basic/index.zh.md +144 -0
  262. package/dsh-docs/user/develop/basic/publish.md +183 -0
  263. package/dsh-docs/user/develop/basic/publish.zh.md +183 -0
  264. package/dsh-docs/user/develop/basic/tool.md +52 -0
  265. package/dsh-docs/user/develop/basic/tool.zh.md +52 -0
  266. package/dsh-docs/user/develop/framework/events.md +143 -0
  267. package/dsh-docs/user/develop/framework/events.zh.md +143 -0
  268. package/dsh-docs/user/develop/framework/index.md +137 -0
  269. package/dsh-docs/user/develop/framework/index.zh.md +137 -0
  270. package/dsh-docs/user/develop/framework/service.md +148 -0
  271. package/dsh-docs/user/develop/framework/service.zh.md +150 -0
  272. package/dsh-docs/user/develop/practice/dynamic-cordis.md +15 -0
  273. package/dsh-docs/user/develop/practice/dynamic-cordis.zh.md +15 -0
  274. package/dsh-docs/user/develop/practice/index.md +155 -0
  275. package/dsh-docs/user/develop/practice/index.zh.md +155 -0
  276. package/dsh-docs/user/develop/practice/llm-adapter.md +189 -0
  277. package/dsh-docs/user/develop/practice/llm-adapter.zh.md +189 -0
  278. package/dsh-docs/user/guide/github-review.md +102 -0
  279. package/dsh-docs/user/guide/github-review.zh.md +102 -0
  280. package/dsh-docs/user/guide/index.md +30 -0
  281. package/dsh-docs/user/guide/index.zh.md +30 -0
  282. package/dsh-docs/user/guide/mcp-memory.md +101 -0
  283. package/dsh-docs/user/guide/mcp-memory.zh.md +101 -0
  284. package/dsh-docs/user/guide/network-proxy.md +85 -0
  285. package/dsh-docs/user/guide/network-proxy.zh.md +85 -0
  286. package/dsh-docs/user/guide/providers.md +190 -0
  287. package/dsh-docs/user/guide/providers.zh.md +190 -0
  288. package/dsh-docs/user/guide/python-sdk.md +150 -0
  289. package/dsh-docs/user/guide/python-sdk.zh.md +150 -0
  290. package/dsh-docs/user/guide/schedule.md +21 -0
  291. package/dsh-docs/user/guide/schedule.zh.md +21 -0
  292. package/dsh-docs/user/index.md +11 -0
  293. package/dsh-docs/user/index.zh.md +11 -0
  294. package/dsh-docs/web-styling.md +29 -0
  295. package/dsh-docs/web-styling.zh.md +29 -0
  296. package/eval-description.md +33 -0
  297. package/lib/client/index.js +328 -89
  298. package/lib/compaction/index.d.ts +47 -0
  299. package/lib/compaction/index.js +159 -0
  300. package/lib/failover/index.d.ts +35 -0
  301. package/lib/failover/index.js +141 -0
  302. package/lib/fs-aware/sandbox-plugin.d.ts +71 -0
  303. package/lib/fs-aware/sandbox-plugin.js +249 -0
  304. package/lib/index.d.ts +10 -41
  305. package/lib/index.js +226 -8173
  306. package/lib/lsp-server-registry-946ysdqg.js +972 -0
  307. package/lib/lsp-server-registry-XU6aHSqZ.js +3 -0
  308. package/lib/mobile/plugin.d.ts +29 -0
  309. package/lib/mobile/plugin.js +54 -0
  310. package/lib/native-capture-x_Hos2e8.js +68 -0
  311. package/lib/py-sdk-Chvy92MB.js +178 -0
  312. package/lib/py-sdk.d.ts +19 -2
  313. package/lib/py-sdk.js +2 -2
  314. package/lib/remote/plugin.d.ts +24 -0
  315. package/lib/remote/plugin.js +1095 -0
  316. package/lib/url-schemes/index.d.ts +88 -0
  317. package/lib/url-schemes/index.js +7200 -0
  318. package/lib/web-trust-BO66y72w.js +361 -0
  319. package/lib/web-trust-CgpBoFv3.d.ts +106 -0
  320. package/lib/web-trust.d.ts +2 -0
  321. package/lib/web-trust.js +3 -0
  322. package/lib/wrap-Dr8XtIak.js +747 -0
  323. package/package.json +87 -56
  324. package/url-schemes-instruction.md +22 -0
  325. package/control-prompt.md +0 -37
  326. package/docs/50_test-reports/v0.1.8d_artifacts/README.md +0 -138
  327. package/docs/50_test-reports/v0.1.8d_artifacts/code-mode-repl-only.observation.md +0 -74
  328. package/docs/50_test-reports/v0.1.8d_artifacts/dsh-session-session-4a293388-9ae1-474b-87a0-9e17bb556d94.jsonl +0 -3890
  329. package/docs/50_test-reports/v0.1.8d_artifacts/dsh-session-session-4a293388-9ae1-474b-87a0-9e17bb556d94.w-sample-0435.jsonl +0 -544
  330. package/docs/50_test-reports/v0.1.8d_artifacts/functions.json +0 -592
  331. package/docs/50_test-reports/v0.1.8d_artifacts/skills-catalog.snapshot.md +0 -30
  332. package/docs/50_test-reports/v0.1.8d_artifacts/tools-sdk.output-schemas.json +0 -1236
  333. package/docs/50_test-reports/v0.1.8d_artifacts/tools-sdk.python.txt +0 -592
  334. package/docs/50_test-reports/v0.1.8d_artifacts/tools-sdk.typescript.txt +0 -516
  335. package/docs/50_test-reports/v0.1.8d_artifacts/wire-vs-transcription.diff.md +0 -54
  336. package/docs/50_test-reports/v0.2.0b_artifacts/f2probe/Cargo.lock +0 -7
  337. package/docs/50_test-reports/v0.2.0b_artifacts/f2probe/Cargo.toml +0 -6
  338. package/docs/50_test-reports/v0.2.0b_artifacts/f2probe/src/bin/messy.rs +0 -8
  339. package/docs/50_test-reports/v0.2.0b_artifacts/f2probe/src/main.rs +0 -4
  340. package/docs/50_test-reports/v0.2.0b_artifacts/hashline-probe.md +0 -5
  341. package/docs/50_test-reports/v0.2.0b_artifacts/slowprobe/Cargo.lock +0 -7
  342. package/docs/50_test-reports/v0.2.0b_artifacts/slowprobe/Cargo.toml +0 -7
  343. package/docs/50_test-reports/v0.2.0b_artifacts/slowprobe/build.rs +0 -4
  344. package/docs/50_test-reports/v0.2.0b_artifacts/slowprobe/src/main.rs +0 -13
  345. package/docs/60_exploration-and-research/cordis-research.md +0 -350
  346. package/docs/60_exploration-and-research/dsh-web-profile-package-map.md +0 -186
  347. package/docs/60_exploration-and-research/dsh-web-ui-slot-system-research.md +0 -310
  348. package/docs/60_exploration-and-research/dsh-webui-strip-boundary-research.md +0 -300
  349. package/docs/60_exploration-and-research/ios-chat-app-bridge-research.md +0 -324
  350. package/docs/60_exploration-and-research/web-frontend-composability-research.md +0 -191
  351. package/docs/REPL-/345/267/245/345/205/267/350/260/203/347/224/250-/346/210/252/346/226/255/350/257/212/346/226/255.md +0 -110
  352. package/docs/adr/0001-bridge-tool-layer-not-service-layer.md +0 -14
  353. package/docs/adr/0002-masking-is-presentation-only.md +0 -15
  354. package/docs/plans/A2A-messaging-channel-test-archive.md +0 -256
  355. package/docs/plans/code-mode-vs-rlm-ipython-comparison.md +0 -137
  356. package/docs/plans/dashr-blueprint-review.md +0 -201
  357. package/docs/plans/dashr-blueprint.md +0 -561
  358. package/docs/plans/dashr-compaction-window-and-archive.md +0 -307
  359. package/docs/plans/dashr-profile-layer-feasibility.md +0 -367
  360. package/docs/plans/dashr-sandbox-escalation-semantics-gap.md +0 -171
  361. package/docs/plans/dashr-security-sandbox-analysis.md +0 -187
  362. package/docs/plans/dashr-surface-invariant-and-omp-imports.md +0 -97
  363. package/docs/plans/ipython-kernel-interactive-interface-test-report.md +0 -152
  364. package/docs/plans/kernel-refactoring/Dash-IPython-Control-Prompt-draft.md +0 -146
  365. package/docs/plans/kernel-refactoring/Dash-IPython-Control-Prompt-draft_v3.md +0 -50
  366. package/docs/plans/kernel-refactoring/Dash-IPython-Control-Prompt-draft_v4.md +0 -79
  367. package/docs/plans/kernel-refactoring/Dash-vs-PrimeAgent-systemprompt-toolcatalog-comparison.md +0 -138
  368. package/docs/plans/kernel-refactoring/RLM-system-prompt-injection-gap-report.md +0 -161
  369. package/docs/plans/kernel-refactoring/V0.1.5-development-plan.md +0 -109
  370. package/docs/plans/kernel-refactoring/actinoable-surface-to-llm-in-agent-runtime_dsh.md +0 -50
  371. package/docs/plans/kernel-refactoring/actinoable-surface-to-llm-in-agent-runtime_prime.md +0 -113
  372. package/docs/plans/recallable-compaction.md +0 -147
  373. package/docs/plans/spike-tag-repro.mjs +0 -102
  374. package/docs/plans/upstream-analysis.md +0 -128
  375. package/docs/v0.1.8-improved-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -142
  376. package/docs/v0.1.8-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -193
  377. package/docs/v0.1.8b-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -96
  378. package/docs/v0.1.8c-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -127
  379. package/docs/v0.1.8d-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -150
  380. package/docs/v0.1.8d_artifacts/README.md +0 -138
  381. package/docs/v0.1.8d_artifacts/code-mode-repl-only.observation.md +0 -74
  382. package/docs/v0.1.8d_artifacts/dsh-session-session-4a293388-9ae1-474b-87a0-9e17bb556d94.jsonl +0 -3890
  383. package/docs/v0.1.8d_artifacts/dsh-session-session-4a293388-9ae1-474b-87a0-9e17bb556d94.w-sample-0435.jsonl +0 -544
  384. package/docs/v0.1.8d_artifacts/functions.json +0 -592
  385. package/docs/v0.1.8d_artifacts/skills-catalog.snapshot.md +0 -30
  386. package/docs/v0.1.8d_artifacts/tools-sdk.output-schemas.json +0 -1236
  387. package/docs/v0.1.8d_artifacts/tools-sdk.python.txt +0 -592
  388. package/docs/v0.1.8d_artifacts/tools-sdk.typescript.txt +0 -516
  389. package/docs/v0.1.8d_artifacts/wire-vs-transcription.diff.md +0 -54
  390. package/docs/v0.1.8e-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -224
  391. package/docs/v0.1.9a-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -168
  392. package/docs/v0.2.0b-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -123
  393. package/docs/v0.2.0b_artifacts/f2probe/Cargo.lock +0 -7
  394. package/docs/v0.2.0b_artifacts/f2probe/Cargo.toml +0 -6
  395. package/docs/v0.2.0b_artifacts/f2probe/src/bin/messy.rs +0 -8
  396. package/docs/v0.2.0b_artifacts/f2probe/src/main.rs +0 -4
  397. package/docs/v0.2.0b_artifacts/hashline-probe.md +0 -5
  398. package/docs/v0.2.0b_artifacts/slowprobe/Cargo.lock +0 -7
  399. package/docs/v0.2.0b_artifacts/slowprobe/Cargo.toml +0 -7
  400. package/docs/v0.2.0b_artifacts/slowprobe/build.rs +0 -4
  401. package/docs/v0.2.0b_artifacts/slowprobe/src/main.rs +0 -13
  402. package/docs/v0.2.1-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -110
  403. package/docs/v0.2.1b-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -86
  404. package/docs/v0.2.1c-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -66
  405. package/lib/py-sdk-BCaOGYz7.d.ts +0 -125
  406. package/lib/py-sdk-CbgYiX8O.js +0 -691
@@ -27,6 +27,8 @@ let react = require("react");
27
27
  react = __toESM(react);
28
28
  let react_jsx_runtime = require("react/jsx-runtime");
29
29
  react_jsx_runtime = __toESM(react_jsx_runtime);
30
+ let __deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
31
+ __deepseek_ai_dsh_client_ui_primitives = __toESM(__deepseek_ai_dsh_client_ui_primitives);
30
32
 
31
33
  //#region src/failover/config.ts
32
34
  /**
@@ -69,22 +71,21 @@ const zh = {
69
71
  };
70
72
 
71
73
  //#endregion
72
- //#region \0dsh-css:/home/u1/workspaces/dashr/dashr/src/failover/client/FailoverRow.module.css.mjs
73
- const css = "._440e1d7b_row {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 12px 0;\n}\n\n._9865b509_title {\n font-weight: 600;\n font-size: 14px;\n}\n\n._3cfec826_slots {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n._70954771_slot {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n._ba1fd839_slotLabel {\n min-width: 88px;\n flex-shrink: 0;\n font-size: 13px;\n color: var(--dsw-alias-text-secondary, #666);\n}\n\n._11c2662d_select {\n flex: 1;\n max-width: 280px;\n min-width: 0;\n}\n\n._b7c358f9_alert {\n color: var(--dsw-alias-danger, #c0392b);\n font-size: 12px;\n}\n";
74
- const tagId = "better-dsh/FailoverRow.module.css";
75
- if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
74
+ //#region \0dsh-css:/home/u1/workspaces/dashr/.worktrees/remote-framework/better-dsh/src/failover/client/FailoverRow.module.css.mjs
75
+ const css$1 = "\n._440e1d7b_row {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 0;\n}\n\n._a4f2ceec_rowText {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n._9865b509_title {\n font-weight: 600;\n font-size: 14px;\n}\n\n\n._3cfec826_slots {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 6px;\n}\n\n._11c2662d_select {\n width: 280px;\n max-width: 100%;\n min-width: 0;\n}\n\n._b7c358f9_alert {\n color: var(--dsw-alias-danger, #c0392b);\n font-size: 12px;\n}\n";
76
+ const tagId$1 = "better-dsh/FailoverRow.module.css";
77
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
76
78
  const tag = document.createElement("style");
77
79
  tag.dataset.plugin = "better-dsh";
78
- tag.dataset.pluginCss = tagId;
79
- tag.textContent = css;
80
+ tag.dataset.pluginCss = tagId$1;
81
+ tag.textContent = css$1;
80
82
  document.head.appendChild(tag);
81
83
  }
82
84
  var FailoverRow_module_css_default = {
83
85
  "row": "_440e1d7b_row",
86
+ "rowText": "_a4f2ceec_rowText",
84
87
  "title": "_9865b509_title",
85
88
  "slots": "_3cfec826_slots",
86
- "slot": "_70954771_slot",
87
- "slotLabel": "_ba1fd839_slotLabel",
88
89
  "select": "_11c2662d_select",
89
90
  "alert": "_b7c358f9_alert"
90
91
  };
@@ -139,60 +140,51 @@ function FailoverRow({ catalog, loadConfig, save, t }) {
139
140
  }
140
141
  };
141
142
  const routes = loaded?.routes ?? [];
142
- const renderSelect = (slot, label) => {
143
+ const renderSelect = (slot) => {
143
144
  const value = loaded?.config[slot] ?? "";
144
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
145
- className: FailoverRow_module_css_default.slot,
146
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
147
- className: FailoverRow_module_css_default.slotLabel,
148
- children: label
149
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
150
- className: FailoverRow_module_css_default.select,
151
- value,
152
- disabled: saving || loaded === null,
153
- onChange: (event) => {
154
- select(slot, event.target.value);
155
- },
156
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
157
- value: "",
158
- children: t("not-set")
159
- }), routes.map((route) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
160
- value: route,
161
- children: route
162
- }, route))]
163
- })]
145
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
146
+ className: FailoverRow_module_css_default.select,
147
+ value,
148
+ disabled: saving || loaded === null,
149
+ onChange: (event) => {
150
+ select(slot, event.target.value);
151
+ },
152
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
153
+ value: "",
154
+ children: t("not-set")
155
+ }), routes.map((route) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
156
+ value: route,
157
+ children: route
158
+ }, route))]
164
159
  });
165
160
  };
166
161
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
167
162
  className: FailoverRow_module_css_default.row,
168
- children: [
169
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
163
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
164
+ className: FailoverRow_module_css_default.rowText,
165
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
170
166
  className: FailoverRow_module_css_default.title,
171
167
  children: t("title")
172
- }),
173
- error !== null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
168
+ }), error !== null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
174
169
  className: FailoverRow_module_css_default.alert,
175
170
  role: "alert",
176
171
  children: t("error", { message: error })
177
- }) : null,
178
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
179
- className: FailoverRow_module_css_default.slots,
180
- children: [renderSelect("fallback1", t("fallback1")), renderSelect("fallback2", t("fallback2"))]
181
- })
182
- ]
172
+ }) : null]
173
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
174
+ className: FailoverRow_module_css_default.slots,
175
+ children: [renderSelect("fallback1"), renderSelect("fallback2")]
176
+ })]
183
177
  });
184
178
  }
185
179
 
186
180
  //#endregion
187
181
  //#region src/mobile/gesture.ts
188
- /**
189
- * Resolved defaults — the `1706b81` constants (120 / viewport÷4 / 40 / 1.3 /
190
- * 768) plus the one addition, the velocity gate. A slow text-selection drag
191
- * runs ~0.13 px/ms; 0.15 px/ms filters those while any comfortable sweep
192
- * (0.4 px/ms and up) passes.
182
+ /** Resolved defaults — the `1706b81` constants (120 / viewport÷4 / 40 / 1.3)
183
+ * plus the one addition, the velocity gate. A slow text-selection drag runs
184
+ * ~0.13 px/ms; 0.15 px/ms filters those while any comfortable sweep (0.4
185
+ * px/ms and up) passes.
193
186
  */
194
187
  const DEFAULT_SWIPE_THRESHOLDS = {
195
- breakpoint: 768,
196
188
  swipeDistancePx: 40,
197
189
  dominanceRatio: 1.3,
198
190
  leftEdgeBandPx: 120,
@@ -200,16 +192,6 @@ const DEFAULT_SWIPE_THRESHOLDS = {
200
192
  swipeVelocityPxPerMs: .15
201
193
  };
202
194
  /**
203
- * Whether one completed gesture's viewport is in the gesture band.
204
- *
205
- * @param viewportWidth - viewport width at gesture time (px).
206
- * @param thresholds - resolved recognition thresholds (`.breakpoint`).
207
- * @returns `true` when `viewportWidth` is strictly below the breakpoint.
208
- */
209
- function isNarrowViewport(viewportWidth, thresholds) {
210
- return viewportWidth < thresholds.breakpoint;
211
- }
212
- /**
213
195
  * Whether a pointerdown may START a gesture — the source's pointerdown
214
196
  * gate, verbatim: with both panels closed, only the left band (X120) or
215
197
  * the right three quarters of the screen admit; with a panel open, any
@@ -275,7 +257,6 @@ function resolveMobileConfig(pageConfig) {
275
257
  const v = (value, fallback) => typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : fallback;
276
258
  return {
277
259
  enabled: true,
278
- breakpoint: n(pageConfig.breakpoint, DEFAULT_SWIPE_THRESHOLDS.breakpoint),
279
260
  swipeDistancePx: n(pageConfig.swipeDistancePx, DEFAULT_SWIPE_THRESHOLDS.swipeDistancePx),
280
261
  dominanceRatio: n(pageConfig.dominanceRatio, DEFAULT_SWIPE_THRESHOLDS.dominanceRatio),
281
262
  leftEdgeBandPx: n(pageConfig.leftEdgeBandPx, DEFAULT_SWIPE_THRESHOLDS.leftEdgeBandPx),
@@ -291,19 +272,32 @@ function readLeftCollapsed() {
291
272
  return document.querySelector("[data-sidebar-collapsed]") !== null;
292
273
  }
293
274
  /**
294
- * Better Sidebar's right-panel state, live off the body attribute the
295
- * plugin itself publishes (collapsed = closed). Read SYNCHRONOUSLY in the
296
- * handlers — a cached mirror lags the panel's own DOM write by a render,
297
- * and a close-swipe issued right after an open-swipe would misroute.
275
+ * The OFFICIAL right sidebar's state (0.1.5 ui-sidebar-right), read from
276
+ * AppFrame's TWO presentation facets, synchronously (a cached mirror lags
277
+ * the panel's own DOM write by a render, and a close-swipe issued right
278
+ * after an open-swipe would misroute):
279
+ *
280
+ * - `[data-rightbar-collapsed]` — the reserved GRID TRACK facet (present =
281
+ * zero-width right column). On phones (<768) the panel presents FULLSCREEN
282
+ * WITHOUT a track (`autoFullscreen` in SidebarRight), so this attribute
283
+ * alone misreads a panel that covers the whole frame as "closed" — the
284
+ * 2026-09-11 field bug: every close-swipe misrouted to open-left.
285
+ * - `[data-rightbar-fullscreen]` — the overlay facet (present = fullscreen
286
+ * presentation active, open by definition).
287
+ *
288
+ * Open = track reserved OR fullscreen overlay. On hosts before 0.1.5 both
289
+ * attributes never appear: closed, permanently — left gestures unaffected.
298
290
  */
299
291
  function readRightOpen() {
300
- return !document.body.hasAttribute("data-dsh-sidebar-collapsed");
292
+ const fullscreen = document.querySelector("[data-rightbar-fullscreen]") !== null;
293
+ const trackless = document.querySelector("[data-rightbar-collapsed]") !== null;
294
+ return fullscreen || !trackless;
301
295
  }
302
296
  /**
303
297
  * Whether a session is current — the plugin-side stand-in for the source's
304
- * `detailsSession !== undefined` guard (the right panel opens in a session
305
- * only). Better Sidebar's own shipped CSS keys off the same slot selector,
306
- * so it is load-bearing beyond this feature.
298
+ * `detailsSession !== undefined` guard (the right panel is a
299
+ * session-scoped surface; without a session its expand button is not
300
+ * rendered, so opening would be a no-op anyway).
307
301
  */
308
302
  function readSessionLive() {
309
303
  return document.querySelector("[data-slot=\"conversation.session.header\"]") !== null;
@@ -316,32 +310,38 @@ function readPanelState() {
316
310
  };
317
311
  }
318
312
  /**
319
- * Toggle Better Sidebar's right panel through its persistent DOM: the
320
- * plugin exposes no JS toggle on its client service (its open/close
321
- * reducer is store-internal), so the swipe reaches it the same way the
322
- * source did — clicking the LAST button of its always-rendered
323
- * `[data-dsh-toggle-cluster]` (the bottom-panel button precedes it and is
324
- * absent below the plugin's 768px narrow breakpoint). Absent cluster or
325
- * buttons: a no-op, never a crash.
313
+ * Drive the OFFICIAL right sidebar through its own controls (0.1.5
314
+ * ui-sidebar-right): opening clicks `[data-sidebar-right-expand]` (the
315
+ * conversation header corner button — the panel's own documented "way
316
+ * into a hidden panel", rendered exactly while collapsed with a session);
317
+ * closing clicks `[data-sidebar-right-toggle]` (the dock chrome toggle).
318
+ * The store action behind them (`setExpanded`/`toggleExpanded`) is
319
+ * slot-store-internal — cross-plugin imports are the hard boundary, so
320
+ * the native buttons ARE the sanctioned entry. Absent button (pre-0.1.5
321
+ * host, no session, or already in the target state): a no-op, never a
322
+ * crash.
326
323
  */
327
- function toggleBetterSidebar() {
328
- const buttons = document.querySelector("[data-dsh-toggle-cluster]")?.querySelectorAll("button");
329
- (buttons?.[buttons.length - 1])?.click();
324
+ function openRightPanel() {
325
+ document.querySelector("[data-sidebar-right-expand]")?.click();
326
+ }
327
+ function closeRightPanel() {
328
+ document.querySelector("[data-sidebar-right-toggle]")?.click();
330
329
  }
331
330
  /**
332
- * The narrow-viewport CSS: zero-width sidebar track under the breakpoint,
333
- * keyed to AppFrame's semantic attribute (survives class-hash churn).
334
- * Rendered with the breakpoint baked in (media queries cannot read JS
335
- * config); the tag carries the plugin-owned dataset so the loader's
336
- * style-claim machinery removes it on unload, like module CSS.
331
+ * The responsive CSS: zero-width sidebar track whenever upstream's layout
332
+ * has collapsed the sidebar, keyed PURELY to AppFrame's semantic
333
+ * attribute (survives class-hash churn). No width media query of our own
334
+ * (2026-09-11 ruling): upstream owns the auto-collapse threshold (1024
335
+ * today), and this rule simply takes the 56px rail they leave behind to
336
+ * zero. If upstream renames the attribute the rule stops matching and
337
+ * their native rail renders (benign degradation). The tag carries the
338
+ * plugin-owned dataset so the loader's style-claim machinery removes it
339
+ * on unload, like module CSS.
337
340
  */
338
- function mobileCss(breakpointPx) {
339
- const wide = Math.max(1, Math.floor(breakpointPx) - .02);
341
+ function mobileCss() {
340
342
  return [
341
- `@media (max-width: ${String(wide)}px) {`,
342
- ` [data-sidebar-collapsed] {`,
343
- ` grid-template-columns: 0px minmax(0, 1fr) 0px !important;`,
344
- ` }`,
343
+ `[data-sidebar-collapsed] {`,
344
+ ` grid-template-columns: 0px minmax(0, 1fr) 0px !important;`,
345
345
  `}`
346
346
  ].join("\n");
347
347
  }
@@ -361,7 +361,7 @@ function setupMobileLayout(ctx) {
361
361
  const tag = document.createElement("style");
362
362
  tag.dataset.plugin = "better-dsh";
363
363
  tag.dataset.pluginCss = styleTagId;
364
- tag.textContent = mobileCss(config.breakpoint);
364
+ tag.textContent = mobileCss();
365
365
  document.head.append(tag);
366
366
  const offLayout = ctx.inject(["layout"], (layoutCtx) => {
367
367
  const layout = layoutCtx.get("layout");
@@ -370,8 +370,10 @@ function setupMobileLayout(ctx) {
370
370
  const onPointerDown = (event) => {
371
371
  start = void 0;
372
372
  const viewport = window.innerWidth;
373
- if (!isNarrowViewport(viewport, config)) return;
374
- if (!admitsSwipeStart(event.clientX, viewport, readPanelState(), config)) return;
373
+ const coarsePointer = window.matchMedia?.("(pointer: coarse)").matches === true;
374
+ const panels = readPanelState();
375
+ if (!coarsePointer && !panels.leftCollapsed && !panels.rightOpen) return;
376
+ if (!admitsSwipeStart(event.clientX, viewport, panels, config)) return;
375
377
  start = {
376
378
  x: event.clientX,
377
379
  y: event.clientY,
@@ -389,7 +391,8 @@ function setupMobileLayout(ctx) {
389
391
  if (action === null) return;
390
392
  start = void 0;
391
393
  if (action === "open-left" || action === "close-left") layout.toggleSidebar();
392
- else toggleBetterSidebar();
394
+ else if (action === "open-right") openRightPanel();
395
+ else closeRightPanel();
393
396
  };
394
397
  const onPointerEnd = () => {
395
398
  start = void 0;
@@ -412,6 +415,241 @@ function setupMobileLayout(ctx) {
412
415
  }, "dashr: mobile layout");
413
416
  }
414
417
 
418
+ //#endregion
419
+ //#region src/compaction/config.ts
420
+ /**
421
+ * The `compaction-tuning` General-row config: the share of the routed context
422
+ * window at which automatic condensation starts.
423
+ *
424
+ * Pure module — no `@deepseek-ai/*` value imports — so the host half and the
425
+ * client half may both import it without dragging either runtime into the
426
+ * browser bundle: the host takes the namespace and the schema defaults, the
427
+ * client takes the namespace literal plus the stepper bounds.
428
+ *
429
+ * @module dashr/compaction/config
430
+ */
431
+ /** The settings namespace the General row reads and writes. */
432
+ const COMPACTION_SETTINGS_NS = "compaction-tuning";
433
+ /** Upstream `compaction-basic`'s own default: condense at 80% of the window. */
434
+ const DEFAULT_THRESHOLD_RATIO = .8;
435
+ /** Whole-percent bounds for the General row's stepper. */
436
+ const THRESHOLD_MIN_PERCENT = 10;
437
+ /** @see THRESHOLD_MIN_PERCENT */
438
+ const THRESHOLD_MAX_PERCENT = 95;
439
+ /** Percent moved per arrow click (a stepper cannot express an arbitrary value). */
440
+ const THRESHOLD_STEP_PERCENT = 5;
441
+
442
+ //#endregion
443
+ //#region src/compaction/client/locales.ts
444
+ /**
445
+ * Client locale dictionary for the compaction General row.
446
+ * @module dashr/compaction/client/locales
447
+ */
448
+ const en$1 = {
449
+ "title": "Auto-compact threshold",
450
+ "description": "Only affects automatic condensation",
451
+ "unit": "%",
452
+ "increase": "Increase auto-compact threshold",
453
+ "decrease": "Decrease auto-compact threshold",
454
+ "error": "Save failed: {{message}}"
455
+ };
456
+ const zh$1 = {
457
+ "title": "自动压缩阈值",
458
+ "description": "仅影响自动压缩",
459
+ "unit": "%",
460
+ "increase": "提高自动压缩阈值",
461
+ "decrease": "降低自动压缩阈值",
462
+ "error": "保存失败:{{message}}"
463
+ };
464
+
465
+ //#endregion
466
+ //#region \0dsh-css:/home/u1/workspaces/dashr/.worktrees/remote-framework/better-dsh/src/compaction/client/CompactionRow.module.css.mjs
467
+ const css = "\n\n\n._13e3747c_thresholdRow {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 16px 0;\n border-bottom: 0.5px solid var(--dsw-alias-border-l2);\n}\n\n._8ad3ff3f_thresholdText {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding-right: 48px;\n}\n\n._9ffb627e_thresholdTitle {\n font-size: 14px;\n font-weight: 400;\n line-height: 22px;\n color: var(--dsw-alias-label-primary);\n}\n\n._01bea389_thresholdDesc {\n font-size: 12px;\n font-weight: 400;\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary);\n}\n\n._7f9578de_thresholdError {\n font-size: 12px;\n font-weight: 400;\n line-height: 18px;\n color: var(--dsw-alias-danger, #c0392b);\n}\n\n\n._cddd78cd_thresholdControl {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n}\n\n._6058fea9_thresholdStepper {\n position: relative; \n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 72px;\n height: 36px;\n border-radius: 18px;\n background: var(--dsw-alias-bg-module-platform);\n}\n\n._39d30469_thresholdValue {\n min-width: 18px;\n text-align: center;\n font-size: 14px;\n line-height: 22px;\n font-variant-numeric: tabular-nums;\n color: var(--dsw-alias-label-primary);\n}\n\n._68bd35c6_thresholdUnit {\n font-size: 14px;\n line-height: 22px;\n color: var(--dsw-alias-label-secondary);\n}\n\n\n._904da366_thresholdArrows {\n position: absolute;\n right: 8px;\n display: flex;\n flex-direction: column;\n gap: 2px;\n opacity: 0;\n}\n\n._6058fea9_thresholdStepper:hover ._904da366_thresholdArrows,\n._6058fea9_thresholdStepper:focus-within ._904da366_thresholdArrows {\n opacity: 1;\n}\n\n\n._ae9106b1_thresholdArrow {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 17px;\n height: 12px;\n padding: 0;\n border: none;\n border-radius: 3px;\n background: color-mix(in srgb, var(--dsw-alias-bg-layer-1) 75%, transparent);\n color: var(--dsw-alias-label-primary);\n cursor: pointer;\n}\n\n._ae9106b1_thresholdArrow:hover:not(:disabled) {\n background: var(--dsw-alias-bg-layer-1);\n}\n\n._ae9106b1_thresholdArrow:disabled {\n color: var(--dsw-alias-label-caption);\n cursor: default;\n}\n";
468
+ const tagId = "better-dsh/CompactionRow.module.css";
469
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
470
+ const tag = document.createElement("style");
471
+ tag.dataset.plugin = "better-dsh";
472
+ tag.dataset.pluginCss = tagId;
473
+ tag.textContent = css;
474
+ document.head.appendChild(tag);
475
+ }
476
+ var CompactionRow_module_css_default = {
477
+ "thresholdRow": "_13e3747c_thresholdRow",
478
+ "thresholdText": "_8ad3ff3f_thresholdText",
479
+ "thresholdTitle": "_9ffb627e_thresholdTitle",
480
+ "thresholdDesc": "_01bea389_thresholdDesc",
481
+ "thresholdError": "_7f9578de_thresholdError",
482
+ "thresholdControl": "_cddd78cd_thresholdControl",
483
+ "thresholdStepper": "_6058fea9_thresholdStepper",
484
+ "thresholdValue": "_39d30469_thresholdValue",
485
+ "thresholdUnit": "_68bd35c6_thresholdUnit",
486
+ "thresholdArrows": "_904da366_thresholdArrows",
487
+ "thresholdArrow": "_ae9106b1_thresholdArrow"
488
+ };
489
+
490
+ //#endregion
491
+ //#region src/compaction/client/CompactionRow.tsx
492
+ /** Render the compaction-threshold row. */
493
+ function CompactionRow({ t, loadConfig, save }) {
494
+ const [percent, setPercent] = (0, react.useState)(null);
495
+ const [absent, setAbsent] = (0, react.useState)(false);
496
+ const [error, setError] = (0, react.useState)(null);
497
+ const revisionRef = (0, react.useRef)(void 0);
498
+ const pendingRef = (0, react.useRef)(null);
499
+ const inFlightRef = (0, react.useRef)(false);
500
+ (0, react.useEffect)(() => {
501
+ let alive = true;
502
+ (async () => {
503
+ try {
504
+ const current = await loadConfig();
505
+ if (!alive) return;
506
+ if (current === null) {
507
+ setAbsent(true);
508
+ return;
509
+ }
510
+ revisionRef.current = current.revision;
511
+ setPercent(Math.round(current.thresholdRatio * 100));
512
+ } catch (err) {
513
+ if (alive) setError(err instanceof Error ? err.message : String(err));
514
+ }
515
+ })();
516
+ return () => {
517
+ alive = false;
518
+ };
519
+ }, [loadConfig]);
520
+ /** Write the newest pending step; the revision always comes from the last commit. */
521
+ const flush = () => {
522
+ if (inFlightRef.current || pendingRef.current === null) return;
523
+ const next = pendingRef.current;
524
+ pendingRef.current = null;
525
+ inFlightRef.current = true;
526
+ save({ thresholdRatio: next / 100 }, revisionRef.current).then((revision) => {
527
+ revisionRef.current = revision;
528
+ inFlightRef.current = false;
529
+ setError(null);
530
+ flush();
531
+ }, (err) => {
532
+ inFlightRef.current = false;
533
+ pendingRef.current = null;
534
+ setError(err instanceof Error ? err.message : String(err));
535
+ (async () => {
536
+ try {
537
+ const current = await loadConfig();
538
+ if (current === null) return;
539
+ revisionRef.current = current.revision;
540
+ setPercent(Math.round(current.thresholdRatio * 100));
541
+ } catch {}
542
+ })();
543
+ });
544
+ };
545
+ const step = (delta) => {
546
+ if (percent === null) return;
547
+ const next = Math.min(THRESHOLD_MAX_PERCENT, Math.max(THRESHOLD_MIN_PERCENT, percent + delta));
548
+ if (next === percent) return;
549
+ setPercent(next);
550
+ setError(null);
551
+ pendingRef.current = next;
552
+ flush();
553
+ };
554
+ if (absent) return null;
555
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
556
+ className: CompactionRow_module_css_default.thresholdRow,
557
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
558
+ className: CompactionRow_module_css_default.thresholdText,
559
+ children: [
560
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
561
+ className: CompactionRow_module_css_default.thresholdTitle,
562
+ children: t("title")
563
+ }),
564
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
565
+ className: CompactionRow_module_css_default.thresholdDesc,
566
+ children: t("description")
567
+ }),
568
+ error !== null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
569
+ className: CompactionRow_module_css_default.thresholdError,
570
+ children: t("error", { message: error })
571
+ }) : null
572
+ ]
573
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
574
+ className: CompactionRow_module_css_default.thresholdControl,
575
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
576
+ className: CompactionRow_module_css_default.thresholdStepper,
577
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
578
+ className: CompactionRow_module_css_default.thresholdValue,
579
+ children: percent === null ? "–" : String(percent)
580
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
581
+ className: CompactionRow_module_css_default.thresholdArrows,
582
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
583
+ type: "button",
584
+ className: CompactionRow_module_css_default.thresholdArrow,
585
+ "aria-label": t("increase"),
586
+ disabled: percent === null || percent >= THRESHOLD_MAX_PERCENT,
587
+ onClick: () => {
588
+ step(THRESHOLD_STEP_PERCENT);
589
+ },
590
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__deepseek_ai_dsh_client_ui_primitives.IconChevronUpOutline14, { size: 9 })
591
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
592
+ type: "button",
593
+ className: CompactionRow_module_css_default.thresholdArrow,
594
+ "aria-label": t("decrease"),
595
+ disabled: percent === null || percent <= THRESHOLD_MIN_PERCENT,
596
+ onClick: () => {
597
+ step(-THRESHOLD_STEP_PERCENT);
598
+ },
599
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutline14, { size: 9 })
600
+ })]
601
+ })]
602
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
603
+ className: CompactionRow_module_css_default.thresholdUnit,
604
+ children: t("unit")
605
+ })]
606
+ })]
607
+ });
608
+ }
609
+
610
+ //#endregion
611
+ //#region src/compaction/client/index.ts
612
+ /**
613
+ * Register the dictionaries and the General settings row.
614
+ *
615
+ * Called from the plugin's client entry, which already injects `locale`,
616
+ * `slots` and `remote.settings`.
617
+ *
618
+ * @param ctx - client root context.
619
+ */
620
+ function setupCompactionRow(ctx) {
621
+ ctx.effect(() => ctx.locale.register(COMPACTION_SETTINGS_NS, {
622
+ zh: zh$1,
623
+ en: en$1
624
+ }), "compaction-tuning: dictionaries");
625
+ ctx.slots.inject("settings.general.item", function* () {
626
+ yield ctx.slots.register({
627
+ name: "settings.general.item",
628
+ id: COMPACTION_SETTINGS_NS,
629
+ order: 110,
630
+ locale: COMPACTION_SETTINGS_NS,
631
+ inject: () => ({
632
+ loadConfig: async () => {
633
+ const response = await ctx.remote.settings.describe();
634
+ if (!response.ok) throw new Error(`${response.error.code}: ${response.error.message}`);
635
+ const view = response.value.namespaces.find((entry) => entry.ns === COMPACTION_SETTINGS_NS);
636
+ if (view === void 0) return null;
637
+ const value = view.value;
638
+ return {
639
+ thresholdRatio: typeof value.thresholdRatio === "number" ? value.thresholdRatio : DEFAULT_THRESHOLD_RATIO,
640
+ revision: view.revision
641
+ };
642
+ },
643
+ save: async (patch, revision) => {
644
+ const response = await ctx.remote.settings.update(COMPACTION_SETTINGS_NS, patch, revision);
645
+ if (!response.ok) throw new Error(`${response.error.code}: ${response.error.message}`);
646
+ return response.value.revision;
647
+ }
648
+ })
649
+ }, CompactionRow);
650
+ });
651
+ }
652
+
415
653
  //#endregion
416
654
  //#region src/failover/client/index.ts
417
655
  /** Required services (cordis fiber inject). */
@@ -432,6 +670,7 @@ function apply(ctx) {
432
670
  en
433
671
  }), "llm-failover: dictionaries");
434
672
  setupMobileLayout(ctx);
673
+ setupCompactionRow(ctx);
435
674
  ctx.slots.inject("settings.general.item", function* () {
436
675
  yield ctx.slots.register({
437
676
  name: "settings.general.item",
@@ -0,0 +1,47 @@
1
+ import { Context } from "@deepseek-ai/cordis";
2
+ import z from "@deepseek-ai/schemastery";
3
+
4
+ //#region src/compaction/config.d.ts
5
+
6
+ /** The `compaction-tuning` settings value. */
7
+ interface CompactionTuningConfig {
8
+ /** Condense at `floor(routedContextWindow x thresholdRatio)`. */
9
+ thresholdRatio: number;
10
+ /** Verbatim recent tail, in estimated tokens. */
11
+ retainTokens: number;
12
+ }
13
+ //#endregion
14
+ //#region src/compaction/index.d.ts
15
+
16
+ /** Cordis plugin name. */
17
+ declare const name = "dashr-compaction-tuning";
18
+ /**
19
+ * No static injects: both `settings` and `compaction` are composed
20
+ * conditionally inside {@link installCompactionTuning}, so the row loads
21
+ * (dormant) in compositions without them.
22
+ */
23
+ declare const inject: string[];
24
+ /**
25
+ * The `compaction-tuning` settings schema.
26
+ *
27
+ * `thresholdRatio` is the field the General row drives; `retainTokens` is
28
+ * composition-only (see {@link DEFAULT_RETAIN_TOKENS}) but still validated and
29
+ * applied, so the recency window keeps one source of truth.
30
+ */
31
+ declare const Config: z<CompactionTuningConfig>;
32
+ /**
33
+ * Install the settings namespace and keep the live compaction engine in sync.
34
+ * @param ctx - host context of the row that owns this capability.
35
+ * @param config - composition base layer; schema defaults fill the rest.
36
+ */
37
+ declare function installCompactionTuning(ctx: Context, config?: CompactionTuningConfig): void;
38
+ /** Mount the tuning as the row's whole apply (the row config is the settings base). */
39
+ declare function apply(ctx: Context, config: CompactionTuningConfig | undefined): void;
40
+ declare const _default: {
41
+ name: string;
42
+ inject: string[];
43
+ Config: z<CompactionTuningConfig>;
44
+ apply: typeof apply;
45
+ };
46
+ //#endregion
47
+ export { Config, apply, _default as default, inject, installCompactionTuning, name };