@lesliechan721/aw 0.1.0-beta.8 → 0.1.0-beta.80
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 +221 -0
- package/dist/authoring/assets/aw-runtime-config.mjs.map +1 -0
- package/dist/authoring/scripts/add-skill.mjs +17 -40
- package/dist/authoring/scripts/add-skill.mjs.map +1 -1
- package/dist/authoring/scripts/init-plugin.mjs +74 -98
- 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 +230 -9
- package/dist/authoring/scripts/lib/plugin-version-check.mjs.map +1 -1
- package/dist/authoring/scripts/lib/skill-scaffold.d.mts +79 -92
- package/dist/authoring/scripts/lib/skill-scaffold.mjs +103 -127
- package/dist/authoring/scripts/lib/skill-scaffold.mjs.map +1 -1
- package/dist/authoring/scripts/remove-plugin.mjs +2 -2
- package/dist/authoring/scripts/remove-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/validate-plugin.mjs +459 -2843
- package/dist/authoring/scripts/validate-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/validate-skill.mjs +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 +30 -0
- package/dist/scripts/aw-skill-eval-materializer.js +278 -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 +27 -8
- package/dist/scripts/bundle-plugins.js.map +1 -1
- package/dist/scripts/plugin-staging.d.ts +7 -8
- package/dist/scripts/plugin-staging.js +16 -15
- 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 +273 -78
- 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.map +1 -1
- package/dist/src/authoring/workspace-commands.d.ts +5 -1
- package/dist/src/authoring/workspace-commands.js +7 -2
- package/dist/src/authoring/workspace-commands.js.map +1 -1
- package/dist/src/commands/aw-capabilities.d.ts +2 -2
- package/dist/src/commands/aw-capabilities.js +41 -29
- package/dist/src/commands/aw-capabilities.js.map +1 -1
- package/dist/src/commands/catalog-dev-source.d.ts +58 -13
- package/dist/src/commands/catalog-dev-source.js +549 -305
- package/dist/src/commands/catalog-dev-source.js.map +1 -1
- package/dist/src/commands/catalog-generation.d.ts +14 -19
- package/dist/src/commands/catalog-generation.js +5 -10
- package/dist/src/commands/catalog-generation.js.map +1 -1
- package/dist/src/commands/catalog-publication-inspection.d.ts +70 -29
- package/dist/src/commands/catalog-publication-inspection.js +475 -62
- 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 +2 -1
- package/dist/src/commands/catalog-publication-target.js +37 -2
- package/dist/src/commands/catalog-publication-target.js.map +1 -1
- package/dist/src/commands/catalog-publish.d.ts +82 -15
- package/dist/src/commands/catalog-publish.js +722 -219
- package/dist/src/commands/catalog-publish.js.map +1 -1
- package/dist/src/commands/catalog-source.d.ts +55 -35
- package/dist/src/commands/catalog-source.js +298 -148
- package/dist/src/commands/catalog-source.js.map +1 -1
- package/dist/src/commands/catalog-status.d.ts +6 -26
- package/dist/src/commands/catalog-status.js +9 -147
- 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 +17 -0
- package/dist/src/commands/catalog-workspace-resolution.js +57 -0
- package/dist/src/commands/catalog-workspace-resolution.js.map +1 -0
- package/dist/src/commands/console.js +32 -20
- 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/deployment-confirmation.d.ts +4 -0
- package/dist/src/commands/deployment-confirmation.js +20 -0
- package/dist/src/commands/deployment-confirmation.js.map +1 -0
- 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/intent-command.d.ts +32 -0
- package/dist/src/commands/intent-command.js +171 -0
- package/dist/src/commands/intent-command.js.map +1 -0
- package/dist/src/commands/managed-commands.d.ts +35 -0
- package/dist/src/commands/managed-commands.js +361 -0
- package/dist/src/commands/managed-commands.js.map +1 -0
- package/dist/src/commands/offline-cleanup-evidence.d.ts +46 -0
- package/dist/src/commands/offline-cleanup-evidence.js +158 -10
- package/dist/src/commands/offline-cleanup-evidence.js.map +1 -1
- package/dist/src/commands/operation-plan.d.ts +190 -0
- package/dist/src/commands/operation-plan.js +99 -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 +16 -20
- package/dist/src/commands/options.js +94 -41
- package/dist/src/commands/options.js.map +1 -1
- package/dist/src/commands/plugin-capabilities.js +88 -45
- package/dist/src/commands/plugin-capabilities.js.map +1 -1
- package/dist/src/commands/public-config-confirmation.d.ts +8 -0
- package/dist/src/commands/public-config-confirmation.js +56 -0
- package/dist/src/commands/public-config-confirmation.js.map +1 -0
- package/dist/src/commands/public-interruption.d.ts +9 -0
- package/dist/src/commands/public-interruption.js +23 -0
- package/dist/src/commands/public-interruption.js.map +1 -0
- package/dist/src/commands/public-lifecycle-result.d.ts +102 -0
- package/dist/src/commands/public-lifecycle-result.js +307 -0
- package/dist/src/commands/public-lifecycle-result.js.map +1 -0
- package/dist/src/commands/public-lifecycle.d.ts +28 -0
- package/dist/src/commands/public-lifecycle.js +492 -0
- package/dist/src/commands/public-lifecycle.js.map +1 -0
- package/dist/src/commands/public-plugin-query.d.ts +16 -0
- package/dist/src/commands/public-plugin-query.js +193 -0
- package/dist/src/commands/public-plugin-query.js.map +1 -0
- package/dist/src/commands/rebuild-command.d.ts +166 -28
- package/dist/src/commands/rebuild-command.js +3745 -813
- package/dist/src/commands/rebuild-command.js.map +1 -1
- package/dist/src/commands/rebuild-integration.d.ts +137 -25
- package/dist/src/commands/rebuild-integration.js +1343 -2535
- package/dist/src/commands/rebuild-integration.js.map +1 -1
- package/dist/src/commands/rebuild-operations.d.ts +73 -22
- package/dist/src/commands/rebuild-operations.js +313 -216
- package/dist/src/commands/rebuild-operations.js.map +1 -1
- package/dist/src/commands/rebuild-platform-integration.d.ts +62 -0
- package/dist/src/commands/rebuild-platform-integration.js +1317 -0
- package/dist/src/commands/rebuild-platform-integration.js.map +1 -0
- 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 +436 -0
- package/dist/src/commands/review-inspection.js.map +1 -0
- package/dist/src/commands/review-preparation.d.ts +51 -0
- package/dist/src/commands/review-preparation.js +400 -0
- package/dist/src/commands/review-preparation.js.map +1 -0
- package/dist/src/commands/runtime.d.ts +6 -6
- package/dist/src/commands/runtime.js +44 -24
- package/dist/src/commands/runtime.js.map +1 -1
- package/dist/src/commands/skill-eval.d.ts +41 -0
- package/dist/src/commands/skill-eval.js +407 -0
- package/dist/src/commands/skill-eval.js.map +1 -0
- package/dist/src/commands/status-v6.d.ts +319 -0
- package/dist/src/commands/status-v6.js +2979 -0
- package/dist/src/commands/status-v6.js.map +1 -0
- package/dist/src/commands/targets-command.d.ts +38 -0
- package/dist/src/commands/targets-command.js +182 -0
- package/dist/src/commands/targets-command.js.map +1 -0
- package/dist/src/commands/wizard.d.ts +8 -5
- package/dist/src/commands/wizard.js +7 -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 +143 -85
- package/dist/src/commands/write-commands.js.map +1 -1
- package/dist/src/constants.d.ts +6 -6
- package/dist/src/constants.js +6 -6
- package/dist/src/constants.js.map +1 -1
- package/dist/src/eval/manifest-v1.d.ts +70 -0
- package/dist/src/eval/manifest-v1.js +358 -0
- package/dist/src/eval/manifest-v1.js.map +1 -0
- package/dist/src/generators/local-plugin.d.ts +7 -2
- package/dist/src/generators/local-plugin.js +313 -389
- 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 +2 -31
- package/dist/src/index.js +1666 -1827
- package/dist/src/index.js.map +1 -1
- package/dist/src/intent/deployment-preferences.d.ts +63 -0
- package/dist/src/intent/deployment-preferences.js +170 -0
- package/dist/src/intent/deployment-preferences.js.map +1 -0
- package/dist/src/intent/diagnostics.d.ts +11 -0
- package/dist/src/intent/diagnostics.js +14 -0
- package/dist/src/intent/diagnostics.js.map +1 -0
- package/dist/src/intent/intent-codec.d.ts +19 -0
- package/dist/src/intent/intent-codec.js +117 -0
- package/dist/src/intent/intent-codec.js.map +1 -0
- package/dist/src/intent/intent-store.d.ts +43 -0
- package/dist/src/intent/intent-store.js +118 -0
- package/dist/src/intent/intent-store.js.map +1 -0
- package/dist/src/intent/scope-context.d.ts +33 -0
- package/dist/src/intent/scope-context.js +149 -0
- package/dist/src/intent/scope-context.js.map +1 -0
- package/dist/src/intent/work-context.d.ts +13 -0
- package/dist/src/intent/work-context.js +22 -0
- package/dist/src/intent/work-context.js.map +1 -0
- package/dist/src/output/command-receipt.d.ts +47 -46
- package/dist/src/output/command-receipt.js +286 -79
- package/dist/src/output/command-receipt.js.map +1 -1
- package/dist/src/output/model.d.ts +3 -11
- package/dist/src/output/native-consent.d.ts +2 -0
- package/dist/src/output/native-consent.js +5 -0
- package/dist/src/output/native-consent.js.map +1 -0
- package/dist/src/output/public-result.d.ts +49 -0
- package/dist/src/output/public-result.js +240 -0
- package/dist/src/output/public-result.js.map +1 -0
- package/dist/src/output/rebuild-progress.js +20 -15
- package/dist/src/output/rebuild-progress.js.map +1 -1
- package/dist/src/output/receipt-projection.d.ts +7 -0
- package/dist/src/output/receipt-projection.js +592 -0
- package/dist/src/output/receipt-projection.js.map +1 -0
- package/dist/src/platforms/capabilities.d.ts +12 -0
- package/dist/src/platforms/capabilities.js +205 -0
- package/dist/src/platforms/capabilities.js.map +1 -0
- package/dist/src/platforms/contracts.d.ts +358 -0
- package/dist/src/platforms/contracts.js +2 -0
- package/dist/src/platforms/contracts.js.map +1 -0
- package/dist/src/platforms/cursor-workspace-hook.d.ts +28 -0
- package/dist/src/platforms/cursor-workspace-hook.js +198 -0
- package/dist/src/platforms/cursor-workspace-hook.js.map +1 -0
- package/dist/src/platforms/discovery.d.ts +91 -0
- package/dist/src/platforms/discovery.js +653 -0
- package/dist/src/platforms/discovery.js.map +1 -0
- package/dist/src/platforms/gemini-activation.d.ts +36 -0
- package/dist/src/platforms/gemini-activation.js +331 -0
- package/dist/src/platforms/gemini-activation.js.map +1 -0
- package/dist/src/platforms/gemini-consent.d.ts +8 -0
- package/dist/src/platforms/gemini-consent.js +81 -0
- package/dist/src/platforms/gemini-consent.js.map +1 -0
- package/dist/src/platforms/identity.d.ts +4 -0
- package/dist/src/platforms/identity.js +22 -0
- package/dist/src/platforms/identity.js.map +1 -0
- package/dist/src/platforms/inspection-grok.d.ts +4 -0
- package/dist/src/platforms/inspection-grok.js +212 -0
- package/dist/src/platforms/inspection-grok.js.map +1 -0
- package/dist/src/platforms/inspection-native.d.ts +6 -0
- package/dist/src/platforms/inspection-native.js +406 -0
- package/dist/src/platforms/inspection-native.js.map +1 -0
- package/dist/src/platforms/inspection-opencode.d.ts +4 -0
- package/dist/src/platforms/inspection-opencode.js +98 -0
- package/dist/src/platforms/inspection-opencode.js.map +1 -0
- package/dist/src/platforms/inspection-pi.d.ts +3 -0
- package/dist/src/platforms/inspection-pi.js +282 -0
- package/dist/src/platforms/inspection-pi.js.map +1 -0
- package/dist/src/platforms/inspection-query.d.ts +12 -0
- package/dist/src/platforms/inspection-query.js +96 -0
- package/dist/src/platforms/inspection-query.js.map +1 -0
- package/dist/src/platforms/inspection.d.ts +17 -0
- package/dist/src/platforms/inspection.js +227 -0
- package/dist/src/platforms/inspection.js.map +1 -0
- package/dist/src/platforms/layout.d.ts +21 -0
- package/dist/src/platforms/layout.js +239 -0
- package/dist/src/platforms/layout.js.map +1 -0
- package/dist/src/platforms/lifecycle-native-services.d.ts +3 -0
- package/dist/src/platforms/lifecycle-native-services.js +147 -0
- package/dist/src/platforms/lifecycle-native-services.js.map +1 -0
- package/dist/src/platforms/lifecycle-native.d.ts +13 -0
- package/dist/src/platforms/lifecycle-native.js +283 -0
- package/dist/src/platforms/lifecycle-native.js.map +1 -0
- package/dist/src/platforms/lifecycle.d.ts +25 -0
- package/dist/src/platforms/lifecycle.js +494 -0
- package/dist/src/platforms/lifecycle.js.map +1 -0
- package/dist/src/platforms/managed-command-placement.d.ts +8 -0
- package/dist/src/platforms/managed-command-placement.js +79 -0
- package/dist/src/platforms/managed-command-placement.js.map +1 -0
- package/dist/src/platforms/projection-code-extension.d.ts +8 -0
- package/dist/src/platforms/projection-code-extension.js +121 -0
- package/dist/src/platforms/projection-code-extension.js.map +1 -0
- package/dist/src/platforms/projection-command-resources.d.ts +7 -0
- package/dist/src/platforms/projection-command-resources.js +74 -0
- package/dist/src/platforms/projection-command-resources.js.map +1 -0
- package/dist/src/platforms/projection-files.d.ts +27 -0
- package/dist/src/platforms/projection-files.js +111 -0
- package/dist/src/platforms/projection-files.js.map +1 -0
- package/dist/src/platforms/projection-marketplace.d.ts +19 -0
- package/dist/src/platforms/projection-marketplace.js +42 -0
- package/dist/src/platforms/projection-marketplace.js.map +1 -0
- package/dist/src/platforms/projection.d.ts +10 -0
- package/dist/src/platforms/projection.js +446 -0
- package/dist/src/platforms/projection.js.map +1 -0
- package/dist/src/platforms/registry.d.ts +4 -0
- package/dist/src/platforms/registry.js +30 -0
- package/dist/src/platforms/registry.js.map +1 -0
- package/dist/src/platforms/supplement-layout.d.ts +16 -0
- package/dist/src/platforms/supplement-layout.js +31 -0
- package/dist/src/platforms/supplement-layout.js.map +1 -0
- package/dist/src/platforms/supplement-state.d.ts +13 -0
- package/dist/src/platforms/supplement-state.js +82 -0
- package/dist/src/platforms/supplement-state.js.map +1 -0
- package/dist/src/portable/commands.d.ts +58 -11
- package/dist/src/portable/commands.js +94 -350
- package/dist/src/portable/commands.js.map +1 -1
- package/dist/src/portable/historical-materialization.d.ts +22 -0
- package/dist/src/portable/historical-materialization.js +124 -0
- package/dist/src/portable/historical-materialization.js.map +1 -0
- package/dist/src/portable/materializer.d.ts +24 -4
- package/dist/src/portable/materializer.js +189 -259
- package/dist/src/portable/materializer.js.map +1 -1
- package/dist/src/portable/recovery-layout.d.ts +17 -0
- package/dist/src/portable/recovery-layout.js +42 -0
- package/dist/src/portable/recovery-layout.js.map +1 -0
- package/dist/src/portable/recovery.d.ts +153 -0
- package/dist/src/portable/recovery.js +367 -0
- package/dist/src/portable/recovery.js.map +1 -0
- package/dist/src/portable/writer.d.ts +67 -0
- package/dist/src/portable/writer.js +321 -0
- package/dist/src/portable/writer.js.map +1 -0
- package/dist/src/recovery/coordinator.d.ts +141 -0
- package/dist/src/recovery/coordinator.js +1254 -0
- package/dist/src/recovery/coordinator.js.map +1 -0
- package/dist/src/recovery/demand.d.ts +51 -0
- package/dist/src/recovery/demand.js +159 -0
- package/dist/src/recovery/demand.js.map +1 -0
- package/dist/src/recovery/joint-coordinator.d.ts +25 -0
- package/dist/src/recovery/joint-coordinator.js +991 -0
- package/dist/src/recovery/joint-coordinator.js.map +1 -0
- package/dist/src/recovery/joint-demand.d.ts +50 -0
- package/dist/src/recovery/joint-demand.js +197 -0
- package/dist/src/recovery/joint-demand.js.map +1 -0
- package/dist/src/recovery/performance.d.ts +4 -0
- package/dist/src/recovery/performance.js +26 -0
- package/dist/src/recovery/performance.js.map +1 -0
- package/dist/src/recovery/receipt.d.ts +98 -0
- package/dist/src/recovery/receipt.js +2 -0
- package/dist/src/recovery/receipt.js.map +1 -0
- package/dist/src/recovery/retirement.d.ts +47 -0
- package/dist/src/recovery/retirement.js +469 -0
- package/dist/src/recovery/retirement.js.map +1 -0
- package/dist/src/recovery/status.d.ts +126 -0
- package/dist/src/recovery/status.js +1073 -0
- package/dist/src/recovery/status.js.map +1 -0
- package/dist/src/recovery/types.d.ts +85 -0
- package/dist/src/recovery/types.js +2 -0
- package/dist/src/recovery/types.js.map +1 -0
- 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/platform-profile.d.ts +3 -0
- package/dist/src/review/platform-profile.js +14 -0
- package/dist/src/review/platform-profile.js.map +1 -0
- package/dist/src/review/review-profile.d.ts +20 -0
- package/dist/src/review/review-profile.js +276 -0
- package/dist/src/review/review-profile.js.map +1 -0
- package/dist/src/review/review-selection.d.ts +20 -0
- package/dist/src/review/review-selection.js +495 -0
- package/dist/src/review/review-selection.js.map +1 -0
- package/dist/src/review/review-types.d.ts +71 -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 +62 -0
- package/dist/src/review/skill-materialization.js +205 -0
- package/dist/src/review/skill-materialization.js.map +1 -0
- package/dist/src/review/source-binding.d.ts +201 -0
- package/dist/src/review/source-binding.js +773 -0
- package/dist/src/review/source-binding.js.map +1 -0
- package/dist/src/tui/agent-management.d.ts +23 -0
- package/dist/src/tui/agent-management.js +319 -0
- package/dist/src/tui/agent-management.js.map +1 -0
- package/dist/src/tui/agent-settings.d.ts +47 -0
- package/dist/src/tui/agent-settings.js +97 -0
- package/dist/src/tui/agent-settings.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 +18 -53
- package/dist/src/tui/catalog-generation.js +136 -224
- package/dist/src/tui/catalog-generation.js.map +1 -1
- 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 +113 -3
- package/dist/src/tui/components.js +201 -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 +43 -0
- package/dist/src/tui/config-leaf-editor.js +224 -0
- package/dist/src/tui/config-leaf-editor.js.map +1 -0
- package/dist/src/tui/config-references.d.ts +38 -0
- package/dist/src/tui/config-references.js +82 -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 +13 -4
- package/dist/src/tui/console-app-v4.js +9764 -2210
- 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 +7 -4
- package/dist/src/tui/controller-runtime.js +2064 -779
- package/dist/src/tui/controller-runtime.js.map +1 -1
- package/dist/src/tui/controller.d.ts +669 -106
- package/dist/src/tui/controller.js +3617 -971
- 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/deployment-view.d.ts +10 -0
- package/dist/src/tui/deployment-view.js +108 -0
- package/dist/src/tui/deployment-view.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 +6 -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 +298 -0
- package/dist/src/tui/entity-cards.js.map +1 -0
- package/dist/src/tui/glossary.d.ts +25 -0
- package/dist/src/tui/glossary.js +72 -0
- package/dist/src/tui/glossary.js.map +1 -0
- package/dist/src/tui/index.d.ts +6 -2
- package/dist/src/tui/index.js +5 -2
- package/dist/src/tui/index.js.map +1 -1
- package/dist/src/tui/input-display.d.ts +1 -0
- package/dist/src/tui/input-display.js +23 -1
- package/dist/src/tui/input-display.js.map +1 -1
- 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 +243 -45
- package/dist/src/tui/model.js +1402 -415
- 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 +72 -0
- package/dist/src/tui/operation-diagnostic-screens.js.map +1 -0
- package/dist/src/tui/operation-history.d.ts +82 -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 +28 -0
- package/dist/src/tui/operation-review-planner.js +1396 -0
- package/dist/src/tui/operation-review-planner.js.map +1 -0
- package/dist/src/tui/plugin-content.d.ts +33 -0
- package/dist/src/tui/plugin-content.js +245 -0
- package/dist/src/tui/plugin-content.js.map +1 -0
- package/dist/src/tui/plugin-detail.d.ts +72 -0
- package/dist/src/tui/plugin-detail.js +260 -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/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 +38 -0
- package/dist/src/tui/reader.js +49 -0
- package/dist/src/tui/reader.js.map +1 -0
- package/dist/src/tui/router.d.ts +186 -35
- package/dist/src/tui/router.js +338 -50
- package/dist/src/tui/router.js.map +1 -1
- package/dist/src/tui/scoped-flow.d.ts +45 -0
- package/dist/src/tui/scoped-flow.js +96 -0
- package/dist/src/tui/scoped-flow.js.map +1 -0
- package/dist/src/tui/scoped-inventory.d.ts +126 -0
- package/dist/src/tui/scoped-inventory.js +258 -0
- package/dist/src/tui/scoped-inventory.js.map +1 -0
- package/dist/src/tui/screen-registry.d.ts +701 -0
- package/dist/src/tui/screen-registry.js +226 -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 +219 -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/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/wizard.js +37 -13
- package/dist/src/tui/wizard.js.map +1 -1
- package/dist/src/types.d.ts +220 -118
- package/dist/src/types.js +1 -0
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils/agent-version.d.ts +13 -4
- package/dist/src/utils/agent-version.js +27 -4
- package/dist/src/utils/agent-version.js.map +1 -1
- package/dist/src/utils/artifact-plan.d.ts +33 -7
- package/dist/src/utils/artifact-plan.js +115 -430
- package/dist/src/utils/artifact-plan.js.map +1 -1
- package/dist/src/utils/artifact-renderer.d.ts +114 -83
- package/dist/src/utils/artifact-renderer.js +213 -364
- package/dist/src/utils/artifact-renderer.js.map +1 -1
- package/dist/src/utils/artifact-request.d.ts +44 -0
- package/dist/src/utils/artifact-request.js +80 -0
- package/dist/src/utils/artifact-request.js.map +1 -0
- package/dist/src/utils/artifact-sources.d.ts +6 -2
- package/dist/src/utils/artifact-sources.js +17 -0
- package/dist/src/utils/artifact-sources.js.map +1 -1
- package/dist/src/utils/bundle-layout.js +57 -173
- 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 +2 -2
- package/dist/src/utils/catalog-digests.js +7 -18
- 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 +5 -1
- package/dist/src/utils/catalog-generation-error.js +14 -0
- package/dist/src/utils/catalog-generation-error.js.map +1 -1
- package/dist/src/utils/catalog-generation-resolver.d.ts +36 -5
- package/dist/src/utils/catalog-generation-resolver.js +221 -77
- package/dist/src/utils/catalog-generation-resolver.js.map +1 -1
- package/dist/src/utils/catalog-generation-service.d.ts +159 -28
- package/dist/src/utils/catalog-generation-service.js +1186 -525
- package/dist/src/utils/catalog-generation-service.js.map +1 -1
- package/dist/src/utils/catalog-generation-state.d.ts +9 -0
- package/dist/src/utils/catalog-generation-state.js +97 -106
- package/dist/src/utils/catalog-generation-state.js.map +1 -1
- package/dist/src/utils/catalog-generation-store.d.ts +38 -24
- package/dist/src/utils/catalog-generation-store.js +337 -272
- package/dist/src/utils/catalog-generation-store.js.map +1 -1
- package/dist/src/utils/catalog-manifest-v7.d.ts +5 -0
- package/dist/src/utils/{catalog-manifest-v5.js → catalog-manifest-v7.js} +23 -35
- package/dist/src/utils/catalog-manifest-v7.js.map +1 -0
- package/dist/src/utils/catalog-operation-context.d.ts +6 -14
- package/dist/src/utils/catalog-operation-context.js +69 -169
- package/dist/src/utils/catalog-operation-context.js.map +1 -1
- package/dist/src/utils/catalog-public-error.js +8 -4
- package/dist/src/utils/catalog-public-error.js.map +1 -1
- package/dist/src/utils/catalog-runtime-projection.d.ts +7 -3
- 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 +2 -2
- 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 +23 -2
- package/dist/src/utils/catalog-source-references.js +456 -382
- package/dist/src/utils/catalog-source-references.js.map +1 -1
- package/dist/src/utils/catalog-sources.d.ts +14 -1
- package/dist/src/utils/catalog-sources.js +178 -18
- package/dist/src/utils/catalog-sources.js.map +1 -1
- package/dist/src/utils/codex-config.d.ts +2 -0
- package/dist/src/utils/codex-config.js +22 -1
- package/dist/src/utils/codex-config.js.map +1 -1
- package/dist/src/utils/codex-executable-discovery.d.ts +28 -0
- package/dist/src/utils/codex-executable-discovery.js +431 -0
- package/dist/src/utils/codex-executable-discovery.js.map +1 -0
- package/dist/src/utils/codex-manager.d.ts +47 -18
- package/dist/src/utils/codex-manager.js +88 -622
- package/dist/src/utils/codex-manager.js.map +1 -1
- 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 +169 -0
- package/dist/src/utils/codex-native-observation.js.map +1 -0
- package/dist/src/utils/codex-reconciler.d.ts +123 -0
- package/dist/src/utils/codex-reconciler.js +322 -0
- package/dist/src/utils/codex-reconciler.js.map +1 -0
- package/dist/src/utils/codex-shared-native.d.ts +45 -0
- package/dist/src/utils/codex-shared-native.js +122 -0
- package/dist/src/utils/codex-shared-native.js.map +1 -0
- package/dist/src/utils/codex-skill-staging.d.ts +4 -3
- 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 +49 -0
- package/dist/src/utils/codex-surface-analysis.js +220 -0
- package/dist/src/utils/codex-surface-analysis.js.map +1 -0
- package/dist/src/utils/component-command-preparation.d.ts +34 -0
- package/dist/src/utils/component-command-preparation.js +228 -0
- package/dist/src/utils/component-command-preparation.js.map +1 -0
- package/dist/src/utils/component-resources.d.ts +51 -0
- package/dist/src/utils/component-resources.js +322 -0
- package/dist/src/utils/component-resources.js.map +1 -0
- package/dist/src/utils/dynamic-skill-tree.d.ts +18 -6
- package/dist/src/utils/dynamic-skill-tree.js +32 -9
- 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 +167 -120
- package/dist/src/utils/git-catalog-provider.js.map +1 -1
- package/dist/src/utils/inventory-recovery-diagnostic.d.ts +4 -0
- package/dist/src/utils/inventory-recovery-diagnostic.js +15 -0
- package/dist/src/utils/inventory-recovery-diagnostic.js.map +1 -0
- package/dist/src/utils/local-marketplace.d.ts +17 -12
- package/dist/src/utils/local-marketplace.js +85 -195
- 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 +10 -0
- package/dist/src/utils/managed-command-evidence.js.map +1 -0
- package/dist/src/utils/managed-command-materialization.d.ts +124 -0
- package/dist/src/utils/managed-command-materialization.js +369 -0
- package/dist/src/utils/managed-command-materialization.js.map +1 -0
- package/dist/src/utils/managed-command-preparation.d.ts +67 -0
- package/dist/src/utils/managed-command-preparation.js +146 -0
- package/dist/src/utils/managed-command-preparation.js.map +1 -0
- package/dist/src/utils/managed-command-review.d.ts +26 -0
- package/dist/src/utils/managed-command-review.js +68 -0
- package/dist/src/utils/managed-command-review.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 +143 -0
- package/dist/src/utils/managed-command-store.js +665 -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 +1 -10
- package/dist/src/utils/multi-source-catalog.js +9 -175
- package/dist/src/utils/multi-source-catalog.js.map +1 -1
- package/dist/src/utils/native-cli.d.ts +74 -5
- package/dist/src/utils/native-cli.js +479 -31
- package/dist/src/utils/native-cli.js.map +1 -1
- package/dist/src/utils/native-demand.d.ts +29 -0
- package/dist/src/utils/native-demand.js +4 -0
- package/dist/src/utils/native-demand.js.map +1 -0
- 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 +18 -0
- package/dist/src/utils/native-tool-review.js +116 -0
- package/dist/src/utils/native-tool-review.js.map +1 -0
- package/dist/src/utils/orphan-marketplace-cleanup.js +0 -1
- package/dist/src/utils/orphan-marketplace-cleanup.js.map +1 -1
- package/dist/src/utils/ownership.d.ts +103 -21
- package/dist/src/utils/ownership.js +232 -210
- 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 +47 -62
- package/dist/src/utils/path-catalog-provider.js.map +1 -1
- package/dist/src/utils/paths.d.ts +1 -2
- package/dist/src/utils/paths.js +5 -3
- package/dist/src/utils/paths.js.map +1 -1
- package/dist/src/utils/platform-empty-state.d.ts +45 -0
- package/dist/src/utils/platform-empty-state.js +159 -0
- package/dist/src/utils/platform-empty-state.js.map +1 -0
- package/dist/src/utils/platform-support.d.ts +1 -1
- package/dist/src/utils/platform-support.js +1 -1
- package/dist/src/utils/platform-support.js.map +1 -1
- package/dist/src/utils/plugin-config-impact.d.ts +64 -0
- package/dist/src/utils/plugin-config-impact.js +307 -0
- package/dist/src/utils/plugin-config-impact.js.map +1 -0
- package/dist/src/utils/plugin-config-references.d.ts +89 -0
- package/dist/src/utils/plugin-config-references.js +335 -0
- package/dist/src/utils/plugin-config-references.js.map +1 -0
- package/dist/src/utils/plugin-config-write.d.ts +109 -27
- package/dist/src/utils/plugin-config-write.js +1242 -348
- package/dist/src/utils/plugin-config-write.js.map +1 -1
- package/dist/src/utils/plugin-config.d.ts +187 -109
- package/dist/src/utils/plugin-config.js +916 -1147
- package/dist/src/utils/plugin-config.js.map +1 -1
- package/dist/src/utils/plugin-dependencies.d.ts +1 -1
- package/dist/src/utils/plugin-dependencies.js.map +1 -1
- package/dist/src/utils/plugin-scripts.d.ts +78 -127
- package/dist/src/utils/plugin-scripts.js +566 -524
- 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 +18 -0
- package/dist/src/utils/runtime-config.js +64 -0
- package/dist/src/utils/runtime-config.js.map +1 -0
- package/dist/src/utils/runtime-skill-closure.d.ts +2 -2
- 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.d.ts +8 -3
- package/dist/src/utils/state-paths.js +53 -16
- package/dist/src/utils/state-paths.js.map +1 -1
- package/dist/src/utils/target-eligibility.d.ts +4 -3
- package/dist/src/utils/target-eligibility.js +12 -6
- 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 +16 -0
- package/dist/src/utils/windows-npm-shim.js +155 -0
- package/dist/src/utils/windows-npm-shim.js.map +1 -0
- package/dist/vitest.config.js +105 -9
- package/dist/vitest.config.js.map +1 -1
- package/package.json +30 -21
- 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 -91
- package/dist/scripts/codex-eval-app-server.js +0 -1334
- 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 -1589
- 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 -189
- package/dist/scripts/plugin-eval-contract.js +0 -745
- 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/catalog-context.d.ts +0 -52
- package/dist/src/commands/catalog-context.js +0 -156
- package/dist/src/commands/catalog-context.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-v5.d.ts +0 -169
- package/dist/src/commands/status-v5.js +0 -1135
- package/dist/src/commands/status-v5.js.map +0 -1
- package/dist/src/portable/skills-cli.d.ts +0 -43
- package/dist/src/portable/skills-cli.js +0 -148
- package/dist/src/portable/skills-cli.js.map +0 -1
- package/dist/src/utils/catalog-manifest-v5.d.ts +0 -5
- package/dist/src/utils/catalog-manifest-v5.js.map +0 -1
- package/dist/src/utils/catalog-source-cache.d.ts +0 -62
- package/dist/src/utils/catalog-source-cache.js +0 -321
- 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 -147
- package/dist/src/utils/lifecycle-active-store.js +0 -1064
- 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
- package/dist/src/utils/slash-commands.d.ts +0 -1
- package/dist/src/utils/slash-commands.js +0 -2
- package/dist/src/utils/slash-commands.js.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
|
-
import {
|
|
2
|
+
import { NATIVE_PLATFORM_TARGETS } from '@lesliechan721/aw-plugin-core';
|
|
3
|
+
import { readSafeOperationError } from '../utils/safe-operation-diagnostic.js';
|
|
3
4
|
import { cleanupOwnedComponents, inspectOwnedComponents, validateOwnerIdentity, } from '../utils/ownership.js';
|
|
4
5
|
function artifactIdentity(artifact) {
|
|
5
6
|
return [
|
|
@@ -22,48 +23,6 @@ function bindWrittenArtifacts(target, written) {
|
|
|
22
23
|
}
|
|
23
24
|
target.artifacts = [...written];
|
|
24
25
|
}
|
|
25
|
-
export function createRebuildActiveStore(options) {
|
|
26
|
-
return {
|
|
27
|
-
prepare: (target) => prepareLifecycleActiveSnapshot({
|
|
28
|
-
...(target.identity.sourceId ? {
|
|
29
|
-
sourceId: target.identity.sourceId,
|
|
30
|
-
sourceIdentity: target.identity.sourceIdentity,
|
|
31
|
-
} : {}),
|
|
32
|
-
plugin: target.lifecycleSource,
|
|
33
|
-
platform: target.identity.platform,
|
|
34
|
-
scope: target.identity.scope,
|
|
35
|
-
cwd: target.identity.cwd,
|
|
36
|
-
artifacts: target.artifacts,
|
|
37
|
-
loadPlugin: options.loadPlugin,
|
|
38
|
-
env: options.env,
|
|
39
|
-
}),
|
|
40
|
-
discard: discardLifecycleActiveSnapshot,
|
|
41
|
-
promote: promoteLifecycleActiveSnapshot,
|
|
42
|
-
read: (target) => readLifecycleActiveSnapshot({
|
|
43
|
-
...(target.identity.sourceId ? {
|
|
44
|
-
sourceId: target.identity.sourceId,
|
|
45
|
-
sourceIdentity: target.identity.sourceIdentity,
|
|
46
|
-
} : {}),
|
|
47
|
-
pluginName: target.identity.pluginName,
|
|
48
|
-
platform: target.identity.platform,
|
|
49
|
-
scope: target.identity.scope,
|
|
50
|
-
cwd: target.identity.cwd,
|
|
51
|
-
loadPlugin: options.loadPlugin,
|
|
52
|
-
env: options.env,
|
|
53
|
-
}),
|
|
54
|
-
remove: (target) => removeLifecycleActiveSnapshot({
|
|
55
|
-
...(target.identity.sourceId ? {
|
|
56
|
-
sourceId: target.identity.sourceId,
|
|
57
|
-
sourceIdentity: target.identity.sourceIdentity,
|
|
58
|
-
} : {}),
|
|
59
|
-
pluginName: target.identity.pluginName,
|
|
60
|
-
platform: target.identity.platform,
|
|
61
|
-
scope: target.identity.scope,
|
|
62
|
-
cwd: target.identity.cwd,
|
|
63
|
-
env: options.env,
|
|
64
|
-
}),
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
26
|
function createAccumulator() {
|
|
68
27
|
return {
|
|
69
28
|
actions: [],
|
|
@@ -83,19 +42,10 @@ const REBUILD_ACTION_FAILURE_MESSAGES = {
|
|
|
83
42
|
'stale.cleanup': '清理过期组件失败。',
|
|
84
43
|
'native.write': '写入平台插件失败。',
|
|
85
44
|
'artifacts.write': '写入插件文件失败。',
|
|
86
|
-
|
|
87
|
-
'active.discard': '丢弃生命周期快照失败。',
|
|
88
|
-
'lifecycle.install': '运行安装生命周期失败。',
|
|
89
|
-
'lifecycle.upgrade': '运行升级生命周期失败。',
|
|
90
|
-
'lifecycle.uninstall': '运行卸载生命周期失败。',
|
|
91
|
-
'active.promote': '启用生命周期快照失败。',
|
|
45
|
+
preApply: '运行 preApply 失败。',
|
|
92
46
|
'postcheck.inspect': '检查写入结果失败。',
|
|
93
|
-
'marketplace.commit': '提交 marketplace generation 失败。',
|
|
94
|
-
'marketplace.rollback': '回滚 marketplace generation 失败。',
|
|
95
47
|
'recovery.cleanup': '清理失败写入失败。',
|
|
96
48
|
'cleanup.owned': '清理 AW 组件失败。',
|
|
97
|
-
'active.read': '读取生命周期快照失败。',
|
|
98
|
-
'active.remove': '删除生命周期快照失败。',
|
|
99
49
|
};
|
|
100
50
|
function rebuildActionFailureMessage(name) {
|
|
101
51
|
return REBUILD_ACTION_FAILURE_MESSAGES[name];
|
|
@@ -123,21 +73,25 @@ function mergeCleanup(accumulator, cleanup, phase) {
|
|
|
123
73
|
phase,
|
|
124
74
|
label: failure.label,
|
|
125
75
|
message: failure.message,
|
|
76
|
+
...(failure.operationDiagnostic ? { operationDiagnostic: failure.operationDiagnostic } : {}),
|
|
126
77
|
})));
|
|
127
78
|
}
|
|
128
79
|
function succeeded(command, target, accumulator) {
|
|
129
|
-
return { status: 'succeeded', command, target: target.identity, ...accumulator
|
|
80
|
+
return { status: 'succeeded', command, target: target.identity, ...accumulator,
|
|
81
|
+
...(target.deploymentExclusions?.length ? { deploymentExclusions: target.deploymentExclusions } : {}) };
|
|
130
82
|
}
|
|
131
|
-
function failed(command, target, accumulator, phase, message) {
|
|
83
|
+
function failed(command, target, accumulator, phase, message, operationDiagnostic) {
|
|
84
|
+
operationDiagnostic ??= accumulator.failures.find((failure) => failure.phase === phase && failure.message === message)?.operationDiagnostic;
|
|
132
85
|
if (!accumulator.failures.some((failure) => failure.phase === phase && failure.message === message)) {
|
|
133
|
-
accumulator.failures.unshift({ phase, message });
|
|
86
|
+
accumulator.failures.unshift({ phase, message, ...(operationDiagnostic ? { operationDiagnostic } : {}) });
|
|
134
87
|
}
|
|
135
88
|
return {
|
|
136
89
|
status: 'failed',
|
|
137
90
|
command,
|
|
138
91
|
target: target.identity,
|
|
92
|
+
...(target.deploymentExclusions?.length ? { deploymentExclusions: target.deploymentExclusions } : {}),
|
|
139
93
|
...accumulator,
|
|
140
|
-
error: { phase, message },
|
|
94
|
+
error: { phase, message, ...(operationDiagnostic ? { operationDiagnostic } : {}) },
|
|
141
95
|
};
|
|
142
96
|
}
|
|
143
97
|
async function action(accumulator, name, operation, events, failureMessage) {
|
|
@@ -208,12 +162,12 @@ function validateDesiredTarget(target) {
|
|
|
208
162
|
throw new Error('Desired target has an invalid namespaced source identity.');
|
|
209
163
|
}
|
|
210
164
|
if (target.plugin.manifest.name !== pluginName
|
|
211
|
-
|| target.
|
|
165
|
+
|| target.preApplySource.manifest.name !== pluginName
|
|
212
166
|
|| target.plugin.manifest.version !== pluginVersion
|
|
213
|
-
|| target.
|
|
214
|
-
throw new Error('Desired target plugin name/version does not match its
|
|
167
|
+
|| target.preApplySource.manifest.version !== pluginVersion) {
|
|
168
|
+
throw new Error('Desired target plugin name/version does not match its preApply source and identity.');
|
|
215
169
|
}
|
|
216
|
-
if (platform
|
|
170
|
+
if (!NATIVE_PLATFORM_TARGETS.includes(platform)) {
|
|
217
171
|
throw new Error(`Desired target platform is invalid: ${String(platform)}`);
|
|
218
172
|
}
|
|
219
173
|
if (scope !== 'user' && scope !== 'project') {
|
|
@@ -221,12 +175,12 @@ function validateDesiredTarget(target) {
|
|
|
221
175
|
}
|
|
222
176
|
const identityKeys = new Set();
|
|
223
177
|
const componentPaths = new Set();
|
|
178
|
+
const desiredComponents = target.desiredOwnedComponents ?? target.ownedComponents;
|
|
224
179
|
let nativeCount = 0;
|
|
225
180
|
for (const component of target.ownedComponents) {
|
|
226
181
|
validateOwnerIdentity(component.identity);
|
|
227
182
|
if (component.identity.plugin !== pluginName
|
|
228
183
|
|| component.identity.sourceId !== sourceId
|
|
229
|
-
|| component.identity.sourceIdentity !== sourceIdentity
|
|
230
184
|
|| component.identity.pluginId !== pluginId
|
|
231
185
|
|| component.identity.platform !== platform
|
|
232
186
|
|| component.identity.scope !== scope) {
|
|
@@ -238,6 +192,7 @@ function validateDesiredTarget(target) {
|
|
|
238
192
|
component.identity.artifactKey,
|
|
239
193
|
component.identity.platform,
|
|
240
194
|
component.identity.scope,
|
|
195
|
+
component.kind,
|
|
241
196
|
].join('\0');
|
|
242
197
|
if (identityKeys.has(identityKey)) {
|
|
243
198
|
throw new Error(`Desired target has a duplicate owned component identity: ${component.identity.artifactKey}`);
|
|
@@ -257,7 +212,9 @@ function validateDesiredTarget(target) {
|
|
|
257
212
|
}
|
|
258
213
|
}
|
|
259
214
|
}
|
|
260
|
-
|
|
215
|
+
if (target.forceExclusiveCleanup && target.ownedComponents.some((component) => component.kind !== 'skill-directory' && component.kind !== 'owned-text-file')) {
|
|
216
|
+
throw new Error('Force cleanup only supports exclusive skill directories and owned text files.');
|
|
217
|
+
}
|
|
261
218
|
nativeCount = desiredComponents.filter((component) => component.kind === 'native-plugin').length;
|
|
262
219
|
if (target.requiresNative ? nativeCount !== 1 : nativeCount !== 0) {
|
|
263
220
|
throw new Error(target.requiresNative
|
|
@@ -320,6 +277,11 @@ function postcheckMessage(accumulator, inspection) {
|
|
|
320
277
|
})));
|
|
321
278
|
return inspection.errors.map((error) => `${error.label}: ${error.message}`).join('; ');
|
|
322
279
|
}
|
|
280
|
+
if (invalid.some((component) => component.state === 'partial'
|
|
281
|
+
&& component.component.kind === 'native-plugin'
|
|
282
|
+
&& component.component.identity.platform === 'codex')) {
|
|
283
|
+
return 'codexActivationPostcheckFailed: Codex scope activation was not observed as enabled.';
|
|
284
|
+
}
|
|
323
285
|
const diagnostics = invalid
|
|
324
286
|
.map((component) => component.diagnostic)
|
|
325
287
|
.filter((diagnostic) => diagnostic !== undefined);
|
|
@@ -327,17 +289,24 @@ function postcheckMessage(accumulator, inspection) {
|
|
|
327
289
|
return diagnostics.join('; ');
|
|
328
290
|
return `Post-install ownership inspection failed for ${invalid.length} component(s).`;
|
|
329
291
|
}
|
|
330
|
-
async function cleanupOwned(target, driver, components = target.ownedComponents) {
|
|
292
|
+
async function cleanupOwned(target, driver, components = target.ownedComponents, hooks = {}) {
|
|
331
293
|
return cleanupOwnedComponents({
|
|
332
294
|
components,
|
|
295
|
+
executor: driver.ownership,
|
|
333
296
|
nativeProbe: driver.probeNative,
|
|
334
297
|
nativeRemove: driver.removeNative,
|
|
298
|
+
forceExclusive: target.forceExclusiveCleanup,
|
|
299
|
+
...hooks,
|
|
300
|
+
beforeMutation: async (component) => {
|
|
301
|
+
await hooks.beforeMutation?.(component);
|
|
302
|
+
await driver.beforeCleanupMutation?.(component);
|
|
303
|
+
},
|
|
335
304
|
});
|
|
336
305
|
}
|
|
337
|
-
async function cleanupTarget(target, driver,
|
|
306
|
+
async function cleanupTarget(target, driver, accumulator, ownedAction, events, components = target.ownedComponents, hooks = {}) {
|
|
338
307
|
accumulator.cleanupAttempted = true;
|
|
339
308
|
try {
|
|
340
|
-
const cleanup = await action(accumulator, ownedAction, () => cleanupOwned(target, driver), events, (value) => value.failures[0]?.message
|
|
309
|
+
const cleanup = await action(accumulator, ownedAction, () => cleanupOwned(target, driver, components, hooks), events, (value) => value.failures[0]?.message
|
|
341
310
|
?? (value.residual.length > 0
|
|
342
311
|
? `Ownership cleanup left residual components: ${value.residual.join(', ')}`
|
|
343
312
|
: value.quarantined.length > 0
|
|
@@ -361,41 +330,64 @@ async function cleanupTarget(target, driver, store, accumulator, ownedAction, ev
|
|
|
361
330
|
accumulator.failures.push({ phase: ownedAction, message });
|
|
362
331
|
return { phase: ownedAction, message };
|
|
363
332
|
}
|
|
364
|
-
try {
|
|
365
|
-
await action(accumulator, 'active.remove', () => store.remove(target), events);
|
|
366
|
-
}
|
|
367
|
-
catch (error) {
|
|
368
|
-
const message = errorMessage(error);
|
|
369
|
-
accumulator.failures.push({ phase: 'active.remove', message });
|
|
370
|
-
return { phase: 'active.remove', message };
|
|
371
|
-
}
|
|
372
333
|
return null;
|
|
373
334
|
}
|
|
335
|
+
export async function executeRebuildComponentCleanup(options) {
|
|
336
|
+
const accumulator = createAccumulator();
|
|
337
|
+
accumulator.actions.push(...(options.actions ?? []));
|
|
338
|
+
const cleanupError = await cleanupTarget(options.target, options.driver, accumulator, 'cleanup.owned', {
|
|
339
|
+
command: options.command,
|
|
340
|
+
target: options.target.identity,
|
|
341
|
+
emit: options.onActionEvent,
|
|
342
|
+
now: options.now ?? Date.now,
|
|
343
|
+
}, options.components, {
|
|
344
|
+
...(options.beforeMutation ? { beforeMutation: options.beforeMutation } : {}),
|
|
345
|
+
...(options.afterQuarantine ? { afterQuarantine: options.afterQuarantine } : {}),
|
|
346
|
+
});
|
|
347
|
+
return cleanupError
|
|
348
|
+
? failed(options.command, options.target, accumulator, cleanupError.phase, cleanupError.message)
|
|
349
|
+
: succeeded(options.command, options.target, accumulator);
|
|
350
|
+
}
|
|
374
351
|
async function materializeTarget(options) {
|
|
375
|
-
const { command,
|
|
376
|
-
let inspection;
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
await
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
352
|
+
const { command, target, driver, accumulator, events } = options;
|
|
353
|
+
let inspection = options.inspection;
|
|
354
|
+
if (!inspection) {
|
|
355
|
+
try {
|
|
356
|
+
inspection = await action(accumulator, 'preflight.inspect', async () => {
|
|
357
|
+
await driver.preflightMaterialize?.(target);
|
|
358
|
+
return inspectOwnedComponents({
|
|
359
|
+
components: target.ownedComponents,
|
|
360
|
+
executor: driver.ownership,
|
|
361
|
+
nativeProbe: driver.probeNative,
|
|
362
|
+
});
|
|
363
|
+
}, events, collisionMessage);
|
|
364
|
+
}
|
|
365
|
+
catch (error) {
|
|
366
|
+
return failed(command, target, accumulator, 'preflight.inspect', errorMessage(error), readSafeOperationError(error));
|
|
367
|
+
}
|
|
388
368
|
}
|
|
389
369
|
const collision = collisionMessage(inspection);
|
|
390
370
|
if (collision) {
|
|
391
371
|
recordInspectionResiduals(accumulator, inspection);
|
|
392
372
|
return failed(command, target, accumulator, 'preflight.inspect', collision);
|
|
393
373
|
}
|
|
374
|
+
if (!options.preApplyCompleted && target.preApplySource.manifest.scripts?.preApply) {
|
|
375
|
+
try {
|
|
376
|
+
await action(accumulator, 'preApply', () => driver.runPreApply({
|
|
377
|
+
target,
|
|
378
|
+
plugin: target.preApplySource,
|
|
379
|
+
}), events);
|
|
380
|
+
}
|
|
381
|
+
catch (error) {
|
|
382
|
+
return failed(command, target, accumulator, 'preApply', errorMessage(error), readSafeOperationError(error));
|
|
383
|
+
}
|
|
384
|
+
}
|
|
394
385
|
const desiredComponents = new Set(target.desiredOwnedComponents ?? target.ownedComponents);
|
|
395
386
|
const optionalComponents = new Set(target.optionalOwnedComponents ?? []);
|
|
396
387
|
const staleComponents = target.ownedComponents.filter((component) => !desiredComponents.has(component) && !optionalComponents.has(component));
|
|
397
388
|
const staleInspection = inspection.components.filter((entry) => staleComponents.includes(entry.component));
|
|
398
|
-
if (
|
|
389
|
+
if (!options.skipStaleCleanup
|
|
390
|
+
&& staleInspection.some((component) => component.state === 'present')) {
|
|
399
391
|
accumulator.cleanupAttempted = true;
|
|
400
392
|
let stale;
|
|
401
393
|
try {
|
|
@@ -405,7 +397,7 @@ async function materializeTarget(options) {
|
|
|
405
397
|
: undefined));
|
|
406
398
|
}
|
|
407
399
|
catch (error) {
|
|
408
|
-
return failed(command, target, accumulator, 'stale.cleanup', errorMessage(error));
|
|
400
|
+
return failed(command, target, accumulator, 'stale.cleanup', errorMessage(error), readSafeOperationError(error));
|
|
409
401
|
}
|
|
410
402
|
mergeCleanup(accumulator, stale, 'stale.cleanup');
|
|
411
403
|
if (stale.failures.length > 0 || stale.residual.length > 0) {
|
|
@@ -415,9 +407,8 @@ async function materializeTarget(options) {
|
|
|
415
407
|
}
|
|
416
408
|
}
|
|
417
409
|
let failurePhase = 'native.write';
|
|
418
|
-
let prepared;
|
|
419
410
|
try {
|
|
420
|
-
if (target.requiresNative) {
|
|
411
|
+
if (target.writeNativeRequired ?? target.requiresNative) {
|
|
421
412
|
failurePhase = 'native.write';
|
|
422
413
|
await action(accumulator, failurePhase, () => driver.writeNative(target), events);
|
|
423
414
|
}
|
|
@@ -426,69 +417,43 @@ async function materializeTarget(options) {
|
|
|
426
417
|
const writtenArtifacts = await driver.writeArtifacts(target);
|
|
427
418
|
bindWrittenArtifacts(target, writtenArtifacts);
|
|
428
419
|
}, events);
|
|
429
|
-
|
|
430
|
-
prepared = await action(accumulator, failurePhase, () => store.prepare(target), events);
|
|
431
|
-
failurePhase = `lifecycle.${lifecycleEvent}`;
|
|
432
|
-
await action(accumulator, failurePhase, () => driver.runLifecycle({
|
|
433
|
-
event: lifecycleEvent,
|
|
434
|
-
target,
|
|
435
|
-
plugin: target.lifecycleSource,
|
|
436
|
-
artifacts: target.artifacts,
|
|
437
|
-
}), events);
|
|
438
|
-
failurePhase = 'active.promote';
|
|
439
|
-
await action(accumulator, failurePhase, () => store.promote(prepared), events);
|
|
440
|
-
failurePhase = 'postcheck.inspect';
|
|
441
|
-
await action(accumulator, failurePhase, async () => {
|
|
420
|
+
const postcheck = () => action(accumulator, 'postcheck.inspect', async () => {
|
|
442
421
|
const optional = new Set(target.optionalOwnedComponents ?? []);
|
|
443
422
|
const postcheck = await inspectOwnedComponents({
|
|
444
423
|
components: (target.desiredOwnedComponents ?? target.ownedComponents)
|
|
445
424
|
.filter((component) => !optional.has(component)),
|
|
446
425
|
nativeProbe: driver.probeNativeHealth ?? driver.probeNative,
|
|
426
|
+
executor: driver.ownership,
|
|
447
427
|
verifyHealth: true,
|
|
448
428
|
});
|
|
449
429
|
const postcheckFailure = postcheckMessage(accumulator, postcheck);
|
|
450
430
|
if (postcheckFailure)
|
|
451
431
|
throw new Error(postcheckFailure);
|
|
452
432
|
}, events);
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
await
|
|
433
|
+
failurePhase = 'postcheck.inspect';
|
|
434
|
+
if (driver.deferPostcheck?.(target, postcheck) !== true) {
|
|
435
|
+
await postcheck();
|
|
456
436
|
}
|
|
457
437
|
return succeeded(command, target, accumulator);
|
|
458
438
|
}
|
|
459
439
|
catch (error) {
|
|
460
440
|
const primary = errorMessage(error);
|
|
461
|
-
if (error.
|
|
462
|
-
return failed(command, target, accumulator, failurePhase, primary);
|
|
441
|
+
if (error.nativeMarketplaceGroupFailure === true) {
|
|
442
|
+
return failed(command, target, accumulator, failurePhase, primary, readSafeOperationError(error));
|
|
463
443
|
}
|
|
464
|
-
if (
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
catch (discardError) {
|
|
469
|
-
accumulator.failures.push({
|
|
470
|
-
phase: 'active.discard',
|
|
471
|
-
message: errorMessage(discardError),
|
|
472
|
-
});
|
|
473
|
-
}
|
|
444
|
+
if (target.identity.platform === 'codex') {
|
|
445
|
+
const recoveryComponents = target.ownedComponents.filter((component) => component.kind === 'skill-directory' || component.kind === 'owned-text-file');
|
|
446
|
+
await cleanupTarget(target, driver, accumulator, 'recovery.cleanup', events, driver.selectRecoveryCleanupComponents?.(target, recoveryComponents)
|
|
447
|
+
?? recoveryComponents);
|
|
474
448
|
}
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
try {
|
|
478
|
-
await action(accumulator, 'marketplace.rollback', () => driver.rollbackMaterialize(target), events);
|
|
479
|
-
}
|
|
480
|
-
catch (rollbackError) {
|
|
481
|
-
accumulator.failures.push({
|
|
482
|
-
phase: 'marketplace.rollback',
|
|
483
|
-
message: errorMessage(rollbackError),
|
|
484
|
-
});
|
|
485
|
-
}
|
|
449
|
+
else {
|
|
450
|
+
await cleanupTarget(target, driver, accumulator, 'recovery.cleanup', events);
|
|
486
451
|
}
|
|
487
|
-
return failed(command, target, accumulator, failurePhase, primary);
|
|
452
|
+
return failed(command, target, accumulator, failurePhase, primary, readSafeOperationError(error));
|
|
488
453
|
}
|
|
489
454
|
}
|
|
490
455
|
async function executeCleanup(options) {
|
|
491
|
-
const cleanupError = await cleanupTarget(options.target, options.driver, options.
|
|
456
|
+
const cleanupError = await cleanupTarget(options.target, options.driver, options.accumulator, 'cleanup.owned', options.events);
|
|
492
457
|
if (cleanupError) {
|
|
493
458
|
return failed(options.command, options.target, options.accumulator, cleanupError.phase, cleanupError.message);
|
|
494
459
|
}
|
|
@@ -503,11 +468,12 @@ async function executeCleanup(options) {
|
|
|
503
468
|
return succeeded(options.command, options.target, options.accumulator);
|
|
504
469
|
}
|
|
505
470
|
async function executeUninstall(options) {
|
|
506
|
-
const { target, driver,
|
|
471
|
+
const { target, driver, accumulator, events } = options;
|
|
507
472
|
let inspection;
|
|
508
473
|
try {
|
|
509
474
|
inspection = await action(accumulator, 'preflight.inspect', () => inspectOwnedComponents({
|
|
510
475
|
components: target.ownedComponents,
|
|
476
|
+
executor: driver.ownership,
|
|
511
477
|
nativeProbe: driver.probeNative,
|
|
512
478
|
}), events, collisionMessage);
|
|
513
479
|
}
|
|
@@ -519,61 +485,13 @@ async function executeUninstall(options) {
|
|
|
519
485
|
recordInspectionResiduals(accumulator, inspection);
|
|
520
486
|
return failed('uninstall', target, accumulator, 'preflight.inspect', preflightCollision);
|
|
521
487
|
}
|
|
522
|
-
|
|
523
|
-
try {
|
|
524
|
-
snapshot = await action(accumulator, 'active.read', () => store.read(target), events);
|
|
525
|
-
}
|
|
526
|
-
catch (error) {
|
|
527
|
-
const message = `Active lifecycle snapshot is corrupt. Run cleanup to remove live outputs without lifecycle: ${errorMessage(error)}`;
|
|
528
|
-
return failed('uninstall', target, accumulator, 'active.read', message);
|
|
529
|
-
}
|
|
530
|
-
if (!snapshot) {
|
|
531
|
-
const live = inspection.components.filter((component) => component.state !== 'absent'
|
|
532
|
-
&& isUninstallLiveOwnershipComponent(component.component));
|
|
533
|
-
if (live.length === 0)
|
|
534
|
-
return succeeded('uninstall', target, accumulator);
|
|
535
|
-
if (!target.plugin.manifest.scripts?.lifecycle?.uninstall) {
|
|
536
|
-
const cleanupError = await cleanupTarget(target, driver, store, accumulator, 'cleanup.owned', events);
|
|
537
|
-
if (cleanupError) {
|
|
538
|
-
return failed('uninstall', target, accumulator, cleanupError.phase, cleanupError.message);
|
|
539
|
-
}
|
|
540
|
-
if (driver.finalizeCleanup) {
|
|
541
|
-
try {
|
|
542
|
-
await driver.finalizeCleanup(target);
|
|
543
|
-
}
|
|
544
|
-
catch (error) {
|
|
545
|
-
return failed('uninstall', target, accumulator, 'cleanup.owned', errorMessage(error));
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
return succeeded('uninstall', target, accumulator);
|
|
549
|
-
}
|
|
550
|
-
pushUnique(accumulator.residual, live.map((component) => ownedComponentLabel(component.component)));
|
|
551
|
-
return failed('uninstall', target, accumulator, 'active.read', 'Active lifecycle snapshot is missing while live owned components exist. Run cleanup to remove them without lifecycle.');
|
|
552
|
-
}
|
|
553
|
-
const live = inspection.components.filter((component) => component.state === 'present'
|
|
488
|
+
const live = inspection.components.filter((component) => component.state !== 'absent'
|
|
554
489
|
&& isUninstallLiveOwnershipComponent(component.component));
|
|
555
|
-
if (live.length
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
try {
|
|
561
|
-
await action(accumulator, 'lifecycle.uninstall', () => driver.runLifecycle({
|
|
562
|
-
event: 'uninstall',
|
|
563
|
-
target,
|
|
564
|
-
plugin: historical.currentPlugin,
|
|
565
|
-
artifacts: historical.artifacts,
|
|
566
|
-
}), events);
|
|
567
|
-
}
|
|
568
|
-
catch (error) {
|
|
569
|
-
lifecycleError = error;
|
|
570
|
-
}
|
|
571
|
-
if (lifecycleError !== undefined) {
|
|
572
|
-
return failed('uninstall', target, accumulator, 'lifecycle.uninstall', errorMessage(lifecycleError));
|
|
573
|
-
}
|
|
574
|
-
const cleanupError = await cleanupTarget(target, driver, store, accumulator, 'cleanup.owned', events);
|
|
575
|
-
if (cleanupError) {
|
|
576
|
-
return failed('uninstall', target, accumulator, cleanupError.phase, cleanupError.message);
|
|
490
|
+
if (live.length > 0) {
|
|
491
|
+
const cleanupError = await cleanupTarget(target, driver, accumulator, 'cleanup.owned', events);
|
|
492
|
+
if (cleanupError) {
|
|
493
|
+
return failed('uninstall', target, accumulator, cleanupError.phase, cleanupError.message);
|
|
494
|
+
}
|
|
577
495
|
}
|
|
578
496
|
if (driver.finalizeCleanup) {
|
|
579
497
|
try {
|
|
@@ -585,15 +503,88 @@ async function executeUninstall(options) {
|
|
|
585
503
|
}
|
|
586
504
|
return succeeded('uninstall', target, accumulator);
|
|
587
505
|
}
|
|
506
|
+
function hasPlannedPreApply(target) {
|
|
507
|
+
return !!target.preApplySource.manifest.scripts?.preApply
|
|
508
|
+
&& (!target.platformDeployment || !target.operationActions || target.operationActions.some((action) => action.kind === 'runPreApply'));
|
|
509
|
+
}
|
|
510
|
+
function canVerifyPlatformAtExecution(command, target) {
|
|
511
|
+
return (command === 'install' || command === 'sync') && !hasPlannedPreApply(target)
|
|
512
|
+
&& target.platformDeployment?.canVerifyAtExecution() === true;
|
|
513
|
+
}
|
|
588
514
|
export async function executeRebuildOperation(options) {
|
|
589
515
|
const accumulator = createAccumulator();
|
|
590
|
-
const store = options.activeStore;
|
|
591
516
|
const events = {
|
|
592
517
|
command: options.command,
|
|
593
518
|
target: options.target.identity,
|
|
594
519
|
emit: options.onActionEvent,
|
|
595
520
|
now: options.now ?? Date.now,
|
|
596
521
|
};
|
|
522
|
+
if (options.target.platformDeployment) {
|
|
523
|
+
try {
|
|
524
|
+
if (options.preparation && (options.preparation.command !== options.command || options.preparation.target !== options.target)) {
|
|
525
|
+
throw new Error('Prepared rebuild operation does not match the requested target.');
|
|
526
|
+
}
|
|
527
|
+
accumulator.actions.push(...options.preparation?.actions ?? []);
|
|
528
|
+
const verifyAtExecution = canVerifyPlatformAtExecution(options.command, options.target);
|
|
529
|
+
if (!verifyAtExecution)
|
|
530
|
+
await options.target.platformDeployment.verify();
|
|
531
|
+
if (!options.preparation && options.command !== 'cleanup' && options.command !== 'uninstall'
|
|
532
|
+
&& hasPlannedPreApply(options.target)) {
|
|
533
|
+
await action(accumulator, 'preApply', () => options.driver.runPreApply({ target: options.target, plugin: options.target.preApplySource }), events);
|
|
534
|
+
await options.target.platformDeployment.verify();
|
|
535
|
+
}
|
|
536
|
+
if (!verifyAtExecution)
|
|
537
|
+
await options.driver.applyManagedCommands?.(options.target);
|
|
538
|
+
const receipts = await options.target.platformDeployment.execute(verifyAtExecution ? { verifyBeforeExecution: true } : undefined);
|
|
539
|
+
for (const cleanup of options.target.platformDeployment.cleanupResults) {
|
|
540
|
+
accumulator.cleanupAttempted = true;
|
|
541
|
+
mergeCleanup(accumulator, cleanup, 'cleanup.owned');
|
|
542
|
+
accumulator.actions.push({ name: 'cleanup.owned', status: cleanup.failures.length || cleanup.residual.length || cleanup.quarantined.length
|
|
543
|
+
? 'failed' : 'succeeded' });
|
|
544
|
+
}
|
|
545
|
+
const failure = receipts.flatMap((receipt) => receipt.effects).find((effect) => ['failed', 'unknown', 'blocked', 'skipped'].includes(effect.status));
|
|
546
|
+
const gaps = receipts.flatMap((receipt) => receipt.unmet);
|
|
547
|
+
const diagnostics = receipts.flatMap((receipt) => receipt.diagnostics).filter((item) => item.severity === 'error');
|
|
548
|
+
let result = failure || gaps.length || diagnostics.length
|
|
549
|
+
? failed(options.command, options.target, accumulator, 'native.write', failure?.diagnostics.map((item) => `${item.code}: ${item.message}`).join('; ') || 'platformComponentsUnmet')
|
|
550
|
+
: succeeded(options.command, options.target, accumulator);
|
|
551
|
+
if (result.status === 'succeeded' && options.command !== 'cleanup' && options.command !== 'uninstall') {
|
|
552
|
+
const deployment = options.target.platformDeployment;
|
|
553
|
+
if (options.driver.deferPostcheck?.(options.target, () => deployment.postcheck(receipts, { refresh: true })) !== true) {
|
|
554
|
+
try {
|
|
555
|
+
await deployment.postcheck(receipts);
|
|
556
|
+
}
|
|
557
|
+
catch (error) {
|
|
558
|
+
result = failed(options.command, options.target, accumulator, 'postcheck.inspect', errorMessage(error));
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
result.deploymentReceipts = receipts;
|
|
563
|
+
return result;
|
|
564
|
+
}
|
|
565
|
+
catch (error) {
|
|
566
|
+
return failed(options.command, options.target, accumulator, 'preflight', errorMessage(error));
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
if (options.preparation) {
|
|
570
|
+
if (options.preparation.command !== options.command
|
|
571
|
+
|| options.preparation.target !== options.target) {
|
|
572
|
+
return failed(options.command, options.target, accumulator, 'preflight', 'Prepared rebuild operation does not match the requested target.');
|
|
573
|
+
}
|
|
574
|
+
accumulator.actions.push(...options.preparation.actions);
|
|
575
|
+
try {
|
|
576
|
+
await options.driver.preflightMutation?.(options.target);
|
|
577
|
+
}
|
|
578
|
+
catch (error) {
|
|
579
|
+
return failed(options.command, options.target, accumulator, 'preflight', errorMessage(error));
|
|
580
|
+
}
|
|
581
|
+
try {
|
|
582
|
+
return await executeRebuildOperationCore(options, accumulator, events, options.preparation);
|
|
583
|
+
}
|
|
584
|
+
catch (error) {
|
|
585
|
+
return failed(options.command, options.target, accumulator, 'preflight', errorMessage(error));
|
|
586
|
+
}
|
|
587
|
+
}
|
|
597
588
|
try {
|
|
598
589
|
validateDesiredTarget(options.target);
|
|
599
590
|
}
|
|
@@ -601,22 +592,30 @@ export async function executeRebuildOperation(options) {
|
|
|
601
592
|
return failed(options.command, options.target, accumulator, 'preflight', errorMessage(error));
|
|
602
593
|
}
|
|
603
594
|
try {
|
|
604
|
-
|
|
595
|
+
await options.driver.preflightMutation?.(options.target);
|
|
596
|
+
}
|
|
597
|
+
catch (error) {
|
|
598
|
+
return failed(options.command, options.target, accumulator, 'preflight', errorMessage(error));
|
|
599
|
+
}
|
|
600
|
+
try {
|
|
601
|
+
return await executeRebuildOperationCore(options, accumulator, events);
|
|
605
602
|
}
|
|
606
603
|
catch (error) {
|
|
607
604
|
return failed(options.command, options.target, accumulator, 'preflight', errorMessage(error));
|
|
608
605
|
}
|
|
609
606
|
}
|
|
610
|
-
async function executeRebuildOperationCore(options, accumulator,
|
|
611
|
-
if (options.command === 'install'
|
|
607
|
+
async function executeRebuildOperationCore(options, accumulator, events, preparation) {
|
|
608
|
+
if (options.command === 'install') {
|
|
612
609
|
return materializeTarget({
|
|
613
610
|
command: options.command,
|
|
614
|
-
lifecycleEvent: options.command,
|
|
615
611
|
target: options.target,
|
|
616
612
|
driver: options.driver,
|
|
617
|
-
store,
|
|
618
613
|
accumulator,
|
|
619
614
|
events,
|
|
615
|
+
...(preparation ? {
|
|
616
|
+
inspection: preparation.inspection,
|
|
617
|
+
preApplyCompleted: true,
|
|
618
|
+
} : {}),
|
|
620
619
|
});
|
|
621
620
|
}
|
|
622
621
|
if (options.command === 'cleanup') {
|
|
@@ -624,7 +623,6 @@ async function executeRebuildOperationCore(options, accumulator, store, events)
|
|
|
624
623
|
command: 'cleanup',
|
|
625
624
|
target: options.target,
|
|
626
625
|
driver: options.driver,
|
|
627
|
-
store,
|
|
628
626
|
accumulator,
|
|
629
627
|
events,
|
|
630
628
|
});
|
|
@@ -633,34 +631,46 @@ async function executeRebuildOperationCore(options, accumulator, store, events)
|
|
|
633
631
|
return executeUninstall({
|
|
634
632
|
target: options.target,
|
|
635
633
|
driver: options.driver,
|
|
636
|
-
store,
|
|
637
634
|
accumulator,
|
|
638
635
|
events,
|
|
639
636
|
});
|
|
640
637
|
}
|
|
641
|
-
let inspection;
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
await
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
638
|
+
let inspection = preparation?.inspection;
|
|
639
|
+
if (!inspection) {
|
|
640
|
+
try {
|
|
641
|
+
inspection = await action(accumulator, 'preflight.inspect', async () => {
|
|
642
|
+
await options.driver.preflightMaterialize?.(options.target);
|
|
643
|
+
return inspectOwnedComponents({
|
|
644
|
+
components: options.target.ownedComponents,
|
|
645
|
+
executor: options.driver.ownership,
|
|
646
|
+
nativeProbe: options.driver.probeNative,
|
|
647
|
+
});
|
|
648
|
+
}, events, collisionMessage);
|
|
649
|
+
}
|
|
650
|
+
catch (error) {
|
|
651
|
+
return failed('reinstall', options.target, accumulator, 'preflight.inspect', errorMessage(error));
|
|
652
|
+
}
|
|
653
|
+
const collision = collisionMessage(inspection);
|
|
654
|
+
if (collision) {
|
|
655
|
+
recordInspectionResiduals(accumulator, inspection);
|
|
656
|
+
return failed('reinstall', options.target, accumulator, 'preflight.inspect', collision);
|
|
657
|
+
}
|
|
658
|
+
if (options.target.preApplySource.manifest.scripts?.preApply) {
|
|
659
|
+
try {
|
|
660
|
+
await action(accumulator, 'preApply', () => options.driver.runPreApply({
|
|
661
|
+
target: options.target,
|
|
662
|
+
plugin: options.target.preApplySource,
|
|
663
|
+
}), events);
|
|
664
|
+
}
|
|
665
|
+
catch (error) {
|
|
666
|
+
return failed('reinstall', options.target, accumulator, 'preApply', errorMessage(error), readSafeOperationError(error));
|
|
667
|
+
}
|
|
668
|
+
}
|
|
658
669
|
}
|
|
659
670
|
const cleanupResult = await executeCleanup({
|
|
660
671
|
command: 'reinstall',
|
|
661
672
|
target: options.target,
|
|
662
673
|
driver: options.driver,
|
|
663
|
-
store,
|
|
664
674
|
accumulator,
|
|
665
675
|
events,
|
|
666
676
|
});
|
|
@@ -668,14 +678,88 @@ async function executeRebuildOperationCore(options, accumulator, store, events)
|
|
|
668
678
|
return cleanupResult;
|
|
669
679
|
return materializeTarget({
|
|
670
680
|
command: 'reinstall',
|
|
671
|
-
lifecycleEvent: 'install',
|
|
672
681
|
target: options.target,
|
|
673
682
|
driver: options.driver,
|
|
674
|
-
store,
|
|
675
683
|
accumulator,
|
|
676
684
|
events,
|
|
685
|
+
inspection,
|
|
686
|
+
preApplyCompleted: true,
|
|
687
|
+
skipStaleCleanup: true,
|
|
677
688
|
});
|
|
678
689
|
}
|
|
690
|
+
export async function prepareRebuildOperation(options) {
|
|
691
|
+
const accumulator = createAccumulator();
|
|
692
|
+
const events = {
|
|
693
|
+
command: options.command,
|
|
694
|
+
target: options.target.identity,
|
|
695
|
+
emit: options.onActionEvent,
|
|
696
|
+
now: options.now ?? Date.now,
|
|
697
|
+
};
|
|
698
|
+
try {
|
|
699
|
+
if (options.target.platformDeployment) {
|
|
700
|
+
if (!canVerifyPlatformAtExecution(options.command, options.target))
|
|
701
|
+
await options.target.platformDeployment.verify();
|
|
702
|
+
}
|
|
703
|
+
else
|
|
704
|
+
validateDesiredTarget(options.target);
|
|
705
|
+
}
|
|
706
|
+
catch (error) {
|
|
707
|
+
return {
|
|
708
|
+
status: 'failed',
|
|
709
|
+
result: failed(options.command, options.target, accumulator, 'preflight', errorMessage(error)),
|
|
710
|
+
};
|
|
711
|
+
}
|
|
712
|
+
let inspection;
|
|
713
|
+
try {
|
|
714
|
+
inspection = await action(accumulator, 'preflight.inspect', async () => {
|
|
715
|
+
await options.driver.preflightMaterialize?.(options.target);
|
|
716
|
+
return inspectOwnedComponents({
|
|
717
|
+
components: options.deferNativeInspection
|
|
718
|
+
? options.target.ownedComponents.filter((component) => component.kind !== 'native-plugin')
|
|
719
|
+
: options.target.ownedComponents,
|
|
720
|
+
executor: options.driver.ownership,
|
|
721
|
+
nativeProbe: options.driver.probeNative,
|
|
722
|
+
});
|
|
723
|
+
}, events, collisionMessage);
|
|
724
|
+
}
|
|
725
|
+
catch (error) {
|
|
726
|
+
return {
|
|
727
|
+
status: 'failed',
|
|
728
|
+
result: failed(options.command, options.target, accumulator, 'preflight.inspect', errorMessage(error)),
|
|
729
|
+
};
|
|
730
|
+
}
|
|
731
|
+
const collision = collisionMessage(inspection);
|
|
732
|
+
if (collision) {
|
|
733
|
+
recordInspectionResiduals(accumulator, inspection);
|
|
734
|
+
return {
|
|
735
|
+
status: 'failed',
|
|
736
|
+
result: failed(options.command, options.target, accumulator, 'preflight.inspect', collision),
|
|
737
|
+
};
|
|
738
|
+
}
|
|
739
|
+
if (!options.skipPreApply && hasPlannedPreApply(options.target)) {
|
|
740
|
+
try {
|
|
741
|
+
await action(accumulator, 'preApply', () => options.driver.runPreApply({
|
|
742
|
+
target: options.target,
|
|
743
|
+
plugin: options.target.preApplySource,
|
|
744
|
+
}), events);
|
|
745
|
+
}
|
|
746
|
+
catch (error) {
|
|
747
|
+
return {
|
|
748
|
+
status: 'failed',
|
|
749
|
+
result: failed(options.command, options.target, accumulator, 'preApply', errorMessage(error), readSafeOperationError(error)),
|
|
750
|
+
};
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
return {
|
|
754
|
+
status: 'ready',
|
|
755
|
+
preparation: {
|
|
756
|
+
command: options.command,
|
|
757
|
+
target: options.target,
|
|
758
|
+
inspection,
|
|
759
|
+
actions: accumulator.actions,
|
|
760
|
+
},
|
|
761
|
+
};
|
|
762
|
+
}
|
|
679
763
|
export async function executeRebuildTargets(options) {
|
|
680
764
|
const results = [];
|
|
681
765
|
for (const target of options.targets) {
|
|
@@ -683,11 +767,24 @@ export async function executeRebuildTargets(options) {
|
|
|
683
767
|
command: options.command,
|
|
684
768
|
target,
|
|
685
769
|
driver: options.driver,
|
|
686
|
-
activeStore: options.activeStore,
|
|
687
770
|
...(options.onActionEvent ? { onActionEvent: options.onActionEvent } : {}),
|
|
688
771
|
...(options.now ? { now: options.now } : {}),
|
|
689
772
|
}));
|
|
690
773
|
}
|
|
774
|
+
const postcheckFailures = await options.driver.completePostchecks?.() ?? [];
|
|
775
|
+
for (const failure of postcheckFailures) {
|
|
776
|
+
const index = results.findIndex((result) => result.target === failure.target.identity);
|
|
777
|
+
if (index === -1 || results[index].status === 'failed')
|
|
778
|
+
continue;
|
|
779
|
+
const result = results[index];
|
|
780
|
+
const message = errorMessage(failure.error);
|
|
781
|
+
result.failures.unshift({ phase: 'postcheck.inspect', message });
|
|
782
|
+
results[index] = {
|
|
783
|
+
...result,
|
|
784
|
+
status: 'failed',
|
|
785
|
+
error: { phase: 'postcheck.inspect', message },
|
|
786
|
+
};
|
|
787
|
+
}
|
|
691
788
|
return results;
|
|
692
789
|
}
|
|
693
790
|
//# sourceMappingURL=rebuild-operations.js.map
|