@lesliechan721/aw 0.1.0-beta.6 → 0.1.0-beta.60
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.
- package/dist/authoring/assets/aw-config.mjs +100 -501
- package/dist/authoring/assets/aw-config.mjs.map +1 -1
- package/dist/authoring/assets/aw-runtime-config.d.mts +13 -0
- package/dist/authoring/assets/aw-runtime-config.mjs +199 -0
- package/dist/authoring/assets/aw-runtime-config.mjs.map +1 -0
- package/dist/authoring/scripts/add-skill.mjs +4 -4
- package/dist/authoring/scripts/add-skill.mjs.map +1 -1
- package/dist/authoring/scripts/init-plugin.mjs +67 -97
- package/dist/authoring/scripts/init-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/lib/plugin-root.mjs +4 -4
- package/dist/authoring/scripts/lib/plugin-root.mjs.map +1 -1
- package/dist/authoring/scripts/lib/plugin-version-check.d.mts +1 -0
- package/dist/authoring/scripts/lib/plugin-version-check.mjs +229 -8
- package/dist/authoring/scripts/lib/plugin-version-check.mjs.map +1 -1
- package/dist/authoring/scripts/lib/skill-scaffold.d.mts +77 -92
- package/dist/authoring/scripts/lib/skill-scaffold.mjs +99 -124
- package/dist/authoring/scripts/lib/skill-scaffold.mjs.map +1 -1
- package/dist/authoring/scripts/plugin-status.mjs +8 -11
- package/dist/authoring/scripts/plugin-status.mjs.map +1 -1
- package/dist/authoring/scripts/remove-plugin.mjs +3 -2
- package/dist/authoring/scripts/remove-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/validate-plugin.mjs +552 -1142
- package/dist/authoring/scripts/validate-plugin.mjs.map +1 -1
- package/dist/native-runtime/reader-runtime.mjs +34 -0
- package/dist/native-runtime/reader.d.mts +6 -0
- package/dist/native-runtime/reader.mjs +11 -0
- package/dist/scripts/aw-skill-eval-materializer.d.ts +26 -0
- package/dist/scripts/aw-skill-eval-materializer.js +306 -0
- package/dist/scripts/aw-skill-eval-materializer.js.map +1 -0
- package/dist/scripts/bundle-plugins.d.ts +1 -0
- package/dist/scripts/bundle-plugins.js +19 -8
- package/dist/scripts/bundle-plugins.js.map +1 -1
- package/dist/scripts/plugin-staging.d.ts +7 -9
- package/dist/scripts/plugin-staging.js +18 -29
- package/dist/scripts/plugin-staging.js.map +1 -1
- package/dist/scripts/plugin-test-reporter.d.mts +2 -0
- package/dist/scripts/plugin-test-reporter.mjs +21 -0
- package/dist/scripts/plugin-test-reporter.mjs.map +1 -0
- package/dist/scripts/test-plugin-scripts.d.ts +5 -0
- package/dist/scripts/test-plugin-scripts.js +208 -89
- package/dist/scripts/test-plugin-scripts.js.map +1 -1
- package/dist/scripts/test-workers.d.mts +24 -0
- package/dist/scripts/test-workers.mjs +59 -0
- package/dist/scripts/test-workers.mjs.map +1 -0
- package/dist/src/adapters/helpers.d.ts +7 -0
- package/dist/src/adapters/helpers.js +2 -2
- package/dist/src/adapters/helpers.js.map +1 -1
- package/dist/src/authoring/workspace-commands.d.ts +19 -1
- package/dist/src/authoring/workspace-commands.js +24 -5
- package/dist/src/authoring/workspace-commands.js.map +1 -1
- package/dist/src/commands/aw-capabilities.d.ts +78 -0
- package/dist/src/commands/aw-capabilities.js +266 -0
- package/dist/src/commands/aw-capabilities.js.map +1 -0
- package/dist/src/commands/catalog-dev-source.d.ts +154 -0
- package/dist/src/commands/catalog-dev-source.js +655 -0
- package/dist/src/commands/catalog-dev-source.js.map +1 -0
- package/dist/src/commands/catalog-generation.d.ts +21 -0
- package/dist/src/commands/catalog-generation.js +9 -0
- package/dist/src/commands/catalog-generation.js.map +1 -0
- package/dist/src/commands/catalog-publication-inspection.d.ts +71 -30
- package/dist/src/commands/catalog-publication-inspection.js +475 -63
- package/dist/src/commands/catalog-publication-inspection.js.map +1 -1
- package/dist/src/commands/catalog-publication-journal.d.ts +68 -0
- package/dist/src/commands/catalog-publication-journal.js +292 -0
- package/dist/src/commands/catalog-publication-journal.js.map +1 -0
- package/dist/src/commands/catalog-publication-target.d.ts +18 -0
- package/dist/src/commands/catalog-publication-target.js +95 -0
- package/dist/src/commands/catalog-publication-target.js.map +1 -0
- package/dist/src/commands/catalog-publish.d.ts +73 -15
- package/dist/src/commands/catalog-publish.js +701 -212
- package/dist/src/commands/catalog-publish.js.map +1 -1
- package/dist/src/commands/catalog-source.d.ts +60 -22
- package/dist/src/commands/catalog-source.js +311 -91
- package/dist/src/commands/catalog-source.js.map +1 -1
- package/dist/src/commands/catalog-status.d.ts +18 -22
- package/dist/src/commands/catalog-status.js +81 -115
- package/dist/src/commands/catalog-status.js.map +1 -1
- package/dist/src/commands/catalog-store.d.ts +104 -0
- package/dist/src/commands/catalog-store.js +685 -0
- package/dist/src/commands/catalog-store.js.map +1 -0
- package/dist/src/commands/catalog-workspace-resolution.d.ts +13 -0
- package/dist/src/commands/catalog-workspace-resolution.js +42 -0
- package/dist/src/commands/catalog-workspace-resolution.js.map +1 -0
- package/dist/src/commands/console.js +28 -17
- package/dist/src/commands/console.js.map +1 -1
- package/dist/src/commands/dependency-operation-plan.d.ts +52 -15
- package/dist/src/commands/dependency-operation-plan.js +289 -7
- package/dist/src/commands/dependency-operation-plan.js.map +1 -1
- package/dist/src/commands/init.d.ts +5 -11
- package/dist/src/commands/init.js +30 -51
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/managed-commands.d.ts +28 -0
- package/dist/src/commands/managed-commands.js +315 -0
- package/dist/src/commands/managed-commands.js.map +1 -0
- package/dist/src/commands/offline-cleanup-evidence.d.ts +67 -0
- package/dist/src/commands/offline-cleanup-evidence.js +181 -0
- package/dist/src/commands/offline-cleanup-evidence.js.map +1 -0
- package/dist/src/commands/operation-plan.d.ts +182 -0
- package/dist/src/commands/operation-plan.js +71 -0
- package/dist/src/commands/operation-plan.js.map +1 -0
- package/dist/src/commands/operation-planner.d.ts +47 -0
- package/dist/src/commands/operation-planner.js +142 -0
- package/dist/src/commands/operation-planner.js.map +1 -0
- package/dist/src/commands/options.d.ts +9 -7
- package/dist/src/commands/options.js +83 -21
- package/dist/src/commands/options.js.map +1 -1
- package/dist/src/commands/plugin-capabilities.js +65 -4
- package/dist/src/commands/plugin-capabilities.js.map +1 -1
- package/dist/src/commands/rebuild-command.d.ts +78 -31
- package/dist/src/commands/rebuild-command.js +5229 -942
- package/dist/src/commands/rebuild-command.js.map +1 -1
- package/dist/src/commands/rebuild-integration.d.ts +143 -21
- package/dist/src/commands/rebuild-integration.js +3384 -1342
- package/dist/src/commands/rebuild-integration.js.map +1 -1
- package/dist/src/commands/rebuild-operations.d.ts +60 -30
- package/dist/src/commands/rebuild-operations.js +267 -320
- package/dist/src/commands/rebuild-operations.js.map +1 -1
- package/dist/src/commands/reconcile-operation-plan.d.ts +28 -0
- package/dist/src/commands/reconcile-operation-plan.js +47 -0
- package/dist/src/commands/reconcile-operation-plan.js.map +1 -0
- package/dist/src/commands/review-inspection.d.ts +60 -0
- package/dist/src/commands/review-inspection.js +422 -0
- package/dist/src/commands/review-inspection.js.map +1 -0
- package/dist/src/commands/review-preparation.d.ts +49 -0
- package/dist/src/commands/review-preparation.js +427 -0
- package/dist/src/commands/review-preparation.js.map +1 -0
- package/dist/src/commands/runtime.d.ts +1 -5
- package/dist/src/commands/runtime.js +27 -53
- package/dist/src/commands/runtime.js.map +1 -1
- package/dist/src/commands/skill-eval.d.ts +39 -0
- package/dist/src/commands/skill-eval.js +400 -0
- package/dist/src/commands/skill-eval.js.map +1 -0
- package/dist/src/commands/status-v6.d.ts +279 -0
- package/dist/src/commands/status-v6.js +2785 -0
- package/dist/src/commands/status-v6.js.map +1 -0
- package/dist/src/commands/sync-command.d.ts +40 -0
- package/dist/src/commands/sync-command.js +254 -0
- package/dist/src/commands/sync-command.js.map +1 -0
- package/dist/src/commands/wizard.d.ts +8 -5
- package/dist/src/commands/wizard.js +6 -4
- package/dist/src/commands/wizard.js.map +1 -1
- package/dist/src/commands/write-commands.d.ts +9 -3
- package/dist/src/commands/write-commands.js +136 -31
- package/dist/src/commands/write-commands.js.map +1 -1
- package/dist/src/constants.d.ts +7 -2
- package/dist/src/constants.js +7 -2
- package/dist/src/constants.js.map +1 -1
- package/dist/src/eval/manifest-v1.d.ts +68 -0
- package/dist/src/eval/manifest-v1.js +353 -0
- package/dist/src/eval/manifest-v1.js.map +1 -0
- package/dist/src/generators/local-plugin.d.ts +5 -1
- package/dist/src/generators/local-plugin.js +261 -109
- package/dist/src/generators/local-plugin.js.map +1 -1
- package/dist/src/generators/permissions.d.ts +5 -2
- package/dist/src/generators/permissions.js +28 -15
- package/dist/src/generators/permissions.js.map +1 -1
- package/dist/src/index.d.ts +10 -4
- package/dist/src/index.js +1774 -609
- package/dist/src/index.js.map +1 -1
- package/dist/src/output/command-receipt.d.ts +47 -46
- package/dist/src/output/command-receipt.js +277 -79
- package/dist/src/output/command-receipt.js.map +1 -1
- package/dist/src/output/model.d.ts +3 -44
- package/dist/src/output/model.js +1 -144
- package/dist/src/output/model.js.map +1 -1
- package/dist/src/output/rebuild-progress.js +15 -13
- package/dist/src/output/rebuild-progress.js.map +1 -1
- package/dist/src/portable/commands.d.ts +46 -7
- package/dist/src/portable/commands.js +349 -37
- package/dist/src/portable/commands.js.map +1 -1
- package/dist/src/portable/materializer.d.ts +17 -4
- package/dist/src/portable/materializer.js +186 -41
- package/dist/src/portable/materializer.js.map +1 -1
- package/dist/src/portable/skills-cli.d.ts +15 -7
- package/dist/src/portable/skills-cli.js +74 -20
- package/dist/src/portable/skills-cli.js.map +1 -1
- package/dist/src/review/eval-source-input.d.ts +43 -0
- package/dist/src/review/eval-source-input.js +207 -0
- package/dist/src/review/eval-source-input.js.map +1 -0
- package/dist/src/review/review-profile.d.ts +17 -0
- package/dist/src/review/review-profile.js +234 -0
- package/dist/src/review/review-profile.js.map +1 -0
- package/dist/src/review/review-selection.d.ts +30 -0
- package/dist/src/review/review-selection.js +527 -0
- package/dist/src/review/review-selection.js.map +1 -0
- package/dist/src/review/review-types.d.ts +68 -0
- package/dist/src/review/review-types.js +16 -0
- package/dist/src/review/review-types.js.map +1 -0
- package/dist/src/review/skill-materialization.d.ts +26 -0
- package/dist/src/review/skill-materialization.js +217 -0
- package/dist/src/review/skill-materialization.js.map +1 -0
- package/dist/src/review/source-binding.d.ts +183 -0
- package/dist/src/review/source-binding.js +708 -0
- package/dist/src/review/source-binding.js.map +1 -0
- package/dist/src/tui/catalog-freshness.d.ts +1 -0
- package/dist/src/tui/catalog-freshness.js +2 -0
- package/dist/src/tui/catalog-freshness.js.map +1 -0
- package/dist/src/tui/catalog-generation.d.ts +21 -0
- package/dist/src/tui/catalog-generation.js +156 -0
- package/dist/src/tui/catalog-generation.js.map +1 -0
- package/dist/src/tui/catalog-sources/projection.d.ts +4 -0
- package/dist/src/tui/catalog-sources/projection.js +17 -0
- package/dist/src/tui/catalog-sources/projection.js.map +1 -0
- package/dist/src/tui/catalog-sources/review.d.ts +3 -0
- package/dist/src/tui/catalog-sources/review.js +13 -0
- package/dist/src/tui/catalog-sources/review.js.map +1 -0
- package/dist/src/tui/catalog-sources/screens.d.ts +12 -0
- package/dist/src/tui/catalog-sources/screens.js +40 -0
- package/dist/src/tui/catalog-sources/screens.js.map +1 -0
- package/dist/src/tui/catalog-sources/session.d.ts +32 -0
- package/dist/src/tui/catalog-sources/session.js +300 -0
- package/dist/src/tui/catalog-sources/session.js.map +1 -0
- package/dist/src/tui/catalog-sources/types.d.ts +54 -0
- package/dist/src/tui/catalog-sources/types.js +2 -0
- package/dist/src/tui/catalog-sources/types.js.map +1 -0
- package/dist/src/tui/catalog-store-task.d.ts +16 -0
- package/dist/src/tui/catalog-store-task.js +19 -0
- package/dist/src/tui/catalog-store-task.js.map +1 -0
- package/dist/src/tui/clipboard.d.ts +13 -0
- package/dist/src/tui/clipboard.js +95 -0
- package/dist/src/tui/clipboard.js.map +1 -0
- package/dist/src/tui/components.d.ts +110 -3
- package/dist/src/tui/components.js +183 -36
- package/dist/src/tui/components.js.map +1 -1
- package/dist/src/tui/config-array-draft.d.ts +29 -0
- package/dist/src/tui/config-array-draft.js +48 -0
- package/dist/src/tui/config-array-draft.js.map +1 -0
- package/dist/src/tui/config-leaf-editor.d.ts +19 -0
- package/dist/src/tui/config-leaf-editor.js +212 -0
- package/dist/src/tui/config-leaf-editor.js.map +1 -0
- package/dist/src/tui/config-references.d.ts +34 -0
- package/dist/src/tui/config-references.js +70 -0
- package/dist/src/tui/config-references.js.map +1 -0
- package/dist/src/tui/config-value-presentation.d.ts +20 -0
- package/dist/src/tui/config-value-presentation.js +104 -0
- package/dist/src/tui/config-value-presentation.js.map +1 -0
- package/dist/src/tui/console-app-v4.d.ts +14 -4
- package/dist/src/tui/console-app-v4.js +9205 -1951
- package/dist/src/tui/console-app-v4.js.map +1 -1
- package/dist/src/tui/content-item-card.d.ts +13 -0
- package/dist/src/tui/content-item-card.js +51 -0
- package/dist/src/tui/content-item-card.js.map +1 -0
- package/dist/src/tui/controller-runtime.d.ts +10 -2
- package/dist/src/tui/controller-runtime.js +3289 -388
- package/dist/src/tui/controller-runtime.js.map +1 -1
- package/dist/src/tui/controller.d.ts +622 -45
- package/dist/src/tui/controller.js +3589 -768
- package/dist/src/tui/controller.js.map +1 -1
- package/dist/src/tui/dependency-graph-view.d.ts +39 -0
- package/dist/src/tui/dependency-graph-view.js +121 -0
- package/dist/src/tui/dependency-graph-view.js.map +1 -0
- package/dist/src/tui/dependency-graph.d.ts +81 -0
- package/dist/src/tui/dependency-graph.js +452 -0
- package/dist/src/tui/dependency-graph.js.map +1 -0
- package/dist/src/tui/diagnostic-projection.d.ts +23 -0
- package/dist/src/tui/diagnostic-projection.js +595 -0
- package/dist/src/tui/diagnostic-projection.js.map +1 -0
- package/dist/src/tui/diagnostics.d.ts +3 -3
- package/dist/src/tui/diagnostics.js +14 -2
- package/dist/src/tui/diagnostics.js.map +1 -1
- package/dist/src/tui/entity-cards.d.ts +55 -0
- package/dist/src/tui/entity-cards.js +220 -0
- package/dist/src/tui/entity-cards.js.map +1 -0
- package/dist/src/tui/glossary.d.ts +23 -0
- package/dist/src/tui/glossary.js +42 -0
- package/dist/src/tui/glossary.js.map +1 -0
- package/dist/src/tui/index.d.ts +6 -1
- package/dist/src/tui/index.js +5 -1
- package/dist/src/tui/index.js.map +1 -1
- package/dist/src/tui/input-display.d.ts +9 -0
- package/dist/src/tui/input-display.js +58 -0
- package/dist/src/tui/input-display.js.map +1 -0
- package/dist/src/tui/keys.d.ts +44 -0
- package/dist/src/tui/keys.js +43 -15
- package/dist/src/tui/keys.js.map +1 -1
- package/dist/src/tui/lifecycle-action-view.d.ts +6 -0
- package/dist/src/tui/lifecycle-action-view.js +36 -0
- package/dist/src/tui/lifecycle-action-view.js.map +1 -0
- package/dist/src/tui/model.d.ts +224 -31
- package/dist/src/tui/model.js +1510 -397
- package/dist/src/tui/model.js.map +1 -1
- package/dist/src/tui/operation-diagnostic-screens.d.ts +8 -0
- package/dist/src/tui/operation-diagnostic-screens.js +71 -0
- package/dist/src/tui/operation-diagnostic-screens.js.map +1 -0
- package/dist/src/tui/operation-history.d.ts +81 -0
- package/dist/src/tui/operation-history.js +136 -0
- package/dist/src/tui/operation-history.js.map +1 -0
- package/dist/src/tui/operation-review-planner.d.ts +21 -0
- package/dist/src/tui/operation-review-planner.js +1392 -0
- package/dist/src/tui/operation-review-planner.js.map +1 -0
- package/dist/src/tui/plugin-content.d.ts +31 -0
- package/dist/src/tui/plugin-content.js +680 -0
- package/dist/src/tui/plugin-content.js.map +1 -0
- package/dist/src/tui/plugin-detail.d.ts +52 -0
- package/dist/src/tui/plugin-detail.js +165 -0
- package/dist/src/tui/plugin-detail.js.map +1 -0
- package/dist/src/tui/plugin-write-task.d.ts +69 -0
- package/dist/src/tui/plugin-write-task.js +286 -0
- package/dist/src/tui/plugin-write-task.js.map +1 -0
- package/dist/src/tui/project-inventory.d.ts +68 -0
- package/dist/src/tui/project-inventory.js +203 -0
- package/dist/src/tui/project-inventory.js.map +1 -0
- package/dist/src/tui/prompt.js +4 -15
- package/dist/src/tui/prompt.js.map +1 -1
- package/dist/src/tui/query-header.d.ts +30 -0
- package/dist/src/tui/query-header.js +40 -0
- package/dist/src/tui/query-header.js.map +1 -0
- package/dist/src/tui/reader.d.ts +37 -0
- package/dist/src/tui/reader.js +47 -0
- package/dist/src/tui/reader.js.map +1 -0
- package/dist/src/tui/router.d.ts +197 -10
- package/dist/src/tui/router.js +338 -50
- package/dist/src/tui/router.js.map +1 -1
- package/dist/src/tui/screen-registry.d.ts +701 -0
- package/dist/src/tui/screen-registry.js +230 -0
- package/dist/src/tui/screen-registry.js.map +1 -0
- package/dist/src/tui/session-console-app.d.ts +6 -0
- package/dist/src/tui/session-console-app.js +13 -0
- package/dist/src/tui/session-console-app.js.map +1 -0
- package/dist/src/tui/session-host.d.ts +45 -0
- package/dist/src/tui/session-host.js +209 -0
- package/dist/src/tui/session-host.js.map +1 -0
- package/dist/src/tui/source-detail-card.d.ts +29 -0
- package/dist/src/tui/source-detail-card.js +45 -0
- package/dist/src/tui/source-detail-card.js.map +1 -0
- package/dist/src/tui/source-ref-presets.d.ts +3 -0
- package/dist/src/tui/source-ref-presets.js +11 -0
- package/dist/src/tui/source-ref-presets.js.map +1 -0
- package/dist/src/tui/theme.d.ts +12 -0
- package/dist/src/tui/theme.js +12 -0
- package/dist/src/tui/theme.js.map +1 -1
- package/dist/src/tui/viewport.d.ts +1 -0
- package/dist/src/tui/viewport.js +23 -0
- package/dist/src/tui/viewport.js.map +1 -1
- package/dist/src/tui/views.js +31 -3
- package/dist/src/tui/views.js.map +1 -1
- package/dist/src/tui/wizard.js +37 -13
- package/dist/src/tui/wizard.js.map +1 -1
- package/dist/src/types.d.ts +264 -21
- package/dist/src/types.js +1 -0
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils/agent-version.d.ts +7 -1
- package/dist/src/utils/agent-version.js +36 -7
- package/dist/src/utils/agent-version.js.map +1 -1
- package/dist/src/utils/artifact-plan.d.ts +8 -6
- package/dist/src/utils/artifact-plan.js +67 -13
- package/dist/src/utils/artifact-plan.js.map +1 -1
- package/dist/src/utils/artifact-renderer.d.ts +24 -10
- package/dist/src/utils/artifact-renderer.js +230 -220
- package/dist/src/utils/artifact-renderer.js.map +1 -1
- package/dist/src/utils/artifact-request.d.ts +32 -0
- package/dist/src/utils/artifact-request.js +90 -0
- package/dist/src/utils/artifact-request.js.map +1 -0
- package/dist/src/utils/artifact-sources.d.ts +4 -0
- package/dist/src/utils/artifact-sources.js +17 -0
- package/dist/src/utils/artifact-sources.js.map +1 -1
- package/dist/src/utils/aw-home-mutation-lock.d.ts +1 -0
- package/dist/src/utils/aw-home-mutation-lock.js +32 -4
- package/dist/src/utils/aw-home-mutation-lock.js.map +1 -1
- package/dist/src/utils/bundle-integrity.d.ts +0 -1
- package/dist/src/utils/bundle-integrity.js +0 -25
- package/dist/src/utils/bundle-integrity.js.map +1 -1
- package/dist/src/utils/bundle-layout.js +29 -29
- package/dist/src/utils/bundle-layout.js.map +1 -1
- package/dist/src/utils/catalog-capability-projection.d.ts +8 -0
- package/dist/src/utils/catalog-capability-projection.js +14 -0
- package/dist/src/utils/catalog-capability-projection.js.map +1 -0
- package/dist/src/utils/catalog-digests.d.ts +10 -0
- package/dist/src/utils/catalog-digests.js +57 -20
- package/dist/src/utils/catalog-digests.js.map +1 -1
- package/dist/src/utils/catalog-generation-control-snapshot.d.ts +11 -0
- package/dist/src/utils/catalog-generation-control-snapshot.js +45 -0
- package/dist/src/utils/catalog-generation-control-snapshot.js.map +1 -0
- package/dist/src/utils/catalog-generation-error.d.ts +16 -0
- package/dist/src/utils/catalog-generation-error.js +30 -0
- package/dist/src/utils/catalog-generation-error.js.map +1 -0
- package/dist/src/utils/catalog-generation-resolver.d.ts +44 -0
- package/dist/src/utils/catalog-generation-resolver.js +273 -0
- package/dist/src/utils/catalog-generation-resolver.js.map +1 -0
- package/dist/src/utils/catalog-generation-service.d.ts +172 -0
- package/dist/src/utils/catalog-generation-service.js +1271 -0
- package/dist/src/utils/catalog-generation-service.js.map +1 -0
- package/dist/src/utils/catalog-generation-state.d.ts +22 -0
- package/dist/src/utils/catalog-generation-state.js +192 -0
- package/dist/src/utils/catalog-generation-state.js.map +1 -0
- package/dist/src/utils/catalog-generation-store.d.ts +58 -0
- package/dist/src/utils/catalog-generation-store.js +452 -0
- package/dist/src/utils/catalog-generation-store.js.map +1 -0
- package/dist/src/utils/catalog-manifest-v7.d.ts +5 -0
- package/dist/src/utils/{catalog-manifest-v4.js → catalog-manifest-v7.js} +35 -43
- package/dist/src/utils/catalog-manifest-v7.js.map +1 -0
- package/dist/src/utils/catalog-operation-context.d.ts +20 -0
- package/dist/src/utils/catalog-operation-context.js +142 -0
- package/dist/src/utils/catalog-operation-context.js.map +1 -0
- package/dist/src/utils/catalog-public-error.d.ts +7 -3
- package/dist/src/utils/catalog-public-error.js +28 -8
- package/dist/src/utils/catalog-public-error.js.map +1 -1
- package/dist/src/utils/catalog-runtime-projection.d.ts +3 -0
- package/dist/src/utils/catalog-runtime-projection.js +5 -40
- package/dist/src/utils/catalog-runtime-projection.js.map +1 -1
- package/dist/src/utils/catalog-snapshot.d.ts +5 -3
- package/dist/src/utils/catalog-snapshot.js +11 -3
- package/dist/src/utils/catalog-snapshot.js.map +1 -1
- package/dist/src/utils/catalog-source-identity.d.ts +1 -0
- package/dist/src/utils/catalog-source-identity.js +21 -2
- package/dist/src/utils/catalog-source-identity.js.map +1 -1
- package/dist/src/utils/catalog-source-impact.d.ts +21 -0
- package/dist/src/utils/catalog-source-impact.js +344 -0
- package/dist/src/utils/catalog-source-impact.js.map +1 -0
- package/dist/src/utils/catalog-source-references.d.ts +3 -2
- package/dist/src/utils/catalog-source-references.js +195 -347
- package/dist/src/utils/catalog-source-references.js.map +1 -1
- package/dist/src/utils/catalog-sources.d.ts +15 -1
- package/dist/src/utils/catalog-sources.js +206 -27
- package/dist/src/utils/catalog-sources.js.map +1 -1
- package/dist/src/utils/claude-skills-root.d.ts +8 -0
- package/dist/src/utils/claude-skills-root.js +76 -0
- package/dist/src/utils/claude-skills-root.js.map +1 -0
- package/dist/src/utils/codex-config.d.ts +2 -0
- package/dist/src/utils/codex-config.js +26 -5
- package/dist/src/utils/codex-config.js.map +1 -1
- package/dist/src/utils/codex-manager.d.ts +79 -0
- package/dist/src/utils/codex-manager.js +735 -0
- package/dist/src/utils/codex-manager.js.map +1 -0
- package/dist/src/utils/codex-marketplace-path.d.ts +5 -0
- package/dist/src/utils/codex-marketplace-path.js +45 -0
- package/dist/src/utils/codex-marketplace-path.js.map +1 -0
- package/dist/src/utils/codex-native-observation.d.ts +49 -0
- package/dist/src/utils/codex-native-observation.js +154 -0
- package/dist/src/utils/codex-native-observation.js.map +1 -0
- package/dist/src/utils/codex-native-render-receipt.d.ts +40 -0
- package/dist/src/utils/codex-native-render-receipt.js +205 -0
- package/dist/src/utils/codex-native-render-receipt.js.map +1 -0
- package/dist/src/utils/codex-reconciler.d.ts +126 -0
- package/dist/src/utils/codex-reconciler.js +298 -0
- package/dist/src/utils/codex-reconciler.js.map +1 -0
- package/dist/src/utils/codex-shared-native.d.ts +43 -0
- package/dist/src/utils/codex-shared-native.js +81 -0
- package/dist/src/utils/codex-shared-native.js.map +1 -0
- package/dist/src/utils/codex-skill-staging.d.ts +2 -0
- package/dist/src/utils/codex-skill-staging.js.map +1 -1
- package/dist/src/utils/codex-skills-root.d.ts +4 -0
- package/dist/src/utils/codex-skills-root.js +25 -0
- package/dist/src/utils/codex-skills-root.js.map +1 -0
- package/dist/src/utils/codex-surface-analysis.d.ts +46 -0
- package/dist/src/utils/codex-surface-analysis.js +247 -0
- package/dist/src/utils/codex-surface-analysis.js.map +1 -0
- package/dist/src/utils/dynamic-skill-tree.d.ts +5 -0
- package/dist/src/utils/dynamic-skill-tree.js +56 -7
- package/dist/src/utils/dynamic-skill-tree.js.map +1 -1
- package/dist/src/utils/git-catalog-provider.d.ts +16 -0
- package/dist/src/utils/git-catalog-provider.js +177 -145
- package/dist/src/utils/git-catalog-provider.js.map +1 -1
- package/dist/src/utils/local-marketplace.d.ts +27 -1
- package/dist/src/utils/local-marketplace.js +434 -84
- package/dist/src/utils/local-marketplace.js.map +1 -1
- package/dist/src/utils/managed-command-closure.d.ts +3 -0
- package/dist/src/utils/managed-command-closure.js +35 -0
- package/dist/src/utils/managed-command-closure.js.map +1 -0
- package/dist/src/utils/managed-command-evidence.d.ts +7 -0
- package/dist/src/utils/managed-command-evidence.js +86 -0
- package/dist/src/utils/managed-command-evidence.js.map +1 -0
- package/dist/src/utils/managed-command-materialization.d.ts +115 -0
- package/dist/src/utils/managed-command-materialization.js +359 -0
- package/dist/src/utils/managed-command-materialization.js.map +1 -0
- package/dist/src/utils/managed-command-runtime.d.ts +33 -0
- package/dist/src/utils/managed-command-runtime.js +121 -0
- package/dist/src/utils/managed-command-runtime.js.map +1 -0
- package/dist/src/utils/managed-command-store.d.ts +128 -0
- package/dist/src/utils/managed-command-store.js +589 -0
- package/dist/src/utils/managed-command-store.js.map +1 -0
- package/dist/src/utils/manifest.d.ts +1 -3
- package/dist/src/utils/manifest.js +1 -3
- package/dist/src/utils/manifest.js.map +1 -1
- package/dist/src/utils/multi-source-catalog.d.ts +3 -9
- package/dist/src/utils/multi-source-catalog.js +54 -110
- package/dist/src/utils/multi-source-catalog.js.map +1 -1
- package/dist/src/utils/native-cli.d.ts +61 -7
- package/dist/src/utils/native-cli.js +426 -58
- package/dist/src/utils/native-cli.js.map +1 -1
- package/dist/src/utils/native-tool-context.d.ts +14 -0
- package/dist/src/utils/native-tool-context.js +38 -0
- package/dist/src/utils/native-tool-context.js.map +1 -0
- package/dist/src/utils/native-tool-review.d.ts +21 -0
- package/dist/src/utils/native-tool-review.js +102 -0
- package/dist/src/utils/native-tool-review.js.map +1 -0
- package/dist/src/utils/orphan-marketplace-cleanup.js +0 -4
- package/dist/src/utils/orphan-marketplace-cleanup.js.map +1 -1
- package/dist/src/utils/ownership.d.ts +88 -20
- package/dist/src/utils/ownership.js +185 -223
- package/dist/src/utils/ownership.js.map +1 -1
- package/dist/src/utils/path-catalog-provider.d.ts +1 -1
- package/dist/src/utils/path-catalog-provider.js +54 -65
- package/dist/src/utils/path-catalog-provider.js.map +1 -1
- package/dist/src/utils/paths.d.ts +0 -1
- package/dist/src/utils/paths.js +0 -1
- package/dist/src/utils/paths.js.map +1 -1
- package/dist/src/utils/plugin-config-impact.d.ts +40 -0
- package/dist/src/utils/plugin-config-impact.js +373 -0
- package/dist/src/utils/plugin-config-impact.js.map +1 -0
- package/dist/src/utils/plugin-config-write.d.ts +52 -27
- package/dist/src/utils/plugin-config-write.js +1112 -298
- package/dist/src/utils/plugin-config-write.js.map +1 -1
- package/dist/src/utils/plugin-config.d.ts +153 -93
- package/dist/src/utils/plugin-config.js +1116 -968
- package/dist/src/utils/plugin-config.js.map +1 -1
- package/dist/src/utils/plugin-intent-state.d.ts +49 -0
- package/dist/src/utils/plugin-intent-state.js +320 -0
- package/dist/src/utils/plugin-intent-state.js.map +1 -0
- package/dist/src/utils/plugin-scripts.d.ts +66 -125
- package/dist/src/utils/plugin-scripts.js +518 -526
- package/dist/src/utils/plugin-scripts.js.map +1 -1
- package/dist/src/utils/process-lock.js +14 -5
- package/dist/src/utils/process-lock.js.map +1 -1
- package/dist/src/utils/process-tree.d.ts +2 -2
- package/dist/src/utils/process-tree.js +1 -1
- package/dist/src/utils/process-tree.js.map +1 -1
- package/dist/src/utils/project-boundary.d.ts +11 -13
- package/dist/src/utils/project-boundary.js +28 -34
- package/dist/src/utils/project-boundary.js.map +1 -1
- package/dist/src/utils/rendered-contract.js +18 -1
- package/dist/src/utils/rendered-contract.js.map +1 -1
- package/dist/src/utils/runtime-config.d.ts +20 -0
- package/dist/src/utils/runtime-config.js +75 -0
- package/dist/src/utils/runtime-config.js.map +1 -0
- package/dist/src/utils/runtime-skill-closure.js +47 -6
- package/dist/src/utils/runtime-skill-closure.js.map +1 -1
- package/dist/src/utils/safe-fs.d.ts +21 -0
- package/dist/src/utils/safe-fs.js +111 -0
- package/dist/src/utils/safe-fs.js.map +1 -0
- package/dist/src/utils/safe-operation-diagnostic.d.ts +15 -0
- package/dist/src/utils/safe-operation-diagnostic.js +33 -0
- package/dist/src/utils/safe-operation-diagnostic.js.map +1 -0
- package/dist/src/utils/sensitive-content.d.ts +4 -0
- package/dist/src/utils/sensitive-content.js +36 -0
- package/dist/src/utils/sensitive-content.js.map +1 -0
- package/dist/src/utils/state-paths.js +7 -2
- package/dist/src/utils/state-paths.js.map +1 -1
- package/dist/src/utils/target-eligibility.d.ts +8 -2
- package/dist/src/utils/target-eligibility.js +17 -8
- package/dist/src/utils/target-eligibility.js.map +1 -1
- package/dist/src/utils/windows-claude-shim.d.ts +7 -0
- package/dist/src/utils/windows-claude-shim.js +10 -0
- package/dist/src/utils/windows-claude-shim.js.map +1 -0
- package/dist/src/utils/windows-npm-shim.d.ts +14 -0
- package/dist/src/utils/windows-npm-shim.js +140 -0
- package/dist/src/utils/windows-npm-shim.js.map +1 -0
- package/dist/vitest.config.js +100 -9
- package/dist/vitest.config.js.map +1 -1
- package/package.json +31 -21
- package/dist/authoring/scripts/check-plugin-versions.d.mts +0 -2
- package/dist/authoring/scripts/check-plugin-versions.mjs +0 -5
- package/dist/authoring/scripts/check-plugin-versions.mjs.map +0 -1
- package/dist/scripts/aw-skill-eval-engine.d.ts +0 -13
- package/dist/scripts/aw-skill-eval-engine.js +0 -31
- package/dist/scripts/aw-skill-eval-engine.js.map +0 -1
- package/dist/scripts/codex-eval-app-server.d.ts +0 -89
- package/dist/scripts/codex-eval-app-server.js +0 -1228
- package/dist/scripts/codex-eval-app-server.js.map +0 -1
- package/dist/scripts/codex-eval-isolation.d.ts +0 -61
- package/dist/scripts/codex-eval-isolation.js +0 -318
- package/dist/scripts/codex-eval-isolation.js.map +0 -1
- package/dist/scripts/codex-eval-process-management.d.ts +0 -8
- package/dist/scripts/codex-eval-process-management.js +0 -69
- package/dist/scripts/codex-eval-process-management.js.map +0 -1
- package/dist/scripts/codex-eval-process-tree.d.ts +0 -38
- package/dist/scripts/codex-eval-process-tree.js +0 -803
- package/dist/scripts/codex-eval-process-tree.js.map +0 -1
- package/dist/scripts/codex-eval-runtime-config.d.ts +0 -62
- package/dist/scripts/codex-eval-runtime-config.js +0 -843
- package/dist/scripts/codex-eval-runtime-config.js.map +0 -1
- package/dist/scripts/codex-trigger-eval.d.ts +0 -84
- package/dist/scripts/codex-trigger-eval.js +0 -968
- package/dist/scripts/codex-trigger-eval.js.map +0 -1
- package/dist/scripts/eval-plugin-skills-audited.d.ts +0 -6
- package/dist/scripts/eval-plugin-skills-audited.js +0 -261
- package/dist/scripts/eval-plugin-skills-audited.js.map +0 -1
- package/dist/scripts/eval-plugin-skills.d.ts +0 -45
- package/dist/scripts/eval-plugin-skills.js +0 -1586
- package/dist/scripts/eval-plugin-skills.js.map +0 -1
- package/dist/scripts/eval-run-layout.d.ts +0 -17
- package/dist/scripts/eval-run-layout.js +0 -26
- package/dist/scripts/eval-run-layout.js.map +0 -1
- package/dist/scripts/plugin-eval-contract.d.ts +0 -185
- package/dist/scripts/plugin-eval-contract.js +0 -695
- package/dist/scripts/plugin-eval-contract.js.map +0 -1
- package/dist/scripts/plugin-eval-materializer.d.ts +0 -13
- package/dist/scripts/plugin-eval-materializer.js +0 -421
- package/dist/scripts/plugin-eval-materializer.js.map +0 -1
- package/dist/scripts/skill-reporting.d.ts +0 -212
- package/dist/scripts/skill-reporting.js +0 -922
- package/dist/scripts/skill-reporting.js.map +0 -1
- package/dist/src/commands/review-publication.d.ts +0 -99
- package/dist/src/commands/review-publication.js +0 -904
- package/dist/src/commands/review-publication.js.map +0 -1
- package/dist/src/commands/status-v4.d.ts +0 -123
- package/dist/src/commands/status-v4.js +0 -905
- package/dist/src/commands/status-v4.js.map +0 -1
- package/dist/src/commands/status.d.ts +0 -93
- package/dist/src/commands/status.js +0 -442
- package/dist/src/commands/status.js.map +0 -1
- package/dist/src/utils/active-marketplace-runtime-lock.d.ts +0 -12
- package/dist/src/utils/active-marketplace-runtime-lock.js +0 -133
- package/dist/src/utils/active-marketplace-runtime-lock.js.map +0 -1
- package/dist/src/utils/catalog-manifest-v3.d.ts +0 -2
- package/dist/src/utils/catalog-manifest-v3.js +0 -3
- package/dist/src/utils/catalog-manifest-v3.js.map +0 -1
- package/dist/src/utils/catalog-manifest-v4.d.ts +0 -5
- package/dist/src/utils/catalog-manifest-v4.js.map +0 -1
- package/dist/src/utils/catalog-source-cache.d.ts +0 -62
- package/dist/src/utils/catalog-source-cache.js +0 -296
- package/dist/src/utils/catalog-source-cache.js.map +0 -1
- package/dist/src/utils/codex-project-surface.d.ts +0 -3
- package/dist/src/utils/codex-project-surface.js +0 -49
- package/dist/src/utils/codex-project-surface.js.map +0 -1
- package/dist/src/utils/lifecycle-active-store.d.ts +0 -175
- package/dist/src/utils/lifecycle-active-store.js +0 -1276
- package/dist/src/utils/lifecycle-active-store.js.map +0 -1
- package/dist/src/utils/plugin-release.d.ts +0 -2
- package/dist/src/utils/plugin-release.js +0 -2
- package/dist/src/utils/plugin-release.js.map +0 -1
|
@@ -1,31 +1,25 @@
|
|
|
1
|
-
import { cleanupLegacyCatalogSourceCache } from '../utils/catalog-source-cache.js';
|
|
2
1
|
export interface InitCatalogSourceResult {
|
|
3
2
|
id: string;
|
|
4
3
|
ok: boolean;
|
|
4
|
+
activeReady: boolean;
|
|
5
5
|
requestedRef?: string;
|
|
6
6
|
resolvedCommit?: string;
|
|
7
7
|
catalogVersion?: string;
|
|
8
8
|
channel?: string;
|
|
9
|
-
freshness?: 'remote' | 'cache' | 'path';
|
|
10
9
|
error?: string;
|
|
11
10
|
errorCode?: string;
|
|
11
|
+
recovery?: string;
|
|
12
12
|
}
|
|
13
13
|
export interface InitCommandResult {
|
|
14
14
|
ok: boolean;
|
|
15
|
-
changed: boolean;
|
|
16
|
-
warnings: string[];
|
|
17
15
|
primarySourceId: string;
|
|
18
16
|
configDigest: string;
|
|
19
17
|
compositeDigest: string;
|
|
20
18
|
sources: InitCatalogSourceResult[];
|
|
19
|
+
recovery: string[];
|
|
21
20
|
}
|
|
22
|
-
interface
|
|
23
|
-
force?: boolean;
|
|
24
|
-
cliVersion: string;
|
|
21
|
+
interface InitCommandOptions {
|
|
25
22
|
env?: NodeJS.ProcessEnv;
|
|
26
|
-
runtime?: {
|
|
27
|
-
cleanupLegacyCache?: typeof cleanupLegacyCatalogSourceCache;
|
|
28
|
-
};
|
|
29
23
|
}
|
|
30
|
-
export declare function initCommand(options:
|
|
24
|
+
export declare function initCommand(options: InitCommandOptions): Promise<InitCommandResult>;
|
|
31
25
|
export {};
|
|
@@ -1,63 +1,42 @@
|
|
|
1
1
|
import { readCatalogSourcesConfigSnapshot } from '../utils/catalog-sources.js';
|
|
2
2
|
import { catalogSourceErrorCode } from '../utils/catalog-public-error.js';
|
|
3
|
-
import {
|
|
4
|
-
import { withAwHomeMutationLock } from '../utils/aw-home-mutation-lock.js';
|
|
5
|
-
import { withResolvedMultiSourceCatalog } from '../utils/multi-source-catalog.js';
|
|
3
|
+
import { resolvePartialCatalogOperationContext } from '../utils/catalog-operation-context.js';
|
|
6
4
|
export async function initCommand(options) {
|
|
7
5
|
const env = options.env ?? process.env;
|
|
8
|
-
if (options.force) {
|
|
9
|
-
return withAwHomeMutationLock({
|
|
10
|
-
env,
|
|
11
|
-
action: async () => {
|
|
12
|
-
const cleanupWarnings = await (options.runtime?.cleanupLegacyCache
|
|
13
|
-
?? cleanupLegacyCatalogSourceCache)(env);
|
|
14
|
-
const result = await resolveInitCatalog({ ...options, env });
|
|
15
|
-
return { ...result, warnings: [...cleanupWarnings, ...result.warnings] };
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
return resolveInitCatalog({ ...options, env });
|
|
20
|
-
}
|
|
21
|
-
async function resolveInitCatalog(options) {
|
|
22
|
-
const env = options.env ?? process.env;
|
|
23
|
-
const freshnessPolicy = options.force ? 'forceRemote' : 'requireRemote';
|
|
24
6
|
const configSnapshot = await readCatalogSourcesConfigSnapshot(env);
|
|
25
|
-
|
|
26
|
-
cliVersion: options.cliVersion,
|
|
27
|
-
freshnessPolicy,
|
|
7
|
+
const context = await resolvePartialCatalogOperationContext({
|
|
28
8
|
configSnapshot,
|
|
29
9
|
env,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return {
|
|
34
|
-
id: item.sourceId,
|
|
35
|
-
ok: false,
|
|
36
|
-
error: item.error.message,
|
|
37
|
-
errorCode: catalogSourceErrorCode(item.error),
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
const resolution = item.resolution;
|
|
41
|
-
return {
|
|
42
|
-
id: item.sourceId,
|
|
43
|
-
ok: true,
|
|
44
|
-
requestedRef: resolution.requestedRef,
|
|
45
|
-
resolvedCommit: resolution.resolvedCommit,
|
|
46
|
-
catalogVersion: resolution.manifest.catalogVersion,
|
|
47
|
-
channel: resolution.manifest.channel,
|
|
48
|
-
freshness: resolution.source,
|
|
49
|
-
};
|
|
50
|
-
});
|
|
10
|
+
});
|
|
11
|
+
const sources = context.catalog.sources.map((item) => {
|
|
12
|
+
if (item.error) {
|
|
51
13
|
return {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
sources,
|
|
14
|
+
id: item.sourceId,
|
|
15
|
+
ok: false,
|
|
16
|
+
activeReady: false,
|
|
17
|
+
error: item.error.message,
|
|
18
|
+
errorCode: catalogSourceErrorCode(item.error),
|
|
19
|
+
recovery: `Run aw catalog source sync ${item.sourceId}.`,
|
|
59
20
|
};
|
|
60
|
-
}
|
|
21
|
+
}
|
|
22
|
+
const resolution = item.resolution;
|
|
23
|
+
return {
|
|
24
|
+
id: item.sourceId,
|
|
25
|
+
ok: true,
|
|
26
|
+
activeReady: true,
|
|
27
|
+
requestedRef: resolution.requestedRef,
|
|
28
|
+
resolvedCommit: resolution.resolvedCommit,
|
|
29
|
+
catalogVersion: resolution.manifest.catalogVersion,
|
|
30
|
+
channel: resolution.manifest.channel,
|
|
31
|
+
};
|
|
61
32
|
});
|
|
33
|
+
return {
|
|
34
|
+
ok: sources.every((source) => source.ok),
|
|
35
|
+
primarySourceId: context.catalog.primarySourceId,
|
|
36
|
+
configDigest: context.catalog.configDigest,
|
|
37
|
+
compositeDigest: context.catalog.compositeDigest,
|
|
38
|
+
sources,
|
|
39
|
+
recovery: sources.flatMap((source) => source.recovery ? [source.recovery] : []),
|
|
40
|
+
};
|
|
62
41
|
}
|
|
63
42
|
//# sourceMappingURL=init.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/commands/init.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,qCAAqC,EAAE,MAAM,uCAAuC,CAAC;AA4B9F,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,OAA2B;IAE3B,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;IACvC,MAAM,cAAc,GAAG,MAAM,gCAAgC,CAAC,GAAG,CAAC,CAAC;IACnE,MAAM,OAAO,GAAG,MAAM,qCAAqC,CAAC;QAC1D,cAAc;QACd,GAAG;KACJ,CAAC,CAAC;IACH,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAA2B,EAAE;QAC5E,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,EAAE,EAAE,IAAI,CAAC,QAAQ;gBACjB,EAAE,EAAE,KAAK;gBACT,WAAW,EAAE,KAAK;gBAClB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO;gBACzB,SAAS,EAAE,sBAAsB,CAAC,IAAI,CAAC,KAAK,CAAC;gBAC7C,QAAQ,EAAE,8BAA8B,IAAI,CAAC,QAAQ,GAAG;aACzD,CAAC;QACJ,CAAC;QACD,MAAM,UAAU,GAAG,IAAI,CAAC,UAAW,CAAC;QACpC,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,QAAQ;YACjB,EAAE,EAAE,IAAI;YACR,WAAW,EAAE,IAAI;YACjB,YAAY,EAAE,UAAU,CAAC,YAAY;YACrC,cAAc,EAAE,UAAU,CAAC,cAAc;YACzC,cAAc,EAAE,UAAU,CAAC,QAAQ,CAAC,cAAc;YAClD,OAAO,EAAE,UAAU,CAAC,QAAQ,CAAC,OAAO;SACrC,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,OAAO;QACL,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;QACxC,eAAe,EAAE,OAAO,CAAC,OAAO,CAAC,eAAe;QAChD,YAAY,EAAE,OAAO,CAAC,OAAO,CAAC,YAAY;QAC1C,eAAe,EAAE,OAAO,CAAC,OAAO,CAAC,eAAe;QAChD,OAAO;QACP,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KAChF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
import type { CliExecutionContext } from './runtime.js';
|
|
3
|
+
import { type NativeToolChange } from '../utils/native-tool-review.js';
|
|
4
|
+
import { type ManagedCommandDiagnostic, type ManagedCommandPackageView, type ManagedCommandView } from '../utils/managed-command-store.js';
|
|
5
|
+
export interface CommandManagementResult {
|
|
6
|
+
schemaVersion: 1;
|
|
7
|
+
command: 'command.install' | 'command.update' | 'command.remove' | 'command.list' | 'command.show' | 'command.package.sync' | 'command.package.remove';
|
|
8
|
+
ok: boolean;
|
|
9
|
+
overallState: 'completed' | 'partial' | 'failed';
|
|
10
|
+
commands: ManagedCommandView[];
|
|
11
|
+
packages: ManagedCommandPackageView[];
|
|
12
|
+
changes: Array<{
|
|
13
|
+
kind: 'command' | 'package';
|
|
14
|
+
id: string;
|
|
15
|
+
action: 'created' | 'updated' | 'removed' | 'retained';
|
|
16
|
+
}>;
|
|
17
|
+
errors: ManagedCommandDiagnostic[];
|
|
18
|
+
recoveryActions: string[];
|
|
19
|
+
nativeToolChanges?: NativeToolChange[];
|
|
20
|
+
}
|
|
21
|
+
export declare function runManagedCommandCli(args: string[], context: CliExecutionContext, host: {
|
|
22
|
+
cliEntry: string;
|
|
23
|
+
cliVersion: string;
|
|
24
|
+
}): Promise<number>;
|
|
25
|
+
export declare function registerManagedCommandCli(program: Command, context: () => CliExecutionContext, host: {
|
|
26
|
+
cliEntry: string;
|
|
27
|
+
cliVersion: string;
|
|
28
|
+
}, setExitCode: (code: number) => void): void;
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import * as fs from 'node:fs/promises';
|
|
3
|
+
import { getCommandPackageId, isManagedCommandId, materializeNativeToolClosureFiles } from '@lesliechan721/aw-plugin-core/manifest';
|
|
4
|
+
import { withAwHomeMutationLock } from '../utils/aw-home-mutation-lock.js';
|
|
5
|
+
import { withResolvedCatalogPlugin } from '../utils/multi-source-catalog.js';
|
|
6
|
+
import { resolveRepoRoot } from '../utils/state-paths.js';
|
|
7
|
+
import { sanitizeCatalogSourceError } from '../utils/catalog-public-error.js';
|
|
8
|
+
import { describeNativeToolClosure } from '../utils/native-tool-review.js';
|
|
9
|
+
import { managedCommandProducerIdentity, nativeToolsForCommandSets, syncPluginManagedCommandPackage } from '../utils/managed-command-materialization.js';
|
|
10
|
+
import { prepareWindowsJobHelper } from '../utils/process-tree.js';
|
|
11
|
+
import { runManagedCommand } from '../utils/managed-command-runtime.js';
|
|
12
|
+
import { ManagedCommandError, assertUserCommandId, inspectManagedCommand, installUserCommand, listManagedCommandPackages, listManagedCommands, managedCommandDiagnostic, parseManagedCommandLaunch, readManagedCommandPackageOwner, readInstalledCommandProducer, removeManagedCommandPackage, removeUserCommand, updateUserCommand, validateManagedCommandName, } from '../utils/managed-command-store.js';
|
|
13
|
+
const HELP = `Usage:
|
|
14
|
+
aw command install <directory> --name <name> --runner node|executable --entry <relative-file> [--args-json <json>] [--env-json <json>] [--env-from-json <json>] [--cwd caller|resource] [--yes] [--json]
|
|
15
|
+
aw command update <cmdu-id> --from <directory> [--name <name>] [--runner node|executable] [--entry <relative-file>] [--args-json <json>] [--env-json <json>] [--env-from-json <json>] [--cwd caller|resource] [--yes] [--json]
|
|
16
|
+
aw command remove <cmdu-id> [--force] [--yes] [--json]
|
|
17
|
+
aw command list [--json]
|
|
18
|
+
aw command show <command-id> [--json]
|
|
19
|
+
aw command run <command-id> -- <args...>
|
|
20
|
+
aw command package sync <source/plugin> <package-key> --scope user|project [--yes] [--json]
|
|
21
|
+
aw command package remove <source/plugin> <package-key> --scope user|project [--force] [--yes] [--json]
|
|
22
|
+
aw command package remove <pkg-id> [--force] [--yes] [--json]
|
|
23
|
+
`;
|
|
24
|
+
function invalid(message) { throw new ManagedCommandError('invalidArguments', message, true); }
|
|
25
|
+
function parseOptions(args, allowed) {
|
|
26
|
+
const options = {};
|
|
27
|
+
const positionals = [];
|
|
28
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
29
|
+
const token = args[index];
|
|
30
|
+
if (!token.startsWith('-')) {
|
|
31
|
+
positionals.push(token);
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
const equals = token.indexOf('=');
|
|
35
|
+
const name = equals < 0 ? token : token.slice(0, equals);
|
|
36
|
+
if (!allowed.includes(name) || Object.hasOwn(options, name))
|
|
37
|
+
invalid(`Unknown or repeated option: ${name}.`);
|
|
38
|
+
if (['--yes', '--json', '--force'].includes(name)) {
|
|
39
|
+
if (equals >= 0)
|
|
40
|
+
invalid(`${name} does not take a value.`);
|
|
41
|
+
options[name] = true;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
const value = equals < 0 ? args[++index] : token.slice(equals + 1);
|
|
45
|
+
if (value === undefined || (equals < 0 && value.startsWith('--')))
|
|
46
|
+
invalid(`${name} requires a value.`);
|
|
47
|
+
options[name] = value;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return { positionals, options };
|
|
51
|
+
}
|
|
52
|
+
function textOption(options, name, required = false) {
|
|
53
|
+
const value = options[name];
|
|
54
|
+
if (typeof value === 'string')
|
|
55
|
+
return value;
|
|
56
|
+
if (required)
|
|
57
|
+
invalid(`${name} is required.`);
|
|
58
|
+
return undefined;
|
|
59
|
+
}
|
|
60
|
+
function launchOptions(options, required) {
|
|
61
|
+
const output = {};
|
|
62
|
+
for (const key of ['runner', 'entry', 'cwd']) {
|
|
63
|
+
const value = textOption(options, `--${key}`, required && key !== 'cwd');
|
|
64
|
+
if (value !== undefined)
|
|
65
|
+
output[key] = value;
|
|
66
|
+
}
|
|
67
|
+
for (const [option, key] of [['--args-json', 'args'], ['--env-json', 'env'], ['--env-from-json', 'envFrom']]) {
|
|
68
|
+
const value = textOption(options, option);
|
|
69
|
+
if (value !== undefined) {
|
|
70
|
+
try {
|
|
71
|
+
output[key] = JSON.parse(value);
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
invalid(`${option} must contain one complete JSON value.`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
try {
|
|
79
|
+
if (required)
|
|
80
|
+
return parseManagedCommandLaunch(output);
|
|
81
|
+
// Validate the supplied fields without replacing the stored values for omitted fields.
|
|
82
|
+
parseManagedCommandLaunch({ runner: 'node', entry: 'entry.js', ...output });
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
invalid('The supplied launch options are invalid.');
|
|
86
|
+
}
|
|
87
|
+
return output;
|
|
88
|
+
}
|
|
89
|
+
function result(command) {
|
|
90
|
+
return { schemaVersion: 1, command, ok: true, overallState: 'completed', commands: [], packages: [], changes: [], errors: [], recoveryActions: [] };
|
|
91
|
+
}
|
|
92
|
+
function finish(receipt) {
|
|
93
|
+
receipt.errors.push(...receipt.commands.flatMap((command) => command.errors), ...receipt.packages.flatMap((pkg) => pkg.errors));
|
|
94
|
+
receipt.recoveryActions = [...new Set([...receipt.recoveryActions, ...receipt.commands.flatMap((command) => command.recoveryActions), ...receipt.packages.flatMap((pkg) => pkg.recoveryActions)])];
|
|
95
|
+
if (receipt.errors.length > 0 && receipt.overallState === 'completed')
|
|
96
|
+
receipt.overallState = receipt.commands.length || receipt.packages.length || receipt.changes.length ? 'partial' : 'failed';
|
|
97
|
+
receipt.ok = receipt.overallState === 'completed';
|
|
98
|
+
return receipt;
|
|
99
|
+
}
|
|
100
|
+
function render(receipt) {
|
|
101
|
+
const lines = [`${receipt.command}: ${receipt.overallState}`];
|
|
102
|
+
for (const command of receipt.commands)
|
|
103
|
+
lines.push(`${command.id}\t${command.name}\t${command.availability}`, ...(receipt.command === 'command.show' ? [JSON.stringify({ owner: command.owner, resourceRoot: command.resourceRoot, launch: command.launch }, null, 2)] : []));
|
|
104
|
+
for (const change of receipt.nativeToolChanges ?? [])
|
|
105
|
+
for (const phase of ['before', 'after'])
|
|
106
|
+
if (change[phase])
|
|
107
|
+
lines.push(...describeNativeToolClosure(change[phase]).map((description) => `原生工具 ${change.producer.sourceId}/${change.producer.pluginName} ${phase}: ${description}`));
|
|
108
|
+
for (const pkg of receipt.packages)
|
|
109
|
+
lines.push(`${pkg.id}\t${pkg.producer.sourceId}/${pkg.producer.pluginName}/${pkg.producer.key}\t${pkg.availability}`);
|
|
110
|
+
for (const change of receipt.changes)
|
|
111
|
+
lines.push(`${change.action}\t${change.id}`);
|
|
112
|
+
for (const error of receipt.errors)
|
|
113
|
+
lines.push(`${error.code}: ${error.message}`);
|
|
114
|
+
for (const action of receipt.recoveryActions)
|
|
115
|
+
lines.push(`Recovery: ${action}`);
|
|
116
|
+
return `${lines.join('\n')}\n`;
|
|
117
|
+
}
|
|
118
|
+
async function confirm(context, options, message) {
|
|
119
|
+
if (options['--yes'])
|
|
120
|
+
return;
|
|
121
|
+
if (!context.interactive || !context.prompt.confirm)
|
|
122
|
+
invalid('This write requires --yes in non-interactive mode.');
|
|
123
|
+
const response = await context.prompt.confirm({ message, defaultValue: false });
|
|
124
|
+
if (response.cancelled || response.value !== true)
|
|
125
|
+
invalid('The managed command write was not confirmed.');
|
|
126
|
+
}
|
|
127
|
+
export async function runManagedCommandCli(args, context, host) {
|
|
128
|
+
if (args.length === 0 || args.includes('--help') || args.includes('-h')) {
|
|
129
|
+
// Target arguments belong to the child, including --help.
|
|
130
|
+
const delimiter = args[0] === 'run' ? args.indexOf('--') : -1;
|
|
131
|
+
const helpBeforeDelimiter = delimiter < 0 || args.slice(0, delimiter).some((arg) => arg === '--help' || arg === '-h');
|
|
132
|
+
if (helpBeforeDelimiter) {
|
|
133
|
+
context.io.stdout(HELP);
|
|
134
|
+
return 0;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
if (args[0] === 'run') {
|
|
138
|
+
try {
|
|
139
|
+
if (args[2] !== '--' || !args[1] || !isManagedCommandId(args[1]))
|
|
140
|
+
invalid('Usage: aw command run <command-id> -- <args...>');
|
|
141
|
+
return await runManagedCommand({ id: args[1], args: args.slice(3), cwd: context.cwd, env: context.env, cliEntry: host.cliEntry });
|
|
142
|
+
}
|
|
143
|
+
catch (error) {
|
|
144
|
+
const diagnostic = managedCommandDiagnostic(error);
|
|
145
|
+
context.io.stderr(`aw: ${diagnostic.code}: ${diagnostic.message}\n`);
|
|
146
|
+
return error instanceof ManagedCommandError && error.argumentError ? 2 : 1;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
const action = args[0] === 'package' ? `package.${args[1] ?? ''}` : args[0] ?? '';
|
|
150
|
+
const known = ['install', 'update', 'remove', 'list', 'show', 'package.sync', 'package.remove'];
|
|
151
|
+
const command = (known.includes(action) ? `command.${action}` : 'command.list');
|
|
152
|
+
const receipt = result(command);
|
|
153
|
+
let exitCode = 0;
|
|
154
|
+
try {
|
|
155
|
+
if (!known.includes(action))
|
|
156
|
+
invalid('An install, update, remove, list, show, run, or package command is required.');
|
|
157
|
+
const launchFlags = ['--runner', '--entry', '--args-json', '--env-json', '--env-from-json', '--cwd'];
|
|
158
|
+
const allowed = action === 'install' ? ['--name', ...launchFlags, '--yes', '--json']
|
|
159
|
+
: action === 'update' ? ['--from', '--name', ...launchFlags, '--yes', '--json']
|
|
160
|
+
: action === 'remove' ? ['--force', '--yes', '--json']
|
|
161
|
+
: action.startsWith('package.') ? ['--scope', '--force', '--yes', '--json'].filter((flag) => action === 'package.remove' || flag !== '--force')
|
|
162
|
+
: ['--json'];
|
|
163
|
+
const { positionals, options } = parseOptions(args.slice(action.startsWith('package.') ? 2 : 1), allowed);
|
|
164
|
+
if (action === 'list') {
|
|
165
|
+
if (positionals.length)
|
|
166
|
+
invalid('list does not accept positional arguments.');
|
|
167
|
+
Object.assign(receipt, await listManagedCommands(context.env));
|
|
168
|
+
}
|
|
169
|
+
else if (action === 'show') {
|
|
170
|
+
if (positionals.length !== 1 || !isManagedCommandId(positionals[0]))
|
|
171
|
+
invalid('show requires one canonical command ID.');
|
|
172
|
+
const commandView = await inspectManagedCommand(positionals[0], context.env);
|
|
173
|
+
receipt.commands = [commandView];
|
|
174
|
+
if (commandView.owner.kind === 'plugin' && commandView.owner.producer.kind === 'package') {
|
|
175
|
+
const id = getCommandPackageId(commandView.owner.producer);
|
|
176
|
+
const packages = await listManagedCommandPackages(context.env);
|
|
177
|
+
receipt.packages = packages.packages.filter((pkg) => pkg.id === id);
|
|
178
|
+
receipt.errors.push(...packages.errors.filter((error) => error.subject === `commands/packages/${id}`));
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
// Parse every argument before confirmation and before the mutation lock creates state.
|
|
183
|
+
const launch = action === 'install' || action === 'update' ? launchOptions(options, action === 'install') : undefined;
|
|
184
|
+
if (action === 'install' || action === 'update' || action === 'remove') {
|
|
185
|
+
if (positionals.length !== 1)
|
|
186
|
+
invalid(`${action} requires exactly one positional argument.`);
|
|
187
|
+
if (action !== 'install')
|
|
188
|
+
assertUserCommandId(positionals[0]);
|
|
189
|
+
if (action === 'install' || options['--name'] !== undefined)
|
|
190
|
+
validateManagedCommandName(textOption(options, '--name', action === 'install'));
|
|
191
|
+
if (action === 'update')
|
|
192
|
+
textOption(options, '--from', true);
|
|
193
|
+
}
|
|
194
|
+
const exactPackage = action === 'package.remove' && positionals.length === 1 && /^pkg_[0-9a-f]{64}$/u.test(positionals[0]);
|
|
195
|
+
if (action.startsWith('package.')) {
|
|
196
|
+
if (exactPackage && options['--scope'] !== undefined)
|
|
197
|
+
invalid('Exact package removal does not accept --scope.');
|
|
198
|
+
if (!exactPackage && (positionals.length !== 2 || positionals[0].split('/').length !== 2 || !['user', 'project'].includes(textOption(options, '--scope', true))))
|
|
199
|
+
invalid('Package selection requires source/plugin, package-key, and --scope user|project.');
|
|
200
|
+
}
|
|
201
|
+
let nativeReview;
|
|
202
|
+
const inspectPackageNative = async () => {
|
|
203
|
+
if (!action.startsWith('package.'))
|
|
204
|
+
return undefined;
|
|
205
|
+
if (exactPackage) {
|
|
206
|
+
const owner = await readManagedCommandPackageOwner(positionals[0], context.env);
|
|
207
|
+
const record = await readInstalledCommandProducer(owner.resourceRoot).catch(() => undefined);
|
|
208
|
+
return record?.nativeTools ? { producer: owner.producer, before: record.nativeTools, after: null } : undefined;
|
|
209
|
+
}
|
|
210
|
+
return withResolvedCatalogPlugin({ selector: positionals[0], cliVersion: host.cliVersion, env: context.env, consume: async ({ plugin }) => {
|
|
211
|
+
const scope = textOption(options, '--scope', true);
|
|
212
|
+
const producer = await managedCommandProducerIdentity({ plugin, producer: { kind: 'package', packageKey: positionals[1] }, scope, cwd: context.cwd });
|
|
213
|
+
const owner = await readManagedCommandPackageOwner(getCommandPackageId(producer), context.env).catch(() => undefined);
|
|
214
|
+
const previous = owner ? await readInstalledCommandProducer(owner.resourceRoot).catch(() => undefined) : undefined;
|
|
215
|
+
const sets = (plugin.manifest.managedCommands?.sets ?? []).filter((set) => set.producer.kind === 'package' && set.producer.packageKey === producer.key).map((set) => ({ set: set.set, state: 'present', entries: [] }));
|
|
216
|
+
const closure = action === 'package.sync' ? await nativeToolsForCommandSets(plugin, sets) : undefined;
|
|
217
|
+
const after = closure ? materializeNativeToolClosureFiles(closure).closure : null;
|
|
218
|
+
const before = previous?.nativeTools ?? null;
|
|
219
|
+
return JSON.stringify(before) === JSON.stringify(after) ? undefined : { producer, before, after };
|
|
220
|
+
} });
|
|
221
|
+
};
|
|
222
|
+
nativeReview = await inspectPackageNative();
|
|
223
|
+
const execute = async () => {
|
|
224
|
+
if (JSON.stringify(await inspectPackageNative()) !== JSON.stringify(nativeReview))
|
|
225
|
+
throw new ManagedCommandError('operationReviewStale', 'The native tool impact changed. Review the package operation again.');
|
|
226
|
+
if (nativeReview)
|
|
227
|
+
receipt.nativeToolChanges = [nativeReview];
|
|
228
|
+
if (action === 'install') {
|
|
229
|
+
const id = await installUserCommand({ sourceDirectory: path.resolve(context.cwd, positionals[0]), name: textOption(options, '--name', true), launch: launch, env: context.env });
|
|
230
|
+
receipt.commands = [await inspectManagedCommand(id, context.env)];
|
|
231
|
+
receipt.changes.push({ kind: 'command', id, action: 'created' });
|
|
232
|
+
}
|
|
233
|
+
else if (action === 'update') {
|
|
234
|
+
const id = positionals[0];
|
|
235
|
+
const updated = await updateUserCommand({ id, sourceDirectory: path.resolve(context.cwd, textOption(options, '--from', true)), name: textOption(options, '--name'), launch, env: context.env });
|
|
236
|
+
receipt.errors.push(...updated.errors);
|
|
237
|
+
receipt.recoveryActions.push(...updated.recoveryActions);
|
|
238
|
+
receipt.commands = [await inspectManagedCommand(id, context.env)];
|
|
239
|
+
receipt.changes.push({ kind: 'command', id, action: 'updated' });
|
|
240
|
+
}
|
|
241
|
+
else if (action === 'remove') {
|
|
242
|
+
const id = positionals[0];
|
|
243
|
+
await removeUserCommand(id, context.env);
|
|
244
|
+
receipt.changes.push({ kind: 'command', id, action: 'removed' });
|
|
245
|
+
}
|
|
246
|
+
else if (exactPackage) {
|
|
247
|
+
const id = positionals[0];
|
|
248
|
+
const removed = await removeManagedCommandPackage(id, context.env);
|
|
249
|
+
receipt.changes.push({ kind: 'package', id, action: 'removed' }, ...removed.removedCommandIds.map((commandId) => ({ kind: 'command', id: commandId, action: 'removed' })));
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
await withResolvedCatalogPlugin({ selector: positionals[0], cliVersion: host.cliVersion, env: context.env, consume: async ({ plugin }) => {
|
|
253
|
+
const scope = textOption(options, '--scope', true);
|
|
254
|
+
if (action === 'package.sync') {
|
|
255
|
+
const synced = await syncPluginManagedCommandPackage({ plugin, packageKey: positionals[1], scope, cwd: context.cwd, env: context.env });
|
|
256
|
+
receipt.errors.push(...synced.errors);
|
|
257
|
+
receipt.recoveryActions.push(...synced.recoveryActions);
|
|
258
|
+
if (synced.state !== 'completed')
|
|
259
|
+
receipt.overallState = synced.state;
|
|
260
|
+
receipt.changes.push({ kind: 'package', id: getCommandPackageId(synced.producer), action: 'updated' }, ...synced.commandIds.map((id) => ({ kind: 'command', id, action: 'updated' })), ...synced.removedCommandIds.map((id) => ({ kind: 'command', id, action: 'removed' })));
|
|
261
|
+
for (const id of synced.commandIds)
|
|
262
|
+
receipt.commands.push(await inspectManagedCommand(id, context.env));
|
|
263
|
+
receipt.packages = (await listManagedCommandPackages(context.env)).packages.filter((pkg) => pkg.id === getCommandPackageId(synced.producer));
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
let projectRoot = scope === 'project' ? path.normalize(await fs.realpath(await resolveRepoRoot(context.cwd))) : null;
|
|
267
|
+
if (projectRoot && process.platform === 'win32')
|
|
268
|
+
projectRoot = projectRoot.replace(/^[a-z]:/u, (drive) => drive.toUpperCase());
|
|
269
|
+
const inventory = await listManagedCommandPackages(context.env);
|
|
270
|
+
const candidates = inventory.packages.filter((pkg) => pkg.producer.sourceId === plugin.sourceId && pkg.producer.sourceIdentity === plugin.sourceIdentity && pkg.producer.pluginName === plugin.manifest.name && pkg.producer.key === positionals[1] && pkg.producer.scope === scope && pkg.producer.projectRoot === projectRoot);
|
|
271
|
+
if (candidates.length !== 1)
|
|
272
|
+
throw new ManagedCommandError('commandIdentityConflict', `Package selection did not match exactly one owned package. Candidate IDs: ${candidates.map((pkg) => pkg.id).join(', ') || 'none'}. Use exact package remove.`);
|
|
273
|
+
const id = candidates[0].id;
|
|
274
|
+
const removed = await removeManagedCommandPackage(id, context.env);
|
|
275
|
+
receipt.changes.push({ kind: 'package', id, action: 'removed' }, ...removed.removedCommandIds.map((commandId) => ({ kind: 'command', id: commandId, action: 'removed' })));
|
|
276
|
+
}
|
|
277
|
+
} });
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
let message = `Apply ${command}?`;
|
|
281
|
+
if (exactPackage) {
|
|
282
|
+
const owner = await readManagedCommandPackageOwner(positionals[0], context.env);
|
|
283
|
+
message += ` Producer: ${JSON.stringify(owner.producer)}. All commands in this package will become unavailable.`;
|
|
284
|
+
}
|
|
285
|
+
if (nativeReview)
|
|
286
|
+
for (const phase of ['before', 'after'])
|
|
287
|
+
if (nativeReview[phase])
|
|
288
|
+
message += ` Native ${nativeReview.producer.sourceId}/${nativeReview.producer.pluginName} ${phase}: ${describeNativeToolClosure(nativeReview[phase]).join('; ')}.`;
|
|
289
|
+
await confirm(context, options, message);
|
|
290
|
+
if (process.platform === 'win32' && action === 'package.sync')
|
|
291
|
+
await prepareWindowsJobHelper();
|
|
292
|
+
await withAwHomeMutationLock({ env: context.env, action: execute });
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
catch (error) {
|
|
296
|
+
const safeError = error instanceof ManagedCommandError ? error : sanitizeCatalogSourceError(error, context.env, [context.cwd]);
|
|
297
|
+
receipt.errors.push(error instanceof ManagedCommandError ? managedCommandDiagnostic(error) : { code: safeError.code, message: safeError.message });
|
|
298
|
+
if (!(error instanceof ManagedCommandError && error.argumentError) && receipt.recoveryActions.length === 0) {
|
|
299
|
+
receipt.recoveryActions.push(action === 'install' ? 'Correct the tool directory and retry command install.' : action.startsWith('package.') ? 'Use command list to inspect package IDs, then use package sync or exact package remove.' : 'Use command list to inspect ownership, then update or safely remove the affected user command.');
|
|
300
|
+
}
|
|
301
|
+
receipt.overallState = receipt.changes.length ? 'partial' : 'failed';
|
|
302
|
+
exitCode = error instanceof ManagedCommandError && error.argumentError ? 2 : 1;
|
|
303
|
+
}
|
|
304
|
+
finish(receipt);
|
|
305
|
+
context.io.stdout(args.includes('--json') ? `${JSON.stringify(receipt)}\n` : render(receipt));
|
|
306
|
+
return exitCode || (receipt.ok ? 0 : 1);
|
|
307
|
+
}
|
|
308
|
+
export function registerManagedCommandCli(program, context, host, setExitCode) {
|
|
309
|
+
program.enablePositionalOptions();
|
|
310
|
+
program.command('command [arguments...]').description('Install, inspect, and run managed commands')
|
|
311
|
+
.allowUnknownOption(true).allowExcessArguments(true).passThroughOptions()
|
|
312
|
+
.addHelpText('after', HELP)
|
|
313
|
+
.action(async (args) => { setExitCode(await runManagedCommandCli(args, context(), host)); });
|
|
314
|
+
}
|
|
315
|
+
//# sourceMappingURL=managed-commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"managed-commands.js","sourceRoot":"","sources":["../../../src/commands/managed-commands.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAGvC,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,iCAAiC,EAAsB,MAAM,wCAAwC,CAAC;AAGxJ,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,E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C,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IAC9F,OAAO,QAAQ,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,OAAgB,EAAE,OAAkC,EAAE,IAA8C,EAAE,WAAmC;IACjL,OAAO,CAAC,uBAAuB,EAAE,CAAC;IAClC,OAAO,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC,WAAW,CAAC,4CAA4C,CAAC;SAChG,kBAAkB,CAAC,IAAI,CAAC,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,kBAAkB,EAAE;SACxE,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC;SAC1B,MAAM,CAAC,KAAK,EAAE,IAAc,EAAE,EAAE,GAAG,WAAW,CAAC,MAAM,oBAAoB,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3G,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { PlatformName, Scope } from '../types.js';
|
|
2
|
+
import type { CatalogSourceReferenceInventory } from '../utils/catalog-source-references.js';
|
|
3
|
+
import type { OwnedComponent, OwnerIdentity } from '../utils/ownership.js';
|
|
4
|
+
export interface OfflineCleanupTargetEvidence {
|
|
5
|
+
reason: 'sourceMissing' | 'bundleUnavailable';
|
|
6
|
+
pluginId: string;
|
|
7
|
+
pluginName: string;
|
|
8
|
+
sourceId: string;
|
|
9
|
+
sourceIdentity: string;
|
|
10
|
+
platform: PlatformName;
|
|
11
|
+
scope: Scope;
|
|
12
|
+
plan: OfflineCleanupPlan;
|
|
13
|
+
planDigest: string;
|
|
14
|
+
targetFingerprint: string;
|
|
15
|
+
forceExclusive?: true;
|
|
16
|
+
}
|
|
17
|
+
export interface OfflineCleanupPlanAction {
|
|
18
|
+
action: 'removeOwnedOutput' | 'removeNativeRegistration';
|
|
19
|
+
kind: 'namespacedOwner' | 'namespacedMarketplace' | 'skill-directory' | 'owned-text-file';
|
|
20
|
+
target: string;
|
|
21
|
+
allowedRoot?: string;
|
|
22
|
+
owner?: OwnerIdentity;
|
|
23
|
+
pathEvidence?: string;
|
|
24
|
+
marketplaceName?: string;
|
|
25
|
+
activationScope?: Scope;
|
|
26
|
+
projectKey?: string | null;
|
|
27
|
+
pluginVersion?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function forceOfflineCleanupEvidence(options: {
|
|
30
|
+
reason: OfflineCleanupTargetEvidence['reason'];
|
|
31
|
+
pluginId: string;
|
|
32
|
+
pluginName: string;
|
|
33
|
+
sourceId: string;
|
|
34
|
+
sourceIdentity: string;
|
|
35
|
+
platform: PlatformName;
|
|
36
|
+
scope: Scope;
|
|
37
|
+
components: ReadonlyArray<Extract<OwnedComponent, {
|
|
38
|
+
path: string;
|
|
39
|
+
}>>;
|
|
40
|
+
}): Promise<OfflineCleanupTargetEvidence>;
|
|
41
|
+
export interface OfflineCleanupPlan {
|
|
42
|
+
schemaVersion: 1;
|
|
43
|
+
pluginId: string;
|
|
44
|
+
sourceIdentity: string;
|
|
45
|
+
platform: PlatformName;
|
|
46
|
+
scope: Scope;
|
|
47
|
+
actions: OfflineCleanupPlanAction[];
|
|
48
|
+
}
|
|
49
|
+
export declare function intentOnlyOfflineCleanupEvidence(options: {
|
|
50
|
+
pluginId: string;
|
|
51
|
+
pluginName: string;
|
|
52
|
+
sourceId: string;
|
|
53
|
+
sourceIdentity: string;
|
|
54
|
+
platform: PlatformName;
|
|
55
|
+
scope: Scope;
|
|
56
|
+
}): OfflineCleanupTargetEvidence;
|
|
57
|
+
export declare function offlineCleanupEvidenceFromInventory(options: {
|
|
58
|
+
reason: OfflineCleanupTargetEvidence['reason'];
|
|
59
|
+
pluginId: string;
|
|
60
|
+
pluginName: string;
|
|
61
|
+
sourceId: string;
|
|
62
|
+
sourceIdentity: string;
|
|
63
|
+
platform: PlatformName;
|
|
64
|
+
scope: Scope;
|
|
65
|
+
inventory: CatalogSourceReferenceInventory;
|
|
66
|
+
}): OfflineCleanupTargetEvidence | null;
|
|
67
|
+
export declare function offlineCleanupEvidenceMatches(expected: OfflineCleanupTargetEvidence, actual: OfflineCleanupTargetEvidence): boolean;
|