@lesliechan721/aw 0.1.0-beta.73 → 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 (361) 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 +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 +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 +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 +60 -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 +338 -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 +74 -0
  107. package/dist/src/platforms/discovery.js +582 -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 +173 -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 +379 -0
  123. package/dist/src/platforms/inspection-native.js.map +1 -0
  124. package/dist/src/platforms/inspection-pi.d.ts +4 -0
  125. package/dist/src/platforms/inspection-pi.js +212 -0
  126. package/dist/src/platforms/inspection-pi.js.map +1 -0
  127. package/dist/src/platforms/inspection.d.ts +13 -0
  128. package/dist/src/platforms/inspection.js +189 -0
  129. package/dist/src/platforms/inspection.js.map +1 -0
  130. package/dist/src/platforms/layout.d.ts +21 -0
  131. package/dist/src/platforms/layout.js +239 -0
  132. package/dist/src/platforms/layout.js.map +1 -0
  133. package/dist/src/platforms/lifecycle-native-services.d.ts +3 -0
  134. package/dist/src/platforms/lifecycle-native-services.js +147 -0
  135. package/dist/src/platforms/lifecycle-native-services.js.map +1 -0
  136. package/dist/src/platforms/lifecycle-native.d.ts +9 -0
  137. package/dist/src/platforms/lifecycle-native.js +252 -0
  138. package/dist/src/platforms/lifecycle-native.js.map +1 -0
  139. package/dist/src/platforms/lifecycle.d.ts +25 -0
  140. package/dist/src/platforms/lifecycle.js +452 -0
  141. package/dist/src/platforms/lifecycle.js.map +1 -0
  142. package/dist/src/platforms/managed-command-placement.d.ts +8 -0
  143. package/dist/src/platforms/managed-command-placement.js +79 -0
  144. package/dist/src/platforms/managed-command-placement.js.map +1 -0
  145. package/dist/src/platforms/projection-code-extension.d.ts +8 -0
  146. package/dist/src/platforms/projection-code-extension.js +121 -0
  147. package/dist/src/platforms/projection-code-extension.js.map +1 -0
  148. package/dist/src/platforms/projection-command-resources.d.ts +7 -0
  149. package/dist/src/platforms/projection-command-resources.js +74 -0
  150. package/dist/src/platforms/projection-command-resources.js.map +1 -0
  151. package/dist/src/platforms/projection-files.d.ts +27 -0
  152. package/dist/src/platforms/projection-files.js +111 -0
  153. package/dist/src/platforms/projection-files.js.map +1 -0
  154. package/dist/src/platforms/projection-marketplace.d.ts +19 -0
  155. package/dist/src/platforms/projection-marketplace.js +42 -0
  156. package/dist/src/platforms/projection-marketplace.js.map +1 -0
  157. package/dist/src/platforms/projection.d.ts +10 -0
  158. package/dist/src/platforms/projection.js +446 -0
  159. package/dist/src/platforms/projection.js.map +1 -0
  160. package/dist/src/platforms/registry.d.ts +4 -0
  161. package/dist/src/platforms/registry.js +30 -0
  162. package/dist/src/platforms/registry.js.map +1 -0
  163. package/dist/src/platforms/supplement-layout.d.ts +16 -0
  164. package/dist/src/platforms/supplement-layout.js +31 -0
  165. package/dist/src/platforms/supplement-layout.js.map +1 -0
  166. package/dist/src/portable/commands.d.ts +7 -5
  167. package/dist/src/portable/commands.js +6 -1
  168. package/dist/src/portable/commands.js.map +1 -1
  169. package/dist/src/portable/materializer.d.ts +8 -6
  170. package/dist/src/portable/materializer.js +47 -245
  171. package/dist/src/portable/materializer.js.map +1 -1
  172. package/dist/src/portable/recovery-layout.js +2 -15
  173. package/dist/src/portable/recovery-layout.js.map +1 -1
  174. package/dist/src/portable/recovery.d.ts +10 -1
  175. package/dist/src/portable/recovery.js +34 -8
  176. package/dist/src/portable/recovery.js.map +1 -1
  177. package/dist/src/recovery/coordinator.d.ts +4 -7
  178. package/dist/src/recovery/coordinator.js +151 -119
  179. package/dist/src/recovery/coordinator.js.map +1 -1
  180. package/dist/src/recovery/demand.d.ts +1 -1
  181. package/dist/src/recovery/demand.js +10 -42
  182. package/dist/src/recovery/demand.js.map +1 -1
  183. package/dist/src/recovery/joint-coordinator.js +112 -52
  184. package/dist/src/recovery/joint-coordinator.js.map +1 -1
  185. package/dist/src/recovery/joint-demand.d.ts +4 -22
  186. package/dist/src/recovery/joint-demand.js +43 -40
  187. package/dist/src/recovery/joint-demand.js.map +1 -1
  188. package/dist/src/recovery/receipt.d.ts +23 -8
  189. package/dist/src/recovery/retirement.d.ts +1 -1
  190. package/dist/src/recovery/retirement.js +122 -29
  191. package/dist/src/recovery/retirement.js.map +1 -1
  192. package/dist/src/recovery/status.d.ts +13 -6
  193. package/dist/src/recovery/status.js +479 -79
  194. package/dist/src/recovery/status.js.map +1 -1
  195. package/dist/src/recovery/types.d.ts +3 -3
  196. package/dist/src/review/platform-profile.d.ts +3 -0
  197. package/dist/src/review/platform-profile.js +16 -0
  198. package/dist/src/review/platform-profile.js.map +1 -0
  199. package/dist/src/review/review-profile.d.ts +1 -0
  200. package/dist/src/review/review-profile.js +8 -2
  201. package/dist/src/review/review-profile.js.map +1 -1
  202. package/dist/src/review/review-selection.d.ts +2 -11
  203. package/dist/src/review/review-selection.js +97 -71
  204. package/dist/src/review/review-selection.js.map +1 -1
  205. package/dist/src/review/review-types.d.ts +3 -0
  206. package/dist/src/review/review-types.js.map +1 -1
  207. package/dist/src/review/skill-materialization.d.ts +44 -9
  208. package/dist/src/review/skill-materialization.js +112 -136
  209. package/dist/src/review/skill-materialization.js.map +1 -1
  210. package/dist/src/review/source-binding.d.ts +8 -5
  211. package/dist/src/review/source-binding.js +99 -41
  212. package/dist/src/review/source-binding.js.map +1 -1
  213. package/dist/src/tui/agent-management.js +112 -10
  214. package/dist/src/tui/agent-management.js.map +1 -1
  215. package/dist/src/tui/agent-settings.d.ts +3 -0
  216. package/dist/src/tui/agent-settings.js +10 -11
  217. package/dist/src/tui/agent-settings.js.map +1 -1
  218. package/dist/src/tui/console-app-v4.js +58 -20
  219. package/dist/src/tui/console-app-v4.js.map +1 -1
  220. package/dist/src/tui/content-item-card.js +2 -2
  221. package/dist/src/tui/content-item-card.js.map +1 -1
  222. package/dist/src/tui/controller-runtime.js +198 -152
  223. package/dist/src/tui/controller-runtime.js.map +1 -1
  224. package/dist/src/tui/controller.d.ts +5 -9
  225. package/dist/src/tui/controller.js +40 -18
  226. package/dist/src/tui/controller.js.map +1 -1
  227. package/dist/src/tui/deployment-view.d.ts +10 -0
  228. package/dist/src/tui/deployment-view.js +91 -0
  229. package/dist/src/tui/deployment-view.js.map +1 -0
  230. package/dist/src/tui/glossary.js +4 -4
  231. package/dist/src/tui/glossary.js.map +1 -1
  232. package/dist/src/tui/model.d.ts +5 -0
  233. package/dist/src/tui/model.js +73 -12
  234. package/dist/src/tui/model.js.map +1 -1
  235. package/dist/src/tui/operation-diagnostic-screens.js +2 -1
  236. package/dist/src/tui/operation-diagnostic-screens.js.map +1 -1
  237. package/dist/src/tui/operation-history.d.ts +5 -4
  238. package/dist/src/tui/operation-history.js.map +1 -1
  239. package/dist/src/tui/operation-review-planner.d.ts +7 -2
  240. package/dist/src/tui/operation-review-planner.js +97 -42
  241. package/dist/src/tui/operation-review-planner.js.map +1 -1
  242. package/dist/src/tui/plugin-content.d.ts +5 -3
  243. package/dist/src/tui/plugin-content.js +70 -508
  244. package/dist/src/tui/plugin-content.js.map +1 -1
  245. package/dist/src/tui/plugin-detail.d.ts +3 -2
  246. package/dist/src/tui/plugin-detail.js +33 -25
  247. package/dist/src/tui/plugin-detail.js.map +1 -1
  248. package/dist/src/tui/scoped-inventory.d.ts +10 -6
  249. package/dist/src/tui/scoped-inventory.js +34 -1
  250. package/dist/src/tui/scoped-inventory.js.map +1 -1
  251. package/dist/src/types.d.ts +4 -63
  252. package/dist/src/types.js.map +1 -1
  253. package/dist/src/utils/agent-version.d.ts +10 -4
  254. package/dist/src/utils/agent-version.js.map +1 -1
  255. package/dist/src/utils/artifact-plan.d.ts +26 -2
  256. package/dist/src/utils/artifact-plan.js +113 -489
  257. package/dist/src/utils/artifact-plan.js.map +1 -1
  258. package/dist/src/utils/artifact-renderer.d.ts +100 -93
  259. package/dist/src/utils/artifact-renderer.js +173 -346
  260. package/dist/src/utils/artifact-renderer.js.map +1 -1
  261. package/dist/src/utils/artifact-request.d.ts +21 -11
  262. package/dist/src/utils/artifact-request.js +56 -80
  263. package/dist/src/utils/artifact-request.js.map +1 -1
  264. package/dist/src/utils/bundle-layout.js +30 -146
  265. package/dist/src/utils/bundle-layout.js.map +1 -1
  266. package/dist/src/utils/catalog-digests.d.ts +2 -12
  267. package/dist/src/utils/catalog-digests.js +0 -39
  268. package/dist/src/utils/catalog-digests.js.map +1 -1
  269. package/dist/src/utils/catalog-source-references.d.ts +7 -0
  270. package/dist/src/utils/catalog-source-references.js +234 -19
  271. package/dist/src/utils/catalog-source-references.js.map +1 -1
  272. package/dist/src/utils/codex-config-observation.d.ts +19 -0
  273. package/dist/src/utils/codex-config-observation.js +145 -0
  274. package/dist/src/utils/codex-config-observation.js.map +1 -0
  275. package/dist/src/utils/codex-executable-discovery.d.ts +2 -0
  276. package/dist/src/utils/codex-executable-discovery.js +47 -13
  277. package/dist/src/utils/codex-executable-discovery.js.map +1 -1
  278. package/dist/src/utils/codex-manager.js +1 -1
  279. package/dist/src/utils/codex-manager.js.map +1 -1
  280. package/dist/src/utils/codex-native-observation.d.ts +3 -0
  281. package/dist/src/utils/codex-native-observation.js +53 -0
  282. package/dist/src/utils/codex-native-observation.js.map +1 -1
  283. package/dist/src/utils/codex-shared-native.d.ts +3 -1
  284. package/dist/src/utils/codex-shared-native.js +46 -5
  285. package/dist/src/utils/codex-shared-native.js.map +1 -1
  286. package/dist/src/utils/codex-skill-staging.d.ts +4 -3
  287. package/dist/src/utils/codex-skill-staging.js.map +1 -1
  288. package/dist/src/utils/codex-surface-analysis.d.ts +5 -2
  289. package/dist/src/utils/codex-surface-analysis.js +28 -57
  290. package/dist/src/utils/codex-surface-analysis.js.map +1 -1
  291. package/dist/src/utils/component-command-preparation.d.ts +34 -0
  292. package/dist/src/utils/component-command-preparation.js +228 -0
  293. package/dist/src/utils/component-command-preparation.js.map +1 -0
  294. package/dist/src/utils/component-resources.d.ts +43 -0
  295. package/dist/src/utils/component-resources.js +304 -0
  296. package/dist/src/utils/component-resources.js.map +1 -0
  297. package/dist/src/utils/dynamic-skill-tree.d.ts +17 -6
  298. package/dist/src/utils/dynamic-skill-tree.js +7 -3
  299. package/dist/src/utils/dynamic-skill-tree.js.map +1 -1
  300. package/dist/src/utils/local-marketplace.d.ts +11 -44
  301. package/dist/src/utils/local-marketplace.js +11 -638
  302. package/dist/src/utils/local-marketplace.js.map +1 -1
  303. package/dist/src/utils/managed-command-evidence.d.ts +2 -2
  304. package/dist/src/utils/managed-command-evidence.js +5 -81
  305. package/dist/src/utils/managed-command-evidence.js.map +1 -1
  306. package/dist/src/utils/managed-command-materialization.d.ts +5 -2
  307. package/dist/src/utils/managed-command-materialization.js +35 -35
  308. package/dist/src/utils/managed-command-materialization.js.map +1 -1
  309. package/dist/src/utils/managed-command-preparation.d.ts +67 -0
  310. package/dist/src/utils/managed-command-preparation.js +146 -0
  311. package/dist/src/utils/managed-command-preparation.js.map +1 -0
  312. package/dist/src/utils/managed-command-review.d.ts +26 -0
  313. package/dist/src/utils/managed-command-review.js +68 -0
  314. package/dist/src/utils/managed-command-review.js.map +1 -0
  315. package/dist/src/utils/managed-command-store.js +26 -15
  316. package/dist/src/utils/managed-command-store.js.map +1 -1
  317. package/dist/src/utils/native-cli.d.ts +19 -0
  318. package/dist/src/utils/native-cli.js +45 -2
  319. package/dist/src/utils/native-cli.js.map +1 -1
  320. package/dist/src/utils/native-demand.d.ts +20 -1
  321. package/dist/src/utils/native-demand.js.map +1 -1
  322. package/dist/src/utils/native-tool-review.d.ts +3 -6
  323. package/dist/src/utils/native-tool-review.js +25 -11
  324. package/dist/src/utils/native-tool-review.js.map +1 -1
  325. package/dist/src/utils/ownership.d.ts +26 -3
  326. package/dist/src/utils/ownership.js +95 -9
  327. package/dist/src/utils/ownership.js.map +1 -1
  328. package/dist/src/utils/paths.d.ts +1 -1
  329. package/dist/src/utils/paths.js +2 -0
  330. package/dist/src/utils/paths.js.map +1 -1
  331. package/dist/src/utils/platform-empty-state.d.ts +46 -0
  332. package/dist/src/utils/platform-empty-state.js +123 -0
  333. package/dist/src/utils/platform-empty-state.js.map +1 -0
  334. package/dist/src/utils/plugin-config-impact.d.ts +17 -11
  335. package/dist/src/utils/plugin-config-impact.js +46 -62
  336. package/dist/src/utils/plugin-config-impact.js.map +1 -1
  337. package/dist/src/utils/plugin-config-write.js +52 -53
  338. package/dist/src/utils/plugin-config-write.js.map +1 -1
  339. package/dist/src/utils/plugin-config.d.ts +0 -2
  340. package/dist/src/utils/plugin-config.js +0 -6
  341. package/dist/src/utils/plugin-config.js.map +1 -1
  342. package/dist/src/utils/plugin-dependencies.d.ts +1 -1
  343. package/dist/src/utils/plugin-dependencies.js.map +1 -1
  344. package/dist/src/utils/runtime-config.d.ts +5 -7
  345. package/dist/src/utils/runtime-config.js +12 -25
  346. package/dist/src/utils/runtime-config.js.map +1 -1
  347. package/dist/src/utils/windows-npm-shim.js +19 -2
  348. package/dist/src/utils/windows-npm-shim.js.map +1 -1
  349. package/package.json +3 -3
  350. package/dist/src/utils/claude-native-render-receipt.d.ts +0 -14
  351. package/dist/src/utils/claude-native-render-receipt.js +0 -26
  352. package/dist/src/utils/claude-native-render-receipt.js.map +0 -1
  353. package/dist/src/utils/claude-skills-root.d.ts +0 -8
  354. package/dist/src/utils/claude-skills-root.js +0 -87
  355. package/dist/src/utils/claude-skills-root.js.map +0 -1
  356. package/dist/src/utils/codex-native-render-receipt.d.ts +0 -40
  357. package/dist/src/utils/codex-native-render-receipt.js +0 -205
  358. package/dist/src/utils/codex-native-render-receipt.js.map +0 -1
  359. package/dist/src/utils/slash-commands.d.ts +0 -1
  360. package/dist/src/utils/slash-commands.js +0 -2
  361. package/dist/src/utils/slash-commands.js.map +0 -1
@@ -0,0 +1,34 @@
1
+ import { type ManagedCommandReference } from '@lesliechan721/aw-plugin-core/manifest';
2
+ import type { RenderUnit } from '../platforms/contracts.js';
3
+ import type { PlatformTarget, PluginMeta } from '../types.js';
4
+ import type { PreparedPlatformComponents } from './artifact-renderer.js';
5
+ import { type DynamicSkillTree } from './dynamic-skill-tree.js';
6
+ import { prepareManagedCommandPackage, type ManagedCommandCandidate } from './managed-command-materialization.js';
7
+ import { type ManagedCommandSkillProducerResolution } from './managed-command-preparation.js';
8
+ export interface FinalizedPlatformComponents {
9
+ prepared: PreparedPlatformComponents;
10
+ commandCandidates: ManagedCommandCandidate[];
11
+ producerResolutions: ManagedCommandSkillProducerResolution[];
12
+ commandResolver?: (reference: ManagedCommandReference) => string;
13
+ skills: Array<{
14
+ componentId: string;
15
+ resourceRoot: string;
16
+ tree: DynamicSkillTree;
17
+ }>;
18
+ cleanup(): Promise<void>;
19
+ }
20
+ /** Prepare command bindings and AW runtime files against one already computed component set. */
21
+ export declare function finalizePlatformSkillProducers(options: {
22
+ plugin: PluginMeta;
23
+ plugins?: readonly PluginMeta[];
24
+ platform: PlatformTarget;
25
+ renderUnit: Pick<RenderUnit, 'physicalKey' | 'renderScope' | 'kinds'>;
26
+ prepared: PreparedPlatformComponents;
27
+ skillWorkRoot: string;
28
+ cwd: string;
29
+ env: NodeJS.ProcessEnv;
30
+ signal?: AbortSignal;
31
+ scriptTimeoutMs?: number;
32
+ /** An operation-owned cache. Its owner retains and cleans roots after every consumer completes. */
33
+ packagePreparationCache?: Map<string, Promise<Awaited<ReturnType<typeof prepareManagedCommandPackage>>>>;
34
+ }): Promise<FinalizedPlatformComponents>;
@@ -0,0 +1,228 @@
1
+ import crypto from 'node:crypto';
2
+ import path from 'node:path';
3
+ import fs from 'fs-extra';
4
+ import { computeCanonicalDirectoryDigest } from '@lesliechan721/agent-skill-eval';
5
+ import { createAwPluginRequirementsReceipt, createRuntimeConfigOrigin, COMMAND_PRODUCER_RECORD_FILE, getCommandPackageId, normalizeInstalledCommandProducer, parseManagedCommandPlaceholders, validatePortableSkillName, resolveInvocationPolicy, } from '@lesliechan721/aw-plugin-core/manifest';
6
+ import { artifactValueDigest } from './artifact-plan.js';
7
+ import { writeDynamicSkillTree } from './dynamic-skill-tree.js';
8
+ import { createManagedCommandReferenceResolver, injectNativeToolClosureFiles, managedCommandProducerIdentity, prepareManagedCommandPackage, resolveSkillManagedCommandReferences, } from './managed-command-materialization.js';
9
+ import { prepareAgentCommandSets, resolveManagedCommandSkillProducers } from './managed-command-preparation.js';
10
+ import { readSafeOperationError } from './safe-operation-diagnostic.js';
11
+ import { injectInstalledRuntimeConfig } from './runtime-config.js';
12
+ import { validateRuntimeSkillClosure } from './runtime-skill-closure.js';
13
+ /** Prepare command bindings and AW runtime files against one already computed component set. */
14
+ export async function finalizePlatformSkillProducers(options) {
15
+ if (!options.renderUnit.kinds.includes('skill')) {
16
+ return { prepared: options.prepared, commandCandidates: [], producerResolutions: [], skills: [], cleanup: async () => { } };
17
+ }
18
+ const skills = [];
19
+ const cleanupPackages = [];
20
+ const commandCandidates = [];
21
+ const producerResolutions = [];
22
+ const skillCandidates = new Map();
23
+ const unavailableProducers = [];
24
+ const blockedSkills = new Set();
25
+ const commandResources = [];
26
+ try {
27
+ for (const component of options.prepared.expected.components) {
28
+ if (component.kind !== 'skill')
29
+ continue;
30
+ validatePortableSkillName(component.name, 'Skill component name');
31
+ const files = options.prepared.resources.files.filter((file) => file.componentId === component.id);
32
+ const tree = {
33
+ skillKey: component.name,
34
+ files: Object.fromEntries(files.map((file) => [file.path, Buffer.from(file.bytes)])),
35
+ fileModes: Object.fromEntries(files.filter((file) => (file.mode ?? 0) & 0o111).map((file) => [file.path, 0o755])),
36
+ };
37
+ const resourceRoot = path.join(options.skillWorkRoot, component.name);
38
+ await writeDynamicSkillTree(resourceRoot, tree);
39
+ skills.push({ componentId: component.id, resourceRoot, tree });
40
+ }
41
+ if (options.platform !== 'generic') {
42
+ const resolved = await resolveManagedCommandSkillProducers({
43
+ ...options,
44
+ platform: options.platform,
45
+ components: options.prepared.expected,
46
+ skillResources: skills.map((skill) => ({ ...skill, physicalKey: options.renderUnit.physicalKey })),
47
+ dynamicScopeOffered: options.plugin.manifest.artifacts?.scopes?.includes(options.renderUnit.renderScope.kind) ?? true,
48
+ });
49
+ producerResolutions.push(...resolved);
50
+ for (const producer of resolved) {
51
+ if (producer.state !== 'ready') {
52
+ unavailableProducers.push(producer.producer);
53
+ continue;
54
+ }
55
+ try {
56
+ const candidate = await prepareAgentCommandSets({
57
+ ...options, resolved: producer, referencePlugins: options.plugins,
58
+ });
59
+ commandCandidates.push(candidate);
60
+ skillCandidates.set(producer.componentId, candidate);
61
+ commandResources.push({ producer: candidate.producer, resourceRoot: candidate.resourceRoot });
62
+ }
63
+ catch (error) {
64
+ options.signal?.throwIfAborted();
65
+ if (readSafeOperationError(error))
66
+ throw error;
67
+ producerResolutions[producerResolutions.indexOf(producer)] = { ...producer, state: 'failed',
68
+ error: error instanceof Error ? error : new Error('commandReferenceInvalid: Skill command preparation failed.') };
69
+ unavailableProducers.push(producer.producer);
70
+ blockedSkills.add(producer.componentId);
71
+ }
72
+ }
73
+ }
74
+ const references = skills.filter((skill) => !blockedSkills.has(skill.componentId)).flatMap(({ tree }) => Object.entries(tree.files)
75
+ .filter(([file]) => file.endsWith('.md'))
76
+ .flatMap(([, bytes]) => parseManagedCommandPlaceholders(bytes.toString('utf8'))));
77
+ if (references.length && !options.plugin.manifest.requires?.aw.capabilities?.includes('aw.managed-commands.v1')) {
78
+ throw new Error('commandReferenceInvalid: Managed command references require aw.managed-commands.v1.');
79
+ }
80
+ if (references.length && options.platform === 'generic') {
81
+ throw new Error('commandReferenceInvalid: Generic Skills cannot bind native managed commands.');
82
+ }
83
+ const permissions = resolveInvocationPolicy(options.plugin.manifest, options.platform).permissions;
84
+ const permissionReferences = permissions.flatMap((permission) => [
85
+ ...(permission.allow ?? []), ...(permission.ask ?? []), ...(permission.deny ?? []),
86
+ ...(permission.sandbox?.excludedCommands ?? []),
87
+ ]).flatMap((entry) => typeof entry === 'string' ? [] : [entry.command]);
88
+ const referencedPackages = new Set([...references.map(({ reference }) => reference), ...permissionReferences].flatMap((reference) => {
89
+ const set = options.plugin.manifest.managedCommands?.sets.find((set) => set.set === reference.set);
90
+ if (!set)
91
+ throw new Error('commandReferenceInvalid: The command set is not declared by this plugin.');
92
+ return set.producer.kind === 'package' ? [set.producer.packageKey] : [];
93
+ }));
94
+ for (const packageKey of referencedPackages) {
95
+ if (options.platform === 'generic')
96
+ throw new Error('commandReferenceInvalid: Generic Skills cannot bind native command packages.');
97
+ const declaration = options.plugin.manifest.managedCommands?.packages.find((entry) => entry.key === packageKey);
98
+ if (!declaration?.platforms.includes(options.platform)
99
+ || options.renderUnit.renderScope.kind === 'user' && declaration.scope === 'project') {
100
+ throw new Error('commandReferenceInvalid: The command package is unavailable to this consumer.');
101
+ }
102
+ const identity = await managedCommandProducerIdentity({
103
+ ...options, producer: { kind: 'package', packageKey }, scope: declaration.scope,
104
+ });
105
+ const cacheKey = getCommandPackageId(identity);
106
+ let preparation = options.packagePreparationCache?.get(cacheKey);
107
+ if (!preparation) {
108
+ preparation = prepareManagedCommandPackage({
109
+ ...options, referencePlugins: options.plugins, packageKey, scope: declaration.scope, event: 'materialize',
110
+ });
111
+ options.packagePreparationCache?.set(cacheKey, preparation);
112
+ }
113
+ const candidate = await preparation;
114
+ if (!options.packagePreparationCache)
115
+ cleanupPackages.push(candidate.cleanup);
116
+ commandCandidates.push(candidate);
117
+ commandResources.push({ producer: candidate.producer, resourceRoot: candidate.resourceRoot });
118
+ }
119
+ const skillReferences = new Map(skills.map((skill) => [skill.componentId, Object.entries(skill.tree.files)
120
+ .filter(([file]) => file.endsWith('.md'))
121
+ .flatMap(([, bytes]) => parseManagedCommandPlaceholders(bytes.toString('utf8')).map(({ reference }) => reference))]));
122
+ let commandResolver;
123
+ let changed;
124
+ do {
125
+ changed = false;
126
+ commandResolver = options.platform === 'generic' ? undefined : await createManagedCommandReferenceResolver({
127
+ ...options, platform: options.platform, scope: options.renderUnit.renderScope.kind, candidates: commandCandidates, unavailableProducers,
128
+ });
129
+ for (const skill of skills) {
130
+ if (blockedSkills.has(skill.componentId) || !commandResolver)
131
+ continue;
132
+ try {
133
+ for (const reference of skillReferences.get(skill.componentId) ?? [])
134
+ commandResolver(reference);
135
+ }
136
+ catch (error) {
137
+ blockedSkills.add(skill.componentId);
138
+ changed = true;
139
+ const candidate = skillCandidates.get(skill.componentId);
140
+ if (!candidate)
141
+ continue;
142
+ commandCandidates.splice(commandCandidates.indexOf(candidate), 1);
143
+ unavailableProducers.push(candidate.producer);
144
+ const index = producerResolutions.findIndex((producer) => producer.componentId === skill.componentId);
145
+ const producer = producerResolutions[index];
146
+ if (producer)
147
+ producerResolutions[index] = { ...producer, state: 'failed',
148
+ error: error instanceof Error ? error : new Error('commandReferenceInvalid: A required command is unavailable.') };
149
+ }
150
+ }
151
+ } while (changed);
152
+ const retainedSkills = skills.filter((skill) => !blockedSkills.has(skill.componentId));
153
+ if (commandResolver)
154
+ for (const { tree } of retainedSkills)
155
+ resolveSkillManagedCommandReferences(tree, commandResolver);
156
+ const receipt = Buffer.from(`${JSON.stringify(createAwPluginRequirementsReceipt({ name: options.plugin.manifest.name, version: options.plugin.manifest.version }, options.plugin.manifest.requires?.aw.capabilities ?? []), null, 2)}\n`);
157
+ const components = structuredClone(options.prepared.expected.components.filter((component) => !blockedSkills.has(component.id)));
158
+ const unmet = [...options.prepared.expected.unmet,
159
+ ...options.prepared.expected.components.filter((component) => blockedSkills.has(component.id))
160
+ .map((component) => ({ id: component.id, kind: component.kind, name: component.name,
161
+ requiredFeatures: [], reasonCode: 'dependency-unmet' }))];
162
+ for (const skill of retainedSkills) {
163
+ const commandCandidate = skillCandidates.get(skill.componentId);
164
+ if (commandCandidate) {
165
+ const nativeTools = injectNativeToolClosureFiles(skill.tree.files, commandCandidate.nativeTools);
166
+ if (nativeTools)
167
+ commandCandidate.nativeTools = nativeTools;
168
+ const record = normalizeInstalledCommandProducer({ schemaVersion: 1,
169
+ producer: commandCandidate.producer, sets: commandCandidate.sets,
170
+ ...(nativeTools ? { nativeTools } : {}),
171
+ });
172
+ skill.tree.files[COMMAND_PRODUCER_RECORD_FILE] = Buffer.from(`${JSON.stringify(record, null, 2)}\n`);
173
+ }
174
+ skill.tree.files['aw-plugin-requirements.json'] = receipt;
175
+ const snapshot = options.prepared.runtimeConfigSnapshots[skill.componentId];
176
+ await injectInstalledRuntimeConfig(skill.tree, snapshot, snapshot ? { origin: createRuntimeConfigOrigin({
177
+ snapshot, inputDigest: options.prepared.evidence.renderInputDigest,
178
+ }) } : {});
179
+ await fs.remove(skill.resourceRoot);
180
+ await writeDynamicSkillTree(skill.resourceRoot, skill.tree);
181
+ await validateRuntimeSkillClosure(skill.resourceRoot);
182
+ const component = components.find((component) => component.id === skill.componentId);
183
+ if (!component || component.kind !== 'skill')
184
+ throw new Error('componentSkillIdentityChanged');
185
+ component.content.files = Object.fromEntries(Object.keys(component.content.files).map((file) => {
186
+ const bytes = skill.tree.files[file];
187
+ const original = options.prepared.resources.files.find((entry) => entry.componentId === skill.componentId && entry.path === file);
188
+ const resource = component.content.files[file];
189
+ return [file, resource && original?.bytes.equals(bytes) ? resource : { text: bytes.toString('utf8') }];
190
+ }));
191
+ }
192
+ const files = [
193
+ ...options.prepared.resources.files.filter((file) => !skills.some((skill) => skill.componentId === file.componentId)),
194
+ ...retainedSkills.flatMap((skill) => Object.entries(skill.tree.files).map(([file, bytes]) => {
195
+ const original = options.prepared.resources.files.find((entry) => entry.componentId === skill.componentId && entry.path === file);
196
+ return {
197
+ componentId: skill.componentId, path: file, bytes,
198
+ ...(original?.source && original.bytes.equals(bytes) ? { source: original.source } : {}),
199
+ mode: skill.tree.fileModes?.[file] ?? 0o644,
200
+ };
201
+ })),
202
+ ];
203
+ const resourceDigest = artifactValueDigest({ inputDigest: options.prepared.resources.digest, files: files.map(({ componentId, path: file, bytes, mode }) => ({
204
+ componentId, path: file, digest: `sha256:${crypto.createHash('sha256').update(bytes).digest('hex')}`, mode,
205
+ })) });
206
+ const commands = await Promise.all(commandResources.filter((entry) => commandCandidates.some((candidate) => candidate.producer === entry.producer)).map(async (entry) => ({
207
+ producer: entry.producer,
208
+ resourceDigest: await computeCanonicalDirectoryDigest(entry.resourceRoot),
209
+ sets: commandCandidates.find((candidate) => candidate.producer === entry.producer)?.sets ?? [],
210
+ nativeTools: commandCandidates.find((candidate) => candidate.producer === entry.producer)?.nativeTools,
211
+ })));
212
+ const prepared = {
213
+ ...options.prepared,
214
+ expected: { ...options.prepared.expected, components, unmet },
215
+ empty: components.length ? null : unmet.length ? 'unmet' : 'intentional',
216
+ resources: { ...options.prepared.resources, files, digest: resourceDigest },
217
+ evidence: { ...options.prepared.evidence, resourceDigest,
218
+ renderInputDigest: artifactValueDigest({ components: options.prepared.evidence.renderInputDigest, commands, unavailableProducers }),
219
+ },
220
+ };
221
+ return { prepared, skills: retainedSkills, commandCandidates, producerResolutions, ...(commandResolver ? { commandResolver } : {}), cleanup: async () => { await Promise.all(cleanupPackages.map((cleanup) => cleanup())); } };
222
+ }
223
+ catch (error) {
224
+ await Promise.all(cleanupPackages.map((cleanup) => cleanup()));
225
+ throw error;
226
+ }
227
+ }
228
+ //# sourceMappingURL=component-command-preparation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component-command-preparation.js","sourceRoot":"","sources":["../../../src/utils/component-command-preparation.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B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atformCapabilitiesV1, type PlatformRenderContextV1, type SourceRef } from '@lesliechan721/aw-plugin-core/manifest';
2
+ import type { PluginMeta } from '../types.js';
3
+ export interface VerifiedComponentFile {
4
+ componentId: string;
5
+ path: string;
6
+ bytes: Buffer;
7
+ source?: SourceRef;
8
+ mode?: number;
9
+ }
10
+ export interface VerifiedResourceClosure {
11
+ resources: PlatformRenderContextV1['resources'];
12
+ files: VerifiedComponentFile[];
13
+ bundleFiles: Array<{
14
+ path: string;
15
+ bytes: Buffer;
16
+ mode?: number;
17
+ componentIds?: string[];
18
+ }>;
19
+ commandResources: VerifiedCommandResource[];
20
+ digest: string;
21
+ }
22
+ export interface CommandResourceReference {
23
+ start: number;
24
+ end: number;
25
+ path: string;
26
+ }
27
+ export interface VerifiedCommandResource extends CommandResourceReference {
28
+ componentId: string;
29
+ field: 'command' | 'args';
30
+ index?: number;
31
+ original: string;
32
+ }
33
+ /** Only literal package paths are portable. Shell expansion is not a resource declaration. */
34
+ export declare function commandResourceReferences(value: string, shell: boolean, platform: PlatformCapabilitiesV1['platform'], executable?: string): CommandResourceReference[];
35
+ export declare function resolvePlatformComponentResources(plugin: PluginMeta): Promise<PlatformRenderContextV1['resources']>;
36
+ export declare function verifyPlatformComponentResources(options: {
37
+ plugin: PluginMeta;
38
+ expected: ExpectedComponentSet;
39
+ resources: PlatformRenderContextV1['resources'];
40
+ capabilities: PlatformCapabilitiesV1;
41
+ sensitiveValues: readonly string[];
42
+ staticResourceRoot?: string;
43
+ }): Promise<VerifiedResourceClosure>;