nx-kv 0.65.3 → 0.66.0

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 (337) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +15 -37
  3. package/assets/nx-kv/QUICKSTART.md +110 -0
  4. package/assets/nx-kv/SKILL.md +7 -2
  5. package/assets/nx-kv/references/A02-/346/217/220/344/272/244/344/273/273/345/212/241.md +59 -4
  6. package/assets/nx-kv/references/A05-/344/273/273/345/212/241/351/223/276/344/270/216/345/217/215/351/246/210/346/261/207/346/200/273.md +1 -1
  7. package/assets/nx-kv/references/A06-/345/217/202/350/200/203/344/273/223/345/272/223/351/251/261/345/212/250/347/232/204/345/274/200/345/217/221.md +143 -0
  8. package/assets/nx-kv/references/A07-/344/273/273/345/212/241/351/223/276/345/233/236/351/241/276/344/270/216/346/243/200/347/264/242.md +86 -0
  9. package/assets/nx-kv/references/B02-CLI/351/200/237/346/237/245.md +1 -2
  10. package/package.json +2 -2
  11. package/src/core/config.ts +72 -0
  12. package/src/core/db/driver.ts +1 -1
  13. package/src/core/db/migrations/index.ts +2 -0
  14. package/src/core/db/migrations/v14.sql +37 -0
  15. package/src/core/db/version.ts +1 -1
  16. package/src/core/instruction-template.ts +1 -1
  17. package/src/core/workflow/project.ts +1 -1
  18. package/src/core/workflow/types.ts +2 -2
  19. package/src/modules/bundled/actions/_manifest.generated.ts +12 -12
  20. package/src/modules/bundled/actions/{bundled-get.ts → skill-get.ts} +4 -4
  21. package/src/modules/bundled/actions/{bundled-groups.ts → skill-groups.ts} +4 -4
  22. package/src/modules/bundled/actions/{bundled-install.ts → skill-install.ts} +4 -4
  23. package/src/modules/bundled/actions/{bundled-list.ts → skill-list.ts} +4 -4
  24. package/src/modules/claim/actions/_manifest.generated.ts +3 -6
  25. package/src/modules/claim/actions/{localtask-claim.ts → localtask-get.ts} +18 -9
  26. package/src/modules/claim/actions/localtask-preview.ts +2 -2
  27. package/src/modules/{delivery → claim}/assemble.ts +3 -3
  28. package/src/modules/claim/get.ts +3 -4
  29. package/src/modules/{delivery → claim}/groupctx.ts +4 -7
  30. package/src/modules/{delivery → claim}/host.ts +4 -4
  31. package/src/modules/claim/index.ts +2 -2
  32. package/src/modules/claim/panel-escort.ts +2 -2
  33. package/src/modules/claim/params.ts +2 -2
  34. package/src/modules/{delivery → claim}/preview.ts +3 -3
  35. package/src/modules/claim/wait.ts +19 -19
  36. package/src/modules/claim/waitgoal-config.ts +1 -22
  37. package/src/modules/docs/actions/_manifest.generated.ts +49 -37
  38. package/src/modules/docs/actions/{doc-attach.ts → docs-attach.ts} +4 -4
  39. package/src/modules/docs/actions/{doc-attachments.ts → docs-attachments.ts} +4 -4
  40. package/src/modules/docs/actions/{doc-detach.ts → docs-detach.ts} +4 -4
  41. package/src/modules/docs/actions/{doc-get.ts → docs-get.ts} +4 -4
  42. package/src/modules/docs/actions/{doc-link-file.ts → docs-link-file.ts} +3 -3
  43. package/src/modules/docs/actions/{doc-list.ts → docs-list.ts} +4 -4
  44. package/src/modules/docs/actions/{doc-mdfile.ts → docs-mdfile.ts} +3 -3
  45. package/src/modules/docs/actions/{doc-mdfiles.ts → docs-mdfiles.ts} +3 -3
  46. package/src/modules/docs/actions/{docs-notebind.ts → docs-note-bind.ts} +3 -3
  47. package/src/modules/docs/actions/{doc-ref.ts → docs-ref.ts} +4 -4
  48. package/src/modules/docs/actions/{doc-remove.ts → docs-remove.ts} +4 -4
  49. package/src/modules/docs/actions/{doc-update.ts → docs-set.ts} +4 -4
  50. package/src/modules/docs/actions/{doc-unbind.ts → docs-unbind.ts} +4 -4
  51. package/src/modules/{repos → docs}/actions/repo-doc-add.ts +3 -2
  52. package/src/modules/{repos → docs}/actions/repo-doc-list.ts +3 -2
  53. package/src/modules/{repos → docs}/actions/repo-doc-remove.ts +3 -2
  54. package/src/modules/{repos → docs}/actions/repo-knowledge.ts +3 -2
  55. package/src/modules/docs/host-scrub.ts +1 -1
  56. package/src/modules/docs/index.ts +1 -1
  57. package/src/modules/docs/knowledge.ts +8 -16
  58. package/src/modules/goals/actions/timegoal-check.ts +1 -1
  59. package/src/modules/goals/actions/timegoal-clear.ts +1 -1
  60. package/src/modules/goals/actions/timegoal-list.ts +1 -1
  61. package/src/modules/goals/actions/timegoal-log.ts +1 -1
  62. package/src/modules/goals/actions/timegoal-set.ts +1 -1
  63. package/src/modules/goals/actions/timegoal-show.ts +1 -1
  64. package/src/modules/goals/actions/timegoal-update.ts +1 -1
  65. package/src/modules/goals/plugins/timegoal-cwd-store.ts +1 -1
  66. package/src/modules/goals/plugins/timegoal-store.ts +3 -3
  67. package/src/modules/goals/plugins/timegoal-task-store.ts +2 -2
  68. package/src/modules/{localtask → goals}/support.ts +3 -1
  69. package/src/modules/localtask/actions/_manifest.generated.ts +14 -14
  70. package/src/modules/localtask/actions/localtask-add.ts +3 -3
  71. package/src/modules/localtask/actions/localtask-attach-note.ts +1 -1
  72. package/src/modules/localtask/actions/localtask-attach.ts +1 -1
  73. package/src/modules/localtask/actions/localtask-attachments.ts +2 -2
  74. package/src/modules/localtask/actions/{localtask-cancelMany.ts → localtask-cancel-many.ts} +3 -3
  75. package/src/modules/localtask/actions/localtask-cancel.ts +1 -1
  76. package/src/modules/localtask/actions/localtask-chain.ts +1 -1
  77. package/src/modules/localtask/actions/{localtask-closeMany.ts → localtask-close-many.ts} +3 -3
  78. package/src/modules/localtask/actions/localtask-detach.ts +2 -2
  79. package/src/modules/localtask/actions/localtask-done.ts +1 -1
  80. package/src/modules/localtask/actions/localtask-list.ts +1 -1
  81. package/src/modules/localtask/actions/{localtask-removeMany.ts → localtask-remove-many.ts} +3 -3
  82. package/src/modules/localtask/actions/localtask-reopen.ts +5 -5
  83. package/src/modules/localtask/actions/{localtask-get.ts → localtask-show.ts} +17 -8
  84. package/src/modules/localtask/actions/localtask-tasks.ts +19 -4
  85. package/src/modules/localtask/actions/{localtask-timegoalLog.ts → localtask-timegoal-log.ts} +3 -3
  86. package/src/modules/localtask/actions/{localtask-topic-removeMany.ts → localtask-topic-remove-many.ts} +4 -4
  87. package/src/modules/localtask/actions/localtask-update.ts +2 -2
  88. package/src/modules/localtask/{bus → infra/bus}/index.ts +1 -1
  89. package/src/modules/localtask/{engine.ts → infra/engine.ts} +1 -1
  90. package/src/modules/localtask/{events.ts → infra/events.ts} +3 -3
  91. package/src/modules/localtask/{mutator → infra/mutator}/index.ts +2 -2
  92. package/src/modules/localtask/{mutator → infra/mutator}/validate.ts +4 -4
  93. package/src/modules/localtask/{repo → infra/repo}/goals.ts +2 -2
  94. package/src/modules/localtask/{repo → infra/repo}/index.ts +1 -1
  95. package/src/modules/localtask/{repo → infra/repo}/links.ts +3 -3
  96. package/src/modules/localtask/{repo → infra/repo}/open.ts +4 -4
  97. package/src/modules/localtask/{repo → infra/repo}/presence.ts +1 -1
  98. package/src/modules/localtask/{repo → infra/repo}/rows.ts +1 -1
  99. package/src/modules/localtask/{repo → infra/repo}/settings.ts +9 -6
  100. package/src/modules/localtask/{repo → infra/repo}/snapshot.ts +9 -7
  101. package/src/modules/localtask/{repo → infra/repo}/tasks.ts +82 -4
  102. package/src/modules/localtask/{repo → infra/repo}/topics.ts +3 -3
  103. package/src/modules/localtask/{repo-ctx.ts → infra/repo-ctx.ts} +1 -1
  104. package/src/modules/localtask/{scheduler → infra/scheduler}/index.ts +1 -1
  105. package/src/modules/localtask/{scheduler → infra/scheduler}/state-drive.ts +4 -4
  106. package/src/modules/localtask/{store → infra/store}/file-adapter.ts +2 -2
  107. package/src/modules/localtask/{store → infra/store}/index.ts +4 -4
  108. package/src/modules/localtask/{store → infra/store}/memory-adapter.ts +2 -2
  109. package/src/modules/localtask/{store-io.ts → infra/store-io.ts} +1 -1
  110. package/src/modules/localtask/{writes.ts → infra/writes.ts} +3 -3
  111. package/src/modules/localtask/{add.ts → lifecycle/add.ts} +5 -5
  112. package/src/modules/localtask/{deletion.ts → lifecycle/deletion.ts} +4 -4
  113. package/src/modules/localtask/{task-lifecycle.ts → lifecycle/task-lifecycle.ts} +27 -24
  114. package/src/modules/localtask/{task-ops.ts → lifecycle/task-ops.ts} +19 -18
  115. package/src/modules/localtask/{task-remove.ts → lifecycle/task-remove.ts} +5 -5
  116. package/src/modules/localtask/{task-templates.ts → lifecycle/task-templates.ts} +2 -2
  117. package/src/modules/localtask/{task-view.ts → lifecycle/task-view.ts} +39 -13
  118. package/src/modules/localtask/{topics.ts → lifecycle/topics.ts} +7 -7
  119. package/src/modules/localtask/{update.ts → lifecycle/update.ts} +5 -5
  120. package/src/modules/{delivery → localtask/ops}/attach-resource.ts +4 -4
  121. package/src/modules/{delivery → localtask/ops}/attach-template.ts +3 -3
  122. package/src/modules/{delivery → localtask/ops}/attach.ts +11 -11
  123. package/src/modules/localtask/{board-target.ts → ops/board-target.ts} +1 -1
  124. package/src/modules/{delivery → localtask/ops}/doc-inline.ts +3 -3
  125. package/src/modules/localtask/{group-store.ts → ops/group-store.ts} +1 -1
  126. package/src/modules/localtask/service.ts +16 -16
  127. package/src/modules/localtask/{action-render.ts → ui/action-render.ts} +18 -4
  128. package/src/modules/localtask/{contract-views.ts → ui/contract-views.ts} +9 -4
  129. package/src/modules/localtask/{panel-guard.ts → ui/panel-guard.ts} +1 -1
  130. package/src/modules/localtask/{panel-presence.ts → ui/panel-presence.ts} +6 -6
  131. package/src/modules/localtask/waiters.ts +2 -2
  132. package/src/modules/localtask/waiting.ts +1 -1
  133. package/src/modules/promptplug/factory.ts +2 -2
  134. package/src/modules/promptplug/index.ts +5 -5
  135. package/src/modules/promptplug/plugins/attachment.ts +1 -1
  136. package/src/modules/promptplug/plugins/context.ts +9 -20
  137. package/src/modules/promptplug/plugins/goal-prompt.ts +1 -1
  138. package/src/modules/promptplug/template-store.ts +163 -58
  139. package/src/modules/repos/actions/_manifest.generated.ts +0 -12
  140. package/src/modules/repos/service/crud.ts +1 -1
  141. package/src/modules/setting/actions/setting-set.ts +1 -0
  142. package/src/modules/setting/service.ts +15 -1
  143. package/src/modules/templates/actions/_manifest.generated.ts +18 -18
  144. package/src/modules/templates/actions/{templates-add.ts → template-add.ts} +4 -4
  145. package/src/modules/templates/actions/{templates-default.ts → template-default.ts} +4 -4
  146. package/src/modules/templates/actions/{templates-list.ts → template-list.ts} +4 -4
  147. package/src/modules/templates/actions/{templates-remove.ts → template-remove.ts} +4 -4
  148. package/src/modules/templates/actions/{templates-reorder.ts → template-reorder.ts} +4 -4
  149. package/src/modules/templates/actions/{templates-update.ts → template-update.ts} +4 -4
  150. package/src/runtime/cli.ts +1 -1
  151. package/src/runtime/registry.ts +0 -2
  152. package/src/{modules/delivery → shared}/delivery-text.ts +5 -4
  153. package/src/shared/feedback-text.ts +80 -20
  154. package/src/shared/task-status.ts +42 -0
  155. package/src/web/frontend/App.tsx +10 -9
  156. package/src/web/frontend/api/cli-tree.json +307 -322
  157. package/src/web/frontend/api/client.generated.ts +285 -283
  158. package/src/web/frontend/components/doc/doc-head.tsx +1 -1
  159. package/src/web/frontend/components/layout/crumbs.ts +3 -9
  160. package/src/web/frontend/components/md/{attach-area.tsx → attachments/attach-area.tsx} +5 -5
  161. package/src/web/frontend/components/md/{attach-bar.tsx → attachments/attach-bar.tsx} +1 -1
  162. package/src/web/frontend/components/md/{attach-common.ts → attachments/attach-common.ts} +1 -1
  163. package/src/web/frontend/components/md/{attach-modal.tsx → attachments/attach-modal.tsx} +4 -4
  164. package/src/web/frontend/components/md/{attach-picker.tsx → attachments/attach-picker.tsx} +4 -4
  165. package/src/web/frontend/components/md/{attachments.ts → attachments/attachments.ts} +1 -1
  166. package/src/web/frontend/components/md/{composer-launch.ts → composer/composer-launch.ts} +3 -3
  167. package/src/web/frontend/components/md/{composer-panel.tsx → composer/composer-panel.tsx} +12 -12
  168. package/src/web/frontend/components/md/{use-live-preview.ts → hooks/use-live-preview.ts} +8 -8
  169. package/src/web/frontend/components/md/{use-slash-menu.ts → hooks/use-slash-menu.ts} +4 -4
  170. package/src/web/frontend/components/md/{use-source-editor.ts → hooks/use-source-editor.ts} +7 -7
  171. package/src/web/frontend/components/md/{sel-menu.tsx → menus/sel-menu.tsx} +1 -1
  172. package/src/web/frontend/components/md/model/autolink-angle/index.ts +20 -0
  173. package/src/web/frontend/components/md/model/code/index.ts +30 -0
  174. package/src/web/frontend/components/md/model/divider/index.ts +19 -0
  175. package/src/web/frontend/components/md/model/emphasis/index.ts +21 -0
  176. package/src/web/frontend/components/md/model/escape/index.ts +35 -0
  177. package/src/web/frontend/components/md/model/footnote/index.ts +77 -0
  178. package/src/web/frontend/components/md/model/heading/index.ts +19 -0
  179. package/src/web/frontend/components/md/model/highlight/index.ts +10 -0
  180. package/src/web/frontend/components/md/model/image/index.ts +31 -0
  181. package/src/web/frontend/components/md/model/inline-scan.ts +47 -0
  182. package/src/web/frontend/components/md/model/link-ref/index.ts +41 -0
  183. package/src/web/frontend/components/md/model/list-common.ts +97 -0
  184. package/src/web/frontend/components/md/model/math/index.ts +70 -0
  185. package/src/web/frontend/components/md/model/math/latex.ts +106 -0
  186. package/src/web/frontend/components/md/model/ordered-list/index.ts +27 -0
  187. package/src/web/frontend/components/md/model/paragraph/index.ts +19 -0
  188. package/src/web/frontend/components/md/model/quote/index.ts +63 -0
  189. package/src/web/frontend/components/md/model/registry.ts +74 -0
  190. package/src/web/frontend/components/md/model/table/index.ts +100 -0
  191. package/src/web/frontend/components/md/model/types.ts +92 -0
  192. package/src/web/frontend/components/md/model/unordered-list/index.ts +37 -0
  193. package/src/web/frontend/components/md/{live-block.tsx → panes/live-block.tsx} +3 -3
  194. package/src/web/frontend/components/md/{md-panes-helpers.ts → panes/md-panes-helpers.ts} +15 -4
  195. package/src/web/frontend/components/md/{md-panes-keys.ts → panes/md-panes-keys.ts} +3 -3
  196. package/src/web/frontend/components/md/{md-panes-root.tsx → panes/md-panes-root.tsx} +2 -2
  197. package/src/web/frontend/components/md/{md-panes.tsx → panes/md-panes.tsx} +12 -12
  198. package/src/web/frontend/components/md/{ack-rail.tsx → rails/ack-rail.tsx} +2 -2
  199. package/src/web/frontend/components/md/{block-rail.tsx → rails/block-rail.tsx} +2 -2
  200. package/src/web/frontend/components/md/{doc-outline-rail.tsx → rails/doc-outline-rail.tsx} +1 -1
  201. package/src/web/frontend/components/md/{shortcut-sheet.tsx → shell/shortcut-sheet.tsx} +1 -1
  202. package/src/web/frontend/components/md/{tool-bar.tsx → shell/tool-bar.tsx} +5 -7
  203. package/src/web/frontend/components/md/standalone/task-chain-graph.tsx +194 -0
  204. package/src/web/frontend/components/md/{task-chain.tsx → standalone/task-chain.tsx} +34 -11
  205. package/src/web/frontend/components/md/{template-editor.tsx → standalone/template-editor.tsx} +2 -2
  206. package/src/web/frontend/components/repos/get-loop-members.tsx +54 -0
  207. package/src/web/frontend/components/repos/get-loop-modal.tsx +6 -4
  208. package/src/web/frontend/components/sidebar/brand-row.tsx +30 -0
  209. package/src/web/frontend/components/sidebar/drag.ts +53 -1
  210. package/src/web/frontend/components/sidebar/index.tsx +121 -62
  211. package/src/web/frontend/components/sidebar/model.ts +102 -7
  212. package/src/web/frontend/components/sidebar/ns-add-modal.tsx +81 -0
  213. package/src/web/frontend/components/sidebar/ns-dialogs.tsx +67 -0
  214. package/src/web/frontend/components/sidebar/ns-manage-modal.tsx +56 -0
  215. package/src/web/frontend/components/sidebar/ns-modal.tsx +58 -0
  216. package/src/web/frontend/components/sidebar/ns-observe-modal.tsx +36 -0
  217. package/src/web/frontend/components/sidebar/ns-picker.tsx +134 -0
  218. package/src/web/frontend/components/sidebar/ns-row.tsx +70 -0
  219. package/src/web/frontend/components/sidebar/row-menu.tsx +39 -5
  220. package/src/web/frontend/components/sidebar/search-row.tsx +37 -0
  221. package/src/web/frontend/components/sidebar/use-ns.ts +178 -0
  222. package/src/web/frontend/components/sidebar/use-sidebar-ns.ts +64 -0
  223. package/src/web/frontend/components/task-panel/task-row.tsx +26 -0
  224. package/src/web/frontend/components/tool-acts/bar.tsx +7 -7
  225. package/src/web/frontend/components/tool-acts/modules.ts +7 -4
  226. package/src/web/frontend/components/use-rail-drag.ts +1 -1
  227. package/src/web/frontend/modules/board/ack-nodes.ts +11 -14
  228. package/src/web/frontend/modules/board/ack-rail-pos.ts +1 -1
  229. package/src/web/frontend/modules/board/reopen-text.ts +5 -0
  230. package/src/web/frontend/modules/board/task-search.ts +43 -0
  231. package/src/web/frontend/modules/md/attach-mention.ts +2 -2
  232. package/src/web/frontend/modules/md/doc-store.ts +2 -2
  233. package/src/web/frontend/modules/md/md-blocks.ts +18 -1
  234. package/src/web/frontend/modules/md/md-edit-ops.ts +18 -3
  235. package/src/web/frontend/modules/md/md-render.ts +108 -179
  236. package/src/web/frontend/modules/md/styles/docs.css +89 -0
  237. package/src/web/frontend/modules/md/styles/editor.css +33 -7
  238. package/src/web/frontend/modules/md/styles/panels.css +107 -2
  239. package/src/web/frontend/page/dir/landing.tsx +35 -0
  240. package/src/web/frontend/page/dir/task-actions.ts +2 -2
  241. package/src/web/frontend/page/dir/task-chain.ts +5 -2
  242. package/src/web/frontend/page/dir/task-dock-panel.tsx +19 -28
  243. package/src/web/frontend/page/dir/task-feedback.ts +4 -4
  244. package/src/web/frontend/page/dir/task-utils.ts +19 -3
  245. package/src/web/frontend/page/dir/task.tsx +16 -13
  246. package/src/web/frontend/page/doc/doc-dock.tsx +1 -1
  247. package/src/web/frontend/page/doc/index.tsx +4 -4
  248. package/src/web/frontend/page/group/index.tsx +47 -2
  249. package/src/web/frontend/page/progress/api.ts +5 -0
  250. package/src/web/frontend/page/progress/chain-view.tsx +108 -0
  251. package/src/web/frontend/page/progress/index.tsx +210 -152
  252. package/src/web/frontend/page/repos/index.tsx +0 -11
  253. package/src/web/frontend/page/repos/repo-table.tsx +1 -20
  254. package/src/web/frontend/page/settings/api.ts +0 -4
  255. package/src/web/frontend/page/settings/index.tsx +1 -12
  256. package/src/web/frontend/page/settings/prompt-template-editor.tsx +1 -1
  257. package/src/web/frontend/page/settings/prompt-templates-section.tsx +1 -1
  258. package/src/web/frontend/page/templates/index.tsx +3 -3
  259. package/src/web/frontend/page/templates/manage.tsx +1 -1
  260. package/src/web/frontend/panels.tsx +2 -8
  261. package/src/web/frontend/prefs.ts +4 -3
  262. package/src/web/frontend/registry.ts +0 -1
  263. package/src/web/frontend/routes/index.ts +1 -2
  264. package/src/web/frontend/routes/static.ts +0 -1
  265. package/src/web/frontend/styles-v2/dag.css +17 -2
  266. package/src/web/frontend/styles-v2/dir.css +0 -36
  267. package/src/web/frontend/styles-v2/sidebar.css +92 -1
  268. package/src/web/frontend/types.ts +22 -1
  269. package/src/web/frontend/use-ns-persist.ts +63 -0
  270. package/src/web/frontend/workspace/areas.ts +1 -3
  271. package/src/web/frontend/workspace/panels.ts +1 -1
  272. package/src/web/public/assets/bar-Dy_QDX2h.js +1 -0
  273. package/src/web/public/assets/board-view-Cm8189wG.js +1 -0
  274. package/src/web/public/assets/composer-launch-B7DH53Yf.js +1 -0
  275. package/src/web/public/assets/composer-panel-CWFFEe5a.js +1 -0
  276. package/src/web/public/assets/dag-DjtLPr3j.js +1 -0
  277. package/src/web/public/assets/dir-DPboO_1M.js +3 -0
  278. package/src/web/public/assets/doc-_iteSM2X.js +6 -0
  279. package/src/web/public/assets/get-loop-modal-BW2dD9kv.js +2 -0
  280. package/src/web/public/assets/group-UEOT29Zq.js +1 -0
  281. package/src/web/public/assets/index-BpNXBbNQ.css +1 -0
  282. package/src/web/public/assets/index-BxrcTrww.js +3 -0
  283. package/src/web/public/assets/md-history-Bj790fdn.js +46 -0
  284. package/src/web/public/assets/progress-MPse2JLQ.js +3 -0
  285. package/src/web/public/assets/refs-DiIPoqnJ.js +2 -0
  286. package/src/web/public/assets/{repo-form-modal-Dg3hJWUV.js → repo-form-modal-CNLYR12c.js} +1 -1
  287. package/src/web/public/assets/repos-BGx-yAXd.js +12 -0
  288. package/src/web/public/assets/route-crumb-DX9C4jmQ.js +1 -0
  289. package/src/web/public/assets/settings-buy_qJGW.js +1 -0
  290. package/src/web/public/assets/task-DHlwHURz.js +13 -0
  291. package/src/web/public/assets/task-status-Cjsm0xF7.js +7 -0
  292. package/src/web/public/assets/task-utils-CJfMODCP.js +13 -0
  293. package/src/web/public/assets/templates-DdMaVWok.js +10 -0
  294. package/src/web/public/assets/tool-bar-D5wLBLRl.js +28 -0
  295. package/src/web/public/assets/use-rail-drag-CNOHXWng.js +1 -0
  296. package/src/web/public/index.html +11 -13
  297. package/src/modules/claim/actions/localtask-wait.ts +0 -41
  298. package/src/modules/delivery/index.ts +0 -18
  299. package/src/web/frontend/modules/md/progress-chain.ts +0 -34
  300. package/src/web/frontend/page/overview/api.ts +0 -29
  301. package/src/web/frontend/page/overview/index.tsx +0 -378
  302. package/src/web/frontend/page/settings/sidebar-section.tsx +0 -75
  303. package/src/web/public/assets/bar-Dc5Tq1eE.js +0 -1
  304. package/src/web/public/assets/board-view-BVennxTs.js +0 -1
  305. package/src/web/public/assets/composer-launch-fp2IzGzQ.js +0 -1
  306. package/src/web/public/assets/composer-panel-Dh681iO6.js +0 -1
  307. package/src/web/public/assets/dag-DnaU0I_z.js +0 -1
  308. package/src/web/public/assets/dir-d16q1GLe.js +0 -3
  309. package/src/web/public/assets/doc-DRSKD0Re.js +0 -6
  310. package/src/web/public/assets/frontmatter-CN6IlxWU.js +0 -2
  311. package/src/web/public/assets/group-Dc3ZgW24.js +0 -1
  312. package/src/web/public/assets/index-BIVxGd6t.css +0 -1
  313. package/src/web/public/assets/index-Bg0m8gbJ.js +0 -2
  314. package/src/web/public/assets/md-history-DNtgaIdH.js +0 -39
  315. package/src/web/public/assets/md-parse-C9Vd6ejP.js +0 -2
  316. package/src/web/public/assets/model-CtG2jIDv.js +0 -2
  317. package/src/web/public/assets/overview-C68QpcT9.js +0 -1
  318. package/src/web/public/assets/progress-CEmAFxo9.js +0 -3
  319. package/src/web/public/assets/refs-TzxZYy7T.js +0 -2
  320. package/src/web/public/assets/repos-uNqSR5YB.js +0 -12
  321. package/src/web/public/assets/route-crumb-C4DgkJ8G.js +0 -1
  322. package/src/web/public/assets/settings-BzIllshQ.js +0 -1
  323. package/src/web/public/assets/status-tag-8cLH8hl9.js +0 -1
  324. package/src/web/public/assets/task-DuFOXLPC.js +0 -11
  325. package/src/web/public/assets/task-row-CRjuAfKW.js +0 -1
  326. package/src/web/public/assets/task-utils-DAPxKm4c.js +0 -12
  327. package/src/web/public/assets/templates-DNiGvmdq.js +0 -10
  328. package/src/web/public/assets/use-rail-drag-DxIYcszo.js +0 -1
  329. package/src/web/public/assets/workspace-DojQ3RP4.js +0 -28
  330. /package/src/modules/localtask/{store → infra/store}/topic-adapter.ts +0 -0
  331. /package/src/modules/localtask/{action-flags.ts → ui/action-flags.ts} +0 -0
  332. /package/src/web/frontend/components/md/{use-block-drag.ts → hooks/use-block-drag.ts} +0 -0
  333. /package/src/web/frontend/components/md/{slash-menu.tsx → menus/slash-menu.tsx} +0 -0
  334. /package/src/web/frontend/components/md/{doc-keys.ts → panes/doc-keys.ts} +0 -0
  335. /package/src/web/frontend/components/md/{find-bar.tsx → shell/find-bar.tsx} +0 -0
  336. /package/src/web/frontend/components/md/{status-bar.tsx → shell/status-bar.tsx} +0 -0
  337. /package/src/web/public/assets/{md-history-CLIs9Dr0.css → tool-bar-CLIs9Dr0.css} +0 -0
@@ -1,4 +1,4 @@
1
- // delivery/doc-inline.ts —— 任务级文档绑定的「进原文」(#162)。
1
+ // localtask/doc-inline.ts —— 任务级文档绑定的「进原文」(#162)。
2
2
  //
3
3
  // role='doc' 的 kind=ref 附件 = **文档资料绑定**:交付时把文档全文附进 instruction,
4
4
  // 而不是只给一条 `docs get` 命令——agent 少跑一轮 nx-kv(任务原文口径:
@@ -10,8 +10,8 @@
10
10
  // 经 `readMdfile`(唯一文件读入口)取正文;没登记 → 显式提示 + 给登记命令;
11
11
  // - fail-open:读不到 → 内容留空,清单与取用命令照给,绝不拖垮领取。
12
12
  import { MAX_INLINE_DOC_CHARS } from './attach-resource.js';
13
- import { findMdfileByPath, noBodyReason, readMdfile, refDocById } from '../../core/attachmentdb.js';
14
- import { getDb } from '../../core/db/index.js';
13
+ import { findMdfileByPath, noBodyReason, readMdfile, refDocById } from '../../../core/attachmentdb.js';
14
+ import { getDb } from '../../../core/db/index.js';
15
15
 
16
16
  /** 外部 md 正文:只认已登记的 mdfile(唯一文件读入口)。 */
17
17
  function readExternalViaMdfile(db: any, locator: string): string | null {
@@ -9,7 +9,7 @@
9
9
  // repos[i] = { key, name, path }
10
10
  let reposMod: any = null;
11
11
  async function reposStore(): Promise<any> {
12
- if (!reposMod) reposMod = await import('../repos/service.js');
12
+ if (!reposMod) reposMod = await import('../../repos/service.js');
13
13
  return reposMod;
14
14
  }
15
15
 
@@ -2,13 +2,13 @@
2
2
  // 领取(含阻塞等待子功能)+ 内嵌弹窗。
3
3
  //
4
4
  // 解决的问题:agent 在一个对话里需要用户继续给任务时,不必结束本轮、等用户去
5
- // 原始输入框打字,而是把 `nx-kv localtask wait --cwd "<工作目录>" --summary "<当前现状>"`
5
+ // 原始输入框打字,而是把 `nx-kv localtask get --cwd "<工作目录>" --timeout N`
6
6
  // 当作 **本轮最后一个动作**调用——命令阻塞、自动打开浏览器弹窗;用户在弹窗/面板回填,
7
7
  // 命令解除阻塞、把新任务作为结果返回给 agent,agent 接着干。
8
8
  //
9
9
  // 关键设计:
10
- // 1. **工作目录即主题,主题拥有队列。** wait 传入工作目录(默认进程 cwd),归一化后
11
- // 作为主题 key;同一目录的多次 wait(即便现状措辞不同)共用同一个任务队列,
10
+ // 1. **工作目录即主题,主题拥有队列。** get 传入工作目录(默认进程 cwd),归一化后
11
+ // 作为主题 key;同一目录的多次阻塞领取共用同一个任务队列,
12
12
  // 不同目录 → 不同主题 → 队列互不串。任务可在一个主题队列里逐条堆积,agent 按序领取。
13
13
  // 2. **全局主题兜底(工作窃取)。** 除按目录划分的本地队列外,还有一个跨目录共享的
14
14
  // 「全局主题」(key '__GLOBAL__'):本地队列取不到 pending 时,任何 wait 都自动去
@@ -29,11 +29,11 @@
29
29
  // 本文件曾是 2400+ 行的 god-file,已按分节拆成本目录的兄弟文件;这里只做
30
30
  // **门面再导出**——对外 API 路径('./service.js' 静态引用与动态 import)全部
31
31
  // 不变;模块内部依赖方向(单向无环)见各文件头注释。
32
- export * from './task-templates.js';
32
+ export * from './lifecycle/task-templates.js';
33
33
  export * from './paths.js';
34
- export * from './store-io.js';
34
+ export * from './infra/store-io.js';
35
35
  // 存储仓储(T03):reset 仅测试用(清空库);repo 是窄方法的命名空间聚合。
36
- export { resetLocaltaskStore, closeDb, default as repo } from './repo/index.js';
36
+ export { resetLocaltaskStore, closeDb, default as repo } from './infra/repo/index.js';
37
37
 
38
38
  /**
39
39
  * 只读快照:把库投成旧 JSON store 的形状({ version, settings, topics: {key: topic} })。
@@ -41,20 +41,20 @@ export { resetLocaltaskStore, closeDb, default as repo } from './repo/index.js';
41
41
  * **没有 saveStore**:写路径必须走 repo 窄方法,「读全表→改→整表重写」被禁止。
42
42
  */
43
43
  export async function loadStore(): Promise<Record<string, any>> {
44
- const repo = await import('./repo/index.js');
44
+ const repo = await import('./infra/repo/index.js');
45
45
  repo.openLocaltaskStore();
46
46
  const map: Record<string, any> = {};
47
47
  for (const t of repo.topics.listTopics()) map[t.key] = t;
48
48
  return { version: 4, settings: repo.settings.getLtSettings(), topics: map };
49
49
  }
50
- export * from './repo-ctx.js';
51
- export * from './task-view.js';
50
+ export * from './infra/repo-ctx.js';
51
+ export * from './lifecycle/task-view.js';
52
52
  export * from './waiters.js';
53
53
  export * from './waiting.js';
54
- export * from './deletion.js';
55
- export * from './task-lifecycle.js';
56
- export * from './topics.js';
57
- export * from './task-ops.js';
58
- export * from './task-remove.js';
59
- export * from './panel-presence.js';
60
- export * from './events.js';
54
+ export * from './lifecycle/deletion.js';
55
+ export * from './lifecycle/task-lifecycle.js';
56
+ export * from './lifecycle/topics.js';
57
+ export * from './lifecycle/task-ops.js';
58
+ export * from './lifecycle/task-remove.js';
59
+ export * from './ui/panel-presence.js';
60
+ export * from './infra/events.js';
@@ -1,7 +1,7 @@
1
1
  // action 的人读输出(render)函数(自 index.js 拆出):CLI 与 HTTP 共用同一份措辞。
2
2
  // STATUS_TAG 来自同构词表(src/shared/task-status.js):CLI 与面板共用一份措辞。
3
- import { STATUS_TAG } from '../../shared/task-status.js';
4
- import { deliveryBodyText } from '../delivery/delivery-text.js';
3
+ import { STATUS_TAG } from '../../../shared/task-status.js';
4
+ import { deliveryBodyText } from '../../../shared/delivery-text.js';
5
5
 
6
6
  // 渲染入参都是 action 结果对象(HTTP/CLI body 透传)→ any。
7
7
  export type RenderInput = any;
@@ -91,7 +91,7 @@ export function renderAdd(d: RenderInput): string {
91
91
  }
92
92
 
93
93
  // `localtask chain` 的人读输出(#74):同任务 history 节点为主;旧 forkOf 祖先/子任务为辅
94
- const KIND_TAG: Record<string, string> = { origin: '起点', reopen: '反馈', comment: '评论', current: '当前' };
94
+ const KIND_TAG: Record<string, string> = { origin: '起点', reopen: '反馈', comment: '评论', fork: '分支', feedback: '反馈', current: '当前' };
95
95
  // T04:链 = task_links(每轮一条任务,seq 做节点 key)。节点没有 origin/comment
96
96
  // 事件层了——每轮的"正文 + 反馈"完整活在那一轮的任务行上。
97
97
  export function renderChain(d: RenderInput): string {
@@ -102,7 +102,21 @@ export function renderChain(d: RenderInput): string {
102
102
  ];
103
103
  if (d.derivedFrom) lines.push(` 派生自: ${d.derivedFrom}`);
104
104
  const nodes = Array.isArray(d.nodes) ? d.nodes : [];
105
- if (nodes.length > 1) {
105
+ // #245:链是树不是链——优先按 tree(祖先路径 + 后代子树)缩进渲染;
106
+ // 没有 tree(旧数据/旧调用方)再退回平铺 nodes。
107
+ const tree = d.tree;
108
+ if (tree && (nodes.length > 1 || (tree.children || []).length)) {
109
+ const kindOf = (n: any) => (n.forkKind ? `(${KIND_TAG[n.forkKind] || n.forkKind})` : '');
110
+ const walk = (n: any, depth: number) => {
111
+ const mark = n.current ? '●' : n.missing ? '×' : '○';
112
+ const tag = `[${STATUS_TAG[n.status] || n.status || '?'}]`;
113
+ const cross = n.key && n.key !== d.key ? ` @ ${n.name || n.key}` : '';
114
+ lines.push(` ${'│ '.repeat(depth)}${mark} #${n.id} ${tag}${kindOf(n)} ${n.excerpt || '—'}${cross}`);
115
+ for (const c of n.children || []) walk(c, depth + 1);
116
+ };
117
+ lines.push(` 任务链(树状,共 ${nodes.length} 条):`);
118
+ walk(tree, 0);
119
+ } else if (nodes.length > 1) {
106
120
  lines.push(` 任务链(R1 → R${nodes.length},共 ${nodes.length} 条):`);
107
121
  for (const n of nodes) {
108
122
  const mark = n.current ? '●' : '○';
@@ -1,13 +1,18 @@
1
1
  // localtask 的**跨语言出参视图**(契约用,见 ActionMeta.output)。
2
2
  //
3
- // 为什么单独一个文件:`localtask.get` / `claim` / `done` / `reopen` / `add` / `update`
3
+ // 为什么单独一个文件:`localtask.get`(领取)/ `show` / `done` / `reopen` / `add` / `update`
4
4
  // 六条 action 都要往外说话,其中「一条任务长什么样」必须**只写一次**——写成六份,
5
5
  // 字段迟早分叉,端侧就会看到「同一个东西,两个名字」。
6
6
  //
7
+ // id ↔ CLI 对照(id / cli / http 三层同词表,都以 CLI 动词为基准):
8
+ // `localtask.get` = 领取(CLI `localtask get`);`localtask.show` = 查单条
9
+ // (CLI `localtask show`)。CRUD 词表的「查(单条)」位(X.get)对本资源由
10
+ // registry.test.mjs 的 crudIdOf 覆盖映射到 localtask.show。
11
+ //
7
12
  // 一条纪律:**这里是视图,不是 service 的返回结构**。
8
13
  // · `localtask.list` 刻意不声明 `tasks`(每个主题挂着全部任务,某主题实测 194 条);
9
14
  // · `claim` / `done` / `reopen` 刻意不声明 `task` 整体,只给 `taskId`——
10
- // 端侧要看详情就调 `localtask.get`,别让「领一条」变成「解码一份长正文」;
15
+ // 端侧要看详情就调 `localtask.show`,别让「领一条」变成「解码一份长正文」;
11
16
  // · 声明少了不影响服务端返回(契约不裁剪运行时响应,见设计 §4.3),
12
17
  // CLI 与 HTTP 的完整返回一个字都不变。
13
18
  import { z } from 'zod';
@@ -68,7 +73,7 @@ export const taskView = z.object({
68
73
  * 端侧据此决定「进详情」「停在队列」「解释为什么领不了」,不必解析错误文本。
69
74
  *
70
75
  * 只回**编号**不回整条任务:领到手的那一刻端侧要跳详情,但详情页的正文、
71
- * 附件、轮次是 `localtask.get` 的活 —— 让「领一条」顺手多解码一份长正文,
76
+ * 附件、轮次是 `localtask.show` 的活 —— 让「领一条」顺手多解码一份长正文,
72
77
  * 是端侧最容易被拖慢的地方(历史某主题一条正文 200KB)。
73
78
  */
74
79
  export const claimView = z.object({
@@ -80,7 +85,7 @@ export const claimView = z.object({
80
85
  instant: z.boolean().optional().describe('是否为「没活就立刻回」的即时模式'),
81
86
  });
82
87
 
83
- /** 「新建一条」的结果视图(只回编号:详情交给 `localtask.get`)。 */
88
+ /** 「新建一条」的结果视图(只回编号:详情交给 `localtask.show`)。 */
84
89
  export const addView = z.object({
85
90
  status: z.string(),
86
91
  id: z.int().describe('新任务编号'),
@@ -16,7 +16,7 @@
16
16
  //
17
17
  // 与 wait 的关系:wait 等待期间主题是 waiting 的 → 第 2 条否决,面板不会释放;
18
18
  // wait 结束后若用户把页面关了,才会在宽限期后释放;下一次 wait 再拉起新实例。
19
- import { countWaitingTopics, panelPresence } from './service.js';
19
+ import { countWaitingTopics, panelPresence } from '../service.js';
20
20
 
21
21
  export const PANEL_IDLE_DEFAULTS = {
22
22
  // 见过面板之后:连续多久没有任何面板请求(且无活标签)就认为「页关掉了」。
@@ -4,10 +4,10 @@
4
4
  import http from 'node:http';
5
5
  import { readFileSync } from 'node:fs';
6
6
  import { join } from 'node:path';
7
- import { APP_DIR, DEFAULT_PORT } from '../../core/paths.js';
8
- import { atomicWriteTextSync } from '../../core/atomic-file.js';
9
- import { openLocaltaskStore as openStore, topics as topicsRepo } from './repo/index.js';
10
- import { isLiveWaiting } from './task-view.js';
7
+ import { APP_DIR, DEFAULT_PORT } from '../../../core/paths.js';
8
+ import { atomicWriteTextSync } from '../../../core/atomic-file.js';
9
+ import { openLocaltaskStore as openStore, topics as topicsRepo } from '../infra/repo/index.js';
10
+ import { isLiveWaiting } from '../lifecycle/task-view.js';
11
11
  // ─── 面板空闲自释放所需的观测接口(panel-guard.js 调用)────────────
12
12
 
13
13
  // 当前有多少主题「真的在等待」——常驻面板的空闲自释放据此否决退出:
@@ -193,7 +193,7 @@ async function fetchPanelPresence(timeoutMs: number = 900, port: number = DEFAUL
193
193
  *
194
194
  * SSE 活标签(用户停在「本地任务」页)**或** 面板最近有请求(用户停在任意页,
195
195
  * App 壳每 15s 打 /api/ping 兜底)都算「面板开着」→ 1;都没有 → 0。
196
- * 旧口径只数 SSE:用户一切到别的页(SSE 单视图挂载,切页即断)wait 就误判
196
+ * 旧口径只数 SSE:用户一切到别的页(SSE 单视图挂载,切页即断)等待就误判
197
197
  * 「没开」,于是重复开标签——这正是本次修复的根因。
198
198
  *
199
199
  * 任何探测失败都按 0 处理(保守地开一次页),绝不因探测失败而阻塞 wait。
@@ -321,7 +321,7 @@ export function readPanelRegistry(): PanelRegistryEntry[] {
321
321
  return readAllPanels();
322
322
  }
323
323
 
324
- // 复查节奏与重开上限(REVIEW_MS 已随 wait 编排迁往 claim/wait.ts)。
324
+ // 复查节奏与重开上限(REVIEW_MS 已随阻塞编排迁往 claim/wait.ts)。
325
325
  const REOPEN_COOLDOWN_MS = 20_000;
326
326
  // 一次 wait 最多开 3 个窗口:够救「手滑关掉」,又不至于在浏览器拦截脚本时刷屏。
327
327
  const MAX_WINDOW_OPENS = 3;
@@ -8,7 +8,7 @@
8
8
  // ─── 进程内 waiter:key -> { resolve(task), summary, by } ───────────────
9
9
  //
10
10
  // 注册表**留在 localtask**(addTask 的唤醒路径要认领它),但注册/取走以 API 导出——
11
- // wait/get 的阻塞编排住在 claim/wait.ts,通过这组 API 挂钩,不碰队列内部。
11
+ // get 的阻塞编排住在 claim/wait.ts,通过这组 API 挂钩,不碰队列内部。
12
12
 
13
13
  /** 主题级 waiter 条目(resolve 回调收 JSON 形态任务)。 */
14
14
  export interface TopicWaiterEntry {
@@ -20,7 +20,7 @@ export interface TopicWaiterEntry {
20
20
 
21
21
  const waiters = new Map<string, TopicWaiterEntry>();
22
22
 
23
- /** wait/get 编排侧:登记「本目录有阻塞中的 waiter」(同 key 旧登记被覆盖)。 */
23
+ /** get 编排侧:登记「本目录有阻塞中的 waiter」(同 key 旧登记被覆盖)。 */
24
24
  export function registerTopicWaiter(key: string, entry: TopicWaiterEntry): void {
25
25
  waiters.set(key, entry);
26
26
  }
@@ -6,7 +6,7 @@
6
6
  // finally 不会执行,waiting:true 会永久残留;独立成表后残留只污染这张小表,
7
7
  // 整表清空即可,不会让队列本身看起来像有人在等。
8
8
  import { isGlobalKey, GLOBAL_NAME, resolveTopicKey } from './paths.js';
9
- import { openLocaltaskStore as openStore, presence as presenceRepo, topics as topicsRepo, txw as tx } from './repo/index.js';
9
+ import { openLocaltaskStore as openStore, presence as presenceRepo, topics as topicsRepo, txw as tx } from './infra/repo/index.js';
10
10
 
11
11
  // 在库里把某主题置为等待/结束,并刷新现状。
12
12
  // waitingSince 是「等待起点」,面板据此显示「已等多久」——waitingUntil(截止时刻)
@@ -2,9 +2,9 @@
2
2
  //
3
3
  // 单独成文件的原因:actions/ 下的 action 经 _manifest.generated.ts 被 index.ts
4
4
  // 装配,若 action 反向 import index.js 就形成 TDZ 回环——工厂是 actions 与
5
- // delivery 共同的依赖终点,不含任何装配代码。
5
+ // claim 共同的依赖终点,不含任何装配代码。
6
6
  //
7
- // 依赖方向(设计内):delivery 是唯一消费方——领域取数(readGroupContext /
7
+ // 依赖方向(设计内):claim 是唯一消费方——领域取数(readGroupContext /
8
8
  // attachTemplateCtx / pendingQueueInfo / getloop 指令渲染)由宿主完成,以 `Supply`
9
9
  // 形式交给插件;插件在自己的 buildData() 里 await supplied() 后只做变换。
10
10
  // promptplug 不 import 其他模块。
@@ -1,15 +1,15 @@
1
1
  // promptplug 装配:模块元信息 + action 清单装配。
2
2
  //
3
3
  // 插件工厂 / 注册表 / 字段目录在 factory.ts + registry.ts(actions 经 manifest 引
4
- // 工厂,不能回环引本文件)。依赖方向(设计内):delivery 是唯一消费方——宿主完成
4
+ // 工厂,不能回环引本文件)。依赖方向(设计内):claim 是唯一消费方——宿主完成
5
5
  // 领域取数,以 Supply 形式注入插件;插件在自己的 buildData() 里变换。
6
- // promptplug 不 import 其他模块(delivery.ts 的交付组装同样只收宿主取好的数据)。
6
+ // promptplug 不 import 其他模块(claim/host.ts 的交付组装同样只收宿主取好的数据)。
7
7
  import { ModuleBase } from '../../runtime/types/module.js';
8
8
  import { zodActionsOf, type ZodBoundAction } from '../../runtime/action-decorator.js';
9
9
  import { container, type Container } from '../../runtime/container.js';
10
10
  import { ACTIONS } from './actions/_manifest.generated.js';
11
11
 
12
- // 装配无关的公开面(delivery / settings.ts 从这里拿)
12
+ // 装配无关的公开面(claim / settings.ts 从这里拿)
13
13
  export {
14
14
  activeTemplateOf,
15
15
  blockLabelOf,
@@ -37,8 +37,8 @@ export { compose } from './compose.js';
37
37
 
38
38
  /**
39
39
  * 提示词插件模块:注册表外露(prompt.registry)。
40
- * 业务面(compose / buildPlugins)由 delivery 域直接消费——这是设计内依赖
41
- * (delivery → promptplug)。本模块不 import 任何其他模块(组装核已迁到 delivery/assemble.ts)。
40
+ * 业务面(compose / buildPlugins)由 claim 域直接消费——这是设计内依赖
41
+ * (claim → promptplug)。本模块不 import 任何其他模块(组装核已迁到 claim/assemble.ts)。
42
42
  */
43
43
  export class PromptplugModule extends ModuleBase {
44
44
  override readonly id = 'promptplug';
@@ -1,6 +1,6 @@
1
1
  // attachment 插件(order 20):附件识别。
2
2
  //
3
- // 数据变换(attachTemplateCtx)留在 delivery/attach-template.ts —— 它依赖
3
+ // 数据变换(attachTemplateCtx)留在 localtask/attach-template.ts —— 它依赖
4
4
  // attach-resource 的标注工具链(kind 归一 / 可读性探测 / 取用命令),随插件搬会
5
5
  // 牵动三处引用。插件消费宿主标注后的 attach 对象,**schema 逐字对齐它的真实形状**。
6
6
  //
@@ -1,5 +1,5 @@
1
1
  // context 插件(order 10):组 / 项目上下文。
2
- // data() 搬自 delivery/assemble.ts 的 deliveryCtxOf(原文件随 S1 删除),
2
+ // data() 搬自 claim/assemble.ts 的 deliveryCtxOf(原文件随 S1 删除),
3
3
  // 口径注释一并迁入——#81 空壳组过滤、#104 已登记无介绍可见、参考仓库去重并集。
4
4
  import { z } from 'zod';
5
5
  import { PromptPlugin, supplied, type Supply, type TemplateText } from '../base.js';
@@ -22,9 +22,7 @@ const refRepoShape = z.looseObject({
22
22
 
23
23
  const peerShape = z.looseObject({
24
24
  name: z.string().describe('成员仓库名'),
25
- note: z.string().describe('组内描述:它在组里的角色与配合关系'),
26
25
  path: z.string().describe('本地绝对路径'),
27
- hasNote: z.boolean().describe('是否写了组内描述'),
28
26
  });
29
27
 
30
28
  const repoShape = z.looseObject({
@@ -48,9 +46,7 @@ const groupShape = z.looseObject({
48
46
  introPath: z.string().describe('组介绍文档路径(本地 md;没有为空串)'),
49
47
  introRefId: z.string().describe('组介绍文档 id(docs get --ref 用)'),
50
48
  introDesc: z.string().describe('组介绍的一句话描述'),
51
- note: z.string().describe('组内描述:本项目在组里的位置(角色 / 协作关系)'),
52
- position: z.string().describe('= note(旧字段名,新模板用 note)'),
53
- peers: z.array(peerShape).describe('组内成员(name / note / path)'),
49
+ peers: z.array(peerShape).describe('组内成员(name / path)'),
54
50
  peerCount: z.number().describe('组内成员数'),
55
51
  docs: z.array(docItemShape).describe('组文档清单'),
56
52
  docCount: z.number().describe('组文档数'),
@@ -85,13 +81,11 @@ function docItems(links: any) {
85
81
  }));
86
82
  }
87
83
 
88
- /** 组内成员 → 结构化数组({{name}} / {{note}} / {{path}}——#163:路径方便直接访问)。 */
84
+ /** 组内成员 → 结构化数组({{name}} / {{path}}——#163:路径方便直接访问)。 */
89
85
  function peerItems(peers: any) {
90
86
  return (peers || []).map((p: any) => ({
91
87
  name: p.name || '',
92
- note: p.note || '',
93
88
  path: p.path || '',
94
- hasNote: !!p.note,
95
89
  }));
96
90
  }
97
91
 
@@ -105,16 +99,16 @@ function refRepoItems(list: any) {
105
99
  }
106
100
 
107
101
  /**
108
- * 组有没有值得交付的内容:定位 / 介绍 / 位置 / 参考文件 / 有描述的成员,任一即可。
109
- * 纯「成员名单(全员无描述)」不算——那只会喷出一排空标签(#81)。
102
+ * 组有没有值得交付的内容:定位 / 介绍 / 组文档 / 参考仓库,任一即可。
103
+ * 纯「成员名单」不算——那只会喷出一排空标签(#81)。
104
+ * (组内描述 note 已随模板上下文清理移除,不再参与判定。)
110
105
  */
111
106
  function groupHasContent(g: any): boolean {
112
107
  if (!g) return false;
113
- if (g.desc || g.note) return true;
108
+ if (g.desc) return true;
114
109
  if (g.intro && g.intro.body) return true;
115
110
  if (g.docLinks && g.docLinks.length) return true;
116
- if (g.refRepos && g.refRepos.length) return true;
117
- return (g.peers || []).some((p: any) => p.note);
111
+ return !!(g.refRepos && g.refRepos.length);
118
112
  }
119
113
 
120
114
  export function deliveryCtxOf(groupCtx: any) {
@@ -168,8 +162,6 @@ export function deliveryCtxOf(groupCtx: any) {
168
162
  introPath: (g.intro && g.intro.path) || '',
169
163
  introRefId: (g.intro && g.intro.refId) || '',
170
164
  introDesc: (g.intro && (g.intro.desc || g.intro.title)) || '',
171
- note: g.note || '',
172
- position: g.note || '',
173
165
  peers,
174
166
  peerCount: peers.length,
175
167
  docs: gdocs,
@@ -212,9 +204,6 @@ const BUILTIN: TemplateText = {
212
204
  {{#if group.desc}}
213
205
  组定位:{{group.desc}}
214
206
  {{/if}}
215
- {{#if group.note}}
216
- 本项目在组里的位置:{{group.note}}
217
- {{/if}}
218
207
  {{#if group.introRefId}}
219
208
  组介绍:{{#if group.introDesc}}{{group.introDesc}}{{else}}(无描述){{/if}}
220
209
  取用:nx-kv docs get --ref {{group.introRefId}}
@@ -222,7 +211,7 @@ const BUILTIN: TemplateText = {
222
211
  {{#if group.peers}}
223
212
  组内成员:
224
213
  {{#each group.peers}}
225
- - {{name}}:{{#if note}}{{note}}{{else}}(无组内描述){{/if}}{{#if path}}({{path}}){{/if}}
214
+ - {{name}}{{#if path}}({{path}}){{/if}}
226
215
  {{/each}}
227
216
  {{/if}}
228
217
  {{#if group.docs}}
@@ -22,7 +22,7 @@ import { formatDuration, renderInstruction } from '../../../core/instruction-tem
22
22
  export const TASK_GOAL_PROMPT_TEMPLATE = [
23
23
  '本任务带时间目标(领取即计时,持续 {{goal.durationHuman}})。',
24
24
  '- 每轮推进先执行:nx-kv timegoal check --task {{goal.goalKey}} --summary "<本轮现状>"',
25
- '- 时间未到不得标记完成——应派出 sub agent 重新提出新的需求,再继续推进。',
25
+ '- 时间未到不得标记完成——应派出 sub agent 重新提出新的需求,再继续推进。不允许 进行sleep空转, 不允许放弃问题',
26
26
  '- check 返回 reached:true 后才允许:nx-kv localtask done --id {{task.id}} --summary "<完成总结>"',
27
27
  '{{#if goal.extra}}',
28
28
  '附加要求(发布方):',