nx-kv 0.65.4 → 0.66.1

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 (242) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/assets/nx-kv/SKILL.md +7 -2
  3. package/assets/nx-kv/references/A02-/346/217/220/344/272/244/344/273/273/345/212/241.md +59 -4
  4. 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
  5. 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
  6. package/package.json +2 -2
  7. package/src/core/config.ts +49 -0
  8. package/src/core/db/driver.ts +1 -1
  9. package/src/core/db/migrations/index.ts +2 -0
  10. package/src/core/db/migrations/v14.sql +37 -0
  11. package/src/core/db/version.ts +1 -1
  12. package/src/core/workflow/types.ts +1 -1
  13. package/src/modules/bundled/actions/_manifest.generated.ts +12 -12
  14. package/src/modules/bundled/actions/{bundled-get.ts → skill-get.ts} +4 -4
  15. package/src/modules/bundled/actions/{bundled-groups.ts → skill-groups.ts} +4 -4
  16. package/src/modules/bundled/actions/{bundled-install.ts → skill-install.ts} +4 -4
  17. package/src/modules/bundled/actions/{bundled-list.ts → skill-list.ts} +4 -4
  18. package/src/modules/claim/actions/_manifest.generated.ts +3 -3
  19. package/src/modules/claim/actions/{localtask-claim.ts → localtask-get.ts} +15 -6
  20. package/src/modules/claim/index.ts +1 -1
  21. package/src/modules/claim/panel-escort.ts +1 -1
  22. package/src/modules/claim/wait.ts +5 -5
  23. package/src/modules/docs/actions/_manifest.generated.ts +37 -37
  24. package/src/modules/docs/actions/{doc-attach.ts → docs-attach.ts} +4 -4
  25. package/src/modules/docs/actions/{doc-attachments.ts → docs-attachments.ts} +4 -4
  26. package/src/modules/docs/actions/{doc-detach.ts → docs-detach.ts} +4 -4
  27. package/src/modules/docs/actions/{doc-get.ts → docs-get.ts} +4 -4
  28. package/src/modules/docs/actions/{doc-link-file.ts → docs-link-file.ts} +3 -3
  29. package/src/modules/docs/actions/{doc-list.ts → docs-list.ts} +4 -4
  30. package/src/modules/docs/actions/{doc-mdfile.ts → docs-mdfile.ts} +3 -3
  31. package/src/modules/docs/actions/{doc-mdfiles.ts → docs-mdfiles.ts} +3 -3
  32. package/src/modules/docs/actions/{docs-notebind.ts → docs-note-bind.ts} +3 -3
  33. package/src/modules/docs/actions/{doc-ref.ts → docs-ref.ts} +4 -4
  34. package/src/modules/docs/actions/{doc-remove.ts → docs-remove.ts} +4 -4
  35. package/src/modules/docs/actions/{doc-update.ts → docs-set.ts} +4 -4
  36. package/src/modules/docs/actions/{doc-unbind.ts → docs-unbind.ts} +4 -4
  37. package/src/modules/docs/host-scrub.ts +1 -1
  38. package/src/modules/docs/index.ts +1 -1
  39. package/src/modules/localtask/actions/_manifest.generated.ts +14 -14
  40. package/src/modules/localtask/actions/{localtask-cancelMany.ts → localtask-cancel-many.ts} +3 -3
  41. package/src/modules/localtask/actions/{localtask-closeMany.ts → localtask-close-many.ts} +3 -3
  42. package/src/modules/localtask/actions/{localtask-removeMany.ts → localtask-remove-many.ts} +3 -3
  43. package/src/modules/localtask/actions/{localtask-get.ts → localtask-show.ts} +14 -5
  44. package/src/modules/localtask/actions/localtask-tasks.ts +19 -4
  45. package/src/modules/localtask/actions/{localtask-timegoalLog.ts → localtask-timegoal-log.ts} +3 -3
  46. package/src/modules/localtask/actions/{localtask-topic-removeMany.ts → localtask-topic-remove-many.ts} +3 -3
  47. package/src/modules/localtask/infra/repo/links.ts +1 -1
  48. package/src/modules/localtask/infra/repo/settings.ts +4 -1
  49. package/src/modules/localtask/lifecycle/task-lifecycle.ts +11 -7
  50. package/src/modules/localtask/lifecycle/task-ops.ts +5 -4
  51. package/src/modules/localtask/lifecycle/task-remove.ts +1 -1
  52. package/src/modules/localtask/lifecycle/task-view.ts +25 -0
  53. package/src/modules/localtask/ui/action-render.ts +16 -2
  54. package/src/modules/localtask/ui/contract-views.ts +9 -4
  55. package/src/modules/promptplug/plugins/goal-prompt.ts +1 -1
  56. package/src/modules/promptplug/template-store.ts +163 -58
  57. package/src/modules/setting/actions/setting-set.ts +1 -0
  58. package/src/modules/setting/service.ts +15 -1
  59. package/src/modules/templates/actions/_manifest.generated.ts +18 -18
  60. package/src/modules/templates/actions/{templates-add.ts → template-add.ts} +4 -4
  61. package/src/modules/templates/actions/{templates-default.ts → template-default.ts} +4 -4
  62. package/src/modules/templates/actions/{templates-list.ts → template-list.ts} +4 -4
  63. package/src/modules/templates/actions/{templates-remove.ts → template-remove.ts} +4 -4
  64. package/src/modules/templates/actions/{templates-reorder.ts → template-reorder.ts} +4 -4
  65. package/src/modules/templates/actions/{templates-update.ts → template-update.ts} +4 -4
  66. package/src/web/frontend/App.tsx +10 -9
  67. package/src/web/frontend/api/cli-tree.json +216 -216
  68. package/src/web/frontend/api/client.generated.ts +242 -240
  69. package/src/web/frontend/components/doc/doc-head.tsx +1 -1
  70. package/src/web/frontend/components/layout/crumbs.ts +3 -9
  71. package/src/web/frontend/components/md/{attach-area.tsx → attachments/attach-area.tsx} +5 -5
  72. package/src/web/frontend/components/md/{attach-bar.tsx → attachments/attach-bar.tsx} +1 -1
  73. package/src/web/frontend/components/md/{attach-common.ts → attachments/attach-common.ts} +1 -1
  74. package/src/web/frontend/components/md/{attach-modal.tsx → attachments/attach-modal.tsx} +4 -4
  75. package/src/web/frontend/components/md/{attach-picker.tsx → attachments/attach-picker.tsx} +4 -4
  76. package/src/web/frontend/components/md/{attachments.ts → attachments/attachments.ts} +1 -1
  77. package/src/web/frontend/components/md/{composer-launch.ts → composer/composer-launch.ts} +3 -3
  78. package/src/web/frontend/components/md/{composer-panel.tsx → composer/composer-panel.tsx} +12 -12
  79. package/src/web/frontend/components/md/{use-live-preview.ts → hooks/use-live-preview.ts} +8 -8
  80. package/src/web/frontend/components/md/{use-slash-menu.ts → hooks/use-slash-menu.ts} +4 -4
  81. package/src/web/frontend/components/md/{use-source-editor.ts → hooks/use-source-editor.ts} +7 -7
  82. package/src/web/frontend/components/md/{sel-menu.tsx → menus/sel-menu.tsx} +1 -1
  83. package/src/web/frontend/components/md/model/autolink-angle/index.ts +20 -0
  84. package/src/web/frontend/components/md/model/code/index.ts +30 -0
  85. package/src/web/frontend/components/md/model/divider/index.ts +19 -0
  86. package/src/web/frontend/components/md/model/emphasis/index.ts +21 -0
  87. package/src/web/frontend/components/md/model/escape/index.ts +35 -0
  88. package/src/web/frontend/components/md/model/footnote/index.ts +77 -0
  89. package/src/web/frontend/components/md/model/heading/index.ts +19 -0
  90. package/src/web/frontend/components/md/model/highlight/index.ts +10 -0
  91. package/src/web/frontend/components/md/model/image/index.ts +31 -0
  92. package/src/web/frontend/components/md/model/inline-scan.ts +47 -0
  93. package/src/web/frontend/components/md/model/link-ref/index.ts +41 -0
  94. package/src/web/frontend/components/md/model/list-common.ts +97 -0
  95. package/src/web/frontend/components/md/model/math/index.ts +70 -0
  96. package/src/web/frontend/components/md/model/math/latex.ts +106 -0
  97. package/src/web/frontend/components/md/model/ordered-list/index.ts +27 -0
  98. package/src/web/frontend/components/md/model/paragraph/index.ts +19 -0
  99. package/src/web/frontend/components/md/model/quote/index.ts +63 -0
  100. package/src/web/frontend/components/md/model/registry.ts +74 -0
  101. package/src/web/frontend/components/md/model/table/index.ts +100 -0
  102. package/src/web/frontend/components/md/model/types.ts +92 -0
  103. package/src/web/frontend/components/md/model/unordered-list/index.ts +37 -0
  104. package/src/web/frontend/components/md/{live-block.tsx → panes/live-block.tsx} +3 -3
  105. package/src/web/frontend/components/md/{md-panes-helpers.ts → panes/md-panes-helpers.ts} +15 -4
  106. package/src/web/frontend/components/md/{md-panes-keys.ts → panes/md-panes-keys.ts} +3 -3
  107. package/src/web/frontend/components/md/{md-panes-root.tsx → panes/md-panes-root.tsx} +2 -2
  108. package/src/web/frontend/components/md/{md-panes.tsx → panes/md-panes.tsx} +12 -12
  109. package/src/web/frontend/components/md/{ack-rail.tsx → rails/ack-rail.tsx} +2 -2
  110. package/src/web/frontend/components/md/{block-rail.tsx → rails/block-rail.tsx} +2 -2
  111. package/src/web/frontend/components/md/{doc-outline-rail.tsx → rails/doc-outline-rail.tsx} +1 -1
  112. package/src/web/frontend/components/md/{shortcut-sheet.tsx → shell/shortcut-sheet.tsx} +1 -1
  113. package/src/web/frontend/components/md/{tool-bar.tsx → shell/tool-bar.tsx} +5 -7
  114. package/src/web/frontend/components/md/standalone/task-chain-graph.tsx +194 -0
  115. package/src/web/frontend/components/md/{task-chain.tsx → standalone/task-chain.tsx} +34 -11
  116. package/src/web/frontend/components/md/{template-editor.tsx → standalone/template-editor.tsx} +2 -2
  117. package/src/web/frontend/components/repos/get-loop-members.tsx +54 -0
  118. package/src/web/frontend/components/repos/get-loop-modal.tsx +6 -4
  119. package/src/web/frontend/components/sidebar/brand-row.tsx +45 -0
  120. package/src/web/frontend/components/sidebar/drag.ts +53 -1
  121. package/src/web/frontend/components/sidebar/index.tsx +113 -63
  122. package/src/web/frontend/components/sidebar/model.ts +102 -7
  123. package/src/web/frontend/components/sidebar/ns-add-modal.tsx +81 -0
  124. package/src/web/frontend/components/sidebar/ns-dialogs.tsx +67 -0
  125. package/src/web/frontend/components/sidebar/ns-manage-modal.tsx +56 -0
  126. package/src/web/frontend/components/sidebar/ns-modal.tsx +58 -0
  127. package/src/web/frontend/components/sidebar/ns-observe-modal.tsx +36 -0
  128. package/src/web/frontend/components/sidebar/ns-picker.tsx +134 -0
  129. package/src/web/frontend/components/sidebar/ns-row.tsx +70 -0
  130. package/src/web/frontend/components/sidebar/row-menu.tsx +39 -5
  131. package/src/web/frontend/components/sidebar/search-row.tsx +37 -0
  132. package/src/web/frontend/components/sidebar/use-ns.ts +178 -0
  133. package/src/web/frontend/components/sidebar/use-sidebar-ns.ts +64 -0
  134. package/src/web/frontend/components/task-panel/task-row.tsx +26 -0
  135. package/src/web/frontend/components/tool-acts/bar.tsx +7 -7
  136. package/src/web/frontend/components/tool-acts/modules.ts +7 -4
  137. package/src/web/frontend/components/use-rail-drag.ts +1 -1
  138. package/src/web/frontend/modules/board/ack-nodes.ts +1 -1
  139. package/src/web/frontend/modules/board/ack-rail-pos.ts +1 -1
  140. package/src/web/frontend/modules/board/task-search.ts +43 -0
  141. package/src/web/frontend/modules/md/attach-mention.ts +2 -2
  142. package/src/web/frontend/modules/md/doc-store.ts +2 -2
  143. package/src/web/frontend/modules/md/md-blocks.ts +18 -1
  144. package/src/web/frontend/modules/md/md-edit-ops.ts +18 -3
  145. package/src/web/frontend/modules/md/md-render.ts +108 -179
  146. package/src/web/frontend/modules/md/styles/docs.css +89 -0
  147. package/src/web/frontend/modules/md/styles/editor.css +25 -7
  148. package/src/web/frontend/modules/md/styles/panels.css +107 -2
  149. package/src/web/frontend/page/dir/landing.tsx +35 -0
  150. package/src/web/frontend/page/dir/task-actions.ts +2 -2
  151. package/src/web/frontend/page/dir/task-chain.ts +5 -2
  152. package/src/web/frontend/page/dir/task-dock-panel.tsx +19 -28
  153. package/src/web/frontend/page/dir/task-feedback.ts +4 -4
  154. package/src/web/frontend/page/dir/task-utils.ts +19 -3
  155. package/src/web/frontend/page/dir/task.tsx +16 -13
  156. package/src/web/frontend/page/doc/doc-dock.tsx +1 -1
  157. package/src/web/frontend/page/doc/index.tsx +4 -4
  158. package/src/web/frontend/page/group/index.tsx +47 -2
  159. package/src/web/frontend/page/progress/api.ts +5 -0
  160. package/src/web/frontend/page/progress/chain-view.tsx +108 -0
  161. package/src/web/frontend/page/progress/index.tsx +210 -152
  162. package/src/web/frontend/page/repos/index.tsx +0 -11
  163. package/src/web/frontend/page/repos/repo-table.tsx +1 -20
  164. package/src/web/frontend/page/settings/api.ts +0 -4
  165. package/src/web/frontend/page/settings/index.tsx +1 -12
  166. package/src/web/frontend/page/settings/prompt-template-editor.tsx +1 -1
  167. package/src/web/frontend/page/settings/prompt-templates-section.tsx +1 -1
  168. package/src/web/frontend/page/templates/index.tsx +3 -3
  169. package/src/web/frontend/page/templates/manage.tsx +1 -1
  170. package/src/web/frontend/panels.tsx +2 -8
  171. package/src/web/frontend/prefs.ts +4 -3
  172. package/src/web/frontend/registry.ts +0 -1
  173. package/src/web/frontend/routes/index.ts +1 -2
  174. package/src/web/frontend/routes/static.ts +0 -1
  175. package/src/web/frontend/styles-v2/dag.css +17 -2
  176. package/src/web/frontend/styles-v2/dir.css +0 -36
  177. package/src/web/frontend/styles-v2/sidebar.css +87 -1
  178. package/src/web/frontend/types.ts +22 -1
  179. package/src/web/frontend/use-ns-persist.ts +63 -0
  180. package/src/web/frontend/workspace/areas.ts +1 -3
  181. package/src/web/frontend/workspace/panels.ts +1 -1
  182. package/src/web/public/assets/bar-Dy_QDX2h.js +1 -0
  183. package/src/web/public/assets/board-view-Cm8189wG.js +1 -0
  184. package/src/web/public/assets/composer-launch-B7DH53Yf.js +1 -0
  185. package/src/web/public/assets/composer-panel-Cj1J16r-.js +1 -0
  186. package/src/web/public/assets/dag-DXRPHVl8.js +1 -0
  187. package/src/web/public/assets/dir-_M1ciSxM.js +3 -0
  188. package/src/web/public/assets/doc-_iteSM2X.js +6 -0
  189. package/src/web/public/assets/get-loop-modal-DlAfqJMz.js +2 -0
  190. package/src/web/public/assets/group-CH8qe-eg.js +1 -0
  191. package/src/web/public/assets/index-Cui4IuGj.js +3 -0
  192. package/src/web/public/assets/index-DiTnp6Kh.css +1 -0
  193. package/src/web/public/assets/md-history-Bj790fdn.js +46 -0
  194. package/src/web/public/assets/progress-MPse2JLQ.js +3 -0
  195. package/src/web/public/assets/refs-DiIPoqnJ.js +2 -0
  196. package/src/web/public/assets/{repo-form-modal-DChK4NSX.js → repo-form-modal-CNLYR12c.js} +1 -1
  197. package/src/web/public/assets/repos-BGx-yAXd.js +12 -0
  198. package/src/web/public/assets/route-crumb-DX9C4jmQ.js +1 -0
  199. package/src/web/public/assets/settings-Pt4YgGdY.js +1 -0
  200. package/src/web/public/assets/task-DOIIpQ4X.js +13 -0
  201. package/src/web/public/assets/task-status-Cjsm0xF7.js +7 -0
  202. package/src/web/public/assets/{task-utils-cBR6Gj_c.js → task-utils-CJfMODCP.js} +1 -1
  203. package/src/web/public/assets/templates-Co1Qb1aA.js +10 -0
  204. package/src/web/public/assets/tool-bar-D5wLBLRl.js +28 -0
  205. package/src/web/public/assets/use-rail-drag-CNOHXWng.js +1 -0
  206. package/src/web/public/index.html +11 -13
  207. package/src/web/frontend/modules/md/progress-chain.ts +0 -34
  208. package/src/web/frontend/page/overview/api.ts +0 -29
  209. package/src/web/frontend/page/overview/index.tsx +0 -378
  210. package/src/web/frontend/page/settings/sidebar-section.tsx +0 -75
  211. package/src/web/public/assets/bar-kaVB6FAa.js +0 -1
  212. package/src/web/public/assets/board-view-Cwot54HC.js +0 -1
  213. package/src/web/public/assets/composer-launch-BMTU-BD9.js +0 -1
  214. package/src/web/public/assets/composer-panel-BF6gjNXv.js +0 -1
  215. package/src/web/public/assets/dag-BRE33yI8.js +0 -1
  216. package/src/web/public/assets/dir-B0IW4NIn.js +0 -3
  217. package/src/web/public/assets/doc-DsRb-4WT.js +0 -6
  218. package/src/web/public/assets/frontmatter-Bcseml1q.js +0 -2
  219. package/src/web/public/assets/group-CS8VP6z0.js +0 -1
  220. package/src/web/public/assets/index-BT2y9cTX.js +0 -2
  221. package/src/web/public/assets/index-DSAamoav.css +0 -1
  222. package/src/web/public/assets/md-history-CJ1N9-Jf.js +0 -39
  223. package/src/web/public/assets/md-parse-DAYCREP1.js +0 -2
  224. package/src/web/public/assets/model-TD5kGXzR.js +0 -2
  225. package/src/web/public/assets/overview-Bsq58sDd.js +0 -1
  226. package/src/web/public/assets/progress-B4DfpsyS.js +0 -3
  227. package/src/web/public/assets/refs-DIiA_49Z.js +0 -2
  228. package/src/web/public/assets/repos-PGFYkUgf.js +0 -12
  229. package/src/web/public/assets/route-crumb-SiMi2C_T.js +0 -1
  230. package/src/web/public/assets/settings-BzIllshQ.js +0 -1
  231. package/src/web/public/assets/status-tag-C9YVBvQh.js +0 -1
  232. package/src/web/public/assets/task-BL5uxmJh.js +0 -11
  233. package/src/web/public/assets/task-row-cE7qblNK.js +0 -1
  234. package/src/web/public/assets/templates-Cfn3Xmsf.js +0 -10
  235. package/src/web/public/assets/use-rail-drag-Boxl7pOG.js +0 -1
  236. package/src/web/public/assets/workspace-DojQ3RP4.js +0 -28
  237. /package/src/web/frontend/components/md/{use-block-drag.ts → hooks/use-block-drag.ts} +0 -0
  238. /package/src/web/frontend/components/md/{slash-menu.tsx → menus/slash-menu.tsx} +0 -0
  239. /package/src/web/frontend/components/md/{doc-keys.ts → panes/doc-keys.ts} +0 -0
  240. /package/src/web/frontend/components/md/{find-bar.tsx → shell/find-bar.tsx} +0 -0
  241. /package/src/web/frontend/components/md/{status-bar.tsx → shell/status-bar.tsx} +0 -0
  242. /package/src/web/public/assets/{md-history-CLIs9Dr0.css → tool-bar-CLIs9Dr0.css} +0 -0
@@ -1,4 +1,4 @@
1
- // bundled.groups —— 由 .tool/migrate-module.mjs 从 legacy 形态迁来(模板形态:一条 action 一个文件)。
1
+ // skill.groups —— 由 .tool/migrate-module.mjs 从 legacy 形态迁来(模板形态:一条 action 一个文件)。
2
2
  //
3
3
  // 契约(zod schema)就声明在本文件里——入参类型由基类泛型模板封装;本文件只做「声明 + 实现」,业务在服务层。
4
4
  import { action } from '../../../runtime/action-decorator.js';
@@ -7,14 +7,14 @@ import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
7
7
  import * as serviceNs from '../service.js';
8
8
  const service: any = serviceNs;
9
9
 
10
- /** bundled.groups 的入参契约(CLI 与 HTTP 共用同一份)。 */
10
+ /** skill.groups 的入参契约(CLI 与 HTTP 共用同一份)。 */
11
11
  const input = z.object({
12
12
 
13
13
  });
14
14
 
15
- export class BundledGroupsAction extends ActionBase<typeof input> {
15
+ export class SkillGroupsAction extends ActionBase<typeof input> {
16
16
  @action({
17
- id: 'bundled.groups',
17
+ id: 'skill.groups',
18
18
  cli: [['skill', 'groups'], ['bundled', 'groups']],
19
19
  http: ['GET', '/api/bundled/groups'],
20
20
  summary: '列出可装的 group(groups.json 的组名 → 它包含哪些 skill)',
@@ -1,4 +1,4 @@
1
- // bundled.install —— 由 .tool/migrate-module.mjs 从 legacy 形态迁来(模板形态:一条 action 一个文件)。
1
+ // skill.install —— 由 .tool/migrate-module.mjs 从 legacy 形态迁来(模板形态:一条 action 一个文件)。
2
2
  //
3
3
  // 契约(zod schema)就声明在本文件里——入参类型由基类泛型模板封装;本文件只做「声明 + 实现」,业务在服务层。
4
4
  import { action } from '../../../runtime/action-decorator.js';
@@ -8,7 +8,7 @@ import * as serviceNs from '../service.js';
8
8
  import { exclusive, renderScoped } from '../support.js';
9
9
  const service: any = serviceNs;
10
10
 
11
- /** bundled.install 的入参契约(CLI 与 HTTP 共用同一份)。 */
11
+ /** skill.install 的入参契约(CLI 与 HTTP 共用同一份)。 */
12
12
  const input = z.object({
13
13
  name: z.string().optional(),
14
14
  group: z.string().optional().describe("groups.json 里的组名(与 <name> 互斥)"),
@@ -17,9 +17,9 @@ const input = z.object({
17
17
  all: z.boolean().optional().describe("装 assets/ 下的全部内置 skill(隐式覆盖,不需要 --force)"),
18
18
  });
19
19
 
20
- export class BundledInstallAction extends ActionBase<typeof input> {
20
+ export class SkillInstallAction extends ActionBase<typeof input> {
21
21
  @action({
22
- id: 'bundled.install',
22
+ id: 'skill.install',
23
23
  cli: ['skill', 'install'],
24
24
  http: ['POST', '/api/bundled/install'],
25
25
  summary: '安装内置 skill 到 skills 目录(默认 nx-kv → ~/.claude/skills;--group <key> 一键装一组;--all 装全部并直接覆盖)',
@@ -1,4 +1,4 @@
1
- // bundled.list —— 由 .tool/migrate-module.mjs 从 legacy 形态迁来(模板形态:一条 action 一个文件)。
1
+ // skill.list —— 由 .tool/migrate-module.mjs 从 legacy 形态迁来(模板形态:一条 action 一个文件)。
2
2
  //
3
3
  // 契约(zod schema)就声明在本文件里——入参类型由基类泛型模板封装;本文件只做「声明 + 实现」,业务在服务层。
4
4
  import { action } from '../../../runtime/action-decorator.js';
@@ -8,14 +8,14 @@ import * as serviceNs from '../service.js';
8
8
  import { renderList } from '../support.js';
9
9
  const service: any = serviceNs;
10
10
 
11
- /** bundled.list 的入参契约(CLI 与 HTTP 共用同一份)。 */
11
+ /** skill.list 的入参契约(CLI 与 HTTP 共用同一份)。 */
12
12
  const input = z.object({
13
13
 
14
14
  });
15
15
 
16
- export class BundledListAction extends ActionBase<typeof input> {
16
+ export class SkillListAction extends ActionBase<typeof input> {
17
17
  @action({
18
- id: 'bundled.list',
18
+ id: 'skill.list',
19
19
  cli: [['skill', 'list'], ['skill', 'install', '--list'], ['bundled', 'list']],
20
20
  http: ['GET', '/api/bundled'],
21
21
  summary: '列出包内自带 skill(含文件数与描述)+ 默认装哪个 + 有哪些 group',
@@ -6,15 +6,15 @@
6
6
 
7
7
  import type { ActionBase } from '../../../runtime/action-base.js';
8
8
  import type { Container } from '../../../runtime/container.js';
9
- import { LocaltaskClaimAction } from './localtask-claim.js';
9
+ import { LocaltaskGetAction } from './localtask-get.js';
10
10
  import { LocaltaskPreviewAction } from './localtask-preview.js';
11
11
 
12
12
  /** 本模块的全部 action 类(容器按这个顺序建实例)。 */
13
13
  export const ACTIONS: readonly (new (deps: Container) => ActionBase)[] = [
14
- LocaltaskClaimAction,
14
+ LocaltaskGetAction,
15
15
  LocaltaskPreviewAction,
16
16
  ];
17
17
 
18
18
  // 再导出类本身:前端 apiclient 的返回类型从这里 type-only 引用(实现即契约)。
19
- export { LocaltaskClaimAction };
19
+ export { LocaltaskGetAction };
20
20
  export { LocaltaskPreviewAction };
@@ -1,4 +1,13 @@
1
- // localtask.claim —— 由 .tool/migrate-module.mjs 从 legacy 形态迁来(模板形态:一条 action 一个文件)。
1
+ // localtask.get —— 领取任务(CLI `localtask get` / HTTP POST /api/localtasks/get)。
2
+ //
3
+ // id / cli / http 三层同词表,都以 CLI 动词 **get** 为基准。
4
+ // 注:CRUD 词表的「查(单条)」位(X.get)对本资源由 registry.test.mjs 的
5
+ // crudIdOf 覆盖映射到 localtask.show(查看,CLI `localtask show`)——
6
+ // localtask 的 get id 让位给「领取」,是刻意约定,不是漏配。
7
+ //
8
+ // 领取编排(阻塞窗口 / getLoop / 交付组装)在本模块 claim/,队列原语在
9
+ // localtask/lifecycle 的 claimFirstPending。
10
+ // 由 .tool/migrate-module.mjs 从 legacy 形态迁来(模板形态:一条 action 一个文件)。
2
11
  //
3
12
  // 契约(zod schema)就声明在本文件里——入参类型由基类泛型模板封装;本文件只做「声明 + 实现」,业务在服务层。
4
13
  import { action } from '../../../runtime/action-decorator.js';
@@ -8,7 +17,7 @@ import { renderWait as _renderWait } from '../../localtask/ui/action-render.js';
8
17
  import { claimView } from '../../localtask/ui/contract-views.js';
9
18
  const renderWait: any = _renderWait;
10
19
 
11
- /** localtask.claim 的入参契约(CLI 与 HTTP 共用同一份)。 */
20
+ /** localtask.get(领取)的入参契约(CLI 与 HTTP 共用同一份)。 */
12
21
  const input = z.object({
13
22
  cwd: z.string().optional(),
14
23
  timeout: z.number().optional().describe("阻塞上限(秒):显式给定时,即使项目没开「持续 get」也会阻塞这么久;缺省则立即返回 timeout"),
@@ -16,11 +25,11 @@ const input = z.object({
16
25
  param: z.array(z.string()).optional().describe("外部参数(平面扩展):k=v,可重复或逗号分隔;进交付模板 ctx,模板里 {{k}} / {{params.k}} 取"),
17
26
  });
18
27
 
19
- export class LocaltaskClaimAction extends ActionBase<typeof input> {
28
+ export class LocaltaskGetAction extends ActionBase<typeof input> {
20
29
  @action({
21
- id: 'localtask.claim',
30
+ id: 'localtask.get',
22
31
  cli: ['localtask', 'get'],
23
- http: ['POST', '/api/localtasks/claim'],
32
+ http: ['POST', '/api/localtasks/get'],
24
33
  summary: '领取任务:有任务立即领(含任务级 timegoal 的 check 指令);没任务默认立即返回 timeout,项目开启「持续 get」后自动唤起阻塞窗口等人回填',
25
34
  input,
26
35
  output: claimView,
@@ -43,6 +52,6 @@ export class LocaltaskClaimAction extends ActionBase<typeof input> {
43
52
  // 纯附加字段 —— CLI 的 --json 与 HTTP 响应原有键一个不少,只是多了 taskId。
44
53
  if (r && r.task && r.task.id != null) r.taskId = r.task.id;
45
54
  return r;
46
-
55
+
47
56
  }
48
57
  }
@@ -1,6 +1,6 @@
1
1
  // claim 模块(模板形态):任务系统的核心动词——领取。
2
2
  //
3
- // 领取链在这里闭环:claim action(CLI `localtask get` / HTTP `/api/localtasks/claim`)
3
+ // 领取链在这里闭环:get action(CLI `localtask get` / HTTP POST `/api/localtasks/get`)
4
4
  // → getTask → waitForTask(阻塞窗口)→ 交付组装(本域 host + promptplug 的 assemble)。
5
5
  // 持续 get(waitgoal)配置也在本域:项目级开关 + 阻塞分钟数。
6
6
  import { ModuleBase } from '../../runtime/types/module.js';
@@ -23,7 +23,7 @@ function panelOrigin(port: unknown): string {
23
23
  // 深链到面板目录工作台并定位当前主题(key 必有;key 缺失时落总览兜底)。
24
24
  // 端口取实际发现的面板(可能不是默认端口)。经典看板 #/localtask 已下线。
25
25
  export function deepLinkUrl(key: unknown, port: unknown): string {
26
- const page = key ? `#/dir/${encodeURIComponent(String(key))}` : '#/overview';
26
+ const page = key ? `#/dir/${encodeURIComponent(String(key))}` : '#/repos';
27
27
  return `${panelOrigin(port)}/${page}`;
28
28
  }
29
29
 
@@ -15,7 +15,7 @@ import {
15
15
  clampTimeoutSec,
16
16
  clearWaiting,
17
17
  consumeCancelRequest,
18
- consumeFirstPending,
18
+ claimFirstPending,
19
19
  getSettings,
20
20
  GLOBAL_KEY,
21
21
  isGlobalKey,
@@ -125,7 +125,7 @@ export async function waitForTask({
125
125
  const tmo = clampTimeoutSec(sec) * 1000;
126
126
 
127
127
  // 1. 主题队列已有 pending → 立即取走,不开窗、不阻塞;记录本轮完成总结
128
- const queued = await consumeFirstPending(key, summary, by);
128
+ const queued = await claimFirstPending(key, summary, by);
129
129
  if (queued) {
130
130
  const delivery = await buildTaskDelivery(queued, { source: 'local', summary, cwd, name, topicKey: key, params, getLoopEnabled, getLoopWaitMinutes });
131
131
  return { status: 'ok', key, cwd, name, summary, ...delivery, queued: true, source: 'local', repo: repoCtx };
@@ -140,7 +140,7 @@ export async function waitForTask({
140
140
  return { status: 'timeout', key, cwd, name, summary, timeoutMs: 0, instant: true };
141
141
  }
142
142
 
143
- const fromGlobal = await consumeFirstPending(GLOBAL_KEY, summary, by);
143
+ const fromGlobal = await claimFirstPending(GLOBAL_KEY, summary, by);
144
144
  if (fromGlobal) {
145
145
  // 全局池投递渲染的仍是**等待方目录**的 goal——目标绑定在等待中的 agent 目录上,
146
146
  // 与任务来自哪个队列无关。
@@ -213,13 +213,13 @@ export async function waitForTask({
213
213
  if (goalDeadlineMs && Date.now() >= goalDeadlineMs) {
214
214
  resolveOutcome({ kind: 'cancelled', reason: 'goal_expired' });
215
215
  }
216
- consumeFirstPending(key, undefined, by)
216
+ claimFirstPending(key, undefined, by)
217
217
  .then((task: any) => {
218
218
  if (task) {
219
219
  resolveOutcome({ kind: 'task', task, delivered: false, source: 'local' });
220
220
  return null;
221
221
  }
222
- return consumeFirstPending(GLOBAL_KEY, undefined, by);
222
+ return claimFirstPending(GLOBAL_KEY, undefined, by);
223
223
  })
224
224
  .then((task: any) => {
225
225
  if (task) resolveOutcome({ kind: 'task', task, delivered: false, source: 'global' });
@@ -6,27 +6,27 @@
6
6
 
7
7
  import type { ActionBase } from '../../../runtime/action-base.js';
8
8
  import type { Container } from '../../../runtime/container.js';
9
- import { DocAttachAction } from './doc-attach.js';
10
- import { DocAttachmentsAction } from './doc-attachments.js';
11
- import { DocDetachAction } from './doc-detach.js';
12
- import { DocGetAction } from './doc-get.js';
13
- import { DocLinkFileAction } from './doc-link-file.js';
14
- import { DocListAction } from './doc-list.js';
15
- import { DocMdfileAction } from './doc-mdfile.js';
16
- import { DocMdfilesAction } from './doc-mdfiles.js';
17
- import { DocRefAddAction } from './doc-ref.js';
18
- import { DocRemoveAction } from './doc-remove.js';
19
- import { DocRefUnbindAction } from './doc-unbind.js';
20
- import { DocUpdateAction } from './doc-update.js';
9
+ import { DocsAttachAction } from './docs-attach.js';
10
+ import { DocsAttachmentsAction } from './docs-attachments.js';
21
11
  import { DocsBindAction } from './docs-bind.js';
22
12
  import { DocsBindingsAction } from './docs-bindings.js';
13
+ import { DocsDetachAction } from './docs-detach.js';
23
14
  import { DocsGcAction } from './docs-gc.js';
15
+ import { DocsGetAction } from './docs-get.js';
24
16
  import { DocsIndexAction } from './docs-index.js';
17
+ import { DocsLinkFileAction } from './docs-link-file.js';
25
18
  import { DocsLinkAction } from './docs-link.js';
19
+ import { DocsListAction } from './docs-list.js';
26
20
  import { DocsMainAction } from './docs-main.js';
27
- import { DocsNotebindAction } from './docs-notebind.js';
21
+ import { DocsMdfileAction } from './docs-mdfile.js';
22
+ import { DocsMdfilesAction } from './docs-mdfiles.js';
23
+ import { DocsNotebindAction } from './docs-note-bind.js';
28
24
  import { DocsOrphansPurgeAction } from './docs-orphans-purge.js';
29
25
  import { DocsOrphansAction } from './docs-orphans.js';
26
+ import { DocsRefAddAction } from './docs-ref.js';
27
+ import { DocsRemoveAction } from './docs-remove.js';
28
+ import { DocsSetAction } from './docs-set.js';
29
+ import { DocsRefUnbindAction } from './docs-unbind.js';
30
30
  import { RepoDocAddAction } from './repo-doc-add.js';
31
31
  import { RepoDocListAction } from './repo-doc-list.js';
32
32
  import { RepoDocRemoveAction } from './repo-doc-remove.js';
@@ -34,27 +34,27 @@ import { RepoKnowledgeAction } from './repo-knowledge.js';
34
34
 
35
35
  /** 本模块的全部 action 类(容器按这个顺序建实例)。 */
36
36
  export const ACTIONS: readonly (new (deps: Container) => ActionBase)[] = [
37
- DocAttachAction,
38
- DocAttachmentsAction,
39
- DocDetachAction,
40
- DocGetAction,
41
- DocLinkFileAction,
42
- DocListAction,
43
- DocMdfileAction,
44
- DocMdfilesAction,
45
- DocRefAddAction,
46
- DocRemoveAction,
47
- DocRefUnbindAction,
48
- DocUpdateAction,
37
+ DocsAttachAction,
38
+ DocsAttachmentsAction,
49
39
  DocsBindAction,
50
40
  DocsBindingsAction,
41
+ DocsDetachAction,
51
42
  DocsGcAction,
43
+ DocsGetAction,
52
44
  DocsIndexAction,
45
+ DocsLinkFileAction,
53
46
  DocsLinkAction,
47
+ DocsListAction,
54
48
  DocsMainAction,
49
+ DocsMdfileAction,
50
+ DocsMdfilesAction,
55
51
  DocsNotebindAction,
56
52
  DocsOrphansPurgeAction,
57
53
  DocsOrphansAction,
54
+ DocsRefAddAction,
55
+ DocsRemoveAction,
56
+ DocsSetAction,
57
+ DocsRefUnbindAction,
58
58
  RepoDocAddAction,
59
59
  RepoDocListAction,
60
60
  RepoDocRemoveAction,
@@ -62,27 +62,27 @@ export const ACTIONS: readonly (new (deps: Container) => ActionBase)[] = [
62
62
  ];
63
63
 
64
64
  // 再导出类本身:前端 apiclient 的返回类型从这里 type-only 引用(实现即契约)。
65
- export { DocAttachAction };
66
- export { DocAttachmentsAction };
67
- export { DocDetachAction };
68
- export { DocGetAction };
69
- export { DocLinkFileAction };
70
- export { DocListAction };
71
- export { DocMdfileAction };
72
- export { DocMdfilesAction };
73
- export { DocRefAddAction };
74
- export { DocRemoveAction };
75
- export { DocRefUnbindAction };
76
- export { DocUpdateAction };
65
+ export { DocsAttachAction };
66
+ export { DocsAttachmentsAction };
77
67
  export { DocsBindAction };
78
68
  export { DocsBindingsAction };
69
+ export { DocsDetachAction };
79
70
  export { DocsGcAction };
71
+ export { DocsGetAction };
80
72
  export { DocsIndexAction };
73
+ export { DocsLinkFileAction };
81
74
  export { DocsLinkAction };
75
+ export { DocsListAction };
82
76
  export { DocsMainAction };
77
+ export { DocsMdfileAction };
78
+ export { DocsMdfilesAction };
83
79
  export { DocsNotebindAction };
84
80
  export { DocsOrphansPurgeAction };
85
81
  export { DocsOrphansAction };
82
+ export { DocsRefAddAction };
83
+ export { DocsRemoveAction };
84
+ export { DocsSetAction };
85
+ export { DocsRefUnbindAction };
86
86
  export { RepoDocAddAction };
87
87
  export { RepoDocListAction };
88
88
  export { RepoDocRemoveAction };
@@ -1,4 +1,4 @@
1
- // doc.attach —— 由 .tool/migrate-module.mjs 从 legacy 形态迁来(模板形态:一条 action 一个文件)。
1
+ // docs.attach —— 由 .tool/migrate-module.mjs 从 legacy 形态迁来(模板形态:一条 action 一个文件)。
2
2
  //
3
3
  // 契约(zod schema)就声明在本文件里——入参类型由基类泛型模板封装;本文件只做「声明 + 实现」,业务在服务层。
4
4
  import { action } from '../../../runtime/action-decorator.js';
@@ -9,7 +9,7 @@ import { renderAttach as _renderAttach } from '../render.js';
9
9
  const attachToDoc: any = _attachToDoc;
10
10
  const renderAttach: any = _renderAttach;
11
11
 
12
- /** doc.attach 的入参契约(CLI 与 HTTP 共用同一份)。 */
12
+ /** docs.attach 的入参契约(CLI 与 HTTP 共用同一份)。 */
13
13
  const input = z.object({
14
14
  ref: z.string(),
15
15
  path: z.string().optional().describe("本机文件路径(落本机附件仓)"),
@@ -24,9 +24,9 @@ const input = z.object({
24
24
  'no-embed': z.boolean().optional().describe("同 --noEmbed"),
25
25
  });
26
26
 
27
- export class DocAttachAction extends ActionBase<typeof input> {
27
+ export class DocsAttachAction extends ActionBase<typeof input> {
28
28
  @action({
29
- id: 'doc.attach',
29
+ id: 'docs.attach',
30
30
  cli: ['docs', 'attach'],
31
31
  http: ['POST', '/api/docs/attach'],
32
32
  summary: '给文档挂资源:--path / --fileId / --url / --task / --doc / --mdfile / --folder 之一;默认追加进正文,--no-embed 只挂附件区(不写正文)',
@@ -1,4 +1,4 @@
1
- // doc.attachments —— 由 .tool/migrate-module.mjs 从 legacy 形态迁来(模板形态:一条 action 一个文件)。
1
+ // docs.attachments —— 由 .tool/migrate-module.mjs 从 legacy 形态迁来(模板形态:一条 action 一个文件)。
2
2
  //
3
3
  // 契约(zod schema)就声明在本文件里——入参类型由基类泛型模板封装;本文件只做「声明 + 实现」,业务在服务层。
4
4
  import { action } from '../../../runtime/action-decorator.js';
@@ -9,14 +9,14 @@ import { renderAttachments as _renderAttachments } from '../render.js';
9
9
  const listDocAttachments: any = _listDocAttachments;
10
10
  const renderAttachments: any = _renderAttachments;
11
11
 
12
- /** doc.attachments 的入参契约(CLI 与 HTTP 共用同一份)。 */
12
+ /** docs.attachments 的入参契约(CLI 与 HTTP 共用同一份)。 */
13
13
  const input = z.object({
14
14
  ref: z.string(),
15
15
  });
16
16
 
17
- export class DocAttachmentsAction extends ActionBase<typeof input> {
17
+ export class DocsAttachmentsAction extends ActionBase<typeof input> {
18
18
  @action({
19
- id: 'doc.attachments',
19
+ id: 'docs.attachments',
20
20
  cli: ['docs', 'attachments'],
21
21
  http: ['GET', '/api/docs/attachments'],
22
22
  summary: '这篇文档用了哪些资源(ref_attach:图片/文件/URL/内部 task、ref 引用)',
@@ -1,4 +1,4 @@
1
- // doc.detach —— 由 .tool/migrate-module.mjs 从 legacy 形态迁来(模板形态:一条 action 一个文件)。
1
+ // docs.detach —— 由 .tool/migrate-module.mjs 从 legacy 形态迁来(模板形态:一条 action 一个文件)。
2
2
  //
3
3
  // 契约(zod schema)就声明在本文件里——入参类型由基类泛型模板封装;本文件只做「声明 + 实现」,业务在服务层。
4
4
  import { action } from '../../../runtime/action-decorator.js';
@@ -9,16 +9,16 @@ import { renderDetach as _renderDetach } from '../render.js';
9
9
  const detachFromDoc: any = _detachFromDoc;
10
10
  const renderDetach: any = _renderDetach;
11
11
 
12
- /** doc.detach 的入参契约(CLI 与 HTTP 共用同一份)。 */
12
+ /** docs.detach 的入参契约(CLI 与 HTTP 共用同一份)。 */
13
13
  const input = z.object({
14
14
  ref: z.string(),
15
15
  attachment: z.string().describe("资源 id(见 docs attachments)"),
16
16
  purge: z.boolean().optional().describe("连资源与字节一起删(仍被引用时拒绝)"),
17
17
  });
18
18
 
19
- export class DocDetachAction extends ActionBase<typeof input> {
19
+ export class DocsDetachAction extends ActionBase<typeof input> {
20
20
  @action({
21
- id: 'doc.detach',
21
+ id: 'docs.detach',
22
22
  cli: ['docs', 'detach'],
23
23
  http: ['DELETE', '/api/docs/attach'],
24
24
  summary: '解除文档与附件的关系(默认只解除关系);--purge 无人引用时连资源行与本机字节一起删',
@@ -1,4 +1,4 @@
1
- // doc.get —— 由 .tool/migrate-module.mjs 从 legacy 形态迁来(模板形态:一条 action 一个文件)。
1
+ // docs.get —— 由 .tool/migrate-module.mjs 从 legacy 形态迁来(模板形态:一条 action 一个文件)。
2
2
  //
3
3
  // 契约(zod schema)就声明在本文件里——入参类型由基类泛型模板封装;本文件只做「声明 + 实现」,业务在服务层。
4
4
  import { action } from '../../../runtime/action-decorator.js';
@@ -9,14 +9,14 @@ import { renderGet as _renderGet } from '../render.js';
9
9
  const getDoc: any = _getDoc;
10
10
  const renderGet: any = _renderGet;
11
11
 
12
- /** doc.get 的入参契约(CLI 与 HTTP 共用同一份)。 */
12
+ /** docs.get 的入参契约(CLI 与 HTTP 共用同一份)。 */
13
13
  const input = z.object({
14
14
  ref: z.string(),
15
15
  });
16
16
 
17
- export class DocGetAction extends ActionBase<typeof input> {
17
+ export class DocsGetAction extends ActionBase<typeof input> {
18
18
  @action({
19
- id: 'doc.get',
19
+ id: 'docs.get',
20
20
  cli: ['docs', 'get'],
21
21
  http: ['GET', '/api/docs/item'],
22
22
  summary: '读文档全文:ref:<refId>(或裸 refId)= 文档库条目;path:<绝对路径> = 外部(须在绑定闭包内)',
@@ -1,4 +1,4 @@
1
- // doc.link-file —— 登记一个本地 md 文件并挂到文档附件区(不复制正文)。
1
+ // docs.link-file —— 登记一个本地 md 文件并挂到文档附件区(不复制正文)。
2
2
  import { action } from '../../../runtime/action-decorator.js';
3
3
  import { z } from 'zod';
4
4
  import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
@@ -11,9 +11,9 @@ const input = z.object({
11
11
  note: z.string().optional().describe('附件区备注'),
12
12
  });
13
13
 
14
- export class DocLinkFileAction extends ActionBase<typeof input> {
14
+ export class DocsLinkFileAction extends ActionBase<typeof input> {
15
15
  @action({
16
- id: 'doc.link-file',
16
+ id: 'docs.link-file',
17
17
  cli: ['docs', 'link-file'],
18
18
  http: ['POST', '/api/docs/link-file'],
19
19
  summary: '把本地 md 文件登记为 mdfile 附件并挂到文档附件区:只存路径指针,不复制正文,不改文档正文',
@@ -1,4 +1,4 @@
1
- // doc.list —— 由 .tool/migrate-module.mjs 从 legacy 形态迁来(模板形态:一条 action 一个文件)。
1
+ // docs.list —— 由 .tool/migrate-module.mjs 从 legacy 形态迁来(模板形态:一条 action 一个文件)。
2
2
  //
3
3
  // 契约(zod schema)就声明在本文件里——入参类型由基类泛型模板封装;本文件只做「声明 + 实现」,业务在服务层。
4
4
  import { action } from '../../../runtime/action-decorator.js';
@@ -9,14 +9,14 @@ import { renderList as _renderList } from '../render.js';
9
9
  const listDocs: any = _listDocs;
10
10
  const renderList: any = _renderList;
11
11
 
12
- /** doc.list 的入参契约(CLI 与 HTTP 共用同一份)。 */
12
+ /** docs.list 的入参契约(CLI 与 HTTP 共用同一份)。 */
13
13
  const input = z.object({
14
14
  external: z.boolean().optional().describe("附带外部绑定闭包内的文档与绑定清单"),
15
15
  });
16
16
 
17
- export class DocListAction extends ActionBase<typeof input> {
17
+ export class DocsListAction extends ActionBase<typeof input> {
18
18
  @action({
19
- id: 'doc.list',
19
+ id: 'docs.list',
20
20
  cli: ['docs', 'list'],
21
21
  http: ['GET', '/api/docs'],
22
22
  summary: '文档树索引(自有 + 可选外部;零副作用,双链解析的数据源)',
@@ -1,4 +1,4 @@
1
- // doc.mdfile —— 读一个本地 md 文件的正文(读时校验指纹)。
1
+ // docs.mdfile —— 读一个本地 md 文件的正文(读时校验指纹)。
2
2
  import { action } from '../../../runtime/action-decorator.js';
3
3
  import { z } from 'zod';
4
4
  import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
@@ -8,9 +8,9 @@ const input = z.object({
8
8
  attachment: z.string().describe('mdfile 的附件 id(见 docs mdfiles)'),
9
9
  });
10
10
 
11
- export class DocMdfileAction extends ActionBase<typeof input> {
11
+ export class DocsMdfileAction extends ActionBase<typeof input> {
12
12
  @action({
13
- id: 'doc.mdfile',
13
+ id: 'docs.mdfile',
14
14
  cli: ['docs', 'mdfile'],
15
15
  http: ['GET', '/api/docs/mdfile'],
16
16
  summary: '读本地 md 文件的正文(只读原文件,核对指纹;文件缺失时返回空正文并标 missing)',
@@ -1,4 +1,4 @@
1
- // doc.mdfiles —— 列出已登记的本地 md 文件(kind=mdfile)。
1
+ // docs.mdfiles —— 列出已登记的本地 md 文件(kind=mdfile)。
2
2
  import { action } from '../../../runtime/action-decorator.js';
3
3
  import { z } from 'zod';
4
4
  import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
@@ -8,9 +8,9 @@ const input = z.object({
8
8
  missing: z.boolean().optional().describe('只看已失效(missing_at 非空)的行'),
9
9
  });
10
10
 
11
- export class DocMdfilesAction extends ActionBase<typeof input> {
11
+ export class DocsMdfilesAction extends ActionBase<typeof input> {
12
12
  @action({
13
- id: 'doc.mdfiles',
13
+ id: 'docs.mdfiles',
14
14
  cli: ['docs', 'mdfiles'],
15
15
  http: ['GET', '/api/docs/mdfiles'],
16
16
  summary: '列出已登记的本地 md 文件(mdfile 附件;--missing 只看失效行)',
@@ -1,4 +1,4 @@
1
- // docs.notebind —— 由 .tool/migrate-module.mjs 从 legacy 形态迁来(模板形态:一条 action 一个文件)。
1
+ // docs.note-bind —— 由 .tool/migrate-module.mjs 从 legacy 形态迁来(模板形态:一条 action 一个文件)。
2
2
  //
3
3
  // 契约(zod schema)就声明在本文件里——入参类型由基类泛型模板封装;本文件只做「声明 + 实现」,业务在服务层。
4
4
  import { action } from '../../../runtime/action-decorator.js';
@@ -9,7 +9,7 @@ import { renderNoteRef as _renderNoteRef } from '../render.js';
9
9
  const refs: any = refsNs;
10
10
  const renderNoteRef: any = _renderNoteRef;
11
11
 
12
- /** docs.notebind 的入参契约(CLI 与 HTTP 共用同一份)。 */
12
+ /** docs.note-bind 的入参契约(CLI 与 HTTP 共用同一份)。 */
13
13
  const input = z.object({
14
14
  board: z.string(),
15
15
  repo: z.string().describe("仓库(id / key / 路径 / 名称)"),
@@ -20,7 +20,7 @@ const input = z.object({
20
20
 
21
21
  export class DocsNotebindAction extends ActionBase<typeof input> {
22
22
  @action({
23
- id: 'docs.notebind',
23
+ id: 'docs.note-bind',
24
24
  cli: ['docs', 'note-bind'],
25
25
  // 仅 CLI:前端加绑/解绑走宿主文档集接口
26
26
  summary: '绑定组内仓库描述(--board <看板> --repo <仓库> + --ref | --path;--reset 清空;仓库须为该组成员)',
@@ -1,4 +1,4 @@
1
- // doc.ref.add —— 新建一个直接 ref(desc + 归属),不涉及任何文件 / 路径。
1
+ // docs.ref.add —— 新建一个直接 ref(desc + 归属),不涉及任何文件 / 路径。
2
2
  //
3
3
  // 口径(v7 / 任务 #97):ref 是 DB 实体(refs + ref_bodies + ref_bindings),
4
4
  // 身份就是 refId;新建时只给 desc 与宿主,正文为空、可立即编辑。
@@ -9,7 +9,7 @@ import { createRef as _createRef } from '../service.js';
9
9
 
10
10
  const createRef: any = _createRef;
11
11
 
12
- /** doc.ref.add 的入参契约(CLI 与 HTTP 共用同一份)。 */
12
+ /** docs.ref.add 的入参契约(CLI 与 HTTP 共用同一份)。 */
13
13
  const input = z.object({
14
14
  desc: z.string().optional().describe('短描述(列表 / 提示词模板的快速定位标签)'),
15
15
  owner: z.enum(['repo', 'group', 'group_repo']).optional().describe('归属类型:仓库 / 组 / 组下的仓库'),
@@ -17,9 +17,9 @@ const input = z.object({
17
17
  group: z.string().optional().describe('组 locator(id / key / 名称;owner=group 或 group_repo 时必填)'),
18
18
  });
19
19
 
20
- export class DocRefAddAction extends ActionBase<typeof input> {
20
+ export class DocsRefAddAction extends ActionBase<typeof input> {
21
21
  @action({
22
- id: 'doc.ref.add',
22
+ id: 'docs.ref.add',
23
23
  cli: ['docs', 'ref', 'add'],
24
24
  http: ['POST', '/api/docs/ref'],
25
25
  summary: '新建文档条目(desc + 归属;正文为空、直接可编辑;不创建任何文件)',
@@ -1,4 +1,4 @@
1
- // doc.remove —— 由 .tool/migrate-module.mjs 从 legacy 形态迁来(模板形态:一条 action 一个文件)。
1
+ // docs.remove —— 由 .tool/migrate-module.mjs 从 legacy 形态迁来(模板形态:一条 action 一个文件)。
2
2
  //
3
3
  // 契约(zod schema)就声明在本文件里——入参类型由基类泛型模板封装;本文件只做「声明 + 实现」,业务在服务层。
4
4
  import { action } from '../../../runtime/action-decorator.js';
@@ -7,14 +7,14 @@ import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
7
7
  import { removeDoc as _removeDoc } from '../service.js';
8
8
  const removeDoc: any = _removeDoc;
9
9
 
10
- /** doc.remove 的入参契约(CLI 与 HTTP 共用同一份)。 */
10
+ /** docs.remove 的入参契约(CLI 与 HTTP 共用同一份)。 */
11
11
  const input = z.object({
12
12
  ref: z.string(),
13
13
  });
14
14
 
15
- export class DocRemoveAction extends ActionBase<typeof input> {
15
+ export class DocsRemoveAction extends ActionBase<typeof input> {
16
16
  @action({
17
- id: 'doc.remove',
17
+ id: 'docs.remove',
18
18
  cli: ['docs', 'remove'],
19
19
  http: ['DELETE', '/api/docs/item'],
20
20
  summary: '删除自有文档(外部绑定不可删)',
@@ -1,4 +1,4 @@
1
- // doc.update —— 由 .tool/migrate-module.mjs 从 legacy 形态迁来(模板形态:一条 action 一个文件)。
1
+ // docs.set —— 由 .tool/migrate-module.mjs 从 legacy 形态迁来(模板形态:一条 action 一个文件)。
2
2
  //
3
3
  // 契约(zod schema)就声明在本文件里——入参类型由基类泛型模板封装;本文件只做「声明 + 实现」,业务在服务层。
4
4
  import { action } from '../../../runtime/action-decorator.js';
@@ -9,7 +9,7 @@ import { renderWritten as _renderWritten } from '../render.js';
9
9
  const updateDoc: any = _updateDoc;
10
10
  const renderWritten: any = _renderWritten;
11
11
 
12
- /** doc.update 的入参契约(CLI 与 HTTP 共用同一份)。 */
12
+ /** docs.set 的入参契约(CLI 与 HTTP 共用同一份)。 */
13
13
  const input = z.object({
14
14
  ref: z.string(),
15
15
  body: z.string().optional().describe("Markdown 全文"),
@@ -18,9 +18,9 @@ const input = z.object({
18
18
  'body-file': z.string().optional().describe("同 --bodyFile(连字符写法)"),
19
19
  });
20
20
 
21
- export class DocUpdateAction extends ActionBase<typeof input> {
21
+ export class DocsSetAction extends ActionBase<typeof input> {
22
22
  @action({
23
- id: 'doc.update',
23
+ id: 'docs.set',
24
24
  cli: ['docs', 'set'],
25
25
  http: ['PATCH', '/api/docs/item'],
26
26
  summary: '写文档正文 / 描述(面板保存走这里;ref 是 DB 实体,--ref 可给 refId;只给 --desc 时不动正文)',