@waq666/pneuma 0.8.0 → 0.9.2

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 (2841) hide show
  1. package/README.md +97 -23
  2. package/bin/dsc.js +25 -2
  3. package/lib/adapter/transcript.d.ts +94 -1
  4. package/lib/adapter/transcript.js +410 -13
  5. package/lib/boot.js +6 -27
  6. package/lib/contract/approval.d.ts +41 -4
  7. package/lib/contract/fonts.d.ts +101 -0
  8. package/lib/contract/fonts.js +157 -0
  9. package/lib/contract/memory.d.ts +93 -0
  10. package/lib/contract/memory.js +12 -0
  11. package/lib/contract/plugin.d.ts +114 -5
  12. package/lib/contract/remote.d.ts +8 -0
  13. package/lib/contract/remote.js +8 -0
  14. package/lib/contract/runtime.d.ts +240 -11
  15. package/lib/contract/session.d.ts +77 -6
  16. package/lib/contract/settings.d.ts +143 -3
  17. package/lib/contract/snapshot.d.ts +27 -5
  18. package/lib/contract/task.d.ts +38 -2
  19. package/lib/contract/transcript.d.ts +209 -13
  20. package/lib/contract/transcript.js +47 -1
  21. package/lib/contract.d.ts +3 -1
  22. package/lib/contract.js +3 -1
  23. package/lib/core/bytes.d.ts +1 -1
  24. package/lib/core/bytes.js +2 -2
  25. package/lib/core/child-env.d.ts +31 -0
  26. package/lib/core/child-env.js +70 -0
  27. package/lib/core/command-intent.d.ts +121 -0
  28. package/lib/core/command-intent.js +380 -0
  29. package/lib/core/command-policy.js +10 -46
  30. package/lib/core/config-store.js +6 -1
  31. package/lib/core/config.d.ts +98 -0
  32. package/lib/core/config.js +286 -4
  33. package/lib/core/context-injection-report.d.ts +107 -0
  34. package/lib/core/context-injection-report.js +132 -0
  35. package/lib/core/dock-browser.d.ts +30 -1
  36. package/lib/core/dock-browser.js +2 -1
  37. package/lib/core/dock-ops.d.ts +4 -4
  38. package/lib/core/dock-ops.js +2 -2
  39. package/lib/core/dock-session.d.ts +1 -2
  40. package/lib/core/dsh-compat/resolve-hook.d.ts +29 -1
  41. package/lib/core/dsh-compat/resolve-hook.js +272 -15
  42. package/lib/core/dsh-compat/service-map.js +1 -1
  43. package/lib/core/events.d.ts +57 -4
  44. package/lib/core/executable.d.ts +38 -0
  45. package/lib/core/executable.js +115 -0
  46. package/lib/core/git-exec.d.ts +11 -2
  47. package/lib/core/git-exec.js +27 -3
  48. package/lib/core/git-info.d.ts +127 -15
  49. package/lib/core/git-info.js +307 -32
  50. package/lib/core/guard-session.d.ts +50 -0
  51. package/lib/core/guard-session.js +58 -0
  52. package/lib/core/host-browser-link.d.ts +1 -2
  53. package/lib/core/host-methods.d.ts +1 -1
  54. package/lib/core/host-methods.js +15 -1
  55. package/lib/core/http-debug.d.ts +43 -0
  56. package/lib/core/http-debug.js +65 -0
  57. package/lib/core/i18n-text.d.ts +39 -0
  58. package/lib/core/i18n-text.js +50 -0
  59. package/lib/core/i18n.d.ts +28 -0
  60. package/lib/core/i18n.js +109 -0
  61. package/lib/core/image-diet.d.ts +77 -22
  62. package/lib/core/image-diet.js +233 -9
  63. package/lib/core/llm.d.ts +85 -9
  64. package/lib/core/llm.js +152 -22
  65. package/lib/core/lockfile.d.ts +4 -5
  66. package/lib/core/lockfile.js +78 -16
  67. package/lib/core/log-config.d.ts +35 -0
  68. package/lib/core/log-config.js +71 -0
  69. package/lib/core/mention.d.ts +25 -15
  70. package/lib/core/mention.js +153 -32
  71. package/lib/core/migrate.d.ts +18 -0
  72. package/lib/core/native-bridge.d.ts +1 -1
  73. package/lib/core/native-bridge.js +1 -1
  74. package/lib/core/os-lock.d.ts +30 -0
  75. package/lib/core/os-lock.js +232 -0
  76. package/lib/core/path-policy.d.ts +13 -2
  77. package/lib/core/path-policy.js +30 -2
  78. package/lib/core/plugin-bundle.d.ts +90 -8
  79. package/lib/core/plugin-bundle.js +184 -22
  80. package/lib/core/plugin-loader.d.ts +238 -8
  81. package/lib/core/plugin-loader.js +1288 -152
  82. package/lib/core/plugin-locale.d.ts +42 -0
  83. package/lib/core/plugin-locale.js +132 -0
  84. package/lib/core/plugin-npm.d.ts +44 -0
  85. package/lib/core/plugin-npm.js +459 -0
  86. package/lib/core/plugin-patch.d.ts +17 -0
  87. package/lib/core/plugin-patch.js +23 -1
  88. package/lib/core/plugin-registry.d.ts +72 -13
  89. package/lib/core/plugin-registry.js +275 -76
  90. package/lib/core/plugin-watch.d.ts +128 -0
  91. package/lib/core/plugin-watch.js +880 -0
  92. package/lib/core/prefs.d.ts +7 -1
  93. package/lib/core/prefs.js +125 -33
  94. package/lib/core/profile-bootstrap.d.ts +5 -0
  95. package/lib/core/profile-bootstrap.js +33 -0
  96. package/lib/core/profile-dir.js +7 -3
  97. package/lib/core/records.d.ts +1 -1
  98. package/lib/core/records.js +1 -1
  99. package/lib/core/redact.d.ts +20 -0
  100. package/lib/core/redact.js +52 -0
  101. package/lib/core/repeat-reminder.d.ts +152 -0
  102. package/lib/core/repeat-reminder.js +175 -0
  103. package/lib/core/request-invariant.js +1 -1
  104. package/lib/core/schedule/runner.d.ts +18 -2
  105. package/lib/core/schedule/runner.js +50 -15
  106. package/lib/core/session.d.ts +240 -18
  107. package/lib/core/session.js +511 -26
  108. package/lib/core/shell-quote.d.ts +2 -2
  109. package/lib/core/shell-quote.js +2 -2
  110. package/lib/core/skills.d.ts +14 -0
  111. package/lib/core/skills.js +31 -0
  112. package/lib/core/team-board.d.ts +94 -10
  113. package/lib/core/team-board.js +226 -7
  114. package/lib/core/terminal-env.d.ts +18 -4
  115. package/lib/core/terminal-env.js +151 -15
  116. package/lib/core/todo-reminder-cadence.d.ts +86 -0
  117. package/lib/core/todo-reminder-cadence.js +76 -0
  118. package/lib/core/token-estimate.d.ts +1 -1
  119. package/lib/core/token-estimate.js +1 -1
  120. package/lib/core/tool-guards.d.ts +42 -0
  121. package/lib/core/tool-guards.js +43 -1
  122. package/lib/core/tools/command-runner.d.ts +11 -0
  123. package/lib/core/tools/fs-tools.js +6 -0
  124. package/lib/core/tools.d.ts +21 -4
  125. package/lib/core/transcript-text.d.ts +1 -1
  126. package/lib/core/transcript-text.js +1 -1
  127. package/lib/core/ui-boot-source.d.ts +3 -1
  128. package/lib/core/ui-boot-source.js +1 -1
  129. package/lib/core/ui-bundles.d.ts +13 -4
  130. package/lib/core/ui-bundles.js +122 -29
  131. package/lib/core/ui-graph-frames.d.ts +47 -0
  132. package/lib/core/ui-graph-frames.js +54 -0
  133. package/lib/core/ui-hmr.d.ts +1 -1
  134. package/lib/core/ui-manifest.d.ts +224 -0
  135. package/lib/core/ui-manifest.js +185 -0
  136. package/lib/core/ui-methods.d.ts +1 -1
  137. package/lib/core/ui-methods.js +60 -2
  138. package/lib/core/ui-server.d.ts +3 -2
  139. package/lib/core/ui-server.js +18 -18
  140. package/lib/core/usage-log.d.ts +58 -1
  141. package/lib/core/usage-log.js +140 -1
  142. package/lib/headless.js +4 -24
  143. package/lib/host/kernel.d.ts +7 -15
  144. package/lib/host/kernel.js +65 -434
  145. package/lib/host/launch.d.ts +20 -0
  146. package/lib/host/launch.js +48 -0
  147. package/lib/host/startup.d.ts +8 -0
  148. package/lib/host/startup.js +74 -0
  149. package/lib/node_modules/@pneuma/agent/cache-probe.d.ts +1 -0
  150. package/lib/node_modules/@pneuma/agent/cache-probe.js +1 -0
  151. package/lib/node_modules/@pneuma/agent/cordis.patch.yml +4 -0
  152. package/lib/node_modules/@pneuma/agent/index.d.ts +1 -0
  153. package/lib/node_modules/@pneuma/agent/index.js +1 -0
  154. package/lib/node_modules/@pneuma/agent/locale/en.json +4 -0
  155. package/lib/node_modules/@pneuma/agent/package.json +38 -0
  156. package/lib/node_modules/@pneuma/approval/approval.d.ts +1 -0
  157. package/lib/node_modules/@pneuma/approval/approval.js +1 -0
  158. package/lib/node_modules/@pneuma/approval/call-meaning.d.ts +1 -0
  159. package/lib/node_modules/@pneuma/approval/call-meaning.js +1 -0
  160. package/lib/node_modules/@pneuma/approval/cordis.patch.yml +4 -0
  161. package/lib/node_modules/@pneuma/approval/index.d.ts +1 -0
  162. package/lib/node_modules/@pneuma/approval/index.js +1 -0
  163. package/lib/node_modules/@pneuma/approval/locale/en.json +4 -0
  164. package/lib/node_modules/@pneuma/approval/package.json +38 -0
  165. package/lib/node_modules/@pneuma/approval-floor/approval-floor.d.ts +1 -0
  166. package/lib/node_modules/@pneuma/approval-floor/approval-floor.js +1 -0
  167. package/lib/node_modules/@pneuma/approval-floor/cordis.patch.yml +4 -0
  168. package/lib/node_modules/@pneuma/approval-floor/index.d.ts +1 -0
  169. package/lib/node_modules/@pneuma/approval-floor/index.js +1 -0
  170. package/lib/node_modules/@pneuma/approval-floor/locale/en.json +4 -0
  171. package/lib/node_modules/@pneuma/approval-floor/locale/ui.en.json +28 -0
  172. package/lib/node_modules/@pneuma/approval-floor/locale/ui.zh.json +28 -0
  173. package/lib/node_modules/@pneuma/approval-floor/package.json +40 -0
  174. package/lib/node_modules/@pneuma/ask/cordis.patch.yml +4 -0
  175. package/lib/node_modules/@pneuma/ask/index.d.ts +1 -0
  176. package/lib/node_modules/@pneuma/ask/index.js +1 -0
  177. package/lib/node_modules/@pneuma/ask/locale/en.json +4 -0
  178. package/lib/node_modules/@pneuma/ask/package.json +38 -0
  179. package/lib/node_modules/@pneuma/base/cordis.patch.yml +176 -0
  180. package/lib/node_modules/@pneuma/base/package.json +12 -0
  181. package/lib/node_modules/@pneuma/browser/cordis.patch.yml +5 -0
  182. package/lib/node_modules/@pneuma/browser/index.d.ts +1 -0
  183. package/lib/node_modules/@pneuma/browser/index.js +1 -0
  184. package/lib/node_modules/@pneuma/browser/locale/en.json +4 -0
  185. package/lib/node_modules/@pneuma/browser/locale/ui.en.json +61 -0
  186. package/lib/node_modules/@pneuma/browser/locale/ui.zh.json +61 -0
  187. package/lib/node_modules/@pneuma/browser/package.json +40 -0
  188. package/lib/node_modules/@pneuma/cdp/actions.d.ts +1 -0
  189. package/lib/node_modules/@pneuma/cdp/actions.js +1 -0
  190. package/lib/node_modules/@pneuma/cdp/cloud-metadata.d.ts +1 -0
  191. package/lib/node_modules/@pneuma/cdp/cloud-metadata.js +1 -0
  192. package/lib/node_modules/@pneuma/cdp/index.d.ts +1 -0
  193. package/lib/node_modules/@pneuma/cdp/index.js +1 -0
  194. package/lib/node_modules/@pneuma/cdp/launch.d.ts +1 -0
  195. package/lib/node_modules/@pneuma/cdp/launch.js +1 -0
  196. package/lib/node_modules/@pneuma/cdp/locale/en.json +4 -0
  197. package/lib/node_modules/@pneuma/cdp/package.json +40 -0
  198. package/lib/node_modules/@pneuma/cdp/report.d.ts +1 -0
  199. package/lib/node_modules/@pneuma/cdp/report.js +1 -0
  200. package/lib/node_modules/@pneuma/cdp/ring-buffer.d.ts +1 -0
  201. package/lib/node_modules/@pneuma/cdp/ring-buffer.js +1 -0
  202. package/lib/node_modules/@pneuma/cdp/snapshot.d.ts +1 -0
  203. package/lib/node_modules/@pneuma/cdp/snapshot.js +1 -0
  204. package/lib/node_modules/@pneuma/cdp/transport.d.ts +1 -0
  205. package/lib/node_modules/@pneuma/cdp/transport.js +1 -0
  206. package/lib/node_modules/@pneuma/checkpoint/cordis.patch.yml +4 -0
  207. package/lib/node_modules/@pneuma/checkpoint/index.d.ts +1 -0
  208. package/lib/node_modules/@pneuma/checkpoint/index.js +1 -0
  209. package/lib/node_modules/@pneuma/checkpoint/locale/en.json +4 -0
  210. package/lib/node_modules/@pneuma/checkpoint/locale/ui.en.json +15 -0
  211. package/lib/node_modules/@pneuma/checkpoint/locale/ui.zh.json +15 -0
  212. package/lib/node_modules/@pneuma/checkpoint/package.json +38 -0
  213. package/lib/node_modules/@pneuma/checkpoint/shadow.d.ts +1 -0
  214. package/lib/node_modules/@pneuma/checkpoint/shadow.js +1 -0
  215. package/lib/node_modules/@pneuma/cli/config-cli.d.ts +1 -0
  216. package/lib/node_modules/@pneuma/cli/config-cli.js +1 -0
  217. package/lib/node_modules/@pneuma/cli/index.d.ts +1 -0
  218. package/lib/node_modules/@pneuma/cli/index.js +1 -0
  219. package/lib/node_modules/@pneuma/cli/locale/en.json +4 -0
  220. package/lib/node_modules/@pneuma/cli/package.json +35 -0
  221. package/lib/node_modules/@pneuma/cli/plugin-cli.d.ts +1 -0
  222. package/lib/node_modules/@pneuma/cli/plugin-cli.js +1 -0
  223. package/lib/node_modules/@pneuma/cli/pnpm-builds.d.ts +1 -0
  224. package/lib/node_modules/@pneuma/cli/pnpm-builds.js +1 -0
  225. package/lib/node_modules/@pneuma/commands/cordis.patch.yml +4 -0
  226. package/lib/node_modules/@pneuma/commands/index.d.ts +1 -0
  227. package/lib/node_modules/@pneuma/commands/index.js +1 -0
  228. package/lib/node_modules/@pneuma/commands/locale/en.json +4 -0
  229. package/lib/node_modules/@pneuma/commands/package.json +38 -0
  230. package/lib/node_modules/@pneuma/commands/session-export.d.ts +1 -0
  231. package/lib/node_modules/@pneuma/commands/session-export.js +1 -0
  232. package/lib/node_modules/@pneuma/commands-core/commands-completion.d.ts +1 -0
  233. package/lib/node_modules/@pneuma/commands-core/commands-completion.js +1 -0
  234. package/lib/node_modules/@pneuma/commands-core/index.d.ts +1 -0
  235. package/lib/node_modules/@pneuma/commands-core/index.js +1 -0
  236. package/lib/node_modules/@pneuma/commands-core/locale/en.json +4 -0
  237. package/lib/node_modules/@pneuma/commands-core/package.json +34 -0
  238. package/lib/node_modules/@pneuma/compact/cordis.patch.yml +4 -0
  239. package/lib/node_modules/@pneuma/compact/index.d.ts +1 -0
  240. package/lib/node_modules/@pneuma/compact/index.js +1 -0
  241. package/lib/node_modules/@pneuma/compact/locale/en.json +4 -0
  242. package/lib/node_modules/@pneuma/compact/locale/ui.en.json +24 -0
  243. package/lib/node_modules/@pneuma/compact/locale/ui.zh.json +24 -0
  244. package/lib/node_modules/@pneuma/compact/package.json +39 -0
  245. package/lib/node_modules/@pneuma/computer-use/cordis.patch.yml +5 -0
  246. package/lib/node_modules/@pneuma/computer-use/desktop-control.d.ts +1 -0
  247. package/lib/node_modules/@pneuma/computer-use/desktop-control.js +1 -0
  248. package/lib/node_modules/@pneuma/computer-use/index.d.ts +1 -0
  249. package/lib/node_modules/@pneuma/computer-use/index.js +1 -0
  250. package/lib/node_modules/@pneuma/computer-use/locale/en.json +4 -0
  251. package/lib/node_modules/@pneuma/computer-use/locale/ui.en.json +41 -0
  252. package/lib/node_modules/@pneuma/computer-use/locale/ui.zh.json +41 -0
  253. package/lib/node_modules/@pneuma/computer-use/package.json +40 -0
  254. package/lib/node_modules/@pneuma/config-core/index.d.ts +1 -0
  255. package/lib/node_modules/@pneuma/config-core/index.js +1 -0
  256. package/lib/node_modules/@pneuma/config-core/locale/en.json +4 -0
  257. package/lib/node_modules/@pneuma/config-core/market.d.ts +1 -0
  258. package/lib/node_modules/@pneuma/config-core/market.js +1 -0
  259. package/lib/node_modules/@pneuma/config-core/package.json +35 -0
  260. package/lib/node_modules/@pneuma/config-core/presets.d.ts +1 -0
  261. package/lib/node_modules/@pneuma/config-core/presets.js +1 -0
  262. package/lib/node_modules/@pneuma/desktop-dock/cordis.patch.yml +4 -0
  263. package/lib/node_modules/@pneuma/desktop-dock/index.d.ts +1 -0
  264. package/lib/node_modules/@pneuma/desktop-dock/index.js +1 -0
  265. package/lib/node_modules/@pneuma/desktop-dock/locale/en.json +4 -0
  266. package/lib/node_modules/@pneuma/desktop-dock/locale/ui.en.json +11 -0
  267. package/lib/node_modules/@pneuma/desktop-dock/locale/ui.zh.json +11 -0
  268. package/lib/node_modules/@pneuma/desktop-dock/package.json +38 -0
  269. package/lib/node_modules/@pneuma/dock-browser/cordis.patch.yml +5 -0
  270. package/lib/node_modules/@pneuma/dock-browser/index.d.ts +1 -0
  271. package/lib/node_modules/@pneuma/dock-browser/index.js +1 -0
  272. package/lib/node_modules/@pneuma/dock-browser/locale/en.json +4 -0
  273. package/lib/node_modules/@pneuma/dock-browser/locale/ui.en.json +10 -0
  274. package/lib/node_modules/@pneuma/dock-browser/locale/ui.zh.json +10 -0
  275. package/lib/node_modules/@pneuma/dock-browser/package.json +40 -0
  276. package/lib/node_modules/@pneuma/doctor/bundle.d.ts +1 -0
  277. package/lib/node_modules/@pneuma/doctor/bundle.js +1 -0
  278. package/lib/node_modules/@pneuma/doctor/checks/data.d.ts +1 -0
  279. package/lib/node_modules/@pneuma/doctor/checks/data.js +1 -0
  280. package/lib/node_modules/@pneuma/doctor/checks/ecosystem.d.ts +1 -0
  281. package/lib/node_modules/@pneuma/doctor/checks/ecosystem.js +1 -0
  282. package/lib/node_modules/@pneuma/doctor/checks/environment.d.ts +1 -0
  283. package/lib/node_modules/@pneuma/doctor/checks/environment.js +1 -0
  284. package/lib/node_modules/@pneuma/doctor/checks/util.d.ts +1 -0
  285. package/lib/node_modules/@pneuma/doctor/checks/util.js +1 -0
  286. package/lib/node_modules/@pneuma/doctor/cordis.patch.yml +4 -0
  287. package/lib/node_modules/@pneuma/doctor/index.d.ts +1 -0
  288. package/lib/node_modules/@pneuma/doctor/index.js +1 -0
  289. package/lib/node_modules/@pneuma/doctor/locale/en.json +4 -0
  290. package/lib/node_modules/@pneuma/doctor/package.json +39 -0
  291. package/lib/node_modules/@pneuma/dsh-compat/cordis.patch.yml +5 -0
  292. package/lib/node_modules/@pneuma/dsh-compat/index.d.ts +1 -0
  293. package/lib/node_modules/@pneuma/dsh-compat/index.js +1 -0
  294. package/lib/node_modules/@pneuma/dsh-compat/locale/en.json +4 -0
  295. package/lib/node_modules/@pneuma/dsh-compat/package.json +40 -0
  296. package/lib/node_modules/@pneuma/git/cordis.patch.yml +4 -0
  297. package/lib/node_modules/@pneuma/git/index.d.ts +1 -0
  298. package/lib/node_modules/@pneuma/git/index.js +1 -0
  299. package/lib/node_modules/@pneuma/git/locale/en.json +4 -0
  300. package/lib/node_modules/@pneuma/git/package.json +38 -0
  301. package/lib/node_modules/@pneuma/goal/cordis.patch.yml +4 -0
  302. package/lib/node_modules/@pneuma/goal/goal.d.ts +1 -0
  303. package/lib/node_modules/@pneuma/goal/goal.js +1 -0
  304. package/lib/node_modules/@pneuma/goal/index.d.ts +1 -0
  305. package/lib/node_modules/@pneuma/goal/index.js +1 -0
  306. package/lib/node_modules/@pneuma/goal/locale/en.json +4 -0
  307. package/lib/node_modules/@pneuma/goal/locale/ui.en.json +10 -0
  308. package/lib/node_modules/@pneuma/goal/locale/ui.zh.json +10 -0
  309. package/lib/node_modules/@pneuma/goal/package.json +39 -0
  310. package/lib/node_modules/@pneuma/guards/cordis.patch.yml +4 -0
  311. package/lib/node_modules/@pneuma/guards/index.d.ts +1 -0
  312. package/lib/node_modules/@pneuma/guards/index.js +1 -0
  313. package/lib/node_modules/@pneuma/guards/locale/en.json +4 -0
  314. package/lib/node_modules/@pneuma/guards/package.json +38 -0
  315. package/lib/node_modules/@pneuma/hooks/cordis.patch.yml +4 -0
  316. package/lib/node_modules/@pneuma/hooks/index.d.ts +1 -0
  317. package/lib/node_modules/@pneuma/hooks/index.js +1 -0
  318. package/lib/node_modules/@pneuma/hooks/lifecycle-hooks.d.ts +1 -0
  319. package/lib/node_modules/@pneuma/hooks/lifecycle-hooks.js +1 -0
  320. package/lib/node_modules/@pneuma/hooks/locale/en.json +4 -0
  321. package/lib/node_modules/@pneuma/hooks/locale/ui.en.json +111 -0
  322. package/lib/node_modules/@pneuma/hooks/locale/ui.zh.json +111 -0
  323. package/lib/node_modules/@pneuma/hooks/package.json +39 -0
  324. package/lib/node_modules/@pneuma/host-stdio/cordis.patch.yml +4 -0
  325. package/lib/node_modules/@pneuma/host-stdio/index.d.ts +1 -0
  326. package/lib/node_modules/@pneuma/host-stdio/index.js +1 -0
  327. package/lib/node_modules/@pneuma/host-stdio/locale/en.json +4 -0
  328. package/lib/node_modules/@pneuma/host-stdio/package.json +38 -0
  329. package/lib/node_modules/@pneuma/image-diet/cordis.patch.yml +4 -0
  330. package/lib/node_modules/@pneuma/image-diet/index.d.ts +1 -0
  331. package/lib/node_modules/@pneuma/image-diet/index.js +1 -0
  332. package/lib/node_modules/@pneuma/image-diet/locale/en.json +4 -0
  333. package/lib/node_modules/@pneuma/image-diet/locale/ui.en.json +14 -0
  334. package/lib/node_modules/@pneuma/image-diet/locale/ui.zh.json +14 -0
  335. package/lib/node_modules/@pneuma/image-diet/package.json +39 -0
  336. package/lib/node_modules/@pneuma/llm/cordis.patch.yml +4 -0
  337. package/lib/node_modules/@pneuma/llm/index.d.ts +1 -0
  338. package/lib/node_modules/@pneuma/llm/index.js +1 -0
  339. package/lib/node_modules/@pneuma/llm/locale/en.json +4 -0
  340. package/lib/node_modules/@pneuma/llm/package.json +38 -0
  341. package/lib/node_modules/@pneuma/log/cordis.patch.yml +4 -0
  342. package/lib/node_modules/@pneuma/log/filter.d.ts +1 -0
  343. package/lib/node_modules/@pneuma/log/filter.js +1 -0
  344. package/lib/node_modules/@pneuma/log/index.d.ts +1 -0
  345. package/lib/node_modules/@pneuma/log/index.js +1 -0
  346. package/lib/node_modules/@pneuma/log/locale/en.json +4 -0
  347. package/lib/node_modules/@pneuma/log/locale/ui.en.json +30 -0
  348. package/lib/node_modules/@pneuma/log/locale/ui.zh.json +30 -0
  349. package/lib/node_modules/@pneuma/log/package.json +40 -0
  350. package/lib/node_modules/@pneuma/log/sink.d.ts +1 -0
  351. package/lib/node_modules/@pneuma/log/sink.js +1 -0
  352. package/lib/node_modules/@pneuma/lsp/client.d.ts +1 -0
  353. package/lib/node_modules/@pneuma/lsp/client.js +1 -0
  354. package/lib/node_modules/@pneuma/lsp/cordis.patch.yml +5 -0
  355. package/lib/node_modules/@pneuma/lsp/framing.d.ts +1 -0
  356. package/lib/node_modules/@pneuma/lsp/framing.js +1 -0
  357. package/lib/node_modules/@pneuma/lsp/index.d.ts +1 -0
  358. package/lib/node_modules/@pneuma/lsp/index.js +1 -0
  359. package/lib/node_modules/@pneuma/lsp/line-shift.d.ts +1 -0
  360. package/lib/node_modules/@pneuma/lsp/line-shift.js +1 -0
  361. package/lib/node_modules/@pneuma/lsp/locale/en.json +4 -0
  362. package/lib/node_modules/@pneuma/lsp/locale/ui.en.json +17 -0
  363. package/lib/node_modules/@pneuma/lsp/locale/ui.zh.json +17 -0
  364. package/lib/node_modules/@pneuma/lsp/manager.d.ts +1 -0
  365. package/lib/node_modules/@pneuma/lsp/manager.js +1 -0
  366. package/lib/node_modules/@pneuma/lsp/normalize.d.ts +1 -0
  367. package/lib/node_modules/@pneuma/lsp/normalize.js +1 -0
  368. package/lib/node_modules/@pneuma/lsp/package.json +40 -0
  369. package/lib/node_modules/@pneuma/lsp/servers.d.ts +1 -0
  370. package/lib/node_modules/@pneuma/lsp/servers.js +1 -0
  371. package/lib/node_modules/@pneuma/lsp/uri.d.ts +1 -0
  372. package/lib/node_modules/@pneuma/lsp/uri.js +1 -0
  373. package/lib/node_modules/@pneuma/mcp/cordis.patch.yml +5 -0
  374. package/lib/node_modules/@pneuma/mcp/index.d.ts +1 -0
  375. package/lib/node_modules/@pneuma/mcp/index.js +1 -0
  376. package/lib/node_modules/@pneuma/mcp/locale/en.json +4 -0
  377. package/lib/node_modules/@pneuma/mcp/locale/ui.en.json +28 -0
  378. package/lib/node_modules/@pneuma/mcp/locale/ui.zh.json +28 -0
  379. package/lib/node_modules/@pneuma/mcp/mcp.d.ts +1 -0
  380. package/lib/node_modules/@pneuma/mcp/mcp.js +1 -0
  381. package/lib/node_modules/@pneuma/mcp/package.json +40 -0
  382. package/lib/node_modules/@pneuma/memory/cordis.patch.yml +4 -0
  383. package/lib/node_modules/@pneuma/memory/index.d.ts +1 -0
  384. package/lib/node_modules/@pneuma/memory/index.js +1 -0
  385. package/lib/node_modules/@pneuma/memory/locale/en.json +4 -0
  386. package/lib/node_modules/@pneuma/memory/locale/ui.en.json +67 -0
  387. package/lib/node_modules/@pneuma/memory/locale/ui.zh.json +67 -0
  388. package/lib/node_modules/@pneuma/memory/memory-eval.d.ts +1 -0
  389. package/lib/node_modules/@pneuma/memory/memory-eval.js +1 -0
  390. package/lib/node_modules/@pneuma/memory/memory.d.ts +1 -0
  391. package/lib/node_modules/@pneuma/memory/memory.js +1 -0
  392. package/lib/node_modules/@pneuma/memory/package.json +39 -0
  393. package/lib/node_modules/@pneuma/microcompact/cordis.patch.yml +4 -0
  394. package/lib/node_modules/@pneuma/microcompact/index.d.ts +1 -0
  395. package/lib/node_modules/@pneuma/microcompact/index.js +1 -0
  396. package/lib/node_modules/@pneuma/microcompact/locale/en.json +4 -0
  397. package/lib/node_modules/@pneuma/microcompact/locale/ui.en.json +20 -0
  398. package/lib/node_modules/@pneuma/microcompact/locale/ui.zh.json +20 -0
  399. package/lib/node_modules/@pneuma/microcompact/microcompact.d.ts +1 -0
  400. package/lib/node_modules/@pneuma/microcompact/microcompact.js +1 -0
  401. package/lib/node_modules/@pneuma/microcompact/package.json +39 -0
  402. package/lib/node_modules/@pneuma/mode/cordis.patch.yml +4 -0
  403. package/lib/node_modules/@pneuma/mode/index.d.ts +1 -0
  404. package/lib/node_modules/@pneuma/mode/index.js +1 -0
  405. package/lib/node_modules/@pneuma/mode/locale/en.json +4 -0
  406. package/lib/node_modules/@pneuma/mode/package.json +38 -0
  407. package/lib/node_modules/@pneuma/ops/cordis.patch.yml +5 -0
  408. package/lib/node_modules/@pneuma/ops/index.d.ts +1 -0
  409. package/lib/node_modules/@pneuma/ops/index.js +1 -0
  410. package/lib/node_modules/@pneuma/ops/locale/en.json +4 -0
  411. package/lib/node_modules/@pneuma/ops/locale/ui.en.json +21 -0
  412. package/lib/node_modules/@pneuma/ops/locale/ui.zh.json +21 -0
  413. package/lib/node_modules/@pneuma/ops/package.json +41 -0
  414. package/lib/node_modules/@pneuma/ops/render.d.ts +1 -0
  415. package/lib/node_modules/@pneuma/ops/render.js +1 -0
  416. package/lib/node_modules/@pneuma/ops/tools.d.ts +1 -0
  417. package/lib/node_modules/@pneuma/ops/tools.js +1 -0
  418. package/lib/node_modules/@pneuma/ops/worker.d.ts +1 -0
  419. package/lib/node_modules/@pneuma/ops/worker.js +1 -0
  420. package/lib/node_modules/@pneuma/permission-core/index.d.ts +1 -0
  421. package/lib/node_modules/@pneuma/permission-core/index.js +1 -0
  422. package/lib/node_modules/@pneuma/permission-core/locale/en.json +4 -0
  423. package/lib/node_modules/@pneuma/permission-core/package.json +35 -0
  424. package/lib/node_modules/@pneuma/permission-core/permission-presets.d.ts +1 -0
  425. package/lib/node_modules/@pneuma/permission-core/permission-presets.js +1 -0
  426. package/lib/node_modules/@pneuma/permission-core/permission-scope.d.ts +1 -0
  427. package/lib/node_modules/@pneuma/permission-core/permission-scope.js +1 -0
  428. package/lib/node_modules/@pneuma/permission-presets/cordis.patch.yml +4 -0
  429. package/lib/node_modules/@pneuma/permission-presets/index.d.ts +1 -0
  430. package/lib/node_modules/@pneuma/permission-presets/index.js +1 -0
  431. package/lib/node_modules/@pneuma/permission-presets/locale/en.json +4 -0
  432. package/lib/node_modules/@pneuma/permission-presets/locale/ui.en.json +10 -0
  433. package/lib/node_modules/@pneuma/permission-presets/locale/ui.zh.json +10 -0
  434. package/lib/node_modules/@pneuma/permission-presets/package.json +38 -0
  435. package/lib/node_modules/@pneuma/plan/cordis.patch.yml +4 -0
  436. package/lib/node_modules/@pneuma/plan/index.d.ts +1 -0
  437. package/lib/node_modules/@pneuma/plan/index.js +1 -0
  438. package/lib/node_modules/@pneuma/plan/locale/en.json +4 -0
  439. package/lib/node_modules/@pneuma/plan/package.json +38 -0
  440. package/lib/node_modules/@pneuma/plugin-manager/cordis.patch.yml +4 -0
  441. package/lib/node_modules/@pneuma/plugin-manager/index.d.ts +1 -0
  442. package/lib/node_modules/@pneuma/plugin-manager/index.js +1 -0
  443. package/lib/node_modules/@pneuma/plugin-manager/locale/en.json +4 -0
  444. package/lib/node_modules/@pneuma/plugin-manager/package.json +38 -0
  445. package/lib/node_modules/@pneuma/presets/cordis.patch.yml +4 -0
  446. package/lib/node_modules/@pneuma/presets/index.d.ts +1 -0
  447. package/lib/node_modules/@pneuma/presets/index.js +1 -0
  448. package/lib/node_modules/@pneuma/presets/locale/en.json +4 -0
  449. package/lib/node_modules/@pneuma/presets/locale/ui.en.json +10 -0
  450. package/lib/node_modules/@pneuma/presets/locale/ui.zh.json +10 -0
  451. package/lib/node_modules/@pneuma/presets/package.json +38 -0
  452. package/lib/node_modules/@pneuma/prompt/cordis.patch.yml +4 -0
  453. package/lib/node_modules/@pneuma/prompt/index.d.ts +1 -0
  454. package/lib/node_modules/@pneuma/prompt/index.js +1 -0
  455. package/lib/node_modules/@pneuma/prompt/locale/en.json +4 -0
  456. package/lib/node_modules/@pneuma/prompt/package.json +38 -0
  457. package/lib/node_modules/@pneuma/prompt/tool-result-prune.d.ts +1 -0
  458. package/lib/node_modules/@pneuma/prompt/tool-result-prune.js +1 -0
  459. package/lib/node_modules/@pneuma/ptc/cordis.patch.yml +4 -0
  460. package/lib/node_modules/@pneuma/ptc/index.d.ts +1 -0
  461. package/lib/node_modules/@pneuma/ptc/index.js +1 -0
  462. package/lib/node_modules/@pneuma/ptc/locale/en.json +4 -0
  463. package/lib/node_modules/@pneuma/ptc/package.json +38 -0
  464. package/lib/node_modules/@pneuma/remote/cordis.patch.yml +4 -0
  465. package/lib/node_modules/@pneuma/remote/http.d.ts +1 -0
  466. package/lib/node_modules/@pneuma/remote/http.js +1 -0
  467. package/lib/node_modules/@pneuma/remote/index.d.ts +1 -0
  468. package/lib/node_modules/@pneuma/remote/index.js +1 -0
  469. package/lib/node_modules/@pneuma/remote/locale/en.json +4 -0
  470. package/lib/node_modules/@pneuma/remote/locale/ui.en.json +76 -0
  471. package/lib/node_modules/@pneuma/remote/locale/ui.zh.json +76 -0
  472. package/lib/node_modules/@pneuma/remote/package.json +38 -0
  473. package/lib/node_modules/@pneuma/remote/routes.d.ts +1 -0
  474. package/lib/node_modules/@pneuma/remote/routes.js +1 -0
  475. package/lib/node_modules/@pneuma/remote/types.d.ts +1 -0
  476. package/lib/node_modules/@pneuma/remote/types.js +1 -0
  477. package/lib/node_modules/@pneuma/runtime/adapter/transcript.d.ts +1 -0
  478. package/lib/node_modules/@pneuma/runtime/adapter/transcript.js +1 -0
  479. package/lib/node_modules/@pneuma/runtime/boot.d.ts +1 -0
  480. package/lib/node_modules/@pneuma/runtime/boot.js +1 -0
  481. package/lib/node_modules/@pneuma/runtime/contract/approval.d.ts +1 -0
  482. package/lib/node_modules/@pneuma/runtime/contract/approval.js +1 -0
  483. package/lib/node_modules/@pneuma/runtime/contract/fonts.d.ts +1 -0
  484. package/lib/node_modules/@pneuma/runtime/contract/fonts.js +1 -0
  485. package/lib/node_modules/@pneuma/runtime/contract/memory.d.ts +1 -0
  486. package/lib/node_modules/@pneuma/runtime/contract/memory.js +1 -0
  487. package/lib/node_modules/@pneuma/runtime/contract/mode.d.ts +1 -0
  488. package/lib/node_modules/@pneuma/runtime/contract/mode.js +1 -0
  489. package/lib/node_modules/@pneuma/runtime/contract/plugin.d.ts +1 -0
  490. package/lib/node_modules/@pneuma/runtime/contract/plugin.js +1 -0
  491. package/lib/node_modules/@pneuma/runtime/contract/remote.d.ts +1 -0
  492. package/lib/node_modules/@pneuma/runtime/contract/remote.js +1 -0
  493. package/lib/node_modules/@pneuma/runtime/contract/runtime.d.ts +1 -0
  494. package/lib/node_modules/@pneuma/runtime/contract/runtime.js +1 -0
  495. package/lib/node_modules/@pneuma/runtime/contract/session.d.ts +1 -0
  496. package/lib/node_modules/@pneuma/runtime/contract/session.js +1 -0
  497. package/lib/node_modules/@pneuma/runtime/contract/settings.d.ts +1 -0
  498. package/lib/node_modules/@pneuma/runtime/contract/settings.js +1 -0
  499. package/lib/node_modules/@pneuma/runtime/contract/snapshot.d.ts +1 -0
  500. package/lib/node_modules/@pneuma/runtime/contract/snapshot.js +1 -0
  501. package/lib/node_modules/@pneuma/runtime/contract/task.d.ts +1 -0
  502. package/lib/node_modules/@pneuma/runtime/contract/task.js +1 -0
  503. package/lib/node_modules/@pneuma/runtime/contract/transcript.d.ts +1 -0
  504. package/lib/node_modules/@pneuma/runtime/contract/transcript.js +1 -0
  505. package/lib/node_modules/@pneuma/runtime/contract/usage.d.ts +1 -0
  506. package/lib/node_modules/@pneuma/runtime/contract/usage.js +1 -0
  507. package/lib/node_modules/@pneuma/runtime/contract.d.ts +1 -0
  508. package/lib/node_modules/@pneuma/runtime/contract.js +1 -0
  509. package/lib/node_modules/@pneuma/runtime/core/attachments.d.ts +1 -0
  510. package/lib/node_modules/@pneuma/runtime/core/attachments.js +1 -0
  511. package/lib/node_modules/@pneuma/runtime/core/audit.d.ts +1 -0
  512. package/lib/node_modules/@pneuma/runtime/core/audit.js +1 -0
  513. package/lib/node_modules/@pneuma/runtime/core/boot-notices.d.ts +1 -0
  514. package/lib/node_modules/@pneuma/runtime/core/boot-notices.js +1 -0
  515. package/lib/node_modules/@pneuma/runtime/core/bytes.d.ts +1 -0
  516. package/lib/node_modules/@pneuma/runtime/core/bytes.js +1 -0
  517. package/lib/node_modules/@pneuma/runtime/core/child-env.d.ts +1 -0
  518. package/lib/node_modules/@pneuma/runtime/core/child-env.js +1 -0
  519. package/lib/node_modules/@pneuma/runtime/core/clamp.d.ts +1 -0
  520. package/lib/node_modules/@pneuma/runtime/core/clamp.js +1 -0
  521. package/lib/node_modules/@pneuma/runtime/core/clock.d.ts +1 -0
  522. package/lib/node_modules/@pneuma/runtime/core/clock.js +1 -0
  523. package/lib/node_modules/@pneuma/runtime/core/command-intent.d.ts +1 -0
  524. package/lib/node_modules/@pneuma/runtime/core/command-intent.js +1 -0
  525. package/lib/node_modules/@pneuma/runtime/core/command-policy.d.ts +1 -0
  526. package/lib/node_modules/@pneuma/runtime/core/command-policy.js +1 -0
  527. package/lib/node_modules/@pneuma/runtime/core/compact-anchors.d.ts +1 -0
  528. package/lib/node_modules/@pneuma/runtime/core/compact-anchors.js +1 -0
  529. package/lib/node_modules/@pneuma/runtime/core/config-store.d.ts +1 -0
  530. package/lib/node_modules/@pneuma/runtime/core/config-store.js +1 -0
  531. package/lib/node_modules/@pneuma/runtime/core/config.d.ts +1 -0
  532. package/lib/node_modules/@pneuma/runtime/core/config.js +1 -0
  533. package/lib/node_modules/@pneuma/runtime/core/context-injection-report.d.ts +1 -0
  534. package/lib/node_modules/@pneuma/runtime/core/context-injection-report.js +1 -0
  535. package/lib/node_modules/@pneuma/runtime/core/diff-text.d.ts +1 -0
  536. package/lib/node_modules/@pneuma/runtime/core/diff-text.js +1 -0
  537. package/lib/node_modules/@pneuma/runtime/core/dock-browser.d.ts +1 -0
  538. package/lib/node_modules/@pneuma/runtime/core/dock-browser.js +1 -0
  539. package/lib/node_modules/@pneuma/runtime/core/dock-ops.d.ts +1 -0
  540. package/lib/node_modules/@pneuma/runtime/core/dock-ops.js +1 -0
  541. package/lib/node_modules/@pneuma/runtime/core/dock-session.d.ts +1 -0
  542. package/lib/node_modules/@pneuma/runtime/core/dock-session.js +1 -0
  543. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/llm-usage-event.d.ts +1 -0
  544. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/llm-usage-event.js +1 -0
  545. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/presentation.d.ts +1 -0
  546. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/presentation.js +1 -0
  547. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/resolve-hook.d.ts +1 -0
  548. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/resolve-hook.js +1 -0
  549. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/service-map.d.ts +1 -0
  550. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/service-map.js +1 -0
  551. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/session-bridge.d.ts +1 -0
  552. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/session-bridge.js +1 -0
  553. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/session-events.d.ts +1 -0
  554. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/session-events.js +1 -0
  555. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/shims/credentials.d.ts +1 -0
  556. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/shims/credentials.js +1 -0
  557. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/shims/home-paths.d.ts +1 -0
  558. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/shims/home-paths.js +1 -0
  559. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/tools-facade.d.ts +1 -0
  560. package/lib/node_modules/@pneuma/runtime/core/dsh-compat/tools-facade.js +1 -0
  561. package/lib/node_modules/@pneuma/runtime/core/err-text.d.ts +1 -0
  562. package/lib/node_modules/@pneuma/runtime/core/err-text.js +1 -0
  563. package/lib/node_modules/@pneuma/runtime/core/events.d.ts +1 -0
  564. package/lib/node_modules/@pneuma/runtime/core/events.js +1 -0
  565. package/lib/node_modules/@pneuma/runtime/core/executable.d.ts +1 -0
  566. package/lib/node_modules/@pneuma/runtime/core/executable.js +1 -0
  567. package/lib/node_modules/@pneuma/runtime/core/git-exec.d.ts +1 -0
  568. package/lib/node_modules/@pneuma/runtime/core/git-exec.js +1 -0
  569. package/lib/node_modules/@pneuma/runtime/core/git-info.d.ts +1 -0
  570. package/lib/node_modules/@pneuma/runtime/core/git-info.js +1 -0
  571. package/lib/node_modules/@pneuma/runtime/core/git-surface.d.ts +1 -0
  572. package/lib/node_modules/@pneuma/runtime/core/git-surface.js +1 -0
  573. package/lib/node_modules/@pneuma/runtime/core/guard-session.d.ts +1 -0
  574. package/lib/node_modules/@pneuma/runtime/core/guard-session.js +1 -0
  575. package/lib/node_modules/@pneuma/runtime/core/host-browser-link.d.ts +1 -0
  576. package/lib/node_modules/@pneuma/runtime/core/host-browser-link.js +1 -0
  577. package/lib/node_modules/@pneuma/runtime/core/host-methods.d.ts +1 -0
  578. package/lib/node_modules/@pneuma/runtime/core/host-methods.js +1 -0
  579. package/lib/node_modules/@pneuma/runtime/core/http-debug.d.ts +1 -0
  580. package/lib/node_modules/@pneuma/runtime/core/http-debug.js +1 -0
  581. package/lib/node_modules/@pneuma/runtime/core/i18n-text.d.ts +1 -0
  582. package/lib/node_modules/@pneuma/runtime/core/i18n-text.js +1 -0
  583. package/lib/node_modules/@pneuma/runtime/core/i18n.d.ts +1 -0
  584. package/lib/node_modules/@pneuma/runtime/core/i18n.js +1 -0
  585. package/lib/node_modules/@pneuma/runtime/core/image-diet.d.ts +1 -0
  586. package/lib/node_modules/@pneuma/runtime/core/image-diet.js +1 -0
  587. package/lib/node_modules/@pneuma/runtime/core/json-text.d.ts +1 -0
  588. package/lib/node_modules/@pneuma/runtime/core/json-text.js +1 -0
  589. package/lib/node_modules/@pneuma/runtime/core/llm.d.ts +1 -0
  590. package/lib/node_modules/@pneuma/runtime/core/llm.js +1 -0
  591. package/lib/node_modules/@pneuma/runtime/core/lockfile.d.ts +1 -0
  592. package/lib/node_modules/@pneuma/runtime/core/lockfile.js +1 -0
  593. package/lib/node_modules/@pneuma/runtime/core/log-config.d.ts +1 -0
  594. package/lib/node_modules/@pneuma/runtime/core/log-config.js +1 -0
  595. package/lib/node_modules/@pneuma/runtime/core/mention.d.ts +1 -0
  596. package/lib/node_modules/@pneuma/runtime/core/mention.js +1 -0
  597. package/lib/node_modules/@pneuma/runtime/core/migrate.d.ts +1 -0
  598. package/lib/node_modules/@pneuma/runtime/core/migrate.js +1 -0
  599. package/lib/node_modules/@pneuma/runtime/core/model-caps.d.ts +1 -0
  600. package/lib/node_modules/@pneuma/runtime/core/model-caps.js +1 -0
  601. package/lib/node_modules/@pneuma/runtime/core/native-bridge.d.ts +1 -0
  602. package/lib/node_modules/@pneuma/runtime/core/native-bridge.js +1 -0
  603. package/lib/node_modules/@pneuma/runtime/core/os-lock.d.ts +1 -0
  604. package/lib/node_modules/@pneuma/runtime/core/os-lock.js +1 -0
  605. package/lib/node_modules/@pneuma/runtime/core/path-policy.d.ts +1 -0
  606. package/lib/node_modules/@pneuma/runtime/core/path-policy.js +1 -0
  607. package/lib/node_modules/@pneuma/runtime/core/plugin-bundle.d.ts +1 -0
  608. package/lib/node_modules/@pneuma/runtime/core/plugin-bundle.js +1 -0
  609. package/lib/node_modules/@pneuma/runtime/core/plugin-loader.d.ts +1 -0
  610. package/lib/node_modules/@pneuma/runtime/core/plugin-loader.js +1 -0
  611. package/lib/node_modules/@pneuma/runtime/core/plugin-locale.d.ts +1 -0
  612. package/lib/node_modules/@pneuma/runtime/core/plugin-locale.js +1 -0
  613. package/lib/node_modules/@pneuma/runtime/core/plugin-npm.d.ts +1 -0
  614. package/lib/node_modules/@pneuma/runtime/core/plugin-npm.js +1 -0
  615. package/lib/node_modules/@pneuma/runtime/core/plugin-patch.d.ts +1 -0
  616. package/lib/node_modules/@pneuma/runtime/core/plugin-patch.js +1 -0
  617. package/lib/node_modules/@pneuma/runtime/core/plugin-registry.d.ts +1 -0
  618. package/lib/node_modules/@pneuma/runtime/core/plugin-registry.js +1 -0
  619. package/lib/node_modules/@pneuma/runtime/core/plugin-watch.d.ts +1 -0
  620. package/lib/node_modules/@pneuma/runtime/core/plugin-watch.js +1 -0
  621. package/lib/node_modules/@pneuma/runtime/core/prefs.d.ts +1 -0
  622. package/lib/node_modules/@pneuma/runtime/core/prefs.js +1 -0
  623. package/lib/node_modules/@pneuma/runtime/core/pricing.d.ts +1 -0
  624. package/lib/node_modules/@pneuma/runtime/core/pricing.js +1 -0
  625. package/lib/node_modules/@pneuma/runtime/core/profile-bootstrap.d.ts +1 -0
  626. package/lib/node_modules/@pneuma/runtime/core/profile-bootstrap.js +1 -0
  627. package/lib/node_modules/@pneuma/runtime/core/profile-dir.d.ts +1 -0
  628. package/lib/node_modules/@pneuma/runtime/core/profile-dir.js +1 -0
  629. package/lib/node_modules/@pneuma/runtime/core/ptc.d.ts +1 -0
  630. package/lib/node_modules/@pneuma/runtime/core/ptc.js +1 -0
  631. package/lib/node_modules/@pneuma/runtime/core/records.d.ts +1 -0
  632. package/lib/node_modules/@pneuma/runtime/core/records.js +1 -0
  633. package/lib/node_modules/@pneuma/runtime/core/redact.d.ts +1 -0
  634. package/lib/node_modules/@pneuma/runtime/core/redact.js +1 -0
  635. package/lib/node_modules/@pneuma/runtime/core/remote/frames.d.ts +1 -0
  636. package/lib/node_modules/@pneuma/runtime/core/remote/frames.js +1 -0
  637. package/lib/node_modules/@pneuma/runtime/core/remote/notify.d.ts +1 -0
  638. package/lib/node_modules/@pneuma/runtime/core/remote/notify.js +1 -0
  639. package/lib/node_modules/@pneuma/runtime/core/remote/owner.d.ts +1 -0
  640. package/lib/node_modules/@pneuma/runtime/core/remote/owner.js +1 -0
  641. package/lib/node_modules/@pneuma/runtime/core/remote/pairing.d.ts +1 -0
  642. package/lib/node_modules/@pneuma/runtime/core/remote/pairing.js +1 -0
  643. package/lib/node_modules/@pneuma/runtime/core/remote/push.d.ts +1 -0
  644. package/lib/node_modules/@pneuma/runtime/core/remote/push.js +1 -0
  645. package/lib/node_modules/@pneuma/runtime/core/remote/store.d.ts +1 -0
  646. package/lib/node_modules/@pneuma/runtime/core/remote/store.js +1 -0
  647. package/lib/node_modules/@pneuma/runtime/core/remote/tickets.d.ts +1 -0
  648. package/lib/node_modules/@pneuma/runtime/core/remote/tickets.js +1 -0
  649. package/lib/node_modules/@pneuma/runtime/core/remote/uploads.d.ts +1 -0
  650. package/lib/node_modules/@pneuma/runtime/core/remote/uploads.js +1 -0
  651. package/lib/node_modules/@pneuma/runtime/core/repeat-reminder.d.ts +1 -0
  652. package/lib/node_modules/@pneuma/runtime/core/repeat-reminder.js +1 -0
  653. package/lib/node_modules/@pneuma/runtime/core/request-attribution.d.ts +1 -0
  654. package/lib/node_modules/@pneuma/runtime/core/request-attribution.js +1 -0
  655. package/lib/node_modules/@pneuma/runtime/core/request-invariant.d.ts +1 -0
  656. package/lib/node_modules/@pneuma/runtime/core/request-invariant.js +1 -0
  657. package/lib/node_modules/@pneuma/runtime/core/schedule/rule.d.ts +1 -0
  658. package/lib/node_modules/@pneuma/runtime/core/schedule/rule.js +1 -0
  659. package/lib/node_modules/@pneuma/runtime/core/schedule/runner.d.ts +1 -0
  660. package/lib/node_modules/@pneuma/runtime/core/schedule/runner.js +1 -0
  661. package/lib/node_modules/@pneuma/runtime/core/schedule/store.d.ts +1 -0
  662. package/lib/node_modules/@pneuma/runtime/core/schedule/store.js +1 -0
  663. package/lib/node_modules/@pneuma/runtime/core/secrets.d.ts +1 -0
  664. package/lib/node_modules/@pneuma/runtime/core/secrets.js +1 -0
  665. package/lib/node_modules/@pneuma/runtime/core/session-meta.d.ts +1 -0
  666. package/lib/node_modules/@pneuma/runtime/core/session-meta.js +1 -0
  667. package/lib/node_modules/@pneuma/runtime/core/session.d.ts +1 -0
  668. package/lib/node_modules/@pneuma/runtime/core/session.js +1 -0
  669. package/lib/node_modules/@pneuma/runtime/core/shell-quote.d.ts +1 -0
  670. package/lib/node_modules/@pneuma/runtime/core/shell-quote.js +1 -0
  671. package/lib/node_modules/@pneuma/runtime/core/side-ask.d.ts +1 -0
  672. package/lib/node_modules/@pneuma/runtime/core/side-ask.js +1 -0
  673. package/lib/node_modules/@pneuma/runtime/core/skills.d.ts +1 -0
  674. package/lib/node_modules/@pneuma/runtime/core/skills.js +1 -0
  675. package/lib/node_modules/@pneuma/runtime/core/snapshot-throttle.d.ts +1 -0
  676. package/lib/node_modules/@pneuma/runtime/core/snapshot-throttle.js +1 -0
  677. package/lib/node_modules/@pneuma/runtime/core/spill.d.ts +1 -0
  678. package/lib/node_modules/@pneuma/runtime/core/spill.js +1 -0
  679. package/lib/node_modules/@pneuma/runtime/core/strings.d.ts +1 -0
  680. package/lib/node_modules/@pneuma/runtime/core/strings.js +1 -0
  681. package/lib/node_modules/@pneuma/runtime/core/team-board.d.ts +1 -0
  682. package/lib/node_modules/@pneuma/runtime/core/team-board.js +1 -0
  683. package/lib/node_modules/@pneuma/runtime/core/terminal-env.d.ts +1 -0
  684. package/lib/node_modules/@pneuma/runtime/core/terminal-env.js +1 -0
  685. package/lib/node_modules/@pneuma/runtime/core/text-format.d.ts +1 -0
  686. package/lib/node_modules/@pneuma/runtime/core/text-format.js +1 -0
  687. package/lib/node_modules/@pneuma/runtime/core/throughput.d.ts +1 -0
  688. package/lib/node_modules/@pneuma/runtime/core/throughput.js +1 -0
  689. package/lib/node_modules/@pneuma/runtime/core/todo-reminder-cadence.d.ts +1 -0
  690. package/lib/node_modules/@pneuma/runtime/core/todo-reminder-cadence.js +1 -0
  691. package/lib/node_modules/@pneuma/runtime/core/todo-reminder.d.ts +1 -0
  692. package/lib/node_modules/@pneuma/runtime/core/todo-reminder.js +1 -0
  693. package/lib/node_modules/@pneuma/runtime/core/token-estimate.d.ts +1 -0
  694. package/lib/node_modules/@pneuma/runtime/core/token-estimate.js +1 -0
  695. package/lib/node_modules/@pneuma/runtime/core/tool-guards.d.ts +1 -0
  696. package/lib/node_modules/@pneuma/runtime/core/tool-guards.js +1 -0
  697. package/lib/node_modules/@pneuma/runtime/core/tools/command-runner.d.ts +1 -0
  698. package/lib/node_modules/@pneuma/runtime/core/tools/command-runner.js +1 -0
  699. package/lib/node_modules/@pneuma/runtime/core/tools/fs-tools.d.ts +1 -0
  700. package/lib/node_modules/@pneuma/runtime/core/tools/fs-tools.js +1 -0
  701. package/lib/node_modules/@pneuma/runtime/core/tools/path-args.d.ts +1 -0
  702. package/lib/node_modules/@pneuma/runtime/core/tools/path-args.js +1 -0
  703. package/lib/node_modules/@pneuma/runtime/core/tools/sandbox-args.d.ts +1 -0
  704. package/lib/node_modules/@pneuma/runtime/core/tools/sandbox-args.js +1 -0
  705. package/lib/node_modules/@pneuma/runtime/core/tools.d.ts +1 -0
  706. package/lib/node_modules/@pneuma/runtime/core/tools.js +1 -0
  707. package/lib/node_modules/@pneuma/runtime/core/transcript-text.d.ts +1 -0
  708. package/lib/node_modules/@pneuma/runtime/core/transcript-text.js +1 -0
  709. package/lib/node_modules/@pneuma/runtime/core/ui-boot-source.d.ts +1 -0
  710. package/lib/node_modules/@pneuma/runtime/core/ui-boot-source.js +1 -0
  711. package/lib/node_modules/@pneuma/runtime/core/ui-bundles.d.ts +1 -0
  712. package/lib/node_modules/@pneuma/runtime/core/ui-bundles.js +1 -0
  713. package/lib/node_modules/@pneuma/runtime/core/ui-combo.d.ts +1 -0
  714. package/lib/node_modules/@pneuma/runtime/core/ui-combo.js +1 -0
  715. package/lib/node_modules/@pneuma/runtime/core/ui-events.d.ts +1 -0
  716. package/lib/node_modules/@pneuma/runtime/core/ui-events.js +1 -0
  717. package/lib/node_modules/@pneuma/runtime/core/ui-graph-frames.d.ts +1 -0
  718. package/lib/node_modules/@pneuma/runtime/core/ui-graph-frames.js +1 -0
  719. package/lib/node_modules/@pneuma/runtime/core/ui-hmr.d.ts +1 -0
  720. package/lib/node_modules/@pneuma/runtime/core/ui-hmr.js +1 -0
  721. package/lib/node_modules/@pneuma/runtime/core/ui-manifest.d.ts +1 -0
  722. package/lib/node_modules/@pneuma/runtime/core/ui-manifest.js +1 -0
  723. package/lib/node_modules/@pneuma/runtime/core/ui-methods.d.ts +1 -0
  724. package/lib/node_modules/@pneuma/runtime/core/ui-methods.js +1 -0
  725. package/lib/node_modules/@pneuma/runtime/core/ui-route.d.ts +1 -0
  726. package/lib/node_modules/@pneuma/runtime/core/ui-route.js +1 -0
  727. package/lib/node_modules/@pneuma/runtime/core/ui-server.d.ts +1 -0
  728. package/lib/node_modules/@pneuma/runtime/core/ui-server.js +1 -0
  729. package/lib/node_modules/@pneuma/runtime/core/ui-trust.d.ts +1 -0
  730. package/lib/node_modules/@pneuma/runtime/core/ui-trust.js +1 -0
  731. package/lib/node_modules/@pneuma/runtime/core/unified-diff.d.ts +1 -0
  732. package/lib/node_modules/@pneuma/runtime/core/unified-diff.js +1 -0
  733. package/lib/node_modules/@pneuma/runtime/core/untrusted.d.ts +1 -0
  734. package/lib/node_modules/@pneuma/runtime/core/untrusted.js +1 -0
  735. package/lib/node_modules/@pneuma/runtime/core/update-check.d.ts +1 -0
  736. package/lib/node_modules/@pneuma/runtime/core/update-check.js +1 -0
  737. package/lib/node_modules/@pneuma/runtime/core/usage-log.d.ts +1 -0
  738. package/lib/node_modules/@pneuma/runtime/core/usage-log.js +1 -0
  739. package/lib/node_modules/@pneuma/runtime/core/version.d.ts +1 -0
  740. package/lib/node_modules/@pneuma/runtime/core/version.js +1 -0
  741. package/lib/node_modules/@pneuma/runtime/core/web-http.d.ts +1 -0
  742. package/lib/node_modules/@pneuma/runtime/core/web-http.js +1 -0
  743. package/lib/node_modules/@pneuma/runtime/core/web-static.d.ts +1 -0
  744. package/lib/node_modules/@pneuma/runtime/core/web-static.js +1 -0
  745. package/lib/node_modules/@pneuma/runtime/headless.d.ts +1 -0
  746. package/lib/node_modules/@pneuma/runtime/headless.js +1 -0
  747. package/lib/node_modules/@pneuma/runtime/package.json +11 -0
  748. package/lib/node_modules/@pneuma/runtime/services/types.d.ts +1 -0
  749. package/lib/node_modules/@pneuma/runtime/services/types.js +1 -0
  750. package/lib/node_modules/@pneuma/runtime-adapter/cordis.patch.yml +4 -0
  751. package/lib/node_modules/@pneuma/runtime-adapter/index.d.ts +1 -0
  752. package/lib/node_modules/@pneuma/runtime-adapter/index.js +1 -0
  753. package/lib/node_modules/@pneuma/runtime-adapter/locale/en.json +4 -0
  754. package/lib/node_modules/@pneuma/runtime-adapter/package.json +38 -0
  755. package/lib/node_modules/@pneuma/runtime-api/cordis.patch.yml +4 -0
  756. package/lib/node_modules/@pneuma/runtime-api/index.d.ts +1 -0
  757. package/lib/node_modules/@pneuma/runtime-api/index.js +1 -0
  758. package/lib/node_modules/@pneuma/runtime-api/inspect.d.ts +1 -0
  759. package/lib/node_modules/@pneuma/runtime-api/inspect.js +1 -0
  760. package/lib/node_modules/@pneuma/runtime-api/locale/en.json +4 -0
  761. package/lib/node_modules/@pneuma/runtime-api/package.json +38 -0
  762. package/lib/node_modules/@pneuma/sandbox/backends.d.ts +1 -0
  763. package/lib/node_modules/@pneuma/sandbox/backends.js +1 -0
  764. package/lib/node_modules/@pneuma/sandbox/cordis.patch.yml +4 -0
  765. package/lib/node_modules/@pneuma/sandbox/execpolicy.d.ts +1 -0
  766. package/lib/node_modules/@pneuma/sandbox/execpolicy.js +1 -0
  767. package/lib/node_modules/@pneuma/sandbox/index.d.ts +1 -0
  768. package/lib/node_modules/@pneuma/sandbox/index.js +1 -0
  769. package/lib/node_modules/@pneuma/sandbox/locale/en.json +4 -0
  770. package/lib/node_modules/@pneuma/sandbox/locale/ui.en.json +78 -0
  771. package/lib/node_modules/@pneuma/sandbox/locale/ui.zh.json +78 -0
  772. package/lib/node_modules/@pneuma/sandbox/net-proxy.d.ts +1 -0
  773. package/lib/node_modules/@pneuma/sandbox/net-proxy.js +1 -0
  774. package/lib/node_modules/@pneuma/sandbox/package.json +40 -0
  775. package/lib/node_modules/@pneuma/sandbox/policy.d.ts +1 -0
  776. package/lib/node_modules/@pneuma/sandbox/policy.js +1 -0
  777. package/lib/node_modules/@pneuma/sandbox/review.d.ts +1 -0
  778. package/lib/node_modules/@pneuma/sandbox/review.js +1 -0
  779. package/lib/node_modules/@pneuma/sandbox/win/abi.d.ts +1 -0
  780. package/lib/node_modules/@pneuma/sandbox/win/abi.js +1 -0
  781. package/lib/node_modules/@pneuma/sandbox/win/account.d.ts +1 -0
  782. package/lib/node_modules/@pneuma/sandbox/win/account.js +1 -0
  783. package/lib/node_modules/@pneuma/sandbox/win/acl.d.ts +1 -0
  784. package/lib/node_modules/@pneuma/sandbox/win/acl.js +1 -0
  785. package/lib/node_modules/@pneuma/sandbox/win/backend.d.ts +1 -0
  786. package/lib/node_modules/@pneuma/sandbox/win/backend.js +1 -0
  787. package/lib/node_modules/@pneuma/sandbox/win/doctor.d.ts +1 -0
  788. package/lib/node_modules/@pneuma/sandbox/win/doctor.js +1 -0
  789. package/lib/node_modules/@pneuma/sandbox/win/ffi.d.ts +1 -0
  790. package/lib/node_modules/@pneuma/sandbox/win/ffi.js +1 -0
  791. package/lib/node_modules/@pneuma/sandbox/win/interpreter.d.ts +1 -0
  792. package/lib/node_modules/@pneuma/sandbox/win/interpreter.js +1 -0
  793. package/lib/node_modules/@pneuma/sandbox/win/net-abi.d.ts +1 -0
  794. package/lib/node_modules/@pneuma/sandbox/win/net-abi.js +1 -0
  795. package/lib/node_modules/@pneuma/sandbox/win/runner-entry.d.ts +1 -0
  796. package/lib/node_modules/@pneuma/sandbox/win/runner-entry.js +1 -0
  797. package/lib/node_modules/@pneuma/sandbox/win/setup.d.ts +1 -0
  798. package/lib/node_modules/@pneuma/sandbox/win/setup.js +1 -0
  799. package/lib/node_modules/@pneuma/sandbox/win/sweep.d.ts +1 -0
  800. package/lib/node_modules/@pneuma/sandbox/win/sweep.js +1 -0
  801. package/lib/node_modules/@pneuma/sandbox/win/token.d.ts +1 -0
  802. package/lib/node_modules/@pneuma/sandbox/win/token.js +1 -0
  803. package/lib/node_modules/@pneuma/sandbox/win/utf16.d.ts +1 -0
  804. package/lib/node_modules/@pneuma/sandbox/win/utf16.js +1 -0
  805. package/lib/node_modules/@pneuma/sandbox/win/wfp.d.ts +1 -0
  806. package/lib/node_modules/@pneuma/sandbox/win/wfp.js +1 -0
  807. package/lib/node_modules/@pneuma/sandbox/win/workspace-sid.d.ts +1 -0
  808. package/lib/node_modules/@pneuma/sandbox/win/workspace-sid.js +1 -0
  809. package/lib/node_modules/@pneuma/schedule/cordis.patch.yml +5 -0
  810. package/lib/node_modules/@pneuma/schedule/index.d.ts +1 -0
  811. package/lib/node_modules/@pneuma/schedule/index.js +1 -0
  812. package/lib/node_modules/@pneuma/schedule/locale/en.json +4 -0
  813. package/lib/node_modules/@pneuma/schedule/locale/ui.en.json +29 -0
  814. package/lib/node_modules/@pneuma/schedule/locale/ui.zh.json +29 -0
  815. package/lib/node_modules/@pneuma/schedule/package.json +40 -0
  816. package/lib/node_modules/@pneuma/self-improve/cordis.patch.yml +5 -0
  817. package/lib/node_modules/@pneuma/self-improve/index.d.ts +1 -0
  818. package/lib/node_modules/@pneuma/self-improve/index.js +1 -0
  819. package/lib/node_modules/@pneuma/self-improve/ledger.d.ts +1 -0
  820. package/lib/node_modules/@pneuma/self-improve/ledger.js +1 -0
  821. package/lib/node_modules/@pneuma/self-improve/locale/en.json +4 -0
  822. package/lib/node_modules/@pneuma/self-improve/locale/ui.en.json +31 -0
  823. package/lib/node_modules/@pneuma/self-improve/locale/ui.zh.json +31 -0
  824. package/lib/node_modules/@pneuma/self-improve/package.json +41 -0
  825. package/lib/node_modules/@pneuma/self-improve/skill-write.d.ts +1 -0
  826. package/lib/node_modules/@pneuma/self-improve/skill-write.js +1 -0
  827. package/lib/node_modules/@pneuma/self-improve/store.d.ts +1 -0
  828. package/lib/node_modules/@pneuma/self-improve/store.js +1 -0
  829. package/lib/node_modules/@pneuma/session/cordis.patch.yml +4 -0
  830. package/lib/node_modules/@pneuma/session/index.d.ts +1 -0
  831. package/lib/node_modules/@pneuma/session/index.js +1 -0
  832. package/lib/node_modules/@pneuma/session/locale/en.json +4 -0
  833. package/lib/node_modules/@pneuma/session/package.json +38 -0
  834. package/lib/node_modules/@pneuma/session-core/compact.d.ts +1 -0
  835. package/lib/node_modules/@pneuma/session-core/compact.js +1 -0
  836. package/lib/node_modules/@pneuma/session-core/hooks.d.ts +1 -0
  837. package/lib/node_modules/@pneuma/session-core/hooks.js +1 -0
  838. package/lib/node_modules/@pneuma/session-core/index.d.ts +1 -0
  839. package/lib/node_modules/@pneuma/session-core/index.js +1 -0
  840. package/lib/node_modules/@pneuma/session-core/locale/en.json +4 -0
  841. package/lib/node_modules/@pneuma/session-core/loop.d.ts +1 -0
  842. package/lib/node_modules/@pneuma/session-core/loop.js +1 -0
  843. package/lib/node_modules/@pneuma/session-core/modes.d.ts +1 -0
  844. package/lib/node_modules/@pneuma/session-core/modes.js +1 -0
  845. package/lib/node_modules/@pneuma/session-core/package.json +38 -0
  846. package/lib/node_modules/@pneuma/session-core/prompt.d.ts +1 -0
  847. package/lib/node_modules/@pneuma/session-core/prompt.js +1 -0
  848. package/lib/node_modules/@pneuma/session-search/cordis.patch.yml +4 -0
  849. package/lib/node_modules/@pneuma/session-search/index.d.ts +1 -0
  850. package/lib/node_modules/@pneuma/session-search/index.js +1 -0
  851. package/lib/node_modules/@pneuma/session-search/locale/en.json +4 -0
  852. package/lib/node_modules/@pneuma/session-search/locale/ui.en.json +29 -0
  853. package/lib/node_modules/@pneuma/session-search/locale/ui.zh.json +29 -0
  854. package/lib/node_modules/@pneuma/session-search/package.json +40 -0
  855. package/lib/node_modules/@pneuma/session-search/session-index.d.ts +1 -0
  856. package/lib/node_modules/@pneuma/session-search/session-index.js +1 -0
  857. package/lib/node_modules/@pneuma/session-title/cordis.patch.yml +4 -0
  858. package/lib/node_modules/@pneuma/session-title/index.d.ts +1 -0
  859. package/lib/node_modules/@pneuma/session-title/index.js +1 -0
  860. package/lib/node_modules/@pneuma/session-title/locale/en.json +4 -0
  861. package/lib/node_modules/@pneuma/session-title/package.json +38 -0
  862. package/lib/node_modules/@pneuma/settings/connection-test.d.ts +1 -0
  863. package/lib/node_modules/@pneuma/settings/connection-test.js +1 -0
  864. package/lib/node_modules/@pneuma/settings/cordis.patch.yml +4 -0
  865. package/lib/node_modules/@pneuma/settings/index.d.ts +1 -0
  866. package/lib/node_modules/@pneuma/settings/index.js +1 -0
  867. package/lib/node_modules/@pneuma/settings/locale/en.json +4 -0
  868. package/lib/node_modules/@pneuma/settings/locale/ui.en.json +94 -0
  869. package/lib/node_modules/@pneuma/settings/locale/ui.zh.json +94 -0
  870. package/lib/node_modules/@pneuma/settings/model-discovery.d.ts +1 -0
  871. package/lib/node_modules/@pneuma/settings/model-discovery.js +1 -0
  872. package/lib/node_modules/@pneuma/settings/package.json +38 -0
  873. package/lib/node_modules/@pneuma/skills/cordis.patch.yml +4 -0
  874. package/lib/node_modules/@pneuma/skills/index.d.ts +1 -0
  875. package/lib/node_modules/@pneuma/skills/index.js +1 -0
  876. package/lib/node_modules/@pneuma/skills/locale/en.json +4 -0
  877. package/lib/node_modules/@pneuma/skills/package.json +38 -0
  878. package/lib/node_modules/@pneuma/spill/cordis.patch.yml +4 -0
  879. package/lib/node_modules/@pneuma/spill/index.d.ts +1 -0
  880. package/lib/node_modules/@pneuma/spill/index.js +1 -0
  881. package/lib/node_modules/@pneuma/spill/locale/en.json +4 -0
  882. package/lib/node_modules/@pneuma/spill/locale/ui.en.json +31 -0
  883. package/lib/node_modules/@pneuma/spill/locale/ui.zh.json +31 -0
  884. package/lib/node_modules/@pneuma/spill/package.json +40 -0
  885. package/lib/node_modules/@pneuma/subagent/agent-roles.d.ts +1 -0
  886. package/lib/node_modules/@pneuma/subagent/agent-roles.js +1 -0
  887. package/lib/node_modules/@pneuma/subagent/board-snapshot.d.ts +1 -0
  888. package/lib/node_modules/@pneuma/subagent/board-snapshot.js +1 -0
  889. package/lib/node_modules/@pneuma/subagent/cordis.patch.yml +5 -0
  890. package/lib/node_modules/@pneuma/subagent/index.d.ts +1 -0
  891. package/lib/node_modules/@pneuma/subagent/index.js +1 -0
  892. package/lib/node_modules/@pneuma/subagent/locale/en.json +4 -0
  893. package/lib/node_modules/@pneuma/subagent/locale/ui.en.json +51 -0
  894. package/lib/node_modules/@pneuma/subagent/locale/ui.zh.json +51 -0
  895. package/lib/node_modules/@pneuma/subagent/package.json +40 -0
  896. package/lib/node_modules/@pneuma/superagent/app/api.d.ts +1 -0
  897. package/lib/node_modules/@pneuma/superagent/app/api.js +1 -0
  898. package/lib/node_modules/@pneuma/superagent/app/assessment.d.ts +1 -0
  899. package/lib/node_modules/@pneuma/superagent/app/assessment.js +1 -0
  900. package/lib/node_modules/@pneuma/superagent/app/cache.d.ts +1 -0
  901. package/lib/node_modules/@pneuma/superagent/app/cache.js +1 -0
  902. package/lib/node_modules/@pneuma/superagent/app/cards.d.ts +1 -0
  903. package/lib/node_modules/@pneuma/superagent/app/cards.js +1 -0
  904. package/lib/node_modules/@pneuma/superagent/app/context.d.ts +1 -0
  905. package/lib/node_modules/@pneuma/superagent/app/context.js +1 -0
  906. package/lib/node_modules/@pneuma/superagent/app/delivery.d.ts +1 -0
  907. package/lib/node_modules/@pneuma/superagent/app/delivery.js +1 -0
  908. package/lib/node_modules/@pneuma/superagent/app/effects.d.ts +1 -0
  909. package/lib/node_modules/@pneuma/superagent/app/effects.js +1 -0
  910. package/lib/node_modules/@pneuma/superagent/app/execution-environment.d.ts +1 -0
  911. package/lib/node_modules/@pneuma/superagent/app/execution-environment.js +1 -0
  912. package/lib/node_modules/@pneuma/superagent/app/links.d.ts +1 -0
  913. package/lib/node_modules/@pneuma/superagent/app/links.js +1 -0
  914. package/lib/node_modules/@pneuma/superagent/app/migration.d.ts +1 -0
  915. package/lib/node_modules/@pneuma/superagent/app/migration.js +1 -0
  916. package/lib/node_modules/@pneuma/superagent/app/notices.d.ts +1 -0
  917. package/lib/node_modules/@pneuma/superagent/app/notices.js +1 -0
  918. package/lib/node_modules/@pneuma/superagent/app/outbox.d.ts +1 -0
  919. package/lib/node_modules/@pneuma/superagent/app/outbox.js +1 -0
  920. package/lib/node_modules/@pneuma/superagent/app/passes.d.ts +1 -0
  921. package/lib/node_modules/@pneuma/superagent/app/passes.js +1 -0
  922. package/lib/node_modules/@pneuma/superagent/app/prompts.d.ts +1 -0
  923. package/lib/node_modules/@pneuma/superagent/app/prompts.js +1 -0
  924. package/lib/node_modules/@pneuma/superagent/app/resources.d.ts +1 -0
  925. package/lib/node_modules/@pneuma/superagent/app/resources.js +1 -0
  926. package/lib/node_modules/@pneuma/superagent/app/retry-health.d.ts +1 -0
  927. package/lib/node_modules/@pneuma/superagent/app/retry-health.js +1 -0
  928. package/lib/node_modules/@pneuma/superagent/app/role-models.d.ts +1 -0
  929. package/lib/node_modules/@pneuma/superagent/app/role-models.js +1 -0
  930. package/lib/node_modules/@pneuma/superagent/app/runtime.d.ts +1 -0
  931. package/lib/node_modules/@pneuma/superagent/app/runtime.js +1 -0
  932. package/lib/node_modules/@pneuma/superagent/app/sessions.d.ts +1 -0
  933. package/lib/node_modules/@pneuma/superagent/app/sessions.js +1 -0
  934. package/lib/node_modules/@pneuma/superagent/app/settings-history.d.ts +1 -0
  935. package/lib/node_modules/@pneuma/superagent/app/settings-history.js +1 -0
  936. package/lib/node_modules/@pneuma/superagent/app/settings.d.ts +1 -0
  937. package/lib/node_modules/@pneuma/superagent/app/settings.js +1 -0
  938. package/lib/node_modules/@pneuma/superagent/app/setup.d.ts +1 -0
  939. package/lib/node_modules/@pneuma/superagent/app/setup.js +1 -0
  940. package/lib/node_modules/@pneuma/superagent/app/skill-files.d.ts +1 -0
  941. package/lib/node_modules/@pneuma/superagent/app/skill-files.js +1 -0
  942. package/lib/node_modules/@pneuma/superagent/app/source-context.d.ts +1 -0
  943. package/lib/node_modules/@pneuma/superagent/app/source-context.js +1 -0
  944. package/lib/node_modules/@pneuma/superagent/app/store-read.d.ts +1 -0
  945. package/lib/node_modules/@pneuma/superagent/app/store-read.js +1 -0
  946. package/lib/node_modules/@pneuma/superagent/app/store.d.ts +1 -0
  947. package/lib/node_modules/@pneuma/superagent/app/store.js +1 -0
  948. package/lib/node_modules/@pneuma/superagent/app/tools/executor.d.ts +1 -0
  949. package/lib/node_modules/@pneuma/superagent/app/tools/executor.js +1 -0
  950. package/lib/node_modules/@pneuma/superagent/app/tools/main.d.ts +1 -0
  951. package/lib/node_modules/@pneuma/superagent/app/tools/main.js +1 -0
  952. package/lib/node_modules/@pneuma/superagent/app/tools/tool.d.ts +1 -0
  953. package/lib/node_modules/@pneuma/superagent/app/tools/tool.js +1 -0
  954. package/lib/node_modules/@pneuma/superagent/app/versions.d.ts +1 -0
  955. package/lib/node_modules/@pneuma/superagent/app/versions.js +1 -0
  956. package/lib/node_modules/@pneuma/superagent/app/views/overview.d.ts +1 -0
  957. package/lib/node_modules/@pneuma/superagent/app/views/overview.js +1 -0
  958. package/lib/node_modules/@pneuma/superagent/app/views/records.d.ts +1 -0
  959. package/lib/node_modules/@pneuma/superagent/app/views/records.js +1 -0
  960. package/lib/node_modules/@pneuma/superagent/app/views/settings.d.ts +1 -0
  961. package/lib/node_modules/@pneuma/superagent/app/views/settings.js +1 -0
  962. package/lib/node_modules/@pneuma/superagent/app/views/sources.d.ts +1 -0
  963. package/lib/node_modules/@pneuma/superagent/app/views/sources.js +1 -0
  964. package/lib/node_modules/@pneuma/superagent/app/views/text.d.ts +1 -0
  965. package/lib/node_modules/@pneuma/superagent/app/views/text.js +1 -0
  966. package/lib/node_modules/@pneuma/superagent/app/views/threads.d.ts +1 -0
  967. package/lib/node_modules/@pneuma/superagent/app/views/threads.js +1 -0
  968. package/lib/node_modules/@pneuma/superagent/app/views/tickets.d.ts +1 -0
  969. package/lib/node_modules/@pneuma/superagent/app/views/tickets.js +1 -0
  970. package/lib/node_modules/@pneuma/superagent/cordis.patch.yml +7 -0
  971. package/lib/node_modules/@pneuma/superagent/core/admission.d.ts +1 -0
  972. package/lib/node_modules/@pneuma/superagent/core/admission.js +1 -0
  973. package/lib/node_modules/@pneuma/superagent/core/assignments.d.ts +1 -0
  974. package/lib/node_modules/@pneuma/superagent/core/assignments.js +1 -0
  975. package/lib/node_modules/@pneuma/superagent/core/engine.d.ts +1 -0
  976. package/lib/node_modules/@pneuma/superagent/core/engine.js +1 -0
  977. package/lib/node_modules/@pneuma/superagent/core/errors.d.ts +1 -0
  978. package/lib/node_modules/@pneuma/superagent/core/errors.js +1 -0
  979. package/lib/node_modules/@pneuma/superagent/core/evals.d.ts +1 -0
  980. package/lib/node_modules/@pneuma/superagent/core/evals.js +1 -0
  981. package/lib/node_modules/@pneuma/superagent/core/ids.d.ts +1 -0
  982. package/lib/node_modules/@pneuma/superagent/core/ids.js +1 -0
  983. package/lib/node_modules/@pneuma/superagent/core/index.d.ts +1 -0
  984. package/lib/node_modules/@pneuma/superagent/core/index.js +1 -0
  985. package/lib/node_modules/@pneuma/superagent/core/intake.d.ts +1 -0
  986. package/lib/node_modules/@pneuma/superagent/core/intake.js +1 -0
  987. package/lib/node_modules/@pneuma/superagent/core/limits.d.ts +1 -0
  988. package/lib/node_modules/@pneuma/superagent/core/limits.js +1 -0
  989. package/lib/node_modules/@pneuma/superagent/core/memory.d.ts +1 -0
  990. package/lib/node_modules/@pneuma/superagent/core/memory.js +1 -0
  991. package/lib/node_modules/@pneuma/superagent/core/model.d.ts +1 -0
  992. package/lib/node_modules/@pneuma/superagent/core/model.js +1 -0
  993. package/lib/node_modules/@pneuma/superagent/core/part.d.ts +1 -0
  994. package/lib/node_modules/@pneuma/superagent/core/part.js +1 -0
  995. package/lib/node_modules/@pneuma/superagent/core/policy.d.ts +1 -0
  996. package/lib/node_modules/@pneuma/superagent/core/policy.js +1 -0
  997. package/lib/node_modules/@pneuma/superagent/core/ports.d.ts +1 -0
  998. package/lib/node_modules/@pneuma/superagent/core/ports.js +1 -0
  999. package/lib/node_modules/@pneuma/superagent/core/reasons.d.ts +1 -0
  1000. package/lib/node_modules/@pneuma/superagent/core/reasons.js +1 -0
  1001. package/lib/node_modules/@pneuma/superagent/core/replies.d.ts +1 -0
  1002. package/lib/node_modules/@pneuma/superagent/core/replies.js +1 -0
  1003. package/lib/node_modules/@pneuma/superagent/core/stage.d.ts +1 -0
  1004. package/lib/node_modules/@pneuma/superagent/core/stage.js +1 -0
  1005. package/lib/node_modules/@pneuma/superagent/core/tickets.d.ts +1 -0
  1006. package/lib/node_modules/@pneuma/superagent/core/tickets.js +1 -0
  1007. package/lib/node_modules/@pneuma/superagent/deployment.d.ts +1 -0
  1008. package/lib/node_modules/@pneuma/superagent/deployment.js +1 -0
  1009. package/lib/node_modules/@pneuma/superagent/executor/background.d.ts +1 -0
  1010. package/lib/node_modules/@pneuma/superagent/executor/background.js +1 -0
  1011. package/lib/node_modules/@pneuma/superagent/executor/dsh.d.ts +1 -0
  1012. package/lib/node_modules/@pneuma/superagent/executor/dsh.js +1 -0
  1013. package/lib/node_modules/@pneuma/superagent/host/command.d.ts +1 -0
  1014. package/lib/node_modules/@pneuma/superagent/host/command.js +1 -0
  1015. package/lib/node_modules/@pneuma/superagent/host/health.d.ts +1 -0
  1016. package/lib/node_modules/@pneuma/superagent/host/health.js +1 -0
  1017. package/lib/node_modules/@pneuma/superagent/host/settings-section.d.ts +1 -0
  1018. package/lib/node_modules/@pneuma/superagent/host/settings-section.js +1 -0
  1019. package/lib/node_modules/@pneuma/superagent/index.d.ts +1 -0
  1020. package/lib/node_modules/@pneuma/superagent/index.js +1 -0
  1021. package/lib/node_modules/@pneuma/superagent/infra/commands.d.ts +1 -0
  1022. package/lib/node_modules/@pneuma/superagent/infra/commands.js +1 -0
  1023. package/lib/node_modules/@pneuma/superagent/infra/environment.d.ts +1 -0
  1024. package/lib/node_modules/@pneuma/superagent/infra/environment.js +1 -0
  1025. package/lib/node_modules/@pneuma/superagent/infra/health.d.ts +1 -0
  1026. package/lib/node_modules/@pneuma/superagent/infra/health.js +1 -0
  1027. package/lib/node_modules/@pneuma/superagent/infra/text.d.ts +1 -0
  1028. package/lib/node_modules/@pneuma/superagent/infra/text.js +1 -0
  1029. package/lib/node_modules/@pneuma/superagent/kv.d.ts +1 -0
  1030. package/lib/node_modules/@pneuma/superagent/kv.js +1 -0
  1031. package/lib/node_modules/@pneuma/superagent/locale/en.json +4 -0
  1032. package/lib/node_modules/@pneuma/superagent/locale/ui.en.json +26 -0
  1033. package/lib/node_modules/@pneuma/superagent/locale/ui.zh.json +26 -0
  1034. package/lib/node_modules/@pneuma/superagent/package.json +46 -0
  1035. package/lib/node_modules/@pneuma/superagent/paths.d.ts +1 -0
  1036. package/lib/node_modules/@pneuma/superagent/paths.js +1 -0
  1037. package/lib/node_modules/@pneuma/superagent/prompts/admission.md +68 -0
  1038. package/lib/node_modules/@pneuma/superagent/prompts/cli.md +17 -0
  1039. package/lib/node_modules/@pneuma/superagent/prompts/dispatch.md +59 -0
  1040. package/lib/node_modules/@pneuma/superagent/prompts/handoff-orchestrator.md +4 -0
  1041. package/lib/node_modules/@pneuma/superagent/prompts/handoff-worker.md +7 -0
  1042. package/lib/node_modules/@pneuma/superagent/prompts/handoff.md +6 -0
  1043. package/lib/node_modules/@pneuma/superagent/prompts/orchestrator.md +16 -0
  1044. package/lib/node_modules/@pneuma/superagent/prompts/replies.md +35 -0
  1045. package/lib/node_modules/@pneuma/superagent/prompts/shared.md +7 -0
  1046. package/lib/node_modules/@pneuma/superagent/prompts/subscriptions.md +13 -0
  1047. package/lib/node_modules/@pneuma/superagent/prompts/team/communication.md +97 -0
  1048. package/lib/node_modules/@pneuma/superagent/prompts/team/delivery.md +28 -0
  1049. package/lib/node_modules/@pneuma/superagent/prompts/team/scope.md +22 -0
  1050. package/lib/node_modules/@pneuma/superagent/prompts/work.md +49 -0
  1051. package/lib/node_modules/@pneuma/superagent/prompts/worker.md +10 -0
  1052. package/lib/node_modules/@pneuma/superagent/setup.d.ts +1 -0
  1053. package/lib/node_modules/@pneuma/superagent/setup.js +1 -0
  1054. package/lib/node_modules/@pneuma/superagent/skills/dsh-superagent-feishu/SKILL.md +12 -0
  1055. package/lib/node_modules/@pneuma/superagent/skills/dsh-superagent-github/SKILL.md +14 -0
  1056. package/lib/node_modules/@pneuma/superagent/sources/admission-context.d.ts +1 -0
  1057. package/lib/node_modules/@pneuma/superagent/sources/admission-context.js +1 -0
  1058. package/lib/node_modules/@pneuma/superagent/sources/feishu-channel.d.ts +1 -0
  1059. package/lib/node_modules/@pneuma/superagent/sources/feishu-channel.js +1 -0
  1060. package/lib/node_modules/@pneuma/superagent/sources/feishu-image.d.ts +1 -0
  1061. package/lib/node_modules/@pneuma/superagent/sources/feishu-image.js +1 -0
  1062. package/lib/node_modules/@pneuma/superagent/sources/feishu-loops.d.ts +1 -0
  1063. package/lib/node_modules/@pneuma/superagent/sources/feishu-loops.js +1 -0
  1064. package/lib/node_modules/@pneuma/superagent/sources/feishu-read.d.ts +1 -0
  1065. package/lib/node_modules/@pneuma/superagent/sources/feishu-read.js +1 -0
  1066. package/lib/node_modules/@pneuma/superagent/sources/feishu-trigger.d.ts +1 -0
  1067. package/lib/node_modules/@pneuma/superagent/sources/feishu-trigger.js +1 -0
  1068. package/lib/node_modules/@pneuma/superagent/sources/feishu.d.ts +1 -0
  1069. package/lib/node_modules/@pneuma/superagent/sources/feishu.js +1 -0
  1070. package/lib/node_modules/@pneuma/superagent/sources/github-channel.d.ts +1 -0
  1071. package/lib/node_modules/@pneuma/superagent/sources/github-channel.js +1 -0
  1072. package/lib/node_modules/@pneuma/superagent/sources/github-pull.d.ts +1 -0
  1073. package/lib/node_modules/@pneuma/superagent/sources/github-pull.js +1 -0
  1074. package/lib/node_modules/@pneuma/superagent/sources/github-read.d.ts +1 -0
  1075. package/lib/node_modules/@pneuma/superagent/sources/github-read.js +1 -0
  1076. package/lib/node_modules/@pneuma/superagent/sources/github-trigger.d.ts +1 -0
  1077. package/lib/node_modules/@pneuma/superagent/sources/github-trigger.js +1 -0
  1078. package/lib/node_modules/@pneuma/superagent/sources/github.d.ts +1 -0
  1079. package/lib/node_modules/@pneuma/superagent/sources/github.js +1 -0
  1080. package/lib/node_modules/@pneuma/superagent/sources/host.d.ts +1 -0
  1081. package/lib/node_modules/@pneuma/superagent/sources/host.js +1 -0
  1082. package/lib/node_modules/@pneuma/superagent/sources/kind.d.ts +1 -0
  1083. package/lib/node_modules/@pneuma/superagent/sources/kind.js +1 -0
  1084. package/lib/node_modules/@pneuma/superagent/sources/poll.d.ts +1 -0
  1085. package/lib/node_modules/@pneuma/superagent/sources/poll.js +1 -0
  1086. package/lib/node_modules/@pneuma/superagent/sources/registry.d.ts +1 -0
  1087. package/lib/node_modules/@pneuma/superagent/sources/registry.js +1 -0
  1088. package/lib/node_modules/@pneuma/superagent-webhook/cordis.patch.yml +9 -0
  1089. package/lib/node_modules/@pneuma/superagent-webhook/index.d.ts +1 -0
  1090. package/lib/node_modules/@pneuma/superagent-webhook/index.js +1 -0
  1091. package/lib/node_modules/@pneuma/superagent-webhook/locale/en.json +4 -0
  1092. package/lib/node_modules/@pneuma/superagent-webhook/package.json +39 -0
  1093. package/lib/node_modules/@pneuma/superagent-webhook/tests/settings-contract.d.ts +1 -0
  1094. package/lib/node_modules/@pneuma/superagent-webhook/tests/settings-contract.js +1 -0
  1095. package/lib/node_modules/@pneuma/superagent-webhook/webhook.d.ts +1 -0
  1096. package/lib/node_modules/@pneuma/superagent-webhook/webhook.js +1 -0
  1097. package/lib/node_modules/@pneuma/surfaces/cordis.patch.yml +4 -0
  1098. package/lib/node_modules/@pneuma/surfaces/index.d.ts +1 -0
  1099. package/lib/node_modules/@pneuma/surfaces/index.js +1 -0
  1100. package/lib/node_modules/@pneuma/surfaces/locale/en.json +4 -0
  1101. package/lib/node_modules/@pneuma/surfaces/package.json +38 -0
  1102. package/lib/node_modules/@pneuma/surfaces/surface-registry.d.ts +1 -0
  1103. package/lib/node_modules/@pneuma/surfaces/surface-registry.js +1 -0
  1104. package/lib/node_modules/@pneuma/todo/cordis.patch.yml +4 -0
  1105. package/lib/node_modules/@pneuma/todo/index.d.ts +1 -0
  1106. package/lib/node_modules/@pneuma/todo/index.js +1 -0
  1107. package/lib/node_modules/@pneuma/todo/locale/en.json +4 -0
  1108. package/lib/node_modules/@pneuma/todo/locale/ui.en.json +11 -0
  1109. package/lib/node_modules/@pneuma/todo/locale/ui.zh.json +11 -0
  1110. package/lib/node_modules/@pneuma/todo/package.json +39 -0
  1111. package/lib/node_modules/@pneuma/todo/todo.d.ts +1 -0
  1112. package/lib/node_modules/@pneuma/todo/todo.js +1 -0
  1113. package/lib/node_modules/@pneuma/tool-search/cordis.patch.yml +5 -0
  1114. package/lib/node_modules/@pneuma/tool-search/index.d.ts +1 -0
  1115. package/lib/node_modules/@pneuma/tool-search/index.js +1 -0
  1116. package/lib/node_modules/@pneuma/tool-search/locale/en.json +4 -0
  1117. package/lib/node_modules/@pneuma/tool-search/locale/ui.en.json +36 -0
  1118. package/lib/node_modules/@pneuma/tool-search/locale/ui.zh.json +36 -0
  1119. package/lib/node_modules/@pneuma/tool-search/package.json +40 -0
  1120. package/lib/node_modules/@pneuma/tool-search/tool-search.d.ts +1 -0
  1121. package/lib/node_modules/@pneuma/tool-search/tool-search.js +1 -0
  1122. package/lib/node_modules/@pneuma/tools/cordis.patch.yml +4 -0
  1123. package/lib/node_modules/@pneuma/tools/index.d.ts +1 -0
  1124. package/lib/node_modules/@pneuma/tools/index.js +1 -0
  1125. package/lib/node_modules/@pneuma/tools/locale/en.json +4 -0
  1126. package/lib/node_modules/@pneuma/tools/package.json +38 -0
  1127. package/lib/node_modules/@pneuma/tools-default/bash.d.ts +1 -0
  1128. package/lib/node_modules/@pneuma/tools-default/bash.js +1 -0
  1129. package/lib/node_modules/@pneuma/tools-default/cordis.patch.yml +4 -0
  1130. package/lib/node_modules/@pneuma/tools-default/image-tool.d.ts +1 -0
  1131. package/lib/node_modules/@pneuma/tools-default/image-tool.js +1 -0
  1132. package/lib/node_modules/@pneuma/tools-default/index.d.ts +1 -0
  1133. package/lib/node_modules/@pneuma/tools-default/index.js +1 -0
  1134. package/lib/node_modules/@pneuma/tools-default/locale/en.json +4 -0
  1135. package/lib/node_modules/@pneuma/tools-default/locale/ui.en.json +27 -0
  1136. package/lib/node_modules/@pneuma/tools-default/locale/ui.zh.json +27 -0
  1137. package/lib/node_modules/@pneuma/tools-default/package.json +39 -0
  1138. package/lib/node_modules/@pneuma/tools-default/persistent-shell.d.ts +1 -0
  1139. package/lib/node_modules/@pneuma/tools-default/persistent-shell.js +1 -0
  1140. package/lib/node_modules/@pneuma/tools-default/search-tools.d.ts +1 -0
  1141. package/lib/node_modules/@pneuma/tools-default/search-tools.js +1 -0
  1142. package/lib/node_modules/@pneuma/transcript/cordis.patch.yml +4 -0
  1143. package/lib/node_modules/@pneuma/transcript/index.d.ts +1 -0
  1144. package/lib/node_modules/@pneuma/transcript/index.js +1 -0
  1145. package/lib/node_modules/@pneuma/transcript/locale/en.json +4 -0
  1146. package/lib/node_modules/@pneuma/transcript/package.json +38 -0
  1147. package/lib/node_modules/@pneuma/tui/app/AgentsOverlay.d.ts +1 -0
  1148. package/lib/node_modules/@pneuma/tui/app/AgentsOverlay.js +1 -0
  1149. package/lib/node_modules/@pneuma/tui/app/App.d.ts +1 -0
  1150. package/lib/node_modules/@pneuma/tui/app/App.js +1 -0
  1151. package/lib/node_modules/@pneuma/tui/app/ApprovalCard.d.ts +1 -0
  1152. package/lib/node_modules/@pneuma/tui/app/ApprovalCard.js +1 -0
  1153. package/lib/node_modules/@pneuma/tui/app/AskCard.d.ts +1 -0
  1154. package/lib/node_modules/@pneuma/tui/app/AskCard.js +1 -0
  1155. package/lib/node_modules/@pneuma/tui/app/ChatView.d.ts +1 -0
  1156. package/lib/node_modules/@pneuma/tui/app/ChatView.js +1 -0
  1157. package/lib/node_modules/@pneuma/tui/app/Composer.d.ts +1 -0
  1158. package/lib/node_modules/@pneuma/tui/app/Composer.js +1 -0
  1159. package/lib/node_modules/@pneuma/tui/app/DiffBlock.d.ts +1 -0
  1160. package/lib/node_modules/@pneuma/tui/app/DiffBlock.js +1 -0
  1161. package/lib/node_modules/@pneuma/tui/app/MarkdownView.d.ts +1 -0
  1162. package/lib/node_modules/@pneuma/tui/app/MarkdownView.js +1 -0
  1163. package/lib/node_modules/@pneuma/tui/app/ModelPicker.d.ts +1 -0
  1164. package/lib/node_modules/@pneuma/tui/app/ModelPicker.js +1 -0
  1165. package/lib/node_modules/@pneuma/tui/app/PickerFrame.d.ts +1 -0
  1166. package/lib/node_modules/@pneuma/tui/app/PickerFrame.js +1 -0
  1167. package/lib/node_modules/@pneuma/tui/app/PlanReviewCard.d.ts +1 -0
  1168. package/lib/node_modules/@pneuma/tui/app/PlanReviewCard.js +1 -0
  1169. package/lib/node_modules/@pneuma/tui/app/PresetPicker.d.ts +1 -0
  1170. package/lib/node_modules/@pneuma/tui/app/PresetPicker.js +1 -0
  1171. package/lib/node_modules/@pneuma/tui/app/PreviewOverlay.d.ts +1 -0
  1172. package/lib/node_modules/@pneuma/tui/app/PreviewOverlay.js +1 -0
  1173. package/lib/node_modules/@pneuma/tui/app/SessionPicker.d.ts +1 -0
  1174. package/lib/node_modules/@pneuma/tui/app/SessionPicker.js +1 -0
  1175. package/lib/node_modules/@pneuma/tui/app/SettingsOverlay.d.ts +1 -0
  1176. package/lib/node_modules/@pneuma/tui/app/SettingsOverlay.js +1 -0
  1177. package/lib/node_modules/@pneuma/tui/app/SkillsPicker.d.ts +1 -0
  1178. package/lib/node_modules/@pneuma/tui/app/SkillsPicker.js +1 -0
  1179. package/lib/node_modules/@pneuma/tui/app/StatusBar.d.ts +1 -0
  1180. package/lib/node_modules/@pneuma/tui/app/StatusBar.js +1 -0
  1181. package/lib/node_modules/@pneuma/tui/app/TaskStrips.d.ts +1 -0
  1182. package/lib/node_modules/@pneuma/tui/app/TaskStrips.js +1 -0
  1183. package/lib/node_modules/@pneuma/tui/app/TimelineRail.d.ts +1 -0
  1184. package/lib/node_modules/@pneuma/tui/app/TimelineRail.js +1 -0
  1185. package/lib/node_modules/@pneuma/tui/app/ToolCard.d.ts +1 -0
  1186. package/lib/node_modules/@pneuma/tui/app/ToolCard.js +1 -0
  1187. package/lib/node_modules/@pneuma/tui/app/TranscriptOverlay.d.ts +1 -0
  1188. package/lib/node_modules/@pneuma/tui/app/TranscriptOverlay.js +1 -0
  1189. package/lib/node_modules/@pneuma/tui/app/TranscriptViewport.d.ts +1 -0
  1190. package/lib/node_modules/@pneuma/tui/app/TranscriptViewport.js +1 -0
  1191. package/lib/node_modules/@pneuma/tui/app/Welcome.d.ts +1 -0
  1192. package/lib/node_modules/@pneuma/tui/app/Welcome.js +1 -0
  1193. package/lib/node_modules/@pneuma/tui/app/attach.d.ts +1 -0
  1194. package/lib/node_modules/@pneuma/tui/app/attach.js +1 -0
  1195. package/lib/node_modules/@pneuma/tui/app/click.d.ts +1 -0
  1196. package/lib/node_modules/@pneuma/tui/app/click.js +1 -0
  1197. package/lib/node_modules/@pneuma/tui/app/clipboard-image.d.ts +1 -0
  1198. package/lib/node_modules/@pneuma/tui/app/clipboard-image.js +1 -0
  1199. package/lib/node_modules/@pneuma/tui/app/cursor.d.ts +1 -0
  1200. package/lib/node_modules/@pneuma/tui/app/cursor.js +1 -0
  1201. package/lib/node_modules/@pneuma/tui/app/display-width.d.ts +1 -0
  1202. package/lib/node_modules/@pneuma/tui/app/display-width.js +1 -0
  1203. package/lib/node_modules/@pneuma/tui/app/history-store.d.ts +1 -0
  1204. package/lib/node_modules/@pneuma/tui/app/history-store.js +1 -0
  1205. package/lib/node_modules/@pneuma/tui/app/image-blocks.d.ts +1 -0
  1206. package/lib/node_modules/@pneuma/tui/app/image-blocks.js +1 -0
  1207. package/lib/node_modules/@pneuma/tui/app/keymap.d.ts +1 -0
  1208. package/lib/node_modules/@pneuma/tui/app/keymap.js +1 -0
  1209. package/lib/node_modules/@pneuma/tui/app/markdown.d.ts +1 -0
  1210. package/lib/node_modules/@pneuma/tui/app/markdown.js +1 -0
  1211. package/lib/node_modules/@pneuma/tui/app/mouse.d.ts +1 -0
  1212. package/lib/node_modules/@pneuma/tui/app/mouse.js +1 -0
  1213. package/lib/node_modules/@pneuma/tui/app/pointer.d.ts +1 -0
  1214. package/lib/node_modules/@pneuma/tui/app/pointer.js +1 -0
  1215. package/lib/node_modules/@pneuma/tui/app/scroll-model.d.ts +1 -0
  1216. package/lib/node_modules/@pneuma/tui/app/scroll-model.js +1 -0
  1217. package/lib/node_modules/@pneuma/tui/app/settings-model.d.ts +1 -0
  1218. package/lib/node_modules/@pneuma/tui/app/settings-model.js +1 -0
  1219. package/lib/node_modules/@pneuma/tui/app/snapshot-subscribe.d.ts +1 -0
  1220. package/lib/node_modules/@pneuma/tui/app/snapshot-subscribe.js +1 -0
  1221. package/lib/node_modules/@pneuma/tui/app/theme.d.ts +1 -0
  1222. package/lib/node_modules/@pneuma/tui/app/theme.js +1 -0
  1223. package/lib/node_modules/@pneuma/tui/app/ticker.d.ts +1 -0
  1224. package/lib/node_modules/@pneuma/tui/app/ticker.js +1 -0
  1225. package/lib/node_modules/@pneuma/tui/cordis.patch.yml +4 -0
  1226. package/lib/node_modules/@pneuma/tui/index.d.ts +1 -0
  1227. package/lib/node_modules/@pneuma/tui/index.js +1 -0
  1228. package/lib/node_modules/@pneuma/tui/locale/en.json +4 -0
  1229. package/lib/node_modules/@pneuma/tui/package.json +38 -0
  1230. package/lib/node_modules/@pneuma/ui-actions/cordis.patch.yml +5 -0
  1231. package/lib/node_modules/@pneuma/ui-actions/index.d.ts +1 -0
  1232. package/lib/node_modules/@pneuma/ui-actions/index.js +1 -0
  1233. package/lib/node_modules/@pneuma/ui-actions/locale/en.json +4 -0
  1234. package/lib/node_modules/@pneuma/ui-actions/locale/ui.en.json +3 -0
  1235. package/lib/node_modules/@pneuma/ui-actions/locale/ui.zh.json +3 -0
  1236. package/lib/node_modules/@pneuma/ui-actions/package.json +43 -0
  1237. package/lib/node_modules/@pneuma/ui-ask/cordis.patch.yml +5 -0
  1238. package/lib/node_modules/@pneuma/ui-ask/index.d.ts +1 -0
  1239. package/lib/node_modules/@pneuma/ui-ask/index.js +1 -0
  1240. package/lib/node_modules/@pneuma/ui-ask/locale/en.json +4 -0
  1241. package/lib/node_modules/@pneuma/ui-ask/locale/ui.en.json +28 -0
  1242. package/lib/node_modules/@pneuma/ui-ask/locale/ui.zh.json +28 -0
  1243. package/lib/node_modules/@pneuma/ui-ask/package.json +43 -0
  1244. package/lib/node_modules/@pneuma/ui-boot/index.d.ts +1 -0
  1245. package/lib/node_modules/@pneuma/ui-boot/index.js +1 -0
  1246. package/lib/node_modules/@pneuma/ui-boot/locale/en.json +4 -0
  1247. package/lib/node_modules/@pneuma/ui-boot/locale/ui.en.json +28 -0
  1248. package/lib/node_modules/@pneuma/ui-boot/locale/ui.zh.json +28 -0
  1249. package/lib/node_modules/@pneuma/ui-boot/package.json +38 -0
  1250. package/lib/node_modules/@pneuma/ui-browser/cordis.patch.yml +5 -0
  1251. package/lib/node_modules/@pneuma/ui-browser/index.d.ts +1 -0
  1252. package/lib/node_modules/@pneuma/ui-browser/index.js +1 -0
  1253. package/lib/node_modules/@pneuma/ui-browser/locale/en.json +4 -0
  1254. package/lib/node_modules/@pneuma/ui-browser/locale/ui.en.json +17 -0
  1255. package/lib/node_modules/@pneuma/ui-browser/locale/ui.zh.json +17 -0
  1256. package/lib/node_modules/@pneuma/ui-browser/package.json +43 -0
  1257. package/lib/node_modules/@pneuma/ui-composer/cordis.patch.yml +5 -0
  1258. package/lib/node_modules/@pneuma/ui-composer/index.d.ts +1 -0
  1259. package/lib/node_modules/@pneuma/ui-composer/index.js +1 -0
  1260. package/lib/node_modules/@pneuma/ui-composer/locale/en.json +4 -0
  1261. package/lib/node_modules/@pneuma/ui-composer/locale/ui.en.json +161 -0
  1262. package/lib/node_modules/@pneuma/ui-composer/locale/ui.zh.json +161 -0
  1263. package/lib/node_modules/@pneuma/ui-composer/package.json +44 -0
  1264. package/lib/node_modules/@pneuma/ui-core/arrival.d.ts +1 -0
  1265. package/lib/node_modules/@pneuma/ui-core/arrival.js +1 -0
  1266. package/lib/node_modules/@pneuma/ui-core/frames.d.ts +1 -0
  1267. package/lib/node_modules/@pneuma/ui-core/frames.js +1 -0
  1268. package/lib/node_modules/@pneuma/ui-core/i18n.d.ts +1 -0
  1269. package/lib/node_modules/@pneuma/ui-core/i18n.js +1 -0
  1270. package/lib/node_modules/@pneuma/ui-core/index.d.ts +1 -0
  1271. package/lib/node_modules/@pneuma/ui-core/index.js +1 -0
  1272. package/lib/node_modules/@pneuma/ui-core/locale/en.json +4 -0
  1273. package/lib/node_modules/@pneuma/ui-core/package.json +37 -0
  1274. package/lib/node_modules/@pneuma/ui-core/plugin.d.ts +1 -0
  1275. package/lib/node_modules/@pneuma/ui-core/plugin.js +1 -0
  1276. package/lib/node_modules/@pneuma/ui-core/scoped-slots.d.ts +1 -0
  1277. package/lib/node_modules/@pneuma/ui-core/scoped-slots.js +1 -0
  1278. package/lib/node_modules/@pneuma/ui-core/services-react.d.ts +1 -0
  1279. package/lib/node_modules/@pneuma/ui-core/services-react.js +1 -0
  1280. package/lib/node_modules/@pneuma/ui-core/services.d.ts +1 -0
  1281. package/lib/node_modules/@pneuma/ui-core/services.js +1 -0
  1282. package/lib/node_modules/@pneuma/ui-core/signal.d.ts +1 -0
  1283. package/lib/node_modules/@pneuma/ui-core/signal.js +1 -0
  1284. package/lib/node_modules/@pneuma/ui-core/slots-ink.d.ts +1 -0
  1285. package/lib/node_modules/@pneuma/ui-core/slots-ink.js +1 -0
  1286. package/lib/node_modules/@pneuma/ui-core/slots-react.d.ts +1 -0
  1287. package/lib/node_modules/@pneuma/ui-core/slots-react.js +1 -0
  1288. package/lib/node_modules/@pneuma/ui-core/slots.d.ts +1 -0
  1289. package/lib/node_modules/@pneuma/ui-core/slots.js +1 -0
  1290. package/lib/node_modules/@pneuma/ui-core/store.d.ts +1 -0
  1291. package/lib/node_modules/@pneuma/ui-core/store.js +1 -0
  1292. package/lib/node_modules/@pneuma/ui-core/tui-plugin-api.d.ts +1 -0
  1293. package/lib/node_modules/@pneuma/ui-core/tui-plugin-api.js +1 -0
  1294. package/lib/node_modules/@pneuma/ui-core/tui-plugins.d.ts +1 -0
  1295. package/lib/node_modules/@pneuma/ui-core/tui-plugins.js +1 -0
  1296. package/lib/node_modules/@pneuma/ui-dockkit/index.d.ts +1 -0
  1297. package/lib/node_modules/@pneuma/ui-dockkit/index.js +1 -0
  1298. package/lib/node_modules/@pneuma/ui-dockkit/locale/en.json +4 -0
  1299. package/lib/node_modules/@pneuma/ui-dockkit/locale/ui.en.json +21 -0
  1300. package/lib/node_modules/@pneuma/ui-dockkit/locale/ui.zh.json +21 -0
  1301. package/lib/node_modules/@pneuma/ui-dockkit/package.json +33 -0
  1302. package/lib/node_modules/@pneuma/ui-files/cordis.patch.yml +5 -0
  1303. package/lib/node_modules/@pneuma/ui-files/index.d.ts +1 -0
  1304. package/lib/node_modules/@pneuma/ui-files/index.js +1 -0
  1305. package/lib/node_modules/@pneuma/ui-files/locale/en.json +4 -0
  1306. package/lib/node_modules/@pneuma/ui-files/locale/ui.en.json +43 -0
  1307. package/lib/node_modules/@pneuma/ui-files/locale/ui.zh.json +43 -0
  1308. package/lib/node_modules/@pneuma/ui-files/package.json +43 -0
  1309. package/lib/node_modules/@pneuma/ui-layout/cordis.patch.yml +7 -0
  1310. package/lib/node_modules/@pneuma/ui-layout/index.d.ts +1 -0
  1311. package/lib/node_modules/@pneuma/ui-layout/index.js +1 -0
  1312. package/lib/node_modules/@pneuma/ui-layout/locale/en.json +4 -0
  1313. package/lib/node_modules/@pneuma/ui-layout/locale/ui.en.json +112 -0
  1314. package/lib/node_modules/@pneuma/ui-layout/locale/ui.zh.json +112 -0
  1315. package/lib/node_modules/@pneuma/ui-layout/package.json +44 -0
  1316. package/lib/node_modules/@pneuma/ui-palette/cordis.patch.yml +5 -0
  1317. package/lib/node_modules/@pneuma/ui-palette/index.d.ts +1 -0
  1318. package/lib/node_modules/@pneuma/ui-palette/index.js +1 -0
  1319. package/lib/node_modules/@pneuma/ui-palette/locale/en.json +4 -0
  1320. package/lib/node_modules/@pneuma/ui-palette/locale/ui.en.json +35 -0
  1321. package/lib/node_modules/@pneuma/ui-palette/locale/ui.zh.json +35 -0
  1322. package/lib/node_modules/@pneuma/ui-palette/package.json +43 -0
  1323. package/lib/node_modules/@pneuma/ui-plugins/cordis.patch.yml +5 -0
  1324. package/lib/node_modules/@pneuma/ui-plugins/index.d.ts +1 -0
  1325. package/lib/node_modules/@pneuma/ui-plugins/index.js +1 -0
  1326. package/lib/node_modules/@pneuma/ui-plugins/locale/en.json +4 -0
  1327. package/lib/node_modules/@pneuma/ui-plugins/locale/ui.en.json +134 -0
  1328. package/lib/node_modules/@pneuma/ui-plugins/locale/ui.zh.json +134 -0
  1329. package/lib/node_modules/@pneuma/ui-plugins/package.json +43 -0
  1330. package/lib/node_modules/@pneuma/ui-preview/cordis.patch.yml +5 -0
  1331. package/lib/node_modules/@pneuma/ui-preview/index.d.ts +1 -0
  1332. package/lib/node_modules/@pneuma/ui-preview/index.js +1 -0
  1333. package/lib/node_modules/@pneuma/ui-preview/locale/en.json +4 -0
  1334. package/lib/node_modules/@pneuma/ui-preview/locale/ui.en.json +29 -0
  1335. package/lib/node_modules/@pneuma/ui-preview/locale/ui.zh.json +29 -0
  1336. package/lib/node_modules/@pneuma/ui-preview/package.json +43 -0
  1337. package/lib/node_modules/@pneuma/ui-primitives/index.d.ts +1 -0
  1338. package/lib/node_modules/@pneuma/ui-primitives/index.js +1 -0
  1339. package/lib/node_modules/@pneuma/ui-primitives/locale/en.json +4 -0
  1340. package/lib/node_modules/@pneuma/ui-primitives/locale/ui.en.json +167 -0
  1341. package/lib/node_modules/@pneuma/ui-primitives/locale/ui.zh.json +167 -0
  1342. package/lib/node_modules/@pneuma/ui-primitives/package.json +33 -0
  1343. package/lib/node_modules/@pneuma/ui-prompt/cordis.patch.yml +5 -0
  1344. package/lib/node_modules/@pneuma/ui-prompt/index.d.ts +1 -0
  1345. package/lib/node_modules/@pneuma/ui-prompt/index.js +1 -0
  1346. package/lib/node_modules/@pneuma/ui-prompt/locale/en.json +4 -0
  1347. package/lib/node_modules/@pneuma/ui-prompt/locale/ui.en.json +73 -0
  1348. package/lib/node_modules/@pneuma/ui-prompt/locale/ui.zh.json +73 -0
  1349. package/lib/node_modules/@pneuma/ui-prompt/package.json +43 -0
  1350. package/lib/node_modules/@pneuma/ui-renderer/cordis.patch.yml +7 -0
  1351. package/lib/node_modules/@pneuma/ui-renderer/index.d.ts +1 -0
  1352. package/lib/node_modules/@pneuma/ui-renderer/index.js +1 -0
  1353. package/lib/node_modules/@pneuma/ui-renderer/locale/en.json +4 -0
  1354. package/lib/node_modules/@pneuma/ui-renderer/locale/ui.en.json +14 -0
  1355. package/lib/node_modules/@pneuma/ui-renderer/locale/ui.zh.json +14 -0
  1356. package/lib/node_modules/@pneuma/ui-renderer/package.json +45 -0
  1357. package/lib/node_modules/@pneuma/ui-runtime/index.d.ts +1 -0
  1358. package/lib/node_modules/@pneuma/ui-runtime/index.js +1 -0
  1359. package/lib/node_modules/@pneuma/ui-runtime/locale/en.json +4 -0
  1360. package/lib/node_modules/@pneuma/ui-runtime/locale/ui.en.json +5 -0
  1361. package/lib/node_modules/@pneuma/ui-runtime/locale/ui.zh.json +5 -0
  1362. package/lib/node_modules/@pneuma/ui-runtime/package.json +33 -0
  1363. package/lib/node_modules/@pneuma/ui-sessions/cordis.patch.yml +5 -0
  1364. package/lib/node_modules/@pneuma/ui-sessions/index.d.ts +1 -0
  1365. package/lib/node_modules/@pneuma/ui-sessions/index.js +1 -0
  1366. package/lib/node_modules/@pneuma/ui-sessions/locale/en.json +4 -0
  1367. package/lib/node_modules/@pneuma/ui-sessions/locale/ui.en.json +119 -0
  1368. package/lib/node_modules/@pneuma/ui-sessions/locale/ui.zh.json +119 -0
  1369. package/lib/node_modules/@pneuma/ui-sessions/package.json +43 -0
  1370. package/lib/node_modules/@pneuma/ui-settings/cordis.patch.yml +5 -0
  1371. package/lib/node_modules/@pneuma/ui-settings/index.d.ts +1 -0
  1372. package/lib/node_modules/@pneuma/ui-settings/index.js +1 -0
  1373. package/lib/node_modules/@pneuma/ui-settings/locale/en.json +4 -0
  1374. package/lib/node_modules/@pneuma/ui-settings/locale/ui.en.json +490 -0
  1375. package/lib/node_modules/@pneuma/ui-settings/locale/ui.zh.json +490 -0
  1376. package/lib/node_modules/@pneuma/ui-settings/package.json +43 -0
  1377. package/lib/node_modules/@pneuma/ui-skills/cordis.patch.yml +5 -0
  1378. package/lib/node_modules/@pneuma/ui-skills/index.d.ts +1 -0
  1379. package/lib/node_modules/@pneuma/ui-skills/index.js +1 -0
  1380. package/lib/node_modules/@pneuma/ui-skills/locale/en.json +4 -0
  1381. package/lib/node_modules/@pneuma/ui-skills/locale/ui.en.json +93 -0
  1382. package/lib/node_modules/@pneuma/ui-skills/locale/ui.zh.json +93 -0
  1383. package/lib/node_modules/@pneuma/ui-skills/package.json +43 -0
  1384. package/lib/node_modules/@pneuma/ui-slots/index.d.ts +1 -0
  1385. package/lib/node_modules/@pneuma/ui-slots/index.js +1 -0
  1386. package/lib/node_modules/@pneuma/ui-slots/locale/en.json +4 -0
  1387. package/lib/node_modules/@pneuma/ui-slots/locale/ui.en.json +4 -0
  1388. package/lib/node_modules/@pneuma/ui-slots/locale/ui.zh.json +4 -0
  1389. package/lib/node_modules/@pneuma/ui-slots/package.json +33 -0
  1390. package/lib/node_modules/@pneuma/ui-status/cordis.patch.yml +5 -0
  1391. package/lib/node_modules/@pneuma/ui-status/index.d.ts +1 -0
  1392. package/lib/node_modules/@pneuma/ui-status/index.js +1 -0
  1393. package/lib/node_modules/@pneuma/ui-status/locale/en.json +4 -0
  1394. package/lib/node_modules/@pneuma/ui-status/locale/ui.en.json +134 -0
  1395. package/lib/node_modules/@pneuma/ui-status/locale/ui.zh.json +134 -0
  1396. package/lib/node_modules/@pneuma/ui-status/package.json +43 -0
  1397. package/lib/node_modules/@pneuma/ui-statusbar/cordis.patch.yml +5 -0
  1398. package/lib/node_modules/@pneuma/ui-statusbar/index.d.ts +1 -0
  1399. package/lib/node_modules/@pneuma/ui-statusbar/index.js +1 -0
  1400. package/lib/node_modules/@pneuma/ui-statusbar/locale/en.json +4 -0
  1401. package/lib/node_modules/@pneuma/ui-statusbar/locale/ui.en.json +33 -0
  1402. package/lib/node_modules/@pneuma/ui-statusbar/locale/ui.zh.json +33 -0
  1403. package/lib/node_modules/@pneuma/ui-statusbar/package.json +44 -0
  1404. package/lib/node_modules/@pneuma/ui-superagent/cordis.patch.yml +10 -0
  1405. package/lib/node_modules/@pneuma/ui-superagent/index.d.ts +1 -0
  1406. package/lib/node_modules/@pneuma/ui-superagent/index.js +1 -0
  1407. package/lib/node_modules/@pneuma/ui-superagent/locale/en.json +4 -0
  1408. package/lib/node_modules/@pneuma/ui-superagent/locale/ui.en.json +117 -0
  1409. package/lib/node_modules/@pneuma/ui-superagent/locale/ui.zh.json +117 -0
  1410. package/lib/node_modules/@pneuma/ui-superagent/package.json +43 -0
  1411. package/lib/node_modules/@pneuma/ui-tasks/cordis.patch.yml +5 -0
  1412. package/lib/node_modules/@pneuma/ui-tasks/index.d.ts +1 -0
  1413. package/lib/node_modules/@pneuma/ui-tasks/index.js +1 -0
  1414. package/lib/node_modules/@pneuma/ui-tasks/locale/en.json +4 -0
  1415. package/lib/node_modules/@pneuma/ui-tasks/locale/ui.en.json +22 -0
  1416. package/lib/node_modules/@pneuma/ui-tasks/locale/ui.zh.json +22 -0
  1417. package/lib/node_modules/@pneuma/ui-tasks/package.json +43 -0
  1418. package/lib/node_modules/@pneuma/ui-team/cordis.patch.yml +5 -0
  1419. package/lib/node_modules/@pneuma/ui-team/index.d.ts +1 -0
  1420. package/lib/node_modules/@pneuma/ui-team/index.js +1 -0
  1421. package/lib/node_modules/@pneuma/ui-team/locale/en.json +4 -0
  1422. package/lib/node_modules/@pneuma/ui-team/locale/ui.en.json +19 -0
  1423. package/lib/node_modules/@pneuma/ui-team/locale/ui.zh.json +19 -0
  1424. package/lib/node_modules/@pneuma/ui-team/package.json +43 -0
  1425. package/lib/node_modules/@pneuma/ui-terminal/cordis.patch.yml +5 -0
  1426. package/lib/node_modules/@pneuma/ui-terminal/index.d.ts +1 -0
  1427. package/lib/node_modules/@pneuma/ui-terminal/index.js +1 -0
  1428. package/lib/node_modules/@pneuma/ui-terminal/locale/en.json +4 -0
  1429. package/lib/node_modules/@pneuma/ui-terminal/locale/ui.en.json +9 -0
  1430. package/lib/node_modules/@pneuma/ui-terminal/locale/ui.zh.json +9 -0
  1431. package/lib/node_modules/@pneuma/ui-terminal/package.json +43 -0
  1432. package/lib/node_modules/@pneuma/ui-trace/cordis.patch.yml +5 -0
  1433. package/lib/node_modules/@pneuma/ui-trace/index.d.ts +1 -0
  1434. package/lib/node_modules/@pneuma/ui-trace/index.js +1 -0
  1435. package/lib/node_modules/@pneuma/ui-trace/locale/en.json +4 -0
  1436. package/lib/node_modules/@pneuma/ui-trace/locale/ui.en.json +118 -0
  1437. package/lib/node_modules/@pneuma/ui-trace/locale/ui.zh.json +118 -0
  1438. package/lib/node_modules/@pneuma/ui-trace/package.json +46 -0
  1439. package/lib/node_modules/@pneuma/ui-transcript/cordis.patch.yml +4 -0
  1440. package/lib/node_modules/@pneuma/ui-transcript/index.d.ts +1 -0
  1441. package/lib/node_modules/@pneuma/ui-transcript/index.js +1 -0
  1442. package/lib/node_modules/@pneuma/ui-transcript/locale/en.json +4 -0
  1443. package/lib/node_modules/@pneuma/ui-transcript/locale/ui.en.json +281 -0
  1444. package/lib/node_modules/@pneuma/ui-transcript/locale/ui.zh.json +281 -0
  1445. package/lib/node_modules/@pneuma/ui-transcript/package.json +43 -0
  1446. package/lib/node_modules/@pneuma/waiting/cordis.patch.yml +4 -0
  1447. package/lib/node_modules/@pneuma/waiting/index.d.ts +1 -0
  1448. package/lib/node_modules/@pneuma/waiting/index.js +1 -0
  1449. package/lib/node_modules/@pneuma/waiting/locale/en.json +4 -0
  1450. package/lib/node_modules/@pneuma/waiting/package.json +38 -0
  1451. package/lib/node_modules/@pneuma/web-fetch/cordis.patch.yml +4 -0
  1452. package/lib/node_modules/@pneuma/web-fetch/html.d.ts +1 -0
  1453. package/lib/node_modules/@pneuma/web-fetch/html.js +1 -0
  1454. package/lib/node_modules/@pneuma/web-fetch/http.d.ts +1 -0
  1455. package/lib/node_modules/@pneuma/web-fetch/http.js +1 -0
  1456. package/lib/node_modules/@pneuma/web-fetch/index.d.ts +1 -0
  1457. package/lib/node_modules/@pneuma/web-fetch/index.js +1 -0
  1458. package/lib/node_modules/@pneuma/web-fetch/locale/en.json +4 -0
  1459. package/lib/node_modules/@pneuma/web-fetch/locale/ui.en.json +14 -0
  1460. package/lib/node_modules/@pneuma/web-fetch/locale/ui.zh.json +14 -0
  1461. package/lib/node_modules/@pneuma/web-fetch/package.json +40 -0
  1462. package/lib/node_modules/@pneuma/web-search/cordis.patch.yml +4 -0
  1463. package/lib/node_modules/@pneuma/web-search/index.d.ts +1 -0
  1464. package/lib/node_modules/@pneuma/web-search/index.js +1 -0
  1465. package/lib/node_modules/@pneuma/web-search/locale/en.json +4 -0
  1466. package/lib/node_modules/@pneuma/web-search/locale/ui.en.json +30 -0
  1467. package/lib/node_modules/@pneuma/web-search/locale/ui.zh.json +30 -0
  1468. package/lib/node_modules/@pneuma/web-search/package.json +40 -0
  1469. package/lib/node_modules/@pneuma/webserver/cordis.patch.yml +4 -0
  1470. package/lib/node_modules/@pneuma/webserver/index.d.ts +1 -0
  1471. package/lib/node_modules/@pneuma/webserver/index.js +1 -0
  1472. package/lib/node_modules/@pneuma/webserver/locale/en.json +4 -0
  1473. package/lib/node_modules/@pneuma/webserver/package.json +38 -0
  1474. package/lib/packages/agent/cache-probe.d.ts +56 -0
  1475. package/lib/packages/agent/cache-probe.js +169 -0
  1476. package/lib/packages/agent/index.d.ts +21 -0
  1477. package/lib/packages/agent/index.js +511 -0
  1478. package/lib/packages/agent/locale/en.json +4 -0
  1479. package/lib/packages/approval/approval.d.ts +11 -0
  1480. package/lib/packages/approval/approval.js +11 -0
  1481. package/lib/packages/approval/call-meaning.js +347 -0
  1482. package/lib/packages/approval/index.d.ts +26 -0
  1483. package/lib/packages/approval/index.js +1413 -0
  1484. package/lib/packages/approval/locale/en.json +4 -0
  1485. package/lib/packages/approval-floor/approval-floor.d.ts +192 -0
  1486. package/lib/packages/approval-floor/approval-floor.js +851 -0
  1487. package/lib/packages/approval-floor/index.js +236 -0
  1488. package/lib/packages/approval-floor/locale/en.json +4 -0
  1489. package/lib/packages/approval-floor/locale/ui.en.json +28 -0
  1490. package/lib/packages/approval-floor/locale/ui.zh.json +28 -0
  1491. package/lib/packages/ask/index.js +298 -0
  1492. package/lib/packages/ask/locale/en.json +4 -0
  1493. package/lib/packages/browser/index.d.ts +72 -0
  1494. package/lib/packages/browser/index.js +1286 -0
  1495. package/lib/packages/browser/locale/en.json +4 -0
  1496. package/lib/packages/browser/locale/ui.en.json +61 -0
  1497. package/lib/packages/browser/locale/ui.zh.json +61 -0
  1498. package/lib/packages/cdp/actions.js +655 -0
  1499. package/lib/packages/cdp/cloud-metadata.d.ts +9 -0
  1500. package/lib/packages/cdp/cloud-metadata.js +16 -0
  1501. package/lib/packages/cdp/index.d.ts +21 -0
  1502. package/lib/packages/cdp/index.js +21 -0
  1503. package/lib/packages/cdp/launch.js +491 -0
  1504. package/lib/packages/cdp/locale/en.json +4 -0
  1505. package/lib/packages/cdp/report.d.ts +42 -0
  1506. package/lib/packages/cdp/report.js +76 -0
  1507. package/lib/packages/cdp/ring-buffer.d.ts +25 -0
  1508. package/lib/packages/cdp/ring-buffer.js +44 -0
  1509. package/lib/packages/cdp/snapshot.d.ts +139 -0
  1510. package/lib/packages/cdp/snapshot.js +312 -0
  1511. package/lib/packages/cdp/transport.d.ts +147 -0
  1512. package/lib/packages/cdp/transport.js +359 -0
  1513. package/lib/packages/checkpoint/index.d.ts +21 -0
  1514. package/lib/packages/checkpoint/index.js +360 -0
  1515. package/lib/packages/checkpoint/locale/en.json +4 -0
  1516. package/lib/packages/checkpoint/locale/ui.en.json +15 -0
  1517. package/lib/packages/checkpoint/locale/ui.zh.json +15 -0
  1518. package/lib/packages/checkpoint/shadow.d.ts +166 -0
  1519. package/lib/packages/checkpoint/shadow.js +832 -0
  1520. package/lib/packages/cli/config-cli.js +89 -0
  1521. package/lib/packages/cli/index.d.ts +20 -0
  1522. package/lib/packages/cli/index.js +18 -0
  1523. package/lib/packages/cli/locale/en.json +4 -0
  1524. package/lib/packages/cli/plugin-cli.js +626 -0
  1525. package/lib/packages/cli/pnpm-builds.d.ts +26 -0
  1526. package/lib/packages/cli/pnpm-builds.js +68 -0
  1527. package/lib/packages/commands/index.d.ts +28 -0
  1528. package/lib/packages/commands/index.js +620 -0
  1529. package/lib/packages/commands/locale/en.json +4 -0
  1530. package/lib/packages/commands/session-export.d.ts +18 -0
  1531. package/lib/packages/commands/session-export.js +73 -0
  1532. package/lib/packages/commands-core/commands-completion.d.ts +106 -0
  1533. package/lib/packages/commands-core/commands-completion.js +245 -0
  1534. package/lib/packages/commands-core/index.d.ts +16 -0
  1535. package/lib/packages/commands-core/index.js +16 -0
  1536. package/lib/packages/commands-core/locale/en.json +4 -0
  1537. package/lib/packages/compact/index.d.ts +21 -0
  1538. package/lib/packages/compact/index.js +457 -0
  1539. package/lib/packages/compact/locale/en.json +4 -0
  1540. package/lib/packages/compact/locale/ui.en.json +24 -0
  1541. package/lib/packages/compact/locale/ui.zh.json +24 -0
  1542. package/lib/packages/computer-use/desktop-control.d.ts +298 -0
  1543. package/lib/packages/computer-use/desktop-control.js +1309 -0
  1544. package/lib/packages/computer-use/index.d.ts +47 -0
  1545. package/lib/packages/computer-use/index.js +564 -0
  1546. package/lib/packages/computer-use/locale/en.json +4 -0
  1547. package/lib/packages/computer-use/locale/ui.en.json +41 -0
  1548. package/lib/packages/computer-use/locale/ui.zh.json +41 -0
  1549. package/lib/packages/config-core/index.d.ts +15 -0
  1550. package/lib/packages/config-core/index.js +15 -0
  1551. package/lib/packages/config-core/locale/en.json +4 -0
  1552. package/lib/packages/config-core/market.d.ts +107 -0
  1553. package/lib/packages/config-core/market.js +730 -0
  1554. package/lib/packages/config-core/presets.d.ts +104 -0
  1555. package/lib/packages/config-core/presets.js +423 -0
  1556. package/lib/packages/desktop-dock/index.d.ts +13 -0
  1557. package/lib/packages/desktop-dock/index.js +719 -0
  1558. package/lib/packages/desktop-dock/locale/en.json +4 -0
  1559. package/lib/packages/desktop-dock/locale/ui.en.json +11 -0
  1560. package/lib/packages/desktop-dock/locale/ui.zh.json +11 -0
  1561. package/lib/packages/dock-browser/index.d.ts +38 -0
  1562. package/lib/packages/dock-browser/index.js +898 -0
  1563. package/lib/packages/dock-browser/locale/en.json +4 -0
  1564. package/lib/packages/dock-browser/locale/ui.en.json +10 -0
  1565. package/lib/packages/dock-browser/locale/ui.zh.json +10 -0
  1566. package/lib/packages/doctor/bundle.d.ts +93 -0
  1567. package/lib/packages/doctor/bundle.js +159 -0
  1568. package/lib/packages/doctor/checks/data.d.ts +19 -0
  1569. package/lib/packages/doctor/checks/data.js +143 -0
  1570. package/lib/packages/doctor/checks/ecosystem.d.ts +12 -0
  1571. package/lib/packages/doctor/checks/ecosystem.js +125 -0
  1572. package/lib/packages/doctor/checks/environment.d.ts +9 -0
  1573. package/lib/packages/doctor/checks/environment.js +130 -0
  1574. package/lib/packages/doctor/checks/util.d.ts +27 -0
  1575. package/lib/packages/doctor/checks/util.js +100 -0
  1576. package/lib/packages/doctor/index.d.ts +26 -0
  1577. package/lib/packages/doctor/index.js +168 -0
  1578. package/lib/packages/doctor/locale/en.json +4 -0
  1579. package/lib/packages/dsh-compat/index.js +44 -0
  1580. package/lib/packages/dsh-compat/locale/en.json +4 -0
  1581. package/lib/packages/git/index.js +177 -0
  1582. package/lib/packages/git/locale/en.json +4 -0
  1583. package/lib/packages/goal/goal.d.ts +77 -0
  1584. package/lib/packages/goal/index.d.ts +22 -0
  1585. package/lib/packages/goal/index.js +333 -0
  1586. package/lib/packages/goal/locale/en.json +4 -0
  1587. package/lib/packages/goal/locale/ui.en.json +10 -0
  1588. package/lib/packages/goal/locale/ui.zh.json +10 -0
  1589. package/lib/packages/guards/index.js +22 -0
  1590. package/lib/packages/guards/locale/en.json +4 -0
  1591. package/lib/packages/hooks/index.d.ts +26 -0
  1592. package/lib/packages/hooks/index.js +966 -0
  1593. package/lib/packages/hooks/lifecycle-hooks.d.ts +217 -0
  1594. package/lib/packages/hooks/lifecycle-hooks.js +608 -0
  1595. package/lib/packages/hooks/locale/en.json +4 -0
  1596. package/lib/packages/hooks/locale/ui.en.json +111 -0
  1597. package/lib/packages/hooks/locale/ui.zh.json +111 -0
  1598. package/lib/packages/host-stdio/index.d.ts +88 -0
  1599. package/lib/packages/host-stdio/index.js +330 -0
  1600. package/lib/packages/host-stdio/locale/en.json +4 -0
  1601. package/lib/packages/image-diet/index.js +92 -0
  1602. package/lib/packages/image-diet/locale/en.json +4 -0
  1603. package/lib/packages/image-diet/locale/ui.en.json +14 -0
  1604. package/lib/packages/image-diet/locale/ui.zh.json +14 -0
  1605. package/lib/packages/llm/index.d.ts +13 -0
  1606. package/lib/packages/llm/index.js +275 -0
  1607. package/lib/packages/llm/locale/en.json +4 -0
  1608. package/lib/packages/log/filter.d.ts +37 -0
  1609. package/lib/packages/log/filter.js +43 -0
  1610. package/lib/packages/log/index.d.ts +30 -0
  1611. package/lib/packages/log/index.js +311 -0
  1612. package/lib/packages/log/locale/en.json +4 -0
  1613. package/lib/packages/log/locale/ui.en.json +30 -0
  1614. package/lib/packages/log/locale/ui.zh.json +30 -0
  1615. package/lib/packages/log/sink.d.ts +91 -0
  1616. package/lib/packages/log/sink.js +286 -0
  1617. package/lib/packages/lsp/client.js +703 -0
  1618. package/lib/packages/lsp/index.d.ts +54 -0
  1619. package/lib/packages/lsp/index.js +616 -0
  1620. package/lib/packages/lsp/locale/en.json +4 -0
  1621. package/lib/packages/lsp/locale/ui.en.json +17 -0
  1622. package/lib/packages/lsp/locale/ui.zh.json +17 -0
  1623. package/lib/packages/lsp/manager.js +418 -0
  1624. package/lib/packages/lsp/normalize.js +134 -0
  1625. package/lib/packages/lsp/servers.js +349 -0
  1626. package/lib/packages/mcp/index.js +717 -0
  1627. package/lib/packages/mcp/locale/en.json +4 -0
  1628. package/lib/packages/mcp/locale/ui.en.json +28 -0
  1629. package/lib/packages/mcp/locale/ui.zh.json +28 -0
  1630. package/lib/packages/mcp/mcp.d.ts +207 -0
  1631. package/lib/packages/mcp/mcp.js +807 -0
  1632. package/lib/packages/memory/index.d.ts +36 -0
  1633. package/lib/packages/memory/index.js +930 -0
  1634. package/lib/packages/memory/locale/en.json +4 -0
  1635. package/lib/packages/memory/locale/ui.en.json +67 -0
  1636. package/lib/packages/memory/locale/ui.zh.json +67 -0
  1637. package/lib/packages/memory/memory.d.ts +187 -0
  1638. package/lib/packages/memory/memory.js +704 -0
  1639. package/lib/packages/microcompact/index.d.ts +31 -0
  1640. package/lib/packages/microcompact/index.js +261 -0
  1641. package/lib/packages/microcompact/locale/en.json +4 -0
  1642. package/lib/packages/microcompact/locale/ui.en.json +20 -0
  1643. package/lib/packages/microcompact/locale/ui.zh.json +20 -0
  1644. package/lib/packages/microcompact/microcompact.d.ts +142 -0
  1645. package/lib/packages/microcompact/microcompact.js +268 -0
  1646. package/lib/packages/mode/index.d.ts +18 -0
  1647. package/lib/packages/mode/index.js +138 -0
  1648. package/lib/packages/mode/locale/en.json +4 -0
  1649. package/lib/packages/ops/index.d.ts +36 -0
  1650. package/lib/packages/ops/index.js +187 -0
  1651. package/lib/packages/ops/locale/en.json +4 -0
  1652. package/lib/packages/ops/locale/ui.en.json +21 -0
  1653. package/lib/packages/ops/locale/ui.zh.json +21 -0
  1654. package/lib/packages/ops/render.d.ts +43 -0
  1655. package/lib/packages/ops/render.js +324 -0
  1656. package/lib/packages/ops/tools.d.ts +17 -0
  1657. package/lib/packages/ops/tools.js +640 -0
  1658. package/lib/packages/ops/worker.d.ts +63 -0
  1659. package/lib/packages/ops/worker.js +294 -0
  1660. package/lib/packages/permission-core/index.d.ts +15 -0
  1661. package/lib/packages/permission-core/index.js +15 -0
  1662. package/lib/packages/permission-core/locale/en.json +4 -0
  1663. package/lib/packages/permission-core/permission-presets.d.ts +71 -0
  1664. package/lib/packages/permission-core/permission-scope.d.ts +65 -0
  1665. package/lib/packages/permission-core/permission-scope.js +109 -0
  1666. package/lib/packages/permission-presets/index.d.ts +19 -0
  1667. package/lib/packages/permission-presets/index.js +176 -0
  1668. package/lib/packages/permission-presets/locale/en.json +4 -0
  1669. package/lib/packages/permission-presets/locale/ui.en.json +10 -0
  1670. package/lib/packages/permission-presets/locale/ui.zh.json +10 -0
  1671. package/lib/packages/plan/index.js +261 -0
  1672. package/lib/packages/plan/locale/en.json +4 -0
  1673. package/lib/packages/plugin-manager/index.js +217 -0
  1674. package/lib/packages/plugin-manager/locale/en.json +4 -0
  1675. package/lib/packages/presets/index.js +243 -0
  1676. package/lib/packages/presets/locale/en.json +4 -0
  1677. package/lib/packages/presets/locale/ui.en.json +10 -0
  1678. package/lib/packages/presets/locale/ui.zh.json +10 -0
  1679. package/lib/packages/prompt/index.d.ts +25 -0
  1680. package/lib/packages/prompt/index.js +441 -0
  1681. package/lib/packages/prompt/locale/en.json +4 -0
  1682. package/lib/packages/prompt/tool-result-prune.d.ts +93 -0
  1683. package/lib/packages/prompt/tool-result-prune.js +212 -0
  1684. package/lib/packages/ptc/index.js +377 -0
  1685. package/lib/packages/ptc/locale/en.json +4 -0
  1686. package/lib/packages/remote/http.d.ts +11 -0
  1687. package/lib/packages/remote/http.js +11 -0
  1688. package/lib/packages/remote/index.d.ts +17 -0
  1689. package/lib/packages/remote/index.js +1189 -0
  1690. package/lib/packages/remote/locale/en.json +4 -0
  1691. package/lib/packages/remote/locale/ui.en.json +76 -0
  1692. package/lib/packages/remote/locale/ui.zh.json +76 -0
  1693. package/lib/packages/remote/routes.js +384 -0
  1694. package/lib/packages/remote/types.d.ts +135 -0
  1695. package/lib/packages/remote/types.js +102 -0
  1696. package/lib/packages/runtime/index.js +678 -0
  1697. package/lib/packages/runtime/locale/en.json +4 -0
  1698. package/lib/packages/runtime-api/index.js +126 -0
  1699. package/lib/packages/runtime-api/inspect.d.ts +29 -0
  1700. package/lib/packages/runtime-api/inspect.js +73 -0
  1701. package/lib/packages/runtime-api/locale/en.json +4 -0
  1702. package/lib/packages/sandbox/backends.d.ts +64 -0
  1703. package/lib/packages/sandbox/execpolicy.d.ts +74 -0
  1704. package/lib/packages/sandbox/execpolicy.js +244 -0
  1705. package/lib/packages/sandbox/index.js +1132 -0
  1706. package/lib/packages/sandbox/locale/en.json +4 -0
  1707. package/lib/packages/sandbox/locale/ui.en.json +78 -0
  1708. package/lib/packages/sandbox/locale/ui.zh.json +78 -0
  1709. package/lib/packages/sandbox/net-proxy.js +202 -0
  1710. package/lib/packages/sandbox/policy.d.ts +294 -0
  1711. package/lib/packages/sandbox/policy.js +674 -0
  1712. package/lib/packages/sandbox/review.d.ts +141 -0
  1713. package/lib/packages/sandbox/review.js +348 -0
  1714. package/lib/packages/sandbox/win/account.js +203 -0
  1715. package/lib/packages/sandbox/win/backend.d.ts +107 -0
  1716. package/lib/packages/sandbox/win/backend.js +425 -0
  1717. package/lib/packages/sandbox/win/doctor.js +269 -0
  1718. package/lib/packages/sandbox/win/ffi.d.ts +116 -0
  1719. package/lib/packages/sandbox/win/ffi.js +185 -0
  1720. package/lib/packages/sandbox/win/interpreter.d.ts +44 -0
  1721. package/lib/packages/sandbox/win/interpreter.js +47 -0
  1722. package/lib/packages/sandbox/win/runner-entry.d.ts +61 -0
  1723. package/lib/packages/sandbox/win/runner-entry.js +898 -0
  1724. package/lib/packages/sandbox/win/setup.d.ts +134 -0
  1725. package/lib/packages/sandbox/win/setup.js +1384 -0
  1726. package/lib/packages/sandbox/win/sweep.d.ts +36 -0
  1727. package/lib/packages/sandbox/win/sweep.js +115 -0
  1728. package/lib/packages/sandbox/win/wfp.js +197 -0
  1729. package/lib/packages/schedule/index.d.ts +41 -0
  1730. package/lib/packages/schedule/index.js +612 -0
  1731. package/lib/packages/schedule/locale/en.json +4 -0
  1732. package/lib/packages/schedule/locale/ui.en.json +29 -0
  1733. package/lib/packages/schedule/locale/ui.zh.json +29 -0
  1734. package/lib/packages/self-improve/index.d.ts +140 -0
  1735. package/lib/packages/self-improve/index.js +1312 -0
  1736. package/lib/packages/self-improve/ledger.d.ts +75 -0
  1737. package/lib/packages/self-improve/ledger.js +364 -0
  1738. package/lib/packages/self-improve/locale/en.json +4 -0
  1739. package/lib/packages/self-improve/locale/ui.en.json +31 -0
  1740. package/lib/packages/self-improve/locale/ui.zh.json +31 -0
  1741. package/lib/packages/self-improve/skill-write.d.ts +257 -0
  1742. package/lib/packages/self-improve/skill-write.js +890 -0
  1743. package/lib/packages/self-improve/store.js +266 -0
  1744. package/lib/packages/session/index.js +383 -0
  1745. package/lib/packages/session/locale/en.json +4 -0
  1746. package/lib/packages/session-core/compact.d.ts +140 -0
  1747. package/lib/packages/session-core/compact.js +282 -0
  1748. package/lib/packages/session-core/hooks.d.ts +289 -0
  1749. package/lib/packages/session-core/hooks.js +862 -0
  1750. package/lib/packages/session-core/index.d.ts +20 -0
  1751. package/lib/packages/session-core/index.js +20 -0
  1752. package/lib/packages/session-core/locale/en.json +4 -0
  1753. package/lib/packages/session-core/loop.d.ts +215 -0
  1754. package/lib/packages/session-core/loop.js +726 -0
  1755. package/lib/packages/session-core/modes.d.ts +72 -0
  1756. package/lib/packages/session-core/modes.js +152 -0
  1757. package/lib/packages/session-core/prompt.d.ts +124 -0
  1758. package/lib/packages/session-core/prompt.js +436 -0
  1759. package/lib/packages/session-search/index.js +323 -0
  1760. package/lib/packages/session-search/locale/en.json +4 -0
  1761. package/lib/packages/session-search/locale/ui.en.json +29 -0
  1762. package/lib/packages/session-search/locale/ui.zh.json +29 -0
  1763. package/lib/packages/session-search/session-index.js +849 -0
  1764. package/lib/packages/session-title/index.js +109 -0
  1765. package/lib/packages/session-title/locale/en.json +4 -0
  1766. package/lib/packages/settings/connection-test.d.ts +60 -0
  1767. package/lib/packages/settings/connection-test.js +84 -0
  1768. package/lib/packages/settings/index.d.ts +3 -0
  1769. package/lib/packages/settings/index.js +689 -0
  1770. package/lib/packages/settings/locale/en.json +4 -0
  1771. package/lib/packages/settings/locale/ui.en.json +94 -0
  1772. package/lib/packages/settings/locale/ui.zh.json +94 -0
  1773. package/lib/packages/skills/index.d.ts +13 -0
  1774. package/lib/packages/skills/index.js +499 -0
  1775. package/lib/packages/skills/locale/en.json +4 -0
  1776. package/lib/packages/spill/index.js +223 -0
  1777. package/lib/packages/spill/locale/en.json +4 -0
  1778. package/lib/packages/spill/locale/ui.en.json +31 -0
  1779. package/lib/packages/spill/locale/ui.zh.json +31 -0
  1780. package/lib/packages/subagent/agent-roles.d.ts +78 -0
  1781. package/lib/packages/subagent/agent-roles.js +425 -0
  1782. package/lib/packages/subagent/board-snapshot.d.ts +114 -0
  1783. package/lib/packages/subagent/board-snapshot.js +194 -0
  1784. package/lib/packages/subagent/index.d.ts +133 -0
  1785. package/lib/packages/subagent/index.js +2414 -0
  1786. package/lib/packages/subagent/locale/en.json +4 -0
  1787. package/lib/packages/subagent/locale/ui.en.json +51 -0
  1788. package/lib/packages/subagent/locale/ui.zh.json +51 -0
  1789. package/lib/packages/superagent/app/api.d.ts +99 -0
  1790. package/lib/packages/superagent/app/api.js +556 -0
  1791. package/lib/packages/superagent/app/assessment.d.ts +573 -0
  1792. package/lib/packages/superagent/app/assessment.js +303 -0
  1793. package/lib/packages/superagent/app/cache.d.ts +22 -0
  1794. package/lib/packages/superagent/app/cache.js +42 -0
  1795. package/lib/packages/superagent/app/cards.d.ts +278 -0
  1796. package/lib/packages/superagent/app/cards.js +103 -0
  1797. package/lib/packages/superagent/app/context.d.ts +35 -0
  1798. package/lib/packages/superagent/app/context.js +49 -0
  1799. package/lib/packages/superagent/app/delivery.d.ts +118 -0
  1800. package/lib/packages/superagent/app/delivery.js +189 -0
  1801. package/lib/packages/superagent/app/effects.d.ts +97 -0
  1802. package/lib/packages/superagent/app/effects.js +162 -0
  1803. package/lib/packages/superagent/app/execution-environment.d.ts +42 -0
  1804. package/lib/packages/superagent/app/execution-environment.js +47 -0
  1805. package/lib/packages/superagent/app/links.d.ts +192 -0
  1806. package/lib/packages/superagent/app/links.js +59 -0
  1807. package/lib/packages/superagent/app/migration.d.ts +40 -0
  1808. package/lib/packages/superagent/app/migration.js +674 -0
  1809. package/lib/packages/superagent/app/notices.d.ts +60 -0
  1810. package/lib/packages/superagent/app/notices.js +128 -0
  1811. package/lib/packages/superagent/app/outbox.d.ts +39 -0
  1812. package/lib/packages/superagent/app/outbox.js +50 -0
  1813. package/lib/packages/superagent/app/passes.d.ts +44 -0
  1814. package/lib/packages/superagent/app/passes.js +65 -0
  1815. package/lib/packages/superagent/app/prompts.d.ts +220 -0
  1816. package/lib/packages/superagent/app/prompts.js +259 -0
  1817. package/lib/packages/superagent/app/resources.d.ts +41 -0
  1818. package/lib/packages/superagent/app/resources.js +394 -0
  1819. package/lib/packages/superagent/app/retry-health.d.ts +36 -0
  1820. package/lib/packages/superagent/app/retry-health.js +112 -0
  1821. package/lib/packages/superagent/app/role-models.d.ts +45 -0
  1822. package/lib/packages/superagent/app/role-models.js +26 -0
  1823. package/lib/packages/superagent/app/runtime.d.ts +94 -0
  1824. package/lib/packages/superagent/app/runtime.js +331 -0
  1825. package/lib/packages/superagent/app/sessions.d.ts +275 -0
  1826. package/lib/packages/superagent/app/sessions.js +676 -0
  1827. package/lib/packages/superagent/app/settings-history.d.ts +34 -0
  1828. package/lib/packages/superagent/app/settings-history.js +105 -0
  1829. package/lib/packages/superagent/app/settings.d.ts +198 -0
  1830. package/lib/packages/superagent/app/settings.js +260 -0
  1831. package/lib/packages/superagent/app/setup.d.ts +67 -0
  1832. package/lib/packages/superagent/app/setup.js +98 -0
  1833. package/lib/packages/superagent/app/skill-files.d.ts +19 -0
  1834. package/lib/packages/superagent/app/skill-files.js +54 -0
  1835. package/lib/packages/superagent/app/source-context.d.ts +46 -0
  1836. package/lib/packages/superagent/app/source-context.js +48 -0
  1837. package/lib/packages/superagent/app/store-read.d.ts +69 -0
  1838. package/lib/packages/superagent/app/store-read.js +75 -0
  1839. package/lib/packages/superagent/app/store.d.ts +179 -0
  1840. package/lib/packages/superagent/app/store.js +384 -0
  1841. package/lib/packages/superagent/app/tools/executor.d.ts +16 -0
  1842. package/lib/packages/superagent/app/tools/executor.js +114 -0
  1843. package/lib/packages/superagent/app/tools/main.d.ts +47 -0
  1844. package/lib/packages/superagent/app/tools/main.js +286 -0
  1845. package/lib/packages/superagent/app/tools/tool.d.ts +28 -0
  1846. package/lib/packages/superagent/app/tools/tool.js +36 -0
  1847. package/lib/packages/superagent/app/versions.d.ts +35 -0
  1848. package/lib/packages/superagent/app/versions.js +36 -0
  1849. package/lib/packages/superagent/app/views/overview.d.ts +327 -0
  1850. package/lib/packages/superagent/app/views/overview.js +91 -0
  1851. package/lib/packages/superagent/app/views/records.d.ts +478 -0
  1852. package/lib/packages/superagent/app/views/records.js +203 -0
  1853. package/lib/packages/superagent/app/views/settings.d.ts +111 -0
  1854. package/lib/packages/superagent/app/views/settings.js +50 -0
  1855. package/lib/packages/superagent/app/views/sources.d.ts +97 -0
  1856. package/lib/packages/superagent/app/views/sources.js +70 -0
  1857. package/lib/packages/superagent/app/views/text.d.ts +6 -0
  1858. package/lib/packages/superagent/app/views/text.js +53 -0
  1859. package/lib/packages/superagent/app/views/threads.d.ts +582 -0
  1860. package/lib/packages/superagent/app/views/threads.js +117 -0
  1861. package/lib/packages/superagent/app/views/tickets.d.ts +1852 -0
  1862. package/lib/packages/superagent/app/views/tickets.js +96 -0
  1863. package/lib/packages/superagent/core/admission.d.ts +17 -0
  1864. package/lib/packages/superagent/core/admission.js +4 -0
  1865. package/lib/packages/superagent/core/assignments.d.ts +53 -0
  1866. package/lib/packages/superagent/core/assignments.js +160 -0
  1867. package/lib/packages/superagent/core/engine.d.ts +191 -0
  1868. package/lib/packages/superagent/core/engine.js +244 -0
  1869. package/lib/packages/superagent/core/errors.d.ts +58 -0
  1870. package/lib/packages/superagent/core/errors.js +63 -0
  1871. package/lib/packages/superagent/core/evals.d.ts +99 -0
  1872. package/lib/packages/superagent/core/evals.js +381 -0
  1873. package/lib/packages/superagent/core/ids.d.ts +1 -0
  1874. package/lib/packages/superagent/core/ids.js +5 -0
  1875. package/lib/packages/superagent/core/index.d.ts +9 -0
  1876. package/lib/packages/superagent/core/index.js +9 -0
  1877. package/lib/packages/superagent/core/intake.d.ts +15 -0
  1878. package/lib/packages/superagent/core/intake.js +68 -0
  1879. package/lib/packages/superagent/core/limits.d.ts +26 -0
  1880. package/lib/packages/superagent/core/limits.js +11 -0
  1881. package/lib/packages/superagent/core/memory.d.ts +40 -0
  1882. package/lib/packages/superagent/core/memory.js +51 -0
  1883. package/lib/packages/superagent/core/model.d.ts +432 -0
  1884. package/lib/packages/superagent/core/model.js +79 -0
  1885. package/lib/packages/superagent/core/part.d.ts +49 -0
  1886. package/lib/packages/superagent/core/part.js +71 -0
  1887. package/lib/packages/superagent/core/policy.d.ts +187 -0
  1888. package/lib/packages/superagent/core/policy.js +244 -0
  1889. package/lib/packages/superagent/core/ports.d.ts +217 -0
  1890. package/lib/packages/superagent/core/ports.js +1 -0
  1891. package/lib/packages/superagent/core/reasons.d.ts +36 -0
  1892. package/lib/packages/superagent/core/reasons.js +35 -0
  1893. package/lib/packages/superagent/core/replies.d.ts +55 -0
  1894. package/lib/packages/superagent/core/replies.js +94 -0
  1895. package/lib/packages/superagent/core/stage.d.ts +18 -0
  1896. package/lib/packages/superagent/core/stage.js +27 -0
  1897. package/lib/packages/superagent/core/tickets.d.ts +151 -0
  1898. package/lib/packages/superagent/core/tickets.js +487 -0
  1899. package/lib/packages/superagent/deployment.d.ts +54 -0
  1900. package/lib/packages/superagent/deployment.js +160 -0
  1901. package/lib/packages/superagent/executor/background.d.ts +93 -0
  1902. package/lib/packages/superagent/executor/background.js +192 -0
  1903. package/lib/packages/superagent/executor/dsh.d.ts +304 -0
  1904. package/lib/packages/superagent/executor/dsh.js +776 -0
  1905. package/lib/packages/superagent/host/command.d.ts +89 -0
  1906. package/lib/packages/superagent/host/command.js +198 -0
  1907. package/lib/packages/superagent/host/health.d.ts +45 -0
  1908. package/lib/packages/superagent/host/health.js +355 -0
  1909. package/lib/packages/superagent/host/settings-section.d.ts +32 -0
  1910. package/lib/packages/superagent/host/settings-section.js +528 -0
  1911. package/lib/packages/superagent/index.d.ts +82 -0
  1912. package/lib/packages/superagent/index.js +140 -0
  1913. package/lib/packages/superagent/infra/commands.d.ts +55 -0
  1914. package/lib/packages/superagent/infra/commands.js +144 -0
  1915. package/lib/packages/superagent/infra/environment.d.ts +44 -0
  1916. package/lib/packages/superagent/infra/environment.js +227 -0
  1917. package/lib/packages/superagent/infra/health.d.ts +27 -0
  1918. package/lib/packages/superagent/infra/health.js +29 -0
  1919. package/lib/packages/superagent/infra/text.d.ts +10 -0
  1920. package/lib/packages/superagent/infra/text.js +31 -0
  1921. package/lib/packages/superagent/kv.d.ts +102 -0
  1922. package/lib/packages/superagent/kv.js +44 -0
  1923. package/lib/packages/superagent/locale/en.json +4 -0
  1924. package/lib/packages/superagent/locale/ui.en.json +26 -0
  1925. package/lib/packages/superagent/locale/ui.zh.json +26 -0
  1926. package/lib/packages/superagent/paths.d.ts +21 -0
  1927. package/lib/packages/superagent/paths.js +50 -0
  1928. package/lib/packages/superagent/prompts/admission.md +68 -0
  1929. package/lib/packages/superagent/prompts/cli.md +17 -0
  1930. package/lib/packages/superagent/prompts/dispatch.md +59 -0
  1931. package/lib/packages/superagent/prompts/handoff-orchestrator.md +4 -0
  1932. package/lib/packages/superagent/prompts/handoff-worker.md +7 -0
  1933. package/lib/packages/superagent/prompts/handoff.md +6 -0
  1934. package/lib/packages/superagent/prompts/orchestrator.md +16 -0
  1935. package/lib/packages/superagent/prompts/replies.md +35 -0
  1936. package/lib/packages/superagent/prompts/shared.md +7 -0
  1937. package/lib/packages/superagent/prompts/subscriptions.md +13 -0
  1938. package/lib/packages/superagent/prompts/team/communication.md +97 -0
  1939. package/lib/packages/superagent/prompts/team/delivery.md +28 -0
  1940. package/lib/packages/superagent/prompts/team/scope.md +22 -0
  1941. package/lib/packages/superagent/prompts/work.md +49 -0
  1942. package/lib/packages/superagent/prompts/worker.md +10 -0
  1943. package/lib/packages/superagent/setup.d.ts +37 -0
  1944. package/lib/packages/superagent/setup.js +46 -0
  1945. package/lib/packages/superagent/skills/dsh-superagent-feishu/SKILL.md +12 -0
  1946. package/lib/packages/superagent/skills/dsh-superagent-github/SKILL.md +14 -0
  1947. package/lib/packages/superagent/sources/admission-context.d.ts +43 -0
  1948. package/lib/packages/superagent/sources/admission-context.js +42 -0
  1949. package/lib/packages/superagent/sources/feishu-channel.d.ts +20 -0
  1950. package/lib/packages/superagent/sources/feishu-channel.js +33 -0
  1951. package/lib/packages/superagent/sources/feishu-image.d.ts +12 -0
  1952. package/lib/packages/superagent/sources/feishu-image.js +81 -0
  1953. package/lib/packages/superagent/sources/feishu-loops.d.ts +18 -0
  1954. package/lib/packages/superagent/sources/feishu-loops.js +330 -0
  1955. package/lib/packages/superagent/sources/feishu-read.d.ts +81 -0
  1956. package/lib/packages/superagent/sources/feishu-read.js +183 -0
  1957. package/lib/packages/superagent/sources/feishu-trigger.d.ts +95 -0
  1958. package/lib/packages/superagent/sources/feishu-trigger.js +96 -0
  1959. package/lib/packages/superagent/sources/feishu.d.ts +56 -0
  1960. package/lib/packages/superagent/sources/feishu.js +164 -0
  1961. package/lib/packages/superagent/sources/github-channel.d.ts +6 -0
  1962. package/lib/packages/superagent/sources/github-channel.js +62 -0
  1963. package/lib/packages/superagent/sources/github-pull.d.ts +82 -0
  1964. package/lib/packages/superagent/sources/github-pull.js +112 -0
  1965. package/lib/packages/superagent/sources/github-read.d.ts +54 -0
  1966. package/lib/packages/superagent/sources/github-read.js +184 -0
  1967. package/lib/packages/superagent/sources/github-trigger.d.ts +140 -0
  1968. package/lib/packages/superagent/sources/github-trigger.js +107 -0
  1969. package/lib/packages/superagent/sources/github.d.ts +52 -0
  1970. package/lib/packages/superagent/sources/github.js +559 -0
  1971. package/lib/packages/superagent/sources/host.d.ts +101 -0
  1972. package/lib/packages/superagent/sources/host.js +13 -0
  1973. package/lib/packages/superagent/sources/kind.d.ts +229 -0
  1974. package/lib/packages/superagent/sources/kind.js +1 -0
  1975. package/lib/packages/superagent/sources/poll.d.ts +21 -0
  1976. package/lib/packages/superagent/sources/poll.js +53 -0
  1977. package/lib/packages/superagent/sources/registry.d.ts +402 -0
  1978. package/lib/packages/superagent/sources/registry.js +162 -0
  1979. package/lib/packages/superagent-webhook/index.d.ts +47 -0
  1980. package/lib/packages/superagent-webhook/index.js +83 -0
  1981. package/lib/packages/superagent-webhook/locale/en.json +4 -0
  1982. package/lib/packages/superagent-webhook/tests/settings-contract.d.ts +34 -0
  1983. package/lib/packages/superagent-webhook/tests/settings-contract.js +66 -0
  1984. package/lib/packages/superagent-webhook/webhook.d.ts +87 -0
  1985. package/lib/packages/superagent-webhook/webhook.js +199 -0
  1986. package/lib/packages/surfaces/index.d.ts +11 -0
  1987. package/lib/packages/surfaces/index.js +20 -0
  1988. package/lib/packages/surfaces/locale/en.json +4 -0
  1989. package/lib/packages/todo/index.d.ts +21 -0
  1990. package/lib/packages/todo/index.js +351 -0
  1991. package/lib/packages/todo/locale/en.json +4 -0
  1992. package/lib/packages/todo/locale/ui.en.json +11 -0
  1993. package/lib/packages/todo/locale/ui.zh.json +11 -0
  1994. package/lib/packages/todo/todo.d.ts +73 -0
  1995. package/lib/packages/tool-search/index.js +474 -0
  1996. package/lib/packages/tool-search/locale/en.json +4 -0
  1997. package/lib/packages/tool-search/locale/ui.en.json +36 -0
  1998. package/lib/packages/tool-search/locale/ui.zh.json +36 -0
  1999. package/lib/packages/tool-search/tool-search.d.ts +153 -0
  2000. package/lib/packages/tools/locale/en.json +4 -0
  2001. package/lib/packages/tools-default/bash.d.ts +332 -0
  2002. package/lib/packages/tools-default/bash.js +1139 -0
  2003. package/lib/packages/tools-default/image-tool.d.ts +2 -0
  2004. package/lib/packages/tools-default/image-tool.js +59 -0
  2005. package/lib/packages/tools-default/index.js +407 -0
  2006. package/lib/packages/tools-default/locale/en.json +4 -0
  2007. package/lib/packages/tools-default/locale/ui.en.json +27 -0
  2008. package/lib/packages/tools-default/locale/ui.zh.json +27 -0
  2009. package/lib/packages/tools-default/persistent-shell.d.ts +79 -0
  2010. package/lib/packages/tools-default/persistent-shell.js +247 -0
  2011. package/lib/packages/tools-default/search-tools.d.ts +40 -0
  2012. package/lib/packages/tools-default/search-tools.js +484 -0
  2013. package/lib/packages/transcript/index.d.ts +48 -0
  2014. package/lib/packages/transcript/index.js +436 -0
  2015. package/lib/packages/transcript/locale/en.json +4 -0
  2016. package/lib/packages/tui/app/AgentsOverlay.d.ts +18 -0
  2017. package/lib/packages/tui/app/App.d.ts +21 -0
  2018. package/lib/packages/tui/app/App.js +1788 -0
  2019. package/lib/packages/tui/app/ApprovalCard.d.ts +12 -0
  2020. package/lib/packages/tui/app/ApprovalCard.js +82 -0
  2021. package/lib/packages/tui/app/AskCard.d.ts +20 -0
  2022. package/lib/packages/tui/app/ChatView.d.ts +67 -0
  2023. package/lib/packages/tui/app/ChatView.js +314 -0
  2024. package/lib/packages/tui/app/Composer.d.ts +56 -0
  2025. package/lib/packages/tui/app/Composer.js +306 -0
  2026. package/lib/packages/tui/app/DiffBlock.d.ts +6 -0
  2027. package/lib/packages/tui/app/DiffBlock.js +39 -0
  2028. package/lib/packages/tui/app/ModelPicker.d.ts +7 -0
  2029. package/lib/packages/tui/app/PlanReviewCard.d.ts +13 -0
  2030. package/lib/packages/tui/app/PresetPicker.d.ts +11 -0
  2031. package/lib/packages/tui/app/SessionPicker.d.ts +43 -0
  2032. package/lib/packages/tui/app/SettingsOverlay.d.ts +36 -0
  2033. package/lib/packages/tui/app/SettingsOverlay.js +265 -0
  2034. package/lib/packages/tui/app/SkillsPicker.d.ts +7 -0
  2035. package/lib/packages/tui/app/StatusBar.d.ts +22 -0
  2036. package/lib/packages/tui/app/StatusBar.js +189 -0
  2037. package/lib/packages/tui/app/TaskStrips.d.ts +13 -0
  2038. package/lib/packages/tui/app/TaskStrips.js +37 -0
  2039. package/lib/packages/tui/app/ToolCard.d.ts +11 -0
  2040. package/lib/packages/tui/app/ToolCard.js +62 -0
  2041. package/lib/packages/tui/app/TranscriptOverlay.d.ts +27 -0
  2042. package/lib/packages/tui/app/TranscriptViewport.d.ts +85 -0
  2043. package/lib/packages/tui/app/TranscriptViewport.js +233 -0
  2044. package/lib/packages/tui/app/Welcome.js +68 -0
  2045. package/lib/packages/tui/app/clipboard-image.js +66 -0
  2046. package/lib/packages/tui/app/display-width.d.ts +16 -0
  2047. package/lib/packages/tui/app/display-width.js +33 -0
  2048. package/lib/packages/tui/app/history-store.js +41 -0
  2049. package/lib/packages/tui/app/image-blocks.js +125 -0
  2050. package/lib/packages/tui/app/scroll-model.d.ts +240 -0
  2051. package/lib/packages/tui/app/settings-model.d.ts +128 -0
  2052. package/lib/packages/tui/app/settings-model.js +215 -0
  2053. package/lib/packages/tui/app/snapshot-subscribe.js +110 -0
  2054. package/lib/packages/tui/index.js +102 -0
  2055. package/lib/packages/tui/locale/en.json +4 -0
  2056. package/lib/packages/ui-actions/index.d.ts +27 -0
  2057. package/lib/packages/ui-actions/index.js +27 -0
  2058. package/lib/packages/ui-actions/locale/en.json +4 -0
  2059. package/lib/packages/ui-actions/locale/ui.en.json +3 -0
  2060. package/lib/packages/ui-actions/locale/ui.zh.json +3 -0
  2061. package/lib/packages/ui-ask/index.d.ts +29 -0
  2062. package/lib/packages/ui-ask/index.js +29 -0
  2063. package/lib/packages/ui-ask/locale/en.json +4 -0
  2064. package/lib/packages/ui-ask/locale/ui.en.json +28 -0
  2065. package/lib/packages/ui-ask/locale/ui.zh.json +28 -0
  2066. package/lib/packages/ui-boot/index.d.ts +13 -0
  2067. package/lib/packages/ui-boot/index.js +1 -0
  2068. package/lib/packages/ui-boot/locale/en.json +4 -0
  2069. package/lib/packages/ui-boot/locale/ui.en.json +28 -0
  2070. package/lib/packages/ui-boot/locale/ui.zh.json +28 -0
  2071. package/lib/packages/ui-browser/index.d.ts +29 -0
  2072. package/lib/packages/ui-browser/index.js +29 -0
  2073. package/lib/packages/ui-browser/locale/en.json +4 -0
  2074. package/lib/packages/ui-browser/locale/ui.en.json +17 -0
  2075. package/lib/packages/ui-browser/locale/ui.zh.json +17 -0
  2076. package/lib/packages/ui-composer/index.d.ts +28 -0
  2077. package/lib/packages/ui-composer/index.js +28 -0
  2078. package/lib/packages/ui-composer/locale/en.json +4 -0
  2079. package/lib/packages/ui-composer/locale/ui.en.json +161 -0
  2080. package/lib/packages/ui-composer/locale/ui.zh.json +161 -0
  2081. package/lib/packages/ui-core/frames.js +144 -0
  2082. package/lib/packages/ui-core/i18n.d.ts +33 -0
  2083. package/lib/packages/ui-core/i18n.js +42 -0
  2084. package/lib/packages/ui-core/index.d.ts +102 -0
  2085. package/lib/packages/ui-core/index.js +93 -0
  2086. package/lib/packages/ui-core/locale/en.json +4 -0
  2087. package/lib/packages/ui-core/plugin.d.ts +168 -0
  2088. package/lib/packages/ui-core/scoped-slots.d.ts +20 -0
  2089. package/lib/packages/ui-core/slots-ink.d.ts +26 -0
  2090. package/lib/packages/ui-core/slots-ink.js +78 -0
  2091. package/lib/packages/ui-core/slots.d.ts +490 -0
  2092. package/lib/packages/ui-core/tui-plugin-api.d.ts +23 -0
  2093. package/lib/packages/ui-core/tui-plugin-api.js +23 -0
  2094. package/lib/packages/ui-core/tui-plugins.d.ts +47 -0
  2095. package/lib/packages/ui-core/tui-plugins.js +293 -0
  2096. package/lib/packages/ui-dockkit/index.d.ts +13 -0
  2097. package/lib/packages/ui-dockkit/index.js +13 -0
  2098. package/lib/packages/ui-dockkit/locale/en.json +4 -0
  2099. package/lib/packages/ui-dockkit/locale/ui.en.json +21 -0
  2100. package/lib/packages/ui-dockkit/locale/ui.zh.json +21 -0
  2101. package/lib/packages/ui-files/index.d.ts +27 -0
  2102. package/lib/packages/ui-files/index.js +27 -0
  2103. package/lib/packages/ui-files/locale/en.json +4 -0
  2104. package/lib/packages/ui-files/locale/ui.en.json +43 -0
  2105. package/lib/packages/ui-files/locale/ui.zh.json +43 -0
  2106. package/lib/packages/ui-layout/index.d.ts +30 -0
  2107. package/lib/packages/ui-layout/index.js +30 -0
  2108. package/lib/packages/ui-layout/locale/en.json +4 -0
  2109. package/lib/packages/ui-layout/locale/ui.en.json +112 -0
  2110. package/lib/packages/ui-layout/locale/ui.zh.json +112 -0
  2111. package/lib/packages/ui-palette/index.d.ts +27 -0
  2112. package/lib/packages/ui-palette/index.js +27 -0
  2113. package/lib/packages/ui-palette/locale/en.json +4 -0
  2114. package/lib/packages/ui-palette/locale/ui.en.json +35 -0
  2115. package/lib/packages/ui-palette/locale/ui.zh.json +35 -0
  2116. package/lib/packages/ui-plugins/index.d.ts +27 -0
  2117. package/lib/packages/ui-plugins/index.js +27 -0
  2118. package/lib/packages/ui-plugins/locale/en.json +4 -0
  2119. package/lib/packages/ui-plugins/locale/ui.en.json +134 -0
  2120. package/lib/packages/ui-plugins/locale/ui.zh.json +134 -0
  2121. package/lib/packages/ui-preview/index.d.ts +27 -0
  2122. package/lib/packages/ui-preview/index.js +27 -0
  2123. package/lib/packages/ui-preview/locale/en.json +4 -0
  2124. package/lib/packages/ui-preview/locale/ui.en.json +29 -0
  2125. package/lib/packages/ui-preview/locale/ui.zh.json +29 -0
  2126. package/lib/packages/ui-primitives/index.d.ts +13 -0
  2127. package/lib/packages/ui-primitives/index.js +13 -0
  2128. package/lib/packages/ui-primitives/locale/en.json +4 -0
  2129. package/lib/packages/ui-primitives/locale/ui.en.json +167 -0
  2130. package/lib/packages/ui-primitives/locale/ui.zh.json +167 -0
  2131. package/lib/packages/ui-prompt/index.d.ts +29 -0
  2132. package/lib/packages/ui-prompt/index.js +29 -0
  2133. package/lib/packages/ui-prompt/locale/en.json +4 -0
  2134. package/lib/packages/ui-prompt/locale/ui.en.json +73 -0
  2135. package/lib/packages/ui-prompt/locale/ui.zh.json +73 -0
  2136. package/lib/packages/ui-renderer/index.d.ts +26 -0
  2137. package/lib/packages/ui-renderer/index.js +26 -0
  2138. package/lib/packages/ui-renderer/locale/en.json +4 -0
  2139. package/lib/packages/ui-renderer/locale/ui.en.json +14 -0
  2140. package/lib/packages/ui-renderer/locale/ui.zh.json +14 -0
  2141. package/lib/packages/ui-runtime/index.d.ts +17 -0
  2142. package/lib/packages/ui-runtime/index.js +17 -0
  2143. package/lib/packages/ui-runtime/locale/en.json +4 -0
  2144. package/lib/packages/ui-runtime/locale/ui.en.json +5 -0
  2145. package/lib/packages/ui-runtime/locale/ui.zh.json +5 -0
  2146. package/lib/packages/ui-sessions/index.d.ts +27 -0
  2147. package/lib/packages/ui-sessions/index.js +27 -0
  2148. package/lib/packages/ui-sessions/locale/en.json +4 -0
  2149. package/lib/packages/ui-sessions/locale/ui.en.json +119 -0
  2150. package/lib/packages/ui-sessions/locale/ui.zh.json +119 -0
  2151. package/lib/packages/ui-settings/index.d.ts +29 -0
  2152. package/lib/packages/ui-settings/index.js +29 -0
  2153. package/lib/packages/ui-settings/locale/en.json +4 -0
  2154. package/lib/packages/ui-settings/locale/ui.en.json +490 -0
  2155. package/lib/packages/ui-settings/locale/ui.zh.json +490 -0
  2156. package/lib/packages/ui-skills/index.d.ts +29 -0
  2157. package/lib/packages/ui-skills/index.js +29 -0
  2158. package/lib/packages/ui-skills/locale/en.json +4 -0
  2159. package/lib/packages/ui-skills/locale/ui.en.json +93 -0
  2160. package/lib/packages/ui-skills/locale/ui.zh.json +93 -0
  2161. package/lib/packages/ui-slots/index.d.ts +13 -0
  2162. package/lib/packages/ui-slots/index.js +13 -0
  2163. package/lib/packages/ui-slots/locale/en.json +4 -0
  2164. package/lib/packages/ui-slots/locale/ui.en.json +4 -0
  2165. package/lib/packages/ui-slots/locale/ui.zh.json +4 -0
  2166. package/lib/packages/ui-status/index.d.ts +27 -0
  2167. package/lib/packages/ui-status/index.js +27 -0
  2168. package/lib/packages/ui-status/locale/en.json +4 -0
  2169. package/lib/packages/ui-status/locale/ui.en.json +134 -0
  2170. package/lib/packages/ui-status/locale/ui.zh.json +134 -0
  2171. package/lib/packages/ui-statusbar/index.d.ts +28 -0
  2172. package/lib/packages/ui-statusbar/index.js +28 -0
  2173. package/lib/packages/ui-statusbar/locale/en.json +4 -0
  2174. package/lib/packages/ui-statusbar/locale/ui.en.json +33 -0
  2175. package/lib/packages/ui-statusbar/locale/ui.zh.json +33 -0
  2176. package/lib/packages/ui-superagent/index.d.ts +31 -0
  2177. package/lib/packages/ui-superagent/index.js +31 -0
  2178. package/lib/packages/ui-superagent/locale/en.json +4 -0
  2179. package/lib/packages/ui-superagent/locale/ui.en.json +117 -0
  2180. package/lib/packages/ui-superagent/locale/ui.zh.json +117 -0
  2181. package/lib/packages/ui-tasks/index.d.ts +27 -0
  2182. package/lib/packages/ui-tasks/index.js +27 -0
  2183. package/lib/packages/ui-tasks/locale/en.json +4 -0
  2184. package/lib/packages/ui-tasks/locale/ui.en.json +22 -0
  2185. package/lib/packages/ui-tasks/locale/ui.zh.json +22 -0
  2186. package/lib/packages/ui-team/index.d.ts +29 -0
  2187. package/lib/packages/ui-team/index.js +29 -0
  2188. package/lib/packages/ui-team/locale/en.json +4 -0
  2189. package/lib/packages/ui-team/locale/ui.en.json +19 -0
  2190. package/lib/packages/ui-team/locale/ui.zh.json +19 -0
  2191. package/lib/packages/ui-terminal/index.d.ts +27 -0
  2192. package/lib/packages/ui-terminal/index.js +27 -0
  2193. package/lib/packages/ui-terminal/locale/en.json +4 -0
  2194. package/lib/packages/ui-terminal/locale/ui.en.json +9 -0
  2195. package/lib/packages/ui-terminal/locale/ui.zh.json +9 -0
  2196. package/lib/packages/ui-trace/index.d.ts +28 -0
  2197. package/lib/packages/ui-trace/index.js +28 -0
  2198. package/lib/packages/ui-trace/locale/en.json +4 -0
  2199. package/lib/packages/ui-trace/locale/ui.en.json +118 -0
  2200. package/lib/packages/ui-trace/locale/ui.zh.json +118 -0
  2201. package/lib/packages/ui-transcript/index.d.ts +30 -0
  2202. package/lib/packages/ui-transcript/index.js +30 -0
  2203. package/lib/packages/ui-transcript/locale/en.json +4 -0
  2204. package/lib/packages/ui-transcript/locale/ui.en.json +281 -0
  2205. package/lib/packages/ui-transcript/locale/ui.zh.json +281 -0
  2206. package/lib/packages/waiting/index.d.ts +17 -0
  2207. package/lib/packages/waiting/index.js +53 -0
  2208. package/lib/packages/waiting/locale/en.json +4 -0
  2209. package/lib/packages/web-fetch/html.d.ts +26 -0
  2210. package/lib/packages/web-fetch/html.js +249 -0
  2211. package/lib/packages/web-fetch/http.d.ts +97 -0
  2212. package/lib/packages/web-fetch/http.js +252 -0
  2213. package/lib/packages/web-fetch/index.d.ts +17 -0
  2214. package/lib/packages/web-fetch/index.js +165 -0
  2215. package/lib/packages/web-fetch/locale/en.json +4 -0
  2216. package/lib/packages/web-fetch/locale/ui.en.json +14 -0
  2217. package/lib/packages/web-fetch/locale/ui.zh.json +14 -0
  2218. package/lib/packages/web-search/index.d.ts +15 -0
  2219. package/lib/packages/web-search/index.js +521 -0
  2220. package/lib/packages/web-search/locale/en.json +4 -0
  2221. package/lib/packages/web-search/locale/ui.en.json +30 -0
  2222. package/lib/packages/web-search/locale/ui.zh.json +30 -0
  2223. package/lib/packages/webserver/index.d.ts +51 -0
  2224. package/lib/packages/webserver/index.js +316 -0
  2225. package/lib/packages/webserver/locale/en.json +4 -0
  2226. package/lib/services/types.d.ts +384 -29
  2227. package/package.json +64 -8
  2228. package/lib/adapter/core-runtime.d.ts +0 -11
  2229. package/lib/adapter/core-runtime.js +0 -259
  2230. package/lib/adapter/host.d.ts +0 -18
  2231. package/lib/adapter/host.js +0 -14
  2232. package/lib/adapter/runtime.d.ts +0 -15
  2233. package/lib/adapter/runtime.js +0 -290
  2234. package/lib/app/AgentsOverlay.d.ts +0 -18
  2235. package/lib/app/App.d.ts +0 -15
  2236. package/lib/app/App.js +0 -1650
  2237. package/lib/app/App.js.nv-backup +0 -1650
  2238. package/lib/app/ApprovalCard.d.ts +0 -12
  2239. package/lib/app/ApprovalCard.js +0 -82
  2240. package/lib/app/AskCard.d.ts +0 -20
  2241. package/lib/app/ChatView.d.ts +0 -65
  2242. package/lib/app/ChatView.js +0 -314
  2243. package/lib/app/Composer.d.ts +0 -50
  2244. package/lib/app/Composer.js +0 -288
  2245. package/lib/app/DiffBlock.d.ts +0 -6
  2246. package/lib/app/DiffBlock.js +0 -37
  2247. package/lib/app/ModelPicker.d.ts +0 -7
  2248. package/lib/app/PlanReviewCard.d.ts +0 -13
  2249. package/lib/app/PresetPicker.d.ts +0 -11
  2250. package/lib/app/SessionPicker.d.ts +0 -43
  2251. package/lib/app/SettingsOverlay.d.ts +0 -32
  2252. package/lib/app/SettingsOverlay.js +0 -157
  2253. package/lib/app/SkillsPicker.d.ts +0 -7
  2254. package/lib/app/StatusBar.d.ts +0 -22
  2255. package/lib/app/StatusBar.js +0 -189
  2256. package/lib/app/TaskStrips.d.ts +0 -13
  2257. package/lib/app/TaskStrips.js +0 -37
  2258. package/lib/app/TimelineRail.js.negbak +0 -98
  2259. package/lib/app/TimelineRail.js.nv-backup +0 -160
  2260. package/lib/app/ToolCard.d.ts +0 -11
  2261. package/lib/app/ToolCard.js +0 -60
  2262. package/lib/app/ToolCard.js.nv-backup +0 -64
  2263. package/lib/app/TranscriptOverlay.d.ts +0 -27
  2264. package/lib/app/TranscriptViewport.d.ts +0 -78
  2265. package/lib/app/TranscriptViewport.js +0 -218
  2266. package/lib/app/Welcome.js +0 -68
  2267. package/lib/app/clipboard-image.js +0 -66
  2268. package/lib/app/display-width.d.ts +0 -16
  2269. package/lib/app/display-width.js +0 -33
  2270. package/lib/app/hello.d.ts +0 -11
  2271. package/lib/app/hello.js +0 -8
  2272. package/lib/app/history-store.js +0 -41
  2273. package/lib/app/image-blocks.js +0 -125
  2274. package/lib/app/scroll-model.d.ts +0 -240
  2275. package/lib/app/settings-model.d.ts +0 -69
  2276. package/lib/app/settings-model.js +0 -114
  2277. package/lib/app/snapshot-subscribe.js +0 -110
  2278. package/lib/commands.d.ts +0 -49
  2279. package/lib/commands.js +0 -115
  2280. package/lib/core/agent-roles.d.ts +0 -52
  2281. package/lib/core/agent-roles.js +0 -274
  2282. package/lib/core/approval-floor.d.ts +0 -192
  2283. package/lib/core/approval-floor.js +0 -806
  2284. package/lib/core/approval.d.ts +0 -42
  2285. package/lib/core/approval.js +0 -8
  2286. package/lib/core/call-meaning.js +0 -347
  2287. package/lib/core/cdp/actions.js +0 -655
  2288. package/lib/core/cdp/launch.js +0 -491
  2289. package/lib/core/cdp/report.d.ts +0 -27
  2290. package/lib/core/cdp/report.js +0 -50
  2291. package/lib/core/cdp/ring-buffer.d.ts +0 -25
  2292. package/lib/core/cdp/ring-buffer.js +0 -44
  2293. package/lib/core/cdp/snapshot.d.ts +0 -139
  2294. package/lib/core/cdp/snapshot.js +0 -312
  2295. package/lib/core/cdp/transport.d.ts +0 -160
  2296. package/lib/core/cdp/transport.js +0 -359
  2297. package/lib/core/commands-completion.d.ts +0 -89
  2298. package/lib/core/commands-completion.js +0 -192
  2299. package/lib/core/compact.d.ts +0 -110
  2300. package/lib/core/compact.js +0 -210
  2301. package/lib/core/connection-test.d.ts +0 -60
  2302. package/lib/core/connection-test.js +0 -84
  2303. package/lib/core/desktop-control.d.ts +0 -298
  2304. package/lib/core/desktop-control.js +0 -1309
  2305. package/lib/core/dsh-compat/hook.d.ts +0 -18
  2306. package/lib/core/dsh-compat/hook.js +0 -52
  2307. package/lib/core/goal.d.ts +0 -89
  2308. package/lib/core/hooks.d.ts +0 -289
  2309. package/lib/core/hooks.js +0 -862
  2310. package/lib/core/learnings/ledger.d.ts +0 -73
  2311. package/lib/core/learnings/ledger.js +0 -273
  2312. package/lib/core/learnings/skill-write.d.ts +0 -244
  2313. package/lib/core/learnings/skill-write.js +0 -820
  2314. package/lib/core/learnings/store.js +0 -266
  2315. package/lib/core/lifecycle-hooks.d.ts +0 -197
  2316. package/lib/core/lifecycle-hooks.js +0 -567
  2317. package/lib/core/loop.d.ts +0 -195
  2318. package/lib/core/loop.js +0 -648
  2319. package/lib/core/lsp/client.js +0 -703
  2320. package/lib/core/lsp/manager.js +0 -418
  2321. package/lib/core/lsp/normalize.js +0 -134
  2322. package/lib/core/lsp/servers.js +0 -349
  2323. package/lib/core/market.d.ts +0 -51
  2324. package/lib/core/market.js +0 -358
  2325. package/lib/core/mcp.d.ts +0 -219
  2326. package/lib/core/mcp.js +0 -880
  2327. package/lib/core/memory.d.ts +0 -266
  2328. package/lib/core/memory.js +0 -703
  2329. package/lib/core/microcompact.d.ts +0 -93
  2330. package/lib/core/microcompact.js +0 -207
  2331. package/lib/core/modes.d.ts +0 -72
  2332. package/lib/core/modes.js +0 -152
  2333. package/lib/core/permission-presets.d.ts +0 -71
  2334. package/lib/core/permission-scope.d.ts +0 -54
  2335. package/lib/core/permission-scope.js +0 -84
  2336. package/lib/core/presets.d.ts +0 -91
  2337. package/lib/core/presets.js +0 -384
  2338. package/lib/core/prompt.d.ts +0 -92
  2339. package/lib/core/prompt.js +0 -375
  2340. package/lib/core/sandbox/backends.d.ts +0 -64
  2341. package/lib/core/sandbox/execpolicy.d.ts +0 -93
  2342. package/lib/core/sandbox/execpolicy.js +0 -476
  2343. package/lib/core/sandbox/net-proxy.js +0 -162
  2344. package/lib/core/sandbox/policy.d.ts +0 -211
  2345. package/lib/core/sandbox/policy.js +0 -565
  2346. package/lib/core/sandbox/win/account.js +0 -203
  2347. package/lib/core/sandbox/win/backend.d.ts +0 -82
  2348. package/lib/core/sandbox/win/backend.js +0 -299
  2349. package/lib/core/sandbox/win/doctor.js +0 -269
  2350. package/lib/core/sandbox/win/ffi.d.ts +0 -107
  2351. package/lib/core/sandbox/win/ffi.js +0 -166
  2352. package/lib/core/sandbox/win/runner-entry.d.ts +0 -35
  2353. package/lib/core/sandbox/win/runner-entry.js +0 -386
  2354. package/lib/core/sandbox/win/setup.d.ts +0 -60
  2355. package/lib/core/sandbox/win/setup.js +0 -983
  2356. package/lib/core/sandbox/win/wfp.js +0 -197
  2357. package/lib/core/session-export.d.ts +0 -18
  2358. package/lib/core/session-export.js +0 -73
  2359. package/lib/core/session-index.js +0 -849
  2360. package/lib/core/todo.d.ts +0 -81
  2361. package/lib/core/tool-result-prune.d.ts +0 -42
  2362. package/lib/core/tool-result-prune.js +0 -47
  2363. package/lib/core/tool-search.d.ts +0 -153
  2364. package/lib/core/tools/bash.d.ts +0 -313
  2365. package/lib/core/tools/bash.js +0 -998
  2366. package/lib/core/tools/image-tool.d.ts +0 -2
  2367. package/lib/core/tools/image-tool.js +0 -59
  2368. package/lib/core/tools/index.d.ts +0 -8
  2369. package/lib/core/tools/index.js +0 -4
  2370. package/lib/core/tools/search-tools.d.ts +0 -33
  2371. package/lib/core/tools/search-tools.js +0 -440
  2372. package/lib/index.d.ts +0 -41
  2373. package/lib/index.js +0 -35
  2374. package/lib/plugins/agent.d.ts +0 -2
  2375. package/lib/plugins/agent.js +0 -314
  2376. package/lib/plugins/approval-floor.js +0 -227
  2377. package/lib/plugins/approval.d.ts +0 -16
  2378. package/lib/plugins/approval.js +0 -846
  2379. package/lib/plugins/ask.js +0 -297
  2380. package/lib/plugins/browser.d.ts +0 -68
  2381. package/lib/plugins/browser.js +0 -1289
  2382. package/lib/plugins/commands.d.ts +0 -23
  2383. package/lib/plugins/commands.js +0 -504
  2384. package/lib/plugins/compact.d.ts +0 -21
  2385. package/lib/plugins/compact.js +0 -316
  2386. package/lib/plugins/computer-use.d.ts +0 -47
  2387. package/lib/plugins/computer-use.js +0 -555
  2388. package/lib/plugins/desktop-dock.d.ts +0 -2
  2389. package/lib/plugins/desktop-dock.js +0 -626
  2390. package/lib/plugins/dock-browser.d.ts +0 -34
  2391. package/lib/plugins/dock-browser.js +0 -724
  2392. package/lib/plugins/dsh-compat.js +0 -44
  2393. package/lib/plugins/file-review.d.ts +0 -108
  2394. package/lib/plugins/file-review.js +0 -437
  2395. package/lib/plugins/git.js +0 -126
  2396. package/lib/plugins/goal.d.ts +0 -20
  2397. package/lib/plugins/goal.js +0 -242
  2398. package/lib/plugins/guards.js +0 -18
  2399. package/lib/plugins/hooks.d.ts +0 -19
  2400. package/lib/plugins/hooks.js +0 -585
  2401. package/lib/plugins/host-stdio.d.ts +0 -88
  2402. package/lib/plugins/host-stdio.js +0 -305
  2403. package/lib/plugins/image-diet.js +0 -85
  2404. package/lib/plugins/lifecycle-hooks.d.ts +0 -27
  2405. package/lib/plugins/lifecycle-hooks.js +0 -340
  2406. package/lib/plugins/llm.d.ts +0 -13
  2407. package/lib/plugins/llm.js +0 -256
  2408. package/lib/plugins/lsp.d.ts +0 -54
  2409. package/lib/plugins/lsp.js +0 -603
  2410. package/lib/plugins/mcp.js +0 -672
  2411. package/lib/plugins/memory.d.ts +0 -17
  2412. package/lib/plugins/memory.js +0 -837
  2413. package/lib/plugins/microcompact.d.ts +0 -18
  2414. package/lib/plugins/microcompact.js +0 -191
  2415. package/lib/plugins/mode.d.ts +0 -18
  2416. package/lib/plugins/mode.js +0 -134
  2417. package/lib/plugins/permission-presets.d.ts +0 -19
  2418. package/lib/plugins/permission-presets.js +0 -155
  2419. package/lib/plugins/plan.js +0 -192
  2420. package/lib/plugins/plugin-manager.js +0 -163
  2421. package/lib/plugins/presets.js +0 -211
  2422. package/lib/plugins/prompt.d.ts +0 -2
  2423. package/lib/plugins/prompt.js +0 -307
  2424. package/lib/plugins/ptc.js +0 -369
  2425. package/lib/plugins/remote/http.d.ts +0 -11
  2426. package/lib/plugins/remote/http.js +0 -11
  2427. package/lib/plugins/remote/routes.js +0 -384
  2428. package/lib/plugins/remote/types.d.ts +0 -135
  2429. package/lib/plugins/remote/types.js +0 -98
  2430. package/lib/plugins/remote.d.ts +0 -17
  2431. package/lib/plugins/remote.js +0 -1021
  2432. package/lib/plugins/runtime-api.js +0 -99
  2433. package/lib/plugins/runtime.js +0 -523
  2434. package/lib/plugins/sandbox.js +0 -882
  2435. package/lib/plugins/schedule.d.ts +0 -26
  2436. package/lib/plugins/schedule.js +0 -539
  2437. package/lib/plugins/self-improve.d.ts +0 -61
  2438. package/lib/plugins/self-improve.js +0 -963
  2439. package/lib/plugins/session-search.js +0 -313
  2440. package/lib/plugins/session-title.js +0 -109
  2441. package/lib/plugins/session.js +0 -300
  2442. package/lib/plugins/settings.d.ts +0 -3
  2443. package/lib/plugins/settings.js +0 -681
  2444. package/lib/plugins/skills.d.ts +0 -2
  2445. package/lib/plugins/skills.js +0 -361
  2446. package/lib/plugins/spill.js +0 -207
  2447. package/lib/plugins/subagent.d.ts +0 -2
  2448. package/lib/plugins/subagent.js +0 -1026
  2449. package/lib/plugins/surfaces.d.ts +0 -11
  2450. package/lib/plugins/surfaces.js +0 -20
  2451. package/lib/plugins/team.d.ts +0 -16
  2452. package/lib/plugins/team.js +0 -155
  2453. package/lib/plugins/todo.d.ts +0 -19
  2454. package/lib/plugins/todo.js +0 -194
  2455. package/lib/plugins/tool-search.js +0 -453
  2456. package/lib/plugins/tool-search.js.nv-backup +0 -434
  2457. package/lib/plugins/tools-default.js +0 -359
  2458. package/lib/plugins/transcript.d.ts +0 -15
  2459. package/lib/plugins/transcript.js +0 -418
  2460. package/lib/plugins/tui.js +0 -98
  2461. package/lib/plugins/waiting.d.ts +0 -12
  2462. package/lib/plugins/waiting.js +0 -34
  2463. package/lib/plugins/web-search.d.ts +0 -14
  2464. package/lib/plugins/web-search.js +0 -272
  2465. package/lib/plugins/webserver.d.ts +0 -48
  2466. package/lib/plugins/webserver.js +0 -261
  2467. package/lib/remote/assets/app-B3Id1EBq.js +0 -14
  2468. package/lib/remote/assets/icon-192.png +0 -0
  2469. package/lib/remote/assets/icon-512.png +0 -0
  2470. package/lib/remote/assets/index.html +0 -34
  2471. package/lib/remote/assets/manifest.json +0 -27
  2472. package/lib/remote/assets/style-NtlpbKOI.css +0 -1
  2473. package/lib/remote/assets/sw.js +0 -66
  2474. package/lib/tools/config-cli.js +0 -89
  2475. package/lib/tools/plugin-cli.js +0 -209
  2476. package/lib/ui/assets/app-MhfBFsp-.js +0 -89
  2477. package/lib/ui/assets/chunk-2UxHyX5q.js +0 -1
  2478. package/lib/ui/assets/chunk-B1dDrJ26.js +0 -1
  2479. package/lib/ui/assets/chunk-B6aJPvgy.js +0 -1
  2480. package/lib/ui/assets/chunk-BEwlwnbL.js +0 -1
  2481. package/lib/ui/assets/chunk-BIGW1oBm.js +0 -1
  2482. package/lib/ui/assets/chunk-BPQ3VLAy.js +0 -1
  2483. package/lib/ui/assets/chunk-BRH0KZbk.js +0 -141
  2484. package/lib/ui/assets/chunk-BX6H_ySx.js +0 -1
  2485. package/lib/ui/assets/chunk-B_P3UbPa.js +0 -1
  2486. package/lib/ui/assets/chunk-B_TYUkTI.js +0 -1
  2487. package/lib/ui/assets/chunk-B_vNuMnf.js +0 -1
  2488. package/lib/ui/assets/chunk-BdnUsdx6.js +0 -1
  2489. package/lib/ui/assets/chunk-Buea-lGh.js +0 -1
  2490. package/lib/ui/assets/chunk-C0PvZCCE.js +0 -1
  2491. package/lib/ui/assets/chunk-C0m74zRD.js +0 -1
  2492. package/lib/ui/assets/chunk-C27-OAKa.js +0 -1
  2493. package/lib/ui/assets/chunk-C2oV4EkX.js +0 -1
  2494. package/lib/ui/assets/chunk-C7zT0LnQ.js +0 -1
  2495. package/lib/ui/assets/chunk-C9GSunVT.js +0 -1
  2496. package/lib/ui/assets/chunk-C9tS-k6U.js +0 -1
  2497. package/lib/ui/assets/chunk-CA5f1pGf.js +0 -12
  2498. package/lib/ui/assets/chunk-CHLpvVh8.js +0 -1
  2499. package/lib/ui/assets/chunk-CLxacb5B.js +0 -1
  2500. package/lib/ui/assets/chunk-COt5Ahok.js +0 -1
  2501. package/lib/ui/assets/chunk-CPTIWCL2.js +0 -1
  2502. package/lib/ui/assets/chunk-CQLl-L-p.js +0 -1
  2503. package/lib/ui/assets/chunk-CUWRgxuq.js +0 -55
  2504. package/lib/ui/assets/chunk-CWanVSXC.js +0 -1
  2505. package/lib/ui/assets/chunk-Cf5RLm7j.js +0 -1
  2506. package/lib/ui/assets/chunk-CickPsom.js +0 -1
  2507. package/lib/ui/assets/chunk-Cj5Yp3dK.js +0 -1
  2508. package/lib/ui/assets/chunk-Cmh6b_Ma.js +0 -1
  2509. package/lib/ui/assets/chunk-Cp-IABpG.js +0 -1
  2510. package/lib/ui/assets/chunk-Cq7xGE-D.js +0 -10
  2511. package/lib/ui/assets/chunk-CqE71os6.js +0 -1
  2512. package/lib/ui/assets/chunk-CtKP3W-j.js +0 -1
  2513. package/lib/ui/assets/chunk-Cvjx9yec.js +0 -1
  2514. package/lib/ui/assets/chunk-CxGP3dtY.js +0 -1
  2515. package/lib/ui/assets/chunk-CylS5w8V.js +0 -1
  2516. package/lib/ui/assets/chunk-D38fbIBN.js +0 -1
  2517. package/lib/ui/assets/chunk-D97Zzqfu.js +0 -1
  2518. package/lib/ui/assets/chunk-DAi9KRSo.js +0 -1
  2519. package/lib/ui/assets/chunk-DHK4yRfg.js +0 -1
  2520. package/lib/ui/assets/chunk-DJeabLx-.js +0 -1
  2521. package/lib/ui/assets/chunk-DNRxmY5a.js +0 -1
  2522. package/lib/ui/assets/chunk-DNSN1z5r.js +0 -1
  2523. package/lib/ui/assets/chunk-DNasK_ZG.js +0 -1
  2524. package/lib/ui/assets/chunk-DPvrY3IQ.js +0 -1
  2525. package/lib/ui/assets/chunk-DXmwc3jG.js +0 -1
  2526. package/lib/ui/assets/chunk-Dd0kTxKP.js +0 -1
  2527. package/lib/ui/assets/chunk-De0Btta0.js +0 -1
  2528. package/lib/ui/assets/chunk-Des-eS-w.js +0 -1
  2529. package/lib/ui/assets/chunk-Df6bDoY_.js +0 -1
  2530. package/lib/ui/assets/chunk-DijEV5ha.js +0 -1
  2531. package/lib/ui/assets/chunk-DkvoVjww.js +0 -1
  2532. package/lib/ui/assets/chunk-DlC-OlHO.js +0 -1
  2533. package/lib/ui/assets/chunk-DnzrXTVv.js +0 -1
  2534. package/lib/ui/assets/chunk-Dualf0xi.js +0 -1
  2535. package/lib/ui/assets/chunk-EXT84bkm.js +0 -1
  2536. package/lib/ui/assets/chunk-GwR3hkPK.js +0 -1
  2537. package/lib/ui/assets/chunk-P80f7IUj.js +0 -1
  2538. package/lib/ui/assets/chunk-VOosw3JB.js +0 -1
  2539. package/lib/ui/assets/chunk-YQ4lDkt_.js +0 -140
  2540. package/lib/ui/assets/chunk-Yzrsuije.js +0 -1
  2541. package/lib/ui/assets/chunk-Z72CF80r.js +0 -1
  2542. package/lib/ui/assets/chunk-g9-lgVsj.js +0 -1
  2543. package/lib/ui/assets/chunk-vGWfd6FD.js +0 -1
  2544. package/lib/ui/assets/chunk-wDzz0qaB.js +0 -1
  2545. package/lib/ui/assets/chunk-ySF7HWmS.js +0 -1
  2546. package/lib/ui/assets/icon.png +0 -0
  2547. package/lib/ui/assets/index.html +0 -62
  2548. package/lib/ui/assets/pdf.worker.min-CjEcRF4W.mjs +0 -28
  2549. package/lib/ui/assets/style-CIJVQKkj.css +0 -1
  2550. package/lib/ui/frames.js +0 -144
  2551. package/lib/ui/index.d.ts +0 -88
  2552. package/lib/ui/index.js +0 -79
  2553. package/lib/ui/manifest.d.ts +0 -190
  2554. package/lib/ui/manifest.js +0 -159
  2555. package/lib/ui/plugin.d.ts +0 -161
  2556. package/lib/ui/plugins/actions/bundle.json +0 -8
  2557. package/lib/ui/plugins/actions/client.js +0 -43
  2558. package/lib/ui/plugins/ask/bundle.json +0 -8
  2559. package/lib/ui/plugins/ask/client.js +0 -415
  2560. package/lib/ui/plugins/browser/bundle.json +0 -8
  2561. package/lib/ui/plugins/browser/client.js +0 -290
  2562. package/lib/ui/plugins/browser/icon.png +0 -0
  2563. package/lib/ui/plugins/composer/bundle.json +0 -9
  2564. package/lib/ui/plugins/composer/client.js +0 -2509
  2565. package/lib/ui/plugins/composer/icon.png +0 -0
  2566. package/lib/ui/plugins/files/bundle.json +0 -8
  2567. package/lib/ui/plugins/files/client.js +0 -561
  2568. package/lib/ui/plugins/files/icon.png +0 -0
  2569. package/lib/ui/plugins/manifest.json +0 -4
  2570. package/lib/ui/plugins/palette/bundle.json +0 -8
  2571. package/lib/ui/plugins/palette/client.js +0 -360
  2572. package/lib/ui/plugins/plugins/bundle.json +0 -8
  2573. package/lib/ui/plugins/plugins/client.js +0 -760
  2574. package/lib/ui/plugins/plugins/icon.png +0 -0
  2575. package/lib/ui/plugins/preview/bundle.json +0 -8
  2576. package/lib/ui/plugins/preview/client.js +0 -187
  2577. package/lib/ui/plugins/preview/icon.png +0 -0
  2578. package/lib/ui/plugins/prompt/bundle.json +0 -8
  2579. package/lib/ui/plugins/prompt/client.js +0 -687
  2580. package/lib/ui/plugins/prompt/icon.png +0 -0
  2581. package/lib/ui/plugins/sessions/bundle.json +0 -8
  2582. package/lib/ui/plugins/sessions/client.js +0 -1595
  2583. package/lib/ui/plugins/sessions/icon.png +0 -0
  2584. package/lib/ui/plugins/settings/bundle.json +0 -8
  2585. package/lib/ui/plugins/settings/client.js +0 -5484
  2586. package/lib/ui/plugins/settings/icon.png +0 -0
  2587. package/lib/ui/plugins/skills/bundle.json +0 -8
  2588. package/lib/ui/plugins/skills/client.js +0 -567
  2589. package/lib/ui/plugins/skills/icon.png +0 -0
  2590. package/lib/ui/plugins/status/bundle.json +0 -8
  2591. package/lib/ui/plugins/status/client.js +0 -1406
  2592. package/lib/ui/plugins/status/icon.png +0 -0
  2593. package/lib/ui/plugins/statusbar/bundle.json +0 -9
  2594. package/lib/ui/plugins/statusbar/client.js +0 -460
  2595. package/lib/ui/plugins/statusbar/icon.png +0 -0
  2596. package/lib/ui/plugins/tasks/bundle.json +0 -8
  2597. package/lib/ui/plugins/tasks/client.js +0 -52
  2598. package/lib/ui/plugins/tasks/icon.png +0 -0
  2599. package/lib/ui/plugins/team/bundle.json +0 -8
  2600. package/lib/ui/plugins/team/client.js +0 -529
  2601. package/lib/ui/plugins/team/icon.png +0 -0
  2602. package/lib/ui/plugins/terminal/bundle.json +0 -8
  2603. package/lib/ui/plugins/terminal/client.js +0 -226
  2604. package/lib/ui/plugins/terminal/icon.png +0 -0
  2605. package/lib/ui/plugins/trace/bundle.json +0 -11
  2606. package/lib/ui/plugins/trace/client.js +0 -1283
  2607. package/lib/ui/plugins/trace/icon.png +0 -0
  2608. package/lib/ui/plugins/transcript/bundle.json +0 -8
  2609. package/lib/ui/plugins/transcript/client.js +0 -2966
  2610. package/lib/ui/plugins/transcript/icon.png +0 -0
  2611. package/lib/ui/scoped-slots.d.ts +0 -20
  2612. package/lib/ui/sdk/@dsc/ui/index.d.ts +0 -280
  2613. package/lib/ui/sdk/@dsc/ui/package.json +0 -16
  2614. package/lib/ui/sdk/@dsc/ui-core/contract.d.ts +0 -25
  2615. package/lib/ui/sdk/@dsc/ui-core/core/attachments.d.ts +0 -185
  2616. package/lib/ui/sdk/@dsc/ui-core/core/bytes.d.ts +0 -14
  2617. package/lib/ui/sdk/@dsc/ui-core/core/diff-text.d.ts +0 -74
  2618. package/lib/ui/sdk/@dsc/ui-core/core/dock-browser.d.ts +0 -137
  2619. package/lib/ui/sdk/@dsc/ui-core/core/dock-ops.d.ts +0 -59
  2620. package/lib/ui/sdk/@dsc/ui-core/core/err-text.d.ts +0 -18
  2621. package/lib/ui/sdk/@dsc/ui-core/core/git-surface.d.ts +0 -17
  2622. package/lib/ui/sdk/@dsc/ui-core/core/json-text.d.ts +0 -11
  2623. package/lib/ui/sdk/@dsc/ui-core/core/model-caps.d.ts +0 -83
  2624. package/lib/ui/sdk/@dsc/ui-core/core/native-bridge.d.ts +0 -135
  2625. package/lib/ui/sdk/@dsc/ui-core/core/path-policy.d.ts +0 -44
  2626. package/lib/ui/sdk/@dsc/ui-core/core/records.d.ts +0 -16
  2627. package/lib/ui/sdk/@dsc/ui-core/core/throughput.d.ts +0 -46
  2628. package/lib/ui/sdk/@dsc/ui-core/core/token-estimate.d.ts +0 -71
  2629. package/lib/ui/sdk/@dsc/ui-core/core/unified-diff.d.ts +0 -35
  2630. package/lib/ui/sdk/@dsc/ui-core/package.json +0 -16
  2631. package/lib/ui/sdk/@dsc/ui-core/ui/arrival.d.ts +0 -72
  2632. package/lib/ui/sdk/@dsc/ui-core/ui/frames.d.ts +0 -67
  2633. package/lib/ui/sdk/@dsc/ui-core/ui/index.d.ts +0 -88
  2634. package/lib/ui/sdk/@dsc/ui-core/ui/manifest.d.ts +0 -190
  2635. package/lib/ui/sdk/@dsc/ui-core/ui/plugin.d.ts +0 -161
  2636. package/lib/ui/sdk/@dsc/ui-core/ui/scoped-slots.d.ts +0 -20
  2637. package/lib/ui/sdk/@dsc/ui-core/ui/slots.d.ts +0 -481
  2638. package/lib/ui/sdk/@dsc/ui-dockkit/dock-model.d.ts +0 -252
  2639. package/lib/ui/sdk/@dsc/ui-dockkit/dock-state.d.ts +0 -163
  2640. package/lib/ui/sdk/@dsc/ui-dockkit/dock.d.ts +0 -24
  2641. package/lib/ui/sdk/@dsc/ui-dockkit/index.d.ts +0 -15
  2642. package/lib/ui/sdk/@dsc/ui-dockkit/package.json +0 -16
  2643. package/lib/ui/sdk/@dsc/ui-layout/app.d.ts +0 -78
  2644. package/lib/ui/sdk/@dsc/ui-layout/appearance.d.ts +0 -75
  2645. package/lib/ui/sdk/@dsc/ui-layout/host-channel.d.ts +0 -133
  2646. package/lib/ui/sdk/@dsc/ui-layout/index.d.ts +0 -35
  2647. package/lib/ui/sdk/@dsc/ui-layout/package.json +0 -16
  2648. package/lib/ui/sdk/@dsc/ui-layout/page-state.d.ts +0 -14
  2649. package/lib/ui/sdk/@dsc/ui-layout/review-pane.d.ts +0 -21
  2650. package/lib/ui/sdk/@dsc/ui-layout/runtime-context.d.ts +0 -53
  2651. package/lib/ui/sdk/@dsc/ui-layout/thread-view.d.ts +0 -28
  2652. package/lib/ui/sdk/@dsc/ui-layout/update-button.d.ts +0 -21
  2653. package/lib/ui/sdk/@dsc/ui-layout/usage-today.d.ts +0 -11
  2654. package/lib/ui/sdk/@dsc/ui-primitives/code-file-icon-artwork.d.ts +0 -53
  2655. package/lib/ui/sdk/@dsc/ui-primitives/code-view.d.ts +0 -15
  2656. package/lib/ui/sdk/@dsc/ui-primitives/compat.d.ts +0 -27
  2657. package/lib/ui/sdk/@dsc/ui-primitives/completion-sound.d.ts +0 -24
  2658. package/lib/ui/sdk/@dsc/ui-primitives/confirm.d.ts +0 -33
  2659. package/lib/ui/sdk/@dsc/ui-primitives/css.d.ts +0 -47
  2660. package/lib/ui/sdk/@dsc/ui-primitives/dialog-focus.d.ts +0 -30
  2661. package/lib/ui/sdk/@dsc/ui-primitives/diff-rows.d.ts +0 -20
  2662. package/lib/ui/sdk/@dsc/ui-primitives/error-text.d.ts +0 -12
  2663. package/lib/ui/sdk/@dsc/ui-primitives/file-icons.d.ts +0 -38
  2664. package/lib/ui/sdk/@dsc/ui-primitives/file-type-classify.d.ts +0 -66
  2665. package/lib/ui/sdk/@dsc/ui-primitives/file-type-icon.d.ts +0 -57
  2666. package/lib/ui/sdk/@dsc/ui-primitives/git-surface.d.ts +0 -9
  2667. package/lib/ui/sdk/@dsc/ui-primitives/highlight.d.ts +0 -47
  2668. package/lib/ui/sdk/@dsc/ui-primitives/hover-delay.d.ts +0 -17
  2669. package/lib/ui/sdk/@dsc/ui-primitives/humanize-error.d.ts +0 -35
  2670. package/lib/ui/sdk/@dsc/ui-primitives/icons-workspace.d.ts +0 -33
  2671. package/lib/ui/sdk/@dsc/ui-primitives/icons.d.ts +0 -116
  2672. package/lib/ui/sdk/@dsc/ui-primitives/index.d.ts +0 -68
  2673. package/lib/ui/sdk/@dsc/ui-primitives/lang-table.d.ts +0 -10
  2674. package/lib/ui/sdk/@dsc/ui-primitives/markdown.d.ts +0 -16
  2675. package/lib/ui/sdk/@dsc/ui-primitives/native.d.ts +0 -41
  2676. package/lib/ui/sdk/@dsc/ui-primitives/package.json +0 -16
  2677. package/lib/ui/sdk/@dsc/ui-primitives/panels.d.ts +0 -109
  2678. package/lib/ui/sdk/@dsc/ui-primitives/paths.d.ts +0 -13
  2679. package/lib/ui/sdk/@dsc/ui-primitives/pdf-view.d.ts +0 -13
  2680. package/lib/ui/sdk/@dsc/ui-primitives/plugin-text.d.ts +0 -15
  2681. package/lib/ui/sdk/@dsc/ui-primitives/review-notice-card.d.ts +0 -27
  2682. package/lib/ui/sdk/@dsc/ui-primitives/review-notice.d.ts +0 -80
  2683. package/lib/ui/sdk/@dsc/ui-primitives/select.d.ts +0 -35
  2684. package/lib/ui/sdk/@dsc/ui-primitives/signal.d.ts +0 -9
  2685. package/lib/ui/sdk/@dsc/ui-primitives/sizes.d.ts +0 -15
  2686. package/lib/ui/sdk/@dsc/ui-primitives/skeleton.d.ts +0 -39
  2687. package/lib/ui/sdk/@dsc/ui-primitives/snapshot.d.ts +0 -46
  2688. package/lib/ui/sdk/@dsc/ui-primitives/table-view.d.ts +0 -23
  2689. package/lib/ui/sdk/@dsc/ui-primitives/thread-resizer.d.ts +0 -22
  2690. package/lib/ui/sdk/@dsc/ui-primitives/throughput.d.ts +0 -13
  2691. package/lib/ui/sdk/@dsc/ui-primitives/time.d.ts +0 -33
  2692. package/lib/ui/sdk/@dsc/ui-primitives/toast.d.ts +0 -16
  2693. package/lib/ui/sdk/@dsc/ui-primitives/tokens.d.ts +0 -23
  2694. package/lib/ui/sdk/@dsc/ui-primitives/tool-args.d.ts +0 -49
  2695. package/lib/ui/sdk/@dsc/ui-primitives/tool-summary.d.ts +0 -88
  2696. package/lib/ui/sdk/@dsc/ui-primitives/unified-diff.d.ts +0 -10
  2697. package/lib/ui/sdk/@dsc/ui-renderer/boot.d.ts +0 -130
  2698. package/lib/ui/sdk/@dsc/ui-renderer/cordis-host.d.ts +0 -113
  2699. package/lib/ui/sdk/@dsc/ui-renderer/hmr.d.ts +0 -43
  2700. package/lib/ui/sdk/@dsc/ui-renderer/index.d.ts +0 -20
  2701. package/lib/ui/sdk/@dsc/ui-renderer/package.json +0 -16
  2702. package/lib/ui/sdk/@dsc/ui-slots/index.d.ts +0 -19
  2703. package/lib/ui/sdk/@dsc/ui-slots/package.json +0 -16
  2704. package/lib/ui/sdk/@dsc/ui-slots/slots-react.d.ts +0 -48
  2705. package/lib/ui/sdk/@dsc/ui-slots/slots.d.ts +0 -102
  2706. package/lib/ui/services-react.d.ts +0 -27
  2707. package/lib/ui/services.d.ts +0 -74
  2708. package/lib/ui/signal.d.ts +0 -49
  2709. package/lib/ui/slots-ink.d.ts +0 -26
  2710. package/lib/ui/slots-ink.js +0 -78
  2711. package/lib/ui/slots-react.d.ts +0 -28
  2712. package/lib/ui/slots.d.ts +0 -481
  2713. package/lib/ui/store.d.ts +0 -89
  2714. package/lib/ui/tui-plugin-api.d.ts +0 -23
  2715. package/lib/ui/tui-plugin-api.js +0 -23
  2716. package/lib/ui/tui-plugins.d.ts +0 -47
  2717. package/lib/ui/tui-plugins.js +0 -240
  2718. /package/lib/{core → packages/approval}/call-meaning.d.ts +0 -0
  2719. /package/lib/{plugins/approval-floor.d.ts → packages/approval-floor/index.d.ts} +0 -0
  2720. /package/lib/{plugins/ask.d.ts → packages/ask/index.d.ts} +0 -0
  2721. /package/lib/{core → packages}/cdp/actions.d.ts +0 -0
  2722. /package/lib/{core → packages}/cdp/launch.d.ts +0 -0
  2723. /package/lib/{tools → packages/cli}/config-cli.d.ts +0 -0
  2724. /package/lib/{tools → packages/cli}/plugin-cli.d.ts +0 -0
  2725. /package/lib/{plugins/dsh-compat.d.ts → packages/dsh-compat/index.d.ts} +0 -0
  2726. /package/lib/{plugins/git.d.ts → packages/git/index.d.ts} +0 -0
  2727. /package/lib/{core → packages/goal}/goal.js +0 -0
  2728. /package/lib/{plugins/guards.d.ts → packages/guards/index.d.ts} +0 -0
  2729. /package/lib/{plugins/image-diet.d.ts → packages/image-diet/index.d.ts} +0 -0
  2730. /package/lib/{core → packages}/lsp/client.d.ts +0 -0
  2731. /package/lib/{core → packages}/lsp/framing.d.ts +0 -0
  2732. /package/lib/{core → packages}/lsp/framing.js +0 -0
  2733. /package/lib/{core → packages}/lsp/line-shift.d.ts +0 -0
  2734. /package/lib/{core → packages}/lsp/line-shift.js +0 -0
  2735. /package/lib/{core → packages}/lsp/manager.d.ts +0 -0
  2736. /package/lib/{core → packages}/lsp/normalize.d.ts +0 -0
  2737. /package/lib/{core → packages}/lsp/servers.d.ts +0 -0
  2738. /package/lib/{core → packages}/lsp/uri.d.ts +0 -0
  2739. /package/lib/{core → packages}/lsp/uri.js +0 -0
  2740. /package/lib/{plugins/mcp.d.ts → packages/mcp/index.d.ts} +0 -0
  2741. /package/lib/{core → packages/memory}/memory-eval.d.ts +0 -0
  2742. /package/lib/{core → packages/memory}/memory-eval.js +0 -0
  2743. /package/lib/{core → packages/permission-core}/permission-presets.js +0 -0
  2744. /package/lib/{plugins/plan.d.ts → packages/plan/index.d.ts} +0 -0
  2745. /package/lib/{plugins/plugin-manager.d.ts → packages/plugin-manager/index.d.ts} +0 -0
  2746. /package/lib/{plugins/presets.d.ts → packages/presets/index.d.ts} +0 -0
  2747. /package/lib/{plugins/ptc.d.ts → packages/ptc/index.d.ts} +0 -0
  2748. /package/lib/{plugins → packages}/remote/routes.d.ts +0 -0
  2749. /package/lib/{plugins/runtime.d.ts → packages/runtime/index.d.ts} +0 -0
  2750. /package/lib/{plugins/runtime-api.d.ts → packages/runtime-api/index.d.ts} +0 -0
  2751. /package/lib/{core → packages}/sandbox/backends.js +0 -0
  2752. /package/lib/{plugins/sandbox.d.ts → packages/sandbox/index.d.ts} +0 -0
  2753. /package/lib/{core → packages}/sandbox/net-proxy.d.ts +0 -0
  2754. /package/lib/{core → packages}/sandbox/win/abi.d.ts +0 -0
  2755. /package/lib/{core → packages}/sandbox/win/abi.js +0 -0
  2756. /package/lib/{core → packages}/sandbox/win/account.d.ts +0 -0
  2757. /package/lib/{core → packages}/sandbox/win/acl.d.ts +0 -0
  2758. /package/lib/{core → packages}/sandbox/win/acl.js +0 -0
  2759. /package/lib/{core → packages}/sandbox/win/doctor.d.ts +0 -0
  2760. /package/lib/{core → packages}/sandbox/win/net-abi.d.ts +0 -0
  2761. /package/lib/{core → packages}/sandbox/win/net-abi.js +0 -0
  2762. /package/lib/{core → packages}/sandbox/win/token.d.ts +0 -0
  2763. /package/lib/{core → packages}/sandbox/win/token.js +0 -0
  2764. /package/lib/{core → packages}/sandbox/win/utf16.d.ts +0 -0
  2765. /package/lib/{core → packages}/sandbox/win/utf16.js +0 -0
  2766. /package/lib/{core → packages}/sandbox/win/wfp.d.ts +0 -0
  2767. /package/lib/{core → packages}/sandbox/win/workspace-sid.d.ts +0 -0
  2768. /package/lib/{core → packages}/sandbox/win/workspace-sid.js +0 -0
  2769. /package/lib/{core/learnings → packages/self-improve}/store.d.ts +0 -0
  2770. /package/lib/{plugins/session.d.ts → packages/session/index.d.ts} +0 -0
  2771. /package/lib/{plugins/session-search.d.ts → packages/session-search/index.d.ts} +0 -0
  2772. /package/lib/{core → packages/session-search}/session-index.d.ts +0 -0
  2773. /package/lib/{plugins/session-title.d.ts → packages/session-title/index.d.ts} +0 -0
  2774. /package/lib/{core → packages/settings}/model-discovery.d.ts +0 -0
  2775. /package/lib/{core → packages/settings}/model-discovery.js +0 -0
  2776. /package/lib/{plugins/spill.d.ts → packages/spill/index.d.ts} +0 -0
  2777. /package/lib/{core → packages/surfaces}/surface-registry.d.ts +0 -0
  2778. /package/lib/{core → packages/surfaces}/surface-registry.js +0 -0
  2779. /package/lib/{core → packages/todo}/todo.js +0 -0
  2780. /package/lib/{plugins/tool-search.d.ts → packages/tool-search/index.d.ts} +0 -0
  2781. /package/lib/{core → packages/tool-search}/tool-search.js +0 -0
  2782. /package/lib/{plugins/tools.d.ts → packages/tools/index.d.ts} +0 -0
  2783. /package/lib/{plugins/tools.js → packages/tools/index.js} +0 -0
  2784. /package/lib/{plugins/tools-default.d.ts → packages/tools-default/index.d.ts} +0 -0
  2785. /package/lib/{app → packages/tui/app}/AgentsOverlay.js +0 -0
  2786. /package/lib/{app → packages/tui/app}/AskCard.js +0 -0
  2787. /package/lib/{app → packages/tui/app}/MarkdownView.d.ts +0 -0
  2788. /package/lib/{app → packages/tui/app}/MarkdownView.js +0 -0
  2789. /package/lib/{app → packages/tui/app}/ModelPicker.js +0 -0
  2790. /package/lib/{app → packages/tui/app}/PickerFrame.d.ts +0 -0
  2791. /package/lib/{app → packages/tui/app}/PickerFrame.js +0 -0
  2792. /package/lib/{app → packages/tui/app}/PlanReviewCard.js +0 -0
  2793. /package/lib/{app → packages/tui/app}/PresetPicker.js +0 -0
  2794. /package/lib/{app → packages/tui/app}/PreviewOverlay.d.ts +0 -0
  2795. /package/lib/{app → packages/tui/app}/PreviewOverlay.js +0 -0
  2796. /package/lib/{app → packages/tui/app}/SessionPicker.js +0 -0
  2797. /package/lib/{app → packages/tui/app}/SkillsPicker.js +0 -0
  2798. /package/lib/{app → packages/tui/app}/TimelineRail.d.ts +0 -0
  2799. /package/lib/{app → packages/tui/app}/TimelineRail.js +0 -0
  2800. /package/lib/{app → packages/tui/app}/TranscriptOverlay.js +0 -0
  2801. /package/lib/{app → packages/tui/app}/Welcome.d.ts +0 -0
  2802. /package/lib/{app → packages/tui/app}/attach.d.ts +0 -0
  2803. /package/lib/{app → packages/tui/app}/attach.js +0 -0
  2804. /package/lib/{app → packages/tui/app}/click.d.ts +0 -0
  2805. /package/lib/{app → packages/tui/app}/click.js +0 -0
  2806. /package/lib/{app → packages/tui/app}/clipboard-image.d.ts +0 -0
  2807. /package/lib/{app → packages/tui/app}/cursor.d.ts +0 -0
  2808. /package/lib/{app → packages/tui/app}/cursor.js +0 -0
  2809. /package/lib/{app → packages/tui/app}/history-store.d.ts +0 -0
  2810. /package/lib/{app → packages/tui/app}/image-blocks.d.ts +0 -0
  2811. /package/lib/{app → packages/tui/app}/keymap.d.ts +0 -0
  2812. /package/lib/{app → packages/tui/app}/keymap.js +0 -0
  2813. /package/lib/{app → packages/tui/app}/markdown.d.ts +0 -0
  2814. /package/lib/{app → packages/tui/app}/markdown.js +0 -0
  2815. /package/lib/{app → packages/tui/app}/mouse.d.ts +0 -0
  2816. /package/lib/{app → packages/tui/app}/mouse.js +0 -0
  2817. /package/lib/{app → packages/tui/app}/pointer.d.ts +0 -0
  2818. /package/lib/{app → packages/tui/app}/pointer.js +0 -0
  2819. /package/lib/{app → packages/tui/app}/scroll-model.js +0 -0
  2820. /package/lib/{app → packages/tui/app}/snapshot-subscribe.d.ts +0 -0
  2821. /package/lib/{app → packages/tui/app}/theme.d.ts +0 -0
  2822. /package/lib/{app → packages/tui/app}/theme.js +0 -0
  2823. /package/lib/{app → packages/tui/app}/ticker.d.ts +0 -0
  2824. /package/lib/{app → packages/tui/app}/ticker.js +0 -0
  2825. /package/lib/{plugins/tui.d.ts → packages/tui/index.d.ts} +0 -0
  2826. /package/lib/{ui → packages/ui-core}/arrival.d.ts +0 -0
  2827. /package/lib/{ui → packages/ui-core}/arrival.js +0 -0
  2828. /package/lib/{ui → packages/ui-core}/frames.d.ts +0 -0
  2829. /package/lib/{ui → packages/ui-core}/plugin.js +0 -0
  2830. /package/lib/{ui → packages/ui-core}/scoped-slots.js +0 -0
  2831. /package/lib/{ui/sdk/@dsc/ui-core/ui → packages/ui-core}/services-react.d.ts +0 -0
  2832. /package/lib/{ui → packages/ui-core}/services-react.js +0 -0
  2833. /package/lib/{ui/sdk/@dsc/ui-core/ui → packages/ui-core}/services.d.ts +0 -0
  2834. /package/lib/{ui → packages/ui-core}/services.js +0 -0
  2835. /package/lib/{ui/sdk/@dsc/ui-core/ui → packages/ui-core}/signal.d.ts +0 -0
  2836. /package/lib/{ui → packages/ui-core}/signal.js +0 -0
  2837. /package/lib/{ui/sdk/@dsc/ui-core/ui → packages/ui-core}/slots-react.d.ts +0 -0
  2838. /package/lib/{ui → packages/ui-core}/slots-react.js +0 -0
  2839. /package/lib/{ui → packages/ui-core}/slots.js +0 -0
  2840. /package/lib/{ui/sdk/@dsc/ui-core/ui → packages/ui-core}/store.d.ts +0 -0
  2841. /package/lib/{ui → packages/ui-core}/store.js +0 -0
@@ -0,0 +1,2414 @@
1
+ /**
2
+ * 子智能体(官方插件,默认关闭)。
3
+ *
4
+ * 打开后模型多出 `subagent` 工具:派活、传话、打断。关掉后这个工具、它注入的
5
+ * 提示词、以及在跑的队友一起消失——本插件不提供第二套 agent 实现,队友就是
6
+ * 「另一个 MiniAgent 实例 + 它自己的会话文件 + 一张冻结的工牌」。
7
+ *
8
+ * 队友按会话隔离(对照 dsh 的 parentSession 过滤):每个会话各自一份在队名单与
9
+ * 并发额度,`subagent list` 只报本会话派出的队友。包里另带一块按会话分开的共享
10
+ * 任务板(`team_task`):板子可以在设置里单独关(「任务板」分组),关掉只是模型看
11
+ * 不到这个工具与提示段,名册与派活照常——只想要一块共享待办的人可以这么用。
12
+ *
13
+ * 工牌(工具白名单 / 审批意愿 / 轮次预算 / 模型)在队友开工那一刻从角色文件复制进
14
+ * 运行时并冻结,所以中途改角色文件只影响下一个新队友,也堵住了「队友跑一半给自己提权」。
15
+ *
16
+ * 审批取「全局上限」与「角色意愿」里更严的那个:全局选「不允许」时谁都别想弹卡;
17
+ * 全局选「仅前台队友」时,后台队友自动退回不允许。弹出来的卡上写明是谁在请求。
18
+ *
19
+ * @module dsc/plugins/subagent
20
+ */
21
+ import { randomUUID } from 'node:crypto';
22
+ import { existsSync, mkdirSync, readFileSync, rmSync, statSync, writeFileSync } from 'node:fs';
23
+ import { join, dirname, resolve } from 'node:path';
24
+ import { Transcript } from '@pneuma/runtime/adapter/transcript.js';
25
+ import { builtinRoleNames, builtinRole, DSC_AGENTS_DIR, ensureBuiltinRoles, findRole, listRoles, migrateBuiltinRoleMaxTurns, writeRole, } from './agent-roles.js';
26
+ import { resolvePluginConfig, writePluginConfig } from '@pneuma/runtime/core/plugin-registry.js';
27
+ import { MiniAgent } from '@pneuma/session-core/loop.js';
28
+ import { subagentEnvironmentText } from '@pneuma/session-core/prompt.js';
29
+ import { activeRules } from '@pneuma/runtime/core/command-policy.js';
30
+ import { errText } from '@pneuma/runtime/core/err-text.js';
31
+ import { modeSpec } from '@pneuma/session-core/modes.js';
32
+ import { isTeammateSessionFile, REJECTED_TOOL_TEXT, Session, sessionsRoot, slugCwd, } from '@pneuma/runtime/core/session.js';
33
+ import { argsSummary } from '@pneuma/runtime/core/tools.js';
34
+ import { toolApprovalGuard } from '@pneuma/runtime/core/tool-guards.js';
35
+ import { BOARDS_DIR, boardCreate, boardUpdate, boardViewOf, inboxAppend, inboxRead, isReady, readBoard, recordBoardActivity, resetBoard, REVIEW_FINDINGS_OPEN, TEAMMATE_REPORT_OPEN, } from '@pneuma/runtime/core/team-board.js';
36
+ import { contextInjectionPreview } from '@pneuma/runtime/contract.js';
37
+ import { InjectionNoteLedger, InjectionReportLedger } from '@pneuma/runtime/core/context-injection-report.js';
38
+ import { activityDigestLine, BOARD_SNAPSHOT_KIND, boardSnapshotText, boardSnapshotWatermark, BoardSnapshotWatermark, countRounds, taskDigestLine, userTurnKey, } from './board-snapshot.js';
39
+ import { reviewTaskText, ReviewJournal, REVIEW_CANCELED_TEXT } from '@pneuma/runtime/core/git-info.js';
40
+ import { clampInt as clamp } from '@pneuma/runtime/core/clamp.js';
41
+ import { hostT } from '@pneuma/runtime/core/i18n.js';
42
+ // 摘要行原本定义在本文件里,2026-11 挪进 board-snapshot.ts(与快照正文一起可单测)。
43
+ // 从这里再导出:包级测试与既有调用方仍按 `@pneuma/subagent` 的入口取,不用改 import。
44
+ export { activityDigestLine, taskDigestLine };
45
+ /**
46
+ * 设置面文案的取词器:语言来自 `config.yaml` 的 `language:`,字典是本包的
47
+ * `locale/ui.zh.json` / `ui.en.json`(与界面半用同一份文件、同一条判定)。
48
+ */
49
+ const t = hostT(import.meta.dirname);
50
+ const CONFIG_KEY = 'subagent';
51
+ /**
52
+ * 内置角色的出厂轮次预算(设置页「默认最大轮次」的默认值;0 = 不限)。
53
+ *
54
+ * 为什么默认值不写在角色文件的 `max-turns` 里:文件里的值属于「显式声明」,会一直压过
55
+ * 设置页;默认值放这里,用户改设置页才真的生效。旧安装里钉着旧默认值的角色文件由
56
+ * `migrateBuiltinRoleMaxTurns` 迁移。
57
+ */
58
+ export const DEFAULT_ROLE_TURNS = {
59
+ pm: 48,
60
+ architect: 32,
61
+ developer: 128,
62
+ tester: 64,
63
+ ops: 32,
64
+ critic: 16,
65
+ reviewer: 64,
66
+ writer: 128,
67
+ explorer: 0,
68
+ };
69
+ /** 设置页「默认最大轮次」列出的角色:先列团队职能角色,再列通用角色,不限的垫底。 */
70
+ const TURN_ROLES = [
71
+ 'pm',
72
+ 'architect',
73
+ 'developer',
74
+ 'tester',
75
+ 'ops',
76
+ 'critic',
77
+ 'reviewer',
78
+ 'writer',
79
+ 'explorer',
80
+ ];
81
+ const DEFAULTS = {
82
+ allowDelegation: true,
83
+ maxTeammates: 4,
84
+ maxDepth: 1,
85
+ approval: 'forbid',
86
+ notify: 'auto',
87
+ defaultModel: '',
88
+ allowModelSelection: false,
89
+ allowedModels: [],
90
+ maxTurns: 0,
91
+ roleTurns: { ...DEFAULT_ROLE_TURNS },
92
+ board: true,
93
+ teamMode: false,
94
+ };
95
+ const APPROVAL_RANK = { forbid: 0, foreground: 1, ask: 2 };
96
+ /** 收工的队友最多在名单里留这么多个,超了就挤掉最老的(不占并发额度,只是别把名单撑爆)。 */
97
+ const MAX_LISTED_FINISHED = 12;
98
+ /**
99
+ * 轮次预算取更严的那个:角色与插件都设了上限时取小的;任一方为 0(不限)时看另一方。
100
+ * @returns 0 = 不额外设限。
101
+ */
102
+ function effectiveMaxTurns(roleTurns, pluginTurns) {
103
+ if (roleTurns <= 0)
104
+ return Math.max(pluginTurns, 0);
105
+ if (pluginTurns <= 0)
106
+ return roleTurns;
107
+ return Math.min(roleTurns, pluginTurns);
108
+ }
109
+ /**
110
+ * 一个角色此刻的轮次预算,三档优先级:
111
+ * 1. 角色文件里**显式**写了 `max-turns`(写 0 也算显式,表示不限)→ 用文件里的;
112
+ * 2. 没写 → 用设置页「默认最大轮次」里这个角色的值({@link SubagentConfig.roleTurns});
113
+ * 3. 全局 {@link SubagentConfig.maxTurns} 大于 0 时,再取更严的那个。
114
+ *
115
+ * 名册提示与队友冻结的工牌都走这一个函数,保证「展示的轮次」就是「实际给的轮次」。
116
+ * @param role - 角色(只用到名字、max-turns 与是否显式声明)
117
+ * @param roleTurns - 设置页按角色配的轮次表
118
+ * @param globalTurns - 全局轮次上限(0 = 不设限)
119
+ * @returns 0 = 这个角色不额外设限
120
+ */
121
+ export function resolveMaxTurns(role, roleTurns, globalTurns) {
122
+ const budget = role.maxTurnsDeclared ? role.maxTurns : (roleTurns[role.name] ?? 0);
123
+ return effectiveMaxTurns(budget, globalTurns);
124
+ }
125
+ /**
126
+ * 读配置里的 `roleTurns`:出厂默认打底,只认数字(夹进 0..200),坏值退回该角色的默认值。
127
+ * 配置里没有的角色(包括用户自建角色)不写进表,解析时按 0(不限)处理。
128
+ */
129
+ function readRoleTurns(raw) {
130
+ const source = raw !== null && typeof raw === 'object' && !Array.isArray(raw) ? raw : {};
131
+ const out = { ...DEFAULT_ROLE_TURNS };
132
+ for (const [name, value] of Object.entries(source)) {
133
+ if (name === '')
134
+ continue;
135
+ out[name] = clamp(value, 0, 200, DEFAULT_ROLE_TURNS[name] ?? 0);
136
+ }
137
+ return out;
138
+ }
139
+ /** 思考强度档位(与角色文件 frontmatter、主会话 /model 的档位同一套)。 */
140
+ const EFFORT_LEVELS = ['default', 'off', 'low', 'high', 'max'];
141
+ /**
142
+ * 读配置里的 `allowedModels`:只收非空字符串、去重、保持原顺序。
143
+ *
144
+ * 这里不拿 `ctx.llm.listModels()` 过滤:模型清单跟着端点配置变,用户临时删掉一个端点
145
+ * 不该把他勾过的授权静默清空;真到派活时那个模型解析不出来,会被校验拦下。
146
+ */
147
+ export function readAllowedModels(raw) {
148
+ if (!Array.isArray(raw))
149
+ return [];
150
+ const out = [];
151
+ for (const item of raw) {
152
+ if (typeof item !== 'string')
153
+ continue;
154
+ const value = item.trim();
155
+ if (value !== '' && !out.includes(value))
156
+ out.push(value);
157
+ }
158
+ return out;
159
+ }
160
+ /**
161
+ * 队友用哪个模型:spawn 显式指定 > 角色文件 model > 旧配置 defaultModel > 跟随当前会话。
162
+ * @param spawnModel - spawn 参数里归一好的 `端点/模型`;null = 没指定
163
+ * @param role - 角色(读它的 model)
164
+ * @param fallbackModel - 旧配置 defaultModel;空串 = 没配
165
+ * @returns null = 跟随当前会话的模型
166
+ */
167
+ export function resolveTeammateModel(spawnModel, role, fallbackModel) {
168
+ if (spawnModel !== null)
169
+ return spawnModel;
170
+ if (role.model !== null)
171
+ return role.model;
172
+ return fallbackModel === '' ? null : fallbackModel;
173
+ }
174
+ /**
175
+ * 队友用哪个思考强度:spawn 显式指定 > 角色文件 effort > 跟随模型默认。
176
+ * @returns null = 不覆盖,按模型默认档位
177
+ */
178
+ export function resolveTeammateEffort(spawnEffort, role) {
179
+ return spawnEffort ?? role.effort;
180
+ }
181
+ /**
182
+ * 队友系统提示里的「模型 / 思考强度」事实句。
183
+ *
184
+ * 只写它自己冻结的那一份与「仅影响新队友」的语义,**不列授权清单**:清单是派活方做
185
+ * 合法选择要用的信息(写在名册提示里),对已经开工的队友来说既用不上,也不该被它拿去
186
+ * 推断用户还有哪些模型没授权。
187
+ * @param model - 冻结的模型(`端点/模型`,或跟随会话时的模型名)
188
+ * @param effort - 冻结的思考强度;null = 跟随默认
189
+ * @param selectionAllowed - 本会话是否放开了「允许 Agent 为子队友选择模型」
190
+ */
191
+ export function teammateModelNote(model, effort, selectionAllowed) {
192
+ const frozen = effort === null ? ',思考强度跟随默认' : `,思考强度 ${effort}`;
193
+ const future = selectionAllowed
194
+ ? '如果你还能往下派(层级允许),派新队友时可以用 model / effort 指定模型与思考强度,但只能从用户授权的模型清单里挑——不在清单里会被直接拒绝,别反复试。'
195
+ : '这个会话里派活的人不能指定模型。';
196
+ return `模型:你开工时冻结为「${model}」${frozen}。这是派你的人在你开工那一刻定的:中途改角色文件或设置只影响之后新建的队友,改不了你这一份。${future}`;
197
+ }
198
+ /**
199
+ * 校验并归一 spawn 的 `model` / `effort`。
200
+ *
201
+ * 规则(与设置页的开关、授权清单同一条口径):
202
+ * - `model` 在开关关闭时一律拒绝(明确告诉模型去设置里打开);
203
+ * - 开关打开时,用 `parseModelRef` 归一成 `端点/模型`,必须落在授权清单里;
204
+ * 清单为空 = 一个都没授权,同样拒绝并提示去勾选;
205
+ * - `effort` 只认 {@link EFFORT_LEVELS} 里的值,与开关无关(它不涉及选端点/模型)。
206
+ *
207
+ * @param rawModel - spawn 参数 `model` 原值
208
+ * @param rawEffort - spawn 参数 `effort` 原值
209
+ * @param selection - 开关与授权清单
210
+ * @param parseModelRef - 归一模型引用(`ctx.llm.parseModelRef`)
211
+ */
212
+ export function resolveSpawnOverrides(rawModel, rawEffort, selection, parseModelRef) {
213
+ let model = null;
214
+ const modelText = typeof rawModel === 'string' ? rawModel.trim() : '';
215
+ if (modelText !== '') {
216
+ if (!selection.allow) {
217
+ return {
218
+ ok: false,
219
+ reason: '不能指定模型:用户还没打开「允许 Agent 为子队友选择模型」' +
220
+ '(设置 → 子智能体 → 队友模型)。不带 model 再派一次,它会跟随角色文件或当前会话的模型。',
221
+ };
222
+ }
223
+ const parsed = parseModelRef(modelText);
224
+ // 归一成清单里的形状:`端点/模型`(parseModelRef 对裸模型名会补上当前会话的端点)
225
+ const value = parsed.model === '' ? parsed.provider : `${parsed.provider}/${parsed.model}`;
226
+ if (!selection.allowed.includes(value)) {
227
+ const allowed = selection.allowed.join('、');
228
+ return {
229
+ ok: false,
230
+ reason: `模型「${value}」不在用户授权的清单里。` +
231
+ (allowed === '' ? '现在一个都没授权:去设置 → 子智能体 → 队友模型 里勾选。' : `可选的:${allowed}`),
232
+ };
233
+ }
234
+ model = value;
235
+ }
236
+ let effort = null;
237
+ const effortText = typeof rawEffort === 'string' ? rawEffort.trim() : '';
238
+ if (effortText !== '') {
239
+ if (!EFFORT_LEVELS.includes(effortText)) {
240
+ return {
241
+ ok: false,
242
+ reason: `不认识的 effort「${effortText}」。要用的值:${EFFORT_LEVELS.join(' / ')}`,
243
+ };
244
+ }
245
+ effort = effortText;
246
+ }
247
+ return { ok: true, model, effort };
248
+ }
249
+ /** 主会话这一方在任务板上的名字。 */
250
+ const LEAD = 'lead';
251
+ /**
252
+ * 协作类工具:不受角色工牌白名单限制。
253
+ *
254
+ * 为什么:白名单表达的是「这个角色能改哪些文件、能跑什么命令」,任务板是一次协作登记
255
+ * (`risk` 声明为 read),不该因为角色写了 `tools: read, glob, grep` 就把它一起关掉。
256
+ * 2026-11-08 报障:explorer 队友回「本次会话给我的可用工具只有 read、glob、grep」,
257
+ * 领不到任务——根因就在 `toolsFor` 拿白名单把 team_task 一起筛掉了。
258
+ */
259
+ export const COLLAB_TOOL_NAMES = ['team_task', 'team_message'];
260
+ /**
261
+ * 每个队友每轮最多发几条 `team_message`。
262
+ *
263
+ * 为什么要有:队友互发消息后彼此会被叫醒,两个队友完全可以「你一句我一句」把轮次预算
264
+ * 烧光。额度按「轮次」清零(`emit` 里 rounds +1 就是一轮),超了让它们改用任务板 note。
265
+ */
266
+ const TEAM_MESSAGES_PER_ROUND = 3;
267
+ /** 一条 team_message 的正文长度上限(与信箱单条上限一致)。 */
268
+ const MAX_TEAM_MESSAGE_CHARS = 8000;
269
+ /**
270
+ * 系统提示里 `team` 段的固定正文:只讲「板子是什么 + 五条规矩」,**不放任何看板数据**。
271
+ *
272
+ * 2026-11 用户报障:这段原先由 `boardPromptText()` 每轮现拼(板上任务、队友状态、最近
273
+ * 活动都在里面),于是系统提示 hash 每轮都变——转录里连着三张「系统提示」卡,服务端
274
+ * 前缀缓存(`core/llm.ts:777` 的头部断点)每轮失效、实测命中率掉到约 50%。现在这段是
275
+ * 逐字常量;看板数据改由投影 `team-board` 在看板变化后附到消息尾部(见
276
+ * `board-snapshot.ts` 的文件头)。
277
+ *
278
+ * 改这段文字没关系(一次 hash 变化 = 一次缓存落空,随后又稳定);**别把看板数据、
279
+ * 队友名单、时间戳加回来**——那正是这次修的 bug。
280
+ *
281
+ * 在队队友的名单与状态同理(开工/收工/状态切换都会变),所以也不写进来;{@link teamBoardGuide}
282
+ * 按「本会话开没开派活」补一句指向 `subagent list` 的提示。
283
+ */
284
+ export const TEAM_BOARD_GUIDE = `# 共享任务板
285
+ 本会话有一块共享任务板,你可以用 team_task 工具登记要做的事、认领和结项、写进展、标阻塞;队友和你看到的是同一块板。
286
+
287
+ 看板数据不进这段提示:它每轮都在变,写在这里会让整份系统提示(进而整个请求前缀)每轮失效、缓存全部作废。最新看板由程序在看板变化后附到消息末尾(以「# 共享任务板快照」开头);想看最新任务、负责人、进展与活动,随时用 team_task list / get / activity 查。
288
+
289
+ 任务板的规矩:
290
+ 1. 多人协作先上任务板:create 时写清 write_scopes(打算改哪些路径)与依赖,别人 claim 时才抢不过你;改状态要带 expected_revision。
291
+ 2. 认领前先 list / activity:依赖没完成的任务开不了工;完成一条,等它的人就能开工。
292
+ 3. 派活时优先用 subagent 的 task_id 把队友绑定到它负责的任务:认领会一起做掉,队友成功收工自动结项。
293
+ 4. 队友之间可以直接用 team_message 交流(点对点或广播),不必都经你转述;重要结论以任务板 note 为准。
294
+ 5. 进展用 note 写、卡住用 block 标,别只写在汇报里——汇报只给你看,板子是全队看的。`;
295
+ /**
296
+ * 系统提示 `team` 段的完整正文:{@link TEAM_BOARD_GUIDE} +(开了派活时)一句队友通道提示。
297
+ *
298
+ * 为什么单独一个函数而不是直接常量:队友名单/状态只有开了派活(`allowDelegation`)才有意义,
299
+ * 而 `subagent list` 这个工具也跟着那个开关走。开关值只在用户改设置时变,不是每轮变,
300
+ * 所以这一段仍然满足「同一会话内逐字稳定」。
301
+ *
302
+ * @param delegationEnabled - 本会话是否开了派活(`config.allowDelegation`)
303
+ */
304
+ export function teamBoardGuide(delegationEnabled) {
305
+ if (!delegationEnabled)
306
+ return TEAM_BOARD_GUIDE;
307
+ return `${TEAM_BOARD_GUIDE}
308
+
309
+ 在队队友与它们的绑定任务同样不进提示(名单与状态随开工/收工变):要看谁在干什么,用 subagent list。`;
310
+ }
311
+ /**
312
+ * 队友系统提示里「团队协作」段的固定正文(2026-11 改成只放规矩)。
313
+ *
314
+ * 为什么不放队伍与看板数据:那是**每轮都会变**的内容,写进队友的系统提示会让它每次
315
+ * 请求的提示 hash 都变、缓存每轮作废(Lead 侧同类症状见 {@link TEAM_BOARD_GUIDE} 的注释)。
316
+ * 队友的 MiniAgent 没有投影链,易变段挪不到请求尾部,所以改成「动手前用工具查最新」。
317
+ *
318
+ * @param boardEnabled - 本会话是否开了任务板(`config.board`);只在用户改设置时变,不是每轮变
319
+ */
320
+ export function teammateCollabGuide(boardEnabled) {
321
+ if (!boardEnabled) {
322
+ return `# 团队协作
323
+ 队伍与任务板数据不进这段提示(它们每轮都会变,写进来会让请求前缀每轮失效)。本会话任务板未开启:需要找人时用可用的消息工具,重要结论写进你的最终回复。`;
324
+ }
325
+ return `# 团队协作
326
+ 队伍名单、任务、进展与最近活动都不写进这段提示:它们每轮都在变,写在这里会让整份系统提示(进而请求前缀)每轮失效、白烧缓存。要看最新情况,动手前自己查:
327
+ - team_task list:板上任务、状态、负责人、绑定与最新进展;team_task action=activity 看最近动态。
328
+ - team_message action=inbox:发给你的消息(含发件人名字);要找人用 send / broadcast。
329
+
330
+ 协作规则:
331
+ 1. 动手前先 team_task list 与 action=activity,看板上已有什么、别人做到哪一步,别重复别人正在做的事。
332
+ 2. 进展写进任务:team_task action=note(做了什么、验证结果、下一步);卡住用 action=block 写原因,解除用 unblock。
333
+ 3. 要问人、要协调用 team_message:send 点对点(队友名或 lead)、broadcast 广播;同一轮最多发 ${String(TEAM_MESSAGES_PER_ROUND)} 条。
334
+ 4. 写作用域和别人的任务重叠时先 team_message 协商,不要同时改同一批文件。
335
+ 5. 你绑定的任务在成功收工时会自动结项并写入你的最终结论;有遗留问题就写进结论里。`;
336
+ }
337
+ /** 名字合法字符,跟角色名同一套。 */
338
+ const NAME_OK = /^[a-z0-9][a-z0-9-]{0,31}$/;
339
+ /**
340
+ * 名册里冻结的角色说明书最多存多少字(2026-11-19)。
341
+ *
342
+ * 目的是「收工的队友还能按原样复活」,不是存一份角色库:角色文件正常只有一两 KB,
343
+ * 截到 16K 是给写歪了的大文件兜底——名册最多 200 条,不封顶就会撑成几十兆的 json。
344
+ */
345
+ const PROMPT_FREEZE_MAX = 16_000;
346
+ /**
347
+ * 把父会话切到「上一个完整回合」为止的记录行(不含 meta)。
348
+ * 完整回合 = 一条没带工具调用的 assistant 回复;它的后面可能就是正干到一半的活,
349
+ * 那些不要,否则队友一睁眼就看到半截工具调用。
350
+ * @returns null = 这个会话还没有一个完整回合可带。
351
+ */
352
+ function forkSeedLines(parentFile) {
353
+ let raw;
354
+ try {
355
+ raw = readFileSync(parentFile, 'utf8');
356
+ }
357
+ catch {
358
+ return null;
359
+ }
360
+ const lines = raw.split(/\r?\n/).filter((line) => line !== '');
361
+ let cut = -1;
362
+ for (let index = lines.length - 1; index >= 0; index -= 1) {
363
+ try {
364
+ const record = JSON.parse(lines[index]);
365
+ if (record.type === 'assistant' && record.toolCalls === undefined) {
366
+ cut = index;
367
+ break;
368
+ }
369
+ }
370
+ catch {
371
+ // 坏行:跳过继续往前找,不影响切点
372
+ }
373
+ }
374
+ if (cut < 0)
375
+ return null;
376
+ // 第 0 行是父会话自己的 meta,队友要用自己那条
377
+ return lines.slice(1, cut + 1);
378
+ }
379
+ export const subagentPlugin = {
380
+ name: 'subagent',
381
+ inject: ['session', 'tools', 'llm', 'approval', 'guards', 'transcript', 'prompt', 'settings', 'agent'],
382
+ apply(ctx, passed) {
383
+ ensureBuiltinRoles();
384
+ // 旧安装的角色文件里钉着旧出厂轮次(critic 4 / reviewer 16 / writer 20):删掉这几行,
385
+ // 让设置页的按角色默认值生效。只补缺、不覆盖的 ensureBuiltinRoles 管不到这一步。
386
+ // 幂等,且函数内部吞掉所有异常——迁移失败最多沿用旧轮次,不能影响启动。
387
+ migrateBuiltinRoleMaxTurns();
388
+ // ── 配置 ────────────────────────────────────────────────────────────────
389
+ const readConfig = () => {
390
+ const raw = resolvePluginConfig(CONFIG_KEY, passed);
391
+ const approval = APPROVAL_RANK[String(raw.approval)] === undefined
392
+ ? DEFAULTS.approval
393
+ : String(raw.approval);
394
+ return {
395
+ allowDelegation: raw.allowDelegation !== false && raw.allowDelegation !== 'false',
396
+ maxTeammates: clamp(raw.maxTeammates, 1, 8, DEFAULTS.maxTeammates),
397
+ maxDepth: clamp(raw.maxDepth, 0, 2, DEFAULTS.maxDepth),
398
+ approval,
399
+ notify: raw.notify === 'quiet' ? 'quiet' : 'auto',
400
+ defaultModel: typeof raw.defaultModel === 'string' ? raw.defaultModel.trim() : '',
401
+ allowModelSelection: raw.allowModelSelection === true || raw.allowModelSelection === 'true',
402
+ allowedModels: readAllowedModels(raw.allowedModels),
403
+ maxTurns: clamp(raw.maxTurns, 0, 200, DEFAULTS.maxTurns),
404
+ roleTurns: readRoleTurns(raw.roleTurns),
405
+ board: raw.board !== false && raw.board !== 'false',
406
+ teamMode: raw.teamMode === true || raw.teamMode === 'true',
407
+ };
408
+ };
409
+ let config = readConfig();
410
+ const applyConfig = (patch) => {
411
+ writePluginConfig(CONFIG_KEY, patch);
412
+ config = readConfig();
413
+ };
414
+ /** 角色此刻的轮次预算:名册提示与开工冻结的工牌共用这一个(见 {@link resolveMaxTurns})。 */
415
+ const roleMaxTurns = (role) => resolveMaxTurns(role, config.roleTurns, config.maxTurns);
416
+ /**
417
+ * 派活方(Lead 或还能往下派的队友)看到的模型授权说明。
418
+ *
419
+ * 授权清单本身就是它做合法 spawn 调用要用的信息,所以这里完整列出;开关关闭时明确说
420
+ * 不能指定,免得模型反复试错。清单外的端点/模型细节(还有哪些模型没授权)不提。
421
+ */
422
+ const modelRuleText = () => {
423
+ if (!config.allowModelSelection) {
424
+ return '模型:派活时不能指定模型或思考强度;队友用角色文件里的 model / effort,没写就跟随当前会话。';
425
+ }
426
+ const list = config.allowedModels.length === 0
427
+ ? '(还没有授权任何模型,先去设置 → 子智能体 → 队友模型 里勾选)'
428
+ : config.allowedModels.join('、');
429
+ return `模型:spawn 时可以用 model 指定模型、用 effort 指定思考强度(${EFFORT_LEVELS.join('/')})。模型只能从用户授权的清单里挑:${list}。只影响之后新建的队友,正在跑的改不了。`;
430
+ };
431
+ // ── 名册持久化 ──────────────────────────────────────────────────────────
432
+ const rosterFile = join(ctx.settings.about().home, 'team', 'roster.json');
433
+ /**
434
+ * 名册读缓存。
435
+ *
436
+ * 为什么要有:界面快照每次重建都会问一次名册(`transcript.ts:231` → `team.list()`
437
+ * → 这里),而快照重建跟着流式增量走——原先这里是**每次重建一次同步
438
+ * readFileSync + JSON.parse**,直接落在渲染路径上。
439
+ *
440
+ * 为什么按 mtime 而不是 TTL:名册是「远程待命的双进程共享」的一只文件(见 `list()`
441
+ * 那段僵尸读作 stopped 的注释),别的进程随时可能往里写一条。TTL 会让这类写入有
442
+ * 一段看不见的窗口(`resident-agents-test` 的僵尸用例就是这么抓到的);而 stat 一次
443
+ * 比读全文 + 解析便宜得多,换来的是**从不同步**——文件没动就不重读,动了立刻重读。
444
+ */
445
+ let rosterCache = null;
446
+ /** 缓存对应的文件 mtime(null = 当时文件不在/读不到)。 */
447
+ let rosterStamp = null;
448
+ const rosterMtime = () => {
449
+ try {
450
+ return statSync(rosterFile).mtimeMs;
451
+ }
452
+ catch {
453
+ return null;
454
+ }
455
+ };
456
+ const readRosterFromDisk = () => {
457
+ try {
458
+ const doc = JSON.parse(readFileSync(rosterFile, 'utf8'));
459
+ return Array.isArray(doc.teammates) ? doc.teammates : [];
460
+ }
461
+ catch {
462
+ return [];
463
+ }
464
+ };
465
+ const readRoster = () => {
466
+ const stamp = rosterMtime();
467
+ if (rosterCache !== null && stamp === rosterStamp)
468
+ return rosterCache;
469
+ rosterCache = readRosterFromDisk();
470
+ rosterStamp = stamp;
471
+ return rosterCache;
472
+ };
473
+ /**
474
+ * 任务板或名册变了:让界面立刻重建快照。
475
+ *
476
+ * 为什么要有:面板快照原先只跟着 5 秒轮询走,队友收工、任务完成最多要晚 5 秒才看见。
477
+ * 写动作落点统一调这一个(写名册、写任务板),只读动作(list/get/activity/inbox 读)
478
+ * 一个都不调——查询一次就白推一帧,等于把轮询换成忙推。
479
+ *
480
+ * 允许同一拍多发:每次 `dsc/changed` 只是让宿主重算一次快照,比漏掉「完成任务」那一拍
481
+ * 便宜得多,所以这里不做节流。
482
+ */
483
+ const touchUi = () => {
484
+ ctx.emit('dsc/changed');
485
+ };
486
+ const writeRoster = (records) => {
487
+ try {
488
+ mkdirSync(join(ctx.settings.about().home, 'team'), { recursive: true });
489
+ writeFileSync(rosterFile, `${JSON.stringify({ teammates: records }, null, 2)}\n`, 'utf8');
490
+ }
491
+ catch {
492
+ // 名册写不下去只影响重启后侧栏看不到收工的队友,不该让派活失败
493
+ }
494
+ // 写失败也照此记缓存:下次读 mtime 对不上会强制回读
495
+ rosterCache = [...records];
496
+ rosterStamp = rosterMtime();
497
+ // 名册是界面快照的数据源之一(队友行、收工时间):写完必须让宿主重算。
498
+ // 写文件失败时进程内的 list() 也已经看得到这份 records,同样要推,否则界面与
499
+ // 内存里的视图会分叉到下一次别的插件碰巧发事件。
500
+ touchUi();
501
+ };
502
+ const remember = (teammate) => {
503
+ const record = {
504
+ name: teammate.name,
505
+ role: teammate.role,
506
+ state: teammate.state,
507
+ task: teammate.task,
508
+ file: teammate.session.filePath,
509
+ cwd: teammate.session.meta.cwd,
510
+ parent: teammate.parent,
511
+ depth: teammate.depth,
512
+ rounds: teammate.rounds,
513
+ startedAt: teammate.startedAt,
514
+ // 累计 token 落进名册:收工后进程里可能已经没有这个队友了(一次性/移出),
515
+ // 面板的队友行只能从这份记录读。老名册缺这一项 → 读出来是 undefined。
516
+ tokens: teammate.tokens,
517
+ mode: teammate.mode,
518
+ // 出生会话:队友从哪个会话派出去的,名册上永久记着(用户切走会话也认得出它属于谁)
519
+ sessionId: teammate.parentSession.meta.id,
520
+ ...(teammate.taskId === undefined ? {} : { taskId: teammate.taskId }),
521
+ // 冻结工牌与角色说明书:收工的队友被点开时要按原样复活(见 reviveTeammate)
522
+ badge: { ...teammate.badge },
523
+ // 说明书可能很长(几 KB):16K 封顶,免得 200 条名册撑成几十兆的 json。真被截断的
524
+ // 那种复活出来会少尾巴——角色文件本来就不该写这么长,这里只兜底不让名册爆掉
525
+ prompt: teammate.prompt.slice(0, PROMPT_FREEZE_MAX),
526
+ ...(teammate.finishedAt !== undefined ? { finishedAt: teammate.finishedAt } : {}),
527
+ };
528
+ const rest = readRoster().filter((entry) => entry.name !== teammate.name);
529
+ writeRoster([...rest, record].slice(-200));
530
+ };
531
+ // ── 队友运行时 ──────────────────────────────────────────────────────────
532
+ const teammates = new Map();
533
+ /** 正在干活的队友(并发额度按会话各计各的,对照 dsh 的 per-session 团队):收工的不占坑。 */
534
+ const busyFor = (sessionId) => [...teammates.values()].filter((entry) => entry.state === 'working' && entry.parentSession.meta.id === sessionId);
535
+ const waitForIdle = (teammate) => teammate.state !== 'working'
536
+ ? Promise.resolve()
537
+ : new Promise((resolve) => teammate.waiters.push(resolve));
538
+ /**
539
+ * 绑定任务在队友**成功收工**时自动结项。
540
+ *
541
+ * 只认「任务仍是 in_progress 且负责人就是它」:中途被重新指派、被别人改过、或队友是
542
+ * 被打断/失败收工的,都留给 Lead 在板上处理。CAS 失败只吞掉——板子被并发改过时,
543
+ * 不能因为自动结项把队友的收工流程打断。
544
+ */
545
+ const finishBoundTask = (teammate) => {
546
+ if (teammate.taskId === undefined || teammate.state !== 'idle')
547
+ return;
548
+ const sessionId = teammate.parentSession.meta.id;
549
+ try {
550
+ const board = readBoard(sessionId);
551
+ const task = board.tasks.find((entry) => entry.id === teammate.taskId);
552
+ if (task === undefined || task.status !== 'in_progress' || task.owner !== teammate.name)
553
+ return;
554
+ const summary = teammate.lastText.trim() === ''
555
+ ? '(队友没有留下文字结论,按收工自动结项)'
556
+ : teammate.lastText.trim().slice(0, 800);
557
+ boardUpdate(sessionId, task.id, board.revision, 'complete', { by: teammate.name, text: summary });
558
+ // 队友收工时自动结项也是写板:面板「共享任务」区要立刻看到 completed,
559
+ // 不能等 5 秒轮询(这条路径不经 runTeamTask,得单独推一帧)。
560
+ touchUi();
561
+ }
562
+ catch {
563
+ // 板子被并发改过 / 写不进去:不阻断收工,Lead 还能在板上手动 complete
564
+ }
565
+ };
566
+ const settle = (teammate, reason, error) => {
567
+ // 已经不在队里(被移除、或被挤出名单):这一拍是上一轮迟到的收尾,不能再往名册写回一行
568
+ // (2026-11-19 探针抓到:移除之后紧接着的 turn/end 会把刚删掉的那位重新写进 roster.json)
569
+ if (teammates.get(teammate.name) !== teammate)
570
+ return;
571
+ // 预算最后一轮还欠着(提醒已排队、那一轮还没跑):这一拍是自然收口,不算收工
572
+ if (teammate.finalRoundPending === true && reason === 'completed' && teammate.rounds < teammate.badge.maxTurns)
573
+ return;
574
+ teammate.finalRoundPending = false;
575
+ teammate.finishedAt = Date.now();
576
+ // 汇报正文取「最后一条非空 assistant 正文」:最后一轮可能是纯工具调用(正文为空),
577
+ // 直接取最后一条就会把它当成「什么也没说」,前面真交过的结论反而丢了。
578
+ const tail = [...teammate.session.messages]
579
+ .reverse()
580
+ .find((message) => message.role === 'assistant' && typeof message.content === 'string' && message.content.trim() !== '');
581
+ teammate.lastText = typeof tail?.content === 'string' ? tail.content : '';
582
+ if (reason === 'completed')
583
+ teammate.state = 'idle';
584
+ else if (reason === 'aborted')
585
+ teammate.state = 'stopped';
586
+ else {
587
+ teammate.state = 'failed';
588
+ teammate.error = error;
589
+ }
590
+ remember(teammate);
591
+ // 绑定任务自动结项:成功收工时把终稿摘要写进任务 note,Lead 不用再猜它做完没有
592
+ finishBoundTask(teammate);
593
+ // T21:队友状态进了快照的跨会话状态面,动一下要跟着失效
594
+ ctx.transcript.touch();
595
+ const waiters = teammate.waiters.splice(0);
596
+ for (const resolve of waiters)
597
+ resolve();
598
+ // 传话之后欠的那次汇报:等到模型又说过话(或直接失败)才回,且同一轮不重复回
599
+ const pending = teammate.awaitReport;
600
+ if (pending !== undefined &&
601
+ (teammate.state === 'failed' ||
602
+ (teammate.rounds >= pending.minRound && teammate.rounds > teammate.lastReportedRound))) {
603
+ teammate.awaitReport = undefined;
604
+ reportHome(teammate);
605
+ }
606
+ // 一次性的(spawn 时 keep=false)干完就出队:名册里那条记录留着供查看,但不再
607
+ // 占内存、也不再接传话。对照 dsh 的 one-shot:子代理一结束就从 resident 表删掉,
608
+ // 父会话只剩 catalog 里一行;能续接的那种恰恰相反,收工后还能 send_message 叫醒。
609
+ if (teammate.mode === 'one-shot') {
610
+ teammates.delete(teammate.name);
611
+ // 它不再接话了:注销「外部驱动」的登记,之后打开它的会话就只为看记录。
612
+ ctx.agent.detach(teammate.session.meta.id);
613
+ }
614
+ };
615
+ /** 队友的工具表:按工牌白名单筛。subagent 换成它自己的署名;team_task(本包注册的
616
+ * 共享任务板)保留原实现,只把自己的身份与归属会话塞进上下文,看板认领人才不会都算成
617
+ * lead,也不会在用户切会话后认到别人的板上。协作类工具({@link COLLAB_TOOL_NAMES})
618
+ * 不参与白名单筛选:那是协作登记,不是文件权限。 */
619
+ const toolsFor = (teammate) => {
620
+ const all = ctx.tools.list();
621
+ const allowed = teammate.badge.tools === null
622
+ ? all
623
+ : all.filter((entry) => teammate.badge.tools.includes(entry.name) || COLLAB_TOOL_NAMES.includes(entry.name));
624
+ const self = () => ({
625
+ name: teammate.name,
626
+ depth: teammate.depth,
627
+ background: teammate.background,
628
+ sessionId: teammate.parentSession.meta.id,
629
+ });
630
+ return allowed.map((entry) => {
631
+ if (entry.name === 'subagent') {
632
+ // 嵌套派活:子队友的父会话是这个队友自己的会话,不是用户正看着的那条。
633
+ return { ...entry, run: (args, runCtx) => runSubagent(args, runCtx, self(), teammate.session) };
634
+ }
635
+ if (entry.name === 'team_task' || entry.name === 'team_message') {
636
+ // 协作工具:署自己的名字、归属派它的那个会话(板子/消息都不落「当前查看的会话」)
637
+ return { ...entry, run: (args, runCtx) => entry.run(args, { ...runCtx, caller: self() }) };
638
+ }
639
+ return entry;
640
+ });
641
+ };
642
+ /**
643
+ * 一条会话的「归属会话」:一路走到最上层那个(嵌套队友的父会话可能还是队友)。
644
+ *
645
+ * 权限档、沙箱档、协作模式都记在**用户那条会话**上;停在中间层会拿到一条不在
646
+ * agent 常驻表里的会话,沙箱与审批只能回落成「用户正看着的那条」。
647
+ *
648
+ * 只该在**派活时算一次**(结果存进 `Teammate.ownerSession`):父队友一次性收工
649
+ * 或被挤出名单后,再沿 `teammates` 往上找会断在中间层(2026-11-09 复审问题 2)。
650
+ */
651
+ const ownerOfSession = (from) => {
652
+ let current = from;
653
+ const seen = new Set();
654
+ while (!seen.has(current.meta.id)) {
655
+ seen.add(current.meta.id);
656
+ const parent = [...teammates.values()].find((entry) => entry.session.meta.id === current.meta.id);
657
+ if (parent === undefined)
658
+ break;
659
+ current = parent.parentSession;
660
+ }
661
+ return current;
662
+ };
663
+ /** 队友的归属会话:启动时固化,出队后仍指对最上层那条(见 {@link ownerOfSession})。 */
664
+ const ownerSession = (teammate) => teammate.ownerSession;
665
+ /**
666
+ * 把「队友会话」登记成共享守卫链上的会话别名:`gate` 分发前会换成归属会话。
667
+ *
668
+ * 为什么在服务层做:MiniAgent 的调用有适配器改写(见 `teammateGuardChain`),但
669
+ * `run_code`(PTC)在脚本里直接 `ctx.guards.gate`,绕过适配器——沙箱据此按队友
670
+ * 会话查表落空,回落成「用户正看着的会话」的档位(2026-11-09 复审问题 1)。
671
+ * 登记在这里,MiniAgent、PTC、钩子三条路自动吃到同一份改写,不用各抄一遍。
672
+ *
673
+ * 生命周期跟着 `teammates` 走:队友出队(一次性收工 / 被挤出名单 / 名册移除)后
674
+ * 表里没了它,解析自然失效;仍在队里的一直指向启动时固化的那条归属会话。
675
+ * 插件卸载时 `ctx.effect` 收回解析器。
676
+ */
677
+ ctx.effect(() => {
678
+ const off = ctx.guards.registerSessionResolver?.('subagent', (sessionId) => {
679
+ for (const teammate of teammates.values()) {
680
+ if (teammate.session.meta.id !== sessionId)
681
+ continue;
682
+ return {
683
+ sessionId: teammate.ownerSession.meta.id,
684
+ sessionPath: teammate.ownerSession.filePath,
685
+ // 原始执行者:写后诊断这类观察者要记回队友会话,不能记到派活会话上。
686
+ facts: { teammate: teammate.name, teammateSessionId: teammate.session.meta.id },
687
+ };
688
+ }
689
+ return undefined;
690
+ });
691
+ return () => off?.();
692
+ }, 'subagent: guards.registerSessionResolver');
693
+ /** 按会话 id(或适配器标记)找在队队友;找不到 = 这次调用不是队友发起的。 */
694
+ const teammateOf = (input) => {
695
+ const marked = input.teammate;
696
+ if (marked !== undefined)
697
+ return teammates.get(marked);
698
+ for (const teammate of teammates.values()) {
699
+ if (teammate.session.meta.id === input.sessionId)
700
+ return teammate;
701
+ }
702
+ return undefined;
703
+ };
704
+ /**
705
+ * 队友交给 MiniAgent 的守卫链:**就是共享的 `ctx.guards`**,只在入口把调用方
706
+ * 会话改写成「派它的那个会话」。
707
+ *
708
+ * 为什么必须改写:沙箱(8)、模式(10)、审批(30)都按 `input.sessionId` /
709
+ * `sessionPath` 找会话。队友的运行记录不在 agent 的常驻会话表里(`agent.sessionById`
710
+ * 只认常驻 agent),不改写就会回落成「用户正看着的那条」——用户切到完全访问档的
711
+ * 会话时,队友的写操作会跟着免掉沙箱(2026-11-09 复核发现)。改写后队友按父会话
712
+ * 的档位与策略判,审批卡也仍然落在父会话名下。
713
+ *
714
+ * 这不是第二份注册表:链上每一位仍由主会话那条全局链提供,这里只是把
715
+ * 「这次调用替谁执行」说清楚;`teammate` 标记给本插件自己的两位守卫认人。
716
+ */
717
+ const teammateGuardChain = (teammate) => ({
718
+ gate: (input) => {
719
+ const owner = ownerSession(teammate);
720
+ const marked = {
721
+ ...input,
722
+ sessionId: owner.meta.id,
723
+ sessionPath: owner.filePath,
724
+ teammate: teammate.name,
725
+ // 原始执行者(本适配器直接改写、不经解析器,所以这里也要带上):LSP 诊断按它归属。
726
+ teammateSessionId: teammate.session.meta.id,
727
+ };
728
+ return ctx.guards.gate(marked);
729
+ },
730
+ observe: (toolName, text) => ctx.guards.observe(toolName, text),
731
+ });
732
+ /**
733
+ * 队友的协作模式闸门:order 9 夹在沙箱(8)与主模式闸门(10)之间。
734
+ * 先让沙箱把越界写拦掉,再按**父会话**的档判;判 pass 时与主会话的模式闸门
735
+ * 同一语义(跳过后面的钩子与审批卡,例如免打扰档的工作区内写),判 defer 时
736
+ * 主模式闸门随后仍会按队友会话自己的记录跑一遍(通常是 build → defer)。
737
+ *
738
+ * 为什么不能放 order 5:守卫链里 `pass` 会让后面的守卫全部跳过。放 5 的话,
739
+ * 免打扰模式里一次「工作区内写自动放行」会把 order 8 的沙箱也一起跳掉。
740
+ */
741
+ const teammateModeGuard = {
742
+ id: 'teammate-mode',
743
+ order: 9,
744
+ decide(input) {
745
+ const teammate = teammateOf(input);
746
+ if (teammate === undefined)
747
+ return { action: 'defer' };
748
+ const mode = String(ownerSession(teammate).state('mode') ?? 'build');
749
+ const spec = modeSpec(mode);
750
+ const gate = spec.gate({
751
+ toolName: input.toolName,
752
+ risk: input.risk,
753
+ cwd: input.cwd,
754
+ target: input.target,
755
+ command: input.command,
756
+ rules: activeRules(),
757
+ });
758
+ if (gate.action === 'deny') {
759
+ return { action: 'deny', reason: `父会话在「${spec.label}」模式:${gate.reason}` };
760
+ }
761
+ return gate.action === 'pass' ? { action: 'pass' } : { action: 'defer' };
762
+ },
763
+ };
764
+ ctx.effect(() => ctx.guards.register(teammateModeGuard), 'subagent: guards.register (teammate-mode)');
765
+ /**
766
+ * 队友的审批:与主链 order 30 的 `approval` 管同一件事,但**必须排在它前面**(29)。
767
+ * 主审批只认父会话的权限档,不知道队友的工牌:全局上限与角色意愿取更严、后台队友
768
+ * 按 foreground 档不许问、卡上要写是谁在请求——这些只有这里知道。排在 29 还能保证
769
+ * 沙箱(8)、安全钩子(20)、生命周期钩子(25)先说话。
770
+ */
771
+ const teammateApproval = toolApprovalGuard({
772
+ id: 'teammate-approval',
773
+ async approve(input) {
774
+ const teammate = teammateOf(input);
775
+ // 外层 decide 已经筛过:这里找不到只可能是注册后队友被移出表,按拒处理(fail closed)。
776
+ if (teammate === undefined)
777
+ return false;
778
+ const rank = Math.min(APPROVAL_RANK[config.approval], APPROVAL_RANK[teammate.badge.approval]);
779
+ const canAsk = rank >= APPROVAL_RANK.foreground && (rank === APPROVAL_RANK.ask || !teammate.background);
780
+ if (!canAsk)
781
+ return false;
782
+ const owner = ownerSession(teammate);
783
+ const decision = await ctx.approval.decide({
784
+ toolName: `队友 ${teammate.name}(${teammate.role})· ${input.toolName}`,
785
+ argsSummary: argsSummary(input.args),
786
+ args: input.args,
787
+ cwd: input.cwd,
788
+ // 队友的审批按**派它的那个会话**归属:不能落到「用户正在看的会话」,
789
+ // 否则权限模式会拿错档(2026-10-28 按会话隔离后这条必须显式给)。
790
+ sessionId: owner.meta.id,
791
+ sessionPath: owner.filePath,
792
+ }, input.signal);
793
+ return decision !== 'reject';
794
+ },
795
+ deniedReason: REJECTED_TOOL_TEXT,
796
+ });
797
+ const teammateApprovalGuard = {
798
+ ...teammateApproval,
799
+ order: 29,
800
+ async decide(input) {
801
+ // 只对队友会话生效;主会话与后台会话的调用照旧交给 order 30 的审批。
802
+ if (teammateOf(input) === undefined)
803
+ return { action: 'defer' };
804
+ return teammateApproval.decide(input);
805
+ },
806
+ };
807
+ ctx.effect(() => ctx.guards.register(teammateApprovalGuard), 'subagent: guards.register (teammate-approval)');
808
+ /**
809
+ * 队友系统提示里的「团队协作」段:**只放规矩,不放队伍/看板数据**(2026-11 改)。
810
+ *
811
+ * 原先这里每轮现读磁盘与内存,把「当前队伍 + 任务板摘要」拼进队友的系统提示。它是队友
812
+ * 会话的缓存杀手:队友每发一次请求,系统提示 hash 就变一次,转录里反复出「系统提示」卡、
813
+ * 服务端前缀缓存每轮作废。队友的 MiniAgent 没有投影链,没法像 Lead 那样把易变段挪到请求
814
+ * 尾部,所以这里选择「移出」:数据一律现查工具。
815
+ *
816
+ * 信息没有丢:`team_task list` / `action=activity` 看板子,`team_message action=inbox`
817
+ * 看消息。规矩第一条本来就要求「动手前先 list」,现在从「提示里塞一份可能过期的快照」
818
+ * 变成「开工前查一份最新的」。
819
+ */
820
+ const teamCollabText = () => teammateCollabGuide(config.board);
821
+ /**
822
+ * 造一个队友:会话在手,其余(工牌、循环、登记、名册)都在这儿接上。
823
+ *
824
+ * 派活({@link startTeammate})与复活({@link reviveTeammate})共走这一条:两边只差
825
+ * 「会话是新开还是从盘上读回」以及要不要把任务送进信箱,其余一个字都不该分叉——
826
+ * 分叉就会让复活的队友少挂一条守卫、少记一本账。
827
+ */
828
+ function makeTeammate(input) {
829
+ const teammate = {
830
+ name: input.name,
831
+ role: input.role,
832
+ prompt: input.prompt,
833
+ task: input.task,
834
+ ...(input.taskId === undefined ? {} : { taskId: input.taskId }),
835
+ badge: input.badge,
836
+ session: input.session,
837
+ parentSession: input.parentSession,
838
+ // 归谁管:派活时算一次并固化,父队友后来出队也不影响(见 ownerOfSession)
839
+ ownerSession: ownerOfSession(input.parentSession),
840
+ state: input.state,
841
+ rounds: input.rounds,
842
+ toolCalls: 0,
843
+ lastReportedRound: input.rounds,
844
+ depth: input.depth,
845
+ parent: input.parent,
846
+ mode: input.mode,
847
+ background: input.background,
848
+ startedAt: input.startedAt,
849
+ lastText: '',
850
+ waiters: [],
851
+ outputLines: [],
852
+ tokens: 0,
853
+ agent: undefined,
854
+ };
855
+ /** 正文按行攒的缓冲(delta 碎片凑整行进瀑布)。 */
856
+ let lineBuffer = '';
857
+ teammate.agent = new MiniAgent({
858
+ route: () => {
859
+ // 模型:显式指定优先;否则跟着父会话的端点/模型走。
860
+ // 思考强度要单独覆盖:即使模型跟随会话,spawn/角色文件给的 effort 也得生效,
861
+ // 所以这里用 routeTo(不改当前选择)而不是直接 routeForSession。
862
+ if (teammate.badge.model !== null) {
863
+ const at = teammate.badge.model.indexOf('/');
864
+ const provider = at > 0 ? teammate.badge.model.slice(0, at) : teammate.badge.model;
865
+ const modelId = at > 0 ? teammate.badge.model.slice(at + 1) : '';
866
+ return ctx.llm.routeTo(provider, modelId, teammate.badge.effort ?? 'default');
867
+ }
868
+ if (teammate.badge.effort !== null) {
869
+ return ctx.llm.routeTo(ctx.llm.providerOf(teammate.parentSession), ctx.llm.modelOf(teammate.parentSession), teammate.badge.effort);
870
+ }
871
+ return ctx.llm.routeForSession(teammate.parentSession);
872
+ },
873
+ // 子代理的 deps 没有 rewrite(主会话的 env-facts 投影对子代理不生效),
874
+ // 又没有尾部快照那条路,所以环境/模型事实直接写进它自己的系统提示词。
875
+ // cwd 取派它的那个会话(子代理在父会话的 cwd 下干活),模型取冻结的工牌。
876
+ systemPrompt: () => {
877
+ const text = `${input.prompt}
878
+
879
+ ${subagentEnvironmentText(input.parentSession.meta.cwd, teammate.badge.model ?? ctx.llm.model)}
880
+
881
+ # 你在团队里的位置
882
+ 你是队友「${teammate.name}」(角色 ${teammate.role}),派你活的是「${teammate.parent}」。
883
+ ${teammate.badge.maxTurns > 0
884
+ ? `你最多能发 ${teammate.badge.maxTurns} 次模型请求,用完会被自动收手,请把力气花在关键处;最后一轮不再给你工具,那轮直接交结论。`
885
+ : '轮次不设上限,但每轮都要往结论推进,别在同一个问题上打转。'}
886
+ ${teammateModelNote(teammate.badge.model ?? ctx.llm.model, teammate.badge.effort, config.allowModelSelection)}
887
+ ${teammate.badge.tools === null ? '' : `你只被授权这些工具:${teammate.badge.tools.join('、')}。用别的办法办不成就在最后一段说清楚,让 ${teammate.parent} 决定。${config.board ? '协作类工具(team_task)不受这份名单限制:任务板是团队共用的登记表,认领与结项直接用。' : ''}`}
888
+ ${teammate.badge.approval === 'forbid' ? '你不能向用户请求授权:需要授权的操作会被直接拒绝,不要反复尝试。' : '需要授权的操作可以向用户请求,审批卡上会写明是你(' + teammate.name + ')在请求。'}
889
+ ${teamCollabText()}
890
+ 干完活用一段话交结果:做了什么、看到什么证据(文件名:行号)、还有什么没做。`;
891
+ // 队友的提示词不在段注册表里(它是几块直接拼的),给「系统提示」卡一条合成段:
892
+ // 卡片至少能显示体量与来源,不至于空着一张段清单(队友的日志只在只读浮层里看)。
893
+ return {
894
+ text,
895
+ sections: [{ id: 'teammate', order: 0, chars: text.length, from: 'plugin:subagent' }],
896
+ };
897
+ },
898
+ // 设限时的最后一轮:工具表收成空,逼它用文本交结论(否则它会一直调工具直到被掐)
899
+ tools: () => teammate.badge.maxTurns > 0 && teammate.rounds >= teammate.badge.maxTurns - 1
900
+ ? []
901
+ : toolsFor(teammate),
902
+ guards: teammateGuardChain(teammate),
903
+ stream: (api, request, handlers) => ctx.llm.stream(api, request, handlers),
904
+ emit: (event) => {
905
+ if (event.type === 'turn/start') {
906
+ // 被传话叫醒的队友从「已停止」回到干活中:状态不翻,界面会一直挂着停着的字样
907
+ teammate.state = 'working';
908
+ delete teammate.finishedAt;
909
+ ctx.transcript.touch();
910
+ }
911
+ else if (event.type === 'message') {
912
+ teammate.rounds += 1;
913
+ const budget = teammate.badge.maxTurns;
914
+ if (budget > 0) {
915
+ if (teammate.rounds >= budget) {
916
+ // 轮次预算到点就收手:这就是「子智能体不许无限自转」的闸门。
917
+ // 最后一轮的工具表已经收成空,正常应当以正文收束;它偏要再调工具
918
+ // 才真正掐掉(走到 executeToolCalls 之前就会看到 aborted)。
919
+ if ((event.toolCalls?.length ?? 0) > 0)
920
+ teammate.agent.cancel();
921
+ }
922
+ else if (teammate.rounds === budget - 1) {
923
+ // 最后一轮留给汇报:先提醒它交结论,下一轮再把工具收走。
924
+ // 提醒排在收件箱里,模型若就此收口,它会单独起最后一轮(settle 那边等着)。
925
+ teammate.finalRoundPending = true;
926
+ teammate.agent.followup('下一轮是最后一次,直接给结论,不要再调工具', undefined, 'notice');
927
+ }
928
+ }
929
+ }
930
+ else if (event.type === 'tool/call') {
931
+ teammate.toolCalls += 1;
932
+ teammate.lastTool = {
933
+ name: event.name,
934
+ args: event.args.replace(/\s+/g, ' ').trim().slice(0, 60),
935
+ status: 'running',
936
+ };
937
+ }
938
+ else if (event.type === 'tool/result') {
939
+ if (teammate.lastTool !== undefined) {
940
+ teammate.lastTool = {
941
+ ...teammate.lastTool,
942
+ status: event.error !== undefined && event.error !== 'rejected' ? 'failed' : 'done',
943
+ };
944
+ }
945
+ // 工具结果首行进瀑布:跑动期间 teammate 说话少、动手多,结果行才是活信号
946
+ const firstLine = event.text.split('\n').map((line) => line.trim()).find((line) => line !== '');
947
+ if (firstLine !== undefined)
948
+ pushLines(teammate.outputLines, firstLine);
949
+ }
950
+ else if (event.type === 'delta' && event.kind === 'text') {
951
+ // 正文增量按行攒:成行的推进瀑布(跟主会话直播尾同一节奏,不需要节流器)
952
+ lineBuffer += event.text;
953
+ let newline = lineBuffer.indexOf('\n');
954
+ while (newline >= 0) {
955
+ pushLines(teammate.outputLines, lineBuffer.slice(0, newline));
956
+ lineBuffer = lineBuffer.slice(newline + 1);
957
+ newline = lineBuffer.indexOf('\n');
958
+ }
959
+ }
960
+ else if (event.type === 'usage') {
961
+ teammate.tokens += event.inputTokens + event.outputTokens;
962
+ }
963
+ else if (event.type === 'turn/end') {
964
+ if (lineBuffer.trim() !== '')
965
+ pushLines(teammate.outputLines, lineBuffer);
966
+ lineBuffer = '';
967
+ settle(teammate, event.reason, lastError.get(teammate.name));
968
+ }
969
+ else if (event.type === 'error') {
970
+ lastError.set(teammate.name, event.message);
971
+ }
972
+ // 这条会话正被用户打开(2026-11-18):事件按主会话同款形状直接进转录——
973
+ // 此刻用户看的就是它的完整对话,折成父会话里的一张内联卡反而是串台。
974
+ // 其余时候照旧转发给父会话(内联卡 + 进队状态)。
975
+ if (ctx.session.current() === teammate.session) {
976
+ ctx.transcript.emit(event, teammate.session.meta.id);
977
+ }
978
+ else {
979
+ forwardSubagent();
980
+ }
981
+ },
982
+ }, input.session);
983
+ teammates.set(teammate.name, teammate);
984
+ // 交给 agent 服务登记成「外部驱动的一等会话」(2026-11-18):`openSession` 打开它时
985
+ // 复用这个 Session 而不重建、不再另造一个常驻 agent,输入框里的字投进它的收件箱。
986
+ ctx.agent.attach(input.session, {
987
+ followup: (text, images, origin, files) => teammate.agent.followup(text, images, origin, files),
988
+ interrupt: () => teammate.agent.cancel(),
989
+ isRunning: () => teammate.agent.isRunning,
990
+ editQueued: (index, text) => teammate.agent.editQueued(index, text),
991
+ removeQueued: (index) => teammate.agent.removeQueued(index),
992
+ steerQueued: (index) => teammate.agent.steerQueued(index),
993
+ });
994
+ remember(teammate);
995
+ // T21:新队友一上场(或复活)就是快照里的状态面,动一下要跟着失效
996
+ ctx.transcript.touch();
997
+ if (input.announce) {
998
+ teammate.agent.followup(input.task);
999
+ // 开卡先落一张头行(事件流到达前的 0 空窗),之后每次事件原位刷新
1000
+ forwardSubagent();
1001
+ }
1002
+ return teammate;
1003
+ /** 正文行进瀑布:只留最后 8 行,瀑布永远显示「最新发生的事」。 */
1004
+ function pushLines(pool, line) {
1005
+ const trimmed = line.trim();
1006
+ if (trimmed === '')
1007
+ return;
1008
+ pool.push(trimmed);
1009
+ if (pool.length > 8)
1010
+ pool.splice(0, pool.length - 8);
1011
+ }
1012
+ /**
1013
+ * 把队友的当前快照转发给父会话的内联卡。只在父会话正被查看时投递——
1014
+ * 转录是「当前查看会话」的那一份,往里折别家会话的卡就是串台;切回时
1015
+ * 转录插件按名册种回头行卡,之后的转发接上原位刷新。
1016
+ */
1017
+ function forwardSubagent() {
1018
+ if (ctx.session.current() !== teammate.parentSession)
1019
+ return;
1020
+ ctx.transcript.emit({
1021
+ type: 'subagent',
1022
+ row: {
1023
+ name: teammate.name,
1024
+ role: teammate.role,
1025
+ task: teammate.task,
1026
+ state: teammate.state,
1027
+ mode: teammate.mode,
1028
+ model: teammate.badge.model ?? ctx.llm.model,
1029
+ rounds: teammate.rounds,
1030
+ toolCalls: teammate.toolCalls,
1031
+ startedAt: teammate.startedAt,
1032
+ ...(teammate.finishedAt !== undefined ? { finishedAt: teammate.finishedAt } : {}),
1033
+ ...(teammate.lastTool !== undefined ? { lastTool: { ...teammate.lastTool } } : {}),
1034
+ ...(teammate.outputLines.length > 0 ? { outputLines: [...teammate.outputLines] } : {}),
1035
+ ...(teammate.tokens > 0 ? { tokens: teammate.tokens } : {}),
1036
+ ...(teammate.error !== undefined ? { error: teammate.error } : {}),
1037
+ file: teammate.session.filePath,
1038
+ },
1039
+ });
1040
+ }
1041
+ }
1042
+ /**
1043
+ * 派一个队友:新开一条会话(与主会话同形),工牌在此刻冻结,然后把任务送进它的信箱。
1044
+ */
1045
+ function startTeammate(input) {
1046
+ const cwd = input.parentSession.meta.cwd;
1047
+ /**
1048
+ * 队友会话的落盘位置与主会话同形(2026-11-18):`<会话根>/<工作目录名>/<id>.jsonl`。
1049
+ *
1050
+ * 为什么改到这里来(原来在 `sessions/.teammates/`,id 还与文件名是两个 uuid):
1051
+ * `Session.load` 按 meta.id 重算路径,两个 uuid 对不上时算出来的是一个磁盘上不存在
1052
+ * 的位置,于是界面只能 `peek` 只读预览、点开就把「当前会话」换成假路径。
1053
+ * 现在 id = 文件名,meta 里还写着 `origin: 'subagent'` 与 `parentSession`:
1054
+ * 它是一条真会话(能开、能说话、能重放),但侧栏不列它(`scanSessions` 按 origin 跳过),
1055
+ * 归档/分叉/删除也不许对它下手(`assertSessionFile` 同一条判断)。
1056
+ */
1057
+ const id = randomUUID();
1058
+ const file = join(sessionsRoot(), slugCwd(cwd), `${id}.jsonl`);
1059
+ const origin = { id, origin: 'subagent', parentSession: input.parentSession.meta.id };
1060
+ let session;
1061
+ if (input.seed === null) {
1062
+ session = Session.create(cwd, file, origin);
1063
+ }
1064
+ else {
1065
+ mkdirSync(dirname(file), { recursive: true });
1066
+ const meta = JSON.stringify({ type: 'meta', ...origin, cwd, createdAt: Date.now() });
1067
+ writeFileSync(file, [meta, ...input.seed].join('\n') + '\n', 'utf8');
1068
+ session = Session.load(file, true);
1069
+ }
1070
+ // 优先级:spawn 显式 > 角色文件 > 旧配置 defaultModel(兼容兜底)> 跟随当前会话
1071
+ const model = resolveTeammateModel(input.model ?? null, input.role, config.defaultModel);
1072
+ const effort = resolveTeammateEffort(input.effort ?? null, input.role);
1073
+ return makeTeammate({
1074
+ name: input.name,
1075
+ role: input.role.name,
1076
+ prompt: input.role.prompt,
1077
+ task: input.task,
1078
+ // 工牌在此刻冻结:此后改角色文件不影响它
1079
+ badge: {
1080
+ tools: input.role.tools,
1081
+ // 角色文件显式 max-turns > 设置页按角色默认值 > 全局上限(取更严),见 resolveMaxTurns
1082
+ maxTurns: roleMaxTurns(input.role),
1083
+ approval: input.role.approval,
1084
+ model,
1085
+ effort,
1086
+ },
1087
+ ...(input.taskId === undefined ? {} : { taskId: input.taskId }),
1088
+ session,
1089
+ parentSession: input.parentSession,
1090
+ parent: input.caller.name,
1091
+ depth: input.caller.depth + 1,
1092
+ mode: input.mode ?? 'continuable',
1093
+ background: input.background,
1094
+ startedAt: Date.now(),
1095
+ rounds: 0,
1096
+ state: 'working',
1097
+ announce: true,
1098
+ });
1099
+ }
1100
+ /**
1101
+ * 复活一位收工的队友(2026-11-19):用户在名册里点它那一行时走这条。
1102
+ *
1103
+ * 为什么要有:会话本身已经能打开(2026-11-18 的改动),但**没有驱动的会话打开以后,
1104
+ * 输入框里的字没处投递**——用户看到的是一条「只能看」的记录。收工的可续接队友其实只是
1105
+ * 本进程里没了循环,按冻结的工牌照原样重建一份、重新 attach,它就接着那条对话往下走。
1106
+ *
1107
+ * 工牌与角色提示词从名册的冻结点读({@link RosterRecord.badge} / `prompt`):老名册没有
1108
+ * 这两项时退回按角色名现读一份;角色文件也没了就不复活,调用方按只读记录打开并说一声。
1109
+ * 一次性的(`keep: false`)不复活:它的语义就是干完即止(对照 dsh 的 one-shot)。
1110
+ */
1111
+ function reviveTeammate(record, parentSession) {
1112
+ const live = teammates.get(record.name);
1113
+ if (live !== undefined)
1114
+ return live;
1115
+ if ((record.mode ?? 'continuable') === 'one-shot')
1116
+ return null;
1117
+ const role = findRole(record.role);
1118
+ const prompt = record.prompt ?? role?.prompt;
1119
+ const badge = record.badge ??
1120
+ (role === null
1121
+ ? null
1122
+ : {
1123
+ tools: role.tools,
1124
+ maxTurns: roleMaxTurns(role),
1125
+ approval: role.approval,
1126
+ model: resolveTeammateModel(null, role, config.defaultModel),
1127
+ effort: resolveTeammateEffort(null, role),
1128
+ });
1129
+ if (prompt === undefined || badge === null)
1130
+ return null;
1131
+ const file = resolve(record.file);
1132
+ if (!isTeammateSessionFile(file) || !existsSync(file))
1133
+ return null;
1134
+ // 写租约与主会话同一条路:同进程重入;别的窗口正开着时会抛,调用方按只读处理
1135
+ const session = Session.load(file);
1136
+ return makeTeammate({
1137
+ name: record.name,
1138
+ role: record.role,
1139
+ prompt,
1140
+ task: record.task,
1141
+ badge,
1142
+ ...(record.taskId === undefined ? {} : { taskId: record.taskId }),
1143
+ session,
1144
+ parentSession,
1145
+ parent: record.parent,
1146
+ depth: record.depth,
1147
+ mode: record.mode ?? 'continuable',
1148
+ // 用户正对着它说话:按前台算(原来派活时是不是后台已经无从得知,但「能不能问授权」
1149
+ // 按前台放宽才不会让复活出来的队友比原来更束手)。
1150
+ background: false,
1151
+ startedAt: record.startedAt,
1152
+ rounds: record.rounds,
1153
+ // 复活后先是空闲:等用户在输入框里说话才起回合
1154
+ state: 'idle',
1155
+ announce: false,
1156
+ });
1157
+ }
1158
+ /** 队友报错文本暂存(emit 的 error 事件比 turn/end 早一步)。 */
1159
+ const lastError = new Map();
1160
+ /**
1161
+ * 没留下文字结论时的说明。
1162
+ *
1163
+ * 为什么单独写:队友被停机、或轮次预算用完时,运行记录里往往只有一串工具调用、
1164
+ * 一句正文都没有;原话「(它没留下文字结论)」既不说明原因,也不给证据位置。
1165
+ * 这里标出原因并把运行记录路径给用户,让人能自己去看它干到了哪一步。
1166
+ * @param withPath - 上文已经给过路径时传 false,免得同一段话里出现两遍。
1167
+ */
1168
+ const noTextNote = (teammate, withPath = true) => {
1169
+ const budget = teammate.badge.maxTurns;
1170
+ const why = budget > 0 && teammate.rounds >= budget
1171
+ ? `轮次预算用完(${budget} 轮),没交最终结论`
1172
+ : teammate.state === 'stopped'
1173
+ ? `被停机(第 ${teammate.rounds} 轮),没交最终结论`
1174
+ : '没交最终结论';
1175
+ return withPath ? `${why}。运行记录:${teammate.session.filePath}` : why;
1176
+ };
1177
+ /** 后台队友干完,把汇报交给派它的那一方。 */
1178
+ const reportHome = (teammate) => {
1179
+ teammate.lastReportedRound = teammate.rounds;
1180
+ const state = teammate.state === 'idle' ? '已完成' : teammate.state === 'stopped' ? '已停止' : '已失败';
1181
+ const body = teammate.state === 'failed'
1182
+ ? `(它失败了:${teammate.error ?? '未知错误'})`
1183
+ : teammate.lastText === ''
1184
+ ? noTextNote(teammate)
1185
+ : teammate.lastText;
1186
+ const notice = `${TEAMMATE_REPORT_OPEN}from="${teammate.name}" role="${teammate.role}" state="${state}">
1187
+ 派给它的任务:${teammate.task}
1188
+ 它的汇报:
1189
+ ${body}
1190
+ </teammate-report>`;
1191
+ if (teammate.parent !== LEAD) {
1192
+ // 派它的是另一个队友:直接投进它的信箱并叫醒它
1193
+ const parent = teammates.get(teammate.parent);
1194
+ if (parent !== undefined) {
1195
+ inboxAppend(parent.name, notice);
1196
+ parent.agent.followup(notice, undefined, 'notice');
1197
+ return;
1198
+ }
1199
+ }
1200
+ const line = `队友 ${teammate.name},角色 ${teammate.role},${state}`;
1201
+ const live = ctx.session.current() === teammate.parentSession;
1202
+ // 0.6.48 常驻多 agent:父会话正被查看、或它的 agent 还常驻(后台跑着/刚切走),
1203
+ // 汇报都投给那个 agent(跑动中进收件箱,闲置的唤起一轮后台回合);已经收摊的
1204
+ // 才写文件等用户回去看到——不打断也不抢跑。
1205
+ const parentResident = ctx.agent.hasAgent(teammate.parentSession.meta.id);
1206
+ if (config.notify === 'auto' && (live || parentResident)) {
1207
+ // 队友汇报是机器发起的唤醒:跑动中入箱时标 notice,界面画在输入框上方的
1208
+ // 只读通知条(不是输入框下方的用户队列条),不给人编辑 / 撤掉 / 插话。
1209
+ ctx.agent.followup(notice, undefined, teammate.parentSession.meta.id, 'notice');
1210
+ // 带归属:父会话在后台时,这句回执只该进它自己的视图(0.6.68)
1211
+ ctx.transcript.system(`${line},汇报已${live ? '并入下一轮' : '投进后台会话'}`, undefined, undefined, teammate.parentSession.meta.id);
1212
+ }
1213
+ else {
1214
+ // 静默,或者父会话的 agent 已收摊:话写进它所属的那个会话文件,
1215
+ // 等用户回到那个会话再说话时模型自然看到,不打断也不抢跑。
1216
+ teammate.parentSession.appendUser(notice);
1217
+ ctx.transcript.system(live
1218
+ ? `${line},汇报已写入会话,下一条消息时模型会看到`
1219
+ : `${line},汇报写入了派出它的会话`, undefined, undefined, teammate.parentSession.meta.id);
1220
+ }
1221
+ };
1222
+ // ── 侧栏要的服务 ────────────────────────────────────────────────────────
1223
+ // 队友清单、只读查看与两条管理通道:UI 因此不必知道队友文件放在哪,
1224
+ // 插件关着时这个服务也不存在。
1225
+ const teamService = {
1226
+ list: () => {
1227
+ const views = [];
1228
+ for (const record of readRoster()) {
1229
+ // 在队的队友以内存为准(轮数、状态都在动),收工的以名册为准
1230
+ const live = teammates.get(record.name);
1231
+ const finishedAt = live?.finishedAt ?? record.finishedAt;
1232
+ // 出生会话同理:在队的问内存里那个会话对象,收工的问名册(老记录没有这一项)
1233
+ const sessionId = live?.parentSession.meta.id ?? record.sessionId;
1234
+ const taskId = live?.taskId ?? record.taskId;
1235
+ // token:在队的以内存为准(还在涨),收工的以名册为准。老名册没有这一项就是
1236
+ // undefined——只在有值时填,界面据此不画 0(0 本身是合法值,照实填)。
1237
+ const tokens = live === undefined ? record.tokens : live.tokens;
1238
+ views.push({
1239
+ name: record.name,
1240
+ role: record.role,
1241
+ // 本进程里它并不活着,却按名册残留报「working」就是撒谎(上次进程没
1242
+ // settle 就退了)——僵尸读作 stopped;远程待命的双进程共享名册,
1243
+ // 所以只修读路径、不做启动清写,避免误标宿主进程的活队友。
1244
+ state: live !== undefined ? live.state : record.state === 'working' ? 'stopped' : record.state,
1245
+ task: record.task,
1246
+ file: live === undefined ? record.file : live.session.filePath,
1247
+ parent: record.parent,
1248
+ depth: record.depth,
1249
+ // 老名册没有这一项:那时只有可续接的一种,缺省按它算
1250
+ mode: live?.mode ?? record.mode ?? 'continuable',
1251
+ rounds: live === undefined ? record.rounds : live.rounds,
1252
+ startedAt: record.startedAt,
1253
+ ...(finishedAt === undefined ? {} : { finishedAt }),
1254
+ ...(sessionId === undefined ? {} : { sessionId }),
1255
+ ...(taskId === undefined ? {} : { taskId }),
1256
+ ...(tokens === undefined ? {} : { tokens }),
1257
+ // 本进程里还活着吗(2026-11-18)。2026-11-19 起界面不再据此分叉(点开一律走
1258
+ // 真会话),但它仍是「这一位有没有循环」的读数,右栏页签与探针都读它。
1259
+ attached: live !== undefined,
1260
+ });
1261
+ }
1262
+ return views.sort((a, b) => b.startedAt - a.startedAt);
1263
+ },
1264
+ board: (sessionId) => {
1265
+ // 只读投影:界面只画「有哪些事、谁负责、可不可以开工」与最新进展/活动,
1266
+ // 改任务仍旧只走模型的 team_task。投影与提示词共用 boardViewOf,口径只有一份。
1267
+ return boardViewOf(readBoard(sessionId));
1268
+ },
1269
+ peek: async (file) => {
1270
+ const resolved = resolve(file);
1271
+ // 两代队友记录都认(2026-11-18):新记录在会话目录里、meta 标 `origin: 'subagent'`;
1272
+ // 老记录还在 `.teammates` 下。别的会话一律不许从这里读。
1273
+ if (!isTeammateSessionFile(resolved)) {
1274
+ throw new Error('这里只能看队友的运行记录(其它会话请在左侧打开)');
1275
+ }
1276
+ // 只读:载入内存重放,不往那个文件写任何东西(也不拿写租约——队友可能正活着写它)
1277
+ const session = Session.load(resolved, true, { lease: false });
1278
+ const replay = new Transcript();
1279
+ replay.replayHistory(session.messages, session.toolErrors, session.fileChanges, session.presentations);
1280
+ return [...replay.entries, ...replay.liveEntries()];
1281
+ },
1282
+ // 用户从界面上点开一位队友(2026-11-19):正文区打开它那条真会话;收工的可续接队友
1283
+ // 先按冻结工牌复活(这样输入框能直接说话),一次性的与复活不了的只按记录打开。
1284
+ // 父会话取「派它的那条」:名册只在它自己的面板里列,正常情况下就是用户当前这条。
1285
+ open: async (name) => {
1286
+ const live = teammates.get(name);
1287
+ if (live !== undefined) {
1288
+ await ctx.session.open(live.session.filePath);
1289
+ return;
1290
+ }
1291
+ const record = readRoster().find((entry) => entry.name === name);
1292
+ if (record === undefined) {
1293
+ ctx.emit('dsc/notice', `名册里没有叫「${name}」的队友。`);
1294
+ return;
1295
+ }
1296
+ const file = resolve(record.file);
1297
+ if (!isTeammateSessionFile(file)) {
1298
+ ctx.emit('dsc/notice', '这不是队友的运行记录:请在左侧会话列表里打开。');
1299
+ return;
1300
+ }
1301
+ if ((record.mode ?? 'continuable') !== 'one-shot') {
1302
+ const parent = (record.sessionId === undefined ? undefined : ctx.agent.sessionById(record.sessionId)) ??
1303
+ (record.sessionId === ctx.session.current().meta.id ? ctx.session.current() : undefined);
1304
+ if (parent === undefined) {
1305
+ ctx.emit('dsc/notice', `派「${name}」的那个会话不在本窗口:先按运行记录打开(只读)。`);
1306
+ }
1307
+ else {
1308
+ try {
1309
+ reviveTeammate(record, parent);
1310
+ }
1311
+ catch (error) {
1312
+ // 文件被别的窗口占着、盘上文件没了……都退回只读,不要把这一下变成打不开
1313
+ ctx.emit('dsc/notice', `没把「${name}」叫回来(${errText(error)}):先按运行记录打开,只读。`);
1314
+ }
1315
+ }
1316
+ }
1317
+ await ctx.session.open(file);
1318
+ },
1319
+ // 用户从界面上管理队友的两条通道:与模型用的 subagent 工具走同一段逻辑,
1320
+ // 只是署名换成 user(队友信箱里看得出这句话是人说的);
1321
+ // 名字不存在时返回的那句话本身就是给用户看的错误说明。
1322
+ stop: async (name) => stopTeammate(name, 'stop'),
1323
+ // 会话级的收摊(superagent 的执行器在工单结束时调):它派出去的队友不该继续跑,
1324
+ // 那些队友的父会话已经没人认领了。上游同一步是 `stopSubagents`
1325
+ //(`executor/background.ts:141-153`)。单个收不掉不影响其它的——一个失败的队友
1326
+ // 不该把整张工单的收尾拖垮。
1327
+ stopBySession: async (sessionId) => {
1328
+ const mine = [...teammates.values()].filter((entry) => entry.parentSession.meta.id === sessionId);
1329
+ const names = [];
1330
+ for (const entry of mine) {
1331
+ try {
1332
+ stopTeammate(entry.name, 'stop');
1333
+ names.push(entry.name);
1334
+ }
1335
+ catch {
1336
+ // 见上:一个收不掉不拦其它的。
1337
+ }
1338
+ }
1339
+ return names;
1340
+ },
1341
+ message: async (name, text) => messageTeammate(name, text, 'user'),
1342
+ remove: async (name) => {
1343
+ // 还在干活的先停止(文件正被流式写入,删了也会被重建);收工的才许移除
1344
+ const live = teammates.get(name);
1345
+ if (live !== undefined && live.state === 'working') {
1346
+ return `队友「${name}」还在干活:先停止,再从名册移除。`;
1347
+ }
1348
+ const record = readRoster().find((entry) => entry.name === name);
1349
+ if (live === undefined && record === undefined)
1350
+ return `名册里没有叫「${name}」的队友。`;
1351
+ // 真正收掉这一位:会话文件要关(释放写租约),再从名单里摘
1352
+ live?.agent.dispose();
1353
+ if (live !== undefined)
1354
+ ctx.agent.detach(live.session.meta.id);
1355
+ teammates.delete(name);
1356
+ writeRoster(readRoster().filter((entry) => entry.name !== name));
1357
+ // 运行记录文件一并删:它只在名册里可达,留着就是孤儿。只认同一个口径的队友记录
1358
+ // (`.teammates` 下的老文件,或 meta 标了 origin 的新文件),别的一律不碰;
1359
+ // 删不动(被占用等)不算失败——名册已经摘掉,孤儿文件不影响任何列表。
1360
+ const file = live?.session.filePath ?? record?.file;
1361
+ let removedFile = false;
1362
+ if (typeof file === 'string' && file !== '') {
1363
+ const resolvedFile = resolve(file);
1364
+ if (isTeammateSessionFile(resolvedFile)) {
1365
+ try {
1366
+ // rmSync 的 force 对不存在的文件也算成功:如实报告文件本来就在不在
1367
+ const existed = existsSync(resolvedFile);
1368
+ rmSync(resolvedFile, { force: true });
1369
+ rmSync(`${resolvedFile}.lock`, { force: true });
1370
+ removedFile = existed;
1371
+ }
1372
+ catch {
1373
+ // 文件被占用:下次同位置的记录不冲突(uuid 命名),孤儿文件无害
1374
+ }
1375
+ }
1376
+ }
1377
+ // T21:队友名册进了快照的跨会话状态面,摘掉也要让侧栏/面板立刻知道
1378
+ ctx.transcript.touch();
1379
+ return removedFile
1380
+ ? `已把「${name}」从名册移除,运行记录一并删除。`
1381
+ : `已把「${name}」从名册移除(它的运行记录文件不在了,跳过删除)。`;
1382
+ },
1383
+ };
1384
+ ctx.provide('team', teamService);
1385
+ // ── 只读代码审查通道(T45)─────────────────────────────────────────────
1386
+ // /review 的升级路径:派一个工牌被强制压到只读交集的队友(工具 = read/glob/grep,
1387
+ // 审批 = forbid,与角色文件怎么改无关),后台审查,findings 以 <review-findings>
1388
+ // 包裹写回发起会话——渲染层解析成卡片,主会话不吃模型轮。
1389
+ //
1390
+ // 完整 diff 由 core/git-info 的 collectReviewScope 落盘,任务书里只给路径与读法:
1391
+ // 审查队友有 read,可以按 offset/limit 分批读完,不需要把 diff 截断塞进描述。
1392
+ const READONLY_TOOLS = ['read', 'glob', 'grep'];
1393
+ /**
1394
+ * 审查记录账本:内存记「本会话有没有在跑的审查」,磁盘留最近一次的状态与结论。
1395
+ * 数据目录取 settings.about().home(就是 DSC_HOME),重启后 /review-status 仍读得到。
1396
+ */
1397
+ const reviewJournal = new ReviewJournal(ctx.settings.about().home);
1398
+ const spawnReviewer = (request) => {
1399
+ const parentSession = ctx.session.current();
1400
+ const working = busyFor(parentSession.meta.id);
1401
+ if (working.length >= config.maxTeammates) {
1402
+ return {
1403
+ ok: false,
1404
+ reason: `正在干活的队友已到上限 ${config.maxTeammates} 个(${working.map((entry) => entry.name).join('、')}),等一个收工再 /review`,
1405
+ };
1406
+ }
1407
+ // 角色文件被用户删掉也照常可审:从出厂定义就地取(不落盘);无论来自哪个文件,
1408
+ // 工牌都再压一次只读交集——审查通道的「天然安全」不依赖用户配置。
1409
+ const base = findRole('reviewer') ?? builtinRole('reviewer');
1410
+ if (base === null)
1411
+ return { ok: false, reason: 'reviewer 角色定义不可用(内置角色缺失)' };
1412
+ const role = { ...base, tools: [...READONLY_TOOLS], approval: 'forbid' };
1413
+ const teammate = startTeammate({
1414
+ name: uniqueName('reviewer'),
1415
+ role,
1416
+ task: reviewTaskText(request.scope, request.focus),
1417
+ caller: { name: LEAD, depth: 0, background: true },
1418
+ background: true,
1419
+ seed: null,
1420
+ parentSession,
1421
+ });
1422
+ // 先登记再等收工:这中间用户可能已经 /review-status 或 /review-cancel
1423
+ reviewJournal.begin(parentSession.meta.id, {
1424
+ target: request.scope.label,
1425
+ handle: teammate.name,
1426
+ startedAt: teammate.startedAt,
1427
+ });
1428
+ void waitForIdle(teammate).then(() => deliverReview(teammate));
1429
+ return { ok: true, name: teammate.name };
1430
+ };
1431
+ /** 审查收工:findings(或失败原因)写进发起会话,渲染层认 <review-findings> 标记出卡。 */
1432
+ const deliverReview = (teammate) => {
1433
+ const sessionId = teammate.parentSession.meta.id;
1434
+ // 取消过的那次:记录与上屏都用同一句实话,别让「已停止」把「被取消」盖掉
1435
+ const wasCancelled = reviewJournal.wasCancelled(sessionId);
1436
+ const state = teammate.state === 'idle' ? '已完成' : teammate.state === 'stopped' ? '已停止' : '已失败';
1437
+ const body = wasCancelled
1438
+ ? REVIEW_CANCELED_TEXT
1439
+ : teammate.state === 'failed'
1440
+ ? `审查没有完成:${teammate.error ?? '未知错误'}`
1441
+ : teammate.state === 'stopped'
1442
+ ? '审查被停止,没有交回结论。'
1443
+ : teammate.lastText === ''
1444
+ ? '审查没有留下文字结论。'
1445
+ : teammate.lastText;
1446
+ const notice = `${REVIEW_FINDINGS_OPEN}teammate="${teammate.name}" state="${state}">\n${body}\n</review-findings>`;
1447
+ const line = `审查队友 ${teammate.name},${state}`;
1448
+ teammate.parentSession.appendUser(notice);
1449
+ // 记录跟着收工:/review-status 回看的就是这里写下去的那份
1450
+ reviewJournal.finish(sessionId, body, teammate.name);
1451
+ const live = ctx.session.current() === teammate.parentSession;
1452
+ ctx.transcript.system(live ? `${line},findings 已写进会话` : `${line},findings 写入了派出它的会话`);
1453
+ ctx.transcript.touch();
1454
+ };
1455
+ const reviewService = {
1456
+ spawn: spawnReviewer,
1457
+ status() {
1458
+ return reviewJournal.status(ctx.session.current().meta.id);
1459
+ },
1460
+ cancel() {
1461
+ const sessionId = ctx.session.current().meta.id;
1462
+ const run = reviewJournal.running(sessionId);
1463
+ if (run === undefined)
1464
+ return false;
1465
+ // 叫停走队友那条现成的路(agent.cancel + 保留名册),再把记录标成取消
1466
+ stopTeammate(run.handle, 'stop');
1467
+ reviewJournal.cancel(sessionId);
1468
+ return true;
1469
+ },
1470
+ };
1471
+ ctx.provide('review', reviewService);
1472
+ // ── 模型侧工具 ──────────────────────────────────────────────────────────
1473
+ function uniqueName(role) {
1474
+ // 收工队友的名字也占着(名册里),不然两次启动会撞名
1475
+ const remembered = new Set(readRoster().map((entry) => entry.name));
1476
+ for (let index = 1; index < 100; index += 1) {
1477
+ const candidate = `${role}-${index}`;
1478
+ if (!teammates.has(candidate) && !remembered.has(candidate))
1479
+ return candidate;
1480
+ }
1481
+ return `${role}-${Date.now()}`;
1482
+ }
1483
+ /**
1484
+ * `subagent` 的 interrupt/stop 与界面管理通道(TeamService.stop)共用的那一条。
1485
+ * 两条路的话术刻意保持一字不差:模型与用户看到的是同一件事。
1486
+ */
1487
+ function stopTeammate(name, mode) {
1488
+ const teammate = teammates.get(name);
1489
+ if (teammate === undefined) {
1490
+ // 一次性收工后已经从在队表里摘掉,但名册里还有它那一行:说「没这个队友」是错的。
1491
+ const record = readRoster().find((entry) => entry.name === name);
1492
+ if (record?.mode === 'one-shot')
1493
+ return `${name} 是一次性子智能体,已经结束了,没有在跑的回合可以叫停。`;
1494
+ return `没有叫 ${name} 的队友(subagent list 看现役名单)`;
1495
+ }
1496
+ teammate.agent.cancel();
1497
+ // 两种叫停都**保留**这个队友:dsh 的 interrupt_agent 就是这个口径——停当前这一轮,
1498
+ // 之后还能用 send_message 接着聊。以前 stop 直接把它从名单里删掉,于是「中断之后
1499
+ // 还能不能继续」的答案是「不能」,信箱里的话也没人读(2026-10-27 查账)。
1500
+ // 真要清掉走名册里的「移除」(TeamService.remove),那里才删文件、释放名字。
1501
+ return `${name} ${mode === 'interrupt' ? '这一轮被打断了(信箱里的话还在,传话就能接着用)' : '已叫停(保留在名册里,可以传话接着用;要彻底清掉用名册里的移除)'}`;
1502
+ }
1503
+ /**
1504
+ * `subagent` 的 message 与界面传话通道(TeamService.message)共用的那一条。
1505
+ * @param from - 署名:模型派话是派它的那一方,用户传话是 'user'。
1506
+ */
1507
+ function messageTeammate(name, text, from) {
1508
+ const trimmed = text.trim();
1509
+ if (trimmed === '')
1510
+ return 'message 要带上 text(想传的话)';
1511
+ const teammate = teammates.get(name);
1512
+ // 一次性的已经收工(settle 时从队里摘掉了):它不接后续消息。这一步排在写信箱
1513
+ // 之前——否则这句话会投进一个没人读的信箱,界面还回一句「话已投给」,看着像送到了。
1514
+ // 对照 dsh 的 NOT_CONTINUABLE 报错:「does not accept follow-up input」。
1515
+ if (teammate === undefined) {
1516
+ const record = readRoster().find((entry) => entry.name === name);
1517
+ if (record?.mode === 'one-shot') {
1518
+ return `${name} 是一次性子智能体:干完就结束了,不再接后续消息。它的运行记录还在,点开能看完整过程。`;
1519
+ }
1520
+ }
1521
+ const wrapped = `<message from="${from}"> ${trimmed} </message>`;
1522
+ inboxAppend(name === '' ? 'unknown' : name, wrapped);
1523
+ if (teammate === undefined)
1524
+ return `没有叫 ${name} 的队友,话写进了它的信箱(${join(ctx.settings.about().home, 'team', 'inbox')})但没人会读`;
1525
+ // 传话之后欠一次汇报:它这一轮(或下一轮)说完了,主会话要接得到
1526
+ teammate.awaitReport = { minRound: teammate.rounds + 1 };
1527
+ teammate.agent.followup(wrapped);
1528
+ return `话已投给 ${name}${teammate.state === 'working' ? '(它正在干,会在这轮结束后看到)' : '(已把它叫醒)'},它说完会把结果报回来`;
1529
+ }
1530
+ async function runSubagent(args, runCtx, caller, parent) {
1531
+ const action = String(args.action ?? '');
1532
+ const roster = listRoles();
1533
+ // 名单按会话隔离(对照 dsh 的 parentSession 过滤):本会话只能看见自己派出的队友,
1534
+ // 别的会话的在队名单不外漏;跨会话管理请回到派出它的那个会话。
1535
+ // 归属会话来自调用方,不看 `ctx.session.current()`:队友在后台跑、用户切走之后,
1536
+ // 「当前查看的会话」已经不是派它的那一条了。
1537
+ const currentId = parent.meta.id;
1538
+ const mine = [...teammates.values()].filter((entry) => entry.parentSession.meta.id === currentId);
1539
+ if (action === 'list') {
1540
+ const lines = mine.map((entry) => `- ${entry.name}(角色 ${entry.role},${entry.state}${entry.mode === 'one-shot' ? ',一次性' : ''},第 ${entry.rounds} 轮,${entry.toolCalls} 次工具调用${entry.taskId === undefined ? '' : `,绑定任务 ${entry.taskId}`})派给它的任务:${entry.task.slice(0, 60)}`);
1541
+ const roles = roster.map((role) => `- ${role.name}${role.enabled ? '' : '(已停用)'}:${role.description || '(没写 description)'}`).join('\n');
1542
+ return lines.length === 0
1543
+ ? `本会话没有在队或收工的队友。\n\n可用角色:\n${roles}`
1544
+ : `本会话在队/收工的队友:\n${lines.join('\n')}\n\n可用角色:\n${roles}`;
1545
+ }
1546
+ if (action === 'interrupt' || action === 'stop') {
1547
+ return stopTeammate(String(args.name ?? ''), action);
1548
+ }
1549
+ if (action === 'message') {
1550
+ return messageTeammate(String(args.name ?? ''), String(args.text ?? ''), caller.name);
1551
+ }
1552
+ if (action !== 'spawn') {
1553
+ return `不认识的 action「${action}」。要用的值:spawn / list / message / interrupt / stop`;
1554
+ }
1555
+ if (caller.depth >= config.maxDepth) {
1556
+ return `你在第 ${caller.depth} 层,设置只允许到 ${config.maxDepth} 层,不能再往下派队友(要放开去设置「子智能体」调「允许层数」)`;
1557
+ }
1558
+ const roleName = String(args.role ?? '').trim();
1559
+ const role = findRole(roleName);
1560
+ if (role === null) {
1561
+ const available = roster.filter((entry) => entry.enabled).map((entry) => entry.name);
1562
+ return `角色 ${roleName || '(没填)'} 不可用。可用角色:${available.join('、') || '(无,去 ' + DSC_AGENTS_DIR + ' 建一个)'}${roster.some((entry) => entry.name === roleName && !entry.enabled) ? `;${roleName} 存在但被停用了,在设置「子智能体」里打开` : ''}`;
1563
+ }
1564
+ const task = String(args.task ?? '').trim();
1565
+ if (task.length < 8)
1566
+ return '任务描述太短:队友看不到你和用户的对话,请把背景、目标、交付格式写清楚';
1567
+ // 模型/思考强度覆盖:开关关闭时带 model 直接拒;开启时只能在用户授权的清单里挑。
1568
+ // 归一结果在工牌冻结那一刻生效(见 startTeammate),只影响这个新队友。
1569
+ const overrides = resolveSpawnOverrides(args.model, args.effort, { allow: config.allowModelSelection, allowed: config.allowedModels }, (ref) => ctx.llm.parseModelRef(ref));
1570
+ if (!overrides.ok)
1571
+ return overrides.reason;
1572
+ const working = busyFor(currentId);
1573
+ if (working.length >= config.maxTeammates) {
1574
+ return `本会话正在干活的队友已到上限 ${config.maxTeammates} 个(${working.map((entry) => entry.name).join('、')})。等一个收工,或去设置「子智能体」里提高上限`;
1575
+ }
1576
+ // 收工的队友留着可以被追问,但攒太多就把最老的挤出名单(磁盘上的运行记录不动)
1577
+ const finished = [...teammates.values()].filter((entry) => entry.state !== 'working');
1578
+ if (finished.length > MAX_LISTED_FINISHED) {
1579
+ for (const entry of finished
1580
+ .sort((a, b) => (a.finishedAt ?? a.startedAt) - (b.finishedAt ?? b.startedAt))
1581
+ .slice(0, finished.length - MAX_LISTED_FINISHED)) {
1582
+ // 挤出名单不能只删 Map 项:队友会话还握着写租约,不 close 会一直占着,
1583
+ // 下次同路径会话可能被当成「另一个进程正在写」。取消是幂等的(收工后再调是空操作)。
1584
+ entry.agent.cancel();
1585
+ entry.session.close();
1586
+ teammates.delete(entry.name);
1587
+ }
1588
+ }
1589
+ const requested = String(args.name ?? '').trim();
1590
+ if (requested !== '' && !NAME_OK.test(requested)) {
1591
+ return `队友名「${requested}」不合法:只能用小写字母、数字、连字符`;
1592
+ }
1593
+ const name = requested === '' ? uniqueName(role.name) : requested;
1594
+ if (teammates.has(name))
1595
+ return `队友名 ${name} 已经在用,换一个`;
1596
+ // 任务绑定:带 task_id 就顺手认领并绑定(一次 CAS 里做完 owner + assignee)。
1597
+ // 认领前必须满足「没完成、没被别人认领、依赖都完成」——不满足就给明确原因,
1598
+ // 不要悄悄派出去(队友干到一半才发现板子上不归它)。
1599
+ const taskId = String(args.task_id ?? '').trim();
1600
+ if (taskId !== '') {
1601
+ const board = readBoard(currentId);
1602
+ const target = board.tasks.find((entry) => entry.id === taskId);
1603
+ if (target === undefined) {
1604
+ return `任务板上没有 ${taskId}。先 team_task action=list 确认 id,或去掉 task_id 直接派`;
1605
+ }
1606
+ if (target.status === 'completed')
1607
+ return `${taskId} 已经完成了,不用再派队友去做`;
1608
+ if (target.owner !== null && target.owner !== name) {
1609
+ return `${taskId} 已经被 ${target.owner} 认领了,换一条任务或先让它 release`;
1610
+ }
1611
+ if (!isReady(board, target)) {
1612
+ const pending = target.blockedBy.filter((dep) => board.tasks.find((entry) => entry.id === dep)?.status !== 'completed');
1613
+ return pending.length > 0
1614
+ ? `${taskId} 还在等依赖完成:${pending.join('、')},现在派出去它也只能干等`
1615
+ : `${taskId} 现在不能开工(状态 ${target.status}${target.owner === null ? '' : `,负责人 ${target.owner}`})`;
1616
+ }
1617
+ try {
1618
+ boardUpdate(currentId, taskId, board.revision, 'claim', { owner: name, assignee: name, by: caller.name });
1619
+ // 派活时顺手认领也是写板:面板上的负责人与绑定要立刻变。
1620
+ touchUi();
1621
+ }
1622
+ catch (error) {
1623
+ return `认领 ${taskId} 失败:${error instanceof Error ? error.message : String(error)}`;
1624
+ }
1625
+ }
1626
+ const context = String(args.context ?? 'fresh');
1627
+ let seed = null;
1628
+ if (context === 'fork') {
1629
+ seed = parent.persisted ? forkSeedLines(parent.filePath) : null;
1630
+ if (seed === null) {
1631
+ return `带不上父会话的内容:这个会话还没有一个完整回合(它得先完整回答过一次),改用 context="fresh" 把背景写进任务描述`;
1632
+ }
1633
+ }
1634
+ else if (context !== 'fresh') {
1635
+ return `不认识的 context「${context}」。要用的值:fresh / fork`;
1636
+ }
1637
+ const background = args.background === true || args.background === 'true';
1638
+ // 一次性小工:干完就结束,不再接传话。缺省是寻常队友(keep 不填 = true),
1639
+ // 只认显式 false;`"false"` 字符串也当 false,别的值一律按留用处理。
1640
+ const mode = args.keep === false || args.keep === 'false' ? 'one-shot' : 'continuable';
1641
+ const teammate = startTeammate({
1642
+ name,
1643
+ role,
1644
+ task,
1645
+ caller,
1646
+ background,
1647
+ seed,
1648
+ parentSession: parent,
1649
+ mode,
1650
+ model: overrides.model,
1651
+ effort: overrides.effort,
1652
+ ...(taskId === '' ? {} : { taskId }),
1653
+ });
1654
+ if (!background) {
1655
+ // 用户取消这一轮就等于把队友也停下:先挂监听,再等它空下来
1656
+ const onStop = () => teammate.agent.cancel();
1657
+ runCtx.signal.addEventListener('abort', onStop, { once: true });
1658
+ await waitForIdle(teammate);
1659
+ runCtx.signal.removeEventListener('abort', onStop);
1660
+ const head = `${teammate.name}(${teammate.role})${teammate.state === 'idle' ? '干完了' : teammate.state === 'stopped' ? '被打断' : '失败'}:第 ${teammate.rounds} 轮、${teammate.toolCalls} 次工具调用。运行记录:${teammate.session.filePath}`;
1661
+ if (teammate.lastText !== '')
1662
+ return `${head}\n\n${teammate.lastText}`;
1663
+ // 没有正文:失败先报错误,其余按「预算用完 / 被停机」说清原因(路径已在 head 里)
1664
+ const reason = teammate.state === 'failed' && teammate.error !== undefined
1665
+ ? `(它失败了:${teammate.error})`
1666
+ : noTextNote(teammate, false);
1667
+ return `${head}\n${reason}`;
1668
+ }
1669
+ void waitForIdle(teammate)
1670
+ .then(() => reportHome(teammate))
1671
+ .catch(() => {
1672
+ // 尽力而为的汇报:宿主先于队友收尾(关机、测试拆内核)时,等待环的下一拍会摸到
1673
+ // 已停用的 context("cannot get required service")。拆都拆了,汇报没有意义,
1674
+ // 吞掉——不能让一条后台汇报变成 unhandled rejection 打断收尾。
1675
+ });
1676
+ const bound = taskId === '' ? '' : `已认领并绑定任务 ${taskId}(它成功收工后会自动结项并写入最终结论)。`;
1677
+ const tail = teammate.mode === 'one-shot'
1678
+ ? '它是一次性的:干完这次就结束,之后不能再传话,只在名册里留一条运行记录。'
1679
+ : '它在后台干,不用等也不用问:干完我会把汇报接进来。你现在可以继续做别的,或者再派一个。';
1680
+ return `已派给 ${teammate.name}(角色 ${teammate.role},${teammate.badge.tools === null ? '不限工具' : `工具 ${teammate.badge.tools.join('、')}`})。${bound}${tail}`;
1681
+ }
1682
+ const subagentTool = () => ({
1683
+ name: 'subagent',
1684
+ description: '把一件可以独立完成的活派给一个有明确授权的队友(角色见 ~/.dsc/agents),或者给在队队友传话、打断它。' +
1685
+ 'background=true 时立刻返回,它干完后汇报会自己接进你的下一轮;background=false 时你这一轮会等它的结果。' +
1686
+ 'interrupt / stop 都只是叫停当前这一轮:队友留在名册里,传话(message)就能接着用,别把它当成已经没了。' +
1687
+ 'keep=false 派的是「一次性小工」:只跑这一趟,干完就结束,之后不能再传话——适合跑个命令、查一个事实这种不用追问的活。' +
1688
+ 'spawn 时可以带 model / effort 给新队友指定模型与思考强度,但只有用户打开「允许 Agent 为子队友选择模型」后才可用,且模型只能挑授权清单里的;这些只影响新队友。' +
1689
+ '带 task_id 会把新队友绑定到共享任务板上的某条任务(顺手认领),它成功收工后自动结项。',
1690
+ parameters: {
1691
+ type: 'object',
1692
+ properties: {
1693
+ action: { type: 'string', enum: ['spawn', 'list', 'message', 'interrupt', 'stop'], description: '要做什么' },
1694
+ role: { type: 'string', description: 'spawn 必填:角色名,例如 explorer / writer / critic' },
1695
+ task: { type: 'string', description: 'spawn 必填:交给它的活。队友看不到你和用户的对话,把背景、目标、交付格式写全' },
1696
+ name: { type: 'string', description: '队友名;不填自动生成「角色名-序号」。message/interrupt/stop 用它指定对象' },
1697
+ context: { type: 'string', enum: ['fresh', 'fork'], description: 'fresh = 只知道这条任务;fork = 额外带上父会话到上一个完整回合为止的内容' },
1698
+ background: { type: 'boolean', description: 'true = 后台干(推荐,可并行多个);false = 这一轮等它结果' },
1699
+ keep: { type: 'boolean', description: 'spawn 可选:false = 一次性的,干完就结束、不再接传话(只留一条运行记录);不填 = 寻常队友,收工后传话还能接着干' },
1700
+ model: { type: 'string', description: 'spawn 可选:队友模型,写「端点/模型」(或模型名)。只能在设置 → 子智能体 → 队友模型 授权的清单里挑;开关没开时不许带。只影响这个新队友' },
1701
+ effort: { type: 'string', enum: [...EFFORT_LEVELS], description: 'spawn 可选:思考强度;不填用角色文件的 effort,再否则跟随默认' },
1702
+ task_id: { type: 'string', description: 'spawn 可选:绑定到共享任务板上的某条任务(先 team_task list 看 id)。会顺手认领并绑定负责人,队友成功收工后自动结项' },
1703
+ text: { type: 'string', description: 'message 必填:要传的话' },
1704
+ },
1705
+ required: ['action'],
1706
+ },
1707
+ risk: 'read',
1708
+ // 归属会话按这次调用算:回合可能在后台跑,`ctx.session.current()` 那时未必是它。
1709
+ run: (args, runCtx) => {
1710
+ // 父会话按调用方的 `sessionId` 查,查不到就报错——**绝不回落** `ctx.session.current()`。
1711
+ //
1712
+ // 为什么:superagent 的 worker 是执行器自己造的会话(不经常驻 agent 名册),
1713
+ // 它调这个工具时用户可能正看着别的会话;回落等于把队友派到别人名下,
1714
+ // 名册、额度、任务板全落到错的那条会话上(2026-11-13 查账)。查不到是配置问题,
1715
+ // 说清楚比派错好——内核的 `ctx.agent.attach` 就是给这种会话登记用的。
1716
+ const parent = ctx.agent.sessionById(runCtx.sessionId);
1717
+ if (parent === undefined) {
1718
+ throw new Error(`这个会话(${runCtx.sessionId})不在内核的会话表里,派不了队友:` +
1719
+ '把会话登记进 ctx.agent(attach)之后再用这个工具');
1720
+ }
1721
+ return runSubagent(args, runCtx, { name: LEAD, depth: 0, background: false, sessionId: runCtx.sessionId }, parent);
1722
+ },
1723
+ });
1724
+ // ── 共享任务板(原「智能体团队」插件,2026-11-06 并入本包)───────────────
1725
+ // 板子按会话各一块(`~/.dsc/team/boards/<会话 id>.json`):切到别的会话就是另一块
1726
+ // 板。只开板子不开派活也能用——一块只有 lead 在写的看板就是一份共享 todo。
1727
+ // 两个都开时,队友的工具表把 team_task 转发时塞了自己的名字(见 `toolsFor`),
1728
+ // 看板认领人才不会都算成 lead。
1729
+ async function runTeamTask(args, runCtx) {
1730
+ // 归属会话:队友转发时由 `toolsFor` 塞它派出去的那个会话;主会话自己的调用回落
1731
+ // 这次工具调用的会话。不看 `ctx.session.current()`——用户切走之后那是另一条会话,
1732
+ // 后台队友的认领会悄悄落到别人的板上(2026-11-08 查账)。
1733
+ const sessionId = runCtx.caller?.sessionId ?? runCtx.sessionId;
1734
+ const caller = runCtx.caller?.name ?? LEAD;
1735
+ const action = String(args.action ?? '');
1736
+ const board = readBoard(sessionId);
1737
+ const id = String(args.id ?? '');
1738
+ const revision = Number(args.expected_revision);
1739
+ // 改状态必须带版本号:不传就默认「当前版本」等于把并发冲突检测关掉,
1740
+ // 两个队友同时认领同一条时后到的会悄悄覆盖先到的。
1741
+ const MUTATING_ACTIONS = new Set([
1742
+ 'claim',
1743
+ 'release',
1744
+ 'complete',
1745
+ 'reopen',
1746
+ 'delete',
1747
+ 'set_dependencies',
1748
+ 'note',
1749
+ 'block',
1750
+ 'unblock',
1751
+ 'assign',
1752
+ ]);
1753
+ if (MUTATING_ACTIONS.has(action) && !Number.isInteger(revision)) {
1754
+ return `改任务板状态要带 expected_revision(你上次 list/create 看到的版本号,当前第 ${board.revision} 版)。`;
1755
+ }
1756
+ const ownerDefault = caller;
1757
+ try {
1758
+ switch (action) {
1759
+ case 'create': {
1760
+ const scopes = Array.isArray(args.write_scopes) ? args.write_scopes.map(String) : [];
1761
+ const blocked = Array.isArray(args.blocked_by) ? args.blocked_by.map(String) : [];
1762
+ const created = boardCreate(sessionId, {
1763
+ subject: String(args.subject ?? ''),
1764
+ description: String(args.description ?? ''),
1765
+ blockedBy: blocked,
1766
+ writeScopes: scopes,
1767
+ actor: ownerDefault,
1768
+ });
1769
+ const warnings = created.warnings.length === 0
1770
+ ? ''
1771
+ : `\n提醒(不拦你,最后看 diff 裁决):\n${created.warnings.map((line) => `- ${line}`).join('\n')}`;
1772
+ if (args.claim_now !== true) {
1773
+ // 板子变了:面板的任务区立刻重画(原先要等 5 秒轮询)。
1774
+ touchUi();
1775
+ return `已建 ${created.task.id}:${created.task.subject}${warnings}`;
1776
+ }
1777
+ // 认领走正常的 claim:依赖没做完一样会被拦下,正好复用同一套校验
1778
+ try {
1779
+ boardUpdate(sessionId, created.task.id, created.board.revision, 'claim', {
1780
+ owner: ownerDefault,
1781
+ by: ownerDefault,
1782
+ });
1783
+ }
1784
+ catch (error) {
1785
+ // 认领失败但任务建成了:板子也确实变了,照样推一帧再报错
1786
+ touchUi();
1787
+ return `已建 ${created.task.id}:${created.task.subject},但没能认领:${error instanceof Error ? error.message : String(error)}${warnings}`;
1788
+ }
1789
+ touchUi();
1790
+ return `已建 ${created.task.id}:${created.task.subject},状态直接进 in_progress(认领人 ${ownerDefault})${warnings}`;
1791
+ }
1792
+ case 'list': {
1793
+ if (board.tasks.length === 0)
1794
+ return '本会话的任务板是空的(team_task action=create 建第一条)';
1795
+ // 摘要行里带负责人、绑定、卡住原因与最新进展:队友看这一行就知道该不该插手
1796
+ const lines = board.tasks.map((task) => taskDigestLine(board, task, 60));
1797
+ const recent = board.activity.slice(0, 5).map(activityDigestLine);
1798
+ return `本会话任务板第 ${board.revision} 版:\n${lines.join('\n')}\n\n最近活动:\n${recent.join('\n') || '- (暂无)'}\n(改状态要带 expected_revision=${board.revision})`;
1799
+ }
1800
+ case 'get': {
1801
+ const task = board.tasks.find((entry) => entry.id === id);
1802
+ if (task === undefined)
1803
+ return `任务板上没有 ${id}`;
1804
+ const notes = task.notes.length === 0
1805
+ ? '(还没有进展记录)'
1806
+ : task.notes
1807
+ .map((note) => `- ${new Date(note.at).toLocaleString()} ${note.by}:${note.text}`)
1808
+ .join('\n');
1809
+ const related = board.activity
1810
+ .filter((entry) => entry.taskId === task.id)
1811
+ .slice(0, 5)
1812
+ .map(activityDigestLine);
1813
+ return [
1814
+ `第 ${board.revision} 版里的 ${task.id}:`,
1815
+ `标题:${task.subject}`,
1816
+ `说明:${task.description || '(空)'}`,
1817
+ `状态:${task.status}${isReady(board, task) ? ' · 可开工' : ''},负责人 ${task.owner ?? '(无)'}`,
1818
+ `绑定队友:${task.assignee ?? '(未绑定)'}`,
1819
+ `卡住:${task.blockedReason ?? '(没卡)'}`,
1820
+ `依赖:${task.blockedBy.join('、') || '(无)'}`,
1821
+ `作用域:${task.writeScopes.join(', ') || '(未声明)'}`,
1822
+ `进展(${task.notes.length} 条,新的在前):`,
1823
+ notes,
1824
+ `最近活动:\n${related.join('\n') || '(暂无)'}`,
1825
+ ].join('\n');
1826
+ }
1827
+ case 'activity': {
1828
+ const limit = clamp(args.limit, 1, 50, 20);
1829
+ const lines = board.activity.slice(0, limit).map(activityDigestLine);
1830
+ return lines.length === 0
1831
+ ? '任务板还没有活动记录(别人认领/写进展/完成任务、互发消息都会记进来)'
1832
+ : `任务板第 ${board.revision} 版最近 ${lines.length} 条活动(新的在前):\n${lines.join('\n')}`;
1833
+ }
1834
+ case 'note':
1835
+ case 'block':
1836
+ case 'unblock':
1837
+ case 'assign':
1838
+ case 'claim':
1839
+ case 'release':
1840
+ case 'complete':
1841
+ case 'reopen':
1842
+ case 'delete':
1843
+ case 'set_dependencies': {
1844
+ const payload = { by: caller };
1845
+ if (action === 'claim')
1846
+ payload.owner = String(args.owner ?? ownerDefault);
1847
+ if (action === 'set_dependencies') {
1848
+ payload.blockedBy = Array.isArray(args.blocked_by) ? args.blocked_by.map(String) : [];
1849
+ }
1850
+ if (action === 'note' || action === 'block' || action === 'unblock' || action === 'complete') {
1851
+ payload.text = String(args.text ?? '');
1852
+ }
1853
+ if (action === 'assign')
1854
+ payload.assignee = args.assignee === null ? null : String(args.assignee ?? '');
1855
+ const result = boardUpdate(sessionId, id, revision, action, payload);
1856
+ // 所有写动作(claim/release/complete/reopen/note/block/unblock/assign/
1857
+ // set_dependencies/delete)都在这里成功落板:统一推一帧,界面任务区与
1858
+ // 「刚完成」状态立刻刷新。九个动作共用这一个落点,不会漏。
1859
+ touchUi();
1860
+ const ready = result.board.tasks.filter((task) => isReady(result.board, task)).map((task) => task.id);
1861
+ const latest = result.task.notes[0];
1862
+ const extraParts = [];
1863
+ if (latest !== undefined && (action === 'note' || action === 'block' || action === 'complete')) {
1864
+ extraParts.push(`最新进展(${latest.by}):${latest.text.slice(0, 100)}`);
1865
+ }
1866
+ if (action === 'assign')
1867
+ extraParts.push(`绑定:${result.task.assignee ?? '(已解绑)'}`);
1868
+ if (action === 'block' || action === 'unblock') {
1869
+ extraParts.push(`卡住原因:${result.task.blockedReason ?? '(没卡)'}`);
1870
+ }
1871
+ const extra = extraParts.length === 0 ? '' : `\n${extraParts.join('\n')}`;
1872
+ return `${id} → ${result.task.status}${result.task.owner === null ? '' : `(${result.task.owner})`},任务板第 ${result.board.revision} 版。${extra}\n现在可开工:${ready.join('、') || '(无)'}`;
1873
+ }
1874
+ default:
1875
+ return `不认识的 action「${action}」。要用的值:create / list / get / activity / claim / release / complete / reopen / note / block / unblock / assign / set_dependencies / delete`;
1876
+ }
1877
+ }
1878
+ catch (error) {
1879
+ return `任务板操作没做成:${error instanceof Error ? error.message : String(error)}`;
1880
+ }
1881
+ }
1882
+ // ── 队友互通消息(P1 横向通道)─────────────────────────────────────────
1883
+ /**
1884
+ * 消息额度:key = 队友名,记录它在第几轮发了几条。轮次一变自动清零
1885
+ * (`emit` 里每轮 rounds +1),所以「每轮最多 3 条」是真实的按轮计数。
1886
+ * Lead 不在表里、也不受额度限制。
1887
+ */
1888
+ const messageQuota = new Map();
1889
+ /** 给 Lead(派活方会话)投一条队友消息:常驻会话走 followup,收摊会话写进文件。 */
1890
+ const deliverToLead = (text, from, sessionId) => {
1891
+ const wrapped = `<team-message from="${from}" to="lead"> ${text} </team-message>`;
1892
+ const session = ctx.agent.sessionById(sessionId) ?? ctx.session.current();
1893
+ if (ctx.agent.hasAgent(session.meta.id)) {
1894
+ ctx.agent.followup(wrapped, undefined, session.meta.id, 'notice');
1895
+ return 'lead(已并入它的下一轮)';
1896
+ }
1897
+ session.appendUser(wrapped);
1898
+ return 'lead(写入会话,下次对话时模型可见)';
1899
+ };
1900
+ async function runTeamMessage(args, runCtx) {
1901
+ // 归属会话与署名同 team_task:队友转发时 caller 是它自己,主会话是 lead
1902
+ const sessionId = runCtx.caller?.sessionId ?? runCtx.sessionId;
1903
+ const from = runCtx.caller?.name ?? LEAD;
1904
+ const action = String(args.action ?? '');
1905
+ if (action === 'inbox') {
1906
+ const limit = clamp(args.limit, 1, 20, 10);
1907
+ const all = inboxRead(from);
1908
+ if (all.length === 0)
1909
+ return '你的信箱是空的(别人用 team_message 发给你的话会出现在这里)';
1910
+ const tail = all.slice(-limit);
1911
+ return `你的信箱最近 ${tail.length} 条(共 ${all.length} 条;信箱没有已读状态,按写入顺序):\n${tail.map((line) => `- ${line}`).join('\n')}`;
1912
+ }
1913
+ if (action !== 'send' && action !== 'broadcast') {
1914
+ return `不认识的 action「${action}」。要用的值:send / broadcast / inbox`;
1915
+ }
1916
+ const text = String(args.text ?? '').trim();
1917
+ if (text === '')
1918
+ return '要带上 text(想说的话)';
1919
+ if (text.length > MAX_TEAM_MESSAGE_CHARS) {
1920
+ return `一条消息最长 ${MAX_TEAM_MESSAGE_CHARS} 字,这条有 ${text.length} 字;长内容写进任务 note 或文件里`;
1921
+ }
1922
+ // 防轰炸:只对队友计额度(Lead 是派活方,不由这条闸管)
1923
+ const me = teammates.get(from);
1924
+ let quotaNote = '';
1925
+ if (me !== undefined) {
1926
+ const used = messageQuota.get(from)?.round === me.rounds ? messageQuota.get(from).used : 0;
1927
+ if (used >= TEAM_MESSAGES_PER_ROUND) {
1928
+ return `本轮已经发了 ${used} 条消息(每轮上限 ${TEAM_MESSAGES_PER_ROUND} 条);剩下的话写进任务 note,或者等下一轮再说`;
1929
+ }
1930
+ messageQuota.set(from, { round: me.rounds, used: used + 1 });
1931
+ quotaNote = `(本轮还剩 ${TEAM_MESSAGES_PER_ROUND - used - 1} 条额度)`;
1932
+ }
1933
+ const wrap = (body, to) => `<team-message from="${from}" to="${to}"> ${body} </team-message>`;
1934
+ // 「lead」投到最上层会话:嵌套队友(PM 派的人)的 parentSession 是 PM 的会话,
1935
+ // 而用户真正看的是再上一层——用 ownerSession 才不会把话投进中间层没人看的文件。
1936
+ const leadSessionId = me?.ownerSession.meta.id ?? sessionId;
1937
+ const delivered = [];
1938
+ const missed = [];
1939
+ const targets = [];
1940
+ if (action === 'send') {
1941
+ const to = String(args.to ?? '').trim();
1942
+ if (to === '')
1943
+ return 'send 要带上 to(队友名或 lead)';
1944
+ if (to === from)
1945
+ return `收件人就是你自己(${from}),换个人发`;
1946
+ targets.push(to);
1947
+ }
1948
+ else {
1949
+ // 广播:同会话在队队友 + Lead(不含自己)
1950
+ for (const mate of teammates.values()) {
1951
+ if (mate.name === from)
1952
+ continue;
1953
+ if (mate.parentSession.meta.id !== sessionId)
1954
+ continue;
1955
+ targets.push(mate.name);
1956
+ }
1957
+ if (from !== LEAD)
1958
+ targets.push(LEAD);
1959
+ if (targets.length === 0)
1960
+ return '现在没有可发的对象:本会话没有其他在队队友,也没有可投的 Lead 会话';
1961
+ }
1962
+ for (const to of targets) {
1963
+ if (to === LEAD || to === 'lead') {
1964
+ delivered.push(deliverToLead(text, from, leadSessionId));
1965
+ continue;
1966
+ }
1967
+ const mate = teammates.get(to);
1968
+ const wrapped = wrap(text, to);
1969
+ inboxAppend(to, wrapped);
1970
+ if (mate !== undefined) {
1971
+ // 叫醒目标:跑动中排在它当前回合之后,闲置的唤起一轮
1972
+ mate.agent.followup(wrapped);
1973
+ delivered.push(`${to}${mate.state === 'working' ? '(正在干,这一轮之后看到)' : '(已叫醒)'}`);
1974
+ }
1975
+ else {
1976
+ missed.push(`${to}(不在队:收工或一次性,话写进了信箱但没人会读)`);
1977
+ }
1978
+ }
1979
+ // 消息也进板子活动(kind=message,不写 notes):Lead 与队友从活动时间线看得到协作过程
1980
+ try {
1981
+ recordBoardActivity(sessionId, {
1982
+ by: from,
1983
+ kind: 'message',
1984
+ text: `${from} → ${targets.join('、')}:${text.replace(/\s+/g, ' ').slice(0, 120)}`,
1985
+ });
1986
+ // 活动时间线也是面板读的快照数据:这条写进去了,界面该跟着变。
1987
+ touchUi();
1988
+ }
1989
+ catch {
1990
+ // 板子写不进去不影响消息本身已经投递
1991
+ }
1992
+ const head = action === 'broadcast' ? `已广播给 ${delivered.length} 个对象` : delivered.length > 0 ? '已送达' : '没送达';
1993
+ const parts = [head, ...delivered.map((line) => `- ${line}`), ...missed.map((line) => `- ${line}`)];
1994
+ return `${parts.join('\n')}${quotaNote}`;
1995
+ }
1996
+ const teamTaskTool = () => ({
1997
+ name: 'team_task',
1998
+ description: '共享任务板(本会话):登记要做的事、看谁在做什么、认领和结项,并写进展/标阻塞/绑定队友。' +
1999
+ '改状态要带 expected_revision(list 返回的那一版),别人抢先改过就会失败,重来一次即可。' +
2000
+ '动手前先 list + activity 看别人做到哪一步;进展用 note 写,卡住用 block,队友互相对话用 team_message。',
2001
+ parameters: {
2002
+ type: 'object',
2003
+ properties: {
2004
+ action: {
2005
+ type: 'string',
2006
+ enum: [
2007
+ 'create',
2008
+ 'list',
2009
+ 'get',
2010
+ 'activity',
2011
+ 'claim',
2012
+ 'release',
2013
+ 'complete',
2014
+ 'reopen',
2015
+ 'note',
2016
+ 'block',
2017
+ 'unblock',
2018
+ 'assign',
2019
+ 'set_dependencies',
2020
+ 'delete',
2021
+ ],
2022
+ description: '要做什么',
2023
+ },
2024
+ subject: { type: 'string', description: 'create 必填:任务标题' },
2025
+ description: { type: 'string', description: 'create:任务的详细说明(背景、验收口径)' },
2026
+ id: { type: 'string', description: '除 create/list/activity 外必填:任务 id,例如 t3' },
2027
+ expected_revision: { type: 'number', description: '改状态(claim/release/complete/reopen/delete/set_dependencies/note/block/unblock/assign)必填:你上次 list/create 看到的版本号' },
2028
+ owner: { type: 'string', description: 'claim 时的认领人;不填就是你自己' },
2029
+ claim_now: { type: 'boolean', description: 'create:true = 建完直接算你认领(状态直接进 in_progress)' },
2030
+ write_scopes: { type: 'array', items: { type: 'string' }, description: 'create:这个任务打算改的路径前缀,用于提醒别人别撞车' },
2031
+ blocked_by: { type: 'array', items: { type: 'string' }, description: 'create/set_dependencies:依赖哪些任务 id' },
2032
+ text: { type: 'string', description: 'note/block/unblock 必填(complete 可选):进展内容 / 卡住原因 / 解除说明 / 终稿摘要' },
2033
+ assignee: { type: 'string', description: 'assign:绑定哪个队友;空串表示解绑' },
2034
+ limit: { type: 'number', description: 'activity:返回最近多少条(默认 20,上限 50)' },
2035
+ },
2036
+ required: ['action'],
2037
+ },
2038
+ risk: 'read',
2039
+ run: (args, runCtx) => runTeamTask(args, runCtx),
2040
+ });
2041
+ const teamMessageTool = () => ({
2042
+ name: 'team_message',
2043
+ description: '队友之间直接交流(本会话):点对点 send、广播 broadcast、看自己收到的 inbox。' +
2044
+ '消息会写进对方信箱并叫醒它,同时记进任务板活动;每个队友每轮最多发 3 条。' +
2045
+ '重要结论仍以任务板 note 为准——消息是协调用的,不是台账。',
2046
+ parameters: {
2047
+ type: 'object',
2048
+ properties: {
2049
+ action: { type: 'string', enum: ['send', 'broadcast', 'inbox'], description: '要做什么' },
2050
+ to: { type: 'string', description: 'send 必填:队友名或 lead' },
2051
+ text: { type: 'string', description: 'send/broadcast 必填:要说的话(最长 8000 字)' },
2052
+ limit: { type: 'number', description: 'inbox:读最近多少条(默认 10,上限 20)' },
2053
+ },
2054
+ required: ['action'],
2055
+ },
2056
+ risk: 'read',
2057
+ run: (args, runCtx) => runTeamMessage(args, runCtx),
2058
+ });
2059
+ /**
2060
+ * 看板「易变段」的投影:把最新看板快照附到请求**末尾**,并且只在水位变了才附。
2061
+ *
2062
+ * 为什么这么绕(而不是继续写系统提示里):系统提示一变,服务端前缀缓存从第一段就
2063
+ * 整段作废(`core/llm.ts:777` 把头部缓存断点打在第一处 system 上);而附在消息末尾,
2064
+ * 前面几十 K 的历史前缀照旧命中,变化只落在尾巴。这也是环境快照(`prompt/index.ts`
2065
+ * 的 env-facts,order 600)与待办提醒(todo-reminder,order 800)的同一套取舍。
2066
+ *
2067
+ * 注入判据见 {@link BoardSnapshotWatermark}:看板没变的轮次返回**原数组**(同一个引用),
2068
+ * 不新增消息、不报注入卡——多数轮次因此既不动系统提示也不动消息前缀。
2069
+ */
2070
+ const boardSnapshotSeen = new BoardSnapshotWatermark();
2071
+ /** 上报台账:同一份正文只记一张注入卡(与 todo 的 reminderReported 同一套理由)。 */
2072
+ const boardSnapshotReported = new InjectionReportLedger();
2073
+ /** 留底台账:同一份历史的二次派生(invariant 校验)不重复落 note。 */
2074
+ const boardSnapshotNoted = new InjectionNoteLedger();
2075
+ const teamBoardProjection = (messages, session, report) => {
2076
+ // 归属会话:投影链由各 agent 自己的循环调用(`packages/agent/index.ts` 的 rewrite),
2077
+ // 传进来的就是发起这次请求的会话;兜底才用「当前查看的会话」。
2078
+ const owner = session ?? ctx.session.current();
2079
+ const board = readBoard(owner.meta.id);
2080
+ const round = countRounds(messages);
2081
+ // 用户轮键取日志原文(owner.messages):请求里那份还混着投影追加的 env-facts 等
2082
+ // user 消息,拿它当「轮」会每步都变。新用户轮要重新把看板交给模型(理由见
2083
+ // board-snapshot.ts 的 userTurnKey)。
2084
+ const userKey = userTurnKey(owner.messages);
2085
+ const mark = boardSnapshotWatermark(board);
2086
+ if (!boardSnapshotSeen.due(owner.meta.id, mark, round, userKey))
2087
+ return messages;
2088
+ // 空板不注入:这段正文只会说「板上还没有任务 / 暂无活动」,除了给每个从未用过
2089
+ // 团队功能的会话多一张注入卡之外没有任何信息量。水位照记,等第一条任务/活动出现
2090
+ // 时水位变了,下一跳自然注入。
2091
+ if (board.tasks.length === 0 && board.activity.length === 0) {
2092
+ boardSnapshotSeen.mark(owner.meta.id, mark, round, userKey);
2093
+ return messages;
2094
+ }
2095
+ const text = boardSnapshotText(board);
2096
+ const out = [...messages, { role: 'user', content: text }];
2097
+ // 先记账再注入:同一轮的 invariant 二次派生必须拿到同一个答案(见台账类注释)。
2098
+ boardSnapshotSeen.mark(owner.meta.id, mark, round, userKey);
2099
+ // 注入不落会话历史:按 `session-core/loop.ts:77` 的规矩,注入方自己补一条 note,
2100
+ // 事后回看日志能对出模型当时多看了什么。判据用「会话历史最后一条消息的对象引用」,
2101
+ // 同一份历史重跑时引用不变 → 不重复落(与 todo 的 reminderNotes 同一套)。
2102
+ const last = owner.messages[owner.messages.length - 1];
2103
+ if (boardSnapshotNoted.take(owner.meta.id, last, text))
2104
+ owner.appendNote('team-board', text);
2105
+ // 过上报闸:正文与上一次上报过的逐字相同就不再记卡(同一份快照被压缩后重注时会出现)。
2106
+ if (report !== undefined && boardSnapshotReported.take(owner.meta.id, BOARD_SNAPSHOT_KIND, text)) {
2107
+ report({
2108
+ kind: BOARD_SNAPSHOT_KIND,
2109
+ source: 'team-board',
2110
+ where: 'user-tail',
2111
+ chars: text.length,
2112
+ preview: contextInjectionPreview(text),
2113
+ });
2114
+ }
2115
+ return out;
2116
+ };
2117
+ /**
2118
+ * 三个开关各管一段:
2119
+ * - `allowDelegation` 管 `subagent` 工具、`team_message` 与名册提示;
2120
+ * - `board` 管 `team_task`、板子提示段与看板快照投影;
2121
+ * - `teamMode` 只影响提示与 `maxDepth` 的默认值(见 settings 保存逻辑)。
2122
+ * 前两个独立,所以「只要共享待办、不要派活」与「只要派活、不要板子」都能表达。
2123
+ */
2124
+ let disposers = [];
2125
+ const syncTools = () => {
2126
+ for (const off of disposers)
2127
+ off();
2128
+ disposers = [];
2129
+ if (config.allowDelegation) {
2130
+ disposers.push(ctx.effect(() => ctx.tools.register(subagentTool()), 'subagent: tools.register'));
2131
+ // 横向通道跟着「有没有队友」走:没有队友时它没有收件人,注册了只会白占一个工具位
2132
+ disposers.push(ctx.effect(() => ctx.tools.register(teamMessageTool()), 'subagent: team_message.register'));
2133
+ disposers.push(ctx.effect(() => ctx.prompt.register('subagent', () => {
2134
+ const roles = listRoles().filter((role) => role.enabled);
2135
+ const lines = roles.map((role) => {
2136
+ const tools = role.tools === null ? '不限工具' : role.tools.length === 0 ? '不带工具' : role.tools.join('/');
2137
+ const turns = roleMaxTurns(role);
2138
+ return `- ${role.name}:${role.description || '(没写 description)'}(${tools},${turns === 0 ? '轮次不限' : `最多 ${turns} 轮`})`;
2139
+ });
2140
+ // 板子与派活是同一层的协作:分开成两个包时,子智能体提示里不提板子,
2141
+ // 模型就永远不会用 team_task(旧决策见 docs/development-log.md:848);
2142
+ // 现在同一包里,必须提一句,否则板子等于没有。
2143
+ // 规则用数组拼:板子、模型说明、团队模式各自可选,编号才不会跳号或重号。
2144
+ const rules = [
2145
+ '队友看不到你和用户的对话(context="fork" 只能带到上一个完整回合为止),所以任务描述里必须写清背景、目标、交付格式。',
2146
+ `本会话同时干活上限 ${config.maxTeammates} 个(收工的不占额度)。后台队友干完后汇报会自己接进你的下一轮,不要反复去问它好了没。`,
2147
+ '只读角色改不了文件;要落地代码用 developer / writer 或者你自己动手。',
2148
+ '在队队友与它们的绑定任务不在系统提示里(名单、状态随开工/收工变,写进提示会让请求前缀每轮失效);要看谁在干什么,用 subagent list。',
2149
+ '派完活自己接着干别的,别闲着等。',
2150
+ '分工协议:按真实团队流程派活——需求不清先派 pm(确认需求与验收口径、拆任务上板),方案与契约派 architect,实现按 write_scopes 并行派 developer,独立验证派 tester,构建发布与环境检查派 ops,最后由你汇总向用户交付。派活时用 task_id 绑定它负责的任务。',
2151
+ ...(config.board
2152
+ ? [
2153
+ '多人协作还有一块共享任务板:用 team_task 登记、认领、结项、写进展,队友看到的是同一块板;队友之间可以直接用 team_message 交流,重要结论以任务板 note 为准。',
2154
+ ]
2155
+ : []),
2156
+ ...(config.teamMode
2157
+ ? ['团队模式已开:maxDepth 允许到 2(pm 可以自己再派人);放开后仍受 maxTeammates 与各角色轮次预算约束。']
2158
+ : []),
2159
+ modelRuleText(),
2160
+ ];
2161
+ return `# 子智能体
2162
+ 你可以用 subagent 工具把能独立完成的活派给队友。
2163
+ 可用角色(文件在 ${DSC_AGENTS_DIR},用户可以自己加):
2164
+ ${lines.join('\n') || '- (没有启用中的角色,先在设置「子智能体」里打开或新建)'}
2165
+
2166
+ 派活的规矩:
2167
+ ${rules.map((rule, index) => `${index + 1}. ${rule}`).join('\n')}`;
2168
+ }), 'subagent: prompt.register'));
2169
+ }
2170
+ if (config.board) {
2171
+ disposers.push(ctx.effect(() => ctx.tools.register(teamTaskTool()), 'subagent: team_task.register'));
2172
+ // 稳定段:只讲板子是什么与规矩,逐字常量(**别把看板数据加回来**,见 TEAM_BOARD_GUIDE)。
2173
+ // order 220:排在内核的 instructions(200) / skills(210) 之后、模型信息(890) 之前。
2174
+ // 易变内容放越后越好(`PromptService.register` 的约定):万一哪天这段又被塞进动态
2175
+ // 内容,波及的也只是它后面的「当前模型」一句,不会连带 AGENTS.md/技能目录那 ~10K 字。
2176
+ disposers.push(ctx.effect(() => ctx.prompt.register('team', () => teamBoardGuide(config.allowDelegation), { order: 220 }), 'subagent: board prompt.register'));
2177
+ // 易变段:看板快照走投影注入到请求尾部,只在看板变化后附一次。
2178
+ disposers.push(ctx.effect(() => ctx.prompt.registerProjection('team-board', teamBoardProjection, { order: 700 }), 'subagent: board projection.register'));
2179
+ }
2180
+ };
2181
+ syncTools();
2182
+ // ── 设置分区 ────────────────────────────────────────────────────────────
2183
+ /**
2184
+ * 授权模型多选清单:按端点显示名分组,值用 `端点/模型`(与 `listModels()` 一致)。
2185
+ *
2186
+ * 只列当前配置里存在的模型;已存但端点/模型被删掉的授权仍留在配置里(见
2187
+ * {@link readAllowedModels}),恢复端点后自动回到清单里,不用重新勾。
2188
+ */
2189
+ const modelCheckGroups = () => {
2190
+ const groups = new Map();
2191
+ for (const choice of ctx.llm.listModels()) {
2192
+ const title = choice.providerDisplayName === '' ? choice.provider : choice.providerDisplayName;
2193
+ const options = groups.get(title) ?? [];
2194
+ options.push({ value: choice.value, label: choice.model, detail: choice.description });
2195
+ groups.set(title, options);
2196
+ }
2197
+ return [...groups].map(([title, options]) => ({ title, options }));
2198
+ };
2199
+ const fields = () => [
2200
+ {
2201
+ type: 'switch',
2202
+ key: 'allowDelegation',
2203
+ label: t('field.allowDelegation.label'),
2204
+ help: t('field.allowDelegation.help'),
2205
+ },
2206
+ { type: 'number', key: 'maxTeammates', label: t('field.maxTeammates.label'), min: 1, max: 8, step: 1, help: t('field.maxTeammates.help') },
2207
+ { type: 'number', key: 'maxDepth', label: t('field.maxDepth.label'), min: 0, max: 2, step: 1, help: t('field.maxDepth.help') },
2208
+ {
2209
+ type: 'switch',
2210
+ key: 'teamMode',
2211
+ label: t('field.teamMode.label'),
2212
+ help: t('field.teamMode.help'),
2213
+ },
2214
+ {
2215
+ type: 'number',
2216
+ key: 'maxTurns',
2217
+ label: t('field.maxTurns.label'),
2218
+ min: 0,
2219
+ max: 200,
2220
+ step: 1,
2221
+ help: t('field.maxTurns.help'),
2222
+ },
2223
+ // ── 默认最大轮次(按角色;角色文件里显式写了 max-turns 的以文件为准)────
2224
+ ...TURN_ROLES.map((role) => ({
2225
+ type: 'number',
2226
+ key: `roleTurns.${role}`,
2227
+ label: t('field.roleTurns.label', { role }),
2228
+ min: 0,
2229
+ max: 200,
2230
+ step: 1,
2231
+ help: t('field.roleTurns.help'),
2232
+ group: 'turns',
2233
+ })),
2234
+ {
2235
+ type: 'select',
2236
+ key: 'approval',
2237
+ label: t('field.approval.label'),
2238
+ options: [
2239
+ { value: 'forbid', label: t('option.approval.forbid') },
2240
+ { value: 'foreground', label: t('option.approval.foreground') },
2241
+ { value: 'ask', label: t('option.approval.ask') },
2242
+ ],
2243
+ help: t('field.approval.help'),
2244
+ },
2245
+ {
2246
+ type: 'select',
2247
+ key: 'notify',
2248
+ label: t('field.notify.label'),
2249
+ options: [
2250
+ { value: 'auto', label: t('option.notify.auto') },
2251
+ { value: 'quiet', label: t('option.notify.quiet') },
2252
+ ],
2253
+ },
2254
+ // ── 队友模型:允许 Agent 指定 + 授权清单 ──────────────────────────────
2255
+ {
2256
+ type: 'switch',
2257
+ key: 'allowModelSelection',
2258
+ label: t('field.allowModelSelection.label'),
2259
+ help: t('field.allowModelSelection.help'),
2260
+ group: 'models',
2261
+ },
2262
+ {
2263
+ type: 'checks',
2264
+ key: 'allowedModels',
2265
+ label: t('field.allowedModels.label'),
2266
+ groups: modelCheckGroups(),
2267
+ help: t('field.allowedModels.help'),
2268
+ group: 'models',
2269
+ },
2270
+ { type: 'info', label: t('field.rolesDir.label'), text: DSC_AGENTS_DIR, mono: true, copyable: true, help: t('field.rolesDir.help', { names: builtinRoleNames().join(t('field.rolesDir.separator')) }) },
2271
+ { type: 'button', action: 'new-role', label: t('field.newRole.label'), style: 'ghost', help: t('field.newRole.help') },
2272
+ // ── 任务板(原「共享任务板」插件的设置,并进同一分区)───────────────
2273
+ {
2274
+ type: 'switch',
2275
+ key: 'board',
2276
+ label: t('field.board.label'),
2277
+ help: t('field.board.help'),
2278
+ group: 'board',
2279
+ },
2280
+ { type: 'info', label: t('field.boardDir.label'), text: BOARDS_DIR, mono: true, copyable: true, help: t('field.boardDir.help'), group: 'board' },
2281
+ { type: 'button', action: 'clear-board', label: t('field.clearBoard.label'), style: 'ghost', help: t('field.clearBoard.help'), group: 'board' },
2282
+ ];
2283
+ const section = {
2284
+ id: 'subagent',
2285
+ title: t('section.title'),
2286
+ subtitle: t('section.subtitle'),
2287
+ order: 40,
2288
+ groups: [
2289
+ { id: 'turns', title: t('group.turns.title'), description: t('group.turns.description') },
2290
+ { id: 'models', title: t('group.models.title'), description: t('group.models.description') },
2291
+ { id: 'board', title: t('group.board.title'), description: t('group.board.description') },
2292
+ ],
2293
+ fields,
2294
+ values: () => {
2295
+ const values = {
2296
+ allowDelegation: config.allowDelegation,
2297
+ maxTeammates: config.maxTeammates,
2298
+ maxDepth: config.maxDepth,
2299
+ teamMode: config.teamMode,
2300
+ maxTurns: config.maxTurns,
2301
+ approval: config.approval,
2302
+ notify: config.notify,
2303
+ allowModelSelection: config.allowModelSelection,
2304
+ allowedModels: [...config.allowedModels],
2305
+ board: config.board,
2306
+ };
2307
+ for (const role of TURN_ROLES) {
2308
+ values[`roleTurns.${role}`] = config.roleTurns[role] ?? DEFAULT_ROLE_TURNS[role] ?? 0;
2309
+ }
2310
+ return values;
2311
+ },
2312
+ // 契约:save 返回字符串 = 失败原因;action 返回字符串 = 完成后的提示文案,失败直接抛
2313
+ save: (key, value) => {
2314
+ // 按角色轮次是一组带点号的平铺键(`roleTurns.<角色>`),整块对象写进 config.roleTurns
2315
+ if (key.startsWith('roleTurns.')) {
2316
+ const role = key.slice('roleTurns.'.length);
2317
+ if (!TURN_ROLES.includes(role))
2318
+ return t('save.unknownKey', { key });
2319
+ const turns = Number(value);
2320
+ if (!Number.isFinite(turns) || turns < 0 || turns > 200) {
2321
+ return t('save.badTurns', { value: String(value) });
2322
+ }
2323
+ // writePluginConfig 是顶层键浅合并:roleTurns 按对象整块写,别的角色不会丢
2324
+ applyConfig({ roleTurns: { ...config.roleTurns, [role]: Math.round(turns) } });
2325
+ return;
2326
+ }
2327
+ switch (key) {
2328
+ case 'allowDelegation':
2329
+ applyConfig({ allowDelegation: value === true || value === 'true' });
2330
+ break;
2331
+ case 'maxTeammates':
2332
+ applyConfig({ maxTeammates: Number(value) });
2333
+ break;
2334
+ case 'maxDepth':
2335
+ applyConfig({ maxDepth: Number(value) });
2336
+ break;
2337
+ case 'teamMode': {
2338
+ const enabled = value === true || value === 'true';
2339
+ // 团队模式 = 允许二层派活(PM 可以再派人):打开时顺手把 maxDepth 抬到 2。
2340
+ // 关闭只关这一项、不回退 maxDepth(用户可能自己就是想要二层,替他降级更意外)。
2341
+ applyConfig(enabled ? { teamMode: true, maxDepth: Math.max(config.maxDepth, 2) } : { teamMode: false });
2342
+ break;
2343
+ }
2344
+ case 'maxTurns':
2345
+ applyConfig({ maxTurns: Number(value) });
2346
+ break;
2347
+ case 'approval': {
2348
+ const next = String(value);
2349
+ if (next !== 'forbid' && next !== 'ask' && next !== 'foreground') {
2350
+ return t('save.badValue', { value: String(value) });
2351
+ }
2352
+ applyConfig({ approval: next });
2353
+ break;
2354
+ }
2355
+ case 'notify':
2356
+ applyConfig({ notify: String(value) === 'quiet' ? 'quiet' : 'auto' });
2357
+ break;
2358
+ case 'allowModelSelection': {
2359
+ const enabled = value === true || value === 'true';
2360
+ // 开关开着却一个模型都没授权:Agent 没有任何合法可选值,先拦下比让它每次派活都报错好
2361
+ if (enabled && config.allowedModels.length === 0)
2362
+ return t('save.needAllowedModel');
2363
+ applyConfig({ allowModelSelection: enabled });
2364
+ break;
2365
+ }
2366
+ case 'allowedModels': {
2367
+ const list = readAllowedModels(value);
2368
+ if (config.allowModelSelection && list.length === 0)
2369
+ return t('save.needAllowedModel');
2370
+ applyConfig({ allowedModels: list });
2371
+ break;
2372
+ }
2373
+ case 'board':
2374
+ applyConfig({ board: value === true || value === 'true' });
2375
+ break;
2376
+ default:
2377
+ return t('save.unknownKey', { key });
2378
+ }
2379
+ // 开关会影响工具与提示段在不在场(派活与板子各管一半),改完立刻重挂一次
2380
+ syncTools();
2381
+ },
2382
+ action: (name) => {
2383
+ if (name === 'new-role') {
2384
+ const file = writeRole('starter', {
2385
+ description: '我在这个角色里干什么(一句话,模型据此决定要不要派它)',
2386
+ prompt: '把这一段改成这个角色的职责与做事步骤。它是模型看到的唯一说明书。',
2387
+ });
2388
+ return t('action.roleWritten', { file });
2389
+ }
2390
+ if (name === 'clear-board') {
2391
+ const count = resetBoard(ctx.session.current().meta.id);
2392
+ // 清板也是写板:面板「共享任务」区要立刻空掉,不能等下一拍轮询。
2393
+ touchUi();
2394
+ return t('action.clearBoard', { count });
2395
+ }
2396
+ throw new Error(`这个分区没有这个按钮:${name}`);
2397
+ },
2398
+ };
2399
+ const offSection = ctx.settings.registerSection(section);
2400
+ ctx.effect(() => offSection, 'subagent: settings.registerSection');
2401
+ // ── 卸载 ────────────────────────────────────────────────────────────────
2402
+ return () => {
2403
+ offSection();
2404
+ for (const off of disposers)
2405
+ off();
2406
+ disposers = [];
2407
+ for (const teammate of teammates.values())
2408
+ teammate.agent.cancel();
2409
+ for (const teammate of teammates.values())
2410
+ teammate.session.close();
2411
+ teammates.clear();
2412
+ };
2413
+ },
2414
+ };