@lesliechan721/aw 0.1.0-beta.73 → 0.1.0-beta.75

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 (370) 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 +125 -4
  44. package/dist/src/commands/public-lifecycle-result.js.map +1 -1
  45. package/dist/src/commands/public-lifecycle.d.ts +1 -0
  46. package/dist/src/commands/public-lifecycle.js +15 -2
  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 +27 -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 +531 -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 +60 -0
  61. package/dist/src/commands/rebuild-platform-integration.js +1264 -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 +40 -14
  84. package/dist/src/index.js.map +1 -1
  85. package/dist/src/output/command-receipt.d.ts +1 -1
  86. package/dist/src/output/command-receipt.js +3 -1
  87. package/dist/src/output/command-receipt.js.map +1 -1
  88. package/dist/src/output/native-consent.d.ts +2 -0
  89. package/dist/src/output/native-consent.js +5 -0
  90. package/dist/src/output/native-consent.js.map +1 -0
  91. package/dist/src/output/public-result.js +72 -0
  92. package/dist/src/output/public-result.js.map +1 -1
  93. package/dist/src/output/rebuild-progress.js +5 -5
  94. package/dist/src/output/rebuild-progress.js.map +1 -1
  95. package/dist/src/output/receipt-projection.js +19 -2
  96. package/dist/src/output/receipt-projection.js.map +1 -1
  97. package/dist/src/platforms/capabilities.d.ts +10 -0
  98. package/dist/src/platforms/capabilities.js +158 -0
  99. package/dist/src/platforms/capabilities.js.map +1 -0
  100. package/dist/src/platforms/contracts.d.ts +351 -0
  101. package/dist/src/platforms/contracts.js +2 -0
  102. package/dist/src/platforms/contracts.js.map +1 -0
  103. package/dist/src/platforms/cursor-workspace-hook.d.ts +22 -0
  104. package/dist/src/platforms/cursor-workspace-hook.js +185 -0
  105. package/dist/src/platforms/cursor-workspace-hook.js.map +1 -0
  106. package/dist/src/platforms/discovery.d.ts +80 -0
  107. package/dist/src/platforms/discovery.js +604 -0
  108. package/dist/src/platforms/discovery.js.map +1 -0
  109. package/dist/src/platforms/gemini-activation.d.ts +36 -0
  110. package/dist/src/platforms/gemini-activation.js +331 -0
  111. package/dist/src/platforms/gemini-activation.js.map +1 -0
  112. package/dist/src/platforms/gemini-consent.d.ts +8 -0
  113. package/dist/src/platforms/gemini-consent.js +79 -0
  114. package/dist/src/platforms/gemini-consent.js.map +1 -0
  115. package/dist/src/platforms/identity.d.ts +4 -0
  116. package/dist/src/platforms/identity.js +22 -0
  117. package/dist/src/platforms/identity.js.map +1 -0
  118. package/dist/src/platforms/inspection-grok.d.ts +4 -0
  119. package/dist/src/platforms/inspection-grok.js +204 -0
  120. package/dist/src/platforms/inspection-grok.js.map +1 -0
  121. package/dist/src/platforms/inspection-native.d.ts +6 -0
  122. package/dist/src/platforms/inspection-native.js +401 -0
  123. package/dist/src/platforms/inspection-native.js.map +1 -0
  124. package/dist/src/platforms/inspection-opencode.d.ts +4 -0
  125. package/dist/src/platforms/inspection-opencode.js +97 -0
  126. package/dist/src/platforms/inspection-opencode.js.map +1 -0
  127. package/dist/src/platforms/inspection-pi.d.ts +3 -0
  128. package/dist/src/platforms/inspection-pi.js +287 -0
  129. package/dist/src/platforms/inspection-pi.js.map +1 -0
  130. package/dist/src/platforms/inspection-query.d.ts +5 -0
  131. package/dist/src/platforms/inspection-query.js +36 -0
  132. package/dist/src/platforms/inspection-query.js.map +1 -0
  133. package/dist/src/platforms/inspection.d.ts +13 -0
  134. package/dist/src/platforms/inspection.js +180 -0
  135. package/dist/src/platforms/inspection.js.map +1 -0
  136. package/dist/src/platforms/layout.d.ts +21 -0
  137. package/dist/src/platforms/layout.js +239 -0
  138. package/dist/src/platforms/layout.js.map +1 -0
  139. package/dist/src/platforms/lifecycle-native-services.d.ts +3 -0
  140. package/dist/src/platforms/lifecycle-native-services.js +147 -0
  141. package/dist/src/platforms/lifecycle-native-services.js.map +1 -0
  142. package/dist/src/platforms/lifecycle-native.d.ts +13 -0
  143. package/dist/src/platforms/lifecycle-native.js +276 -0
  144. package/dist/src/platforms/lifecycle-native.js.map +1 -0
  145. package/dist/src/platforms/lifecycle.d.ts +25 -0
  146. package/dist/src/platforms/lifecycle.js +470 -0
  147. package/dist/src/platforms/lifecycle.js.map +1 -0
  148. package/dist/src/platforms/managed-command-placement.d.ts +8 -0
  149. package/dist/src/platforms/managed-command-placement.js +79 -0
  150. package/dist/src/platforms/managed-command-placement.js.map +1 -0
  151. package/dist/src/platforms/projection-code-extension.d.ts +8 -0
  152. package/dist/src/platforms/projection-code-extension.js +121 -0
  153. package/dist/src/platforms/projection-code-extension.js.map +1 -0
  154. package/dist/src/platforms/projection-command-resources.d.ts +7 -0
  155. package/dist/src/platforms/projection-command-resources.js +74 -0
  156. package/dist/src/platforms/projection-command-resources.js.map +1 -0
  157. package/dist/src/platforms/projection-files.d.ts +27 -0
  158. package/dist/src/platforms/projection-files.js +111 -0
  159. package/dist/src/platforms/projection-files.js.map +1 -0
  160. package/dist/src/platforms/projection-marketplace.d.ts +19 -0
  161. package/dist/src/platforms/projection-marketplace.js +42 -0
  162. package/dist/src/platforms/projection-marketplace.js.map +1 -0
  163. package/dist/src/platforms/projection.d.ts +10 -0
  164. package/dist/src/platforms/projection.js +446 -0
  165. package/dist/src/platforms/projection.js.map +1 -0
  166. package/dist/src/platforms/registry.d.ts +4 -0
  167. package/dist/src/platforms/registry.js +30 -0
  168. package/dist/src/platforms/registry.js.map +1 -0
  169. package/dist/src/platforms/supplement-layout.d.ts +16 -0
  170. package/dist/src/platforms/supplement-layout.js +31 -0
  171. package/dist/src/platforms/supplement-layout.js.map +1 -0
  172. package/dist/src/portable/commands.d.ts +7 -5
  173. package/dist/src/portable/commands.js +6 -1
  174. package/dist/src/portable/commands.js.map +1 -1
  175. package/dist/src/portable/materializer.d.ts +8 -6
  176. package/dist/src/portable/materializer.js +47 -245
  177. package/dist/src/portable/materializer.js.map +1 -1
  178. package/dist/src/portable/recovery-layout.js +2 -15
  179. package/dist/src/portable/recovery-layout.js.map +1 -1
  180. package/dist/src/portable/recovery.d.ts +10 -1
  181. package/dist/src/portable/recovery.js +34 -8
  182. package/dist/src/portable/recovery.js.map +1 -1
  183. package/dist/src/recovery/coordinator.d.ts +4 -7
  184. package/dist/src/recovery/coordinator.js +151 -119
  185. package/dist/src/recovery/coordinator.js.map +1 -1
  186. package/dist/src/recovery/demand.d.ts +1 -1
  187. package/dist/src/recovery/demand.js +10 -42
  188. package/dist/src/recovery/demand.js.map +1 -1
  189. package/dist/src/recovery/joint-coordinator.js +112 -52
  190. package/dist/src/recovery/joint-coordinator.js.map +1 -1
  191. package/dist/src/recovery/joint-demand.d.ts +4 -22
  192. package/dist/src/recovery/joint-demand.js +51 -40
  193. package/dist/src/recovery/joint-demand.js.map +1 -1
  194. package/dist/src/recovery/receipt.d.ts +23 -8
  195. package/dist/src/recovery/retirement.d.ts +1 -1
  196. package/dist/src/recovery/retirement.js +131 -29
  197. package/dist/src/recovery/retirement.js.map +1 -1
  198. package/dist/src/recovery/status.d.ts +13 -6
  199. package/dist/src/recovery/status.js +483 -79
  200. package/dist/src/recovery/status.js.map +1 -1
  201. package/dist/src/recovery/types.d.ts +3 -3
  202. package/dist/src/review/platform-profile.d.ts +3 -0
  203. package/dist/src/review/platform-profile.js +16 -0
  204. package/dist/src/review/platform-profile.js.map +1 -0
  205. package/dist/src/review/review-profile.d.ts +1 -0
  206. package/dist/src/review/review-profile.js +8 -2
  207. package/dist/src/review/review-profile.js.map +1 -1
  208. package/dist/src/review/review-selection.d.ts +2 -11
  209. package/dist/src/review/review-selection.js +97 -71
  210. package/dist/src/review/review-selection.js.map +1 -1
  211. package/dist/src/review/review-types.d.ts +3 -0
  212. package/dist/src/review/review-types.js.map +1 -1
  213. package/dist/src/review/skill-materialization.d.ts +44 -9
  214. package/dist/src/review/skill-materialization.js +112 -136
  215. package/dist/src/review/skill-materialization.js.map +1 -1
  216. package/dist/src/review/source-binding.d.ts +8 -5
  217. package/dist/src/review/source-binding.js +99 -41
  218. package/dist/src/review/source-binding.js.map +1 -1
  219. package/dist/src/tui/agent-management.js +112 -10
  220. package/dist/src/tui/agent-management.js.map +1 -1
  221. package/dist/src/tui/agent-settings.d.ts +3 -0
  222. package/dist/src/tui/agent-settings.js +10 -11
  223. package/dist/src/tui/agent-settings.js.map +1 -1
  224. package/dist/src/tui/console-app-v4.js +58 -20
  225. package/dist/src/tui/console-app-v4.js.map +1 -1
  226. package/dist/src/tui/content-item-card.js +2 -2
  227. package/dist/src/tui/content-item-card.js.map +1 -1
  228. package/dist/src/tui/controller-runtime.js +198 -152
  229. package/dist/src/tui/controller-runtime.js.map +1 -1
  230. package/dist/src/tui/controller.d.ts +5 -9
  231. package/dist/src/tui/controller.js +40 -18
  232. package/dist/src/tui/controller.js.map +1 -1
  233. package/dist/src/tui/deployment-view.d.ts +10 -0
  234. package/dist/src/tui/deployment-view.js +103 -0
  235. package/dist/src/tui/deployment-view.js.map +1 -0
  236. package/dist/src/tui/glossary.js +4 -4
  237. package/dist/src/tui/glossary.js.map +1 -1
  238. package/dist/src/tui/model.d.ts +5 -0
  239. package/dist/src/tui/model.js +73 -12
  240. package/dist/src/tui/model.js.map +1 -1
  241. package/dist/src/tui/operation-diagnostic-screens.js +2 -1
  242. package/dist/src/tui/operation-diagnostic-screens.js.map +1 -1
  243. package/dist/src/tui/operation-history.d.ts +5 -4
  244. package/dist/src/tui/operation-history.js.map +1 -1
  245. package/dist/src/tui/operation-review-planner.d.ts +7 -2
  246. package/dist/src/tui/operation-review-planner.js +97 -42
  247. package/dist/src/tui/operation-review-planner.js.map +1 -1
  248. package/dist/src/tui/plugin-content.d.ts +5 -3
  249. package/dist/src/tui/plugin-content.js +70 -508
  250. package/dist/src/tui/plugin-content.js.map +1 -1
  251. package/dist/src/tui/plugin-detail.d.ts +3 -2
  252. package/dist/src/tui/plugin-detail.js +33 -25
  253. package/dist/src/tui/plugin-detail.js.map +1 -1
  254. package/dist/src/tui/scoped-inventory.d.ts +10 -6
  255. package/dist/src/tui/scoped-inventory.js +34 -1
  256. package/dist/src/tui/scoped-inventory.js.map +1 -1
  257. package/dist/src/types.d.ts +4 -63
  258. package/dist/src/types.js.map +1 -1
  259. package/dist/src/utils/agent-version.d.ts +10 -4
  260. package/dist/src/utils/agent-version.js.map +1 -1
  261. package/dist/src/utils/artifact-plan.d.ts +26 -2
  262. package/dist/src/utils/artifact-plan.js +113 -489
  263. package/dist/src/utils/artifact-plan.js.map +1 -1
  264. package/dist/src/utils/artifact-renderer.d.ts +100 -93
  265. package/dist/src/utils/artifact-renderer.js +173 -346
  266. package/dist/src/utils/artifact-renderer.js.map +1 -1
  267. package/dist/src/utils/artifact-request.d.ts +21 -11
  268. package/dist/src/utils/artifact-request.js +56 -80
  269. package/dist/src/utils/artifact-request.js.map +1 -1
  270. package/dist/src/utils/bundle-layout.js +30 -146
  271. package/dist/src/utils/bundle-layout.js.map +1 -1
  272. package/dist/src/utils/catalog-digests.d.ts +2 -12
  273. package/dist/src/utils/catalog-digests.js +0 -39
  274. package/dist/src/utils/catalog-digests.js.map +1 -1
  275. package/dist/src/utils/catalog-source-references.d.ts +7 -0
  276. package/dist/src/utils/catalog-source-references.js +234 -19
  277. package/dist/src/utils/catalog-source-references.js.map +1 -1
  278. package/dist/src/utils/codex-config-observation.d.ts +19 -0
  279. package/dist/src/utils/codex-config-observation.js +145 -0
  280. package/dist/src/utils/codex-config-observation.js.map +1 -0
  281. package/dist/src/utils/codex-executable-discovery.d.ts +2 -0
  282. package/dist/src/utils/codex-executable-discovery.js +47 -13
  283. package/dist/src/utils/codex-executable-discovery.js.map +1 -1
  284. package/dist/src/utils/codex-manager.js +1 -1
  285. package/dist/src/utils/codex-manager.js.map +1 -1
  286. package/dist/src/utils/codex-native-observation.d.ts +3 -0
  287. package/dist/src/utils/codex-native-observation.js +53 -0
  288. package/dist/src/utils/codex-native-observation.js.map +1 -1
  289. package/dist/src/utils/codex-shared-native.d.ts +3 -1
  290. package/dist/src/utils/codex-shared-native.js +46 -5
  291. package/dist/src/utils/codex-shared-native.js.map +1 -1
  292. package/dist/src/utils/codex-skill-staging.d.ts +4 -3
  293. package/dist/src/utils/codex-skill-staging.js.map +1 -1
  294. package/dist/src/utils/codex-surface-analysis.d.ts +5 -2
  295. package/dist/src/utils/codex-surface-analysis.js +28 -57
  296. package/dist/src/utils/codex-surface-analysis.js.map +1 -1
  297. package/dist/src/utils/component-command-preparation.d.ts +34 -0
  298. package/dist/src/utils/component-command-preparation.js +228 -0
  299. package/dist/src/utils/component-command-preparation.js.map +1 -0
  300. package/dist/src/utils/component-resources.d.ts +43 -0
  301. package/dist/src/utils/component-resources.js +304 -0
  302. package/dist/src/utils/component-resources.js.map +1 -0
  303. package/dist/src/utils/dynamic-skill-tree.d.ts +17 -6
  304. package/dist/src/utils/dynamic-skill-tree.js +7 -3
  305. package/dist/src/utils/dynamic-skill-tree.js.map +1 -1
  306. package/dist/src/utils/local-marketplace.d.ts +11 -44
  307. package/dist/src/utils/local-marketplace.js +11 -638
  308. package/dist/src/utils/local-marketplace.js.map +1 -1
  309. package/dist/src/utils/managed-command-evidence.d.ts +2 -2
  310. package/dist/src/utils/managed-command-evidence.js +5 -81
  311. package/dist/src/utils/managed-command-evidence.js.map +1 -1
  312. package/dist/src/utils/managed-command-materialization.d.ts +5 -2
  313. package/dist/src/utils/managed-command-materialization.js +35 -35
  314. package/dist/src/utils/managed-command-materialization.js.map +1 -1
  315. package/dist/src/utils/managed-command-preparation.d.ts +67 -0
  316. package/dist/src/utils/managed-command-preparation.js +146 -0
  317. package/dist/src/utils/managed-command-preparation.js.map +1 -0
  318. package/dist/src/utils/managed-command-review.d.ts +26 -0
  319. package/dist/src/utils/managed-command-review.js +68 -0
  320. package/dist/src/utils/managed-command-review.js.map +1 -0
  321. package/dist/src/utils/managed-command-store.js +26 -15
  322. package/dist/src/utils/managed-command-store.js.map +1 -1
  323. package/dist/src/utils/native-cli.d.ts +23 -0
  324. package/dist/src/utils/native-cli.js +51 -2
  325. package/dist/src/utils/native-cli.js.map +1 -1
  326. package/dist/src/utils/native-demand.d.ts +20 -1
  327. package/dist/src/utils/native-demand.js.map +1 -1
  328. package/dist/src/utils/native-tool-review.d.ts +3 -6
  329. package/dist/src/utils/native-tool-review.js +25 -11
  330. package/dist/src/utils/native-tool-review.js.map +1 -1
  331. package/dist/src/utils/ownership.d.ts +26 -3
  332. package/dist/src/utils/ownership.js +95 -9
  333. package/dist/src/utils/ownership.js.map +1 -1
  334. package/dist/src/utils/paths.d.ts +1 -1
  335. package/dist/src/utils/paths.js +2 -0
  336. package/dist/src/utils/paths.js.map +1 -1
  337. package/dist/src/utils/platform-empty-state.d.ts +46 -0
  338. package/dist/src/utils/platform-empty-state.js +123 -0
  339. package/dist/src/utils/platform-empty-state.js.map +1 -0
  340. package/dist/src/utils/plugin-config-impact.d.ts +17 -11
  341. package/dist/src/utils/plugin-config-impact.js +46 -62
  342. package/dist/src/utils/plugin-config-impact.js.map +1 -1
  343. package/dist/src/utils/plugin-config-write.js +52 -53
  344. package/dist/src/utils/plugin-config-write.js.map +1 -1
  345. package/dist/src/utils/plugin-config.d.ts +0 -2
  346. package/dist/src/utils/plugin-config.js +0 -6
  347. package/dist/src/utils/plugin-config.js.map +1 -1
  348. package/dist/src/utils/plugin-dependencies.d.ts +1 -1
  349. package/dist/src/utils/plugin-dependencies.js.map +1 -1
  350. package/dist/src/utils/plugin-scripts.d.ts +4 -0
  351. package/dist/src/utils/plugin-scripts.js +11 -0
  352. package/dist/src/utils/plugin-scripts.js.map +1 -1
  353. package/dist/src/utils/runtime-config.d.ts +5 -7
  354. package/dist/src/utils/runtime-config.js +12 -25
  355. package/dist/src/utils/runtime-config.js.map +1 -1
  356. package/dist/src/utils/windows-npm-shim.js +19 -2
  357. package/dist/src/utils/windows-npm-shim.js.map +1 -1
  358. package/package.json +3 -3
  359. package/dist/src/utils/claude-native-render-receipt.d.ts +0 -14
  360. package/dist/src/utils/claude-native-render-receipt.js +0 -26
  361. package/dist/src/utils/claude-native-render-receipt.js.map +0 -1
  362. package/dist/src/utils/claude-skills-root.d.ts +0 -8
  363. package/dist/src/utils/claude-skills-root.js +0 -87
  364. package/dist/src/utils/claude-skills-root.js.map +0 -1
  365. package/dist/src/utils/codex-native-render-receipt.d.ts +0 -40
  366. package/dist/src/utils/codex-native-render-receipt.js +0 -205
  367. package/dist/src/utils/codex-native-render-receipt.js.map +0 -1
  368. package/dist/src/utils/slash-commands.d.ts +0 -1
  369. package/dist/src/utils/slash-commands.js +0 -2
  370. package/dist/src/utils/slash-commands.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { type PortablePlatformTarget } from '@lesliechan721/aw-plugin-core';
1
+ import { type PlatformTarget } from '@lesliechan721/aw-plugin-core';
2
2
  import type { CliPromptResult } from '../commands/runtime.js';
3
3
  import type { PortableSkillCandidate, Scope } from '../types.js';
4
4
  import { type CatalogOperationContext } from '../utils/catalog-operation-context.js';
@@ -7,7 +7,7 @@ export interface PortableSkillTarget {
7
7
  agent?: string;
8
8
  }
9
9
  export declare const SKILLS_CLI_SUPPORTED_VERSION_LABEL = "AW Portable writer";
10
- export type PortableCommandErrorCode = 'portableUnsupported' | 'requiredConfigMissing' | 'portableNoSkills' | 'portableNoSkillsSelected' | 'portableSkillNameConflict' | 'portableSkillInvalid' | 'portableSensitiveOutput' | 'portableRuntimeImportMissing' | 'portableRendererFailed' | 'portableInvalidAgentSelection' | 'portableRetryNotExact' | 'portableNoRetryTargets' | 'portableOutputConflict' | 'confirmationRequired' | 'reviewStale';
10
+ export type PortableCommandErrorCode = 'portableUnsupported' | 'requiredConfigMissing' | 'portableNoSkills' | 'portableNoSkillsSelected' | 'portableSkillNameConflict' | 'portableSkillInvalid' | 'portableSensitiveOutput' | 'portableRuntimeImportMissing' | 'portableRendererFailed' | 'portableComponentsUnmet' | 'portableInvalidAgentSelection' | 'portableRetryNotExact' | 'portableNoRetryTargets' | 'portableOutputConflict' | 'confirmationRequired' | 'reviewStale';
11
11
  export declare class PortableCommandError extends Error {
12
12
  readonly code: PortableCommandErrorCode;
13
13
  constructor(code: PortableCommandErrorCode, message: string);
@@ -84,9 +84,9 @@ export interface PortableRetryReview extends PortableReview {
84
84
  export interface PortableMaterializeReceipt {
85
85
  receiptSchemaVersion: 5;
86
86
  command: 'skill:materialize';
87
- ok: true;
87
+ ok: boolean;
88
88
  plugin: PortableInstallReceipt['plugin'];
89
- platform: PortablePlatformTarget;
89
+ platform: PlatformTarget;
90
90
  scope: Scope;
91
91
  out: string;
92
92
  selectedSkills: PortableSkillCandidate[];
@@ -155,12 +155,14 @@ export declare function executePortableRetry(_options: {
155
155
  export declare function renderPortableReview(_review: PortableReview): string[];
156
156
  export declare function materializePortableSkillsToDirectory(options: {
157
157
  selector: string;
158
- platform: PortablePlatformTarget;
158
+ platform: PlatformTarget;
159
159
  scope: string;
160
160
  out: string;
161
161
  requestedSkills?: string[];
162
162
  /** Recovery may prepare an empty deployment to remove its obsolete owned Skills. */
163
163
  allowEmpty?: boolean;
164
+ /** Freeze capability gaps for Recovery without granting permission to remove old output. */
165
+ allowUnmet?: boolean;
164
166
  cwd: string;
165
167
  cliVersion: string;
166
168
  env?: NodeJS.ProcessEnv;
@@ -182,6 +182,10 @@ export async function materializePortableSkillsToDirectory(options) {
182
182
  catalogOperationContext,
183
183
  });
184
184
  try {
185
+ const unmet = materialized.preparation.flatMap((unit) => unit.unmet);
186
+ if (unmet.length && !options.allowUnmet) {
187
+ throw new PortableCommandError('portableComponentsUnmet', `The explicit profile cannot prepare all requested components: ${JSON.stringify(unmet)}.`);
188
+ }
185
189
  const selected = options.allowEmpty && options.requestedSkills === undefined && materialized.candidates.length === 0
186
190
  ? [] : selectCandidates(materialized.candidates, options.requestedSkills);
187
191
  await prepareExistingOutput(target, materialized.pluginId, materialized.sourceIdentity, options.scope, options.platform);
@@ -210,7 +214,7 @@ export async function materializePortableSkillsToDirectory(options) {
210
214
  const receipt = {
211
215
  receiptSchemaVersion: 5,
212
216
  command: 'skill:materialize',
213
- ok: true,
217
+ ok: unmet.length === 0,
214
218
  plugin: {
215
219
  id: materialized.pluginId,
216
220
  ...(materialized.sourceId ? { sourceId: materialized.sourceId } : {}),
@@ -252,6 +256,7 @@ export async function materializePortableSkillsToDirectory(options) {
252
256
  scope,
253
257
  inputDigest: materialized.configDigest,
254
258
  },
259
+ preparation: materialized.preparation,
255
260
  artifacts: selected.map((candidate) => ({
256
261
  kind: 'portable-skill',
257
262
  plugin: parsePluginId(candidate.providerPluginId).pluginName,
@@ -1 +1 @@
1
- {"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../src/portable/commands.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,EAAE,wBAAwB,EAA+B,MAAM,+BAA+B,CAAC;AAItG,OAAO,EAAE,8BAA8B,EAAgC,MAAM,uCAAuC,CAAC;AACrH,OAAO,EAAE,gCAAgC,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,uCAAuC,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAC9G,OAAO,EAAE,sBAAsB,EAAE,oCAAoC,EAAE,kCAAkC,EAAE,MAAM,mBAAmB,CAAC;AACrI,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MA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C;gBAAS,CAAC;YACT,IAAI,CAAC,SAAS;gBAAE,MAAM,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;YAAS,CAAC;QACT,MAAM,YAAY,CAAC,OAAO,EAAE,CAAC;IAC/B,CAAC;AACH,CAAC"}
@@ -1,4 +1,5 @@
1
- import { type PortablePlatformTarget } from '@lesliechan721/aw-plugin-core';
1
+ import { type PlatformTarget } from '@lesliechan721/aw-plugin-core';
2
+ import { type ComponentPreparationBinding } from '../review/skill-materialization.js';
2
3
  import type { PluginMeta, PortableSkillCandidate, Scope } from '../types.js';
3
4
  import type { CatalogSourcesConfigSnapshot } from '../utils/catalog-sources.js';
4
5
  import type { CatalogOperationContext } from '../utils/catalog-operation-context.js';
@@ -6,7 +7,7 @@ import { type AwCatalogSnapshotBindingSource, type AwSourceBindingProfile } from
6
7
  export interface PortableMaterializationProvenance {
7
8
  schemaVersion: 1;
8
9
  pluginId: string;
9
- platform: PortablePlatformTarget;
10
+ platform: PlatformTarget;
10
11
  scope: Scope;
11
12
  dependencyPluginIds: string[];
12
13
  configDigest: string;
@@ -18,7 +19,7 @@ export interface PortableMaterializationProvenance {
18
19
  export interface MaterializePortableSkillsOptions {
19
20
  plugins: readonly PluginMeta[];
20
21
  pluginId: string;
21
- platform: PortablePlatformTarget;
22
+ platform: PlatformTarget;
22
23
  scope: Scope;
23
24
  cwd: string;
24
25
  env?: NodeJS.ProcessEnv;
@@ -33,19 +34,20 @@ export interface MaterializedPortableSkills {
33
34
  sourceId?: string;
34
35
  sourceIdentity?: string;
35
36
  pluginVersion?: string;
36
- platform: PortablePlatformTarget;
37
+ platform: PlatformTarget;
37
38
  scope: Scope;
38
39
  candidates: PortableSkillCandidate[];
39
40
  dependencyPluginIds: string[];
40
41
  configDigest: string;
41
42
  digest: string;
42
43
  provenancePath: string;
44
+ preparation: ComponentPreparationBinding[];
43
45
  sourceBindingSource?: AwCatalogSnapshotBindingSource;
44
46
  cleanup(): Promise<void>;
45
47
  }
46
48
  export interface MaterializePortableSkillsFromCatalogOptions {
47
49
  selector: string;
48
- platform: PortablePlatformTarget;
50
+ platform: PlatformTarget;
49
51
  scope: Scope;
50
52
  cwd: string;
51
53
  cliVersion: string;
@@ -65,7 +67,7 @@ export interface PortableCatalogBindingInput {
65
67
  /** Read-only configuration evidence; it is not part of the materialization identity. */
66
68
  providerConfigs?: ReadonlyArray<readonly [string, string]>;
67
69
  }
68
- export declare function assertPortablePlatform(platform: unknown): asserts platform is PortablePlatformTarget;
70
+ export declare function assertPortablePlatform(platform: unknown): asserts platform is PlatformTarget;
69
71
  export declare function resolvePortableCatalogBindingInput(options: MaterializePortableSkillsFromCatalogOptions): Promise<PortableCatalogBindingInput>;
70
72
  export declare function materializePortableSkillsFromCatalog(options: MaterializePortableSkillsFromCatalogOptions): Promise<MaterializedPortableSkills>;
71
73
  export declare function materializePortableSkills(options: MaterializePortableSkillsOptions): Promise<MaterializedPortableSkills>;
@@ -3,25 +3,21 @@ import os from 'node:os';
3
3
  import path from 'node:path';
4
4
  import { stripVTControlCharacters } from 'node:util';
5
5
  import fs from 'fs-extra';
6
- import { isPortablePlatformTarget, resolveSupportedPlatforms } from '@lesliechan721/aw-plugin-core';
7
- import { prepareSkillPluginBundle } from '../review/skill-materialization.js';
8
- import { validateArtifactPlan } from '../utils/artifact-plan.js';
9
- import { runArtifactRenderer, } from '../utils/artifact-renderer.js';
10
- import { calculateFileDigest } from '../utils/bundle-integrity.js';
11
- import { AW_PLUGIN_REQUIREMENTS_RECEIPT_PATH, parsePortableSkillFrontmatter, validatePortableSkillDirectory, } from '../utils/dynamic-skill-tree.js';
6
+ import { isPlatformTarget, PLATFORM_TARGETS, resolveSupportedPlatforms } from '@lesliechan721/aw-plugin-core';
7
+ import { createIsolatedSkillEnv, materializeProfilePluginComponents, prepareSkillPluginBundle } from '../review/skill-materialization.js';
8
+ import { parsePortableSkillFrontmatter, validatePortableSkillDirectory, } from '../utils/dynamic-skill-tree.js';
9
+ import { writePluginConfigStore } from '../utils/plugin-config.js';
10
+ import { getAuthoringPlatformCapabilities } from '../review/platform-profile.js';
12
11
  import { resolvePluginMetaDependencyClosure } from '../utils/plugin-dependencies.js';
13
- import { createAwPluginRequirementsReceipt, parseAwPluginRequirementsReceipt, checkAwCapabilitySupport, readPluginManifest, } from '../utils/manifest.js';
12
+ import { checkAwCapabilitySupport, readPluginManifest, } from '../utils/manifest.js';
14
13
  import { withResolvedCatalogPlugin } from '../utils/multi-source-catalog.js';
15
- import { prepareWindowsJobHelper } from '../utils/process-tree.js';
16
- import { assertNoSensitiveConfigInFiles, collectSensitivePluginConfigValues, } from '../utils/plugin-scripts.js';
17
14
  import { validateRuntimeSkillClosure } from '../utils/runtime-skill-closure.js';
18
- import { isSkillAuthorOnlyPath } from '../utils/skill-authoring.js';
19
15
  import { validateCatalogSnapshotPluginEntriesComplete } from '../utils/catalog-snapshot.js';
20
16
  import { AwCapabilityUnsupportedError, IMPLEMENTED_AW_CAPABILITIES, } from '../commands/aw-capabilities.js';
21
17
  import { resolveCatalogSnapshotBindingSource, resolvePortablePluginProfileConfig, resolvePortableProfileBindingInputs, } from '../review/source-binding.js';
22
18
  export function assertPortablePlatform(platform) {
23
- if (!isPortablePlatformTarget(platform)) {
24
- throw new Error('Portable materialization requires an explicit Portable canonical platform: antigravity, cursor, opencode, pi, or generic.');
19
+ if (!isPlatformTarget(platform)) {
20
+ throw new Error(`Skill export requires an explicit canonical platform: ${PLATFORM_TARGETS.join(', ')}.`);
25
21
  }
26
22
  }
27
23
  function pluginId(plugin) {
@@ -93,246 +89,35 @@ async function copyTreeFiles(files, targetRoot) {
93
89
  await fs.writeFile(targetPath, content);
94
90
  }
95
91
  }
96
- async function overlayDirectory(sourceRoot, files) {
97
- const visit = async (current, parent = '') => {
98
- const stats = await fs.lstat(current).catch(() => undefined);
99
- if (!stats?.isDirectory() || stats.isSymbolicLink()) {
100
- throw new Error(`Portable Skill source must be a regular directory: ${sourceRoot}.`);
101
- }
102
- for (const entry of await fs.readdir(current, { withFileTypes: true })) {
103
- const relativePath = parent ? `${parent}/${entry.name}` : entry.name;
104
- if (isSkillAuthorOnlyPath(relativePath))
105
- continue;
106
- const absolutePath = path.join(current, entry.name);
107
- if (entry.isSymbolicLink()) {
108
- throw new Error(`Portable Skill source contains a symbolic link: ${relativePath}.`);
109
- }
110
- if (entry.isDirectory()) {
111
- await visit(absolutePath, relativePath);
112
- }
113
- else if (entry.isFile()) {
114
- files[relativePath] = await fs.readFile(absolutePath);
115
- }
116
- else {
117
- throw new Error(`Portable Skill source contains a non-regular file: ${relativePath}.`);
118
- }
119
- }
120
- };
121
- await visit(sourceRoot);
122
- }
123
- function assertNoUnresolvedTemplates(candidate) {
124
- for (const [relativePath, content] of Object.entries(candidate.tree.files)) {
125
- const text = content.toString('utf8');
126
- if (text.includes('{{aw.command:')) {
127
- throw new Error('managedCommandPortableUnsupported: Portable Skills cannot reference local managed commands.');
128
- }
129
- if (/\{\{[^{}]+\}\}/u.test(text)) {
130
- throw new Error(`Portable Skill "${candidate.tree.skillKey}" contains an unresolved template in "${relativePath}".`);
131
- }
132
- }
133
- }
134
- async function assertRuntimeImports(plugin) {
135
- const imports = (plugin.manifest.artifacts?.targets ?? [])
136
- .filter((target) => target.target === 'agent-skills.skill')
137
- .flatMap((target) => target.runtimeImports ?? []);
138
- for (const runtimeImport of imports) {
139
- await assertRuntimeImport(plugin, runtimeImport);
140
- }
141
- }
142
- async function assertRuntimeImport(plugin, runtimeImport) {
143
- if (!runtimeImport.resolved) {
144
- throw new Error(`Artifact runtime import "${runtimeImport.name}" is not resolved in the consumer bundle.`);
145
- }
146
- const root = await fs.realpath(plugin.rootDir);
147
- const importPath = path.join(root, runtimeImport.resolved.path.replace(/^\.\//u, ''));
148
- const stats = await fs.lstat(importPath).catch(() => undefined);
149
- if (!stats?.isFile() || stats.isSymbolicLink()) {
150
- throw new Error(`Artifact runtime import "${runtimeImport.name}" is missing from the consumer bundle.`);
151
- }
152
- const realImport = await fs.realpath(importPath);
153
- const relative = path.relative(root, realImport);
154
- if (relative.startsWith(`..${path.sep}`) || path.isAbsolute(relative)) {
155
- throw new Error(`Artifact runtime import "${runtimeImport.name}" escapes the consumer bundle.`);
156
- }
157
- if (await calculateFileDigest(realImport) !== runtimeImport.resolved.digest) {
158
- throw new Error(`Artifact runtime import "${runtimeImport.name}" has an invalid digest.`);
159
- }
160
- }
161
92
  async function materializePluginCandidates(options) {
162
- options.signal?.throwIfAborted();
163
- const dynamicTargets = (options.plugin.manifest.artifacts?.targets ?? [])
164
- .filter((target) => target.target === 'agent-skills.skill'
165
- && target.platform === options.platform
166
- && target.scopes.includes(options.scope)
167
- && (!options.selectedSkills || options.selectedSkills.has(target.skillKey)));
168
- const dynamicKeys = new Set((options.plugin.manifest.artifacts?.targets ?? [])
169
- .filter((target) => target.target === 'agent-skills.skill' && target.platform === options.platform)
170
- .map((target) => target.skillKey));
171
- const output = [];
172
- let config;
173
- let sensitiveValues = [];
174
- if (!options.selectedSkills) {
175
- const profileConfig = await resolvePortablePluginProfileConfig({
176
- plugins: options.plugins,
177
- plugin: options.plugin,
178
- platform: options.platform,
179
- scope: options.scope,
180
- cwd: options.cwd,
181
- env: options.env,
93
+ const profileConfig = options.profileConfig ?? await resolvePortablePluginProfileConfig({ ...options });
94
+ options.recordConfigDigest(pluginId(options.plugin), profileConfig.digest);
95
+ const stagingRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'aw-profile-skills-'));
96
+ try {
97
+ const materialized = await materializeProfilePluginComponents({
98
+ ...options, outputRoot: stagingRoot, kinds: ['skill'], config: profileConfig.config,
99
+ selectedSkills: options.selectedSkills ? [...options.selectedSkills] : undefined,
182
100
  });
183
- config = profileConfig.config;
184
- options.recordConfigDigest(pluginId(options.plugin), profileConfig.digest);
185
- sensitiveValues = collectSensitivePluginConfigValues(options.plugin.manifest, config.values, options.platform);
186
- }
187
- const staticRoot = path.join(options.plugin.rootDir, options.platform, 'skills');
188
- if (await fs.pathExists(staticRoot)) {
189
- const rootStats = await fs.lstat(staticRoot).catch(() => undefined);
190
- if (!rootStats?.isDirectory() || rootStats.isSymbolicLink()) {
191
- throw new Error('Portable Skills root must be a regular directory.');
192
- }
193
- const entries = await fs.readdir(staticRoot, { withFileTypes: true });
194
- for (const entry of entries.sort((left, right) => left.name.localeCompare(right.name))) {
195
- const entryStats = await fs.lstat(path.join(staticRoot, entry.name)).catch(() => undefined);
196
- if (!entryStats?.isDirectory() || entryStats.isSymbolicLink()) {
197
- throw new Error(`Portable Skills root direct child must be a regular directory: ${entry.name}.`);
198
- }
199
- if (dynamicKeys.has(entry.name))
200
- continue;
201
- if (options.selectedSkills && !options.selectedSkills.has(entry.name))
202
- continue;
203
- output.push({
204
- plugin: options.plugin,
205
- relation: options.relation,
206
- dynamic: false,
207
- tree: await validatePortableSkillDirectory(path.join(staticRoot, entry.name)),
208
- });
209
- }
210
- }
211
- const finalizeCandidates = () => {
212
- const receipt = createAwPluginRequirementsReceipt({ name: options.plugin.manifest.name, version: options.plugin.manifest.version }, options.plugin.manifest.requires?.aw.capabilities ?? []);
213
- const receiptBytes = Buffer.from(`${JSON.stringify(receipt, null, 2)}\n`, 'utf8');
214
- for (const candidate of output) {
215
- const existingReceipt = candidate.tree.files[AW_PLUGIN_REQUIREMENTS_RECEIPT_PATH];
216
- if (existingReceipt && options.inputMode !== 'bundle') {
217
- throw new Error(`Portable Skill "${candidate.tree.skillKey}" cannot declare reserved file "${AW_PLUGIN_REQUIREMENTS_RECEIPT_PATH}".`);
218
- }
219
- if (existingReceipt) {
220
- let parsedReceipt;
221
- try {
222
- parsedReceipt = parseAwPluginRequirementsReceipt(JSON.parse(existingReceipt.toString('utf8')));
223
- }
224
- catch {
225
- throw new Error(`Portable Skill "${candidate.tree.skillKey}" has an invalid reserved requirements receipt.`);
226
- }
227
- if (JSON.stringify(parsedReceipt) !== JSON.stringify(receipt)) {
228
- throw new Error(`Portable Skill "${candidate.tree.skillKey}" has a mismatched reserved requirements receipt.`);
229
- }
230
- }
231
- else {
232
- candidate.tree.files[AW_PLUGIN_REQUIREMENTS_RECEIPT_PATH] = receiptBytes;
233
- }
234
- const filesToScan = { ...candidate.tree.files };
235
- delete filesToScan[AW_PLUGIN_REQUIREMENTS_RECEIPT_PATH];
236
- assertNoSensitiveConfigInFiles(filesToScan, sensitiveValues, 'portableSkillSensitiveConfigExposed: Portable Skill exposes sensitive config.');
101
+ options.recordPreparation(materialized.preparation.map((unit) => ({ ...unit, outputs: [] })));
102
+ const output = [];
103
+ for (const skill of materialized.skills) {
104
+ const tree = await validatePortableSkillDirectory(skill.path);
105
+ const candidate = { plugin: options.plugin, relation: options.relation, dynamic: skill.dynamic, tree };
237
106
  assertNoUnresolvedTemplates(candidate);
107
+ output.push(candidate);
238
108
  }
239
109
  return output;
240
- };
241
- if (dynamicTargets.length === 0) {
242
- if (options.selectedSkills) {
243
- options.recordConfigDigest(pluginId(options.plugin), `sha256:${crypto.createHash('sha256')
244
- .update(JSON.stringify([]))
245
- .digest('hex')}`);
246
- }
247
- return finalizeCandidates();
248
110
  }
249
- await assertRuntimeImports(options.plugin);
250
- if (process.platform === 'win32') {
251
- await prepareWindowsJobHelper();
111
+ finally {
112
+ await fs.remove(stagingRoot);
252
113
  }
253
- const rendered = await runArtifactRenderer({
254
- event: 'materialize',
255
- referencePlugins: options.plugins,
256
- plugin: options.plugin,
257
- platform: options.platform,
258
- scope: options.scope,
259
- cwd: options.cwd,
260
- commandEnv: options.env,
261
- signal: options.signal,
262
- requestedArtifactIds: dynamicTargets.map((target) => target.id),
263
- });
264
- if (options.selectedSkills) {
265
- config = rendered.context.config;
266
- sensitiveValues = collectSensitivePluginConfigValues(options.plugin.manifest, config.values, options.platform);
267
- options.recordConfigDigest(pluginId(options.plugin), `sha256:${crypto.createHash('sha256')
268
- .update(JSON.stringify({ platform: options.platform, values: config.values, sources: config.sources }))
269
- .digest('hex')}`);
270
- }
271
- if (!config) {
272
- throw new Error(`Portable config is unresolved for plugin "${options.plugin.manifest.name}".`);
273
- }
274
- const plan = validateArtifactPlan({
275
- pluginName: options.plugin.manifest.name,
276
- manifest: options.plugin.manifest,
277
- plan: rendered.plan,
278
- platform: options.platform,
279
- scope: options.scope,
280
- requestedArtifactIds: rendered.context.requestedArtifactIds,
281
- renderConfig: config,
282
- rendererDigest: rendered.target.rendererDigest,
283
- manifestDigest: rendered.target.manifestDigest,
284
- });
285
- const sourcesById = new Map(rendered.context.artifactSources.map((source) => [source.id, source]));
286
- const portableRuntimeProjectionPath = path.join(options.plugin.rootDir, '.agents-plugin', 'portable-runtime-files.json');
287
- const portableRuntimeProjections = await fs.readJson(portableRuntimeProjectionPath)
288
- .catch(() => []);
289
- for (const artifact of plan.artifacts) {
290
- if (artifact.target !== 'agent-skills.skill' || artifact.state === 'disabled')
291
- continue;
292
- const files = {};
293
- for (const sourceDir of sourcesById.get(artifact.id)?.sourceDirs ?? []) {
294
- await overlayDirectory(sourceDir, files);
295
- }
296
- for (const projection of portableRuntimeProjections.filter((entry) => entry.platform === options.platform && entry.skill === artifact.skillKey)) {
297
- const expectedPath = `./${options.platform}/skills/${artifact.skillKey}/${projection.target}`;
298
- if (projection.path !== expectedPath
299
- || projection.target.includes('\\')
300
- || path.posix.normalize(projection.target) !== projection.target
301
- || !/^(?:references|assets|scripts)\/.+/u.test(projection.target)) {
302
- throw new Error(`Portable runtime projection "${artifact.skillKey}/${projection.target}" has an invalid bundle path.`);
303
- }
304
- const projectionPath = path.join(options.plugin.rootDir, projection.path.replace(/^\.\//u, ''));
305
- if (await calculateFileDigest(projectionPath) !== projection.digest) {
306
- throw new Error(`Portable runtime projection "${artifact.skillKey}/${projection.target}" has an invalid digest.`);
307
- }
308
- files[projection.target] = await fs.readFile(projectionPath);
309
- }
310
- for (const [relativePath, content] of Object.entries(artifact.content?.files ?? {})) {
311
- if (isSkillAuthorOnlyPath(relativePath)) {
312
- throw new Error(`Portable dynamic Skill "${artifact.skillKey}" renderer returned author-only path "${relativePath}".`);
313
- }
314
- if (relativePath === AW_PLUGIN_REQUIREMENTS_RECEIPT_PATH) {
315
- throw new Error(`Portable dynamic Skill renderer cannot declare reserved file "${AW_PLUGIN_REQUIREMENTS_RECEIPT_PATH}".`);
316
- }
317
- files[relativePath] = Buffer.from(content, 'utf8');
318
- }
319
- assertNoSensitiveConfigInFiles(files, sensitiveValues, 'portableSkillSensitiveConfigExposed: Portable Skill exposes sensitive config.');
320
- const stagingRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'aw-portable-tree-'));
321
- try {
322
- const skillRoot = path.join(stagingRoot, artifact.skillKey);
323
- await copyTreeFiles(files, skillRoot);
324
- output.push({
325
- plugin: options.plugin,
326
- relation: options.relation,
327
- dynamic: true,
328
- tree: await validatePortableSkillDirectory(skillRoot),
329
- });
330
- }
331
- finally {
332
- await fs.remove(stagingRoot);
114
+ }
115
+ function assertNoUnresolvedTemplates(candidate) {
116
+ for (const [file, bytes] of Object.entries(candidate.tree.files)) {
117
+ if (/\{\{[^{}]+\}\}/u.test(bytes.toString('utf8'))) {
118
+ throw new Error(`Portable Skill "${candidate.tree.skillKey}" has an unresolved template in ${file}.`);
333
119
  }
334
120
  }
335
- return finalizeCandidates();
336
121
  }
337
122
  async function resolvePortableCatalogPlugins(options) {
338
123
  const entriesByName = new Map(options.source.manifest.entries.map((entry) => [entry.name, entry]));
@@ -431,6 +216,7 @@ export async function materializePortableSkillsFromCatalog(options) {
431
216
  pluginVersion: requestedPlugin.manifest.version,
432
217
  platform: materialized.platform,
433
218
  scope: materialized.scope,
219
+ preparation: materialized.preparation,
434
220
  candidates: materialized.candidates,
435
221
  dependencyPluginIds: materialized.dependencyPluginIds,
436
222
  configDigest: materialized.configDigest,
@@ -475,10 +261,22 @@ export async function materializePortableSkills(options) {
475
261
  await fs.ensureDir(rootDir);
476
262
  }
477
263
  const skillsRoot = path.join(rootDir, 'skills');
478
- const env = options.env ?? process.env;
264
+ const profileConfigs = await Promise.all(closure.map(async (plugin) => ({
265
+ plugin,
266
+ config: await resolvePortablePluginProfileConfig({ ...options, plugin, env: options.env ?? process.env }),
267
+ })));
268
+ const env = await createIsolatedSkillEnv(options.env ?? process.env, path.join(rootDir, '.environment'));
269
+ for (const { plugin, config } of profileConfigs) {
270
+ await writePluginConfigStore({
271
+ sourceId: plugin.sourceId, sourceIdentity: plugin.sourceIdentity, logicalIdentity: plugin.catalogLogicalIdentity,
272
+ pluginName: plugin.manifest.name, platform: options.platform, scope: options.scope,
273
+ cwd: options.cwd, env, values: config.config.values,
274
+ });
275
+ }
479
276
  try {
480
277
  const trees = [];
481
278
  const configDigests = [];
279
+ const preparation = [];
482
280
  const selectedSkills = options.selectedSkills
483
281
  ? new Set(options.selectedSkills)
484
282
  : undefined;
@@ -504,8 +302,10 @@ export async function materializePortableSkills(options) {
504
302
  env,
505
303
  signal: options.signal,
506
304
  inputMode: 'bundle',
305
+ profileConfig: profileConfigs.find((entry) => entry.plugin.manifest.name === plugin.manifest.name).config,
507
306
  ...(selectedSkills ? { selectedSkills } : {}),
508
307
  recordConfigDigest: (id, configDigest) => configDigests.push([id, configDigest]),
308
+ recordPreparation: (entries) => preparation.push(...entries),
509
309
  }));
510
310
  }
511
311
  finally {
@@ -513,6 +313,7 @@ export async function materializePortableSkills(options) {
513
313
  }
514
314
  }
515
315
  await fs.remove(path.join(rootDir, '.prepare'));
316
+ await fs.remove(path.join(rootDir, '.environment'));
516
317
  if (selectedSkills) {
517
318
  const materializedNames = new Set(trees.map((candidate) => candidate.tree.skillKey));
518
319
  const missing = [...selectedSkills]
@@ -546,7 +347,7 @@ export async function materializePortableSkills(options) {
546
347
  .filter((plugin) => plugin.manifest.name !== requested.manifest.name)
547
348
  .map(pluginId);
548
349
  const configDigest = `sha256:${crypto.createHash('sha256')
549
- .update(JSON.stringify({ platform: options.platform, scope: options.scope, config: configDigests }))
350
+ .update(JSON.stringify({ platform: options.platform, scope: options.scope, capabilities: getAuthoringPlatformCapabilities(options.platform, options.scope), config: configDigests }))
550
351
  .digest('hex')}`;
551
352
  const digest = `sha256:${crypto.createHash('sha256')
552
353
  .update(JSON.stringify({ platform: options.platform, scope: options.scope, skills: candidates.map((candidate) => [candidate.name, candidate.filesDigest]) }))
@@ -573,6 +374,7 @@ export async function materializePortableSkills(options) {
573
374
  configDigest,
574
375
  digest,
575
376
  provenancePath,
377
+ preparation,
576
378
  cleanup: async () => {
577
379
  if (createdRoot)
578
380
  await fs.remove(rootDir);