@lesliechan721/aw 0.1.0-beta.3 → 0.1.0-beta.31

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 (529) hide show
  1. package/dist/authoring/assets/aw-config.mjs +100 -501
  2. package/dist/authoring/assets/aw-config.mjs.map +1 -1
  3. package/dist/authoring/scripts/add-skill.mjs +4 -4
  4. package/dist/authoring/scripts/add-skill.mjs.map +1 -1
  5. package/dist/authoring/scripts/init-plugin.mjs +67 -97
  6. package/dist/authoring/scripts/init-plugin.mjs.map +1 -1
  7. package/dist/authoring/scripts/lib/plugin-version-check.d.mts +15 -0
  8. package/dist/authoring/scripts/lib/plugin-version-check.mjs +239 -232
  9. package/dist/authoring/scripts/lib/plugin-version-check.mjs.map +1 -1
  10. package/dist/authoring/scripts/lib/skill-scaffold.d.mts +77 -90
  11. package/dist/authoring/scripts/lib/skill-scaffold.mjs +99 -120
  12. package/dist/authoring/scripts/lib/skill-scaffold.mjs.map +1 -1
  13. package/dist/authoring/scripts/plugin-status.mjs +8 -11
  14. package/dist/authoring/scripts/plugin-status.mjs.map +1 -1
  15. package/dist/authoring/scripts/remove-plugin.mjs +367 -0
  16. package/dist/authoring/scripts/remove-plugin.mjs.map +1 -0
  17. package/dist/authoring/scripts/validate-plugin.mjs +307 -1173
  18. package/dist/authoring/scripts/validate-plugin.mjs.map +1 -1
  19. package/dist/scripts/aw-skill-eval-materializer.d.ts +26 -0
  20. package/dist/scripts/aw-skill-eval-materializer.js +306 -0
  21. package/dist/scripts/aw-skill-eval-materializer.js.map +1 -0
  22. package/dist/scripts/bundle-plugins.d.ts +1 -2
  23. package/dist/scripts/bundle-plugins.js +24 -7
  24. package/dist/scripts/bundle-plugins.js.map +1 -1
  25. package/dist/scripts/plugin-staging.d.ts +7 -24
  26. package/dist/scripts/plugin-staging.js +22 -142
  27. package/dist/scripts/plugin-staging.js.map +1 -1
  28. package/dist/scripts/test-plugin-scripts.d.ts +2 -0
  29. package/dist/scripts/test-plugin-scripts.js +27 -75
  30. package/dist/scripts/test-plugin-scripts.js.map +1 -1
  31. package/dist/src/adapters/helpers.js +2 -2
  32. package/dist/src/adapters/helpers.js.map +1 -1
  33. package/dist/src/authoring/workspace-commands.d.ts +26 -2
  34. package/dist/src/authoring/workspace-commands.js +44 -19
  35. package/dist/src/authoring/workspace-commands.js.map +1 -1
  36. package/dist/src/commands/aw-capabilities.d.ts +78 -0
  37. package/dist/src/commands/aw-capabilities.js +256 -0
  38. package/dist/src/commands/aw-capabilities.js.map +1 -0
  39. package/dist/src/commands/catalog-dev-source.d.ts +154 -0
  40. package/dist/src/commands/catalog-dev-source.js +655 -0
  41. package/dist/src/commands/catalog-dev-source.js.map +1 -0
  42. package/dist/src/commands/catalog-generation.d.ts +21 -0
  43. package/dist/src/commands/catalog-generation.js +9 -0
  44. package/dist/src/commands/catalog-generation.js.map +1 -0
  45. package/dist/src/commands/catalog-publication-inspection.d.ts +138 -0
  46. package/dist/src/commands/catalog-publication-inspection.js +757 -0
  47. package/dist/src/commands/catalog-publication-inspection.js.map +1 -0
  48. package/dist/src/commands/catalog-publication-journal.d.ts +68 -0
  49. package/dist/src/commands/catalog-publication-journal.js +292 -0
  50. package/dist/src/commands/catalog-publication-journal.js.map +1 -0
  51. package/dist/src/commands/catalog-publication-target.d.ts +18 -0
  52. package/dist/src/commands/catalog-publication-target.js +95 -0
  53. package/dist/src/commands/catalog-publication-target.js.map +1 -0
  54. package/dist/src/commands/catalog-publish.d.ts +77 -7
  55. package/dist/src/commands/catalog-publish.js +746 -316
  56. package/dist/src/commands/catalog-publish.js.map +1 -1
  57. package/dist/src/commands/catalog-source.d.ts +60 -22
  58. package/dist/src/commands/catalog-source.js +311 -91
  59. package/dist/src/commands/catalog-source.js.map +1 -1
  60. package/dist/src/commands/catalog-status.d.ts +56 -0
  61. package/dist/src/commands/catalog-status.js +217 -0
  62. package/dist/src/commands/catalog-status.js.map +1 -0
  63. package/dist/src/commands/catalog-store.d.ts +104 -0
  64. package/dist/src/commands/catalog-store.js +685 -0
  65. package/dist/src/commands/catalog-store.js.map +1 -0
  66. package/dist/src/commands/catalog-workspace-resolution.d.ts +13 -0
  67. package/dist/src/commands/catalog-workspace-resolution.js +42 -0
  68. package/dist/src/commands/catalog-workspace-resolution.js.map +1 -0
  69. package/dist/src/commands/console.js +28 -17
  70. package/dist/src/commands/console.js.map +1 -1
  71. package/dist/src/commands/dependency-operation-plan.d.ts +52 -15
  72. package/dist/src/commands/dependency-operation-plan.js +289 -7
  73. package/dist/src/commands/dependency-operation-plan.js.map +1 -1
  74. package/dist/src/commands/init.d.ts +5 -11
  75. package/dist/src/commands/init.js +30 -51
  76. package/dist/src/commands/init.js.map +1 -1
  77. package/dist/src/commands/offline-cleanup-evidence.d.ts +67 -0
  78. package/dist/src/commands/offline-cleanup-evidence.js +181 -0
  79. package/dist/src/commands/offline-cleanup-evidence.js.map +1 -0
  80. package/dist/src/commands/operation-plan.d.ts +127 -0
  81. package/dist/src/commands/operation-plan.js +71 -0
  82. package/dist/src/commands/operation-plan.js.map +1 -0
  83. package/dist/src/commands/operation-planner.d.ts +46 -0
  84. package/dist/src/commands/operation-planner.js +141 -0
  85. package/dist/src/commands/operation-planner.js.map +1 -0
  86. package/dist/src/commands/options.d.ts +9 -7
  87. package/dist/src/commands/options.js +83 -21
  88. package/dist/src/commands/options.js.map +1 -1
  89. package/dist/src/commands/plugin-capabilities.d.ts +22 -0
  90. package/dist/src/commands/plugin-capabilities.js +159 -0
  91. package/dist/src/commands/plugin-capabilities.js.map +1 -0
  92. package/dist/src/commands/rebuild-command.d.ts +77 -30
  93. package/dist/src/commands/rebuild-command.js +3993 -711
  94. package/dist/src/commands/rebuild-command.js.map +1 -1
  95. package/dist/src/commands/rebuild-integration.d.ts +120 -21
  96. package/dist/src/commands/rebuild-integration.js +2765 -1326
  97. package/dist/src/commands/rebuild-integration.js.map +1 -1
  98. package/dist/src/commands/rebuild-operations.d.ts +58 -30
  99. package/dist/src/commands/rebuild-operations.js +260 -319
  100. package/dist/src/commands/rebuild-operations.js.map +1 -1
  101. package/dist/src/commands/reconcile-operation-plan.d.ts +28 -0
  102. package/dist/src/commands/reconcile-operation-plan.js +47 -0
  103. package/dist/src/commands/reconcile-operation-plan.js.map +1 -0
  104. package/dist/src/commands/review-inspection.d.ts +228 -0
  105. package/dist/src/commands/review-inspection.js +1341 -0
  106. package/dist/src/commands/review-inspection.js.map +1 -0
  107. package/dist/src/commands/review-preparation.d.ts +49 -0
  108. package/dist/src/commands/review-preparation.js +427 -0
  109. package/dist/src/commands/review-preparation.js.map +1 -0
  110. package/dist/src/commands/runtime.d.ts +1 -5
  111. package/dist/src/commands/runtime.js +24 -50
  112. package/dist/src/commands/runtime.js.map +1 -1
  113. package/dist/src/commands/skill-eval.d.ts +38 -0
  114. package/dist/src/commands/skill-eval.js +388 -0
  115. package/dist/src/commands/skill-eval.js.map +1 -0
  116. package/dist/src/commands/status-v6.d.ts +279 -0
  117. package/dist/src/commands/status-v6.js +2697 -0
  118. package/dist/src/commands/status-v6.js.map +1 -0
  119. package/dist/src/commands/sync-command.d.ts +40 -0
  120. package/dist/src/commands/sync-command.js +250 -0
  121. package/dist/src/commands/sync-command.js.map +1 -0
  122. package/dist/src/commands/wizard.d.ts +3 -4
  123. package/dist/src/commands/wizard.js +2 -2
  124. package/dist/src/commands/wizard.js.map +1 -1
  125. package/dist/src/commands/write-commands.d.ts +9 -3
  126. package/dist/src/commands/write-commands.js +124 -31
  127. package/dist/src/commands/write-commands.js.map +1 -1
  128. package/dist/src/constants.d.ts +7 -1
  129. package/dist/src/constants.js +7 -1
  130. package/dist/src/constants.js.map +1 -1
  131. package/dist/src/eval/manifest-v1.d.ts +71 -0
  132. package/dist/src/eval/manifest-v1.js +370 -0
  133. package/dist/src/eval/manifest-v1.js.map +1 -0
  134. package/dist/src/generators/local-plugin.d.ts +5 -1
  135. package/dist/src/generators/local-plugin.js +225 -104
  136. package/dist/src/generators/local-plugin.js.map +1 -1
  137. package/dist/src/index.d.ts +10 -4
  138. package/dist/src/index.js +1787 -476
  139. package/dist/src/index.js.map +1 -1
  140. package/dist/src/output/command-receipt.d.ts +43 -46
  141. package/dist/src/output/command-receipt.js +256 -80
  142. package/dist/src/output/command-receipt.js.map +1 -1
  143. package/dist/src/output/model.d.ts +3 -44
  144. package/dist/src/output/model.js +1 -144
  145. package/dist/src/output/model.js.map +1 -1
  146. package/dist/src/output/rebuild-progress.js +1 -13
  147. package/dist/src/output/rebuild-progress.js.map +1 -1
  148. package/dist/src/portable/commands.d.ts +46 -7
  149. package/dist/src/portable/commands.js +349 -37
  150. package/dist/src/portable/commands.js.map +1 -1
  151. package/dist/src/portable/materializer.d.ts +17 -4
  152. package/dist/src/portable/materializer.js +160 -38
  153. package/dist/src/portable/materializer.js.map +1 -1
  154. package/dist/src/portable/skills-cli.d.ts +15 -7
  155. package/dist/src/portable/skills-cli.js +66 -19
  156. package/dist/src/portable/skills-cli.js.map +1 -1
  157. package/dist/src/review/eval-source-input.d.ts +43 -0
  158. package/dist/src/review/eval-source-input.js +207 -0
  159. package/dist/src/review/eval-source-input.js.map +1 -0
  160. package/dist/src/review/review-profile.d.ts +17 -0
  161. package/dist/src/review/review-profile.js +177 -0
  162. package/dist/src/review/review-profile.js.map +1 -0
  163. package/dist/src/review/review-selection.d.ts +30 -0
  164. package/dist/src/review/review-selection.js +527 -0
  165. package/dist/src/review/review-selection.js.map +1 -0
  166. package/dist/src/review/review-types.d.ts +68 -0
  167. package/dist/src/review/review-types.js +16 -0
  168. package/dist/src/review/review-types.js.map +1 -0
  169. package/dist/src/review/skill-materialization.d.ts +13 -0
  170. package/dist/src/review/skill-materialization.js +75 -0
  171. package/dist/src/review/skill-materialization.js.map +1 -0
  172. package/dist/src/review/source-binding.d.ts +182 -0
  173. package/dist/src/review/source-binding.js +682 -0
  174. package/dist/src/review/source-binding.js.map +1 -0
  175. package/dist/src/tui/catalog-freshness.d.ts +1 -0
  176. package/dist/src/tui/catalog-freshness.js +2 -0
  177. package/dist/src/tui/catalog-freshness.js.map +1 -0
  178. package/dist/src/tui/catalog-generation.d.ts +21 -0
  179. package/dist/src/tui/catalog-generation.js +156 -0
  180. package/dist/src/tui/catalog-generation.js.map +1 -0
  181. package/dist/src/tui/catalog-sources/projection.d.ts +4 -0
  182. package/dist/src/tui/catalog-sources/projection.js +17 -0
  183. package/dist/src/tui/catalog-sources/projection.js.map +1 -0
  184. package/dist/src/tui/catalog-sources/review.d.ts +3 -0
  185. package/dist/src/tui/catalog-sources/review.js +13 -0
  186. package/dist/src/tui/catalog-sources/review.js.map +1 -0
  187. package/dist/src/tui/catalog-sources/screens.d.ts +12 -0
  188. package/dist/src/tui/catalog-sources/screens.js +40 -0
  189. package/dist/src/tui/catalog-sources/screens.js.map +1 -0
  190. package/dist/src/tui/catalog-sources/session.d.ts +28 -0
  191. package/dist/src/tui/catalog-sources/session.js +295 -0
  192. package/dist/src/tui/catalog-sources/session.js.map +1 -0
  193. package/dist/src/tui/catalog-sources/types.d.ts +53 -0
  194. package/dist/src/tui/catalog-sources/types.js +2 -0
  195. package/dist/src/tui/catalog-sources/types.js.map +1 -0
  196. package/dist/src/tui/catalog-store-task.d.ts +16 -0
  197. package/dist/src/tui/catalog-store-task.js +19 -0
  198. package/dist/src/tui/catalog-store-task.js.map +1 -0
  199. package/dist/src/tui/components.d.ts +128 -0
  200. package/dist/src/tui/components.js +251 -7
  201. package/dist/src/tui/components.js.map +1 -1
  202. package/dist/src/tui/console-app-v4.d.ts +14 -4
  203. package/dist/src/tui/console-app-v4.js +9248 -1461
  204. package/dist/src/tui/console-app-v4.js.map +1 -1
  205. package/dist/src/tui/controller-runtime.d.ts +13 -1
  206. package/dist/src/tui/controller-runtime.js +3338 -410
  207. package/dist/src/tui/controller-runtime.js.map +1 -1
  208. package/dist/src/tui/controller.d.ts +614 -40
  209. package/dist/src/tui/controller.js +3478 -708
  210. package/dist/src/tui/controller.js.map +1 -1
  211. package/dist/src/tui/dependency-graph.d.ts +81 -0
  212. package/dist/src/tui/dependency-graph.js +455 -0
  213. package/dist/src/tui/dependency-graph.js.map +1 -0
  214. package/dist/src/tui/diagnostic-projection.d.ts +23 -0
  215. package/dist/src/tui/diagnostic-projection.js +567 -0
  216. package/dist/src/tui/diagnostic-projection.js.map +1 -0
  217. package/dist/src/tui/diagnostics.d.ts +30 -0
  218. package/dist/src/tui/diagnostics.js +76 -0
  219. package/dist/src/tui/diagnostics.js.map +1 -0
  220. package/dist/src/tui/glossary.d.ts +23 -0
  221. package/dist/src/tui/glossary.js +42 -0
  222. package/dist/src/tui/glossary.js.map +1 -0
  223. package/dist/src/tui/index.d.ts +11 -4
  224. package/dist/src/tui/index.js +8 -2
  225. package/dist/src/tui/index.js.map +1 -1
  226. package/dist/src/tui/input-display.d.ts +8 -0
  227. package/dist/src/tui/input-display.js +36 -0
  228. package/dist/src/tui/input-display.js.map +1 -0
  229. package/dist/src/tui/keys.d.ts +44 -0
  230. package/dist/src/tui/keys.js +43 -15
  231. package/dist/src/tui/keys.js.map +1 -1
  232. package/dist/src/tui/lifecycle-action-view.d.ts +6 -0
  233. package/dist/src/tui/lifecycle-action-view.js +36 -0
  234. package/dist/src/tui/lifecycle-action-view.js.map +1 -0
  235. package/dist/src/tui/model.d.ts +235 -27
  236. package/dist/src/tui/model.js +1652 -304
  237. package/dist/src/tui/model.js.map +1 -1
  238. package/dist/src/tui/operation-diagnostic-screens.d.ts +21 -0
  239. package/dist/src/tui/operation-diagnostic-screens.js +102 -0
  240. package/dist/src/tui/operation-diagnostic-screens.js.map +1 -0
  241. package/dist/src/tui/operation-history.d.ts +81 -0
  242. package/dist/src/tui/operation-history.js +135 -0
  243. package/dist/src/tui/operation-history.js.map +1 -0
  244. package/dist/src/tui/operation-review-planner.d.ts +21 -0
  245. package/dist/src/tui/operation-review-planner.js +1254 -0
  246. package/dist/src/tui/operation-review-planner.js.map +1 -0
  247. package/dist/src/tui/plugin-content.d.ts +23 -0
  248. package/dist/src/tui/plugin-content.js +336 -0
  249. package/dist/src/tui/plugin-content.js.map +1 -0
  250. package/dist/src/tui/plugin-write-task.d.ts +69 -0
  251. package/dist/src/tui/plugin-write-task.js +286 -0
  252. package/dist/src/tui/plugin-write-task.js.map +1 -0
  253. package/dist/src/tui/prompt.js +4 -15
  254. package/dist/src/tui/prompt.js.map +1 -1
  255. package/dist/src/tui/router.d.ts +183 -11
  256. package/dist/src/tui/router.js +352 -29
  257. package/dist/src/tui/router.js.map +1 -1
  258. package/dist/src/tui/screen-registry.d.ts +702 -0
  259. package/dist/src/tui/screen-registry.js +231 -0
  260. package/dist/src/tui/screen-registry.js.map +1 -0
  261. package/dist/src/tui/session-console-app.d.ts +6 -0
  262. package/dist/src/tui/session-console-app.js +13 -0
  263. package/dist/src/tui/session-console-app.js.map +1 -0
  264. package/dist/src/tui/session-host.d.ts +45 -0
  265. package/dist/src/tui/session-host.js +209 -0
  266. package/dist/src/tui/session-host.js.map +1 -0
  267. package/dist/src/tui/source-ref-presets.d.ts +3 -0
  268. package/dist/src/tui/source-ref-presets.js +11 -0
  269. package/dist/src/tui/source-ref-presets.js.map +1 -0
  270. package/dist/src/tui/theme.d.ts +18 -10
  271. package/dist/src/tui/theme.js +18 -10
  272. package/dist/src/tui/theme.js.map +1 -1
  273. package/dist/src/tui/viewport.d.ts +20 -0
  274. package/dist/src/tui/viewport.js +29 -0
  275. package/dist/src/tui/viewport.js.map +1 -0
  276. package/dist/src/tui/views.js +31 -3
  277. package/dist/src/tui/views.js.map +1 -1
  278. package/dist/src/tui/wizard.js +11 -9
  279. package/dist/src/tui/wizard.js.map +1 -1
  280. package/dist/src/types.d.ts +242 -20
  281. package/dist/src/types.js +1 -0
  282. package/dist/src/types.js.map +1 -1
  283. package/dist/src/utils/agent-version.d.ts +7 -1
  284. package/dist/src/utils/agent-version.js +41 -8
  285. package/dist/src/utils/agent-version.js.map +1 -1
  286. package/dist/src/utils/artifact-plan.d.ts +5 -4
  287. package/dist/src/utils/artifact-plan.js +18 -7
  288. package/dist/src/utils/artifact-plan.js.map +1 -1
  289. package/dist/src/utils/artifact-renderer.d.ts +13 -7
  290. package/dist/src/utils/artifact-renderer.js +196 -219
  291. package/dist/src/utils/artifact-renderer.js.map +1 -1
  292. package/dist/src/utils/artifact-request.d.ts +21 -0
  293. package/dist/src/utils/artifact-request.js +82 -0
  294. package/dist/src/utils/artifact-request.js.map +1 -0
  295. package/dist/src/utils/aw-home-mutation-lock.d.ts +1 -0
  296. package/dist/src/utils/aw-home-mutation-lock.js +32 -4
  297. package/dist/src/utils/aw-home-mutation-lock.js.map +1 -1
  298. package/dist/src/utils/bundle-integrity.d.ts +0 -1
  299. package/dist/src/utils/bundle-integrity.js +0 -25
  300. package/dist/src/utils/bundle-integrity.js.map +1 -1
  301. package/dist/src/utils/bundle-layout.js +14 -29
  302. package/dist/src/utils/bundle-layout.js.map +1 -1
  303. package/dist/src/utils/catalog-capability-projection.d.ts +8 -0
  304. package/dist/src/utils/catalog-capability-projection.js +14 -0
  305. package/dist/src/utils/catalog-capability-projection.js.map +1 -0
  306. package/dist/src/utils/catalog-digests.d.ts +10 -0
  307. package/dist/src/utils/catalog-digests.js +50 -2
  308. package/dist/src/utils/catalog-digests.js.map +1 -1
  309. package/dist/src/utils/catalog-generation-control-snapshot.d.ts +11 -0
  310. package/dist/src/utils/catalog-generation-control-snapshot.js +45 -0
  311. package/dist/src/utils/catalog-generation-control-snapshot.js.map +1 -0
  312. package/dist/src/utils/catalog-generation-error.d.ts +16 -0
  313. package/dist/src/utils/catalog-generation-error.js +30 -0
  314. package/dist/src/utils/catalog-generation-error.js.map +1 -0
  315. package/dist/src/utils/catalog-generation-resolver.d.ts +44 -0
  316. package/dist/src/utils/catalog-generation-resolver.js +273 -0
  317. package/dist/src/utils/catalog-generation-resolver.js.map +1 -0
  318. package/dist/src/utils/catalog-generation-service.d.ts +172 -0
  319. package/dist/src/utils/catalog-generation-service.js +1271 -0
  320. package/dist/src/utils/catalog-generation-service.js.map +1 -0
  321. package/dist/src/utils/catalog-generation-state.d.ts +22 -0
  322. package/dist/src/utils/catalog-generation-state.js +192 -0
  323. package/dist/src/utils/catalog-generation-state.js.map +1 -0
  324. package/dist/src/utils/catalog-generation-store.d.ts +58 -0
  325. package/dist/src/utils/catalog-generation-store.js +452 -0
  326. package/dist/src/utils/catalog-generation-store.js.map +1 -0
  327. package/dist/src/utils/catalog-manifest-v7.d.ts +5 -0
  328. package/dist/src/utils/{catalog-manifest-v4.js → catalog-manifest-v7.js} +35 -43
  329. package/dist/src/utils/catalog-manifest-v7.js.map +1 -0
  330. package/dist/src/utils/catalog-operation-context.d.ts +20 -0
  331. package/dist/src/utils/catalog-operation-context.js +142 -0
  332. package/dist/src/utils/catalog-operation-context.js.map +1 -0
  333. package/dist/src/utils/catalog-public-error.d.ts +7 -3
  334. package/dist/src/utils/catalog-public-error.js +28 -8
  335. package/dist/src/utils/catalog-public-error.js.map +1 -1
  336. package/dist/src/utils/catalog-runtime-projection.d.ts +4 -7
  337. package/dist/src/utils/catalog-runtime-projection.js +7 -102
  338. package/dist/src/utils/catalog-runtime-projection.js.map +1 -1
  339. package/dist/src/utils/catalog-snapshot.d.ts +5 -3
  340. package/dist/src/utils/catalog-snapshot.js +11 -3
  341. package/dist/src/utils/catalog-snapshot.js.map +1 -1
  342. package/dist/src/utils/catalog-source-identity.d.ts +1 -0
  343. package/dist/src/utils/catalog-source-identity.js +21 -2
  344. package/dist/src/utils/catalog-source-identity.js.map +1 -1
  345. package/dist/src/utils/catalog-source-impact.d.ts +21 -0
  346. package/dist/src/utils/catalog-source-impact.js +344 -0
  347. package/dist/src/utils/catalog-source-impact.js.map +1 -0
  348. package/dist/src/utils/catalog-source-references.d.ts +3 -2
  349. package/dist/src/utils/catalog-source-references.js +195 -347
  350. package/dist/src/utils/catalog-source-references.js.map +1 -1
  351. package/dist/src/utils/catalog-sources.d.ts +15 -1
  352. package/dist/src/utils/catalog-sources.js +206 -27
  353. package/dist/src/utils/catalog-sources.js.map +1 -1
  354. package/dist/src/utils/codex-config.d.ts +2 -0
  355. package/dist/src/utils/codex-config.js +26 -5
  356. package/dist/src/utils/codex-config.js.map +1 -1
  357. package/dist/src/utils/codex-manager.d.ts +79 -0
  358. package/dist/src/utils/codex-manager.js +745 -0
  359. package/dist/src/utils/codex-manager.js.map +1 -0
  360. package/dist/src/utils/codex-marketplace-path.d.ts +5 -0
  361. package/dist/src/utils/codex-marketplace-path.js +45 -0
  362. package/dist/src/utils/codex-marketplace-path.js.map +1 -0
  363. package/dist/src/utils/codex-native-observation.d.ts +49 -0
  364. package/dist/src/utils/codex-native-observation.js +154 -0
  365. package/dist/src/utils/codex-native-observation.js.map +1 -0
  366. package/dist/src/utils/codex-native-render-receipt.d.ts +40 -0
  367. package/dist/src/utils/codex-native-render-receipt.js +205 -0
  368. package/dist/src/utils/codex-native-render-receipt.js.map +1 -0
  369. package/dist/src/utils/codex-reconciler.d.ts +126 -0
  370. package/dist/src/utils/codex-reconciler.js +298 -0
  371. package/dist/src/utils/codex-reconciler.js.map +1 -0
  372. package/dist/src/utils/codex-shared-native.d.ts +43 -0
  373. package/dist/src/utils/codex-shared-native.js +81 -0
  374. package/dist/src/utils/codex-shared-native.js.map +1 -0
  375. package/dist/src/utils/codex-skill-staging.d.ts +2 -0
  376. package/dist/src/utils/codex-skill-staging.js.map +1 -1
  377. package/dist/src/utils/codex-surface-analysis.d.ts +46 -0
  378. package/dist/src/utils/codex-surface-analysis.js +247 -0
  379. package/dist/src/utils/codex-surface-analysis.js.map +1 -0
  380. package/dist/src/utils/dynamic-skill-tree.d.ts +4 -0
  381. package/dist/src/utils/dynamic-skill-tree.js +36 -6
  382. package/dist/src/utils/dynamic-skill-tree.js.map +1 -1
  383. package/dist/src/utils/git-catalog-provider.d.ts +18 -0
  384. package/dist/src/utils/git-catalog-provider.js +170 -144
  385. package/dist/src/utils/git-catalog-provider.js.map +1 -1
  386. package/dist/src/utils/local-marketplace.d.ts +15 -1
  387. package/dist/src/utils/local-marketplace.js +307 -84
  388. package/dist/src/utils/local-marketplace.js.map +1 -1
  389. package/dist/src/utils/manifest.d.ts +1 -4
  390. package/dist/src/utils/manifest.js +1 -4
  391. package/dist/src/utils/manifest.js.map +1 -1
  392. package/dist/src/utils/multi-source-catalog.d.ts +3 -9
  393. package/dist/src/utils/multi-source-catalog.js +54 -110
  394. package/dist/src/utils/multi-source-catalog.js.map +1 -1
  395. package/dist/src/utils/native-cli.d.ts +55 -7
  396. package/dist/src/utils/native-cli.js +386 -57
  397. package/dist/src/utils/native-cli.js.map +1 -1
  398. package/dist/src/utils/orphan-marketplace-cleanup.js +0 -4
  399. package/dist/src/utils/orphan-marketplace-cleanup.js.map +1 -1
  400. package/dist/src/utils/ownership.d.ts +84 -20
  401. package/dist/src/utils/ownership.js +179 -222
  402. package/dist/src/utils/ownership.js.map +1 -1
  403. package/dist/src/utils/path-catalog-provider.d.ts +1 -1
  404. package/dist/src/utils/path-catalog-provider.js +54 -65
  405. package/dist/src/utils/path-catalog-provider.js.map +1 -1
  406. package/dist/src/utils/paths.d.ts +0 -1
  407. package/dist/src/utils/paths.js +0 -1
  408. package/dist/src/utils/paths.js.map +1 -1
  409. package/dist/src/utils/plugin-config-impact.d.ts +33 -0
  410. package/dist/src/utils/plugin-config-impact.js +298 -0
  411. package/dist/src/utils/plugin-config-impact.js.map +1 -0
  412. package/dist/src/utils/plugin-config-write.d.ts +52 -27
  413. package/dist/src/utils/plugin-config-write.js +990 -298
  414. package/dist/src/utils/plugin-config-write.js.map +1 -1
  415. package/dist/src/utils/plugin-config.d.ts +140 -93
  416. package/dist/src/utils/plugin-config.js +992 -980
  417. package/dist/src/utils/plugin-config.js.map +1 -1
  418. package/dist/src/utils/plugin-intent-state.d.ts +49 -0
  419. package/dist/src/utils/plugin-intent-state.js +320 -0
  420. package/dist/src/utils/plugin-intent-state.js.map +1 -0
  421. package/dist/src/utils/plugin-scripts.d.ts +62 -125
  422. package/dist/src/utils/plugin-scripts.js +468 -525
  423. package/dist/src/utils/plugin-scripts.js.map +1 -1
  424. package/dist/src/utils/process-tree.d.ts +2 -2
  425. package/dist/src/utils/process-tree.js +1 -1
  426. package/dist/src/utils/process-tree.js.map +1 -1
  427. package/dist/src/utils/project-boundary.d.ts +11 -13
  428. package/dist/src/utils/project-boundary.js +28 -34
  429. package/dist/src/utils/project-boundary.js.map +1 -1
  430. package/dist/src/utils/safe-fs.d.ts +21 -0
  431. package/dist/src/utils/safe-fs.js +111 -0
  432. package/dist/src/utils/safe-fs.js.map +1 -0
  433. package/dist/src/utils/safe-operation-diagnostic.d.ts +15 -0
  434. package/dist/src/utils/safe-operation-diagnostic.js +33 -0
  435. package/dist/src/utils/safe-operation-diagnostic.js.map +1 -0
  436. package/dist/src/utils/sensitive-content.d.ts +4 -0
  437. package/dist/src/utils/sensitive-content.js +36 -0
  438. package/dist/src/utils/sensitive-content.js.map +1 -0
  439. package/dist/src/utils/skill-validation.d.ts +1 -1
  440. package/dist/src/utils/skill-validation.js +1 -1
  441. package/dist/src/utils/skill-validation.js.map +1 -1
  442. package/dist/src/utils/state-paths.d.ts +1 -0
  443. package/dist/src/utils/state-paths.js +12 -2
  444. package/dist/src/utils/state-paths.js.map +1 -1
  445. package/dist/src/utils/target-eligibility.d.ts +8 -2
  446. package/dist/src/utils/target-eligibility.js +17 -8
  447. package/dist/src/utils/target-eligibility.js.map +1 -1
  448. package/dist/src/utils/windows-claude-shim.d.ts +9 -0
  449. package/dist/src/utils/windows-claude-shim.js +141 -0
  450. package/dist/src/utils/windows-claude-shim.js.map +1 -0
  451. package/dist/vitest.config.js +91 -10
  452. package/dist/vitest.config.js.map +1 -1
  453. package/package.json +22 -19
  454. package/dist/authoring/scripts/check-plugin-versions.mjs +0 -5
  455. package/dist/authoring/scripts/check-plugin-versions.mjs.map +0 -1
  456. package/dist/scripts/aw-skill-eval-engine.d.ts +0 -13
  457. package/dist/scripts/aw-skill-eval-engine.js +0 -31
  458. package/dist/scripts/aw-skill-eval-engine.js.map +0 -1
  459. package/dist/scripts/codex-eval-app-server.d.ts +0 -89
  460. package/dist/scripts/codex-eval-app-server.js +0 -1228
  461. package/dist/scripts/codex-eval-app-server.js.map +0 -1
  462. package/dist/scripts/codex-eval-isolation.d.ts +0 -61
  463. package/dist/scripts/codex-eval-isolation.js +0 -318
  464. package/dist/scripts/codex-eval-isolation.js.map +0 -1
  465. package/dist/scripts/codex-eval-process-management.d.ts +0 -8
  466. package/dist/scripts/codex-eval-process-management.js +0 -69
  467. package/dist/scripts/codex-eval-process-management.js.map +0 -1
  468. package/dist/scripts/codex-eval-process-tree.d.ts +0 -38
  469. package/dist/scripts/codex-eval-process-tree.js +0 -803
  470. package/dist/scripts/codex-eval-process-tree.js.map +0 -1
  471. package/dist/scripts/codex-eval-runtime-config.d.ts +0 -62
  472. package/dist/scripts/codex-eval-runtime-config.js +0 -843
  473. package/dist/scripts/codex-eval-runtime-config.js.map +0 -1
  474. package/dist/scripts/codex-trigger-eval.d.ts +0 -84
  475. package/dist/scripts/codex-trigger-eval.js +0 -968
  476. package/dist/scripts/codex-trigger-eval.js.map +0 -1
  477. package/dist/scripts/eval-plugin-skills-audited.d.ts +0 -6
  478. package/dist/scripts/eval-plugin-skills-audited.js +0 -261
  479. package/dist/scripts/eval-plugin-skills-audited.js.map +0 -1
  480. package/dist/scripts/eval-plugin-skills.d.ts +0 -45
  481. package/dist/scripts/eval-plugin-skills.js +0 -1586
  482. package/dist/scripts/eval-plugin-skills.js.map +0 -1
  483. package/dist/scripts/eval-run-layout.d.ts +0 -17
  484. package/dist/scripts/eval-run-layout.js +0 -26
  485. package/dist/scripts/eval-run-layout.js.map +0 -1
  486. package/dist/scripts/plugin-eval-contract.d.ts +0 -185
  487. package/dist/scripts/plugin-eval-contract.js +0 -695
  488. package/dist/scripts/plugin-eval-contract.js.map +0 -1
  489. package/dist/scripts/plugin-eval-materializer.d.ts +0 -13
  490. package/dist/scripts/plugin-eval-materializer.js +0 -421
  491. package/dist/scripts/plugin-eval-materializer.js.map +0 -1
  492. package/dist/scripts/skill-reporting.d.ts +0 -212
  493. package/dist/scripts/skill-reporting.js +0 -922
  494. package/dist/scripts/skill-reporting.js.map +0 -1
  495. package/dist/src/commands/status-v4.d.ts +0 -102
  496. package/dist/src/commands/status-v4.js +0 -844
  497. package/dist/src/commands/status-v4.js.map +0 -1
  498. package/dist/src/commands/status.d.ts +0 -93
  499. package/dist/src/commands/status.js +0 -442
  500. package/dist/src/commands/status.js.map +0 -1
  501. package/dist/src/utils/active-marketplace-runtime-lock.d.ts +0 -12
  502. package/dist/src/utils/active-marketplace-runtime-lock.js +0 -133
  503. package/dist/src/utils/active-marketplace-runtime-lock.js.map +0 -1
  504. package/dist/src/utils/catalog-manifest-v3.d.ts +0 -2
  505. package/dist/src/utils/catalog-manifest-v3.js +0 -3
  506. package/dist/src/utils/catalog-manifest-v3.js.map +0 -1
  507. package/dist/src/utils/catalog-manifest-v4.d.ts +0 -5
  508. package/dist/src/utils/catalog-manifest-v4.js.map +0 -1
  509. package/dist/src/utils/catalog-source-cache.d.ts +0 -61
  510. package/dist/src/utils/catalog-source-cache.js +0 -276
  511. package/dist/src/utils/catalog-source-cache.js.map +0 -1
  512. package/dist/src/utils/codex-project-surface.d.ts +0 -3
  513. package/dist/src/utils/codex-project-surface.js +0 -49
  514. package/dist/src/utils/codex-project-surface.js.map +0 -1
  515. package/dist/src/utils/lifecycle-active-store.d.ts +0 -175
  516. package/dist/src/utils/lifecycle-active-store.js +0 -1276
  517. package/dist/src/utils/lifecycle-active-store.js.map +0 -1
  518. package/dist/src/utils/plugin-authoring-capabilities.d.ts +0 -23
  519. package/dist/src/utils/plugin-authoring-capabilities.js +0 -37
  520. package/dist/src/utils/plugin-authoring-capabilities.js.map +0 -1
  521. package/dist/src/utils/plugin-authoring-capabilities.json +0 -92
  522. package/dist/src/utils/plugin-release.d.ts +0 -2
  523. package/dist/src/utils/plugin-release.js +0 -2
  524. package/dist/src/utils/plugin-release.js.map +0 -1
  525. package/dist/src/utils/skill-frontmatter-capabilities.d.ts +0 -201
  526. package/dist/src/utils/skill-frontmatter-capabilities.js +0 -5
  527. package/dist/src/utils/skill-frontmatter-capabilities.js.map +0 -1
  528. package/dist/src/utils/skill-frontmatter-capabilities.json +0 -200
  529. /package/dist/authoring/scripts/{check-plugin-versions.d.mts → remove-plugin.d.mts} +0 -0
@@ -0,0 +1,45 @@
1
+ import { CatalogGenerationError } from './catalog-generation-error.js';
2
+ import { readCatalogGenerationState } from './catalog-generation-state.js';
3
+ import { calculateCatalogSourceIdentity } from './catalog-source-identity.js';
4
+ import { readCatalogSourcesConfigSnapshot, } from './catalog-sources.js';
5
+ const MAX_CONTROL_SNAPSHOT_RETRIES = 3;
6
+ function identityMismatch() {
7
+ return new CatalogGenerationError({
8
+ code: 'catalogGenerationIdentityMismatch',
9
+ message: 'Catalog source configuration changed while generation state was being read. Retry the operation.',
10
+ });
11
+ }
12
+ async function sourceIdentities(snapshot) {
13
+ return Object.fromEntries(await Promise.all(snapshot.config.sources.map(async (source) => [
14
+ source.id,
15
+ await calculateCatalogSourceIdentity(source),
16
+ ])));
17
+ }
18
+ export async function readCatalogGenerationControlSnapshot(options = {}) {
19
+ const env = options.env ?? process.env;
20
+ if (options.configSnapshot) {
21
+ const generationState = await readCatalogGenerationState(env);
22
+ const currentConfig = await readCatalogSourcesConfigSnapshot(env);
23
+ if (currentConfig.digest !== options.configSnapshot.digest)
24
+ throw identityMismatch();
25
+ return {
26
+ configSnapshot: options.configSnapshot,
27
+ generationState,
28
+ sourceIdentities: await sourceIdentities(options.configSnapshot),
29
+ };
30
+ }
31
+ for (let attempt = 0; attempt <= MAX_CONTROL_SNAPSHOT_RETRIES; attempt += 1) {
32
+ const configSnapshot = await readCatalogSourcesConfigSnapshot(env);
33
+ const generationState = await readCatalogGenerationState(env);
34
+ const currentConfig = await readCatalogSourcesConfigSnapshot(env);
35
+ if (currentConfig.digest === configSnapshot.digest) {
36
+ return {
37
+ configSnapshot,
38
+ generationState,
39
+ sourceIdentities: await sourceIdentities(configSnapshot),
40
+ };
41
+ }
42
+ }
43
+ throw identityMismatch();
44
+ }
45
+ //# sourceMappingURL=catalog-generation-control-snapshot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog-generation-control-snapshot.js","sourceRoot":"","sources":["../../../src/utils/catalog-generation-control-snapshot.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EACL,gCAAgC,GAEjC,MAAM,sBAAsB,CAAC;AAE9B,MAAM,4BAA4B,GAAG,CAAC,CAAC;AAQvC,SAAS,gBAAgB;IACvB,OAAO,IAAI,sBAAsB,CAAC;QAChC,IAAI,EAAE,mCAAmC;QACzC,OAAO,EAAE,kGAAkG;KAC5G,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,gBAAgB,CAC7B,QAAsC;IAEtC,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC;QACxF,MAAM,CAAC,EAAE;QACT,MAAM,8BAA8B,CAAC,MAAM,CAAC;KAC7C,CAAC,CAAC,CAAC,CAAC;AACP,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oCAAoC,CAAC,UAGvD,EAAE;IACJ,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;IACvC,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC;QAC3B,MAAM,eAAe,GAAG,MAAM,0BAA0B,CAAC,GAAG,CAAC,CAAC;QAC9D,MAAM,aAAa,GAAG,MAAM,gCAAgC,CAAC,GAAG,CAAC,CAAC;QAClE,IAAI,aAAa,CAAC,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,MAAM;YAAE,MAAM,gBAAgB,EAAE,CAAC;QACrF,OAAO;YACL,cAAc,EAAE,OAAO,CAAC,cAAc;YACtC,eAAe;YACf,gBAAgB,EAAE,MAAM,gBAAgB,CAAC,OAAO,CAAC,cAAc,CAAC;SACjE,CAAC;IACJ,CAAC;IAED,KAAK,IAAI,OAAO,GAAG,CAAC,EAAE,OAAO,IAAI,4BAA4B,EAAE,OAAO,IAAI,CAAC,EAAE,CAAC;QAC5E,MAAM,cAAc,GAAG,MAAM,gCAAgC,CAAC,GAAG,CAAC,CAAC;QACnE,MAAM,eAAe,GAAG,MAAM,0BAA0B,CAAC,GAAG,CAAC,CAAC;QAC9D,MAAM,aAAa,GAAG,MAAM,gCAAgC,CAAC,GAAG,CAAC,CAAC;QAClE,IAAI,aAAa,CAAC,MAAM,KAAK,cAAc,CAAC,MAAM,EAAE,CAAC;YACnD,OAAO;gBACL,cAAc;gBACd,eAAe;gBACf,gBAAgB,EAAE,MAAM,gBAAgB,CAAC,cAAc,CAAC;aACzD,CAAC;QACJ,CAAC;IACH,CAAC;IACD,MAAM,gBAAgB,EAAE,CAAC;AAC3B,CAAC"}
@@ -0,0 +1,16 @@
1
+ export type CatalogGenerationErrorCode = 'catalogSourcesConfigInvalid' | 'catalogSourcesConfigRecoveryStale' | 'catalogSourcesConfigRecoveryFailed' | 'catalogGenerationStateInvalid' | 'catalogGenerationMetadataInvalid' | 'catalogGenerationUnavailable' | 'catalogGenerationSourceMissing' | 'catalogGenerationIdentityMismatch' | 'catalogGenerationReviewStale' | 'catalogReplaceDamagedRequired' | 'catalogGenerationActiveComparisonUnavailable' | 'catalogLogicalIdentityChanged' | 'catalogVersionConflict' | 'catalogRollbackDetected' | 'catalogImpactConfirmationRequired' | 'catalogGenerationRefreshFailed' | 'catalogGenerationPublishFailed';
2
+ export declare class CatalogGenerationError extends Error {
3
+ readonly code: CatalogGenerationErrorCode;
4
+ readonly sourceId?: string;
5
+ readonly impact?: CatalogSourceImpact;
6
+ constructor(options: {
7
+ code: CatalogGenerationErrorCode;
8
+ message: string;
9
+ sourceId?: string;
10
+ cause?: unknown;
11
+ impact?: CatalogSourceImpact;
12
+ });
13
+ }
14
+ export declare function catalogGenerationErrorCode(error: unknown): string;
15
+ export declare function isOfflineCleanupCatalogGenerationError(error: unknown): boolean;
16
+ import type { CatalogSourceImpact } from '../types.js';
@@ -0,0 +1,30 @@
1
+ export class CatalogGenerationError extends Error {
2
+ code;
3
+ sourceId;
4
+ impact;
5
+ constructor(options) {
6
+ super(options.message, options.cause === undefined ? undefined : { cause: options.cause });
7
+ this.name = 'CatalogGenerationError';
8
+ this.code = options.code;
9
+ this.sourceId = options.sourceId;
10
+ this.impact = options.impact;
11
+ }
12
+ }
13
+ export function catalogGenerationErrorCode(error) {
14
+ return error instanceof CatalogGenerationError
15
+ ? error.code
16
+ : 'catalogGenerationFailed';
17
+ }
18
+ const OFFLINE_CLEANUP_ERROR_CODES = new Set([
19
+ 'catalogSourcesConfigInvalid',
20
+ 'catalogGenerationStateInvalid',
21
+ 'catalogGenerationMetadataInvalid',
22
+ 'catalogGenerationUnavailable',
23
+ 'catalogGenerationSourceMissing',
24
+ 'catalogGenerationIdentityMismatch',
25
+ ]);
26
+ export function isOfflineCleanupCatalogGenerationError(error) {
27
+ return error instanceof CatalogGenerationError
28
+ && OFFLINE_CLEANUP_ERROR_CODES.has(error.code);
29
+ }
30
+ //# sourceMappingURL=catalog-generation-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog-generation-error.js","sourceRoot":"","sources":["../../../src/utils/catalog-generation-error.ts"],"names":[],"mappings":"AAmBA,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IACtC,IAAI,CAA6B;IACjC,QAAQ,CAAU;IAClB,MAAM,CAAuB;IAEtC,YAAY,OAMX;QACC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;QAC3F,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;QACrC,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC/B,CAAC;CACF;AAED,MAAM,UAAU,0BAA0B,CAAC,KAAc;IACvD,OAAO,KAAK,YAAY,sBAAsB;QAC5C,CAAC,CAAC,KAAK,CAAC,IAAI;QACZ,CAAC,CAAC,yBAAyB,CAAC;AAChC,CAAC;AAED,MAAM,2BAA2B,GAA4C,IAAI,GAAG,CAAC;IACnF,6BAA6B;IAC7B,+BAA+B;IAC/B,kCAAkC;IAClC,8BAA8B;IAC9B,gCAAgC;IAChC,mCAAmC;CACpC,CAAC,CAAC;AAEH,MAAM,UAAU,sCAAsC,CAAC,KAAc;IACnE,OAAO,KAAK,YAAY,sBAAsB;WACzC,2BAA2B,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACnD,CAAC"}
@@ -0,0 +1,44 @@
1
+ import type { CatalogGenerationActiveV1, CatalogGenerationSet, CatalogGenerationSetSource, PluginMeta } from '../types.js';
2
+ import { type CatalogGenerationControlSnapshot } from './catalog-generation-control-snapshot.js';
3
+ import { type CatalogStoreEntry } from './catalog-generation-store.js';
4
+ export interface ResolvedActiveCatalogGeneration extends CatalogGenerationSetSource {
5
+ active: CatalogGenerationActiveV1;
6
+ }
7
+ export interface ResolvedActiveCatalogPluginShallow {
8
+ sourceId: string;
9
+ sourceIdentity: string;
10
+ logicalIdentity: string;
11
+ catalogVersion: string;
12
+ snapshotPath: string;
13
+ plugin: PluginMeta;
14
+ }
15
+ export declare function readValidatedCatalogGenerationStoreEntry(options: {
16
+ logicalIdentity: string;
17
+ snapshotDigest: string;
18
+ env: NodeJS.ProcessEnv;
19
+ validatedStoreEntries?: Map<string, CatalogStoreEntry>;
20
+ validatingStoreEntries?: Map<string, Promise<CatalogStoreEntry>>;
21
+ }): Promise<CatalogStoreEntry>;
22
+ interface ResolveActiveCatalogGenerationOptions {
23
+ sourceId: string;
24
+ env?: NodeJS.ProcessEnv;
25
+ validatedStoreEntries?: Map<string, CatalogStoreEntry>;
26
+ validatingStoreEntries?: Map<string, Promise<CatalogStoreEntry>>;
27
+ }
28
+ export declare function resolveActiveCatalogGeneration(options: ResolveActiveCatalogGenerationOptions): Promise<ResolvedActiveCatalogGeneration>;
29
+ /** @internal Complete Active evidence for freshness checks before consumer compatibility gating. */
30
+ export declare function resolveValidatedActiveCatalogGeneration(options: ResolveActiveCatalogGenerationOptions): Promise<ResolvedActiveCatalogGeneration>;
31
+ export declare function resolveActiveCatalogPluginShallow(options: {
32
+ sourceId: string;
33
+ pluginName: string;
34
+ env?: NodeJS.ProcessEnv;
35
+ }): Promise<ResolvedActiveCatalogPluginShallow>;
36
+ export declare function calculateCatalogGenerationSetDigest(configDigest: string, primarySourceId: string, sources: CatalogGenerationSetSource[]): string;
37
+ export declare function resolveCatalogGenerationSet(options?: {
38
+ sourceIds?: string[];
39
+ env?: NodeJS.ProcessEnv;
40
+ controlSnapshot?: CatalogGenerationControlSnapshot;
41
+ validatedStoreEntries?: Map<string, CatalogStoreEntry>;
42
+ validatingStoreEntries?: Map<string, Promise<CatalogStoreEntry>>;
43
+ }): Promise<CatalogGenerationSet>;
44
+ export {};
@@ -0,0 +1,273 @@
1
+ import crypto from 'node:crypto';
2
+ import path from 'node:path';
3
+ import fs from 'fs-extra';
4
+ import { IMPLEMENTED_AW_CAPABILITIES } from '../commands/aw-capabilities.js';
5
+ import { projectCatalogCapabilityCompatibility } from './catalog-capability-projection.js';
6
+ import { CatalogGenerationError } from './catalog-generation-error.js';
7
+ import { readCatalogGenerationControlSnapshot, } from './catalog-generation-control-snapshot.js';
8
+ import { CatalogProviderCompatibilityError } from './catalog-public-error.js';
9
+ import { createCatalogStoreKey, readCatalogSnapshotLogicalIdentity, readCatalogStoreMetadata, readCatalogStoreEntry, resolveCatalogStoreLocation, } from './catalog-generation-store.js';
10
+ import { calculateCatalogSourceConfigFingerprint } from './catalog-source-identity.js';
11
+ import { validatePluginManifest } from './manifest.js';
12
+ import { validateCatalogManifestV7 } from './catalog-manifest-v7.js';
13
+ import { calculateFileDigest } from './bundle-integrity.js';
14
+ import { calculateCatalogEntryArtifactDigest, calculateCatalogEntryContentDigest, } from './catalog-digests.js';
15
+ import { CURRENT_CATALOG_MANIFEST_FILE } from '../constants.js';
16
+ export async function readValidatedCatalogGenerationStoreEntry(options) {
17
+ const storeKey = createCatalogStoreKey(options.logicalIdentity, options.snapshotDigest);
18
+ const cached = options.validatedStoreEntries?.get(storeKey);
19
+ if (cached)
20
+ return cached;
21
+ let pending = options.validatingStoreEntries?.get(storeKey);
22
+ if (!pending) {
23
+ pending = readCatalogStoreEntry({
24
+ logicalIdentity: options.logicalIdentity,
25
+ snapshotDigest: options.snapshotDigest,
26
+ env: options.env,
27
+ });
28
+ options.validatingStoreEntries?.set(storeKey, pending);
29
+ }
30
+ try {
31
+ const entry = await pending;
32
+ options.validatedStoreEntries?.set(storeKey, entry);
33
+ return entry;
34
+ }
35
+ finally {
36
+ if (options.validatingStoreEntries?.get(storeKey) === pending) {
37
+ options.validatingStoreEntries.delete(storeKey);
38
+ }
39
+ }
40
+ }
41
+ async function assertRegularDirectory(value, label) {
42
+ const stats = await fs.lstat(value);
43
+ if (!stats.isDirectory() || stats.isSymbolicLink()) {
44
+ throw new Error(`${label} must be a regular directory.`);
45
+ }
46
+ }
47
+ async function assertRegularFile(value, label) {
48
+ const stats = await fs.lstat(value);
49
+ if (!stats.isFile() || stats.isSymbolicLink()) {
50
+ throw new Error(`${label} must be a regular file.`);
51
+ }
52
+ }
53
+ async function resolveFromState(options) {
54
+ if (!options.active) {
55
+ throw new CatalogGenerationError({
56
+ code: 'catalogGenerationUnavailable',
57
+ sourceId: options.source.id,
58
+ message: `Catalog source "${options.source.id}" has no Active snapshot. Run aw catalog source sync ${options.source.id}.`,
59
+ });
60
+ }
61
+ const fingerprint = calculateCatalogSourceConfigFingerprint(options.source);
62
+ if (options.active.sourceIdentity !== options.sourceIdentity
63
+ || options.active.sourceConfigFingerprint !== fingerprint)
64
+ throw new CatalogGenerationError({
65
+ code: 'catalogGenerationIdentityMismatch',
66
+ sourceId: options.source.id,
67
+ message: `Active Catalog snapshot for source "${options.source.id}" does not match the current source configuration. Run aw catalog source sync ${options.source.id}.`,
68
+ });
69
+ const storeKey = createCatalogStoreKey(options.active.logicalIdentity, options.active.snapshotDigest);
70
+ const entry = await readValidatedCatalogGenerationStoreEntry({
71
+ logicalIdentity: options.active.logicalIdentity,
72
+ snapshotDigest: options.active.snapshotDigest,
73
+ env: options.env,
74
+ validatedStoreEntries: options.validatedStoreEntries,
75
+ validatingStoreEntries: options.validatingStoreEntries,
76
+ });
77
+ if (entry.metadata.manifestDigest !== options.active.manifestDigest) {
78
+ throw new CatalogGenerationError({
79
+ code: 'catalogGenerationIdentityMismatch',
80
+ sourceId: options.source.id,
81
+ message: `Active Catalog snapshot for source "${options.source.id}" does not match store metadata. Run aw catalog source sync ${options.source.id}.`,
82
+ });
83
+ }
84
+ const compatibility = projectCatalogCapabilityCompatibility(entry.metadata.requiredAwCapabilities);
85
+ if (options.requireCompatibility && compatibility.state === 'unsupported') {
86
+ throw new CatalogProviderCompatibilityError({
87
+ sourceId: options.source.id,
88
+ requiredCapabilities: compatibility.requiredCapabilities,
89
+ missingCapabilities: compatibility.missingCapabilities,
90
+ availableCapabilities: IMPLEMENTED_AW_CAPABILITIES,
91
+ });
92
+ }
93
+ return {
94
+ sourceId: options.source.id,
95
+ sourceConfigFingerprint: options.active.sourceConfigFingerprint,
96
+ sourceIdentity: options.active.sourceIdentity,
97
+ logicalIdentity: options.active.logicalIdentity,
98
+ catalogVersion: entry.metadata.catalogVersion,
99
+ resolvedCommit: options.active.resolvedCommit,
100
+ manifestDigest: options.active.manifestDigest,
101
+ snapshotDigest: options.active.snapshotDigest,
102
+ storeKey,
103
+ snapshotPath: entry.snapshotRoot,
104
+ manifest: entry.manifest,
105
+ active: options.active,
106
+ };
107
+ }
108
+ async function resolveActiveCatalogGenerationWithPolicy(options, requireCompatibility) {
109
+ const env = options.env ?? process.env;
110
+ const control = await readCatalogGenerationControlSnapshot({ env });
111
+ const source = control.configSnapshot.config.sources.find((entry) => entry.id === options.sourceId);
112
+ if (!source)
113
+ throw new CatalogGenerationError({
114
+ code: 'catalogGenerationSourceMissing',
115
+ sourceId: options.sourceId,
116
+ message: `Catalog source "${options.sourceId}" is not configured.`,
117
+ });
118
+ return resolveFromState({
119
+ source,
120
+ sourceIdentity: control.sourceIdentities[source.id],
121
+ active: control.generationState.sources[source.id]?.active,
122
+ env,
123
+ requireCompatibility,
124
+ validatedStoreEntries: options.validatedStoreEntries,
125
+ validatingStoreEntries: options.validatingStoreEntries,
126
+ });
127
+ }
128
+ export async function resolveActiveCatalogGeneration(options) {
129
+ return resolveActiveCatalogGenerationWithPolicy(options, true);
130
+ }
131
+ /** @internal Complete Active evidence for freshness checks before consumer compatibility gating. */
132
+ export async function resolveValidatedActiveCatalogGeneration(options) {
133
+ return resolveActiveCatalogGenerationWithPolicy(options, false);
134
+ }
135
+ export async function resolveActiveCatalogPluginShallow(options) {
136
+ const env = options.env ?? process.env;
137
+ const control = await readCatalogGenerationControlSnapshot({ env });
138
+ const source = control.configSnapshot.config.sources.find((entry) => entry.id === options.sourceId);
139
+ const active = control.generationState.sources[options.sourceId]?.active;
140
+ if (!source || !active)
141
+ throw new Error('Selected Catalog source has no Active snapshot.');
142
+ const sourceIdentity = control.sourceIdentities[source.id];
143
+ if (active.sourceIdentity !== sourceIdentity
144
+ || active.sourceConfigFingerprint !== calculateCatalogSourceConfigFingerprint(source)) {
145
+ throw new Error('Active Catalog snapshot does not match the selected source configuration.');
146
+ }
147
+ const location = resolveCatalogStoreLocation({
148
+ logicalIdentity: active.logicalIdentity,
149
+ snapshotDigest: active.snapshotDigest,
150
+ env,
151
+ });
152
+ const metadata = await readCatalogStoreMetadata({
153
+ logicalIdentity: active.logicalIdentity,
154
+ snapshotDigest: active.snapshotDigest,
155
+ env,
156
+ });
157
+ if (metadata.manifestDigest !== active.manifestDigest
158
+ || metadata.logicalIdentity !== active.logicalIdentity
159
+ || metadata.snapshotDigest !== active.snapshotDigest) {
160
+ throw new Error('Active Catalog snapshot does not match its content-addressed store metadata.');
161
+ }
162
+ await assertRegularDirectory(location.storeRootDir, 'Catalog store root');
163
+ await assertRegularDirectory(location.logicalIdentityDirectory, 'Catalog logical identity store');
164
+ await assertRegularDirectory(location.entryDir, 'Catalog store entry');
165
+ await assertRegularDirectory(location.snapshotRoot, 'Catalog snapshot');
166
+ if (await readCatalogSnapshotLogicalIdentity(location.snapshotRoot) !== active.logicalIdentity) {
167
+ throw new Error('Catalog snapshot logical identity does not match Active state.');
168
+ }
169
+ const manifestPath = path.join(location.snapshotRoot, CURRENT_CATALOG_MANIFEST_FILE);
170
+ await assertRegularFile(manifestPath, 'Catalog manifest');
171
+ if (await calculateFileDigest(manifestPath) !== active.manifestDigest) {
172
+ throw new Error('Catalog manifest does not match Active state.');
173
+ }
174
+ const rawManifest = await fs.readJson(manifestPath);
175
+ const rawEntries = Array.isArray(rawManifest.entries) ? rawManifest.entries : [];
176
+ const rawEntry = rawEntries.find((entry) => entry !== null
177
+ && typeof entry === 'object'
178
+ && !Array.isArray(entry)
179
+ && entry.name === options.pluginName);
180
+ if (!rawEntry)
181
+ throw new Error('Selected plugin is absent from the local Active snapshot.');
182
+ const manifest = validateCatalogManifestV7({ ...rawManifest, entries: [rawEntry] });
183
+ if (manifest.catalogVersion !== metadata.catalogVersion
184
+ || manifest.channel !== metadata.channel
185
+ || JSON.stringify(manifest.requires.aw.capabilities ?? [])
186
+ !== JSON.stringify(metadata.requiredAwCapabilities)) {
187
+ throw new Error('Catalog manifest does not match store metadata.');
188
+ }
189
+ const entry = manifest.entries[0];
190
+ const pluginsRoot = path.join(location.snapshotRoot, 'plugins');
191
+ const pluginRoot = path.resolve(pluginsRoot, entry.name);
192
+ if (path.dirname(pluginRoot) !== path.resolve(pluginsRoot)) {
193
+ throw new Error('Selected plugin path escapes the Catalog snapshot.');
194
+ }
195
+ await assertRegularDirectory(pluginsRoot, 'Catalog plugins root');
196
+ await assertRegularDirectory(pluginRoot, 'Selected plugin bundle');
197
+ const pluginManifestPath = path.join(pluginRoot, '.agents-plugin', 'plugin.json');
198
+ await assertRegularFile(pluginManifestPath, 'Selected plugin manifest');
199
+ const rawPluginManifest = await fs.readJson(pluginManifestPath);
200
+ const shallowManifestInput = { ...rawPluginManifest };
201
+ delete shallowManifestInput.dependencies;
202
+ const normalizedPluginManifest = validatePluginManifest(pluginRoot, shallowManifestInput);
203
+ const plugin = {
204
+ rootDir: pluginRoot,
205
+ manifestPath: pluginManifestPath,
206
+ manifest: normalizedPluginManifest,
207
+ };
208
+ if (plugin.manifest.name !== options.pluginName || plugin.manifest.version !== entry.version) {
209
+ throw new Error('Selected plugin bundle identity does not match its Catalog entry.');
210
+ }
211
+ const artifactDigest = await calculateCatalogEntryArtifactDigest(pluginRoot);
212
+ const contentDigest = await calculateCatalogEntryContentDigest(pluginRoot);
213
+ if (artifactDigest !== entry.artifactDigest
214
+ || contentDigest !== entry.contentDigest) {
215
+ throw new Error('Selected plugin bundle does not match its Catalog entry.');
216
+ }
217
+ return {
218
+ sourceId: source.id,
219
+ sourceIdentity,
220
+ logicalIdentity: active.logicalIdentity,
221
+ catalogVersion: metadata.catalogVersion,
222
+ snapshotPath: location.snapshotRoot,
223
+ plugin,
224
+ };
225
+ }
226
+ export function calculateCatalogGenerationSetDigest(configDigest, primarySourceId, sources) {
227
+ const identity = sources.map((source) => ({
228
+ sourceId: source.sourceId,
229
+ sourceConfigFingerprint: source.sourceConfigFingerprint,
230
+ logicalIdentity: source.logicalIdentity,
231
+ snapshotDigest: source.snapshotDigest,
232
+ storeKey: source.storeKey,
233
+ }));
234
+ return `sha256:${crypto.createHash('sha256').update(JSON.stringify({
235
+ configDigest,
236
+ primarySourceId,
237
+ sources: identity,
238
+ })).digest('hex')}`;
239
+ }
240
+ export async function resolveCatalogGenerationSet(options = {}) {
241
+ const env = options.env ?? process.env;
242
+ const control = options.controlSnapshot ?? await readCatalogGenerationControlSnapshot({ env });
243
+ const requested = options.sourceIds ? new Set(options.sourceIds) : undefined;
244
+ if (requested) {
245
+ const configured = new Set(control.configSnapshot.config.sources.map((source) => source.id));
246
+ const missing = options.sourceIds.find((sourceId) => !configured.has(sourceId));
247
+ if (missing)
248
+ throw new CatalogGenerationError({
249
+ code: 'catalogGenerationSourceMissing',
250
+ sourceId: missing,
251
+ message: `Catalog source "${missing}" is not configured.`,
252
+ });
253
+ }
254
+ const selected = control.configSnapshot.config.sources.filter((source) => !requested || requested.has(source.id));
255
+ const resolved = await Promise.all(selected.map((source) => resolveFromState({
256
+ source,
257
+ sourceIdentity: control.sourceIdentities[source.id],
258
+ active: control.generationState.sources[source.id]?.active,
259
+ env,
260
+ requireCompatibility: true,
261
+ validatedStoreEntries: options.validatedStoreEntries,
262
+ validatingStoreEntries: options.validatingStoreEntries,
263
+ })));
264
+ const sources = resolved.map(({ active: _active, ...source }) => source);
265
+ const primarySourceId = control.configSnapshot.config.sources.find((source) => source.primary).id;
266
+ return {
267
+ configDigest: control.configSnapshot.digest,
268
+ primarySourceId,
269
+ sources,
270
+ generationSetDigest: calculateCatalogGenerationSetDigest(control.configSnapshot.digest, primarySourceId, sources),
271
+ };
272
+ }
273
+ //# sourceMappingURL=catalog-generation-resolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog-generation-resolver.js","sourceRoot":"","sources":["../../../src/utils/catalog-generation-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,MAAM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AC,EAAE,CAAC,CACnD,CAAC;IACF,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,gBAAgB,CAAC;QAC3E,MAAM;QACN,cAAc,EAAE,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAE;QACpD,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,MAAM;QAC1D,GAAG;QACH,oBAAoB,EAAE,IAAI;QAC1B,qBAAqB,EAAE,OAAO,CAAC,qBAAqB;QACpD,sBAAsB,EAAE,OAAO,CAAC,sBAAsB;KACvD,CAAC,CAAC,CAAC,CAAC;IACL,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC;IACzE,MAAM,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAE,CAAC,EAAE,CAAC;IACnG,OAAO;QACL,YAAY,EAAE,OAAO,CAAC,cAAc,CAAC,MAAM;QAC3C,eAAe;QACf,OAAO;QACP,mBAAmB,EAAE,mCAAmC,CACtD,OAAO,CAAC,cAAc,CAAC,MAAM,EAC7B,eAAe,EACf,OAAO,CACR;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,172 @@
1
+ import type { CatalogActivationMode, CatalogGenerationActiveV1, CatalogGenerationCandidateComparison, CatalogGenerationCandidateEvidence, CatalogGenerationLastSyncV1, CatalogGenerationSyncResult, CatalogManifestV7, CatalogSource } from '../types.js';
2
+ import { type CatalogStoreEntry } from './catalog-generation-store.js';
3
+ export { removeCatalogSourceGenerationState } from './catalog-generation-state.js';
4
+ import { catalogGitProviderInternal } from './git-catalog-provider.js';
5
+ import { catalogPathProviderInternal } from './path-catalog-provider.js';
6
+ import { type CatalogCapabilityCompatibility } from './catalog-capability-projection.js';
7
+ import { inspectCatalogSourceImpact } from './catalog-source-impact.js';
8
+ export interface CatalogGenerationProviderSet {
9
+ git: typeof catalogGitProviderInternal.resolve;
10
+ path: typeof catalogPathProviderInternal.resolve;
11
+ }
12
+ export interface CatalogGenerationServiceRuntime {
13
+ providers?: CatalogGenerationProviderSet;
14
+ probeGitRef?: typeof catalogGitProviderInternal.probeRef;
15
+ now?: () => Date;
16
+ validatedStoreEntries?: Map<string, CatalogStoreEntry>;
17
+ validatingStoreEntries?: Map<string, Promise<CatalogStoreEntry>>;
18
+ afterCandidateResolved?: () => Promise<void>;
19
+ afterRecoveryStorePublished?: () => Promise<void>;
20
+ afterInactiveStoreRepairPrepared?: () => Promise<void>;
21
+ inspectSourceImpact?: typeof inspectCatalogSourceImpact;
22
+ }
23
+ export interface CatalogGenerationProbeResult {
24
+ sourceId: string;
25
+ candidate: CatalogGenerationCandidateEvidence;
26
+ manifest: CatalogManifestV7;
27
+ }
28
+ export type CatalogGenerationFreshnessState = 'current' | 'updateAvailable' | 'localChangesAvailable' | 'versionConflict' | 'rollbackDetected' | 'incompatible' | 'fixed';
29
+ export interface CatalogGenerationFreshnessResult {
30
+ sourceId: string;
31
+ state: CatalogGenerationFreshnessState;
32
+ activeVersion?: string;
33
+ activeResolvedCommit?: string;
34
+ candidate?: CatalogGenerationCandidateEvidence;
35
+ errorCode?: 'catalogLogicalIdentityChanged';
36
+ reusableCandidate?: CatalogGenerationReusableCandidate;
37
+ }
38
+ export interface CatalogGenerationReusableCandidate {
39
+ probe: CatalogGenerationProbeResult;
40
+ sourceConfigFingerprint: string;
41
+ activeStoreKey: string | null;
42
+ }
43
+ export interface CatalogGenerationStatusEntry {
44
+ sourceId: string;
45
+ configuredSourceIdentity: string;
46
+ active?: CatalogGenerationActiveV1;
47
+ activeReady: boolean;
48
+ configMatchesActive: boolean;
49
+ catalogVersion?: string;
50
+ channel?: 'latest' | 'beta';
51
+ storeKey?: string;
52
+ lastSync?: CatalogGenerationLastSyncV1;
53
+ compatibility: CatalogCapabilityCompatibility | null;
54
+ errorCode?: string;
55
+ }
56
+ export interface CatalogGenerationStatusPayload {
57
+ catalogGenerationStatusSchemaVersion: 2;
58
+ sources: CatalogGenerationStatusEntry[];
59
+ }
60
+ export declare function compareCatalogGenerationCandidates(expected: CatalogGenerationCandidateEvidence, actual: CatalogGenerationCandidateEvidence): CatalogGenerationCandidateComparison;
61
+ export declare function compareCatalogGenerationFreshness(options: {
62
+ sourceType: CatalogSource['type'];
63
+ active?: {
64
+ logicalIdentity: string;
65
+ catalogVersion: string;
66
+ snapshotDigest: string;
67
+ resolvedCommit: string;
68
+ };
69
+ candidate: CatalogGenerationCandidateEvidence;
70
+ }): Omit<CatalogGenerationFreshnessResult, 'sourceId'>;
71
+ export declare function probeCatalogSourceGeneration(options: {
72
+ sourceId: string;
73
+ source?: CatalogSource;
74
+ cliVersion: string;
75
+ env?: NodeJS.ProcessEnv;
76
+ signal?: AbortSignal;
77
+ runtime?: CatalogGenerationServiceRuntime;
78
+ }): Promise<CatalogGenerationProbeResult>;
79
+ export declare function probeCatalogSourceRepairGeneration(options: {
80
+ sourceId: string;
81
+ cliVersion: string;
82
+ expectedActive?: CatalogGenerationActiveV1;
83
+ expectedConfigDigest?: string;
84
+ env?: NodeJS.ProcessEnv;
85
+ signal?: AbortSignal;
86
+ runtime?: CatalogGenerationServiceRuntime;
87
+ }): Promise<CatalogGenerationProbeResult>;
88
+ export declare function probeCatalogSourceFreshness(options: {
89
+ sourceId: string;
90
+ cliVersion: string;
91
+ env?: NodeJS.ProcessEnv;
92
+ signal?: AbortSignal;
93
+ fullValidation?: boolean;
94
+ runtime?: CatalogGenerationServiceRuntime;
95
+ }): Promise<CatalogGenerationFreshnessResult>;
96
+ export declare function recordCatalogGenerationCheck(options: {
97
+ probe: CatalogGenerationProbeResult;
98
+ env?: NodeJS.ProcessEnv;
99
+ signal?: AbortSignal;
100
+ runtime?: CatalogGenerationServiceRuntime;
101
+ }): Promise<CatalogGenerationSyncResult>;
102
+ export declare function activateCatalogSourceGeneration(options: {
103
+ sourceId: string;
104
+ cliVersion: string;
105
+ cwd?: string;
106
+ activationMode?: CatalogActivationMode;
107
+ impactConfirmed?: boolean;
108
+ impactMode?: 'generation' | 'identityChange';
109
+ expectedImpactDigest?: string;
110
+ expectedCandidate?: CatalogGenerationCandidateEvidence;
111
+ expectedActive?: CatalogGenerationActiveV1 | null;
112
+ expectedConfigDigest?: string;
113
+ env?: NodeJS.ProcessEnv;
114
+ signal?: AbortSignal;
115
+ runtime?: CatalogGenerationServiceRuntime;
116
+ }): Promise<CatalogGenerationSyncResult>;
117
+ export declare function recoverCatalogGenerationStateAndActivate(options: {
118
+ sourceId: string;
119
+ cliVersion: string;
120
+ cwd?: string;
121
+ impactConfirmed?: boolean;
122
+ expectedImpactDigest?: string;
123
+ expectedCandidate: CatalogGenerationCandidateEvidence;
124
+ env?: NodeJS.ProcessEnv;
125
+ signal?: AbortSignal;
126
+ runtime?: CatalogGenerationServiceRuntime;
127
+ }): Promise<CatalogGenerationSyncResult>;
128
+ export declare function repairCatalogSourceGeneration(options: {
129
+ sourceId: string;
130
+ cliVersion: string;
131
+ cwd?: string;
132
+ expectedCandidate?: CatalogGenerationCandidateEvidence;
133
+ expectedActive?: CatalogGenerationActiveV1 | null;
134
+ expectedConfigDigest?: string;
135
+ env?: NodeJS.ProcessEnv;
136
+ signal?: AbortSignal;
137
+ runtime?: CatalogGenerationServiceRuntime;
138
+ }): Promise<CatalogGenerationSyncResult>;
139
+ export declare function replaceDamagedCatalogSourceGeneration(options: {
140
+ sourceId: string;
141
+ cliVersion: string;
142
+ cwd?: string;
143
+ expectedCandidate?: CatalogGenerationCandidateEvidence;
144
+ expectedActive: CatalogGenerationActiveV1;
145
+ expectedConfigDigest: string;
146
+ impactConfirmed?: boolean;
147
+ expectedImpactDigest?: string;
148
+ env?: NodeJS.ProcessEnv;
149
+ signal?: AbortSignal;
150
+ runtime?: CatalogGenerationServiceRuntime;
151
+ }): Promise<CatalogGenerationSyncResult>;
152
+ export declare function syncCatalogSourceGeneration(options: {
153
+ sourceId: string;
154
+ cliVersion: string;
155
+ cwd?: string;
156
+ check?: boolean;
157
+ impactConfirmed?: boolean;
158
+ replaceDamaged?: boolean;
159
+ env?: NodeJS.ProcessEnv;
160
+ signal?: AbortSignal;
161
+ runtime?: CatalogGenerationServiceRuntime;
162
+ expectedCandidate?: CatalogGenerationCandidateEvidence;
163
+ expectedActive?: CatalogGenerationActiveV1 | null;
164
+ expectedConfigDigest?: string;
165
+ expectedImpactDigest?: string;
166
+ }): Promise<CatalogGenerationSyncResult>;
167
+ export declare function readCatalogGenerationStatus(options?: {
168
+ sourceId?: string;
169
+ env?: NodeJS.ProcessEnv;
170
+ validatedStoreEntries?: Map<string, CatalogStoreEntry>;
171
+ validatingStoreEntries?: Map<string, Promise<CatalogStoreEntry>>;
172
+ }): Promise<CatalogGenerationStatusPayload>;