@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
|
@@ -0,0 +1,592 @@
|
|
|
1
|
+
import { projectTarget } from '../commands/public-lifecycle-result.js';
|
|
2
|
+
import { CLI_OUTPUT_SCHEMA_VERSION, commandResult, safePublicMessage } from './public-result.js';
|
|
3
|
+
import { geminiNativeConsentDiagnostic } from './native-consent.js';
|
|
4
|
+
/** Pick only the declared domain DTO members. Never spread a service result. */
|
|
5
|
+
function pick(value, keys) {
|
|
6
|
+
return Object.fromEntries(keys.filter((key) => Object.hasOwn(value, key)).map((key) => [key, value[key]]));
|
|
7
|
+
}
|
|
8
|
+
function record(value) { return value && typeof value === 'object' && !Array.isArray(value) && !(value instanceof Error) ? value : {}; }
|
|
9
|
+
function list(value) { return Array.isArray(value) ? value.map(record) : []; }
|
|
10
|
+
function mapField(data, key, project) {
|
|
11
|
+
if (Array.isArray(data[key]))
|
|
12
|
+
data[key] = list(data[key]).map(project);
|
|
13
|
+
else if (data[key] !== undefined && data[key] !== null)
|
|
14
|
+
data[key] = project(record(data[key]));
|
|
15
|
+
}
|
|
16
|
+
function message(value, code, publicRoots = []) {
|
|
17
|
+
// Legacy domain messages can contain translated text, exception paths, or script output.
|
|
18
|
+
// Their stable codes remain usable; only safe English messages cross this boundary.
|
|
19
|
+
const text = typeof value === 'string' ? value : '';
|
|
20
|
+
if (!text || /[\u3400-\u9fff]/u.test(text))
|
|
21
|
+
return `The operation reported ${code}.`;
|
|
22
|
+
return safePublicMessage(text.replace(/\n\s*at\s[\s\S]*/u, '')
|
|
23
|
+
.replace(/(^|[\s"'`(])((?:\/[^\s"'`),;]+|[A-Za-z]:\\[^\s"'`),;]+))/gu, (_match, prefix, location) => `${prefix}${!location.split(/[\\/]/u).includes('..') && publicRoots.some((root) => location === root || location.startsWith(`${root}/`) || location.startsWith(`${root}\\`)) ? location : '<path>'}`), code);
|
|
24
|
+
}
|
|
25
|
+
function diagnostic(value, severity = 'error', subject, publicRoots = []) {
|
|
26
|
+
const entry = typeof value === 'string' ? { message: value } : record(value);
|
|
27
|
+
const code = typeof entry.code === 'string' ? entry.code : severity === 'warning' ? 'commandWarning' : 'commandFailed';
|
|
28
|
+
const identity = { ...subject, ...pick(entry, ['pluginId', 'sourceId', 'scope', 'field']),
|
|
29
|
+
...(typeof entry.plugin === 'string' ? { pluginId: entry.plugin } : {}) };
|
|
30
|
+
return { code, severity: entry.blocking === false || entry.severity === 'warning' ? 'warning' : severity,
|
|
31
|
+
message: message(entry.message, code, publicRoots), ...(Object.keys(identity).length ? { subject: identity } : {}) };
|
|
32
|
+
}
|
|
33
|
+
function issue(value) {
|
|
34
|
+
return { ...pick(value, ['code', 'path', 'blocking', 'stage', 'severity']), ...(typeof value.subject === 'string' ? { subject: value.subject } : {}), message: message(value.message, String(value.code ?? 'commandFailed')) };
|
|
35
|
+
}
|
|
36
|
+
function configIssue(value) {
|
|
37
|
+
return { ...pick(value, ['type', 'code', 'key', 'source', 'path']), message: message(value.message, String(value.code ?? 'configInvalid')) };
|
|
38
|
+
}
|
|
39
|
+
function configField(value) {
|
|
40
|
+
const data = pick(value, ['key', 'title', 'kind', 'reserved', 'writable', 'canSet', 'canUnset', 'valueState', 'effectiveValue', 'sourceLayer', 'storedValue', 'storedSourceLayer', 'invalidOverride', 'fallback', 'value', 'source', 'matchedPreset', 'valid', 'issues']);
|
|
41
|
+
mapField(data, 'issues', configIssue);
|
|
42
|
+
for (const key of ['invalidOverride', 'fallback'])
|
|
43
|
+
mapField(data, key, (entry) => {
|
|
44
|
+
const result = pick(entry, ['state', 'sourceLayer', 'effectiveValue', 'issues']);
|
|
45
|
+
mapField(result, 'issues', configIssue);
|
|
46
|
+
return result;
|
|
47
|
+
});
|
|
48
|
+
return data;
|
|
49
|
+
}
|
|
50
|
+
function configDefinition(value) {
|
|
51
|
+
const data = pick(value, ['type', 'title', 'description', 'default', 'required', 'sensitive', 'const', 'valueRef', 'choices', 'validation', 'properties', 'additionalProperties', 'variants', 'items']);
|
|
52
|
+
mapField(data, 'valueRef', (entry) => pick(entry, ['plugin', 'field', 'key', 'label', 'include']));
|
|
53
|
+
mapField(data, 'choices', (entry) => ({ allowCustom: entry.allowCustom, presets: list(entry.presets).map((preset) => pick(preset, ['id', 'title', 'description', 'value', 'recommended'])) }));
|
|
54
|
+
mapField(data, 'validation', (entry) => {
|
|
55
|
+
const validation = pick(entry, ['minLength', 'maxLength', 'pattern', 'format', 'integer', 'minimum', 'maximum', 'multipleOf', 'minProperties', 'maxProperties', 'key', 'minItems', 'maxItems', 'uniqueItems', 'uniqueBy']);
|
|
56
|
+
mapField(validation, 'key', (key) => pick(key, ['minLength', 'maxLength', 'pattern', 'format']));
|
|
57
|
+
return validation;
|
|
58
|
+
});
|
|
59
|
+
if (data.properties)
|
|
60
|
+
data.properties = Object.fromEntries(Object.entries(record(data.properties)).map(([key, field]) => [key, configDefinition(record(field))]));
|
|
61
|
+
if (data.additionalProperties && typeof data.additionalProperties === 'object')
|
|
62
|
+
data.additionalProperties = configDefinition(record(data.additionalProperties));
|
|
63
|
+
if (data.items)
|
|
64
|
+
data.items = configDefinition(record(data.items));
|
|
65
|
+
mapField(data, 'variants', (entry) => {
|
|
66
|
+
const variant = (value) => ({ properties: Object.fromEntries(Object.entries(record(record(value).properties)).map(([key, field]) => [key, configDefinition(record(field))])) });
|
|
67
|
+
return { ...pick(entry, ['discriminator', 'missing']), cases: Object.fromEntries(Object.entries(record(entry.cases)).map(([key, value]) => [key, variant(value)])), ...(entry.otherwise ? { otherwise: variant(entry.otherwise) } : {}) };
|
|
68
|
+
});
|
|
69
|
+
return data;
|
|
70
|
+
}
|
|
71
|
+
function nativeClosure(value) {
|
|
72
|
+
return { reader: value.reader, definitions: list(value.definitions).map((entry) => pick(entry, ['key', 'protocol'])), consumers: list(value.consumers).map((entry) => ({ ...pick(entry, ['kind', 'key']), tools: list(entry.tools).map((tool) => pick(tool, ['key', 'platforms', 'policy', 'fallback'])) })) };
|
|
73
|
+
}
|
|
74
|
+
function nativeChange(value) {
|
|
75
|
+
return { producer: producer(record(value.producer)), before: value.before === null ? null : nativeClosure(record(value.before)), after: value.after === null ? null : nativeClosure(record(value.after)) };
|
|
76
|
+
}
|
|
77
|
+
function versionCheck(value) {
|
|
78
|
+
const data = pick(value, ['plugin', 'ok', 'status', 'baseVersion', 'currentVersion', 'baseTarget', 'currentTarget', 'productionChanged', 'baseDigest', 'currentDigest', 'changedPaths', 'warnings', 'errors']);
|
|
79
|
+
for (const key of ['warnings', 'errors'])
|
|
80
|
+
if (Array.isArray(data[key]))
|
|
81
|
+
data[key] = data[key].map((entry) => typeof entry === 'string' ? message(entry, 'pluginVersionCheck') : issue(record(entry)));
|
|
82
|
+
return data;
|
|
83
|
+
}
|
|
84
|
+
function versionReport(value) {
|
|
85
|
+
const data = pick(value, ['schemaVersion', 'policy', 'ok', 'base', 'requestedBase', 'baseCommit', 'checkedPlugins', 'checks']);
|
|
86
|
+
mapField(data, 'base', (entry) => pick(entry, ['requested', 'commit']));
|
|
87
|
+
mapField(data, 'checks', versionCheck);
|
|
88
|
+
return data;
|
|
89
|
+
}
|
|
90
|
+
function producer(value) {
|
|
91
|
+
return pick(value, ['sourceId', 'sourceIdentity', 'pluginName', 'kind', 'key', 'scope', 'projectRoot', 'platform', 'placementKey']);
|
|
92
|
+
}
|
|
93
|
+
function commandResults(values, diagnostics) {
|
|
94
|
+
return values?.map((entry) => {
|
|
95
|
+
const subject = { pluginId: `${entry.producer.sourceId}/${entry.producer.pluginName}`, scope: entry.producer.scope };
|
|
96
|
+
diagnostics.push(...entry.errors.map((error) => diagnostic(error, 'error', subject)));
|
|
97
|
+
return { ...pick(entry, ['state', 'commandIds', 'removedCommandIds']), producer: producer(record(entry.producer)), errors: entry.errors.map((error) => issue(record(error))), blockerCodes: entry.errors.map((error) => error.code) };
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
function applyResult(value, diagnostics) {
|
|
101
|
+
const data = pick(value, ['state', 'reason']);
|
|
102
|
+
data.targetResults = value.targetResults.map((entry) => {
|
|
103
|
+
const subject = { pluginId: entry.target.pluginId ?? entry.target.pluginName, target: entry.target.platform, scope: entry.target.scope };
|
|
104
|
+
if (entry.errorCode)
|
|
105
|
+
diagnostics.push(diagnostic({ code: entry.errorCode, message: entry.message }, 'error', subject));
|
|
106
|
+
return { ...pick(entry, ['action', 'state', 'relation', 'requiredBy', 'errorCode']), ...(entry.message ? { message: message(entry.message, entry.errorCode ?? 'configApplyFailed') } : {}), target: pick(entry.target, ['pluginName', 'pluginId', 'platform', 'scope']),
|
|
107
|
+
...(entry.errorCode ? { blockerCodes: [entry.errorCode] } : {}) };
|
|
108
|
+
});
|
|
109
|
+
if ('error' in value && value.error) {
|
|
110
|
+
data.error = issue(record(value.error));
|
|
111
|
+
diagnostics.push(diagnostic(value.error));
|
|
112
|
+
}
|
|
113
|
+
if ('errors' in value && value.errors) {
|
|
114
|
+
data.errors = value.errors.map((entry) => issue(record(entry)));
|
|
115
|
+
diagnostics.push(...value.errors.map((entry) => diagnostic(entry)));
|
|
116
|
+
}
|
|
117
|
+
if (value.commandResults)
|
|
118
|
+
data.commandResults = commandResults(value.commandResults, diagnostics);
|
|
119
|
+
return data;
|
|
120
|
+
}
|
|
121
|
+
function sourceImpact(value) {
|
|
122
|
+
const data = pick(value, ['impactSchemaVersion', 'inventorySchemaVersion', 'sourceId', 'inventoryComplete', 'primaryChange', 'references', 'affectedReferences', 'changes', 'errors']);
|
|
123
|
+
mapField(data, 'primaryChange', (entry) => pick(entry, ['fromSourceId', 'toSourceId']));
|
|
124
|
+
for (const key of ['references', 'affectedReferences'])
|
|
125
|
+
mapField(data, key, (entry) => pick(entry, ['category', 'sourceId', 'pluginId', 'platform', 'scope', 'projectRecord', 'marketplaceName']));
|
|
126
|
+
mapField(data, 'changes', (entry) => {
|
|
127
|
+
const changes = pick(entry, ['added', 'removed', 'changed', 'newlyIncompatible', 'dependencyChanged', 'platformSupportChanged']);
|
|
128
|
+
mapField(changes, 'platformSupportChanged', (change) => pick(change, ['pluginId', 'removedPlatforms', 'addedPlatforms']));
|
|
129
|
+
return changes;
|
|
130
|
+
});
|
|
131
|
+
mapField(data, 'errors', (entry) => ({ ...pick(entry, ['code', 'kind']), ...(entry.relevance ? { relevance: pick(record(entry.relevance), ['global', 'sourceId', 'pluginName', 'platform', 'scope']) } : {}) }));
|
|
132
|
+
return data;
|
|
133
|
+
}
|
|
134
|
+
function active(value) { return pick(value, ['sourceConfigFingerprint', 'sourceIdentity', 'requestedRef', 'resolvedCommit', 'logicalIdentity', 'manifestDigest', 'snapshotDigest', 'activatedAt']); }
|
|
135
|
+
function resolution(value) { return pick(value, ['sourceIdentity', 'logicalIdentity', 'catalogVersion', 'channel', 'requestedRef', 'resolvedCommit', 'manifestDigest', 'snapshotDigest']); }
|
|
136
|
+
function compatibility(value) { return pick(value, ['state', 'requiredCapabilities', 'missingCapabilities']); }
|
|
137
|
+
function sourceEntry(value) {
|
|
138
|
+
const data = pick(value, ['sourceId', 'configuredSourceIdentity', 'active', 'activeReady', 'configMatchesActive', 'catalogVersion', 'channel', 'storeKey', 'lastSync', 'compatibility', 'errorCode']);
|
|
139
|
+
if (value.configuration) {
|
|
140
|
+
const configuration = pick(record(value.configuration), ['id', 'type', 'url', 'path', 'refPolicy', 'subdir', 'primary', 'autoCheck', 'sourceIdentity', 'managedBy']);
|
|
141
|
+
mapField(configuration, 'refPolicy', (entry) => pick(entry, ['type', 'ref']));
|
|
142
|
+
mapField(configuration, 'managedBy', (entry) => pick(entry, ['kind', 'workspaceIdentity']));
|
|
143
|
+
data.configuration = configuration;
|
|
144
|
+
}
|
|
145
|
+
mapField(data, 'active', active);
|
|
146
|
+
mapField(data, 'lastSync', (entry) => pick(entry, ['syncedAt', 'mode', 'state', 'resolvedCommit', 'errorCode']));
|
|
147
|
+
mapField(data, 'compatibility', compatibility);
|
|
148
|
+
return data;
|
|
149
|
+
}
|
|
150
|
+
function reviewSkills(value) {
|
|
151
|
+
return { ...pick(value, ['skill', 'sourcePath', 'finalPath', 'digest', 'state', 'evidencePath']), profile: pick(record(value.profile), ['platform', 'scope', 'inputDigest']) };
|
|
152
|
+
}
|
|
153
|
+
function requirementsObservations(value) { return { ...pick(value, ['code', 'blocking', 'path', 'provenance', 'command', 'capability']), message: message(value.message, String(value.code)) }; }
|
|
154
|
+
const writeCommands = new Set(['source.add', 'source.update', 'source.remove', 'source.sync', 'cache.prune', 'target.set', 'target.exclude', 'target.include',
|
|
155
|
+
'plugin.config.set', 'plugin.config.unset', 'plugin.config.reset', 'plugin.config.apply', 'command.install', 'command.update', 'command.remove', 'command.package.sync', 'command.package.remove',
|
|
156
|
+
'dev.source.activate', 'dev.source.deactivate', 'dev.plugin.create', 'dev.plugin.remove', 'dev.plugin.build', 'dev.skill.create', 'dev.skill.export', 'dev.catalog.create', 'dev.catalog.version',
|
|
157
|
+
'dev.catalog.build', 'dev.catalog.publish.plan', 'dev.catalog.publish.apply', 'dev.review.prepare', 'dev.eval.prepare', 'dev.plugin.requirements']);
|
|
158
|
+
export function isPublicWrite(command) { return writeCommands.has(command); }
|
|
159
|
+
function projectData(command, r, diagnostics) {
|
|
160
|
+
switch (command) {
|
|
161
|
+
case 'self.describe': return pick(r, ['awVersion', 'coreVersion', 'capabilities', 'capabilitySetDigest']);
|
|
162
|
+
case 'self.check': {
|
|
163
|
+
const data = pick(r, ['awVersion', 'coreVersion', 'source', 'plugin', 'requiredCapabilities', 'capabilitySetDigest', 'missingCapabilities', 'observations']);
|
|
164
|
+
mapField(data, 'source', (entry) => pick(entry, ['kind', 'path']));
|
|
165
|
+
mapField(data, 'plugin', (entry) => pick(entry, ['name', 'version']));
|
|
166
|
+
mapField(data, 'observations', requirementsObservations);
|
|
167
|
+
return data;
|
|
168
|
+
}
|
|
169
|
+
case 'dev.plugin.requirements': {
|
|
170
|
+
const data = pick(r, ['plugin', 'pluginDirectory', 'workspaceRoot', 'workspaceRootResolvedFrom', 'mutation', 'declared', 'derived', 'detected', 'effective', 'capabilitySetDigest', 'unsupportedByCurrentAw', 'observations']);
|
|
171
|
+
mapField(data, 'plugin', (entry) => pick(entry, ['name', 'version']));
|
|
172
|
+
mapField(data, 'mutation', (entry) => pick(entry, ['action', 'capability', 'changed']));
|
|
173
|
+
mapField(data, 'observations', requirementsObservations);
|
|
174
|
+
return data;
|
|
175
|
+
}
|
|
176
|
+
case 'dev.plugin.capabilities': {
|
|
177
|
+
const data = pick(r, ['awVersion', 'coreVersion', 'surface']);
|
|
178
|
+
if (r.capabilities)
|
|
179
|
+
data.capabilities = Object.fromEntries(Object.entries(record(r.capabilities)).map(([surface, entries]) => [surface,
|
|
180
|
+
list(entries).map((entry) => pick(entry, ['field', 'type', 'required', 'acceptedValues', 'owner', 'provenance', 'requires', 'conflicts', 'profiles']))]));
|
|
181
|
+
return data;
|
|
182
|
+
}
|
|
183
|
+
case 'source.status': {
|
|
184
|
+
const data = pick(r, ['primarySourceId', 'sources', 'remote', 'complete']);
|
|
185
|
+
mapField(data, 'sources', sourceEntry);
|
|
186
|
+
mapField(data, 'remote', (entry) => {
|
|
187
|
+
const remote = pick(entry, ['sourceId', 'checked', 'candidate', 'outcome']);
|
|
188
|
+
mapField(remote, 'candidate', resolution);
|
|
189
|
+
if (entry.error)
|
|
190
|
+
diagnostics.push(diagnostic(entry.error, 'error', { sourceId: String(entry.sourceId) }));
|
|
191
|
+
return remote;
|
|
192
|
+
});
|
|
193
|
+
for (const entry of list(r.sources))
|
|
194
|
+
if (entry.errorCode)
|
|
195
|
+
diagnostics.push(diagnostic({ code: entry.errorCode }, 'error', { sourceId: String(entry.sourceId) }));
|
|
196
|
+
return data;
|
|
197
|
+
}
|
|
198
|
+
case 'source.add':
|
|
199
|
+
case 'source.update':
|
|
200
|
+
case 'source.remove': {
|
|
201
|
+
const data = pick(r, ['sourceId', 'changed', 'primarySourceId', 'configDigest', 'primaryChange', 'references']);
|
|
202
|
+
mapField(data, 'primaryChange', (entry) => pick(entry, ['fromSourceId', 'toSourceId']));
|
|
203
|
+
mapField(data, 'references', (entry) => pick(entry, ['category', 'sourceId', 'pluginId', 'platform', 'scope', 'projectRecord', 'marketplaceName']));
|
|
204
|
+
if (r.impact)
|
|
205
|
+
data.impact = sourceImpact(record(r.impact));
|
|
206
|
+
return data;
|
|
207
|
+
}
|
|
208
|
+
case 'source.sync': {
|
|
209
|
+
const data = pick(r, ['sourceId', 'mode', 'outcome', 'activeChanged', 'resolution', 'active', 'lastSync', 'impact']);
|
|
210
|
+
mapField(data, 'resolution', resolution);
|
|
211
|
+
mapField(data, 'active', active);
|
|
212
|
+
mapField(data, 'impact', sourceImpact);
|
|
213
|
+
mapField(data, 'lastSync', (entry) => pick(entry, ['syncedAt', 'mode', 'state', 'resolvedCommit', 'errorCode']));
|
|
214
|
+
return data;
|
|
215
|
+
}
|
|
216
|
+
case 'cache.status':
|
|
217
|
+
case 'cache.prune': {
|
|
218
|
+
const data = command === 'cache.status'
|
|
219
|
+
? pick(r, ['entries', 'totals'])
|
|
220
|
+
: { ...pick(r, ['dryRun', 'entries', 'deleted', 'retained', 'reclaimableBytes', 'deletedBytes']), preview: r.dryRun === true };
|
|
221
|
+
mapField(data, 'entries', (entry) => pick(entry, ['storeKey', 'category', 'status', 'generationReference', 'ageMs', 'reclaimableBytes', 'reason']));
|
|
222
|
+
mapField(data, 'totals', (entry) => pick(entry, ['entries', 'reclaimableEntries', 'reclaimableBytes']));
|
|
223
|
+
mapField(data, 'deleted', (entry) => pick(entry, ['storeKey', 'bytes']));
|
|
224
|
+
mapField(data, 'retained', (entry) => pick(entry, ['storeKey', 'reason']));
|
|
225
|
+
return data;
|
|
226
|
+
}
|
|
227
|
+
case 'target.list':
|
|
228
|
+
case 'target.set':
|
|
229
|
+
case 'target.exclude':
|
|
230
|
+
case 'target.include': {
|
|
231
|
+
// Recovery's backend member includes live execution details and is intentionally not projected.
|
|
232
|
+
const recovery = r;
|
|
233
|
+
const data = pick(r, ['scope', 'policy', 'preferencesChanged', 'allSatisfied', 'inSync', 'outputsMayHaveChanged']);
|
|
234
|
+
if (r.policy)
|
|
235
|
+
data.policy = pick(record(r.policy), ['schemaVersion', 'targets', 'exclusions']);
|
|
236
|
+
if (Array.isArray(r.availability))
|
|
237
|
+
data.availability = list(r.availability).map((entry) => ({
|
|
238
|
+
...pick(entry, ['id', 'platform', 'displayName', 'selected', 'availability', 'recovery']),
|
|
239
|
+
installations: list(entry.installations).map((product) => pick(product, ['id', 'product', 'version', 'availability', 'reasonCodes', 'entry'])),
|
|
240
|
+
diagnostics: list(entry.diagnostics).map((item) => diagnostic(item, 'warning')),
|
|
241
|
+
}));
|
|
242
|
+
if (r.selection)
|
|
243
|
+
data.selection = { targets: record(r.selection).agents, ...pick(record(r.selection), ['origin', 'preferences']) };
|
|
244
|
+
if (r.intent)
|
|
245
|
+
data.requirements = pick(record(r.intent), ['state', 'digest', 'roots']);
|
|
246
|
+
if (recovery.targetResults)
|
|
247
|
+
data.targetResults = recovery.targetResults.map((entry) => {
|
|
248
|
+
diagnostics.push(...entry.blockers.map((error) => diagnostic(error, 'error', { pluginId: entry.pluginId, target: entry.agent, scope: entry.scope })));
|
|
249
|
+
return projectTarget(entry);
|
|
250
|
+
});
|
|
251
|
+
if (recovery.remainingTargets)
|
|
252
|
+
data.remainingTargets = recovery.remainingTargets.map((entry) => ({ pluginId: entry.pluginId, target: entry.agent, scope: entry.scope }));
|
|
253
|
+
if (recovery.requestedTargets)
|
|
254
|
+
data.requestedTargets = recovery.requestedTargets.map((entry) => ({ pluginId: entry.pluginId, target: entry.agent, scope: entry.scope, delivery: entry.delivery }));
|
|
255
|
+
if (recovery.coverage)
|
|
256
|
+
data.coverage = { scopes: recovery.coverage.scopes, currentProject: recovery.coverage.scopes.includes('project'), otherProjects: 'unobserved' };
|
|
257
|
+
if (recovery.commandResults)
|
|
258
|
+
data.commandResults = commandResults(recovery.commandResults, diagnostics);
|
|
259
|
+
if (recovery.nativeToolChanges)
|
|
260
|
+
data.nativeToolChanges = recovery.nativeToolChanges.map((entry) => nativeChange(record(entry)));
|
|
261
|
+
if (r.apply)
|
|
262
|
+
data.apply = projectData(command, record(r.apply), diagnostics);
|
|
263
|
+
return data;
|
|
264
|
+
}
|
|
265
|
+
case 'plugin.config.schema':
|
|
266
|
+
case 'plugin.config.get':
|
|
267
|
+
case 'plugin.config.set':
|
|
268
|
+
case 'plugin.config.unset':
|
|
269
|
+
case 'plugin.config.reset':
|
|
270
|
+
case 'plugin.config.apply': {
|
|
271
|
+
const data = pick(r, ['configSchemaVersion', 'plugin', 'pluginName', 'pluginId', 'sourceId', 'sourceIdentity', 'scope', 'platform', 'schema', 'fields', 'key', 'configWrite', 'affectedFields', 'removedKey', 'existed', 'deleted', 'resetDisposition', 'quarantineBasename', 'updatedKeys', 'removedKeys', 'effective', 'otherProjectsMayRequireSync', 'staleRemovedKeys']);
|
|
272
|
+
if (typeof r.nativeConsent === 'boolean')
|
|
273
|
+
data.nativeConsent = r.nativeConsent;
|
|
274
|
+
if (r.nativeConsent === true)
|
|
275
|
+
diagnostics.push(geminiNativeConsentDiagnostic());
|
|
276
|
+
if (typeof r.context === 'string')
|
|
277
|
+
data.context = r.context;
|
|
278
|
+
else if (r.context)
|
|
279
|
+
data.context = pick(record(r.context), ['context', 'projectRoot']);
|
|
280
|
+
if (r.apply)
|
|
281
|
+
data.apply = applyResult(r.apply, diagnostics);
|
|
282
|
+
mapField(data, 'schema', (entry) => pick(entry, ['source', 'platform', 'identity', 'pluginVersion', 'manifestDigest']));
|
|
283
|
+
if (command === 'plugin.config.schema' && data.fields)
|
|
284
|
+
data.fields = Object.fromEntries(Object.entries(record(data.fields)).map(([key, value]) => [key, configDefinition(record(value))]));
|
|
285
|
+
else
|
|
286
|
+
mapField(data, 'fields', configField);
|
|
287
|
+
for (const field of list(r.fields))
|
|
288
|
+
for (const entry of list(field.issues)) {
|
|
289
|
+
diagnostics.push(diagnostic({ ...entry, code: entry.code ?? entry.type ?? 'configInvalid' }, 'error', {
|
|
290
|
+
...(typeof r.pluginId === 'string' ? { pluginId: r.pluginId } : {}), field: String(field.key),
|
|
291
|
+
}));
|
|
292
|
+
}
|
|
293
|
+
for (const entry of list(record(r.effective).issues))
|
|
294
|
+
diagnostics.push(diagnostic({ ...entry, code: entry.code ?? entry.type ?? 'configInvalid' }, 'error', {
|
|
295
|
+
...(typeof r.pluginId === 'string' ? { pluginId: r.pluginId } : {}), ...(typeof entry.key === 'string' ? { field: entry.key } : {}),
|
|
296
|
+
}));
|
|
297
|
+
mapField(data, 'affectedFields', (entry) => pick(entry, ['key', 'title', 'kind', 'reserved', 'action', 'scope', 'valueState', 'stale']));
|
|
298
|
+
return data;
|
|
299
|
+
}
|
|
300
|
+
case 'dev.review.inspect':
|
|
301
|
+
case 'dev.review.prepare': {
|
|
302
|
+
const data = command === 'dev.review.inspect'
|
|
303
|
+
? pick(r, ['view', 'target', 'sources', 'snapshot', 'skills', 'issues'])
|
|
304
|
+
: pick(r, ['target', 'sourceBindingPath', 'skills', 'issues']);
|
|
305
|
+
mapField(data, 'target', (entry) => pick(entry, ['kind', 'path']));
|
|
306
|
+
mapField(data, 'snapshot', (entry) => pick(entry, ['path', 'state']));
|
|
307
|
+
mapField(data, 'skills', reviewSkills);
|
|
308
|
+
mapField(data, 'issues', issue);
|
|
309
|
+
return data;
|
|
310
|
+
}
|
|
311
|
+
case 'dev.eval.prepare': return pick(r, ['suite', 'profile', 'platform', 'specPath', 'targetDigest', 'corpusDigest', 'sourceBindingPath', 'workspacePath']);
|
|
312
|
+
case 'dev.eval.check': {
|
|
313
|
+
const data = pick(r, ['providers', 'codex', 'credentials', 'permission', 'keychain', 'processManagement', 'cleanup']);
|
|
314
|
+
mapField(data, 'codex', (entry) => ({ ...pick(entry, ['requestedExecutable', 'resolvedExecutable']), runtimeConfig: pick(record(entry.runtimeConfig), ['model', 'modelProvider', 'credentialSource']) }));
|
|
315
|
+
mapField(data, 'credentials', (entry) => pick(entry, ['name', 'present']));
|
|
316
|
+
mapField(data, 'permission', (entry) => pick(entry, ['profile', 'status']));
|
|
317
|
+
mapField(data, 'keychain', (entry) => pick(entry, ['platform', 'status']));
|
|
318
|
+
mapField(data, 'processManagement', (entry) => pick(entry, ['managedAvailable', 'unmanagedAvailable', 'defaultMode']));
|
|
319
|
+
mapField(data, 'cleanup', (entry) => pick(entry, ['platform', 'supported', 'mechanism']));
|
|
320
|
+
return data;
|
|
321
|
+
}
|
|
322
|
+
case 'dev.skill.export': {
|
|
323
|
+
const data = pick(r, ['plugin', 'platform', 'scope', 'out', 'selectedSkills', 'requestedSkills', 'dependencies', 'configDigest', 'materializationDigest', 'outputDigest', 'sourceBindingPath']);
|
|
324
|
+
mapField(data, 'plugin', (entry) => pick(entry, ['id', 'sourceId', 'sourceIdentity', 'version']));
|
|
325
|
+
mapField(data, 'selectedSkills', (entry) => pick(entry, ['name', 'description', 'shortDescription', 'shortDescriptionSource', 'providerPluginId', 'providerDisplayName', 'relation', 'dynamic', 'filesDigest', 'configDigest']));
|
|
326
|
+
return data;
|
|
327
|
+
}
|
|
328
|
+
case 'dev.catalog.status': {
|
|
329
|
+
const data = pick(r, ['workspaceRoot', 'workspaceRootResolvedFrom', 'workspace', 'catalog', 'plugins', 'dependencyGraph', 'git', 'snapshot', 'issues']);
|
|
330
|
+
mapField(data, 'workspace', (entry) => pick(entry, ['root', 'resolvedFrom', 'valid', 'identity']));
|
|
331
|
+
mapField(data, 'catalog', (entry) => pick(entry, ['valid', 'version', 'channel', 'ownerName', 'ownerUrl', 'displayName']));
|
|
332
|
+
mapField(data, 'plugins', (entry) => pick(entry, ['name', 'version', 'dependencies', 'sourceValid']));
|
|
333
|
+
mapField(data, 'dependencyGraph', (entry) => pick(entry, ['valid', 'order']));
|
|
334
|
+
mapField(data, 'git', (entry) => pick(entry, ['checked', 'sourceHead', 'clean']));
|
|
335
|
+
mapField(data, 'snapshot', (entry) => pick(entry, ['path', 'state', 'valid', 'catalogVersion', 'snapshotDigest', 'sourceIdentityMatches']));
|
|
336
|
+
mapField(data, 'issues', issue);
|
|
337
|
+
return data;
|
|
338
|
+
}
|
|
339
|
+
case 'dev.catalog.publish.plan':
|
|
340
|
+
case 'dev.catalog.publish.apply': {
|
|
341
|
+
const data = pick(r, ['workspaceRoot', 'workspaceRootResolvedFrom', 'workspaceIdentity', 'catalogVersion', 'channel', 'remote', 'remoteResolvedFrom', 'remoteUrl', 'fetchUrl', 'pushUrl', 'branch', 'branchResolvedFrom', 'parent', 'tag', 'expectedCommit', 'sourceHead', 'pluginCount', 'snapshotDigest', 'planDigest', 'descriptor', 'state']);
|
|
342
|
+
mapField(data, 'descriptor', (entry) => ({ ...pick(entry, ['schemaVersion', 'workspaceIdentity', 'sourceHead', 'branch', 'parent', 'tag', 'snapshotDigest']), remote: pick(record(entry.remote), ['name', 'identityDigest']) }));
|
|
343
|
+
if (command === 'dev.catalog.publish.apply') {
|
|
344
|
+
Object.assign(data, pick(r, ['commit', 'reconciliation']));
|
|
345
|
+
Object.assign(data, pick(r, ['journalState', 'remoteWriteAttempted', 'remoteVerified']));
|
|
346
|
+
}
|
|
347
|
+
else
|
|
348
|
+
data.prepared = r.ok === true;
|
|
349
|
+
return data;
|
|
350
|
+
}
|
|
351
|
+
case 'dev.source.activate':
|
|
352
|
+
case 'dev.source.status':
|
|
353
|
+
case 'dev.source.deactivate': {
|
|
354
|
+
const data = command === 'dev.source.activate' ? pick(r, ['state', 'workspaceIdentity', 'snapshot', 'source', 'active'])
|
|
355
|
+
: command === 'dev.source.status' ? pick(r, ['ready', 'workspaceIdentity', 'snapshot', 'source', 'active', 'issues'])
|
|
356
|
+
: pick(r, ['state', 'workspaceIdentity', 'source', 'replacementPrimarySourceId', 'impact']);
|
|
357
|
+
mapField(data, 'snapshot', (entry) => pick(entry, ['action', 'digest', 'state', 'valid']));
|
|
358
|
+
mapField(data, 'source', (entry) => pick(entry, ['id', 'action', 'primary', 'exists', 'pathMatches', 'previousPrimary']));
|
|
359
|
+
mapField(data, 'active', (entry) => {
|
|
360
|
+
const result = pick(entry, ['ready', 'snapshotDigest', 'exists', 'digestMatchesSnapshot', 'compatibility']);
|
|
361
|
+
mapField(result, 'compatibility', compatibility);
|
|
362
|
+
return result;
|
|
363
|
+
});
|
|
364
|
+
mapField(data, 'issues', issue);
|
|
365
|
+
mapField(data, 'impact', sourceImpact);
|
|
366
|
+
return data;
|
|
367
|
+
}
|
|
368
|
+
case 'command.install':
|
|
369
|
+
case 'command.update':
|
|
370
|
+
case 'command.remove':
|
|
371
|
+
case 'command.list':
|
|
372
|
+
case 'command.show':
|
|
373
|
+
case 'command.package.sync':
|
|
374
|
+
case 'command.package.remove': {
|
|
375
|
+
const data = pick(r, ['commands', 'packages', 'changes', 'nativeToolChanges']);
|
|
376
|
+
mapField(data, 'commands', (entry) => {
|
|
377
|
+
const result = pick(entry, ['id', 'name', 'availability', 'resourceRoot', 'launch']);
|
|
378
|
+
const owner = record(entry.owner);
|
|
379
|
+
result.owner = { kind: owner.kind, ...(owner.producer ? { producer: producer(record(owner.producer)) } : {}) };
|
|
380
|
+
mapField(result, 'launch', (launch) => pick(launch, ['runner', 'entry', 'args', 'env', 'envFrom', 'cwd']));
|
|
381
|
+
diagnostics.push(...list(entry.errors).map((error) => diagnostic(error)));
|
|
382
|
+
result.blockerCodes = list(entry.errors).map((error) => error.code);
|
|
383
|
+
result.errors = list(entry.errors).map(issue);
|
|
384
|
+
return result;
|
|
385
|
+
});
|
|
386
|
+
mapField(data, 'packages', (entry) => {
|
|
387
|
+
diagnostics.push(...list(entry.errors).map((error) => diagnostic(error)));
|
|
388
|
+
return { ...pick(entry, ['id', 'availability', 'resourceRoot']), producer: producer(record(entry.producer)), sets: list(entry.sets).map((set) => pick(set, ['set', 'state', 'commandIds'])), errors: list(entry.errors).map(issue), blockerCodes: list(entry.errors).map((error) => error.code) };
|
|
389
|
+
});
|
|
390
|
+
mapField(data, 'changes', (entry) => pick(entry, ['kind', 'id', 'action']));
|
|
391
|
+
mapField(data, 'nativeToolChanges', nativeChange);
|
|
392
|
+
return data;
|
|
393
|
+
}
|
|
394
|
+
// These authoring tools return JSON DTOs, not runtime objects. Their paths are
|
|
395
|
+
// explicitly requested source/output artifacts and remain part of the contract.
|
|
396
|
+
case 'dev.plugin.create': return pick(r, ['pluginName', 'pluginRoot', 'workspaceRoot', 'workspaceRootResolvedFrom', 'files', 'created', 'version']);
|
|
397
|
+
case 'dev.skill.create': return pick(r, ['pluginName', 'skillName', 'skillDirectory', 'workspaceRoot', 'workspaceRootResolvedFrom', 'created', 'files']);
|
|
398
|
+
case 'dev.plugin.remove': {
|
|
399
|
+
const data = pick(r, ['workspaceRoot', 'workspaceRootResolvedFrom', 'baseCommit', 'plugin', 'removed']);
|
|
400
|
+
mapField(data, 'plugin', (entry) => pick(entry, ['name', 'version', 'root']));
|
|
401
|
+
return data;
|
|
402
|
+
}
|
|
403
|
+
case 'dev.plugin.status': {
|
|
404
|
+
const data = pick(r, ['policy', 'base', 'requestedBase', 'baseCommit', 'checkedPlugins', 'checks', 'workspaceRoot', 'workspaceRootResolvedFrom']);
|
|
405
|
+
mapField(data, 'base', (entry) => pick(entry, ['requested', 'commit']));
|
|
406
|
+
mapField(data, 'checks', (entry) => {
|
|
407
|
+
for (const error of Array.isArray(entry.errors) ? entry.errors : [])
|
|
408
|
+
diagnostics.push(diagnostic(error, 'error', { pluginId: String(entry.plugin) }));
|
|
409
|
+
return versionCheck(entry);
|
|
410
|
+
});
|
|
411
|
+
return data;
|
|
412
|
+
}
|
|
413
|
+
case 'dev.plugin.validate': {
|
|
414
|
+
const data = pick(r, ['profile', 'claudeSkillProfile', 'pluginDirectory', 'workspaceRoot', 'workspaceRootResolvedFrom', 'versionCheck', 'plugin', 'missingCapabilities', 'availableCapabilities']);
|
|
415
|
+
mapField(data, 'versionCheck', versionReport);
|
|
416
|
+
return data;
|
|
417
|
+
}
|
|
418
|
+
case 'dev.skill.validate': return pick(r, ['skillDirectory', 'frontmatterProfile', 'codexMetadata']);
|
|
419
|
+
case 'dev.plugin.build': return pick(r, ['workspaceRoot', 'workspaceRootResolvedFrom', 'pluginName', 'outputRoot', 'dependencies', 'digest']);
|
|
420
|
+
case 'dev.plugin.test': return pick(r, ['workspaceRoot', 'workspaceRootResolvedFrom', 'pluginName', 'exitCode']);
|
|
421
|
+
case 'dev.catalog.create': return pick(r, ['workspaceRoot', 'workspaceRootResolvedFrom', 'metadataPath', 'catalogVersion']);
|
|
422
|
+
case 'dev.catalog.version': return pick(r, ['workspaceRoot', 'workspaceRootResolvedFrom', 'catalogVersion', 'changed']);
|
|
423
|
+
case 'dev.catalog.build': return pick(r, ['workspaceRoot', 'workspaceRootResolvedFrom', 'outputRoot', 'catalogVersion', 'channel', 'pluginNames']);
|
|
424
|
+
case 'dev.catalog.validate': return pick(r, ['snapshotDirectory', 'catalogVersion', 'channel', 'snapshotDigest']);
|
|
425
|
+
default: throw new Error(`No public result projection is defined for ${command}.`);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
const confirmationCodes = new Set(['confirmationRequired', 'catalogImpactConfirmationRequired', 'catalogSourceImpactConfirmationRequired', 'catalogSourceIdentityChangeConfirmationRequired', 'preApplyAuthorizationRequired', 'sharedNativeConfigApplyConfirmationRequired', 'nativeToolAuthorizationRequired', 'sourceRefreshConfirmationRequired']);
|
|
429
|
+
const blockedCodes = new Set([...confirmationCodes, 'operationReviewStale', 'reviewStale', 'catalogSourceUnavailable', 'catalogGenerationUnavailable', 'catalogGenerationSourceMissing', 'catalogGenerationIdentityMismatch', 'catalogGenerationReviewStale', 'catalogReplaceDamagedRequired', 'catalogGenerationActiveComparisonUnavailable', 'catalogLogicalIdentityChanged', 'catalogVersionConflict', 'catalogRollbackDetected', 'sourceMissing', 'sourceChanged', 'configSchemaUnavailable', 'schemaUnavailable', 'configUnavailable', 'projectRootUnavailable', 'awCapabilityUnsupported', 'commandNotFound', 'commandOwnerMismatch', 'commandIdentityConflict', 'commandResourceInvalid', 'commandBindingInvalid', 'managedSourceProtected', 'dependencyStillRequired', 'identityMismatch', 'catalogWorkspaceMissing', 'portableOutputConflict', 'portableUnsupported', 'requiredConfigMissing', 'portableSkillNameConflict', 'portableRuntimeImportMissing']);
|
|
430
|
+
function resultStatus(command, r, diagnostics, exitCode) {
|
|
431
|
+
const unsuccessful = r.ok === false || r.valid === false || exitCode !== 0;
|
|
432
|
+
if (command === 'source.status') {
|
|
433
|
+
const sources = list(r.sources), remote = list(r.remote);
|
|
434
|
+
const failed = sources.filter((entry) => entry.errorCode).length + remote.filter((entry) => entry.checked === false || entry.error).length;
|
|
435
|
+
if (failed)
|
|
436
|
+
return sources.some((entry) => !entry.errorCode) || remote.some((entry) => entry.checked === true) ? 'partial' : 'blocked';
|
|
437
|
+
return unsuccessful ? 'failed' : 'success';
|
|
438
|
+
}
|
|
439
|
+
if (command === 'cache.status' && unsuccessful)
|
|
440
|
+
return list(r.entries).some((entry) => entry.status !== 'error') ? 'partial' : 'failed';
|
|
441
|
+
if (command === 'cache.prune')
|
|
442
|
+
return r.overallState === 'partial' ? 'partial' : unsuccessful ? list(r.deleted).length ? 'partial' : 'failed' : 'success';
|
|
443
|
+
if (command === 'dev.review.inspect' && r.target !== null && Array.isArray(r.skills) && exitCode === 0)
|
|
444
|
+
return 'success';
|
|
445
|
+
if (command === 'dev.review.prepare' && unsuccessful && list(r.skills).some((entry) => entry.state === 'ready'))
|
|
446
|
+
return 'partial';
|
|
447
|
+
if (r.overallState === 'partial' || r.state === 'partial')
|
|
448
|
+
return 'partial';
|
|
449
|
+
if (!unsuccessful)
|
|
450
|
+
return 'success';
|
|
451
|
+
// A persisted config/preference, an attempted output, or publication uncertainty
|
|
452
|
+
// cannot be collapsed to an uncommitted failure.
|
|
453
|
+
if (r.configWrite === 'succeeded' || r.preferencesChanged === true || r.outputsMayHaveChanged === true || r.activeChanged === true || r.changed === true || r.removed === true || r.state === 'uncertain'
|
|
454
|
+
|| list(r.changes).some((entry) => entry.action !== 'retained')
|
|
455
|
+
|| list(r.targetResults).some((entry) => ['applied', 'partial', 'failed'].includes(String(entry.execution))))
|
|
456
|
+
return 'partial';
|
|
457
|
+
if ((command === 'command.list' || command === 'command.show') && (list(r.commands).length || list(r.packages).length))
|
|
458
|
+
return 'partial';
|
|
459
|
+
if (diagnostics.some((entry) => blockedCodes.has(entry.code)))
|
|
460
|
+
return 'blocked';
|
|
461
|
+
if (command.startsWith('target.') || command.startsWith('source.') || record(r.apply).state === 'unavailable')
|
|
462
|
+
return 'blocked';
|
|
463
|
+
return exitCode === 3 ? 'blocked' : 'failed';
|
|
464
|
+
}
|
|
465
|
+
function confirmationFor(command, r, yes, supplied, diagnostics) {
|
|
466
|
+
if (supplied && r.confirmation) {
|
|
467
|
+
const prepared = r.confirmation;
|
|
468
|
+
return { required: supplied.required || prepared.required, provided: supplied.provided || prepared.provided,
|
|
469
|
+
effects: [...new Map([...supplied.effects, ...prepared.effects].map((effect) => [JSON.stringify(effect), effect])).values()] };
|
|
470
|
+
}
|
|
471
|
+
if (supplied)
|
|
472
|
+
return supplied;
|
|
473
|
+
if (r.confirmation !== undefined)
|
|
474
|
+
return r.confirmation;
|
|
475
|
+
const missing = diagnostics.some((entry) => confirmationCodes.has(entry.code));
|
|
476
|
+
const sourceId = typeof r.sourceId === 'string' ? r.sourceId : typeof record(r.source).id === 'string' ? String(record(r.source).id) : undefined;
|
|
477
|
+
const pluginId = typeof r.pluginId === 'string' ? r.pluginId : typeof r.plugin === 'string' ? r.plugin : undefined;
|
|
478
|
+
if (command === 'source.sync' && r.impact) {
|
|
479
|
+
const impact = r.impact;
|
|
480
|
+
const required = impact.inventoryComplete === false || impact.affectedReferences?.length > 0 || impact.primaryChange !== null && impact.primaryChange !== undefined;
|
|
481
|
+
return { required, provided: yes, effects: required ? [{ code: 'changeSource', message: 'Activate the selected source version and affect its existing references.', subject: { sourceId }, impact: impact.inventoryComplete ? 'user-wide' : 'unknown' }] : [] };
|
|
482
|
+
}
|
|
483
|
+
if (command === 'cache.prune')
|
|
484
|
+
return r.dryRun === true ? { required: false, provided: yes, effects: [] }
|
|
485
|
+
: { required: true, provided: yes, effects: [{ code: 'removeOwnedOutput', message: 'Delete the selected reclaimable Catalog cache entries.', impact: 'user-wide' }] };
|
|
486
|
+
if (command === 'plugin.config.reset')
|
|
487
|
+
return { required: true, provided: yes, effects: [{ code: 'deletePluginConfig', message: 'Delete the selected plugin configuration overrides.', subject: { pluginId, scope: 'user' }, impact: 'user-wide' }] };
|
|
488
|
+
if (missing) {
|
|
489
|
+
const source = command.startsWith('source.') || command.startsWith('dev.source.');
|
|
490
|
+
const preApply = diagnostics.some((entry) => entry.code === 'preApplyConfirmationRequired' || entry.code === 'preApplyAuthorizationRequired');
|
|
491
|
+
return { required: true, provided: yes, effects: [{ code: source ? 'changeSource' : preApply ? 'runPreApply' : 'replaceSharedOutput',
|
|
492
|
+
message: source ? 'Change the selected Catalog source and its references.' : preApply ? 'Run the selected plugin preApply script.' : 'Change the selected shared output.',
|
|
493
|
+
subject: source ? { sourceId } : { pluginId, scope: 'user' }, impact: 'unknown' }] };
|
|
494
|
+
}
|
|
495
|
+
const ordinary = new Set(['source.add', 'target.set', 'target.exclude', 'target.include', 'dev.plugin.create', 'dev.skill.create', 'dev.plugin.build', 'dev.skill.export', 'dev.catalog.create', 'dev.catalog.version', 'dev.catalog.build', 'dev.catalog.publish.plan', 'dev.review.prepare', 'dev.eval.prepare', 'dev.plugin.requirements']);
|
|
496
|
+
if (ordinary.has(command) || command.startsWith('plugin.config.') && (!r.apply || record(r.apply).state === 'skipped'))
|
|
497
|
+
return { required: false, provided: yes, effects: [] };
|
|
498
|
+
// The handler owns prepared impact evidence. Absence is not evidence of no effects.
|
|
499
|
+
return null;
|
|
500
|
+
}
|
|
501
|
+
function publicationApplyAction(receipt, reason) {
|
|
502
|
+
if (typeof receipt.workspaceRoot !== 'string' || typeof receipt.remote !== 'string' || typeof receipt.branch !== 'string'
|
|
503
|
+
|| typeof receipt.planDigest !== 'string' || !/^sha256:[0-9a-f]{64}$/u.test(receipt.planDigest))
|
|
504
|
+
return undefined;
|
|
505
|
+
return { kind: 'command', argv: ['aw', 'dev', 'catalog', 'publish', 'apply', '--workspace-root', receipt.workspaceRoot,
|
|
506
|
+
'--remote', receipt.remote, '--branch', receipt.branch, '--expected-plan-digest', receipt.planDigest], reason, requiresConfirmation: true };
|
|
507
|
+
}
|
|
508
|
+
export function projectReceipt(command, input, options = {}) {
|
|
509
|
+
if (!input || typeof input !== 'object' || Array.isArray(input))
|
|
510
|
+
throw new Error('The command returned an invalid result.');
|
|
511
|
+
const r = record(input);
|
|
512
|
+
if (r.schemaVersion === CLI_OUTPUT_SCHEMA_VERSION && ['success', 'partial', 'blocked', 'failed'].includes(String(r.status)) && r.data && Array.isArray(r.diagnostics) && Array.isArray(r.nextActions))
|
|
513
|
+
return input;
|
|
514
|
+
const authorRoots = command.startsWith('dev.') && typeof r.workspaceRoot === 'string' ? [r.workspaceRoot] : [];
|
|
515
|
+
const subject = {
|
|
516
|
+
...(typeof r.sourceId === 'string' ? { sourceId: r.sourceId } : {}),
|
|
517
|
+
...(command.startsWith('dev.source.') && typeof record(r.source).id === 'string' ? { sourceId: String(record(r.source).id) } : {}),
|
|
518
|
+
...(typeof r.pluginId === 'string' ? { pluginId: r.pluginId } : typeof record(r.plugin).id === 'string' ? { pluginId: String(record(r.plugin).id) } : {}),
|
|
519
|
+
...(r.scope === 'user' || r.scope === 'project' ? { scope: r.scope } : {}),
|
|
520
|
+
};
|
|
521
|
+
const diagnostics = [...(Array.isArray(r.errors) ? r.errors : []), ...(Array.isArray(r.issues) ? r.issues : []), ...(Array.isArray(r.blockers) ? r.blockers : [])].map((entry) => diagnostic(entry, 'error', subject, authorRoots));
|
|
522
|
+
if (r.error || r.ok === false && r.message)
|
|
523
|
+
diagnostics.push(diagnostic({ code: r.code, message: r.error ?? r.message }, 'error', subject, authorRoots));
|
|
524
|
+
if (Array.isArray(r.warnings))
|
|
525
|
+
diagnostics.push(...r.warnings.map((entry) => diagnostic(entry, 'warning', subject, authorRoots)));
|
|
526
|
+
const data = projectData(command, r, diagnostics);
|
|
527
|
+
const capabilityFailure = list(r.errors).find((entry) => entry.code === 'awCapabilityUnsupported');
|
|
528
|
+
if (capabilityFailure)
|
|
529
|
+
data.compatibility = pick(capabilityFailure, ['missingCapabilities', 'availableCapabilities']);
|
|
530
|
+
if (command === 'self.check' && Array.isArray(r.missingCapabilities) && r.missingCapabilities.length) {
|
|
531
|
+
diagnostics.push(diagnostic({ code: 'awCapabilityUnsupported', message: 'The current AW executable does not support all required capabilities.' }));
|
|
532
|
+
}
|
|
533
|
+
let status = resultStatus(command, r, diagnostics, options.exitCode ?? 0);
|
|
534
|
+
if (isPublicWrite(command)) {
|
|
535
|
+
const confirmation = confirmationFor(command, r, options.yes === true, options.confirmation, diagnostics);
|
|
536
|
+
data.confirmation = confirmation;
|
|
537
|
+
if (confirmation?.required && !confirmation.provided && diagnostics.some((entry) => confirmationCodes.has(entry.code))) {
|
|
538
|
+
if (!diagnostics.some((entry) => entry.code === 'confirmationRequired'))
|
|
539
|
+
diagnostics.push(diagnostic({ code: 'confirmationRequired', message: 'Repeat the command with --yes to confirm the listed effects.' }));
|
|
540
|
+
if (status !== 'partial')
|
|
541
|
+
status = 'blocked';
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
const result = commandResult(command, data, { status, diagnostics: [...new Map(diagnostics.map((entry) => [JSON.stringify(entry), entry])).values()] });
|
|
545
|
+
if (command === 'target.set' && Array.isArray(r.forceRetry))
|
|
546
|
+
result.nextActions.push({ kind: 'command',
|
|
547
|
+
argv: r.forceRetry, reason: 'Save the requested unavailable targets explicitly. Installation requirements still apply.', requiresConfirmation: false });
|
|
548
|
+
if (status === 'success' && command === 'dev.catalog.publish.plan' && r.state === 'prepared') {
|
|
549
|
+
const action = publicationApplyAction(r, 'Apply this exact prepared publication after reviewing its target and digest.');
|
|
550
|
+
if (action)
|
|
551
|
+
result.nextActions.push(action);
|
|
552
|
+
}
|
|
553
|
+
if (status !== 'success') {
|
|
554
|
+
if (diagnostics.some((entry) => entry.code === 'catalogWorkspaceMissing'))
|
|
555
|
+
result.nextActions.push({ kind: 'command',
|
|
556
|
+
argv: ['aw', 'dev', 'catalog', 'create'], reason: 'Create a Catalog Workspace explicitly before running authoring commands.', requiresConfirmation: false });
|
|
557
|
+
if (command === 'dev.catalog.publish.apply' && typeof r.planDigest === 'string') {
|
|
558
|
+
const action = publicationApplyAction(r, 'Reconcile the same publication plan before attempting any different publication.');
|
|
559
|
+
if (action)
|
|
560
|
+
result.nextActions.push(action);
|
|
561
|
+
else
|
|
562
|
+
result.nextActions.push({ kind: 'manual', message: `Use the original workspace and remote selection to reconcile publication plan ${r.planDigest}. Review its current state before confirming apply.` });
|
|
563
|
+
}
|
|
564
|
+
if (command.startsWith('plugin.config.')) {
|
|
565
|
+
const apply = record(r.apply);
|
|
566
|
+
for (const entry of list(apply.commandResults)) {
|
|
567
|
+
const identity = record(entry.producer);
|
|
568
|
+
if (entry.state !== 'completed' && identity.kind === 'package' && typeof identity.sourceId === 'string'
|
|
569
|
+
&& typeof identity.pluginName === 'string' && typeof identity.key === 'string' && (identity.scope === 'user' || identity.scope === 'project')) {
|
|
570
|
+
result.nextActions.push({ kind: 'command', argv: ['aw', 'command', 'package', 'sync', `${identity.sourceId}/${identity.pluginName}`, identity.key, '--scope', identity.scope], reason: 'Repair the affected command package after resolving its diagnostics.', requiresConfirmation: true });
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
for (const entry of list(apply.targetResults)) {
|
|
574
|
+
const target = record(entry.target);
|
|
575
|
+
if (entry.state !== 'completed' && (entry.state !== 'skipped' || entry.errorCode) && typeof target.pluginId === 'string' && typeof target.platform === 'string' && (target.scope === 'user' || target.scope === 'project')) {
|
|
576
|
+
result.nextActions.push({ kind: 'command', argv: ['aw', 'plugin', 'sync', target.pluginId, '--context', target.scope, '--target', target.platform,
|
|
577
|
+
...(target.platform === 'gemini' && (String(entry.errorCode).startsWith('nativeConsent')
|
|
578
|
+
|| ['nativeRefreshDataUnconfirmed', 'nativeInstallContentPostcheckFailed'].includes(String(entry.errorCode)))
|
|
579
|
+
? ['--native-consent'] : [])], reason: 'Repair the affected deployment target after reviewing its diagnostics and any native trust permission.', requiresConfirmation: true });
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
if (command === 'source.status' || command === 'source.sync')
|
|
584
|
+
for (const entry of diagnostics)
|
|
585
|
+
if (entry.subject?.sourceId)
|
|
586
|
+
result.nextActions.push({ kind: 'command', argv: ['aw', 'source', 'status', entry.subject.sourceId], reason: 'Inspect the selected source before retrying a source change.', requiresConfirmation: false });
|
|
587
|
+
if (!result.nextActions.length)
|
|
588
|
+
result.nextActions.push({ kind: 'manual', message: status === 'partial' ? 'Review completed and incomplete results before retrying the operation.' : 'Resolve the reported diagnostics before retrying the operation.' });
|
|
589
|
+
}
|
|
590
|
+
return result;
|
|
591
|
+
}
|
|
592
|
+
//# sourceMappingURL=receipt-projection.js.map
|