dal-code 1.0.24 → 1.0.26

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 (591) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/NOTICE +7 -0
  3. package/dal-docs/README.md +109 -0
  4. package/dal-docs/extensions.md +98 -0
  5. package/dal-docs/keybindings.md +40 -0
  6. package/dal-docs/packages.md +62 -0
  7. package/dal-docs/prompt-templates.md +42 -0
  8. package/dal-docs/settings.md +86 -0
  9. package/dal-docs/skills.md +65 -0
  10. package/dal-docs/themes.md +44 -0
  11. package/dist/cli/args.d.ts +59 -0
  12. package/dist/cli/args.js +14 -14
  13. package/dist/config.d.ts +63 -0
  14. package/dist/config.js +1 -1
  15. package/dist/core/agent-session-runtime.d.ts +74 -0
  16. package/dist/core/agent-session-services.d.ts +50 -0
  17. package/dist/core/agent-session-services.js +1 -1
  18. package/dist/core/agent-session.d.ts +422 -0
  19. package/dist/core/agent-session.js +8 -7
  20. package/dist/core/auth-storage.d.ts +56 -0
  21. package/dist/core/background-processes.d.ts +73 -0
  22. package/dist/core/background-processes.js +7 -0
  23. package/dist/core/bash-executor.d.ts +13 -0
  24. package/dist/core/cache-warmer.d.ts +60 -0
  25. package/dist/core/compaction/branch-summarization.d.ts +43 -0
  26. package/dist/core/compaction/compaction.d.ts +62 -0
  27. package/dist/core/compaction/index.d.ts +3 -0
  28. package/dist/core/compaction/utils.d.ts +16 -0
  29. package/dist/core/diagnostics.d.ts +14 -0
  30. package/dist/core/event-bus.d.ts +8 -0
  31. package/dist/core/exec.d.ts +12 -0
  32. package/dist/core/extensions/index.d.ts +8 -0
  33. package/dist/core/extensions/loader.d.ts +13 -0
  34. package/dist/core/extensions/loader.js +1 -1
  35. package/dist/core/extensions/permission-surface.js +1 -1
  36. package/dist/core/extensions/runner.d.ts +165 -0
  37. package/dist/core/extensions/runner.js +1 -1
  38. package/dist/core/extensions/types.d.ts +1003 -0
  39. package/dist/core/extensions/wrapper.d.ts +5 -0
  40. package/dist/core/footer-data-provider.d.ts +46 -0
  41. package/dist/core/host-capabilities.d.ts +50 -0
  42. package/dist/core/host-capabilities.js +2 -0
  43. package/dist/core/keybindings.d.ts +525 -0
  44. package/dist/core/messages.d.ts +50 -0
  45. package/dist/core/model-config.d.ts +1212 -0
  46. package/dist/core/model-registry.d.ts +41 -0
  47. package/dist/core/model-resolver.d.ts +67 -0
  48. package/dist/core/model-resolver.js +1 -1
  49. package/dist/core/model-runtime.d.ts +101 -0
  50. package/dist/core/model-runtime.js +2 -2
  51. package/dist/core/package-manager.d.ts +213 -0
  52. package/dist/core/package-manager.js +2 -2
  53. package/dist/core/permissions/rules.d.ts +45 -0
  54. package/dist/core/permissions/rules.js +1 -0
  55. package/dist/core/permissions/shell-words.js +2 -0
  56. package/dist/core/permissions/tool-policy.d.ts +46 -0
  57. package/dist/core/permissions/tool-policy.js +1 -0
  58. package/dist/core/project-map.d.ts +18 -0
  59. package/dist/core/prompt-templates.d.ts +24 -0
  60. package/dist/core/provider-composer.d.ts +55 -0
  61. package/dist/core/remote-catalog-provider.js +1 -1
  62. package/dist/core/resolve-config-value.d.ts +11 -0
  63. package/dist/core/resource-loader.d.ts +220 -0
  64. package/dist/core/resource-loader.js +1 -1
  65. package/dist/core/sandbox/availability.d.ts +9 -0
  66. package/dist/core/sandbox/availability.js +1 -0
  67. package/dist/core/sandbox/denial.d.ts +25 -0
  68. package/dist/core/sandbox/denial.js +3 -0
  69. package/dist/core/sandbox/index.d.ts +5 -0
  70. package/dist/core/sandbox/index.js +1 -0
  71. package/dist/core/sandbox/policy.d.ts +66 -0
  72. package/dist/core/sandbox/policy.js +1 -0
  73. package/dist/core/sandbox/runtime.d.ts +31 -0
  74. package/dist/core/sandbox/runtime.js +1 -0
  75. package/dist/core/sandbox/shell-sandbox.d.ts +119 -0
  76. package/dist/core/sandbox/shell-sandbox.js +5 -0
  77. package/dist/core/sdk.d.ts +43 -0
  78. package/dist/core/sdk.js +1 -1
  79. package/dist/core/session-manager.d.ts +208 -0
  80. package/dist/core/settings-manager.d.ts +368 -0
  81. package/dist/core/settings-manager.js +1 -1
  82. package/dist/core/skills.d.ts +33 -0
  83. package/dist/core/slash-commands.d.ts +14 -0
  84. package/dist/core/source-info.d.ts +17 -0
  85. package/dist/core/system-prompt.d.ts +39 -0
  86. package/dist/core/system-prompt.js +15 -11
  87. package/dist/core/tools/bash.d.ts +89 -0
  88. package/dist/core/tools/bash.js +16 -14
  89. package/dist/core/tools/edit-diff.d.ts +44 -0
  90. package/dist/core/tools/edit.d.ts +48 -0
  91. package/dist/core/tools/file-mutation-queue.d.ts +1 -0
  92. package/dist/core/tools/find.d.ts +34 -0
  93. package/dist/core/tools/find.js +11 -11
  94. package/dist/core/tools/grep.d.ts +34 -0
  95. package/dist/core/tools/grep.js +10 -10
  96. package/dist/core/tools/index.d.ts +43 -0
  97. package/dist/core/tools/index.js +1 -1
  98. package/dist/core/tools/ls.d.ts +33 -0
  99. package/dist/core/tools/ls.js +6 -6
  100. package/dist/core/tools/powershell.d.ts +17 -0
  101. package/dist/core/tools/powershell.js +2 -2
  102. package/dist/core/tools/process.d.ts +26 -0
  103. package/dist/core/tools/process.js +22 -0
  104. package/dist/core/tools/read.d.ts +33 -0
  105. package/dist/core/tools/read.js +15 -15
  106. package/dist/core/tools/renderers/bash.d.ts +3 -0
  107. package/dist/core/tools/renderers/edit.d.ts +15 -0
  108. package/dist/core/tools/renderers/find.d.ts +2 -0
  109. package/dist/core/tools/renderers/grep.d.ts +2 -0
  110. package/dist/core/tools/renderers/index.d.ts +13 -0
  111. package/dist/core/tools/renderers/ls.d.ts +2 -0
  112. package/dist/core/tools/renderers/read.d.ts +3 -0
  113. package/dist/core/tools/renderers/read.js +8 -8
  114. package/dist/core/tools/renderers/write.d.ts +2 -0
  115. package/dist/core/tools/truncate.d.ts +27 -0
  116. package/dist/core/tools/write.d.ts +24 -0
  117. package/dist/core/trust-manager.d.ts +28 -0
  118. package/dist/core/trust-manager.js +2 -2
  119. package/dist/dal/builtins.js +2 -2
  120. package/dist/dal/child-env.d.ts +12 -0
  121. package/dist/dal/child-env.js +1 -0
  122. package/dist/dal/hooks/activity.d.ts +17 -0
  123. package/dist/dal/hooks/activity.js +1 -0
  124. package/dist/dal/hooks/config.d.ts +47 -0
  125. package/dist/dal/hooks/config.js +1 -0
  126. package/dist/dal/hooks/events.d.ts +43 -0
  127. package/dist/dal/hooks/events.js +4 -0
  128. package/dist/dal/hooks/extension.d.ts +3 -0
  129. package/dist/dal/hooks/extension.js +4 -0
  130. package/dist/dal/hooks/index.d.ts +5 -0
  131. package/dist/dal/hooks/index.js +1 -0
  132. package/dist/dal/hooks/runner.d.ts +57 -0
  133. package/dist/dal/hooks/runner.js +1 -0
  134. package/dist/dal/manifest.d.ts +32 -0
  135. package/dist/dal/manifest.js +1 -0
  136. package/dist/dal/safety-net.js +1 -0
  137. package/dist/index.d.ts +44 -0
  138. package/dist/index.js +1 -1
  139. package/dist/main.d.ts +9 -0
  140. package/dist/main.js +4 -4
  141. package/dist/modes/acp/acp-mode.d.ts +2 -0
  142. package/dist/modes/index.d.ts +7 -0
  143. package/dist/modes/interactive/components/armin.d.ts +30 -0
  144. package/dist/modes/interactive/components/assistant-message.d.ts +26 -0
  145. package/dist/modes/interactive/components/bash-execution.d.ts +22 -0
  146. package/dist/modes/interactive/components/bordered-loader.d.ts +14 -0
  147. package/dist/modes/interactive/components/branch-summary-message.d.ts +11 -0
  148. package/dist/modes/interactive/components/compaction-summary-message.d.ts +11 -0
  149. package/dist/modes/interactive/components/config-selector.js +1 -1
  150. package/dist/modes/interactive/components/custom-editor.d.ts +21 -0
  151. package/dist/modes/interactive/components/custom-message.d.ts +17 -0
  152. package/dist/modes/interactive/components/daxnuts.d.ts +17 -0
  153. package/dist/modes/interactive/components/diff.d.ts +4 -0
  154. package/dist/modes/interactive/components/dynamic-border.d.ts +12 -0
  155. package/dist/modes/interactive/components/extension-editor.d.ts +19 -0
  156. package/dist/modes/interactive/components/extension-input.d.ts +21 -0
  157. package/dist/modes/interactive/components/extension-selector.d.ts +22 -0
  158. package/dist/modes/interactive/components/first-time-setup.d.ts +23 -0
  159. package/dist/modes/interactive/components/footer.d.ts +18 -0
  160. package/dist/modes/interactive/components/footer.js +1 -1
  161. package/dist/modes/interactive/components/index.d.ts +33 -0
  162. package/dist/modes/interactive/components/keybinding-hints.d.ts +9 -0
  163. package/dist/modes/interactive/components/login-dialog.d.ts +27 -0
  164. package/dist/modes/interactive/components/model-selector.d.ts +81 -0
  165. package/dist/modes/interactive/components/oauth-selector.d.ts +29 -0
  166. package/dist/modes/interactive/components/scoped-models-selector.d.ts +39 -0
  167. package/dist/modes/interactive/components/session-selector-search.d.ts +20 -0
  168. package/dist/modes/interactive/components/session-selector.d.ts +88 -0
  169. package/dist/modes/interactive/components/settings-selector.d.ts +92 -0
  170. package/dist/modes/interactive/components/show-images-selector.d.ts +6 -0
  171. package/dist/modes/interactive/components/skill-invocation-message.d.ts +11 -0
  172. package/dist/modes/interactive/components/status-indicator.d.ts +44 -0
  173. package/dist/modes/interactive/components/theme-selector.d.ts +7 -0
  174. package/dist/modes/interactive/components/thinking-selector.d.ts +19 -0
  175. package/dist/modes/interactive/components/tool-execution.d.ts +76 -0
  176. package/dist/modes/interactive/components/tree-selector.d.ts +65 -0
  177. package/dist/modes/interactive/components/trust-selector.d.ts +22 -0
  178. package/dist/modes/interactive/components/user-message-selector.d.ts +23 -0
  179. package/dist/modes/interactive/components/user-message.d.ts +14 -0
  180. package/dist/modes/interactive/components/visual-truncate.d.ts +5 -0
  181. package/dist/modes/interactive/interactive-mode.d.ts +326 -0
  182. package/dist/modes/interactive/theme/theme-json.d.ts +257 -0
  183. package/dist/modes/interactive/theme/theme.d.ts +106 -0
  184. package/dist/modes/interactive/tui-renderer.d.ts +18 -0
  185. package/dist/modes/json-event.d.ts +26 -0
  186. package/dist/modes/print-mode.d.ts +9 -0
  187. package/dist/modes/print-mode.js +6 -4
  188. package/dist/modes/rpc/rpc-client.d.ts +142 -0
  189. package/dist/modes/rpc/rpc-client.js +4 -1
  190. package/dist/modes/rpc/rpc-mode.d.ts +3 -0
  191. package/dist/modes/rpc/rpc-mode.js +1 -1
  192. package/dist/modes/rpc/rpc-types.d.ts +565 -0
  193. package/dist/node_modules/@dalcode/dal-bridge/package.json +2 -2
  194. package/dist/node_modules/@dalcode/dal-bridge/src/ask-user.js +12 -0
  195. package/dist/node_modules/@dalcode/dal-bridge/src/client.js +1 -1
  196. package/dist/node_modules/@dalcode/dal-bridge/src/index.js +1 -1
  197. package/dist/node_modules/@dalcode/dal-gateway/package.json +2 -2
  198. package/dist/node_modules/@dalcode/dal-gateway/src/index.js +1 -1
  199. package/dist/node_modules/@dalcode/dal-guard/package.json +5 -4
  200. package/dist/node_modules/@dalcode/dal-guard/src/hooks.js +1 -0
  201. package/dist/node_modules/@dalcode/dal-guard/src/index.js +1 -1
  202. package/dist/node_modules/@dalcode/dal-halo/package.json +1 -1
  203. package/dist/node_modules/@dalcode/dal-interactive/LICENSE +21 -0
  204. package/dist/node_modules/@dalcode/dal-interactive/package.json +33 -0
  205. package/dist/node_modules/@dalcode/dal-interactive/src/handoff.js +28 -0
  206. package/dist/node_modules/@dalcode/dal-interactive/src/index.js +1 -0
  207. package/dist/node_modules/@dalcode/dal-interactive/src/interactive-shell.js +1 -0
  208. package/dist/node_modules/@dalcode/dal-interactive/src/questionnaire.js +3 -0
  209. package/dist/node_modules/@dalcode/dal-lang/package.json +3 -3
  210. package/dist/node_modules/@dalcode/dal-lsp/package.json +3 -3
  211. package/dist/node_modules/@dalcode/dal-lsp/src/client.js +3 -3
  212. package/dist/node_modules/@dalcode/dal-mcp/package.json +5 -5
  213. package/dist/node_modules/@dalcode/dal-mcp/src/command-parser.d.ts +19 -0
  214. package/dist/node_modules/@dalcode/dal-mcp/src/config-edit.d.ts +19 -0
  215. package/dist/node_modules/@dalcode/dal-mcp/src/config.d.ts +9 -0
  216. package/dist/node_modules/@dalcode/dal-mcp/src/http-client.d.ts +16 -0
  217. package/dist/node_modules/@dalcode/dal-mcp/src/stdio-client.d.ts +22 -0
  218. package/dist/node_modules/@dalcode/dal-mcp/src/stdio-client.js +2 -2
  219. package/dist/node_modules/@dalcode/dal-mcp/src/types.d.ts +30 -0
  220. package/dist/node_modules/@dalcode/dal-office/package.json +2 -2
  221. package/dist/node_modules/@dalcode/dal-office/src/extract/csv.d.ts +3 -0
  222. package/dist/node_modules/@dalcode/dal-office/src/extract/csv.js +1 -1
  223. package/dist/node_modules/@dalcode/dal-office/src/extract/ooxml.js +1 -1
  224. package/dist/node_modules/@dalcode/dal-office/src/index.d.ts +11 -0
  225. package/dist/node_modules/@dalcode/dal-office/src/index.js +1 -1
  226. package/dist/node_modules/@dalcode/dal-office/src/paths.d.ts +3 -0
  227. package/dist/node_modules/@dalcode/dal-office/src/render/chart.js +1 -1
  228. package/dist/node_modules/@dalcode/dal-office/src/render/docx.d.ts +19 -0
  229. package/dist/node_modules/@dalcode/dal-office/src/render/pptx.d.ts +40 -0
  230. package/dist/node_modules/@dalcode/dal-office/src/render/pptx.js +2 -2
  231. package/dist/node_modules/@dalcode/dal-office/src/render/thumbnails.d.ts +19 -0
  232. package/dist/node_modules/@dalcode/dal-office/src/render/thumbnails.js +1 -0
  233. package/dist/node_modules/@dalcode/dal-office/src/render/xlsx.d.ts +14 -0
  234. package/dist/node_modules/@dalcode/dal-office/src/scratchpad.d.ts +16 -0
  235. package/dist/node_modules/@dalcode/dal-office/src/themes.d.ts +13 -0
  236. package/dist/node_modules/@dalcode/dal-office/src/tools/docx-edit.js +10 -0
  237. package/dist/node_modules/@dalcode/dal-office/src/tools/edit-shared.js +1 -0
  238. package/dist/node_modules/@dalcode/dal-office/src/tools/pptx-edit.js +9 -0
  239. package/dist/node_modules/@dalcode/dal-office/src/tools/read-file.js +4 -2
  240. package/dist/node_modules/@dalcode/dal-office/src/tools/xlsx-edit.js +5 -0
  241. package/dist/node_modules/@dalcode/dal-pi-kit/dist/i18n.js +2 -2
  242. package/dist/node_modules/@dalcode/dal-pi-kit/package.json +1 -1
  243. package/dist/node_modules/@dalcode/dal-pi-kit/src/i18n.js +2 -2
  244. package/dist/node_modules/@dalcode/dal-plugins/package.json +2 -2
  245. package/dist/node_modules/@dalcode/dal-review/LICENSE +21 -0
  246. package/dist/node_modules/@dalcode/dal-review/package.json +34 -0
  247. package/dist/node_modules/@dalcode/dal-review/src/args.d.ts +13 -0
  248. package/dist/node_modules/@dalcode/dal-review/src/args.js +1 -0
  249. package/dist/node_modules/@dalcode/dal-review/src/core.d.ts +6 -0
  250. package/dist/node_modules/@dalcode/dal-review/src/core.js +1 -0
  251. package/dist/node_modules/@dalcode/dal-review/src/findings.d.ts +23 -0
  252. package/dist/node_modules/@dalcode/dal-review/src/findings.js +4 -0
  253. package/dist/node_modules/@dalcode/dal-review/src/index.js +1 -0
  254. package/dist/node_modules/@dalcode/dal-review/src/prompt.d.ts +3 -0
  255. package/dist/node_modules/@dalcode/dal-review/src/prompt.js +29 -0
  256. package/dist/node_modules/@dalcode/dal-review/src/runner.d.ts +91 -0
  257. package/dist/node_modules/@dalcode/dal-review/src/runner.js +2 -0
  258. package/dist/node_modules/@dalcode/dal-review/src/targets.d.ts +33 -0
  259. package/dist/node_modules/@dalcode/dal-review/src/targets.js +17 -0
  260. package/dist/node_modules/@dalcode/dal-review/src/types.d.ts +94 -0
  261. package/dist/node_modules/@dalcode/dal-review/src/types.js +1 -0
  262. package/dist/node_modules/@dalcode/dal-rewind/package.json +2 -2
  263. package/dist/node_modules/@dalcode/dal-rewind/src/core.d.ts +61 -0
  264. package/dist/node_modules/@dalcode/dal-router/package.json +4 -4
  265. package/dist/node_modules/@dalcode/dal-router/src/config.d.ts +50 -0
  266. package/dist/node_modules/@dalcode/dal-router/src/jev.d.ts +51 -0
  267. package/dist/node_modules/@dalcode/dal-router/src/pool.d.ts +6 -0
  268. package/dist/node_modules/@dalcode/dal-router/src/router.d.ts +32 -0
  269. package/dist/node_modules/@dalcode/dal-router/src/runtime.d.ts +37 -0
  270. package/dist/node_modules/@dalcode/dal-skills/package.json +3 -3
  271. package/dist/node_modules/@dalcode/dal-skills/src/discover.js +4 -4
  272. package/dist/node_modules/@dalcode/dal-skills/src/index.js +9 -9
  273. package/dist/node_modules/@dalcode/dal-subagent/package.json +5 -5
  274. package/dist/node_modules/@dalcode/dal-subagent/src/agents.js +2 -2
  275. package/dist/node_modules/@dalcode/dal-subagent/src/index.js +12 -12
  276. package/dist/node_modules/@dalcode/dal-subagent/src/process-runner.js +3 -3
  277. package/dist/node_modules/@dalcode/dal-telemetry/package.json +2 -2
  278. package/dist/node_modules/@dalcode/dal-terminal/LICENSE +21 -0
  279. package/dist/node_modules/@dalcode/dal-terminal/package.json +33 -0
  280. package/dist/node_modules/@dalcode/dal-terminal/src/contract.d.ts +60 -0
  281. package/dist/node_modules/@dalcode/dal-terminal/src/contract.js +7 -0
  282. package/dist/node_modules/@dalcode/dal-terminal/src/index.js +6 -0
  283. package/dist/node_modules/@dalcode/dal-tool-catalog/package.json +2 -2
  284. package/dist/node_modules/@dalcode/dal-tool-catalog/src/groups.js +1 -1
  285. package/dist/node_modules/@dalcode/dal-web/package.json +3 -3
  286. package/dist/node_modules/@dalcode/dal-web/src/config.js +2 -2
  287. package/dist/node_modules/@dalcode/dal-web/src/index.js +4 -4
  288. package/dist/node_modules/@dalcode/dal-web/src/search.js +4 -4
  289. package/dist/node_modules/@dalcode/dal-workflow/package.json +2 -2
  290. package/dist/node_modules/@dalcode/dal-workflow/src/index.js +4 -4
  291. package/dist/node_modules/@dalcode/dal-workflow/src/plan-mode.js +13 -13
  292. package/dist/node_modules/@dalcode/deepailab/package.json +3 -3
  293. package/dist/node_modules/@dalcode/deepailab/src/index.js +3 -3
  294. package/dist/node_modules/@dalcode/deepailab/src/model-defaults.js +1 -1
  295. package/dist/node_modules/@earendil-works/chord/dist/api.d.ts +21 -0
  296. package/dist/node_modules/@earendil-works/chord/dist/context/index.d.ts +12 -0
  297. package/dist/node_modules/@earendil-works/chord/dist/delta/index.d.ts +127 -0
  298. package/dist/node_modules/@earendil-works/chord/dist/index.d.ts +8 -0
  299. package/dist/node_modules/@earendil-works/chord/dist/json.d.ts +2 -0
  300. package/dist/node_modules/@earendil-works/chord/dist/services/errors.d.ts +16 -0
  301. package/dist/node_modules/@earendil-works/chord/dist/services/provider.d.ts +32 -0
  302. package/dist/node_modules/@earendil-works/chord/dist/services/state-codec.d.ts +12 -0
  303. package/dist/node_modules/@earendil-works/chord/dist/services/wire.d.ts +59 -0
  304. package/dist/node_modules/@earendil-works/chord/dist/state/draft.d.ts +13 -0
  305. package/dist/node_modules/@earendil-works/chord/dist/types.d.ts +188 -0
  306. package/dist/node_modules/@earendil-works/chord/package.json +1 -1
  307. package/dist/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts +11 -0
  308. package/dist/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +1 -1
  309. package/dist/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts +80 -0
  310. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts +711 -0
  311. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.d.ts +44 -0
  312. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts +80 -0
  313. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/utils.d.ts +15 -0
  314. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/context.d.ts +6 -0
  315. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/events.d.ts +22 -0
  316. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.d.ts +17 -0
  317. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.d.ts +34 -0
  318. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.d.ts +50 -0
  319. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.d.ts +28 -0
  320. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/result.d.ts +132 -0
  321. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.d.ts +56 -0
  322. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.d.ts +94 -0
  323. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.d.ts +3 -0
  324. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.d.ts +99 -0
  325. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.d.ts +52 -0
  326. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.d.ts +19 -0
  327. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.d.ts +13 -0
  328. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.d.ts +10 -0
  329. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.d.ts +3 -0
  330. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.d.ts +33 -0
  331. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.d.ts +37 -0
  332. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.d.ts +36 -0
  333. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.d.ts +46 -0
  334. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.d.ts +6 -0
  335. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts +75 -0
  336. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.d.ts +473 -0
  337. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.d.ts +94 -0
  338. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.d.ts +26 -0
  339. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/system-prompt.d.ts +2 -0
  340. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.d.ts +1495 -0
  341. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.d.ts +26 -0
  342. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.d.ts +18 -0
  343. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/index.d.ts +5 -0
  344. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.d.ts +32 -0
  345. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/tool-context.d.ts +4 -0
  346. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.d.ts +10 -0
  347. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts +185 -0
  348. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.d.ts +22 -0
  349. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.d.ts +22 -0
  350. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.d.ts +28 -0
  351. package/dist/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts +27 -0
  352. package/dist/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts +61 -0
  353. package/dist/node_modules/@earendil-works/pi-agent-core/dist/search/index.d.ts +28 -0
  354. package/dist/node_modules/@earendil-works/pi-agent-core/dist/stream-fn.d.ts +3 -0
  355. package/dist/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +150 -0
  356. package/dist/node_modules/@earendil-works/pi-agent-core/package.json +4 -4
  357. package/dist/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts +18 -0
  358. package/dist/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.lazy.d.ts +2 -0
  359. package/dist/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.d.ts +13 -0
  360. package/dist/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.lazy.d.ts +2 -0
  361. package/dist/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.d.ts +18 -0
  362. package/dist/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.lazy.d.ts +3 -0
  363. package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.d.ts +12 -0
  364. package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.lazy.d.ts +2 -0
  365. package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-shared.d.ts +24 -0
  366. package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.d.ts +14 -0
  367. package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.lazy.d.ts +2 -0
  368. package/dist/node_modules/@earendil-works/pi-ai/dist/api/lazy.d.ts +8 -0
  369. package/dist/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.d.ts +15 -0
  370. package/dist/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.lazy.d.ts +2 -0
  371. package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts +30 -0
  372. package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.lazy.d.ts +2 -0
  373. package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts +24 -0
  374. package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.lazy.d.ts +2 -0
  375. package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts +10 -0
  376. package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.lazy.d.ts +2 -0
  377. package/dist/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.d.ts +85 -0
  378. package/dist/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.lazy.d.ts +2 -0
  379. package/dist/node_modules/@earendil-works/pi-ai/dist/auth/context.d.ts +2 -0
  380. package/dist/node_modules/@earendil-works/pi-ai/dist/auth/credential-store.d.ts +10 -0
  381. package/dist/node_modules/@earendil-works/pi-ai/dist/auth/helpers.d.ts +8 -0
  382. package/dist/node_modules/@earendil-works/pi-ai/dist/auth/resolve.d.ts +20 -0
  383. package/dist/node_modules/@earendil-works/pi-ai/dist/auth/types.d.ts +127 -0
  384. package/dist/node_modules/@earendil-works/pi-ai/dist/cli.js +0 -0
  385. package/dist/node_modules/@earendil-works/pi-ai/dist/compat/extension-oauth-types.d.ts +34 -0
  386. package/dist/node_modules/@earendil-works/pi-ai/dist/compat.d.ts +47 -0
  387. package/dist/node_modules/@earendil-works/pi-ai/dist/env-api-keys.d.ts +9 -0
  388. package/dist/node_modules/@earendil-works/pi-ai/dist/image-models.d.ts +9 -0
  389. package/dist/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts +829 -0
  390. package/dist/node_modules/@earendil-works/pi-ai/dist/images-api-registry.d.ts +13 -0
  391. package/dist/node_modules/@earendil-works/pi-ai/dist/images-models.d.ts +37 -0
  392. package/dist/node_modules/@earendil-works/pi-ai/dist/images.d.ts +3 -0
  393. package/dist/node_modules/@earendil-works/pi-ai/dist/index.d.ts +38 -0
  394. package/dist/node_modules/@earendil-works/pi-ai/dist/legacy-api-aliases.d.ts +25 -0
  395. package/dist/node_modules/@earendil-works/pi-ai/dist/model-catalog.d.ts +16 -0
  396. package/dist/node_modules/@earendil-works/pi-ai/dist/models-store.d.ts +21 -0
  397. package/dist/node_modules/@earendil-works/pi-ai/dist/models.d.ts +97 -0
  398. package/dist/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +84 -0
  399. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/all.d.ts +18 -0
  400. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.d.ts +3 -0
  401. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/ant-ling.models.d.ts +3 -0
  402. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.d.ts +3 -0
  403. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.d.ts +3 -0
  404. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/baseten.models.d.ts +3 -0
  405. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.models.d.ts +3 -0
  406. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.d.ts +3 -0
  407. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-workers-ai.models.d.ts +3 -0
  408. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  409. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/azure-openai-responses.json +1 -1
  410. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
  411. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
  412. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  413. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/radius.json +1 -1
  414. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/deepseek.models.d.ts +3 -0
  415. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/faux.d.ts +100 -0
  416. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.d.ts +3 -0
  417. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.d.ts +3 -0
  418. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.models.d.ts +3 -0
  419. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/google.models.d.ts +3 -0
  420. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/groq.models.d.ts +3 -0
  421. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/huggingface.models.d.ts +3 -0
  422. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/images/register-builtins.d.ts +3 -0
  423. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/kimi-coding.models.d.ts +3 -0
  424. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/meta.models.d.ts +3 -0
  425. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/minimax-cn.models.d.ts +3 -0
  426. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/minimax.models.d.ts +3 -0
  427. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/mistral.models.d.ts +3 -0
  428. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai-cn.models.d.ts +3 -0
  429. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai.models.d.ts +3 -0
  430. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.models.d.ts +3 -0
  431. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.models.d.ts +3 -0
  432. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openai.models.d.ts +3 -0
  433. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.d.ts +3 -0
  434. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.d.ts +3 -0
  435. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.d.ts +3 -0
  436. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-cn.models.d.ts +3 -0
  437. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual.models.d.ts +3 -0
  438. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan.models.d.ts +3 -0
  439. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/radius.d.ts +7 -0
  440. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/radius.models.d.ts +3 -0
  441. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/together.models.d.ts +3 -0
  442. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.d.ts +3 -0
  443. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xai.models.d.ts +3 -0
  444. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-ams.models.d.ts +3 -0
  445. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-cn.models.d.ts +3 -0
  446. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-sgp.models.d.ts +3 -0
  447. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi.models.d.ts +3 -0
  448. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/zai-coding-cn.models.d.ts +3 -0
  449. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/zai.models.d.ts +3 -0
  450. package/dist/node_modules/@earendil-works/pi-ai/dist/session-resources.d.ts +3 -0
  451. package/dist/node_modules/@earendil-works/pi-ai/dist/types.d.ts +502 -0
  452. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.d.ts +63 -0
  453. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/diagnostics.d.ts +19 -0
  454. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts +19 -0
  455. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/json-parse.d.ts +3 -0
  456. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts +4 -0
  457. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/retry.d.ts +16 -0
  458. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/text.d.ts +6 -0
  459. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/transcript.d.ts +29 -0
  460. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/typebox-helpers.d.ts +5 -0
  461. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/uuid.d.ts +1 -0
  462. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/validation.d.ts +3 -0
  463. package/dist/node_modules/@earendil-works/pi-ai/package.json +2 -2
  464. package/dist/node_modules/@earendil-works/pi-client/package.json +3 -3
  465. package/dist/node_modules/@earendil-works/pi-coding-agent/LICENSE +21 -0
  466. package/dist/node_modules/@earendil-works/pi-coding-agent/index.d.ts +1 -0
  467. package/dist/node_modules/@earendil-works/pi-coding-agent/index.js +1 -0
  468. package/dist/node_modules/@earendil-works/pi-coding-agent/package.json +15 -0
  469. package/dist/node_modules/@earendil-works/pi-protocol/package.json +2 -2
  470. package/dist/node_modules/@earendil-works/pi-server/package.json +5 -5
  471. package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/package.json +3 -3
  472. package/dist/node_modules/@earendil-works/pi-telemetry/dist/index.d.ts +200 -0
  473. package/dist/node_modules/@earendil-works/pi-telemetry/dist/memory.d.ts +20 -0
  474. package/dist/node_modules/@earendil-works/pi-telemetry/dist/noop.d.ts +2 -0
  475. package/dist/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
  476. package/dist/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts +55 -0
  477. package/dist/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts +20 -0
  478. package/dist/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.d.ts +9 -0
  479. package/dist/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +151 -0
  480. package/dist/node_modules/@earendil-works/pi-tui/dist/components/h-stack.d.ts +6 -0
  481. package/dist/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts +25 -0
  482. package/dist/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts +43 -0
  483. package/dist/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts +28 -0
  484. package/dist/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts +61 -0
  485. package/dist/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.d.ts +10 -0
  486. package/dist/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts +61 -0
  487. package/dist/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts +52 -0
  488. package/dist/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts +50 -0
  489. package/dist/node_modules/@earendil-works/pi-tui/dist/components/spacer.d.ts +8 -0
  490. package/dist/node_modules/@earendil-works/pi-tui/dist/components/stack.d.ts +35 -0
  491. package/dist/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts +15 -0
  492. package/dist/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.d.ts +9 -0
  493. package/dist/node_modules/@earendil-works/pi-tui/dist/components/v-stack.d.ts +7 -0
  494. package/dist/node_modules/@earendil-works/pi-tui/dist/editor-component.d.ts +17 -0
  495. package/dist/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts +6 -0
  496. package/dist/node_modules/@earendil-works/pi-tui/dist/index.d.ts +32 -0
  497. package/dist/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts +329 -0
  498. package/dist/node_modules/@earendil-works/pi-tui/dist/keys.d.ts +101 -0
  499. package/dist/node_modules/@earendil-works/pi-tui/dist/latex.d.ts +4 -0
  500. package/dist/node_modules/@earendil-works/pi-tui/dist/layout-node.d.ts +41 -0
  501. package/dist/node_modules/@earendil-works/pi-tui/dist/native-platform.d.ts +13 -0
  502. package/dist/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts +30 -0
  503. package/dist/node_modules/@earendil-works/pi-tui/dist/terminal-colors.d.ts +9 -0
  504. package/dist/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts +82 -0
  505. package/dist/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +76 -0
  506. package/dist/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts +138 -0
  507. package/dist/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.d.ts +32 -0
  508. package/dist/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +252 -0
  509. package/dist/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +38 -0
  510. package/dist/node_modules/@earendil-works/pi-tui/package.json +1 -1
  511. package/dist/package-manager-cli.js +32 -32
  512. package/dist/sdk/index.d.ts +18 -0
  513. package/dist/sdk/index.js +1 -0
  514. package/dist/sdk/mcp.d.ts +8 -0
  515. package/dist/sdk/mcp.js +1 -0
  516. package/dist/sdk/office.d.ts +1 -0
  517. package/dist/sdk/office.js +1 -0
  518. package/dist/sdk/review.d.ts +1 -0
  519. package/dist/sdk/review.js +1 -0
  520. package/dist/sdk/rewind.d.ts +1 -0
  521. package/dist/sdk/rewind.js +1 -0
  522. package/dist/sdk/router.d.ts +6 -0
  523. package/dist/sdk/router.js +1 -0
  524. package/dist/sdk/subagents.d.ts +8 -0
  525. package/dist/sdk/subagents.js +1 -0
  526. package/dist/utils/clipboard.d.ts +2 -0
  527. package/dist/utils/frontmatter.d.ts +7 -0
  528. package/dist/utils/image-convert.d.ts +5 -0
  529. package/dist/utils/image-resize-core.d.ts +16 -0
  530. package/dist/utils/image-resize.d.ts +4 -0
  531. package/dist/utils/mime.d.ts +2 -0
  532. package/dist/utils/shell.d.ts +20 -0
  533. package/dist/utils/shell.js +3 -3
  534. package/dist/utils/version-check.d.ts +20 -0
  535. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  536. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  537. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  538. package/examples/extensions/gondolin/package-lock.json +2 -2
  539. package/examples/extensions/gondolin/package.json +1 -1
  540. package/examples/extensions/sandbox/index.ts +6 -0
  541. package/examples/extensions/sandbox/package-lock.json +2 -2
  542. package/examples/extensions/sandbox/package.json +1 -1
  543. package/examples/extensions/with-deps/package-lock.json +2 -2
  544. package/examples/extensions/with-deps/package.json +1 -1
  545. package/npm-shrinkwrap.json +75 -5
  546. package/package.json +27 -1
  547. package/dist/bun/register-bedrock.js +0 -1
  548. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.js +0 -1
  549. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.js +0 -1
  550. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js +0 -1
  551. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js +0 -5
  552. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.js +0 -1
  553. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js +0 -1
  554. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js +0 -1
  555. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.js +0 -1
  556. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.js +0 -1
  557. package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.js +0 -1
  558. package/dist/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js +0 -1
  559. package/dist/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.js +0 -1
  560. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/deferred-tools.js +0 -1
  561. package/dist/node_modules/@earendil-works/pi-client/dist/session-handle.js +0 -1
  562. package/dist/node_modules/@earendil-works/pi-client/dist/state.js +0 -1
  563. package/dist/node_modules/@earendil-works/pi-server/dist/cli.js +0 -16
  564. package/dist/node_modules/@earendil-works/pi-server/dist/config.js +0 -1
  565. package/dist/node_modules/@earendil-works/pi-server/dist/handler.js +0 -1
  566. package/dist/node_modules/@earendil-works/pi-server/dist/ipc/client.js +0 -2
  567. package/dist/node_modules/@earendil-works/pi-server/dist/ipc/protocol.js +0 -2
  568. package/dist/node_modules/@earendil-works/pi-server/dist/ipc/server.js +0 -3
  569. package/dist/node_modules/@earendil-works/pi-server/dist/protocol.js +0 -1
  570. package/dist/node_modules/@earendil-works/pi-server/dist/radius.js +0 -1
  571. package/dist/node_modules/@earendil-works/pi-server/dist/rpc-process.js +0 -4
  572. package/dist/node_modules/@earendil-works/pi-server/dist/serve.js +0 -1
  573. package/dist/node_modules/@earendil-works/pi-server/dist/sessions.js +0 -1
  574. package/dist/node_modules/@earendil-works/pi-server/dist/snapshots.js +0 -1
  575. package/dist/node_modules/@earendil-works/pi-server/dist/storage.js +0 -1
  576. package/dist/node_modules/@earendil-works/pi-server/dist/supervisor.js +0 -1
  577. package/dist/node_modules/@earendil-works/pi-server/dist/testing/service.js +0 -1
  578. package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/branch-cache.js +0 -7
  579. package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/search-backend.js +0 -36
  580. package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/branch-entries.js +0 -25
  581. package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/branch-tips.js +0 -2
  582. package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/entries.js +0 -7
  583. package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/facts.js +0 -20
  584. package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/lanes.js +0 -26
  585. package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/records.js +0 -9
  586. package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/session-sequences.js +0 -1
  587. package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/session-stats.js +0 -10
  588. package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/sessions.js +0 -29
  589. package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/writer-leases.js +0 -14
  590. package/dist/server/create-harness.js +0 -1
  591. package/dist/utils/clipboard-native.js +0 -1
package/CHANGELOG.md CHANGED
@@ -8,6 +8,48 @@ DAL Code 的发布说明。这里只写用户看得见的变化。
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [1.0.26] - 2026-09-29
12
+
13
+ - **需要留意:助手运行的命令默认在系统沙箱里执行,并且默认断网。** 独立使用 `dal` 时,助手执行的 shell 命令(包括子助手的命令)只能写当前工作目录和本会话自己的临时目录,读不到 `~/.ssh`、云服务凭据、钥匙串等敏感文件,也改不了 `.git/hooks`、`.dal`、`.claude`、`.vscode`、`.env` 这类会在以后自动执行或存放密钥的文件;网络默认关闭。macOS 使用系统自带的 Seatbelt,Linux 需要安装 bubblewrap(`bwrap`)和 ripgrep,需要按域名放行网络时再装 `socat`。
14
+ - 命令被沙箱挡下时,结果会写明挡住的是哪个文件或哪个域名;助手需要更多权限时会先征求你的同意(本次放行,或本会话内放行某个域名、某个目录),也可以请求单独一条命令在沙箱外运行。
15
+ - 需要联网的命令(例如安装依赖):在 `~/.dal/agent/settings.json` 里设置 `"sandbox": { "network": { "allowedDomains": ["…"] } }`,或本次运行加 `--sandbox-allow-domain <域名>`。
16
+ - 想恢复以前不设沙箱的行为:`dal --sandbox off`,或在设置里写 `"sandbox": { "level": "off" }`。只读模式用 `--sandbox read-only`。
17
+ - 项目目录里的设置只能把沙箱收得更紧,不能放宽。
18
+ - 沙箱在本机起不来时(例如 Linux 容器里、或 dal 本身运行在别的沙箱里),启动时会提示原因,命令会被拒绝而不是悄悄不设沙箱运行。**Windows 暂不支持沙箱**,需要明确设置 `--sandbox off` 才能运行命令。
19
+ - 1.0.25 起助手的命令已经拿不到密钥类环境变量(`GH_TOKEN`、`NPM_TOKEN` 等,需要时用 `shellEnvironment.include` 放行),这一点不变;沙箱是在此之上再加一层。
20
+ - 你自己输入的 `!` 命令不受沙箱限制。在其他程序中嵌入 DAL 时默认不启用沙箱,由宿主程序选择。
21
+ - **需要留意:设置里的权限规则现在会真正执行。** `~/.dal/agent/settings.json` 和项目 `.dal/settings.json` 里的 `permissions`(与 Claude Code 相同的写法,也是 DAL Code 写入的格式)现在独立使用 `dal` 时同样生效(以前写了也不起作用):`deny` 直接拒绝,`ask` 先问你(没有界面可问时拒绝)。例如 `"deny": ["Read(~/.ssh/**)", "Bash(curl:*)"]`、`"ask": ["Bash(git push:*)"]`。`Read(...)` 规则对读文件、搜索、列目录都生效。
22
+ - **代码评审 `/review`**:由一个只能读、不能改文件的评审助手审查改动,按严重程度(P0–P3)列出问题,每条带文件和行号、原因和修复建议,重复的问题自动合并。可以审查未提交的改动(默认)、对比某个基础分支(`--base main`,PR 风格)、某个提交(`--commit`)、GitHub PR(`--pr`,需要安装 `gh`),或按你写的说明审查(`--custom`);其余文字作为审查重点。不带参数时会弹出选择。评审结果留在对话里,接着说「修复 P1 的问题」即可。`dal -p "/review --base main"` 直接打印结果,加 `--json` 输出结构化结果。
23
+ - 在支持的宿主程序里(如 DAL Code 桌面版),助手可以在需要时读取你的终端输出,你也可以在消息里写 `@terminal` 或 `@terminal:名称` 把某个终端最近的输出附上。终端内容只作为资料参考,助手不会执行其中出现的指令。单独在终端里使用 DAL CLI 时没有这项能力。
24
+ - `dal -p` 运行 `/review` 这类不需要模型回复的命令时,会把命令的结果打印出来。
25
+ - 在 DAL Code 中计划模式只有一种,即 DAL Code 自己的「先出方案」。此前在对话里输入 `/plan` 会另开一套命令行版计划模式,它的提示和拦截规则与「先出方案」重复。
26
+ - 终端版新增:助手需要你拿主意时,会弹出选择题让你选(可以自己填写答案,多个问题分页显示);`/handoff <接下来要做的事>` 根据当前对话生成一份可编辑的交接提示,并在新会话里继续;`!vim`、`!git rebase -i`、`!htop` 等交互式命令会占用整个终端,退出后回到对话。
27
+ - 修复用 `npm ci` 安装 DAL 安装包会失败的问题(包里锁定的依赖版本与包描述不一致;`npm install -g` 不受影响)。现在 protobufjs 锁定为 7.6.6,cc-safety-net 需要的 typescript 也一并锁定。
28
+ - 子助手不再拿到主会话用 `--exclude-tools` 排除的工具。
29
+ - 在 DAL Code 中(或其他通过 DAL 网关启动 DAL 的程序里),联网搜索直接使用你的 DeepAILab 账号,不需要另外配置;你自己配置的搜索 key 仍然优先。
30
+ - 在其他程序中嵌入 DAL 时,可以直接取得内置扩展、内置子助手和全部工具的清单(名称、简短说明,支持中英文),用于显示插件页和工具名称。
31
+ - 沙箱开启时,助手的读文件、搜索、列目录也读不到 `~/.ssh`、云服务凭据、钥匙串等受保护位置(以前只有 shell 命令受限);在整个目录里搜索时会跳过这些文件,指向它们的符号链接同样读不到。
32
+ - 在其他程序中嵌入 DAL 时,DAL 进程意外退出能被及时发现:宿主会收到一次退出通知(退出码、信号、最后几行错误输出、当时是否有任务在跑),正在等待任务结束的调用会立即报错,而不是一直挂着。
33
+ - **后台进程**:助手可以在后台启动开发服务器、监听编译之类不会自行结束的命令,之后随时查看输出、运行状态和监听的端口,用完停止;会话结束时这些进程会全部停掉。以前这类命令会在两分钟后被强行结束。
34
+
35
+ ## [1.0.25] - 2026-09-28
36
+
37
+ - **需要留意:助手运行的命令默认拿不到密钥类环境变量了。** 助手执行的命令(包括子助手的命令和 `!` 开头的命令)不再继承名字像密钥的环境变量:名字里带 `KEY`、`SECRET`、`TOKEN`、`PASSWORD`、`CREDENTIAL` 的,以及 `AWS_*`、`AZURE_*`、`GH_*`、`GITHUB_TOKEN`、`NPM_TOKEN`、`GOOGLE_APPLICATION_CREDENTIALS`。这样助手执行 `printenv` 之类命令时,你的密钥不会出现在对话里。如果你靠环境变量让助手的命令用上 `GH_TOKEN`、`NPM_TOKEN` 等(例如让助手用 `gh` 操作 GitHub、发布 npm 包),在 `~/.dal/agent/settings.json` 里加上 `"shellEnvironment": { "include": ["GH_TOKEN", "NPM_TOKEN"] }` 即可恢复(按需列出变量名,支持 `*` 通配)。还可以用 `exclude` 再多去掉一些变量、用 `set` 直接给命令设变量。项目目录里的设置只能再多去掉变量,不能放宽。钩子、MCP 服务器和语言服务器照旧能用这些变量。在 DAL Code 中,登录凭据任何情况下都不会交给助手运行的命令、钩子和各类服务器。
38
+ - 危险命令(如 `git reset --hard`、`rm -rf ~`、强制推送)现在在真正执行前统一检查,不论命令由主助手、子助手还是插件发起。负责这项检查的安全组件如果加载失败,所有命令都会被拒绝并说明原因,不再悄悄放行;重新安装 DAL 即可恢复。
39
+
40
+ - **按位置修改 Office 文件**:可以直接改已有的 Word、PPT、Excel 里指定的段落、表格单元格、幻灯片元素或单元格,其余内容和格式保持原样;读取文件时可列出每一处的位置编号,方便指明要改哪里。
41
+ - **澄清卡片**:助手需要你拿主意时,一次最多问三个问题,支持选项(可带预览图)、配色、大纲、滑块和文字作答,每题都附推荐答案;跳过的问题按推荐处理。计划模式下助手也可以先提问再给计划。
42
+ - **用户钩子**:支持与 Claude Code 格式兼容的命令钩子(工具调用前、工具调用后、会话开始、回合结束),可以拦截或改写工具调用、给结果补充说明;钩子拦截、改写、出错都会在对话里显示。项目里的钩子只在信任该项目后才会运行,子助手沿用主会话的信任选择。
43
+ - 技能现在也会从 `.claude/skills`(用户目录和项目目录)读取;与 `.agents/skills` 里的技能同名时,以 `.agents/skills` 的为准。项目里的 `.claude/skills` 同样需要先信任项目。本地技能与自带技能同名时,本地的优先。
44
+ - 在 DAL Code 中,子助手的审批、计划和提问卡片会出现在发起它的那个对话里。
45
+ - DAL 不再连接上游开源项目的任何服务(模型目录、安装器等);助手查阅的是 DAL 自己的使用文档,介绍自己时不会再用错名字。
46
+ - 网关的模型列表一时取不到时,沿用上次成功取到的列表,不再因为「找不到模型提供方」而无法启动。
47
+ - 修复机器繁忙、启动较慢时 `dal -p --provider deepailab --model …` 偶尔报「找不到模型提供方」:本机保存的模型列表现在总能用上,不再取决于启动时各步完成的先后。
48
+ - 修复 Windows 上的若干路径问题:状态栏显示的项目路径、插件资源规则和实验性服务进程在 Windows 下都能正常工作。
49
+ - 在其他程序中嵌入 DAL 时,可以选择不把宿主程序的环境变量(如服务密钥)传给 DAL,并提供带类型的编程接口(会话、技能、Office 生成、MCP、模型路由、检查点)。
50
+ - 在 DAL Code 中审批计划时,助手会一直等到 DAL Code 那边的审批时限(默认约 10 分钟)结束,不再约 2 分半就放弃并当作未批准;提问卡片同样按 DAL Code 设置的时限等待。
51
+ - 使用 OpenCode Go 时的默认模型改为 Kimi K3(原默认的 Kimi K2.6 已下架)。
52
+
11
53
  ## [1.0.24] - 2026-09-28
12
54
 
13
55
  - `/model` 列表顶部新增「自动(智能路由)」:当前处于自动选模型时会打勾;选中后恢复每轮按任务自动挑选模型,所有会话生效。选择具体模型则关闭自动选模型。
package/NOTICE CHANGED
@@ -32,6 +32,13 @@ pi-rewind 0.5.0:
32
32
  Licensed under the MIT License, whose terms are the same as those in the
33
33
  LICENSE file distributed with this package.
34
34
 
35
+ The command sandbox uses @anthropic-ai/sandbox-runtime, unmodified:
36
+
37
+ Anthropic Sandbox Runtime (https://github.com/anthropic-experimental/sandbox-runtime)
38
+ Copyright Anthropic PBC
39
+ Licensed under the Apache License, Version 2.0; its LICENSE file ships in
40
+ its package directory.
41
+
35
42
  Third-party dependencies are installed from the public npm registry and carry
36
43
  their own licenses in their own package directories. A few that a vendored
37
44
  component needs at a version the rest of the package does not use ship inside
@@ -0,0 +1,109 @@
1
+ # DAL Code — assistant reference
2
+
3
+ This folder is written for you, the assistant. Read it when the user asks about
4
+ DAL Code itself: how to configure it, or how to add skills, prompt templates,
5
+ extensions, themes, packages or keybindings. Answer in the user's language.
6
+
7
+ ## What you are running in
8
+
9
+ - **DAL Code** is DeepAILab's AI coding product. It ships in two forms that
10
+ share this same agent engine and the same configuration:
11
+ - **DAL CLI** — the terminal app, command `dal` (npm package `dal-code`).
12
+ - **DAL Code desktop** — an editor with a built-in agent panel. Its agent is
13
+ this engine, started by the desktop's local backend.
14
+ - Call the product "DAL Code" (or "DAL CLI" for the terminal app). Some
15
+ internal identifiers keep the name of the open-source base (for example the
16
+ `pi` key in a package manifest and the `@earendil-works/pi-*` import names,
17
+ see [extensions.md](extensions.md)). Use them exactly as written in code and
18
+ config, but never present them as the product's name.
19
+ - Models are served through the DeepAILab gateway after `/login`. Pick one
20
+ with `/model`.
21
+
22
+ ## Where things live
23
+
24
+ `~/.dal/agent/` is the user-level config directory (override with the
25
+ `DAL_CODING_AGENT_DIR` environment variable). `.dal/` in a project is the
26
+ project-level one and is only read after the user trusts the project.
27
+
28
+ | What | User level | Project level |
29
+ | --- | --- | --- |
30
+ | Settings | `~/.dal/agent/settings.json` | `.dal/settings.json` |
31
+ | Skills | `~/.dal/agent/skills/` | `.dal/skills/` |
32
+ | Prompt templates | `~/.dal/agent/prompts/` | `.dal/prompts/` |
33
+ | Extensions | `~/.dal/agent/extensions/` | `.dal/extensions/` |
34
+ | Themes | `~/.dal/agent/themes/` | `.dal/themes/` |
35
+ | MCP servers | `~/.dal/agent/mcp.json` | `.dal/mcp.json` |
36
+ | Custom models | `~/.dal/agent/models.json` | — |
37
+ | Keybindings | `~/.dal/agent/keybindings.json` | — |
38
+ | Sessions | `~/.dal/agent/sessions/` | — |
39
+
40
+ Skills are also read from `~/.agents/skills/`, `~/.claude/skills/` and the
41
+ project's `.agents/skills/` and `.claude/skills/`.
42
+
43
+ After changing any of these files, run `/reload` (or start a new session) so
44
+ they take effect.
45
+
46
+ ## Topics
47
+
48
+ - [skills.md](skills.md) — create a skill (`SKILL.md`)
49
+ - [prompt-templates.md](prompt-templates.md) — reusable `/name` prompts
50
+ - [extensions.md](extensions.md) — TypeScript extensions: tools, commands, events
51
+ - [packages.md](packages.md) — install and share bundles of the above
52
+ - [themes.md](themes.md) — terminal colour themes
53
+ - [keybindings.md](keybindings.md) — shortcuts and how to rebind them
54
+ - [settings.md](settings.md) — settings.json, models.json, MCP, context files, environment variables
55
+
56
+ ## Commands
57
+
58
+ Terminal (`dal --help` lists every flag):
59
+
60
+ | Command | Does |
61
+ | --- | --- |
62
+ | `dal` / `dal "task"` | Interactive session, optionally with a first message |
63
+ | `dal -p "task"` | Run once and print the result |
64
+ | `dal -c` / `dal -r` | Continue the last session / pick one to resume |
65
+ | `dal install <source> [-l]` | Install a package (`npm:…`, `git:…`, URL or local path); `-l` = project |
66
+ | `dal remove <source> [-l]` | Remove a package |
67
+ | `dal list` | List installed packages |
68
+ | `dal update` | Update DAL CLI and installed packages |
69
+ | `dal config` | Enable or disable individual package resources |
70
+
71
+ In a session:
72
+
73
+ | Command | Does |
74
+ | --- | --- |
75
+ | `/login`, `/logout`, `/account` | Sign in to DeepAILab, sign out, show plan and credit |
76
+ | `/model`, `/thinking` | Choose the model, set the thinking level |
77
+ | `/settings` | Settings menu |
78
+ | `/new`, `/resume`, `/tree`, `/fork`, `/clone` | Session management |
79
+ | `/handoff <goal>` | Write a self-contained prompt for the next task from this conversation, edit it, and continue in a new session linked to this one |
80
+ | `/compact` | Summarise older context to free space |
81
+ | `/reload` | Reload settings, skills, prompts, extensions, themes, keybindings |
82
+ | `/extensions` | Enable or disable loaded extensions |
83
+ | `/skill:<name>` | Run a skill explicitly |
84
+ | `/skill`, `/skills` | Manage local skills / browse DeepAILab cloud skills |
85
+ | `/packages`, `/install` | Recommended extensions for the account / install one |
86
+ | `/mcp` | Manage MCP servers |
87
+ | `/guard` | Approval gate for risky commands (`default` or `yolo`) |
88
+ | `/rewind` | Restore files and conversation to an earlier checkpoint |
89
+ | `/review` | Read-only code review: uncommitted changes (default), `--base <branch>`, `--commit <sha>`, `--pr <n>` (needs `gh`), or `--custom <what to check>`; extra words are focus instructions. Findings come back as P0–P3 with file:line and a suggested fix; ask "fix the P1s" afterwards |
90
+ | `/lang` | Interface language (`zh` or `en`) |
91
+ | `/telemetry` | Anonymous telemetry on or off |
92
+ | `/export`, `/share`, `/copy` | Export to HTML/JSONL, share as a secret GitHub gist, copy the last reply |
93
+ | `/hotkeys` | Show every keyboard shortcut |
94
+ | `/trust` | Save the project trust decision |
95
+ | `/quit` | Exit |
96
+
97
+ In the terminal app you can ask the user multiple-choice questions with the
98
+ `questionnaire` tool when a decision is theirs to make. `!vim file`,
99
+ `!git rebase -i …`, `!htop` and other interactive commands (or `!i <command>`)
100
+ get the whole terminal until they exit.
101
+
102
+ `dal -p "/review --base main"` prints the review; add `--json` for the
103
+ structured result. In an app that offers its terminals to the agent (DAL Code
104
+ desktop), `@terminal` or `@terminal:<name>` in a message attaches that
105
+ terminal's recent output, and the assistant can read terminals itself with the
106
+ `terminal_read` tool. In the plain terminal app there is no such tool.
107
+
108
+ In the desktop app the agent panel has its own UI for models, plugins and
109
+ settings; the files and folders above are the same ones it uses.
@@ -0,0 +1,98 @@
1
+ # Extensions
2
+
3
+ An extension is a TypeScript (or JavaScript) module that adds tools the model
4
+ can call, slash commands, keyboard shortcuts, CLI flags and event hooks. DAL
5
+ Code's own features (gateway login, approval gate, MCP, sub-agents, …) are
6
+ built the same way.
7
+
8
+ Extensions run with the user's full permissions — they are not sandboxed. Only
9
+ install ones from sources the user trusts.
10
+
11
+ ## Where extensions are found
12
+
13
+ | Location | Scope |
14
+ | --- | --- |
15
+ | `~/.dal/agent/extensions/*.ts`, `~/.dal/agent/extensions/*/index.ts` | User |
16
+ | `.dal/extensions/*.ts`, `.dal/extensions/*/index.ts` | Project (after trust) |
17
+ | `extensions` array in `settings.json` (files or folders) | User or project |
18
+ | Installed packages (see [packages.md](packages.md)) | User or project |
19
+ | `dal -e <path>` | This run only |
20
+
21
+ `/extensions` enables or disables loaded extensions; `/reload` picks up edits.
22
+
23
+ ## Minimal extension
24
+
25
+ `~/.dal/agent/extensions/hello.ts`:
26
+
27
+ ```typescript
28
+ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
29
+ import { Type } from "typebox";
30
+
31
+ export default function (api: ExtensionAPI) {
32
+ // A tool the model can call
33
+ api.registerTool({
34
+ name: "greet",
35
+ label: "Greet",
36
+ description: "Greet someone by name",
37
+ parameters: Type.Object({ name: Type.String({ description: "Name to greet" }) }),
38
+ async execute(_toolCallId, params) {
39
+ return { content: [{ type: "text", text: `Hello, ${params.name}!` }], details: {} };
40
+ },
41
+ });
42
+
43
+ // A slash command: /hello
44
+ api.registerCommand("hello", {
45
+ description: "Say hello",
46
+ handler: async (args, ctx) => {
47
+ ctx.ui.notify(`Hello ${args || "world"}!`, "info");
48
+ },
49
+ });
50
+
51
+ // An event hook: ask before rm -rf
52
+ api.on("tool_call", async (event, ctx) => {
53
+ if (event.toolName === "bash" && String(event.input.command ?? "").includes("rm -rf")) {
54
+ const ok = await ctx.ui.confirm("Dangerous command", "Allow rm -rf?");
55
+ if (!ok) return { block: true, reason: "Blocked by user" };
56
+ }
57
+ });
58
+ }
59
+ ```
60
+
61
+ Try it once without installing: `dal -e ./hello.ts`.
62
+
63
+ ## Imports
64
+
65
+ The engine keeps the import names of its open-source base, and resolves them
66
+ to its own implementation at load time — use them exactly as written:
67
+
68
+ | Import | For |
69
+ | --- | --- |
70
+ | `@earendil-works/pi-coding-agent` | `ExtensionAPI`, `ExtensionContext`, event types |
71
+ | `@earendil-works/pi-ai` | AI helpers such as `StringEnum` |
72
+ | `@earendil-works/pi-tui` | Terminal UI components for custom rendering |
73
+ | `typebox` | Tool parameter schemas |
74
+
75
+ Node built-ins work, and so do npm dependencies from a `package.json` next to
76
+ the extension (run `npm install` there). In a published package, list runtime
77
+ dependencies under `dependencies` and the imports above under
78
+ `peerDependencies` with `"*"`.
79
+
80
+ ## What the API offers
81
+
82
+ - **Register**: `registerTool`, `registerCommand`, `registerShortcut`,
83
+ `registerFlag`, `registerMessageRenderer`, `registerEntryRenderer`
84
+ - **Events** (`api.on`): `session_start`, `session_shutdown`, `turn_start`,
85
+ `turn_end`, `tool_call` (can block), `tool_result`, `model_select`, `input`, …
86
+ - **Act**: `sendMessage`, `sendUserMessage`, `exec`, `setActiveTools`,
87
+ `setModel`, `setSessionName`
88
+ - **Context** (`ctx`): `ctx.ui` (`notify`, `confirm`, `select`, `input`, …),
89
+ `ctx.cwd`, `ctx.hasUI`, `ctx.sessionManager`, `ctx.model`, `ctx.signal`
90
+
91
+ In non-interactive runs (`dal -p`, the desktop backend) `ctx.hasUI` can be
92
+ false; check it before prompting.
93
+
94
+ ## MCP instead of an extension
95
+
96
+ To connect an existing MCP server rather than writing code, use `/mcp` or
97
+ edit `~/.dal/agent/mcp.json` / `.dal/mcp.json` (see [settings.md](settings.md)).
98
+ Its tools appear as `mcp__<server>__<tool>` and always go through approval.
@@ -0,0 +1,40 @@
1
+ # Keybindings
2
+
3
+ Every DAL CLI shortcut can be rebound in `~/.dal/agent/keybindings.json`. Run
4
+ `/reload` afterwards. `/hotkeys` lists the shortcuts currently in effect.
5
+
6
+ ```json
7
+ {
8
+ "app.model.select": "ctrl+l",
9
+ "app.thinking.cycle": ["shift+tab", "ctrl+alt+t"],
10
+ "app.tools.expand": "ctrl+o"
11
+ }
12
+ ```
13
+
14
+ Keys are `modifier+key` with modifiers `ctrl`, `shift`, `alt`, `super`
15
+ (combinable), and keys `a`–`z`, `0`–`9`, `f1`–`f12`, `escape`, `enter`, `tab`,
16
+ `space`, `backspace`, `delete`, `home`, `end`, `pageUp`, `pageDown`, arrows and
17
+ most symbols. A value can be one key or a list.
18
+
19
+ ## Common actions and defaults
20
+
21
+ | Action id | Default | Does |
22
+ | --- | --- | --- |
23
+ | `app.interrupt` | `escape` | Stop the current response |
24
+ | `app.clear` | `ctrl+c` | Clear the editor; press again to exit |
25
+ | `app.exit` | `ctrl+d` | Exit when the editor is empty |
26
+ | `app.model.select` | `ctrl+l` | Open the model picker |
27
+ | `app.model.cycleForward` | `ctrl+p` | Next model in the cycle list |
28
+ | `app.thinking.cycle` | `shift+tab` | Cycle the thinking level |
29
+ | `app.thinking.toggle` | `ctrl+t` | Show or hide thinking blocks |
30
+ | `app.tools.expand` | `ctrl+o` | Expand or collapse tool output |
31
+ | `app.editor.external` | `ctrl+g` | Edit the prompt in `$VISUAL` / `$EDITOR` |
32
+ | `app.clipboard.pasteImage` | `ctrl+v` (`alt+v` on Windows/WSL) | Paste an image or text |
33
+ | `app.message.followUp` | `alt+enter` (`ctrl+q` on Windows/WSL) | Queue a follow-up while the agent works |
34
+ | `app.message.dequeue` | `alt+up` | Bring queued messages back into the editor |
35
+ | `app.message.copy` | `ctrl+x` | Copy the last assistant message |
36
+ | `app.session.new`, `app.session.resume`, `app.session.tree`, `app.session.fork` | none | Same as `/new`, `/resume`, `/tree`, `/fork` |
37
+
38
+ Editor actions (cursor movement, deletion, kill ring, selection) have ids that
39
+ start with `tui.`; `/hotkeys` shows them with their current keys. Extensions
40
+ can add shortcuts of their own.
@@ -0,0 +1,62 @@
1
+ # Packages
2
+
3
+ A package bundles extensions, skills, prompt templates and themes so they can
4
+ be installed from npm, git or a local folder and shared with a team.
5
+
6
+ Packages run with full system access. Review third-party packages before
7
+ installing them.
8
+
9
+ ## Install and manage
10
+
11
+ ```bash
12
+ dal install npm:@scope/name@1.0.0 # npm
13
+ dal install git:github.com/user/repo@v1 # git (a raw https URL also works)
14
+ dal install ./path/to/package # local folder
15
+ dal install <source> -l # into the project instead of the user
16
+ dal ext install official # bundled first-party set: plan-mode, git-checkpoint, todo, notify
17
+ dal list # installed packages
18
+ dal remove <source> [-l]
19
+ dal update # DAL CLI and installed packages
20
+ dal config # turn individual resources on or off
21
+ dal -e npm:@scope/name # try one for a single run without installing
22
+ ```
23
+
24
+ User installs are recorded in `~/.dal/agent/settings.json` under `packages`;
25
+ `-l` writes `.dal/settings.json` instead, and missing project packages are
26
+ installed automatically once the project is trusted. Inside a session,
27
+ `/packages` lists extensions recommended for the account and `/install`
28
+ installs one.
29
+
30
+ ## Create a package
31
+
32
+ Either use conventional folders at the package root —
33
+
34
+ ```
35
+ my-package/
36
+ ├── package.json
37
+ ├── extensions/ # *.ts or */index.ts
38
+ ├── skills/ # */SKILL.md
39
+ ├── prompts/ # *.md
40
+ └── themes/ # *.json
41
+ ```
42
+
43
+ — or declare paths explicitly in `package.json`. The manifest key is `pi` (an
44
+ internal identifier kept from the open-source base; it is not the product
45
+ name):
46
+
47
+ ```json
48
+ {
49
+ "name": "my-package",
50
+ "type": "module",
51
+ "pi": {
52
+ "extensions": ["./extensions"],
53
+ "skills": ["./skills"],
54
+ "prompts": ["./prompts"],
55
+ "themes": ["./themes"]
56
+ },
57
+ "peerDependencies": { "@earendil-works/pi-coding-agent": "*" }
58
+ }
59
+ ```
60
+
61
+ Runtime dependencies go in `dependencies` (installs omit `devDependencies`).
62
+ Test locally with `dal install ./my-package` before publishing.
@@ -0,0 +1,42 @@
1
+ # Prompt templates
2
+
3
+ A prompt template is a Markdown file that expands into a full prompt when the
4
+ user types `/<file name>` in the editor.
5
+
6
+ ## Where templates are found
7
+
8
+ - User: `~/.dal/agent/prompts/*.md`
9
+ - Project (after the project is trusted): `.dal/prompts/*.md`
10
+ - Installed packages, the `prompts` array in `settings.json`, or
11
+ `--prompt-template <path>`
12
+
13
+ Discovery in a `prompts/` folder is not recursive.
14
+
15
+ ## Create one
16
+
17
+ `~/.dal/agent/prompts/review.md` becomes `/review`:
18
+
19
+ ```markdown
20
+ ---
21
+ description: Review staged git changes
22
+ argument-hint: "[focus]"
23
+ ---
24
+ Review the staged changes (`git diff --cached`). Focus on ${1:-bugs and security issues}.
25
+ ```
26
+
27
+ - `description` is optional (the first non-empty line is used otherwise).
28
+ - `argument-hint` is shown in autocomplete; use `<required>` and `[optional]`.
29
+
30
+ ## Arguments
31
+
32
+ | Syntax | Expands to |
33
+ | --- | --- |
34
+ | `$1`, `$2`, … | Positional argument |
35
+ | `$@` or `$ARGUMENTS` | All arguments joined |
36
+ | `${1:-default}` | Argument 1, or `default` when missing |
37
+ | `${@:N}` / `${@:N:L}` | Arguments from position N (optionally L of them) |
38
+
39
+ Example: `/component Button "click handler"` with the body
40
+ `Create a component named $1 with: $@`.
41
+
42
+ Run `/reload` after adding or editing a template.
@@ -0,0 +1,86 @@
1
+ # Settings and configuration
2
+
3
+ ## settings.json
4
+
5
+ `~/.dal/agent/settings.json` applies everywhere; `.dal/settings.json` in a
6
+ project overrides it (nested objects are merged) once the project is trusted.
7
+ `/settings` edits the common options; `/model` and `/thinking` save defaults
8
+ with `ctrl+s`.
9
+
10
+ ```json
11
+ {
12
+ "defaultModel": "<model id from /model>",
13
+ "defaultThinkingLevel": "medium",
14
+ "theme": "dark",
15
+ "compaction": { "enabled": true, "reserveTokens": 16384, "keepRecentTokens": 20000 },
16
+ "retry": { "enabled": true, "maxRetries": 3 },
17
+ "packages": ["npm:@scope/name"],
18
+ "extensions": ["./extensions/local-tool.ts"],
19
+ "skills": ["~/shared/skills"],
20
+ "prompts": [],
21
+ "themes": [],
22
+ "enableSkillCommands": true,
23
+ "defaultProjectTrust": "ask"
24
+ }
25
+ ```
26
+
27
+ - Relative paths resolve against the folder holding that settings file; `~`
28
+ and absolute paths work. Arrays accept globs, `!pattern` to exclude,
29
+ `+path` / `-path` to force-include or exclude one path.
30
+ - `defaultThinkingLevel`: `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`.
31
+ - `defaultProjectTrust` (user file only): `ask`, `always` or `never` — what to
32
+ do with a project's `.dal/` folder when no decision was saved with `/trust`.
33
+
34
+ ## Project trust
35
+
36
+ Project-level resources (`.dal/settings.json`, `.dal/skills`, `.dal/extensions`,
37
+ `.dal/mcp.json`, …) load only after the user trusts the folder. Decisions are
38
+ stored in `~/.dal/agent/trust.json`. For one run, `--approve` trusts and
39
+ `--no-approve` ignores project files.
40
+
41
+ ## Context files and the system prompt
42
+
43
+ - `AGENTS.md` (or `CLAUDE.md`) in the project and its parent folders is added
44
+ to the prompt as project instructions. `--no-context-files` turns this off.
45
+ - `.dal/SYSTEM.md` or `~/.dal/agent/SYSTEM.md` replaces the default system
46
+ prompt; `APPEND_SYSTEM.md` in the same places appends to it.
47
+ - `--system-prompt <text>` / `--append-system-prompt <text|file>` do the same
48
+ for one run.
49
+
50
+ ## MCP servers — mcp.json
51
+
52
+ `~/.dal/agent/mcp.json` (user) and `.dal/mcp.json` (project, overrides user by
53
+ server name). `/mcp` edits them interactively.
54
+
55
+ ```json
56
+ {
57
+ "mcpServers": {
58
+ "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "."] },
59
+ "docs": { "url": "https://example.com/mcp", "headers": { "Authorization": "Bearer <token>" } },
60
+ "chrome-devtools": { "disabled": true }
61
+ }
62
+ }
63
+ ```
64
+
65
+ Tools appear as `mcp__<server>__<tool>` and always require approval.
66
+
67
+ ## Custom models — models.json
68
+
69
+ Models normally come from the DeepAILab gateway after `/login`.
70
+ `~/.dal/agent/models.json` can add other OpenAI-compatible endpoints (for
71
+ example a local server); whether third-party providers are usable depends on
72
+ the account's policy.
73
+
74
+ ## Environment variables
75
+
76
+ | Variable | Effect |
77
+ | --- | --- |
78
+ | `DAL_CODING_AGENT_DIR` | Use another folder instead of `~/.dal/agent` |
79
+ | `DAL_CODING_AGENT_SESSION_DIR` | Where sessions are stored (`--session-dir` wins) |
80
+ | `DAL_LANG` | Interface language, `zh` or `en` |
81
+ | `DAL_TELEMETRY=0`, `DO_NOT_TRACK=1` | Turn anonymous telemetry off |
82
+ | `PI_OFFLINE=1` | Skip all startup network work (same as `--offline`) |
83
+ | `PI_SKIP_VERSION_CHECK=1` | Skip the update check |
84
+
85
+ Some inherited variables keep the `PI_` prefix; a wrong prefix is silently
86
+ ignored, so copy names exactly.
@@ -0,0 +1,65 @@
1
+ # Skills
2
+
3
+ A skill is a folder with a `SKILL.md` file: instructions (plus optional scripts
4
+ and reference files) that the assistant loads only when a task needs them.
5
+ Only each skill's name and description sit in the system prompt; the full
6
+ `SKILL.md` is read on demand. DAL Code follows the Agent Skills format
7
+ (agentskills.io).
8
+
9
+ ## Where skills are found
10
+
11
+ - User: `~/.dal/agent/skills/`, `~/.agents/skills/`, `~/.claude/skills/`
12
+ - Project (after the project is trusted): `.dal/skills/`, and `.agents/skills/`
13
+ / `.claude/skills/` in the working directory and its parents up to the git root
14
+ - Installed packages (see [packages.md](packages.md))
15
+ - The `skills` array in `settings.json` (files or folders)
16
+ - `--skill <path>` on the command line
17
+
18
+ A folder containing `SKILL.md` is a skill wherever it appears (search is
19
+ recursive). In `~/.dal/agent/skills/` and `.dal/skills/` a single `name.md`
20
+ file with skill frontmatter also counts. When two skills share a name, the
21
+ project one wins over the user one.
22
+
23
+ ## Create one
24
+
25
+ ```
26
+ ~/.dal/agent/skills/release-notes/
27
+ ├── SKILL.md
28
+ ├── scripts/collect.sh # optional helpers
29
+ └── references/style.md # optional, loaded when SKILL.md links to it
30
+ ```
31
+
32
+ ```markdown
33
+ ---
34
+ name: release-notes
35
+ description: Drafts release notes from merged commits since the last tag. Use when the user asks for release notes or a changelog entry.
36
+ ---
37
+
38
+ # Release notes
39
+
40
+ 1. Run `./scripts/collect.sh` from this folder to list commits since the last tag.
41
+ 2. Group them by feature, fix and internal change, following [the style guide](references/style.md).
42
+ ```
43
+
44
+ Frontmatter:
45
+
46
+ | Field | Required | Notes |
47
+ | --- | --- | --- |
48
+ | `name` | yes | 1–64 chars, lowercase letters, digits and single hyphens |
49
+ | `description` | yes | Up to 1024 chars. Say what it does **and when to use it** — this is what decides whether it gets loaded |
50
+ | `disable-model-invocation` | no | `true` hides it from the prompt; it then runs only via `/skill:<name>` |
51
+ | `allowed-tools`, `license`, `compatibility`, `metadata` | no | Optional metadata |
52
+
53
+ Reference other files with paths relative to the skill folder. A skill without
54
+ a description is skipped with a warning.
55
+
56
+ ## Use
57
+
58
+ - The assistant picks a skill up by itself when the description matches.
59
+ - `/skill:<name> [arguments]` runs one explicitly; arguments are appended.
60
+ - `/skill list | show <name> | add | remove <name>` manages local skills;
61
+ `/skills` browses DeepAILab cloud skills for the signed-in account.
62
+ - Run `/reload` after adding or editing a skill.
63
+
64
+ Skills can tell the assistant to run any command, so only install skills from
65
+ sources the user trusts.
@@ -0,0 +1,44 @@
1
+ # Themes
2
+
3
+ Themes set the colours of the DAL CLI terminal interface. (The desktop app's
4
+ editor themes are separate and chosen in the app.)
5
+
6
+ ## Where themes are found
7
+
8
+ - Built in: `dark`, `light`
9
+ - User: `~/.dal/agent/themes/*.json`
10
+ - Project (after trust): `.dal/themes/*.json`
11
+ - Installed packages, the `themes` array in `settings.json`, or `--theme <path>`
12
+
13
+ Choose one in `/settings` or with `"theme": "<name>"` in `settings.json`.
14
+ `dal --use-theme light/dark` follows the terminal's appearance for one run.
15
+
16
+ ## Create one
17
+
18
+ A theme must define every colour token, so start from a built-in one. The
19
+ built-in files ship with the engine, two folders up from this document:
20
+ `../dist/modes/interactive/theme/dark.json` and `light.json` (in a source
21
+ checkout: `../src/modes/interactive/theme/`).
22
+
23
+ ```bash
24
+ mkdir -p ~/.dal/agent/themes
25
+ cp <engine>/dist/modes/interactive/theme/dark.json ~/.dal/agent/themes/my-theme.json
26
+ ```
27
+
28
+ Then edit it:
29
+
30
+ ```json
31
+ {
32
+ "name": "my-theme",
33
+ "vars": { "brand": "#3b82f6", "dim": 242 },
34
+ "colors": { "accent": "brand", "muted": "dim", "text": "" }
35
+ }
36
+ ```
37
+
38
+ - `name` is required, unique, and must not contain `/`.
39
+ - `vars` holds reusable colours; `colors` entries may reference them.
40
+ - A colour is a hex string, a 256-colour index, a var name, or `""` for the
41
+ terminal default.
42
+ - Keep every key from the file you copied; a missing token is an error.
43
+
44
+ Select it with `/settings` (or `/reload` if it is already selected).