dal-code 1.0.39 → 1.0.41

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 (348) hide show
  1. package/CHANGELOG.md +111 -4
  2. package/NOTICE +298 -0
  3. package/PRIVACY.md +62 -2
  4. package/dal-docs/examples/extensions/LICENSE +21 -0
  5. package/dal-docs/examples/extensions/README.md +64 -0
  6. package/dal-docs/examples/extensions/bookmark.ts +52 -0
  7. package/dal-docs/examples/extensions/claude-rules.ts +88 -0
  8. package/dal-docs/examples/extensions/commands.ts +74 -0
  9. package/dal-docs/examples/extensions/custom-footer.ts +66 -0
  10. package/dal-docs/examples/extensions/dirty-repo-guard.ts +58 -0
  11. package/dal-docs/examples/extensions/dynamic-tools.ts +76 -0
  12. package/dal-docs/examples/extensions/hello.ts +49 -0
  13. package/dal-docs/examples/extensions/inline-bash.ts +96 -0
  14. package/dal-docs/examples/extensions/permission-gate.ts +36 -0
  15. package/dal-docs/examples/extensions/protected-paths.ts +32 -0
  16. package/dal-docs/examples/extensions/session-name.ts +29 -0
  17. package/dal-docs/examples/extensions/status-line.ts +34 -0
  18. package/dal-docs/examples/extensions/structured-output.ts +67 -0
  19. package/dal-docs/examples/extensions/tool-override.ts +146 -0
  20. package/dal-docs/examples/extensions/trigger-compact.ts +59 -0
  21. package/dal-docs/examples/extensions/truncated-tool.ts +197 -0
  22. package/dal-docs/extensions.md +27 -0
  23. package/dist/cli/args.d.ts +3 -0
  24. package/dist/cli/args.js +17 -17
  25. package/dist/config.d.ts +1 -0
  26. package/dist/config.js +1 -1
  27. package/dist/core/agent-session.d.ts +3 -0
  28. package/dist/core/agent-session.js +6 -6
  29. package/dist/core/extensions/loader.js +1 -1
  30. package/dist/core/extensions/permission-surface.js +1 -1
  31. package/dist/core/extensions/runner.js +1 -1
  32. package/dist/core/extensions/types.d.ts +15 -1
  33. package/dist/core/model-registry.d.ts +1 -0
  34. package/dist/core/model-registry.js +1 -1
  35. package/dist/core/nested-tool-calls.js +2 -2
  36. package/dist/core/resource-loader.js +1 -1
  37. package/dist/core/system-prompt.js +10 -9
  38. package/dist/core/tools/bash.js +13 -12
  39. package/dist/core/tools/path-utils.d.ts +5 -0
  40. package/dist/core/tools/process.d.ts +2 -0
  41. package/dist/core/tools/process.js +14 -13
  42. package/dist/dal/extension-compat.d.ts +62 -0
  43. package/dist/dal/extension-compat.js +4 -0
  44. package/dist/dal/hooks/extension.js +2 -2
  45. package/dist/dal/i18n.js +1 -1
  46. package/dist/dal/manifest.js +1 -1
  47. package/dist/dal/reviewed/endorsed-cli.js +1 -1
  48. package/dist/dal/reviewed/endorsed.js +1 -1
  49. package/dist/dal/reviewed/market-keys.js +1 -0
  50. package/dist/dal/reviewed/market.d.ts +64 -0
  51. package/dist/dal/reviewed/market.js +2 -0
  52. package/dist/extensions/mcp/runtime.d.ts +2 -1
  53. package/dist/extensions/mcp/runtime.js +3 -3
  54. package/dist/extensions/mcp/runtime.lazy.d.ts +1 -0
  55. package/dist/index.d.ts +7 -1
  56. package/dist/index.js +1 -1
  57. package/dist/main.js +4 -4
  58. package/dist/modes/acp/acp-mode.js +1 -1
  59. package/dist/modes/interactive/components/status-indicator.d.ts +1 -1
  60. package/dist/modes/interactive/components/status-indicator.js +1 -1
  61. package/dist/modes/interactive/interactive-mode.d.ts +2 -0
  62. package/dist/modes/interactive/interactive-mode.js +14 -14
  63. package/dist/modes/print-mode.d.ts +1 -1
  64. package/dist/modes/print-mode.js +7 -6
  65. package/dist/modes/rpc/rpc-mode.js +1 -1
  66. package/dist/node_modules/@dalcode/dal-advisor/LICENSE +45 -0
  67. package/dist/node_modules/@dalcode/dal-advisor/package.json +35 -0
  68. package/dist/node_modules/@dalcode/dal-advisor/src/index.js +23 -0
  69. package/dist/node_modules/@dalcode/dal-awake/LICENSE +21 -0
  70. package/dist/node_modules/@dalcode/dal-awake/package.json +31 -0
  71. package/dist/node_modules/@dalcode/dal-awake/src/index.js +3 -0
  72. package/dist/node_modules/@dalcode/dal-awake/src/inhibitor.js +1 -0
  73. package/dist/node_modules/@dalcode/dal-bridge/package.json +2 -2
  74. package/dist/node_modules/@dalcode/dal-bridge/src/ask-user.js +1 -1
  75. package/dist/node_modules/@dalcode/dal-capabilities/LICENSE +21 -0
  76. package/dist/node_modules/@dalcode/dal-capabilities/package.json +38 -0
  77. package/dist/node_modules/@dalcode/dal-capabilities/src/catalogue.js +1 -0
  78. package/dist/node_modules/@dalcode/dal-capabilities/src/index.js +11 -0
  79. package/dist/node_modules/@dalcode/dal-capabilities/src/install.js +4 -0
  80. package/dist/node_modules/@dalcode/dal-capabilities/src/match.js +1 -0
  81. package/dist/node_modules/@dalcode/dal-capabilities/src/state.js +3 -0
  82. package/dist/node_modules/@dalcode/dal-compat/LICENSE +21 -0
  83. package/dist/node_modules/@dalcode/dal-compat/package.json +32 -0
  84. package/dist/node_modules/@dalcode/dal-compat/src/at-imports.js +3 -0
  85. package/dist/node_modules/@dalcode/dal-compat/src/claude-rules.js +3 -0
  86. package/dist/node_modules/@dalcode/dal-compat/src/index.js +9 -0
  87. package/dist/node_modules/@dalcode/dal-dap/LICENSE +47 -0
  88. package/dist/node_modules/@dalcode/dal-dap/package.json +38 -0
  89. package/dist/node_modules/@dalcode/dal-dap/src/adapters.js +1 -0
  90. package/dist/node_modules/@dalcode/dal-dap/src/client.js +5 -0
  91. package/dist/node_modules/@dalcode/dal-dap/src/index.js +9 -0
  92. package/dist/node_modules/@dalcode/dal-dap/src/install.js +2 -0
  93. package/dist/node_modules/@dalcode/dal-dap/src/session.js +2 -0
  94. package/dist/node_modules/@dalcode/dal-dap/src/types.js +0 -0
  95. package/dist/node_modules/@dalcode/dal-gateway/package.json +2 -2
  96. package/dist/node_modules/@dalcode/dal-goal/package.json +4 -3
  97. package/dist/node_modules/@dalcode/dal-goal/src/core.js +6 -6
  98. package/dist/node_modules/@dalcode/dal-goal/src/index.js +17 -7
  99. package/dist/node_modules/@dalcode/dal-goal/src/verify.js +26 -0
  100. package/dist/node_modules/@dalcode/dal-guard/package.json +6 -4
  101. package/dist/node_modules/@dalcode/dal-guard/src/credentials.js +1 -1
  102. package/dist/node_modules/@dalcode/dal-guard/src/edit-anchor-core.js +24 -0
  103. package/dist/node_modules/@dalcode/dal-guard/src/edit-anchor.js +4 -0
  104. package/dist/node_modules/@dalcode/dal-guard/src/index.js +1 -1
  105. package/dist/node_modules/@dalcode/dal-guard/src/workspace.js +2 -2
  106. package/dist/node_modules/@dalcode/dal-halo/package.json +1 -1
  107. package/dist/node_modules/@dalcode/dal-interactive/LICENSE +209 -0
  108. package/dist/node_modules/@dalcode/dal-interactive/package.json +4 -3
  109. package/dist/node_modules/@dalcode/dal-interactive/src/btw.js +25 -0
  110. package/dist/node_modules/@dalcode/dal-interactive/src/index.js +1 -1
  111. package/dist/node_modules/@dalcode/dal-lang/package.json +3 -3
  112. package/dist/node_modules/@dalcode/dal-learn/LICENSE +21 -0
  113. package/dist/node_modules/@dalcode/dal-learn/package.json +38 -0
  114. package/dist/node_modules/@dalcode/dal-learn/src/engine.js +8 -0
  115. package/dist/node_modules/@dalcode/dal-learn/src/extract.js +14 -0
  116. package/dist/node_modules/@dalcode/dal-learn/src/index.js +17 -0
  117. package/dist/node_modules/@dalcode/dal-learn/src/lessons.js +3 -0
  118. package/dist/node_modules/@dalcode/dal-learn/src/migrate.js +1 -0
  119. package/dist/node_modules/@dalcode/dal-learn/src/patches.js +10 -0
  120. package/dist/node_modules/@dalcode/dal-learn/src/procedures.js +11 -0
  121. package/dist/node_modules/@dalcode/dal-learn/src/project-map.js +2 -0
  122. package/dist/node_modules/@dalcode/dal-learn/src/project.js +1 -0
  123. package/dist/node_modules/@dalcode/dal-learn/src/safety.js +2 -0
  124. package/dist/node_modules/@dalcode/dal-learn/src/signals.js +5 -0
  125. package/dist/node_modules/@dalcode/dal-learn/src/skill-actions.js +1 -0
  126. package/dist/node_modules/@dalcode/dal-learn/src/skill-evolution.js +16 -0
  127. package/dist/node_modules/@dalcode/dal-learn/src/store.js +2 -0
  128. package/dist/node_modules/@dalcode/dal-lsp/package.json +6 -4
  129. package/dist/node_modules/@dalcode/dal-lsp/src/client.js +3 -3
  130. package/dist/node_modules/@dalcode/dal-lsp/src/config.js +1 -1
  131. package/dist/node_modules/@dalcode/dal-lsp/src/format.js +8 -7
  132. package/dist/node_modules/@dalcode/dal-lsp/src/index.js +11 -8
  133. package/dist/node_modules/@dalcode/dal-mcp/package.json +6 -5
  134. package/dist/node_modules/@dalcode/dal-mcp/src/config.d.ts +1 -0
  135. package/dist/node_modules/@dalcode/dal-mcp/src/config.js +1 -1
  136. package/dist/node_modules/@dalcode/dal-mcp/src/http-client.d.ts +32 -1
  137. package/dist/node_modules/@dalcode/dal-mcp/src/http-client.js +2 -1
  138. package/dist/node_modules/@dalcode/dal-mcp/src/index.js +16 -16
  139. package/dist/node_modules/@dalcode/dal-mcp/src/oauth.js +2 -0
  140. package/dist/node_modules/@dalcode/dal-mcp/src/stdio-client.d.ts +4 -2
  141. package/dist/node_modules/@dalcode/dal-mcp/src/stdio-client.js +4 -4
  142. package/dist/node_modules/@dalcode/dal-mcp/src/types.d.ts +9 -0
  143. package/dist/node_modules/@dalcode/dal-mcp/src/types.js +1 -1
  144. package/dist/node_modules/@dalcode/dal-office/package.json +2 -2
  145. package/dist/node_modules/@dalcode/dal-office/src/index.d.ts +6 -3
  146. package/dist/node_modules/@dalcode/dal-office/src/index.js +1 -1
  147. package/dist/node_modules/@dalcode/dal-office/src/render/chart-theme.d.ts +13 -0
  148. package/dist/node_modules/@dalcode/dal-office/src/render/chart-theme.js +1 -0
  149. package/dist/node_modules/@dalcode/dal-office/src/render/chart.d.ts +16 -0
  150. package/dist/node_modules/@dalcode/dal-office/src/render/chart.js +4 -2
  151. package/dist/node_modules/@dalcode/dal-office/src/render/docx.d.ts +4 -1
  152. package/dist/node_modules/@dalcode/dal-office/src/render/docx.js +1 -1
  153. package/dist/node_modules/@dalcode/dal-office/src/render/drawio-style.d.ts +4 -0
  154. package/dist/node_modules/@dalcode/dal-office/src/render/drawio-style.js +1 -0
  155. package/dist/node_modules/@dalcode/dal-office/src/render/pptx.d.ts +52 -4
  156. package/dist/node_modules/@dalcode/dal-office/src/render/pptx.js +3 -2
  157. package/dist/node_modules/@dalcode/dal-office/src/render/thumbnails.d.ts +1 -1
  158. package/dist/node_modules/@dalcode/dal-office/src/render/thumbnails.js +1 -1
  159. package/dist/node_modules/@dalcode/dal-office/src/render/xlsx.d.ts +1 -0
  160. package/dist/node_modules/@dalcode/dal-office/src/render/xlsx.js +1 -1
  161. package/dist/node_modules/@dalcode/dal-office/src/scratchpad.d.ts +30 -1
  162. package/dist/node_modules/@dalcode/dal-office/src/scratchpad.js +1 -1
  163. package/dist/node_modules/@dalcode/dal-office/src/themes.d.ts +35 -1
  164. package/dist/node_modules/@dalcode/dal-office/src/themes.js +1 -1
  165. package/dist/node_modules/@dalcode/dal-office/src/tools/chart-generate.js +3 -3
  166. package/dist/node_modules/@dalcode/dal-office/src/tools/doc-generate.js +2 -2
  167. package/dist/node_modules/@dalcode/dal-office/src/tools/drawio-generate.js +3 -3
  168. package/dist/node_modules/@dalcode/dal-office/src/tools/ppt-generate.js +2 -2
  169. package/dist/node_modules/@dalcode/dal-office/src/tools/ppt-plan.js +2 -2
  170. package/dist/node_modules/@dalcode/dal-office/src/tools/sheet-generate.js +2 -2
  171. package/dist/node_modules/@dalcode/dal-pi-kit/dist/i18n.js +4 -4
  172. package/dist/node_modules/@dalcode/dal-pi-kit/package.json +1 -1
  173. package/dist/node_modules/@dalcode/dal-pi-kit/src/i18n.js +4 -4
  174. package/dist/node_modules/@dalcode/dal-plugins/package.json +4 -5
  175. package/dist/node_modules/@dalcode/dal-plugins/src/index.js +11 -11
  176. package/dist/node_modules/@dalcode/dal-plugins/src/manage.js +8 -10
  177. package/dist/node_modules/@dalcode/dal-plugins/src/npm-hook.js +1 -1
  178. package/dist/node_modules/@dalcode/dal-plugins/src/registry.js +2 -2
  179. package/dist/node_modules/@dalcode/dal-recall/LICENSE +45 -0
  180. package/dist/node_modules/@dalcode/dal-recall/package.json +34 -0
  181. package/dist/node_modules/@dalcode/dal-recall/src/index-db.js +57 -0
  182. package/dist/node_modules/@dalcode/dal-recall/src/index.js +1 -0
  183. package/dist/node_modules/@dalcode/dal-recall/src/query.js +1 -0
  184. package/dist/node_modules/@dalcode/dal-recall/src/redact.js +1 -0
  185. package/dist/node_modules/@dalcode/dal-recall/src/sqlite.js +1 -0
  186. package/dist/node_modules/@dalcode/dal-review/package.json +3 -3
  187. package/dist/node_modules/@dalcode/dal-review/src/core.d.ts +1 -0
  188. package/dist/node_modules/@dalcode/dal-review/src/core.js +1 -1
  189. package/dist/node_modules/@dalcode/dal-review/src/findings.js +2 -2
  190. package/dist/node_modules/@dalcode/dal-review/src/index.js +1 -1
  191. package/dist/node_modules/@dalcode/dal-review/src/prompt.d.ts +1 -1
  192. package/dist/node_modules/@dalcode/dal-review/src/prompt.js +3 -2
  193. package/dist/node_modules/@dalcode/dal-review/src/runner.d.ts +2 -1
  194. package/dist/node_modules/@dalcode/dal-review/src/runner.js +2 -2
  195. package/dist/node_modules/@dalcode/dal-review/src/simplify.d.ts +5 -0
  196. package/dist/node_modules/@dalcode/dal-review/src/simplify.js +30 -0
  197. package/dist/node_modules/@dalcode/dal-review/src/types.d.ts +5 -0
  198. package/dist/node_modules/@dalcode/dal-review/src/types.js +1 -1
  199. package/dist/node_modules/@dalcode/dal-rewind/package.json +2 -2
  200. package/dist/node_modules/@dalcode/dal-rewind/src/commands.js +2 -2
  201. package/dist/node_modules/@dalcode/dal-rewind/src/core.d.ts +21 -8
  202. package/dist/node_modules/@dalcode/dal-rewind/src/core.js +8 -3
  203. package/dist/node_modules/@dalcode/dal-rewind/src/index.js +1 -1
  204. package/dist/node_modules/@dalcode/dal-rewind/src/state.js +1 -1
  205. package/dist/node_modules/@dalcode/dal-router/package.json +6 -5
  206. package/dist/node_modules/@dalcode/dal-router/src/advisor.js +1 -0
  207. package/dist/node_modules/@dalcode/dal-router/src/assist.js +4 -2
  208. package/dist/node_modules/@dalcode/dal-router/src/commands.js +8 -8
  209. package/dist/node_modules/@dalcode/dal-router/src/config.d.ts +3 -0
  210. package/dist/node_modules/@dalcode/dal-router/src/config.js +2 -2
  211. package/dist/node_modules/@dalcode/dal-router/src/index.js +4 -4
  212. package/dist/node_modules/@dalcode/dal-router/src/jev.d.ts +2 -1
  213. package/dist/node_modules/@dalcode/dal-router/src/jev.js +4 -4
  214. package/dist/node_modules/@dalcode/dal-router/src/services.js +1 -1
  215. package/dist/node_modules/@dalcode/dal-router/src/subagent.js +1 -1
  216. package/dist/node_modules/@dalcode/dal-rtk/LICENSE +21 -0
  217. package/dist/node_modules/@dalcode/dal-rtk/package.json +31 -0
  218. package/dist/node_modules/@dalcode/dal-rtk/src/index.js +2 -0
  219. package/dist/node_modules/@dalcode/dal-skills/package.json +4 -3
  220. package/dist/node_modules/@dalcode/dal-skills/src/bundled/bounded-code-repair/SKILL.md +45 -0
  221. package/dist/node_modules/@dalcode/dal-skills/src/bundled/browser-qa/SKILL.md +48 -0
  222. package/dist/node_modules/@dalcode/dal-skills/src/bundled/diagram-design/SKILL.md +81 -0
  223. package/dist/node_modules/@dalcode/dal-skills/src/bundled/evidence-first-retrieval/SKILL.md +43 -0
  224. package/dist/node_modules/@dalcode/dal-skills/src/bundled/poster-design/SKILL.md +50 -0
  225. package/dist/node_modules/@dalcode/dal-skills/src/bundled/print-design/SKILL.md +55 -0
  226. package/dist/node_modules/@dalcode/dal-skills/src/bundled/validated-structured-output/SKILL.md +36 -0
  227. package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/dashboard.html +177 -0
  228. package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/diagram.html +39 -0
  229. package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/echarts-dal.json +360 -0
  230. package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/email/notice.html +46 -0
  231. package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/landing.html +173 -0
  232. package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/mermaid-dal.json +140 -0
  233. package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/mindmap.html +65 -0
  234. package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/posters/event-poster.html +40 -0
  235. package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/posters/poster.css +41 -0
  236. package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/posters/square-card.html +25 -0
  237. package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/posters/wechat-cover.html +29 -0
  238. package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/posters/xhs-card.html +35 -0
  239. package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/posters/xhs-cover.html +26 -0
  240. package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/print/letter.html +35 -0
  241. package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/print/print.css +65 -0
  242. package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/print/report.html +76 -0
  243. package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/print/resume.html +72 -0
  244. package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/render.mjs +18 -0
  245. package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/tokens.css +264 -0
  246. package/dist/node_modules/@dalcode/dal-skills/src/bundled/web-design/SKILL.md +73 -0
  247. package/dist/node_modules/@dalcode/dal-skills/src/bundled.js +1 -0
  248. package/dist/node_modules/@dalcode/dal-skills/src/catalog.js +2 -2
  249. package/dist/node_modules/@dalcode/dal-skills/src/index.js +16 -11
  250. package/dist/node_modules/@dalcode/dal-statusline/LICENSE +21 -0
  251. package/dist/node_modules/@dalcode/dal-statusline/package.json +31 -0
  252. package/dist/node_modules/@dalcode/dal-statusline/src/index.js +3 -0
  253. package/dist/node_modules/@dalcode/dal-structured/LICENSE +21 -0
  254. package/dist/node_modules/@dalcode/dal-structured/package.json +32 -0
  255. package/dist/node_modules/@dalcode/dal-structured/src/index.js +9 -0
  256. package/dist/node_modules/@dalcode/dal-subagent/LICENSE +24 -0
  257. package/dist/node_modules/@dalcode/dal-subagent/package.json +7 -6
  258. package/dist/node_modules/@dalcode/dal-subagent/src/background.js +13 -0
  259. package/dist/node_modules/@dalcode/dal-subagent/src/index.js +22 -14
  260. package/dist/node_modules/@dalcode/dal-subagent/src/inproc-runner.js +3 -0
  261. package/dist/node_modules/@dalcode/dal-subagent/src/pool.js +1 -0
  262. package/dist/node_modules/@dalcode/dal-subagent/src/process-runner.js +3 -3
  263. package/dist/node_modules/@dalcode/dal-subagent/src/tmux-runner.js +3 -0
  264. package/dist/node_modules/@dalcode/dal-subagent/src/worktree.js +2 -0
  265. package/dist/node_modules/@dalcode/dal-telemetry/package.json +7 -2
  266. package/dist/node_modules/@dalcode/dal-telemetry/src/config.js +3 -2
  267. package/dist/node_modules/@dalcode/dal-telemetry/src/failure-queue.js +4 -0
  268. package/dist/node_modules/@dalcode/dal-telemetry/src/failure-reporting.js +5 -0
  269. package/dist/node_modules/@dalcode/dal-telemetry/src/failures.js +2 -0
  270. package/dist/node_modules/@dalcode/dal-telemetry/src/index.js +4 -3
  271. package/dist/node_modules/@dalcode/dal-telemetry/src/repro.js +1 -0
  272. package/dist/node_modules/@dalcode/dal-terminal/package.json +2 -2
  273. package/dist/node_modules/@dalcode/dal-tool-catalog/package.json +2 -2
  274. package/dist/node_modules/@dalcode/dal-tool-catalog/src/groups.js +1 -1
  275. package/dist/node_modules/@dalcode/dal-tool-catalog/src/index.js +4 -4
  276. package/dist/node_modules/@dalcode/dal-tool-catalog/src/path-hint.js +1 -0
  277. package/dist/node_modules/@dalcode/dal-tool-catalog/src/repair-hook.js +2 -0
  278. package/dist/node_modules/@dalcode/dal-tool-catalog/src/repair.js +4 -0
  279. package/dist/node_modules/@dalcode/dal-tool-catalog/src/tool-name.js +1 -0
  280. package/dist/node_modules/@dalcode/dal-usage/LICENSE +45 -0
  281. package/dist/node_modules/@dalcode/dal-usage/package.json +33 -0
  282. package/dist/node_modules/@dalcode/dal-usage/src/budget.d.ts +14 -0
  283. package/dist/node_modules/@dalcode/dal-usage/src/budget.js +3 -0
  284. package/dist/node_modules/@dalcode/dal-usage/src/data.d.ts +30 -0
  285. package/dist/node_modules/@dalcode/dal-usage/src/data.js +1 -0
  286. package/dist/node_modules/@dalcode/dal-usage/src/index.d.ts +13 -0
  287. package/dist/node_modules/@dalcode/dal-usage/src/index.js +2 -0
  288. package/dist/node_modules/@dalcode/dal-usage/src/report.d.ts +29 -0
  289. package/dist/node_modules/@dalcode/dal-usage/src/report.js +3 -0
  290. package/dist/node_modules/@dalcode/dal-usage/src/time-limit.d.ts +4 -0
  291. package/dist/node_modules/@dalcode/dal-usage/src/time-limit.js +2 -0
  292. package/dist/node_modules/@dalcode/dal-web/package.json +6 -4
  293. package/dist/node_modules/@dalcode/dal-web/src/fetch.js +11 -5
  294. package/dist/node_modules/@dalcode/dal-web/src/index.js +2 -2
  295. package/dist/node_modules/@dalcode/dal-web/src/pdf.js +5 -0
  296. package/dist/node_modules/@dalcode/dal-workflow/LICENSE +24 -0
  297. package/dist/node_modules/@dalcode/dal-workflow/package.json +2 -2
  298. package/dist/node_modules/@dalcode/dal-workflow/src/announce-check.js +1 -0
  299. package/dist/node_modules/@dalcode/dal-workflow/src/check-in.js +1 -1
  300. package/dist/node_modules/@dalcode/dal-workflow/src/completion-check.js +2 -2
  301. package/dist/node_modules/@dalcode/dal-workflow/src/index.js +4 -4
  302. package/dist/node_modules/@dalcode/dal-workflow/src/lean-code.js +1 -0
  303. package/dist/node_modules/@dalcode/dal-workflow/src/ledger.js +3 -3
  304. package/dist/node_modules/@dalcode/dal-workflow/src/loop-guard.js +3 -0
  305. package/dist/node_modules/@dalcode/dal-workflow/src/shared.js +2 -2
  306. package/dist/node_modules/@dalcode/dal-workflow/src/todo.js +4 -2
  307. package/dist/node_modules/@dalcode/dal-workflow/src/verify-check.js +2 -0
  308. package/dist/node_modules/@dalcode/dal-workflow/src/working-contract.js +1 -0
  309. package/dist/node_modules/@dalcode/deepailab/package.json +3 -3
  310. package/dist/node_modules/@dalcode/deepailab/src/index.js +3 -3
  311. package/dist/node_modules/@earendil-works/chord/package.json +1 -1
  312. package/dist/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
  313. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  314. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
  315. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  316. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/radius.json +1 -1
  317. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
  318. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  319. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/retry.d.ts +1 -0
  320. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +1 -1
  321. package/dist/node_modules/@earendil-works/pi-ai/package.json +2 -2
  322. package/dist/node_modules/@earendil-works/pi-client/package.json +3 -3
  323. package/dist/node_modules/@earendil-works/pi-codemode/package.json +1 -1
  324. package/dist/node_modules/@earendil-works/pi-coding-agent/package.json +1 -1
  325. package/dist/node_modules/@earendil-works/pi-mcp/package.json +1 -1
  326. package/dist/node_modules/@earendil-works/pi-protocol/package.json +2 -2
  327. package/dist/node_modules/@earendil-works/pi-server/package.json +3 -3
  328. package/dist/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
  329. package/dist/node_modules/@earendil-works/pi-tui/package.json +1 -1
  330. package/dist/package-manager-cli.js +61 -61
  331. package/dist/sdk/office.d.ts +1 -1
  332. package/dist/sdk/office.js +1 -1
  333. package/dist/sdk/rewind.d.ts +1 -1
  334. package/dist/sdk/rewind.js +1 -1
  335. package/dist/sdk/usage.d.ts +8 -0
  336. package/dist/sdk/usage.js +1 -0
  337. package/dist/utils/open-browser.d.ts +1 -0
  338. package/dist/utils/tools-manager.js +1 -1
  339. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  340. package/examples/extensions/gondolin/package-lock.json +2 -2
  341. package/examples/extensions/gondolin/package.json +1 -1
  342. package/examples/extensions/sandbox/package-lock.json +2 -2
  343. package/examples/extensions/sandbox/package.json +1 -1
  344. package/examples/extensions/with-deps/package-lock.json +2 -2
  345. package/examples/extensions/with-deps/package.json +1 -1
  346. package/npm-shrinkwrap.json +57 -14
  347. package/package.json +9 -2
  348. package/dist/node_modules/@dalcode/dal-plugins/src/compat.js +0 -2
package/CHANGELOG.md CHANGED
@@ -8,10 +8,110 @@ DAL Code 的发布说明。这里只写用户看得见的变化。
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
- - 同时使用 DAL Code 和独立的 `dal` 命令行(哪怕版本不同、同时在运行)时,设置、登录信息、会话和 MCP 配置不会再互相覆盖或丢失改动;程序意外退出也不会留下写了一半的文件。遇到更新版本写入的数据时,旧版本只读取、不改动,并提示你升级。
12
- - 修复:上游服务的输出上限低于模型标称值时,被截断的回答不再被丢弃、导致 `dal -p` 什么都不输出却返回成功;现在会照常输出已有内容,提示被截断,并以非零状态退出。
13
- - `dal update` 不再在没有安装第三方扩展时提示“已跳过扩展”;装了第三方扩展时,会告诉你装了几个、有几个有新版本,以及单独更新它们的命令。
14
- - 任务描述与代码实际情况不符时(例如说某处翻译错了,但其实是对的),助手会拿出依据说明,而不是为了照办去改本来正确的内容。
11
+ ## [1.0.41] - 2026-10-18
12
+
13
+ - 长对话不再因为“上下文超长”先失败一次:快接近模型上限时(按模型的上下文窗口减去给回答预留的空间来算),会在发出请求之前就先压缩,包括你刚贴进一大段内容、或者接着一个很长的旧会话提问的时候。压缩时界面会显示“正在压缩”。压缩后紧接着的那次请求就带上待办清单和任务台账,助手不会忘了做到哪一步。
14
+ - 余额不足时立刻停下:账户余额或额度用完时,这一轮马上结束,正在运行的子助手也一起停止,不再自动重试、不会换别的模型偷偷继续,并提示“账户余额不足,请充值后重试”(中英文跟随界面语言);如果是某个模型自己的上游通道没钱了,会提示换一个模型。DAL Code 会据此显示充值入口。`dal -p` 里子助手因余额不足被停下时,也会以非零状态退出并说明原因。
15
+ - 断网不再白白丢掉这一轮:回答到一半网络断开、连接被重置或者长时间没有任何数据时,会自动重连,间隔逐次加长(可按 Esc 取消),界面显示“网络中断,n 秒后重连(第 n 次)”。已经执行过的工具不会因为重连再执行一遍,断掉的半截回答不计入用量。多次重连仍不成功时,会说明网络没有恢复、会话已保存;网络恢复后发一句“继续”(`dal -p` 用 `dal -c`)就能接着做。
16
+ - 按停止会立刻断开与服务端的连接,模型不会在后台接着生成。
17
+ - 新增运行时长上限:`dal -p --max-time 20m "任务"`(也可写 `90s`、`1h30m`),到时间后立即停止这次运行——包括正在跑的命令——并说明怎么继续,`dal -p` 以非零状态退出,适合脚本和 CI 防止任务一直跑下去。不加时和以前一样。
18
+
19
+ - 助手更不容易“偷换问题”:不会用压掉报错、跳过测试、只对某个输入特殊处理的办法让问题“看起来解决了”(除非你要求);改动函数、类型、消息格式或配置前会先找出其他调用处和副本一起改;没亲眼确认过的事会说明是推测。子助手在任务没做完时会接着做下去,不会停在“接下来我会…”;代码评审会检查改动影响到的调用方;“第二意见”在方案没问题时只说一句;过往经验和项目当前情况冲突时以项目为准。
20
+
21
+ - 项目说明文件(AGENTS.md、CLAUDE.md、`.claude/rules/`)里写的 `@docs/测试说明.md` 这类引用会像 Claude Code 一样把那份文件的内容带进来,最多嵌套 5 层;代码块里的 `@`、邮箱地址不受影响,项目外的文件和 `.env`、密钥这类敏感文件不会被读入。
22
+ - 子目录里的 AGENTS.md 或 CLAUDE.md(比如 monorepo 里每个包自己的说明)会在助手第一次读写该目录下的文件时自动交给它,每个文件只给一次。可在设置里用 `dalCompat.atImports: false`、`dalCompat.nestedInstructions: false` 分别关闭,`--no-context-files` 会一并跳过。
23
+
24
+ - 模型用别家工具的叫法调用工具(如 `read_file`、`Bash`、`run_terminal_cmd`)时,只要能确定对应的是哪个工具、参数也对得上,就直接按正确的工具执行并在结果里注明,不再白白报一次“找不到工具”;对不上的照常报错。
25
+ - 助手读取或修改一个不存在的路径时,报错里会直接列出项目里同名的文件(例如少写了一层目录),助手可以马上用正确路径重试,不用再到处搜索;不会自动替它改去别的文件。
26
+
27
+ - 助手用“// ... 其余代码不变 ...”这类占位注释代替真实代码去覆盖文件或做替换时会被拦下、什么都不写入,并被要求写出完整内容,避免被省略的代码被悄悄删掉;新建文件、展开语法 `...rest` 之类的正常代码不受影响。
28
+
29
+ - 新增 `/simplify`:只读检查你的改动里有没有能直接复用项目已有代码的地方、可以写得更简单的逻辑、重复或多余的工作,以及保护不了任何东西的测试和只是复述代码的注释,逐条给出位置和改法。默认只提建议、不改任何文件;想采纳就说“应用第 1、3 条”,或用 `/simplify --apply` 让助手接着把值得做的几条改掉并跑检查。任何建议都不能改变行为,也不会删减校验、错误处理和安全检查。可和 `/review` 一样指定 `--base`、`--commit`、`--pr`,`dal -p "/simplify"` 也可用。
30
+
31
+ - 新增三个随附技能,让较快的小模型也更稳:「小范围修复」修 bug 时先复现、只改一处、用实际跑过的检查证明修好,最多重试两次就停下说明;「先找证据再回答」查资料时按权威程度选来源、每条结论标出处,查不到就明说“证据不足”而不是编;「可校验的结构化输出」要固定格式(JSON、CSV、只能选一个选项)时先定格式、生成后实际校验。需要时自动加载,不用安装。
32
+
33
+ - 长任务不再被电脑休眠打断:一次任务运行超过半分钟时,DAL 会让电脑保持唤醒(屏幕照常可以熄灭),任务结束后立即恢复正常休眠;短问答不受影响,整个过程不弹通知、不在对话里插话。`/awake` 查看状态,`/awake off` 本次会话关闭;设置里写 `dalKeepAwake: false`(或环境变量 `DAL_KEEP_AWAKE=off`)可一直关闭。支持 macOS、Linux 和 Windows。
34
+ - 已经自己装了 rtk(一个压缩命令输出的开源工具)的用户,助手运行的命令会自动经 rtk 压缩输出,同样的上下文能装下更多内容;审批和危险命令拦截仍按助手原本写的命令判断。没装 rtk 时什么都不变,DAL 也不会替你安装。`/rtk` 查看是否在用,设置里写 `dalRtk: false` 或 `RTK_DISABLED=1` 关闭。
35
+ - 匿名使用统计和崩溃信息改为**先征得同意**:以前是提示一次后默认开启,现在默认关闭,在终端界面里第一次启动时问你(允许 / 不允许 / 以后再问),选“允许”或执行 `/telemetry on` 之后才会发送;`dal -p` 等无人回答的方式一律不发送。以前只看到过提示、从没选择过的,升级后同样视为未同意;以前用 `/telemetry off` 关掉的,仍然保持关闭。接收服务上线前不会询问,也不会收集。
36
+ - 新增失败症状上报,**默认关闭**,只有你同意后才会开启。任务没做好时(比如工具反复失败、修改对不上原文、同一个操作原样重复、测试没过却说完成、被你打断后纠正),DAL 只记录“出了哪一类问题”:问题类别、用到的工具名和次数、模型、DAL 版本、操作系统、轮数、耗时和花费。**不会**发送你的提示词、回答、代码、文件内容、文件路径、目录或仓库名、命令和输出、密钥;你自己接入的模型和 MCP 服务器只记为“自定义”。发送前后各有一道检查,多出任何内容整条都不发。第一次遇到失败时会问一次(允许 / 不允许 / 以后再问),没回答之前什么都不记录;接收服务上线前不会询问,也不会收集。`/telemetry failures` 查看状态,`/telemetry failures show` 原样列出待发送的内容,`/telemetry failures off` 关闭并立即删除待发送内容(`/telemetry off` 会连同它一起关闭);也可以设环境变量 `DAL_FAILURE_REPORTS=0`,`DO_NOT_TRACK=1` 和 CI 环境里一律不上报。没联网时先存在本机稍后再发,发不出去不影响使用,退出时最多等 1 秒。
37
+ - 可以为一次失败附上复现材料:`/telemetry attach` 会先给你看要发送的内容(这次任务的请求、工具调用和截断后的输出,密钥已遮盖、敏感文件不含内容、路径只留文件名),每次单独询问,不会记住“总是允许”。
38
+ - 新增 `/evolve`:查看经过评测和人工审核的改进补丁,用 `/evolve on <编号>` / `/evolve off <编号>` 单独开关;设 `DAL_EVOLVE_PATCHES=off` 可全部停用。目前没有内置补丁,行为与之前相同。
39
+
40
+ ## [1.0.40] - 2026-10-17
41
+
42
+ - 自动选模型改为先征得同意:它会把每轮提问的部分内容(最多前 8000 字)发给第三方路由服务来挑选模型、调整工具和思考深度。第一次在终端里需要用到时会先问你,选“不用”就一直用你选的模型,什么都不发送;以后可用 `/factory auto on` / `/factory auto off` 随时开关,关掉后子助手选模型、插件排序、命令复核这些也都不再向第三方发送内容。还没回答过时,`dal -p` 和其他非交互方式一律不发送。
43
+ - 生成的 PPT 更有设计感:新增咨询报告、发布会深色大字、极简商务、教育培训、政企汇报五套风格,不选也会按主题自动挑合适的一套(旧的 business、tech 等名字仍可用)。整份 PPT 用同一套配色和字体,中英文混排在 PowerPoint、WPS、Keynote 上都能正常显示;每页按内容自动排版——大数字、可编辑的原生图表、方案对比、时间线、表格、目录、章节页、引用和结束页,标题过长会自动缩字号不再溢出,数据来源显示在页脚。
44
+ - 生成的 Word 文档按正式报告排版:A4、结论先行的摘要框、带页码的目录、自动编号的标题层级(Word 导航窗格可用)、页眉页脚“第 X 页 / 共 Y 页”、报表式表格(数字右对齐),正文两端对齐、首行缩进两字。政府和国企类文档可用公文格式(按 GB/T 9704:仿宋三号正文,一、(一)1. 标题层级,奇偶页页码)。
45
+ - 生成的 Excel 表格开箱即是成品:表头着色、斑马纹、冻结表头和筛选,数字、百分比、金额、日期按列自动识别成真正的数值格式,主金额列带数据条,增长列正数标绿、负数标红,可加“合计”行(公式求和),有连续月份或季度列时自动加趋势迷你图。
46
+ - 新增可选的“精简改动”:用 `dal --lean-code` 或在设置里写 `leanCode: true`,助手会优先复用项目里已有的代码,不加任务用不到的抽象、选项、配置和依赖,只写任务需要的代码;输入校验、错误处理、安全和无障碍不会因此省掉。默认不开启。
47
+ - 新增费用上限:`dal -p --max-cost 2 "任务"`、设置里的 `maxCost`,或在会话里用 `/budget 2`,给这一次运行设一个美元上限。花到八成时提醒一次;到上限后不再发出新的模型请求,并用中文说明花了多少、怎么继续(`/budget <更高金额>` 提高上限,`/budget off` 取消,`dal -p` 调大 `--max-cost` 重新运行),`dal -p` 以非零状态退出。子助手、第二意见、经验提炼的花费都算在内;派出的子助手也受剩余额度限制,后台子助手的花费在它结束时才计入,可能略超上限。`/budget` 查看当前花费和剩余额度。
48
+ - 便宜模型更少因“参数格式不对”白跑一轮:模型发来的工具参数有多余逗号、用了单引号、被包在代码块或字符串里、少了结尾的括号,或者把参数名写成别家工具的叫法(如 `file_path`),会先自动修正再调用,并在这次工具结果里注明改了什么;只修只有一种理解的错误,内容被截断在半句话里这类情况不会去猜,照常报错。`/usage` 会显示修正了多少次。可在设置里用 `toolArgRepair: false` 关闭。
49
+ - 改文件更不容易改错地方:助手读过一个文件后,如果它被格式化工具、脚本或别的程序改动过,助手再按旧内容去改那一处时会被拦下,什么都不写入,并直接看到那里现在的内容,按新内容重做;文件别处的改动不影响这次修改,只会提醒一句。
50
+ - 修改匹配不上时不再只报“找不到”:会给出文件里最接近的几处(带行号),或者列出重复出现的位置,助手不用整份重读就能改对;要替换的原文里误带了读取提示、或整体缩进差了一层这类小错会自动纠正并说明。
51
+ - 助手只读了长文件的一部分就想整份覆盖写入时会被拦下,避免把没看到的内容删掉。
52
+ - 助手连续几轮用完全相同的参数调用同一个工具、结果也一模一样时,会被提醒换个做法或直接回答,不再原地打转白白消耗时间和用量;轮询构建进度这类每次结果不同的调用不受影响。
53
+ - 助手说完“我来运行测试”之类的话却没有动手就停下时,会自动接着把这一步做完,不用你再输入“继续”;它最后是在问你问题或给你选项时不受影响。
54
+ - 助手改了代码却一次都没运行就要收尾时,会被要求先用最小的办法验证(相关测试、构建或一条能走到改动的命令),确实没法验证就说明原因和你该怎么验证;只改文档、或者你说了“不用跑测试”时不会这样。
55
+ - 新增 `dal -p --output-schema <文件.json>`:最终回答按你给的 JSON Schema 输出,标准输出里只有这段 JSON,适合脚本和 CI 直接解析;回答不符合时会让助手改正,仍不符合就不输出内容、在标准错误里说明哪一项不符合,并以退出码 3 结束(Schema 文件本身不能用时退出码为 2,不会调用模型)。
56
+ - 从 Claude Code 迁来的规则直接生效:用户目录和项目里的 `.claude/rules/` 与 `.claude/CLAUDE.md` 会和 AGENTS.md 一样交给助手;带 `paths:` 的规则在助手第一次读写匹配的文件时才加入。只读这些 Markdown 文件,不会读 `.claude` 下的设置或凭据。可在设置里用 `dalCompat.claudeRules: false` 关闭,`--no-context-files` 也会一并跳过。
57
+ - 新增 `/statusline`:在底部状态栏加一行自己的内容。可以写模板(如 `/statusline {model} · {cost} · {branch}`),也可以指定一个命令,它会从标准输入收到模型、目录、分支、用量、费用等信息,输出的第一行会显示出来;`/statusline off` 恢复默认。不设置时和以前一样。
58
+ - 新增“第二意见”:遇到有风险的改动、反复失败或复杂任务收尾时,助手可以请另一个更强的模型复核当前方案,并说明对方指出的风险。费用计入当前会话,每个会话最多 3 次(可在设置里用 `dalAdvisor` 调整次数或指定模型,设为 0 关闭)。
59
+ - 后台子助手可以在单独的 tmux 窗口里运行:用 `/agents tmux on` 开启(`/agents tmux off` 关闭,默认关闭),切过去就能看到它在做什么,也可以直接回答它的审批或接着打字接管,结果照常送回主对话;它在窗口里等你确认时,主窗口会提示“子助手 xxx 在 tmux 窗口 N 等你确认”。不在 tmux 里时窗口放进后台会话 `dal-subagents`。
60
+ - 新增 `/agents steer <ID> <指示>`:随时给正在运行的后台子助手补充或调整指示。
61
+ - 按任务自动启用能力时,如果它第一次使用前要下载较大的浏览器、运行时或模型,会先说明并征得你同意。
62
+ - 图表换了一套更耐看的默认样式:标题左对齐并可带一句结论作副标题,柱子上直接标数值,饼图改为按大小排序、中间显示合计的环形图,漏斗图标出每一步的转化率,类目名较长时自动改成横向条形图。生成的网页会跟随系统的深色/浅色模式切换,也可以直接要深色配色。修复图表在网页和文档里中文字体没有生效的问题。
63
+ - 生成的 draw.io 流程图、架构图统一成同一套专业样式:同一种强调色、中性底色的节点、直角圆角连线和系统中文字体,以前常见的默认蓝黄绿色块会自动换掉。
64
+ - 新增随附技能「网页和界面」:做网页、落地页、数据看板或管理后台时,按成熟产品的结构排版,使用统一的配色、字号和间距,支持深色模式和手机屏幕,避开渐变、玻璃拟态、满屏卡片这些一眼就像 AI 做的样式;交付前会截桌面、手机和深色三张图自查。
65
+ - 新增随附技能「图表样式」:流程图、架构图、时序图用统一配色,思维导图改用更清爽的分支导图,都能直接导出成图片。
66
+ - 新增随附技能「海报与社交卡片」:小红书封面和内页、公众号封面、活动海报、数据卡片都有现成版式,按你的内容排好后导出 PNG,文字放不下时会提示是哪一块。
67
+ - 新增随附技能「PDF 报告、简历、信函」:分析报告、一页简历、邀请函等直接导出排版规范的 PDF,自动加页码,简历超出一页会提示;也能做在各家邮箱里显示正常的 HTML 邮件。
68
+ - 以上导出图片和 PDF 都用你电脑上已有的 Chrome 或 Edge,在独立的临时配置里运行,不会碰你浏览器的登录状态;没有浏览器时会先问你再从国内镜像下载。
69
+
70
+ - 不用再自己找、自己装工具:任务需要时,助手会自动启用经 DAL 审核的连接器、技能和扩展,并在开头提示一行“已为这个任务启用:…”。比如说“打开这个网页看看报错”,会自动装好并启用 Chrome 开发者工具;只写代码的普通任务什么都不启用,也不会多一次模型调用。只会安装 DAL 审核并签名的固定版本,安装包与登记的校验值不一致就拒绝;国内网络会优先用国内镜像,镜像没有时再用官方源。
71
+ - 会改文件、用你的凭据、操作外部账号、删除数据或执行 `git clean` 的能力,启用前会问你一次;需要令牌或数据库连接串的,会用中文说明问你一次并妥善保存,下次不再问。`dal -p` 这类没有界面的运行不会询问,只说明跳过了什么。
72
+ - 新增 `/capabilities`:查看已启用和可用的能力,`/capabilities disable <名称>` 停用后不再自动启用,`/capabilities enable <名称>` 重新启用,`/capabilities auto off` 关闭自动安装。CI 环境中默认不自动安装。
73
+ - 新增随附技能「浏览器验收」:改了网页或界面后,助手先用命令能验证的就不开浏览器;需要看渲染结果时用浏览器打开页面、截图并检查控制台报错,把截图路径和控制台结果写进回答,拿不到这些证据就明说“未能在浏览器中验证”。它不会复用你本机浏览器的登录状态;本机没有可用的浏览器时,会先问你再从国内镜像下载约 180MB 的测试版 Chrome,并核对校验值。
74
+ - 审核过的能力里没有合适的工具时,助手会提议为这个任务写一个扩展,等你同意再动手,不会去网上装未经审核的包。
75
+ - 助手会从自己的工作中学经验:命令失败后换了做法才成功、你纠正了它、或者反复绕路时,会记下一条经验和依据。同一条经验在两个会话里都出现,或者修正后的测试、构建确实通过了,就自动启用,从下一个会话起交给助手;涉及删除、权限、凭据、联网或发布的经验,一定要你用 `/lessons approve` 确认后才启用。`/lessons` 查看全部,`/lessons undo` 随时撤销。
76
+ - 经验分两类:只对当前项目有效的,和对你所有项目都有效的个人习惯(比如惯用的包管理器、提交信息的语言)。同一仓库的不同克隆和工作区共用同一份项目经验。
77
+ - 助手会记住项目里验证过的事实:各个包能通过的测试和构建命令、用的包管理器、常被查找的代码在哪个文件、踩过的坑。新会话开头直接交给助手,少走一轮搜索;项目文件变了、命令失败了或长期没再用上,就不再提供,等下次成功后更新。
78
+ - 经验会跟踪效果:帮倒忙多于帮忙、或长期没用上的经验会自动退役。`/lessons stats` 查看启用、退役、帮上忙的次数和今天的提炼用量;`/lessons map` 查看项目地图。
79
+ - 同一套多步操作在 3 个会话里重复出现时,助手先看有没有相关的技能:有就只提一处最小的补充(比如它漏掉的步骤、失败过的命令和改用的命令),附上来自哪几次会话、出过什么错;补充会让技能过长时,改为拆成一个新技能。没有相关技能才起草新技能。`/lessons skills` 里能看到改动对比和依据,`/lessons skill accept` 采用后才生效,`/lessons skill discard` 丢弃。
80
+ - 技能分项目和个人两种:用到本项目的目录、脚本或路径的,作为项目技能只在这个项目里生效;只用通用命令的,作为个人技能在所有项目里可用。提议里会说明为什么这样判断,采用时可以用 `--scope project|user` 改。项目技能存在 DAL 自己的目录里,不会写进你的项目仓库;想提交给团队用时,用 `/lessons skill export <名字>` 导出到项目里。
81
+ - 随附技能、云端技能、插件和项目里自带的技能不会被改动:补充作为本机补充保存,加载技能时附在原文对应的位置。原技能更新后补充会自动重新附上;补充针对的那一段在新版里变了时,这条补充先不生效并提示你,用 `/lessons skill keep` 让它跟随新版,或 `/lessons undo` 不要它。
82
+ - 采用的技能改动会跟踪效果:之后用到这个技能的会话里,被你纠正或检查失败的次数比改动前多时,会自动退回上一版并告诉你。每个技能保留全部历史版本,`/lessons undo <技能提议编号>` 随时撤回。涉及删除、权限、凭据、联网或发布的技能改动,采用时还要你再确认一次。
83
+ - 只对当前任务有用的信息(例如这次要改的是哪一份文件、一个临时步骤)不再记成长期经验,而是留在这次对话里:上下文压缩后的任务台账会列出它,之后提到“上次那个任务”时也能从历史记录里搜到。同样的信息在别的任务里再次出现,才会按经验的规则记下来。
84
+ - 在 DAL Code 里点过“保留”的经验,会在命令行第一次进入该项目时自动导入,DAL Code 原有的经验数据保持不变。提炼经验时发给模型的内容会先去掉密钥、密码和你的用户目录,凭据文件的内容不会发出;每天有调用上限,可在设置里用 `dalLearn` 关闭。
85
+ - 经 DAL 审核的扩展会随 `dal update` 一起更新,而且只更新到审核过的版本;审核目录的签名不对、已过期或被改动过时,保留已安装的版本并说明原因。你自己安装的扩展仍然只在你明确要求时更新。
86
+ - 在命令行里使用时,检查点(`/rewind`)不再写进你项目的 git 仓库:不会再出现在 `git log --all`、分支列表或推送里,改存在 DAL 自己的目录;以前留在仓库里的检查点会自动移出并从仓库删除,仍可照常回退。
87
+ - 修复:账号下发的 MCP 服务器(例如 deepwiki)连不上时,`dal -p` 不再在结束时崩溃退出。
88
+ - 修复:`dal -p --yolo "任务"` 这类写法(开关选项后面紧跟任务)会把任务当成选项的值吞掉,结果什么都不输出、也不报错;现在任务照常执行。`dal -p` 没有拿到任何任务时会报错并以非零状态退出。
89
+ - 在新机器上第一次用 `dal -p`(或桌面端、子助手)时,助手的命令找不到 `rg`/`fd` 会自动补装并提示重跑;装不上时会改用普通的搜索方式,而不是卡在“命令不存在”。
90
+ - 从插件市场安装时,如果国内镜像上的版本落后于官方源(或镜像还没有这个包),会自动改从官方源安装,不再装上过时的旧版本。
91
+ - 报告的问题复现不了时,助手会先复现、拿出实际结果说明,并停下来不改业务代码;加载的技能(例如写测试、排障)不会再让它去“修”本来正确的代码。
92
+ - 助手用你最近一条消息的语言回答:界面是中文、但你用英文提问时,回答和它读到的工具反馈(例如待办清单)都会是英文,反过来也一样。
93
+ - 助手少花轮次记账:待办清单一次写完整份、和实际操作放在同一轮更新,短任务和 `dal -p` 这类无人值守的运行基本不再列清单;自动判断出要用的技能会随你的消息直接带上,不再单独花一轮去加载。
94
+ - 小项目(不到 50 个文件的 git 仓库)里助手不再派子助手,除非你明确要求;验证控制在几分钟内,后台等待一个进程太久时会提示它停下来汇报。
95
+ - 代码导航更准:DAL 自带 TypeScript/JavaScript 语言服务器,不用另装;在代码项目里 lsp 工具默认可用,可以只给符号名查定义、引用、实现和调用方,路径给成目录或不存在也能用;项目还没加载完时会先等它(最多 60 秒),超时会说明结果可能不完整,不再悄悄只返回一部分引用。
96
+ - 社区插件开箱即用:用 `dal install` 或 `/plugins install` 装的插件,原本固定写在主目录别处的配置和缓存会自动改存到 DAL 自己的目录,插件更新后也会自动重新处理;插件自带的重复依赖不再引发启动警告。少数无法自动处理的插件,会在安装时和 `dal list` 里标出“需要适配”。
97
+ - 助手可以搜索你在本机的过往会话:你提到“上次定的约定”“之前那个决定”时,它会在当前项目的历史会话里查找并引用原话,也可以搜全部项目。搜索完全在本机进行,聊天里出现过的密钥、令牌不会被收进搜索范围;第一次用到时才建立索引,不拖慢启动。
98
+ - 新增 `/usage`:查看所有会话的 token 用量和费用,按天、按模型、按项目分别列出,可选今天、最近 7 天、最近 30 天或全部(`/usage today|7d|30d|all`);子助手的花费只按派发它的会话计一次,不会重复计算。
99
+ - 目标模式(/goal)宣布完成前,会另起一个只能查看、不能改动文件的助手,对照目标独立检查项目里的实际文件:发现缺口时目标继续,并把具体缺口交给助手去补;检查本身没能完成时目标会暂停,由你选 `/goal resume` 重新检查或 `/goal accept` 直接标记完成。连续 3 次检查不通过会暂停,不会无限重试;检查的花费计入本次会话和目标的 token 预算。不需要时可在设置里把 `dalGoal.verify` 设为 false。
100
+ - 让助手“帮我写一个扩展”现在可以直接用:它会先看随包附带的十几个可运行示例再动手,写好的扩展放进你的个人扩展目录(所有项目可用)或当前项目的 `.dal/extensions`,`/reload` 后就能使用。
101
+ - 新增 `/btw <问题>`:助手干活时随手问一句(比如“刚才说的重试上限在哪个文件”),它根据当前对话马上回答,不打断正在进行的任务,问答也不会进入主对话、不占后续上下文。`/btw` 查看问过的内容,`/btw fold` 把这些问答带回主对话,`/btw clear` 清空;花费计入本次会话。
102
+ - 子助手可以在后台运行:助手把耗时的子任务放到后台后继续干别的,子助手做完会自动把报告送回来,不需要等待或反复查询;运行中可以随时给它补充或改变指示。同时最多 4 个后台子助手,多出的排队;每次你发消息后最多新派 8 个子助手。子助手的每一步操作都和主助手一样经过安全审批;它连续碰壁时会停下来,把卡住的原因先告诉主助手。`/agents` 查看正在运行的后台子助手,`/agents stop <ID>` 停止一个;后台子助手的花费计入本次会话。
103
+ - 需要改文件的子助手可以在独立的 git 工作区里干活:几个子助手并行修改也不会互相覆盖,也不动你当前的工作区;做完后改动提交到一个 `dal-sub-…` 分支,由你审阅后合并,没有改动就什么都不留下。
104
+ - MCP 服务器运行中新增或去掉了工具,助手下一次请求就能看到最新的工具列表,不用重新连接;远程 MCP 服务器随时主动通知的变化也能收到,不必等到下一次调用它。本机的 MCP 服务器进程意外退出后会自动重连(约 1、3、5、10、30 秒后各试一次),不必再手动 `/mcp reconnect`;远程服务器丢掉会话后也会自动重新建立。
105
+ - 需要登录的远程 MCP 服务器(例如 Notion、GitHub 的托管服务)现在可以用了:连接时提示需要登录,运行 `/mcp login <服务器>` 在浏览器里完成授权即可连上;登录信息保存在本机 DAL 目录里,过期会自动续期,`/mcp logout <服务器>` 退出登录。连接本身从不自动弹出浏览器。
106
+ - 修复:`dal` 退出、被 Ctrl+C 或 `kill` 终止后,经 `npx`、`uvx` 等方式启动的本机 MCP 服务器(例如 postgres-mcp)及其衍生进程不再残留在后台;不响应正常结束信号的服务器,约 2 秒后会被强制结束。
107
+ - 修复:助手用 `~/` 开头的路径写文件时,会被正确识别为项目之外的改动并先征求你的同意;`dal -p` 下未开全自动时照常拒绝。
108
+ - 读取网页(web_fetch)现在能读 PDF 链接:给出论文、报告等 PDF 的地址,助手会提取其中的文字按页阅读(最多 100 页、20 MB,长文可以接着往后读);扫描件、带密码或损坏的 PDF 会说明读不了的原因。
109
+ - 助手改完代码会马上知道有没有改坏:编辑或写入 TypeScript/JavaScript 等文件后,这次改动新引入的错误会直接附在结果后面(只列新出现的,文件里原有的不重复报,每个文件最多列 10 条)。语言服务器还没启动时会自动启动;几秒内没查完的,会在下一步操作的结果里补上,文件已经又改过就不再报旧结果。不需要时可在语言服务器设置里把 `editDiagnostics` 设为 false。
110
+ - 新增调试器:程序行为不对时,助手可以直接在调试器里运行 Python 或 Node.js 程序,设断点、单步、查看调用栈和变量的真实值,在断点处计算表达式,不用再到处加打印语句反复重跑。每次停下都会一次给出位置、调用栈和局部变量。第一次调试某种语言时会自动安装对应的调试组件(固定版本,下载后校验,Python 的优先走国内镜像),装不上会用中文说明原因。平时不占用每次请求的上下文,任务需要时才启用。
111
+ - 修复:切到上下文窗口更小的模型后,即使回复已经超出这个窗口,有时也不会自动压缩上下文;现在每次都会压缩。
112
+
113
+ ## [1.0.39] - 2026-10-17
114
+
15
115
  - 登录凭据保护更严:凭据文件的副本,无论改名还是放在别的目录,助手都读不到、搜不到、也复制不走;被拦下后助手会停下来告诉你原因,不再换路子去拿。
16
116
  - 修复:助手写的报告里只要提到凭据文件的位置就会被拦下;名字以 `.dal` 开头的其他目录(例如 `~/.dal_scratch`)也不再被误当成 DAL 的配置目录。
17
117
  - 助手提交代码时,共同作者一栏署名 DAL Code,不会再照抄别的助手的署名;转交给子助手的任务说明会先按当前情况改写,去掉不适用或违反保护规则的步骤。
@@ -22,6 +122,13 @@ DAL Code 的发布说明。这里只写用户看得见的变化。
22
122
  - 长对话整理(压缩)后,助手会拿到整理时的待办清单、各仓库的分支和未提交状态以及改过的文件,不必再反复查 git 状态找回进度。
23
123
  - 新增环境变量 `DAL_SKIP_VERSION_CHECK=1` 关闭启动时的更新检查(原来的 `PI_SKIP_VERSION_CHECK` 仍然有效)。
24
124
 
125
+ ## [1.0.38] - 2026-10-17
126
+
127
+ - 同时使用 DAL Code 和独立的 `dal` 命令行(哪怕版本不同、同时在运行)时,设置、登录信息、会话和 MCP 配置不会再互相覆盖或丢失改动;程序意外退出也不会留下写了一半的文件。遇到更新版本写入的数据时,旧版本只读取、不改动,并提示你升级。
128
+ - 修复:上游服务的输出上限低于模型标称值时,被截断的回答不再被丢弃、导致 `dal -p` 什么都不输出却返回成功;现在会照常输出已有内容,提示被截断,并以非零状态退出。
129
+ - `dal update` 不再在没有安装第三方扩展时提示“已跳过扩展”;装了第三方扩展时,会告诉你装了几个、有几个有新版本,以及单独更新它们的命令。
130
+ - 任务描述与代码实际情况不符时(例如说某处翻译错了,但其实是对的),助手会拿出依据说明,而不是为了照办去改本来正确的内容。
131
+
25
132
  ## [1.0.37] - 2026-10-16
26
133
 
27
134
  - 修复:模型输出的工具参数不完整或格式错误时,不再按残缺的参数执行(例如写出半截文件),而是让模型重新给出完整参数。
package/NOTICE CHANGED
@@ -40,6 +40,17 @@ The goal mode extension (@dalcode/dal-goal) is adapted from
40
40
  Licensed under the MIT License, whose terms are the same as those in the
41
41
  LICENSE file distributed with this package.
42
42
 
43
+ The learning extension (@dalcode/dal-learn) adapts ideas, not code, from:
44
+
45
+ PenguinHarness continual-learning hook (https://github.com/Prism-Shadow/penguin-harness),
46
+ Licensed under the Apache License, Version 2.0: the per-line clipping of the
47
+ run excerpt given to the lesson-drafting model (modified: one run instead of a
48
+ task, smaller limits, credentials masked first).
49
+ pi-memory 0.4.2, Copyright (c) 2026 Jay Zeng, MIT License: rendering memory
50
+ once per session as a frozen snapshot so the prompt prefix stays cacheable.
51
+ openwiki 0.7.2, MIT License: tying a remembered fact to a content hash of the
52
+ file it rests on, and telling a missing file apart from a changed one.
53
+
43
54
  The command sandbox uses @anthropic-ai/sandbox-runtime, unmodified:
44
55
 
45
56
  Anthropic Sandbox Runtime (https://github.com/anthropic-experimental/sandbox-runtime)
@@ -47,6 +58,293 @@ The command sandbox uses @anthropic-ai/sandbox-runtime, unmodified:
47
58
  Licensed under the Apache License, Version 2.0; its LICENSE file ships in
48
59
  its package directory.
49
60
 
61
+ The lsp tool (@dalcode/dal-lsp) ships a TypeScript language server, used
62
+ when the project has none of its own, unmodified:
63
+
64
+ typescript-language-server (https://github.com/typescript-language-server/typescript-language-server)
65
+ Copyright TypeFox and others
66
+ Licensed under the Apache License, Version 2.0; its LICENSE file ships in
67
+ its package directory.
68
+
69
+ TypeScript (https://github.com/microsoft/TypeScript), used for its tsserver
70
+ when the project does not bring its own
71
+ Copyright (c) Microsoft Corporation
72
+ Licensed under the Apache License, Version 2.0; its LICENSE.txt and
73
+ ThirdPartyNoticeText.txt ship in its package directory.
74
+
75
+ The session search tool (@dalcode/dal-recall) is adapted from:
76
+
77
+ @henryqw/pi-session-recall 5.1.4 (https://github.com/HenryQW/pi-harness)
78
+ Copyright (c) 2026 Henry Wang
79
+ Licensed under the MIT License; its LICENSE file ships in the package
80
+ directory. Modified: secrets are masked before indexing and tool results
81
+ are never indexed, the index carries a schema version for engines sharing
82
+ one data directory, results are scoped to the project and kept small,
83
+ node:sqlite is loaded on first use, the pattern-miner preparation is left out.
84
+
85
+ The /usage command (@dalcode/dal-usage) adapts code from:
86
+
87
+ pi-usage-extension 0.9.5 (https://github.com/tmustier/pi-usage-extension)
88
+ Copyright (c) 2026 Thomas Mustier
89
+ Licensed under the MIT License; its LICENSE file ships in the package
90
+ directory. Modified: paths follow the DAL agent directory, sub-agent spend is
91
+ counted from the dispatching session only, the interactive dashboard,
92
+ graphs, insights and export are left out, and the per-file cache follows
93
+ DAL's shared-data rules.
94
+
95
+ The goal extension (@dalcode/dal-goal) also adapts, from pi-goal-x 0.32.3,
96
+ Copyright (c) 2026 Lucas, MIT License: an independent completion auditor with
97
+ fresh context and read-only tools that checks the agent's claim before a goal
98
+ is marked complete, treating the claim as untrusted and keeping the goal open
99
+ with the reasons when it is not met. Modified: the auditor runs as a separate
100
+ DAL process (approval gate and tool allowlist apply), has no shell, reports
101
+ through a schema-checked verdict tool, returns at most five short gaps, and
102
+ never counts a failed or timed-out check as approval; the prompts are new.
103
+
104
+ The extension examples in packages/coding-agent/dal-docs/examples/extensions/
105
+ are adapted from the example extensions of pi-mono
106
+ (https://github.com/badlogic/pi-mono), Copyright (c) 2025 Mario Zechner,
107
+ MIT License. Modified: renamed, rewritten headers and comments, DAL paths;
108
+ the LICENSE file ships in that folder.
109
+
110
+ Background sub-agents (@dalcode/dal-subagent: src/inproc-runner.ts,
111
+ src/background.ts, src/pool.ts, src/worktree.ts) adapt code from:
112
+
113
+ @tintinweb/pi-subagents 0.22.0 (https://github.com/tintinweb/pi-subagents)
114
+ Copyright (c) 2026 tintinweb
115
+ Licensed under the MIT License; its LICENSE file ships in the package
116
+ directory. Modified: the in-process sub-agent runs every tool through the
117
+ parent's own tool pipeline (approvals, sandbox, guard), stops early after
118
+ repeated tool failures and tells the parent, reports are capped in size and
119
+ their spend is recorded in the parent session once, DAL's run and
120
+ concurrency limits apply, worktree branches use DAL names; none of the
121
+ package's prompts are used.
122
+
123
+ The advisor tool (@dalcode/dal-advisor) adapts the design of:
124
+
125
+ @juicesharp/rpiv-advisor 2.13.8 (npm), Copyright (c) 2026 juicesharp
126
+ Licensed under the MIT License; its LICENSE file ships in the package
127
+ directory. Adapted: a zero-parameter tool the working model calls, the
128
+ conversation forwarded automatically, one tool-less model call with one
129
+ retry on an empty answer, the tool inventory shown to the reviewer.
130
+ Rewritten for DAL: the reviewer model is picked by DAL's router (a strong
131
+ model other than the current one), calls are capped per session, the
132
+ spend is recorded on the tool result, and none of the package's prompts
133
+ are used.
134
+
135
+ The missing-path hint of @dalcode/dal-tool-catalog (src/path-hint.ts) follows
136
+ the idea of oh-my-pi's read tool (https://github.com/can1357/oh-my-pi, at the commit named for
137
+ the debugger below, MIT License), which resolves a missing path to a unique suffix match;
138
+ no code was copied, and DAL only suggests the matching files.
139
+
140
+ Tool-argument repair (@dalcode/dal-tool-catalog: src/repair.ts) follows the
141
+ ideas of tool-input-repair in pi-model-tools
142
+ (https://github.com/bacnh85/pi-extensions), by bacnh85: closing JSON cut off
143
+ after a complete value, unwrapping JSON sent as a string, and mapping other
144
+ agents' parameter names to the tool's own. No code was copied (that package
145
+ ships no license file); the implementation, rules and limits are DAL's own.
146
+
147
+ The spend cap (@dalcode/dal-usage: src/budget.ts) follows the idea of pi-budget
148
+ in the same repository (https://github.com/bacnh85/pi-extensions), by bacnh85:
149
+ a --budget flag that stops the agent once the session's cost reaches it, and
150
+ rejecting amounts that are not plain decimals. No code was copied (no license
151
+ file); DAL counts the session's own recorded spend (sub-agents, advisor,
152
+ lesson drafting included) and stops before the next request instead.
153
+
154
+ The /simplify command (@dalcode/dal-review: src/simplify.ts) adapts:
155
+
156
+ compound-engineering-plugin, skills/ce-simplify-code
157
+ (https://github.com/EveryInc/compound-engineering-plugin), at commit
158
+ 2e41b4490a37f53db0beb6d4904618da9af2f559
159
+ Copyright (c) 2025 Every
160
+ Licensed under the MIT License, whose terms are the same as those in the
161
+ LICENSE file distributed with this package. Adapted: the code-reuse,
162
+ code-quality, efficiency, test-value and comment reviewer checklists, the
163
+ behaviour-preserving and "never simplify away a safety check" rules, and
164
+ reporting before editing. Modified: one read-only reviewer reporting through
165
+ DAL's review tool instead of five dispatched agents, report-only by default,
166
+ no host-specific dispatch or model selection.
167
+
168
+ The lean-code rule (@dalcode/dal-workflow: src/lean-code.ts) adapts:
169
+
170
+ Ponytail (https://github.com/DietrichGebert/ponytail), at commit
171
+ 16352ac229eb08a9598dcae48fe9f2b342567d86
172
+ Copyright (c) 2026 DietrichGebert
173
+ Licensed under the MIT License; its LICENSE file ships in the package
174
+ directory. Adapted: the "smallest complete change"
175
+ ladder (reuse what the codebase has; no abstraction, option, config or
176
+ dependency nobody asked for; finish every place the change reaches) and the
177
+ "never cut" list (validation, error handling, security, accessibility),
178
+ condensed into one system-prompt rule. Ponytail's levels, commands and
179
+ wording are not used.
180
+
181
+ The @-import expansion of instruction files (@dalcode/dal-compat:
182
+ src/at-imports.ts) is ported from oh-my-pi,
183
+ packages/coding-agent/src/discovery/at-imports.ts (same repository, commit,
184
+ copyright holders and MIT License as the debugger below). Modified:
185
+ synchronous, imports confined to the project (or home for user-level files),
186
+ credential-like files never read, per-file and total size caps.
187
+
188
+ Prompt wording adapted from oh-my-pi's prompts (same repository, commit and MIT
189
+ License as the debugger below), condensed and reworded: the working contract
190
+ of @dalcode/dal-workflow (src/working-contract.ts: never substitute an easier
191
+ problem or suppress a symptom; find other call sites and copies; mark what was
192
+ not observed), the sub-agent rule to continue rather than end on a plan or a
193
+ promise (@dalcode/dal-subagent), the reviewer's check of a changed contract's
194
+ consumers (@dalcode/dal-review), the advisor's "silence when sound" and
195
+ completion-after-sampling rules (@dalcode/dal-advisor), and memory yielding to
196
+ the repository (@dalcode/dal-learn). The --max-time run limit of
197
+ @dalcode/dal-usage (src/time-limit.ts) follows the idea of oh-my-pi's flag of
198
+ the same name; no code was copied.
199
+
200
+ The MCP reconnect schedule (@dalcode/dal-mcp, src/index.ts) follows:
201
+
202
+ pi-mcp-extension 1.5.1 (npm), Copyright (c) 2026 irahardianto
203
+ Licensed under the MIT License. Adapted: the 1/3/5/10/30-second retry
204
+ schedule after a server drops, and refreshing a server's tools on
205
+ notifications/tools/list_changed; written against dal-mcp's own clients.
206
+
207
+ The /btw command (@dalcode/dal-interactive, src/btw.ts) is adapted from:
208
+
209
+ mitsupi 1.6.0, extensions/btw.ts (https://github.com/mitsuhiko/agent-stuff)
210
+ by Armin Ronacher
211
+ Licensed under the Apache License, Version 2.0; the license text ships in
212
+ that package's LICENSE file. Modified: one model call with no tools instead
213
+ of a side agent session, the answer shown as a notification, the fold-back
214
+ handed over verbatim and size-capped, its spend recorded in the session.
215
+
216
+ The debugger (@dalcode/dal-dap: src/client.ts, src/session.ts, src/types.ts)
217
+ adapts the Debug Adapter Protocol client of oh-my-pi:
218
+
219
+ oh-my-pi, packages/coding-agent/src/dap/ (https://github.com/can1357/oh-my-pi),
220
+ at commit eb74cf84d8e16ac9b8c4fa5d7c43037023d016ac
221
+ Copyright (c) 2025 Mario Zechner
222
+ Copyright (c) 2025-2026 Can Bölük
223
+ Copyright (c) 2026 Stencil Labs, Inc.
224
+ Licensed under the MIT License; its LICENSE file ships in the package
225
+ directory. Only that directory was used. Modified: Node child processes and
226
+ sockets instead of Bun's, stdio and TCP adapters only, launch only,
227
+ breakpoints bound before the program runs, the adapter table, tool, prompts
228
+ and installer are new.
229
+
230
+ The debug adapters it installs on first use are downloaded unmodified, each
231
+ pinned to one version and checked against its SHA-256:
232
+
233
+ debugpy 1.8.21 (https://github.com/microsoft/debugpy), Copyright (c)
234
+ Microsoft Corporation, MIT License; its LICENSE ships inside the package.
235
+ vscode-js-debug 1.140.0 (https://github.com/microsoft/vscode-js-debug),
236
+ Copyright (c) Microsoft Corporation, MIT License; its LICENSE ships inside
237
+ the downloaded archive.
238
+
239
+ The visual skills (@dalcode/dal-skills: src/bundled/web-design,
240
+ diagram-design, poster-design, print-design and the shared
241
+ src/bundled/visual-kit) and the chart and diagram styles of
242
+ @dalcode/dal-office use the following:
243
+
244
+ frontend-design skill (https://github.com/anthropics/skills,
245
+ skills/frontend-design), Copyright Anthropic, PBC, Licensed under the
246
+ Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0).
247
+ Parts of its design principles are adapted, rewritten in Chinese and
248
+ combined with DAL's own rules in web-design/SKILL.md.
249
+ Radix Colors 3.0.0 (https://github.com/radix-ui/colors), Copyright (c) 2021
250
+ Radix, MIT License: the slate, indigo, red, green and amber steps in
251
+ visual-kit/tokens.css.
252
+ shadcn/ui (https://github.com/shadcn-ui/ui), Copyright (c) 2023 shadcn,
253
+ MIT License: the semantic token naming in visual-kit/tokens.css follows it.
254
+ The "observable10" categorical colors, as published in d3-scale-chromatic
255
+ (https://github.com/d3/d3-scale-chromatic), Copyright 2010-2024 Mike
256
+ Bostock, ISC License, and used by Observable Plot: the colors in the
257
+ chart theme (dal-office src/render/chart-theme.ts, visual-kit
258
+ echarts-dal.json and the pages that embed it).
259
+ The terms of the MIT and ISC licenses are the same in substance as those in
260
+ the LICENSE file distributed with this package.
261
+
262
+ The bundled skills bounded-code-repair, evidence-first-retrieval and
263
+ validated-structured-output (@dalcode/dal-skills: src/bundled/) are adapted
264
+ from the small-model reliability skills of:
265
+
266
+ pi-coding-agent-forge (https://github.com/Firstp1ck/pi-coding-agent-forge),
267
+ pi-extension-small-modal-reliability/skills, at commit
268
+ 2328249ba2941af2bc55d05487dfd9800f617191
269
+ Copyright (c) 2026 Firstpick
270
+ Licensed under the MIT License, whose terms are the same as those in the
271
+ LICENSE file distributed with this package. Adapted: the workflows (one
272
+ behaviour inside a declared write boundary, reproduce first, observed
273
+ checks as the only evidence, at most two repair attempts; source priority,
274
+ exact passages, the supported / partial / conflicting / insufficient
275
+ outcomes; declarative output contracts with at most two repairs).
276
+ Rewritten in Chinese for DAL; the host-specific adapter sections, tools and
277
+ commands are left out.
278
+
279
+ The page templates load these libraries at view time, unmodified, from a
280
+ pinned version on the npmmirror CDN with a subresource-integrity hash; they
281
+ are not redistributed in this package:
282
+
283
+ Mermaid 11.17.2 (https://github.com/mermaid-js/mermaid), MIT License.
284
+ markmap-lib / markmap-view 0.18.12 (https://github.com/markmap/markmap),
285
+ MIT License.
286
+ D3 7.9.0 (https://github.com/d3/d3), ISC License.
287
+ Apache ECharts 6.1.0 (https://github.com/apache/echarts), Apache License 2.0.
288
+
289
+ The office document styles (@dalcode/dal-office) contain no copied code or
290
+ template files. Their layout catalogue, content-driven layout selection and
291
+ type scale were written for DAL after studying these projects, which are
292
+ credited here:
293
+
294
+ presenton (https://github.com/presenton/presenton), Copyright 2025
295
+ presenton, Apache License 2.0 - layout grouping and content-to-layout
296
+ matching.
297
+ PPTAgent (https://github.com/icip-cas/PPTAgent), Copyright (c) 2025
298
+ ICIP-CAS, MIT License - layout selection by element count and text length.
299
+ ppt-master (https://github.com/hugohe3/ppt-master), Copyright (c) 2025-2026
300
+ Hugo He, MIT License - page-type catalogue (its brand and icon templates
301
+ were not used).
302
+ Slidev themes (https://github.com/slidevjs/themes), Copyright (c) 2021
303
+ Slidev.js Team, and Marp Core themes (https://github.com/marp-team/marp-core),
304
+ Copyright (c) 2018 Marp team, both MIT License - title/body type scale and
305
+ cover / section / statement / fact / quote page types.
306
+ anthropics/skills theme-factory, Copyright Anthropic, PBC, Apache License
307
+ 2.0 - the practice of pairing each palette with a heading/body font pair.
308
+ Okabe & Ito, "Color Universal Design" (2002), and IBM Carbon Design System
309
+ data-visualization palettes (https://github.com/carbon-design-system/carbon),
310
+ Copyright IBM Corp., Apache License 2.0 - ordering of categorical chart
311
+ colours for adjacent-hue contrast.
312
+ Chinese Copywriting Guidelines
313
+ (https://github.com/sparanoid/chinese-copywriting-guidelines), Copyright (c)
314
+ Tunghsiao Liu, MIT License, and W3C "Requirements for Chinese Text Layout"
315
+ (https://www.w3.org/TR/clreq/), W3C Document License - mixed Chinese/Latin
316
+ typesetting rules.
317
+ GB/T 9704-2012 "Layout key for official document of Party and government
318
+ organs" - the official-document page, type and numbering parameters follow
319
+ the standard's published format specification.
320
+
321
+ The keep-awake extension (@dalcode/dal-awake: src/inhibitor.ts, src/index.ts)
322
+ is adapted from:
323
+
324
+ @narumitw/pi-caffeinate 0.49.11 (https://github.com/narumiruna/pi-extensions)
325
+ Copyright (c) 2026 narumiruna
326
+ Licensed under the MIT License, whose terms are the same as those in the
327
+ LICENSE file distributed with this package. Adapted: the per-platform
328
+ helpers (macOS caffeinate, Linux systemd-inhibit held by a shell watcher
329
+ bound to the parent process, Windows SetThreadExecutionState released by
330
+ closing stdin). Modified: held only after a run has lasted 30 seconds,
331
+ system-awake mode only, no notifications, menu, custom command or D-Bus
332
+ call, DAL names.
333
+
334
+ The rtk adapter (@dalcode/dal-rtk) follows the `rtk rewrite` contract of rtk's
335
+ own agent hook (https://github.com/rtk-ai/rtk, hooks, Apache License 2.0):
336
+ exit 0 or 3 with the rewritten command, exit 1 for none, a 2-second timeout,
337
+ version 0.23 or later, failing open. No code was copied. rtk itself is not
338
+ distributed with DAL; it is used only when the user has installed it.
339
+
340
+ Design ideas, no code copied. The edit anchors in @dalcode/dal-guard
341
+ (src/edit-anchor.ts: an edit is checked against the file version the model
342
+ last read and refused when that place has changed since) follow the hashline
343
+ edits of oh-my-pi (same repository and commit as above, MIT License); the
344
+ recovery of failed edits (a copied read notice, indentation drift, the nearest
345
+ region shown) follows the edit repair of bacnh85/pi-extensions pi-model-tools,
346
+ whose package has no LICENSE file, so only its ideas were used.
347
+
50
348
  Third-party dependencies are installed from the public npm registry and carry
51
349
  their own licenses in their own package directories. A few that a vendored
52
350
  component needs at a version the rest of the package does not use ship inside
package/PRIVACY.md CHANGED
@@ -7,6 +7,11 @@
7
7
 
8
8
  ## 一、匿名使用统计
9
9
 
10
+ **默认关闭,你同意后才开。** 在终端界面里第一次启动时会问一次:允许 / 不允许 / 以后再问
11
+ (选"以后再问"三十天内不再问);`dal -p` 等无人回答的方式一律不发送。告知不等于同意:
12
+ 旧版本只"提示过一次"、你从没选择过的,升级后同样视为未同意,不会发送。
13
+ 接收端尚未配置时(当前版本即如此),既不会问,也不会收集。
14
+
10
15
  ### 我们收集什么
11
16
 
12
17
  只有枚举值和计数,一共五种事件:
@@ -53,18 +58,73 @@
53
58
  三种方式,任选其一:
54
59
 
55
60
  ```bash
61
+ /telemetry on # 在 dal 里执行,开启(等同于在提问时选"允许")
56
62
  /telemetry off # 在 dal 里执行,永久关闭
57
63
  export DAL_TELEMETRY=0 # 环境变量
58
64
  export DO_NOT_TRACK=1 # 跨厂商通用约定
59
65
  ```
60
66
 
61
67
  在 CI 环境(检测到 `CI` / `GITHUB_ACTIONS` / `GITLAB_CI` / `BUILDKITE` / `JENKINS_URL`)
62
- 默认不上报。
68
+ 即使同意过也不上报。
63
69
 
64
70
  一旦你用 `/telemetry off` 关闭,**环境变量无法把它重新打开**。
65
71
  用 `/telemetry` 可查看当前状态和关闭原因。
66
72
 
67
- 开关与匿名 ID 存放在 `~/.dal/agent/telemetry.json`(权限 0600),删除该文件等同于重置。
73
+ 你的选择与匿名 ID 存放在 `~/.dal/agent/telemetry.json`(权限 0600),只在你回答后才写入;
74
+ 删除该文件等同于重置(重新变为未同意)。
75
+
76
+ ## 一(补)、失败症状上报(默认关闭)
77
+
78
+ 代码见 `packages/dal-telemetry/src/failures.ts`(判定与白名单)、`failure-queue.ts`(离线队列)、
79
+ `failure-reporting.ts`(同意与开关)。接收端契约见 `docs/evolution/collector-contract.md`。
80
+
81
+ **默认关闭。** 与上面的匿名使用统计分开询问,同意其中一项不等于同意另一项。
82
+ 只有你明确同意后才会记录和发送。第一次遇到任务没做好时,`dal` 会问一次:
83
+ 允许 / 不允许 / 以后再问(选"以后再问"三十天内不再问)。在你回答之前,失败只在内存里判定,
84
+ 不写盘、不发送。接收端尚未配置时(当前版本即如此),既不会问,也不会收集。
85
+
86
+ ### 上报什么
87
+
88
+ 每次没做好的任务最多一条"症状",只有枚举值、工具名和计数:
89
+
90
+ | 字段 | 内容 |
91
+ |---|---|
92
+ | 失败类别 | 固定列表之一:工具反复失败、编辑锚点失效、同一调用原样重复、输出被截断或超出单次花费/轮数上限、上下文溢出、以错误结束、被你中途打断后纠正、下一句在纠正它、测试没过却说完成、多次被保护拦截 |
93
+ | 工具摘要 | 工具名(与匿名统计同一规则:MCP 工具一律 `mcp__other`,自装扩展 `extension__other`)、调用次数、失败次数、错误类别(固定列表) |
94
+ | 工具序列 | 上面这些工具名按顺序折叠,成功/失败,最多 32 段 |
95
+ | 模型 | 我们目录里的模型 ID;你自己配置的模型一律记为 `custom` |
96
+ | 其他 | DAL 版本、操作系统、轮数、耗时(秒)、花费(美元)、压缩次数、日期(只到天) |
97
+ | 标识 | 每条一个随机 ID;一个每 30 天更换一次的随机上报者 ID(只用来数"多少台机器遇到",与匿名统计 ID、账号都无关) |
98
+
99
+ ### 不上报什么
100
+
101
+ 提示词、模型回答、工具参数、工具输出、报错原文、代码、文件内容、文件路径、目录名、仓库名、
102
+ 环境变量、密钥。这些在症状里**没有字段可放**:发送前和发送时各有一道校验,
103
+ 多出任何字段、出现路径或疑似密钥的形状,整条拒发。
104
+
105
+ ### 附带复现材料(每次单独同意)
106
+
107
+ `/telemetry attach` 可以为本次会话最近一次失败附上复现材料:这次任务的请求、工具调用和截断后的
108
+ 工具输出。它包含内容,所以每次都会先给你看要发的内容并单独询问,不会记住"总是允许"。
109
+ 密钥会被遮盖,敏感文件(`.env`、私钥等)不含内容,绝对路径只保留文件名;
110
+ 仍有疑似密钥或个人路径时拒绝发送。接收端保存 30 天后删除。
111
+
112
+ ### 离线与失败
113
+
114
+ 症状先写进 `~/.dal/agent/telemetry-failures.jsonl`(权限 0600),联网时分批发送;
115
+ 发不出去就留着稍后再试(最多 10 次、最长 14 天、最多 200 条),发送失败从不影响使用,
116
+ 退出时最多等 1 秒。
117
+
118
+ ### 怎么关
119
+
120
+ ```bash
121
+ /telemetry failures off # 关闭失败症状上报,并立即删除待发送内容
122
+ /telemetry off # 关闭全部上报(含失败症状),同样立即删除
123
+ export DAL_FAILURE_REPORTS=0
124
+ ```
125
+
126
+ `DO_NOT_TRACK=1`、`DAL_TELEMETRY=0`、CI 环境同样一律关闭。
127
+ `/telemetry failures show` 原样列出待发送的内容,`/telemetry failures` 查看状态。
68
128
 
69
129
  ## 二、你和模型之间的数据
70
130
 
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Mario Zechner
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.