@givolt/i3-composer-agent 2.2.3 → 2.3.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 (439) hide show
  1. package/.agents/plugins/marketplace.json +1 -1
  2. package/.claude/commands/i3-prototype.md +23 -0
  3. package/.claude/commands/i3-review.md +1 -1
  4. package/.claude/commands/i3-ship.md +1 -1
  5. package/.claude-plugin/marketplace.json +1 -1
  6. package/.claude-plugin/plugin.json +1 -1
  7. package/.codex-plugin/plugin.json +2 -2
  8. package/.gemini/commands/i3-prototype.toml +23 -0
  9. package/.gemini/commands/i3-review.toml +1 -1
  10. package/.gemini/commands/i3-ship.toml +1 -1
  11. package/README.md +15 -5
  12. package/agents/code-reviewer.md +1 -1
  13. package/agents/test-engineer.md +1 -1
  14. package/bin/native-layout.cjs +2 -0
  15. package/commands/i3-prototype.toml +23 -0
  16. package/commands/i3-review.toml +1 -1
  17. package/commands/i3-ship.toml +1 -1
  18. package/docs/agents.md +2 -2
  19. package/docs/codebuddy-setup.md +2 -2
  20. package/docs/codex-setup.md +1 -1
  21. package/docs/copilot-setup.md +4 -0
  22. package/docs/cursor-setup.md +3 -0
  23. package/docs/other-hosts.md +44 -9
  24. package/docs/workbuddy-setup.md +2 -2
  25. package/evals/README.md +2 -0
  26. package/evals/cases/i3-documentation-and-adrs.json +18 -0
  27. package/evals/cases/i3-test-driven-development.json +8 -0
  28. package/evals/cases/i3-ui-prototype.json +49 -0
  29. package/evals/fixtures/i3-documentation-and-adrs/prose-review/README.md +19 -0
  30. package/evals/fixtures/i3-documentation-and-adrs/prose-review/queue.js +32 -0
  31. package/evals/fixtures/i3-ui-prototype/business-brief.md +7 -0
  32. package/evals/plugin/tdd-fires-on-pasted-bug/graders/failing-test-first.md +7 -0
  33. package/evals/plugin/tdd-fires-on-pasted-bug/graders/skill-fired.md +5 -0
  34. package/evals/plugin/tdd-fires-on-pasted-bug/prompt.md +15 -0
  35. package/evals/plugin/tdd-stays-quiet-on-debug/graders/not-fired.md +8 -0
  36. package/evals/plugin/tdd-stays-quiet-on-debug/prompt.md +25 -0
  37. package/evals/zh-CN/cases/i3-documentation-and-adrs.json +19 -0
  38. package/evals/zh-CN/cases/i3-test-driven-development.json +4 -0
  39. package/evals/zh-CN/cases/i3-ui-prototype.json +50 -0
  40. package/hooks/SIMPLIFY-IGNORE.md +3 -2
  41. package/hooks/simplify-ignore-test.sh +93 -1
  42. package/hooks/simplify-ignore.sh +94 -11
  43. package/package.json +31 -1
  44. package/plugin.json +1 -1
  45. package/references/performance-checklist.md +4 -2
  46. package/scripts/design-provider-discovery-test.js +190 -0
  47. package/scripts/design-provider-test.js +68 -0
  48. package/scripts/enterprise-template-test.js +179 -0
  49. package/scripts/lib/skill-lint-test.js +113 -1
  50. package/scripts/lib/skill-lint.js +62 -8
  51. package/scripts/run-evals-test.js +207 -0
  52. package/scripts/run-evals.js +47 -9
  53. package/scripts/template-adapter-test.js +155 -0
  54. package/scripts/ui-prototype-test.js +114 -0
  55. package/scripts/validate-commands-test.js +30 -0
  56. package/scripts/validate-commands.js +6 -16
  57. package/scripts/validate-reference-links-test.js +18 -0
  58. package/scripts/validate-reference-links.js +4 -2
  59. package/scripts/validate-skills.js +26 -3
  60. package/skills/i3-documentation-and-adrs/SKILL.md +9 -0
  61. package/skills/i3-frontend-ui-engineering/SKILL.md +5 -1
  62. package/skills/i3-idea-refine/SKILL.md +20 -5
  63. package/skills/i3-incremental-implementation/SKILL.md +4 -0
  64. package/skills/i3-performance-optimization/SKILL.md +10 -10
  65. package/skills/i3-security-and-hardening/references/hardening-patterns.md +1 -1
  66. package/skills/i3-shipping-and-launch/SKILL.md +6 -0
  67. package/skills/i3-test-driven-development/SKILL.md +3 -3
  68. package/skills/i3-ui-prototype/SKILL.md +119 -0
  69. package/skills/i3-ui-prototype/assets/templates/catalog.json +148 -0
  70. package/skills/i3-ui-prototype/assets/templates/classic-admin/manifest.json +9 -0
  71. package/skills/i3-ui-prototype/assets/templates/classic-admin/preset.json +6 -0
  72. package/skills/i3-ui-prototype/assets/templates/common/app/app.mjs +89 -0
  73. package/skills/i3-ui-prototype/assets/templates/common/app/config.json +1 -0
  74. package/skills/i3-ui-prototype/assets/templates/common/app/domain.mjs +20 -0
  75. package/skills/i3-ui-prototype/assets/templates/common/app/index.html +17 -0
  76. package/skills/i3-ui-prototype/assets/templates/common/app/serve.cjs +16 -0
  77. package/skills/i3-ui-prototype/assets/templates/common/app/styles.css +670 -0
  78. package/skills/i3-ui-prototype/assets/templates/common/app/tokens.css +19 -0
  79. package/skills/i3-ui-prototype/assets/templates/common/design-system/master.md +20 -0
  80. package/skills/i3-ui-prototype/assets/templates/common/gallery.html +2 -0
  81. package/skills/i3-ui-prototype/assets/templates/common/mocks/applications.json +5 -0
  82. package/skills/i3-ui-prototype/assets/templates/common/requirements-map.json +8 -0
  83. package/skills/i3-ui-prototype/assets/templates/common/serve-gallery.cjs +16 -0
  84. package/skills/i3-ui-prototype/assets/templates/credits.md +17 -0
  85. package/skills/i3-ui-prototype/assets/templates/data-operations/manifest.json +9 -0
  86. package/skills/i3-ui-prototype/assets/templates/data-operations/preset.json +6 -0
  87. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/design-system.md +32 -0
  88. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/index.html +29 -0
  89. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/manifest.json +9 -0
  90. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/origin.json +344 -0
  91. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/preset.json +928 -0
  92. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/app.js +22 -0
  93. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/assets/empty.svg +1 -0
  94. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/assets/reference-styles.json +1 -0
  95. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/assets/result-403.svg +1 -0
  96. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/assets/result-404.svg +1 -0
  97. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/assets-manifest.json +334 -0
  98. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/baseline.json +173 -0
  99. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/conversion.md +30 -0
  100. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/credits.md +17 -0
  101. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/design-tokens.json +881 -0
  102. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/index.html +28 -0
  103. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/licenses/@qin-ui-antdv-next-pro.txt +9 -0
  104. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/licenses/ant-design-icons.txt +22 -0
  105. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/licenses/antdv-next.txt +21 -0
  106. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/package.json +12 -0
  107. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/browser-routes.json +298 -0
  108. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/coverage.json +180 -0
  109. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/integrity.json +13 -0
  110. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/keyboard.json +11 -0
  111. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/responsive.json +125 -0
  112. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/review.md +51 -0
  113. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/rules.log +150 -0
  114. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/screenshots/flow-editor-html.png +0 -0
  115. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/screenshots/flow-editor-original.png +0 -0
  116. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/screenshots/intent-create-html.png +0 -0
  117. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/screenshots/intent-create-original.png +0 -0
  118. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/screenshots/models-html.png +0 -0
  119. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/screenshots/models-original.png +0 -0
  120. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/screenshots/workbench-html.png +0 -0
  121. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/screenshots/workbench-original.png +0 -0
  122. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/selection.json +9 -0
  123. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/visual-comparison.json +342 -0
  124. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/readme.md +73 -0
  125. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/reference.md +59 -0
  126. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/routes.json +178 -0
  127. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/runtime/controls.js +99 -0
  128. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/runtime/dialogs.js +54 -0
  129. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/runtime/dom.js +264 -0
  130. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/runtime/forms.js +47 -0
  131. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/runtime/icons.js +41 -0
  132. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/runtime/layout.js +47 -0
  133. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/runtime/router.js +63 -0
  134. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/runtime/state.js +90 -0
  135. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/runtime/table.js +41 -0
  136. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/runtime/widgets.js +8 -0
  137. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/AgentDetail.html +3 -0
  138. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/AgentDetail.js +36 -0
  139. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/AgentEditor.html +2 -0
  140. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/AgentEditor.js +51 -0
  141. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/AgentsPage.html +3 -0
  142. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/AgentsPage.js +48 -0
  143. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/CheckResults.html +2 -0
  144. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/CheckResults.js +6 -0
  145. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/ResourcePicker.html +2 -0
  146. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/ResourcePicker.js +13 -0
  147. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/data.js +24 -0
  148. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/domain.js +32 -0
  149. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/registry.js +25 -0
  150. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/store.js +85 -0
  151. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentClose.html +2 -0
  152. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentClose.js +17 -0
  153. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentCreate.html +2 -0
  154. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentCreate.js +66 -0
  155. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentDecisions.html +3 -0
  156. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentDecisions.js +38 -0
  157. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentDetail.html +2 -0
  158. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentDetail.js +66 -0
  159. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentDocument.html +2 -0
  160. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentDocument.js +5 -0
  161. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentHeader.html +2 -0
  162. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentHeader.js +12 -0
  163. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentHistory.html +2 -0
  164. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentHistory.js +11 -0
  165. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentList.html +2 -0
  166. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentList.js +116 -0
  167. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentReplan.html +2 -0
  168. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentReplan.js +32 -0
  169. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentRevision.html +2 -0
  170. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentRevision.js +49 -0
  171. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentSummary.html +2 -0
  172. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentSummary.js +10 -0
  173. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentWorkspace.html +2 -0
  174. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentWorkspace.js +77 -0
  175. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/data.js +60 -0
  176. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/domain.js +105 -0
  177. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/store.js +212 -0
  178. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/AuditPanel.html +2 -0
  179. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/AuditPanel.js +18 -0
  180. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelDetail.html +2 -0
  181. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelDetail.js +23 -0
  182. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelEditor.html +2 -0
  183. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelEditor.js +78 -0
  184. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelGrant.html +2 -0
  185. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelGrant.js +55 -0
  186. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelReferences.html +2 -0
  187. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelReferences.js +26 -0
  188. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelRelease.html +2 -0
  189. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelRelease.js +38 -0
  190. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelStatus.html +2 -0
  191. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelStatus.js +7 -0
  192. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelTable.html +2 -0
  193. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelTable.js +72 -0
  194. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelTester.html +2 -0
  195. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelTester.js +46 -0
  196. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelsPage.html +2 -0
  197. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelsPage.js +52 -0
  198. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/RowActions.html +2 -0
  199. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/RowActions.js +19 -0
  200. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/UsagePanel.html +2 -0
  201. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/UsagePanel.js +30 -0
  202. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/data.js +48 -0
  203. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/domain.js +39 -0
  204. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/store.js +129 -0
  205. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/IncidentDetail.html +4 -0
  206. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/IncidentDetail.js +21 -0
  207. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/IntentSource.html +2 -0
  208. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/IntentSource.js +8 -0
  209. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/OperationActionDialog.html +2 -0
  210. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/OperationActionDialog.js +37 -0
  211. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/OperationEntry.html +2 -0
  212. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/OperationEntry.js +10 -0
  213. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/OperationsPage.html +2 -0
  214. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/OperationsPage.js +37 -0
  215. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/RepairTrack.html +2 -0
  216. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/RepairTrack.js +49 -0
  217. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/RunDetail.html +4 -0
  218. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/RunDetail.js +22 -0
  219. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/SourceSummary.html +2 -0
  220. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/SourceSummary.js +9 -0
  221. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/commands.js +82 -0
  222. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/examples.js +47 -0
  223. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/model.js +61 -0
  224. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/repair.js +68 -0
  225. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/store.js +55 -0
  226. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/types.js +1 -0
  227. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/workbench.js +18 -0
  228. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/ManagementTable.html +3 -0
  229. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/ManagementTable.js +28 -0
  230. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcCreateEntry.html +2 -0
  231. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcCreateEntry.js +18 -0
  232. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcDetail.html +2 -0
  233. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcDetail.js +31 -0
  234. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcEditor.html +2 -0
  235. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcEditor.js +27 -0
  236. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcLifecycle.html +2 -0
  237. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcLifecycle.js +16 -0
  238. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcPage.html +2 -0
  239. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcPage.js +43 -0
  240. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcPicker.html +4 -0
  241. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcPicker.js +34 -0
  242. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcProgress.html +2 -0
  243. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcProgress.js +30 -0
  244. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcWizard.html +3 -0
  245. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcWizard.js +67 -0
  246. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcWorkspace.html +2 -0
  247. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcWorkspace.js +41 -0
  248. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcsPage.html +2 -0
  249. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcsPage.js +31 -0
  250. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/ServiceEditor.html +2 -0
  251. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/ServiceEditor.js +26 -0
  252. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/ServiceList.html +2 -0
  253. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/ServiceList.js +70 -0
  254. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/data.js +8 -0
  255. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/domain.js +62 -0
  256. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/management.js +36 -0
  257. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/managementStore.js +49 -0
  258. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/store.js +132 -0
  259. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/AdminList.html +2 -0
  260. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/AdminList.js +38 -0
  261. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/EffectiveGrants.html +2 -0
  262. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/EffectiveGrants.js +11 -0
  263. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/GrantEditor.html +2 -0
  264. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/GrantEditor.js +45 -0
  265. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/MemberEditor.html +2 -0
  266. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/MemberEditor.js +54 -0
  267. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/MembersPage.html +3 -0
  268. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/MembersPage.js +27 -0
  269. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/RecordsPage.html +2 -0
  270. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/RecordsPage.js +12 -0
  271. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/RoleEditor.html +2 -0
  272. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/RoleEditor.js +45 -0
  273. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/RolesPage.html +3 -0
  274. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/RolesPage.js +38 -0
  275. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/domain.js +61 -0
  276. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/state.js +51 -0
  277. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/store.js +116 -0
  278. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/releases/ReleaseActionDialog.html +2 -0
  279. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/releases/ReleaseActionDialog.js +45 -0
  280. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/releases/ReleaseDetail.html +4 -0
  281. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/releases/ReleaseDetail.js +30 -0
  282. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/releases/ReleaseEditor.html +2 -0
  283. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/releases/ReleaseEditor.js +67 -0
  284. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/releases/ReleaseExecution.html +2 -0
  285. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/releases/ReleaseExecution.js +5 -0
  286. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/releases/ReleasesPage.html +4 -0
  287. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/releases/ReleasesPage.js +60 -0
  288. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/releases/commands.js +157 -0
  289. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/releases/model.js +136 -0
  290. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/releases/store.js +76 -0
  291. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/reviews/ReviewDetail.html +3 -0
  292. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/reviews/ReviewDetail.js +26 -0
  293. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/reviews/ReviewEvidence.html +2 -0
  294. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/reviews/ReviewEvidence.js +14 -0
  295. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/reviews/ReviewProcess.html +2 -0
  296. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/reviews/ReviewProcess.js +113 -0
  297. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/reviews/ReviewsPage.html +3 -0
  298. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/reviews/ReviewsPage.js +62 -0
  299. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/reviews/commands.js +97 -0
  300. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/reviews/model.js +147 -0
  301. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/reviews/store.js +13 -0
  302. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/ColumnSettings.html +2 -0
  303. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/ColumnSettings.js +9 -0
  304. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/ListBatchBar.html +2 -0
  305. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/ListBatchBar.js +8 -0
  306. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/ListDeleteDialog.html +2 -0
  307. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/ListDeleteDialog.js +37 -0
  308. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/ListMore.html +2 -0
  309. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/ListMore.js +8 -0
  310. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/RecordMetadata.html +2 -0
  311. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/RecordMetadata.js +17 -0
  312. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/columns.js +32 -0
  313. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/deliveryGuide.js +49 -0
  314. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/deliveryView.js +12 -0
  315. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/listBatch.js +15 -0
  316. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/listSelection.js +37 -0
  317. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/policy.js +68 -0
  318. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/session.js +44 -0
  319. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shell/ConfirmationDialog.html +2 -0
  320. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shell/ConfirmationDialog.js +25 -0
  321. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shell/ConsoleShell.html +2 -0
  322. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shell/ConsoleShell.js +53 -0
  323. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shell/PrototypeGuide.html +10 -0
  324. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shell/PrototypeGuide.js +30 -0
  325. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shell/ScopePage.html +2 -0
  326. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shell/ScopePage.js +10 -0
  327. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shell/SessionDialog.html +2 -0
  328. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shell/SessionDialog.js +9 -0
  329. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shell/confirmation.js +3 -0
  330. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shell/navigation.js +19 -0
  331. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/SpecDocument.html +2 -0
  332. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/SpecDocument.js +8 -0
  333. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/SpecEdit.html +2 -0
  334. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/SpecEdit.js +32 -0
  335. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/SpecHeader.html +2 -0
  336. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/SpecHeader.js +15 -0
  337. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/SpecHistory.html +2 -0
  338. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/SpecHistory.js +11 -0
  339. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/SpecReview.html +2 -0
  340. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/SpecReview.js +57 -0
  341. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/SpecWorkspace.html +2 -0
  342. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/SpecWorkspace.js +37 -0
  343. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/data.js +20 -0
  344. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/domain.js +55 -0
  345. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/store.js +151 -0
  346. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/ArtifactDetail.html +3 -0
  347. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/ArtifactDetail.js +18 -0
  348. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/TaskCreate.html +2 -0
  349. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/TaskCreate.js +40 -0
  350. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/TaskDetail.html +2 -0
  351. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/TaskDetail.js +51 -0
  352. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/TaskLaunch.html +2 -0
  353. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/TaskLaunch.js +9 -0
  354. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/TasksPage.html +5 -0
  355. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/TasksPage.js +48 -0
  356. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/domain.js +204 -0
  357. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/exampleSource.js +22 -0
  358. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/registry.js +135 -0
  359. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/store.js +137 -0
  360. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workbench/WorkbenchPage.html +3 -0
  361. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workbench/WorkbenchPage.js +36 -0
  362. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workbench/model.js +56 -0
  363. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workbench/store.js +15 -0
  364. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workflows/FlowCanvas.html +2 -0
  365. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workflows/FlowCanvas.js +27 -0
  366. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workflows/FlowDetail.html +4 -0
  367. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workflows/FlowDetail.js +31 -0
  368. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workflows/FlowEditor.html +2 -0
  369. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workflows/FlowEditor.js +68 -0
  370. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workflows/WorkflowsPage.html +5 -0
  371. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workflows/WorkflowsPage.js +55 -0
  372. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workflows/data.js +16 -0
  373. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workflows/domain.js +83 -0
  374. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workflows/registry.js +18 -0
  375. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workflows/store.js +61 -0
  376. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/admin.css +60 -0
  377. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/agents.css +46 -0
  378. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/antdv.css +295 -0
  379. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/app.css +102 -0
  380. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/delivery.css +4 -0
  381. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/intents.css +37 -0
  382. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/native.css +22 -0
  383. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/operations.css +2 -0
  384. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/pbc.css +3 -0
  385. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/permissions.css +22 -0
  386. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/pro.css +1 -0
  387. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/releases.css +4 -0
  388. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/reset.css +246 -0
  389. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/reviews.css +8 -0
  390. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/tasks.css +6 -0
  391. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/tokens.css +15 -0
  392. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/workbench.css +61 -0
  393. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/workflows.css +1 -0
  394. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/admin-rules.test.js +96 -0
  395. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/agents.test.js +14 -0
  396. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/intent-state.test.js +37 -0
  397. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/list-batch.test.js +44 -0
  398. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/operation-fixtures.js +19 -0
  399. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/operation-repair.test.js +14 -0
  400. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/operations.test.js +25 -0
  401. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/pbc-management.test.js +17 -0
  402. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/pbc-state.test.js +24 -0
  403. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/permission-config.test.js +23 -0
  404. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/permissions.test.js +24 -0
  405. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/releases.test.js +50 -0
  406. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/reviews.test.js +36 -0
  407. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/runtime-forms-router.test.js +28 -0
  408. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/runtime-state.test.js +42 -0
  409. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/runtime-stores.test.js +16 -0
  410. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/spec-state.test.js +11 -0
  411. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/tasks.test.js +27 -0
  412. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/workbench.test.js +34 -0
  413. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/workflows.test.js +16 -0
  414. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tools/convert.mjs +168 -0
  415. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tools/serve.mjs +7 -0
  416. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tools/styles.mjs +11 -0
  417. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tools/verify.mjs +24 -0
  418. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/serve.cjs +16 -0
  419. package/skills/i3-ui-prototype/assets/templates/enterprise-admin/usability.css +44 -0
  420. package/skills/i3-ui-prototype/assets/templates/gallery/index.html +40 -0
  421. package/skills/i3-ui-prototype/assets/templates/modern-workspace/manifest.json +9 -0
  422. package/skills/i3-ui-prototype/assets/templates/modern-workspace/preset.json +6 -0
  423. package/skills/i3-ui-prototype/assets/templates/serve-gallery.cjs +23 -0
  424. package/skills/i3-ui-prototype/references/artifact-contract.md +41 -0
  425. package/skills/i3-ui-prototype/references/enterprise-admin.md +38 -0
  426. package/skills/i3-ui-prototype/references/expert-adapter.md +48 -0
  427. package/skills/i3-ui-prototype/references/template-adapters.md +57 -0
  428. package/skills/i3-ui-prototype/references/workflow-contract.md +19 -0
  429. package/skills/i3-ui-prototype/scripts/adapters/easel-html.cjs +30 -0
  430. package/skills/i3-ui-prototype/scripts/adapters/legacy-html.cjs +28 -0
  431. package/skills/i3-ui-prototype/scripts/check-design-provider.cjs +9 -0
  432. package/skills/i3-ui-prototype/scripts/check-prototype.cjs +14 -0
  433. package/skills/i3-ui-prototype/scripts/design-provider-discovery.cjs +128 -0
  434. package/skills/i3-ui-prototype/scripts/enterprise-template.cjs +97 -0
  435. package/skills/i3-ui-prototype/scripts/init-prototype.cjs +8 -0
  436. package/skills/i3-ui-prototype/scripts/manage-baseline.cjs +11 -0
  437. package/skills/i3-ui-prototype/scripts/prototype-lib.cjs +259 -0
  438. package/skills/i3-ui-prototype/scripts/template-adapters.cjs +89 -0
  439. package/skills/i3-using-agent-skills/SKILL.md +5 -0
@@ -0,0 +1,47 @@
1
+ import { h, defineWidget, Fragment, afterRender } from './dom.js';
2
+ import { invalidate } from './state.js';
3
+ import { attrs, uid, Checkbox } from './controls.js';
4
+ import { CheckCircleOutlined, ExclamationCircleOutlined, InfoCircleOutlined, CloseCircleOutlined, CheckOutlined, RightOutlined, DownOutlined, CheckCircleFilled,InfoCircleFilled,CloseCircleFilled,ExclamationCircleFilled } from './icons.js';
5
+
6
+ export const Space = defineWidget('Space', (p,s) => {
7
+ const sizes = {small:8,middle:16,large:24}, gap = typeof p.size === 'number' ? p.size : sizes[p.size] || 8;
8
+ return h('div', {...attrs(p), class:['ant-space',p.direction==='vertical'?'ant-space-vertical':'ant-space-horizontal','ant-space-align-'+(p.align||'center'),p.class],style:{gap,flexWrap:p.wrap?'wrap':undefined,...p.style}}, s.default?.());
9
+ });
10
+ export const Tag = defineWidget('Tag',(p,s)=>h('span',{...attrs(p),class:['ant-tag ant-tag-filled',p.color&&'ant-tag-'+p.color,p.class],style:p.style},s.default?.()));
11
+ const icons={success:CheckCircleFilled,error:CloseCircleFilled,warning:ExclamationCircleFilled,info:InfoCircleFilled};
12
+ export const Alert = defineWidget('Alert',(p,s)=>h('div',{...attrs(p),role:'alert',class:['ant-alert','ant-alert-'+(p.type||'info'),'ant-alert-outlined',p.description&&'ant-alert-with-description',p.class],style:p.style},[
13
+ p.showIcon&&h('span',{class:'ant-alert-icon'},h(icons[p.type]||InfoCircleOutlined)),
14
+ h('div',{class:'ant-alert-section'},[h('div',{class:'ant-alert-title'},p.title||p.message||s.title?.()),p.description&&h('div',{class:'ant-alert-description'},p.description)]),
15
+ s.action&&h('div',{class:'ant-alert-action'},s.action()),
16
+ ]));
17
+ export const Empty = defineWidget('Empty',(p,s)=>h('div',{...attrs(p),class:['ant-empty',p.class],style:p.style},[h('div',{class:'ant-empty-image'},s.image?.()||h('img',{src:new URL('../assets/empty.svg',import.meta.url).href,alt:''})),p.description!==false&&h('div',{class:'ant-empty-description'},p.description||'暂无数据'),s.default&&h('div',{class:'ant-empty-footer'},s.default())]));
18
+ export const Result = defineWidget('Result',(p,s)=>h('div',{...attrs(p),class:['ant-result','ant-result-'+(p.status||'info'),p.class]},[h('div',{class:['ant-result-icon',['403','404'].includes(String(p.status))&&'ant-result-image']},['403','404'].includes(String(p.status))?h('img',{src:new URL('../assets/result-'+p.status+'.svg',import.meta.url).href,alt:''}):h(icons[p.status]||ExclamationCircleOutlined)),h('div',{class:'ant-result-title'},p.title),p.subTitle&&h('div',{class:'ant-result-subtitle'},p.subTitle),s.extra&&h('div',{class:'ant-result-extra'},s.extra()),s.default&&h('div',{class:'ant-result-content'},s.default())]));
19
+ export const Tabs = defineWidget('Tabs',(p,s,ctx)=>{
20
+ const state=ctx.state(()=>({active:p.defaultActiveKey||p.items?.[0]?.key})),active=p.activeKey??state.active;
21
+ const change=(key)=>{state.active=key;ctx.emit('update:activeKey',key);p.onChange?.(key);invalidate();};
22
+ const tabs=(p.items||[]).filter(x=>!x.hidden);
23
+ afterRender(()=>{const parent=document.getElementById(uid(ctx.id));const selected=parent?.querySelector('.ant-tabs-tab-active');const bar=parent?.querySelector('.ant-tabs-ink-bar');if(selected&&bar){bar.style.width=selected.offsetWidth+'px';bar.style.left=selected.offsetLeft+'px';}});
24
+ return h('div',{...attrs(p),id:uid(ctx.id),class:['ant-tabs','ant-tabs-'+(p.tabPosition||'top'),p.size==='small'&&'ant-tabs-small',p.class],style:p.style},[
25
+ h('div',{class:'ant-tabs-nav',role:'tablist','aria-orientation':'horizontal'},[h('div',{class:'ant-tabs-nav-wrap'},h('div',{class:'ant-tabs-nav-list'},[tabs.map((item,index)=>h('div',{class:['ant-tabs-tab',item.key===active&&'ant-tabs-tab-active',item.disabled&&'ant-tabs-tab-disabled']},h('div',{role:'tab','aria-selected':item.key===active,'aria-disabled':!!item.disabled,class:'ant-tabs-tab-btn',tabindex:item.key===active?0:-1,onClick:()=>{if(!item.disabled)change(item.key);},onKeydown:e=>{if(e.key==='Enter'||e.key===' ')change(item.key);if(['ArrowRight','ArrowLeft'].includes(e.key)){e.preventDefault();change(tabs[(index+(e.key==='ArrowRight'?1:tabs.length-1))%tabs.length].key);}}},h('span',{},item.label)))),h('div',{class:'ant-tabs-ink-bar ant-tabs-ink-bar-animated'})])),s.rightExtra&&h('div',{class:'ant-tabs-extra-content'},s.rightExtra())]),
26
+ h('div',{class:'ant-tabs-body-holder'},h('div',{class:'ant-tabs-body ant-tabs-body-top'},h('div',{role:'tabpanel',class:'ant-tabs-content ant-tabs-content-active'},tabs.find(t=>t.key===active)?.children||s.default?.()))),
27
+ ]);
28
+ });
29
+ export const Segmented=defineWidget('Segmented',(p,s,ctx)=>h('div',{...attrs(p),role:'radiogroup',class:['ant-segmented',p.class]},h('div',{class:'ant-segmented-group'},(p.options||[]).map(o=>{const item=typeof o==='object'?o:{value:o,label:o};return h('label',{class:['ant-segmented-item',p.value===item.value&&'ant-segmented-item-selected',item.disabled&&'ant-segmented-item-disabled']},[h('input',{type:'radio',class:'ant-segmented-item-input',name:uid(ctx.id),value:item.value,checked:p.value===item.value,disabled:p.disabled||item.disabled,onChange:()=>{ctx.emit('update:value',item.value);p.onChange?.(item.value);}}),h('div',{class:'ant-segmented-item-label'},item.label)]);} ))));
30
+ export const Progress=defineWidget('Progress',(p,s)=>h('div',{...attrs(p),class:['ant-progress ant-progress-line',p.status&&'ant-progress-status-'+p.status,p.class],role:'progressbar','aria-valuenow':p.percent,'aria-valuemin':0,'aria-valuemax':100},[h('div',{class:'ant-progress-outer'},h('div',{class:'ant-progress-inner'},h('div',{class:'ant-progress-bg',style:{width:Math.max(0,Math.min(100,p.percent||0))+'%',height:p.strokeWidth||8,background:p.strokeColor}}))),p.showInfo!==false&&h('span',{class:'ant-progress-text'},p.format?p.format(p.percent):p.percent+'%')]));
31
+ export const Steps=defineWidget('Steps',(p,s,ctx)=>h('div',{...attrs(p),class:['ant-steps','ant-steps-horizontal','ant-steps-title-'+(p.titlePlacement||'horizontal'),'ant-steps-filled',p.size==='small'&&'ant-steps-small',p.class],style:{'--ant-cmp-steps-items-offset':0,...p.style}},(p.items||[]).map((item,index)=>{const status=item.status||((p.current||0)>index?'finish':(p.current||0)===index?p.status||'process':'wait'),activate=()=>{if(!item.disabled){ctx.emit('update:current',index);p.onChange?.(index);}};return h('div',{class:['ant-steps-item','ant-steps-item-'+status,item.disabled&&'ant-steps-item-disabled'],role:p.onChange?'button':undefined,tabindex:p.onChange?0:undefined,'aria-current':status==='process'?'step':undefined,onClick:p.onChange?activate:undefined,onKeydown:e=>{if(e.key==='Enter'||e.key===' ')activate();}},h('div',{class:'ant-steps-item-wrapper'},[h('div',{class:'ant-steps-item-icon ant-wave-target'},status==='finish'?h(CheckOutlined,{class:'ant-steps-item-icon-finish'}):status==='error'?h(CloseCircleOutlined):index+1),h('div',{class:'ant-steps-item-section'},[h('div',{class:'ant-steps-item-header'},[h('div',{class:'ant-steps-item-title'},item.title),index<(p.items||[]).length-1&&h('div',{class:['ant-steps-item-rail','ant-steps-item-rail-'+status]})]),item.description&&h('div',{class:'ant-steps-item-description'},item.description)])]));})));
32
+ export const Skeleton=defineWidget('Skeleton',(p)=>h('div',{class:['ant-skeleton',p.active&&'ant-skeleton-active',p.class]},h('div',{class:'ant-skeleton-content'},[h('h3',{class:'ant-skeleton-title',style:{width:'38%'}}),h('ul',{class:'ant-skeleton-paragraph'},Array.from({length:p.paragraph?.rows||3},(_,i)=>h('li',{style:{width:i===(p.paragraph?.rows||3)-1?'61%':'100%'}})))])));
33
+ export const Descriptions=defineWidget('Descriptions',(p,s)=>{
34
+ let items=p.items;if(!items){const supplied=s.default?.()||[];items=(Array.isArray(supplied)?supplied:[supplied]).flat(Infinity).filter(x=>x?.type===Descriptions.Item).map(x=>({...x.props,children:x.children}));}
35
+ const width=typeof window==='undefined'?1440:window.innerWidth,breakpoint=width<576?'xs':width<768?'sm':width<992?'md':width<1200?'lg':'xl';
36
+ const count=typeof p.column==='number'?p.column:p.column?.[breakpoint]||p.column?.md||p.column?.sm||3,rows=[];let current=[],used=0;
37
+ for(const item of items||[]){let span=item.span==='filled'?count-used:Math.min(count,Number(item.span)||1);if(used+span>count){rows.push(current);current=[];used=0;}current.push({...item,_span:span});used+=span;if(used===count){rows.push(current);current=[];used=0;}}if(current.length)rows.push(current);
38
+ return h('div',{...attrs(p),class:['ant-descriptions',p.bordered&&'ant-descriptions-bordered',p.size&&'ant-descriptions-'+p.size,p.class]},[p.title&&h('div',{class:'ant-descriptions-header'},h('div',{class:'ant-descriptions-title'},p.title)),h('div',{class:'ant-descriptions-view'},h('table',{},h('tbody',{},rows.map(row=>h('tr',{class:'ant-descriptions-row'},row.flatMap(item=>{const value=item.content??item.children,content=typeof value==='function'?value():value;return p.bordered?[h('th',{class:'ant-descriptions-item-label'},item.label),h('td',{class:'ant-descriptions-item-content',colspan:item._span*2-1},content)]:[h('td',{class:'ant-descriptions-item',colspan:item._span},h('div',{class:'ant-descriptions-item-container'},[h('span',{class:'ant-descriptions-item-label'},item.label),h('span',{class:'ant-descriptions-item-content'},content)]))];}))))))]);
39
+ });
40
+ Descriptions.Item=defineWidget('Descriptions.Item',(p,s)=>h(Fragment,{},s.default?.()));
41
+ export const Tree=defineWidget('Tree',(p,s,ctx)=>{
42
+ const keys=Array.isArray(p.checkedKeys)?p.checkedKeys:p.checkedKeys?.checked||[],state=ctx.state(()=>({collapsed:new Set()}));
43
+ const descendants=node=>[node.key,...(node.children||[]).flatMap(descendants)];
44
+ const change=(node,checked)=>{const branch=descendants(node),next=checked?[...new Set([...keys,...branch])]:keys.filter(k=>!branch.includes(k));ctx.emit('update:checkedKeys',next);p.onCheck?.(next,{checked,node});};
45
+ const row=(node,level)=>{const collapsed=state.collapsed.has(node.key),all=descendants(node).filter(k=>k!==node.key),checked=keys.includes(node.key)||(all.length&&all.every(k=>keys.includes(k))),indeterminate=!checked&&all.some(k=>keys.includes(k));return h(Fragment,{},[h('div',{class:['ant-tree-treenode',node.disabled&&'ant-tree-treenode-disabled'],role:'treeitem','aria-expanded':node.children? !collapsed:undefined,style:{paddingInlineStart:level*24}},[h('span',{class:'ant-tree-switcher',onClick:()=>{if(state.collapsed.has(node.key))state.collapsed.delete(node.key);else state.collapsed.add(node.key);invalidate();}},node.children?h(collapsed?RightOutlined:DownOutlined):null),p.checkable&&h(Checkbox,{checked,indeterminate,disabled:p.disabled||node.disabled,'aria-label':typeof node.title==='string'?node.title:'选择权限', 'onUpdate:checked':v=>change(node,v)}),h('span',{class:'ant-tree-node-content-wrapper'},node.title)]),!collapsed&&(node.children||[]).map(n=>row(n,level+1))]);};
46
+ return h('div',{...attrs(p),class:['ant-tree',p.class],role:'tree'},(p.treeData||[]).map(n=>row(n,0)));
47
+ });
@@ -0,0 +1,63 @@
1
+ import { reactive, invalidate, currentOwner } from './state.js';
2
+
3
+ let definitions = [], navigating = false, externalPending=false;
4
+ const guards = new Set();
5
+ const route = reactive({ path: '/workbench', params: {}, query: {}, matched: null });
6
+ export function matchRoute(input, routes = definitions) {
7
+ const [pathname, search = ''] = input.replace(/^#/, '').split('?');
8
+ const path = pathname || '/';
9
+ for (const definition of routes) {
10
+ if (definition.path.includes('pathMatch')) continue;
11
+ const names = [];
12
+ const pattern = definition.path.replace(/:[A-Za-z0-9_]+/g, text => { names.push(text.slice(1)); return '([^/]+)'; });
13
+ const match = path.match(new RegExp('^' + pattern + '/?$'));
14
+ if (match) return { path, fullPath: path + (search ? '?' + search : ''), query: Object.fromEntries(new URLSearchParams(search)), params: Object.fromEntries(names.map((name, i) => [name, decodeURIComponent(match[i + 1])])), matched: definition };
15
+ }
16
+ return { path, params: {}, query: Object.fromEntries(new URLSearchParams(search)), matched: routes.find(r => r.path.includes('pathMatch')) || null };
17
+ }
18
+ function address(value) {
19
+ if (typeof value === 'string') return value.replace(/^#/, '');
20
+ const pathname = value.path || route.path;
21
+ const query = value.query || {};
22
+ const search = new URLSearchParams(Object.entries(query).filter(([, v]) => v !== undefined && v !== null).map(([k, v]) => [k, String(v)])).toString();
23
+ return pathname + (search ? '?' + search : '');
24
+ }
25
+ async function go(value, replace = false) {
26
+ const next = address(value), match = matchRoute(next);
27
+ if (match.path !== route.path) for (const guard of [...guards]) if (await guard(match, route) === false) return;
28
+ const changed=match.path!==route.path;navigating = true;
29
+ if (replace) history.replaceState(null, '', '#' + next); else if (location.hash !== '#' + next) history.pushState(null, '', '#' + next);
30
+ sync(); navigating = false;
31
+ if (changed) window.scrollTo(0, 0);
32
+ queueMicrotask(() => document.getElementById('main-content')?.focus({ preventScroll: true }));
33
+ }
34
+ async function externalNavigation(){
35
+ if(navigating||externalPending)return;
36
+ const requested=location.hash,match=matchRoute(requested);
37
+ if(match.path!==route.path&&guards.size){
38
+ externalPending=true;
39
+ history.replaceState(null,'','#'+(route.fullPath||route.path));
40
+ try{for(const guard of [...guards])if(await guard(match,route)===false)return;history.replaceState(null,'',requested);sync();}
41
+ finally{externalPending=false;}
42
+ }else sync();
43
+ }
44
+ function sync() {
45
+ let next = matchRoute(location.hash);
46
+ if (next.matched?.redirect) {
47
+ history.replaceState(null, '', '#' + next.matched.redirect);
48
+ next = matchRoute(next.matched.redirect);
49
+ }
50
+ Object.assign(route, next); invalidate();
51
+ }
52
+ export function installRoutes(routes) {
53
+ definitions = routes;
54
+ sync();
55
+ window.addEventListener('popstate', externalNavigation);
56
+ window.addEventListener('hashchange', externalNavigation);
57
+ }
58
+ export const useRoute = () => route;
59
+ export const useRouter = () => ({ push: value => go(value), replace: value => go(value, true), back: () => history.back() });
60
+ export function onBeforeRouteLeave(callback) {
61
+ guards.add(callback);
62
+ currentOwner()?.disposers.push(() => guards.delete(callback));
63
+ }
@@ -0,0 +1,90 @@
1
+ // Local prototype state; no framework, network or authentication dependency.
2
+ const stores = new Map(), proxies = new WeakMap(), watchers = new Set();
3
+ let owner = null, queued = false, rendering = () => {}, beforeWatches=()=>{};
4
+ const plain = value => value && (Array.isArray(value) || Object.getPrototypeOf(value) === Object.prototype);
5
+ const snapshot = value => { try { return JSON.stringify(value); } catch { return value; } };
6
+
7
+ export function setRenderScheduler(callback) { rendering = callback; }
8
+ export function setBeforeWatchFlush(callback) { beforeWatches = callback; }
9
+ export const currentOwner = () => owner;
10
+ export function withOwner(instance, callback) { const before = owner; owner = instance; try { return callback(); } finally { owner = before; } }
11
+ export function invalidate() {
12
+ if (queued) return;
13
+ queued = true;
14
+ queueMicrotask(() => {
15
+ queued = false;
16
+ beforeWatches();
17
+ flushWatches();
18
+ rendering();
19
+ });
20
+ }
21
+ function flushWatches() {
22
+ for (let pass = 0; pass < 8; pass++) {
23
+ let changed = false;
24
+ for (const item of [...watchers]) {
25
+ if (!item.active) continue;
26
+ const value = item.read(), fingerprint = snapshot(value);
27
+ if (fingerprint !== item.fingerprint) {
28
+ const old = item.previous;
29
+ item.previous = value; item.fingerprint = fingerprint;
30
+ item.callback(value, old); changed = true;
31
+ }
32
+ }
33
+ if (!changed) break;
34
+ }
35
+ }
36
+ export function reactive(value) {
37
+ if (!plain(value)) return value;
38
+ if (proxies.has(value)) return proxies.get(value);
39
+ const proxy = new Proxy(value, {
40
+ get(target, key, receiver) { return reactive(Reflect.get(target, key, receiver)); },
41
+ set(target, key, next, receiver) {
42
+ const old = target[key]; const result = Reflect.set(target, key, next, receiver);
43
+ if (!Object.is(old, next)) invalidate();
44
+ return result;
45
+ },
46
+ deleteProperty(target, key) { const present = key in target; const result = Reflect.deleteProperty(target, key); if (present) invalidate(); return result; },
47
+ });
48
+ proxies.set(value, proxy); proxies.set(proxy, proxy);
49
+ return proxy;
50
+ }
51
+ export function ref(value) {
52
+ let current = reactive(value);
53
+ return { __ref: true, get value() { return current; }, set value(next) { const changed = !Object.is(current, next); current = reactive(next); if (changed) invalidate(); } };
54
+ }
55
+ export function shallowRef(value) {
56
+ let current = value;
57
+ return { __ref: true, get value() { return current; }, set value(next) { if (!Object.is(current, next)) { current = next; invalidate(); } } };
58
+ }
59
+ export function computed(input) {
60
+ const getter = typeof input === 'function' ? input : input.get;
61
+ return { __ref: true, get value() { return getter(); }, set value(value) { if (typeof input !== 'function') input.set?.(value); } };
62
+ }
63
+ export const unref = value => value?.__ref ? value.value : value;
64
+ export function unwrap(data) {
65
+ return new Proxy(data, {
66
+ get(target, key) { if (key === Symbol.unscopables) return undefined; return unref(target[key]); },
67
+ set(target, key, value) { if (target[key]?.__ref) target[key].value = value; else target[key] = value; invalidate(); return true; },
68
+ });
69
+ }
70
+ export function watch(source, callback, options = {}) {
71
+ const read = () => Array.isArray(source) ? source.map(v => typeof v === 'function' ? v() : unref(v)) : typeof source === 'function' ? source() : unref(source);
72
+ const initial = read();
73
+ const item = { read, callback, previous: initial, fingerprint: snapshot(initial), active: true };
74
+ watchers.add(item);
75
+ const stop = () => { item.active = false; watchers.delete(item); };
76
+ owner?.disposers.push(stop);
77
+ if (options.immediate) callback(initial, undefined);
78
+ return stop;
79
+ }
80
+ export function defineStore(id, setup) {
81
+ return () => {
82
+ if (!stores.has(id)) stores.set(id, withOwner(null, () => unwrap(setup())));
83
+ return stores.get(id);
84
+ };
85
+ }
86
+ export const nextTick = callback => Promise.resolve().then(() => { flushWatches(); return callback?.(); });
87
+ export const onMounted = callback => owner?.mounted.push(callback);
88
+ export const onUpdated = callback => owner?.updated.push(callback);
89
+ export const onBeforeUnmount = callback => owner?.disposers.push(callback);
90
+ export const withDefaults = (props, defaults) => new Proxy(props, { get(target, key) { return target[key] === undefined ? defaults[key] : target[key]; } });
@@ -0,0 +1,41 @@
1
+ import { h,defineWidget,Fragment } from './dom.js';
2
+ import { ref,reactive,unref } from './state.js';
3
+ import { Checkbox,Radio,Select,attrs,uid } from './controls.js';
4
+ import { Empty } from './layout.js';
5
+ import { LeftOutlined,RightOutlined,LoadingOutlined } from './icons.js';
6
+
7
+ export const useTable=(options={})=>{const pageParam=reactive({current:1,pageSize:10,total:0,...options.pageParam});return {columns:ref(options.columns||[]),dataSource:ref([]),pageParam,setPageParam:partial=>Object.assign(pageParam,partial)};};
8
+ export const Pagination=defineWidget('Pagination',(p,s,ctx)=>{
9
+ const total=p.total||0,size=p.pageSize||10,current=p.current||1,last=Math.max(1,Math.ceil(total/size)),pages=last<=7?Array.from({length:last},(_,i)=>i+1):[1,...(current>4?['…']:[]),...Array.from({length:Math.min(5,last-2)},(_,i)=>Math.min(Math.max(2,current-2),last-5)+i),...(current<last-3?['…']:[]),last];
10
+ const change=(page,perPage=size)=>{if(page<1||page>Math.max(1,Math.ceil(total/perPage)))return;ctx.emit('update:current',page);ctx.emit('update:pageSize',perPage);p.onChange?.(page,perPage);};
11
+ if(p.hideOnSinglePage&&last<=1)return null;
12
+ return h('ul',{...attrs(p),class:['ant-pagination',p.size==='small'&&'ant-pagination-small ant-pagination-mini',p.class]},[
13
+ p.showTotal&&h('li',{class:'ant-pagination-total-text'},p.showTotal(total,[(current-1)*size+1,Math.min(current*size,total)])),
14
+ h('li',{class:['ant-pagination-prev',current===1&&'ant-pagination-disabled'],title:'上一页'},h('button',{class:'ant-pagination-item-link',disabled:current===1,'aria-label':'上一页',onClick:()=>change(current-1)},h(LeftOutlined))),
15
+ pages.map(page=>h('li',{class:typeof page==='number'?['ant-pagination-item',page===current&&'ant-pagination-item-active']:'ant-pagination-jump-next',title:typeof page==='number'?String(page):undefined},typeof page==='number'?h('a',{role:'button',tabindex:0,'aria-label':'第 '+page+' 页','aria-current':page===current?'page':undefined,onClick:()=>change(page),onKeydown:e=>{if(e.key==='Enter')change(page);}},page):'•••')),
16
+ h('li',{class:['ant-pagination-next',current===last&&'ant-pagination-disabled'],title:'下一页'},h('button',{class:'ant-pagination-item-link',disabled:current===last,'aria-label':'下一页',onClick:()=>change(current+1)},h(RightOutlined))),
17
+ p.showSizeChanger&&h('li',{class:'ant-pagination-options'},h(Select,{value:size,size:p.size==='small'?'small':undefined,'aria-label':'每页条数',options:(p.pageSizeOptions||[10,20,50,100]).map(v=>({value:Number(v),label:v+' 条/页'})),onChange:v=>{p.onShowSizeChange?.(1,v);change(1,v);}})),
18
+ ]);
19
+ });
20
+ export const ProTable=defineWidget('ProTable',(p,s,ctx)=>{
21
+ const table=p.table,rows=unref(table.dataSource)||[],columns=unref(table.columns)||[],selection=p.rowSelection,page=table.pageParam,key=row=>typeof p.rowKey==='function'?p.rowKey(row):row[p.rowKey||'key'],selected=selection?.selectedRowKeys||[],enabled=rows.filter(r=>!selection?.getCheckboxProps?.(r)?.disabled),all=enabled.length>0&&enabled.every(r=>selected.includes(key(r)));
22
+ const change=keys=>selection?.onChange?.(keys,rows.filter(r=>keys.includes(key(r))));
23
+ const fixed=c=>c.fixed?{position:'sticky',insetInlineEnd:c.fixed==='right'||c.fixed==='end'?0:undefined,insetInlineStart:c.fixed==='left'||c.fixed==='start'?0:undefined,zIndex:2}:undefined;
24
+ const classCell=c=>['ant-table-cell',c.fixed&&'ant-table-cell-fix',c.fixed&&'ant-table-cell-fix-end'];
25
+ const cell=(column,row,index)=>{const value=Array.isArray(column.dataIndex)?column.dataIndex.reduce((v,k)=>v?.[k],row):row[column.dataIndex];return column.render?column.render(value,row,index):value;};
26
+ return h('div',{...attrs(p),class:['pro-table',p.class],style:p.style},[
27
+ (s.toolbar||s['button-bar'])&&h('div',{class:'pro-table_header'},[s['button-bar']&&h('div',{class:'pro-table_header_button-bar'},s['button-bar']()),s.toolbar&&h('div',{class:'pro-table_header_toolbar'},s.toolbar())]),
28
+ h('div',{class:'ant-table-wrapper ant-table-css-var pro-table_content'},h('div',{class:'ant-spin','aria-live':'polite','aria-busy':!!p.loading},[
29
+ p.loading&&h('div',{class:'native-table-loading',role:'status'},[h(LoadingOutlined),' 加载中…']),
30
+ h('div',{class:'ant-spin-container'},[
31
+ h('div',{class:['ant-table',p.size==='small'?'ant-table-small':'ant-table-medium','ant-table-css-var',p.scroll&&'ant-table-scroll-horizontal']},h('div',{class:'ant-table-container'},h('div',{class:'ant-table-content',style:{overflow:'auto hidden'}},h('table',{style:{width:p.scroll?.x||'100%',minWidth:'100%',tableLayout:'auto'}},[
32
+ h('colgroup',{},[selection&&h('col',{class:'ant-table-selection-col',style:{width:48}}),columns.map(c=>h('col',{style:{width:c.width}}))]),
33
+ h('thead',{class:'ant-table-thead'},h('tr',{},[selection&&h('th',{class:'ant-table-cell ant-table-selection-column',scope:'col'},selection.type==='radio'?'':(selection.columnTitle||((x)=>x))(h(Checkbox,{checked:all,disabled:!enabled.length,'aria-label':'全选当前页','onUpdate:checked':checked=>change(checked?[...new Set([...selected,...enabled.map(key)])]:selected.filter(k=>!enabled.some(r=>key(r)===k)))}))),columns.map(c=>h('th',{class:classCell(c),scope:'col',style:fixed(c)},c.title))])),
34
+ h('tbody',{class:'ant-table-tbody'},rows.length?rows.map((row,index)=>h('tr',{key:key(row),class:['ant-table-row ant-table-row-level-0',selected.includes(key(row))&&'ant-table-row-selected'],'data-row-key':key(row)},[selection&&h('td',{class:'ant-table-cell ant-table-selection-column'},(selection.renderCell||((_checked,_row,_index,node)=>node))(selected.includes(key(row)),row,index,h(selection.type==='radio'?Radio:Checkbox,{...selection.getCheckboxProps?.(row),name:uid(ctx.id),checked:selected.includes(key(row)),'aria-label':selection.getCheckboxProps?.(row)?.['aria-label']||'选择'+(row.name||row.title||row.code||key(row)),'onUpdate:checked':checked=>change(selection.type==='radio'?[key(row)]:checked?[...selected,key(row)]:selected.filter(k=>k!==key(row)))}))),columns.map(c=>h('td',{class:classCell(c),style:fixed(c)},cell(c,row,index)))])):h('tr',{class:'ant-table-placeholder'},h('td',{class:'ant-table-cell',colspan:columns.length+(selection?1:0)},p.locale?.emptyText||h(Empty,{description:'暂无数据'})))),
35
+ ])))),
36
+ p.pagination!==false&&h(Pagination,{...page,size:p.size==='large'?'default':'small',...p.pagination,class:'ant-table-pagination ant-table-pagination-end',onChange:(current,pageSize)=>{table.setPageParam({current,pageSize});p.onChange?.({current,pageSize});}}),
37
+ s.footer?.(),
38
+ ]),
39
+ ])),
40
+ ]);
41
+ });
@@ -0,0 +1,8 @@
1
+ export * from './controls.js';
2
+ export * from './layout.js';
3
+ export * from './forms.js';
4
+ export * from './table.js';
5
+ export * from './dialogs.js';
6
+ import { h,defineWidget } from './dom.js';
7
+ import { useRouter } from './router.js';
8
+ export const RouterLink=defineWidget('RouterLink',(p,s)=>h('a',{...p,href:'#'+p.to,onClick:e=>{if(e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)return;e.preventDefault();p.onClick?.(e);useRouter().push(p.to);}},s.default?.()));
@@ -0,0 +1,3 @@
1
+ <!-- 来源:src/agents/AgentDetail.vue;HTML / 原生 DOM 绑定,不含 Vue 运行时。 -->
2
+ <template data-component="Result" data-if="(!agent)" status="404" title="Agent 不存在或无权访问"><template data-slot="extra"><template data-component="Button" data-on-click="(router.push('/agents'))">返回列表</template></template></template><template data-else=""><div class="page-heading"><div><template data-component="Button" type="link" class="agent-back" data-on-click="(router.push('/agents'))">← 返回列表</template><div class="agent-title"><h1>{{ (agent.name) }}</h1><template data-component="Tag" data-bind-color="(agent.enabled ? 'green' : 'default')">{{ (agent.enabled ? '已启用' : '已停用') }}</template></div><p>{{ (agent.description || '暂无用途说明') }}</p></div><template data-component="Space" wrap=""><template data-component="Button" data-bind-disabled="(!can('agent:check'))" data-on-click="(check)">检查配置</template><template data-component="Button" data-bind-disabled="(!can('agent:status') || (!agent.enabled &amp;&amp; !!issues))" data-on-click="(toggle)">{{ (agent.enabled ? '停用 Agent' : '启用 Agent') }}</template><template data-component="Button" type="primary" data-bind-disabled="(!can('agent:edit') || agent.enabled)" data-on-click="(router.push('/agents/' + agent?.id + '/edit'))">编辑配置</template></template></div><template data-component="Alert" data-if="(error)" class="page-alert" type="error" data-bind-title="(error)" show-icon=""></template><template data-component="Alert" data-if="(issues)" class="page-alert" type="warning" show-icon="" data-bind-title="(issues + ' 项配置或授权待处理')" description="可保存配置;处理问题后才能启用。模型授权由有权成员在模型管理中配置。"><template data-slot="action"><template data-component="Button" data-on-click="(active = 'checks')">查看问题</template></template></template><div class="agent-meta-strip"><span>标识 <strong>{{ (agent.code) }}</strong></span><span>职责 <strong>{{ (duties.find(d =&gt; d.value === agent?.duty)?.label) }}</strong></span><span>项目 <strong>{{ (agent.project) }}</strong></span><span>租户 <strong>{{ (tenantLabel(agent.tenantId)) }}</strong></span><span>记录版本 <strong>v{{ (agent.recordVersion) }}</strong></span></div><section class="agent-panel"><template data-component="Tabs" data-model-active-key="(active)" data-bind-items="([{ key: 'config', label: '配置详情' }, { key: 'checks', label: '引用与检查' }, ...(can('agent:audit') ? [{ key: 'records', label: '操作记录' }] : [])])"></template><div data-if="(active === 'config')" class="agent-detail-grid"><div><h2>四要素配置</h2><div class="agent-detail-resource"><div class="agent-section-title"><span>01</span><h3>模型</h3></div><strong>{{ (model?.name || '未选择模型') }}</strong><p class="muted">{{ (model?.version ? '已发布 v' + model.version : '尚未发布') }} · {{ (model?.authorized ? '使用已授权' : '待使用授权') }}</p><p>模型凭据由平台统一托管。</p></div><div data-each="kind in (['prompt', 'skill', 'tool'])" data-bind-key="(kind)" class="agent-detail-resource"><div class="agent-section-title"><span>{{ (kind === 'prompt' ? '02' : kind === 'skill' ? '03' : '04') }}</span><h3>{{ (kind === 'prompt' ? '提示词预设' : kind === 'skill' ? '技能' : '工具白名单') }}</h3></div><template data-each="r in (resources.filter(r =&gt; r.kind === kind))" data-bind-key="(r.id)"><p><strong>{{ (r.name) }}</strong> <template data-component="Tag">{{ (r.version) }}</template></p><p class="muted">{{ (r.description) }}</p><p data-if="(kind === 'prompt')" class="agent-prompt">{{ (r.content) }}</p><p data-if="('allow' in r)" class="agent-allow"><span data-each="op in (r.allow)" data-bind-key="(op)">{{ (op) }}</span></p><small class="muted">{{ ('type' in r ? r.type + ' · ' : '') }}{{ (r.id) }}</small></template><p data-if="(!resources.some(r =&gt; r.kind === kind))" class="muted">未绑定可用资源</p></div><h3>运行边界</h3><p>记忆消息数:{{ (agent.memoryLimit) }} 条;连续工具调用上限:{{ (agent.toolLimit) }} 次。</p></div><template data-component="RecordMetadata" data-bind-record="(agent)" compact=""></template></div><div data-else-if="(active === 'checks')" class="agent-detail-grid"><section><h2>配置与资源检查</h2><template data-component="CheckResults" data-bind-items="(checks)"></template><template data-component="RouterLink" data-if="(session.can('model:grant', 'platform'))" to="/models">前往模型管理配置使用授权 →</template></section><section><h2>引用此 Agent 的流程</h2><div data-each="r in (agent.references)" data-bind-key="(r.name + ':' + r.version)" class="agent-resource"><div><strong>{{ (r.name) }}</strong><p>{{ (r.version) }} · 正在引用</p></div><template data-component="Tag">流程引用</template></div><p data-if="(!agent.references.length)" class="muted">当前没有流程模板引用。</p><p class="muted">删除前须处理草稿与发布版本中的引用;停用模板不会解除历史引用。</p><template data-component="Button" danger="" data-bind-disabled="(!can('agent:delete'))" data-on-click="(targets = [agent])">删除 Agent</template></section></div><section data-else-if="(active === 'records' &amp;&amp; can('agent:audit'))"><h2>操作记录</h2><p data-if="(!store.audit(agent).length)" class="muted">暂无操作记录。保存、启停、检查和删除操作将在此留痕。</p><ol class="agent-audit"><li data-each="entry in (store.audit(agent))" data-bind-key="(entry.id)"><strong>{{ (entry.action) }}</strong><span>{{ (entry.actor) }} · {{ (formatDate(entry.at)) }}</span><p>{{ (entry.detail) }}</p></li></ol></section></section><template data-component="ListDeleteDialog" data-if="(targets.length)" data-model-targets="(targets)" label="Agent" data-bind-check="(store.checkRemove)" data-bind-submit="(store.removeMany)" data-on-close="(targets = [])" data-on-deleted="targets = [];
3
+ router.push('/agents');"></template></template>
@@ -0,0 +1,36 @@
1
+ import { computed, ref } from '../../runtime/state.js';
2
+ import { useRoute, useRouter } from "../../runtime/router.js";
3
+ import { Alert, Button, Result, Space, Tabs, Tag, message } from "../../runtime/widgets.js";
4
+ import { useAgents } from "./store.js";
5
+ import { useSession } from "../shared/session.js";
6
+ import { duties } from "./domain.js";
7
+ import { formatDate, tenantLabel } from "../shared/policy.js";
8
+ import { confirmAction } from "../shell/confirmation.js";
9
+ import CheckResults from "./CheckResults.js";
10
+ import RecordMetadata from "../shared/RecordMetadata.js";
11
+ import ListDeleteDialog from "../shared/ListDeleteDialog.js";
12
+ import { createComponent } from '../../runtime/dom.js';
13
+ export default createComponent({ name: 'AgentDetail', propKeys: [], template: new URL('./AgentDetail.html', import.meta.url).href, setup(__props, __emit) {
14
+ const route = useRoute(), router = useRouter(), store = useAgents(), session = useSession(), active = ref(route.query.tab === 'records' ? 'records' : 'config'), error = ref(''), targets = ref([]);
15
+ const agent = computed(() => store.item(String(route.params.id))), checks = computed(() => agent.value ? store.checks(agent.value) : []), issues = computed(() => checks.value.filter(c => !c.ok).length), model = computed(() => agent.value ? store.choices(agent.value).find(m => m.id === agent.value.modelRef) : undefined);
16
+ const resources = computed(() => agent.value ? [agent.value.promptRef, ...agent.value.skillRefs, ...agent.value.tools.map(t => t.ref)].filter(Boolean).map(id => store.resources.find(r => r.id === id) || { id, name: '引用不可用', kind: 'unknown', version: '—', description: '资源已失效或不在可见范围', content: '' }) : []);
17
+ function can(action) { return !!agent.value && session.can(action, agent.value.tenantId, agent.value.pbcId); }
18
+ function check() { if (!agent.value)
19
+ return; try {
20
+ store.check(agent.value.id, agent.value.recordVersion);
21
+ active.value = 'checks';
22
+ message.info(issues.value ? issues.value + ' 项配置待处理' : '本地配置与引用检查通过');
23
+ }
24
+ catch (e) {
25
+ error.value = e.message;
26
+ } }
27
+ function toggle() { const a = agent.value; if (!a)
28
+ return; confirmAction({ title: (a.enabled ? '停用' : '启用') + a.name + '?', content: a.enabled ? '停用后可编辑配置;新任务不再使用此配置。' : '将重新检查资源与模型使用授权,全部通过后启用。', okText: a.enabled ? '确认停用' : '确认启用', cancelText: '取消', onOk: () => { try {
29
+ store.toggle(a.id, a.recordVersion);
30
+ message.success('Agent 状态已更新');
31
+ }
32
+ catch (e) {
33
+ error.value = e.message;
34
+ } } }); }
35
+ return { computed, ref, useRoute, useRouter, Alert, Button, Result, Space, Tabs, Tag, message, useAgents, useSession, duties, formatDate, tenantLabel, confirmAction, CheckResults, RecordMetadata, ListDeleteDialog, route, router, store, session, active, error, targets, agent, checks, issues, model, resources, can, check, toggle };
36
+ } });
@@ -0,0 +1,2 @@
1
+ <!-- 来源:src/agents/AgentEditor.vue;HTML / 原生 DOM 绑定,不含 Vue 运行时。 -->
2
+ <template data-component="Result" data-if="(!isNew &amp;&amp; !original)" status="404" title="Agent 不存在或无权访问"><template data-slot="extra"><template data-component="Button" data-on-click="(router.push('/agents'))">返回列表</template></template></template><template data-else=""><div class="page-heading"><div><template data-component="Button" class="agent-back" type="link" data-on-click="(router.push(original ? '/agents/' + original.id : '/agents'))">← 返回{{ (original ? '详情' : '列表') }}</template><h1>{{ (isNew ? '注册 Agent' : '配置 Agent') }}</h1><p>组合模型、提示词、技能与工具,明确 Agent 的工作职责。</p></div><template data-component="Space"><template data-component="Button" data-on-click="(router.push('/agents'))">取消</template><template data-component="Button" type="primary" data-bind-disabled="(!allowed)" data-bind-loading="(busy)" data-on-click="(save)">保存配置</template></template></div><template data-component="Alert" data-if="(!allowed)" class="page-alert" type="warning" show-icon="" data-bind-title="(original?.enabled ? 'Agent 已启用,请先停用后编辑' : '当前身份没有此项目的配置权限')"></template><template data-component="Alert" data-if="(error)" data-agent-error="" class="page-alert" type="error" show-icon="" data-bind-title="(error)" description="本次未提交,输入已保留。"></template><div class="agent-editor-layout"><div><section class="agent-panel"><h2>基本信息</h2><template data-component="Form" layout="vertical" data-bind-disabled="(!allowed || busy)"><div class="agent-form-grid"><template data-component="FormItem" label="Agent 名称" required=""><template data-component="Input" data-model-value="(data.name)" aria-label="Agent 名称" data-bind-maxlength="(60)" placeholder="例如:工单需求规划 Agent"></template></template><template data-component="FormItem" label="Agent 标识" required="" extra="同租户唯一,创建后不可修改。"><template data-component="Input" data-model-value="(data.code)" aria-label="Agent 标识" data-bind-maxlength="(48)" data-bind-disabled="(!isNew)" placeholder="例如:workorder-planner"></template></template><template data-component="FormItem" label="所属项目 / PBC" required=""><template data-component="Select" data-bind-value="(data.pbcId)" aria-label="所属项目 / PBC" data-bind-disabled="(!isNew)" data-bind-options="(store.projects.map(p =&gt; ({ value: p.id, label: p.name + ' · ' + tenantLabel(p.tenantId) })))" data-on-change="(project)"></template></template><template data-component="FormItem" label="Agent 职责" required="" extra="描述 Agent 执行的工作,不决定成员权限。"><template data-component="Select" data-model-value="(data.duty)" aria-label="Agent 职责" data-bind-options="(duties)"></template></template></div><template data-component="FormItem" label="用途说明"><template data-component="Input.TextArea" data-model-value="(data.description)" aria-label="用途说明" data-bind-rows="(2)" data-bind-maxlength="(400)" placeholder="说明它为哪个业务环节提供什么能力"></template></template></template></section><section class="agent-panel"><div class="agent-section-title"><span>01</span><h2>模型</h2></div><p class="muted">选择已登记模型。启用前需具备该项目与 Agent 的模型使用授权。</p><template data-component="Select" data-model-value="(data.modelRef)" class="full-width" aria-label="模型" placeholder="选择模型" data-bind-disabled="(!allowed)" data-bind-options="(models.filter(m =&gt; !m.deleted || m.id === data.modelRef).map(m =&gt; ({ value: m.id, label: m.name + (m.version ? ' · v' + m.version : ' · 未发布') + (!m.enabled ? ' · 已停用' : '') })))"></template><div data-if="(chosenModel)" class="agent-model-summary"><div><strong>{{ (chosenModel.name) }}</strong><template data-component="Tag" data-bind-color="(chosenModel.enabled &amp;&amp; chosenModel.version ? 'green' : 'default')">{{ (chosenModel.version ? '已发布 v' + chosenModel.version : '未发布') }}</template><template data-component="Tag" data-bind-color="(chosenModel.authorized ? 'blue' : 'orange')">{{ (chosenModel.authorized ? '使用已授权' : '待使用授权') }}</template></div><p>{{ (chosenModel.capabilities.join(' · ')) }}</p></div><p class="muted">模型凭据由平台托管。此处只引用模型配置。</p></section><section class="agent-panel"><div class="agent-section-title"><span>02</span><h2>提示词预设</h2></div><p class="muted">选择负责该职责的预设,查看具体指令与版本。</p><template data-component="ResourcePicker" kind="prompt" data-bind-values="(data.promptRef ? [data.promptRef] : [])" data-bind-resources="(store.resources)" data-bind-tenant-id="(data.tenantId)" data-bind-disabled="(!allowed)" data-on-change="(data.promptRef = $event[0] || '')"></template></section><section class="agent-panel"><div class="agent-section-title"><span>03</span><h2>技能</h2><template data-component="Tag">可选</template></div><p class="muted">按需组合技能,每项引用固定的示例资源版本。</p><template data-component="ResourcePicker" kind="skill" data-bind-values="(data.skillRefs)" data-bind-resources="(store.resources)" data-bind-tenant-id="(data.tenantId)" data-bind-disabled="(!allowed)" data-on-change="(data.skillRefs = $event)"></template></section><section class="agent-panel"><div class="agent-section-title"><span>04</span><h2>工具</h2><template data-component="Tag">可选</template></div><p class="muted">仅允许所选工具的声明操作;工具类型与资源引用一起保存。</p><template data-component="ResourcePicker" kind="tool" data-bind-values="(data.tools.map(t =&gt; t.ref))" data-bind-resources="(store.resources)" data-bind-tenant-id="(data.tenantId)" data-bind-disabled="(!allowed)" data-on-change="(toolRefs)"></template></section><section class="agent-panel"><h2>运行边界</h2><template data-component="Form" layout="vertical" data-bind-disabled="(!allowed)"><div class="agent-form-grid"><template data-component="FormItem" label="记忆消息数"><template data-component="InputNumber" data-model-value="(data.memoryLimit)" aria-label="记忆消息数" data-bind-min="(1)" data-bind-max="(200)" data-bind-precision="(0)"></template></template><template data-component="FormItem" label="连续工具调用上限"><template data-component="InputNumber" data-model-value="(data.toolLimit)" aria-label="连续工具调用上限" data-bind-min="(1)" data-bind-max="(50)" data-bind-precision="(0)"></template></template></div></template><p class="muted">示例默认值用于原型评审,正式运行参数随规格确认。</p></section></div><aside class="agent-check-panel"><section class="agent-panel"><h2>配置检查</h2><p class="muted">先保存配置,再启用。资源尚未准备齐全时,可保留为停用草稿。</p><template data-component="Tag" data-bind-color="(issues ? 'orange' : 'green')">{{ (issues ? issues + ' 项待处理' : '配置与引用检查通过') }}</template><template data-component="Button" class="agent-check-button" data-bind-disabled="(!session.can('agent:check', data.tenantId, data.pbcId))" data-on-click="(showCheck = true)">检查当前配置</template><template data-component="CheckResults" data-if="(showCheck)" data-bind-items="(checks)"></template><div data-else="" class="agent-outline"><p>模型:{{ (chosenModel?.name || '待选择') }}</p><p>提示词:{{ (data.promptRef ? '已选择' : '待选择') }}</p><p>技能:{{ (data.skillRefs.length) }} 项</p><p>工具:{{ (data.tools.length) }} 项</p></div></section></aside></div><div class="agent-save-bar"><span>{{ (dirty ? '有未保存的修改' : '保存后可在详情中检查并启用') }}</span><template data-component="Button" type="primary" data-bind-disabled="(!allowed)" data-bind-loading="(busy)" data-on-click="(save)">保存配置</template></div></template>
@@ -0,0 +1,51 @@
1
+ import { computed, onBeforeUnmount, reactive, ref } from '../../runtime/state.js';
2
+ import { onBeforeRouteLeave, useRoute, useRouter } from "../../runtime/router.js";
3
+ import { Alert, Button, Form, FormItem, Input, InputNumber, Select, Space, Tag, Result, message } from "../../runtime/widgets.js";
4
+ import { useAgents } from "./store.js";
5
+ import { useSession } from "../shared/session.js";
6
+ import { tenantLabel } from "../shared/policy.js";
7
+ import { duties } from "./domain.js";
8
+ import { confirmAction } from "../shell/confirmation.js";
9
+ import ResourcePicker from "./ResourcePicker.js";
10
+ import CheckResults from "./CheckResults.js";
11
+ import { createComponent } from '../../runtime/dom.js';
12
+ export default createComponent({ name: 'AgentEditor', propKeys: [], template: new URL('./AgentEditor.html', import.meta.url).href, setup(__props, __emit) {
13
+ const route = useRoute(), router = useRouter(), store = useAgents(), session = useSession();
14
+ const isNew = route.path === '/agents/new', original = isNew ? undefined : store.item(String(route.params.id));
15
+ const data = reactive(JSON.parse(JSON.stringify(original || store.blank())));
16
+ const start = JSON.stringify(data), saved = ref(false), error = ref(''), busy = ref(false), showCheck = ref(false);
17
+ const dirty = computed(() => !saved.value && JSON.stringify(data) !== start);
18
+ const allowed = computed(() => session.can('agent:edit', data.tenantId, data.pbcId) && !original?.enabled && (isNew || !!original));
19
+ const models = computed(() => store.choices(data)), chosenModel = computed(() => models.value.find(m => m.id === data.modelRef)), checks = computed(() => store.checks(data)), issues = computed(() => checks.value.filter(c => !c.ok).length);
20
+ function project(value) { const p = store.projects.find(p => p.id === String(value)); if (p) {
21
+ data.pbcId = p.id;
22
+ data.project = p.resourceKey || p.name;
23
+ data.tenantId = p.tenantId;
24
+ } }
25
+ function toolRefs(ids) { data.tools = ids.map(ref => ({ ref, type: store.resources.find(r => r.id === ref)?.type || 'MCP' })); }
26
+ async function save() { if (busy.value)
27
+ return; error.value = ''; busy.value = true; try {
28
+ const id = store.save(data, isNew);
29
+ saved.value = true;
30
+ message.success('Agent 配置已保存');
31
+ await router.push('/agents/' + id);
32
+ }
33
+ catch (e) {
34
+ error.value = e.message;
35
+ showCheck.value = true;
36
+ await new Promise(r => requestAnimationFrame(r));
37
+ document.querySelector('[data-agent-error]')?.scrollIntoView({ block: 'center' });
38
+ }
39
+ finally {
40
+ busy.value = false;
41
+ } }
42
+ onBeforeRouteLeave(() => { if (!dirty.value || saved.value)
43
+ return true; return new Promise(resolve => confirmAction({ title: '放弃未保存的配置?', content: '本次修改尚未保存,离开后不会改变已有 Agent。', okText: '放弃修改', cancelText: '继续编辑', onOk: () => resolve(true), onCancel: () => resolve(false) })); });
44
+ function unload(e) { if (dirty.value) {
45
+ e.preventDefault();
46
+ e.returnValue = '';
47
+ } }
48
+ window.addEventListener('beforeunload', unload);
49
+ onBeforeUnmount(() => window.removeEventListener('beforeunload', unload));
50
+ return { computed, onBeforeUnmount, reactive, ref, onBeforeRouteLeave, useRoute, useRouter, Alert, Button, Form, FormItem, Input, InputNumber, Select, Space, Tag, Result, message, useAgents, useSession, tenantLabel, duties, confirmAction, ResourcePicker, CheckResults, route, router, store, session, isNew, original, data, start, saved, error, busy, showCheck, dirty, allowed, models, chosenModel, checks, issues, project, toolRefs, save, unload };
51
+ } });
@@ -0,0 +1,3 @@
1
+ <!-- 来源:src/agents/AgentsPage.vue;HTML / 原生 DOM 绑定,不含 Vue 运行时。 -->
2
+ <div class="page-heading"><div><h1>Agent 注册表</h1><p>管理交付流程所需的 Agent,组合模型、提示词、技能与工具。</p></div><template data-component="Button" type="primary" data-bind-disabled="(!session.can('agent:edit'))" data-on-click="(router.push('/agents/new'))">注册 Agent</template></div><div class="agent-overview"><span>共 <strong>{{ (store.records.length) }}</strong> 个 Agent</span><span>已启用 <strong>{{ (store.records.filter(a =&gt; a.enabled).length) }}</strong></span><span>待完善 <strong>{{ (store.records.filter(a =&gt; status(a) === '待完善').length) }}</strong></span><span class="muted">可用配置供流程模板引用</span></div><section class="auth-list"><div class="auth-filters"><template data-component="Input" data-model-value="(query)" aria-label="搜索 Agent" placeholder="搜索名称、标识或用途" allow-clear=""></template><template data-component="Select" data-model-value="(duty)" aria-label="职责筛选" data-bind-options="([{ value: 'all', label: '全部职责' }, ...duties])"></template><template data-component="Select" data-model-value="(project)" aria-label="项目筛选" data-bind-options="([{ value: 'all', label: '全部可见项目' }, ...projects.map(p =&gt; ({ value: p, label: p }))])"></template><template data-component="Select" data-model-value="(state)" aria-label="Agent 状态筛选" data-bind-options="([{ value: 'all', label: '全部状态' }, ...['已启用', '已停用', '待完善', '已启用 · 资源异常'].map(s =&gt; ({ value: s, label: s }))])"></template><template data-component="Button" data-on-click="(reset)">重置</template></div><div class="auth-tools"><template data-component="ListBatchBar" data-bind-count="(selection.selected.value.length)" data-bind-allowed="(canDelete)" data-on-remove="(targets = selection.selected.value)" data-on-clear="(selection.clear)"></template><template data-component="Space" wrap=""><template data-component="Button" data-on-click="(desc = !desc)">时间{{ (desc ? '倒序' : '正序') }}</template><template data-component="Button" data-bind-loading="(refreshing)" data-on-click="(refresh)">刷新</template><template data-component="ColumnSettings" data-bind-preferences="(prefs)"></template></template></div><template data-component="Alert" data-if="(error)" class="page-alert" type="error" show-icon="" data-bind-title="(error)" closable="" data-on-close="(error = '')"></template><template data-component="Alert" data-if="(store.scene === 'error')" type="error" show-icon="" title="Agent 列表加载失败" description="请重试,现有配置保持不变。"><template data-slot="action"><template data-component="Button" data-on-click="(refresh)">重试</template></template></template><template data-else=""><template data-component="ProTable" data-bind-table="(table)" data-bind-search="(async () =&gt; { })" data-bind-control="(false)" data-bind-table-container="(false)" row-key="id" data-bind-loading="(refreshing)" data-bind-row-selection="(selection.rowSelection.value)" data-bind-scroll="({ x: 'max-content' })" data-bind-pagination="({ showTotal: (n) =&gt; '共 ' + n + ' 项', showSizeChanger: true, pageSizeOptions: [5, 10, 20] })"></template><p data-if="(!filtered.length)" class="muted">没有符合条件的 Agent。可调整筛选,或注册新的 Agent。</p></template></section><template data-component="ListDeleteDialog" data-if="(targets.length)" data-model-targets="(targets)" label="Agent" data-bind-check="(store.checkRemove)" data-bind-submit="(store.removeMany)" data-on-close="(targets = [])" data-on-deleted="targets = [];
3
+ selection.clear();"></template>
@@ -0,0 +1,48 @@
1
+ import { computed, ref, watch } from '../../runtime/state.js';
2
+ import { h } from '../../runtime/dom.js';
3
+ import { useRouter } from "../../runtime/router.js";
4
+ import { Alert, Button, Input, Select, Space, Tag, message } from "../../runtime/widgets.js";
5
+ import { ProTable, useTable } from "../../runtime/widgets.js";
6
+ import { useAgents } from "./store.js";
7
+ import { useSession } from "../shared/session.js";
8
+ import { duties } from "./domain.js";
9
+ import { formatDate, tenantLabel } from "../shared/policy.js";
10
+ import { useColumns } from "../shared/columns.js";
11
+ import { useListSelection } from "../shared/listSelection.js";
12
+ import ListMore from "../shared/ListMore.js";
13
+ import ColumnSettings from "../shared/ColumnSettings.js";
14
+ import ListBatchBar from "../shared/ListBatchBar.js";
15
+ import ListDeleteDialog from "../shared/ListDeleteDialog.js";
16
+ import { confirmAction } from "../shell/confirmation.js";
17
+ import { createComponent } from '../../runtime/dom.js';
18
+ export default createComponent({ name: 'AgentsPage', propKeys: [], template: new URL('./AgentsPage.html', import.meta.url).href, setup(__props, __emit) {
19
+ const store = useAgents(), session = useSession(), router = useRouter(), query = ref(''), state = ref('all'), duty = ref('all'), project = ref('all'), desc = ref(true), refreshing = ref(false), targets = ref([]), error = ref('');
20
+ const prefs = useColumns('agents', [{ key: 'name', label: 'Agent 名称', locked: true }, { key: 'duty', label: '职责', defaultVisible: true }, { key: 'project', label: '所属项目', defaultVisible: true }, { key: 'status', label: '状态', defaultVisible: true }, { key: 'createdBy', label: '创建人', defaultVisible: true }, { key: 'createdAt', label: '创建时间', defaultVisible: true }, { key: 'code', label: 'Agent 标识' }, { key: 'tenantId', label: '所属租户' }, { key: 'createdDept', label: '创建部门' }, { key: 'updatedBy', label: '修改人' }, { key: 'updatedAt', label: '修改时间' }, { key: 'recordVersion', label: '记录版本' }, { key: 'actions', label: '操作', locked: true }]);
21
+ const canDelete = computed(() => session.can('agent:delete')), projects = computed(() => [...new Set(store.records.map(a => a.project))]);
22
+ function status(a) { const issues = store.checks(a).some(c => !c.ok); return a.enabled ? (issues ? '已启用 · 资源异常' : '已启用') : issues ? '待完善' : '已停用'; }
23
+ function toggle(a) { confirmAction({ title: (a.enabled ? '停用' : '启用') + a.name + '?', content: a.enabled ? '停用后不再作为新任务的可用配置。' : '启用前将重新检查配置与模型使用授权。', okText: a.enabled ? '确认停用' : '确认启用', cancelText: '取消', onOk: () => { try {
24
+ store.toggle(a.id, a.recordVersion);
25
+ message.success('Agent 状态已更新');
26
+ }
27
+ catch (e) {
28
+ error.value = e.message;
29
+ } } }); }
30
+ function action(key, a) { if (key === 'delete')
31
+ targets.value = [a];
32
+ else if (key === 'toggle')
33
+ toggle(a);
34
+ else
35
+ router.push('/agents/' + a.id + (key === 'edit' ? '/edit' : key === 'audit' ? '?tab=records' : '')); }
36
+ function actions(a) { const editable = session.can('agent:edit', a.tenantId, a.pbcId); return h('div', { class: 'row-actions' }, [h(Button, { type: 'link', disabled: !editable || a.enabled, onClick: () => action('edit', a) }, () => '配置'), h(ListMore, { name: a.name, items: [{ key: 'detail', label: '查看详情' }, { key: 'edit', label: '编辑配置', disabled: !editable || a.enabled }, { key: 'toggle', label: a.enabled ? '停用 Agent' : '启用 Agent', disabled: !session.can('agent:status', a.tenantId, a.pbcId) || (!a.enabled && store.checks(a).some(c => !c.ok)) }, { key: 'audit', label: '操作记录', disabled: !session.can('agent:audit', a.tenantId, a.pbcId) }, { key: 'delete', label: '删除 Agent', danger: true, disabled: !session.can('agent:delete', a.tenantId, a.pbcId) }], onAction: (k) => action(k, a) })]); }
37
+ const table = useTable({ pageParam: { current: 1, pageSize: 5, total: 0 }, columns: prefs.choices.map(c => ({ key: c.key, title: c.label, dataIndex: c.key, width: c.key === 'name' ? 220 : c.key === 'actions' ? 145 : c.key === 'duty' ? 110 : c.key === 'createdBy' ? 100 : c.key === 'createdAt' ? 175 : 130, fixed: c.key === 'actions' ? 'right' : undefined, ...(c.key === 'name' ? { render: (_, r) => h('div', [h(Button, { type: 'link', class: 'agent-name', onClick: () => router.push('/agents/' + r.id) }, () => String(r.name)), h('small', { class: 'agent-code' }, () => String(r.code))]) } : c.key === 'actions' ? { render: (_, r) => actions(r) } : c.key === 'status' ? { render: (_, r) => h(Tag, { color: status(r) === '已启用' ? 'green' : status(r) === '已停用' ? 'default' : 'orange' }, () => status(r)) } : c.key === 'duty' ? { render: (v) => duties.find(d => d.value === v)?.label } : c.key === 'tenantId' ? { render: (v) => tenantLabel(String(v)) } : c.key.endsWith('At') ? { render: (v) => formatDate(String(v)) } : {}) })) });
38
+ const columns = new Map(table.columns.value.map(c => [c.key, c]));
39
+ watch(prefs.keys, keys => table.columns.value = keys.map(k => columns.get(k)).filter(Boolean), { immediate: true });
40
+ const filtered = computed(() => store.scene === 'empty' ? [] : store.records.filter(a => (a.name + a.code + a.description).toLowerCase().includes(query.value.trim().toLowerCase()) && (duty.value === 'all' || a.duty === duty.value) && (project.value === 'all' || a.project === project.value) && (state.value === 'all' || status(a) === state.value)).sort((a, b) => desc.value ? b.createdAt.localeCompare(a.createdAt) : a.createdAt.localeCompare(b.createdAt)));
41
+ watch([filtered, () => table.pageParam.current, () => table.pageParam.pageSize], () => { const size = table.pageParam.pageSize || 5, max = Math.max(1, Math.ceil(filtered.value.length / size)); if ((table.pageParam.current || 1) > max)
42
+ table.setPageParam({ current: max }); const start = ((table.pageParam.current || 1) - 1) * size; table.dataSource.value = filtered.value.slice(start, start + size); table.setPageParam({ total: filtered.value.length }); }, { immediate: true });
43
+ const selection = useListSelection(table.dataSource, computed(() => JSON.stringify([session.key, query.value, state.value, duty.value, project.value, desc.value, table.pageParam.current, table.pageParam.pageSize])), canDelete, a => a.name);
44
+ watch([query, state, duty, project], () => table.setPageParam({ current: 1 }));
45
+ async function refresh() { selection.clear(); refreshing.value = true; await new Promise(r => setTimeout(r, 250)); store.scene = 'normal'; refreshing.value = false; }
46
+ function reset() { query.value = ''; state.value = 'all'; duty.value = 'all'; project.value = 'all'; }
47
+ return { computed, ref, watch, h, useRouter, Alert, Button, Input, Select, Space, Tag, message, ProTable, useTable, useAgents, useSession, duties, formatDate, tenantLabel, useColumns, useListSelection, ListMore, ColumnSettings, ListBatchBar, ListDeleteDialog, confirmAction, store, session, router, query, state, duty, project, desc, refreshing, targets, error, prefs, canDelete, projects, status, toggle, action, actions, table, columns, filtered, selection, refresh, reset };
48
+ } });
@@ -0,0 +1,2 @@
1
+ <!-- 来源:src/agents/CheckResults.vue;HTML / 原生 DOM 绑定,不含 Vue 运行时。 -->
2
+ <ul class="agent-checks" aria-label="配置检查结果"><li data-each="c in (items)" data-bind-key="(c.key)"><div><strong>{{ (c.label) }}</strong><template data-component="Tag" data-bind-color="(c.ok ? 'green' : 'orange')">{{ (c.ok ? '通过' : '待处理') }}</template></div><p>{{ (c.detail) }}</p></li></ul><p class="muted">当前为本地配置与引用检查,不代表真实连接、静态安全扫描或运行验收通过。</p>
@@ -0,0 +1,6 @@
1
+ import { Tag } from "../../runtime/widgets.js";
2
+ import { createComponent } from '../../runtime/dom.js';
3
+ export default createComponent({ name: 'CheckResults', propKeys: ["items"], template: new URL('./CheckResults.html', import.meta.url).href, setup(__props, __emit) {
4
+ __props;
5
+ return { Tag };
6
+ } });
@@ -0,0 +1,2 @@
1
+ <!-- 来源:src/agents/ResourcePicker.vue;HTML / 原生 DOM 绑定,不含 Vue 运行时。 -->
2
+ <template data-component="Select" class="full-width" data-bind-value="(kind === 'prompt' ? values[0] : values)" data-bind-mode="(kind === 'prompt' ? undefined : 'multiple')" data-bind-aria-label="(title)" data-bind-placeholder="('选择' + title)" data-bind-options="(options)" data-bind-disabled="(disabled)" allow-clear="" show-search="" data-bind-filter-option="((q, o) =&gt; String(o?.label).toLowerCase().includes(q.toLowerCase()))" data-on-change="(change)"></template><div class="agent-resources"><div data-each="r in (selected)" data-bind-key="(r.id)" class="agent-resource"><div><strong>{{ (r.name) }}</strong><template data-component="Tag">{{ (r.type || title) }} · {{ (r.version) }}</template><p>{{ (r.description) }}</p><div data-if="(r.allow)" class="agent-allow"><span data-each="a in (r.allow)" data-bind-key="(a)">{{ (a) }}</span></div></div><template data-component="Button" type="link" data-bind-aria-label="('查看' + r.name)" data-on-click="(shown = r)">查看</template></div></div><template data-component="Modal" data-bind-open="(!!shown)" data-bind-title="(shown?.name)" data-bind-footer="(null)" data-bind-width="(640)" data-on-cancel="(shown = undefined)"><template data-if="(shown)"><p class="muted">{{ (shown.version) }} · {{ (shown.state === 'ready' ? '可用' : '不可用') }}</p><p class="agent-prompt">{{ (shown.content) }}</p><p data-if="(shown.type)">绑定类型:{{ (shown.type) }}</p><p class="muted">资源引用:{{ (shown.id) }}</p><p data-if="(shown.allow)">允许操作:{{ (shown.allow.join('、')) }}</p></template></template>
@@ -0,0 +1,13 @@
1
+ import { computed, ref } from '../../runtime/state.js';
2
+ import { Button, Modal, Select, Tag } from "../../runtime/widgets.js";
3
+ import { createComponent } from '../../runtime/dom.js';
4
+ export default createComponent({ name: 'ResourcePicker', propKeys: ["kind", "values", "resources", "tenantId", "disabled"], template: new URL('./ResourcePicker.html', import.meta.url).href, setup(__props, __emit) {
5
+ const props = __props;
6
+ const emit = __emit;
7
+ const shown = ref();
8
+ const title = computed(() => props.kind === 'prompt' ? '提示词预设' : props.kind === 'skill' ? '技能' : '工具');
9
+ const options = computed(() => props.resources.filter(r => r.kind === props.kind).map(r => ({ value: r.id, label: r.name + ' · ' + r.version + (r.state !== 'ready' ? ' · 已停用' : !r.tenantIds.includes('*') && !r.tenantIds.includes(props.tenantId) ? ' · 超出范围' : ''), disabled: r.state !== 'ready' || (!r.tenantIds.includes('*') && !r.tenantIds.includes(props.tenantId)) })));
10
+ const selected = computed(() => props.values.map(id => props.resources.find(r => r.id === id) || { id, name: '引用不可用', kind: props.kind, version: '—', state: 'disabled', tenantIds: [], description: '资源已失效或无权查看', content: '' }));
11
+ function change(value) { emit('change', Array.isArray(value) ? value : value ? [String(value)] : []); }
12
+ return { computed, ref, Button, Modal, Select, Tag, props, emit, shown, title, options, selected, change };
13
+ } });
@@ -0,0 +1,24 @@
1
+ import { actors, metadata } from "../shared/policy.js";
2
+ export const resourceCatalog = [
3
+ { id: 'prompt-demand-v2', name: '需求澄清与规格整理', kind: 'prompt', version: 'v2', state: 'ready', tenantIds: ['*'], description: '把业务诉求整理成可确认的需求与验收条件。', content: '先明确业务目标、参与者和边界,再列出尚未解决的问题。根据已确认的意图生成规格草稿,逐条保留需求来源与验收条件。\n\n不得把自己的建议当作用户确认。涉及确认、发布和授权的动作,交由受控流程执行。' },
4
+ { id: 'prompt-code-v1', name: '契约驱动编码', kind: 'prompt', version: 'v1', state: 'ready', tenantIds: ['*'], description: '依据已确认规格和契约实现任务。', content: '读取规格、设计和任务清单。按任务实现并运行必要检查,保留修改与证据。遇到缺少确认的需求,返回待决项。' },
5
+ { id: 'prompt-review-v1', name: '独立质量评审', kind: 'prompt', version: 'v1', state: 'ready', tenantIds: ['*'], description: '按产物与契约进行独立检查。', content: '基于输入产物与验收契约检查缺陷,说明位置、影响和证据。不得以实现者的成功声明替代验证。' },
6
+ { id: 'prompt-retired', name: '旧版通用预设', kind: 'prompt', version: 'v1', state: 'disabled', tenantIds: ['*'], description: '已停用,保留历史引用。', content: '此版本已停用,请选择新预设。' },
7
+ { id: 'skill-spec-v1', name: '规格编写', kind: 'skill', version: 'v1', state: 'ready', tenantIds: ['*'], description: 'i3-prototype-antdv-spec-writing · 整理需求与验收条件', content: '输出结构化需求、边界、例外和可核验的验收条件。' },
8
+ { id: 'skill-contract-v1', name: '接口契约检查', kind: 'skill', version: 'v1', state: 'ready', tenantIds: ['*'], description: 'i3-prototype-antdv-contract-check · 检查接口一致性', content: '检查输入输出、错误与版本兼容性,给出可定位的差异。' },
9
+ { id: 'skill-test-v1', name: '测试设计', kind: 'skill', version: 'v1', state: 'ready', tenantIds: ['*'], description: 'i3-prototype-antdv-test-design · 设计关键测试场景', content: '覆盖正常、失败、状态转换和授权边界,输出测试设计。' },
10
+ { id: 'skill-north-v1', name: '能源业务词汇', kind: 'skill', version: 'v1', state: 'ready', tenantIds: ['north'], description: '北方能源专用资源', content: '用于北方能源业务术语对齐。' },
11
+ { id: 'mcp-gitlab-read-v1', name: 'GitLab 资料读取', kind: 'tool', type: 'MCP', version: 'v1', state: 'ready', tenantIds: ['*'], description: '读取规格、议题和仓库文件。', content: '只读取当前项目已授权的资料;不提供合并、删除或发布操作。', allow: ['read_issue', 'read_repository_file'] },
12
+ { id: 'http-contract-v1', name: '接口契约查询', kind: 'tool', type: 'HTTP', version: 'v1', state: 'ready', tenantIds: ['*'], description: '查询已登记的接口契约。', content: '仅检索项目接口契约,不允许任意地址访问。', allow: ['get_contract'] },
13
+ { id: 'mcp-legacy-v1', name: '旧版文档服务', kind: 'tool', type: 'MCP', version: 'v1', state: 'disabled', tenantIds: ['*'], description: '服务已停用', content: '此服务已停用。', allow: ['read_document'] },
14
+ ];
15
+ export function seedAgents() {
16
+ const names = ['需求规划 Agent', '研发编码 Agent', '质量评审 Agent', '测试验证 Agent', '接口设计 Agent', '知识整理 Agent'];
17
+ return names.map((name, i) => ({ ...metadata(actors[0], new Date(Date.UTC(2026, 8, 10, 9, 5 - i)).toISOString(), i === 5 ? 'north' : 'heating'),
18
+ id: 'agent-' + i, name, code: ['demand-planner', 'code-worker', 'quality-reviewer', 'test-designer', 'api-designer', 'knowledge-editor'][i],
19
+ description: ['面向供热工单,澄清业务诉求并整理需求规格。', '依据已确认契约完成研发任务。', '对交付产物进行独立质量评审。', '设计测试与验收场景。', '整理服务接口与数据边界。', '梳理知识助手的内容与术语。'][i],
20
+ duty: ['planner', 'coder', 'reviewer', 'tester', 'designer', 'planner'][i], pbcId: i === 5 ? 'pbc-6' : 'pbc-0', project: i === 5 ? '巡检管理' : '供热工单', grantKey: name,
21
+ modelRef: i === 4 ? 'demo-2' : i === 3 ? 'demo-6' : 'demo-1', promptRef: i === 1 ? 'prompt-code-v1' : i === 2 ? 'prompt-review-v1' : 'prompt-demand-v2',
22
+ skillRefs: [i === 3 ? 'skill-test-v1' : i === 4 ? 'skill-contract-v1' : 'skill-spec-v1'], tools: [{ type: 'MCP', ref: 'mcp-gitlab-read-v1' }], memoryLimit: 40, toolLimit: 10,
23
+ enabled: i === 0 || i === 1 || i === 2, references: [], }));
24
+ }