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
@@ -0,0 +1,121 @@
1
+ # lsp Specification
2
+
3
+ ## Purpose
4
+ `lsp` 是**双模**语言服务能力:passive push 模(插件订阅 dsh 文件事件流,替 agent 向 per-session LSP server 子进程做 `didOpen/didChange/didSave` 文本同步,缓存 server 推回的 `publishDiagnostics`)+ proactive tool 模(agent 经 `dvc://lsp` 主动要 `diagnostics`/`format`/`definition` 等)。工作单位 = agent session(cwd 即 workspace root 候选);**每 session 每语言一个 server 子进程**,不跨 session 共享。生命周期三级供给,类比 repl kernel:host start 零重物、session-start 登记零子进程、首用 lazy spawn。
5
+
6
+ ## Requirements
7
+
8
+ ### Requirement: Root-marker probing (lspMarker)
9
+ Server availability and project-root determination SHALL follow the per-language marker table(`pyrightconfig.json`/`pyproject.toml`、`tsconfig.json`/`jsconfig.json`、`Cargo.toml`、`go.mod` …配置驱动,不发明 `lsp.json`)——编辑器侧工程惯例,非 LSP 协议标准。Marker 缺席不阻断:server 仍可 spawn,root 退化为 mutation 文件所在目录。
10
+
11
+ #### Scenario: Marker present
12
+ - **WHEN** a session's cwd contains a language marker file and the language's server is locally available
13
+ - **THEN** the manager resolves project root to the marker's directory and reports availability for that language
14
+
15
+ #### Scenario: Marker absent
16
+ - **WHEN** no marker exists for the mutated file's language
17
+ - **THEN** availability is `unknown`, not `unavailable` — the gate below still offers opt-in
18
+
19
+ ### Requirement: Gated notice with explicit per-session opt-in (on/off)
20
+ The manager at session start SHALL check local availability of each language server in its table(Python/TypeScript 为必备,缺失即安装;Rust/Go 保留 nag 检测,server 缺失时按需安装). When a session performs file mutations (edit/write 落盘) in a language with availability `available` or `unknown` and the session gate is `unasked`, the tool result MAY append the availability notice (lsp 可用,`dvc://lsp` 开/关) **at most 10 times per session**(防刷屏上限). Both `on` and `off` are PER-SESSION state — the manager handles everything, and SHALL write NO repo artifact or marker file in either direction(无 `.dashr/lsp.json`,无任何落盘偏好).
21
+
22
+ #### Scenario: Mutation nag capped
23
+ - **WHEN** the agent edits `.py` files repeatedly in a session with gate `unasked`
24
+ - **THEN** at most 10 tool results carry the notice; afterwards mutations stay silent until the gate is decided
25
+
26
+ #### Scenario: Explicit on (per session)
27
+ - **WHEN** the agent sets `dvc://lsp` on
28
+ - **THEN** the session gate becomes `on` and the manager warm-starts the language server; nothing is written to the repo
29
+
30
+ #### Scenario: Explicit off (per session)
31
+ - **WHEN** the agent sets `dvc://lsp` off
32
+ - **THEN** the gate becomes `off`, no server spawns, the notice is muted for the session, and no repo marker is written
33
+
34
+ ### Requirement: Must-have servers installed, niche on demand
35
+ At session start the manager SHALL verify Python and TypeScript servers and INSTALL a missing one (pip/npm, pinned, fail-soft — 安装失败降级为该语言 `unavailable`);Rust/Go servers SHALL NOT be installed proactively — they stay in the nag-detection table and install only when the agent turns lsp on for that language.
36
+
37
+ #### Scenario: Missing pyright on a fresh host
38
+ - **WHEN** a session starts and no Python language server is installed
39
+ - **THEN** the manager installs it in the background and reports availability `available` once done(安装期间 `unknown`,nag 照常)
40
+
41
+ #### Scenario: Rust opted in on demand
42
+ - **WHEN** the agent sets lsp on in a session touching Rust files and rust-analyzer is absent
43
+ - **THEN** the manager installs rust-analyzer then spawns it — never before the opt-in
44
+
45
+ ### Requirement: Lazy spawn, session lifetime
46
+ Server subprocesses SHALL spawn lazily on first post-on use, one subprocess per (session, language), registered under the agent's own tool effect so agent dispose unwinds them via `shutdown`+`exit`; an idle timeout reclaims servers of still-live sessions.
47
+
48
+ #### Scenario: Per-session isolation
49
+ - **WHEN** two sessions work in different cwd/repo simultaneously
50
+ - **THEN** each owns independent server subprocesses with its own workspace root and document mirrors
51
+
52
+ ### Requirement: Text synchronization is post-hoc, never intercepting
53
+ The plugin SHALL feed document sync (`didOpen`/`didChange` full-text + `didSave`) from AFTER-THE-FACT dsh events only — `tools/post-execute` on successful read/edit/write, mirroring the exact landed content(EXACT content, didSave freshness, span guard)— and SHALL NOT intercept, wrap, or delay any dsh read/write/edit flow. The version ledger follows the host fs observation policy's read-before-edit accounts; no second version book is kept.
54
+
55
+ #### Scenario: Landed content is the mirror
56
+ - **WHEN** an edit lands and lsp is on for that language
57
+ - **THEN** the server receives a full-text `didChange` + `didSave` with the exact written content before diagnostics are requested, so line numbers match what the model just wrote
58
+
59
+ ### Requirement: Dual-mode results
60
+ Proactive mode (`dvc://lsp` write: `diagnostics`/`format`/`definition`/…) and passive mode (cached `publishDiagnostics` attached to tool results, e.g. hashline edit 的 post-edit summary,经注入回调而非模块内依赖) SHALL both be served from the same session manager. Every failure — no server, gate off, cold-start noise — SHALL read as "no feedback": a serverless mutation is byte-identical to stock behavior.
61
+
62
+ #### Scenario: Diagnostics ride the edit result
63
+ - **WHEN** lsp is on, an edit lands, and the server answers diagnostics
64
+ - **THEN** the edit's tool result carries the diagnostics summary; when the server is absent or slow, the result is unchanged
65
+
66
+ ### Requirement: Spin-up latency is absorbed, never blocking
67
+ Server cold-start(spawn + `initialize` + 首轮索引)SHALL be handled by three means: (1) **warm-start at opt-in** — gate on 即后台 spawn,不等首个请求; (2) **fire-and-attach** — diagnostics 请求带超时,超时/未就绪读作"no feedback",server 稍后推回的 `publishDiagnostics` 缓存并附到**下一个** mutation 的 tool result(延迟附挂,不丢不阻塞); (3) **read 预热** — session 内首个某语言文件 read 即提前 `didOpen`,使首个 edit 命中已初始化的 server. The mutation path SHALL NEVER wait on server readiness — worst case is a summary arriving one tool call late.
68
+
69
+ #### Scenario: First edit on a cold server
70
+ - **WHEN** the gate turns on and the very next mutation hits an uninitialized server
71
+ - **THEN** the edit result carries no diagnostics (no feedback), and when the server finishes indexing the diagnostics attach to the next mutation's result
72
+
73
+ #### Scenario: Read pre-warms
74
+ - **WHEN** the agent reads a `.ts` file before editing it and lsp gate is on for TypeScript
75
+ - **THEN** the read triggers `didOpen` and server initialization, so the subsequent edit usually gets same-call diagnostics
76
+
77
+ ### Requirement: Orthogonality and injection boundaries
78
+ The lsp capability SHALL be a self-contained module: no url-schemes/hashline imports; per-feature attachments (edit-result diagnostics, availability notices) arrive as injected callbacks from composition roots. Host start SHALL NOT probe markers or spawn processes — all discovery is per-session, on demand.
79
+
80
+ #### Scenario: Host boot cost
81
+ - **WHEN** the host starts with the lsp capability mounted
82
+ - **THEN** no subprocess spawns, no marker probing runs, and nothing on the boot path can fail because of lsp
83
+
84
+ ## Surface syntax (`dvc://lsp`)
85
+
86
+ The dvc contract is uniform: **bare read = roster, `<device>` read = doc/status, `<device>` write = action dispatch**. Gate state is per-session — the write dispatcher injects the calling agent's session id automatically; agents never type it.
87
+
88
+ Read-vs-write follows GET/PUT semantics — **reads never mutate, writes always do**:
89
+
90
+ - `read dvc://lsp` — the device doc: actions, args, current contract.
91
+ - `read dvc://lsp/status` — the calling session's gate (session injected from the read env; no session → an explicit pointer note).
92
+ - `read dvc://lsp/diagnostics?file=<path>&all=1` — fan-out query (read-only; spawning a lazily-managed server is the side effect of asking, not a mutation).
93
+ - `read dvc://lsp/definition?file=&line=&character=|&symbol=` (also `references`, `hover`) — position queries, 1-based.
94
+ - `write dvc://lsp` `{"action":"on"}` / `{"action":"off"}` — per-session gate decision; ack describes the effect. No repo artifact in either direction.
95
+ - `write dvc://lsp` `{"action":"reload"}` — restart the server (config re-read).
96
+ - `write dvc://lsp` `{"action":"rename",...}` / `{"action":"code_actions",...,"apply":N}` / `{"action":"format","file":...}` — workspace-mutating operations.
97
+
98
+ The write surface retains `status` for symmetry with the session-injected dispatcher, but the read form is canonical for all queries. Path-mutation forms (`dvc://lsp/on`) are NOT part of the contract: mutation never rides a read URL.
99
+
100
+ ### Requirement: Session transport is out-of-band
101
+ The per-session gate addressing SHALL ride the dvc write dispatcher's `execute(args, { session })` context — NOT the args payload — so devices with strict argument validators (browser) are unaffected; the lsp device reads `ctx.session` with a legacy in-args fallback for direct callers. The read surface receives the calling session through the resolver env the same way (`dvc://lsp/status` returns the calling session's gate).
102
+
103
+ #### Scenario: Strict-validator device unaffected
104
+ - **WHEN** the model writes `dvc://browser` with `{"action":"open","url":…}` from a session
105
+ - **THEN** the browser device's validator sees only its declared fields and the action executes (the session rides the dispatcher's out-of-band ctx)
106
+
107
+ #### Scenario: Status read is session-aware
108
+ - **WHEN** the model turns lsp on and then reads `dvc://lsp/status` from the same session
109
+ - **THEN** the status reports that session's gate (`"gate":"on"`)
110
+
111
+ ## OMP parity progress
112
+
113
+ The device vendored a trimmed upstream oh-my-pi (`packages/coding-agent/src/lsp`) surface; parity is being completed in stages, each keeping the module boundary (nothing imports hash-edit/ast/url-schemes internals):
114
+
115
+ 1. ✅ `rename` / `code_actions` / `reload` actions (apply/preview WorkspaceEdit over `changes` + `documentChanges`; code action apply by index; reload = shutdown + evict).
116
+ 2. ✅ Workspace-wide diagnostics (`{"action":"diagnostics","file":"*"}` — aggregate cached publishDiagnostics across all live servers, per-file E/W counts) + `documentDiagnostic` pull for servers advertising `diagnosticProvider` (pull wins over last push on the saved path).
117
+ 3. ✅ Per-file fan-out: `{"action":"diagnostics","file":...,"all":true}` queries every registered server covering the file and merges results tagged per server (single-coverage falls through to the primary path).
118
+ 4. ✅ `symbol` / `symbol#N` position resolution on definition/references/rename/hover (word-bounded exact first, case-insensitive fallback, structured `LSP_SYMBOL_NOT_FOUND`; explicit `character` wins).
119
+ 5. ✅ Must-have installer: registry `installServer()` runs the package-manager command (npm/pip/go/rustup, 5 min timeout, fail-soft) for missing python/ts/js primaries once per session at first nag; niche languages stay install-on-opt-in.
120
+
121
+ All five stages are in-tree; residual deltas vs upstream (lspmux, deferred-diagnostics ledger, writethrough editor integration) are IDE-side facilities without a dsh counterpart and are tracked as out of scope by the lsp spec's post-hoc sync ruling.
@@ -0,0 +1,108 @@
1
+ # mobile-layout Specification
2
+
3
+ ## Purpose
4
+ better-dsh 的移动端布局与输入契约:窄视口侧栏轨 0(注入 CSS 覆盖,桌面档零影响)、三条件滑动手势(边缘带 × 距离 × 速率,纯函数可测)、iOS focus 自动放大抑制 zoomGuard(browser=viewport meta token 改写 / standalone=16px 字号地板双形态,`'off'` 逃生门),全部随插件发布、config 门控(`mobile.enabled` / `mobile.breakpoint` / `mobile.zoomGuard`)。
5
+
6
+ ## Requirements
7
+
8
+ ### Requirement: iOS focus auto-zoom suppression on narrow viewports
9
+
10
+ The plugin's host half SHALL suppress the iOS Safari focus-triggered auto-zoom with **display-mode-dependent behavior**:
11
+
12
+ - **Browser context** (not standalone): rewrite the page's viewport meta (appending `maximum-scale=1` and `user-scalable=no`) inside the injected head boot script — before any application bundle can focus an input — with the v0.2.4 machinery (double gate iOS-class UA AND narrow viewport, breakpoint re-evaluation, provisional/reconcile single-meta invariant, early-load re-evaluation ladder, idempotent merge, byte-level restore). Real-device datum (2026-09-03): in-browser iOS Safari ignores `user-scalable=no` for pinch, so pinch zoom remains available in this mode.
13
+ - **Standalone context** (`(display-mode: standalone)` media query matches OR `navigator.standalone === true`): the plugin SHALL NOT touch the viewport meta at all (no rewrite, no provisional, no listeners, no timers — real-device datum: standalone iOS honors `user-scalable=no` and pinch would break), and SHALL instead inject a static style element (`id="ios-zoom-font-floor"`, carrying the plugin's style-claim attributes) with `@media (max-width: {breakpoint-0.02}px){ input,textarea,select,[contenteditable="true"]{ font-size:16px !important } }`, which suppresses the focus auto-zoom by the font-size mechanism.
14
+
15
+ Both branches SHALL be config-gated via `mobile.zoomGuard` (`'meta'` default = auto dual-mode behavior; `'off'` emits neither branch on any platform). Non-iOS browsers and wide viewports SHALL observe stock behavior in both display modes.
16
+
17
+ #### Scenario: iOS narrow focus does not zoom
18
+
19
+ - **WHEN** an input, select, checkbox, or contenteditable receives focus on an iOS-class browser below the breakpoint with `zoomGuard: 'meta'`
20
+ - **THEN** no auto-zoom occurs in either display mode: browser mode suppresses it via the rewritten viewport meta, standalone mode via the 16px font-floor style
21
+
22
+ #### Scenario: Rewrite lands before first possible focus
23
+
24
+ - **WHEN** the head boot script executes during page load in browser (non-standalone) display mode
25
+ - **THEN** the viewport meta rewrite is applied synchronously before any application bundle materializes, so no zoom flash can occur on an early auto-focus
26
+
27
+ #### Scenario: Browser mode rewrites meta (unchanged from v0.2.4)
28
+
29
+ - **WHEN** an iOS-class browser below the breakpoint loads in a non-standalone display mode with `zoomGuard: 'meta'`
30
+ - **THEN** the viewport meta carries `maximum-scale=1, user-scalable=no` (single meta, idempotent, restorable) and no font-floor style is injected
31
+
32
+ #### Scenario: Standalone mode never touches the viewport meta
33
+
34
+ - **WHEN** an iOS-class browser below the breakpoint loads with display-mode standalone (matched via media query or `navigator.standalone`) and `zoomGuard: 'meta'`
35
+ - **THEN** the viewport meta is byte-identical to stock, no provisional meta is created, no resize/MQ listeners or re-evaluation timers are armed, and the `ios-zoom-font-floor` style element is present with the 16px floor rules scoped to the configured breakpoint
36
+
37
+ #### Scenario: Standalone pinch zoom is preserved
38
+
39
+ - **WHEN** the user pinch-zooms in standalone display mode with the guard active
40
+ - **THEN** the viewport meta contains no zoom-restricting tokens (pinch is engine-available; suppression relies solely on the font-size floor)
41
+
42
+ #### Scenario: Font floor suppresses the focus zoom in standalone
43
+
44
+ - **WHEN** an input, textarea, select, or `[contenteditable="true"]` element receives focus in standalone mode below the breakpoint
45
+ - **THEN** its computed font-size is at least 16px and no auto-zoom occurs
46
+
47
+ #### Scenario: Non-iOS touch browsers unaffected
48
+
49
+ - **WHEN** the page loads on a non-iOS touch browser (e.g. Android Chrome) below the breakpoint, in either display mode
50
+ - **THEN** the viewport meta is not rewritten and no font-floor style is injected (Android never focus-zooms; the iOS gate avoids `maximum-scale` side effects there)
51
+
52
+ #### Scenario: Breakpoint crossing re-evaluates
53
+
54
+ - **WHEN** the viewport crosses the breakpoint after load (rotation, split-screen) in browser display mode
55
+ - **THEN** the rewrite is applied on entering the narrow band and the stock meta content is restored on leaving it; in standalone mode the font-floor style's media query naturally stops matching above the breakpoint (no JS re-evaluation exists there)
56
+
57
+ #### Scenario: Desktop and wide viewports unaffected
58
+
59
+ - **WHEN** the page loads on a desktop browser, a non-iOS browser, or at/above the breakpoint (either display mode)
60
+ - **THEN** the viewport meta is stock and no font-floor style is injected (the floor's media query does not match above the breakpoint)
61
+
62
+ #### Scenario: Config off restores stock behavior
63
+
64
+ - **WHEN** `mobile.zoomGuard` is `'off'`
65
+ - **THEN** neither the meta machinery nor the font-floor style exists in any display mode
66
+
67
+ #### Scenario: Idempotent evaluation
68
+
69
+ - **WHEN** the browser-mode re-evaluation runs multiple times within one state (load, resize storms, repeated crossings)
70
+ - **THEN** the meta content does not accumulate duplicate tokens or regress (standalone mode arms no re-evaluation machinery at all)
71
+
72
+ ### Requirement: Sidebar occupies zero width on narrow viewports
73
+
74
+ The plugin's client half SHALL hide the sidebar rail (zero-width column track) on narrow viewports via injected static CSS (media query + semantic attribute selectors, `!important` over the inline grid template), aligned with the upstream CSS-first layout paradigm and WITHOUT JavaScript geometry measurement; desktop-class rendering SHALL remain identical to the unpatched product, and the feature SHALL ship with the plugin, config-gated (`mobile.enabled`, default on).
75
+
76
+ #### Scenario: Mobile viewport hides the rail
77
+
78
+ - **WHEN** the page renders at a mobile-class viewport width below the configured breakpoint with the feature enabled
79
+ - **THEN** the sidebar column track is zero width and the conversation area spans the frame
80
+
81
+ #### Scenario: Desktop unaffected
82
+
83
+ - **WHEN** the page renders at or above the breakpoint
84
+ - **THEN** layout behavior is identical to the unpatched product
85
+
86
+ #### Scenario: Degradation is benign
87
+
88
+ - **WHEN** upstream DOM/attribute changes break the CSS override
89
+ - **THEN** the layout falls back to the native rail rendering without errors or blank areas
90
+
91
+ ### Requirement: Three-condition swipe recognition
92
+
93
+ Swipe recognition SHALL require all three of: gesture origin within the edge band, displacement at or above the distance threshold, and average velocity at or above the velocity threshold; slow press-drag gestures (text selection and similar) SHALL NOT trigger a swipe, and a recognized swipe SHALL toggle the sidebar via the layout service (`ctx.layout.toggleSidebar()`, narrow-viewport semantics), with the velocity/distance predicates implemented as pure functions under unit test.
94
+
95
+ #### Scenario: Slow text-selection drag does not toggle
96
+
97
+ - **WHEN** a pointer press-drag covers the distance threshold at sub-threshold velocity (e.g. selecting text to copy)
98
+ - **THEN** no sidebar toggle occurs
99
+
100
+ #### Scenario: Fast swipe toggles
101
+
102
+ - **WHEN** a pointer gesture starts in the edge band, exceeds the distance threshold, and meets the velocity threshold
103
+ - **THEN** the sidebar overlay state toggles (narrowExpanded flips)
104
+
105
+ #### Scenario: Interactive-element origins are ignored
106
+
107
+ - **WHEN** a gesture begins on an interactive element (link, button, input)
108
+ - **THEN** no swipe recognition runs for that gesture
@@ -0,0 +1,20 @@
1
+ # model-failover Specification
2
+
3
+ ## Purpose
4
+ TBD - created by archiving change 2026-09-02-model-failover-settings-surface. Update Purpose after archive.
5
+
6
+ ## Requirements
7
+
8
+ ### Requirement: Model Failover surface in General settings
9
+
10
+ The plugin SHALL register a Model Failover row into the Settings > General page via the `settings.general.item` slot, exposing the failover pair (primary/secondary model selectors) with persisted configuration, wherever the plugin's client bundle is built and loaded — including the source-level test instance — and the row SHALL remain functional across upstream settings-slot contract evolutions covered by the alignment process.
11
+
12
+ #### Scenario: Row renders in the source-level test instance
13
+
14
+ - **WHEN** the Dev/Test 1 instance starts with the plugin's client bundle built and the user opens Settings > General
15
+ - **THEN** the Model Failover row with both model selectors is visible and its selections persist across instance restarts
16
+
17
+ #### Scenario: Failover engages on primary failure
18
+
19
+ - **WHEN** a turn's primary model request fails and a secondary model is configured in the row
20
+ - **THEN** the host-side per-turn waterfall retries via the configured secondary and the outcome is observable in the session
@@ -0,0 +1,79 @@
1
+ # plugins-page-components Specification
2
+
3
+ ## Purpose
4
+
5
+ 让 better-dsh 在原生 Plugins 页(`dsh-client-ui-plugin-manager`)上呈现与官方 bundle 同等的两件事:
6
+
7
+ 1. **卡片描述**:页面的 `BundleInfo.description` 直接取自包 manifest 的 `description` 字段;better-dsh 的 package.json 缺该字段导致卡片无描述。补齐为 awesome-dsh-plugins listing 的同款文案(单一事实源,两表面一致)。
8
+ 2. **组件化**:页面只把 bundle patch 的 **`insert` 行**列为可开关组件(每行一个 toggle,写 profile 用户层 `cordis.patch.yml` 的 `{id, disabled}` 覆盖行,HMR 即时生效);非 insert 行只进 `overrides`(本页不显示)。现状 better-dsh 只有一条 insert(`dashr-repl`),整个插件是"一个组件"。本变更把 bundle patch 拆成 **6 条 insert**,每条 = 一个可独立开关的功能组件,映射原生 Agent Teams 的双组件形态。
9
+
10
+ ## Requirements
11
+
12
+ ### Requirement: 六组件行结构
13
+
14
+ bundle patch(`cordis.patch.yml`)SHALL 恰好声明 6 条 insert 行,全部指向同一 npm 包 `better-dsh` 的子路径导出:
15
+
16
+ | row id | module | 内容 |
17
+ |---|---|---|
18
+ | `dashr-repl` | `better-dsh` | 核心:kernel runtime + spin-up 供给检查 + `eval` + 三委派桥 + `llm_completion` + wire mask + escalation guidance |
19
+ | `dashr-url-schemes` | `better-dsh/url-schemes` | URL 感知 I/O + hashline + devices(原 `DshUrlSchemes`,行配置载 `urlSchemes`/`hashline` gates) |
20
+ | `dashr-failover` | `better-dsh/failover` | LLM failover 瀑布(settings 驱动,行配置 = 两个 fallback 槽) |
21
+ | `dashr-compaction-tuning` | `better-dsh/compaction-tuning` | 自动压缩阈值偏好(settings 驱动) |
22
+ | `dashr-web-trust` | `better-dsh/web-trust` | `webserver/index-inject` **authorities 腿**(`__DSH_TRANSPORT__.ownsHost`);行配置 `trustedPageAuthorities`(schema 默认派生自 `DSH_TRUSTED_HOSTS`) |
23
+ | `dashr-mobile` | `better-dsh/mobile` | `webserver/index-inject` **mobile 腿**(`__DASHR_MOBILE__` + zoomGuard 段);行配置 = 原 `MOBILE_CONFIG` |
24
+
25
+ #### Scenario: 页面呈现
26
+
27
+ - **WHEN** 用户打开 Plugins 页的 better-dsh 卡片
28
+ - **THEN** 卡片显示 listing 文案描述与 6 个组件行,每行可独立开关
29
+
30
+ #### Scenario: 行开关落盘
31
+
32
+ - **WHEN** 用户关闭任一组件行
33
+ - **THEN** profile 用户层 patch 追加该 id 的 `{disabled: true}` 覆盖行,HMR 即时卸载该组件;重新打开则移除覆盖
34
+
35
+ ### Requirement: 配置键迁移(行 = 配置归属)
36
+
37
+ `urlSchemes`、`hashline`、`trustedPageAuthorities`、`mobile` SHALL 从 `dashr-repl` 的 Config schema 移除,改由所属行的 schema 承载(schema 级默认逐键填充,跨 patch 覆盖层存活——v0.2.2a 裁决的延续)。config-file 用户改以行 id 为目标。
38
+
39
+ #### Scenario: 行级 gates
40
+
41
+ - **WHEN** `dashr-url-schemes` 行配置 `hashline: false`
42
+ - **THEN** hashline read 锚点与 edit/undo 家族不安装,captured 原生 read 独立站立(既有 gate 语义不变,只是配置位置从核心行移到本行)
43
+
44
+ ### Requirement: 行间无注入边,排序无关
45
+
46
+ 任何组件行 SHALL NOT inject 另一组件行提供的服务;行为正确的唯一跨行约束——**capture-before-mask**(url-schemes 的继承面快照必须在 wire mask `restrict({deny})` 之前完成,快照保存被 mask 的委派工具定义)——SHALL 由 mask 监听器自身保证:mask 监听器第一步调用共享模块 `native-capture`(单例 chunk)的 `captureAllTools(agent)`(幂等,WeakMap 缓存),随后才 restrict。两个入口行(entry)的激活顺序因此无关紧要。
47
+
48
+ #### Scenario: 顺序反转仍正确
49
+
50
+ - **WHEN** cordis 激活顺序使 mask 监听器先于 url-schemes 的 session-start 监听器运行
51
+ - **THEN** mask 先经 `captureAllTools` 固化 pre-mask 全量快照再 restrict;url-schemes 随后的 `captureNativeTools` 命中同一缓存,wrappers 照常安装(own-layer 注册不受已落限制过滤)
52
+
53
+ #### Scenario: url-schemes 行关闭时桥不断
54
+
55
+ - **WHEN** `dashr-url-schemes` 行关闭、`dashr-repl` 行开启
56
+ - **THEN** mask 监听器的 capture 步骤照常固化快照,captured 委派工具定义仍可供读取;eval 与委派桥正常工作
57
+
58
+ ### Requirement: 双腿 boot script
59
+
60
+ `buildBootScript` SHALL 拆为两个纯函数腿构建器:`buildTrustScript`(authorities 段)与 `buildMobileScript`(`__DASHR_MOBILE__` + zoomGuard 段),各自为空即注入 nothing;两行各自注册 `webserver/index-inject` 监听器(list 事件,`table.push` 天然可组合)。
61
+
62
+ #### Scenario: 单腿开关
63
+
64
+ - **WHEN** `dashr-mobile` 行关闭而 `dashr-web-trust` 行开启
65
+ - **THEN** 页面仍注入 authorities 腿脚本,`__DASHR_MOBILE__` 缺席,client 移动手势/zoomGuard 保持惰性(client 半无改动,读页面全局缺席即休眠)
66
+
67
+ ### Requirement: override 行保持原样
68
+
69
+ compaction 再启用三条(`compaction-basic`/`command-compact`/`tool-result-pruner`)与 `connection` fence 行 SHALL 保持 override 行形态。原生页面不列出 override 行(把再启用做成 insert 需 fork 上游插件模块,不采纳)。
70
+
71
+ ### Requirement: 描述单源
72
+
73
+ package.json `description` SHALL 逐字采用 awesome-dsh-plugins listing 的 en 文案,使 Plugins 卡片与市场 listing 单源一致。
74
+
75
+ ## Out of Scope
76
+
77
+ - npm publish(另行裁决,按发布红线走两道闸)。
78
+ - `plugins.row.config` / `plugins.bundle.config` 配置表单(本变更只要求原生行开关;行配置仍走 config file)。
79
+ - client half 改动(页面全局缺席即休眠的既有形态已满足)。
@@ -0,0 +1,22 @@
1
+ # preact-ui-shell Specification
2
+
3
+ ## Purpose
4
+ 为测试线(test-line)的 `apps/web` shell 提供构建期 React 家族到 `preact/compat` 的 vite alias patch:上游 ui-* 插件 bundle 的 `require("react")` 零改动获得 Preact 实例,shell 体积随之显著缩减。该 patch 仅限测试线 checkout,随 tag 切换重放;是否随插件包发布 dist 由 ship 决策另行裁决、暂缓。
5
+
6
+ ### Requirement: Preact-shell build for the web UI
7
+ The test-line harness build SHALL support building the web shell (`apps/web`) with the React family aliased to `preact/compat` (including `react/jsx-runtime`, `react/jsx-dev-runtime`, `react-dom`, `react-dom/client` subpaths) via a build-time vite alias, so the platform module seed materializes Preact instances and every upstream client plugin bundle's `require("react")` receives Preact with zero upstream component edits. The alias SHALL be a monorepo-local build patch (documented, re-applied on tag switches), never an upstream source fork.
8
+
9
+ #### Scenario: Shell serves the UI with Preact
10
+ - **WHEN** the test-line instance is rebuilt with the alias patch and a browser loads the served UI
11
+ - **THEN** the full upstream UI corpus mounts (sidebar/workspace/settings/chat), the session reports zero `pageerror` and zero `console.error`, and the shell bundle contains no `react-dom` production banner while carrying `preact` identity
12
+
13
+ #### Scenario: Size regression is measured, not assumed
14
+ - **WHEN** the alias build completes
15
+ - **THEN** the shell `index` chunk (where the React family rides) is measured against the stock build and the delta recorded in the change report
16
+
17
+ ### Requirement: Test-line-only scope pending a ship decision
18
+ The alias patch lives in the harness checkout only. The published plugin package (`@pgmi-builds/better-dsh`) SHALL NOT silently fork the web-UI serve surface: shipping a Preact-built frontend dist through the plugin (web-runtime override rows) is a separate decision gated on the prod host version upgrade, because a shipped dist freezes the UI corpus at the fork point.
19
+
20
+ #### Scenario: Plugin publish content unchanged by this change
21
+ - **WHEN** the next plugin alpha is published after this change
22
+ - **THEN** the Preact enhancement is not part of the published artifact; the report records the ship-in-plugin option (dist + override rows) and its corpus-freeze trade-off as a pending decision tied to the prod host upgrade
@@ -0,0 +1,21 @@
1
+ # repl-dispatch-resilience Specification
2
+
3
+ ## Purpose
4
+ REPL(`eval` cell)子分派的韧性契约:分派层的任何错误——调度器缺失、工具体抛错、取消——都必须 settle 为 cell 可见的 `ToolCallError` 结果,绝不外泄为 unhandled rejection 或使宿主进程崩溃。生产组合必须把带 `TOOL_RUNTIME_SCHEDULER` symbol 的原生 `ToolRuntime` 实例解析给插件,测试组合与生产组合之间不得存在环境差异导致的静默行为分裂。
5
+
6
+ ## Requirements
7
+
8
+ ### Requirement: Dispatch errors settle as visible ToolCallError
9
+ The system SHALL resolve the plugin's tools service to the native `ToolRuntime` instance carrying the `TOOL_RUNTIME_SCHEDULER` symbol in the production composition, so REPL sub-dispatches execute through the same staged scheduler as the agent loop and return real tool results to the cell. The symbol this plugin imports SHALL be identical (`===`) to the one keying the mounted instance — a second dsh-tools module copy reachable from the deployed plugin (e.g. stray nested `@deepseek-ai` symlinks) breaks that identity and is a deployment defect (2026-09-02 corrected root cause; the plain `runtimeCtx.tools` read is the sanctioned resolution path). A mount whose tools service genuinely lacks the symbol SHALL be treated as a loud, diagnosable configuration failure — the error names the plugin's own `dsh-tools` resolution path — rather than a silent runtime crash, and that loud failure SHALL be the abnormal fallback, not the normal production state.
10
+
11
+ #### Scenario: Production mount carries the scheduler symbol
12
+ - **WHEN** the DASHR plugin mounts in the production composition and a cell dispatches a real tool call
13
+ - **THEN** the dispatch executes through `registry[TOOL_RUNTIME_SCHEDULER]` and returns the tool result to the cell without crashing the daemon
14
+
15
+ #### Scenario: Legitimate cell tool call returns its real result
16
+ - **WHEN** a cell dispatches a legitimate tool call (e.g. `tool.read({ path })`) in a live session after the fix
17
+ - **THEN** the cell receives the tool's actual result, not the `TOOL_RUNTIME_SCHEDULER` loud error
18
+
19
+ #### Scenario: Regression probes pass after the fix
20
+ - **WHEN** the four probe cells from the diagnosis matrix (`tool.subagent` background:false, `tool.subagent` background:true, `tool.bash` background:true, `tool.read`) run in a live session after the fix
21
+ - **THEN** all four return a real result (or a visible `ToolCallError` where the call is legitimately invalid) instead of truncating, and the journal contains no new daemon crash
@@ -0,0 +1,58 @@
1
+ # skill Specification
2
+
3
+ ## Purpose
4
+
5
+ Let the model address skill bodies and internal skill resources via `skill://` URLs, with discovery tied to the same workspace source that advertises skills, and replace the skill tool's body-loading role on the REPL surface.
6
+
7
+ ## Requirements
8
+
9
+ ### Requirement: Skill body addressing
10
+ The system SHALL let read accept `skill://<name>` and return that skill's SKILL.md body in full text (no default truncation; only explicit selectors page).
11
+
12
+ #### Scenario: Reading an existing skill
13
+ - **WHEN** the model reads `skill://<registered skill name>`
14
+ - **THEN** the system returns the skill's body text in full
15
+
16
+ #### Scenario: Reading an unknown skill
17
+ - **WHEN** the model reads `skill://<unregistered name>`
18
+ - **THEN** the system returns the structured `URL_SKILL_NOT_FOUND` error ("unknown or no longer available")
19
+
20
+ ### Requirement: Skill internal resource addressing
21
+ The system SHALL let read accept `skill://<name>/<path>` and return the named file inside the skill's resource directory, loaded through the sandboxed filesystem (same containment/audit rules as host reads). A skill without a filesystem resource directory returns `URL_SKILL_NO_RESOURCE_BASE`; a subpath escaping the directory returns `URL_SKILL_RESOURCE_ESCAPE`.
22
+
23
+ #### Scenario: Reading a referenced skill file
24
+ - **WHEN** the model reads `skill://foo/references/x.md`
25
+ - **THEN** the system returns the content of `references/x.md` inside foo's resource directory
26
+
27
+ #### Scenario: Resource path escapes the skill directory
28
+ - **WHEN** the model reads `skill://foo/../../etc/passwd`
29
+ - **THEN** the system returns the structured `URL_SKILL_RESOURCE_ESCAPE` error and reads nothing
30
+
31
+ ### Requirement: Workspace-cwd-sensitive discovery
32
+ The system SHALL pass the calling agent's session cwd (`{cwd: agent.session.header.cwd}`) to every skill-registry lookup — the same source `dsh-tool-skill` uses to render `<available_skills>` — so `skill://` can address exactly the skills the catalog advertises for the current workspace.
33
+
34
+ #### Scenario: Skill visible in the current workspace
35
+ - **WHEN** the model reads `skill://foo` from a session whose cwd is inside a project root that provides foo
36
+ - **THEN** the lookup succeeds and the body resolves
37
+
38
+ #### Scenario: Skill outside the workspace is unknown
39
+ - **WHEN** a skill's project roots do not cover the session cwd
40
+ - **THEN** the lookup misses and the system returns `URL_SKILL_NOT_FOUND`, matching what `<available_skills>` advertised
41
+
42
+ ### Requirement: Path-backed search view
43
+ The system SHALL expose the handler's `resolvePath`: `skill://<name>` maps to the skill's resource-directory root and `skill://<name>/<subpath>` to the joined file (same escape guard), letting grep/glob search the real files; unmappable URLs (unknown skill, non-directory resource base, escaping subpath) resolve to `undefined` so callers fall back to text resolution with its structured error.
44
+
45
+ #### Scenario: grep searches the skill's real directory
46
+ - **WHEN** the model greps a `skill://foo` URL
47
+ - **THEN** the search runs natively over foo's on-disk resource directory
48
+
49
+ ### Requirement: Skill tool masked on the REPL surface only
50
+ The system SHALL mask the upstream `skill` tool presentation-only (ADR-0002): it disappears from the REPL `tool.*` binding names and the dashr tool-catalog section, while the host-layer native `skill` tool stays registered and executable and the `<available_skills>` discovery catalog is retained.
51
+
52
+ #### Scenario: Skill absent from the REPL surface
53
+ - **WHEN** the model inspects the kernel tool bindings or the tool-catalog text
54
+ - **THEN** neither contains `skill`, and `skill://` URLs remain the addressing path for skill content
55
+
56
+ #### Scenario: Host-native skill tool survives
57
+ - **WHEN** any host-plane consumer dispatches the native `skill` tool directly
58
+ - **THEN** the tool remains registered and executable — the mask touched only presentation surfaces