@lesliechan721/aw 0.1.0-beta.72 → 0.1.0-beta.74

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 (364) hide show
  1. package/dist/authoring/assets/aw-runtime-config.mjs +65 -43
  2. package/dist/authoring/assets/aw-runtime-config.mjs.map +1 -1
  3. package/dist/authoring/scripts/add-skill.mjs +5 -14
  4. package/dist/authoring/scripts/add-skill.mjs.map +1 -1
  5. package/dist/authoring/scripts/init-plugin.mjs +4 -28
  6. package/dist/authoring/scripts/init-plugin.mjs.map +1 -1
  7. package/dist/authoring/scripts/lib/plugin-version-check.mjs +2 -2
  8. package/dist/authoring/scripts/lib/plugin-version-check.mjs.map +1 -1
  9. package/dist/authoring/scripts/lib/skill-scaffold.mjs +0 -1
  10. package/dist/authoring/scripts/lib/skill-scaffold.mjs.map +1 -1
  11. package/dist/authoring/scripts/validate-plugin.mjs +234 -1422
  12. package/dist/authoring/scripts/validate-plugin.mjs.map +1 -1
  13. package/dist/scripts/aw-skill-eval-materializer.d.ts +2 -0
  14. package/dist/scripts/aw-skill-eval-materializer.js +19 -80
  15. package/dist/scripts/aw-skill-eval-materializer.js.map +1 -1
  16. package/dist/scripts/bundle-plugins.js.map +1 -1
  17. package/dist/scripts/test-plugin-scripts.js +6 -8
  18. package/dist/scripts/test-plugin-scripts.js.map +1 -1
  19. package/dist/src/commands/aw-capabilities.d.ts +1 -1
  20. package/dist/src/commands/aw-capabilities.js +2 -2
  21. package/dist/src/commands/aw-capabilities.js.map +1 -1
  22. package/dist/src/commands/dependency-operation-plan.js +3 -3
  23. package/dist/src/commands/dependency-operation-plan.js.map +1 -1
  24. package/dist/src/commands/deployment-confirmation.d.ts +4 -0
  25. package/dist/src/commands/deployment-confirmation.js +20 -0
  26. package/dist/src/commands/deployment-confirmation.js.map +1 -0
  27. package/dist/src/commands/managed-commands.js +4 -2
  28. package/dist/src/commands/managed-commands.js.map +1 -1
  29. package/dist/src/commands/offline-cleanup-evidence.d.ts +3 -1
  30. package/dist/src/commands/offline-cleanup-evidence.js +9 -4
  31. package/dist/src/commands/offline-cleanup-evidence.js.map +1 -1
  32. package/dist/src/commands/operation-plan.d.ts +6 -0
  33. package/dist/src/commands/operation-plan.js +29 -2
  34. package/dist/src/commands/operation-plan.js.map +1 -1
  35. package/dist/src/commands/options.d.ts +6 -2
  36. package/dist/src/commands/options.js +5 -4
  37. package/dist/src/commands/options.js.map +1 -1
  38. package/dist/src/commands/plugin-capabilities.js +29 -41
  39. package/dist/src/commands/plugin-capabilities.js.map +1 -1
  40. package/dist/src/commands/public-config-confirmation.js +5 -5
  41. package/dist/src/commands/public-config-confirmation.js.map +1 -1
  42. package/dist/src/commands/public-lifecycle-result.d.ts +47 -0
  43. package/dist/src/commands/public-lifecycle-result.js +119 -4
  44. package/dist/src/commands/public-lifecycle-result.js.map +1 -1
  45. package/dist/src/commands/public-lifecycle.d.ts +2 -0
  46. package/dist/src/commands/public-lifecycle.js +29 -6
  47. package/dist/src/commands/public-lifecycle.js.map +1 -1
  48. package/dist/src/commands/public-plugin-query.d.ts +1 -0
  49. package/dist/src/commands/public-plugin-query.js +28 -8
  50. package/dist/src/commands/public-plugin-query.js.map +1 -1
  51. package/dist/src/commands/rebuild-command.d.ts +12 -11
  52. package/dist/src/commands/rebuild-command.js +529 -769
  53. package/dist/src/commands/rebuild-command.js.map +1 -1
  54. package/dist/src/commands/rebuild-integration.d.ts +21 -43
  55. package/dist/src/commands/rebuild-integration.js +306 -3600
  56. package/dist/src/commands/rebuild-integration.js.map +1 -1
  57. package/dist/src/commands/rebuild-operations.d.ts +13 -0
  58. package/dist/src/commands/rebuild-operations.js +60 -15
  59. package/dist/src/commands/rebuild-operations.js.map +1 -1
  60. package/dist/src/commands/rebuild-platform-integration.d.ts +59 -0
  61. package/dist/src/commands/rebuild-platform-integration.js +1200 -0
  62. package/dist/src/commands/rebuild-platform-integration.js.map +1 -0
  63. package/dist/src/commands/review-inspection.js +41 -4
  64. package/dist/src/commands/review-inspection.js.map +1 -1
  65. package/dist/src/commands/review-preparation.d.ts +2 -0
  66. package/dist/src/commands/review-preparation.js +23 -60
  67. package/dist/src/commands/review-preparation.js.map +1 -1
  68. package/dist/src/commands/skill-eval.js +1 -0
  69. package/dist/src/commands/skill-eval.js.map +1 -1
  70. package/dist/src/commands/status-v6.d.ts +3 -1
  71. package/dist/src/commands/status-v6.js +24 -15
  72. package/dist/src/commands/status-v6.js.map +1 -1
  73. package/dist/src/commands/targets-command.d.ts +9 -0
  74. package/dist/src/commands/targets-command.js +57 -6
  75. package/dist/src/commands/targets-command.js.map +1 -1
  76. package/dist/src/commands/write-commands.js +43 -28
  77. package/dist/src/commands/write-commands.js.map +1 -1
  78. package/dist/src/constants.d.ts +2 -2
  79. package/dist/src/constants.js +2 -2
  80. package/dist/src/constants.js.map +1 -1
  81. package/dist/src/generators/local-plugin.js +59 -248
  82. package/dist/src/generators/local-plugin.js.map +1 -1
  83. package/dist/src/index.js +45 -16
  84. package/dist/src/index.js.map +1 -1
  85. package/dist/src/intent/scope-context.js +23 -19
  86. package/dist/src/intent/scope-context.js.map +1 -1
  87. package/dist/src/output/command-receipt.d.ts +1 -1
  88. package/dist/src/output/command-receipt.js +3 -1
  89. package/dist/src/output/command-receipt.js.map +1 -1
  90. package/dist/src/output/native-consent.d.ts +2 -0
  91. package/dist/src/output/native-consent.js +5 -0
  92. package/dist/src/output/native-consent.js.map +1 -0
  93. package/dist/src/output/public-result.js +60 -0
  94. package/dist/src/output/public-result.js.map +1 -1
  95. package/dist/src/output/rebuild-progress.js +5 -5
  96. package/dist/src/output/rebuild-progress.js.map +1 -1
  97. package/dist/src/output/receipt-projection.js +19 -2
  98. package/dist/src/output/receipt-projection.js.map +1 -1
  99. package/dist/src/platforms/capabilities.d.ts +10 -0
  100. package/dist/src/platforms/capabilities.js +158 -0
  101. package/dist/src/platforms/capabilities.js.map +1 -0
  102. package/dist/src/platforms/contracts.d.ts +338 -0
  103. package/dist/src/platforms/contracts.js +2 -0
  104. package/dist/src/platforms/contracts.js.map +1 -0
  105. package/dist/src/platforms/cursor-workspace-hook.d.ts +22 -0
  106. package/dist/src/platforms/cursor-workspace-hook.js +185 -0
  107. package/dist/src/platforms/cursor-workspace-hook.js.map +1 -0
  108. package/dist/src/platforms/discovery.d.ts +74 -0
  109. package/dist/src/platforms/discovery.js +582 -0
  110. package/dist/src/platforms/discovery.js.map +1 -0
  111. package/dist/src/platforms/gemini-activation.d.ts +36 -0
  112. package/dist/src/platforms/gemini-activation.js +331 -0
  113. package/dist/src/platforms/gemini-activation.js.map +1 -0
  114. package/dist/src/platforms/gemini-consent.d.ts +8 -0
  115. package/dist/src/platforms/gemini-consent.js +79 -0
  116. package/dist/src/platforms/gemini-consent.js.map +1 -0
  117. package/dist/src/platforms/identity.d.ts +4 -0
  118. package/dist/src/platforms/identity.js +22 -0
  119. package/dist/src/platforms/identity.js.map +1 -0
  120. package/dist/src/platforms/inspection-grok.d.ts +4 -0
  121. package/dist/src/platforms/inspection-grok.js +173 -0
  122. package/dist/src/platforms/inspection-grok.js.map +1 -0
  123. package/dist/src/platforms/inspection-native.d.ts +6 -0
  124. package/dist/src/platforms/inspection-native.js +379 -0
  125. package/dist/src/platforms/inspection-native.js.map +1 -0
  126. package/dist/src/platforms/inspection-pi.d.ts +4 -0
  127. package/dist/src/platforms/inspection-pi.js +212 -0
  128. package/dist/src/platforms/inspection-pi.js.map +1 -0
  129. package/dist/src/platforms/inspection.d.ts +13 -0
  130. package/dist/src/platforms/inspection.js +189 -0
  131. package/dist/src/platforms/inspection.js.map +1 -0
  132. package/dist/src/platforms/layout.d.ts +21 -0
  133. package/dist/src/platforms/layout.js +239 -0
  134. package/dist/src/platforms/layout.js.map +1 -0
  135. package/dist/src/platforms/lifecycle-native-services.d.ts +3 -0
  136. package/dist/src/platforms/lifecycle-native-services.js +147 -0
  137. package/dist/src/platforms/lifecycle-native-services.js.map +1 -0
  138. package/dist/src/platforms/lifecycle-native.d.ts +9 -0
  139. package/dist/src/platforms/lifecycle-native.js +252 -0
  140. package/dist/src/platforms/lifecycle-native.js.map +1 -0
  141. package/dist/src/platforms/lifecycle.d.ts +25 -0
  142. package/dist/src/platforms/lifecycle.js +452 -0
  143. package/dist/src/platforms/lifecycle.js.map +1 -0
  144. package/dist/src/platforms/managed-command-placement.d.ts +8 -0
  145. package/dist/src/platforms/managed-command-placement.js +79 -0
  146. package/dist/src/platforms/managed-command-placement.js.map +1 -0
  147. package/dist/src/platforms/projection-code-extension.d.ts +8 -0
  148. package/dist/src/platforms/projection-code-extension.js +121 -0
  149. package/dist/src/platforms/projection-code-extension.js.map +1 -0
  150. package/dist/src/platforms/projection-command-resources.d.ts +7 -0
  151. package/dist/src/platforms/projection-command-resources.js +74 -0
  152. package/dist/src/platforms/projection-command-resources.js.map +1 -0
  153. package/dist/src/platforms/projection-files.d.ts +27 -0
  154. package/dist/src/platforms/projection-files.js +111 -0
  155. package/dist/src/platforms/projection-files.js.map +1 -0
  156. package/dist/src/platforms/projection-marketplace.d.ts +19 -0
  157. package/dist/src/platforms/projection-marketplace.js +42 -0
  158. package/dist/src/platforms/projection-marketplace.js.map +1 -0
  159. package/dist/src/platforms/projection.d.ts +10 -0
  160. package/dist/src/platforms/projection.js +446 -0
  161. package/dist/src/platforms/projection.js.map +1 -0
  162. package/dist/src/platforms/registry.d.ts +4 -0
  163. package/dist/src/platforms/registry.js +30 -0
  164. package/dist/src/platforms/registry.js.map +1 -0
  165. package/dist/src/platforms/supplement-layout.d.ts +16 -0
  166. package/dist/src/platforms/supplement-layout.js +31 -0
  167. package/dist/src/platforms/supplement-layout.js.map +1 -0
  168. package/dist/src/portable/commands.d.ts +7 -5
  169. package/dist/src/portable/commands.js +6 -1
  170. package/dist/src/portable/commands.js.map +1 -1
  171. package/dist/src/portable/materializer.d.ts +8 -6
  172. package/dist/src/portable/materializer.js +47 -245
  173. package/dist/src/portable/materializer.js.map +1 -1
  174. package/dist/src/portable/recovery-layout.js +2 -15
  175. package/dist/src/portable/recovery-layout.js.map +1 -1
  176. package/dist/src/portable/recovery.d.ts +10 -1
  177. package/dist/src/portable/recovery.js +34 -8
  178. package/dist/src/portable/recovery.js.map +1 -1
  179. package/dist/src/recovery/coordinator.d.ts +9 -8
  180. package/dist/src/recovery/coordinator.js +153 -120
  181. package/dist/src/recovery/coordinator.js.map +1 -1
  182. package/dist/src/recovery/demand.d.ts +1 -1
  183. package/dist/src/recovery/demand.js +10 -42
  184. package/dist/src/recovery/demand.js.map +1 -1
  185. package/dist/src/recovery/joint-coordinator.d.ts +1 -0
  186. package/dist/src/recovery/joint-coordinator.js +278 -84
  187. package/dist/src/recovery/joint-coordinator.js.map +1 -1
  188. package/dist/src/recovery/joint-demand.d.ts +4 -22
  189. package/dist/src/recovery/joint-demand.js +43 -40
  190. package/dist/src/recovery/joint-demand.js.map +1 -1
  191. package/dist/src/recovery/receipt.d.ts +23 -8
  192. package/dist/src/recovery/retirement.d.ts +1 -1
  193. package/dist/src/recovery/retirement.js +122 -29
  194. package/dist/src/recovery/retirement.js.map +1 -1
  195. package/dist/src/recovery/status.d.ts +15 -7
  196. package/dist/src/recovery/status.js +481 -81
  197. package/dist/src/recovery/status.js.map +1 -1
  198. package/dist/src/recovery/types.d.ts +3 -3
  199. package/dist/src/review/platform-profile.d.ts +3 -0
  200. package/dist/src/review/platform-profile.js +16 -0
  201. package/dist/src/review/platform-profile.js.map +1 -0
  202. package/dist/src/review/review-profile.d.ts +1 -0
  203. package/dist/src/review/review-profile.js +8 -2
  204. package/dist/src/review/review-profile.js.map +1 -1
  205. package/dist/src/review/review-selection.d.ts +2 -11
  206. package/dist/src/review/review-selection.js +97 -71
  207. package/dist/src/review/review-selection.js.map +1 -1
  208. package/dist/src/review/review-types.d.ts +3 -0
  209. package/dist/src/review/review-types.js.map +1 -1
  210. package/dist/src/review/skill-materialization.d.ts +44 -9
  211. package/dist/src/review/skill-materialization.js +112 -136
  212. package/dist/src/review/skill-materialization.js.map +1 -1
  213. package/dist/src/review/source-binding.d.ts +8 -5
  214. package/dist/src/review/source-binding.js +99 -41
  215. package/dist/src/review/source-binding.js.map +1 -1
  216. package/dist/src/tui/agent-management.js +112 -10
  217. package/dist/src/tui/agent-management.js.map +1 -1
  218. package/dist/src/tui/agent-settings.d.ts +3 -0
  219. package/dist/src/tui/agent-settings.js +10 -11
  220. package/dist/src/tui/agent-settings.js.map +1 -1
  221. package/dist/src/tui/console-app-v4.js +85 -20
  222. package/dist/src/tui/console-app-v4.js.map +1 -1
  223. package/dist/src/tui/content-item-card.js +2 -2
  224. package/dist/src/tui/content-item-card.js.map +1 -1
  225. package/dist/src/tui/controller-runtime.js +199 -152
  226. package/dist/src/tui/controller-runtime.js.map +1 -1
  227. package/dist/src/tui/controller.d.ts +6 -9
  228. package/dist/src/tui/controller.js +40 -18
  229. package/dist/src/tui/controller.js.map +1 -1
  230. package/dist/src/tui/deployment-view.d.ts +10 -0
  231. package/dist/src/tui/deployment-view.js +91 -0
  232. package/dist/src/tui/deployment-view.js.map +1 -0
  233. package/dist/src/tui/glossary.js +4 -4
  234. package/dist/src/tui/glossary.js.map +1 -1
  235. package/dist/src/tui/model.d.ts +5 -0
  236. package/dist/src/tui/model.js +73 -12
  237. package/dist/src/tui/model.js.map +1 -1
  238. package/dist/src/tui/operation-diagnostic-screens.js +2 -1
  239. package/dist/src/tui/operation-diagnostic-screens.js.map +1 -1
  240. package/dist/src/tui/operation-history.d.ts +5 -4
  241. package/dist/src/tui/operation-history.js.map +1 -1
  242. package/dist/src/tui/operation-review-planner.d.ts +7 -2
  243. package/dist/src/tui/operation-review-planner.js +97 -42
  244. package/dist/src/tui/operation-review-planner.js.map +1 -1
  245. package/dist/src/tui/plugin-content.d.ts +5 -3
  246. package/dist/src/tui/plugin-content.js +70 -508
  247. package/dist/src/tui/plugin-content.js.map +1 -1
  248. package/dist/src/tui/plugin-detail.d.ts +3 -2
  249. package/dist/src/tui/plugin-detail.js +33 -25
  250. package/dist/src/tui/plugin-detail.js.map +1 -1
  251. package/dist/src/tui/scoped-inventory.d.ts +10 -6
  252. package/dist/src/tui/scoped-inventory.js +34 -1
  253. package/dist/src/tui/scoped-inventory.js.map +1 -1
  254. package/dist/src/types.d.ts +4 -63
  255. package/dist/src/types.js.map +1 -1
  256. package/dist/src/utils/agent-version.d.ts +10 -4
  257. package/dist/src/utils/agent-version.js.map +1 -1
  258. package/dist/src/utils/artifact-plan.d.ts +26 -2
  259. package/dist/src/utils/artifact-plan.js +113 -489
  260. package/dist/src/utils/artifact-plan.js.map +1 -1
  261. package/dist/src/utils/artifact-renderer.d.ts +100 -93
  262. package/dist/src/utils/artifact-renderer.js +173 -346
  263. package/dist/src/utils/artifact-renderer.js.map +1 -1
  264. package/dist/src/utils/artifact-request.d.ts +21 -11
  265. package/dist/src/utils/artifact-request.js +56 -80
  266. package/dist/src/utils/artifact-request.js.map +1 -1
  267. package/dist/src/utils/bundle-layout.js +30 -146
  268. package/dist/src/utils/bundle-layout.js.map +1 -1
  269. package/dist/src/utils/catalog-digests.d.ts +2 -12
  270. package/dist/src/utils/catalog-digests.js +0 -39
  271. package/dist/src/utils/catalog-digests.js.map +1 -1
  272. package/dist/src/utils/catalog-source-references.d.ts +7 -0
  273. package/dist/src/utils/catalog-source-references.js +234 -19
  274. package/dist/src/utils/catalog-source-references.js.map +1 -1
  275. package/dist/src/utils/codex-config-observation.d.ts +19 -0
  276. package/dist/src/utils/codex-config-observation.js +145 -0
  277. package/dist/src/utils/codex-config-observation.js.map +1 -0
  278. package/dist/src/utils/codex-executable-discovery.d.ts +2 -0
  279. package/dist/src/utils/codex-executable-discovery.js +47 -13
  280. package/dist/src/utils/codex-executable-discovery.js.map +1 -1
  281. package/dist/src/utils/codex-manager.js +1 -1
  282. package/dist/src/utils/codex-manager.js.map +1 -1
  283. package/dist/src/utils/codex-native-observation.d.ts +3 -0
  284. package/dist/src/utils/codex-native-observation.js +53 -0
  285. package/dist/src/utils/codex-native-observation.js.map +1 -1
  286. package/dist/src/utils/codex-shared-native.d.ts +3 -1
  287. package/dist/src/utils/codex-shared-native.js +46 -5
  288. package/dist/src/utils/codex-shared-native.js.map +1 -1
  289. package/dist/src/utils/codex-skill-staging.d.ts +4 -3
  290. package/dist/src/utils/codex-skill-staging.js.map +1 -1
  291. package/dist/src/utils/codex-surface-analysis.d.ts +5 -2
  292. package/dist/src/utils/codex-surface-analysis.js +28 -57
  293. package/dist/src/utils/codex-surface-analysis.js.map +1 -1
  294. package/dist/src/utils/component-command-preparation.d.ts +34 -0
  295. package/dist/src/utils/component-command-preparation.js +228 -0
  296. package/dist/src/utils/component-command-preparation.js.map +1 -0
  297. package/dist/src/utils/component-resources.d.ts +43 -0
  298. package/dist/src/utils/component-resources.js +304 -0
  299. package/dist/src/utils/component-resources.js.map +1 -0
  300. package/dist/src/utils/dynamic-skill-tree.d.ts +17 -6
  301. package/dist/src/utils/dynamic-skill-tree.js +7 -3
  302. package/dist/src/utils/dynamic-skill-tree.js.map +1 -1
  303. package/dist/src/utils/local-marketplace.d.ts +11 -44
  304. package/dist/src/utils/local-marketplace.js +11 -638
  305. package/dist/src/utils/local-marketplace.js.map +1 -1
  306. package/dist/src/utils/managed-command-evidence.d.ts +2 -2
  307. package/dist/src/utils/managed-command-evidence.js +5 -81
  308. package/dist/src/utils/managed-command-evidence.js.map +1 -1
  309. package/dist/src/utils/managed-command-materialization.d.ts +5 -2
  310. package/dist/src/utils/managed-command-materialization.js +35 -35
  311. package/dist/src/utils/managed-command-materialization.js.map +1 -1
  312. package/dist/src/utils/managed-command-preparation.d.ts +67 -0
  313. package/dist/src/utils/managed-command-preparation.js +146 -0
  314. package/dist/src/utils/managed-command-preparation.js.map +1 -0
  315. package/dist/src/utils/managed-command-review.d.ts +26 -0
  316. package/dist/src/utils/managed-command-review.js +68 -0
  317. package/dist/src/utils/managed-command-review.js.map +1 -0
  318. package/dist/src/utils/managed-command-store.js +26 -15
  319. package/dist/src/utils/managed-command-store.js.map +1 -1
  320. package/dist/src/utils/native-cli.d.ts +19 -0
  321. package/dist/src/utils/native-cli.js +45 -2
  322. package/dist/src/utils/native-cli.js.map +1 -1
  323. package/dist/src/utils/native-demand.d.ts +20 -1
  324. package/dist/src/utils/native-demand.js.map +1 -1
  325. package/dist/src/utils/native-tool-review.d.ts +3 -6
  326. package/dist/src/utils/native-tool-review.js +25 -11
  327. package/dist/src/utils/native-tool-review.js.map +1 -1
  328. package/dist/src/utils/ownership.d.ts +26 -3
  329. package/dist/src/utils/ownership.js +95 -9
  330. package/dist/src/utils/ownership.js.map +1 -1
  331. package/dist/src/utils/paths.d.ts +1 -1
  332. package/dist/src/utils/paths.js +2 -0
  333. package/dist/src/utils/paths.js.map +1 -1
  334. package/dist/src/utils/platform-empty-state.d.ts +46 -0
  335. package/dist/src/utils/platform-empty-state.js +123 -0
  336. package/dist/src/utils/platform-empty-state.js.map +1 -0
  337. package/dist/src/utils/plugin-config-impact.d.ts +17 -11
  338. package/dist/src/utils/plugin-config-impact.js +46 -62
  339. package/dist/src/utils/plugin-config-impact.js.map +1 -1
  340. package/dist/src/utils/plugin-config-write.js +52 -53
  341. package/dist/src/utils/plugin-config-write.js.map +1 -1
  342. package/dist/src/utils/plugin-config.d.ts +0 -2
  343. package/dist/src/utils/plugin-config.js +0 -6
  344. package/dist/src/utils/plugin-config.js.map +1 -1
  345. package/dist/src/utils/plugin-dependencies.d.ts +1 -1
  346. package/dist/src/utils/plugin-dependencies.js.map +1 -1
  347. package/dist/src/utils/runtime-config.d.ts +5 -7
  348. package/dist/src/utils/runtime-config.js +12 -25
  349. package/dist/src/utils/runtime-config.js.map +1 -1
  350. package/dist/src/utils/windows-npm-shim.js +19 -2
  351. package/dist/src/utils/windows-npm-shim.js.map +1 -1
  352. package/package.json +3 -3
  353. package/dist/src/utils/claude-native-render-receipt.d.ts +0 -14
  354. package/dist/src/utils/claude-native-render-receipt.js +0 -26
  355. package/dist/src/utils/claude-native-render-receipt.js.map +0 -1
  356. package/dist/src/utils/claude-skills-root.d.ts +0 -8
  357. package/dist/src/utils/claude-skills-root.js +0 -87
  358. package/dist/src/utils/claude-skills-root.js.map +0 -1
  359. package/dist/src/utils/codex-native-render-receipt.d.ts +0 -40
  360. package/dist/src/utils/codex-native-render-receipt.js +0 -205
  361. package/dist/src/utils/codex-native-render-receipt.js.map +0 -1
  362. package/dist/src/utils/slash-commands.d.ts +0 -1
  363. package/dist/src/utils/slash-commands.js +0 -2
  364. package/dist/src/utils/slash-commands.js.map +0 -1
@@ -5,27 +5,21 @@ import path from 'node:path';
5
5
  import { promisify } from 'node:util';
6
6
  import fs from 'fs-extra';
7
7
  import { preparePluginNativeTools, validateManagedCommandSources, PLATFORM_TARGETS } from '@lesliechan721/aw-plugin-core/manifest';
8
- import { renderResolvedHooksArtifact } from './hooks.js';
9
- import { buildGeneratedName } from './shared.js';
10
8
  import { applyFileRules } from '../utils/file-rules.js';
11
9
  import { calculateFileDigest } from '../utils/bundle-integrity.js';
12
10
  import { resolveCanonicalRuntimeSourceIdentity } from '../utils/catalog-runtime-projection.js';
13
- import { getArtifactSourceBundleRelativePath } from '../utils/artifact-sources.js';
14
11
  import { validateManagedCommandPackageClosure } from '../utils/managed-command-closure.js';
15
- import { resolvePlatformHookDefinitions } from '../utils/hooks-contract.js';
16
- import { assertManifestPlatformSupport, assertPluginInputTree, checkAwCapabilitySupport, computeAwCapabilitySetDigest, createAwPluginRequirementsReceipt, createBundleSourceManifest, createPlatformManifestBase, isIgnoredPluginInputDirectory, normalizePluginRelativePath, normalizeAwCapabilities, readPluginManifest, resolvePluginRequirements, } from '../utils/manifest.js';
12
+ import { assertManifestPlatformSupport, assertPluginInputTree, checkAwCapabilitySupport, computeAwCapabilitySetDigest, createAwPluginRequirementsReceipt, createBundleSourceManifest, createPlatformManifestBase, isIgnoredPluginInputDirectory, normalizeAwCapabilities, readPluginManifest, resolvePluginRequirements, validatePluginManifest, } from '../utils/manifest.js';
17
13
  import { AwCapabilityUnsupportedError, IMPLEMENTED_AW_CAPABILITIES, } from '../commands/aw-capabilities.js';
18
14
  import { writeJsonFile } from '../utils/json.js';
19
15
  import { resolveSupportedPlatforms } from '../utils/platform-support.js';
20
16
  import { renderTemplate } from '../utils/template-engine.js';
21
- import { resolvePlatformEntries } from '../utils/platform-entries.js';
22
17
  import { scanNodeImportContract } from '../utils/plugin-script-contract.js';
23
18
  import { isSkillAuthorOnlyPath, isSkillCollectionAuthorOnlyPath, } from '../utils/skill-authoring.js';
24
19
  import { assertTestWritablePath } from '../utils/test-path-fence.js';
25
20
  import { resolveCliPackageRoot } from '../utils/paths.js';
26
21
  import { validateRuntimeSkillClosure, validateSkillRuntimeProjectionFreshness, } from '../utils/runtime-skill-closure.js';
27
22
  import { AW_PLUGIN_REQUIREMENTS_RECEIPT_PATH, validatePortableSkillDirectory, } from '../utils/dynamic-skill-tree.js';
28
- import { renderClaudeSlashCommand, renderCodexSlashCommandOpenAiYaml, renderCodexSlashCommandSkillMarkdown, resolveSlashCommands, } from '../utils/slash-commands.js';
29
23
  const execFileAsync = promisify(execFile);
30
24
  const requireFromCli = createRequire(import.meta.url);
31
25
  const NODE_RUNTIME_EXTENSIONS = new Set(['.js', '.mjs', '.cjs']);
@@ -196,21 +190,6 @@ async function collectFilesForPath(pluginRoot, relativePath) {
196
190
  }
197
191
  return [stripDotSlash(relativePath).split(path.sep).join('/')];
198
192
  }
199
- function renderClaudeAgentContent(agent) {
200
- const frontmatterLines = ['---', `name: ${JSON.stringify(agent.name)}`, `description: ${JSON.stringify(agent.description)}`];
201
- if (agent.tools && agent.tools.length > 0) {
202
- frontmatterLines.push('tools:');
203
- for (const tool of agent.tools) {
204
- frontmatterLines.push(` - ${tool}`);
205
- }
206
- }
207
- frontmatterLines.push('---', '');
208
- return `${frontmatterLines.join('\n')}${agent.prompt.trim()}\n`;
209
- }
210
- async function writeTextFile(filePath, content) {
211
- await fs.ensureDir(path.dirname(filePath));
212
- await fs.writeFile(filePath, content, 'utf8');
213
- }
214
193
  async function copyFileWithTemplateSupport(pluginRoot, outputRoot, sourceRelativePath, platform, templatePatterns, templateVars) {
215
194
  const normalizedSource = sourceRelativePath.split(path.sep).join('/');
216
195
  const sourcePath = path.join(pluginRoot, normalizedSource);
@@ -264,31 +243,17 @@ async function assertArtifactSourceTreePortable(rootDir, fieldName, relativeRoot
264
243
  }
265
244
  }
266
245
  async function copyArtifactSourceDirectories(plugin, outputRoot) {
267
- for (const [targetIndex, target] of (plugin.manifest.artifacts?.targets ?? []).entries()) {
268
- for (const [sourceIndex, sourceDir] of (target.sourceDirs ?? []).entries()) {
269
- const sourcePath = path.join(plugin.rootDir, stripDotSlash(sourceDir));
270
- await assertArtifactSourceTreePortable(sourcePath, `artifacts.targets[${targetIndex}].sourceDirs[${sourceIndex}]`);
271
- const targetRoot = path.join(outputRoot, getArtifactSourceBundleRelativePath({
272
- platform: target.platform, distribution: target.distribution, artifactId: target.id, index: sourceIndex,
273
- }));
274
- await fs.ensureDir(targetRoot);
275
- for (const relativePath of await listFilesRecursively(sourcePath)) {
276
- if (isSkillAuthorOnlyPath(relativePath))
277
- continue;
278
- const sourceRelativePath = path.posix.join(stripDotSlash(sourceDir), relativePath);
279
- const excluded = plugin.manifest.buildConfig?.fileRules?.[target.platform]?.exclude ?? [];
280
- if (applyFileRules([sourceRelativePath], ['**/*'], excluded).length === 0)
281
- continue;
282
- const destination = path.join(targetRoot, relativePath);
283
- await fs.ensureDir(path.dirname(destination));
284
- const templates = plugin.manifest.buildConfig?.templates;
285
- if (isTextFile(relativePath) && applyFileRules([sourceRelativePath], templates?.include ?? [], []).length > 0) {
286
- await fs.writeFile(destination, renderTemplate(await fs.readFile(path.join(sourcePath, relativePath), 'utf8'), templates?.vars ?? {}, target.platform));
287
- }
288
- else {
289
- await fs.copyFile(path.join(sourcePath, relativePath), destination);
290
- }
291
- }
246
+ for (const [sourceIndex, sourceDir] of (plugin.manifest.artifacts?.sourceDirs ?? []).entries()) {
247
+ const sourcePath = path.join(plugin.rootDir, stripDotSlash(sourceDir));
248
+ await assertArtifactSourceTreePortable(sourcePath, `artifacts.sourceDirs[${sourceIndex}]`);
249
+ const targetRoot = path.join(outputRoot, stripDotSlash(sourceDir));
250
+ await fs.ensureDir(targetRoot);
251
+ for (const relativePath of await listFilesRecursively(sourcePath)) {
252
+ if (isSkillAuthorOnlyPath(relativePath))
253
+ continue;
254
+ const destination = path.join(targetRoot, relativePath);
255
+ await fs.ensureDir(path.dirname(destination));
256
+ await fs.copyFile(path.join(sourcePath, relativePath), destination);
292
257
  }
293
258
  }
294
259
  }
@@ -309,36 +274,27 @@ async function resolveArtifactRuntimeImports(options) {
309
274
  const manifest = createBundleSourceManifest(options.plugin);
310
275
  const requiredCapabilities = [];
311
276
  const projections = [];
312
- for (const [targetIndex, target] of (manifest.artifacts?.targets ?? []).entries()) {
313
- for (const [importIndex, runtimeImport] of (target.runtimeImports ?? []).entries()) {
314
- if (!options.resolver) {
315
- throw new Error(`Cannot resolve artifacts.targets[${targetIndex}].runtimeImports[${importIndex}]: catalog runtime import resolver is required.`);
316
- }
317
- const resolution = await options.resolver.resolve({
318
- consumer: options.plugin,
319
- reference: runtimeImport,
320
- purpose: 'artifact-runtime',
321
- });
322
- requiredCapabilities.push(...resolution.requiredCapabilities);
323
- const relativePath = `./.agents-plugin/runtime-imports/${target.id}/${runtimeImport.name}`;
324
- const targetPath = path.join(options.outputRoot, stripDotSlash(relativePath));
325
- const digest = resolution.sourceDigest;
326
- projections.push({
327
- sourcePath: resolution.sourcePath,
328
- targetPath,
329
- sourceDigest: resolution.sourceDigest,
330
- label: `${target.id}/${runtimeImport.name}`,
331
- });
332
- runtimeImport.resolved = {
333
- path: relativePath,
334
- digest,
335
- providerPluginId: resolution.provider,
336
- providerVersion: resolution.providerVersion,
337
- source: resolution.source,
338
- requiredCapabilities: resolution.requiredCapabilities,
339
- capabilitySetDigest: resolution.capabilitySetDigest,
340
- };
277
+ for (const [importIndex, runtimeImport] of (manifest.artifacts?.runtimeImports ?? []).entries()) {
278
+ if (!options.resolver) {
279
+ throw new Error(`Cannot resolve artifacts.runtimeImports[${importIndex}]: catalog runtime import resolver is required.`);
341
280
  }
281
+ const resolution = await options.resolver.resolve({
282
+ consumer: options.plugin, reference: runtimeImport, purpose: 'artifact-runtime',
283
+ });
284
+ requiredCapabilities.push(...resolution.requiredCapabilities);
285
+ const relativePath = `./.agents-plugin/runtime-imports/${runtimeImport.name}`;
286
+ projections.push({
287
+ sourcePath: resolution.sourcePath,
288
+ targetPath: path.join(options.outputRoot, stripDotSlash(relativePath)),
289
+ sourceDigest: resolution.sourceDigest,
290
+ label: runtimeImport.name,
291
+ });
292
+ runtimeImport.resolved = {
293
+ path: relativePath, digest: resolution.sourceDigest,
294
+ providerPluginId: resolution.provider, providerVersion: resolution.providerVersion,
295
+ source: resolution.source, requiredCapabilities: resolution.requiredCapabilities,
296
+ capabilitySetDigest: resolution.capabilitySetDigest,
297
+ };
342
298
  }
343
299
  return {
344
300
  manifest,
@@ -375,12 +331,6 @@ async function injectRequirementsReceipts(options) {
375
331
  }
376
332
  }
377
333
  }
378
- async function copySlashCommandAsset(pluginRoot, outputRoot, skillName, sourceRelativePath, generatedRelativePath) {
379
- const sourcePath = path.join(pluginRoot, sourceRelativePath);
380
- const targetPath = path.join(outputRoot, 'codex', 'skills', skillName, stripDotSlash(generatedRelativePath));
381
- await fs.ensureDir(path.dirname(targetPath));
382
- await fs.copyFile(sourcePath, targetPath);
383
- }
384
334
  async function addDeclaredPathFiles(plugin, platform, relativePath, targetFiles) {
385
335
  if (!relativePath) {
386
336
  return undefined;
@@ -395,18 +345,11 @@ async function addDeclaredSkillPathFiles(plugin, platform, relativePath, targetF
395
345
  if (!relativePath)
396
346
  return undefined;
397
347
  const root = stripDotSlash(relativePath);
398
- const dynamicSkillKeys = new Set((plugin.manifest.artifacts?.targets ?? [])
399
- .filter((target) => target.platform === platform &&
400
- (target.target === 'codex.skill' || target.target === 'claude.skill' || target.target === 'agent-skills.skill') &&
401
- target.skillKey)
402
- .map((target) => target.skillKey));
403
348
  const files = await collectFilesForPath(plugin.rootDir, relativePath);
404
349
  let added = false;
405
350
  for (const filePath of files) {
406
351
  const skillCollectionPath = path.posix.relative(root.split(path.sep).join('/'), filePath.split(path.sep).join('/'));
407
- const [skillKey] = skillCollectionPath.split('/');
408
- if (!dynamicSkillKeys.has(skillKey ?? '') &&
409
- !isSkillCollectionAuthorOnlyPath(skillCollectionPath)) {
352
+ if (!isSkillCollectionAuthorOnlyPath(skillCollectionPath)) {
410
353
  targetFiles.add(filePath);
411
354
  added = true;
412
355
  }
@@ -430,63 +373,13 @@ function isDeclaredSkillAuthorOnlyFile(plugin, filePath) {
430
373
  if (staticRelative && isSkillCollectionAuthorOnlyPath(staticRelative))
431
374
  return true;
432
375
  }
433
- for (const target of plugin.manifest.artifacts?.targets ?? []) {
434
- if ((target.target !== 'codex.skill' && target.target !== 'claude.skill' && target.target !== 'agent-skills.skill') ||
435
- !target.skillKey)
436
- continue;
437
- const dynamicRoot = `skills/${target.skillKey}`;
438
- const dynamicRelative = relativePathInside(dynamicRoot, normalizedFile);
439
- if (dynamicRelative && isSkillAuthorOnlyPath(dynamicRelative))
376
+ for (const sourceDir of plugin.manifest.artifacts?.sourceDirs ?? []) {
377
+ const sourceRelative = relativePathInside(stripDotSlash(sourceDir), normalizedFile);
378
+ if (sourceRelative && isSkillAuthorOnlyPath(sourceRelative))
440
379
  return true;
441
- for (const sourceDir of target.sourceDirs ?? []) {
442
- const sourceRelative = relativePathInside(stripDotSlash(sourceDir).split(path.sep).join('/'), normalizedFile);
443
- if (sourceRelative && isSkillAuthorOnlyPath(sourceRelative))
444
- return true;
445
- }
446
380
  }
447
381
  return false;
448
382
  }
449
- function isDynamicSkillSourceFile(plugin, platform, filePath) {
450
- const normalizedFile = filePath.split(path.sep).join('/');
451
- return (plugin.manifest.artifacts?.targets ?? []).some((target) => {
452
- if (target.platform !== platform ||
453
- (target.target !== 'codex.skill' && target.target !== 'claude.skill' && target.target !== 'agent-skills.skill') ||
454
- !target.skillKey)
455
- return false;
456
- return relativePathInside(`skills/${target.skillKey}`, normalizedFile) !== null;
457
- });
458
- }
459
- async function addDeclaredLspServerFiles(plugin, value, targetFiles) {
460
- if (value === undefined) {
461
- return undefined;
462
- }
463
- if (typeof value === 'string') {
464
- const normalized = normalizePluginRelativePath(plugin.rootDir, value, 'buildConfig.manifestOverrides.claude.lspServers');
465
- const files = await collectFilesForPath(plugin.rootDir, normalized);
466
- for (const filePath of files) {
467
- targetFiles.add(filePath);
468
- }
469
- return toPlatformRelativePath(normalized, 'claude');
470
- }
471
- if (Array.isArray(value)) {
472
- const rendered = [];
473
- for (const entry of value) {
474
- if (typeof entry === 'string') {
475
- const normalized = normalizePluginRelativePath(plugin.rootDir, entry, 'buildConfig.manifestOverrides.claude.lspServers');
476
- const files = await collectFilesForPath(plugin.rootDir, normalized);
477
- for (const filePath of files) {
478
- targetFiles.add(filePath);
479
- }
480
- rendered.push(toPlatformRelativePath(normalized, 'claude'));
481
- }
482
- else {
483
- rendered.push(entry);
484
- }
485
- }
486
- return rendered;
487
- }
488
- return value;
489
- }
490
383
  function addPreApplyRuntimeEntry(plugin, rootFiles, nodeEntries) {
491
384
  const entry = plugin.manifest.scripts?.preApply;
492
385
  if (!entry)
@@ -557,9 +450,7 @@ async function collectRuntimeClosureFiles(plugin, entryFiles) {
557
450
  entryFiles,
558
451
  dependencies,
559
452
  devDependencies,
560
- runtimeConfigSkillRoots: (plugin.manifest.artifacts?.targets ?? [])
561
- .filter((target) => target.runtimeConfig !== undefined)
562
- .flatMap((target) => target.sourceDirs ?? []),
453
+ runtimeConfigSkillRoots: plugin.manifest.artifacts?.sourceDirs ?? [],
563
454
  });
564
455
  if (scan.errors.length > 0) {
565
456
  throw new Error(`Invalid scripts.node runtime imports:\n${scan.errors.join('\n')}`);
@@ -807,11 +698,6 @@ async function assertSkillRuntimeProjectionTargets(plugin) {
807
698
  const roots = [path.join(plugin.rootDir, stripDotSlash(plugin.manifest.skills ?? './skills'), entry.skill)];
808
699
  for (const skillRoot of roots) {
809
700
  const skillRootStats = await fs.lstat(skillRoot).catch(() => undefined);
810
- if (!skillRootStats) {
811
- const platforms = entry.platforms?.length ? entry.platforms : [...resolveSupportedPlatforms(plugin.manifest)];
812
- if (platforms.every((platform) => (plugin.manifest.artifacts?.targets ?? []).some((target) => target.platform === platform && target.target === 'agent-skills.skill' && target.skillKey === entry.skill)))
813
- continue;
814
- }
815
701
  if (!skillRootStats?.isDirectory() || skillRootStats.isSymbolicLink()) {
816
702
  throw new Error(`Invalid buildConfig.skillRuntimeFiles[${index}].skill: "${entry.skill}" is not a declared static Skill key.`);
817
703
  }
@@ -819,28 +705,6 @@ async function assertSkillRuntimeProjectionTargets(plugin) {
819
705
  }
820
706
  }
821
707
  }
822
- async function materializeGeneratedPortableSkillRuntimeFiles(plugin, outputRoot, supportedPlatforms) {
823
- const projections = [];
824
- for (const [index, entry] of (plugin.manifest.buildConfig?.generatedSkillRuntimeFiles ?? []).entries()) {
825
- for (const platform of entry.platforms?.length ? entry.platforms : supportedPlatforms) {
826
- const dynamicTarget = (plugin.manifest.artifacts?.targets ?? []).find((target) => target.platform === platform && target.target === 'agent-skills.skill' && target.skillKey === entry.skill);
827
- if (!dynamicTarget)
828
- continue;
829
- const relativePath = path.posix.join('skills', entry.skill, entry.target);
830
- const source = await resolveCanonicalRuntimeSourceIdentity(plugin.rootDir, `./${relativePath}`, `buildConfig.generatedSkillRuntimeFiles[${index}]`);
831
- const stats = await fs.lstat(source.sourceRealPath);
832
- if (!stats.isFile() || stats.isSymbolicLink()) {
833
- throw new Error(`Invalid buildConfig.generatedSkillRuntimeFiles[${index}]: build did not create regular source "${relativePath}".`);
834
- }
835
- await copyFileWithTemplateSupport(plugin.rootDir, outputRoot, relativePath, platform, plugin.manifest.buildConfig?.templates?.include ?? [], plugin.manifest.buildConfig?.templates?.vars ?? {});
836
- projections.push({
837
- platform, skill: entry.skill, target: entry.target, path: `./${platform}/${relativePath}`,
838
- digest: await calculateFileDigest(path.join(outputRoot, platform, relativePath)),
839
- });
840
- }
841
- }
842
- return projections;
843
- }
844
708
  async function validateGeneratedSkillRuntimeFiles(plugin, outputRoot, supportedPlatforms) {
845
709
  for (const [index, entry] of (plugin.manifest.buildConfig?.generatedSkillRuntimeFiles ?? []).entries()) {
846
710
  const surfaces = entry.platforms?.length ? entry.platforms : [...supportedPlatforms];
@@ -1166,6 +1030,7 @@ function assertRequiredCapabilitiesSupported(pluginName, requiredCapabilities) {
1166
1030
  }
1167
1031
  export async function bundleLocalPlugin(plugin, outputRoot, options = {}) {
1168
1032
  const historicalComparison = options.runtimeSkillClosureValidation === 'historical';
1033
+ plugin = { ...plugin, manifest: validatePluginManifest(plugin.rootDir, plugin.manifest) };
1169
1034
  const buildOptions = {
1170
1035
  buildMode: options.buildMode ?? 'build-free',
1171
1036
  stagingRunner: options.stagingRunner
@@ -1246,9 +1111,6 @@ export async function bundleLocalPlugin(plugin, outputRoot, options = {}) {
1246
1111
  const buildConfig = plugin.manifest.buildConfig;
1247
1112
  const templatePatterns = buildConfig?.templates?.include ?? [];
1248
1113
  const templateVars = buildConfig?.templates?.vars ?? {};
1249
- const resolvedSlashCommands = await resolveSlashCommands(plugin.rootDir, plugin.manifest, {
1250
- targetPlatforms: new Set([...supportedPlatforms].filter((platform) => platform === 'codex' || platform === 'claude')),
1251
- });
1252
1114
  for (const platform of PLATFORM_ORDER) {
1253
1115
  if (!supportedPlatforms.has(platform)) {
1254
1116
  continue;
@@ -1266,52 +1128,17 @@ export async function bundleLocalPlugin(plugin, outputRoot, options = {}) {
1266
1128
  manifest.mcpServers = await addDeclaredPathFiles(plugin, platform, plugin.manifest.mcpServers, files);
1267
1129
  }
1268
1130
  for (const platform of supportedPlatforms) {
1269
- if (platform === 'codex' || platform === 'claude') {
1270
- const manifest = platformManifests[platform];
1271
- if ((plugin.manifest.artifacts?.targets ?? []).some((target) => target.platform === platform && (target.target === 'codex.skill' || target.target === 'claude.skill'))) {
1272
- manifest.skills = `./${platform}/skills`;
1273
- await fs.ensureDir(path.join(outputRoot, platform, 'skills'));
1274
- }
1131
+ await fs.ensureDir(path.join(outputRoot, platform));
1132
+ if (platform === 'codex' || platform === 'claude')
1275
1133
  continue;
1276
- }
1277
1134
  const files = new Set();
1278
1135
  platformFiles[platform] = files;
1279
1136
  if (plugin.manifest.skills)
1280
1137
  await fs.ensureDir(path.join(outputRoot, platform, 'skills'));
1281
1138
  await addDeclaredSkillPathFiles(plugin, platform, plugin.manifest.skills, files);
1282
- }
1283
- const codexManifest = platformManifests.codex;
1284
- const codexFiles = platformFiles.codex;
1285
- if (codexManifest && codexFiles) {
1286
- codexManifest.apps = await addDeclaredPathFiles(plugin, 'codex', plugin.manifest.apps, codexFiles);
1287
- const hooksArtifact = renderResolvedHooksArtifact(resolvePlatformHookDefinitions(plugin.manifest, 'codex'), 'codex');
1288
- if (hooksArtifact) {
1289
- codexManifest.hooks = hooksArtifact.content;
1290
- }
1291
- }
1292
- const claudeManifest = platformManifests.claude;
1293
- const claudeFiles = platformFiles.claude;
1294
- if (claudeManifest && claudeFiles) {
1295
- const claudeOverrides = buildConfig?.manifestOverrides?.claude;
1296
- claudeManifest.outputStyles = await addDeclaredPathFiles(plugin, 'claude', claudeOverrides?.outputStyles, claudeFiles);
1297
- claudeManifest.lspServers = await addDeclaredLspServerFiles(plugin, claudeOverrides?.lspServers, claudeFiles);
1298
- claudeManifest.userConfig = claudeOverrides?.userConfig;
1299
- claudeManifest.channels = claudeOverrides?.channels;
1300
- const hooksArtifact = renderResolvedHooksArtifact(resolvePlatformHookDefinitions(plugin.manifest, 'claude'), 'claude');
1301
- if (hooksArtifact) {
1302
- const hooksPath = path.join(outputRoot, 'claude', 'hooks', 'hooks.json');
1303
- await writeJsonFile(hooksPath, hooksArtifact.content);
1304
- claudeManifest.hooks = './claude/hooks/hooks.json';
1305
- }
1306
- const claudeAgents = resolvePlatformEntries(plugin.manifest.extensions?.agents, 'claude');
1307
- if (claudeAgents.length > 0) {
1308
- claudeManifest.agents = [];
1309
- for (const agent of claudeAgents) {
1310
- const generatedName = buildGeneratedName(plugin.manifest.name, agent.name);
1311
- const relativePath = `./claude/agents/${generatedName}.md`;
1312
- claudeManifest.agents.push(relativePath);
1313
- await writeTextFile(path.join(outputRoot, stripDotSlash(relativePath)), renderClaudeAgentContent(agent));
1314
- }
1139
+ if (plugin.manifest.mcpServers) {
1140
+ for (const file of await collectFilesForPath(plugin.rootDir, plugin.manifest.mcpServers))
1141
+ files.add(file);
1315
1142
  }
1316
1143
  }
1317
1144
  const sourceFiles = (await listFilesRecursively(plugin.rootDir)).filter((filePath) => !isDeclaredSkillAuthorOnlyFile(plugin, filePath));
@@ -1321,10 +1148,7 @@ export async function bundleLocalPlugin(plugin, outputRoot, options = {}) {
1321
1148
  continue;
1322
1149
  const rules = buildConfig?.fileRules?.[platform];
1323
1150
  if (rules) {
1324
- for (const filePath of applyFileRules(sourceFiles.filter((filePath) => !isDynamicSkillSourceFile(plugin, platform, filePath)), rules.include, rules.exclude)) {
1325
- const commandsRoot = resolvedSlashCommands && stripDotSlash(resolvedSlashCommands.rootRelativePath);
1326
- if (commandsRoot && (filePath === commandsRoot || filePath.startsWith(`${commandsRoot}/`)))
1327
- continue;
1151
+ for (const filePath of applyFileRules(sourceFiles, rules.include, rules.exclude)) {
1328
1152
  files.add(filePath);
1329
1153
  }
1330
1154
  for (const filePath of [...files]) {
@@ -1336,26 +1160,6 @@ export async function bundleLocalPlugin(plugin, outputRoot, options = {}) {
1336
1160
  await copyFileWithTemplateSupport(plugin.rootDir, outputRoot, filePath, platform, templatePatterns, templateVars);
1337
1161
  }
1338
1162
  }
1339
- if (resolvedSlashCommands) {
1340
- if (claudeManifest) {
1341
- claudeManifest.commands = './claude/commands';
1342
- }
1343
- if (codexManifest) {
1344
- codexManifest.skills ??= './codex/skills';
1345
- }
1346
- for (const command of resolvedSlashCommands.commands) {
1347
- if (claudeManifest && command.claude) {
1348
- await writeTextFile(path.join(outputRoot, 'claude', 'commands', `${command.name}.md`), renderClaudeSlashCommand(command));
1349
- }
1350
- if (codexManifest && command.codex) {
1351
- await writeTextFile(path.join(outputRoot, 'codex', 'skills', command.name, 'SKILL.md'), renderCodexSlashCommandSkillMarkdown(command));
1352
- await writeTextFile(path.join(outputRoot, 'codex', 'skills', command.name, 'agents', 'openai.yaml'), renderCodexSlashCommandOpenAiYaml(command));
1353
- for (const asset of command.codex.assets) {
1354
- await copySlashCommandAsset(plugin.rootDir, outputRoot, command.name, asset.sourceRelativePath, asset.generatedRelativePath);
1355
- }
1356
- }
1357
- }
1358
- }
1359
1163
  await materializeSkillRuntimeFiles(skillRuntimeFileProjections);
1360
1164
  if (await fs.pathExists(path.join(plugin.rootDir, 'README.md'))) {
1361
1165
  await copyBundleRootFile(plugin.rootDir, outputRoot, 'README.md');
@@ -1363,8 +1167,19 @@ export async function bundleLocalPlugin(plugin, outputRoot, options = {}) {
1363
1167
  for (const filePath of await collectAwRuntimeFiles(plugin)) {
1364
1168
  await copyBundleRootFile(plugin.rootDir, outputRoot, filePath);
1365
1169
  }
1170
+ if (plugin.manifest.skills) {
1171
+ const collection = stripDotSlash(plugin.manifest.skills);
1172
+ for (const file of await collectFilesForPath(plugin.rootDir, collection)) {
1173
+ const relative = path.posix.relative(collection, file);
1174
+ if (isSkillCollectionAuthorOnlyPath(relative))
1175
+ continue;
1176
+ await copyBundleRootFile(plugin.rootDir, outputRoot, file);
1177
+ }
1178
+ }
1179
+ if (plugin.manifest.mcpServers) {
1180
+ await copyBundleRootFile(plugin.rootDir, outputRoot, stripDotSlash(plugin.manifest.mcpServers));
1181
+ }
1366
1182
  await copyArtifactSourceDirectories(plugin, outputRoot);
1367
- portableRuntimeFiles.push(...await materializeGeneratedPortableSkillRuntimeFiles(plugin, outputRoot, supportedPlatforms));
1368
1183
  await copyManagedCommandPackages(plugin, outputRoot);
1369
1184
  await copyProductionPackageRoot(plugin, outputRoot);
1370
1185
  await materializeArtifactRuntimeImports(artifactRuntimeProjection.projections);
@@ -1390,15 +1205,11 @@ export async function bundleLocalPlugin(plugin, outputRoot, options = {}) {
1390
1205
  if ((options.runtimeSkillClosureValidation ?? 'current') === 'current') {
1391
1206
  for (const platform of supportedPlatforms) {
1392
1207
  const root = path.join(outputRoot, platform, 'skills');
1393
- const dynamicKeys = new Set((plugin.manifest.artifacts?.targets ?? [])
1394
- .filter((target) => target.platform === platform && target.skillKey !== undefined)
1395
- .map((target) => target.skillKey));
1396
1208
  for (const entry of await fs.readdir(root, { withFileTypes: true }).catch(() => [])) {
1397
- if (dynamicKeys.has(entry.name))
1398
- continue;
1399
1209
  const skillRoot = path.join(root, entry.name);
1400
- if (platform !== 'codex' && platform !== 'claude')
1401
- await validatePortableSkillDirectory(skillRoot);
1210
+ if (platform !== 'codex' && platform !== 'claude') {
1211
+ await validatePortableSkillDirectory(skillRoot, { frontmatterProfile: 'claude-current' });
1212
+ }
1402
1213
  await validateRuntimeSkillClosure(skillRoot);
1403
1214
  }
1404
1215
  }