@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,8 +1,10 @@
|
|
|
1
1
|
import crypto from 'node:crypto';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import fs from 'fs-extra';
|
|
4
|
+
import { catalogFileMode, listCatalogBundleFiles as listFilesRecursively, readCatalogExecutableFiles, } from '@lesliechan721/aw-plugin-core';
|
|
4
5
|
import { normalizeManifestDigestInput, readPluginManifest, } from './manifest.js';
|
|
5
6
|
import { calculateFileDigest } from './bundle-integrity.js';
|
|
7
|
+
import { CODEX_NATIVE_RENDER_RECEIPT_PATH } from './codex-native-render-receipt.js';
|
|
6
8
|
function stableStringify(value) {
|
|
7
9
|
if (Array.isArray(value)) {
|
|
8
10
|
return `[${value.map((entry) => stableStringify(entry)).join(',')}]`;
|
|
@@ -19,21 +21,7 @@ function stableStringify(value) {
|
|
|
19
21
|
function createSha256Digest(value) {
|
|
20
22
|
return `sha256:${crypto.createHash('sha256').update(value).digest('hex')}`;
|
|
21
23
|
}
|
|
22
|
-
async function
|
|
23
|
-
const entries = await fs.readdir(rootDir, { withFileTypes: true });
|
|
24
|
-
const files = [];
|
|
25
|
-
for (const entry of entries) {
|
|
26
|
-
const entryPath = path.join(rootDir, entry.name);
|
|
27
|
-
if (entry.isDirectory()) {
|
|
28
|
-
const nestedFiles = await listFilesRecursively(entryPath);
|
|
29
|
-
files.push(...nestedFiles.map((nestedFile) => path.join(entry.name, nestedFile).split(path.sep).join('/')));
|
|
30
|
-
continue;
|
|
31
|
-
}
|
|
32
|
-
files.push(entry.name);
|
|
33
|
-
}
|
|
34
|
-
return files.sort();
|
|
35
|
-
}
|
|
36
|
-
async function resolveCatalogDigestNode(filePath) {
|
|
24
|
+
async function resolveCatalogDigestNode(filePath, relativePath = '', executableFiles) {
|
|
37
25
|
const stat = await fs.lstat(filePath);
|
|
38
26
|
if (stat.isSymbolicLink()) {
|
|
39
27
|
return { kind: 'symlink', mode: '120000' };
|
|
@@ -43,7 +31,7 @@ async function resolveCatalogDigestNode(filePath) {
|
|
|
43
31
|
}
|
|
44
32
|
return {
|
|
45
33
|
kind: 'file',
|
|
46
|
-
mode: (stat.mode
|
|
34
|
+
mode: catalogFileMode(relativePath, stat.mode, executableFiles),
|
|
47
35
|
};
|
|
48
36
|
}
|
|
49
37
|
async function calculateArtifactPathDigest(filePath, node) {
|
|
@@ -57,8 +45,10 @@ const VERSIONED_PLUGIN_MANIFEST_PATHS = new Set([
|
|
|
57
45
|
'.claude-plugin/plugin.json',
|
|
58
46
|
'.codex-plugin/plugin.json',
|
|
59
47
|
]);
|
|
48
|
+
const AW_PLUGIN_REQUIREMENTS_RECEIPT_FILENAME = 'aw-plugin-requirements.json';
|
|
60
49
|
async function calculateContentPathDigest(pluginRoot, relativePath, node) {
|
|
61
|
-
if (!VERSIONED_PLUGIN_MANIFEST_PATHS.has(relativePath)
|
|
50
|
+
if (!VERSIONED_PLUGIN_MANIFEST_PATHS.has(relativePath)
|
|
51
|
+
&& path.posix.basename(relativePath) !== AW_PLUGIN_REQUIREMENTS_RECEIPT_FILENAME) {
|
|
62
52
|
return calculateArtifactPathDigest(path.join(pluginRoot, relativePath), node);
|
|
63
53
|
}
|
|
64
54
|
const filePath = path.join(pluginRoot, relativePath);
|
|
@@ -66,16 +56,26 @@ async function calculateContentPathDigest(pluginRoot, relativePath, node) {
|
|
|
66
56
|
return createSha256Digest(await fs.readlink(filePath));
|
|
67
57
|
}
|
|
68
58
|
const manifest = await fs.readJson(filePath);
|
|
69
|
-
|
|
59
|
+
if (VERSIONED_PLUGIN_MANIFEST_PATHS.has(relativePath)) {
|
|
60
|
+
return createSha256Digest(stableStringify({ ...manifest, version: '<plugin-version>' }));
|
|
61
|
+
}
|
|
62
|
+
const plugin = manifest.plugin && typeof manifest.plugin === 'object' && !Array.isArray(manifest.plugin)
|
|
63
|
+
? manifest.plugin
|
|
64
|
+
: {};
|
|
65
|
+
return createSha256Digest(stableStringify({
|
|
66
|
+
...manifest,
|
|
67
|
+
plugin: { ...plugin, version: '<plugin-version>' },
|
|
68
|
+
}));
|
|
70
69
|
}
|
|
71
70
|
export function calculateCatalogEntryManifestDigest(manifest) {
|
|
72
71
|
return createSha256Digest(normalizeManifestDigestInput(manifest));
|
|
73
72
|
}
|
|
74
73
|
export async function calculateCatalogEntryArtifactDigest(pluginRoot) {
|
|
75
74
|
const files = await listFilesRecursively(pluginRoot);
|
|
75
|
+
const executableFiles = await readCatalogExecutableFiles(pluginRoot, files);
|
|
76
76
|
const fileEntries = await Promise.all(files.map(async (relativePath) => {
|
|
77
77
|
const filePath = path.join(pluginRoot, relativePath);
|
|
78
|
-
const node = await resolveCatalogDigestNode(filePath);
|
|
78
|
+
const node = await resolveCatalogDigestNode(filePath, relativePath, executableFiles);
|
|
79
79
|
return {
|
|
80
80
|
path: relativePath,
|
|
81
81
|
kind: node.kind,
|
|
@@ -87,8 +87,9 @@ export async function calculateCatalogEntryArtifactDigest(pluginRoot) {
|
|
|
87
87
|
}
|
|
88
88
|
export async function calculateCatalogEntryContentDigest(pluginRoot) {
|
|
89
89
|
const files = await listFilesRecursively(pluginRoot);
|
|
90
|
+
const executableFiles = await readCatalogExecutableFiles(pluginRoot, files);
|
|
90
91
|
const fileEntries = await Promise.all(files.map(async (relativePath) => {
|
|
91
|
-
const node = await resolveCatalogDigestNode(path.join(pluginRoot, relativePath));
|
|
92
|
+
const node = await resolveCatalogDigestNode(path.join(pluginRoot, relativePath), relativePath, executableFiles);
|
|
92
93
|
return {
|
|
93
94
|
path: relativePath,
|
|
94
95
|
kind: node.kind,
|
|
@@ -98,6 +99,42 @@ export async function calculateCatalogEntryContentDigest(pluginRoot) {
|
|
|
98
99
|
}));
|
|
99
100
|
return createSha256Digest(stableStringify(fileEntries));
|
|
100
101
|
}
|
|
102
|
+
async function calculateCodexPayloadDigest(pluginRoot, canonicalizeSkills) {
|
|
103
|
+
const files = (await listFilesRecursively(pluginRoot)).filter((relativePath) => relativePath !== CODEX_NATIVE_RENDER_RECEIPT_PATH
|
|
104
|
+
&& path.posix.basename(relativePath) !== '.agent-workflows-owner.json');
|
|
105
|
+
const fileEntries = await Promise.all(files.map(async (relativePath) => {
|
|
106
|
+
const filePath = path.join(pluginRoot, relativePath);
|
|
107
|
+
const node = await resolveCatalogDigestNode(filePath);
|
|
108
|
+
let digest;
|
|
109
|
+
if (relativePath === '.codex-plugin/plugin.json' && node.kind === 'file') {
|
|
110
|
+
const manifest = await fs.readJson(filePath);
|
|
111
|
+
digest = createSha256Digest(stableStringify({
|
|
112
|
+
...manifest,
|
|
113
|
+
version: '<plugin-version>',
|
|
114
|
+
...(canonicalizeSkills ? { skills: '<native-managed>' } : {}),
|
|
115
|
+
}));
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
digest = await calculateContentPathDigest(pluginRoot, relativePath, node);
|
|
119
|
+
}
|
|
120
|
+
return { path: relativePath, kind: node.kind, mode: node.mode, digest };
|
|
121
|
+
}));
|
|
122
|
+
return createSha256Digest(stableStringify(fileEntries));
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Static shared-native digest. Codex can rewrite the manifest Skill projection,
|
|
126
|
+
* so both plugin version and skills remain canonicalized for compatibility.
|
|
127
|
+
*/
|
|
128
|
+
export function calculateCodexSharedNativePayloadDigest(pluginRoot) {
|
|
129
|
+
return calculateCodexPayloadDigest(pluginRoot, true);
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Receipt-backed dynamic projection digest. The version is transport metadata,
|
|
133
|
+
* but the renderer-produced Skill projection is part of the payload identity.
|
|
134
|
+
*/
|
|
135
|
+
export function calculateCodexNativeRenderPayloadDigest(pluginRoot) {
|
|
136
|
+
return calculateCodexPayloadDigest(pluginRoot, false);
|
|
137
|
+
}
|
|
101
138
|
export async function calculateCatalogEntryDigestsFromRoot(pluginRoot) {
|
|
102
139
|
const plugin = await readPluginManifest(pluginRoot, { mode: 'bundle' });
|
|
103
140
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog-digests.js","sourceRoot":"","sources":["../../../src/utils/catalog-digests.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"catalog-digests.js","sourceRoot":"","sources":["../../../src/utils/catalog-digests.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,MAAM,UAAU,CAAC;AAE1B,OAAO,EACL,eAAe,EACf,sBAAsB,IAAI,oBAAoB,EAC9C,0BAA0B,GAC3B,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EACL,4BAA4B,EAC5B,kBAAkB,GACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,gCAAgC,EAAE,MAAM,kCAAkC,CAAC;AAEpF,SAAS,eAAe,CAAC,KAAc;IACrC,IAAI,KAAK,CAAC,O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AC,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;IAExE,OAAO;QACL,cAAc,EAAE,mCAAmC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACpE,cAAc,EAAE,MAAM,mCAAmC,CAAC,UAAU,CAAC;KACtE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CatalogGenerationStateFileV1, CatalogSourceId, SourceIdentity } from '../types.js';
|
|
2
|
+
import { type CatalogSourcesConfigSnapshot } from './catalog-sources.js';
|
|
3
|
+
export interface CatalogGenerationControlSnapshot {
|
|
4
|
+
configSnapshot: CatalogSourcesConfigSnapshot;
|
|
5
|
+
generationState: CatalogGenerationStateFileV1;
|
|
6
|
+
sourceIdentities: Record<CatalogSourceId, SourceIdentity>;
|
|
7
|
+
}
|
|
8
|
+
export declare function readCatalogGenerationControlSnapshot(options?: {
|
|
9
|
+
env?: NodeJS.ProcessEnv;
|
|
10
|
+
configSnapshot?: CatalogSourcesConfigSnapshot;
|
|
11
|
+
}): Promise<CatalogGenerationControlSnapshot>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { CatalogGenerationError } from './catalog-generation-error.js';
|
|
2
|
+
import { readCatalogGenerationState } from './catalog-generation-state.js';
|
|
3
|
+
import { calculateCatalogSourceIdentity } from './catalog-source-identity.js';
|
|
4
|
+
import { readCatalogSourcesConfigSnapshot, } from './catalog-sources.js';
|
|
5
|
+
const MAX_CONTROL_SNAPSHOT_RETRIES = 3;
|
|
6
|
+
function identityMismatch() {
|
|
7
|
+
return new CatalogGenerationError({
|
|
8
|
+
code: 'catalogGenerationIdentityMismatch',
|
|
9
|
+
message: 'Catalog source configuration changed while generation state was being read. Retry the operation.',
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
async function sourceIdentities(snapshot) {
|
|
13
|
+
return Object.fromEntries(await Promise.all(snapshot.config.sources.map(async (source) => [
|
|
14
|
+
source.id,
|
|
15
|
+
await calculateCatalogSourceIdentity(source),
|
|
16
|
+
])));
|
|
17
|
+
}
|
|
18
|
+
export async function readCatalogGenerationControlSnapshot(options = {}) {
|
|
19
|
+
const env = options.env ?? process.env;
|
|
20
|
+
if (options.configSnapshot) {
|
|
21
|
+
const generationState = await readCatalogGenerationState(env);
|
|
22
|
+
const currentConfig = await readCatalogSourcesConfigSnapshot(env);
|
|
23
|
+
if (currentConfig.digest !== options.configSnapshot.digest)
|
|
24
|
+
throw identityMismatch();
|
|
25
|
+
return {
|
|
26
|
+
configSnapshot: options.configSnapshot,
|
|
27
|
+
generationState,
|
|
28
|
+
sourceIdentities: await sourceIdentities(options.configSnapshot),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
for (let attempt = 0; attempt <= MAX_CONTROL_SNAPSHOT_RETRIES; attempt += 1) {
|
|
32
|
+
const configSnapshot = await readCatalogSourcesConfigSnapshot(env);
|
|
33
|
+
const generationState = await readCatalogGenerationState(env);
|
|
34
|
+
const currentConfig = await readCatalogSourcesConfigSnapshot(env);
|
|
35
|
+
if (currentConfig.digest === configSnapshot.digest) {
|
|
36
|
+
return {
|
|
37
|
+
configSnapshot,
|
|
38
|
+
generationState,
|
|
39
|
+
sourceIdentities: await sourceIdentities(configSnapshot),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
throw identityMismatch();
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=catalog-generation-control-snapshot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-generation-control-snapshot.js","sourceRoot":"","sources":["../../../src/utils/catalog-generation-control-snapshot.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EACL,gCAAgC,GAEjC,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A0B,CAAC,GAAG,CAAC,CAAC;QAC9D,MAAM,aAAa,GAAG,MAAM,gCAAgC,CAAC,GAAG,CAAC,CAAC;QAClE,IAAI,aAAa,CAAC,MAAM,KAAK,cAAc,CAAC,MAAM,EAAE,CAAC;YACnD,OAAO;gBACL,cAAc;gBACd,eAAe;gBACf,gBAAgB,EAAE,MAAM,gBAAgB,CAAC,cAAc,CAAC;aACzD,CAAC;QACJ,CAAC;IACH,CAAC;IACD,MAAM,gBAAgB,EAAE,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type CatalogGenerationErrorCode = 'catalogSourcesConfigInvalid' | 'catalogSourcesConfigRecoveryStale' | 'catalogSourcesConfigRecoveryFailed' | 'catalogGenerationStateInvalid' | 'catalogGenerationMetadataInvalid' | 'catalogGenerationUnavailable' | 'catalogGenerationSourceMissing' | 'catalogGenerationIdentityMismatch' | 'catalogGenerationReviewStale' | 'catalogReplaceDamagedRequired' | 'catalogGenerationActiveComparisonUnavailable' | 'catalogLogicalIdentityChanged' | 'catalogVersionConflict' | 'catalogRollbackDetected' | 'catalogImpactConfirmationRequired' | 'catalogGenerationRefreshFailed' | 'catalogGenerationPublishFailed';
|
|
2
|
+
export declare class CatalogGenerationError extends Error {
|
|
3
|
+
readonly code: CatalogGenerationErrorCode;
|
|
4
|
+
readonly sourceId?: string;
|
|
5
|
+
readonly impact?: CatalogSourceImpact;
|
|
6
|
+
constructor(options: {
|
|
7
|
+
code: CatalogGenerationErrorCode;
|
|
8
|
+
message: string;
|
|
9
|
+
sourceId?: string;
|
|
10
|
+
cause?: unknown;
|
|
11
|
+
impact?: CatalogSourceImpact;
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
export declare function catalogGenerationErrorCode(error: unknown): string;
|
|
15
|
+
export declare function isOfflineCleanupCatalogGenerationError(error: unknown): boolean;
|
|
16
|
+
import type { CatalogSourceImpact } from '../types.js';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export class CatalogGenerationError extends Error {
|
|
2
|
+
code;
|
|
3
|
+
sourceId;
|
|
4
|
+
impact;
|
|
5
|
+
constructor(options) {
|
|
6
|
+
super(options.message, options.cause === undefined ? undefined : { cause: options.cause });
|
|
7
|
+
this.name = 'CatalogGenerationError';
|
|
8
|
+
this.code = options.code;
|
|
9
|
+
this.sourceId = options.sourceId;
|
|
10
|
+
this.impact = options.impact;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export function catalogGenerationErrorCode(error) {
|
|
14
|
+
return error instanceof CatalogGenerationError
|
|
15
|
+
? error.code
|
|
16
|
+
: 'catalogGenerationFailed';
|
|
17
|
+
}
|
|
18
|
+
const OFFLINE_CLEANUP_ERROR_CODES = new Set([
|
|
19
|
+
'catalogSourcesConfigInvalid',
|
|
20
|
+
'catalogGenerationStateInvalid',
|
|
21
|
+
'catalogGenerationMetadataInvalid',
|
|
22
|
+
'catalogGenerationUnavailable',
|
|
23
|
+
'catalogGenerationSourceMissing',
|
|
24
|
+
'catalogGenerationIdentityMismatch',
|
|
25
|
+
]);
|
|
26
|
+
export function isOfflineCleanupCatalogGenerationError(error) {
|
|
27
|
+
return error instanceof CatalogGenerationError
|
|
28
|
+
&& OFFLINE_CLEANUP_ERROR_CODES.has(error.code);
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=catalog-generation-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-generation-error.js","sourceRoot":"","sources":["../../../src/utils/catalog-generation-error.ts"],"names":[],"mappings":"AAmBA,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IACtC,IAAI,CAA6B;IACjC,QAAQ,CAAU;IAClB,MAAM,CAAuB;IAEtC,YAAY,OAMX;QACC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;QAC3F,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;QACrC,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC/B,CAAC;CACF;AAED,MAAM,UAAU,0BAA0B,CAAC,KAAc;IACvD,OAAO,KAAK,YAAY,sBAAsB;QAC5C,CAAC,CAAC,KAAK,CAAC,IAAI;QACZ,CAAC,CAAC,yBAAyB,CAAC;AAChC,CAAC;AAED,MAAM,2BAA2B,GAA4C,IAAI,GAAG,CAAC;IACnF,6BAA6B;IAC7B,+BAA+B;IAC/B,kCAAkC;IAClC,8BAA8B;IAC9B,gCAAgC;IAChC,mCAAmC;CACpC,CAAC,CAAC;AAEH,MAAM,UAAU,sCAAsC,CAAC,KAAc;IACnE,OAAO,KAAK,YAAY,sBAAsB;WACzC,2BAA2B,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { CatalogGenerationActiveV1, CatalogGenerationSet, CatalogGenerationSetSource, PluginMeta } from '../types.js';
|
|
2
|
+
import { type CatalogGenerationControlSnapshot } from './catalog-generation-control-snapshot.js';
|
|
3
|
+
import { type CatalogStoreEntry } from './catalog-generation-store.js';
|
|
4
|
+
export interface ResolvedActiveCatalogGeneration extends CatalogGenerationSetSource {
|
|
5
|
+
active: CatalogGenerationActiveV1;
|
|
6
|
+
}
|
|
7
|
+
export interface ResolvedActiveCatalogPluginShallow {
|
|
8
|
+
sourceId: string;
|
|
9
|
+
sourceIdentity: string;
|
|
10
|
+
logicalIdentity: string;
|
|
11
|
+
catalogVersion: string;
|
|
12
|
+
snapshotPath: string;
|
|
13
|
+
plugin: PluginMeta;
|
|
14
|
+
}
|
|
15
|
+
export declare function readValidatedCatalogGenerationStoreEntry(options: {
|
|
16
|
+
logicalIdentity: string;
|
|
17
|
+
snapshotDigest: string;
|
|
18
|
+
env: NodeJS.ProcessEnv;
|
|
19
|
+
validatedStoreEntries?: Map<string, CatalogStoreEntry>;
|
|
20
|
+
validatingStoreEntries?: Map<string, Promise<CatalogStoreEntry>>;
|
|
21
|
+
}): Promise<CatalogStoreEntry>;
|
|
22
|
+
interface ResolveActiveCatalogGenerationOptions {
|
|
23
|
+
sourceId: string;
|
|
24
|
+
env?: NodeJS.ProcessEnv;
|
|
25
|
+
validatedStoreEntries?: Map<string, CatalogStoreEntry>;
|
|
26
|
+
validatingStoreEntries?: Map<string, Promise<CatalogStoreEntry>>;
|
|
27
|
+
}
|
|
28
|
+
export declare function resolveActiveCatalogGeneration(options: ResolveActiveCatalogGenerationOptions): Promise<ResolvedActiveCatalogGeneration>;
|
|
29
|
+
/** @internal Complete Active evidence for freshness checks before consumer compatibility gating. */
|
|
30
|
+
export declare function resolveValidatedActiveCatalogGeneration(options: ResolveActiveCatalogGenerationOptions): Promise<ResolvedActiveCatalogGeneration>;
|
|
31
|
+
export declare function resolveActiveCatalogPluginShallow(options: {
|
|
32
|
+
sourceId: string;
|
|
33
|
+
pluginName: string;
|
|
34
|
+
env?: NodeJS.ProcessEnv;
|
|
35
|
+
}): Promise<ResolvedActiveCatalogPluginShallow>;
|
|
36
|
+
export declare function calculateCatalogGenerationSetDigest(configDigest: string, primarySourceId: string, sources: CatalogGenerationSetSource[]): string;
|
|
37
|
+
export declare function resolveCatalogGenerationSet(options?: {
|
|
38
|
+
sourceIds?: string[];
|
|
39
|
+
env?: NodeJS.ProcessEnv;
|
|
40
|
+
controlSnapshot?: CatalogGenerationControlSnapshot;
|
|
41
|
+
validatedStoreEntries?: Map<string, CatalogStoreEntry>;
|
|
42
|
+
validatingStoreEntries?: Map<string, Promise<CatalogStoreEntry>>;
|
|
43
|
+
}): Promise<CatalogGenerationSet>;
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import crypto from 'node:crypto';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import fs from 'fs-extra';
|
|
4
|
+
import { IMPLEMENTED_AW_CAPABILITIES } from '../commands/aw-capabilities.js';
|
|
5
|
+
import { projectCatalogCapabilityCompatibility } from './catalog-capability-projection.js';
|
|
6
|
+
import { CatalogGenerationError } from './catalog-generation-error.js';
|
|
7
|
+
import { readCatalogGenerationControlSnapshot, } from './catalog-generation-control-snapshot.js';
|
|
8
|
+
import { CatalogProviderCompatibilityError } from './catalog-public-error.js';
|
|
9
|
+
import { createCatalogStoreKey, readCatalogSnapshotLogicalIdentity, readCatalogStoreMetadata, readCatalogStoreEntry, resolveCatalogStoreLocation, } from './catalog-generation-store.js';
|
|
10
|
+
import { calculateCatalogSourceConfigFingerprint } from './catalog-source-identity.js';
|
|
11
|
+
import { validatePluginManifest } from './manifest.js';
|
|
12
|
+
import { validateCatalogManifestV7 } from './catalog-manifest-v7.js';
|
|
13
|
+
import { calculateFileDigest } from './bundle-integrity.js';
|
|
14
|
+
import { calculateCatalogEntryArtifactDigest, calculateCatalogEntryContentDigest, } from './catalog-digests.js';
|
|
15
|
+
import { CURRENT_CATALOG_MANIFEST_FILE } from '../constants.js';
|
|
16
|
+
export async function readValidatedCatalogGenerationStoreEntry(options) {
|
|
17
|
+
const storeKey = createCatalogStoreKey(options.logicalIdentity, options.snapshotDigest);
|
|
18
|
+
const cached = options.validatedStoreEntries?.get(storeKey);
|
|
19
|
+
if (cached)
|
|
20
|
+
return cached;
|
|
21
|
+
let pending = options.validatingStoreEntries?.get(storeKey);
|
|
22
|
+
if (!pending) {
|
|
23
|
+
pending = readCatalogStoreEntry({
|
|
24
|
+
logicalIdentity: options.logicalIdentity,
|
|
25
|
+
snapshotDigest: options.snapshotDigest,
|
|
26
|
+
env: options.env,
|
|
27
|
+
});
|
|
28
|
+
options.validatingStoreEntries?.set(storeKey, pending);
|
|
29
|
+
}
|
|
30
|
+
try {
|
|
31
|
+
const entry = await pending;
|
|
32
|
+
options.validatedStoreEntries?.set(storeKey, entry);
|
|
33
|
+
return entry;
|
|
34
|
+
}
|
|
35
|
+
finally {
|
|
36
|
+
if (options.validatingStoreEntries?.get(storeKey) === pending) {
|
|
37
|
+
options.validatingStoreEntries.delete(storeKey);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
async function assertRegularDirectory(value, label) {
|
|
42
|
+
const stats = await fs.lstat(value);
|
|
43
|
+
if (!stats.isDirectory() || stats.isSymbolicLink()) {
|
|
44
|
+
throw new Error(`${label} must be a regular directory.`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
async function assertRegularFile(value, label) {
|
|
48
|
+
const stats = await fs.lstat(value);
|
|
49
|
+
if (!stats.isFile() || stats.isSymbolicLink()) {
|
|
50
|
+
throw new Error(`${label} must be a regular file.`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
async function resolveFromState(options) {
|
|
54
|
+
if (!options.active) {
|
|
55
|
+
throw new CatalogGenerationError({
|
|
56
|
+
code: 'catalogGenerationUnavailable',
|
|
57
|
+
sourceId: options.source.id,
|
|
58
|
+
message: `Catalog source "${options.source.id}" has no Active snapshot. Run aw catalog source sync ${options.source.id}.`,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
const fingerprint = calculateCatalogSourceConfigFingerprint(options.source);
|
|
62
|
+
if (options.active.sourceIdentity !== options.sourceIdentity
|
|
63
|
+
|| options.active.sourceConfigFingerprint !== fingerprint)
|
|
64
|
+
throw new CatalogGenerationError({
|
|
65
|
+
code: 'catalogGenerationIdentityMismatch',
|
|
66
|
+
sourceId: options.source.id,
|
|
67
|
+
message: `Active Catalog snapshot for source "${options.source.id}" does not match the current source configuration. Run aw catalog source sync ${options.source.id}.`,
|
|
68
|
+
});
|
|
69
|
+
const storeKey = createCatalogStoreKey(options.active.logicalIdentity, options.active.snapshotDigest);
|
|
70
|
+
const entry = await readValidatedCatalogGenerationStoreEntry({
|
|
71
|
+
logicalIdentity: options.active.logicalIdentity,
|
|
72
|
+
snapshotDigest: options.active.snapshotDigest,
|
|
73
|
+
env: options.env,
|
|
74
|
+
validatedStoreEntries: options.validatedStoreEntries,
|
|
75
|
+
validatingStoreEntries: options.validatingStoreEntries,
|
|
76
|
+
});
|
|
77
|
+
if (entry.metadata.manifestDigest !== options.active.manifestDigest) {
|
|
78
|
+
throw new CatalogGenerationError({
|
|
79
|
+
code: 'catalogGenerationIdentityMismatch',
|
|
80
|
+
sourceId: options.source.id,
|
|
81
|
+
message: `Active Catalog snapshot for source "${options.source.id}" does not match store metadata. Run aw catalog source sync ${options.source.id}.`,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
const compatibility = projectCatalogCapabilityCompatibility(entry.metadata.requiredAwCapabilities);
|
|
85
|
+
if (options.requireCompatibility && compatibility.state === 'unsupported') {
|
|
86
|
+
throw new CatalogProviderCompatibilityError({
|
|
87
|
+
sourceId: options.source.id,
|
|
88
|
+
requiredCapabilities: compatibility.requiredCapabilities,
|
|
89
|
+
missingCapabilities: compatibility.missingCapabilities,
|
|
90
|
+
availableCapabilities: IMPLEMENTED_AW_CAPABILITIES,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
sourceId: options.source.id,
|
|
95
|
+
sourceConfigFingerprint: options.active.sourceConfigFingerprint,
|
|
96
|
+
sourceIdentity: options.active.sourceIdentity,
|
|
97
|
+
logicalIdentity: options.active.logicalIdentity,
|
|
98
|
+
catalogVersion: entry.metadata.catalogVersion,
|
|
99
|
+
resolvedCommit: options.active.resolvedCommit,
|
|
100
|
+
manifestDigest: options.active.manifestDigest,
|
|
101
|
+
snapshotDigest: options.active.snapshotDigest,
|
|
102
|
+
storeKey,
|
|
103
|
+
snapshotPath: entry.snapshotRoot,
|
|
104
|
+
manifest: entry.manifest,
|
|
105
|
+
active: options.active,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
async function resolveActiveCatalogGenerationWithPolicy(options, requireCompatibility) {
|
|
109
|
+
const env = options.env ?? process.env;
|
|
110
|
+
const control = await readCatalogGenerationControlSnapshot({ env });
|
|
111
|
+
const source = control.configSnapshot.config.sources.find((entry) => entry.id === options.sourceId);
|
|
112
|
+
if (!source)
|
|
113
|
+
throw new CatalogGenerationError({
|
|
114
|
+
code: 'catalogGenerationSourceMissing',
|
|
115
|
+
sourceId: options.sourceId,
|
|
116
|
+
message: `Catalog source "${options.sourceId}" is not configured.`,
|
|
117
|
+
});
|
|
118
|
+
return resolveFromState({
|
|
119
|
+
source,
|
|
120
|
+
sourceIdentity: control.sourceIdentities[source.id],
|
|
121
|
+
active: control.generationState.sources[source.id]?.active,
|
|
122
|
+
env,
|
|
123
|
+
requireCompatibility,
|
|
124
|
+
validatedStoreEntries: options.validatedStoreEntries,
|
|
125
|
+
validatingStoreEntries: options.validatingStoreEntries,
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
export async function resolveActiveCatalogGeneration(options) {
|
|
129
|
+
return resolveActiveCatalogGenerationWithPolicy(options, true);
|
|
130
|
+
}
|
|
131
|
+
/** @internal Complete Active evidence for freshness checks before consumer compatibility gating. */
|
|
132
|
+
export async function resolveValidatedActiveCatalogGeneration(options) {
|
|
133
|
+
return resolveActiveCatalogGenerationWithPolicy(options, false);
|
|
134
|
+
}
|
|
135
|
+
export async function resolveActiveCatalogPluginShallow(options) {
|
|
136
|
+
const env = options.env ?? process.env;
|
|
137
|
+
const control = await readCatalogGenerationControlSnapshot({ env });
|
|
138
|
+
const source = control.configSnapshot.config.sources.find((entry) => entry.id === options.sourceId);
|
|
139
|
+
const active = control.generationState.sources[options.sourceId]?.active;
|
|
140
|
+
if (!source || !active)
|
|
141
|
+
throw new Error('Selected Catalog source has no Active snapshot.');
|
|
142
|
+
const sourceIdentity = control.sourceIdentities[source.id];
|
|
143
|
+
if (active.sourceIdentity !== sourceIdentity
|
|
144
|
+
|| active.sourceConfigFingerprint !== calculateCatalogSourceConfigFingerprint(source)) {
|
|
145
|
+
throw new Error('Active Catalog snapshot does not match the selected source configuration.');
|
|
146
|
+
}
|
|
147
|
+
const location = resolveCatalogStoreLocation({
|
|
148
|
+
logicalIdentity: active.logicalIdentity,
|
|
149
|
+
snapshotDigest: active.snapshotDigest,
|
|
150
|
+
env,
|
|
151
|
+
});
|
|
152
|
+
const metadata = await readCatalogStoreMetadata({
|
|
153
|
+
logicalIdentity: active.logicalIdentity,
|
|
154
|
+
snapshotDigest: active.snapshotDigest,
|
|
155
|
+
env,
|
|
156
|
+
});
|
|
157
|
+
if (metadata.manifestDigest !== active.manifestDigest
|
|
158
|
+
|| metadata.logicalIdentity !== active.logicalIdentity
|
|
159
|
+
|| metadata.snapshotDigest !== active.snapshotDigest) {
|
|
160
|
+
throw new Error('Active Catalog snapshot does not match its content-addressed store metadata.');
|
|
161
|
+
}
|
|
162
|
+
await assertRegularDirectory(location.storeRootDir, 'Catalog store root');
|
|
163
|
+
await assertRegularDirectory(location.logicalIdentityDirectory, 'Catalog logical identity store');
|
|
164
|
+
await assertRegularDirectory(location.entryDir, 'Catalog store entry');
|
|
165
|
+
await assertRegularDirectory(location.snapshotRoot, 'Catalog snapshot');
|
|
166
|
+
if (await readCatalogSnapshotLogicalIdentity(location.snapshotRoot) !== active.logicalIdentity) {
|
|
167
|
+
throw new Error('Catalog snapshot logical identity does not match Active state.');
|
|
168
|
+
}
|
|
169
|
+
const manifestPath = path.join(location.snapshotRoot, CURRENT_CATALOG_MANIFEST_FILE);
|
|
170
|
+
await assertRegularFile(manifestPath, 'Catalog manifest');
|
|
171
|
+
if (await calculateFileDigest(manifestPath) !== active.manifestDigest) {
|
|
172
|
+
throw new Error('Catalog manifest does not match Active state.');
|
|
173
|
+
}
|
|
174
|
+
const rawManifest = await fs.readJson(manifestPath);
|
|
175
|
+
const rawEntries = Array.isArray(rawManifest.entries) ? rawManifest.entries : [];
|
|
176
|
+
const rawEntry = rawEntries.find((entry) => entry !== null
|
|
177
|
+
&& typeof entry === 'object'
|
|
178
|
+
&& !Array.isArray(entry)
|
|
179
|
+
&& entry.name === options.pluginName);
|
|
180
|
+
if (!rawEntry)
|
|
181
|
+
throw new Error('Selected plugin is absent from the local Active snapshot.');
|
|
182
|
+
const manifest = validateCatalogManifestV7({ ...rawManifest, entries: [rawEntry] });
|
|
183
|
+
if (manifest.catalogVersion !== metadata.catalogVersion
|
|
184
|
+
|| manifest.channel !== metadata.channel
|
|
185
|
+
|| JSON.stringify(manifest.requires.aw.capabilities ?? [])
|
|
186
|
+
!== JSON.stringify(metadata.requiredAwCapabilities)) {
|
|
187
|
+
throw new Error('Catalog manifest does not match store metadata.');
|
|
188
|
+
}
|
|
189
|
+
const entry = manifest.entries[0];
|
|
190
|
+
const pluginsRoot = path.join(location.snapshotRoot, 'plugins');
|
|
191
|
+
const pluginRoot = path.resolve(pluginsRoot, entry.name);
|
|
192
|
+
if (path.dirname(pluginRoot) !== path.resolve(pluginsRoot)) {
|
|
193
|
+
throw new Error('Selected plugin path escapes the Catalog snapshot.');
|
|
194
|
+
}
|
|
195
|
+
await assertRegularDirectory(pluginsRoot, 'Catalog plugins root');
|
|
196
|
+
await assertRegularDirectory(pluginRoot, 'Selected plugin bundle');
|
|
197
|
+
const pluginManifestPath = path.join(pluginRoot, '.agents-plugin', 'plugin.json');
|
|
198
|
+
await assertRegularFile(pluginManifestPath, 'Selected plugin manifest');
|
|
199
|
+
const rawPluginManifest = await fs.readJson(pluginManifestPath);
|
|
200
|
+
const shallowManifestInput = { ...rawPluginManifest };
|
|
201
|
+
delete shallowManifestInput.dependencies;
|
|
202
|
+
const normalizedPluginManifest = validatePluginManifest(pluginRoot, shallowManifestInput);
|
|
203
|
+
const plugin = {
|
|
204
|
+
rootDir: pluginRoot,
|
|
205
|
+
manifestPath: pluginManifestPath,
|
|
206
|
+
manifest: normalizedPluginManifest,
|
|
207
|
+
};
|
|
208
|
+
if (plugin.manifest.name !== options.pluginName || plugin.manifest.version !== entry.version) {
|
|
209
|
+
throw new Error('Selected plugin bundle identity does not match its Catalog entry.');
|
|
210
|
+
}
|
|
211
|
+
const artifactDigest = await calculateCatalogEntryArtifactDigest(pluginRoot);
|
|
212
|
+
const contentDigest = await calculateCatalogEntryContentDigest(pluginRoot);
|
|
213
|
+
if (artifactDigest !== entry.artifactDigest
|
|
214
|
+
|| contentDigest !== entry.contentDigest) {
|
|
215
|
+
throw new Error('Selected plugin bundle does not match its Catalog entry.');
|
|
216
|
+
}
|
|
217
|
+
return {
|
|
218
|
+
sourceId: source.id,
|
|
219
|
+
sourceIdentity,
|
|
220
|
+
logicalIdentity: active.logicalIdentity,
|
|
221
|
+
catalogVersion: metadata.catalogVersion,
|
|
222
|
+
snapshotPath: location.snapshotRoot,
|
|
223
|
+
plugin,
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
export function calculateCatalogGenerationSetDigest(configDigest, primarySourceId, sources) {
|
|
227
|
+
const identity = sources.map((source) => ({
|
|
228
|
+
sourceId: source.sourceId,
|
|
229
|
+
sourceConfigFingerprint: source.sourceConfigFingerprint,
|
|
230
|
+
logicalIdentity: source.logicalIdentity,
|
|
231
|
+
snapshotDigest: source.snapshotDigest,
|
|
232
|
+
storeKey: source.storeKey,
|
|
233
|
+
}));
|
|
234
|
+
return `sha256:${crypto.createHash('sha256').update(JSON.stringify({
|
|
235
|
+
configDigest,
|
|
236
|
+
primarySourceId,
|
|
237
|
+
sources: identity,
|
|
238
|
+
})).digest('hex')}`;
|
|
239
|
+
}
|
|
240
|
+
export async function resolveCatalogGenerationSet(options = {}) {
|
|
241
|
+
const env = options.env ?? process.env;
|
|
242
|
+
const control = options.controlSnapshot ?? await readCatalogGenerationControlSnapshot({ env });
|
|
243
|
+
const requested = options.sourceIds ? new Set(options.sourceIds) : undefined;
|
|
244
|
+
if (requested) {
|
|
245
|
+
const configured = new Set(control.configSnapshot.config.sources.map((source) => source.id));
|
|
246
|
+
const missing = options.sourceIds.find((sourceId) => !configured.has(sourceId));
|
|
247
|
+
if (missing)
|
|
248
|
+
throw new CatalogGenerationError({
|
|
249
|
+
code: 'catalogGenerationSourceMissing',
|
|
250
|
+
sourceId: missing,
|
|
251
|
+
message: `Catalog source "${missing}" is not configured.`,
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
const selected = control.configSnapshot.config.sources.filter((source) => !requested || requested.has(source.id));
|
|
255
|
+
const resolved = await Promise.all(selected.map((source) => resolveFromState({
|
|
256
|
+
source,
|
|
257
|
+
sourceIdentity: control.sourceIdentities[source.id],
|
|
258
|
+
active: control.generationState.sources[source.id]?.active,
|
|
259
|
+
env,
|
|
260
|
+
requireCompatibility: true,
|
|
261
|
+
validatedStoreEntries: options.validatedStoreEntries,
|
|
262
|
+
validatingStoreEntries: options.validatingStoreEntries,
|
|
263
|
+
})));
|
|
264
|
+
const sources = resolved.map(({ active: _active, ...source }) => source);
|
|
265
|
+
const primarySourceId = control.configSnapshot.config.sources.find((source) => source.primary).id;
|
|
266
|
+
return {
|
|
267
|
+
configDigest: control.configSnapshot.digest,
|
|
268
|
+
primarySourceId,
|
|
269
|
+
sources,
|
|
270
|
+
generationSetDigest: calculateCatalogGenerationSetDigest(control.configSnapshot.digest, primarySourceId, sources),
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
//# sourceMappingURL=catalog-generation-resolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-generation-resolver.js","sourceRoot":"","sources":["../../../src/utils/catalog-generation-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,MAAM,UAAU,CAAC;AAU1B,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,qCAAqC,EAAE,MAAM,oCAAoC,CAAC;AAC3F,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACv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