@lesliechan721/aw 0.1.0-beta.10

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 (508) hide show
  1. package/dist/authoring/assets/aw-config.d.mts +51 -0
  2. package/dist/authoring/assets/aw-config.mjs +1025 -0
  3. package/dist/authoring/assets/aw-config.mjs.map +1 -0
  4. package/dist/authoring/scripts/add-skill.d.mts +2 -0
  5. package/dist/authoring/scripts/add-skill.mjs +355 -0
  6. package/dist/authoring/scripts/add-skill.mjs.map +1 -0
  7. package/dist/authoring/scripts/init-plugin.d.mts +2 -0
  8. package/dist/authoring/scripts/init-plugin.mjs +487 -0
  9. package/dist/authoring/scripts/init-plugin.mjs.map +1 -0
  10. package/dist/authoring/scripts/lib/javascript-import-scanner.d.mts +4 -0
  11. package/dist/authoring/scripts/lib/javascript-import-scanner.mjs +261 -0
  12. package/dist/authoring/scripts/lib/javascript-import-scanner.mjs.map +1 -0
  13. package/dist/authoring/scripts/lib/plugin-root.d.mts +26 -0
  14. package/dist/authoring/scripts/lib/plugin-root.mjs +125 -0
  15. package/dist/authoring/scripts/lib/plugin-root.mjs.map +1 -0
  16. package/dist/authoring/scripts/lib/plugin-version-check.d.mts +69 -0
  17. package/dist/authoring/scripts/lib/plugin-version-check.mjs +563 -0
  18. package/dist/authoring/scripts/lib/plugin-version-check.mjs.map +1 -0
  19. package/dist/authoring/scripts/lib/semver.d.mts +9 -0
  20. package/dist/authoring/scripts/lib/semver.mjs +63 -0
  21. package/dist/authoring/scripts/lib/semver.mjs.map +1 -0
  22. package/dist/authoring/scripts/lib/skill-scaffold.d.mts +111 -0
  23. package/dist/authoring/scripts/lib/skill-scaffold.mjs +353 -0
  24. package/dist/authoring/scripts/lib/skill-scaffold.mjs.map +1 -0
  25. package/dist/authoring/scripts/plugin-status.d.mts +2 -0
  26. package/dist/authoring/scripts/plugin-status.mjs +93 -0
  27. package/dist/authoring/scripts/plugin-status.mjs.map +1 -0
  28. package/dist/authoring/scripts/remove-plugin.d.mts +2 -0
  29. package/dist/authoring/scripts/remove-plugin.mjs +367 -0
  30. package/dist/authoring/scripts/remove-plugin.mjs.map +1 -0
  31. package/dist/authoring/scripts/validate-plugin.d.mts +2 -0
  32. package/dist/authoring/scripts/validate-plugin.mjs +3465 -0
  33. package/dist/authoring/scripts/validate-plugin.mjs.map +1 -0
  34. package/dist/authoring/scripts/validate-skill.d.mts +2 -0
  35. package/dist/authoring/scripts/validate-skill.mjs +126 -0
  36. package/dist/authoring/scripts/validate-skill.mjs.map +1 -0
  37. package/dist/authoring/templates/aw-config-runtime.d.mts +2 -0
  38. package/dist/authoring/templates/aw-config-runtime.mjs +407 -0
  39. package/dist/authoring/templates/aw-config-runtime.mjs.map +1 -0
  40. package/dist/index.d.ts +2 -0
  41. package/dist/index.js +8 -0
  42. package/dist/index.js.map +1 -0
  43. package/dist/scripts/aw-skill-eval-materializer.d.ts +24 -0
  44. package/dist/scripts/aw-skill-eval-materializer.js +309 -0
  45. package/dist/scripts/aw-skill-eval-materializer.js.map +1 -0
  46. package/dist/scripts/bundle-plugins.d.ts +17 -0
  47. package/dist/scripts/bundle-plugins.js +126 -0
  48. package/dist/scripts/bundle-plugins.js.map +1 -0
  49. package/dist/scripts/plugin-staging.d.ts +26 -0
  50. package/dist/scripts/plugin-staging.js +76 -0
  51. package/dist/scripts/plugin-staging.js.map +1 -0
  52. package/dist/scripts/test-plugin-scripts.d.ts +7 -0
  53. package/dist/scripts/test-plugin-scripts.js +610 -0
  54. package/dist/scripts/test-plugin-scripts.js.map +1 -0
  55. package/dist/src/adapters/helpers.d.ts +44 -0
  56. package/dist/src/adapters/helpers.js +95 -0
  57. package/dist/src/adapters/helpers.js.map +1 -0
  58. package/dist/src/authoring/workspace-commands.d.ts +70 -0
  59. package/dist/src/authoring/workspace-commands.js +158 -0
  60. package/dist/src/authoring/workspace-commands.js.map +1 -0
  61. package/dist/src/commands/aw-capabilities.d.ts +78 -0
  62. package/dist/src/commands/aw-capabilities.js +254 -0
  63. package/dist/src/commands/aw-capabilities.js.map +1 -0
  64. package/dist/src/commands/catalog-dev-source.d.ts +120 -0
  65. package/dist/src/commands/catalog-dev-source.js +434 -0
  66. package/dist/src/commands/catalog-dev-source.js.map +1 -0
  67. package/dist/src/commands/catalog-generation.d.ts +16 -0
  68. package/dist/src/commands/catalog-generation.js +9 -0
  69. package/dist/src/commands/catalog-generation.js.map +1 -0
  70. package/dist/src/commands/catalog-publication-inspection.d.ts +138 -0
  71. package/dist/src/commands/catalog-publication-inspection.js +711 -0
  72. package/dist/src/commands/catalog-publication-inspection.js.map +1 -0
  73. package/dist/src/commands/catalog-publication-journal.d.ts +56 -0
  74. package/dist/src/commands/catalog-publication-journal.js +215 -0
  75. package/dist/src/commands/catalog-publication-journal.js.map +1 -0
  76. package/dist/src/commands/catalog-publication-target.d.ts +18 -0
  77. package/dist/src/commands/catalog-publication-target.js +95 -0
  78. package/dist/src/commands/catalog-publication-target.js.map +1 -0
  79. package/dist/src/commands/catalog-publish.d.ts +103 -0
  80. package/dist/src/commands/catalog-publish.js +804 -0
  81. package/dist/src/commands/catalog-publish.js.map +1 -0
  82. package/dist/src/commands/catalog-source.d.ts +134 -0
  83. package/dist/src/commands/catalog-source.js +377 -0
  84. package/dist/src/commands/catalog-source.js.map +1 -0
  85. package/dist/src/commands/catalog-status.d.ts +56 -0
  86. package/dist/src/commands/catalog-status.js +217 -0
  87. package/dist/src/commands/catalog-status.js.map +1 -0
  88. package/dist/src/commands/catalog-store.d.ts +80 -0
  89. package/dist/src/commands/catalog-store.js +348 -0
  90. package/dist/src/commands/catalog-store.js.map +1 -0
  91. package/dist/src/commands/catalog-workspace-resolution.d.ts +13 -0
  92. package/dist/src/commands/catalog-workspace-resolution.js +42 -0
  93. package/dist/src/commands/catalog-workspace-resolution.js.map +1 -0
  94. package/dist/src/commands/console.d.ts +3 -0
  95. package/dist/src/commands/console.js +44 -0
  96. package/dist/src/commands/console.js.map +1 -0
  97. package/dist/src/commands/dependency-operation-plan.d.ts +58 -0
  98. package/dist/src/commands/dependency-operation-plan.js +261 -0
  99. package/dist/src/commands/dependency-operation-plan.js.map +1 -0
  100. package/dist/src/commands/init.d.ts +25 -0
  101. package/dist/src/commands/init.js +42 -0
  102. package/dist/src/commands/init.js.map +1 -0
  103. package/dist/src/commands/offline-cleanup-evidence.d.ts +59 -0
  104. package/dist/src/commands/offline-cleanup-evidence.js +163 -0
  105. package/dist/src/commands/offline-cleanup-evidence.js.map +1 -0
  106. package/dist/src/commands/operation-plan.d.ts +126 -0
  107. package/dist/src/commands/operation-plan.js +47 -0
  108. package/dist/src/commands/operation-plan.js.map +1 -0
  109. package/dist/src/commands/operation-planner.d.ts +46 -0
  110. package/dist/src/commands/operation-planner.js +139 -0
  111. package/dist/src/commands/operation-planner.js.map +1 -0
  112. package/dist/src/commands/options.d.ts +70 -0
  113. package/dist/src/commands/options.js +194 -0
  114. package/dist/src/commands/options.js.map +1 -0
  115. package/dist/src/commands/plugin-capabilities.d.ts +22 -0
  116. package/dist/src/commands/plugin-capabilities.js +159 -0
  117. package/dist/src/commands/plugin-capabilities.js.map +1 -0
  118. package/dist/src/commands/rebuild-command.d.ts +88 -0
  119. package/dist/src/commands/rebuild-command.js +3626 -0
  120. package/dist/src/commands/rebuild-command.js.map +1 -0
  121. package/dist/src/commands/rebuild-integration.d.ts +190 -0
  122. package/dist/src/commands/rebuild-integration.js +4439 -0
  123. package/dist/src/commands/rebuild-integration.js.map +1 -0
  124. package/dist/src/commands/rebuild-operations.d.ts +100 -0
  125. package/dist/src/commands/rebuild-operations.js +625 -0
  126. package/dist/src/commands/rebuild-operations.js.map +1 -0
  127. package/dist/src/commands/reconcile-operation-plan.d.ts +26 -0
  128. package/dist/src/commands/reconcile-operation-plan.js +28 -0
  129. package/dist/src/commands/reconcile-operation-plan.js.map +1 -0
  130. package/dist/src/commands/review-publication.d.ts +99 -0
  131. package/dist/src/commands/review-publication.js +904 -0
  132. package/dist/src/commands/review-publication.js.map +1 -0
  133. package/dist/src/commands/runtime.d.ts +172 -0
  134. package/dist/src/commands/runtime.js +720 -0
  135. package/dist/src/commands/runtime.js.map +1 -0
  136. package/dist/src/commands/skill-eval.d.ts +33 -0
  137. package/dist/src/commands/skill-eval.js +363 -0
  138. package/dist/src/commands/skill-eval.js.map +1 -0
  139. package/dist/src/commands/status-v6.d.ts +206 -0
  140. package/dist/src/commands/status-v6.js +2175 -0
  141. package/dist/src/commands/status-v6.js.map +1 -0
  142. package/dist/src/commands/sync-command.d.ts +23 -0
  143. package/dist/src/commands/sync-command.js +242 -0
  144. package/dist/src/commands/sync-command.js.map +1 -0
  145. package/dist/src/commands/wizard.d.ts +56 -0
  146. package/dist/src/commands/wizard.js +58 -0
  147. package/dist/src/commands/wizard.js.map +1 -0
  148. package/dist/src/commands/write-commands.d.ts +7 -0
  149. package/dist/src/commands/write-commands.js +190 -0
  150. package/dist/src/commands/write-commands.js.map +1 -0
  151. package/dist/src/constants.d.ts +31 -0
  152. package/dist/src/constants.js +32 -0
  153. package/dist/src/constants.js.map +1 -0
  154. package/dist/src/eval/manifest-v1.d.ts +67 -0
  155. package/dist/src/eval/manifest-v1.js +347 -0
  156. package/dist/src/eval/manifest-v1.js.map +1 -0
  157. package/dist/src/generators/agents.d.ts +3 -0
  158. package/dist/src/generators/agents.js +46 -0
  159. package/dist/src/generators/agents.js.map +1 -0
  160. package/dist/src/generators/hooks.d.ts +15 -0
  161. package/dist/src/generators/hooks.js +76 -0
  162. package/dist/src/generators/hooks.js.map +1 -0
  163. package/dist/src/generators/instructions.d.ts +13 -0
  164. package/dist/src/generators/instructions.js +66 -0
  165. package/dist/src/generators/instructions.js.map +1 -0
  166. package/dist/src/generators/local-plugin.d.ts +56 -0
  167. package/dist/src/generators/local-plugin.js +1373 -0
  168. package/dist/src/generators/local-plugin.js.map +1 -0
  169. package/dist/src/generators/permissions.d.ts +10 -0
  170. package/dist/src/generators/permissions.js +37 -0
  171. package/dist/src/generators/permissions.js.map +1 -0
  172. package/dist/src/generators/shared.d.ts +2 -0
  173. package/dist/src/generators/shared.js +15 -0
  174. package/dist/src/generators/shared.js.map +1 -0
  175. package/dist/src/index.d.ts +41 -0
  176. package/dist/src/index.js +3327 -0
  177. package/dist/src/index.js.map +1 -0
  178. package/dist/src/output/command-receipt.d.ts +87 -0
  179. package/dist/src/output/command-receipt.js +302 -0
  180. package/dist/src/output/command-receipt.js.map +1 -0
  181. package/dist/src/output/debug-log.d.ts +4 -0
  182. package/dist/src/output/debug-log.js +97 -0
  183. package/dist/src/output/debug-log.js.map +1 -0
  184. package/dist/src/output/equivalent-command.d.ts +9 -0
  185. package/dist/src/output/equivalent-command.js +39 -0
  186. package/dist/src/output/equivalent-command.js.map +1 -0
  187. package/dist/src/output/model.d.ts +76 -0
  188. package/dist/src/output/model.js +2 -0
  189. package/dist/src/output/model.js.map +1 -0
  190. package/dist/src/output/rebuild-progress.d.ts +21 -0
  191. package/dist/src/output/rebuild-progress.js +128 -0
  192. package/dist/src/output/rebuild-progress.js.map +1 -0
  193. package/dist/src/output/redact.d.ts +3 -0
  194. package/dist/src/output/redact.js +39 -0
  195. package/dist/src/output/redact.js.map +1 -0
  196. package/dist/src/output/reporter.d.ts +9 -0
  197. package/dist/src/output/reporter.js +133 -0
  198. package/dist/src/output/reporter.js.map +1 -0
  199. package/dist/src/portable/commands.d.ts +124 -0
  200. package/dist/src/portable/commands.js +557 -0
  201. package/dist/src/portable/commands.js.map +1 -0
  202. package/dist/src/portable/materializer.d.ts +50 -0
  203. package/dist/src/portable/materializer.js +462 -0
  204. package/dist/src/portable/materializer.js.map +1 -0
  205. package/dist/src/portable/skills-cli.d.ts +43 -0
  206. package/dist/src/portable/skills-cli.js +148 -0
  207. package/dist/src/portable/skills-cli.js.map +1 -0
  208. package/dist/src/tui/catalog-freshness.d.ts +1 -0
  209. package/dist/src/tui/catalog-freshness.js +2 -0
  210. package/dist/src/tui/catalog-freshness.js.map +1 -0
  211. package/dist/src/tui/catalog-generation.d.ts +21 -0
  212. package/dist/src/tui/catalog-generation.js +116 -0
  213. package/dist/src/tui/catalog-generation.js.map +1 -0
  214. package/dist/src/tui/catalog-sources/projection.d.ts +4 -0
  215. package/dist/src/tui/catalog-sources/projection.js +17 -0
  216. package/dist/src/tui/catalog-sources/projection.js.map +1 -0
  217. package/dist/src/tui/catalog-sources/review.d.ts +3 -0
  218. package/dist/src/tui/catalog-sources/review.js +13 -0
  219. package/dist/src/tui/catalog-sources/review.js.map +1 -0
  220. package/dist/src/tui/catalog-sources/screens.d.ts +12 -0
  221. package/dist/src/tui/catalog-sources/screens.js +33 -0
  222. package/dist/src/tui/catalog-sources/screens.js.map +1 -0
  223. package/dist/src/tui/catalog-sources/session.d.ts +22 -0
  224. package/dist/src/tui/catalog-sources/session.js +225 -0
  225. package/dist/src/tui/catalog-sources/session.js.map +1 -0
  226. package/dist/src/tui/catalog-sources/types.d.ts +41 -0
  227. package/dist/src/tui/catalog-sources/types.js +2 -0
  228. package/dist/src/tui/catalog-sources/types.js.map +1 -0
  229. package/dist/src/tui/components.d.ts +102 -0
  230. package/dist/src/tui/components.js +184 -0
  231. package/dist/src/tui/components.js.map +1 -0
  232. package/dist/src/tui/console-app-v4.d.ts +20 -0
  233. package/dist/src/tui/console-app-v4.js +5066 -0
  234. package/dist/src/tui/console-app-v4.js.map +1 -0
  235. package/dist/src/tui/controller-runtime.d.ts +23 -0
  236. package/dist/src/tui/controller-runtime.js +2011 -0
  237. package/dist/src/tui/controller-runtime.js.map +1 -0
  238. package/dist/src/tui/controller.d.ts +557 -0
  239. package/dist/src/tui/controller.js +2120 -0
  240. package/dist/src/tui/controller.js.map +1 -0
  241. package/dist/src/tui/diagnostics.d.ts +30 -0
  242. package/dist/src/tui/diagnostics.js +71 -0
  243. package/dist/src/tui/diagnostics.js.map +1 -0
  244. package/dist/src/tui/index.d.ts +17 -0
  245. package/dist/src/tui/index.js +17 -0
  246. package/dist/src/tui/index.js.map +1 -0
  247. package/dist/src/tui/input-display.d.ts +8 -0
  248. package/dist/src/tui/input-display.js +36 -0
  249. package/dist/src/tui/input-display.js.map +1 -0
  250. package/dist/src/tui/keys.d.ts +12 -0
  251. package/dist/src/tui/keys.js +22 -0
  252. package/dist/src/tui/keys.js.map +1 -0
  253. package/dist/src/tui/layout.d.ts +12 -0
  254. package/dist/src/tui/layout.js +19 -0
  255. package/dist/src/tui/layout.js.map +1 -0
  256. package/dist/src/tui/model.d.ts +424 -0
  257. package/dist/src/tui/model.js +1493 -0
  258. package/dist/src/tui/model.js.map +1 -0
  259. package/dist/src/tui/operation-review-planner.d.ts +21 -0
  260. package/dist/src/tui/operation-review-planner.js +622 -0
  261. package/dist/src/tui/operation-review-planner.js.map +1 -0
  262. package/dist/src/tui/prompt.d.ts +8 -0
  263. package/dist/src/tui/prompt.js +231 -0
  264. package/dist/src/tui/prompt.js.map +1 -0
  265. package/dist/src/tui/router.d.ts +206 -0
  266. package/dist/src/tui/router.js +137 -0
  267. package/dist/src/tui/router.js.map +1 -0
  268. package/dist/src/tui/runner.d.ts +11 -0
  269. package/dist/src/tui/runner.js +71 -0
  270. package/dist/src/tui/runner.js.map +1 -0
  271. package/dist/src/tui/source-ref-presets.d.ts +3 -0
  272. package/dist/src/tui/source-ref-presets.js +11 -0
  273. package/dist/src/tui/source-ref-presets.js.map +1 -0
  274. package/dist/src/tui/theme.d.ts +26 -0
  275. package/dist/src/tui/theme.js +28 -0
  276. package/dist/src/tui/theme.js.map +1 -0
  277. package/dist/src/tui/viewport.d.ts +20 -0
  278. package/dist/src/tui/viewport.js +29 -0
  279. package/dist/src/tui/viewport.js.map +1 -0
  280. package/dist/src/tui/views.d.ts +57 -0
  281. package/dist/src/tui/views.js +201 -0
  282. package/dist/src/tui/views.js.map +1 -0
  283. package/dist/src/tui/wizard.d.ts +11 -0
  284. package/dist/src/tui/wizard.js +323 -0
  285. package/dist/src/tui/wizard.js.map +1 -0
  286. package/dist/src/types.d.ts +474 -0
  287. package/dist/src/types.js +34 -0
  288. package/dist/src/types.js.map +1 -0
  289. package/dist/src/utils/agent-version.d.ts +19 -0
  290. package/dist/src/utils/agent-version.js +205 -0
  291. package/dist/src/utils/agent-version.js.map +1 -0
  292. package/dist/src/utils/artifact-plan.d.ts +27 -0
  293. package/dist/src/utils/artifact-plan.js +453 -0
  294. package/dist/src/utils/artifact-plan.js.map +1 -0
  295. package/dist/src/utils/artifact-renderer.d.ts +129 -0
  296. package/dist/src/utils/artifact-renderer.js +400 -0
  297. package/dist/src/utils/artifact-renderer.js.map +1 -0
  298. package/dist/src/utils/artifact-request.d.ts +16 -0
  299. package/dist/src/utils/artifact-request.js +42 -0
  300. package/dist/src/utils/artifact-request.js.map +1 -0
  301. package/dist/src/utils/artifact-sources.d.ts +8 -0
  302. package/dist/src/utils/artifact-sources.js +10 -0
  303. package/dist/src/utils/artifact-sources.js.map +1 -0
  304. package/dist/src/utils/aw-home-mutation-lock.d.ts +11 -0
  305. package/dist/src/utils/aw-home-mutation-lock.js +83 -0
  306. package/dist/src/utils/aw-home-mutation-lock.js.map +1 -0
  307. package/dist/src/utils/bundle-integrity.d.ts +2 -0
  308. package/dist/src/utils/bundle-integrity.js +63 -0
  309. package/dist/src/utils/bundle-integrity.js.map +1 -0
  310. package/dist/src/utils/bundle-layout.d.ts +4 -0
  311. package/dist/src/utils/bundle-layout.js +531 -0
  312. package/dist/src/utils/bundle-layout.js.map +1 -0
  313. package/dist/src/utils/catalog-digests.d.ts +18 -0
  314. package/dist/src/utils/catalog-digests.js +156 -0
  315. package/dist/src/utils/catalog-digests.js.map +1 -0
  316. package/dist/src/utils/catalog-generation-control-snapshot.d.ts +11 -0
  317. package/dist/src/utils/catalog-generation-control-snapshot.js +45 -0
  318. package/dist/src/utils/catalog-generation-control-snapshot.js.map +1 -0
  319. package/dist/src/utils/catalog-generation-error.d.ts +16 -0
  320. package/dist/src/utils/catalog-generation-error.js +30 -0
  321. package/dist/src/utils/catalog-generation-error.js.map +1 -0
  322. package/dist/src/utils/catalog-generation-resolver.d.ts +32 -0
  323. package/dist/src/utils/catalog-generation-resolver.js +251 -0
  324. package/dist/src/utils/catalog-generation-resolver.js.map +1 -0
  325. package/dist/src/utils/catalog-generation-service.d.ts +161 -0
  326. package/dist/src/utils/catalog-generation-service.js +1237 -0
  327. package/dist/src/utils/catalog-generation-service.js.map +1 -0
  328. package/dist/src/utils/catalog-generation-state.d.ts +22 -0
  329. package/dist/src/utils/catalog-generation-state.js +192 -0
  330. package/dist/src/utils/catalog-generation-state.js.map +1 -0
  331. package/dist/src/utils/catalog-generation-store.d.ts +57 -0
  332. package/dist/src/utils/catalog-generation-store.js +397 -0
  333. package/dist/src/utils/catalog-generation-store.js.map +1 -0
  334. package/dist/src/utils/catalog-manifest-v7.d.ts +5 -0
  335. package/dist/src/utils/catalog-manifest-v7.js +98 -0
  336. package/dist/src/utils/catalog-manifest-v7.js.map +1 -0
  337. package/dist/src/utils/catalog-operation-context.d.ts +20 -0
  338. package/dist/src/utils/catalog-operation-context.js +141 -0
  339. package/dist/src/utils/catalog-operation-context.js.map +1 -0
  340. package/dist/src/utils/catalog-public-error.d.ts +19 -0
  341. package/dist/src/utils/catalog-public-error.js +100 -0
  342. package/dist/src/utils/catalog-public-error.js.map +1 -0
  343. package/dist/src/utils/catalog-runtime-projection.d.ts +33 -0
  344. package/dist/src/utils/catalog-runtime-projection.js +77 -0
  345. package/dist/src/utils/catalog-runtime-projection.js.map +1 -0
  346. package/dist/src/utils/catalog-snapshot.d.ts +10 -0
  347. package/dist/src/utils/catalog-snapshot.js +20 -0
  348. package/dist/src/utils/catalog-snapshot.js.map +1 -0
  349. package/dist/src/utils/catalog-source-identity.d.ts +5 -0
  350. package/dist/src/utils/catalog-source-identity.js +137 -0
  351. package/dist/src/utils/catalog-source-identity.js.map +1 -0
  352. package/dist/src/utils/catalog-source-impact.d.ts +20 -0
  353. package/dist/src/utils/catalog-source-impact.js +222 -0
  354. package/dist/src/utils/catalog-source-impact.js.map +1 -0
  355. package/dist/src/utils/catalog-source-presentation.d.ts +1 -0
  356. package/dist/src/utils/catalog-source-presentation.js +32 -0
  357. package/dist/src/utils/catalog-source-presentation.js.map +1 -0
  358. package/dist/src/utils/catalog-source-references.d.ts +66 -0
  359. package/dist/src/utils/catalog-source-references.js +1180 -0
  360. package/dist/src/utils/catalog-source-references.js.map +1 -0
  361. package/dist/src/utils/catalog-sources.d.ts +53 -0
  362. package/dist/src/utils/catalog-sources.js +456 -0
  363. package/dist/src/utils/catalog-sources.js.map +1 -0
  364. package/dist/src/utils/codex-config.d.ts +126 -0
  365. package/dist/src/utils/codex-config.js +1032 -0
  366. package/dist/src/utils/codex-config.js.map +1 -0
  367. package/dist/src/utils/codex-manager.d.ts +81 -0
  368. package/dist/src/utils/codex-manager.js +810 -0
  369. package/dist/src/utils/codex-manager.js.map +1 -0
  370. package/dist/src/utils/codex-marketplace-path.d.ts +5 -0
  371. package/dist/src/utils/codex-marketplace-path.js +45 -0
  372. package/dist/src/utils/codex-marketplace-path.js.map +1 -0
  373. package/dist/src/utils/codex-native-observation.d.ts +16 -0
  374. package/dist/src/utils/codex-native-observation.js +22 -0
  375. package/dist/src/utils/codex-native-observation.js.map +1 -0
  376. package/dist/src/utils/codex-native-render-receipt.d.ts +40 -0
  377. package/dist/src/utils/codex-native-render-receipt.js +205 -0
  378. package/dist/src/utils/codex-native-render-receipt.js.map +1 -0
  379. package/dist/src/utils/codex-reconciler.d.ts +128 -0
  380. package/dist/src/utils/codex-reconciler.js +294 -0
  381. package/dist/src/utils/codex-reconciler.js.map +1 -0
  382. package/dist/src/utils/codex-roles.d.ts +71 -0
  383. package/dist/src/utils/codex-roles.js +257 -0
  384. package/dist/src/utils/codex-roles.js.map +1 -0
  385. package/dist/src/utils/codex-shared-native.d.ts +63 -0
  386. package/dist/src/utils/codex-shared-native.js +142 -0
  387. package/dist/src/utils/codex-shared-native.js.map +1 -0
  388. package/dist/src/utils/codex-skill-staging.d.ts +11 -0
  389. package/dist/src/utils/codex-skill-staging.js +8 -0
  390. package/dist/src/utils/codex-skill-staging.js.map +1 -0
  391. package/dist/src/utils/codex-surface-analysis.d.ts +45 -0
  392. package/dist/src/utils/codex-surface-analysis.js +245 -0
  393. package/dist/src/utils/codex-surface-analysis.js.map +1 -0
  394. package/dist/src/utils/config-value.d.ts +3 -0
  395. package/dist/src/utils/config-value.js +23 -0
  396. package/dist/src/utils/config-value.js.map +1 -0
  397. package/dist/src/utils/dynamic-skill-tree.d.ts +36 -0
  398. package/dist/src/utils/dynamic-skill-tree.js +466 -0
  399. package/dist/src/utils/dynamic-skill-tree.js.map +1 -0
  400. package/dist/src/utils/file-rules.d.ts +1 -0
  401. package/dist/src/utils/file-rules.js +2 -0
  402. package/dist/src/utils/file-rules.js.map +1 -0
  403. package/dist/src/utils/git-catalog-provider.d.ts +22 -0
  404. package/dist/src/utils/git-catalog-provider.js +497 -0
  405. package/dist/src/utils/git-catalog-provider.js.map +1 -0
  406. package/dist/src/utils/hooks-contract.d.ts +1 -0
  407. package/dist/src/utils/hooks-contract.js +2 -0
  408. package/dist/src/utils/hooks-contract.js.map +1 -0
  409. package/dist/src/utils/json.d.ts +4 -0
  410. package/dist/src/utils/json.js +29 -0
  411. package/dist/src/utils/json.js.map +1 -0
  412. package/dist/src/utils/local-marketplace.d.ts +41 -0
  413. package/dist/src/utils/local-marketplace.js +316 -0
  414. package/dist/src/utils/local-marketplace.js.map +1 -0
  415. package/dist/src/utils/manifest.d.ts +11 -0
  416. package/dist/src/utils/manifest.js +33 -0
  417. package/dist/src/utils/manifest.js.map +1 -0
  418. package/dist/src/utils/marketplace.d.ts +3 -0
  419. package/dist/src/utils/marketplace.js +76 -0
  420. package/dist/src/utils/marketplace.js.map +1 -0
  421. package/dist/src/utils/multi-source-catalog.d.ts +66 -0
  422. package/dist/src/utils/multi-source-catalog.js +345 -0
  423. package/dist/src/utils/multi-source-catalog.js.map +1 -0
  424. package/dist/src/utils/native-cli.d.ts +118 -0
  425. package/dist/src/utils/native-cli.js +518 -0
  426. package/dist/src/utils/native-cli.js.map +1 -0
  427. package/dist/src/utils/orphan-marketplace-cleanup.d.ts +18 -0
  428. package/dist/src/utils/orphan-marketplace-cleanup.js +198 -0
  429. package/dist/src/utils/orphan-marketplace-cleanup.js.map +1 -0
  430. package/dist/src/utils/ownership.d.ts +194 -0
  431. package/dist/src/utils/ownership.js +723 -0
  432. package/dist/src/utils/ownership.js.map +1 -0
  433. package/dist/src/utils/path-catalog-provider.d.ts +7 -0
  434. package/dist/src/utils/path-catalog-provider.js +74 -0
  435. package/dist/src/utils/path-catalog-provider.js.map +1 -0
  436. package/dist/src/utils/paths.d.ts +40 -0
  437. package/dist/src/utils/paths.js +137 -0
  438. package/dist/src/utils/paths.js.map +1 -0
  439. package/dist/src/utils/platform-entries.d.ts +1 -0
  440. package/dist/src/utils/platform-entries.js +2 -0
  441. package/dist/src/utils/platform-entries.js.map +1 -0
  442. package/dist/src/utils/platform-support.d.ts +1 -0
  443. package/dist/src/utils/platform-support.js +2 -0
  444. package/dist/src/utils/platform-support.js.map +1 -0
  445. package/dist/src/utils/plugin-config-write.d.ts +110 -0
  446. package/dist/src/utils/plugin-config-write.js +773 -0
  447. package/dist/src/utils/plugin-config-write.js.map +1 -0
  448. package/dist/src/utils/plugin-config.d.ts +389 -0
  449. package/dist/src/utils/plugin-config.js +1642 -0
  450. package/dist/src/utils/plugin-config.js.map +1 -0
  451. package/dist/src/utils/plugin-dependencies.d.ts +12 -0
  452. package/dist/src/utils/plugin-dependencies.js +162 -0
  453. package/dist/src/utils/plugin-dependencies.js.map +1 -0
  454. package/dist/src/utils/plugin-intent-state.d.ts +34 -0
  455. package/dist/src/utils/plugin-intent-state.js +289 -0
  456. package/dist/src/utils/plugin-intent-state.js.map +1 -0
  457. package/dist/src/utils/plugin-script-contract.d.ts +1 -0
  458. package/dist/src/utils/plugin-script-contract.js +2 -0
  459. package/dist/src/utils/plugin-script-contract.js.map +1 -0
  460. package/dist/src/utils/plugin-scripts.d.ts +101 -0
  461. package/dist/src/utils/plugin-scripts.js +253 -0
  462. package/dist/src/utils/plugin-scripts.js.map +1 -0
  463. package/dist/src/utils/process-lock.d.ts +47 -0
  464. package/dist/src/utils/process-lock.js +532 -0
  465. package/dist/src/utils/process-lock.js.map +1 -0
  466. package/dist/src/utils/process-tree.d.ts +2 -0
  467. package/dist/src/utils/process-tree.js +2 -0
  468. package/dist/src/utils/process-tree.js.map +1 -0
  469. package/dist/src/utils/project-boundary.d.ts +9 -0
  470. package/dist/src/utils/project-boundary.js +67 -0
  471. package/dist/src/utils/project-boundary.js.map +1 -0
  472. package/dist/src/utils/rendered-contract.d.ts +8 -0
  473. package/dist/src/utils/rendered-contract.js +134 -0
  474. package/dist/src/utils/rendered-contract.js.map +1 -0
  475. package/dist/src/utils/runtime-skill-closure.d.ts +13 -0
  476. package/dist/src/utils/runtime-skill-closure.js +863 -0
  477. package/dist/src/utils/runtime-skill-closure.js.map +1 -0
  478. package/dist/src/utils/safe-fs.d.ts +21 -0
  479. package/dist/src/utils/safe-fs.js +111 -0
  480. package/dist/src/utils/safe-fs.js.map +1 -0
  481. package/dist/src/utils/skill-authoring.d.ts +1 -0
  482. package/dist/src/utils/skill-authoring.js +2 -0
  483. package/dist/src/utils/skill-authoring.js.map +1 -0
  484. package/dist/src/utils/skill-validation.d.ts +37 -0
  485. package/dist/src/utils/skill-validation.js +326 -0
  486. package/dist/src/utils/skill-validation.js.map +1 -0
  487. package/dist/src/utils/slash-commands.d.ts +1 -0
  488. package/dist/src/utils/slash-commands.js +2 -0
  489. package/dist/src/utils/slash-commands.js.map +1 -0
  490. package/dist/src/utils/state-paths.d.ts +14 -0
  491. package/dist/src/utils/state-paths.js +139 -0
  492. package/dist/src/utils/state-paths.js.map +1 -0
  493. package/dist/src/utils/target-eligibility.d.ts +13 -0
  494. package/dist/src/utils/target-eligibility.js +35 -0
  495. package/dist/src/utils/target-eligibility.js.map +1 -0
  496. package/dist/src/utils/target-order.d.ts +7 -0
  497. package/dist/src/utils/target-order.js +10 -0
  498. package/dist/src/utils/target-order.js.map +1 -0
  499. package/dist/src/utils/template-engine.d.ts +1 -0
  500. package/dist/src/utils/template-engine.js +2 -0
  501. package/dist/src/utils/template-engine.js.map +1 -0
  502. package/dist/src/utils/test-path-fence.d.ts +12 -0
  503. package/dist/src/utils/test-path-fence.js +31 -0
  504. package/dist/src/utils/test-path-fence.js.map +1 -0
  505. package/dist/vitest.config.d.ts +2 -0
  506. package/dist/vitest.config.js +16 -0
  507. package/dist/vitest.config.js.map +1 -0
  508. package/package.json +64 -0
@@ -0,0 +1,367 @@
1
+ #!/usr/bin/env node
2
+ import * as fs from 'node:fs/promises';
3
+ import * as path from 'node:path';
4
+ import { readCatalogWorkspace } from '@lesliechan721/aw-plugin-core';
5
+ import { parseStablePluginVersion, readManifestDocument, resolveBaseCommit, runGit, } from './lib/plugin-version-check.mjs';
6
+ import { assertCanonicalAuthoringPluginRoot } from './lib/plugin-root.mjs';
7
+ import { CLI_RESERVED_IMPORTS } from '../../src/utils/manifest.js';
8
+ const PLUGIN_NAME_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
9
+ class PluginRemovalError extends Error {
10
+ constructor(code, message, recoveryCommand) {
11
+ super(message);
12
+ this.name = 'PluginRemovalError';
13
+ this.code = code;
14
+ this.recoveryCommand = recoveryCommand;
15
+ }
16
+ }
17
+ function fail(code, message, recoveryCommand) {
18
+ throw new PluginRemovalError(code, message, recoveryCommand);
19
+ }
20
+ function readOptionValue(args, index, flag) {
21
+ const current = args[index];
22
+ const eqIndex = current.indexOf('=');
23
+ if (eqIndex >= 0)
24
+ return { value: current.slice(eqIndex + 1), nextIndex: index };
25
+ const value = args[index + 1];
26
+ if (!value || value.startsWith('--'))
27
+ fail('invalidArguments', `${flag} requires a value.`);
28
+ return { value, nextIndex: index + 1 };
29
+ }
30
+ function printUsage() {
31
+ console.log(`Usage:
32
+ aw plugin remove <plugin-name> --workspace-root <path> --yes [--json]
33
+
34
+ Options:
35
+ --workspace-root <path> Catalog Workspace root. Required.
36
+ --yes Confirm deletion of the committed, unchanged plugin tree.
37
+ --json Emit one schema 1 JSON object.
38
+ -h, --help Show this help message.
39
+
40
+ The command deletes only the canonical plugins/<plugin-name> source root.
41
+ It does not change the Catalog version, commit, build, or publish.
42
+ `);
43
+ }
44
+ function parseArgs(argv) {
45
+ const args = argv.slice(2);
46
+ const options = { json: false, yes: false };
47
+ for (let index = 0; index < args.length; index += 1) {
48
+ const arg = args[index];
49
+ if (arg === '-h' || arg === '--help') {
50
+ printUsage();
51
+ process.exit(0);
52
+ }
53
+ if (arg === '--')
54
+ continue;
55
+ if (arg === '--json') {
56
+ options.json = true;
57
+ continue;
58
+ }
59
+ if (arg === '--yes') {
60
+ options.yes = true;
61
+ continue;
62
+ }
63
+ if (!arg.startsWith('--')) {
64
+ if (options.pluginName === undefined) {
65
+ options.pluginName = arg;
66
+ continue;
67
+ }
68
+ fail('invalidArguments', `Unexpected positional argument: ${arg}`);
69
+ }
70
+ const flag = arg.includes('=') ? arg.slice(0, arg.indexOf('=')) : arg;
71
+ const { value, nextIndex } = readOptionValue(args, index, flag);
72
+ index = nextIndex;
73
+ if (flag === '--workspace-root')
74
+ options.workspaceRoot = value;
75
+ else
76
+ fail('invalidArguments', `Unknown option: ${flag}`);
77
+ }
78
+ if (!options.pluginName)
79
+ fail('invalidArguments', 'Provide one plugin name.');
80
+ if (!PLUGIN_NAME_PATTERN.test(options.pluginName)) {
81
+ fail('invalidPluginName', `Plugin name must use lowercase hyphen-case: ${JSON.stringify(options.pluginName)}.`);
82
+ }
83
+ if (!options.workspaceRoot)
84
+ fail('invalidArguments', '--workspace-root is required.');
85
+ return options;
86
+ }
87
+ async function lstatOrNull(filePath) {
88
+ return fs.lstat(filePath).catch((error) => {
89
+ if (error?.code === 'ENOENT')
90
+ return null;
91
+ throw error;
92
+ });
93
+ }
94
+ async function assertWorkspaceInputPathHasNoSymlinks(workspaceRoot) {
95
+ const absoluteRoot = path.resolve(workspaceRoot);
96
+ const parsed = path.parse(absoluteRoot);
97
+ const segments = absoluteRoot.slice(parsed.root.length).split(path.sep).filter(Boolean);
98
+ let currentPath = parsed.root;
99
+ for (const segment of segments) {
100
+ currentPath = path.join(currentPath, segment);
101
+ const stat = await lstatOrNull(currentPath);
102
+ if (!stat)
103
+ return absoluteRoot;
104
+ if (stat.isSymbolicLink()) {
105
+ fail('unsafePluginPath', `Workspace root path must not contain symbolic links: ${currentPath}`);
106
+ }
107
+ if (!stat.isDirectory()) {
108
+ fail('unsafePluginPath', `Workspace root path component is not a directory: ${currentPath}`);
109
+ }
110
+ }
111
+ return absoluteRoot;
112
+ }
113
+ function parseTreeRecord(record) {
114
+ const tabIndex = record.indexOf('\t');
115
+ if (tabIndex < 0)
116
+ fail('gitInspectionFailed', `Invalid Git tree record: ${JSON.stringify(record)}.`);
117
+ const metadata = record.slice(0, tabIndex).split(' ');
118
+ return {
119
+ mode: metadata[0],
120
+ type: metadata[1],
121
+ objectId: metadata[2],
122
+ filePath: record.slice(tabIndex + 1),
123
+ };
124
+ }
125
+ function isInside(root, candidate) {
126
+ const relative = path.relative(root, candidate);
127
+ return relative === '' || (relative !== '..'
128
+ && !relative.startsWith(`..${path.sep}`)
129
+ && !path.isAbsolute(relative));
130
+ }
131
+ async function resolveGitWorkspace(workspaceRoot) {
132
+ let repoRoot;
133
+ let baseCommit;
134
+ try {
135
+ repoRoot = path.resolve((await runGit(workspaceRoot, ['rev-parse', '--show-toplevel'], {
136
+ code: 'gitWorkspaceInvalid',
137
+ label: 'Git repository discovery',
138
+ })).trim());
139
+ baseCommit = await resolveBaseCommit(repoRoot, 'HEAD');
140
+ }
141
+ catch (error) {
142
+ const code = error?.code === 'invalidBase' ? 'sourceHeadMissing' : (error?.code ?? 'gitWorkspaceInvalid');
143
+ fail(code, error.message);
144
+ }
145
+ if (!isInside(repoRoot, workspaceRoot)) {
146
+ fail('workspaceOutsideRepository', 'Catalog Workspace must stay inside its Git worktree root.');
147
+ }
148
+ return { repoRoot, baseCommit };
149
+ }
150
+ async function scanCurrentTree(root) {
151
+ const entries = new Map();
152
+ async function visit(currentRoot, prefix = '') {
153
+ const children = await fs.readdir(currentRoot, { withFileTypes: true });
154
+ for (const child of children) {
155
+ const relativePath = prefix ? `${prefix}/${child.name}` : child.name;
156
+ const absolutePath = path.join(currentRoot, child.name);
157
+ const stat = await fs.lstat(absolutePath);
158
+ if (stat.isSymbolicLink()) {
159
+ fail('unsafePluginTree', `Plugin tree must not contain symbolic links: ${absolutePath}`);
160
+ }
161
+ if (stat.isDirectory()) {
162
+ entries.set(relativePath, { mode: '040000', type: 'tree', absolutePath });
163
+ await visit(absolutePath, relativePath);
164
+ continue;
165
+ }
166
+ if (!stat.isFile()) {
167
+ fail('unsafePluginTree', `Plugin tree node must be a regular file or directory: ${absolutePath}`);
168
+ }
169
+ entries.set(relativePath, {
170
+ mode: (stat.mode & 0o111) === 0 ? '100644' : '100755',
171
+ type: 'blob',
172
+ absolutePath,
173
+ });
174
+ }
175
+ }
176
+ await visit(root);
177
+ return entries;
178
+ }
179
+ async function assertTreeMatchesHead(options) {
180
+ const { repoRoot, baseCommit, relativePluginRoot, pluginRoot } = options;
181
+ const rootOutput = await runGit(repoRoot, [
182
+ '--literal-pathspecs', 'ls-tree', '-z', baseCommit, '--', relativePluginRoot,
183
+ ], { buffer: true, label: 'Git plugin root tree' });
184
+ const rootRecords = rootOutput.toString('utf8').split('\0').filter(Boolean).map(parseTreeRecord);
185
+ if (rootRecords.length !== 1 || rootRecords[0].filePath !== relativePluginRoot) {
186
+ fail('pluginNotCommitted', `Plugin is not present in HEAD: ${relativePluginRoot}`);
187
+ }
188
+ if (rootRecords[0].mode !== '040000' || rootRecords[0].type !== 'tree') {
189
+ fail('pluginNotCommitted', `Plugin path in HEAD is not a directory tree: ${relativePluginRoot}`);
190
+ }
191
+ const status = await runGit(repoRoot, [
192
+ '--literal-pathspecs', 'status', '--porcelain=v1', '-z', '--ignored=matching', '--untracked-files=all',
193
+ '--', relativePluginRoot,
194
+ ], { buffer: true, label: 'Git plugin worktree status' });
195
+ const statusEntries = status.toString('utf8').split('\0').filter(Boolean);
196
+ if (statusEntries.length > 0) {
197
+ fail('pluginTreeDirty', `Plugin tree differs from HEAD: ${statusEntries.slice(0, 10).join(', ')}`);
198
+ }
199
+ const treeOutput = await runGit(repoRoot, [
200
+ '--literal-pathspecs', 'ls-tree', '-r', '-t', '-z', '--full-tree', baseCommit, '--', relativePluginRoot,
201
+ ], { buffer: true, label: 'Git plugin tree inventory' });
202
+ const headEntries = new Map();
203
+ for (const record of treeOutput.toString('utf8').split('\0').filter(Boolean).map(parseTreeRecord)) {
204
+ if (record.filePath === relativePluginRoot)
205
+ continue;
206
+ if (relativePluginRoot.startsWith(`${record.filePath}/`))
207
+ continue;
208
+ const prefix = `${relativePluginRoot}/`;
209
+ if (!record.filePath.startsWith(prefix)) {
210
+ fail('gitInspectionFailed', `Git returned a path outside the plugin tree: ${record.filePath}`);
211
+ }
212
+ headEntries.set(record.filePath.slice(prefix.length), record);
213
+ }
214
+ const currentEntries = await scanCurrentTree(pluginRoot);
215
+ const inventory = new Set([...headEntries.keys(), ...currentEntries.keys()]);
216
+ const mismatches = [];
217
+ for (const relativePath of [...inventory].sort()) {
218
+ const head = headEntries.get(relativePath);
219
+ const current = currentEntries.get(relativePath);
220
+ if (!head || !current || head.mode !== current.mode || head.type !== current.type) {
221
+ mismatches.push(relativePath);
222
+ continue;
223
+ }
224
+ if (head.type === 'blob') {
225
+ const headBytes = await runGit(repoRoot, ['cat-file', 'blob', head.objectId], {
226
+ buffer: true,
227
+ label: `Git blob ${head.objectId}`,
228
+ });
229
+ const currentBytes = await fs.readFile(current.absolutePath);
230
+ if (!headBytes.equals(currentBytes))
231
+ mismatches.push(relativePath);
232
+ }
233
+ }
234
+ if (mismatches.length > 0) {
235
+ fail('pluginTreeMismatch', `Plugin tree inventory, bytes, or modes differ from HEAD: ${mismatches.slice(0, 10).join(', ')}`);
236
+ }
237
+ }
238
+ function findReverseDependencies(plugins, targetName) {
239
+ return plugins
240
+ .filter((plugin) => (plugin.manifest.name !== targetName
241
+ && (plugin.manifest.dependencies ?? []).includes(targetName)))
242
+ .map((plugin) => plugin.manifest.name)
243
+ .sort();
244
+ }
245
+ function shellQuote(value) {
246
+ return `'${String(value).replaceAll("'", "'\\''")}'`;
247
+ }
248
+ function createReceipt(options = {}) {
249
+ return {
250
+ schemaVersion: 1,
251
+ command: 'plugin:remove',
252
+ ok: options.ok ?? false,
253
+ workspaceRoot: options.workspaceRoot ?? null,
254
+ workspaceRootResolvedFrom: process.env.AW_AUTHORING_WORKSPACE_ROOT_RESOLVED_FROM ?? null,
255
+ baseCommit: options.baseCommit ?? null,
256
+ plugin: options.plugin ?? null,
257
+ removed: options.removed ?? false,
258
+ errors: options.errors ?? [],
259
+ };
260
+ }
261
+ async function removePlugin(options, state) {
262
+ const requestedWorkspaceRoot = await assertWorkspaceInputPathHasNoSymlinks(options.workspaceRoot);
263
+ const pluginRoot = path.join(requestedWorkspaceRoot, 'plugins', options.pluginName);
264
+ state.workspaceRoot = requestedWorkspaceRoot;
265
+ state.plugin = { name: options.pluginName, version: null, root: pluginRoot };
266
+ let fenced;
267
+ try {
268
+ fenced = assertCanonicalAuthoringPluginRoot({
269
+ workspaceRoot: requestedWorkspaceRoot,
270
+ pluginRoot,
271
+ pluginName: options.pluginName,
272
+ requirePluginRoot: true,
273
+ requireManifest: true,
274
+ });
275
+ }
276
+ catch (error) {
277
+ fail((await lstatOrNull(pluginRoot)) ? 'unsafePluginPath' : 'pluginNotFound', error.message);
278
+ }
279
+ state.workspaceRoot = fenced.repoRoot;
280
+ state.plugin.root = fenced.pluginRoot;
281
+ const git = await resolveGitWorkspace(fenced.repoRoot);
282
+ state.baseCommit = git.baseCommit;
283
+ const relativePluginRoot = path.relative(git.repoRoot, fenced.pluginRoot).split(path.sep).join('/');
284
+ let document;
285
+ try {
286
+ document = await readManifestDocument(fenced.pluginRoot);
287
+ if (document.manifest.name !== options.pluginName) {
288
+ fail('manifestNameMismatch', `Manifest name ${JSON.stringify(document.manifest.name)} does not match ${JSON.stringify(options.pluginName)}.`);
289
+ }
290
+ state.plugin.version = parseStablePluginVersion(document.manifest.version, 'plugin version').raw;
291
+ }
292
+ catch (error) {
293
+ if (error instanceof PluginRemovalError)
294
+ throw error;
295
+ fail('invalidPlugin', error.message);
296
+ }
297
+ let workspace;
298
+ try {
299
+ workspace = await readCatalogWorkspace(fenced.repoRoot, {
300
+ reservedImports: CLI_RESERVED_IMPORTS,
301
+ });
302
+ }
303
+ catch (error) {
304
+ fail('workspaceInvalid', error.message);
305
+ }
306
+ await assertTreeMatchesHead({
307
+ repoRoot: git.repoRoot,
308
+ baseCommit: git.baseCommit,
309
+ relativePluginRoot,
310
+ pluginRoot: fenced.pluginRoot,
311
+ });
312
+ const dependents = findReverseDependencies(workspace.plugins, options.pluginName);
313
+ if (dependents.length > 0) {
314
+ fail('reverseDependencies', `Cannot remove ${JSON.stringify(options.pluginName)}; required by: ${dependents.join(', ')}.`);
315
+ }
316
+ if (!options.yes) {
317
+ fail('confirmationRequired', 'Plugin removal requires --yes.');
318
+ }
319
+ const recoveryCommand = `git --literal-pathspecs -C ${shellQuote(git.repoRoot)} restore --source=${git.baseCommit} -- ${shellQuote(relativePluginRoot)}`;
320
+ try {
321
+ await fs.rm(fenced.pluginRoot, { recursive: true });
322
+ }
323
+ catch (error) {
324
+ fail('removalFailed', `Could not remove plugin root ${fenced.pluginRoot}: ${error.message}. Restore it from HEAD with: ${recoveryCommand}`, recoveryCommand);
325
+ }
326
+ return createReceipt({
327
+ ok: true,
328
+ workspaceRoot: state.workspaceRoot,
329
+ baseCommit: state.baseCommit,
330
+ plugin: state.plugin,
331
+ removed: true,
332
+ });
333
+ }
334
+ async function main() {
335
+ const jsonRequested = process.argv.slice(2).includes('--json')
336
+ || process.argv.slice(2).some((arg) => arg.startsWith('--json='));
337
+ const state = { workspaceRoot: null, baseCommit: null, plugin: null };
338
+ try {
339
+ const options = parseArgs(process.argv);
340
+ const receipt = await removePlugin(options, state);
341
+ if (options.json)
342
+ console.log(JSON.stringify(receipt));
343
+ else
344
+ console.log(`[OK] Removed plugin source ${JSON.stringify(receipt.plugin.name)}: ${receipt.plugin.root}`);
345
+ }
346
+ catch (error) {
347
+ const code = error?.code ?? 'unexpectedError';
348
+ const message = error instanceof Error ? error.message : String(error);
349
+ const diagnostic = `[ERROR] ${message}`;
350
+ if (jsonRequested) {
351
+ console.log(JSON.stringify(createReceipt({
352
+ workspaceRoot: state.workspaceRoot,
353
+ baseCommit: state.baseCommit,
354
+ plugin: state.plugin,
355
+ errors: [{
356
+ code,
357
+ message,
358
+ ...(error?.recoveryCommand ? { recoveryCommand: error.recoveryCommand } : {}),
359
+ }],
360
+ })));
361
+ }
362
+ console.error(diagnostic);
363
+ process.exitCode = 1;
364
+ }
365
+ }
366
+ await main();
367
+ //# sourceMappingURL=remove-plugin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove-plugin.mjs","sourceRoot":"","sources":["../../../authoring/scripts/remove-plugin.mjs"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,iBAAiB,EACjB,MAAM,GACP,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,kCAAkC,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,MAAM,mBAAmB,GAAG,4BAA4B,CAAC;AAEzD,MAAM,kBAAmB,SAAQ,KAAK;IACpC,YAAY,IAAI,EAAE,OAAO,EAAE,eAAe;QACxC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;QACjC,IAAI,CAAC,IAAI,GAAG,IAAI,CA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