@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
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
import crypto from 'node:crypto';
|
|
2
|
+
import { canonicalizePluginConfigValues, getManagedCommandArtifactTargets, getPluginConfigDependencyKeys, stablePluginConfigStringify, } from '@lesliechan721/aw-plugin-core/manifest';
|
|
3
|
+
import { discoverInstalledPluginManagedCommandPackages, } from './managed-command-materialization.js';
|
|
4
|
+
import { coercePluginConfigUpdates, readPluginConfigStore, resolveAwProjectRoot, resolveEffectivePluginConfigFromStores, } from './plugin-config.js';
|
|
5
|
+
function configIdentity(plugin) {
|
|
6
|
+
return plugin.sourceId ? {
|
|
7
|
+
sourceId: plugin.sourceId,
|
|
8
|
+
sourceIdentity: plugin.sourceIdentity,
|
|
9
|
+
logicalIdentity: plugin.catalogLogicalIdentity,
|
|
10
|
+
} : {};
|
|
11
|
+
}
|
|
12
|
+
function targetKey(target) {
|
|
13
|
+
return `${target.platform}\0${target.scope}\0${target.projectKey ?? ''}`;
|
|
14
|
+
}
|
|
15
|
+
function dedupeTargets(targets) {
|
|
16
|
+
const output = new Map();
|
|
17
|
+
for (const target of targets)
|
|
18
|
+
output.set(targetKey(target), target);
|
|
19
|
+
return [...output.values()];
|
|
20
|
+
}
|
|
21
|
+
function configValuesEqual(left, right, keys = [...new Set([...Object.keys(left), ...Object.keys(right)])]) {
|
|
22
|
+
return keys.every((key) => {
|
|
23
|
+
const leftHas = Object.hasOwn(left, key);
|
|
24
|
+
const rightHas = Object.hasOwn(right, key);
|
|
25
|
+
return leftHas === rightHas
|
|
26
|
+
&& (!leftHas || stablePluginConfigStringify(left[key]) === stablePluginConfigStringify(right[key]));
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function storeEvidence(store) {
|
|
30
|
+
return {
|
|
31
|
+
exists: store.exists,
|
|
32
|
+
state: store.state,
|
|
33
|
+
...(store.rawDigest ? { rawDigest: store.rawDigest } : {}),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function digestStores(stores) {
|
|
37
|
+
return `sha256:${crypto.createHash('sha256').update(JSON.stringify({
|
|
38
|
+
user: storeEvidence(stores.user),
|
|
39
|
+
...(stores.project ? { project: storeEvidence(stores.project) } : {}),
|
|
40
|
+
})).digest('hex')}`;
|
|
41
|
+
}
|
|
42
|
+
function cloneStore(store, values) {
|
|
43
|
+
const canonical = canonicalizePluginConfigValues(values);
|
|
44
|
+
return {
|
|
45
|
+
path: store.path,
|
|
46
|
+
exists: Object.keys(canonical).length > 0,
|
|
47
|
+
state: Object.keys(canonical).length > 0 ? 'ready' : 'missing',
|
|
48
|
+
values: canonical,
|
|
49
|
+
issues: [],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function targetArtifactDeclarations(plugin, target) {
|
|
53
|
+
return (plugin.manifest.artifacts?.targets ?? []).filter((declaration) => declaration.platform === target.platform
|
|
54
|
+
&& (declaration.target === 'codex.skill'
|
|
55
|
+
&& declaration.delivery.mode === 'codex-native'
|
|
56
|
+
|| declaration.scopes.includes(target.scope)));
|
|
57
|
+
}
|
|
58
|
+
function nativeDeclaration(declaration) {
|
|
59
|
+
return declaration.target === 'codex.skill'
|
|
60
|
+
&& declaration.delivery.mode === 'codex-native'
|
|
61
|
+
&& typeof declaration.skillKey === 'string';
|
|
62
|
+
}
|
|
63
|
+
function targetConfigConsumers(plugin, target) {
|
|
64
|
+
const consumers = targetArtifactDeclarations(plugin, target).map((declaration) => ({
|
|
65
|
+
id: declaration.id,
|
|
66
|
+
refreshKeys: declaration.refreshKeys,
|
|
67
|
+
scope: nativeDeclaration(declaration) ? 'user' : target.scope,
|
|
68
|
+
sharedNativeSkillKey: nativeDeclaration(declaration) ? declaration.skillKey : undefined,
|
|
69
|
+
platform: target.platform,
|
|
70
|
+
}));
|
|
71
|
+
for (const declaration of getManagedCommandArtifactTargets(plugin.manifest)) {
|
|
72
|
+
if (declaration.target !== 'aw.command-set' || declaration.platform !== target.platform)
|
|
73
|
+
continue;
|
|
74
|
+
const producer = declaration.producer;
|
|
75
|
+
if (producer.kind === 'package')
|
|
76
|
+
continue;
|
|
77
|
+
const artifact = producer.kind === 'artifact'
|
|
78
|
+
? plugin.manifest.artifacts?.targets?.find((entry) => entry.id === producer.artifactId)
|
|
79
|
+
: undefined;
|
|
80
|
+
const sharedNativeSkillKey = producer.kind === 'static-skill'
|
|
81
|
+
? producer.skillKey : artifact && nativeDeclaration(artifact) ? artifact.skillKey : undefined;
|
|
82
|
+
if (!sharedNativeSkillKey && !declaration.scopes.includes(target.scope))
|
|
83
|
+
continue;
|
|
84
|
+
consumers.push({
|
|
85
|
+
id: artifact?.id ?? declaration.id,
|
|
86
|
+
refreshKeys: declaration.refreshKeys,
|
|
87
|
+
scope: sharedNativeSkillKey ? 'user' : target.scope,
|
|
88
|
+
sharedNativeSkillKey,
|
|
89
|
+
platform: target.platform,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
return consumers;
|
|
93
|
+
}
|
|
94
|
+
function addSharedNativeConsumer(output, consumer) {
|
|
95
|
+
if (!consumer.sharedNativeSkillKey)
|
|
96
|
+
return;
|
|
97
|
+
const previous = output.get(consumer.id);
|
|
98
|
+
output.set(consumer.id, { id: consumer.id, skillKey: consumer.sharedNativeSkillKey,
|
|
99
|
+
...(consumer.platform === 'claude' ? { platform: 'claude' } : {}),
|
|
100
|
+
refreshKeys: [...new Set([...(previous?.refreshKeys ?? []), ...consumer.refreshKeys])] });
|
|
101
|
+
}
|
|
102
|
+
export function pluginSharedNativeConfigTargets(plugin) {
|
|
103
|
+
const targets = new Map();
|
|
104
|
+
for (const platform of ['codex', 'claude']) {
|
|
105
|
+
for (const consumer of targetConfigConsumers(plugin, { pluginName: plugin.manifest.name, platform, scope: 'user' })) {
|
|
106
|
+
if (consumer.refreshKeys.length > 0)
|
|
107
|
+
addSharedNativeConsumer(targets, consumer);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return [...targets.values()];
|
|
111
|
+
}
|
|
112
|
+
function rendererProjectionEqual(before, after, refreshKeys) {
|
|
113
|
+
const keys = new Set(refreshKeys);
|
|
114
|
+
if (!configValuesEqual(before.values, after.values, refreshKeys))
|
|
115
|
+
return false;
|
|
116
|
+
if ([...keys].some((key) => before.sources[key] !== after.sources[key]))
|
|
117
|
+
return false;
|
|
118
|
+
const issueProjection = (config) => config.issues
|
|
119
|
+
.filter((issue) => keys.has(issue.key))
|
|
120
|
+
.map((issue) => JSON.stringify(issue))
|
|
121
|
+
.sort((left, right) => left.localeCompare(right, 'en'));
|
|
122
|
+
return JSON.stringify(issueProjection(before)) === JSON.stringify(issueProjection(after));
|
|
123
|
+
}
|
|
124
|
+
function unknownImpact(options) {
|
|
125
|
+
const affectedTargets = dedupeTargets(options.visibleTargets);
|
|
126
|
+
const sharedNativeRenderTargets = new Map();
|
|
127
|
+
for (const target of affectedTargets) {
|
|
128
|
+
if (options.scope !== 'user')
|
|
129
|
+
continue;
|
|
130
|
+
for (const consumer of targetConfigConsumers(options.plugin, target)) {
|
|
131
|
+
if (consumer.refreshKeys.length > 0)
|
|
132
|
+
addSharedNativeConsumer(sharedNativeRenderTargets, consumer);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return {
|
|
136
|
+
impactState: 'unknown',
|
|
137
|
+
noEffectiveChange: false,
|
|
138
|
+
storeChanged: options.storeChanged,
|
|
139
|
+
storeDigest: digestStores(options.stores),
|
|
140
|
+
changedKeys: options.changedKeys,
|
|
141
|
+
updatedKeys: options.updatedKeys,
|
|
142
|
+
removedKeys: options.removedKeys,
|
|
143
|
+
staleRemovedKeys: options.staleRemovedKeys,
|
|
144
|
+
affectedTargets,
|
|
145
|
+
sharedNativeRenderTargets: [...sharedNativeRenderTargets.values()],
|
|
146
|
+
commandPackages: options.commands.packages,
|
|
147
|
+
affectedCommandPackages: options.commands.packages,
|
|
148
|
+
commandDiscoveryErrors: options.commands.errors,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
export async function analyzePluginConfigMutationImpact(options) {
|
|
152
|
+
const commands = options.commandDiscovery ?? await discoverInstalledPluginManagedCommandPackages({
|
|
153
|
+
plugin: options.plugin,
|
|
154
|
+
scope: options.scope,
|
|
155
|
+
cwd: options.cwd,
|
|
156
|
+
env: options.env ?? process.env,
|
|
157
|
+
platformTargets: options.visibleTargets,
|
|
158
|
+
});
|
|
159
|
+
const schema = options.plugin.manifest.config?.fields;
|
|
160
|
+
const needsProjectStore = options.scope === 'project'
|
|
161
|
+
|| options.visibleTargets.some((target) => target.scope === 'project')
|
|
162
|
+
|| commands.packages.some((target) => target.producer.scope === 'project');
|
|
163
|
+
const identity = configIdentity(options.plugin);
|
|
164
|
+
const readStore = async (scope) => {
|
|
165
|
+
try {
|
|
166
|
+
return await readPluginConfigStore({
|
|
167
|
+
...identity,
|
|
168
|
+
pluginName: options.plugin.manifest.name,
|
|
169
|
+
scope,
|
|
170
|
+
cwd: options.cwd,
|
|
171
|
+
env: options.env,
|
|
172
|
+
schema,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
catch {
|
|
176
|
+
return {
|
|
177
|
+
path: '',
|
|
178
|
+
exists: true,
|
|
179
|
+
state: 'invalid',
|
|
180
|
+
values: {},
|
|
181
|
+
invalidCode: 'invalidValues',
|
|
182
|
+
issues: ['The store cannot be read.'],
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
const [userStore, projectStore] = await Promise.all([
|
|
187
|
+
readStore('user'),
|
|
188
|
+
needsProjectStore
|
|
189
|
+
? readStore('project')
|
|
190
|
+
: undefined,
|
|
191
|
+
]);
|
|
192
|
+
const stores = { user: userStore, ...(projectStore ? { project: projectStore } : {}) };
|
|
193
|
+
const editedStore = options.scope === 'user' ? userStore : projectStore;
|
|
194
|
+
const requestedRemoveKeys = [...new Set(options.mutation.kind === 'patch' ? options.mutation.removeKeys ?? [] : [])];
|
|
195
|
+
let updatedKeys = [];
|
|
196
|
+
let removedKeys = [];
|
|
197
|
+
let staleRemovedKeys = [];
|
|
198
|
+
let coercedUpdates = {};
|
|
199
|
+
let storeChanged = options.mutation.kind === 'reset' && editedStore.exists;
|
|
200
|
+
if (editedStore.state !== 'invalid' && options.mutation.kind === 'reset') {
|
|
201
|
+
removedKeys = Object.keys(editedStore.values);
|
|
202
|
+
staleRemovedKeys = schema
|
|
203
|
+
? removedKeys.filter((key) => !schema[key])
|
|
204
|
+
: [...removedKeys];
|
|
205
|
+
}
|
|
206
|
+
if (editedStore.state !== 'invalid' && options.mutation.kind === 'patch' && schema) {
|
|
207
|
+
coercedUpdates = await coercePluginConfigUpdates({
|
|
208
|
+
schema,
|
|
209
|
+
updates: options.mutation.updates ?? {},
|
|
210
|
+
cwd: options.cwd,
|
|
211
|
+
});
|
|
212
|
+
for (const key of requestedRemoveKeys) {
|
|
213
|
+
if (!schema[key] && !Object.hasOwn(editedStore.values, key)) {
|
|
214
|
+
throw new Error(`Unknown config key "${key}".`);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
removedKeys = requestedRemoveKeys.filter((key) => Object.hasOwn(editedStore.values, key));
|
|
218
|
+
staleRemovedKeys = removedKeys.filter((key) => !schema[key]);
|
|
219
|
+
updatedKeys = Object.entries(coercedUpdates)
|
|
220
|
+
.filter(([key, value]) => !Object.hasOwn(editedStore.values, key)
|
|
221
|
+
|| stablePluginConfigStringify(editedStore.values[key])
|
|
222
|
+
!== stablePluginConfigStringify(value))
|
|
223
|
+
.map(([key]) => key);
|
|
224
|
+
storeChanged = updatedKeys.length > 0 || removedKeys.length > 0;
|
|
225
|
+
}
|
|
226
|
+
const changedKeys = [...updatedKeys, ...removedKeys];
|
|
227
|
+
if (!schema || editedStore.state === 'invalid') {
|
|
228
|
+
return unknownImpact({
|
|
229
|
+
commands,
|
|
230
|
+
stores,
|
|
231
|
+
plugin: options.plugin,
|
|
232
|
+
scope: options.scope,
|
|
233
|
+
visibleTargets: options.visibleTargets,
|
|
234
|
+
storeChanged: options.mutation.kind === 'reset' ? editedStore.exists : true,
|
|
235
|
+
changedKeys: changedKeys.length > 0
|
|
236
|
+
? changedKeys
|
|
237
|
+
: options.mutation.kind === 'patch'
|
|
238
|
+
? [...Object.keys(options.mutation.updates ?? {}), ...requestedRemoveKeys]
|
|
239
|
+
: [],
|
|
240
|
+
updatedKeys,
|
|
241
|
+
removedKeys,
|
|
242
|
+
staleRemovedKeys,
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
if (!storeChanged) {
|
|
246
|
+
return {
|
|
247
|
+
impactState: commands.errors.length > 0 ? 'unknown' : 'known',
|
|
248
|
+
noEffectiveChange: true,
|
|
249
|
+
storeChanged: false,
|
|
250
|
+
storeDigest: digestStores(stores),
|
|
251
|
+
changedKeys: [],
|
|
252
|
+
updatedKeys: [],
|
|
253
|
+
removedKeys: [],
|
|
254
|
+
staleRemovedKeys: [],
|
|
255
|
+
affectedTargets: [],
|
|
256
|
+
sharedNativeRenderTargets: [],
|
|
257
|
+
commandPackages: commands.packages,
|
|
258
|
+
affectedCommandPackages: [],
|
|
259
|
+
commandDiscoveryErrors: commands.errors,
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
const nextValues = options.mutation.kind === 'reset' ? {} : { ...editedStore.values };
|
|
263
|
+
if (options.mutation.kind === 'patch') {
|
|
264
|
+
for (const key of requestedRemoveKeys)
|
|
265
|
+
delete nextValues[key];
|
|
266
|
+
for (const [key, value] of Object.entries(coercedUpdates))
|
|
267
|
+
nextValues[key] = value;
|
|
268
|
+
}
|
|
269
|
+
const afterStores = {
|
|
270
|
+
user: options.scope === 'user' ? cloneStore(userStore, nextValues) : userStore,
|
|
271
|
+
...(projectStore ? {
|
|
272
|
+
project: options.scope === 'project' ? cloneStore(projectStore, nextValues) : projectStore,
|
|
273
|
+
} : {}),
|
|
274
|
+
};
|
|
275
|
+
const projectRoot = resolveAwProjectRoot(options.cwd);
|
|
276
|
+
const resolved = new Map();
|
|
277
|
+
const resolveScope = async (scope) => {
|
|
278
|
+
const existing = resolved.get(scope);
|
|
279
|
+
if (existing)
|
|
280
|
+
return existing;
|
|
281
|
+
const pair = {
|
|
282
|
+
before: await resolveEffectivePluginConfigFromStores({
|
|
283
|
+
pluginName: options.plugin.manifest.name,
|
|
284
|
+
manifest: options.plugin.manifest,
|
|
285
|
+
targetScope: scope,
|
|
286
|
+
projectRoot,
|
|
287
|
+
stores,
|
|
288
|
+
}),
|
|
289
|
+
after: await resolveEffectivePluginConfigFromStores({
|
|
290
|
+
pluginName: options.plugin.manifest.name,
|
|
291
|
+
manifest: options.plugin.manifest,
|
|
292
|
+
targetScope: scope,
|
|
293
|
+
projectRoot,
|
|
294
|
+
stores: afterStores,
|
|
295
|
+
}),
|
|
296
|
+
};
|
|
297
|
+
resolved.set(scope, pair);
|
|
298
|
+
return pair;
|
|
299
|
+
};
|
|
300
|
+
try {
|
|
301
|
+
const affectedTargets = [];
|
|
302
|
+
const affectedCommandPackages = [];
|
|
303
|
+
const sharedNativeRenderTargets = new Map();
|
|
304
|
+
for (const target of dedupeTargets(options.visibleTargets)) {
|
|
305
|
+
let affected = false;
|
|
306
|
+
const consumers = targetConfigConsumers(options.plugin, target);
|
|
307
|
+
if (options.plugin.manifest.scripts?.preApply
|
|
308
|
+
|| (options.plugin.manifest.dependencies?.length ?? 0) > 0) {
|
|
309
|
+
const config = await resolveScope(target.scope);
|
|
310
|
+
affected = !configValuesEqual(config.before.values, config.after.values);
|
|
311
|
+
}
|
|
312
|
+
for (const consumer of consumers) {
|
|
313
|
+
if (consumer.refreshKeys.length === 0)
|
|
314
|
+
continue;
|
|
315
|
+
const config = await resolveScope(consumer.scope);
|
|
316
|
+
const refreshKeys = getPluginConfigDependencyKeys(options.plugin.manifest.config, consumer.refreshKeys);
|
|
317
|
+
const changed = !rendererProjectionEqual(config.before, config.after, refreshKeys);
|
|
318
|
+
if (!changed)
|
|
319
|
+
continue;
|
|
320
|
+
affected = true;
|
|
321
|
+
addSharedNativeConsumer(sharedNativeRenderTargets, consumer);
|
|
322
|
+
}
|
|
323
|
+
if (affected)
|
|
324
|
+
affectedTargets.push(target);
|
|
325
|
+
}
|
|
326
|
+
const commandPackages = commands.packages.filter((target) => target.installed
|
|
327
|
+
|| affectedTargets.some((platformTarget) => options.plugin.manifest.managedCommands?.packages
|
|
328
|
+
.some((declaration) => declaration.key === target.packageKey
|
|
329
|
+
&& declaration.platforms.includes(platformTarget.platform))));
|
|
330
|
+
for (const target of commandPackages) {
|
|
331
|
+
if (!target.declared) {
|
|
332
|
+
affectedCommandPackages.push(target);
|
|
333
|
+
continue;
|
|
334
|
+
}
|
|
335
|
+
const config = await resolveScope(target.producer.scope);
|
|
336
|
+
const refreshKeys = getPluginConfigDependencyKeys(options.plugin.manifest.config, target.refreshKeys);
|
|
337
|
+
if (!rendererProjectionEqual(config.before, config.after, refreshKeys)) {
|
|
338
|
+
affectedCommandPackages.push(target);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
return {
|
|
342
|
+
impactState: commands.errors.length > 0 ? 'unknown' : 'known',
|
|
343
|
+
noEffectiveChange: affectedTargets.length === 0 && affectedCommandPackages.length === 0
|
|
344
|
+
&& commands.errors.length === 0,
|
|
345
|
+
storeChanged: true,
|
|
346
|
+
storeDigest: digestStores(stores),
|
|
347
|
+
changedKeys,
|
|
348
|
+
updatedKeys,
|
|
349
|
+
removedKeys,
|
|
350
|
+
staleRemovedKeys,
|
|
351
|
+
affectedTargets,
|
|
352
|
+
sharedNativeRenderTargets: [...sharedNativeRenderTargets.values()],
|
|
353
|
+
commandPackages,
|
|
354
|
+
affectedCommandPackages,
|
|
355
|
+
commandDiscoveryErrors: commands.errors,
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
catch {
|
|
359
|
+
return unknownImpact({
|
|
360
|
+
commands,
|
|
361
|
+
stores,
|
|
362
|
+
plugin: options.plugin,
|
|
363
|
+
scope: options.scope,
|
|
364
|
+
visibleTargets: options.visibleTargets,
|
|
365
|
+
storeChanged: true,
|
|
366
|
+
changedKeys,
|
|
367
|
+
updatedKeys,
|
|
368
|
+
removedKeys,
|
|
369
|
+
staleRemovedKeys,
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
//# sourceMappingURL=plugin-config-impact.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-config-impact.js","sourceRoot":"","sources":["../../../src/utils/plugin-config-impact.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,OAAO,EACL,8BAA8B,EAC9B,gCAAgC,EAChC,6BAA6B,EAC7B,2BAA2B,GAC5B,MAAM,wCAAwC,CAAC;AAShD,OAAO,EACL,6CAA6C,GAE9C,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,EACpB,sCAAsC,GAIvC,MAAM,oBAAoB,CAAC;AAiC5B,SAAS,cAAc,CAAC,MAAkB;IAKxC,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;QACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,cAAc,EAAE,MAAM,CA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E,IAAI;YAClB,WAAW,EAAE,YAAY,CAAC,MAAM,CAAC;YACjC,WAAW;YACX,WAAW;YACX,WAAW;YACX,gBAAgB;YAChB,eAAe;YACf,yBAAyB,EAAE,CAAC,GAAG,yBAAyB,CAAC,MAAM,EAAE,CAAC;YAClE,eAAe;YACf,uBAAuB;YACvB,sBAAsB,EAAE,QAAQ,CAAC,MAAM;SACxC,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,aAAa,CAAC;YACnB,QAAQ;YACR,MAAM;YACN,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,cAAc,EAAE,OAAO,CAAC,cAAc;YACtC,YAAY,EAAE,IAAI;YAClB,WAAW;YACX,WAAW;YACX,WAAW;YACX,gBAAgB;SACjB,CAAC,CAAC;IACL,CAAC;AACH,CAAC"}
|
|
@@ -1,54 +1,66 @@
|
|
|
1
|
-
import type { RebuildCommandRuntime } from '../commands/rebuild-command.js';
|
|
2
|
-
import {
|
|
3
|
-
import type
|
|
1
|
+
import type { PreApplyAuthorizationTarget, RebuildCommandRuntime } from '../commands/rebuild-command.js';
|
|
2
|
+
import { syncWriteCommand } from '../commands/write-commands.js';
|
|
3
|
+
import { type ConfigApplyResult, type ConfigReceiptFieldEntry, type ConfigMutationCommand, type ConfigMutationReceiptBase, type ConfigSchemaEvidence, type PluginMeta, type RebuildReceiptOverallState, type ReceiptTargetIdentity, type ReceiptTargetResult, type Scope } from '../types.js';
|
|
4
4
|
import { type NativeCliRunner } from './native-cli.js';
|
|
5
5
|
import { summarizeEffectivePluginConfig } from './plugin-config.js';
|
|
6
|
-
import { type ProjectBoundaryWarning } from './project-boundary.js';
|
|
7
6
|
import { type AwHomeMutationToken } from './aw-home-mutation-lock.js';
|
|
8
7
|
export interface PluginConfigWriteRequest {
|
|
9
8
|
updates?: Record<string, unknown>;
|
|
10
9
|
removeKeys?: string[];
|
|
11
10
|
}
|
|
12
|
-
export
|
|
11
|
+
export declare function buildConfigMutationReceipt<Command extends ConfigMutationCommand, Receipt extends Pick<ConfigMutationReceiptBase, 'ok' | 'overallState' | 'configWrite'>>(command: Command, receipt: Receipt): ConfigMutationReceiptBase<Command> & Receipt;
|
|
13
12
|
export interface PluginConfigWriteReceipt {
|
|
14
13
|
plugin: string;
|
|
15
14
|
scope: Scope;
|
|
16
|
-
projectLayer: 'shared' | 'local';
|
|
17
15
|
schema?: ConfigSchemaEvidence;
|
|
18
16
|
updatedKeys: string[];
|
|
19
17
|
removedKeys: string[];
|
|
20
|
-
|
|
18
|
+
staleRemovedKeys: string[];
|
|
19
|
+
effective?: ReturnType<typeof summarizeEffectivePluginConfig>;
|
|
21
20
|
configWrite: 'succeeded';
|
|
22
|
-
overallState:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
warnings: Array<ProjectBoundaryWarning | string>;
|
|
21
|
+
overallState: RebuildReceiptOverallState;
|
|
22
|
+
apply: ConfigApplyResult;
|
|
23
|
+
otherProjectsMayRequireSync: boolean;
|
|
24
|
+
warnings: string[];
|
|
27
25
|
}
|
|
28
26
|
export interface ResetPluginConfigWriteReceipt {
|
|
29
27
|
plugin: string;
|
|
30
28
|
scope: Scope;
|
|
31
|
-
projectLayer: 'shared' | 'local';
|
|
32
29
|
schema?: ConfigSchemaEvidence;
|
|
33
30
|
existed: boolean;
|
|
34
31
|
deleted: boolean;
|
|
32
|
+
resetDisposition: 'absent' | 'deletedFile' | 'unlinkedSymlink' | 'quarantinedDirectory';
|
|
33
|
+
quarantineBasename?: string;
|
|
35
34
|
removedKeys: string[];
|
|
36
35
|
effective?: ReturnType<typeof summarizeEffectivePluginConfig>;
|
|
37
36
|
configWrite: 'succeeded';
|
|
38
|
-
overallState:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
warnings: Array<ProjectBoundaryWarning | string>;
|
|
37
|
+
overallState: RebuildReceiptOverallState;
|
|
38
|
+
apply: ConfigApplyResult;
|
|
39
|
+
otherProjectsMayRequireSync: boolean;
|
|
40
|
+
warnings: string[];
|
|
43
41
|
}
|
|
44
|
-
type ReinstallCommand = typeof
|
|
42
|
+
type ReinstallCommand = typeof syncWriteCommand;
|
|
45
43
|
interface ConfigRuntimeReplayReceipt {
|
|
46
44
|
configWrite: 'succeeded';
|
|
47
|
-
overallState:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
otherProjectsRequireReinstall: boolean;
|
|
45
|
+
overallState: RebuildReceiptOverallState;
|
|
46
|
+
apply: ConfigApplyResult;
|
|
47
|
+
otherProjectsMayRequireSync: false;
|
|
51
48
|
}
|
|
49
|
+
export declare function configWriteStateForError(error: unknown): 'notStarted' | 'failed';
|
|
50
|
+
export declare function resolveConfigPreApplyAuthorization(options: {
|
|
51
|
+
plugin: PluginMeta;
|
|
52
|
+
scope: Scope;
|
|
53
|
+
cwd: string;
|
|
54
|
+
env?: NodeJS.ProcessEnv;
|
|
55
|
+
applyTargets: ReceiptTargetIdentity[];
|
|
56
|
+
nativeCliRunner?: NativeCliRunner;
|
|
57
|
+
rebuildRuntime?: RebuildCommandRuntime;
|
|
58
|
+
reinstallCommandImpl?: ReinstallCommand;
|
|
59
|
+
}): Promise<{
|
|
60
|
+
targets: PreApplyAuthorizationTarget[];
|
|
61
|
+
availableApplyTargets: ReceiptTargetIdentity[];
|
|
62
|
+
unavailableTargetResults: ReceiptTargetResult[];
|
|
63
|
+
}>;
|
|
52
64
|
export declare function replayConfigRuntimeWrites(options: {
|
|
53
65
|
plugin: PluginMeta;
|
|
54
66
|
scope: Scope;
|
|
@@ -60,13 +72,15 @@ export declare function replayConfigRuntimeWrites(options: {
|
|
|
60
72
|
reinstallCommandImpl?: ReinstallCommand;
|
|
61
73
|
rebuildRuntime?: RebuildCommandRuntime;
|
|
62
74
|
awHomeMutationToken?: AwHomeMutationToken;
|
|
75
|
+
sharedNativeApplyConfirmed?: boolean;
|
|
76
|
+
preApplyConfirmed?: boolean;
|
|
77
|
+
preApplyAuthorizedTargets?: readonly PreApplyAuthorizationTarget[];
|
|
63
78
|
}): Promise<ConfigRuntimeReplayReceipt>;
|
|
64
79
|
type ApplyPluginConfigWriteOptions = {
|
|
65
80
|
plugin?: PluginMeta | null;
|
|
66
81
|
pluginError?: Error | null;
|
|
67
82
|
pluginName?: string;
|
|
68
83
|
scope: Scope;
|
|
69
|
-
projectLayer?: 'shared' | 'local';
|
|
70
84
|
cwd: string;
|
|
71
85
|
env?: NodeJS.ProcessEnv;
|
|
72
86
|
applyTargets?: ReceiptTargetIdentity[];
|
|
@@ -75,32 +89,43 @@ type ApplyPluginConfigWriteOptions = {
|
|
|
75
89
|
rebuildRuntime?: RebuildCommandRuntime;
|
|
76
90
|
awHomeMutationToken?: AwHomeMutationToken;
|
|
77
91
|
request: PluginConfigWriteRequest;
|
|
92
|
+
apply?: boolean;
|
|
93
|
+
sharedNativeApplyConfirmed?: boolean;
|
|
94
|
+
preApplyConfirmed?: boolean;
|
|
95
|
+
preApplyAuthorizedTargets?: readonly PreApplyAuthorizationTarget[];
|
|
78
96
|
reviewPreflight?: () => Promise<void> | void;
|
|
79
97
|
};
|
|
80
98
|
export declare function applyPluginConfigWrite(options: ApplyPluginConfigWriteOptions): Promise<PluginConfigWriteReceipt>;
|
|
81
99
|
type ResetPluginConfigWriteOptions = {
|
|
82
100
|
pluginName: string;
|
|
101
|
+
sourceId?: string;
|
|
102
|
+
sourceIdentity?: string;
|
|
103
|
+
logicalIdentity?: string;
|
|
83
104
|
scope: Scope;
|
|
84
|
-
projectLayer?: 'shared' | 'local';
|
|
85
105
|
cwd: string;
|
|
86
106
|
env?: NodeJS.ProcessEnv;
|
|
87
|
-
plugin
|
|
107
|
+
plugin?: PluginMeta | null;
|
|
108
|
+
pluginError?: Error | null;
|
|
88
109
|
applyTargets?: ReceiptTargetIdentity[];
|
|
89
110
|
nativeCliRunner?: NativeCliRunner;
|
|
90
111
|
reinstallCommandImpl?: ReinstallCommand;
|
|
91
112
|
rebuildRuntime?: RebuildCommandRuntime;
|
|
92
113
|
awHomeMutationToken?: AwHomeMutationToken;
|
|
93
114
|
reviewPreflight?: () => Promise<void> | void;
|
|
115
|
+
apply?: boolean;
|
|
116
|
+
sharedNativeApplyConfirmed?: boolean;
|
|
117
|
+
preApplyConfirmed?: boolean;
|
|
118
|
+
preApplyAuthorizedTargets?: readonly PreApplyAuthorizationTarget[];
|
|
94
119
|
};
|
|
95
120
|
export declare function resetPluginConfigWithHelper(options: ResetPluginConfigWriteOptions): Promise<ResetPluginConfigWriteReceipt>;
|
|
96
121
|
export declare function describeResetAffectedFields(options: {
|
|
97
122
|
sourceId?: string;
|
|
98
123
|
sourceIdentity?: string;
|
|
124
|
+
logicalIdentity?: string;
|
|
99
125
|
pluginName: string;
|
|
100
126
|
plugin?: PluginMeta | null;
|
|
101
127
|
pluginError?: Error | null;
|
|
102
128
|
scope: Scope;
|
|
103
|
-
projectLayer?: 'shared' | 'local';
|
|
104
129
|
cwd: string;
|
|
105
130
|
env?: NodeJS.ProcessEnv;
|
|
106
131
|
}): Promise<ConfigReceiptFieldEntry[]>;
|