@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.
- package/dist/authoring/assets/aw-config.d.mts +51 -0
- package/dist/authoring/assets/aw-config.mjs +1025 -0
- package/dist/authoring/assets/aw-config.mjs.map +1 -0
- package/dist/authoring/scripts/add-skill.d.mts +2 -0
- package/dist/authoring/scripts/add-skill.mjs +355 -0
- package/dist/authoring/scripts/add-skill.mjs.map +1 -0
- package/dist/authoring/scripts/init-plugin.d.mts +2 -0
- package/dist/authoring/scripts/init-plugin.mjs +487 -0
- package/dist/authoring/scripts/init-plugin.mjs.map +1 -0
- package/dist/authoring/scripts/lib/javascript-import-scanner.d.mts +4 -0
- package/dist/authoring/scripts/lib/javascript-import-scanner.mjs +261 -0
- package/dist/authoring/scripts/lib/javascript-import-scanner.mjs.map +1 -0
- package/dist/authoring/scripts/lib/plugin-root.d.mts +26 -0
- package/dist/authoring/scripts/lib/plugin-root.mjs +125 -0
- package/dist/authoring/scripts/lib/plugin-root.mjs.map +1 -0
- package/dist/authoring/scripts/lib/plugin-version-check.d.mts +69 -0
- package/dist/authoring/scripts/lib/plugin-version-check.mjs +563 -0
- package/dist/authoring/scripts/lib/plugin-version-check.mjs.map +1 -0
- package/dist/authoring/scripts/lib/semver.d.mts +9 -0
- package/dist/authoring/scripts/lib/semver.mjs +63 -0
- package/dist/authoring/scripts/lib/semver.mjs.map +1 -0
- package/dist/authoring/scripts/lib/skill-scaffold.d.mts +111 -0
- package/dist/authoring/scripts/lib/skill-scaffold.mjs +353 -0
- package/dist/authoring/scripts/lib/skill-scaffold.mjs.map +1 -0
- package/dist/authoring/scripts/plugin-status.d.mts +2 -0
- package/dist/authoring/scripts/plugin-status.mjs +93 -0
- package/dist/authoring/scripts/plugin-status.mjs.map +1 -0
- package/dist/authoring/scripts/remove-plugin.d.mts +2 -0
- package/dist/authoring/scripts/remove-plugin.mjs +367 -0
- package/dist/authoring/scripts/remove-plugin.mjs.map +1 -0
- package/dist/authoring/scripts/validate-plugin.d.mts +2 -0
- package/dist/authoring/scripts/validate-plugin.mjs +3465 -0
- package/dist/authoring/scripts/validate-plugin.mjs.map +1 -0
- package/dist/authoring/scripts/validate-skill.d.mts +2 -0
- package/dist/authoring/scripts/validate-skill.mjs +126 -0
- package/dist/authoring/scripts/validate-skill.mjs.map +1 -0
- package/dist/authoring/templates/aw-config-runtime.d.mts +2 -0
- package/dist/authoring/templates/aw-config-runtime.mjs +407 -0
- package/dist/authoring/templates/aw-config-runtime.mjs.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/scripts/aw-skill-eval-materializer.d.ts +24 -0
- package/dist/scripts/aw-skill-eval-materializer.js +309 -0
- package/dist/scripts/aw-skill-eval-materializer.js.map +1 -0
- package/dist/scripts/bundle-plugins.d.ts +17 -0
- package/dist/scripts/bundle-plugins.js +126 -0
- package/dist/scripts/bundle-plugins.js.map +1 -0
- package/dist/scripts/plugin-staging.d.ts +26 -0
- package/dist/scripts/plugin-staging.js +76 -0
- package/dist/scripts/plugin-staging.js.map +1 -0
- package/dist/scripts/test-plugin-scripts.d.ts +7 -0
- package/dist/scripts/test-plugin-scripts.js +610 -0
- package/dist/scripts/test-plugin-scripts.js.map +1 -0
- package/dist/src/adapters/helpers.d.ts +44 -0
- package/dist/src/adapters/helpers.js +95 -0
- package/dist/src/adapters/helpers.js.map +1 -0
- package/dist/src/authoring/workspace-commands.d.ts +70 -0
- package/dist/src/authoring/workspace-commands.js +158 -0
- package/dist/src/authoring/workspace-commands.js.map +1 -0
- package/dist/src/commands/aw-capabilities.d.ts +78 -0
- package/dist/src/commands/aw-capabilities.js +254 -0
- package/dist/src/commands/aw-capabilities.js.map +1 -0
- package/dist/src/commands/catalog-dev-source.d.ts +120 -0
- package/dist/src/commands/catalog-dev-source.js +434 -0
- package/dist/src/commands/catalog-dev-source.js.map +1 -0
- package/dist/src/commands/catalog-generation.d.ts +16 -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 +138 -0
- package/dist/src/commands/catalog-publication-inspection.js +711 -0
- package/dist/src/commands/catalog-publication-inspection.js.map +1 -0
- package/dist/src/commands/catalog-publication-journal.d.ts +56 -0
- package/dist/src/commands/catalog-publication-journal.js +215 -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 +103 -0
- package/dist/src/commands/catalog-publish.js +804 -0
- package/dist/src/commands/catalog-publish.js.map +1 -0
- package/dist/src/commands/catalog-source.d.ts +134 -0
- package/dist/src/commands/catalog-source.js +377 -0
- package/dist/src/commands/catalog-source.js.map +1 -0
- package/dist/src/commands/catalog-status.d.ts +56 -0
- package/dist/src/commands/catalog-status.js +217 -0
- package/dist/src/commands/catalog-status.js.map +1 -0
- package/dist/src/commands/catalog-store.d.ts +80 -0
- package/dist/src/commands/catalog-store.js +348 -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.d.ts +3 -0
- package/dist/src/commands/console.js +44 -0
- package/dist/src/commands/console.js.map +1 -0
- package/dist/src/commands/dependency-operation-plan.d.ts +58 -0
- package/dist/src/commands/dependency-operation-plan.js +261 -0
- package/dist/src/commands/dependency-operation-plan.js.map +1 -0
- package/dist/src/commands/init.d.ts +25 -0
- package/dist/src/commands/init.js +42 -0
- package/dist/src/commands/init.js.map +1 -0
- package/dist/src/commands/offline-cleanup-evidence.d.ts +59 -0
- package/dist/src/commands/offline-cleanup-evidence.js +163 -0
- package/dist/src/commands/offline-cleanup-evidence.js.map +1 -0
- package/dist/src/commands/operation-plan.d.ts +126 -0
- package/dist/src/commands/operation-plan.js +47 -0
- package/dist/src/commands/operation-plan.js.map +1 -0
- package/dist/src/commands/operation-planner.d.ts +46 -0
- package/dist/src/commands/operation-planner.js +139 -0
- package/dist/src/commands/operation-planner.js.map +1 -0
- package/dist/src/commands/options.d.ts +70 -0
- package/dist/src/commands/options.js +194 -0
- package/dist/src/commands/options.js.map +1 -0
- package/dist/src/commands/plugin-capabilities.d.ts +22 -0
- package/dist/src/commands/plugin-capabilities.js +159 -0
- package/dist/src/commands/plugin-capabilities.js.map +1 -0
- package/dist/src/commands/rebuild-command.d.ts +88 -0
- package/dist/src/commands/rebuild-command.js +3626 -0
- package/dist/src/commands/rebuild-command.js.map +1 -0
- package/dist/src/commands/rebuild-integration.d.ts +190 -0
- package/dist/src/commands/rebuild-integration.js +4439 -0
- package/dist/src/commands/rebuild-integration.js.map +1 -0
- package/dist/src/commands/rebuild-operations.d.ts +100 -0
- package/dist/src/commands/rebuild-operations.js +625 -0
- package/dist/src/commands/rebuild-operations.js.map +1 -0
- package/dist/src/commands/reconcile-operation-plan.d.ts +26 -0
- package/dist/src/commands/reconcile-operation-plan.js +28 -0
- package/dist/src/commands/reconcile-operation-plan.js.map +1 -0
- package/dist/src/commands/review-publication.d.ts +99 -0
- package/dist/src/commands/review-publication.js +904 -0
- package/dist/src/commands/review-publication.js.map +1 -0
- package/dist/src/commands/runtime.d.ts +172 -0
- package/dist/src/commands/runtime.js +720 -0
- package/dist/src/commands/runtime.js.map +1 -0
- package/dist/src/commands/skill-eval.d.ts +33 -0
- package/dist/src/commands/skill-eval.js +363 -0
- package/dist/src/commands/skill-eval.js.map +1 -0
- package/dist/src/commands/status-v6.d.ts +206 -0
- package/dist/src/commands/status-v6.js +2175 -0
- package/dist/src/commands/status-v6.js.map +1 -0
- package/dist/src/commands/sync-command.d.ts +23 -0
- package/dist/src/commands/sync-command.js +242 -0
- package/dist/src/commands/sync-command.js.map +1 -0
- package/dist/src/commands/wizard.d.ts +56 -0
- package/dist/src/commands/wizard.js +58 -0
- package/dist/src/commands/wizard.js.map +1 -0
- package/dist/src/commands/write-commands.d.ts +7 -0
- package/dist/src/commands/write-commands.js +190 -0
- package/dist/src/commands/write-commands.js.map +1 -0
- package/dist/src/constants.d.ts +31 -0
- package/dist/src/constants.js +32 -0
- package/dist/src/constants.js.map +1 -0
- package/dist/src/eval/manifest-v1.d.ts +67 -0
- package/dist/src/eval/manifest-v1.js +347 -0
- package/dist/src/eval/manifest-v1.js.map +1 -0
- package/dist/src/generators/agents.d.ts +3 -0
- package/dist/src/generators/agents.js +46 -0
- package/dist/src/generators/agents.js.map +1 -0
- package/dist/src/generators/hooks.d.ts +15 -0
- package/dist/src/generators/hooks.js +76 -0
- package/dist/src/generators/hooks.js.map +1 -0
- package/dist/src/generators/instructions.d.ts +13 -0
- package/dist/src/generators/instructions.js +66 -0
- package/dist/src/generators/instructions.js.map +1 -0
- package/dist/src/generators/local-plugin.d.ts +56 -0
- package/dist/src/generators/local-plugin.js +1373 -0
- package/dist/src/generators/local-plugin.js.map +1 -0
- package/dist/src/generators/permissions.d.ts +10 -0
- package/dist/src/generators/permissions.js +37 -0
- package/dist/src/generators/permissions.js.map +1 -0
- package/dist/src/generators/shared.d.ts +2 -0
- package/dist/src/generators/shared.js +15 -0
- package/dist/src/generators/shared.js.map +1 -0
- package/dist/src/index.d.ts +41 -0
- package/dist/src/index.js +3327 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/output/command-receipt.d.ts +87 -0
- package/dist/src/output/command-receipt.js +302 -0
- package/dist/src/output/command-receipt.js.map +1 -0
- package/dist/src/output/debug-log.d.ts +4 -0
- package/dist/src/output/debug-log.js +97 -0
- package/dist/src/output/debug-log.js.map +1 -0
- package/dist/src/output/equivalent-command.d.ts +9 -0
- package/dist/src/output/equivalent-command.js +39 -0
- package/dist/src/output/equivalent-command.js.map +1 -0
- package/dist/src/output/model.d.ts +76 -0
- package/dist/src/output/model.js +2 -0
- package/dist/src/output/model.js.map +1 -0
- package/dist/src/output/rebuild-progress.d.ts +21 -0
- package/dist/src/output/rebuild-progress.js +128 -0
- package/dist/src/output/rebuild-progress.js.map +1 -0
- package/dist/src/output/redact.d.ts +3 -0
- package/dist/src/output/redact.js +39 -0
- package/dist/src/output/redact.js.map +1 -0
- package/dist/src/output/reporter.d.ts +9 -0
- package/dist/src/output/reporter.js +133 -0
- package/dist/src/output/reporter.js.map +1 -0
- package/dist/src/portable/commands.d.ts +124 -0
- package/dist/src/portable/commands.js +557 -0
- package/dist/src/portable/commands.js.map +1 -0
- package/dist/src/portable/materializer.d.ts +50 -0
- package/dist/src/portable/materializer.js +462 -0
- package/dist/src/portable/materializer.js.map +1 -0
- package/dist/src/portable/skills-cli.d.ts +43 -0
- package/dist/src/portable/skills-cli.js +148 -0
- package/dist/src/portable/skills-cli.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 +116 -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 +33 -0
- package/dist/src/tui/catalog-sources/screens.js.map +1 -0
- package/dist/src/tui/catalog-sources/session.d.ts +22 -0
- package/dist/src/tui/catalog-sources/session.js +225 -0
- package/dist/src/tui/catalog-sources/session.js.map +1 -0
- package/dist/src/tui/catalog-sources/types.d.ts +41 -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/components.d.ts +102 -0
- package/dist/src/tui/components.js +184 -0
- package/dist/src/tui/components.js.map +1 -0
- package/dist/src/tui/console-app-v4.d.ts +20 -0
- package/dist/src/tui/console-app-v4.js +5066 -0
- package/dist/src/tui/console-app-v4.js.map +1 -0
- package/dist/src/tui/controller-runtime.d.ts +23 -0
- package/dist/src/tui/controller-runtime.js +2011 -0
- package/dist/src/tui/controller-runtime.js.map +1 -0
- package/dist/src/tui/controller.d.ts +557 -0
- package/dist/src/tui/controller.js +2120 -0
- package/dist/src/tui/controller.js.map +1 -0
- package/dist/src/tui/diagnostics.d.ts +30 -0
- package/dist/src/tui/diagnostics.js +71 -0
- package/dist/src/tui/diagnostics.js.map +1 -0
- package/dist/src/tui/index.d.ts +17 -0
- package/dist/src/tui/index.js +17 -0
- package/dist/src/tui/index.js.map +1 -0
- package/dist/src/tui/input-display.d.ts +8 -0
- package/dist/src/tui/input-display.js +36 -0
- package/dist/src/tui/input-display.js.map +1 -0
- package/dist/src/tui/keys.d.ts +12 -0
- package/dist/src/tui/keys.js +22 -0
- package/dist/src/tui/keys.js.map +1 -0
- package/dist/src/tui/layout.d.ts +12 -0
- package/dist/src/tui/layout.js +19 -0
- package/dist/src/tui/layout.js.map +1 -0
- package/dist/src/tui/model.d.ts +424 -0
- package/dist/src/tui/model.js +1493 -0
- package/dist/src/tui/model.js.map +1 -0
- package/dist/src/tui/operation-review-planner.d.ts +21 -0
- package/dist/src/tui/operation-review-planner.js +622 -0
- package/dist/src/tui/operation-review-planner.js.map +1 -0
- package/dist/src/tui/prompt.d.ts +8 -0
- package/dist/src/tui/prompt.js +231 -0
- package/dist/src/tui/prompt.js.map +1 -0
- package/dist/src/tui/router.d.ts +206 -0
- package/dist/src/tui/router.js +137 -0
- package/dist/src/tui/router.js.map +1 -0
- package/dist/src/tui/runner.d.ts +11 -0
- package/dist/src/tui/runner.js +71 -0
- package/dist/src/tui/runner.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 +26 -0
- package/dist/src/tui/theme.js +28 -0
- package/dist/src/tui/theme.js.map +1 -0
- package/dist/src/tui/viewport.d.ts +20 -0
- package/dist/src/tui/viewport.js +29 -0
- package/dist/src/tui/viewport.js.map +1 -0
- package/dist/src/tui/views.d.ts +57 -0
- package/dist/src/tui/views.js +201 -0
- package/dist/src/tui/views.js.map +1 -0
- package/dist/src/tui/wizard.d.ts +11 -0
- package/dist/src/tui/wizard.js +323 -0
- package/dist/src/tui/wizard.js.map +1 -0
- package/dist/src/types.d.ts +474 -0
- package/dist/src/types.js +34 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/utils/agent-version.d.ts +19 -0
- package/dist/src/utils/agent-version.js +205 -0
- package/dist/src/utils/agent-version.js.map +1 -0
- package/dist/src/utils/artifact-plan.d.ts +27 -0
- package/dist/src/utils/artifact-plan.js +453 -0
- package/dist/src/utils/artifact-plan.js.map +1 -0
- package/dist/src/utils/artifact-renderer.d.ts +129 -0
- package/dist/src/utils/artifact-renderer.js +400 -0
- package/dist/src/utils/artifact-renderer.js.map +1 -0
- package/dist/src/utils/artifact-request.d.ts +16 -0
- package/dist/src/utils/artifact-request.js +42 -0
- package/dist/src/utils/artifact-request.js.map +1 -0
- package/dist/src/utils/artifact-sources.d.ts +8 -0
- package/dist/src/utils/artifact-sources.js +10 -0
- package/dist/src/utils/artifact-sources.js.map +1 -0
- package/dist/src/utils/aw-home-mutation-lock.d.ts +11 -0
- package/dist/src/utils/aw-home-mutation-lock.js +83 -0
- package/dist/src/utils/aw-home-mutation-lock.js.map +1 -0
- package/dist/src/utils/bundle-integrity.d.ts +2 -0
- package/dist/src/utils/bundle-integrity.js +63 -0
- package/dist/src/utils/bundle-integrity.js.map +1 -0
- package/dist/src/utils/bundle-layout.d.ts +4 -0
- package/dist/src/utils/bundle-layout.js +531 -0
- package/dist/src/utils/bundle-layout.js.map +1 -0
- package/dist/src/utils/catalog-digests.d.ts +18 -0
- package/dist/src/utils/catalog-digests.js +156 -0
- package/dist/src/utils/catalog-digests.js.map +1 -0
- 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 +32 -0
- package/dist/src/utils/catalog-generation-resolver.js +251 -0
- package/dist/src/utils/catalog-generation-resolver.js.map +1 -0
- package/dist/src/utils/catalog-generation-service.d.ts +161 -0
- package/dist/src/utils/catalog-generation-service.js +1237 -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 +57 -0
- package/dist/src/utils/catalog-generation-store.js +397 -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-v7.js +98 -0
- 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 +141 -0
- package/dist/src/utils/catalog-operation-context.js.map +1 -0
- package/dist/src/utils/catalog-public-error.d.ts +19 -0
- package/dist/src/utils/catalog-public-error.js +100 -0
- package/dist/src/utils/catalog-public-error.js.map +1 -0
- package/dist/src/utils/catalog-runtime-projection.d.ts +33 -0
- package/dist/src/utils/catalog-runtime-projection.js +77 -0
- package/dist/src/utils/catalog-runtime-projection.js.map +1 -0
- package/dist/src/utils/catalog-snapshot.d.ts +10 -0
- package/dist/src/utils/catalog-snapshot.js +20 -0
- package/dist/src/utils/catalog-snapshot.js.map +1 -0
- package/dist/src/utils/catalog-source-identity.d.ts +5 -0
- package/dist/src/utils/catalog-source-identity.js +137 -0
- package/dist/src/utils/catalog-source-identity.js.map +1 -0
- package/dist/src/utils/catalog-source-impact.d.ts +20 -0
- package/dist/src/utils/catalog-source-impact.js +222 -0
- package/dist/src/utils/catalog-source-impact.js.map +1 -0
- package/dist/src/utils/catalog-source-presentation.d.ts +1 -0
- package/dist/src/utils/catalog-source-presentation.js +32 -0
- package/dist/src/utils/catalog-source-presentation.js.map +1 -0
- package/dist/src/utils/catalog-source-references.d.ts +66 -0
- package/dist/src/utils/catalog-source-references.js +1180 -0
- package/dist/src/utils/catalog-source-references.js.map +1 -0
- package/dist/src/utils/catalog-sources.d.ts +53 -0
- package/dist/src/utils/catalog-sources.js +456 -0
- package/dist/src/utils/catalog-sources.js.map +1 -0
- package/dist/src/utils/codex-config.d.ts +126 -0
- package/dist/src/utils/codex-config.js +1032 -0
- package/dist/src/utils/codex-config.js.map +1 -0
- package/dist/src/utils/codex-manager.d.ts +81 -0
- package/dist/src/utils/codex-manager.js +810 -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 +16 -0
- package/dist/src/utils/codex-native-observation.js +22 -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 +128 -0
- package/dist/src/utils/codex-reconciler.js +294 -0
- package/dist/src/utils/codex-reconciler.js.map +1 -0
- package/dist/src/utils/codex-roles.d.ts +71 -0
- package/dist/src/utils/codex-roles.js +257 -0
- package/dist/src/utils/codex-roles.js.map +1 -0
- package/dist/src/utils/codex-shared-native.d.ts +63 -0
- package/dist/src/utils/codex-shared-native.js +142 -0
- package/dist/src/utils/codex-shared-native.js.map +1 -0
- package/dist/src/utils/codex-skill-staging.d.ts +11 -0
- package/dist/src/utils/codex-skill-staging.js +8 -0
- package/dist/src/utils/codex-skill-staging.js.map +1 -0
- package/dist/src/utils/codex-surface-analysis.d.ts +45 -0
- package/dist/src/utils/codex-surface-analysis.js +245 -0
- package/dist/src/utils/codex-surface-analysis.js.map +1 -0
- package/dist/src/utils/config-value.d.ts +3 -0
- package/dist/src/utils/config-value.js +23 -0
- package/dist/src/utils/config-value.js.map +1 -0
- package/dist/src/utils/dynamic-skill-tree.d.ts +36 -0
- package/dist/src/utils/dynamic-skill-tree.js +466 -0
- package/dist/src/utils/dynamic-skill-tree.js.map +1 -0
- package/dist/src/utils/file-rules.d.ts +1 -0
- package/dist/src/utils/file-rules.js +2 -0
- package/dist/src/utils/file-rules.js.map +1 -0
- package/dist/src/utils/git-catalog-provider.d.ts +22 -0
- package/dist/src/utils/git-catalog-provider.js +497 -0
- package/dist/src/utils/git-catalog-provider.js.map +1 -0
- package/dist/src/utils/hooks-contract.d.ts +1 -0
- package/dist/src/utils/hooks-contract.js +2 -0
- package/dist/src/utils/hooks-contract.js.map +1 -0
- package/dist/src/utils/json.d.ts +4 -0
- package/dist/src/utils/json.js +29 -0
- package/dist/src/utils/json.js.map +1 -0
- package/dist/src/utils/local-marketplace.d.ts +41 -0
- package/dist/src/utils/local-marketplace.js +316 -0
- package/dist/src/utils/local-marketplace.js.map +1 -0
- package/dist/src/utils/manifest.d.ts +11 -0
- package/dist/src/utils/manifest.js +33 -0
- package/dist/src/utils/manifest.js.map +1 -0
- package/dist/src/utils/marketplace.d.ts +3 -0
- package/dist/src/utils/marketplace.js +76 -0
- package/dist/src/utils/marketplace.js.map +1 -0
- package/dist/src/utils/multi-source-catalog.d.ts +66 -0
- package/dist/src/utils/multi-source-catalog.js +345 -0
- package/dist/src/utils/multi-source-catalog.js.map +1 -0
- package/dist/src/utils/native-cli.d.ts +118 -0
- package/dist/src/utils/native-cli.js +518 -0
- package/dist/src/utils/native-cli.js.map +1 -0
- package/dist/src/utils/orphan-marketplace-cleanup.d.ts +18 -0
- package/dist/src/utils/orphan-marketplace-cleanup.js +198 -0
- package/dist/src/utils/orphan-marketplace-cleanup.js.map +1 -0
- package/dist/src/utils/ownership.d.ts +194 -0
- package/dist/src/utils/ownership.js +723 -0
- package/dist/src/utils/ownership.js.map +1 -0
- package/dist/src/utils/path-catalog-provider.d.ts +7 -0
- package/dist/src/utils/path-catalog-provider.js +74 -0
- package/dist/src/utils/path-catalog-provider.js.map +1 -0
- package/dist/src/utils/paths.d.ts +40 -0
- package/dist/src/utils/paths.js +137 -0
- package/dist/src/utils/paths.js.map +1 -0
- package/dist/src/utils/platform-entries.d.ts +1 -0
- package/dist/src/utils/platform-entries.js +2 -0
- package/dist/src/utils/platform-entries.js.map +1 -0
- package/dist/src/utils/platform-support.d.ts +1 -0
- package/dist/src/utils/platform-support.js +2 -0
- package/dist/src/utils/platform-support.js.map +1 -0
- package/dist/src/utils/plugin-config-write.d.ts +110 -0
- package/dist/src/utils/plugin-config-write.js +773 -0
- package/dist/src/utils/plugin-config-write.js.map +1 -0
- package/dist/src/utils/plugin-config.d.ts +389 -0
- package/dist/src/utils/plugin-config.js +1642 -0
- package/dist/src/utils/plugin-config.js.map +1 -0
- package/dist/src/utils/plugin-dependencies.d.ts +12 -0
- package/dist/src/utils/plugin-dependencies.js +162 -0
- package/dist/src/utils/plugin-dependencies.js.map +1 -0
- package/dist/src/utils/plugin-intent-state.d.ts +34 -0
- package/dist/src/utils/plugin-intent-state.js +289 -0
- package/dist/src/utils/plugin-intent-state.js.map +1 -0
- package/dist/src/utils/plugin-script-contract.d.ts +1 -0
- package/dist/src/utils/plugin-script-contract.js +2 -0
- package/dist/src/utils/plugin-script-contract.js.map +1 -0
- package/dist/src/utils/plugin-scripts.d.ts +101 -0
- package/dist/src/utils/plugin-scripts.js +253 -0
- package/dist/src/utils/plugin-scripts.js.map +1 -0
- package/dist/src/utils/process-lock.d.ts +47 -0
- package/dist/src/utils/process-lock.js +532 -0
- package/dist/src/utils/process-lock.js.map +1 -0
- package/dist/src/utils/process-tree.d.ts +2 -0
- package/dist/src/utils/process-tree.js +2 -0
- package/dist/src/utils/process-tree.js.map +1 -0
- package/dist/src/utils/project-boundary.d.ts +9 -0
- package/dist/src/utils/project-boundary.js +67 -0
- package/dist/src/utils/project-boundary.js.map +1 -0
- package/dist/src/utils/rendered-contract.d.ts +8 -0
- package/dist/src/utils/rendered-contract.js +134 -0
- package/dist/src/utils/rendered-contract.js.map +1 -0
- package/dist/src/utils/runtime-skill-closure.d.ts +13 -0
- package/dist/src/utils/runtime-skill-closure.js +863 -0
- package/dist/src/utils/runtime-skill-closure.js.map +1 -0
- 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/skill-authoring.d.ts +1 -0
- package/dist/src/utils/skill-authoring.js +2 -0
- package/dist/src/utils/skill-authoring.js.map +1 -0
- package/dist/src/utils/skill-validation.d.ts +37 -0
- package/dist/src/utils/skill-validation.js +326 -0
- package/dist/src/utils/skill-validation.js.map +1 -0
- package/dist/src/utils/slash-commands.d.ts +1 -0
- package/dist/src/utils/slash-commands.js +2 -0
- package/dist/src/utils/slash-commands.js.map +1 -0
- package/dist/src/utils/state-paths.d.ts +14 -0
- package/dist/src/utils/state-paths.js +139 -0
- package/dist/src/utils/state-paths.js.map +1 -0
- package/dist/src/utils/target-eligibility.d.ts +13 -0
- package/dist/src/utils/target-eligibility.js +35 -0
- package/dist/src/utils/target-eligibility.js.map +1 -0
- package/dist/src/utils/target-order.d.ts +7 -0
- package/dist/src/utils/target-order.js +10 -0
- package/dist/src/utils/target-order.js.map +1 -0
- package/dist/src/utils/template-engine.d.ts +1 -0
- package/dist/src/utils/template-engine.js +2 -0
- package/dist/src/utils/template-engine.js.map +1 -0
- package/dist/src/utils/test-path-fence.d.ts +12 -0
- package/dist/src/utils/test-path-fence.js +31 -0
- package/dist/src/utils/test-path-fence.js.map +1 -0
- package/dist/vitest.config.d.ts +2 -0
- package/dist/vitest.config.js +16 -0
- package/dist/vitest.config.js.map +1 -0
- package/package.json +64 -0
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
import crypto from 'node:crypto';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { DEFAULT_CATALOG_OUTPUT_PATH, readCatalogWorkspace, validateCatalogSnapshotComplete, } from '@lesliechan721/aw-plugin-core';
|
|
4
|
+
import { runCatalogBuildCommand } from '../authoring/workspace-commands.js';
|
|
5
|
+
import { readCatalogGenerationStatus } from '../utils/catalog-generation-service.js';
|
|
6
|
+
import { CLI_RESERVED_IMPORTS } from '../utils/manifest.js';
|
|
7
|
+
import { CATALOG_SOURCE_ID_PATTERN, isDefaultOfficialCatalogSource, readCatalogSourcesConfigSnapshot, } from '../utils/catalog-sources.js';
|
|
8
|
+
import { addCatalogSourceCommand, removeCatalogSourceCommand, setPrimaryCatalogSourceCommand, updateCatalogSourceCommand, } from './catalog-source.js';
|
|
9
|
+
import { syncCatalogSourceCommand } from './catalog-generation.js';
|
|
10
|
+
import { getCatalogStatus } from './catalog-status.js';
|
|
11
|
+
import { resolveCatalogWorkspaceRoot } from './catalog-workspace-resolution.js';
|
|
12
|
+
function managedSources(sources, workspaceIdentity) {
|
|
13
|
+
return sources.filter((source) => source.type === 'path'
|
|
14
|
+
&& source.managedBy?.kind === 'catalog-workspace'
|
|
15
|
+
&& source.managedBy.workspaceIdentity === workspaceIdentity);
|
|
16
|
+
}
|
|
17
|
+
function normalizeSuggestedSourceId(workspaceRoot) {
|
|
18
|
+
const stem = path.basename(workspaceRoot).toLowerCase()
|
|
19
|
+
.replace(/[^a-z0-9]+/gu, '-').replace(/^-+|-+$/gu, '');
|
|
20
|
+
const prefixed = /^[a-z]/u.test(stem) ? stem : `catalog-${stem}`;
|
|
21
|
+
const basename = (prefixed || 'catalog').slice(0, 28).replace(/-+$/u, '') || 'catalog';
|
|
22
|
+
return `${basename}-dev`;
|
|
23
|
+
}
|
|
24
|
+
function suffixedSourceId(base, workspaceIdentity) {
|
|
25
|
+
const suffix = crypto.createHash('sha256').update(workspaceIdentity).digest('hex').slice(0, 6);
|
|
26
|
+
const prefix = base.slice(0, 32 - suffix.length - 1).replace(/-+$/u, '');
|
|
27
|
+
return `${prefix}-${suffix}`;
|
|
28
|
+
}
|
|
29
|
+
export function suggestedCatalogDevSourceId(workspaceRoot, workspaceIdentity, occupiedSourceIds = []) {
|
|
30
|
+
const base = normalizeSuggestedSourceId(workspaceRoot);
|
|
31
|
+
return workspaceIdentity && occupiedSourceIds.includes(base)
|
|
32
|
+
? suffixedSourceId(base, workspaceIdentity)
|
|
33
|
+
: base;
|
|
34
|
+
}
|
|
35
|
+
class CatalogDevSourceError extends Error {
|
|
36
|
+
code;
|
|
37
|
+
constructor(code, message) {
|
|
38
|
+
super(message);
|
|
39
|
+
this.code = code;
|
|
40
|
+
this.name = 'CatalogDevSourceError';
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function assertExplicitSourceId(sourceId) {
|
|
44
|
+
if (!CATALOG_SOURCE_ID_PATTERN.test(sourceId)) {
|
|
45
|
+
throw new CatalogDevSourceError('invalidSourceId', 'Invalid Catalog development source ID.');
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export function createCatalogDevFailureReceipt(options) {
|
|
49
|
+
const workspaceRoot = path.resolve(options.cwd, options.workspaceRoot ?? '.');
|
|
50
|
+
if (options.command === 'activate') {
|
|
51
|
+
return {
|
|
52
|
+
receiptSchemaVersion: 2, command: 'catalog:dev:activate', ok: false, state: 'failed',
|
|
53
|
+
workspaceIdentity: null,
|
|
54
|
+
snapshot: { action: 'reused', digest: null },
|
|
55
|
+
source: { id: options.sourceId ?? suggestedCatalogDevSourceId(workspaceRoot), action: 'reused', primary: false },
|
|
56
|
+
active: { ready: false, snapshotDigest: null },
|
|
57
|
+
recovery: ['Fix the reported problem, then rerun catalog dev activate.'],
|
|
58
|
+
errors: [{ code: options.code, message: options.message }],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
if (options.command === 'status') {
|
|
62
|
+
return {
|
|
63
|
+
receiptSchemaVersion: 3, command: 'catalog:dev:status', ok: false, ready: false,
|
|
64
|
+
workspaceIdentity: null,
|
|
65
|
+
snapshot: { state: 'absent', valid: false, digest: null },
|
|
66
|
+
source: { exists: false, id: null, pathMatches: null, primary: null },
|
|
67
|
+
active: { exists: false, ready: false, digestMatchesSnapshot: false, snapshotDigest: null },
|
|
68
|
+
issues: [{ code: options.code, message: options.message, blocking: true }],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
receiptSchemaVersion: 2, command: 'catalog:dev:deactivate', ok: false, state: 'failed',
|
|
73
|
+
workspaceIdentity: null,
|
|
74
|
+
source: { id: null, action: 'absent', previousPrimary: false },
|
|
75
|
+
replacementPrimarySourceId: null,
|
|
76
|
+
recovery: ['Fix the reported problem, then rerun catalog dev deactivate.'],
|
|
77
|
+
errors: [{ code: options.code, message: options.message }],
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function codedFailure(error, fallbackCode) {
|
|
81
|
+
const typedCode = typeof error === 'object' && error !== null && 'code' in error
|
|
82
|
+
&& error.code === 'catalogImpactConfirmationRequired' ? error.code : undefined;
|
|
83
|
+
return {
|
|
84
|
+
code: error instanceof CatalogDevSourceError ? error.code : typedCode ?? fallbackCode,
|
|
85
|
+
message: error instanceof CatalogDevSourceError ? error.message : 'The Catalog development operation failed.',
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
async function resolveWorkspace(cwd, workspaceRoot) {
|
|
89
|
+
try {
|
|
90
|
+
const resolved = await resolveCatalogWorkspaceRoot({
|
|
91
|
+
cwd,
|
|
92
|
+
...(workspaceRoot === undefined ? {} : { explicitRoot: workspaceRoot }),
|
|
93
|
+
mode: 'existing',
|
|
94
|
+
});
|
|
95
|
+
const workspace = await readCatalogWorkspace(resolved.workspaceRoot, { reservedImports: CLI_RESERVED_IMPORTS });
|
|
96
|
+
return { resolved, workspace };
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
throw new CatalogDevSourceError('workspaceInvalid', 'Catalog Workspace is missing or invalid.');
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
export function catalogDevSourceError(error, fallbackCode = 'catalogDevSourceFailed') {
|
|
103
|
+
return codedFailure(error, fallbackCode);
|
|
104
|
+
}
|
|
105
|
+
export async function activateCatalogDevSource(options) {
|
|
106
|
+
const { resolved, workspace } = await resolveWorkspace(options.cwd, options.workspaceRoot);
|
|
107
|
+
const snapshotPath = path.join(workspace.workspaceRoot, DEFAULT_CATALOG_OUTPUT_PATH);
|
|
108
|
+
const staticStatus = await getCatalogStatus({
|
|
109
|
+
cwd: options.cwd, workspaceRoot: workspace.workspaceRoot, env: options.env,
|
|
110
|
+
});
|
|
111
|
+
let snapshotAction = 'reused';
|
|
112
|
+
let snapshotDigest = staticStatus.snapshot.snapshotDigest;
|
|
113
|
+
if (options.forceBuild === true || staticStatus.snapshot.state !== 'current') {
|
|
114
|
+
try {
|
|
115
|
+
await runCatalogBuildCommand({
|
|
116
|
+
workspaceRoot: workspace.workspaceRoot,
|
|
117
|
+
workspaceRootResolvedFrom: resolved.workspaceRootResolvedFrom,
|
|
118
|
+
force: options.forceBuild === true || staticStatus.snapshot.state !== 'absent',
|
|
119
|
+
io: { stdout: () => undefined, stderr: () => undefined },
|
|
120
|
+
});
|
|
121
|
+
snapshotDigest = (await validateCatalogSnapshotComplete(snapshotPath)).snapshotDigest;
|
|
122
|
+
snapshotAction = 'built';
|
|
123
|
+
}
|
|
124
|
+
catch (error) {
|
|
125
|
+
return {
|
|
126
|
+
receiptSchemaVersion: 2, command: 'catalog:dev:activate', ok: false, state: 'failed',
|
|
127
|
+
workspaceIdentity: workspace.workspaceIdentity,
|
|
128
|
+
snapshot: { action: 'built', digest: null },
|
|
129
|
+
source: { id: options.sourceId ?? normalizeSuggestedSourceId(workspace.workspaceRoot), action: 'reused', primary: false },
|
|
130
|
+
active: { ready: false, snapshotDigest: null },
|
|
131
|
+
recovery: ['Fix the Catalog Workspace, then rerun catalog dev activate.'],
|
|
132
|
+
errors: [codedFailure(error, 'snapshotBuildFailed')],
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
let selectedId = options.sourceId ?? normalizeSuggestedSourceId(workspace.workspaceRoot);
|
|
137
|
+
let sourceAction = 'reused';
|
|
138
|
+
let sourceCommitted = false;
|
|
139
|
+
try {
|
|
140
|
+
const configSnapshot = await readCatalogSourcesConfigSnapshot(options.env);
|
|
141
|
+
const owned = managedSources(configSnapshot.config.sources, workspace.workspaceIdentity);
|
|
142
|
+
if (owned.length > 1) {
|
|
143
|
+
throw new CatalogDevSourceError('multipleManagedSources', 'Workspace owns multiple development sources.');
|
|
144
|
+
}
|
|
145
|
+
const existing = owned[0];
|
|
146
|
+
if (options.sourceId !== undefined) {
|
|
147
|
+
assertExplicitSourceId(options.sourceId);
|
|
148
|
+
if (existing && existing.id !== options.sourceId) {
|
|
149
|
+
throw new CatalogDevSourceError('sourceIdConflict', 'Workspace already owns another development source.');
|
|
150
|
+
}
|
|
151
|
+
const collision = configSnapshot.config.sources.find((source) => source.id === options.sourceId);
|
|
152
|
+
if (collision && collision !== existing) {
|
|
153
|
+
throw new CatalogDevSourceError('sourceIdConflict', 'The selected source ID is already in use.');
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
else if (!existing && configSnapshot.config.sources.some((source) => source.id === selectedId)) {
|
|
157
|
+
selectedId = suffixedSourceId(selectedId, workspace.workspaceIdentity);
|
|
158
|
+
if (configSnapshot.config.sources.some((source) => source.id === selectedId)) {
|
|
159
|
+
throw new CatalogDevSourceError('sourceIdConflict', 'The generated development source ID is already in use.');
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
if (existing)
|
|
163
|
+
selectedId = existing.id;
|
|
164
|
+
if (!existing) {
|
|
165
|
+
sourceAction = 'added';
|
|
166
|
+
await addCatalogSourceCommand({
|
|
167
|
+
source: {
|
|
168
|
+
id: selectedId, type: 'path', path: snapshotPath, primary: false,
|
|
169
|
+
managedBy: { kind: 'catalog-workspace', workspaceIdentity: workspace.workspaceIdentity },
|
|
170
|
+
},
|
|
171
|
+
cliVersion: options.cliVersion, cwd: workspace.workspaceRoot, env: options.env,
|
|
172
|
+
runtime: options.runtime?.sourceRuntime,
|
|
173
|
+
managedByWorkspaceIdentity: workspace.workspaceIdentity,
|
|
174
|
+
});
|
|
175
|
+
sourceCommitted = true;
|
|
176
|
+
}
|
|
177
|
+
else if (existing.path !== snapshotPath) {
|
|
178
|
+
sourceAction = 'updated';
|
|
179
|
+
await updateCatalogSourceCommand({
|
|
180
|
+
sourceId: existing.id, update: { type: 'path', path: snapshotPath },
|
|
181
|
+
cliVersion: options.cliVersion, cwd: workspace.workspaceRoot, env: options.env,
|
|
182
|
+
runtime: options.runtime?.sourceRuntime,
|
|
183
|
+
managedByWorkspaceIdentity: workspace.workspaceIdentity,
|
|
184
|
+
});
|
|
185
|
+
sourceCommitted = true;
|
|
186
|
+
}
|
|
187
|
+
const current = (await readCatalogSourcesConfigSnapshot(options.env)).config.sources
|
|
188
|
+
.find((source) => source.id === selectedId);
|
|
189
|
+
if (options.primary === true && !current.primary) {
|
|
190
|
+
await setPrimaryCatalogSourceCommand({
|
|
191
|
+
sourceId: selectedId, cwd: workspace.workspaceRoot, env: options.env,
|
|
192
|
+
runtime: options.runtime?.sourceRuntime,
|
|
193
|
+
});
|
|
194
|
+
sourceCommitted = true;
|
|
195
|
+
}
|
|
196
|
+
await options.runtime?.beforeSync?.();
|
|
197
|
+
await syncCatalogSourceCommand({
|
|
198
|
+
sourceId: selectedId,
|
|
199
|
+
cliVersion: options.cliVersion,
|
|
200
|
+
cwd: workspace.workspaceRoot,
|
|
201
|
+
impactConfirmed: options.yes === true,
|
|
202
|
+
env: options.env,
|
|
203
|
+
});
|
|
204
|
+
await options.runtime?.afterSync?.();
|
|
205
|
+
const finalStatus = await getCatalogDevSourceStatus({
|
|
206
|
+
cwd: options.cwd,
|
|
207
|
+
workspaceRoot: workspace.workspaceRoot,
|
|
208
|
+
cliVersion: options.cliVersion,
|
|
209
|
+
env: options.env,
|
|
210
|
+
});
|
|
211
|
+
if (!finalStatus.ok
|
|
212
|
+
|| !finalStatus.ready
|
|
213
|
+
|| finalStatus.active.snapshotDigest !== snapshotDigest)
|
|
214
|
+
throw new CatalogDevSourceError('activeNotReady', 'Catalog development source sync completed, but final Active status is not ready.');
|
|
215
|
+
const configured = (await readCatalogSourcesConfigSnapshot(options.env)).config.sources
|
|
216
|
+
.find((source) => source.id === selectedId);
|
|
217
|
+
return {
|
|
218
|
+
receiptSchemaVersion: 2, command: 'catalog:dev:activate', ok: true, state: 'completed',
|
|
219
|
+
workspaceIdentity: workspace.workspaceIdentity,
|
|
220
|
+
snapshot: { action: snapshotAction, digest: snapshotDigest },
|
|
221
|
+
source: { id: selectedId, action: sourceAction, primary: configured.primary },
|
|
222
|
+
active: { ready: true, snapshotDigest: finalStatus.active.snapshotDigest },
|
|
223
|
+
recovery: [], errors: [],
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
catch (error) {
|
|
227
|
+
return {
|
|
228
|
+
receiptSchemaVersion: 2, command: 'catalog:dev:activate', ok: false,
|
|
229
|
+
state: snapshotAction === 'built' || sourceCommitted ? 'partial' : 'failed',
|
|
230
|
+
workspaceIdentity: workspace.workspaceIdentity,
|
|
231
|
+
snapshot: { action: snapshotAction, digest: snapshotDigest },
|
|
232
|
+
source: { id: selectedId, action: sourceAction, primary: false },
|
|
233
|
+
active: { ready: false, snapshotDigest: null },
|
|
234
|
+
recovery: ['The source configuration and snapshot were kept. Fix the problem, then rerun catalog dev activate.'],
|
|
235
|
+
errors: [codedFailure(error, sourceCommitted ? 'sourceSyncFailed' : 'sourceConfigFailed')],
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
export async function getCatalogDevSourceStatus(options) {
|
|
240
|
+
const empty = {
|
|
241
|
+
receiptSchemaVersion: 3, command: 'catalog:dev:status', ok: false, ready: false,
|
|
242
|
+
workspaceIdentity: null,
|
|
243
|
+
snapshot: { state: 'absent', valid: false, digest: null },
|
|
244
|
+
source: { exists: false, id: null, pathMatches: null, primary: null },
|
|
245
|
+
active: { exists: false, ready: false, digestMatchesSnapshot: false, snapshotDigest: null },
|
|
246
|
+
issues: [],
|
|
247
|
+
};
|
|
248
|
+
let workspace;
|
|
249
|
+
try {
|
|
250
|
+
workspace = await resolveWorkspace(options.cwd, options.workspaceRoot);
|
|
251
|
+
}
|
|
252
|
+
catch (error) {
|
|
253
|
+
empty.issues.push({ ...codedFailure(error, 'workspaceInvalid'), blocking: true });
|
|
254
|
+
return empty;
|
|
255
|
+
}
|
|
256
|
+
empty.workspaceIdentity = workspace.workspace.workspaceIdentity;
|
|
257
|
+
const staticStatus = await getCatalogStatus({
|
|
258
|
+
cwd: options.cwd, workspaceRoot: workspace.workspace.workspaceRoot, env: options.env,
|
|
259
|
+
}).catch(() => null);
|
|
260
|
+
if (!staticStatus) {
|
|
261
|
+
empty.issues.push({ code: 'catalogStatusInvalid', message: 'Catalog snapshot status is invalid.', blocking: true });
|
|
262
|
+
return empty;
|
|
263
|
+
}
|
|
264
|
+
empty.snapshot = {
|
|
265
|
+
state: staticStatus.snapshot.state,
|
|
266
|
+
valid: staticStatus.snapshot.valid,
|
|
267
|
+
digest: staticStatus.snapshot.snapshotDigest,
|
|
268
|
+
};
|
|
269
|
+
const workspaceIssues = staticStatus.issues.filter((issue) => issue.blocking);
|
|
270
|
+
empty.issues.push(...workspaceIssues.map((issue) => ({
|
|
271
|
+
code: issue.code,
|
|
272
|
+
message: 'Catalog Workspace status has a blocking issue.',
|
|
273
|
+
blocking: true,
|
|
274
|
+
})));
|
|
275
|
+
if (staticStatus.snapshot.state !== 'current') {
|
|
276
|
+
empty.issues.push({
|
|
277
|
+
code: `snapshot${staticStatus.snapshot.state[0].toUpperCase()}${staticStatus.snapshot.state.slice(1)}`,
|
|
278
|
+
message: `Catalog development snapshot is ${staticStatus.snapshot.state}.`, blocking: true,
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
const config = await readCatalogSourcesConfigSnapshot(options.env).catch(() => null);
|
|
282
|
+
if (!config) {
|
|
283
|
+
empty.issues.push({ code: 'sourceConfigInvalid', message: 'Catalog source configuration is invalid.', blocking: true });
|
|
284
|
+
return empty;
|
|
285
|
+
}
|
|
286
|
+
const owned = managedSources(config.config.sources, workspace.workspace.workspaceIdentity);
|
|
287
|
+
if (owned.length !== 1) {
|
|
288
|
+
empty.issues.push({
|
|
289
|
+
code: owned.length === 0 ? 'sourceInactive' : 'multipleManagedSources',
|
|
290
|
+
message: owned.length === 0
|
|
291
|
+
? 'Workspace has no configured development source.'
|
|
292
|
+
: 'Workspace owns multiple development sources.',
|
|
293
|
+
blocking: true,
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
const source = owned.length === 1 ? owned[0] : null;
|
|
297
|
+
if (source) {
|
|
298
|
+
const snapshotPath = path.join(workspace.workspace.workspaceRoot, DEFAULT_CATALOG_OUTPUT_PATH);
|
|
299
|
+
const pathMatches = source.path === snapshotPath;
|
|
300
|
+
empty.source = { exists: true, id: source.id, pathMatches, primary: source.primary };
|
|
301
|
+
if (!pathMatches) {
|
|
302
|
+
empty.issues.push({ code: 'sourcePathMismatch', message: 'Managed source path does not match this Workspace.', blocking: true });
|
|
303
|
+
}
|
|
304
|
+
const status = await readCatalogGenerationStatus({ sourceId: source.id, env: options.env }).catch(() => null);
|
|
305
|
+
const entry = status?.sources[0];
|
|
306
|
+
const snapshotDigest = entry?.active?.snapshotDigest ?? null;
|
|
307
|
+
const digestMatchesSnapshot = snapshotDigest !== null && snapshotDigest === empty.snapshot.digest;
|
|
308
|
+
empty.active = {
|
|
309
|
+
exists: entry?.active !== undefined,
|
|
310
|
+
ready: entry?.activeReady === true,
|
|
311
|
+
digestMatchesSnapshot,
|
|
312
|
+
snapshotDigest,
|
|
313
|
+
};
|
|
314
|
+
if (!entry?.active) {
|
|
315
|
+
empty.issues.push({ code: 'activeAbsent', message: 'Development source has no Active snapshot.', blocking: true });
|
|
316
|
+
}
|
|
317
|
+
else if (!entry.activeReady) {
|
|
318
|
+
empty.issues.push({ code: entry.errorCode ?? 'activeNotReady', message: 'Development source Active snapshot is not ready.', blocking: true });
|
|
319
|
+
}
|
|
320
|
+
if (entry?.active && !digestMatchesSnapshot) {
|
|
321
|
+
empty.issues.push({ code: 'activeSnapshotDigestMismatch', message: 'Active digest does not match the Workspace snapshot.', blocking: true });
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
empty.ok = true;
|
|
325
|
+
empty.ready = empty.snapshot.state === 'current'
|
|
326
|
+
&& staticStatus.ok
|
|
327
|
+
&& workspaceIssues.length === 0
|
|
328
|
+
&& source !== null
|
|
329
|
+
&& empty.source.pathMatches === true
|
|
330
|
+
&& empty.active.ready
|
|
331
|
+
&& empty.active.digestMatchesSnapshot;
|
|
332
|
+
return empty;
|
|
333
|
+
}
|
|
334
|
+
export async function deactivateCatalogDevSource(options) {
|
|
335
|
+
if (options.workspaceRoot !== undefined && options.sourceId !== undefined) {
|
|
336
|
+
throw new CatalogDevSourceError('invalidArguments', '--workspace-root and --source-id are mutually exclusive.');
|
|
337
|
+
}
|
|
338
|
+
const config = await readCatalogSourcesConfigSnapshot(options.env).catch(() => {
|
|
339
|
+
throw new CatalogDevSourceError('sourceConfigInvalid', 'Catalog source configuration is invalid.');
|
|
340
|
+
});
|
|
341
|
+
let source;
|
|
342
|
+
let workspaceIdentity;
|
|
343
|
+
let workspaceRoot;
|
|
344
|
+
if (options.sourceId !== undefined) {
|
|
345
|
+
assertExplicitSourceId(options.sourceId);
|
|
346
|
+
const configuredSource = config.config.sources.find((entry) => entry.id === options.sourceId);
|
|
347
|
+
if (configuredSource?.type !== 'path' || configuredSource.managedBy?.kind !== 'catalog-workspace') {
|
|
348
|
+
throw new CatalogDevSourceError('managedSourceNotFound', 'The source is not a Workspace-managed path source.');
|
|
349
|
+
}
|
|
350
|
+
if (options.yes !== true) {
|
|
351
|
+
return {
|
|
352
|
+
receiptSchemaVersion: 2, command: 'catalog:dev:deactivate', ok: false, state: 'failed',
|
|
353
|
+
workspaceIdentity: configuredSource.managedBy.workspaceIdentity,
|
|
354
|
+
source: { id: configuredSource.id, action: 'retained', previousPrimary: configuredSource.primary },
|
|
355
|
+
replacementPrimarySourceId: null,
|
|
356
|
+
recovery: ['Rerun with --source-id and --yes.'],
|
|
357
|
+
errors: [{ code: 'confirmationRequired', message: 'Recovery by source ID requires --yes.' }],
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
source = configuredSource;
|
|
361
|
+
workspaceIdentity = configuredSource.managedBy.workspaceIdentity;
|
|
362
|
+
workspaceRoot = options.cwd;
|
|
363
|
+
}
|
|
364
|
+
else {
|
|
365
|
+
const resolved = await resolveWorkspace(options.cwd, options.workspaceRoot);
|
|
366
|
+
workspaceIdentity = resolved.workspace.workspaceIdentity;
|
|
367
|
+
workspaceRoot = resolved.workspace.workspaceRoot;
|
|
368
|
+
const owned = managedSources(config.config.sources, workspaceIdentity);
|
|
369
|
+
if (owned.length > 1) {
|
|
370
|
+
throw new CatalogDevSourceError('multipleManagedSources', 'Workspace owns multiple development sources.');
|
|
371
|
+
}
|
|
372
|
+
source = owned[0];
|
|
373
|
+
}
|
|
374
|
+
if (!source) {
|
|
375
|
+
return {
|
|
376
|
+
receiptSchemaVersion: 2, command: 'catalog:dev:deactivate', ok: true, state: 'completed',
|
|
377
|
+
workspaceIdentity, source: { id: null, action: 'absent', previousPrimary: false },
|
|
378
|
+
replacementPrimarySourceId: null, recovery: [], errors: [],
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
let replacementPrimarySourceId = null;
|
|
382
|
+
if (source.primary) {
|
|
383
|
+
const others = config.config.sources.filter((entry) => entry.id !== source.id);
|
|
384
|
+
const requested = options.replacementPrimary === undefined
|
|
385
|
+
? others.find(isDefaultOfficialCatalogSource)
|
|
386
|
+
?? (others.length === 1 ? others[0] : undefined)
|
|
387
|
+
: others.find((entry) => entry.id === options.replacementPrimary);
|
|
388
|
+
if (!requested) {
|
|
389
|
+
return {
|
|
390
|
+
receiptSchemaVersion: 2, command: 'catalog:dev:deactivate', ok: false, state: 'failed',
|
|
391
|
+
workspaceIdentity, source: { id: source.id, action: 'retained', previousPrimary: true },
|
|
392
|
+
replacementPrimarySourceId: null,
|
|
393
|
+
recovery: ['Select an existing replacement primary source.'],
|
|
394
|
+
errors: [{ code: 'replacementPrimaryUnavailable', message: 'A replacement primary source is required.' }],
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
replacementPrimarySourceId = requested.id;
|
|
398
|
+
}
|
|
399
|
+
else if (options.replacementPrimary !== undefined) {
|
|
400
|
+
throw new CatalogDevSourceError('replacementPrimaryInvalid', '--replacement-primary requires a primary target source.');
|
|
401
|
+
}
|
|
402
|
+
try {
|
|
403
|
+
if (replacementPrimarySourceId) {
|
|
404
|
+
await setPrimaryCatalogSourceCommand({
|
|
405
|
+
sourceId: replacementPrimarySourceId, cwd: workspaceRoot, env: options.env,
|
|
406
|
+
runtime: options.runtime?.sourceRuntime,
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
await removeCatalogSourceCommand({
|
|
410
|
+
sourceId: source.id, cwd: workspaceRoot, env: options.env,
|
|
411
|
+
runtime: options.runtime?.sourceRuntime,
|
|
412
|
+
managedByWorkspaceIdentity: workspaceIdentity,
|
|
413
|
+
});
|
|
414
|
+
return {
|
|
415
|
+
receiptSchemaVersion: 2, command: 'catalog:dev:deactivate', ok: true, state: 'completed',
|
|
416
|
+
workspaceIdentity, source: { id: source.id, action: 'removed', previousPrimary: source.primary },
|
|
417
|
+
replacementPrimarySourceId, recovery: [], errors: [],
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
catch (error) {
|
|
421
|
+
const after = await readCatalogSourcesConfigSnapshot(options.env).catch(() => null);
|
|
422
|
+
const stillExists = after?.config.sources.some((entry) => entry.id === source.id) ?? true;
|
|
423
|
+
const configChanged = after !== null && after.digest !== config.digest;
|
|
424
|
+
return {
|
|
425
|
+
receiptSchemaVersion: 2, command: 'catalog:dev:deactivate', ok: false,
|
|
426
|
+
state: configChanged || !stillExists ? 'partial' : 'failed', workspaceIdentity,
|
|
427
|
+
source: { id: source.id, action: stillExists ? 'retained' : 'removed', previousPrimary: source.primary },
|
|
428
|
+
replacementPrimarySourceId,
|
|
429
|
+
recovery: ['Fix the source configuration, then rerun catalog dev deactivate.'],
|
|
430
|
+
errors: [codedFailure(error, 'sourceConfigFailed')],
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
//# sourceMappingURL=catalog-dev-source.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-dev-source.js","sourceRoot":"","sources":["../../../src/commands/catalog-dev-source.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EACL,2BAA2B,EAC3B,oBAAoB,EACpB,+BAA+B,GAChC,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAE5E,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AACrF,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EACL,yBAAyB,EACzB,8BAA8B,EAC9B,gCAAgC,GACjC,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-0,0 +1,16 @@
|
|
|
1
|
+
import { readCatalogGenerationStatus, syncCatalogSourceGeneration, type CatalogGenerationServiceRuntime } from '../utils/catalog-generation-service.js';
|
|
2
|
+
export declare function syncCatalogSourceCommand(options: {
|
|
3
|
+
sourceId: string;
|
|
4
|
+
cliVersion: string;
|
|
5
|
+
cwd?: string;
|
|
6
|
+
check?: boolean;
|
|
7
|
+
impactConfirmed?: boolean;
|
|
8
|
+
replaceDamaged?: boolean;
|
|
9
|
+
env?: NodeJS.ProcessEnv;
|
|
10
|
+
signal?: AbortSignal;
|
|
11
|
+
runtime?: CatalogGenerationServiceRuntime;
|
|
12
|
+
}): Promise<Awaited<ReturnType<typeof syncCatalogSourceGeneration>>>;
|
|
13
|
+
export declare function catalogSourceStatusCommand(options?: {
|
|
14
|
+
sourceId?: string;
|
|
15
|
+
env?: NodeJS.ProcessEnv;
|
|
16
|
+
}): Promise<Awaited<ReturnType<typeof readCatalogGenerationStatus>>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { readCatalogGenerationStatus, syncCatalogSourceGeneration, } from '../utils/catalog-generation-service.js';
|
|
2
|
+
export async function syncCatalogSourceCommand(options) {
|
|
3
|
+
const env = options.env ?? process.env;
|
|
4
|
+
return syncCatalogSourceGeneration({ ...options, env });
|
|
5
|
+
}
|
|
6
|
+
export async function catalogSourceStatusCommand(options = {}) {
|
|
7
|
+
return readCatalogGenerationStatus(options);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=catalog-generation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-generation.js","sourceRoot":"","sources":["../../../src/commands/catalog-generation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,GAE5B,MAAM,wCAAwC,CAAC;AAEhD,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,OAU9C;IACC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;IACvC,OAAO,2BAA2B,CAAC,EAAE,GAAG,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAAC,UAG7C,EAAE;IACJ,OAAO,2BAA2B,CAAC,OAAO,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { validatePublishedCatalogSnapshot, type CatalogWorkspace } from '@lesliechan721/aw-plugin-core';
|
|
2
|
+
import type { CatalogPublicationDescriptor } from './catalog-publication-journal.js';
|
|
3
|
+
export type { CatalogPublicationDescriptor } from './catalog-publication-journal.js';
|
|
4
|
+
export interface CatalogPublicationIssue {
|
|
5
|
+
code: string;
|
|
6
|
+
message: string;
|
|
7
|
+
blocking: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare class CatalogPublicationInspectionError extends Error {
|
|
10
|
+
readonly code: string;
|
|
11
|
+
constructor(code: string, message: string, options?: ErrorOptions);
|
|
12
|
+
}
|
|
13
|
+
export interface CatalogPublicationPreparation {
|
|
14
|
+
temporaryRoot: string;
|
|
15
|
+
repositoryRoot: string;
|
|
16
|
+
archivedCatalogWorkspaceRoot: string;
|
|
17
|
+
catalogWorkspaceRoot: string;
|
|
18
|
+
repoRoot: string;
|
|
19
|
+
sourceHead: string;
|
|
20
|
+
remote: string;
|
|
21
|
+
branch: string;
|
|
22
|
+
branchRef: string;
|
|
23
|
+
tag: string;
|
|
24
|
+
tagRef: string;
|
|
25
|
+
fetchUrl: string;
|
|
26
|
+
pushUrl: string;
|
|
27
|
+
safeFetchUrl: string;
|
|
28
|
+
safePushUrl: string;
|
|
29
|
+
remoteIdentityDigest: string;
|
|
30
|
+
parent: string | null;
|
|
31
|
+
tagAvailable: boolean;
|
|
32
|
+
catalogWorkspace: CatalogWorkspace;
|
|
33
|
+
prepared: {
|
|
34
|
+
outputRoot: string;
|
|
35
|
+
catalogVersion: string;
|
|
36
|
+
channel: 'latest' | 'beta';
|
|
37
|
+
pluginNames: string[];
|
|
38
|
+
snapshotDigest: string;
|
|
39
|
+
};
|
|
40
|
+
descriptor: CatalogPublicationDescriptor;
|
|
41
|
+
env: NodeJS.ProcessEnv;
|
|
42
|
+
}
|
|
43
|
+
export declare function sanitizedGitEnvironment(source: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
44
|
+
export declare function safeRemoteIdentity(value: string): string;
|
|
45
|
+
export interface CatalogPublicationFailure {
|
|
46
|
+
ok: false;
|
|
47
|
+
code: string;
|
|
48
|
+
message: string;
|
|
49
|
+
}
|
|
50
|
+
export declare function catalogPublicationFailure(options: {
|
|
51
|
+
error: unknown;
|
|
52
|
+
env?: NodeJS.ProcessEnv;
|
|
53
|
+
sensitiveRoots?: readonly string[];
|
|
54
|
+
}): CatalogPublicationFailure;
|
|
55
|
+
export declare function publicationGit(cwd: string, args: readonly string[], env: NodeJS.ProcessEnv, code: string, label: string): Promise<string>;
|
|
56
|
+
export declare function publicationGitExit(cwd: string, args: readonly string[], env: NodeJS.ProcessEnv): Promise<boolean>;
|
|
57
|
+
export declare function parseRemoteRefs(output: string): Map<string, string>;
|
|
58
|
+
export declare function materializeSourceHead(options: {
|
|
59
|
+
repoRoot: string;
|
|
60
|
+
sourceHead: string;
|
|
61
|
+
outputRoot: string;
|
|
62
|
+
temporaryRoot: string;
|
|
63
|
+
env: NodeJS.ProcessEnv;
|
|
64
|
+
}): Promise<void>;
|
|
65
|
+
export declare function validateCatalogPublicationPlugins(catalogWorkspace: CatalogWorkspace, env: NodeJS.ProcessEnv): Promise<void>;
|
|
66
|
+
export declare function prepareCatalogPublicationInspection(options: {
|
|
67
|
+
workspaceRoot: string;
|
|
68
|
+
remote?: string;
|
|
69
|
+
remoteUrl?: string;
|
|
70
|
+
branch?: string;
|
|
71
|
+
env: NodeJS.ProcessEnv;
|
|
72
|
+
}): Promise<CatalogPublicationPreparation>;
|
|
73
|
+
export interface CatalogPublicationLiveContext {
|
|
74
|
+
catalogWorkspaceRoot: string;
|
|
75
|
+
repoRoot: string;
|
|
76
|
+
workspaceIdentity: string;
|
|
77
|
+
catalogVersion: string;
|
|
78
|
+
sourceHead: string;
|
|
79
|
+
remote: string;
|
|
80
|
+
remoteName: string | null;
|
|
81
|
+
branch: string;
|
|
82
|
+
branchRef: string;
|
|
83
|
+
tag: string;
|
|
84
|
+
tagRef: string;
|
|
85
|
+
fetchUrl: string;
|
|
86
|
+
pushUrl: string;
|
|
87
|
+
safeFetchUrl: string;
|
|
88
|
+
safePushUrl: string;
|
|
89
|
+
remoteIdentityDigest: string;
|
|
90
|
+
env: NodeJS.ProcessEnv;
|
|
91
|
+
}
|
|
92
|
+
export interface CatalogPublicationApplyContext {
|
|
93
|
+
catalogWorkspaceRoot: string;
|
|
94
|
+
repoRoot: string;
|
|
95
|
+
workspaceIdentity: string;
|
|
96
|
+
remote: string;
|
|
97
|
+
branch: string;
|
|
98
|
+
branchRef: string;
|
|
99
|
+
fetchUrl: string;
|
|
100
|
+
pushUrl: string;
|
|
101
|
+
safeFetchUrl: string;
|
|
102
|
+
safePushUrl: string;
|
|
103
|
+
remoteIdentityDigest: string;
|
|
104
|
+
env: NodeJS.ProcessEnv;
|
|
105
|
+
}
|
|
106
|
+
export declare function inspectCatalogPublicationLiveContext(options: {
|
|
107
|
+
workspaceRoot: string;
|
|
108
|
+
remote?: string;
|
|
109
|
+
remoteUrl?: string;
|
|
110
|
+
branch?: string;
|
|
111
|
+
env: NodeJS.ProcessEnv;
|
|
112
|
+
}): Promise<CatalogPublicationLiveContext>;
|
|
113
|
+
export declare function inspectCatalogPublicationApplyContext(options: {
|
|
114
|
+
workspaceRoot: string;
|
|
115
|
+
remote?: string;
|
|
116
|
+
remoteUrl?: string;
|
|
117
|
+
branch?: string;
|
|
118
|
+
env: NodeJS.ProcessEnv;
|
|
119
|
+
}): Promise<CatalogPublicationApplyContext>;
|
|
120
|
+
export declare function listCatalogPublicationVersions(options: {
|
|
121
|
+
workspaceRoot: string;
|
|
122
|
+
remote?: string;
|
|
123
|
+
remoteUrl?: string;
|
|
124
|
+
env: NodeJS.ProcessEnv;
|
|
125
|
+
}): Promise<string[]>;
|
|
126
|
+
export declare function readCatalogPublicationBranchState(options: {
|
|
127
|
+
workspaceRoot: string;
|
|
128
|
+
remote?: string;
|
|
129
|
+
remoteUrl?: string;
|
|
130
|
+
branch: string;
|
|
131
|
+
env: NodeJS.ProcessEnv;
|
|
132
|
+
}): Promise<{
|
|
133
|
+
commit: string;
|
|
134
|
+
version: string;
|
|
135
|
+
manifest: Awaited<ReturnType<typeof validatePublishedCatalogSnapshot>>['manifest'];
|
|
136
|
+
snapshotDigest: string;
|
|
137
|
+
} | null>;
|
|
138
|
+
export declare function disposeCatalogPublicationInspection(preparation: Pick<CatalogPublicationPreparation, 'temporaryRoot'>): Promise<void>;
|