@lesliechan721/aw 0.1.0-beta.8 → 0.1.0-beta.81
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 +490 -2841
- 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 -30
- package/dist/src/commands/catalog-publication-inspection.js +511 -91
- 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,19 +1,159 @@
|
|
|
1
1
|
import crypto from 'node:crypto';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import fs from 'fs-extra';
|
|
4
|
+
async function pathEvidence(component) {
|
|
5
|
+
const target = await fs.lstat(component.path).then((stats) => ({
|
|
6
|
+
type: stats.isDirectory() ? 'directory' : stats.isFile() ? 'file' : stats.isSymbolicLink() ? 'symlink' : 'other',
|
|
7
|
+
dev: stats.dev,
|
|
8
|
+
ino: stats.ino,
|
|
9
|
+
size: stats.size,
|
|
10
|
+
mtimeMs: stats.mtimeMs,
|
|
11
|
+
})).catch((error) => error.code === 'ENOENT'
|
|
12
|
+
? { type: 'absent' }
|
|
13
|
+
: { type: 'error', code: error.code ?? 'unknown' });
|
|
14
|
+
const ownershipPath = component.kind === 'skill-directory' || component.kind === 'owned-directory'
|
|
15
|
+
? path.join(component.path, '.agent-workflows-owner.json')
|
|
16
|
+
: component.path;
|
|
17
|
+
const ownership = await fs.readFile(ownershipPath).then((content) => `sha256:${crypto.createHash('sha256').update(content).digest('hex')}`)
|
|
18
|
+
.catch((error) => `unreadable:${error.code ?? 'unknown'}`);
|
|
19
|
+
return `sha256:${crypto.createHash('sha256').update(JSON.stringify({ target, ownership })).digest('hex')}`;
|
|
20
|
+
}
|
|
21
|
+
export async function forceOfflineCleanupEvidence(options) {
|
|
22
|
+
if (options.components.some((component) => component.kind === 'owned-directory')) {
|
|
23
|
+
throw new Error('forceCleanupNotExclusive: native package directories cannot use force cleanup.');
|
|
24
|
+
}
|
|
25
|
+
const actions = await Promise.all(options.components.map(async (component) => ({
|
|
26
|
+
action: 'removeOwnedOutput',
|
|
27
|
+
kind: component.kind,
|
|
28
|
+
target: component.path,
|
|
29
|
+
allowedRoot: component.allowedRoot,
|
|
30
|
+
owner: component.identity,
|
|
31
|
+
pathEvidence: await pathEvidence(component),
|
|
32
|
+
})));
|
|
33
|
+
actions.sort((left, right) => left.target.localeCompare(right.target));
|
|
34
|
+
const plan = {
|
|
35
|
+
schemaVersion: 1,
|
|
36
|
+
pluginId: options.pluginId,
|
|
37
|
+
sourceIdentity: options.sourceIdentity,
|
|
38
|
+
platform: options.platform,
|
|
39
|
+
scope: options.scope,
|
|
40
|
+
actions,
|
|
41
|
+
};
|
|
42
|
+
const planDigest = calculateOfflineCleanupPlanDigest(plan);
|
|
43
|
+
return {
|
|
44
|
+
reason: options.reason,
|
|
45
|
+
pluginId: options.pluginId,
|
|
46
|
+
pluginName: options.pluginName,
|
|
47
|
+
sourceId: options.sourceId,
|
|
48
|
+
sourceIdentity: options.sourceIdentity,
|
|
49
|
+
platform: options.platform,
|
|
50
|
+
scope: options.scope,
|
|
51
|
+
plan,
|
|
52
|
+
planDigest,
|
|
53
|
+
targetFingerprint: planDigest,
|
|
54
|
+
forceExclusive: true,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function isPathInside(candidate, root) {
|
|
58
|
+
const relative = path.relative(path.resolve(root), path.resolve(candidate));
|
|
59
|
+
return relative === ''
|
|
60
|
+
|| (relative !== '..' && !relative.startsWith(`..${path.sep}`) && !path.isAbsolute(relative));
|
|
61
|
+
}
|
|
62
|
+
function calculateOfflineCleanupPlanDigest(plan) {
|
|
63
|
+
return `sha256:${crypto.createHash('sha256').update(JSON.stringify(plan)).digest('hex')}`;
|
|
64
|
+
}
|
|
65
|
+
export function intentOnlyOfflineCleanupEvidence(options) {
|
|
66
|
+
const plan = {
|
|
67
|
+
schemaVersion: 1,
|
|
68
|
+
pluginId: options.pluginId,
|
|
69
|
+
sourceIdentity: options.sourceIdentity,
|
|
70
|
+
platform: options.platform,
|
|
71
|
+
scope: options.scope,
|
|
72
|
+
actions: [],
|
|
73
|
+
};
|
|
74
|
+
const planDigest = calculateOfflineCleanupPlanDigest(plan);
|
|
75
|
+
return {
|
|
76
|
+
reason: 'bundleUnavailable',
|
|
77
|
+
...options,
|
|
78
|
+
plan,
|
|
79
|
+
planDigest,
|
|
80
|
+
targetFingerprint: planDigest,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
2
83
|
export function offlineCleanupEvidenceFromInventory(options) {
|
|
3
|
-
const references = options.inventory.references.filter((reference) => (reference.kind === 'namespacedOwner'
|
|
84
|
+
const references = options.inventory.references.filter((reference) => (reference.kind === 'namespacedOwner'
|
|
85
|
+
|| reference.kind === 'namespacedMarketplace')
|
|
4
86
|
&& reference.pluginName === options.pluginName
|
|
5
87
|
&& reference.sourceId === options.sourceId
|
|
6
|
-
&& reference.sourceIdentity === options.sourceIdentity
|
|
88
|
+
&& (reference.sourceIdentity ?? reference.ownedComponent?.identity.sourceIdentity) === options.sourceIdentity
|
|
7
89
|
&& reference.platform === options.platform
|
|
8
90
|
&& reference.scope === options.scope);
|
|
9
91
|
if (references.length === 0)
|
|
10
92
|
return null;
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
93
|
+
const marketplaceRoots = options.inventory.references.flatMap((reference) => reference.kind === 'namespacedMarketplace'
|
|
94
|
+
&& reference.sourceId === options.sourceId
|
|
95
|
+
&& reference.sourceIdentity === options.sourceIdentity
|
|
96
|
+
&& reference.pluginName === undefined
|
|
97
|
+
&& path.basename(reference.location) === 'config.json'
|
|
98
|
+
? [path.dirname(reference.location)]
|
|
99
|
+
: []);
|
|
100
|
+
const ownedReferences = references.filter((reference) => reference.kind !== 'namespacedOwner'
|
|
101
|
+
|| !marketplaceRoots.some((root) => isPathInside(reference.location, path.join(root, 'plugins', options.pluginName))));
|
|
102
|
+
const actions = ownedReferences.flatMap((reference) => {
|
|
103
|
+
if (options.platform === 'codex' && reference.kind === 'namespacedMarketplace')
|
|
104
|
+
return [];
|
|
105
|
+
return [{
|
|
106
|
+
action: reference.kind === 'namespacedOwner'
|
|
107
|
+
? 'removeOwnedOutput'
|
|
108
|
+
: 'removeNativeRegistration',
|
|
109
|
+
kind: reference.kind,
|
|
110
|
+
target: reference.ownedComponent && 'path' in reference.ownedComponent ? reference.ownedComponent.path : reference.location,
|
|
111
|
+
...(reference.ownedComponent ? { component: reference.ownedComponent } : {}),
|
|
112
|
+
...(reference.recoveryCandidate ? { recoveryCandidate: reference.recoveryCandidate } : {}),
|
|
113
|
+
...(reference.pathEvidence ? { pathEvidence: reference.pathEvidence } : {}),
|
|
114
|
+
...(reference.marketplaceName ? { marketplaceName: reference.marketplaceName } : {}),
|
|
115
|
+
...(reference.projectKey !== undefined ? { projectKey: reference.projectKey } : {}),
|
|
116
|
+
...(reference.pluginVersion ? { pluginVersion: reference.pluginVersion } : {}),
|
|
117
|
+
}];
|
|
118
|
+
});
|
|
119
|
+
if (options.platform === 'codex') {
|
|
120
|
+
const registeredNames = new Set(options.inventory.references.flatMap((reference) => reference.kind === 'namespacedMarketplace'
|
|
121
|
+
&& reference.sourceId === options.sourceId
|
|
122
|
+
&& reference.sourceIdentity === options.sourceIdentity
|
|
123
|
+
&& reference.pluginName === undefined
|
|
124
|
+
&& reference.marketplaceName
|
|
125
|
+
? [reference.marketplaceName]
|
|
126
|
+
: []));
|
|
127
|
+
const nativeNames = new Set(options.inventory.references.flatMap((reference) => reference.kind === 'namespacedMarketplace'
|
|
128
|
+
&& reference.pluginName === options.pluginName
|
|
129
|
+
&& reference.platform === 'codex'
|
|
130
|
+
&& reference.marketplaceName
|
|
131
|
+
&& ((reference.sourceId === options.sourceId
|
|
132
|
+
&& reference.sourceIdentity === options.sourceIdentity)
|
|
133
|
+
|| (reference.sourceId === undefined && registeredNames.has(reference.marketplaceName)))
|
|
134
|
+
? [reference.marketplaceName]
|
|
135
|
+
: []));
|
|
136
|
+
if (nativeNames.size === 1) {
|
|
137
|
+
const marketplaceName = [...nativeNames][0];
|
|
138
|
+
actions.push({
|
|
139
|
+
action: 'removeNativeRegistration',
|
|
140
|
+
kind: 'namespacedMarketplace',
|
|
141
|
+
target: `${options.pluginName}@${marketplaceName}`,
|
|
142
|
+
marketplaceName,
|
|
143
|
+
activationScope: options.scope,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
actions.sort((left, right) => JSON.stringify(left).localeCompare(JSON.stringify(right), 'en'));
|
|
148
|
+
const plan = {
|
|
149
|
+
schemaVersion: 1,
|
|
150
|
+
pluginId: options.pluginId,
|
|
151
|
+
sourceIdentity: options.sourceIdentity,
|
|
152
|
+
platform: options.platform,
|
|
153
|
+
scope: options.scope,
|
|
154
|
+
actions,
|
|
155
|
+
};
|
|
156
|
+
const planDigest = calculateOfflineCleanupPlanDigest(plan);
|
|
17
157
|
return {
|
|
18
158
|
reason: options.reason,
|
|
19
159
|
pluginId: options.pluginId,
|
|
@@ -22,17 +162,25 @@ export function offlineCleanupEvidenceFromInventory(options) {
|
|
|
22
162
|
sourceIdentity: options.sourceIdentity,
|
|
23
163
|
platform: options.platform,
|
|
24
164
|
scope: options.scope,
|
|
25
|
-
|
|
165
|
+
plan,
|
|
166
|
+
planDigest,
|
|
167
|
+
targetFingerprint: planDigest,
|
|
26
168
|
};
|
|
27
169
|
}
|
|
28
170
|
export function offlineCleanupEvidenceMatches(expected, actual) {
|
|
29
171
|
return expected.reason === actual.reason
|
|
172
|
+
&& expected.forceExclusive === actual.forceExclusive
|
|
30
173
|
&& expected.pluginId === actual.pluginId
|
|
31
174
|
&& expected.pluginName === actual.pluginName
|
|
32
175
|
&& expected.sourceId === actual.sourceId
|
|
33
176
|
&& expected.sourceIdentity === actual.sourceIdentity
|
|
34
177
|
&& expected.platform === actual.platform
|
|
35
178
|
&& expected.scope === actual.scope
|
|
36
|
-
&& expected.
|
|
179
|
+
&& expected.planDigest === calculateOfflineCleanupPlanDigest(expected.plan)
|
|
180
|
+
&& actual.planDigest === calculateOfflineCleanupPlanDigest(actual.plan)
|
|
181
|
+
&& expected.planDigest === actual.planDigest
|
|
182
|
+
&& JSON.stringify(expected.plan) === JSON.stringify(actual.plan)
|
|
183
|
+
&& expected.targetFingerprint === expected.planDigest
|
|
184
|
+
&& actual.targetFingerprint === actual.planDigest;
|
|
37
185
|
}
|
|
38
186
|
//# sourceMappingURL=offline-cleanup-evidence.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"offline-cleanup-evidence.js","sourceRoot":"","sources":["../../../src/commands/offline-cleanup-evidence.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"offline-cleanup-evidence.js","sourceRoot":"","sources":["../../../src/commands/offline-cleanup-evidence.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,UAAU,CAAC;AAmC1B,KAAK,UAAU,YAAY,CAAC,SAAoD;IAC9E,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC7D,IAAI,EAAE,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;QAChH,GAAG,EAAE,KAAK,CAAC,GAAG;QACd,GAAG,EAAE,KAAK,CAAC,GAAG;QACd,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,OAAO,EAAE,KAAK,CAAC,OAAO;KACvB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE,CAAE,KAA+B,CAAC,IAAI,KAAK,QAAQ;QAC9E,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE;QACpB,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAG,KAA+B,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C,QAAQ;WACrC,QAAQ,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK;WAC/B,QAAQ,CAAC,UAAU,KAAK,iCAAiC,CAAC,QAAQ,CAAC,IAAI,CAAC;WACxE,MAAM,CAAC,UAAU,KAAK,iCAAiC,CAAC,MAAM,CAAC,IAAI,CAAC;WACpE,QAAQ,CAAC,UAAU,KAAK,MAAM,CAAC,UAAU;WACzC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC;WAC7D,QAAQ,CAAC,iBAAiB,KAAK,QAAQ,CAAC,UAAU;WAClD,MAAM,CAAC,iBAAiB,KAAK,MAAM,CAAC,UAAU,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import type { PlatformName, PluginConfigValue, Scope } from '../types.js';
|
|
2
|
+
import type { OwnedSharedLocator, OwnerIdentity } from '../utils/ownership.js';
|
|
3
|
+
import type { ProducerIdentity } from '../types.js';
|
|
4
|
+
import type { NativeToolClosure } from '@lesliechan721/aw-plugin-core/manifest';
|
|
5
|
+
import type { InstalledCommandSet } from '../utils/managed-command-store.js';
|
|
6
|
+
import type { RetainedManagedCommandPackage } from '../utils/managed-command-materialization.js';
|
|
7
|
+
import type { DeploymentExclusion, FrozenDeploymentPlan } from '../platforms/contracts.js';
|
|
8
|
+
export interface OperationArtifactFile {
|
|
9
|
+
relativePath: string;
|
|
10
|
+
contentBase64: string;
|
|
11
|
+
contentDigest: string;
|
|
12
|
+
mode?: number;
|
|
13
|
+
}
|
|
14
|
+
export interface OperationPlanEvidence {
|
|
15
|
+
catalogDigests: Array<{
|
|
16
|
+
sourceId: string;
|
|
17
|
+
digest: string;
|
|
18
|
+
}>;
|
|
19
|
+
intentDigests: Array<{
|
|
20
|
+
scope: Scope;
|
|
21
|
+
digest: string;
|
|
22
|
+
}>;
|
|
23
|
+
configDigests: Array<{
|
|
24
|
+
pluginId: string;
|
|
25
|
+
scope: Scope;
|
|
26
|
+
platform?: PlatformName;
|
|
27
|
+
digest: string;
|
|
28
|
+
}>;
|
|
29
|
+
targetOwnerFingerprints: Array<{
|
|
30
|
+
pluginId: string;
|
|
31
|
+
platform: PlatformName;
|
|
32
|
+
scope: Scope;
|
|
33
|
+
fingerprint: string;
|
|
34
|
+
}>;
|
|
35
|
+
}
|
|
36
|
+
import type { NativeToolChange } from '../utils/native-tool-review.js';
|
|
37
|
+
export type OperationAction = OperationActionDefinition & {
|
|
38
|
+
nativeToolChanges?: NativeToolChange[];
|
|
39
|
+
};
|
|
40
|
+
type OperationActionDefinition = (RetainedManagedCommandPackage & {
|
|
41
|
+
kind: 'retainManagedCommandPackage';
|
|
42
|
+
pluginId: string;
|
|
43
|
+
platform?: undefined;
|
|
44
|
+
scope: Scope;
|
|
45
|
+
}) | {
|
|
46
|
+
kind: 'materializeNativeSkill';
|
|
47
|
+
artifactId?: string;
|
|
48
|
+
pluginId: string;
|
|
49
|
+
platform: PlatformName;
|
|
50
|
+
scope: Scope;
|
|
51
|
+
skillKey: string;
|
|
52
|
+
files: OperationArtifactFile[];
|
|
53
|
+
contentDigest: string;
|
|
54
|
+
} | {
|
|
55
|
+
kind: 'syncManagedCommandPackage';
|
|
56
|
+
pluginId: string;
|
|
57
|
+
platform?: undefined;
|
|
58
|
+
scope: Scope;
|
|
59
|
+
producer: ProducerIdentity;
|
|
60
|
+
sets: InstalledCommandSet[];
|
|
61
|
+
nativeTools?: NativeToolClosure;
|
|
62
|
+
files: Array<OperationArtifactFile & {
|
|
63
|
+
mode: number;
|
|
64
|
+
}>;
|
|
65
|
+
contentDigest: string;
|
|
66
|
+
} | {
|
|
67
|
+
kind: 'ensureNativeRegistration';
|
|
68
|
+
pluginId: string;
|
|
69
|
+
platform: PlatformName;
|
|
70
|
+
scope: Scope;
|
|
71
|
+
registration: string;
|
|
72
|
+
marketplaceName?: string;
|
|
73
|
+
marketplaceRoot?: string;
|
|
74
|
+
} | {
|
|
75
|
+
kind: 'removeNativeRegistration';
|
|
76
|
+
pluginId: string;
|
|
77
|
+
platform: PlatformName;
|
|
78
|
+
scope: Scope;
|
|
79
|
+
registration: string;
|
|
80
|
+
} | {
|
|
81
|
+
kind: 'setActivation';
|
|
82
|
+
pluginId: string;
|
|
83
|
+
platform: PlatformName;
|
|
84
|
+
scope: Scope;
|
|
85
|
+
enabled: boolean;
|
|
86
|
+
configPath?: string;
|
|
87
|
+
registration?: string;
|
|
88
|
+
} | {
|
|
89
|
+
kind: 'writeOwnedArtifact';
|
|
90
|
+
pluginId: string;
|
|
91
|
+
platform: PlatformName;
|
|
92
|
+
scope: Scope;
|
|
93
|
+
path: string;
|
|
94
|
+
contentDigest: string;
|
|
95
|
+
content?: string;
|
|
96
|
+
sourceContent?: string;
|
|
97
|
+
owner?: OwnerIdentity;
|
|
98
|
+
allowedRoot?: string;
|
|
99
|
+
artifactKind?: 'owned-text-file' | 'skill-directory';
|
|
100
|
+
files?: OperationArtifactFile[];
|
|
101
|
+
allowPristineUnowned?: boolean;
|
|
102
|
+
} | {
|
|
103
|
+
kind: 'updateSharedConfig';
|
|
104
|
+
pluginId: string;
|
|
105
|
+
platform: PlatformName;
|
|
106
|
+
scope: Scope;
|
|
107
|
+
owner: OwnerIdentity;
|
|
108
|
+
locator: OwnedSharedLocator;
|
|
109
|
+
contentDigest: string;
|
|
110
|
+
mutation: {
|
|
111
|
+
kind: 'claude-permissions';
|
|
112
|
+
permissions: unknown;
|
|
113
|
+
} | {
|
|
114
|
+
kind: 'codex-instruction';
|
|
115
|
+
block?: {
|
|
116
|
+
pluginName: string;
|
|
117
|
+
value: string;
|
|
118
|
+
};
|
|
119
|
+
} | {
|
|
120
|
+
kind: 'codex-role-registration';
|
|
121
|
+
roleKey: string;
|
|
122
|
+
configFile: string;
|
|
123
|
+
description: string;
|
|
124
|
+
} | {
|
|
125
|
+
kind: 'codex-activation';
|
|
126
|
+
codexPluginId: string;
|
|
127
|
+
enabled: boolean;
|
|
128
|
+
};
|
|
129
|
+
} | {
|
|
130
|
+
kind: 'removeOwnedArtifact';
|
|
131
|
+
pluginId: string;
|
|
132
|
+
platform: PlatformName;
|
|
133
|
+
scope: Scope;
|
|
134
|
+
path: string;
|
|
135
|
+
ownerFingerprint: string;
|
|
136
|
+
} | {
|
|
137
|
+
kind: 'removePluginConfig';
|
|
138
|
+
pluginId: string;
|
|
139
|
+
platform: PlatformName;
|
|
140
|
+
scope: Scope;
|
|
141
|
+
path: string;
|
|
142
|
+
fingerprint: string;
|
|
143
|
+
} | {
|
|
144
|
+
kind: 'removeActivation';
|
|
145
|
+
pluginId: string;
|
|
146
|
+
platform: 'codex';
|
|
147
|
+
scope: Scope;
|
|
148
|
+
registration: string;
|
|
149
|
+
} | {
|
|
150
|
+
kind: 'removeMarketplaceProjection';
|
|
151
|
+
pluginId: string;
|
|
152
|
+
platform: PlatformName;
|
|
153
|
+
scope: Scope;
|
|
154
|
+
marketplaceRoot: string;
|
|
155
|
+
} | {
|
|
156
|
+
kind: 'runPreApply';
|
|
157
|
+
pluginId: string;
|
|
158
|
+
platform: PlatformName;
|
|
159
|
+
scope: Scope;
|
|
160
|
+
script: string;
|
|
161
|
+
scriptDigest?: string;
|
|
162
|
+
};
|
|
163
|
+
export interface OperationPlan {
|
|
164
|
+
deploymentExclusions?: DeploymentExclusion[];
|
|
165
|
+
nativeToolChanges?: NativeToolChange[];
|
|
166
|
+
deploymentPlans?: FrozenDeploymentPlan[];
|
|
167
|
+
intentChanges: Array<{
|
|
168
|
+
scope: Scope;
|
|
169
|
+
beforeDigest: string;
|
|
170
|
+
afterDigest: string;
|
|
171
|
+
}>;
|
|
172
|
+
actions: OperationAction[];
|
|
173
|
+
changes: string[];
|
|
174
|
+
warnings: string[];
|
|
175
|
+
evidence: OperationPlanEvidence;
|
|
176
|
+
planFingerprint: string;
|
|
177
|
+
}
|
|
178
|
+
export type OperationPlanInput = Omit<OperationPlan, 'planFingerprint'>;
|
|
179
|
+
/** One review surface for native declarations carried by packages or platform Skills. */
|
|
180
|
+
export declare function operationPlanNativeToolChanges(plan: Pick<OperationPlan, 'actions' | 'nativeToolChanges'> | undefined): NativeToolChange[];
|
|
181
|
+
export declare function createOperationPlanConfigDigest(options: {
|
|
182
|
+
pluginId: string;
|
|
183
|
+
scope: Scope;
|
|
184
|
+
platform?: PlatformName;
|
|
185
|
+
effectiveValues: Readonly<Record<string, PluginConfigValue>>;
|
|
186
|
+
}): OperationPlanEvidence['configDigests'][number];
|
|
187
|
+
export declare function createOperationPlan(input: OperationPlanInput): OperationPlan;
|
|
188
|
+
export declare function createBatchIntentCompatiblePlanFingerprint(plan: OperationPlan, ignoredTargetKeys?: ReadonlySet<string>): string;
|
|
189
|
+
export declare function assertOperationPlanFingerprint(expectedFingerprint: string, currentPlan: OperationPlan): void;
|
|
190
|
+
export {};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import crypto from 'node:crypto';
|
|
2
|
+
import { canonicalizeIdentityValue, canonicalizePluginConfigValues, getCommandPackageId } from '@lesliechan721/aw-plugin-core/manifest';
|
|
3
|
+
/** One review surface for native declarations carried by packages or platform Skills. */
|
|
4
|
+
export function operationPlanNativeToolChanges(plan) {
|
|
5
|
+
if (!plan)
|
|
6
|
+
return [];
|
|
7
|
+
const changes = new Map();
|
|
8
|
+
for (const change of [...plan.nativeToolChanges ?? [], ...plan.actions.flatMap((action) => action.nativeToolChanges ?? [])]) {
|
|
9
|
+
const key = getCommandPackageId(change.producer);
|
|
10
|
+
const previous = changes.get(key);
|
|
11
|
+
if (previous && canonicalizeIdentityValue(previous) !== canonicalizeIdentityValue(change))
|
|
12
|
+
throw new Error('nativeToolPlanConflict: one producer has conflicting frozen changes.');
|
|
13
|
+
changes.set(key, change);
|
|
14
|
+
}
|
|
15
|
+
return [...changes.entries()].sort(([left], [right]) => compareText(left, right)).map(([, change]) => change);
|
|
16
|
+
}
|
|
17
|
+
export function createOperationPlanConfigDigest(options) {
|
|
18
|
+
const digest = crypto
|
|
19
|
+
.createHash('sha256')
|
|
20
|
+
.update(JSON.stringify(canonicalizePluginConfigValues(options.effectiveValues)))
|
|
21
|
+
.digest('hex');
|
|
22
|
+
return {
|
|
23
|
+
pluginId: options.pluginId,
|
|
24
|
+
scope: options.scope,
|
|
25
|
+
...(options.platform ? { platform: options.platform } : {}),
|
|
26
|
+
digest: `sha256:${digest}`,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function compareText(left, right) {
|
|
30
|
+
return left < right ? -1 : left > right ? 1 : 0;
|
|
31
|
+
}
|
|
32
|
+
function canonical(values, key) {
|
|
33
|
+
return [...values].sort((left, right) => compareText(key(left), key(right)));
|
|
34
|
+
}
|
|
35
|
+
function canonicalizeOperationPlanInput(input) {
|
|
36
|
+
return {
|
|
37
|
+
...(input.deploymentExclusions?.length ? { deploymentExclusions: canonical(input.deploymentExclusions, (entry) => `${entry.platform}:${entry.pluginId}:${entry.scope.kind}:${entry.scope.kind === 'project' ? entry.scope.projectRoot : ''}:${entry.productId}:${entry.reasonCode}`) } : {}),
|
|
38
|
+
...(input.nativeToolChanges?.length ? { nativeToolChanges: operationPlanNativeToolChanges({ actions: [], nativeToolChanges: input.nativeToolChanges }) } : {}),
|
|
39
|
+
...(input.deploymentPlans ? { deploymentPlans: canonical(input.deploymentPlans, (plan) => plan.binding.id) } : {}),
|
|
40
|
+
intentChanges: canonical(input.intentChanges, (change) => change.scope),
|
|
41
|
+
actions: [...input.actions],
|
|
42
|
+
changes: [...input.changes].sort(compareText),
|
|
43
|
+
warnings: [...input.warnings].sort(compareText),
|
|
44
|
+
evidence: {
|
|
45
|
+
catalogDigests: canonical(input.evidence.catalogDigests, (entry) => entry.sourceId),
|
|
46
|
+
intentDigests: canonical(input.evidence.intentDigests, (entry) => entry.scope),
|
|
47
|
+
configDigests: canonical(input.evidence.configDigests, (entry) => `${entry.pluginId}\0${entry.scope}\0${entry.platform ?? ''}`),
|
|
48
|
+
targetOwnerFingerprints: canonical(input.evidence.targetOwnerFingerprints, (entry) => `${entry.pluginId}\0${entry.platform}\0${entry.scope}`),
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export function createOperationPlan(input) {
|
|
53
|
+
const canonicalInput = canonicalizeOperationPlanInput(input);
|
|
54
|
+
const digest = crypto
|
|
55
|
+
.createHash('sha256')
|
|
56
|
+
.update(JSON.stringify(canonicalInput, (key, value) => key === 'stagingRoot' || key === 'stagingPath' ? undefined : value))
|
|
57
|
+
.digest('hex');
|
|
58
|
+
return { ...canonicalInput, planFingerprint: `sha256:${digest}` };
|
|
59
|
+
}
|
|
60
|
+
export function createBatchIntentCompatiblePlanFingerprint(plan, ignoredTargetKeys = new Set()) {
|
|
61
|
+
const targetKey = (target) => `${target.pluginId}\0${target.platform}\0${target.scope}`;
|
|
62
|
+
return createOperationPlan({
|
|
63
|
+
deploymentPlans: plan.deploymentPlans?.filter((entry) => !ignoredTargetKeys.has(targetKey({
|
|
64
|
+
pluginId: entry.binding.plugin.pluginId, platform: entry.binding.platform, scope: entry.binding.scope.kind
|
|
65
|
+
}))),
|
|
66
|
+
deploymentExclusions: plan.deploymentExclusions?.filter((entry) => !ignoredTargetKeys.has(targetKey({
|
|
67
|
+
pluginId: entry.pluginId, platform: entry.platform, scope: entry.scope.kind
|
|
68
|
+
}))),
|
|
69
|
+
nativeToolChanges: plan.nativeToolChanges?.filter((entry) => !ignoredTargetKeys.has(targetKey({
|
|
70
|
+
pluginId: `${entry.producer.sourceId}/${entry.producer.pluginName}`, platform: entry.producer.platform ?? undefined,
|
|
71
|
+
scope: entry.producer.scope
|
|
72
|
+
}))),
|
|
73
|
+
intentChanges: plan.intentChanges.map(({ scope }) => ({
|
|
74
|
+
scope,
|
|
75
|
+
beforeDigest: 'batch-intent',
|
|
76
|
+
afterDigest: 'batch-intent',
|
|
77
|
+
})),
|
|
78
|
+
actions: plan.actions.filter((action) => !ignoredTargetKeys.has(targetKey(action))),
|
|
79
|
+
changes: plan.changes.filter((change) => ![...ignoredTargetKeys].some((key) => {
|
|
80
|
+
const [pluginId, platform, scope] = key.split('\0');
|
|
81
|
+
return change.startsWith(`${pluginId}:${platform}:${scope}:`);
|
|
82
|
+
})),
|
|
83
|
+
warnings: plan.warnings,
|
|
84
|
+
evidence: {
|
|
85
|
+
...plan.evidence,
|
|
86
|
+
intentDigests: plan.evidence.intentDigests.map(({ scope }) => ({
|
|
87
|
+
scope,
|
|
88
|
+
digest: 'batch-intent',
|
|
89
|
+
})),
|
|
90
|
+
targetOwnerFingerprints: plan.evidence.targetOwnerFingerprints.filter((target) => !ignoredTargetKeys.has(targetKey(target))),
|
|
91
|
+
},
|
|
92
|
+
}).planFingerprint;
|
|
93
|
+
}
|
|
94
|
+
export function assertOperationPlanFingerprint(expectedFingerprint, currentPlan) {
|
|
95
|
+
if (expectedFingerprint !== currentPlan.planFingerprint) {
|
|
96
|
+
throw new Error('operationPlanStale: the reviewed operation plan changed.');
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=operation-plan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-plan.js","sourceRoot":"","sources":["../../../src/commands/operation-plan.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,yBAAyB,EAAE,8BAA8B,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AA4KxI,yFAAyF;AACzF,MAAM,UAAU,8BAA8B,CAAC,IAAsE;IACnH,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACrB,MAAM,OAAO,GAAG,IAAI,GAAG,EAA4B,CAAC;IACpD,KAAK,MAAM,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC,iBAAiB,IAAI,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC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AC7D,KAAK;gBACL,MAAM,EAAE,cAAc;aACvB,CAAC,CAAC;YACH,uBAAuB,EAAE,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAC/E,CAAC,iBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;SAC7C;KACF,CAAC,CAAC,eAAe,CAAC;AACrB,CAAC;AAED,MAAM,UAAU,8BAA8B,CAC5C,mBAA2B,EAC3B,WAA0B;IAE1B,IAAI,mBAAmB,KAAK,WAAW,CAAC,eAAe,EAAE,CAAC;QACxD,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;IAC9E,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { StatusTargetRevision, StatusV8RecoveryAction, StatusV8State } from './status-v6.js';
|
|
2
|
+
import type { RebuildReceiptJson } from '../output/command-receipt.js';
|
|
3
|
+
import type { PlatformName, Scope } from '../types.js';
|
|
4
|
+
export type LifecycleActionId = 'install' | 'sync' | 'refreshAndSync' | 'reinstall' | 'uninstall' | 'cleanup';
|
|
5
|
+
export type LifecycleActionReason = 'targetAbsent' | 'statusRecovery' | 'orphanedManagedContent' | 'savedSettingsNotApplied' | 'newActiveVersion' | 'rebuildManagedContent' | 'removeManagedContent';
|
|
6
|
+
export interface AllowedLifecycleAction {
|
|
7
|
+
id: LifecycleActionId;
|
|
8
|
+
pluginId: string;
|
|
9
|
+
platform: PlatformName;
|
|
10
|
+
scope: Scope;
|
|
11
|
+
reason: LifecycleActionReason;
|
|
12
|
+
availableVersion?: string;
|
|
13
|
+
refreshBeforeReview?: true;
|
|
14
|
+
}
|
|
15
|
+
export interface LifecycleTargetFacts {
|
|
16
|
+
pluginId: string;
|
|
17
|
+
platform: PlatformName;
|
|
18
|
+
scope: Scope;
|
|
19
|
+
state: StatusV8State;
|
|
20
|
+
recoveryActions: StatusV8RecoveryAction[];
|
|
21
|
+
revision?: StatusTargetRevision['revision'];
|
|
22
|
+
installable?: boolean;
|
|
23
|
+
uninstallable?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare function buildAllowedLifecycleActions(target: LifecycleTargetFacts): AllowedLifecycleAction[];
|
|
26
|
+
export declare function selectLifecycleRetryAction(options: {
|
|
27
|
+
operationKind: 'pluginWrite' | 'configSave' | 'configReset' | 'portableInstall' | 'sourceMutation' | 'catalogGeneration' | undefined;
|
|
28
|
+
originalAction?: LifecycleActionId;
|
|
29
|
+
target: LifecycleTargetFacts;
|
|
30
|
+
}): AllowedLifecycleAction | undefined;
|
|
31
|
+
export interface AllowedConfigAction {
|
|
32
|
+
id: 'configSave' | 'configSaveAndApply';
|
|
33
|
+
label: string;
|
|
34
|
+
apply: boolean;
|
|
35
|
+
}
|
|
36
|
+
export declare function buildAllowedConfigActions(hasChanges: boolean): AllowedConfigAction[];
|
|
37
|
+
export interface OperationResultModel {
|
|
38
|
+
state: RebuildReceiptJson['overallState'];
|
|
39
|
+
changes: string[];
|
|
40
|
+
warnings: string[];
|
|
41
|
+
targetResults: RebuildReceiptJson['targetResults'];
|
|
42
|
+
commandResults?: RebuildReceiptJson['commandResults'];
|
|
43
|
+
recoveryActions: string[];
|
|
44
|
+
planFingerprint?: string;
|
|
45
|
+
errors: RebuildReceiptJson['errors'];
|
|
46
|
+
}
|
|
47
|
+
export declare function buildOperationResultModel(receipt: RebuildReceiptJson): OperationResultModel;
|