@lesliechan721/aw 0.1.0-beta.8 → 0.1.0-beta.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authoring/assets/aw-config.mjs +100 -501
- package/dist/authoring/assets/aw-config.mjs.map +1 -1
- package/dist/authoring/assets/aw-runtime-config.d.mts +13 -0
- package/dist/authoring/assets/aw-runtime-config.mjs +221 -0
- package/dist/authoring/assets/aw-runtime-config.mjs.map +1 -0
- package/dist/authoring/scripts/add-skill.mjs +17 -40
- package/dist/authoring/scripts/add-skill.mjs.map +1 -1
- package/dist/authoring/scripts/init-plugin.mjs +74 -98
- package/dist/authoring/scripts/init-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/lib/plugin-root.mjs +4 -4
- package/dist/authoring/scripts/lib/plugin-root.mjs.map +1 -1
- package/dist/authoring/scripts/lib/plugin-version-check.d.mts +1 -0
- package/dist/authoring/scripts/lib/plugin-version-check.mjs +230 -9
- package/dist/authoring/scripts/lib/plugin-version-check.mjs.map +1 -1
- package/dist/authoring/scripts/lib/skill-scaffold.d.mts +79 -92
- package/dist/authoring/scripts/lib/skill-scaffold.mjs +103 -127
- package/dist/authoring/scripts/lib/skill-scaffold.mjs.map +1 -1
- package/dist/authoring/scripts/remove-plugin.mjs +2 -2
- package/dist/authoring/scripts/remove-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/validate-plugin.mjs +459 -2843
- package/dist/authoring/scripts/validate-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/validate-skill.mjs +1 -1
- package/dist/native-runtime/reader-runtime.mjs +34 -0
- package/dist/native-runtime/reader.d.mts +6 -0
- package/dist/native-runtime/reader.mjs +11 -0
- package/dist/scripts/aw-skill-eval-materializer.d.ts +30 -0
- package/dist/scripts/aw-skill-eval-materializer.js +278 -0
- package/dist/scripts/aw-skill-eval-materializer.js.map +1 -0
- package/dist/scripts/bundle-plugins.d.ts +1 -0
- package/dist/scripts/bundle-plugins.js +27 -8
- package/dist/scripts/bundle-plugins.js.map +1 -1
- package/dist/scripts/plugin-staging.d.ts +7 -8
- package/dist/scripts/plugin-staging.js +16 -15
- package/dist/scripts/plugin-staging.js.map +1 -1
- package/dist/scripts/plugin-test-reporter.d.mts +2 -0
- package/dist/scripts/plugin-test-reporter.mjs +21 -0
- package/dist/scripts/plugin-test-reporter.mjs.map +1 -0
- package/dist/scripts/test-plugin-scripts.d.ts +5 -0
- package/dist/scripts/test-plugin-scripts.js +273 -78
- package/dist/scripts/test-plugin-scripts.js.map +1 -1
- package/dist/scripts/test-workers.d.mts +24 -0
- package/dist/scripts/test-workers.mjs +59 -0
- package/dist/scripts/test-workers.mjs.map +1 -0
- package/dist/src/adapters/helpers.d.ts +7 -0
- package/dist/src/adapters/helpers.js.map +1 -1
- package/dist/src/authoring/workspace-commands.d.ts +5 -1
- package/dist/src/authoring/workspace-commands.js +7 -2
- package/dist/src/authoring/workspace-commands.js.map +1 -1
- package/dist/src/commands/aw-capabilities.d.ts +2 -2
- package/dist/src/commands/aw-capabilities.js +41 -29
- package/dist/src/commands/aw-capabilities.js.map +1 -1
- package/dist/src/commands/catalog-dev-source.d.ts +58 -13
- package/dist/src/commands/catalog-dev-source.js +549 -305
- package/dist/src/commands/catalog-dev-source.js.map +1 -1
- package/dist/src/commands/catalog-generation.d.ts +14 -19
- package/dist/src/commands/catalog-generation.js +5 -10
- package/dist/src/commands/catalog-generation.js.map +1 -1
- package/dist/src/commands/catalog-publication-inspection.d.ts +70 -29
- package/dist/src/commands/catalog-publication-inspection.js +475 -62
- package/dist/src/commands/catalog-publication-inspection.js.map +1 -1
- package/dist/src/commands/catalog-publication-journal.d.ts +68 -0
- package/dist/src/commands/catalog-publication-journal.js +292 -0
- package/dist/src/commands/catalog-publication-journal.js.map +1 -0
- package/dist/src/commands/catalog-publication-target.d.ts +2 -1
- package/dist/src/commands/catalog-publication-target.js +37 -2
- package/dist/src/commands/catalog-publication-target.js.map +1 -1
- package/dist/src/commands/catalog-publish.d.ts +82 -15
- package/dist/src/commands/catalog-publish.js +722 -219
- package/dist/src/commands/catalog-publish.js.map +1 -1
- package/dist/src/commands/catalog-source.d.ts +55 -35
- package/dist/src/commands/catalog-source.js +298 -148
- package/dist/src/commands/catalog-source.js.map +1 -1
- package/dist/src/commands/catalog-status.d.ts +6 -26
- package/dist/src/commands/catalog-status.js +9 -147
- package/dist/src/commands/catalog-status.js.map +1 -1
- package/dist/src/commands/catalog-store.d.ts +104 -0
- package/dist/src/commands/catalog-store.js +685 -0
- package/dist/src/commands/catalog-store.js.map +1 -0
- package/dist/src/commands/catalog-workspace-resolution.d.ts +17 -0
- package/dist/src/commands/catalog-workspace-resolution.js +57 -0
- package/dist/src/commands/catalog-workspace-resolution.js.map +1 -0
- package/dist/src/commands/console.js +32 -20
- package/dist/src/commands/console.js.map +1 -1
- package/dist/src/commands/dependency-operation-plan.d.ts +52 -15
- package/dist/src/commands/dependency-operation-plan.js +289 -7
- package/dist/src/commands/dependency-operation-plan.js.map +1 -1
- package/dist/src/commands/deployment-confirmation.d.ts +4 -0
- package/dist/src/commands/deployment-confirmation.js +20 -0
- package/dist/src/commands/deployment-confirmation.js.map +1 -0
- package/dist/src/commands/init.d.ts +5 -11
- package/dist/src/commands/init.js +30 -51
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/intent-command.d.ts +32 -0
- package/dist/src/commands/intent-command.js +171 -0
- package/dist/src/commands/intent-command.js.map +1 -0
- package/dist/src/commands/managed-commands.d.ts +35 -0
- package/dist/src/commands/managed-commands.js +361 -0
- package/dist/src/commands/managed-commands.js.map +1 -0
- package/dist/src/commands/offline-cleanup-evidence.d.ts +46 -0
- package/dist/src/commands/offline-cleanup-evidence.js +158 -10
- package/dist/src/commands/offline-cleanup-evidence.js.map +1 -1
- package/dist/src/commands/operation-plan.d.ts +190 -0
- package/dist/src/commands/operation-plan.js +99 -0
- package/dist/src/commands/operation-plan.js.map +1 -0
- package/dist/src/commands/operation-planner.d.ts +47 -0
- package/dist/src/commands/operation-planner.js +142 -0
- package/dist/src/commands/operation-planner.js.map +1 -0
- package/dist/src/commands/options.d.ts +16 -20
- package/dist/src/commands/options.js +94 -41
- package/dist/src/commands/options.js.map +1 -1
- package/dist/src/commands/plugin-capabilities.js +88 -45
- package/dist/src/commands/plugin-capabilities.js.map +1 -1
- package/dist/src/commands/public-config-confirmation.d.ts +8 -0
- package/dist/src/commands/public-config-confirmation.js +56 -0
- package/dist/src/commands/public-config-confirmation.js.map +1 -0
- package/dist/src/commands/public-interruption.d.ts +9 -0
- package/dist/src/commands/public-interruption.js +23 -0
- package/dist/src/commands/public-interruption.js.map +1 -0
- package/dist/src/commands/public-lifecycle-result.d.ts +102 -0
- package/dist/src/commands/public-lifecycle-result.js +307 -0
- package/dist/src/commands/public-lifecycle-result.js.map +1 -0
- package/dist/src/commands/public-lifecycle.d.ts +28 -0
- package/dist/src/commands/public-lifecycle.js +492 -0
- package/dist/src/commands/public-lifecycle.js.map +1 -0
- package/dist/src/commands/public-plugin-query.d.ts +16 -0
- package/dist/src/commands/public-plugin-query.js +193 -0
- package/dist/src/commands/public-plugin-query.js.map +1 -0
- package/dist/src/commands/rebuild-command.d.ts +166 -28
- package/dist/src/commands/rebuild-command.js +3745 -813
- package/dist/src/commands/rebuild-command.js.map +1 -1
- package/dist/src/commands/rebuild-integration.d.ts +137 -25
- package/dist/src/commands/rebuild-integration.js +1343 -2535
- package/dist/src/commands/rebuild-integration.js.map +1 -1
- package/dist/src/commands/rebuild-operations.d.ts +73 -22
- package/dist/src/commands/rebuild-operations.js +313 -216
- package/dist/src/commands/rebuild-operations.js.map +1 -1
- package/dist/src/commands/rebuild-platform-integration.d.ts +62 -0
- package/dist/src/commands/rebuild-platform-integration.js +1317 -0
- package/dist/src/commands/rebuild-platform-integration.js.map +1 -0
- package/dist/src/commands/reconcile-operation-plan.d.ts +28 -0
- package/dist/src/commands/reconcile-operation-plan.js +47 -0
- package/dist/src/commands/reconcile-operation-plan.js.map +1 -0
- package/dist/src/commands/review-inspection.d.ts +60 -0
- package/dist/src/commands/review-inspection.js +436 -0
- package/dist/src/commands/review-inspection.js.map +1 -0
- package/dist/src/commands/review-preparation.d.ts +51 -0
- package/dist/src/commands/review-preparation.js +400 -0
- package/dist/src/commands/review-preparation.js.map +1 -0
- package/dist/src/commands/runtime.d.ts +6 -6
- package/dist/src/commands/runtime.js +44 -24
- package/dist/src/commands/runtime.js.map +1 -1
- package/dist/src/commands/skill-eval.d.ts +41 -0
- package/dist/src/commands/skill-eval.js +407 -0
- package/dist/src/commands/skill-eval.js.map +1 -0
- package/dist/src/commands/status-v6.d.ts +319 -0
- package/dist/src/commands/status-v6.js +2979 -0
- package/dist/src/commands/status-v6.js.map +1 -0
- package/dist/src/commands/targets-command.d.ts +38 -0
- package/dist/src/commands/targets-command.js +182 -0
- package/dist/src/commands/targets-command.js.map +1 -0
- package/dist/src/commands/wizard.d.ts +8 -5
- package/dist/src/commands/wizard.js +7 -4
- package/dist/src/commands/wizard.js.map +1 -1
- package/dist/src/commands/write-commands.d.ts +9 -3
- package/dist/src/commands/write-commands.js +143 -85
- package/dist/src/commands/write-commands.js.map +1 -1
- package/dist/src/constants.d.ts +6 -6
- package/dist/src/constants.js +6 -6
- package/dist/src/constants.js.map +1 -1
- package/dist/src/eval/manifest-v1.d.ts +70 -0
- package/dist/src/eval/manifest-v1.js +358 -0
- package/dist/src/eval/manifest-v1.js.map +1 -0
- package/dist/src/generators/local-plugin.d.ts +7 -2
- package/dist/src/generators/local-plugin.js +313 -389
- package/dist/src/generators/local-plugin.js.map +1 -1
- package/dist/src/generators/permissions.d.ts +5 -2
- package/dist/src/generators/permissions.js +28 -15
- package/dist/src/generators/permissions.js.map +1 -1
- package/dist/src/index.d.ts +2 -31
- package/dist/src/index.js +1666 -1827
- package/dist/src/index.js.map +1 -1
- package/dist/src/intent/deployment-preferences.d.ts +63 -0
- package/dist/src/intent/deployment-preferences.js +170 -0
- package/dist/src/intent/deployment-preferences.js.map +1 -0
- package/dist/src/intent/diagnostics.d.ts +11 -0
- package/dist/src/intent/diagnostics.js +14 -0
- package/dist/src/intent/diagnostics.js.map +1 -0
- package/dist/src/intent/intent-codec.d.ts +19 -0
- package/dist/src/intent/intent-codec.js +117 -0
- package/dist/src/intent/intent-codec.js.map +1 -0
- package/dist/src/intent/intent-store.d.ts +43 -0
- package/dist/src/intent/intent-store.js +118 -0
- package/dist/src/intent/intent-store.js.map +1 -0
- package/dist/src/intent/scope-context.d.ts +33 -0
- package/dist/src/intent/scope-context.js +149 -0
- package/dist/src/intent/scope-context.js.map +1 -0
- package/dist/src/intent/work-context.d.ts +13 -0
- package/dist/src/intent/work-context.js +22 -0
- package/dist/src/intent/work-context.js.map +1 -0
- package/dist/src/output/command-receipt.d.ts +47 -46
- package/dist/src/output/command-receipt.js +286 -79
- package/dist/src/output/command-receipt.js.map +1 -1
- package/dist/src/output/model.d.ts +3 -11
- package/dist/src/output/native-consent.d.ts +2 -0
- package/dist/src/output/native-consent.js +5 -0
- package/dist/src/output/native-consent.js.map +1 -0
- package/dist/src/output/public-result.d.ts +49 -0
- package/dist/src/output/public-result.js +240 -0
- package/dist/src/output/public-result.js.map +1 -0
- package/dist/src/output/rebuild-progress.js +20 -15
- package/dist/src/output/rebuild-progress.js.map +1 -1
- package/dist/src/output/receipt-projection.d.ts +7 -0
- package/dist/src/output/receipt-projection.js +592 -0
- package/dist/src/output/receipt-projection.js.map +1 -0
- package/dist/src/platforms/capabilities.d.ts +12 -0
- package/dist/src/platforms/capabilities.js +205 -0
- package/dist/src/platforms/capabilities.js.map +1 -0
- package/dist/src/platforms/contracts.d.ts +358 -0
- package/dist/src/platforms/contracts.js +2 -0
- package/dist/src/platforms/contracts.js.map +1 -0
- package/dist/src/platforms/cursor-workspace-hook.d.ts +28 -0
- package/dist/src/platforms/cursor-workspace-hook.js +198 -0
- package/dist/src/platforms/cursor-workspace-hook.js.map +1 -0
- package/dist/src/platforms/discovery.d.ts +91 -0
- package/dist/src/platforms/discovery.js +653 -0
- package/dist/src/platforms/discovery.js.map +1 -0
- package/dist/src/platforms/gemini-activation.d.ts +36 -0
- package/dist/src/platforms/gemini-activation.js +331 -0
- package/dist/src/platforms/gemini-activation.js.map +1 -0
- package/dist/src/platforms/gemini-consent.d.ts +8 -0
- package/dist/src/platforms/gemini-consent.js +81 -0
- package/dist/src/platforms/gemini-consent.js.map +1 -0
- package/dist/src/platforms/identity.d.ts +4 -0
- package/dist/src/platforms/identity.js +22 -0
- package/dist/src/platforms/identity.js.map +1 -0
- package/dist/src/platforms/inspection-grok.d.ts +4 -0
- package/dist/src/platforms/inspection-grok.js +212 -0
- package/dist/src/platforms/inspection-grok.js.map +1 -0
- package/dist/src/platforms/inspection-native.d.ts +6 -0
- package/dist/src/platforms/inspection-native.js +406 -0
- package/dist/src/platforms/inspection-native.js.map +1 -0
- package/dist/src/platforms/inspection-opencode.d.ts +4 -0
- package/dist/src/platforms/inspection-opencode.js +98 -0
- package/dist/src/platforms/inspection-opencode.js.map +1 -0
- package/dist/src/platforms/inspection-pi.d.ts +3 -0
- package/dist/src/platforms/inspection-pi.js +282 -0
- package/dist/src/platforms/inspection-pi.js.map +1 -0
- package/dist/src/platforms/inspection-query.d.ts +12 -0
- package/dist/src/platforms/inspection-query.js +96 -0
- package/dist/src/platforms/inspection-query.js.map +1 -0
- package/dist/src/platforms/inspection.d.ts +17 -0
- package/dist/src/platforms/inspection.js +227 -0
- package/dist/src/platforms/inspection.js.map +1 -0
- package/dist/src/platforms/layout.d.ts +21 -0
- package/dist/src/platforms/layout.js +239 -0
- package/dist/src/platforms/layout.js.map +1 -0
- package/dist/src/platforms/lifecycle-native-services.d.ts +3 -0
- package/dist/src/platforms/lifecycle-native-services.js +147 -0
- package/dist/src/platforms/lifecycle-native-services.js.map +1 -0
- package/dist/src/platforms/lifecycle-native.d.ts +13 -0
- package/dist/src/platforms/lifecycle-native.js +283 -0
- package/dist/src/platforms/lifecycle-native.js.map +1 -0
- package/dist/src/platforms/lifecycle.d.ts +25 -0
- package/dist/src/platforms/lifecycle.js +494 -0
- package/dist/src/platforms/lifecycle.js.map +1 -0
- package/dist/src/platforms/managed-command-placement.d.ts +8 -0
- package/dist/src/platforms/managed-command-placement.js +79 -0
- package/dist/src/platforms/managed-command-placement.js.map +1 -0
- package/dist/src/platforms/projection-code-extension.d.ts +8 -0
- package/dist/src/platforms/projection-code-extension.js +121 -0
- package/dist/src/platforms/projection-code-extension.js.map +1 -0
- package/dist/src/platforms/projection-command-resources.d.ts +7 -0
- package/dist/src/platforms/projection-command-resources.js +74 -0
- package/dist/src/platforms/projection-command-resources.js.map +1 -0
- package/dist/src/platforms/projection-files.d.ts +27 -0
- package/dist/src/platforms/projection-files.js +111 -0
- package/dist/src/platforms/projection-files.js.map +1 -0
- package/dist/src/platforms/projection-marketplace.d.ts +19 -0
- package/dist/src/platforms/projection-marketplace.js +42 -0
- package/dist/src/platforms/projection-marketplace.js.map +1 -0
- package/dist/src/platforms/projection.d.ts +10 -0
- package/dist/src/platforms/projection.js +446 -0
- package/dist/src/platforms/projection.js.map +1 -0
- package/dist/src/platforms/registry.d.ts +4 -0
- package/dist/src/platforms/registry.js +30 -0
- package/dist/src/platforms/registry.js.map +1 -0
- package/dist/src/platforms/supplement-layout.d.ts +16 -0
- package/dist/src/platforms/supplement-layout.js +31 -0
- package/dist/src/platforms/supplement-layout.js.map +1 -0
- package/dist/src/platforms/supplement-state.d.ts +13 -0
- package/dist/src/platforms/supplement-state.js +82 -0
- package/dist/src/platforms/supplement-state.js.map +1 -0
- package/dist/src/portable/commands.d.ts +58 -11
- package/dist/src/portable/commands.js +94 -350
- package/dist/src/portable/commands.js.map +1 -1
- package/dist/src/portable/historical-materialization.d.ts +22 -0
- package/dist/src/portable/historical-materialization.js +124 -0
- package/dist/src/portable/historical-materialization.js.map +1 -0
- package/dist/src/portable/materializer.d.ts +24 -4
- package/dist/src/portable/materializer.js +189 -259
- package/dist/src/portable/materializer.js.map +1 -1
- package/dist/src/portable/recovery-layout.d.ts +17 -0
- package/dist/src/portable/recovery-layout.js +42 -0
- package/dist/src/portable/recovery-layout.js.map +1 -0
- package/dist/src/portable/recovery.d.ts +153 -0
- package/dist/src/portable/recovery.js +367 -0
- package/dist/src/portable/recovery.js.map +1 -0
- package/dist/src/portable/writer.d.ts +67 -0
- package/dist/src/portable/writer.js +321 -0
- package/dist/src/portable/writer.js.map +1 -0
- package/dist/src/recovery/coordinator.d.ts +141 -0
- package/dist/src/recovery/coordinator.js +1254 -0
- package/dist/src/recovery/coordinator.js.map +1 -0
- package/dist/src/recovery/demand.d.ts +51 -0
- package/dist/src/recovery/demand.js +159 -0
- package/dist/src/recovery/demand.js.map +1 -0
- package/dist/src/recovery/joint-coordinator.d.ts +25 -0
- package/dist/src/recovery/joint-coordinator.js +991 -0
- package/dist/src/recovery/joint-coordinator.js.map +1 -0
- package/dist/src/recovery/joint-demand.d.ts +50 -0
- package/dist/src/recovery/joint-demand.js +197 -0
- package/dist/src/recovery/joint-demand.js.map +1 -0
- package/dist/src/recovery/performance.d.ts +4 -0
- package/dist/src/recovery/performance.js +26 -0
- package/dist/src/recovery/performance.js.map +1 -0
- package/dist/src/recovery/receipt.d.ts +98 -0
- package/dist/src/recovery/receipt.js +2 -0
- package/dist/src/recovery/receipt.js.map +1 -0
- package/dist/src/recovery/retirement.d.ts +47 -0
- package/dist/src/recovery/retirement.js +469 -0
- package/dist/src/recovery/retirement.js.map +1 -0
- package/dist/src/recovery/status.d.ts +126 -0
- package/dist/src/recovery/status.js +1073 -0
- package/dist/src/recovery/status.js.map +1 -0
- package/dist/src/recovery/types.d.ts +85 -0
- package/dist/src/recovery/types.js +2 -0
- package/dist/src/recovery/types.js.map +1 -0
- package/dist/src/review/eval-source-input.d.ts +43 -0
- package/dist/src/review/eval-source-input.js +207 -0
- package/dist/src/review/eval-source-input.js.map +1 -0
- package/dist/src/review/platform-profile.d.ts +3 -0
- package/dist/src/review/platform-profile.js +14 -0
- package/dist/src/review/platform-profile.js.map +1 -0
- package/dist/src/review/review-profile.d.ts +20 -0
- package/dist/src/review/review-profile.js +276 -0
- package/dist/src/review/review-profile.js.map +1 -0
- package/dist/src/review/review-selection.d.ts +20 -0
- package/dist/src/review/review-selection.js +495 -0
- package/dist/src/review/review-selection.js.map +1 -0
- package/dist/src/review/review-types.d.ts +71 -0
- package/dist/src/review/review-types.js +16 -0
- package/dist/src/review/review-types.js.map +1 -0
- package/dist/src/review/skill-materialization.d.ts +62 -0
- package/dist/src/review/skill-materialization.js +205 -0
- package/dist/src/review/skill-materialization.js.map +1 -0
- package/dist/src/review/source-binding.d.ts +201 -0
- package/dist/src/review/source-binding.js +773 -0
- package/dist/src/review/source-binding.js.map +1 -0
- package/dist/src/tui/agent-management.d.ts +23 -0
- package/dist/src/tui/agent-management.js +319 -0
- package/dist/src/tui/agent-management.js.map +1 -0
- package/dist/src/tui/agent-settings.d.ts +47 -0
- package/dist/src/tui/agent-settings.js +97 -0
- package/dist/src/tui/agent-settings.js.map +1 -0
- package/dist/src/tui/catalog-freshness.d.ts +1 -0
- package/dist/src/tui/catalog-freshness.js +2 -0
- package/dist/src/tui/catalog-freshness.js.map +1 -0
- package/dist/src/tui/catalog-generation.d.ts +18 -53
- package/dist/src/tui/catalog-generation.js +136 -224
- package/dist/src/tui/catalog-generation.js.map +1 -1
- package/dist/src/tui/catalog-sources/projection.d.ts +4 -0
- package/dist/src/tui/catalog-sources/projection.js +17 -0
- package/dist/src/tui/catalog-sources/projection.js.map +1 -0
- package/dist/src/tui/catalog-sources/review.d.ts +3 -0
- package/dist/src/tui/catalog-sources/review.js +13 -0
- package/dist/src/tui/catalog-sources/review.js.map +1 -0
- package/dist/src/tui/catalog-sources/screens.d.ts +12 -0
- package/dist/src/tui/catalog-sources/screens.js +40 -0
- package/dist/src/tui/catalog-sources/screens.js.map +1 -0
- package/dist/src/tui/catalog-sources/session.d.ts +32 -0
- package/dist/src/tui/catalog-sources/session.js +300 -0
- package/dist/src/tui/catalog-sources/session.js.map +1 -0
- package/dist/src/tui/catalog-sources/types.d.ts +54 -0
- package/dist/src/tui/catalog-sources/types.js +2 -0
- package/dist/src/tui/catalog-sources/types.js.map +1 -0
- package/dist/src/tui/catalog-store-task.d.ts +16 -0
- package/dist/src/tui/catalog-store-task.js +19 -0
- package/dist/src/tui/catalog-store-task.js.map +1 -0
- package/dist/src/tui/clipboard.d.ts +13 -0
- package/dist/src/tui/clipboard.js +95 -0
- package/dist/src/tui/clipboard.js.map +1 -0
- package/dist/src/tui/components.d.ts +113 -3
- package/dist/src/tui/components.js +201 -36
- package/dist/src/tui/components.js.map +1 -1
- package/dist/src/tui/config-array-draft.d.ts +29 -0
- package/dist/src/tui/config-array-draft.js +48 -0
- package/dist/src/tui/config-array-draft.js.map +1 -0
- package/dist/src/tui/config-leaf-editor.d.ts +43 -0
- package/dist/src/tui/config-leaf-editor.js +224 -0
- package/dist/src/tui/config-leaf-editor.js.map +1 -0
- package/dist/src/tui/config-references.d.ts +38 -0
- package/dist/src/tui/config-references.js +82 -0
- package/dist/src/tui/config-references.js.map +1 -0
- package/dist/src/tui/config-value-presentation.d.ts +20 -0
- package/dist/src/tui/config-value-presentation.js +104 -0
- package/dist/src/tui/config-value-presentation.js.map +1 -0
- package/dist/src/tui/console-app-v4.d.ts +13 -4
- package/dist/src/tui/console-app-v4.js +9764 -2210
- package/dist/src/tui/console-app-v4.js.map +1 -1
- package/dist/src/tui/content-item-card.d.ts +13 -0
- package/dist/src/tui/content-item-card.js +51 -0
- package/dist/src/tui/content-item-card.js.map +1 -0
- package/dist/src/tui/controller-runtime.d.ts +7 -4
- package/dist/src/tui/controller-runtime.js +2064 -779
- package/dist/src/tui/controller-runtime.js.map +1 -1
- package/dist/src/tui/controller.d.ts +669 -106
- package/dist/src/tui/controller.js +3617 -971
- package/dist/src/tui/controller.js.map +1 -1
- package/dist/src/tui/dependency-graph-view.d.ts +39 -0
- package/dist/src/tui/dependency-graph-view.js +121 -0
- package/dist/src/tui/dependency-graph-view.js.map +1 -0
- package/dist/src/tui/dependency-graph.d.ts +81 -0
- package/dist/src/tui/dependency-graph.js +452 -0
- package/dist/src/tui/dependency-graph.js.map +1 -0
- package/dist/src/tui/deployment-view.d.ts +10 -0
- package/dist/src/tui/deployment-view.js +108 -0
- package/dist/src/tui/deployment-view.js.map +1 -0
- package/dist/src/tui/diagnostic-projection.d.ts +23 -0
- package/dist/src/tui/diagnostic-projection.js +595 -0
- package/dist/src/tui/diagnostic-projection.js.map +1 -0
- package/dist/src/tui/diagnostics.d.ts +6 -3
- package/dist/src/tui/diagnostics.js +14 -2
- package/dist/src/tui/diagnostics.js.map +1 -1
- package/dist/src/tui/entity-cards.d.ts +55 -0
- package/dist/src/tui/entity-cards.js +298 -0
- package/dist/src/tui/entity-cards.js.map +1 -0
- package/dist/src/tui/glossary.d.ts +25 -0
- package/dist/src/tui/glossary.js +72 -0
- package/dist/src/tui/glossary.js.map +1 -0
- package/dist/src/tui/index.d.ts +6 -2
- package/dist/src/tui/index.js +5 -2
- package/dist/src/tui/index.js.map +1 -1
- package/dist/src/tui/input-display.d.ts +1 -0
- package/dist/src/tui/input-display.js +23 -1
- package/dist/src/tui/input-display.js.map +1 -1
- package/dist/src/tui/keys.d.ts +44 -0
- package/dist/src/tui/keys.js +43 -15
- package/dist/src/tui/keys.js.map +1 -1
- package/dist/src/tui/lifecycle-action-view.d.ts +6 -0
- package/dist/src/tui/lifecycle-action-view.js +36 -0
- package/dist/src/tui/lifecycle-action-view.js.map +1 -0
- package/dist/src/tui/model.d.ts +243 -45
- package/dist/src/tui/model.js +1402 -415
- package/dist/src/tui/model.js.map +1 -1
- package/dist/src/tui/operation-diagnostic-screens.d.ts +8 -0
- package/dist/src/tui/operation-diagnostic-screens.js +72 -0
- package/dist/src/tui/operation-diagnostic-screens.js.map +1 -0
- package/dist/src/tui/operation-history.d.ts +82 -0
- package/dist/src/tui/operation-history.js +136 -0
- package/dist/src/tui/operation-history.js.map +1 -0
- package/dist/src/tui/operation-review-planner.d.ts +28 -0
- package/dist/src/tui/operation-review-planner.js +1396 -0
- package/dist/src/tui/operation-review-planner.js.map +1 -0
- package/dist/src/tui/plugin-content.d.ts +33 -0
- package/dist/src/tui/plugin-content.js +245 -0
- package/dist/src/tui/plugin-content.js.map +1 -0
- package/dist/src/tui/plugin-detail.d.ts +72 -0
- package/dist/src/tui/plugin-detail.js +260 -0
- package/dist/src/tui/plugin-detail.js.map +1 -0
- package/dist/src/tui/plugin-write-task.d.ts +69 -0
- package/dist/src/tui/plugin-write-task.js +286 -0
- package/dist/src/tui/plugin-write-task.js.map +1 -0
- package/dist/src/tui/prompt.js +4 -15
- package/dist/src/tui/prompt.js.map +1 -1
- package/dist/src/tui/query-header.d.ts +30 -0
- package/dist/src/tui/query-header.js +40 -0
- package/dist/src/tui/query-header.js.map +1 -0
- package/dist/src/tui/reader.d.ts +38 -0
- package/dist/src/tui/reader.js +49 -0
- package/dist/src/tui/reader.js.map +1 -0
- package/dist/src/tui/router.d.ts +186 -35
- package/dist/src/tui/router.js +338 -50
- package/dist/src/tui/router.js.map +1 -1
- package/dist/src/tui/scoped-flow.d.ts +45 -0
- package/dist/src/tui/scoped-flow.js +96 -0
- package/dist/src/tui/scoped-flow.js.map +1 -0
- package/dist/src/tui/scoped-inventory.d.ts +126 -0
- package/dist/src/tui/scoped-inventory.js +258 -0
- package/dist/src/tui/scoped-inventory.js.map +1 -0
- package/dist/src/tui/screen-registry.d.ts +701 -0
- package/dist/src/tui/screen-registry.js +226 -0
- package/dist/src/tui/screen-registry.js.map +1 -0
- package/dist/src/tui/session-console-app.d.ts +6 -0
- package/dist/src/tui/session-console-app.js +13 -0
- package/dist/src/tui/session-console-app.js.map +1 -0
- package/dist/src/tui/session-host.d.ts +45 -0
- package/dist/src/tui/session-host.js +219 -0
- package/dist/src/tui/session-host.js.map +1 -0
- package/dist/src/tui/source-detail-card.d.ts +29 -0
- package/dist/src/tui/source-detail-card.js +45 -0
- package/dist/src/tui/source-detail-card.js.map +1 -0
- package/dist/src/tui/theme.d.ts +12 -0
- package/dist/src/tui/theme.js +12 -0
- package/dist/src/tui/theme.js.map +1 -1
- package/dist/src/tui/viewport.d.ts +1 -0
- package/dist/src/tui/viewport.js +23 -0
- package/dist/src/tui/viewport.js.map +1 -1
- package/dist/src/tui/wizard.js +37 -13
- package/dist/src/tui/wizard.js.map +1 -1
- package/dist/src/types.d.ts +220 -118
- package/dist/src/types.js +1 -0
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils/agent-version.d.ts +13 -4
- package/dist/src/utils/agent-version.js +27 -4
- package/dist/src/utils/agent-version.js.map +1 -1
- package/dist/src/utils/artifact-plan.d.ts +33 -7
- package/dist/src/utils/artifact-plan.js +115 -430
- package/dist/src/utils/artifact-plan.js.map +1 -1
- package/dist/src/utils/artifact-renderer.d.ts +114 -83
- package/dist/src/utils/artifact-renderer.js +213 -364
- package/dist/src/utils/artifact-renderer.js.map +1 -1
- package/dist/src/utils/artifact-request.d.ts +44 -0
- package/dist/src/utils/artifact-request.js +80 -0
- package/dist/src/utils/artifact-request.js.map +1 -0
- package/dist/src/utils/artifact-sources.d.ts +6 -2
- package/dist/src/utils/artifact-sources.js +17 -0
- package/dist/src/utils/artifact-sources.js.map +1 -1
- package/dist/src/utils/bundle-layout.js +57 -173
- package/dist/src/utils/bundle-layout.js.map +1 -1
- package/dist/src/utils/catalog-capability-projection.d.ts +8 -0
- package/dist/src/utils/catalog-capability-projection.js +14 -0
- package/dist/src/utils/catalog-capability-projection.js.map +1 -0
- package/dist/src/utils/catalog-digests.d.ts +2 -2
- package/dist/src/utils/catalog-digests.js +7 -18
- package/dist/src/utils/catalog-digests.js.map +1 -1
- package/dist/src/utils/catalog-generation-control-snapshot.d.ts +11 -0
- package/dist/src/utils/catalog-generation-control-snapshot.js +45 -0
- package/dist/src/utils/catalog-generation-control-snapshot.js.map +1 -0
- package/dist/src/utils/catalog-generation-error.d.ts +5 -1
- package/dist/src/utils/catalog-generation-error.js +14 -0
- package/dist/src/utils/catalog-generation-error.js.map +1 -1
- package/dist/src/utils/catalog-generation-resolver.d.ts +36 -5
- package/dist/src/utils/catalog-generation-resolver.js +221 -77
- package/dist/src/utils/catalog-generation-resolver.js.map +1 -1
- package/dist/src/utils/catalog-generation-service.d.ts +159 -28
- package/dist/src/utils/catalog-generation-service.js +1186 -525
- package/dist/src/utils/catalog-generation-service.js.map +1 -1
- package/dist/src/utils/catalog-generation-state.d.ts +9 -0
- package/dist/src/utils/catalog-generation-state.js +97 -106
- package/dist/src/utils/catalog-generation-state.js.map +1 -1
- package/dist/src/utils/catalog-generation-store.d.ts +38 -24
- package/dist/src/utils/catalog-generation-store.js +337 -272
- package/dist/src/utils/catalog-generation-store.js.map +1 -1
- package/dist/src/utils/catalog-manifest-v7.d.ts +5 -0
- package/dist/src/utils/{catalog-manifest-v5.js → catalog-manifest-v7.js} +23 -35
- package/dist/src/utils/catalog-manifest-v7.js.map +1 -0
- package/dist/src/utils/catalog-operation-context.d.ts +6 -14
- package/dist/src/utils/catalog-operation-context.js +69 -169
- package/dist/src/utils/catalog-operation-context.js.map +1 -1
- package/dist/src/utils/catalog-public-error.js +8 -4
- package/dist/src/utils/catalog-public-error.js.map +1 -1
- package/dist/src/utils/catalog-runtime-projection.d.ts +7 -3
- package/dist/src/utils/catalog-runtime-projection.js +5 -40
- package/dist/src/utils/catalog-runtime-projection.js.map +1 -1
- package/dist/src/utils/catalog-snapshot.d.ts +2 -2
- package/dist/src/utils/catalog-source-impact.d.ts +21 -0
- package/dist/src/utils/catalog-source-impact.js +344 -0
- package/dist/src/utils/catalog-source-impact.js.map +1 -0
- package/dist/src/utils/catalog-source-references.d.ts +23 -2
- package/dist/src/utils/catalog-source-references.js +456 -382
- package/dist/src/utils/catalog-source-references.js.map +1 -1
- package/dist/src/utils/catalog-sources.d.ts +14 -1
- package/dist/src/utils/catalog-sources.js +178 -18
- package/dist/src/utils/catalog-sources.js.map +1 -1
- package/dist/src/utils/codex-config.d.ts +2 -0
- package/dist/src/utils/codex-config.js +22 -1
- package/dist/src/utils/codex-config.js.map +1 -1
- package/dist/src/utils/codex-executable-discovery.d.ts +28 -0
- package/dist/src/utils/codex-executable-discovery.js +431 -0
- package/dist/src/utils/codex-executable-discovery.js.map +1 -0
- package/dist/src/utils/codex-manager.d.ts +47 -18
- package/dist/src/utils/codex-manager.js +88 -622
- package/dist/src/utils/codex-manager.js.map +1 -1
- package/dist/src/utils/codex-marketplace-path.d.ts +5 -0
- package/dist/src/utils/codex-marketplace-path.js +45 -0
- package/dist/src/utils/codex-marketplace-path.js.map +1 -0
- package/dist/src/utils/codex-native-observation.d.ts +49 -0
- package/dist/src/utils/codex-native-observation.js +169 -0
- package/dist/src/utils/codex-native-observation.js.map +1 -0
- package/dist/src/utils/codex-reconciler.d.ts +123 -0
- package/dist/src/utils/codex-reconciler.js +322 -0
- package/dist/src/utils/codex-reconciler.js.map +1 -0
- package/dist/src/utils/codex-shared-native.d.ts +45 -0
- package/dist/src/utils/codex-shared-native.js +122 -0
- package/dist/src/utils/codex-shared-native.js.map +1 -0
- package/dist/src/utils/codex-skill-staging.d.ts +4 -3
- package/dist/src/utils/codex-skill-staging.js.map +1 -1
- package/dist/src/utils/codex-skills-root.d.ts +4 -0
- package/dist/src/utils/codex-skills-root.js +25 -0
- package/dist/src/utils/codex-skills-root.js.map +1 -0
- package/dist/src/utils/codex-surface-analysis.d.ts +49 -0
- package/dist/src/utils/codex-surface-analysis.js +220 -0
- package/dist/src/utils/codex-surface-analysis.js.map +1 -0
- package/dist/src/utils/component-command-preparation.d.ts +34 -0
- package/dist/src/utils/component-command-preparation.js +228 -0
- package/dist/src/utils/component-command-preparation.js.map +1 -0
- package/dist/src/utils/component-resources.d.ts +51 -0
- package/dist/src/utils/component-resources.js +322 -0
- package/dist/src/utils/component-resources.js.map +1 -0
- package/dist/src/utils/dynamic-skill-tree.d.ts +18 -6
- package/dist/src/utils/dynamic-skill-tree.js +32 -9
- package/dist/src/utils/dynamic-skill-tree.js.map +1 -1
- package/dist/src/utils/git-catalog-provider.d.ts +16 -0
- package/dist/src/utils/git-catalog-provider.js +167 -120
- package/dist/src/utils/git-catalog-provider.js.map +1 -1
- package/dist/src/utils/inventory-recovery-diagnostic.d.ts +4 -0
- package/dist/src/utils/inventory-recovery-diagnostic.js +15 -0
- package/dist/src/utils/inventory-recovery-diagnostic.js.map +1 -0
- package/dist/src/utils/local-marketplace.d.ts +17 -12
- package/dist/src/utils/local-marketplace.js +85 -195
- package/dist/src/utils/local-marketplace.js.map +1 -1
- package/dist/src/utils/managed-command-closure.d.ts +3 -0
- package/dist/src/utils/managed-command-closure.js +35 -0
- package/dist/src/utils/managed-command-closure.js.map +1 -0
- package/dist/src/utils/managed-command-evidence.d.ts +7 -0
- package/dist/src/utils/managed-command-evidence.js +10 -0
- package/dist/src/utils/managed-command-evidence.js.map +1 -0
- package/dist/src/utils/managed-command-materialization.d.ts +124 -0
- package/dist/src/utils/managed-command-materialization.js +369 -0
- package/dist/src/utils/managed-command-materialization.js.map +1 -0
- package/dist/src/utils/managed-command-preparation.d.ts +67 -0
- package/dist/src/utils/managed-command-preparation.js +146 -0
- package/dist/src/utils/managed-command-preparation.js.map +1 -0
- package/dist/src/utils/managed-command-review.d.ts +26 -0
- package/dist/src/utils/managed-command-review.js +68 -0
- package/dist/src/utils/managed-command-review.js.map +1 -0
- package/dist/src/utils/managed-command-runtime.d.ts +33 -0
- package/dist/src/utils/managed-command-runtime.js +121 -0
- package/dist/src/utils/managed-command-runtime.js.map +1 -0
- package/dist/src/utils/managed-command-store.d.ts +143 -0
- package/dist/src/utils/managed-command-store.js +665 -0
- package/dist/src/utils/managed-command-store.js.map +1 -0
- package/dist/src/utils/manifest.d.ts +1 -3
- package/dist/src/utils/manifest.js +1 -3
- package/dist/src/utils/manifest.js.map +1 -1
- package/dist/src/utils/multi-source-catalog.d.ts +1 -10
- package/dist/src/utils/multi-source-catalog.js +9 -175
- package/dist/src/utils/multi-source-catalog.js.map +1 -1
- package/dist/src/utils/native-cli.d.ts +74 -5
- package/dist/src/utils/native-cli.js +479 -31
- package/dist/src/utils/native-cli.js.map +1 -1
- package/dist/src/utils/native-demand.d.ts +29 -0
- package/dist/src/utils/native-demand.js +4 -0
- package/dist/src/utils/native-demand.js.map +1 -0
- package/dist/src/utils/native-tool-context.d.ts +14 -0
- package/dist/src/utils/native-tool-context.js +38 -0
- package/dist/src/utils/native-tool-context.js.map +1 -0
- package/dist/src/utils/native-tool-review.d.ts +18 -0
- package/dist/src/utils/native-tool-review.js +116 -0
- package/dist/src/utils/native-tool-review.js.map +1 -0
- package/dist/src/utils/orphan-marketplace-cleanup.js +0 -1
- package/dist/src/utils/orphan-marketplace-cleanup.js.map +1 -1
- package/dist/src/utils/ownership.d.ts +103 -21
- package/dist/src/utils/ownership.js +232 -210
- package/dist/src/utils/ownership.js.map +1 -1
- package/dist/src/utils/path-catalog-provider.d.ts +1 -1
- package/dist/src/utils/path-catalog-provider.js +47 -62
- package/dist/src/utils/path-catalog-provider.js.map +1 -1
- package/dist/src/utils/paths.d.ts +1 -2
- package/dist/src/utils/paths.js +5 -3
- package/dist/src/utils/paths.js.map +1 -1
- package/dist/src/utils/platform-empty-state.d.ts +45 -0
- package/dist/src/utils/platform-empty-state.js +159 -0
- package/dist/src/utils/platform-empty-state.js.map +1 -0
- package/dist/src/utils/platform-support.d.ts +1 -1
- package/dist/src/utils/platform-support.js +1 -1
- package/dist/src/utils/platform-support.js.map +1 -1
- package/dist/src/utils/plugin-config-impact.d.ts +64 -0
- package/dist/src/utils/plugin-config-impact.js +307 -0
- package/dist/src/utils/plugin-config-impact.js.map +1 -0
- package/dist/src/utils/plugin-config-references.d.ts +89 -0
- package/dist/src/utils/plugin-config-references.js +335 -0
- package/dist/src/utils/plugin-config-references.js.map +1 -0
- package/dist/src/utils/plugin-config-write.d.ts +109 -27
- package/dist/src/utils/plugin-config-write.js +1242 -348
- package/dist/src/utils/plugin-config-write.js.map +1 -1
- package/dist/src/utils/plugin-config.d.ts +187 -109
- package/dist/src/utils/plugin-config.js +916 -1147
- package/dist/src/utils/plugin-config.js.map +1 -1
- package/dist/src/utils/plugin-dependencies.d.ts +1 -1
- package/dist/src/utils/plugin-dependencies.js.map +1 -1
- package/dist/src/utils/plugin-scripts.d.ts +78 -127
- package/dist/src/utils/plugin-scripts.js +566 -524
- package/dist/src/utils/plugin-scripts.js.map +1 -1
- package/dist/src/utils/process-lock.js +14 -5
- package/dist/src/utils/process-lock.js.map +1 -1
- package/dist/src/utils/process-tree.d.ts +2 -2
- package/dist/src/utils/process-tree.js +1 -1
- package/dist/src/utils/process-tree.js.map +1 -1
- package/dist/src/utils/project-boundary.d.ts +11 -13
- package/dist/src/utils/project-boundary.js +28 -34
- package/dist/src/utils/project-boundary.js.map +1 -1
- package/dist/src/utils/rendered-contract.js +18 -1
- package/dist/src/utils/rendered-contract.js.map +1 -1
- package/dist/src/utils/runtime-config.d.ts +18 -0
- package/dist/src/utils/runtime-config.js +64 -0
- package/dist/src/utils/runtime-config.js.map +1 -0
- package/dist/src/utils/runtime-skill-closure.d.ts +2 -2
- package/dist/src/utils/runtime-skill-closure.js +47 -6
- package/dist/src/utils/runtime-skill-closure.js.map +1 -1
- package/dist/src/utils/safe-fs.d.ts +21 -0
- package/dist/src/utils/safe-fs.js +111 -0
- package/dist/src/utils/safe-fs.js.map +1 -0
- package/dist/src/utils/safe-operation-diagnostic.d.ts +15 -0
- package/dist/src/utils/safe-operation-diagnostic.js +33 -0
- package/dist/src/utils/safe-operation-diagnostic.js.map +1 -0
- package/dist/src/utils/sensitive-content.d.ts +4 -0
- package/dist/src/utils/sensitive-content.js +36 -0
- package/dist/src/utils/sensitive-content.js.map +1 -0
- package/dist/src/utils/state-paths.d.ts +8 -3
- package/dist/src/utils/state-paths.js +53 -16
- package/dist/src/utils/state-paths.js.map +1 -1
- package/dist/src/utils/target-eligibility.d.ts +4 -3
- package/dist/src/utils/target-eligibility.js +12 -6
- package/dist/src/utils/target-eligibility.js.map +1 -1
- package/dist/src/utils/windows-claude-shim.d.ts +7 -0
- package/dist/src/utils/windows-claude-shim.js +10 -0
- package/dist/src/utils/windows-claude-shim.js.map +1 -0
- package/dist/src/utils/windows-npm-shim.d.ts +16 -0
- package/dist/src/utils/windows-npm-shim.js +155 -0
- package/dist/src/utils/windows-npm-shim.js.map +1 -0
- package/dist/vitest.config.js +105 -9
- package/dist/vitest.config.js.map +1 -1
- package/package.json +30 -21
- package/dist/scripts/aw-skill-eval-engine.d.ts +0 -13
- package/dist/scripts/aw-skill-eval-engine.js +0 -31
- package/dist/scripts/aw-skill-eval-engine.js.map +0 -1
- package/dist/scripts/codex-eval-app-server.d.ts +0 -91
- package/dist/scripts/codex-eval-app-server.js +0 -1334
- package/dist/scripts/codex-eval-app-server.js.map +0 -1
- package/dist/scripts/codex-eval-isolation.d.ts +0 -61
- package/dist/scripts/codex-eval-isolation.js +0 -318
- package/dist/scripts/codex-eval-isolation.js.map +0 -1
- package/dist/scripts/codex-eval-process-management.d.ts +0 -8
- package/dist/scripts/codex-eval-process-management.js +0 -69
- package/dist/scripts/codex-eval-process-management.js.map +0 -1
- package/dist/scripts/codex-eval-process-tree.d.ts +0 -38
- package/dist/scripts/codex-eval-process-tree.js +0 -803
- package/dist/scripts/codex-eval-process-tree.js.map +0 -1
- package/dist/scripts/codex-eval-runtime-config.d.ts +0 -62
- package/dist/scripts/codex-eval-runtime-config.js +0 -843
- package/dist/scripts/codex-eval-runtime-config.js.map +0 -1
- package/dist/scripts/codex-trigger-eval.d.ts +0 -84
- package/dist/scripts/codex-trigger-eval.js +0 -968
- package/dist/scripts/codex-trigger-eval.js.map +0 -1
- package/dist/scripts/eval-plugin-skills-audited.d.ts +0 -6
- package/dist/scripts/eval-plugin-skills-audited.js +0 -261
- package/dist/scripts/eval-plugin-skills-audited.js.map +0 -1
- package/dist/scripts/eval-plugin-skills.d.ts +0 -45
- package/dist/scripts/eval-plugin-skills.js +0 -1589
- package/dist/scripts/eval-plugin-skills.js.map +0 -1
- package/dist/scripts/eval-run-layout.d.ts +0 -17
- package/dist/scripts/eval-run-layout.js +0 -26
- package/dist/scripts/eval-run-layout.js.map +0 -1
- package/dist/scripts/plugin-eval-contract.d.ts +0 -189
- package/dist/scripts/plugin-eval-contract.js +0 -745
- package/dist/scripts/plugin-eval-contract.js.map +0 -1
- package/dist/scripts/plugin-eval-materializer.d.ts +0 -13
- package/dist/scripts/plugin-eval-materializer.js +0 -421
- package/dist/scripts/plugin-eval-materializer.js.map +0 -1
- package/dist/scripts/skill-reporting.d.ts +0 -212
- package/dist/scripts/skill-reporting.js +0 -922
- package/dist/scripts/skill-reporting.js.map +0 -1
- package/dist/src/commands/catalog-context.d.ts +0 -52
- package/dist/src/commands/catalog-context.js +0 -156
- package/dist/src/commands/catalog-context.js.map +0 -1
- package/dist/src/commands/review-publication.d.ts +0 -99
- package/dist/src/commands/review-publication.js +0 -904
- package/dist/src/commands/review-publication.js.map +0 -1
- package/dist/src/commands/status-v5.d.ts +0 -169
- package/dist/src/commands/status-v5.js +0 -1135
- package/dist/src/commands/status-v5.js.map +0 -1
- package/dist/src/portable/skills-cli.d.ts +0 -43
- package/dist/src/portable/skills-cli.js +0 -148
- package/dist/src/portable/skills-cli.js.map +0 -1
- package/dist/src/utils/catalog-manifest-v5.d.ts +0 -5
- package/dist/src/utils/catalog-manifest-v5.js.map +0 -1
- package/dist/src/utils/catalog-source-cache.d.ts +0 -62
- package/dist/src/utils/catalog-source-cache.js +0 -321
- package/dist/src/utils/catalog-source-cache.js.map +0 -1
- package/dist/src/utils/codex-project-surface.d.ts +0 -3
- package/dist/src/utils/codex-project-surface.js +0 -49
- package/dist/src/utils/codex-project-surface.js.map +0 -1
- package/dist/src/utils/lifecycle-active-store.d.ts +0 -147
- package/dist/src/utils/lifecycle-active-store.js +0 -1064
- package/dist/src/utils/lifecycle-active-store.js.map +0 -1
- package/dist/src/utils/plugin-release.d.ts +0 -2
- package/dist/src/utils/plugin-release.js +0 -2
- package/dist/src/utils/plugin-release.js.map +0 -1
- package/dist/src/utils/slash-commands.d.ts +0 -1
- package/dist/src/utils/slash-commands.js +0 -2
- package/dist/src/utils/slash-commands.js.map +0 -1
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { flattenStatusTargets, statusTargetActivation, statusTargetIntent, statusTargetOwnershipState, statusTargetSharedNative, } from '../commands/status-v6.js';
|
|
2
|
+
import { agentLabel, platformLabel, scopeLabel } from './glossary.js';
|
|
3
|
+
import { hasActualScopeEvidence } from './model.js';
|
|
4
|
+
function agentForPlatform(platform) {
|
|
5
|
+
return platform;
|
|
6
|
+
}
|
|
7
|
+
function placementIdentity(placement) {
|
|
8
|
+
return [placement.agent ?? '', placement.delivery ?? '', placement.platform ?? '', placement.scope].join('\0');
|
|
9
|
+
}
|
|
10
|
+
function declarationFact(inventory, pluginId) {
|
|
11
|
+
const root = inventory?.declaredRoots.find((entry) => entry.pluginId === pluginId);
|
|
12
|
+
const state = root && inventory?.declarationState === 'ready' ? 'declared'
|
|
13
|
+
: inventory?.declarationState === 'ready' || inventory?.declarationState === 'absent'
|
|
14
|
+
? 'not-declared' : 'unobserved';
|
|
15
|
+
const agents = inventory?.selectedAgents ?? [];
|
|
16
|
+
return {
|
|
17
|
+
state,
|
|
18
|
+
...(state === 'declared' && root?.sourceState ? { sourceState: root.sourceState } : {}),
|
|
19
|
+
targets: !inventory || inventory.preferenceState === 'invalid'
|
|
20
|
+
|| inventory.preferenceState === 'unreadable' ? 'unobserved'
|
|
21
|
+
: agents.length ? 'selected' : 'empty',
|
|
22
|
+
agents,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function relationFacts(overviews, observed) {
|
|
26
|
+
const facts = new Map();
|
|
27
|
+
const names = new Map();
|
|
28
|
+
const ids = new Set();
|
|
29
|
+
const add = (from, to, declared, verified) => {
|
|
30
|
+
if (!from || !to)
|
|
31
|
+
return;
|
|
32
|
+
ids.add(from);
|
|
33
|
+
ids.add(to);
|
|
34
|
+
const key = `${from}\0${to}`;
|
|
35
|
+
const old = facts.get(key);
|
|
36
|
+
facts.set(key, {
|
|
37
|
+
from,
|
|
38
|
+
to,
|
|
39
|
+
declared: declared || old?.declared === true,
|
|
40
|
+
verified: verified || old?.verified === true,
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
for (const overview of overviews) {
|
|
44
|
+
for (const item of [...overview.dependencies, ...overview.dependents]) {
|
|
45
|
+
ids.add(item.pluginId);
|
|
46
|
+
names.set(item.pluginId, item.displayName);
|
|
47
|
+
for (const parent of item.requiredBy) {
|
|
48
|
+
names.set(parent.pluginId, parent.displayName);
|
|
49
|
+
add(parent.pluginId, item.pluginId, true, false);
|
|
50
|
+
}
|
|
51
|
+
if (item.relation === 'direct' && item.requiredBy.length === 0) {
|
|
52
|
+
add(overview.pluginId, item.pluginId, true, false);
|
|
53
|
+
}
|
|
54
|
+
if (item.relation === 'dependent')
|
|
55
|
+
add(item.pluginId, overview.pluginId, true, false);
|
|
56
|
+
for (const reference of item.placementReferences ?? []) {
|
|
57
|
+
add(reference.consumer.pluginId, reference.dependency.pluginId, true, false);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
for (const observation of observed) {
|
|
62
|
+
for (const overview of observation.overviews) {
|
|
63
|
+
for (const item of [...overview.dependencies, ...overview.dependents]) {
|
|
64
|
+
for (const reference of item.availablePlacementReferences ?? []) {
|
|
65
|
+
if ((reference.requirementScope ?? reference.consumer.scope) !== observation.scope)
|
|
66
|
+
continue;
|
|
67
|
+
add(reference.consumer.pluginId, reference.dependency.pluginId, true, true);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return { facts, names, ids };
|
|
73
|
+
}
|
|
74
|
+
export function buildPluginDetailSubject(options) {
|
|
75
|
+
const { pluginId } = options;
|
|
76
|
+
const overviews = options.dependencyOverviews ?? [];
|
|
77
|
+
const summary = options.pluginSummaries.find((item) => item.pluginId === pluginId);
|
|
78
|
+
const plugin = options.plugins.find((item) => item.pluginId === pluginId);
|
|
79
|
+
const observed = ['user', 'project'].map((scope) => ({ scope,
|
|
80
|
+
overviews: options.dependencyObservations?.[scope] ?? overviews,
|
|
81
|
+
}));
|
|
82
|
+
const targets = flattenStatusTargets(options.status.targets).filter((target) => target.pluginId === pluginId
|
|
83
|
+
&& !options.currentScopes?.includes(target.scope));
|
|
84
|
+
const roots = [...(options.projectInventory?.declaredRoots ?? []),
|
|
85
|
+
...(options.projectInventory?.extraInstalledRoots ?? []),
|
|
86
|
+
...Object.values(options.scopedInventories ?? {}).flatMap((inventory) => [
|
|
87
|
+
...inventory.declaredRoots, ...inventory.extraInstalledRoots,
|
|
88
|
+
])]
|
|
89
|
+
.filter((root) => root.pluginId === pluginId);
|
|
90
|
+
const dependencies = [...(options.projectInventory?.declaredRoots ?? []),
|
|
91
|
+
...(options.projectInventory?.extraInstalledRoots ?? []),
|
|
92
|
+
...Object.values(options.scopedInventories ?? {}).flatMap((inventory) => [
|
|
93
|
+
...inventory.declaredRoots, ...inventory.extraInstalledRoots,
|
|
94
|
+
])]
|
|
95
|
+
.flatMap((root) => root.dependencies.filter((item) => item.pluginId === pluginId));
|
|
96
|
+
const graph = relationFacts(overviews, observed);
|
|
97
|
+
if (!summary && !plugin && targets.length === 0 && roots.length === 0
|
|
98
|
+
&& dependencies.length === 0 && !graph.ids.has(pluginId))
|
|
99
|
+
return undefined;
|
|
100
|
+
const sourceId = plugin?.sourceId ?? targets[0]?.sourceId ?? roots[0]?.sourceId
|
|
101
|
+
?? pluginId.slice(0, pluginId.indexOf('/'));
|
|
102
|
+
const displayName = summary?.displayName ?? summary?.pluginName ?? plugin?.displayName
|
|
103
|
+
?? roots[0]?.displayName ?? dependencies[0]?.displayName ?? graph.names.get(pluginId)
|
|
104
|
+
?? targets[0]?.pluginName ?? pluginId.split('/').at(-1) ?? pluginId;
|
|
105
|
+
const revisions = new Map((options.targetRevisions ?? []).filter((item) => item.pluginId === pluginId
|
|
106
|
+
&& !options.currentScopes?.includes(item.scope)).map((item) => [`${item.platform}\0${item.scope}`, item.revision]));
|
|
107
|
+
const placements = new Map();
|
|
108
|
+
const ensure = (identity, scope) => {
|
|
109
|
+
const resolvedAgent = identity.agent ?? (identity.platform ? agentForPlatform(identity.platform) : undefined);
|
|
110
|
+
const resolvedDelivery = identity.delivery ?? (identity.platform ? 'native' : undefined);
|
|
111
|
+
const key = placementIdentity({ ...identity, agent: resolvedAgent, delivery: resolvedDelivery, scope });
|
|
112
|
+
const current = placements.get(key);
|
|
113
|
+
if (current)
|
|
114
|
+
return current;
|
|
115
|
+
const placement = {
|
|
116
|
+
...identity,
|
|
117
|
+
...(resolvedAgent ? { agent: resolvedAgent } : {}),
|
|
118
|
+
...(resolvedDelivery ? { delivery: resolvedDelivery } : {}),
|
|
119
|
+
scope,
|
|
120
|
+
platformLabel: identity.platform ? platformLabel(identity.platform)
|
|
121
|
+
: resolvedAgent ? agentLabel(resolvedAgent) : '目标',
|
|
122
|
+
scopeLabel: scopeLabel(scope),
|
|
123
|
+
observation: 'unknown',
|
|
124
|
+
declared: false,
|
|
125
|
+
actual: false,
|
|
126
|
+
sharedWithCurrentProject: false,
|
|
127
|
+
reasonCodes: [],
|
|
128
|
+
};
|
|
129
|
+
placements.set(key, placement);
|
|
130
|
+
return placement;
|
|
131
|
+
};
|
|
132
|
+
for (const target of targets) {
|
|
133
|
+
const intent = statusTargetIntent(target);
|
|
134
|
+
const actual = hasActualScopeEvidence(target);
|
|
135
|
+
if (target.state === 'absent' && !actual && !intent.scopes.includes(target.scope))
|
|
136
|
+
continue;
|
|
137
|
+
const placement = ensure({ platform: target.platform, agent: agentForPlatform(target.platform),
|
|
138
|
+
delivery: 'native' }, target.scope);
|
|
139
|
+
const unobserved = statusTargetSharedNative(target)?.state === 'unobserved'
|
|
140
|
+
|| statusTargetActivation(target)?.evidence === 'unobserved'
|
|
141
|
+
|| statusTargetOwnershipState(target) === 'error';
|
|
142
|
+
placement.statusState = target.state;
|
|
143
|
+
placement.observation = unobserved ? 'unknown' : 'known';
|
|
144
|
+
placement.declared = intent.scopes.includes(target.scope);
|
|
145
|
+
placement.actual = actual;
|
|
146
|
+
placement.reasonCodes = [...new Set([...target.reasons, ...(target.sharedReasons ?? [])]
|
|
147
|
+
.map((reason) => reason.code))];
|
|
148
|
+
const revision = revisions.get(`${target.platform}\0${target.scope}`);
|
|
149
|
+
if (revision?.installedVersion)
|
|
150
|
+
placement.installedVersion = revision.installedVersion;
|
|
151
|
+
}
|
|
152
|
+
for (const root of roots) {
|
|
153
|
+
for (const target of root.targets) {
|
|
154
|
+
if (target.delivery === 'agent-skills' && target.state === 'pending' && !target.actual)
|
|
155
|
+
continue;
|
|
156
|
+
const placement = ensure({ ...(target.platform ? { platform: target.platform } : {}),
|
|
157
|
+
...(target.agent ? { agent: target.agent } : {}),
|
|
158
|
+
...(target.delivery ? { delivery: target.delivery } : {}) }, target.scope);
|
|
159
|
+
placement.projectState = target.state;
|
|
160
|
+
if (target.delivery === 'native')
|
|
161
|
+
placement.statusState = target.state === 'ready' ? 'ready'
|
|
162
|
+
: target.state === 'pending' ? 'needsSync' : target.state === 'blocked' ? 'blocked' : undefined;
|
|
163
|
+
if (target.expectedVersion)
|
|
164
|
+
placement.expectedVersion = target.expectedVersion;
|
|
165
|
+
if (target.installedVersion)
|
|
166
|
+
placement.installedVersion = target.installedVersion;
|
|
167
|
+
if (target.observation)
|
|
168
|
+
placement.observation = target.observation;
|
|
169
|
+
placement.actual ||= target.actual === true;
|
|
170
|
+
if (target.state === 'unknown' || target.state === 'blocked') {
|
|
171
|
+
placement.observation = 'unknown';
|
|
172
|
+
placement.statusState = target.state === 'blocked' ? 'blocked' : undefined;
|
|
173
|
+
}
|
|
174
|
+
placement.declared ||= root.section === 'declared';
|
|
175
|
+
placement.sharedWithCurrentProject ||= target.location === 'sharedUser';
|
|
176
|
+
placement.reasonCodes = [...new Set([...placement.reasonCodes, ...target.reasonCodes])];
|
|
177
|
+
const revision = target.platform ? revisions.get(`${target.platform}\0${target.scope}`) : undefined;
|
|
178
|
+
if (revision?.installedVersion)
|
|
179
|
+
placement.installedVersion = revision.installedVersion;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
for (const dependency of dependencies) {
|
|
183
|
+
for (const target of dependency.targets) {
|
|
184
|
+
if (target.delivery === 'agent-skills' && target.state === 'pending' && !target.actual)
|
|
185
|
+
continue;
|
|
186
|
+
const key = target.platform ? `${target.platform}\0${target.scope}` : undefined;
|
|
187
|
+
// A later direct scope observation takes precedence over an older shared dependency check.
|
|
188
|
+
if (target.location === 'sharedUser' && options.latestScope === target.scope
|
|
189
|
+
&& options.currentScopes?.includes(target.scope))
|
|
190
|
+
continue;
|
|
191
|
+
const placement = ensure({ ...(target.platform ? { platform: target.platform } : {}),
|
|
192
|
+
...(target.agent ? { agent: target.agent } : {}),
|
|
193
|
+
...(target.delivery ? { delivery: target.delivery } : {}) }, target.scope);
|
|
194
|
+
placement.projectState = target.state;
|
|
195
|
+
if (target.delivery === 'native')
|
|
196
|
+
placement.statusState = target.state === 'ready' ? 'ready'
|
|
197
|
+
: target.state === 'pending' ? 'needsSync' : target.state === 'blocked' ? 'blocked' : undefined;
|
|
198
|
+
if (target.expectedVersion)
|
|
199
|
+
placement.expectedVersion = target.expectedVersion;
|
|
200
|
+
if (target.installedVersion)
|
|
201
|
+
placement.installedVersion = target.installedVersion;
|
|
202
|
+
if (target.observation)
|
|
203
|
+
placement.observation = target.observation;
|
|
204
|
+
placement.actual ||= target.actual === true;
|
|
205
|
+
placement.sharedWithCurrentProject ||= target.location === 'sharedUser';
|
|
206
|
+
placement.reasonCodes = [...new Set([...placement.reasonCodes, ...target.reasonCodes])];
|
|
207
|
+
if (!target.platform || !targets.some((entry) => entry.platform === target.platform && entry.scope === target.scope)) {
|
|
208
|
+
placement.observation = target.delivery === 'agent-skills' ? target.observation ?? 'unknown'
|
|
209
|
+
: target.state === 'ready' ? 'known' : 'unknown';
|
|
210
|
+
if (target.installedVersion)
|
|
211
|
+
placement.installedVersion = target.installedVersion;
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
const revision = key ? revisions.get(key) : undefined;
|
|
215
|
+
if (revision?.installedVersion)
|
|
216
|
+
placement.installedVersion = revision.installedVersion;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
const toRelation = (fact, otherId) => ({
|
|
221
|
+
pluginId: otherId,
|
|
222
|
+
displayName: graph.names.get(otherId) ?? otherId.split('/').at(-1) ?? otherId,
|
|
223
|
+
declared: fact.declared,
|
|
224
|
+
verified: fact.verified,
|
|
225
|
+
});
|
|
226
|
+
const known = [...graph.facts.values()];
|
|
227
|
+
const outgoing = known.filter((fact) => fact.from === pluginId)
|
|
228
|
+
.map((fact) => toRelation(fact, fact.to));
|
|
229
|
+
const incoming = known.filter((fact) => fact.to === pluginId)
|
|
230
|
+
.map((fact) => toRelation(fact, fact.from));
|
|
231
|
+
const overview = overviews.find((item) => item.pluginId === pluginId);
|
|
232
|
+
const source = options.status.catalog.sources.find((item) => item.id === sourceId);
|
|
233
|
+
const definitionAvailable = summary !== undefined && !summary.definitionUnavailable && source !== undefined && !source.error;
|
|
234
|
+
return {
|
|
235
|
+
pluginId,
|
|
236
|
+
sourceId,
|
|
237
|
+
displayName,
|
|
238
|
+
...(summary?.description ? { description: summary.description } : {}),
|
|
239
|
+
...(summary?.version ? { catalogVersion: summary.version } : {}),
|
|
240
|
+
definitionAvailable,
|
|
241
|
+
...(summary?.platforms ? { supportedPlatforms: summary.platforms } : {}),
|
|
242
|
+
selectedAgents: options.scopedInventories?.user?.selectedAgents ?? options.scopedInventories?.project?.selectedAgents,
|
|
243
|
+
savedConfigScopes: plugin?.savedConfigScopes ?? [],
|
|
244
|
+
...(plugin ? { plugin } : {}),
|
|
245
|
+
declarations: {
|
|
246
|
+
user: declarationFact(options.scopedInventories?.user, pluginId),
|
|
247
|
+
project: declarationFact(options.scopedInventories?.project, pluginId),
|
|
248
|
+
},
|
|
249
|
+
placements: [...placements.values()].sort((left, right) => placementIdentity(left).localeCompare(placementIdentity(right), 'en')),
|
|
250
|
+
relations: {
|
|
251
|
+
outgoing,
|
|
252
|
+
incoming,
|
|
253
|
+
checkState: overview && definitionAvailable
|
|
254
|
+
&& !overview.blockers.some((blocker) => blocker.code === 'dependencyGraphInvalid')
|
|
255
|
+
? 'checked' : 'unknown',
|
|
256
|
+
hasKnownRelations: outgoing.length > 0 || incoming.length > 0,
|
|
257
|
+
},
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
//# sourceMappingURL=plugin-detail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-detail.js","sourceRoot":"","sources":["../../../src/tui/plugin-detail.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,EAClB,0BAA0B,EAC1B,wBAAwB,GAKzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,sBAAsB,EACC,MAAM,YAAY,CAAC;AAsBnD,SAAS,gBAAgB,CAAC,QAAsB;IAC9C,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAS,iBAAiB,CAAC,SACmB;IAC5C,OAAO,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE,EAAE,SAAS,CAAC,QAAQ,IAAI,EAAE,EAAE,SAAS,CAAC,QAAQ,IAAI,EAAE,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACjH,CAAC;AAwCD,SAAS,eAAe,CAAC,SAA+C,EACtE,QAAgB;IAChB,MAAM,IAAI,GAAG,SAAS,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC;IACnF,MAAM,KAAK,GAAG,IAAI,IAAI,SAAS,EAAE,gBAA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AC,EAAE,CAAC;QACxE,cAAc,EAAE,OAAO,CAAC,iBAAiB,EAAE,IAAI,EAAE,cAAc,IAAI,OAAO,CAAC,iBAAiB,EAAE,OAAO,EAAE,cAAc;QACrH,iBAAiB,EAAE,MAAM,EAAE,iBAAiB,IAAI,EAAE;QAClD,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7B,YAAY,EAAE;YACZ,IAAI,EAAE,eAAe,CAAC,OAAO,CAAC,iBAAiB,EAAE,IAAI,EAAE,QAAQ,CAAC;YAChE,OAAO,EAAE,eAAe,CAAC,OAAO,CAAC,iBAAiB,EAAE,OAAO,EAAE,QAAQ,CAAC;SACvE;QACD,UAAU,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CACxD,iBAAiB,CAAC,IAAI,CAAC,CAAC,aAAa,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC;QACxE,SAAS,EAAE;YACT,QAAQ;YACR,QAAQ;YACR,UAAU,EAAE,QAAQ,IAAI,mBAAmB;mBACtC,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,wBAAwB,CAAC;gBAClF,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;YACzB,iBAAiB,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;SAC9D;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { PlatformName, Scope } from '../types.js';
|
|
2
|
+
import type { PluginListItemViewModel, TuiViewModel } from './model.js';
|
|
3
|
+
import type { SafeOperationDiagnostic } from './operation-history.js';
|
|
4
|
+
export type PluginWriteTaskGoal = 'restore' | 'update';
|
|
5
|
+
export type PluginWriteTaskMethod = 'sync' | 'reinstall';
|
|
6
|
+
export interface PluginWriteTaskExpectedUpdate {
|
|
7
|
+
installedVersion: string;
|
|
8
|
+
activeVersion: string;
|
|
9
|
+
sourceIdentity: string;
|
|
10
|
+
generationKey: string;
|
|
11
|
+
}
|
|
12
|
+
export interface PluginWriteTaskTarget {
|
|
13
|
+
pluginId: string;
|
|
14
|
+
platform: PlatformName;
|
|
15
|
+
scope: Scope;
|
|
16
|
+
expectedUpdate?: PluginWriteTaskExpectedUpdate;
|
|
17
|
+
}
|
|
18
|
+
export interface PluginWriteTaskIntent {
|
|
19
|
+
kind: 'pluginWriteTask';
|
|
20
|
+
goal: PluginWriteTaskGoal;
|
|
21
|
+
targets: PluginWriteTaskTarget[];
|
|
22
|
+
executionPolicy: 'all' | 'executableSubset';
|
|
23
|
+
scriptTimeoutMs?: number;
|
|
24
|
+
}
|
|
25
|
+
export type PluginWriteTaskBlockReason = 'catalogActivationRequired' | 'updateEvidenceIncomplete' | 'updateIncompatible' | 'restoreVersionChanged' | 'restoreVersionUnverified' | 'manualRecoveryRequired' | 'taskActionConflict' | 'targetUnavailable';
|
|
26
|
+
export interface PluginWriteTaskCandidate {
|
|
27
|
+
target: PluginWriteTaskTarget;
|
|
28
|
+
displayName: string;
|
|
29
|
+
sourceId: string;
|
|
30
|
+
eligible: boolean;
|
|
31
|
+
blockReason?: PluginWriteTaskBlockReason;
|
|
32
|
+
recommendedMethod?: PluginWriteTaskMethod;
|
|
33
|
+
issueIds: string[];
|
|
34
|
+
}
|
|
35
|
+
export interface PluginWriteTaskCause {
|
|
36
|
+
causeKey: string;
|
|
37
|
+
issueId: string;
|
|
38
|
+
sourceId: string;
|
|
39
|
+
sourceIdentity: string;
|
|
40
|
+
repairTarget: Omit<PluginWriteTaskTarget, 'expectedUpdate'>;
|
|
41
|
+
method: PluginWriteTaskMethod;
|
|
42
|
+
consumers: Array<Omit<PluginWriteTaskTarget, 'expectedUpdate'>>;
|
|
43
|
+
restoreVersionEvidence?: {
|
|
44
|
+
state: 'preserved' | 'absent';
|
|
45
|
+
activeVersion: string;
|
|
46
|
+
installedVersion?: string;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export interface PluginWriteTaskBlockedTarget {
|
|
50
|
+
target: PluginWriteTaskTarget;
|
|
51
|
+
reason: PluginWriteTaskBlockReason;
|
|
52
|
+
issueIds: string[];
|
|
53
|
+
errorCodes?: string[];
|
|
54
|
+
diagnostics?: SafeOperationDiagnostic[];
|
|
55
|
+
}
|
|
56
|
+
export interface PluginWriteTaskDraft {
|
|
57
|
+
requestedTargets: PluginWriteTaskTarget[];
|
|
58
|
+
executableTargets: PluginWriteTaskTarget[];
|
|
59
|
+
causes: PluginWriteTaskCause[];
|
|
60
|
+
blockedTargets: PluginWriteTaskBlockedTarget[];
|
|
61
|
+
}
|
|
62
|
+
export declare function pluginWriteTaskVersionEvidence(plugin: PluginListItemViewModel, candidates: readonly PluginWriteTaskCandidate[]): Record<string, string>;
|
|
63
|
+
export declare function evaluatePluginWriteTaskRestoreVersion(target: Omit<PluginWriteTaskTarget, 'expectedUpdate'>, allowAbsent: boolean, model: Pick<TuiViewModel, 'plugins'>): {
|
|
64
|
+
evidence?: PluginWriteTaskCause['restoreVersionEvidence'];
|
|
65
|
+
blockReason?: 'restoreVersionChanged' | 'restoreVersionUnverified' | 'manualRecoveryRequired';
|
|
66
|
+
};
|
|
67
|
+
export declare function buildPluginWriteTaskCandidates(model: Pick<TuiViewModel, 'plugins' | 'issues'>, goal: PluginWriteTaskGoal): PluginWriteTaskCandidate[];
|
|
68
|
+
export declare function buildPluginWriteTaskDraft(intent: PluginWriteTaskIntent, model: Pick<TuiViewModel, 'plugins' | 'issues'>, providedCandidates?: readonly PluginWriteTaskCandidate[]): PluginWriteTaskDraft;
|
|
69
|
+
export declare function pluginWriteTaskTargetKey(target: Pick<PluginWriteTaskTarget, 'pluginId' | 'platform' | 'scope'>): string;
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
function targetKey(target) {
|
|
2
|
+
return [target.pluginId, target.platform, target.scope].join('\0');
|
|
3
|
+
}
|
|
4
|
+
export function pluginWriteTaskVersionEvidence(plugin, candidates) {
|
|
5
|
+
return Object.fromEntries(candidates.flatMap((candidate) => {
|
|
6
|
+
const update = plugin.update.targets.find((target) => target.platform === candidate.target.platform && target.scope === candidate.target.scope);
|
|
7
|
+
const version = candidate.target.expectedUpdate?.activeVersion
|
|
8
|
+
?? update?.candidateVersion ?? update?.availableVersion;
|
|
9
|
+
if (!version)
|
|
10
|
+
return [];
|
|
11
|
+
const candidateEvidence = update?.candidateVersion === version
|
|
12
|
+
? update.candidateEvidence : undefined;
|
|
13
|
+
const binding = candidateEvidence ?? plugin.update.generationKey;
|
|
14
|
+
return [[targetKey(candidate.target), JSON.stringify({
|
|
15
|
+
version,
|
|
16
|
+
...(plugin.update.sourceIdentity ? { sourceIdentity: plugin.update.sourceIdentity } : {}),
|
|
17
|
+
...(binding ? { binding } : {}),
|
|
18
|
+
})]];
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
function canonicalTargets(targets) {
|
|
22
|
+
return [...new Map(targets.map((target) => [targetKey(target), structuredClone(target)])).values()]
|
|
23
|
+
.sort((left, right) => targetKey(left).localeCompare(targetKey(right), 'en'));
|
|
24
|
+
}
|
|
25
|
+
function exactTarget(target) {
|
|
26
|
+
return { pluginId: target.pluginId, platform: target.platform, scope: target.scope };
|
|
27
|
+
}
|
|
28
|
+
function issueConsumers(issue) {
|
|
29
|
+
const affected = issue.affectedTargets ?? [];
|
|
30
|
+
if (affected.length > 0) {
|
|
31
|
+
return canonicalTargets(affected.map((target) => ({
|
|
32
|
+
pluginId: target.pluginId,
|
|
33
|
+
platform: target.platform,
|
|
34
|
+
scope: target.scope,
|
|
35
|
+
}))).map(exactTarget);
|
|
36
|
+
}
|
|
37
|
+
const root = issue.rootEntity
|
|
38
|
+
?? (issue.pluginId && issue.platform && issue.scope
|
|
39
|
+
? { pluginId: issue.pluginId, platform: issue.platform, scope: issue.scope }
|
|
40
|
+
: undefined);
|
|
41
|
+
return root ? [root] : [];
|
|
42
|
+
}
|
|
43
|
+
function issueMethod(issue) {
|
|
44
|
+
for (const action of issue.actions) {
|
|
45
|
+
if (action.writeAction === 'sync')
|
|
46
|
+
return 'sync';
|
|
47
|
+
if (action.writeAction === 'reinstall')
|
|
48
|
+
return 'reinstall';
|
|
49
|
+
if (action.writeAction === 'install' && issue.dependencyPluginId)
|
|
50
|
+
return 'sync';
|
|
51
|
+
}
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
function issueRepairTarget(issue) {
|
|
55
|
+
if (issue.dependencyPluginId && issue.dependencyPlatform && issue.dependencyScope) {
|
|
56
|
+
return {
|
|
57
|
+
pluginId: issue.dependencyPluginId,
|
|
58
|
+
platform: issue.dependencyPlatform,
|
|
59
|
+
scope: issue.dependencyScope,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
return issue.rootEntity
|
|
63
|
+
?? (issue.pluginId && issue.platform && issue.scope
|
|
64
|
+
? { pluginId: issue.pluginId, platform: issue.platform, scope: issue.scope }
|
|
65
|
+
: undefined);
|
|
66
|
+
}
|
|
67
|
+
export function evaluatePluginWriteTaskRestoreVersion(target, allowAbsent, model) {
|
|
68
|
+
const plugin = model.plugins.find((candidate) => candidate.pluginId === target.pluginId);
|
|
69
|
+
const revision = plugin?.update.targets.find((candidate) => candidate.platform === target.platform && candidate.scope === target.scope);
|
|
70
|
+
const installedInOtherScope = plugin?.update.targets.find((candidate) => candidate.platform === target.platform
|
|
71
|
+
&& candidate.scope !== target.scope
|
|
72
|
+
&& candidate.installedVersion !== undefined);
|
|
73
|
+
if (revision?.installedVersion) {
|
|
74
|
+
if (!revision.activeVersion)
|
|
75
|
+
return { blockReason: 'restoreVersionUnverified' };
|
|
76
|
+
if (revision.installedVersion !== revision.activeVersion) {
|
|
77
|
+
return { blockReason: 'restoreVersionChanged' };
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
evidence: {
|
|
81
|
+
state: 'preserved',
|
|
82
|
+
installedVersion: revision.installedVersion,
|
|
83
|
+
activeVersion: revision.activeVersion,
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
if (installedInOtherScope) {
|
|
88
|
+
const activeVersion = revision?.activeVersion ?? plugin?.version;
|
|
89
|
+
return activeVersion && installedInOtherScope.installedVersion !== activeVersion
|
|
90
|
+
? { blockReason: 'restoreVersionChanged' }
|
|
91
|
+
: { blockReason: 'manualRecoveryRequired' };
|
|
92
|
+
}
|
|
93
|
+
const activeVersion = revision?.activeVersion ?? plugin?.version;
|
|
94
|
+
return allowAbsent && activeVersion
|
|
95
|
+
? { evidence: { state: 'absent', activeVersion } }
|
|
96
|
+
: { blockReason: 'restoreVersionUnverified' };
|
|
97
|
+
}
|
|
98
|
+
function restoreIssueVersionEvidence(issue, model) {
|
|
99
|
+
const repairTarget = issueRepairTarget(issue);
|
|
100
|
+
return repairTarget
|
|
101
|
+
? evaluatePluginWriteTaskRestoreVersion(repairTarget, issue.category === 'dependencyMissing', model).evidence
|
|
102
|
+
: undefined;
|
|
103
|
+
}
|
|
104
|
+
function restoreIssueVersionBlockReason(issue, model) {
|
|
105
|
+
const repairTarget = issueRepairTarget(issue);
|
|
106
|
+
return repairTarget
|
|
107
|
+
? evaluatePluginWriteTaskRestoreVersion(repairTarget, issue.category === 'dependencyMissing', model).blockReason
|
|
108
|
+
: 'restoreVersionUnverified';
|
|
109
|
+
}
|
|
110
|
+
function restoreCandidate(options) {
|
|
111
|
+
const matchingIssues = options.issues.filter((issue) => issueConsumers(issue)
|
|
112
|
+
.some((consumer) => targetKey(consumer) === targetKey(options.target)));
|
|
113
|
+
const actionable = matchingIssues.map((issue) => issueMethod(issue));
|
|
114
|
+
const update = options.plugin.update.targets.find((candidate) => candidate.platform === options.target.platform && candidate.scope === options.target.scope);
|
|
115
|
+
let blockReason;
|
|
116
|
+
if (!update?.installedVersion || !update.activeVersion)
|
|
117
|
+
blockReason = 'restoreVersionUnverified';
|
|
118
|
+
else if (update.installedVersion !== update.activeVersion)
|
|
119
|
+
blockReason = 'restoreVersionChanged';
|
|
120
|
+
else {
|
|
121
|
+
blockReason = matchingIssues.map((issue) => restoreIssueVersionBlockReason(issue, options.model))
|
|
122
|
+
.find((reason) => reason !== undefined);
|
|
123
|
+
}
|
|
124
|
+
if (!blockReason && (matchingIssues.length === 0 || actionable.some((method) => method === undefined))) {
|
|
125
|
+
blockReason = 'manualRecoveryRequired';
|
|
126
|
+
}
|
|
127
|
+
if (!blockReason && matchingIssues.some((issue) => issue.actions.some((action) => (action.writeAction === 'sync' || action.writeAction === 'reinstall')
|
|
128
|
+
&& action.pluginId === options.target.pluginId && action.scope !== options.target.scope))) {
|
|
129
|
+
blockReason = 'manualRecoveryRequired';
|
|
130
|
+
}
|
|
131
|
+
const methods = new Set(actionable.filter((method) => Boolean(method)));
|
|
132
|
+
return {
|
|
133
|
+
target: options.target,
|
|
134
|
+
displayName: options.plugin.displayName,
|
|
135
|
+
sourceId: options.plugin.sourceId,
|
|
136
|
+
eligible: blockReason === undefined,
|
|
137
|
+
...(blockReason ? { blockReason } : {}),
|
|
138
|
+
...(methods.has('reinstall') ? { recommendedMethod: 'reinstall' }
|
|
139
|
+
: methods.has('sync') ? { recommendedMethod: 'sync' } : {}),
|
|
140
|
+
issueIds: matchingIssues.map((issue) => issue.issueId).sort((left, right) => left.localeCompare(right, 'en')),
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
function updateCandidate(options) {
|
|
144
|
+
const update = options.plugin.update.targets.find((candidate) => candidate.platform === options.platform && candidate.scope === options.scope);
|
|
145
|
+
let blockReason;
|
|
146
|
+
if (update.requiresCatalogActivation)
|
|
147
|
+
blockReason = 'catalogActivationRequired';
|
|
148
|
+
else if (update.eligibility === 'incompatible')
|
|
149
|
+
blockReason = 'updateIncompatible';
|
|
150
|
+
else if (!update.installedVersion || !update.availableVersion
|
|
151
|
+
|| !options.plugin.update.sourceIdentity || !options.plugin.update.generationKey) {
|
|
152
|
+
blockReason = 'updateEvidenceIncomplete';
|
|
153
|
+
}
|
|
154
|
+
const expectedUpdate = blockReason === undefined ? {
|
|
155
|
+
installedVersion: update.installedVersion,
|
|
156
|
+
activeVersion: update.availableVersion,
|
|
157
|
+
sourceIdentity: options.plugin.update.sourceIdentity,
|
|
158
|
+
generationKey: options.plugin.update.generationKey,
|
|
159
|
+
} : undefined;
|
|
160
|
+
return {
|
|
161
|
+
target: {
|
|
162
|
+
pluginId: options.plugin.pluginId,
|
|
163
|
+
platform: options.platform,
|
|
164
|
+
scope: options.scope,
|
|
165
|
+
...(expectedUpdate ? { expectedUpdate } : {}),
|
|
166
|
+
},
|
|
167
|
+
displayName: options.plugin.displayName,
|
|
168
|
+
sourceId: options.plugin.sourceId,
|
|
169
|
+
eligible: blockReason === undefined,
|
|
170
|
+
...(blockReason ? { blockReason } : {}),
|
|
171
|
+
recommendedMethod: update.eligibility === 'needsRepair' ? 'reinstall' : 'sync',
|
|
172
|
+
issueIds: [],
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
export function buildPluginWriteTaskCandidates(model, goal) {
|
|
176
|
+
if (goal === 'update') {
|
|
177
|
+
return model.plugins.flatMap((plugin) => plugin.update.targets
|
|
178
|
+
.filter((target) => target.availableVersion !== undefined)
|
|
179
|
+
.map((target) => updateCandidate({
|
|
180
|
+
plugin,
|
|
181
|
+
platform: target.platform,
|
|
182
|
+
scope: target.scope,
|
|
183
|
+
}))).sort((left, right) => targetKey(left.target).localeCompare(targetKey(right.target), 'en'));
|
|
184
|
+
}
|
|
185
|
+
const candidates = new Map();
|
|
186
|
+
for (const issue of model.issues) {
|
|
187
|
+
for (const target of issueConsumers(issue)) {
|
|
188
|
+
const plugin = model.plugins.find((candidate) => candidate.pluginId === target.pluginId);
|
|
189
|
+
if (!plugin)
|
|
190
|
+
continue;
|
|
191
|
+
candidates.set(targetKey(target), restoreCandidate({
|
|
192
|
+
plugin,
|
|
193
|
+
target,
|
|
194
|
+
issues: model.issues,
|
|
195
|
+
model,
|
|
196
|
+
}));
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
return [...candidates.values()].sort((left, right) => targetKey(left.target).localeCompare(targetKey(right.target), 'en'));
|
|
200
|
+
}
|
|
201
|
+
export function buildPluginWriteTaskDraft(intent, model, providedCandidates) {
|
|
202
|
+
const requestedTargets = canonicalTargets(intent.targets);
|
|
203
|
+
const candidates = new Map((providedCandidates ?? buildPluginWriteTaskCandidates(model, intent.goal))
|
|
204
|
+
.map((candidate) => [targetKey(candidate.target), candidate]));
|
|
205
|
+
const blockedTargets = [];
|
|
206
|
+
const executableTargets = [];
|
|
207
|
+
for (const target of requestedTargets) {
|
|
208
|
+
const candidate = candidates.get(targetKey(target));
|
|
209
|
+
const expectedMatches = intent.goal !== 'update' || JSON.stringify(target.expectedUpdate)
|
|
210
|
+
=== JSON.stringify(candidate?.target.expectedUpdate);
|
|
211
|
+
if (!candidate || !candidate.eligible || !expectedMatches) {
|
|
212
|
+
blockedTargets.push({
|
|
213
|
+
target,
|
|
214
|
+
reason: candidate?.blockReason ?? (expectedMatches
|
|
215
|
+
? 'targetUnavailable' : 'updateEvidenceIncomplete'),
|
|
216
|
+
issueIds: candidate?.issueIds ?? [],
|
|
217
|
+
});
|
|
218
|
+
continue;
|
|
219
|
+
}
|
|
220
|
+
executableTargets.push(target);
|
|
221
|
+
}
|
|
222
|
+
const executableKeys = new Set(executableTargets.map(targetKey));
|
|
223
|
+
const causes = new Map();
|
|
224
|
+
if (intent.goal === 'update') {
|
|
225
|
+
for (const target of executableTargets) {
|
|
226
|
+
const candidate = candidates.get(targetKey(target));
|
|
227
|
+
const sourceIdentity = target.expectedUpdate.sourceIdentity;
|
|
228
|
+
const causeKey = ['update', sourceIdentity, targetKey(target),
|
|
229
|
+
target.expectedUpdate.activeVersion].join('\0');
|
|
230
|
+
causes.set(causeKey, {
|
|
231
|
+
causeKey,
|
|
232
|
+
issueId: causeKey,
|
|
233
|
+
sourceId: candidate.sourceId,
|
|
234
|
+
sourceIdentity,
|
|
235
|
+
repairTarget: exactTarget(target),
|
|
236
|
+
method: candidate.recommendedMethod,
|
|
237
|
+
consumers: [exactTarget(target)],
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
for (const issue of model.issues) {
|
|
243
|
+
const consumers = issueConsumers(issue).filter((target) => executableKeys.has(targetKey(target)));
|
|
244
|
+
const repairTarget = issueRepairTarget(issue);
|
|
245
|
+
const method = issueMethod(issue);
|
|
246
|
+
if (consumers.length === 0 || !repairTarget || !method || !issue.sourceIdentity || !issue.sourceId)
|
|
247
|
+
continue;
|
|
248
|
+
const causeKey = [issue.issueId, issue.sourceIdentity, targetKey(repairTarget)].join('\0');
|
|
249
|
+
const current = causes.get(causeKey);
|
|
250
|
+
if (current && current.method !== method) {
|
|
251
|
+
for (const consumer of consumers) {
|
|
252
|
+
executableKeys.delete(targetKey(consumer));
|
|
253
|
+
blockedTargets.push({
|
|
254
|
+
target: requestedTargets.find((target) => targetKey(target) === targetKey(consumer)),
|
|
255
|
+
reason: 'taskActionConflict',
|
|
256
|
+
issueIds: [issue.issueId],
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
causes.delete(causeKey);
|
|
260
|
+
continue;
|
|
261
|
+
}
|
|
262
|
+
causes.set(causeKey, {
|
|
263
|
+
causeKey,
|
|
264
|
+
issueId: issue.issueId,
|
|
265
|
+
sourceId: issue.sourceId,
|
|
266
|
+
sourceIdentity: issue.sourceIdentity,
|
|
267
|
+
repairTarget,
|
|
268
|
+
method,
|
|
269
|
+
consumers: canonicalTargets([...(current?.consumers ?? []), ...consumers]).map(exactTarget),
|
|
270
|
+
restoreVersionEvidence: restoreIssueVersionEvidence(issue, model),
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
const finalExecutable = executableTargets.filter((target) => executableKeys.has(targetKey(target)));
|
|
275
|
+
return {
|
|
276
|
+
requestedTargets,
|
|
277
|
+
executableTargets: finalExecutable,
|
|
278
|
+
causes: [...causes.values()].filter((cause) => cause.consumers.some((consumer) => executableKeys.has(targetKey(consumer)))).sort((left, right) => left.causeKey.localeCompare(right.causeKey, 'en')),
|
|
279
|
+
blockedTargets: [...new Map(blockedTargets.map((blocked) => [targetKey(blocked.target), blocked]))
|
|
280
|
+
.values()].sort((left, right) => targetKey(left.target).localeCompare(targetKey(right.target), 'en')),
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
export function pluginWriteTaskTargetKey(target) {
|
|
284
|
+
return targetKey(target);
|
|
285
|
+
}
|
|
286
|
+
//# sourceMappingURL=plugin-write-task.js.map
|