@lesliechan721/aw 0.1.0-beta.10 → 0.1.0-beta.100
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.d.mts +1 -50
- package/dist/authoring/assets/aw-config.mjs +58 -928
- 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/assets/command-runtime-config.d.mts +9 -0
- package/dist/authoring/assets/command-runtime-config.mjs +134 -0
- package/dist/authoring/assets/command-runtime-config.mjs.map +1 -0
- package/dist/authoring/scripts/add-skill.mjs +16 -39
- package/dist/authoring/scripts/add-skill.mjs.map +1 -1
- package/dist/authoring/scripts/init-plugin.mjs +43 -71
- 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 +3 -3
- package/dist/authoring/scripts/lib/skill-scaffold.mjs +5 -8
- package/dist/authoring/scripts/lib/skill-scaffold.mjs.map +1 -1
- package/dist/authoring/scripts/remove-plugin.mjs +1 -1
- package/dist/authoring/scripts/remove-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/validate-plugin.mjs +408 -1748
- package/dist/authoring/scripts/validate-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/validate-skill.mjs +1 -1
- package/dist/index.js +2 -6
- package/dist/index.js.map +1 -1
- package/dist/native-runtime/reader-runtime.mjs +34 -0
- package/dist/native-runtime/reader.d.mts +6 -0
- package/dist/native-runtime/reader.mjs +11 -0
- package/dist/scripts/aw-skill-eval-materializer.d.ts +11 -1
- package/dist/scripts/aw-skill-eval-materializer.js +119 -114
- package/dist/scripts/aw-skill-eval-materializer.js.map +1 -1
- package/dist/scripts/bundle-plugins.js +32 -7
- package/dist/scripts/bundle-plugins.js.map +1 -1
- package/dist/scripts/plugin-staging.d.ts +1 -1
- package/dist/scripts/plugin-staging.js +5 -2
- package/dist/scripts/plugin-staging.js.map +1 -1
- package/dist/scripts/plugin-test-context-guard.d.mts +1 -0
- package/dist/scripts/plugin-test-context-guard.mjs +59 -0
- package/dist/scripts/plugin-test-context-guard.mjs.map +1 -0
- 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 +343 -58
- 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 +3 -0
- 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 +1 -1
- package/dist/src/commands/aw-capabilities.js +48 -19
- package/dist/src/commands/aw-capabilities.js.map +1 -1
- package/dist/src/commands/catalog-dev-source.d.ts +40 -3
- package/dist/src/commands/catalog-dev-source.js +333 -42
- package/dist/src/commands/catalog-dev-source.js.map +1 -1
- package/dist/src/commands/catalog-generation.d.ts +5 -0
- package/dist/src/commands/catalog-generation.js.map +1 -1
- package/dist/src/commands/catalog-publication-inspection.d.ts +11 -3
- package/dist/src/commands/catalog-publication-inspection.js +211 -59
- package/dist/src/commands/catalog-publication-inspection.js.map +1 -1
- package/dist/src/commands/catalog-publication-journal.d.ts +12 -0
- package/dist/src/commands/catalog-publication-journal.js +78 -1
- package/dist/src/commands/catalog-publication-journal.js.map +1 -1
- package/dist/src/commands/catalog-publish.d.ts +21 -1
- package/dist/src/commands/catalog-publish.js +133 -92
- package/dist/src/commands/catalog-publish.js.map +1 -1
- package/dist/src/commands/catalog-source.d.ts +25 -5
- package/dist/src/commands/catalog-source.js +153 -27
- package/dist/src/commands/catalog-source.js.map +1 -1
- package/dist/src/commands/catalog-status.js +2 -2
- package/dist/src/commands/catalog-status.js.map +1 -1
- package/dist/src/commands/catalog-store.d.ts +31 -7
- package/dist/src/commands/catalog-store.js +379 -42
- package/dist/src/commands/catalog-store.js.map +1 -1
- package/dist/src/commands/catalog-workspace-resolution.d.ts +4 -0
- package/dist/src/commands/catalog-workspace-resolution.js +18 -3
- package/dist/src/commands/catalog-workspace-resolution.js.map +1 -1
- package/dist/src/commands/console.js +33 -20
- package/dist/src/commands/console.js.map +1 -1
- package/dist/src/commands/dependency-operation-plan.d.ts +7 -0
- package/dist/src/commands/dependency-operation-plan.js +66 -30
- package/dist/src/commands/dependency-operation-plan.js.map +1 -1
- package/dist/src/commands/deployment-confirmation.d.ts +11 -0
- package/dist/src/commands/deployment-confirmation.js +101 -0
- package/dist/src/commands/deployment-confirmation.js.map +1 -0
- package/dist/src/commands/init.js +1 -1
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/intent-command.d.ts +34 -0
- package/dist/src/commands/intent-command.js +174 -0
- package/dist/src/commands/intent-command.js.map +1 -0
- package/dist/src/commands/lifecycle-command-package.d.ts +45 -0
- package/dist/src/commands/lifecycle-command-package.js +199 -0
- package/dist/src/commands/lifecycle-command-package.js.map +1 -0
- package/dist/src/commands/managed-commands.d.ts +41 -0
- package/dist/src/commands/managed-commands.js +404 -0
- package/dist/src/commands/managed-commands.js.map +1 -0
- package/dist/src/commands/offline-cleanup-evidence.d.ts +12 -2
- package/dist/src/commands/offline-cleanup-evidence.js +57 -35
- package/dist/src/commands/offline-cleanup-evidence.js.map +1 -1
- package/dist/src/commands/operation-plan.d.ts +72 -2
- package/dist/src/commands/operation-plan.js +54 -3
- package/dist/src/commands/operation-plan.js.map +1 -1
- package/dist/src/commands/operation-planner.d.ts +6 -5
- package/dist/src/commands/operation-planner.js +23 -20
- package/dist/src/commands/operation-planner.js.map +1 -1
- package/dist/src/commands/options.d.ts +11 -16
- package/dist/src/commands/options.js +31 -25
- package/dist/src/commands/options.js.map +1 -1
- package/dist/src/commands/permission-batch.d.ts +5 -0
- package/dist/src/commands/permission-batch.js +83 -0
- package/dist/src/commands/permission-batch.js.map +1 -0
- package/dist/src/commands/plugin-capabilities.js +128 -58
- package/dist/src/commands/plugin-capabilities.js.map +1 -1
- package/dist/src/commands/public-config-confirmation.d.ts +14 -0
- package/dist/src/commands/public-config-confirmation.js +73 -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 +106 -0
- package/dist/src/commands/public-lifecycle-result.js +536 -0
- package/dist/src/commands/public-lifecycle-result.js.map +1 -0
- package/dist/src/commands/public-lifecycle.d.ts +27 -0
- package/dist/src/commands/public-lifecycle.js +569 -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 +231 -0
- package/dist/src/commands/public-plugin-query.js.map +1 -0
- package/dist/src/commands/rebuild-command.d.ts +177 -16
- package/dist/src/commands/rebuild-command.js +3370 -1559
- package/dist/src/commands/rebuild-command.js.map +1 -1
- package/dist/src/commands/rebuild-integration.d.ts +100 -55
- package/dist/src/commands/rebuild-integration.js +866 -3275
- package/dist/src/commands/rebuild-integration.js.map +1 -1
- package/dist/src/commands/rebuild-operations.d.ts +68 -13
- package/dist/src/commands/rebuild-operations.js +309 -120
- package/dist/src/commands/rebuild-operations.js.map +1 -1
- package/dist/src/commands/rebuild-platform-integration.d.ts +99 -0
- package/dist/src/commands/rebuild-platform-integration.js +2329 -0
- package/dist/src/commands/rebuild-platform-integration.js.map +1 -0
- package/dist/src/commands/reconcile-operation-plan.d.ts +14 -9
- package/dist/src/commands/reconcile-operation-plan.js +26 -6
- package/dist/src/commands/reconcile-operation-plan.js.map +1 -1
- package/dist/src/commands/review-inspection.d.ts +60 -0
- package/dist/src/commands/review-inspection.js +437 -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 +5 -1
- package/dist/src/commands/runtime.js +41 -8
- package/dist/src/commands/runtime.js.map +1 -1
- package/dist/src/commands/skill-eval.d.ts +8 -0
- package/dist/src/commands/skill-eval.js +126 -73
- package/dist/src/commands/skill-eval.js.map +1 -1
- package/dist/src/commands/status-v6.d.ts +148 -35
- package/dist/src/commands/status-v6.js +1166 -307
- package/dist/src/commands/status-v6.js.map +1 -1
- 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 +7 -3
- 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 +7 -1
- package/dist/src/commands/write-commands.js +129 -38
- package/dist/src/commands/write-commands.js.map +1 -1
- package/dist/src/constants.d.ts +2 -3
- package/dist/src/constants.js +2 -3
- package/dist/src/constants.js.map +1 -1
- package/dist/src/eval/manifest-v1.d.ts +6 -3
- package/dist/src/eval/manifest-v1.js +44 -33
- package/dist/src/eval/manifest-v1.js.map +1 -1
- package/dist/src/generators/local-plugin.d.ts +4 -2
- package/dist/src/generators/local-plugin.js +319 -353
- package/dist/src/generators/local-plugin.js.map +1 -1
- package/dist/src/generators/permissions.d.ts +20 -2
- package/dist/src/generators/permissions.js +82 -15
- package/dist/src/generators/permissions.js.map +1 -1
- package/dist/src/index.d.ts +2 -33
- package/dist/src/index.js +1575 -1919
- 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 +35 -0
- package/dist/src/intent/scope-context.js +179 -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 +6 -2
- package/dist/src/output/command-receipt.js +67 -32
- package/dist/src/output/command-receipt.js.map +1 -1
- package/dist/src/output/component-delivery.d.ts +28 -0
- package/dist/src/output/component-delivery.js +141 -0
- package/dist/src/output/component-delivery.js.map +1 -0
- package/dist/src/output/public-result.d.ts +69 -0
- package/dist/src/output/public-result.js +403 -0
- package/dist/src/output/public-result.js.map +1 -0
- package/dist/src/output/rebuild-progress.d.ts +3 -0
- package/dist/src/output/rebuild-progress.js +34 -9
- 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 +664 -0
- package/dist/src/output/receipt-projection.js.map +1 -0
- package/dist/src/output/skill-invocation-notices.d.ts +18 -0
- package/dist/src/output/skill-invocation-notices.js +84 -0
- package/dist/src/output/skill-invocation-notices.js.map +1 -0
- package/dist/src/platforms/antigravity-permissions.d.ts +50 -0
- package/dist/src/platforms/antigravity-permissions.js +388 -0
- package/dist/src/platforms/antigravity-permissions.js.map +1 -0
- package/dist/src/platforms/capabilities.d.ts +9 -0
- package/dist/src/platforms/capabilities.js +125 -0
- package/dist/src/platforms/capabilities.js.map +1 -0
- package/dist/src/platforms/contracts.d.ts +394 -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 +100 -0
- package/dist/src/platforms/discovery.js +779 -0
- package/dist/src/platforms/discovery.js.map +1 -0
- package/dist/src/platforms/grok-permission-config.d.ts +23 -0
- package/dist/src/platforms/grok-permission-config.js +184 -0
- package/dist/src/platforms/grok-permission-config.js.map +1 -0
- package/dist/src/platforms/grok-permission-document.d.ts +4 -0
- package/dist/src/platforms/grok-permission-document.js +145 -0
- package/dist/src/platforms/grok-permission-document.js.map +1 -0
- package/dist/src/platforms/grok-permissions.d.ts +17 -0
- package/dist/src/platforms/grok-permissions.js +311 -0
- package/dist/src/platforms/grok-permissions.js.map +1 -0
- package/dist/src/platforms/host-permission-policy.d.ts +38 -0
- package/dist/src/platforms/host-permission-policy.js +86 -0
- package/dist/src/platforms/host-permission-policy.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 +380 -0
- package/dist/src/platforms/inspection-grok.js.map +1 -0
- package/dist/src/platforms/inspection-native.d.ts +8 -0
- package/dist/src/platforms/inspection-native.js +584 -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 +9 -0
- package/dist/src/platforms/inspection-pi.js +490 -0
- package/dist/src/platforms/inspection-pi.js.map +1 -0
- package/dist/src/platforms/inspection-query.d.ts +26 -0
- package/dist/src/platforms/inspection-query.js +118 -0
- package/dist/src/platforms/inspection-query.js.map +1 -0
- package/dist/src/platforms/inspection.d.ts +20 -0
- package/dist/src/platforms/inspection.js +259 -0
- package/dist/src/platforms/inspection.js.map +1 -0
- package/dist/src/platforms/layout.d.ts +35 -0
- package/dist/src/platforms/layout.js +332 -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 +213 -0
- package/dist/src/platforms/lifecycle-native-services.js.map +1 -0
- package/dist/src/platforms/lifecycle-native.d.ts +14 -0
- package/dist/src/platforms/lifecycle-native.js +234 -0
- package/dist/src/platforms/lifecycle-native.js.map +1 -0
- package/dist/src/platforms/lifecycle.d.ts +29 -0
- package/dist/src/platforms/lifecycle.js +688 -0
- package/dist/src/platforms/lifecycle.js.map +1 -0
- package/dist/src/platforms/opencode-permission-config.d.ts +13 -0
- package/dist/src/platforms/opencode-permission-config.js +253 -0
- package/dist/src/platforms/opencode-permission-config.js.map +1 -0
- package/dist/src/platforms/opencode-permissions.d.ts +39 -0
- package/dist/src/platforms/opencode-permissions.js +212 -0
- package/dist/src/platforms/opencode-permissions.js.map +1 -0
- package/dist/src/platforms/opencode-related-permissions.d.ts +40 -0
- package/dist/src/platforms/opencode-related-permissions.js +177 -0
- package/dist/src/platforms/opencode-related-permissions.js.map +1 -0
- package/dist/src/platforms/permission-ownership.d.ts +89 -0
- package/dist/src/platforms/permission-ownership.js +543 -0
- package/dist/src/platforms/permission-ownership.js.map +1 -0
- package/dist/src/platforms/permission-sidecar.d.ts +70 -0
- package/dist/src/platforms/permission-sidecar.js +215 -0
- package/dist/src/platforms/permission-sidecar.js.map +1 -0
- package/dist/src/platforms/projection-code-extension.d.ts +8 -0
- package/dist/src/platforms/projection-code-extension.js +126 -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 +28 -0
- package/dist/src/platforms/projection-files.js +113 -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 +13 -0
- package/dist/src/platforms/projection.js +578 -0
- package/dist/src/platforms/projection.js.map +1 -0
- package/dist/src/platforms/read-only-retry-policy.d.ts +34 -0
- package/dist/src/platforms/read-only-retry-policy.js +70 -0
- package/dist/src/platforms/read-only-retry-policy.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/retirement-native.d.ts +6 -0
- package/dist/src/platforms/retirement-native.js +95 -0
- package/dist/src/platforms/retirement-native.js.map +1 -0
- package/dist/src/platforms/supplement-layout.d.ts +20 -0
- package/dist/src/platforms/supplement-layout.js +54 -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 +93 -0
- package/dist/src/platforms/supplement-state.js.map +1 -0
- package/dist/src/portable/commands.d.ts +60 -11
- package/dist/src/portable/commands.js +88 -346
- package/dist/src/portable/commands.js.map +1 -1
- package/dist/src/portable/historical-materialization.d.ts +25 -0
- package/dist/src/portable/historical-materialization.js +148 -0
- package/dist/src/portable/historical-materialization.js.map +1 -0
- package/dist/src/portable/materializer.d.ts +46 -2
- package/dist/src/portable/materializer.js +262 -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 +177 -0
- package/dist/src/portable/recovery.js +597 -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 +175 -0
- package/dist/src/recovery/coordinator.js +1624 -0
- package/dist/src/recovery/coordinator.js.map +1 -0
- package/dist/src/recovery/demand.d.ts +53 -0
- package/dist/src/recovery/demand.js +189 -0
- package/dist/src/recovery/demand.js.map +1 -0
- package/dist/src/recovery/install-concurrency.d.ts +48 -0
- package/dist/src/recovery/install-concurrency.js +196 -0
- package/dist/src/recovery/install-concurrency.js.map +1 -0
- package/dist/src/recovery/interruption.d.ts +19 -0
- package/dist/src/recovery/interruption.js +43 -0
- package/dist/src/recovery/interruption.js.map +1 -0
- package/dist/src/recovery/joint-coordinator.d.ts +46 -0
- package/dist/src/recovery/joint-coordinator.js +1723 -0
- package/dist/src/recovery/joint-coordinator.js.map +1 -0
- package/dist/src/recovery/joint-demand.d.ts +72 -0
- package/dist/src/recovery/joint-demand.js +332 -0
- package/dist/src/recovery/joint-demand.js.map +1 -0
- package/dist/src/recovery/joint-install-execution.d.ts +19 -0
- package/dist/src/recovery/joint-install-execution.js +308 -0
- package/dist/src/recovery/joint-install-execution.js.map +1 -0
- package/dist/src/recovery/joint-install-native-rebase.d.ts +4 -0
- package/dist/src/recovery/joint-install-native-rebase.js +67 -0
- package/dist/src/recovery/joint-install-native-rebase.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 +131 -0
- package/dist/src/recovery/receipt.js +91 -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 +499 -0
- package/dist/src/recovery/retirement.js.map +1 -0
- package/dist/src/recovery/status.d.ts +143 -0
- package/dist/src/recovery/status.js +1528 -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 +44 -0
- package/dist/src/review/eval-source-input.js +213 -0
- package/dist/src/review/eval-source-input.js.map +1 -0
- package/dist/src/review/platform-profile.d.ts +5 -0
- package/dist/src/review/platform-profile.js +13 -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 +286 -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 +502 -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 +67 -0
- package/dist/src/review/skill-materialization.js +235 -0
- package/dist/src/review/skill-materialization.js.map +1 -0
- package/dist/src/review/source-binding.d.ts +203 -0
- package/dist/src/review/source-binding.js +791 -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-generation.d.ts +9 -0
- package/dist/src/tui/catalog-generation.js +96 -6
- package/dist/src/tui/catalog-generation.js.map +1 -1
- package/dist/src/tui/catalog-sources/projection.d.ts +2 -2
- package/dist/src/tui/catalog-sources/screens.js +19 -12
- package/dist/src/tui/catalog-sources/screens.js.map +1 -1
- package/dist/src/tui/catalog-sources/session.d.ts +11 -1
- package/dist/src/tui/catalog-sources/session.js +80 -5
- package/dist/src/tui/catalog-sources/session.js.map +1 -1
- package/dist/src/tui/catalog-sources/types.d.ts +15 -2
- 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 -34
- package/dist/src/tui/components.js.map +1 -1
- package/dist/src/tui/config-array-draft.d.ts +30 -0
- package/dist/src/tui/config-array-draft.js +51 -0
- package/dist/src/tui/config-array-draft.js.map +1 -0
- package/dist/src/tui/config-leaf-editor.d.ts +44 -0
- package/dist/src/tui/config-leaf-editor.js +227 -0
- package/dist/src/tui/config-leaf-editor.js.map +1 -0
- package/dist/src/tui/config-object-suggestions.d.ts +15 -0
- package/dist/src/tui/config-object-suggestions.js +71 -0
- package/dist/src/tui/config-object-suggestions.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-suggestions.d.ts +27 -0
- package/dist/src/tui/config-suggestions.js +62 -0
- package/dist/src/tui/config-suggestions.js.map +1 -0
- package/dist/src/tui/config-value-presentation.d.ts +23 -0
- package/dist/src/tui/config-value-presentation.js +151 -0
- package/dist/src/tui/config-value-presentation.js.map +1 -0
- package/dist/src/tui/console-app-v4.d.ts +14 -5
- package/dist/src/tui/console-app-v4.js +9779 -2488
- 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 +4 -3
- package/dist/src/tui/controller-runtime.js +1610 -590
- package/dist/src/tui/controller-runtime.js.map +1 -1
- package/dist/src/tui/controller.d.ts +583 -80
- package/dist/src/tui/controller.js +3362 -263
- 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 +14 -0
- package/dist/src/tui/deployment-view.js +175 -0
- package/dist/src/tui/deployment-view.js.map +1 -0
- package/dist/src/tui/diagnostic-projection.d.ts +31 -0
- package/dist/src/tui/diagnostic-projection.js +681 -0
- package/dist/src/tui/diagnostic-projection.js.map +1 -0
- package/dist/src/tui/diagnostics.d.ts +6 -2
- 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 +56 -0
- package/dist/src/tui/entity-cards.js +327 -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 +78 -0
- package/dist/src/tui/glossary.js.map +1 -0
- package/dist/src/tui/guided-setup.d.ts +25 -0
- package/dist/src/tui/guided-setup.js +101 -0
- package/dist/src/tui/guided-setup.js.map +1 -0
- package/dist/src/tui/index.d.ts +4 -1
- package/dist/src/tui/index.js +4 -1
- 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 +141 -28
- package/dist/src/tui/model.js +968 -285
- 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 +76 -0
- package/dist/src/tui/operation-diagnostic-screens.js.map +1 -0
- package/dist/src/tui/operation-history.d.ts +91 -0
- package/dist/src/tui/operation-history.js +167 -0
- package/dist/src/tui/operation-history.js.map +1 -0
- package/dist/src/tui/operation-review-planner.d.ts +7 -0
- package/dist/src/tui/operation-review-planner.js +980 -146
- package/dist/src/tui/operation-review-planner.js.map +1 -1
- 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 +75 -0
- package/dist/src/tui/plugin-detail.js +267 -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/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 +170 -39
- 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 +49 -0
- package/dist/src/tui/scoped-flow.js +212 -0
- package/dist/src/tui/scoped-flow.js.map +1 -0
- package/dist/src/tui/scoped-inventory.d.ts +139 -0
- package/dist/src/tui/scoped-inventory.js +295 -0
- package/dist/src/tui/scoped-inventory.js.map +1 -0
- package/dist/src/tui/screen-registry.d.ts +696 -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 +8 -0
- package/dist/src/tui/session-console-app.js +24 -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 +26 -4
- package/dist/src/tui/wizard.js.map +1 -1
- package/dist/src/types.d.ts +105 -83
- package/dist/src/types.js +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils/agent-version.d.ts +10 -4
- package/dist/src/utils/agent-version.js +6 -8
- package/dist/src/utils/agent-version.js.map +1 -1
- package/dist/src/utils/artifact-plan.d.ts +18 -25
- package/dist/src/utils/artifact-plan.js +59 -445
- package/dist/src/utils/artifact-plan.js.map +1 -1
- package/dist/src/utils/artifact-renderer.d.ts +64 -90
- package/dist/src/utils/artifact-renderer.js +202 -303
- package/dist/src/utils/artifact-renderer.js.map +1 -1
- package/dist/src/utils/artifact-request.d.ts +19 -14
- package/dist/src/utils/artifact-request.js +51 -36
- package/dist/src/utils/artifact-request.js.map +1 -1
- package/dist/src/utils/artifact-sources.d.ts +4 -8
- package/dist/src/utils/artifact-sources.js +15 -6
- package/dist/src/utils/artifact-sources.js.map +1 -1
- package/dist/src/utils/aw-home-mutation-lock.js +2 -1
- package/dist/src/utils/aw-home-mutation-lock.js.map +1 -1
- package/dist/src/utils/bundle-layout.d.ts +2 -0
- package/dist/src/utils/bundle-layout.js +88 -158
- 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 -12
- package/dist/src/utils/catalog-digests.js +7 -55
- package/dist/src/utils/catalog-digests.js.map +1 -1
- package/dist/src/utils/catalog-generation-resolver.d.ts +28 -4
- package/dist/src/utils/catalog-generation-resolver.js +146 -40
- package/dist/src/utils/catalog-generation-resolver.js.map +1 -1
- package/dist/src/utils/catalog-generation-service.d.ts +24 -2
- package/dist/src/utils/catalog-generation-service.js +92 -48
- package/dist/src/utils/catalog-generation-service.js.map +1 -1
- package/dist/src/utils/catalog-generation-state.js +1 -1
- package/dist/src/utils/catalog-generation-state.js.map +1 -1
- package/dist/src/utils/catalog-generation-store.d.ts +4 -0
- package/dist/src/utils/catalog-generation-store.js +68 -10
- package/dist/src/utils/catalog-generation-store.js.map +1 -1
- package/dist/src/utils/catalog-operation-context.d.ts +61 -4
- package/dist/src/utils/catalog-operation-context.js +225 -4
- package/dist/src/utils/catalog-operation-context.js.map +1 -1
- package/dist/src/utils/catalog-public-error.js +4 -0
- package/dist/src/utils/catalog-public-error.js.map +1 -1
- package/dist/src/utils/catalog-runtime-projection.d.ts +4 -3
- package/dist/src/utils/catalog-runtime-projection.js.map +1 -1
- package/dist/src/utils/catalog-snapshot.d.ts +3 -0
- package/dist/src/utils/catalog-snapshot.js +4 -1
- package/dist/src/utils/catalog-snapshot.js.map +1 -1
- package/dist/src/utils/catalog-source-impact.d.ts +3 -2
- package/dist/src/utils/catalog-source-impact.js +142 -20
- package/dist/src/utils/catalog-source-impact.js.map +1 -1
- package/dist/src/utils/catalog-source-references.d.ts +57 -1
- package/dist/src/utils/catalog-source-references.js +755 -162
- package/dist/src/utils/catalog-source-references.js.map +1 -1
- package/dist/src/utils/catalog-sources.d.ts +1 -1
- package/dist/src/utils/catalog-sources.js +21 -5
- package/dist/src/utils/catalog-sources.js.map +1 -1
- package/dist/src/utils/codex-config.d.ts +3 -0
- package/dist/src/utils/codex-config.js +7 -0
- 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 +23 -42
- package/dist/src/utils/codex-manager.js +79 -767
- package/dist/src/utils/codex-manager.js.map +1 -1
- package/dist/src/utils/codex-native-observation.d.ts +40 -1
- package/dist/src/utils/codex-native-observation.js +172 -0
- package/dist/src/utils/codex-native-observation.js.map +1 -1
- package/dist/src/utils/codex-reconciler.d.ts +2 -7
- package/dist/src/utils/codex-reconciler.js +33 -5
- package/dist/src/utils/codex-reconciler.js.map +1 -1
- package/dist/src/utils/codex-shared-native.d.ts +8 -26
- package/dist/src/utils/codex-shared-native.js +63 -83
- package/dist/src/utils/codex-shared-native.js.map +1 -1
- 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 +29 -0
- package/dist/src/utils/codex-skills-root.js.map +1 -0
- package/dist/src/utils/codex-surface-analysis.d.ts +6 -2
- package/dist/src/utils/codex-surface-analysis.js +31 -56
- package/dist/src/utils/codex-surface-analysis.js.map +1 -1
- package/dist/src/utils/component-agent-binding.d.ts +17 -0
- package/dist/src/utils/component-agent-binding.js +119 -0
- package/dist/src/utils/component-agent-binding.js.map +1 -0
- package/dist/src/utils/component-command-preparation.d.ts +33 -0
- package/dist/src/utils/component-command-preparation.js +129 -0
- package/dist/src/utils/component-command-preparation.js.map +1 -0
- package/dist/src/utils/component-gap.d.ts +4 -0
- package/dist/src/utils/component-gap.js +16 -0
- package/dist/src/utils/component-gap.js.map +1 -0
- package/dist/src/utils/component-resources.d.ts +53 -0
- package/dist/src/utils/component-resources.js +340 -0
- package/dist/src/utils/component-resources.js.map +1 -0
- package/dist/src/utils/config-platforms.d.ts +21 -0
- package/dist/src/utils/config-platforms.js +51 -0
- package/dist/src/utils/config-platforms.js.map +1 -0
- package/dist/src/utils/dynamic-skill-tree.d.ts +18 -6
- package/dist/src/utils/dynamic-skill-tree.js +33 -40
- package/dist/src/utils/dynamic-skill-tree.js.map +1 -1
- package/dist/src/utils/git-catalog-provider.d.ts +3 -0
- package/dist/src/utils/git-catalog-provider.js +49 -3
- 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 +19 -12
- package/dist/src/utils/local-marketplace.js +97 -194
- package/dist/src/utils/local-marketplace.js.map +1 -1
- package/dist/src/utils/managed-command-cli-review.d.ts +53 -0
- package/dist/src/utils/managed-command-cli-review.js +431 -0
- package/dist/src/utils/managed-command-cli-review.js.map +1 -0
- package/dist/src/utils/managed-command-closure.d.ts +14 -0
- package/dist/src/utils/managed-command-closure.js +156 -0
- package/dist/src/utils/managed-command-closure.js.map +1 -0
- package/dist/src/utils/managed-command-errors.d.ts +5 -0
- package/dist/src/utils/managed-command-errors.js +10 -0
- package/dist/src/utils/managed-command-errors.js.map +1 -0
- package/dist/src/utils/managed-command-materialization.d.ts +90 -0
- package/dist/src/utils/managed-command-materialization.js +375 -0
- package/dist/src/utils/managed-command-materialization.js.map +1 -0
- package/dist/src/utils/managed-command-preparation.d.ts +30 -0
- package/dist/src/utils/managed-command-preparation.js +39 -0
- package/dist/src/utils/managed-command-preparation.js.map +1 -0
- package/dist/src/utils/managed-command-review.d.ts +33 -0
- package/dist/src/utils/managed-command-review.js +80 -0
- package/dist/src/utils/managed-command-review.js.map +1 -0
- package/dist/src/utils/managed-command-runtime.d.ts +36 -0
- package/dist/src/utils/managed-command-runtime.js +126 -0
- package/dist/src/utils/managed-command-runtime.js.map +1 -0
- package/dist/src/utils/managed-command-snapshots.d.ts +24 -0
- package/dist/src/utils/managed-command-snapshots.js +89 -0
- package/dist/src/utils/managed-command-snapshots.js.map +1 -0
- package/dist/src/utils/managed-command-store.d.ts +141 -0
- package/dist/src/utils/managed-command-store.js +839 -0
- package/dist/src/utils/managed-command-store.js.map +1 -0
- package/dist/src/utils/multi-source-catalog.d.ts +6 -1
- package/dist/src/utils/multi-source-catalog.js +9 -4
- package/dist/src/utils/multi-source-catalog.js.map +1 -1
- package/dist/src/utils/native-cli-interruption.d.ts +8 -0
- package/dist/src/utils/native-cli-interruption.js +65 -0
- package/dist/src/utils/native-cli-interruption.js.map +1 -0
- package/dist/src/utils/native-cli.d.ts +37 -6
- package/dist/src/utils/native-cli.js +523 -60
- 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 +17 -0
- package/dist/src/utils/native-tool-context.js +40 -0
- package/dist/src/utils/native-tool-context.js.map +1 -0
- package/dist/src/utils/native-tool-review.d.ts +8 -0
- package/dist/src/utils/native-tool-review.js +14 -0
- package/dist/src/utils/native-tool-review.js.map +1 -0
- package/dist/src/utils/ownership.d.ts +38 -3
- package/dist/src/utils/ownership.js +118 -11
- package/dist/src/utils/ownership.js.map +1 -1
- package/dist/src/utils/package-content.d.ts +7 -0
- package/dist/src/utils/package-content.js +70 -0
- package/dist/src/utils/package-content.js.map +1 -0
- package/dist/src/utils/path-catalog-provider.js +2 -0
- package/dist/src/utils/path-catalog-provider.js.map +1 -1
- package/dist/src/utils/paths.d.ts +1 -1
- package/dist/src/utils/paths.js +5 -2
- package/dist/src/utils/paths.js.map +1 -1
- package/dist/src/utils/platform-empty-state.d.ts +69 -0
- package/dist/src/utils/platform-empty-state.js +249 -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-command-apply.d.ts +33 -0
- package/dist/src/utils/plugin-config-command-apply.js +142 -0
- package/dist/src/utils/plugin-config-command-apply.js.map +1 -0
- package/dist/src/utils/plugin-config-diagnostics.d.ts +16 -0
- package/dist/src/utils/plugin-config-diagnostics.js +44 -0
- package/dist/src/utils/plugin-config-diagnostics.js.map +1 -0
- package/dist/src/utils/plugin-config-impact.d.ts +76 -0
- package/dist/src/utils/plugin-config-impact.js +359 -0
- package/dist/src/utils/plugin-config-impact.js.map +1 -0
- package/dist/src/utils/plugin-config-references.d.ts +116 -0
- package/dist/src/utils/plugin-config-references.js +379 -0
- package/dist/src/utils/plugin-config-references.js.map +1 -0
- package/dist/src/utils/plugin-config-suggestion-runner.d.ts +83 -0
- package/dist/src/utils/plugin-config-suggestion-runner.js +308 -0
- package/dist/src/utils/plugin-config-suggestion-runner.js.map +1 -0
- package/dist/src/utils/plugin-config-suggestions.d.ts +50 -0
- package/dist/src/utils/plugin-config-suggestions.js +322 -0
- package/dist/src/utils/plugin-config-suggestions.js.map +1 -0
- package/dist/src/utils/plugin-config-write.d.ts +108 -19
- package/dist/src/utils/plugin-config-write.js +781 -568
- package/dist/src/utils/plugin-config-write.js.map +1 -1
- package/dist/src/utils/plugin-config.d.ts +122 -43
- package/dist/src/utils/plugin-config.js +574 -610
- 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 +41 -17
- package/dist/src/utils/plugin-scripts.js +586 -123
- 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 -1
- package/dist/src/utils/project-boundary.js +33 -11
- package/dist/src/utils/project-boundary.js.map +1 -1
- package/dist/src/utils/rendered-contract.js +24 -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 +50 -7
- package/dist/src/utils/runtime-skill-closure.js.map +1 -1
- 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/skill-invocation-warning.d.ts +19 -0
- package/dist/src/utils/skill-invocation-warning.js +43 -0
- package/dist/src/utils/skill-invocation-warning.js.map +1 -0
- package/dist/src/utils/skill-validation.js +0 -5
- package/dist/src/utils/skill-validation.js.map +1 -1
- 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 +2 -2
- 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 +109 -9
- package/dist/vitest.config.js.map +1 -1
- package/package.json +20 -12
- package/dist/authoring/templates/aw-config-runtime.d.mts +0 -2
- package/dist/authoring/templates/aw-config-runtime.mjs +0 -407
- package/dist/authoring/templates/aw-config-runtime.mjs.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/sync-command.d.ts +0 -23
- package/dist/src/commands/sync-command.js +0 -242
- package/dist/src/commands/sync-command.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/codex-native-render-receipt.d.ts +0 -40
- package/dist/src/utils/codex-native-render-receipt.js +0 -205
- package/dist/src/utils/codex-native-render-receipt.js.map +0 -1
- package/dist/src/utils/plugin-intent-state.d.ts +0 -34
- package/dist/src/utils/plugin-intent-state.js +0 -289
- package/dist/src/utils/plugin-intent-state.js.map +0 -1
- package/dist/src/utils/slash-commands.d.ts +0 -1
- package/dist/src/utils/slash-commands.js +0 -2
- package/dist/src/utils/slash-commands.js.map +0 -1
|
@@ -1,28 +1,71 @@
|
|
|
1
|
+
import { isCanonicalCodexMarketplaceRegistration } from '../utils/codex-shared-native.js';
|
|
2
|
+
import { selectAgents } from '../intent/deployment-preferences.js';
|
|
3
|
+
import { resolveActiveConfigPlatforms } from '../utils/config-platforms.js';
|
|
4
|
+
import { configStatusDiagnostics } from '../utils/plugin-config-diagnostics.js';
|
|
5
|
+
import { createScopeContext } from '../intent/scope-context.js';
|
|
6
|
+
import { inspectPortableExtraInstalled } from '../portable/recovery.js';
|
|
7
|
+
import { readDemand, demandNativeProjection } from '../recovery/demand.js';
|
|
8
|
+
import { deriveJointDemand } from '../recovery/joint-demand.js';
|
|
1
9
|
import fs from 'node:fs';
|
|
2
10
|
import path from 'node:path';
|
|
3
11
|
import { analyzeCodexSurface } from '../utils/codex-surface-analysis.js';
|
|
4
12
|
import { catalogSourceErrorCode, sanitizeCatalogSourceError, } from '../utils/catalog-public-error.js';
|
|
5
13
|
import { calculateCatalogSourceIdentity } from '../utils/catalog-source-identity.js';
|
|
6
|
-
import {
|
|
14
|
+
import { legacyCanonicalMarketplaceRegistrationNames, inventoryCatalogSourceReferences, inventoryLegacyOwnerReferences, } from '../utils/catalog-source-references.js';
|
|
15
|
+
import { readStrictNamespacedMarketplaceRoot } from '../utils/local-marketplace.js';
|
|
7
16
|
import { readCatalogSourcesConfigSnapshot, resolveCatalogSourceRef } from '../utils/catalog-sources.js';
|
|
8
17
|
import { formatPluginId, parsePluginId, planPluginSelectorSourceIds, withResolvedMultiSourceCatalog, } from '../utils/multi-source-catalog.js';
|
|
9
18
|
import { assertStrictSemVer, checkAwCapabilitySupport, compareStrictSemVer, readPluginManifest, tryParseStrictSemVer, } from '../utils/manifest.js';
|
|
10
19
|
import { resolveCliPackageRoot, resolveCodexPaths } from '../utils/paths.js';
|
|
11
|
-
import { supportsPlatform } from '../utils/platform-support.js';
|
|
20
|
+
import { resolveSupportedPlatforms, supportsPlatform } from '../utils/platform-support.js';
|
|
12
21
|
import { parsePlatformValue, parseScopeValue } from './options.js';
|
|
13
22
|
import { inspectCodexPluginRegistrationLive, inspectCodexSharedNativeLive, inspectRebuildTarget, } from './rebuild-integration.js';
|
|
14
23
|
import { createNoopReporter } from '../output/reporter.js';
|
|
15
24
|
import { createNoopDebugLogger } from '../output/debug-log.js';
|
|
16
|
-
import { getDefaultNativeCliRunner } from '../utils/native-cli.js';
|
|
25
|
+
import { bindNativeCliRunnerSignal, getDefaultNativeCliRunner } from '../utils/native-cli.js';
|
|
26
|
+
import { createCodexNativeObservationSession, } from '../utils/codex-native-observation.js';
|
|
17
27
|
import { resolveAwHome } from '../utils/paths.js';
|
|
18
|
-
import { codexProjectConfigAliasesUserHome, createProjectLocationKey, getClaudeHome, getCodexHome,
|
|
28
|
+
import { codexProjectConfigAliasesUserHome, createProjectLocationKey, getClaudeHome, getCodexHome, resolveAwHomeCanonical, resolveRequiredCanonicalRepoRoot, } from '../utils/state-paths.js';
|
|
19
29
|
import { resolveEffectivePluginConfig, resolveProjectArtifactRenderConfig, } from '../utils/plugin-config.js';
|
|
20
30
|
import { readCodexConfigFile } from '../utils/codex-config.js';
|
|
21
|
-
import {
|
|
31
|
+
import { createEmptyNativeDemandView } from '../utils/native-demand.js';
|
|
22
32
|
import { IMPLEMENTED_AW_CAPABILITIES } from './aw-capabilities.js';
|
|
23
33
|
import { createDependencyPlacementPlan } from './dependency-operation-plan.js';
|
|
24
34
|
import { getCodexOperationRequirement } from '../utils/agent-version.js';
|
|
25
|
-
import {
|
|
35
|
+
import { inspectSystemCodex, } from '../utils/codex-manager.js';
|
|
36
|
+
export function statusTargetPlacements(target) {
|
|
37
|
+
if (target.platform === 'claude')
|
|
38
|
+
return [target];
|
|
39
|
+
return target.placements.map((placement) => ({
|
|
40
|
+
pluginName: target.pluginName,
|
|
41
|
+
sourceId: target.sourceId,
|
|
42
|
+
sourceIdentity: target.sourceIdentity,
|
|
43
|
+
pluginId: target.pluginId,
|
|
44
|
+
...(target.version ? { version: target.version } : {}),
|
|
45
|
+
platform: target.platform,
|
|
46
|
+
cwd: target.cwd,
|
|
47
|
+
...placement,
|
|
48
|
+
sharedComponents: target.components.filter((component) => component.kind !== 'systemConsumer' || component.key === `codex:${placement.scope}`),
|
|
49
|
+
sharedReasons: target.reasons.filter((reason) => reason.code.startsWith('codexSharedNative') || reason.code === 'staleCacheObserved'
|
|
50
|
+
|| reason.code === 'codexCandidateExcluded'),
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
export function flattenStatusTargets(targets) {
|
|
54
|
+
return targets.flatMap(statusTargetPlacements);
|
|
55
|
+
}
|
|
56
|
+
/** Existing output evidence is required before config apply can refresh a target. */
|
|
57
|
+
export function statusTargetHasLiveConfigConsumer(target) {
|
|
58
|
+
return target.components.some((component) => component.kind === 'ownership'
|
|
59
|
+
&& component.key !== 'native'
|
|
60
|
+
&& component.key !== target.pluginName
|
|
61
|
+
&& !component.key.startsWith('activation-') && !component.key.startsWith('marketplace-')
|
|
62
|
+
&& ['present', 'partial'].includes(component.state))
|
|
63
|
+
|| (target.platform === 'claude' && target.components.some((component) => component.kind === 'activation'
|
|
64
|
+
&& component.key === target.scope && component.state === 'enabled'))
|
|
65
|
+
|| (target.sharedComponents?.some((component) => component.kind === 'sharedNative' && ['usable', 'replaceable'].includes(component.state)) === true
|
|
66
|
+
&& target.components.some((component) => component.kind === 'activation'
|
|
67
|
+
&& component.key === target.scope && component.state === 'enabled'));
|
|
68
|
+
}
|
|
26
69
|
export function projectStatusSharedNativeReasons(sharedNative, existingReasonCodes = [], desiredEnabled = false) {
|
|
27
70
|
if (!sharedNative)
|
|
28
71
|
return [];
|
|
@@ -46,13 +89,13 @@ export function projectStatusSharedNativeReasons(sharedNative, existingReasonCod
|
|
|
46
89
|
? [blocking('codexSharedNativeCorrupt', `${sharedNative.pluginId} is unreadable.`)]
|
|
47
90
|
: []),
|
|
48
91
|
...(sharedNative.state === 'replaceable' && sharedNative.reason === 'damaged'
|
|
49
|
-
? [warning('codexSharedNativeCorrupt', `${sharedNative.pluginId} is damaged and can be replaced.`)]
|
|
92
|
+
? [warning('codexSharedNativeCorrupt', `${sharedNative.pluginId} shared generated content is missing or damaged and can be replaced.`)]
|
|
50
93
|
: []),
|
|
51
94
|
...(sharedNative.state === 'replaceable' && sharedNative.reason === 'outdated'
|
|
52
95
|
? [warning('codexSharedNativeUpdateRequired', `${sharedNative.pluginId} requires a shared update.`)]
|
|
53
96
|
: []),
|
|
54
97
|
...(sharedNative.state === 'replaceable' && sharedNative.reason === 'renderDrift'
|
|
55
|
-
? [warning('codexSharedNativeRenderDrift', `${sharedNative.pluginId}
|
|
98
|
+
? [warning('codexSharedNativeRenderDrift', `${sharedNative.pluginId} shared generated content does not match the current render inputs and can be replaced.`)]
|
|
56
99
|
: []),
|
|
57
100
|
...(sharedNative.staleCacheObserved
|
|
58
101
|
? [warning('staleCacheObserved', `${sharedNative.pluginId} has non-blocking stale Codex cache residue.`)]
|
|
@@ -63,7 +106,7 @@ export function projectStatusSharedNativeReasons(sharedNative, existingReasonCod
|
|
|
63
106
|
];
|
|
64
107
|
}
|
|
65
108
|
function statusComponent(target, kind, key) {
|
|
66
|
-
return target.components.find((component) => component.kind === kind && (key === undefined || component.key === key));
|
|
109
|
+
return [...target.components, ...(target.sharedComponents ?? [])].find((component) => component.kind === kind && (key === undefined || component.key === key));
|
|
67
110
|
}
|
|
68
111
|
export function statusTargetIntent(target) {
|
|
69
112
|
const metadata = statusComponent(target, 'intent', 'desired')?.metadata;
|
|
@@ -120,7 +163,7 @@ export function statusTargetSharedNative(target) {
|
|
|
120
163
|
export function statusTargetActivation(target) {
|
|
121
164
|
const user = statusComponent(target, 'activation', 'user');
|
|
122
165
|
const project = statusComponent(target, 'activation', 'project');
|
|
123
|
-
const consumer = statusComponent(target, 'systemConsumer'
|
|
166
|
+
const consumer = statusComponent(target, 'systemConsumer');
|
|
124
167
|
if (!user && !project && !consumer)
|
|
125
168
|
return undefined;
|
|
126
169
|
const activation = user ?? project ?? consumer;
|
|
@@ -136,15 +179,19 @@ export function statusTargetActivation(target) {
|
|
|
136
179
|
: consumer.state === 'compatible' && typeof detectedVersion === 'string'
|
|
137
180
|
? { state: 'compatible', detectedVersion, requiredMinVersion }
|
|
138
181
|
: consumer.state === 'incompatible'
|
|
139
|
-
&&
|
|
182
|
+
&& code === 'codexSystemCliUnsupported'
|
|
140
183
|
&& typeof detectedVersion === 'string'
|
|
141
184
|
&& typeof diagnostic === 'string'
|
|
142
185
|
? { state: 'incompatible', code, detectedVersion, diagnostic, requiredMinVersion }
|
|
143
186
|
: consumer.state === 'unresolved'
|
|
144
|
-
&&
|
|
187
|
+
&& code === 'codexSystemCliUnsupported'
|
|
145
188
|
&& typeof diagnostic === 'string'
|
|
146
189
|
? { state: 'unresolved', code, diagnostic, requiredMinVersion }
|
|
147
190
|
: undefined;
|
|
191
|
+
const diagnostics = consumer.metadata?.diagnostics;
|
|
192
|
+
if (systemConsumer && Array.isArray(diagnostics) && diagnostics.length > 0) {
|
|
193
|
+
systemConsumer = { ...systemConsumer, diagnostics: diagnostics.filter((value) => typeof value === 'string') };
|
|
194
|
+
}
|
|
148
195
|
}
|
|
149
196
|
return {
|
|
150
197
|
...(user ? { user: user.state === 'enabled' } : {}),
|
|
@@ -172,12 +219,15 @@ export function statusTargetExtensions(target) {
|
|
|
172
219
|
: [];
|
|
173
220
|
return { state: component.state, kinds };
|
|
174
221
|
}
|
|
222
|
+
function resolveCatalogEntrySupportedPlatforms(policy) {
|
|
223
|
+
return resolveSupportedPlatforms({ marketplace: { policy } });
|
|
224
|
+
}
|
|
175
225
|
let dependencyInspectionHookForTests;
|
|
176
226
|
export function setStatusDependencyInspectionHookForTests(hook) {
|
|
177
227
|
dependencyInspectionHookForTests = hook;
|
|
178
228
|
}
|
|
179
229
|
export async function loadConsoleItemsResult(options = {}, runtime = {}) {
|
|
180
|
-
const result = await
|
|
230
|
+
const result = await statusCommandV8({
|
|
181
231
|
cwd: options.cwd ?? process.cwd(),
|
|
182
232
|
env: runtime.env,
|
|
183
233
|
platform: options.platform,
|
|
@@ -199,7 +249,7 @@ export async function loadConsoleItemsResult(options = {}, runtime = {}) {
|
|
|
199
249
|
...(pluginSummary ? { pluginSummary } : {}),
|
|
200
250
|
targets: [],
|
|
201
251
|
};
|
|
202
|
-
current.targets.push(target);
|
|
252
|
+
current.targets.push(...statusTargetPlacements(target));
|
|
203
253
|
groups.set(target.pluginId, current);
|
|
204
254
|
}
|
|
205
255
|
const allSourcesFailed = result.payload.catalog.sources.length > 0
|
|
@@ -228,7 +278,8 @@ function inventoryErrorMatchesSelection(options) {
|
|
|
228
278
|
if (relevance.global)
|
|
229
279
|
return true;
|
|
230
280
|
if (relevance.projectLocationKey
|
|
231
|
-
&&
|
|
281
|
+
&& (!options.currentProjectLocationKey
|
|
282
|
+
|| relevance.projectLocationKey !== options.currentProjectLocationKey))
|
|
232
283
|
return false;
|
|
233
284
|
if (options.platformExplicit && relevance.platform
|
|
234
285
|
&& !options.platforms.includes(relevance.platform))
|
|
@@ -247,6 +298,7 @@ function finalizeTargetError(error, targetState) {
|
|
|
247
298
|
return {
|
|
248
299
|
...error,
|
|
249
300
|
severity: error.code === 'artifactCollision'
|
|
301
|
+
|| error.code === 'dependencyGraphInvalid'
|
|
250
302
|
|| (targetState === 'error'
|
|
251
303
|
&& error.dependencyPluginId === undefined)
|
|
252
304
|
? 'blocking'
|
|
@@ -266,19 +318,16 @@ function sourceRequestedRef(source, cliVersion) {
|
|
|
266
318
|
}
|
|
267
319
|
function selectedPlatforms(value) {
|
|
268
320
|
const selection = value === undefined ? 'both' : parsePlatformValue(value);
|
|
269
|
-
|
|
321
|
+
if (selection === 'both')
|
|
322
|
+
return ['codex', 'claude'];
|
|
323
|
+
if (selection === 'codex' || selection === 'claude')
|
|
324
|
+
return [selection];
|
|
325
|
+
throw new Error('statusPlatformAdapterRequired: use recovery status for this platform.');
|
|
270
326
|
}
|
|
271
327
|
function selectedScopes(value) {
|
|
272
328
|
return value === undefined ? ['user', 'project'] : [parseScopeValue(value)];
|
|
273
329
|
}
|
|
274
|
-
|
|
275
|
-
return {
|
|
276
|
-
schemaVersion: 2,
|
|
277
|
-
kind: 'aw-plugin-intents',
|
|
278
|
-
roots: [],
|
|
279
|
-
dependencyScopeOverrides: [],
|
|
280
|
-
};
|
|
281
|
-
}
|
|
330
|
+
const emptyIntent = createEmptyNativeDemandView;
|
|
282
331
|
function desiredTargetKey(pluginId, platform) {
|
|
283
332
|
return `${pluginId}\0${platform}`;
|
|
284
333
|
}
|
|
@@ -370,7 +419,7 @@ function calculateDesiredTargetStates(options) {
|
|
|
370
419
|
nodes,
|
|
371
420
|
roots,
|
|
372
421
|
dependencyEdges: edges,
|
|
373
|
-
scopeOverrides: intent.dependencyScopeOverrides.filter((override) => nodeIds.has(override.pluginId)
|
|
422
|
+
scopeOverrides: (intent.dependencyScopeOverrides ?? []).filter((override) => nodeIds.has(override.pluginId)
|
|
374
423
|
&& (override.platform === undefined || override.platform === platform)),
|
|
375
424
|
});
|
|
376
425
|
for (const target of plan.targets) {
|
|
@@ -383,10 +432,46 @@ function calculateDesiredTargetStates(options) {
|
|
|
383
432
|
relation: value.relation,
|
|
384
433
|
}]));
|
|
385
434
|
}
|
|
386
|
-
function
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
435
|
+
function projectDependencyClosureForTarget(options) {
|
|
436
|
+
const platform = options.platform;
|
|
437
|
+
if (platform !== 'codex' && platform !== 'claude')
|
|
438
|
+
return new Set();
|
|
439
|
+
const byId = new Map(options.available.map((entry) => [
|
|
440
|
+
formatPluginId({ sourceId: entry.source.id, pluginName: entry.name }),
|
|
441
|
+
entry,
|
|
442
|
+
]));
|
|
443
|
+
const closure = new Set();
|
|
444
|
+
const visit = (pluginId) => {
|
|
445
|
+
const entry = byId.get(pluginId);
|
|
446
|
+
if (!entry)
|
|
447
|
+
return;
|
|
448
|
+
for (const dependency of entry.dependencies) {
|
|
449
|
+
const dependencyId = formatPluginId({
|
|
450
|
+
sourceId: entry.source.id,
|
|
451
|
+
pluginName: dependency,
|
|
452
|
+
});
|
|
453
|
+
const dependencyEntry = byId.get(dependencyId);
|
|
454
|
+
if (!dependencyEntry
|
|
455
|
+
|| (!dependencyEntry.targets[platform].user
|
|
456
|
+
&& !dependencyEntry.targets[platform].project)
|
|
457
|
+
|| closure.has(dependencyId)) {
|
|
458
|
+
continue;
|
|
459
|
+
}
|
|
460
|
+
closure.add(dependencyId);
|
|
461
|
+
visit(dependencyId);
|
|
462
|
+
}
|
|
463
|
+
};
|
|
464
|
+
visit(options.pluginId);
|
|
465
|
+
return closure;
|
|
466
|
+
}
|
|
467
|
+
export function statusRecovery(options) {
|
|
468
|
+
if (options.errorCodes?.includes('removedPluginCleanupRequired')) {
|
|
469
|
+
return [{
|
|
470
|
+
command: 'cleanup',
|
|
471
|
+
description: '整体清理已删除插件在两个平台、用户与当前项目中的安装、设置和遗留记录。',
|
|
472
|
+
}];
|
|
473
|
+
}
|
|
474
|
+
if (options.errorCodes?.some((code) => code === 'codexProjectPluginUnsupported' || code === 'codexSystemCliUnsupported')) {
|
|
390
475
|
return [{
|
|
391
476
|
command: 'manual',
|
|
392
477
|
description: '升级或修复官方 system Codex CLI 后重试原操作。',
|
|
@@ -398,8 +483,29 @@ function statusRecovery(options) {
|
|
|
398
483
|
description: '升级 AW CLI 到支持插件所需 capability 的版本后重试。',
|
|
399
484
|
}];
|
|
400
485
|
}
|
|
486
|
+
if (options.errorCodes?.includes('dependencyGraphInvalid')) {
|
|
487
|
+
return [{
|
|
488
|
+
command: 'manual',
|
|
489
|
+
description: '修复 Catalog 中的插件依赖循环后重试。',
|
|
490
|
+
}];
|
|
491
|
+
}
|
|
401
492
|
if (options.state === 'ready' || options.state === 'absent')
|
|
402
493
|
return [];
|
|
494
|
+
if (options.desired.scopes.length === 0
|
|
495
|
+
&& options.sharedNative?.state === 'replaceable'
|
|
496
|
+
&& options.sharedNative.reason === 'damaged') {
|
|
497
|
+
return [
|
|
498
|
+
...(options.actualEnabled ? [{
|
|
499
|
+
command: 'cleanup',
|
|
500
|
+
...(options.scope ? { scope: options.scope } : {}),
|
|
501
|
+
description: `仅清理 ${options.scope ?? '当前'} scope 的激活;不会修复或删除损坏的共享内容。`,
|
|
502
|
+
}] : []),
|
|
503
|
+
{
|
|
504
|
+
command: 'manual',
|
|
505
|
+
description: `共享内容已损坏。先确认本机 Agent 选择,明确 user 或 project 使用范围,再运行 aw plugin install ${options.pluginId} --scope <user|project> 重建。`,
|
|
506
|
+
},
|
|
507
|
+
];
|
|
508
|
+
}
|
|
403
509
|
if (options.state === 'orphaned') {
|
|
404
510
|
return [{ command: 'cleanup', description: '清理可证明属于 AW 的遗留输出。' }];
|
|
405
511
|
}
|
|
@@ -422,7 +528,7 @@ function statusRecovery(options) {
|
|
|
422
528
|
return (options.conflictRoots?.[scope] ?? []).map((rootPluginId) => ({
|
|
423
529
|
command: 'uninstall',
|
|
424
530
|
scope,
|
|
425
|
-
description: `运行 aw
|
|
531
|
+
description: `运行 aw plugin remove ${rootPluginId} --only requirements --scope ${scope},再运行 aw plugin remove --only outputs ${rootPluginId} --target ${options.platform} --scope ${scope},最后运行 aw plugin sync ${retainedRoot} --target ${options.platform} --context ${retainedScope}。`,
|
|
426
532
|
}));
|
|
427
533
|
});
|
|
428
534
|
}
|
|
@@ -432,10 +538,18 @@ function statusRecovery(options) {
|
|
|
432
538
|
return [
|
|
433
539
|
{
|
|
434
540
|
command: 'sync',
|
|
435
|
-
description: `先移除或重命名 ${collision},再运行 aw sync ${options.pluginId} --
|
|
541
|
+
description: `先移除或重命名 ${collision},再运行 aw plugin sync ${options.pluginId} --target ${options.platform} --context ${options.scope ?? 'user'}。cleanup 会保留 foreign 内容,不会删除该冲突。`,
|
|
436
542
|
},
|
|
437
543
|
];
|
|
438
544
|
}
|
|
545
|
+
if (options.dependencyMoves?.length) {
|
|
546
|
+
const rootScope = options.desired.scopes[0] ?? 'project';
|
|
547
|
+
const removeDependencies = options.dependencyMoves.map((move) => `aw plugin remove --only outputs ${move.pluginId} --target ${options.platform} --scope ${move.fromScope}`);
|
|
548
|
+
return [{
|
|
549
|
+
command: 'manual',
|
|
550
|
+
description: `先按依赖保护提示依次移除 ${options.dependencyMoves.map((move) => move.pluginId).join('、')} 的所有直接和间接依赖者;若命令报告 dependencyStillRequired,继续处理提示的其他依赖者。再运行 ${removeDependencies.join(',再运行 ')} 移除依赖旧位置。最后确认本机 Agent 选择,逐个按原 scope 重新添加全部已移除 root,由联合需求重新确定提供位置;当前 root 的示例命令是 aw plugin install ${options.pluginId} --scope ${rootScope}。`,
|
|
551
|
+
}];
|
|
552
|
+
}
|
|
439
553
|
return [{
|
|
440
554
|
command: options.errorCodes?.some((code) => code === 'codexSharedNativeCorrupt'
|
|
441
555
|
|| code === 'codexActivationDrift'
|
|
@@ -514,25 +628,59 @@ export function projectTargetRevision(availableVersion, installedVersion) {
|
|
|
514
628
|
return { state: 'upgradeAvailable', availableVersion, installedVersion };
|
|
515
629
|
return { state: 'unknown', availableVersion, installedVersion };
|
|
516
630
|
}
|
|
517
|
-
function
|
|
631
|
+
function renderStatusV8(payload, verbose) {
|
|
518
632
|
const lines = [`Catalog sources: ${payload.catalog.sources.length}`];
|
|
519
633
|
for (const source of payload.catalog.sources) {
|
|
520
634
|
lines.push(`${source.primary ? '*' : '-'} ${source.id}: ${source.error ?? source.freshness ?? 'unavailable'}`);
|
|
521
635
|
}
|
|
522
636
|
for (const target of payload.targets) {
|
|
523
637
|
const reasons = target.reasons.length > 0
|
|
524
|
-
? ` [${target.reasons.map((reason) => `${reason.code}
|
|
638
|
+
? ` [${target.reasons.map((reason) => reason.message.startsWith(`${reason.code}:`)
|
|
639
|
+
? reason.message : `${reason.code}: ${reason.message}`).join('; ')}]`
|
|
525
640
|
: '';
|
|
526
|
-
|
|
641
|
+
if (target.platform === 'claude') {
|
|
642
|
+
lines.push(`${target.pluginId} ${target.platform} (${target.scope}): ${target.state}${reasons}`);
|
|
643
|
+
}
|
|
644
|
+
else {
|
|
645
|
+
lines.push(`${target.pluginId} ${target.platform}: ${target.state}${reasons}`);
|
|
646
|
+
const desiredScopes = target.placements.filter((placement) => placement.components.some((component) => component.kind === 'intent' && component.metadata?.enabled === true))
|
|
647
|
+
.map((placement) => placement.scope);
|
|
648
|
+
const actualScopes = target.placements.filter((placement) => placement.components.some((component) => component.kind === 'activation'
|
|
649
|
+
&& component.key === placement.scope
|
|
650
|
+
&& component.state === 'enabled'))
|
|
651
|
+
.map((placement) => placement.scope);
|
|
652
|
+
const usage = (scopes) => scopes.length === 0
|
|
653
|
+
? 'disabled'
|
|
654
|
+
: scopes.length === 2 ? 'user+project' : scopes[0];
|
|
655
|
+
lines.push(` desired use: ${usage(desiredScopes)}`);
|
|
656
|
+
lines.push(` actual use: ${usage(actualScopes)}`);
|
|
657
|
+
const shared = target.components.find((component) => component.kind === 'sharedNative');
|
|
658
|
+
if (shared)
|
|
659
|
+
lines.push(` shared content: ${shared.state} (${shared.key})`);
|
|
660
|
+
for (const placement of target.placements) {
|
|
661
|
+
lines.push(` ${placement.scope}: ${placement.state}`);
|
|
662
|
+
}
|
|
663
|
+
}
|
|
527
664
|
if (verbose) {
|
|
528
665
|
for (const component of target.components) {
|
|
529
666
|
lines.push(` component ${component.kind}/${component.key}: ${component.state}`);
|
|
530
667
|
}
|
|
668
|
+
if (target.platform === 'codex') {
|
|
669
|
+
for (const placement of target.placements) {
|
|
670
|
+
lines.push(` placement ${placement.scope}: ${placement.state}`);
|
|
671
|
+
for (const component of placement.components) {
|
|
672
|
+
lines.push(` component ${component.kind}/${component.key}: ${component.state}`);
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
}
|
|
531
676
|
for (const action of target.recoveryActions) {
|
|
532
677
|
lines.push(` recovery ${action.command}: ${action.description}`);
|
|
533
678
|
}
|
|
534
679
|
}
|
|
535
680
|
}
|
|
681
|
+
for (const issue of payload.configIssues ?? []) {
|
|
682
|
+
lines.push(`Warning: ${issue.pluginId} config ${issue.key} has an unsupported project override; user/default is effective. Unset the project value.`);
|
|
683
|
+
}
|
|
536
684
|
for (const error of payload.errors)
|
|
537
685
|
lines.push(`Error: ${error.message}`);
|
|
538
686
|
return lines.join('\n');
|
|
@@ -555,29 +703,89 @@ function collisionRootIssueId(options) {
|
|
|
555
703
|
options.collision.artifactKey,
|
|
556
704
|
].join(':');
|
|
557
705
|
}
|
|
558
|
-
|
|
706
|
+
async function statusCommandV8InSession(options) {
|
|
707
|
+
const throwIfCancelled = (error) => {
|
|
708
|
+
if (error instanceof Error && error.name === 'AbortError')
|
|
709
|
+
throw error;
|
|
710
|
+
options.signal?.throwIfAborted();
|
|
711
|
+
};
|
|
712
|
+
throwIfCancelled();
|
|
559
713
|
const env = options.env ?? process.env;
|
|
560
714
|
const dependencyPluginCache = new Map();
|
|
561
715
|
const dependencyInspectionCache = new Map();
|
|
562
716
|
const cliVersion = options.cliVersion ?? assertStrictSemVer(JSON.parse(fs.readFileSync(path.join(resolveCliPackageRoot(), 'package.json'), 'utf8')).version, 'packages/cli/package.json version');
|
|
563
717
|
const snapshot = await readCatalogSourcesConfigSnapshot(env);
|
|
564
|
-
|
|
565
|
-
const
|
|
718
|
+
throwIfCancelled();
|
|
719
|
+
const scope = options.scope === 'project' ? 'project' : 'user';
|
|
720
|
+
const demand = options.recoveryDemand ?? await readDemand({
|
|
721
|
+
scope, cwd: options.cwd, env, catalogOperationContext: options.catalogOperationContext, signal: options.signal,
|
|
722
|
+
});
|
|
723
|
+
throwIfCancelled();
|
|
724
|
+
const observedDemands = new Map([[scope, demand]]);
|
|
725
|
+
if (options.scope !== 'user') {
|
|
726
|
+
const otherScope = scope === 'user' ? 'project' : 'user';
|
|
566
727
|
try {
|
|
567
|
-
|
|
728
|
+
observedDemands.set(otherScope, await readDemand({ scope: otherScope, cwd: options.cwd,
|
|
729
|
+
env, catalogOperationContext: options.catalogOperationContext, signal: options.signal }));
|
|
730
|
+
}
|
|
731
|
+
catch (error) {
|
|
732
|
+
throwIfCancelled(error); /* The other scope remains unknown; current scope stays readable. */
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
const selectedPlatformsByScope = new Map();
|
|
736
|
+
for (const [demandScope, scopedDemand] of observedDemands) {
|
|
737
|
+
try {
|
|
738
|
+
selectedPlatformsByScope.set(demandScope, selectAgents({
|
|
739
|
+
preferences: scopedDemand.preferences,
|
|
740
|
+
...(demandScope === scope ? options.recoverySelection : {}),
|
|
741
|
+
}).agents.flatMap((agent) => agent === 'codex' ? ['codex']
|
|
742
|
+
: agent === 'claude' ? ['claude'] : []));
|
|
568
743
|
}
|
|
569
744
|
catch {
|
|
745
|
+
selectedPlatformsByScope.set(demandScope, []);
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
const projectObservationPlatforms = selectedPlatformsByScope.get('project') ?? [];
|
|
749
|
+
const intentErrors = [];
|
|
750
|
+
const readIntent = async (scope) => {
|
|
751
|
+
let observation;
|
|
752
|
+
const scopedDemand = observedDemands.get(scope);
|
|
753
|
+
if (scopedDemand) {
|
|
754
|
+
try {
|
|
755
|
+
const protective = demandNativeProjection(scopedDemand);
|
|
756
|
+
// A protective execution view includes every supported Native platform. Status
|
|
757
|
+
// demand is limited to selected Agents; live residue is observed separately.
|
|
758
|
+
const value = { ...protective, roots: protective.roots.flatMap((root) => {
|
|
759
|
+
const platforms = root.platforms.filter((platform) => selectedPlatformsByScope.get(scope)?.includes(platform));
|
|
760
|
+
return platforms.length ? [{ ...root, platforms }] : [];
|
|
761
|
+
}) };
|
|
762
|
+
observation = scopedDemand.intent.state === 'absent' ? { state: 'absent' }
|
|
763
|
+
: { state: 'ready', value };
|
|
764
|
+
}
|
|
765
|
+
catch {
|
|
766
|
+
observation = { state: 'invalid', code: 'pluginIntentStateInvalid', message: '声明或偏好无效。' };
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
else
|
|
770
|
+
observation = options.scope === 'user' ? { state: 'absent' }
|
|
771
|
+
: { state: 'unavailable', code: 'pluginIntentStateUnavailable', message: '另一范围需求不可读。' };
|
|
772
|
+
if (observation.state === 'invalid') {
|
|
570
773
|
intentErrors.push({
|
|
571
774
|
code: 'pluginIntentStateInvalid',
|
|
572
775
|
message: `pluginIntentStateInvalid: ${scope} plugin intent state is invalid.`,
|
|
573
776
|
});
|
|
574
|
-
return emptyIntent();
|
|
575
777
|
}
|
|
778
|
+
return observation;
|
|
576
779
|
};
|
|
577
|
-
const [
|
|
780
|
+
const [userIntentObservation, initialProjectIntentObservation] = await Promise.all([
|
|
578
781
|
readIntent('user'),
|
|
579
782
|
readIntent('project'),
|
|
580
783
|
]);
|
|
784
|
+
const userIntent = userIntentObservation.state === 'ready'
|
|
785
|
+
? userIntentObservation.value : emptyIntent();
|
|
786
|
+
let projectIntentObservation = initialProjectIntentObservation;
|
|
787
|
+
let projectIntent = projectIntentObservation.state === 'ready'
|
|
788
|
+
? projectIntentObservation.value : emptyIntent();
|
|
581
789
|
const codexConfigErrors = [];
|
|
582
790
|
const readActivationConfig = async (scope) => {
|
|
583
791
|
try {
|
|
@@ -592,23 +800,48 @@ export async function statusCommandV7(options) {
|
|
|
592
800
|
return undefined;
|
|
593
801
|
}
|
|
594
802
|
};
|
|
803
|
+
const codexScopePathsAlias = codexProjectConfigAliasesUserHome(options.cwd, env);
|
|
595
804
|
const [userCodexConfig, projectCodexConfig] = await Promise.all([
|
|
596
805
|
readActivationConfig('user'),
|
|
597
|
-
readActivationConfig('project'),
|
|
806
|
+
options.scope === 'user' || codexScopePathsAlias ? undefined : readActivationConfig('project'),
|
|
598
807
|
]);
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
808
|
+
let projectRoot;
|
|
809
|
+
try {
|
|
810
|
+
projectRoot = await resolveRequiredCanonicalRepoRoot(options.cwd);
|
|
811
|
+
}
|
|
812
|
+
catch (error) {
|
|
813
|
+
if (error instanceof Error && error.name === 'AbortError')
|
|
814
|
+
throw error;
|
|
815
|
+
if (options.scope === 'project') {
|
|
816
|
+
projectIntentObservation = {
|
|
817
|
+
state: 'unavailable', code: 'pluginIntentStateUnavailable',
|
|
818
|
+
message: '无法确定当前项目位置,不能读取插件声明。',
|
|
819
|
+
};
|
|
820
|
+
projectIntent = emptyIntent();
|
|
821
|
+
if (!intentErrors.some((error) => error.message.includes('project plugin intent'))) {
|
|
822
|
+
intentErrors.push({ code: 'pluginIntentStateInvalid',
|
|
823
|
+
message: 'pluginIntentStateInvalid: project plugin intent state is unavailable.' });
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
const currentProjectKey = projectRoot;
|
|
828
|
+
const currentProjectLocationKey = currentProjectKey
|
|
829
|
+
? createProjectLocationKey(currentProjectKey) : undefined;
|
|
602
830
|
const inventoryErrors = [];
|
|
603
831
|
const readInventory = options.inventoryCatalogSourceReferences
|
|
604
832
|
?? inventoryCatalogSourceReferences;
|
|
605
|
-
const ownerInventory = await readInventory({ cwd: options.cwd, env
|
|
833
|
+
const ownerInventory = await readInventory({ cwd: options.cwd, env,
|
|
834
|
+
...(options.scope === 'user' ? { scope: 'user' } : { includeProjectAgentSkills: true }) }).catch(async (error) => {
|
|
835
|
+
throwIfCancelled(error);
|
|
606
836
|
inventoryErrors.push(projectStateInventoryError(error, env, options.cwd));
|
|
607
|
-
return inventoryLegacyOwnerReferences({ cwd: options.cwd, env
|
|
837
|
+
return inventoryLegacyOwnerReferences({ cwd: options.cwd, env,
|
|
838
|
+
...(options.scope === 'user' ? { scope: 'user' } : { includeProjectAgentSkills: true }) }).catch((fallbackError) => {
|
|
839
|
+
throwIfCancelled(fallbackError);
|
|
608
840
|
inventoryErrors.push(projectStateInventoryError(fallbackError, env, options.cwd));
|
|
609
841
|
return { inventorySchemaVersion: 1, references: [], errors: [] };
|
|
610
842
|
});
|
|
611
843
|
});
|
|
844
|
+
throwIfCancelled();
|
|
612
845
|
for (const error of ownerInventory.errors ?? []) {
|
|
613
846
|
const code = error.kind === 'nativeStateRead' ? 'nativeStateUnreadable' : 'stateInventoryFailed';
|
|
614
847
|
inventoryErrors.push({
|
|
@@ -618,22 +851,32 @@ export async function statusCommandV7(options) {
|
|
|
618
851
|
});
|
|
619
852
|
}
|
|
620
853
|
const nativeCliRunner = options.nativeCliRunner ?? getDefaultNativeCliRunner();
|
|
621
|
-
|
|
854
|
+
let codexSystemConsumerInspection;
|
|
622
855
|
const inspectCodexSystemConsumer = (scope) => {
|
|
623
|
-
|
|
856
|
+
throwIfCancelled();
|
|
857
|
+
let inspection = codexSystemConsumerInspection;
|
|
624
858
|
if (!inspection) {
|
|
625
|
-
inspection =
|
|
859
|
+
inspection = inspectSystemCodex({
|
|
860
|
+
runner: nativeCliRunner,
|
|
626
861
|
cwd: options.cwd,
|
|
627
862
|
env,
|
|
863
|
+
signal: options.signal,
|
|
628
864
|
operationRequirement: getCodexOperationRequirement(scope),
|
|
865
|
+
}).then((result) => {
|
|
866
|
+
throwIfCancelled();
|
|
867
|
+
if (result.state === 'compatible') {
|
|
868
|
+
options.codexObservationSession.setManager(result.manager);
|
|
869
|
+
}
|
|
870
|
+
return result;
|
|
629
871
|
});
|
|
630
|
-
|
|
872
|
+
codexSystemConsumerInspection = inspection;
|
|
631
873
|
}
|
|
632
874
|
return inspection;
|
|
633
875
|
};
|
|
634
876
|
const codexRegistrationCache = new Map();
|
|
635
877
|
const inspectCodexRegistration = async (pluginId, scope) => {
|
|
636
878
|
const consumer = await inspectCodexSystemConsumer(scope);
|
|
879
|
+
throwIfCancelled();
|
|
637
880
|
if (consumer.state !== 'compatible') {
|
|
638
881
|
return {
|
|
639
882
|
observation: { state: 'unobserved' },
|
|
@@ -648,6 +891,9 @@ export async function statusCommandV7(options) {
|
|
|
648
891
|
cwd: options.cwd,
|
|
649
892
|
env,
|
|
650
893
|
nativeCliRunner,
|
|
894
|
+
manager: consumer.manager,
|
|
895
|
+
scope: options.scope === 'user' ? 'user' : 'both',
|
|
896
|
+
observationSession: options.codexObservationSession,
|
|
651
897
|
});
|
|
652
898
|
codexRegistrationCache.set(pluginId, inspection);
|
|
653
899
|
}
|
|
@@ -680,7 +926,13 @@ export async function statusCommandV7(options) {
|
|
|
680
926
|
}
|
|
681
927
|
if (registration.observation.value === 'absent')
|
|
682
928
|
return 'absent';
|
|
683
|
-
|
|
929
|
+
if (!userCodexConfig || (probe.scope === 'project' && !projectCodexConfig)) {
|
|
930
|
+
return 'partial';
|
|
931
|
+
}
|
|
932
|
+
const configEnabled = (probe.scope === 'user'
|
|
933
|
+
? userCodexConfig
|
|
934
|
+
: projectCodexConfig)?.snapshot.plugins[`${probe.pluginName}@${probe.marketplaceName}`]?.enabled === true;
|
|
935
|
+
return configEnabled
|
|
684
936
|
? 'present'
|
|
685
937
|
: 'partial';
|
|
686
938
|
})
|
|
@@ -706,7 +958,36 @@ export async function statusCommandV7(options) {
|
|
|
706
958
|
const configured = new Map(snapshot.config.sources.map((source) => [source.id, source]));
|
|
707
959
|
const requested = options.plugins ?? [];
|
|
708
960
|
const platforms = selectedPlatforms(options.platform);
|
|
961
|
+
const coversPlatform = (value) => (value === 'codex' || value === 'claude') && platforms.includes(value);
|
|
709
962
|
const scopes = selectedScopes(options.scope);
|
|
963
|
+
const installedPortableByScope = new Map();
|
|
964
|
+
for (const scope of scopes) {
|
|
965
|
+
const preferences = observedDemands.get(scope)?.preferences;
|
|
966
|
+
if (preferences?.state !== 'valid' || !preferences.value.targets.includes('generic'))
|
|
967
|
+
continue;
|
|
968
|
+
try {
|
|
969
|
+
const context = await createScopeContext({ scope, cwd: options.cwd, env, readOnly: true });
|
|
970
|
+
try {
|
|
971
|
+
const installed = await inspectPortableExtraInstalled({ scope, context, env: context.env, signal: options.signal });
|
|
972
|
+
installedPortableByScope.set(scope, installed.targets);
|
|
973
|
+
}
|
|
974
|
+
finally {
|
|
975
|
+
await context.dispose();
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
catch (error) {
|
|
979
|
+
throwIfCancelled(error);
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
const userDemand = observedDemands.get('user');
|
|
983
|
+
const projectDemand = observedDemands.get('project');
|
|
984
|
+
const configRequirementKey = (pluginId, scope, target) => `${pluginId}\0${scope}\0${target}`;
|
|
985
|
+
const requiredConfigTargets = new Set(userDemand ? deriveJointDemand({
|
|
986
|
+
context: { context: projectDemand ? 'project' : 'user', cwd: options.cwd,
|
|
987
|
+
scopes: projectDemand ? ['user', 'project'] : ['user'], ...(projectDemand && projectRoot ? { projectRoot } : {}) },
|
|
988
|
+
user: userDemand, project: projectDemand,
|
|
989
|
+
preferences: userDemand.preferences.state === 'valid' ? userDemand.preferences.value : null,
|
|
990
|
+
}).placements.flatMap((placement) => placement.contributions.map((contribution) => configRequirementKey(placement.pluginId, contribution.scope, placement.target))) : []);
|
|
710
991
|
const selectorErrors = [];
|
|
711
992
|
const parsedSelectors = [];
|
|
712
993
|
const plannedSelectors = [];
|
|
@@ -728,7 +1009,7 @@ export async function statusCommandV7(options) {
|
|
|
728
1009
|
const hasLiveReference = ownerInventory.references.some((reference) => (reference.kind === 'namespacedOwner' || reference.kind === 'namespacedMarketplace')
|
|
729
1010
|
&& reference.sourceId === parsed.sourceId
|
|
730
1011
|
&& reference.pluginName === parsed.pluginName
|
|
731
|
-
&&
|
|
1012
|
+
&& coversPlatform(reference.platform)
|
|
732
1013
|
&& scopes.includes(reference.scope)
|
|
733
1014
|
&& (reference.scope !== 'project' || reference.projectKey === currentProjectKey));
|
|
734
1015
|
if (hasLiveReference) {
|
|
@@ -761,9 +1042,14 @@ export async function statusCommandV7(options) {
|
|
|
761
1042
|
scopes,
|
|
762
1043
|
currentProjectLocationKey,
|
|
763
1044
|
}));
|
|
764
|
-
const
|
|
1045
|
+
const selectorSourceIds = requested.length === 0
|
|
765
1046
|
? undefined
|
|
766
1047
|
: planPluginSelectorSourceIds(plannedSelectors.map((selector) => selector.parsed));
|
|
1048
|
+
const plannedSourceIds = selectorSourceIds === undefined ? undefined : [...new Set([
|
|
1049
|
+
...selectorSourceIds,
|
|
1050
|
+
...(options.catalogOperationContext ? [] : [...observedDemands.values()].flatMap((entry) => entry.roots ?? []))
|
|
1051
|
+
.map((root) => root.sourceId).filter((id) => configured.has(id)),
|
|
1052
|
+
])];
|
|
767
1053
|
const selectedConfiguredSources = plannedSourceIds === undefined
|
|
768
1054
|
? snapshot.config.sources
|
|
769
1055
|
: plannedSourceIds.map((sourceId) => configured.get(sourceId));
|
|
@@ -787,11 +1073,13 @@ export async function statusCommandV7(options) {
|
|
|
787
1073
|
? { operationContext: options.catalogOperationContext }
|
|
788
1074
|
: {}),
|
|
789
1075
|
env,
|
|
1076
|
+
signal: options.signal,
|
|
790
1077
|
consume: async (resolution) => ({
|
|
791
1078
|
primarySourceId: resolution.primarySourceId,
|
|
792
1079
|
configDigest: resolution.configDigest,
|
|
793
1080
|
compositeDigest: resolution.compositeDigest,
|
|
794
1081
|
sources: await Promise.all(resolution.sources.map(async (item) => {
|
|
1082
|
+
throwIfCancelled();
|
|
795
1083
|
const source = configured.get(item.sourceId);
|
|
796
1084
|
const identity = identities.get(item.sourceId);
|
|
797
1085
|
const base = {
|
|
@@ -810,17 +1098,50 @@ export async function statusCommandV7(options) {
|
|
|
810
1098
|
};
|
|
811
1099
|
}
|
|
812
1100
|
try {
|
|
1101
|
+
const catalogEntriesByName = new Map(item.resolution.manifest.entries.map((entry) => [
|
|
1102
|
+
entry.name,
|
|
1103
|
+
entry,
|
|
1104
|
+
]));
|
|
1105
|
+
const cyclicDependencyPluginNames = new Set();
|
|
1106
|
+
const dependencyVisitState = new Map();
|
|
1107
|
+
const dependencyVisitStack = [];
|
|
1108
|
+
const visitDependencyGraph = (pluginName) => {
|
|
1109
|
+
const state = dependencyVisitState.get(pluginName);
|
|
1110
|
+
if (state === 'visited')
|
|
1111
|
+
return;
|
|
1112
|
+
if (state === 'visiting') {
|
|
1113
|
+
const cycleStart = dependencyVisitStack.lastIndexOf(pluginName);
|
|
1114
|
+
for (const name of dependencyVisitStack.slice(cycleStart)) {
|
|
1115
|
+
cyclicDependencyPluginNames.add(name);
|
|
1116
|
+
}
|
|
1117
|
+
return;
|
|
1118
|
+
}
|
|
1119
|
+
dependencyVisitState.set(pluginName, 'visiting');
|
|
1120
|
+
dependencyVisitStack.push(pluginName);
|
|
1121
|
+
for (const dependencyName of catalogEntriesByName.get(pluginName)?.dependencies ?? []) {
|
|
1122
|
+
if (catalogEntriesByName.has(dependencyName))
|
|
1123
|
+
visitDependencyGraph(dependencyName);
|
|
1124
|
+
}
|
|
1125
|
+
dependencyVisitStack.pop();
|
|
1126
|
+
dependencyVisitState.set(pluginName, 'visited');
|
|
1127
|
+
};
|
|
1128
|
+
for (const pluginName of catalogEntriesByName.keys())
|
|
1129
|
+
visitDependencyGraph(pluginName);
|
|
813
1130
|
const placementEntries = item.resolution.manifest.entries.map((entry) => {
|
|
814
|
-
const
|
|
815
|
-
const supports = (platform) => products === undefined
|
|
816
|
-
|| products.includes(platform === 'codex' ? 'CODEX' : 'CLAUDE');
|
|
1131
|
+
const supportedPlatforms = resolveCatalogEntrySupportedPlatforms(entry.policy);
|
|
817
1132
|
return {
|
|
818
1133
|
name: entry.name,
|
|
819
1134
|
dependencies: entry.dependencies,
|
|
820
1135
|
source: { id: item.resolution.sourceId },
|
|
821
1136
|
targets: {
|
|
822
|
-
codex: {
|
|
823
|
-
|
|
1137
|
+
codex: {
|
|
1138
|
+
user: supportedPlatforms.has('codex'),
|
|
1139
|
+
project: supportedPlatforms.has('codex'),
|
|
1140
|
+
},
|
|
1141
|
+
claude: {
|
|
1142
|
+
user: supportedPlatforms.has('claude'),
|
|
1143
|
+
project: supportedPlatforms.has('claude'),
|
|
1144
|
+
},
|
|
824
1145
|
},
|
|
825
1146
|
};
|
|
826
1147
|
});
|
|
@@ -830,7 +1151,7 @@ export async function statusCommandV7(options) {
|
|
|
830
1151
|
available: placementEntries,
|
|
831
1152
|
codexProjectAllowed: !codexScopePathsAlias,
|
|
832
1153
|
});
|
|
833
|
-
const registeredNames =
|
|
1154
|
+
const registeredNames = legacyCanonicalMarketplaceRegistrationNames(ownerInventory.references, item.resolution.sourceId);
|
|
834
1155
|
if (registeredNames.length > 1) {
|
|
835
1156
|
throw new Error('marketplaceIdentityUnavailable: Multiple canonical native marketplace registrations match the source.');
|
|
836
1157
|
}
|
|
@@ -843,20 +1164,21 @@ export async function statusCommandV7(options) {
|
|
|
843
1164
|
sourceId: item.resolution.sourceId,
|
|
844
1165
|
pluginName: entry.name,
|
|
845
1166
|
});
|
|
846
|
-
if (
|
|
1167
|
+
if (options.scope === 'project'
|
|
1168
|
+
? userCodexConfig?.snapshot.plugins[`${entry.name}@${desiredMarketplaceName}`]?.enabled === true
|
|
1169
|
+
: sourceDesired.get(desiredTargetKey(pluginId, 'codex'))?.scopes.includes('user')) {
|
|
847
1170
|
codexDesiredUserActivationIds.add(`${entry.name}@${desiredMarketplaceName}`);
|
|
848
1171
|
}
|
|
849
1172
|
}
|
|
850
1173
|
const plugins = await Promise.all(item.resolution.manifest.entries.map(async (entry) => {
|
|
1174
|
+
throwIfCancelled();
|
|
851
1175
|
const capabilitySupport = checkAwCapabilitySupport(entry.requires.aw.capabilities ?? [], IMPLEMENTED_AW_CAPABILITIES);
|
|
852
1176
|
if (!capabilitySupport.supported) {
|
|
853
|
-
const
|
|
854
|
-
const supports = (platform) => products === undefined
|
|
855
|
-
|| products.includes(platform === 'codex' ? 'CODEX' : 'CLAUDE');
|
|
1177
|
+
const supportedPlatforms = resolveCatalogEntrySupportedPlatforms(entry.policy);
|
|
856
1178
|
const states = {};
|
|
857
1179
|
const message = `awCapabilityUnsupported: ${item.resolution.sourceId}/${entry.name} requires unsupported AW capabilities: ${capabilitySupport.missing.join(', ')}.`;
|
|
858
1180
|
for (const platform of ['codex', 'claude']) {
|
|
859
|
-
if (!
|
|
1181
|
+
if (!supportedPlatforms.has(platform))
|
|
860
1182
|
continue;
|
|
861
1183
|
states[platform] = {};
|
|
862
1184
|
for (const scope of ['user', 'project']) {
|
|
@@ -874,8 +1196,14 @@ export async function statusCommandV7(options) {
|
|
|
874
1196
|
shortDescription: entry.interface?.shortDescription ?? entry.description,
|
|
875
1197
|
description: entry.description,
|
|
876
1198
|
targets: {
|
|
877
|
-
claude: {
|
|
878
|
-
|
|
1199
|
+
claude: {
|
|
1200
|
+
user: supportedPlatforms.has('claude'),
|
|
1201
|
+
project: supportedPlatforms.has('claude'),
|
|
1202
|
+
},
|
|
1203
|
+
codex: {
|
|
1204
|
+
user: supportedPlatforms.has('codex'),
|
|
1205
|
+
project: supportedPlatforms.has('codex'),
|
|
1206
|
+
},
|
|
879
1207
|
},
|
|
880
1208
|
states,
|
|
881
1209
|
dependencies: entry.dependencies,
|
|
@@ -888,50 +1216,87 @@ export async function statusCommandV7(options) {
|
|
|
888
1216
|
const codexSurface = analyzeCodexSurface(plugin.manifest);
|
|
889
1217
|
plugin.sourceId = item.resolution.sourceId;
|
|
890
1218
|
plugin.sourceIdentity = item.resolution.sourceIdentity;
|
|
1219
|
+
plugin.catalogLogicalIdentity = item.resolution.logicalIdentity;
|
|
891
1220
|
plugin.pluginId = formatPluginId({ sourceId: item.resolution.sourceId, pluginName: entry.name });
|
|
892
1221
|
let configIssues;
|
|
893
1222
|
let configDiagnostic;
|
|
894
|
-
if (plugin.manifest.config
|
|
1223
|
+
if (plugin.manifest.config) {
|
|
895
1224
|
const issues = new Map();
|
|
896
1225
|
for (const scope of scopes) {
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
1226
|
+
const scopedDemand = observedDemands.get(scope);
|
|
1227
|
+
if (!scopedDemand)
|
|
1228
|
+
continue;
|
|
1229
|
+
// Strong preference errors are already reported through demand; never fall back to every platform.
|
|
1230
|
+
if (scopedDemand.preferences.state !== 'valid')
|
|
1231
|
+
continue;
|
|
1232
|
+
const active = resolveActiveConfigPlatforms(plugin.pluginId, plugin.manifest, scopedDemand.preferences);
|
|
1233
|
+
for (const platform of active) {
|
|
1234
|
+
const installed = platform === 'generic'
|
|
1235
|
+
? installedPortableByScope.get(scope)?.some((target) => target.agent === platform && target.pluginId === plugin.pluginId
|
|
1236
|
+
&& target.logicalIdentity === plugin.catalogLogicalIdentity)
|
|
1237
|
+
: ownerInventory.references.some((reference) => reference.platform === platform
|
|
1238
|
+
&& reference.sourceId === plugin.sourceId && reference.pluginName === plugin.manifest.name
|
|
1239
|
+
&& (reference.kind === 'namespacedOwner' || reference.kind === 'namespacedMarketplace')
|
|
1240
|
+
&& (!reference.sourceIdentity || reference.sourceIdentity === plugin.sourceIdentity)
|
|
1241
|
+
&& reference.scope === scope && (scope === 'user' || reference.projectKey === currentProjectKey));
|
|
1242
|
+
if (!installed && !requiredConfigTargets.has(configRequirementKey(plugin.pluginId, scope, platform)))
|
|
1243
|
+
continue;
|
|
1244
|
+
try {
|
|
1245
|
+
const resolved = scope === 'project'
|
|
1246
|
+
? await resolveProjectArtifactRenderConfig({
|
|
1247
|
+
sourceId: plugin.sourceId,
|
|
1248
|
+
sourceIdentity: plugin.sourceIdentity,
|
|
1249
|
+
logicalIdentity: plugin.catalogLogicalIdentity,
|
|
1250
|
+
pluginName: plugin.manifest.name,
|
|
1251
|
+
manifest: plugin.manifest,
|
|
1252
|
+
platform,
|
|
1253
|
+
cwd: options.cwd,
|
|
1254
|
+
env,
|
|
1255
|
+
})
|
|
1256
|
+
: await resolveEffectivePluginConfig({
|
|
1257
|
+
sourceId: plugin.sourceId,
|
|
1258
|
+
sourceIdentity: plugin.sourceIdentity,
|
|
1259
|
+
logicalIdentity: plugin.catalogLogicalIdentity,
|
|
1260
|
+
pluginName: plugin.manifest.name,
|
|
1261
|
+
manifest: plugin.manifest,
|
|
1262
|
+
platform,
|
|
1263
|
+
targetScope: 'user',
|
|
1264
|
+
cwd: options.cwd,
|
|
1265
|
+
env,
|
|
1266
|
+
});
|
|
1267
|
+
for (const issue of resolved.issues) {
|
|
1268
|
+
const source = issue.source ?? 'missing';
|
|
1269
|
+
const configIssue = {
|
|
1270
|
+
scope,
|
|
1271
|
+
platform,
|
|
1272
|
+
type: issue.type,
|
|
1273
|
+
key: issue.key,
|
|
1274
|
+
title: resolved.schema[issue.key]?.title ?? issue.key,
|
|
1275
|
+
source,
|
|
1276
|
+
};
|
|
1277
|
+
issues.set(`${platform}\0${scope}\0${configIssue.type}\0${configIssue.key}\0${configIssue.source}`, configIssue);
|
|
1278
|
+
}
|
|
1279
|
+
for (const override of resolved.unsupportedLayerOverrides) {
|
|
1280
|
+
const configIssue = {
|
|
1281
|
+
scope,
|
|
1282
|
+
platform,
|
|
1283
|
+
type: override.type,
|
|
1284
|
+
key: override.key,
|
|
1285
|
+
title: resolved.schema[override.key]?.title ?? override.key,
|
|
1286
|
+
source: override.source,
|
|
1287
|
+
};
|
|
1288
|
+
issues.set(`${platform}\0${scope}\0${configIssue.type}\0${configIssue.key}\0${configIssue.source}`, configIssue);
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
catch (error) {
|
|
1292
|
+
throwIfCancelled(error);
|
|
1293
|
+
configDiagnostic ??= {
|
|
919
1294
|
scope,
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
title: plugin.manifest.config.fields[issue.key]?.title ?? issue.key,
|
|
923
|
-
source,
|
|
1295
|
+
code: 'configReadFailed',
|
|
1296
|
+
message: '插件设置当前不可读。未读取或显示设置值。',
|
|
924
1297
|
};
|
|
925
|
-
issues.set(`${scope}\0${configIssue.type}\0${configIssue.key}\0${configIssue.source}`, configIssue);
|
|
926
1298
|
}
|
|
927
1299
|
}
|
|
928
|
-
catch {
|
|
929
|
-
configDiagnostic ??= {
|
|
930
|
-
scope,
|
|
931
|
-
code: 'configReadFailed',
|
|
932
|
-
message: '插件设置当前不可读。未读取或显示设置值。',
|
|
933
|
-
};
|
|
934
|
-
}
|
|
935
1300
|
}
|
|
936
1301
|
configIssues = [...issues.values()];
|
|
937
1302
|
}
|
|
@@ -939,18 +1304,21 @@ export async function statusCommandV7(options) {
|
|
|
939
1304
|
const defaultMarketplaceName = item.resolution.sourceId === resolution.primarySourceId
|
|
940
1305
|
? 'aw'
|
|
941
1306
|
: `aw-${item.resolution.sourceId}`;
|
|
1307
|
+
const legacyMarketplaceRoot = path.join(await resolveAwHomeCanonical(env), 'marketplaces', item.resolution.sourceId);
|
|
942
1308
|
const marketplaceNameFor = (pluginName, platform, scope) => {
|
|
943
1309
|
const liveName = ownerInventory.references.find((reference) => (reference.kind === 'namespacedOwner' || reference.kind === 'namespacedMarketplace')
|
|
944
1310
|
&& reference.sourceId === item.resolution.sourceId
|
|
945
1311
|
&& reference.sourceIdentity === item.resolution.sourceIdentity
|
|
946
1312
|
&& reference.pluginName === pluginName
|
|
1313
|
+
&& (reference.kind !== 'namespacedMarketplace' || !reference.marketplaceRoot
|
|
1314
|
+
|| reference.marketplaceRoot === legacyMarketplaceRoot)
|
|
947
1315
|
&& reference.platform === platform
|
|
948
1316
|
&& reference.scope === scope
|
|
949
1317
|
&& (scope === 'user' || reference.projectKey === currentProjectKey)
|
|
950
1318
|
&& reference.marketplaceName)?.marketplaceName;
|
|
951
1319
|
if (liveName)
|
|
952
1320
|
return liveName;
|
|
953
|
-
const registeredNames =
|
|
1321
|
+
const registeredNames = legacyCanonicalMarketplaceRegistrationNames(ownerInventory.references, item.resolution.sourceId);
|
|
954
1322
|
if (registeredNames.length > 1) {
|
|
955
1323
|
throw new Error('marketplaceIdentityUnavailable: Multiple canonical native marketplace registrations match the source.');
|
|
956
1324
|
}
|
|
@@ -960,6 +1328,7 @@ export async function statusCommandV7(options) {
|
|
|
960
1328
|
for (const platform of ['codex', 'claude']) {
|
|
961
1329
|
states[platform] = {};
|
|
962
1330
|
for (const scope of ['user', 'project']) {
|
|
1331
|
+
throwIfCancelled();
|
|
963
1332
|
if (platform === 'codex'
|
|
964
1333
|
&& scope === 'project'
|
|
965
1334
|
&& codexScopePathsAlias
|
|
@@ -1010,6 +1379,7 @@ export async function statusCommandV7(options) {
|
|
|
1010
1379
|
nativeCliRunner,
|
|
1011
1380
|
reporter: createNoopReporter(),
|
|
1012
1381
|
debugLogger: createNoopDebugLogger(),
|
|
1382
|
+
codexObservationSession: options.codexObservationSession,
|
|
1013
1383
|
},
|
|
1014
1384
|
userActivationDesired: codexDesiredUserActivationIds,
|
|
1015
1385
|
nativeProbe: readOnlyNativeProbe({
|
|
@@ -1048,8 +1418,244 @@ export async function statusCommandV7(options) {
|
|
|
1048
1418
|
const dependencyErrors = [];
|
|
1049
1419
|
const dependencyReadiness = [];
|
|
1050
1420
|
const directDependencies = plugin.manifest.dependencies ?? [];
|
|
1051
|
-
|
|
1052
|
-
|
|
1421
|
+
const desiredInScope = sourceDesired.get(desiredTargetKey(plugin.pluginId, platform))?.scopes.includes(scope) === true;
|
|
1422
|
+
const codexPluginId = `${entry.name}@${marketplaceName}`;
|
|
1423
|
+
const actualCodexActivation = platform === 'codex'
|
|
1424
|
+
&& (scope === 'user' ? userCodexConfig : projectCodexConfig)
|
|
1425
|
+
?.snapshot.plugins[codexPluginId]?.enabled === true;
|
|
1426
|
+
const hasScopedExtensionResidue = platform === 'codex'
|
|
1427
|
+
&& inspected.inspection.components.some((component) => component.component.kind !== 'native-plugin'
|
|
1428
|
+
&& !component.component.identity.artifactKey.startsWith('activation-')
|
|
1429
|
+
&& !component.component.identity.artifactKey.startsWith('marketplace-')
|
|
1430
|
+
&& (component.state !== 'absent' || component.collision !== undefined));
|
|
1431
|
+
const dependencyPriority = {
|
|
1432
|
+
ready: 5,
|
|
1433
|
+
blockedByCollision: 4,
|
|
1434
|
+
incomplete: 3,
|
|
1435
|
+
error: 2,
|
|
1436
|
+
absent: 1,
|
|
1437
|
+
};
|
|
1438
|
+
function dependencyPlacementsFor(dependencyId, consumerScope) {
|
|
1439
|
+
const dependencyOverride = (consumerScope === 'project'
|
|
1440
|
+
? projectIntent
|
|
1441
|
+
: userIntent).dependencyScopeOverrides.find((override) => override.pluginId === dependencyId
|
|
1442
|
+
&& (override.platform === undefined || override.platform === platform));
|
|
1443
|
+
return dependencyOverride
|
|
1444
|
+
? [dependencyOverride.scope]
|
|
1445
|
+
: consumerScope === 'project' ? ['project', 'user'] : ['user'];
|
|
1446
|
+
}
|
|
1447
|
+
async function inspectDependencyAtScope(dependencyName, dependencyScope) {
|
|
1448
|
+
const dependencyId = formatPluginId({
|
|
1449
|
+
sourceId: item.resolution.sourceId,
|
|
1450
|
+
pluginName: dependencyName,
|
|
1451
|
+
});
|
|
1452
|
+
const inspectionCacheKey = [
|
|
1453
|
+
item.resolution.sourceIdentity,
|
|
1454
|
+
dependencyId,
|
|
1455
|
+
platform,
|
|
1456
|
+
dependencyScope,
|
|
1457
|
+
dependencyScope === 'project' ? currentProjectKey : '',
|
|
1458
|
+
].join('\0');
|
|
1459
|
+
if (cyclicDependencyPluginNames.has(dependencyName)) {
|
|
1460
|
+
return {
|
|
1461
|
+
state: 'error',
|
|
1462
|
+
dependencyScope,
|
|
1463
|
+
rootIssueId: `dependencyGraphInvalid:${dependencyId}`,
|
|
1464
|
+
rootIssueCode: 'dependencyGraphInvalid',
|
|
1465
|
+
issuePluginId: dependencyId,
|
|
1466
|
+
issueScope: dependencyScope,
|
|
1467
|
+
};
|
|
1468
|
+
}
|
|
1469
|
+
const cached = dependencyInspectionCache.get(inspectionCacheKey);
|
|
1470
|
+
if (cached)
|
|
1471
|
+
return cached;
|
|
1472
|
+
const inspection = (async () => {
|
|
1473
|
+
const dependencyEntry = item.resolution.manifest.entries.find((candidate) => candidate.name === dependencyName);
|
|
1474
|
+
if (!dependencyEntry) {
|
|
1475
|
+
return {
|
|
1476
|
+
state: 'absent',
|
|
1477
|
+
dependencyScope,
|
|
1478
|
+
rootIssueId: `dependencyMissing:${dependencyId}:${platform}:${dependencyScope}`,
|
|
1479
|
+
rootIssueCode: 'dependencyMissing',
|
|
1480
|
+
issuePluginId: dependencyId,
|
|
1481
|
+
issueScope: dependencyScope,
|
|
1482
|
+
};
|
|
1483
|
+
}
|
|
1484
|
+
const dependencySupport = checkAwCapabilitySupport(dependencyEntry.requires.aw.capabilities ?? [], IMPLEMENTED_AW_CAPABILITIES);
|
|
1485
|
+
if (!dependencySupport.supported) {
|
|
1486
|
+
return {
|
|
1487
|
+
state: 'error',
|
|
1488
|
+
dependencyScope,
|
|
1489
|
+
rootIssueId: `awCapabilityUnsupported:${dependencyId}`,
|
|
1490
|
+
rootIssueCode: 'awCapabilityUnsupported',
|
|
1491
|
+
issuePluginId: dependencyId,
|
|
1492
|
+
issueScope: dependencyScope,
|
|
1493
|
+
missingCapabilities: dependencySupport.missing,
|
|
1494
|
+
};
|
|
1495
|
+
}
|
|
1496
|
+
const pluginCacheKey = [item.resolution.sourceIdentity, dependencyId].join('\0');
|
|
1497
|
+
let dependencyPluginPromise = dependencyPluginCache.get(pluginCacheKey);
|
|
1498
|
+
if (!dependencyPluginPromise) {
|
|
1499
|
+
dependencyPluginPromise = readPluginManifest(path.join(item.resolution.rootDir, 'plugins', dependencyName), { mode: 'bundle' }).then((dependencyPlugin) => {
|
|
1500
|
+
dependencyPlugin.sourceId = item.resolution.sourceId;
|
|
1501
|
+
dependencyPlugin.sourceIdentity = item.resolution.sourceIdentity;
|
|
1502
|
+
dependencyPlugin.catalogLogicalIdentity = item.resolution.logicalIdentity;
|
|
1503
|
+
dependencyPlugin.pluginId = dependencyId;
|
|
1504
|
+
return dependencyPlugin;
|
|
1505
|
+
});
|
|
1506
|
+
dependencyPluginCache.set(pluginCacheKey, dependencyPluginPromise);
|
|
1507
|
+
}
|
|
1508
|
+
const dependencyPlugin = await dependencyPluginPromise;
|
|
1509
|
+
dependencyInspectionHookForTests?.();
|
|
1510
|
+
const dependencyMarketplaceName = marketplaceNameFor(dependencyName, platform, dependencyScope);
|
|
1511
|
+
const dependencyInspected = await inspectRebuildTarget({
|
|
1512
|
+
sourceId: item.resolution.sourceId,
|
|
1513
|
+
sourceIdentity: item.resolution.sourceIdentity,
|
|
1514
|
+
pluginId: dependencyId,
|
|
1515
|
+
marketplaceName: dependencyMarketplaceName,
|
|
1516
|
+
marketplaceRoot,
|
|
1517
|
+
plugin: dependencyPlugin,
|
|
1518
|
+
platform,
|
|
1519
|
+
scope: dependencyScope,
|
|
1520
|
+
cwd: options.cwd,
|
|
1521
|
+
catalog: { rootDir: item.resolution.rootDir, source: 'local' },
|
|
1522
|
+
context: {
|
|
1523
|
+
env,
|
|
1524
|
+
nativeCliRunner,
|
|
1525
|
+
reporter: createNoopReporter(),
|
|
1526
|
+
debugLogger: createNoopDebugLogger(),
|
|
1527
|
+
codexObservationSession: options.codexObservationSession,
|
|
1528
|
+
},
|
|
1529
|
+
userActivationDesired: codexDesiredUserActivationIds,
|
|
1530
|
+
nativeProbe: readOnlyNativeProbe({
|
|
1531
|
+
pluginName: dependencyName,
|
|
1532
|
+
sourceId: item.resolution.sourceId,
|
|
1533
|
+
sourceIdentity: item.resolution.sourceIdentity,
|
|
1534
|
+
platform,
|
|
1535
|
+
scope: dependencyScope,
|
|
1536
|
+
marketplaceName: dependencyMarketplaceName,
|
|
1537
|
+
marketplaceRoot,
|
|
1538
|
+
desired: sourceDesired.get(desiredTargetKey(dependencyId, platform))
|
|
1539
|
+
?.scopes.includes(dependencyScope) === true,
|
|
1540
|
+
}),
|
|
1541
|
+
shallow: true,
|
|
1542
|
+
});
|
|
1543
|
+
const dependencyLiveState = projectedLiveState({
|
|
1544
|
+
inspection: dependencyInspected.inspection,
|
|
1545
|
+
required: dependencyInspected.target.desiredOwnedComponents
|
|
1546
|
+
?? dependencyInspected.target.ownedComponents,
|
|
1547
|
+
optional: dependencyInspected.target.optionalOwnedComponents ?? [],
|
|
1548
|
+
});
|
|
1549
|
+
const collision = dependencyInspected.inspection.components.find((component) => component.collision)?.collision;
|
|
1550
|
+
if (collision) {
|
|
1551
|
+
return {
|
|
1552
|
+
state: 'blockedByCollision',
|
|
1553
|
+
dependencyScope,
|
|
1554
|
+
rootIssueId: collisionRootIssueId({
|
|
1555
|
+
pluginId: dependencyId,
|
|
1556
|
+
platform,
|
|
1557
|
+
scope: dependencyScope,
|
|
1558
|
+
collision,
|
|
1559
|
+
}),
|
|
1560
|
+
rootIssueCode: 'artifactCollision',
|
|
1561
|
+
issuePluginId: dependencyId,
|
|
1562
|
+
issueScope: dependencyScope,
|
|
1563
|
+
};
|
|
1564
|
+
}
|
|
1565
|
+
const requiredDependencyComponents = dependencyInspected.target
|
|
1566
|
+
.desiredOwnedComponents ?? dependencyInspected.target.ownedComponents;
|
|
1567
|
+
const desiredDependency = sourceDesired.get(desiredTargetKey(dependencyId, platform));
|
|
1568
|
+
const projectMigrationPending = dependencyScope === 'project'
|
|
1569
|
+
&& projectIntent.dependencyScopeOverrides.some((override) => override.pluginId === dependencyId
|
|
1570
|
+
&& override.scope === 'project'
|
|
1571
|
+
&& (override.platform === undefined || override.platform === platform))
|
|
1572
|
+
&& desiredDependency?.scopes.includes('project') === true
|
|
1573
|
+
&& desiredDependency.scopes.includes('user') === false
|
|
1574
|
+
&& ownerInventory.references.some((reference) => reference.kind === 'namespacedOwner'
|
|
1575
|
+
&& reference.sourceId === item.resolution.sourceId
|
|
1576
|
+
&& reference.pluginName === dependencyName
|
|
1577
|
+
&& reference.platform === platform
|
|
1578
|
+
&& reference.scope === 'user');
|
|
1579
|
+
const migrationOnlyPartial = dependencyLiveState === 'partial'
|
|
1580
|
+
&& projectMigrationPending
|
|
1581
|
+
&& dependencyInspected.inspection.components.every((component) => component.state === 'present' || component.state === 'absent')
|
|
1582
|
+
&& requiredDependencyComponents.every((required) => dependencyInspected.inspection.components.some((component) => component.component === required
|
|
1583
|
+
&& (component.state === 'present'
|
|
1584
|
+
|| component.state === 'absent'
|
|
1585
|
+
&& component.component.kind !== 'native-plugin'
|
|
1586
|
+
&& 'locator' in component.component
|
|
1587
|
+
&& component.component.locator.kind === 'codex-activation'
|
|
1588
|
+
&& component.component.locator.desired === false)));
|
|
1589
|
+
const effectiveDependencyLiveState = migrationOnlyPartial
|
|
1590
|
+
? 'present'
|
|
1591
|
+
: dependencyLiveState;
|
|
1592
|
+
if (effectiveDependencyLiveState !== 'present') {
|
|
1593
|
+
const state = effectiveDependencyLiveState === 'absent' ? 'absent'
|
|
1594
|
+
: effectiveDependencyLiveState === 'partial' ? 'incomplete'
|
|
1595
|
+
: 'error';
|
|
1596
|
+
return {
|
|
1597
|
+
state,
|
|
1598
|
+
dependencyScope,
|
|
1599
|
+
rootIssueId: state === 'absent'
|
|
1600
|
+
? `dependencyMissing:${dependencyId}:${platform}:${dependencyScope}`
|
|
1601
|
+
: state === 'incomplete'
|
|
1602
|
+
? `incompleteInstallation:${dependencyId}:${platform}:${dependencyScope}`
|
|
1603
|
+
: `diagnostic:${dependencyId}:${platform}:${dependencyScope}`,
|
|
1604
|
+
rootIssueCode: state === 'absent' ? 'dependencyMissing'
|
|
1605
|
+
: state === 'incomplete' ? 'incompleteInstallation' : 'diagnostic',
|
|
1606
|
+
issuePluginId: dependencyId,
|
|
1607
|
+
issueScope: dependencyScope,
|
|
1608
|
+
};
|
|
1609
|
+
}
|
|
1610
|
+
for (const childName of dependencyPlugin.manifest.dependencies ?? []) {
|
|
1611
|
+
const childId = formatPluginId({
|
|
1612
|
+
sourceId: item.resolution.sourceId,
|
|
1613
|
+
pluginName: childName,
|
|
1614
|
+
});
|
|
1615
|
+
let childResult;
|
|
1616
|
+
for (const childScope of dependencyPlacementsFor(childId, dependencyScope)) {
|
|
1617
|
+
const candidate = await inspectDependencyAtScope(childName, childScope);
|
|
1618
|
+
if (candidate.state === 'ready') {
|
|
1619
|
+
childResult = candidate;
|
|
1620
|
+
break;
|
|
1621
|
+
}
|
|
1622
|
+
if (!childResult
|
|
1623
|
+
|| dependencyPriority[candidate.state]
|
|
1624
|
+
> dependencyPriority[childResult.state]) {
|
|
1625
|
+
childResult = candidate;
|
|
1626
|
+
}
|
|
1627
|
+
}
|
|
1628
|
+
if (childResult?.state !== 'ready') {
|
|
1629
|
+
return {
|
|
1630
|
+
...childResult,
|
|
1631
|
+
dependencyScope,
|
|
1632
|
+
};
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
return { state: 'ready', dependencyScope };
|
|
1636
|
+
})().catch((error) => {
|
|
1637
|
+
throwIfCancelled(error);
|
|
1638
|
+
return {
|
|
1639
|
+
state: 'error',
|
|
1640
|
+
dependencyScope,
|
|
1641
|
+
rootIssueId: `diagnostic:${dependencyId}:${platform}:${dependencyScope}`,
|
|
1642
|
+
rootIssueCode: 'diagnostic',
|
|
1643
|
+
issuePluginId: dependencyId,
|
|
1644
|
+
issueScope: dependencyScope,
|
|
1645
|
+
};
|
|
1646
|
+
});
|
|
1647
|
+
dependencyInspectionCache.set(inspectionCacheKey, inspection);
|
|
1648
|
+
return inspection;
|
|
1649
|
+
}
|
|
1650
|
+
// Inspect dependencies for returned live placements and selected project Agents.
|
|
1651
|
+
const dependencyObservationRequested = platforms.includes(platform) && scopes.includes(scope)
|
|
1652
|
+
|| scope === 'project' && projectObservationPlatforms.includes(platform);
|
|
1653
|
+
if (dependencyObservationRequested && directDependencies.length > 0
|
|
1654
|
+
&& (desiredInScope
|
|
1655
|
+
|| actualCodexActivation
|
|
1656
|
+
|| hasScopedExtensionResidue
|
|
1657
|
+
|| (platform !== 'codex'
|
|
1658
|
+
&& (liveState === 'present' || liveState === 'partial')))) {
|
|
1053
1659
|
for (const dependencyName of directDependencies) {
|
|
1054
1660
|
const dependencyId = formatPluginId({
|
|
1055
1661
|
sourceId: item.resolution.sourceId,
|
|
@@ -1103,118 +1709,12 @@ export async function statusCommandV7(options) {
|
|
|
1103
1709
|
}, 'partial'));
|
|
1104
1710
|
continue;
|
|
1105
1711
|
}
|
|
1106
|
-
const
|
|
1107
|
-
let dependencyPluginPromise = dependencyPluginCache.get(pluginCacheKey);
|
|
1108
|
-
if (!dependencyPluginPromise) {
|
|
1109
|
-
dependencyPluginPromise = readPluginManifest(path.join(item.resolution.rootDir, 'plugins', dependencyName), { mode: 'bundle' }).then((dependencyPlugin) => {
|
|
1110
|
-
dependencyPlugin.sourceId = item.resolution.sourceId;
|
|
1111
|
-
dependencyPlugin.sourceIdentity = item.resolution.sourceIdentity;
|
|
1112
|
-
dependencyPlugin.pluginId = dependencyId;
|
|
1113
|
-
return dependencyPlugin;
|
|
1114
|
-
});
|
|
1115
|
-
dependencyPluginCache.set(pluginCacheKey, dependencyPluginPromise);
|
|
1116
|
-
}
|
|
1117
|
-
const dependencyOverride = (scope === 'project'
|
|
1118
|
-
? projectIntent
|
|
1119
|
-
: userIntent).dependencyScopeOverrides.find((override) => override.pluginId === dependencyId
|
|
1120
|
-
&& (override.platform === undefined || override.platform === platform));
|
|
1121
|
-
const placements = dependencyOverride
|
|
1122
|
-
? [dependencyOverride.scope]
|
|
1123
|
-
: scope === 'project' ? ['project', 'user'] : ['user'];
|
|
1712
|
+
const placements = dependencyPlacementsFor(dependencyId, scope);
|
|
1124
1713
|
let dependencyResult = {
|
|
1125
1714
|
state: 'absent',
|
|
1126
1715
|
};
|
|
1127
1716
|
for (const dependencyScope of placements) {
|
|
1128
|
-
const
|
|
1129
|
-
item.resolution.sourceIdentity,
|
|
1130
|
-
dependencyId,
|
|
1131
|
-
platform,
|
|
1132
|
-
dependencyScope,
|
|
1133
|
-
dependencyScope === 'project' ? currentProjectKey : '',
|
|
1134
|
-
].join('\0');
|
|
1135
|
-
let dependencyInspection = dependencyInspectionCache.get(inspectionCacheKey);
|
|
1136
|
-
if (!dependencyInspection) {
|
|
1137
|
-
dependencyInspection = dependencyPluginPromise.then(async (dependencyPlugin) => {
|
|
1138
|
-
dependencyInspectionHookForTests?.();
|
|
1139
|
-
const dependencyMarketplaceName = marketplaceNameFor(dependencyName, platform, dependencyScope);
|
|
1140
|
-
const dependencyInspected = await inspectRebuildTarget({
|
|
1141
|
-
sourceId: item.resolution.sourceId,
|
|
1142
|
-
sourceIdentity: item.resolution.sourceIdentity,
|
|
1143
|
-
pluginId: dependencyId,
|
|
1144
|
-
marketplaceName: dependencyMarketplaceName,
|
|
1145
|
-
marketplaceRoot,
|
|
1146
|
-
plugin: dependencyPlugin,
|
|
1147
|
-
platform,
|
|
1148
|
-
scope: dependencyScope,
|
|
1149
|
-
cwd: options.cwd,
|
|
1150
|
-
catalog: { rootDir: item.resolution.rootDir, source: 'local' },
|
|
1151
|
-
context: {
|
|
1152
|
-
env,
|
|
1153
|
-
nativeCliRunner,
|
|
1154
|
-
reporter: createNoopReporter(),
|
|
1155
|
-
debugLogger: createNoopDebugLogger(),
|
|
1156
|
-
},
|
|
1157
|
-
userActivationDesired: codexDesiredUserActivationIds,
|
|
1158
|
-
nativeProbe: readOnlyNativeProbe({
|
|
1159
|
-
pluginName: dependencyName,
|
|
1160
|
-
sourceId: item.resolution.sourceId,
|
|
1161
|
-
sourceIdentity: item.resolution.sourceIdentity,
|
|
1162
|
-
platform,
|
|
1163
|
-
scope: dependencyScope,
|
|
1164
|
-
marketplaceName: dependencyMarketplaceName,
|
|
1165
|
-
marketplaceRoot,
|
|
1166
|
-
desired: sourceDesired.get(desiredTargetKey(dependencyId, platform))
|
|
1167
|
-
?.scopes.includes(dependencyScope) === true,
|
|
1168
|
-
}),
|
|
1169
|
-
shallow: true,
|
|
1170
|
-
});
|
|
1171
|
-
const dependencyLiveState = projectedLiveState({
|
|
1172
|
-
inspection: dependencyInspected.inspection,
|
|
1173
|
-
required: dependencyInspected.target.desiredOwnedComponents
|
|
1174
|
-
?? dependencyInspected.target.ownedComponents,
|
|
1175
|
-
optional: dependencyInspected.target.optionalOwnedComponents ?? [],
|
|
1176
|
-
});
|
|
1177
|
-
const collision = dependencyInspected.inspection.components.find((component) => component.collision)?.collision;
|
|
1178
|
-
if (collision) {
|
|
1179
|
-
return {
|
|
1180
|
-
state: 'blockedByCollision',
|
|
1181
|
-
dependencyScope,
|
|
1182
|
-
rootIssueId: collisionRootIssueId({
|
|
1183
|
-
pluginId: dependencyId,
|
|
1184
|
-
platform,
|
|
1185
|
-
scope: dependencyScope,
|
|
1186
|
-
collision,
|
|
1187
|
-
}),
|
|
1188
|
-
rootIssueCode: 'artifactCollision',
|
|
1189
|
-
};
|
|
1190
|
-
}
|
|
1191
|
-
return {
|
|
1192
|
-
state: dependencyLiveState === 'present' ? 'ready'
|
|
1193
|
-
: dependencyLiveState === 'absent' ? 'absent'
|
|
1194
|
-
: dependencyLiveState === 'partial' ? 'incomplete'
|
|
1195
|
-
: 'error',
|
|
1196
|
-
dependencyScope,
|
|
1197
|
-
...(dependencyLiveState === 'partial'
|
|
1198
|
-
? {
|
|
1199
|
-
rootIssueId: `incompleteInstallation:${dependencyId}:${platform}:${dependencyScope}`,
|
|
1200
|
-
rootIssueCode: 'incompleteInstallation',
|
|
1201
|
-
}
|
|
1202
|
-
: dependencyLiveState === 'error'
|
|
1203
|
-
? {
|
|
1204
|
-
rootIssueId: `diagnostic:${dependencyId}:${platform}:${dependencyScope}`,
|
|
1205
|
-
rootIssueCode: 'diagnostic',
|
|
1206
|
-
}
|
|
1207
|
-
: {}),
|
|
1208
|
-
};
|
|
1209
|
-
}).catch(() => ({
|
|
1210
|
-
state: 'error',
|
|
1211
|
-
dependencyScope,
|
|
1212
|
-
rootIssueId: `diagnostic:${dependencyId}:${platform}:${dependencyScope}`,
|
|
1213
|
-
rootIssueCode: 'diagnostic',
|
|
1214
|
-
}));
|
|
1215
|
-
dependencyInspectionCache.set(inspectionCacheKey, dependencyInspection);
|
|
1216
|
-
}
|
|
1217
|
-
const candidate = await dependencyInspection;
|
|
1717
|
+
const candidate = await inspectDependencyAtScope(dependencyName, dependencyScope);
|
|
1218
1718
|
if (candidate.state === 'ready') {
|
|
1219
1719
|
dependencyResult = candidate;
|
|
1220
1720
|
break;
|
|
@@ -1230,7 +1730,7 @@ export async function statusCommandV7(options) {
|
|
|
1230
1730
|
dependencyResult = candidate;
|
|
1231
1731
|
}
|
|
1232
1732
|
}
|
|
1233
|
-
if (dependencyResult.state === 'absent') {
|
|
1733
|
+
if (dependencyResult.state === 'absent' && !dependencyResult.rootIssueId) {
|
|
1234
1734
|
const dependencyScope = dependencyResult.dependencyScope ?? placements[0];
|
|
1235
1735
|
dependencyResult = {
|
|
1236
1736
|
state: 'absent',
|
|
@@ -1245,28 +1745,46 @@ export async function statusCommandV7(options) {
|
|
|
1245
1745
|
dependencyPlatform: platform,
|
|
1246
1746
|
dependencyScope,
|
|
1247
1747
|
dependencyProject: dependencyScope === 'project' ? 'current' : null,
|
|
1248
|
-
|
|
1748
|
+
state: dependencyResult.state,
|
|
1749
|
+
...(dependencyResult.rootIssueId
|
|
1750
|
+
? { rootIssueId: dependencyResult.rootIssueId }
|
|
1751
|
+
: {}),
|
|
1752
|
+
...(dependencyResult.rootIssueCode
|
|
1753
|
+
? { rootIssueCode: dependencyResult.rootIssueCode }
|
|
1754
|
+
: {}),
|
|
1249
1755
|
});
|
|
1756
|
+
const issuePluginId = dependencyResult.issuePluginId ?? dependencyId;
|
|
1757
|
+
const issueScope = dependencyResult.issueScope ?? dependencyScope;
|
|
1250
1758
|
if (dependencyResult.state === 'absent') {
|
|
1251
1759
|
dependencyErrors.push(finalizeTargetError({
|
|
1252
1760
|
code: 'dependencyMissing',
|
|
1253
|
-
message: `dependencyMissing: ${
|
|
1254
|
-
dependencyPluginId:
|
|
1761
|
+
message: `dependencyMissing: ${issuePluginId} is absent from its required live placement.`,
|
|
1762
|
+
dependencyPluginId: issuePluginId,
|
|
1255
1763
|
dependencyPlatform: platform,
|
|
1256
|
-
dependencyScope,
|
|
1257
|
-
dependencyProject:
|
|
1764
|
+
dependencyScope: issueScope,
|
|
1765
|
+
dependencyProject: issueScope === 'project' ? 'current' : null,
|
|
1258
1766
|
rootIssueId: dependencyResult.rootIssueId,
|
|
1259
1767
|
rootIssueCode: dependencyResult.rootIssueCode,
|
|
1260
1768
|
}, 'partial'));
|
|
1261
1769
|
}
|
|
1262
1770
|
else if (dependencyResult.state !== 'ready') {
|
|
1771
|
+
const code = dependencyResult.rootIssueCode === 'awCapabilityUnsupported'
|
|
1772
|
+
? 'awCapabilityUnsupported'
|
|
1773
|
+
: dependencyResult.rootIssueCode === 'dependencyGraphInvalid'
|
|
1774
|
+
? 'dependencyGraphInvalid'
|
|
1775
|
+
: 'dependencyNotReady';
|
|
1776
|
+
const message = code === 'awCapabilityUnsupported'
|
|
1777
|
+
? `${code}: ${issuePluginId} requires unsupported AW capabilities: ${(dependencyResult.missingCapabilities ?? []).join(', ')}.`
|
|
1778
|
+
: code === 'dependencyGraphInvalid'
|
|
1779
|
+
? `${code}: dependency cycle includes ${issuePluginId}.`
|
|
1780
|
+
: `${code}: ${issuePluginId} is not ready at its required live placement.`;
|
|
1263
1781
|
dependencyErrors.push(finalizeTargetError({
|
|
1264
|
-
code
|
|
1265
|
-
message
|
|
1266
|
-
dependencyPluginId:
|
|
1782
|
+
code,
|
|
1783
|
+
message,
|
|
1784
|
+
dependencyPluginId: issuePluginId,
|
|
1267
1785
|
dependencyPlatform: platform,
|
|
1268
|
-
dependencyScope,
|
|
1269
|
-
dependencyProject:
|
|
1786
|
+
dependencyScope: issueScope,
|
|
1787
|
+
dependencyProject: issueScope === 'project' ? 'current' : null,
|
|
1270
1788
|
...(dependencyResult.rootIssueId
|
|
1271
1789
|
? { rootIssueId: dependencyResult.rootIssueId }
|
|
1272
1790
|
: {}),
|
|
@@ -1279,10 +1797,10 @@ export async function statusCommandV7(options) {
|
|
|
1279
1797
|
}
|
|
1280
1798
|
states[platform][scope] = {
|
|
1281
1799
|
state: liveState,
|
|
1282
|
-
errors: [...inspected.inspection.errors.map((error) =>
|
|
1800
|
+
errors: [...inspected.inspection.errors.map((error) => projectTargetError({
|
|
1283
1801
|
code: 'componentInspectionFailed',
|
|
1284
1802
|
message: `${error.label}: ${error.message}`,
|
|
1285
|
-
}, liveState)), ...collisionErrors, ...dependencyErrors],
|
|
1803
|
+
}, env, options.cwd, liveState)), ...collisionErrors, ...dependencyErrors],
|
|
1286
1804
|
...(dependencyReadiness.length > 0 ? { dependencyReadiness } : {}),
|
|
1287
1805
|
components: inspected.inspection.components.map((component) => {
|
|
1288
1806
|
const projectedError = component.collision
|
|
@@ -1309,6 +1827,7 @@ export async function statusCommandV7(options) {
|
|
|
1309
1827
|
};
|
|
1310
1828
|
}
|
|
1311
1829
|
catch (error) {
|
|
1830
|
+
throwIfCancelled(error);
|
|
1312
1831
|
const message = error instanceof Error ? error.message : String(error);
|
|
1313
1832
|
const configErrorCode = platform === 'codex' && codexConfigErrors.length > 0
|
|
1314
1833
|
? codexSurface.nativeKinds.length > 0
|
|
@@ -1316,17 +1835,17 @@ export async function statusCommandV7(options) {
|
|
|
1316
1835
|
: 'codexActivationDrift'
|
|
1317
1836
|
: undefined;
|
|
1318
1837
|
const code = configErrorCode
|
|
1319
|
-
??
|
|
1838
|
+
?? /^([A-Za-z][A-Za-z0-9]*):/u.exec(message)?.[1]
|
|
1320
1839
|
?? 'targetInspectionFailed';
|
|
1321
1840
|
states[platform][scope] = {
|
|
1322
1841
|
state: 'error',
|
|
1323
1842
|
components: [],
|
|
1324
|
-
errors: [
|
|
1843
|
+
errors: [projectTargetError({
|
|
1325
1844
|
code,
|
|
1326
1845
|
message: configErrorCode
|
|
1327
1846
|
? `${configErrorCode}: Codex activation state is unreadable.`
|
|
1328
1847
|
: message,
|
|
1329
|
-
}, 'error')],
|
|
1848
|
+
}, env, options.cwd, 'error')],
|
|
1330
1849
|
};
|
|
1331
1850
|
}
|
|
1332
1851
|
}
|
|
@@ -1349,9 +1868,7 @@ export async function statusCommandV7(options) {
|
|
|
1349
1868
|
activations: {},
|
|
1350
1869
|
};
|
|
1351
1870
|
let residueFailed = false;
|
|
1352
|
-
const hasNativeRenderTargets =
|
|
1353
|
-
&& target.target === 'codex.skill'
|
|
1354
|
-
&& target.delivery?.mode === 'codex-native');
|
|
1871
|
+
const hasNativeRenderTargets = plugin.manifest.artifacts !== undefined;
|
|
1355
1872
|
const sharedInspection = codexSurface.nativeKinds.length > 0
|
|
1356
1873
|
? await inspectCodexSharedNativeLive({
|
|
1357
1874
|
pluginName: entry.name,
|
|
@@ -1365,7 +1882,8 @@ export async function statusCommandV7(options) {
|
|
|
1365
1882
|
nativeCliRunner,
|
|
1366
1883
|
pluginRegistration,
|
|
1367
1884
|
...(hasNativeRenderTargets ? { nativeRenderPlugin: plugin } : {}),
|
|
1368
|
-
}).catch(() => {
|
|
1885
|
+
}).catch((error) => {
|
|
1886
|
+
throwIfCancelled(error);
|
|
1369
1887
|
residueFailed = true;
|
|
1370
1888
|
return undefined;
|
|
1371
1889
|
})
|
|
@@ -1414,16 +1932,11 @@ export async function statusCommandV7(options) {
|
|
|
1414
1932
|
?.snapshot.plugins[codexPluginId]?.enabled;
|
|
1415
1933
|
const configuredProjectActivation = projectCodexConfig
|
|
1416
1934
|
?.snapshot.plugins[codexPluginId]?.enabled;
|
|
1417
|
-
const userActivation =
|
|
1418
|
-
|
|
1419
|
-
: configuredUserActivation;
|
|
1420
|
-
const projectActivation = sharedInspection?.activationObservations.project
|
|
1421
|
-
&& configuredProjectActivation !== undefined
|
|
1422
|
-
? configuredProjectActivation && sharedInspection.activations.project === true
|
|
1423
|
-
: configuredProjectActivation;
|
|
1935
|
+
const userActivation = configuredUserActivation;
|
|
1936
|
+
const projectActivation = configuredProjectActivation;
|
|
1424
1937
|
const activationObserved = registrationScope === 'project'
|
|
1425
|
-
?
|
|
1426
|
-
:
|
|
1938
|
+
? userCodexConfig !== undefined && projectCodexConfig !== undefined
|
|
1939
|
+
: userCodexConfig !== undefined;
|
|
1427
1940
|
codexStatus = {
|
|
1428
1941
|
pluginId: codexPluginId,
|
|
1429
1942
|
nativeKinds: codexSurface.nativeKinds,
|
|
@@ -1433,7 +1946,7 @@ export async function statusCommandV7(options) {
|
|
|
1433
1946
|
...(userActivation !== undefined ? { user: userActivation } : {}),
|
|
1434
1947
|
...(projectActivation !== undefined ? { project: projectActivation } : {}),
|
|
1435
1948
|
...((userActivation !== undefined || projectActivation !== undefined)
|
|
1436
|
-
? { effective: projectActivation
|
|
1949
|
+
? { effective: (projectActivation ?? userActivation) === true }
|
|
1437
1950
|
: {}),
|
|
1438
1951
|
evidence: activationObserved ? 'observed' : 'assumed',
|
|
1439
1952
|
},
|
|
@@ -1446,6 +1959,7 @@ export async function statusCommandV7(options) {
|
|
|
1446
1959
|
shortDescription: plugin.manifest.interface?.shortDescription
|
|
1447
1960
|
?? plugin.manifest.description,
|
|
1448
1961
|
description: plugin.manifest.description,
|
|
1962
|
+
platforms: [...resolveSupportedPlatforms(plugin.manifest)],
|
|
1449
1963
|
...(plugin.manifest.config?.fields
|
|
1450
1964
|
? { configSchema: plugin.manifest.config.fields }
|
|
1451
1965
|
: {}),
|
|
@@ -1475,6 +1989,7 @@ export async function statusCommandV7(options) {
|
|
|
1475
1989
|
};
|
|
1476
1990
|
}
|
|
1477
1991
|
catch (error) {
|
|
1992
|
+
throwIfCancelled(error);
|
|
1478
1993
|
const sanitized = sanitizeCatalogSourceError(error, env);
|
|
1479
1994
|
return {
|
|
1480
1995
|
...base,
|
|
@@ -1488,6 +2003,86 @@ export async function statusCommandV7(options) {
|
|
|
1488
2003
|
const available = catalog.sources.flatMap((source) => 'plugins' in source
|
|
1489
2004
|
? source.plugins.map((plugin) => ({ ...plugin, source }))
|
|
1490
2005
|
: []);
|
|
2006
|
+
const removedProjectionReferences = [];
|
|
2007
|
+
for (const source of catalog.sources) {
|
|
2008
|
+
throwIfCancelled();
|
|
2009
|
+
if (!('plugins' in source))
|
|
2010
|
+
continue;
|
|
2011
|
+
const marketplaceRoot = path.join(resolveAwHome(env), 'marketplaces', source.id);
|
|
2012
|
+
try {
|
|
2013
|
+
const root = await readStrictNamespacedMarketplaceRoot({
|
|
2014
|
+
rootDir: marketplaceRoot, sourceId: source.id, sourceIdentity: source.identity,
|
|
2015
|
+
});
|
|
2016
|
+
if (!root)
|
|
2017
|
+
continue;
|
|
2018
|
+
const currentNames = new Set(source.plugins.map((plugin) => plugin.name));
|
|
2019
|
+
const candidates = new Map();
|
|
2020
|
+
const add = (name, platform) => {
|
|
2021
|
+
if (typeof name !== 'string' || currentNames.has(name))
|
|
2022
|
+
return;
|
|
2023
|
+
try {
|
|
2024
|
+
if (parsePluginId(name).sourceId !== undefined)
|
|
2025
|
+
return;
|
|
2026
|
+
}
|
|
2027
|
+
catch {
|
|
2028
|
+
return;
|
|
2029
|
+
}
|
|
2030
|
+
const supported = candidates.get(name) ?? new Set();
|
|
2031
|
+
supported.add(platform);
|
|
2032
|
+
candidates.set(name, supported);
|
|
2033
|
+
};
|
|
2034
|
+
for (const [platform, manifest] of [
|
|
2035
|
+
['codex', root.agentsManifest], ['claude', root.claudeManifest],
|
|
2036
|
+
]) {
|
|
2037
|
+
if (!Array.isArray(manifest?.plugins))
|
|
2038
|
+
continue;
|
|
2039
|
+
for (const plugin of manifest.plugins) {
|
|
2040
|
+
if (plugin && typeof plugin === 'object')
|
|
2041
|
+
add(plugin.name, platform);
|
|
2042
|
+
}
|
|
2043
|
+
}
|
|
2044
|
+
const pluginsRoot = path.join(root.rootDir, 'plugins');
|
|
2045
|
+
const pluginsStats = await fs.promises.lstat(pluginsRoot).catch((error) => {
|
|
2046
|
+
if (error.code === 'ENOENT')
|
|
2047
|
+
return undefined;
|
|
2048
|
+
throw error;
|
|
2049
|
+
});
|
|
2050
|
+
if (pluginsStats && (!pluginsStats.isDirectory() || pluginsStats.isSymbolicLink())) {
|
|
2051
|
+
throw new Error('marketplaceRootInvalid: plugin projection directory is unsafe.');
|
|
2052
|
+
}
|
|
2053
|
+
if (pluginsStats) {
|
|
2054
|
+
for (const entry of await fs.promises.readdir(pluginsRoot, { withFileTypes: true })) {
|
|
2055
|
+
if (!candidates.has(entry.name))
|
|
2056
|
+
add(entry.name, 'codex');
|
|
2057
|
+
}
|
|
2058
|
+
}
|
|
2059
|
+
const registration = userCodexConfig?.snapshot.marketplaces[root.config.marketplaceName];
|
|
2060
|
+
if (platforms.includes('codex')
|
|
2061
|
+
&& isCanonicalCodexMarketplaceRegistration(registration, root.rootDir)
|
|
2062
|
+
&& (await inspectCodexSystemConsumer(options.scope === 'project' ? 'project' : 'user')).state === 'compatible') {
|
|
2063
|
+
const observed = await options.codexObservationSession.snapshot(root.config.marketplaceName, options.scope === 'user' ? 'user' : 'both');
|
|
2064
|
+
const suffix = `@${root.config.marketplaceName}`;
|
|
2065
|
+
for (const pluginId of [...(observed.exact?.keys() ?? []), ...(observed.neutral?.keys() ?? [])]) {
|
|
2066
|
+
if (pluginId.endsWith(suffix))
|
|
2067
|
+
add(pluginId.slice(0, -suffix.length), 'codex');
|
|
2068
|
+
}
|
|
2069
|
+
}
|
|
2070
|
+
for (const [pluginName, supported] of candidates) {
|
|
2071
|
+
for (const platform of supported)
|
|
2072
|
+
removedProjectionReferences.push({
|
|
2073
|
+
kind: 'namespacedMarketplace', location: path.join(root.rootDir, 'config.json'),
|
|
2074
|
+
sourceId: source.id, sourceIdentity: source.identity,
|
|
2075
|
+
marketplaceName: root.config.marketplaceName, pluginName, platform, scope: 'user',
|
|
2076
|
+
});
|
|
2077
|
+
}
|
|
2078
|
+
}
|
|
2079
|
+
catch (error) {
|
|
2080
|
+
throwIfCancelled(error);
|
|
2081
|
+
const projected = projectStateInventoryError(error, env, options.cwd);
|
|
2082
|
+
selectedInventoryErrors.push({ ...projected, relevance: { sourceId: source.id, global: false } });
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
const statusReferences = [...ownerInventory.references, ...removedProjectionReferences];
|
|
1491
2086
|
const desiredTargetStates = calculateDesiredTargetStates({
|
|
1492
2087
|
userIntent,
|
|
1493
2088
|
projectIntent,
|
|
@@ -1529,7 +2124,21 @@ export async function statusCommandV7(options) {
|
|
|
1529
2124
|
scopes,
|
|
1530
2125
|
currentProjectLocationKey,
|
|
1531
2126
|
}));
|
|
1532
|
-
|
|
2127
|
+
const selectorHasLiveOrIntent = statusReferences.some((reference) => (reference.kind === 'namespacedOwner' || reference.kind === 'namespacedMarketplace')
|
|
2128
|
+
&& reference.pluginName === selector.parsed.pluginName
|
|
2129
|
+
&& reference.sourceId !== undefined
|
|
2130
|
+
&& (selector.parsed.sourceId === undefined || reference.sourceId === selector.parsed.sourceId)
|
|
2131
|
+
&& platforms.some((platform) => platform === reference.platform)
|
|
2132
|
+
&& scopes.some((scope) => scope === reference.scope)
|
|
2133
|
+
&& (reference.scope !== 'project' || reference.projectKey === currentProjectKey))
|
|
2134
|
+
|| [userIntent, projectIntent].some((intent, index) => scopes.includes(index === 0 ? 'user' : 'project')
|
|
2135
|
+
&& intent.roots.some((root) => {
|
|
2136
|
+
const parsed = parsePluginId(root.pluginId);
|
|
2137
|
+
return parsed.pluginName === selector.parsed.pluginName
|
|
2138
|
+
&& (selector.parsed.sourceId === undefined || parsed.sourceId === selector.parsed.sourceId)
|
|
2139
|
+
&& root.platforms.some(coversPlatform);
|
|
2140
|
+
}));
|
|
2141
|
+
if (!selectorHasInventoryError && !selectorHasLiveOrIntent) {
|
|
1533
2142
|
selectorErrors.push({
|
|
1534
2143
|
code: 'pluginNotFound',
|
|
1535
2144
|
message: `Plugin "${selector.raw}" was not found in the selected catalog source set.`,
|
|
@@ -1642,7 +2251,7 @@ export async function statusCommandV7(options) {
|
|
|
1642
2251
|
const referenceSelected = (reference) => (reference.pluginName !== undefined
|
|
1643
2252
|
&& reference.platform !== undefined
|
|
1644
2253
|
&& reference.scope !== undefined
|
|
1645
|
-
&&
|
|
2254
|
+
&& coversPlatform(reference.platform)
|
|
1646
2255
|
&& scopes.includes(reference.scope)
|
|
1647
2256
|
&& (reference.scope !== 'project' || reference.projectKey === currentProjectKey)
|
|
1648
2257
|
&& (requested.length === 0 || referenceSelectors.some((selector) => selector.parsed.pluginName === reference.pluginName
|
|
@@ -1651,7 +2260,7 @@ export async function statusCommandV7(options) {
|
|
|
1651
2260
|
&& reference.pluginName !== undefined
|
|
1652
2261
|
&& reference.platform !== undefined
|
|
1653
2262
|
&& reference.scope !== undefined
|
|
1654
|
-
&&
|
|
2263
|
+
&& coversPlatform(reference.platform)
|
|
1655
2264
|
&& scopes.includes(reference.scope)
|
|
1656
2265
|
&& (requested.length === 0 || plannedSelectors.some((selector) => selector.parsed.pluginName === reference.pluginName)));
|
|
1657
2266
|
const missingSourceOwners = ownerInventory.references.filter((reference) => (reference.kind === 'namespacedOwner' || reference.kind === 'namespacedMarketplace')
|
|
@@ -1713,7 +2322,7 @@ export async function statusCommandV7(options) {
|
|
|
1713
2322
|
targets.push(...unavailableSourceTargets);
|
|
1714
2323
|
const availablePluginIds = new Set(available.map((entry) => formatPluginId({ sourceId: entry.source.id, pluginName: entry.name })));
|
|
1715
2324
|
const resolvedSourceIds = new Set(catalog.sources.flatMap((source) => 'plugins' in source ? [source.id] : []));
|
|
1716
|
-
const unavailableBundleReferences =
|
|
2325
|
+
const unavailableBundleReferences = statusReferences.filter((reference) => (reference.kind === 'namespacedOwner' || reference.kind === 'namespacedMarketplace')
|
|
1717
2326
|
&& reference.sourceId
|
|
1718
2327
|
&& configured.has(reference.sourceId)
|
|
1719
2328
|
&& resolvedSourceIds.has(reference.sourceId)
|
|
@@ -1723,7 +2332,7 @@ export async function statusCommandV7(options) {
|
|
|
1723
2332
|
sourceId: reference.sourceId,
|
|
1724
2333
|
pluginName: reference.pluginName,
|
|
1725
2334
|
})));
|
|
1726
|
-
const unavailableBundleTargets = [...new Map(unavailableBundleReferences.
|
|
2335
|
+
const unavailableBundleTargets = [...new Map((await Promise.all(unavailableBundleReferences.map(async (reference) => {
|
|
1727
2336
|
if (!reference.sourceId || !reference.pluginName
|
|
1728
2337
|
|| (reference.platform !== 'codex' && reference.platform !== 'claude')
|
|
1729
2338
|
|| (reference.scope !== 'user' && reference.scope !== 'project'))
|
|
@@ -1732,6 +2341,10 @@ export async function statusCommandV7(options) {
|
|
|
1732
2341
|
if (requested.length > 0 && !plannedSelectors.some((selector) => selector.parsed.pluginName === reference.pluginName
|
|
1733
2342
|
&& (selector.parsed.sourceId === undefined || selector.parsed.sourceId === reference.sourceId)))
|
|
1734
2343
|
return [];
|
|
2344
|
+
const registration = reference.platform === 'codex' && reference.marketplaceName
|
|
2345
|
+
? await inspectCodexRegistration(`${reference.pluginName}@${reference.marketplaceName}`, reference.scope)
|
|
2346
|
+
: undefined;
|
|
2347
|
+
const nativeUnknown = registration && registration.observation.state !== 'observed';
|
|
1735
2348
|
const target = {
|
|
1736
2349
|
pluginName: reference.pluginName,
|
|
1737
2350
|
sourceId: reference.sourceId,
|
|
@@ -1741,14 +2354,24 @@ export async function statusCommandV7(options) {
|
|
|
1741
2354
|
scope: reference.scope,
|
|
1742
2355
|
cwd: path.resolve(options.cwd),
|
|
1743
2356
|
state: 'error',
|
|
1744
|
-
components: [
|
|
2357
|
+
components: registration ? [{
|
|
2358
|
+
key: 'native',
|
|
2359
|
+
state: registration.observation.state !== 'observed' ? 'error'
|
|
2360
|
+
: registration.observation.value === 'installed' ? 'present' : 'absent',
|
|
2361
|
+
}] : [],
|
|
1745
2362
|
errors: [finalizeTargetError({
|
|
1746
2363
|
code: 'bundleUnavailable',
|
|
1747
2364
|
message: `bundleUnavailable: ${pluginId} has live state but is not present in the current source snapshot.`,
|
|
1748
|
-
}, 'error')
|
|
2365
|
+
}, 'error'), finalizeTargetError({
|
|
2366
|
+
code: 'removedPluginCleanupRequired',
|
|
2367
|
+
message: `removedPluginCleanupRequired: ${pluginId} was removed from the current Catalog and has remaining local state.`,
|
|
2368
|
+
}, 'error'), ...(nativeUnknown ? [finalizeTargetError({
|
|
2369
|
+
code: 'codexNativeObservationFailed',
|
|
2370
|
+
message: 'codexNativeObservationFailed: the remaining native installation could not be observed.',
|
|
2371
|
+
}, 'error')] : [])],
|
|
1749
2372
|
};
|
|
1750
2373
|
return [[`${pluginId}\0${reference.platform}\0${reference.scope}`, target]];
|
|
1751
|
-
})).values()];
|
|
2374
|
+
}))).flat()).values()];
|
|
1752
2375
|
targets.push(...unavailableBundleTargets);
|
|
1753
2376
|
const targetKeys = new Set(targets.map((target) => `${target.pluginId}\0${target.platform}\0${target.scope}`));
|
|
1754
2377
|
for (const [scope, intent] of [
|
|
@@ -1763,7 +2386,7 @@ export async function statusCommandV7(options) {
|
|
|
1763
2386
|
&& (selector.parsed.sourceId === undefined || selector.parsed.sourceId === parsed.sourceId))) {
|
|
1764
2387
|
continue;
|
|
1765
2388
|
}
|
|
1766
|
-
for (const platform of root.platforms.filter(
|
|
2389
|
+
for (const platform of root.platforms.filter(coversPlatform)) {
|
|
1767
2390
|
if (!scopes.includes(scope))
|
|
1768
2391
|
continue;
|
|
1769
2392
|
const key = `${root.pluginId}\0${platform}\0${scope}`;
|
|
@@ -1822,15 +2445,13 @@ export async function statusCommandV7(options) {
|
|
|
1822
2445
|
});
|
|
1823
2446
|
const decorateTarget = async (target, groupedScopes, groupedTargets) => {
|
|
1824
2447
|
const entry = selectedByPluginId.get(target.pluginId);
|
|
1825
|
-
const codex = entry?.codex;
|
|
2448
|
+
const codex = target.platform === 'codex' ? entry?.codex : undefined;
|
|
1826
2449
|
const desiredAll = desiredTargetStates.get(desiredTargetKey(target.pluginId, target.platform))
|
|
1827
2450
|
?? { scopes: [], relation: 'none' };
|
|
1828
|
-
const desired =
|
|
1829
|
-
?
|
|
1830
|
-
:
|
|
1831
|
-
|
|
1832
|
-
relation: desiredAll.relation,
|
|
1833
|
-
};
|
|
2451
|
+
const desired = {
|
|
2452
|
+
scopes: desiredAll.scopes.includes(target.scope) ? [target.scope] : [],
|
|
2453
|
+
relation: desiredAll.relation,
|
|
2454
|
+
};
|
|
1834
2455
|
const sharedNative = codex?.sharedNative ?? target.sharedNative;
|
|
1835
2456
|
const baseActivation = codex?.activation ?? target.activation;
|
|
1836
2457
|
const consumerScope = desired.scopes.includes('project')
|
|
@@ -1847,15 +2468,13 @@ export async function statusCommandV7(options) {
|
|
|
1847
2468
|
const activation = baseActivation && systemConsumer
|
|
1848
2469
|
? {
|
|
1849
2470
|
...baseActivation,
|
|
1850
|
-
evidence:
|
|
2471
|
+
evidence: systemConsumer.state === 'compatible'
|
|
1851
2472
|
? 'observed'
|
|
1852
2473
|
: systemConsumer.state === 'missing' ? 'assumed' : 'unobserved',
|
|
1853
2474
|
systemConsumer,
|
|
1854
2475
|
}
|
|
1855
2476
|
: baseActivation;
|
|
1856
|
-
const observationScopes =
|
|
1857
|
-
? [explicitScope]
|
|
1858
|
-
: desired.scopes.length > 0 ? desired.scopes : groupedScopes;
|
|
2477
|
+
const observationScopes = [target.scope];
|
|
1859
2478
|
const scopedTargets = groupedTargets.filter((candidate) => observationScopes.includes(candidate.scope));
|
|
1860
2479
|
const observedTargets = scopedTargets.length > 0 ? scopedTargets : groupedTargets;
|
|
1861
2480
|
const ownershipState = observedTargets.some((candidate) => candidate.state === 'error')
|
|
@@ -1867,6 +2486,8 @@ export async function statusCommandV7(options) {
|
|
|
1867
2486
|
: sharedNative?.staleCacheObserved
|
|
1868
2487
|
? 'partial'
|
|
1869
2488
|
: 'absent';
|
|
2489
|
+
const actualScopeEnabled = target.platform === 'codex'
|
|
2490
|
+
&& baseActivation?.[target.scope] === true;
|
|
1870
2491
|
const hasSourceError = observedTargets.some((candidate) => candidate.errors.some((error) => error.code === 'sourceMissing'
|
|
1871
2492
|
|| error.code === 'catalogSourceUnavailable'
|
|
1872
2493
|
|| error.code === 'bundleUnavailable'
|
|
@@ -1875,18 +2496,26 @@ export async function statusCommandV7(options) {
|
|
|
1875
2496
|
&& (codex?.extensionKinds.length ?? 0) > 0
|
|
1876
2497
|
&& desired.scopes.includes('user')
|
|
1877
2498
|
&& desired.scopes.includes('project');
|
|
1878
|
-
const
|
|
1879
|
-
const
|
|
2499
|
+
const expectedEnabled = desired.scopes.includes(target.scope);
|
|
2500
|
+
const inheritedUserActivation = target.platform === 'codex'
|
|
2501
|
+
&& target.scope === 'project'
|
|
2502
|
+
&& !expectedEnabled
|
|
2503
|
+
&& desiredAll.scopes.includes('user')
|
|
2504
|
+
&& activation?.user === true
|
|
2505
|
+
&& (codex?.nativeKinds.length ?? 0) > 0;
|
|
2506
|
+
const projectDisablesUserActivation = inheritedUserActivation && activation?.project === false;
|
|
2507
|
+
const redundantProjectActivation = inheritedUserActivation && activation?.project === true
|
|
2508
|
+
&& (codex?.extensionKinds.length ?? 0) === 0;
|
|
1880
2509
|
const activationDrift = target.platform === 'codex'
|
|
1881
2510
|
&& (codexConfigErrors.some((error) => error.scope === 'user' || observationScopes.includes(error.scope))
|
|
1882
2511
|
|| ((codex?.nativeKinds.length ?? 0) > 0
|
|
1883
|
-
&& (
|
|
1884
|
-
||
|
|
1885
|
-
||
|
|
1886
|
-
|| (!expectedProject && activation?.project === true))));
|
|
2512
|
+
&& (expectedEnabled && activation?.[target.scope] !== true
|
|
2513
|
+
|| !expectedEnabled && activation?.[target.scope] === true && !redundantProjectActivation
|
|
2514
|
+
|| projectDisablesUserActivation)));
|
|
1887
2515
|
const extensionComponents = observedTargets.flatMap((candidate) => candidate.components).filter((component) => component.key !== 'native'
|
|
1888
2516
|
&& !component.key.startsWith('activation-')
|
|
1889
2517
|
&& !component.key.startsWith('marketplace-'));
|
|
2518
|
+
const hasScopedExtensionResidue = extensionComponents.some((component) => component.state !== 'absent' || component.error !== undefined);
|
|
1890
2519
|
const extensions = target.platform !== 'codex'
|
|
1891
2520
|
|| (codex?.extensionKinds.length ?? 0) === 0
|
|
1892
2521
|
? undefined
|
|
@@ -1895,17 +2524,43 @@ export async function statusCommandV7(options) {
|
|
|
1895
2524
|
? 'conflict'
|
|
1896
2525
|
: extensionComponents.some((component) => component.error?.code === 'artifactCollision')
|
|
1897
2526
|
? 'conflict'
|
|
1898
|
-
:
|
|
2527
|
+
: extensionComponents.some((component) => component.state === 'partial' || component.state === 'error')
|
|
1899
2528
|
? 'drifted'
|
|
1900
|
-
:
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
? 'missing'
|
|
1905
|
-
: 'ready',
|
|
2529
|
+
: desired.scopes.length > 0 && (extensionComponents.length === 0
|
|
2530
|
+
|| extensionComponents.every((component) => component.state === 'absent'))
|
|
2531
|
+
? 'missing'
|
|
2532
|
+
: 'ready',
|
|
1906
2533
|
kinds: codex.extensionKinds,
|
|
1907
2534
|
};
|
|
1908
2535
|
const desiredEnabled = desired.scopes.length > 0;
|
|
2536
|
+
const projectDependencyIds = projectIntent.roots.some((root) => root.pluginId === target.pluginId && root.platforms.includes(target.platform))
|
|
2537
|
+
? projectDependencyClosureForTarget({
|
|
2538
|
+
pluginId: target.pluginId,
|
|
2539
|
+
platform: target.platform,
|
|
2540
|
+
available,
|
|
2541
|
+
})
|
|
2542
|
+
: new Set();
|
|
2543
|
+
const dependencyMoves = projectIntent.dependencyScopeOverrides.flatMap((override) => {
|
|
2544
|
+
if (override.scope !== 'project'
|
|
2545
|
+
|| (override.platform !== undefined && override.platform !== target.platform)
|
|
2546
|
+
|| !projectDependencyIds.has(override.pluginId)) {
|
|
2547
|
+
return [];
|
|
2548
|
+
}
|
|
2549
|
+
const dependencyDesired = desiredTargetStates.get(desiredTargetKey(override.pluginId, target.platform));
|
|
2550
|
+
if (!dependencyDesired?.scopes.includes('project')
|
|
2551
|
+
|| dependencyDesired.scopes.includes('user')) {
|
|
2552
|
+
return [];
|
|
2553
|
+
}
|
|
2554
|
+
const parsed = parsePluginId(override.pluginId);
|
|
2555
|
+
const hasPreservedUserActual = ownerInventory.references.some((reference) => reference.kind === 'namespacedOwner'
|
|
2556
|
+
&& reference.sourceId === parsed.sourceId
|
|
2557
|
+
&& reference.pluginName === parsed.pluginName
|
|
2558
|
+
&& reference.platform === target.platform
|
|
2559
|
+
&& reference.scope === 'user');
|
|
2560
|
+
return hasPreservedUserActual
|
|
2561
|
+
? [{ pluginId: override.pluginId, fromScope: 'user', toScope: 'project' }]
|
|
2562
|
+
: [];
|
|
2563
|
+
}).sort((left, right) => left.pluginId.localeCompare(right.pluginId, 'en'));
|
|
1909
2564
|
const consumerIssue = activation?.systemConsumer?.state === 'incompatible'
|
|
1910
2565
|
|| activation?.systemConsumer?.state === 'unresolved'
|
|
1911
2566
|
? activation.systemConsumer
|
|
@@ -1914,6 +2569,7 @@ export async function statusCommandV7(options) {
|
|
|
1914
2569
|
const baseTargetErrors = observedTargets.flatMap((candidate) => candidate.errors);
|
|
1915
2570
|
const hasBlockingBaseReason = baseTargetErrors.some((reason) => reason.severity === 'blocking');
|
|
1916
2571
|
const capabilityUnsupported = baseTargetErrors.some((reason) => reason.code === 'awCapabilityUnsupported');
|
|
2572
|
+
const dependencyNotReady = (target.dependencyReadiness ?? []).some((dependency) => dependency.state !== 'ready');
|
|
1917
2573
|
const state = hasSourceError && desiredEnabled
|
|
1918
2574
|
? 'blocked'
|
|
1919
2575
|
: consumerBlocking && desiredEnabled
|
|
@@ -1922,38 +2578,64 @@ export async function statusCommandV7(options) {
|
|
|
1922
2578
|
? 'blocked'
|
|
1923
2579
|
: sharedNative?.state === 'blocked' || hasBlockingBaseReason || capabilityUnsupported
|
|
1924
2580
|
? 'blocked'
|
|
1925
|
-
:
|
|
1926
|
-
?
|
|
1927
|
-
|
|
1928
|
-
: 'absent'
|
|
1929
|
-
: sharedNative?.state === 'missing'
|
|
1930
|
-
|| sharedNative?.state === 'replaceable'
|
|
1931
|
-
|| sharedNative?.state === 'unobserved'
|
|
2581
|
+
: sharedNative?.state === 'replaceable' && sharedNative.reason === 'damaged'
|
|
2582
|
+
? 'needsSync'
|
|
2583
|
+
: projectDisablesUserActivation
|
|
1932
2584
|
? 'needsSync'
|
|
1933
|
-
:
|
|
1934
|
-
? '
|
|
1935
|
-
:
|
|
1936
|
-
? '
|
|
1937
|
-
|
|
2585
|
+
: redundantProjectActivation && sharedNative?.state === 'usable' && !hasScopedExtensionResidue
|
|
2586
|
+
? 'ready'
|
|
2587
|
+
: !desiredEnabled
|
|
2588
|
+
? (target.platform === 'codex'
|
|
2589
|
+
? actualScopeEnabled || hasScopedExtensionResidue
|
|
2590
|
+
: ownershipState !== 'absent')
|
|
2591
|
+
|| desired.relation === 'managed'
|
|
2592
|
+
? 'orphaned'
|
|
2593
|
+
: 'absent'
|
|
2594
|
+
: dependencyMoves.length > 0
|
|
1938
2595
|
? 'needsSync'
|
|
1939
|
-
:
|
|
2596
|
+
: dependencyNotReady
|
|
2597
|
+
? 'needsSync'
|
|
2598
|
+
: sharedNative?.state === 'missing'
|
|
2599
|
+
|| sharedNative?.state === 'replaceable'
|
|
2600
|
+
|| sharedNative?.state === 'unobserved'
|
|
2601
|
+
? 'needsSync'
|
|
2602
|
+
: activationDrift || extensions?.state === 'drifted'
|
|
2603
|
+
? 'needsSync'
|
|
2604
|
+
: extensions?.state === 'missing'
|
|
2605
|
+
|| (target.platform !== 'codex' && ownershipState === 'absent')
|
|
2606
|
+
? 'needsSync'
|
|
2607
|
+
: ownershipState === 'partial' || ownershipState === 'error'
|
|
2608
|
+
? 'needsSync'
|
|
2609
|
+
: 'ready';
|
|
1940
2610
|
const stableErrors = [
|
|
1941
2611
|
...projectStatusSharedNativeReasons(sharedNative, baseTargetErrors.map((error) => error.code), desiredEnabled),
|
|
1942
2612
|
...(desiredOverlapConflict
|
|
1943
2613
|
? [blocking('codexExtensionScopeConflict', `${target.pluginId} has AW extensions desired at user and project scope.`)]
|
|
1944
2614
|
: []),
|
|
1945
2615
|
...(activationDrift && sharedNative?.state !== 'missing' && sharedNative?.state !== 'unobserved'
|
|
1946
|
-
? [warning('codexActivationDrift',
|
|
2616
|
+
? [warning('codexActivationDrift', projectDisablesUserActivation
|
|
2617
|
+
? `${target.pluginId} is enabled for the user but disabled by the current project.`
|
|
2618
|
+
: `${target.pluginId} activation differs from desired intent: `
|
|
2619
|
+
+ `${target.scope} expected=${expectedEnabled}, `
|
|
2620
|
+
+ `actual=${activation?.[target.scope] ?? 'unset'}.`)]
|
|
1947
2621
|
: []),
|
|
1948
2622
|
...(extensions?.state === 'drifted'
|
|
1949
2623
|
? [warning('codexExtensionDrift', `${target.pluginId} extension projection has drifted.`)]
|
|
1950
2624
|
: []),
|
|
2625
|
+
...dependencyMoves.map((move) => ({
|
|
2626
|
+
...warning('dependencyScopeMigrationCleanupRequired', `${move.pluginId} has preserved user-scope output after moving to project scope.`),
|
|
2627
|
+
dependencyPluginId: move.pluginId,
|
|
2628
|
+
dependencyPlatform: target.platform,
|
|
2629
|
+
dependencyScope: move.toScope,
|
|
2630
|
+
dependencyProject: 'current',
|
|
2631
|
+
})),
|
|
1951
2632
|
...(target.platform === 'codex' && hasSourceError && desiredEnabled
|
|
1952
2633
|
? [warning('codexIntentSourceUnavailable', `${target.pluginId} desired intent cannot be resolved from the current Catalog.`)]
|
|
1953
2634
|
: []),
|
|
1954
2635
|
...(target.platform === 'codex' && consumerBlocking && desiredEnabled
|
|
1955
2636
|
? [blocking(consumerIssue.code, consumerIssue.diagnostic)]
|
|
1956
2637
|
: []),
|
|
2638
|
+
...(activation?.systemConsumer?.diagnostics ?? []).map((diagnostic) => warning('codexCandidateExcluded', diagnostic)),
|
|
1957
2639
|
];
|
|
1958
2640
|
const targetErrors = [...baseTargetErrors, ...stableErrors];
|
|
1959
2641
|
const dedupedErrors = [...new Map(targetErrors.map((error) => [
|
|
@@ -1962,11 +2644,7 @@ export async function statusCommandV7(options) {
|
|
|
1962
2644
|
])).values()];
|
|
1963
2645
|
const ownershipComponents = [...new Map(observedTargets.flatMap((candidate) => candidate.components)
|
|
1964
2646
|
.map((component) => [component.key, component])).values()];
|
|
1965
|
-
const representativeScope =
|
|
1966
|
-
?? (desired.scopes.length === 1
|
|
1967
|
-
? desired.scopes[0]
|
|
1968
|
-
: observedTargets.find((candidate) => candidate.state !== 'absent')?.scope
|
|
1969
|
-
?? (groupedScopes.includes('user') ? 'user' : groupedScopes[0] ?? target.scope));
|
|
2647
|
+
const representativeScope = target.scope;
|
|
1970
2648
|
const representativeTarget = observedTargets.find((candidate) => candidate.scope === representativeScope) ?? target;
|
|
1971
2649
|
const components = [
|
|
1972
2650
|
{
|
|
@@ -2013,7 +2691,7 @@ export async function statusCommandV7(options) {
|
|
|
2013
2691
|
}]),
|
|
2014
2692
|
...(activation?.systemConsumer ? [{
|
|
2015
2693
|
kind: 'systemConsumer',
|
|
2016
|
-
key:
|
|
2694
|
+
key: `codex:${representativeScope}`,
|
|
2017
2695
|
state: activation.systemConsumer.state,
|
|
2018
2696
|
metadata: {
|
|
2019
2697
|
evidence: activation.evidence,
|
|
@@ -2025,6 +2703,9 @@ export async function statusCommandV7(options) {
|
|
|
2025
2703
|
...('diagnostic' in activation.systemConsumer
|
|
2026
2704
|
? { diagnostic: activation.systemConsumer.diagnostic }
|
|
2027
2705
|
: {}),
|
|
2706
|
+
...(activation.systemConsumer.diagnostics?.length
|
|
2707
|
+
? { diagnostics: activation.systemConsumer.diagnostics }
|
|
2708
|
+
: {}),
|
|
2028
2709
|
},
|
|
2029
2710
|
}] : []),
|
|
2030
2711
|
...(extensions ? [{
|
|
@@ -2053,12 +2734,18 @@ export async function statusCommandV7(options) {
|
|
|
2053
2734
|
state,
|
|
2054
2735
|
components,
|
|
2055
2736
|
reasons: dedupedErrors,
|
|
2056
|
-
recoveryActions:
|
|
2737
|
+
recoveryActions: projectDisablesUserActivation && state === 'needsSync' ? [{
|
|
2738
|
+
command: 'sync', scope: 'user',
|
|
2739
|
+
description: '移除当前项目的关闭设置,恢复使用所有项目已启用的插件。',
|
|
2740
|
+
}] : statusRecovery({
|
|
2057
2741
|
state,
|
|
2058
2742
|
desired,
|
|
2059
2743
|
platform: target.platform,
|
|
2060
2744
|
pluginId: target.pluginId,
|
|
2745
|
+
...(dependencyMoves.length > 0 ? { dependencyMoves } : {}),
|
|
2061
2746
|
...(sharedNative ? { sharedNative } : {}),
|
|
2747
|
+
scope: target.scope,
|
|
2748
|
+
actualEnabled: actualScopeEnabled,
|
|
2062
2749
|
conflictRoots: rootIntentsForTarget({
|
|
2063
2750
|
pluginId: target.pluginId,
|
|
2064
2751
|
platform: target.platform,
|
|
@@ -2067,7 +2754,9 @@ export async function statusCommandV7(options) {
|
|
|
2067
2754
|
available,
|
|
2068
2755
|
}),
|
|
2069
2756
|
errorCodes: dedupedErrors.map((error) => error.code),
|
|
2070
|
-
})
|
|
2757
|
+
}).map((action) => action.command === 'manual' || action.scope
|
|
2758
|
+
? action
|
|
2759
|
+
: { ...action, scope: representativeScope }),
|
|
2071
2760
|
};
|
|
2072
2761
|
};
|
|
2073
2762
|
const codexGroups = new Map();
|
|
@@ -2082,21 +2771,153 @@ export async function statusCommandV7(options) {
|
|
|
2082
2771
|
codexGroups.set(target.pluginId, group);
|
|
2083
2772
|
}
|
|
2084
2773
|
for (const group of codexGroups.values()) {
|
|
2085
|
-
const
|
|
2086
|
-
|
|
2774
|
+
const decorated = await Promise.all(group.map((target) => decorateTarget(target, [target.scope], [target])));
|
|
2775
|
+
const first = decorated[0];
|
|
2776
|
+
const entry = selectedByPluginId.get(first.pluginId);
|
|
2777
|
+
const desired = desiredTargetStates.get(desiredTargetKey(first.pluginId, 'codex'))
|
|
2778
|
+
?? { scopes: [], relation: 'none' };
|
|
2779
|
+
const returnedScopes = new Set(decorated.map((target) => target.scope));
|
|
2780
|
+
const desiredOverlapConflict = (entry?.codex?.extensionKinds.length ?? 0) > 0
|
|
2781
|
+
&& desired.scopes.includes('user')
|
|
2782
|
+
&& desired.scopes.includes('project')
|
|
2783
|
+
&& returnedScopes.has('user')
|
|
2784
|
+
&& returnedScopes.has('project');
|
|
2785
|
+
const sharedComponents = [...new Map(decorated.flatMap((target) => target.components)
|
|
2786
|
+
.filter((component) => component.kind === 'sharedNative' || component.kind === 'systemConsumer')
|
|
2787
|
+
.map((component) => [`${component.kind}\0${component.key}`, component])).values()];
|
|
2788
|
+
const sharedReason = (reason) => reason.code.startsWith('codexSharedNative') || reason.code === 'staleCacheObserved'
|
|
2789
|
+
|| reason.code === 'codexCandidateExcluded';
|
|
2790
|
+
const sharedReasons = decorated.flatMap((target) => target.reasons.filter(sharedReason));
|
|
2791
|
+
const placements = decorated.map((target) => ({
|
|
2792
|
+
scope: target.scope,
|
|
2793
|
+
state: target.state,
|
|
2794
|
+
components: target.components.filter((component) => component.kind !== 'sharedNative' && component.kind !== 'systemConsumer'),
|
|
2795
|
+
reasons: target.reasons.filter((reason) => !sharedReason(reason)),
|
|
2796
|
+
recoveryActions: target.recoveryActions,
|
|
2797
|
+
})).sort((left, right) => left.scope.localeCompare(right.scope, 'en'));
|
|
2798
|
+
const reasons = [...new Map([
|
|
2799
|
+
...placements.flatMap((placement) => placement.reasons),
|
|
2800
|
+
...sharedReasons,
|
|
2801
|
+
...(desiredOverlapConflict ? [blocking('codexExtensionScopeConflict', `${first.pluginId} has AW extensions desired at user and project scope.`)] : []),
|
|
2802
|
+
]
|
|
2803
|
+
.map((reason) => [`${reason.code}\0${reason.message}`, reason])).values()];
|
|
2804
|
+
const conflictRecovery = desiredOverlapConflict ? statusRecovery({
|
|
2805
|
+
state: 'blocked',
|
|
2806
|
+
desired,
|
|
2807
|
+
platform: 'codex',
|
|
2808
|
+
pluginId: first.pluginId,
|
|
2809
|
+
conflictRoots: rootIntentsForTarget({
|
|
2810
|
+
pluginId: first.pluginId,
|
|
2811
|
+
platform: 'codex',
|
|
2812
|
+
userIntent,
|
|
2813
|
+
projectIntent,
|
|
2814
|
+
available,
|
|
2815
|
+
}),
|
|
2816
|
+
errorCodes: ['codexExtensionScopeConflict'],
|
|
2817
|
+
}) : [];
|
|
2818
|
+
const recoveryActions = [...new Map((desiredOverlapConflict
|
|
2819
|
+
? conflictRecovery
|
|
2820
|
+
: placements.flatMap((placement) => placement.recoveryActions))
|
|
2821
|
+
.map((action) => [
|
|
2822
|
+
`${action.command}\0${action.scope ?? ''}\0${action.description}`,
|
|
2823
|
+
action,
|
|
2824
|
+
])).values()];
|
|
2825
|
+
const state = desiredOverlapConflict ? 'blocked'
|
|
2826
|
+
: ['blocked', 'needsSync', 'orphaned', 'ready', 'absent']
|
|
2827
|
+
.find((candidate) => placements.some((placement) => placement.state === candidate));
|
|
2828
|
+
projectedTargets.push({
|
|
2829
|
+
pluginName: first.pluginName,
|
|
2830
|
+
sourceId: first.sourceId,
|
|
2831
|
+
sourceIdentity: first.sourceIdentity,
|
|
2832
|
+
pluginId: first.pluginId,
|
|
2833
|
+
...(first.version ? { version: first.version } : {}),
|
|
2834
|
+
platform: 'codex',
|
|
2835
|
+
cwd: first.cwd,
|
|
2836
|
+
state,
|
|
2837
|
+
components: sharedComponents,
|
|
2838
|
+
reasons,
|
|
2839
|
+
recoveryActions,
|
|
2840
|
+
placements,
|
|
2841
|
+
});
|
|
2087
2842
|
}
|
|
2088
|
-
projectedTargets.sort((left, right) => `${left.pluginId}\0${left.platform}
|
|
2089
|
-
const targetRevisions = projectedTargets.
|
|
2843
|
+
projectedTargets.sort((left, right) => `${left.pluginId}\0${left.platform}`.localeCompare(`${right.pluginId}\0${right.platform}`, 'en'));
|
|
2844
|
+
const targetRevisions = projectedTargets.flatMap((target) => {
|
|
2090
2845
|
const entry = selectedByPluginId.get(target.pluginId);
|
|
2091
|
-
|
|
2846
|
+
const placements = target.platform === 'codex' ? target.placements : [target];
|
|
2847
|
+
return placements.map((placement) => ({
|
|
2092
2848
|
pluginId: target.pluginId,
|
|
2093
2849
|
platform: target.platform,
|
|
2094
|
-
scope:
|
|
2095
|
-
revision: projectTargetRevision(entry?.version, entry?.states[target.platform]?.[
|
|
2096
|
-
};
|
|
2850
|
+
scope: placement.scope,
|
|
2851
|
+
revision: projectTargetRevision(entry?.version, entry?.states[target.platform]?.[placement.scope]?.installedVersion),
|
|
2852
|
+
}));
|
|
2097
2853
|
});
|
|
2854
|
+
const publicConfigIssues = available.flatMap((entry) => (entry.configIssues ?? [])
|
|
2855
|
+
.filter((issue) => issue.type === 'configLayerUnsupported')
|
|
2856
|
+
.map((issue) => ({
|
|
2857
|
+
pluginId: formatPluginId({ sourceId: entry.source.id, pluginName: entry.name }),
|
|
2858
|
+
pluginName: entry.name,
|
|
2859
|
+
...issue,
|
|
2860
|
+
})));
|
|
2861
|
+
const nativeObservations = available.flatMap((entry) => ['codex', 'claude'].map((platform) => {
|
|
2862
|
+
const observed = entry.states[platform]?.[scope];
|
|
2863
|
+
const blockers = (observed?.errors ?? []).map((error) => ({
|
|
2864
|
+
code: error.code, message: `${error.code}: 项目 Native 目标尚未满足。`,
|
|
2865
|
+
}));
|
|
2866
|
+
const nativeInventoryErrors = inventoryErrors.filter((error) => inventoryErrorMatchesSelection({
|
|
2867
|
+
error,
|
|
2868
|
+
selectors: [{ raw: `${entry.source.id}/${entry.name}`, parsed: {
|
|
2869
|
+
sourceId: entry.source.id, pluginName: entry.name,
|
|
2870
|
+
} }],
|
|
2871
|
+
platformExplicit: true, scopeExplicit: true, platforms: [platform], scopes: [scope],
|
|
2872
|
+
currentProjectLocationKey,
|
|
2873
|
+
}));
|
|
2874
|
+
blockers.push(...nativeInventoryErrors.map((error) => ({
|
|
2875
|
+
code: error.code, message: `${error.code}: 无法读取项目 Native 现场。`,
|
|
2876
|
+
})));
|
|
2877
|
+
if (platform === 'codex' && codexConfigErrors.some((error) => error.scope === scope
|
|
2878
|
+
|| scope === 'project' && error.scope === 'user')) {
|
|
2879
|
+
blockers.push({ code: 'nativeStateUnreadable', message: '无法读取 Codex 激活配置。' });
|
|
2880
|
+
}
|
|
2881
|
+
const scopedPreferences = observedDemands.get(scope)?.preferences;
|
|
2882
|
+
if (entry.configDiagnostic?.scope === scope && scopedPreferences?.state === 'valid'
|
|
2883
|
+
&& resolveActiveConfigPlatforms(`${entry.source.id}/${entry.name}`, { platforms: entry.platforms }, scopedPreferences).includes(platform)) {
|
|
2884
|
+
blockers.push({ code: 'configInvalid', message: 'Plugin configuration could not be read.', detail: { reasonCode: 'configReadFailed' } });
|
|
2885
|
+
}
|
|
2886
|
+
const configBlockers = configStatusDiagnostics((entry.configIssues ?? []).flatMap((issue) => issue.scope === scope && issue.platform === platform && (issue.type === 'missing-required' || issue.type === 'invalid-config')
|
|
2887
|
+
? [{ type: issue.type, key: issue.key, message: '' }] : []));
|
|
2888
|
+
blockers.push(...configBlockers);
|
|
2889
|
+
if (observed?.state === 'error' && !blockers.some((error) => /Unsupported$|collision|conflict|foreign/iu.test(error.code))) {
|
|
2890
|
+
blockers.push({ code: 'nativeObservationFailed', message: '无法完成项目 Native 现场观察。' });
|
|
2891
|
+
}
|
|
2892
|
+
let content = !observed ? 'unknown'
|
|
2893
|
+
: observed.state === 'absent' ? 'absent'
|
|
2894
|
+
: observed.state === 'present' ? 'satisfied'
|
|
2895
|
+
: observed.state === 'partial' ? 'drifted' : 'unknown';
|
|
2896
|
+
if (blockers.some((blocker) => /collision|conflict|foreign/iu.test(blocker.code)))
|
|
2897
|
+
content = 'conflict';
|
|
2898
|
+
if (platform === 'codex' && entry.codex?.nativeKinds.length) {
|
|
2899
|
+
const shared = entry.codex.sharedNative;
|
|
2900
|
+
if (shared?.state === 'missing')
|
|
2901
|
+
content = 'absent';
|
|
2902
|
+
else if (shared?.state === 'replaceable')
|
|
2903
|
+
content = 'drifted';
|
|
2904
|
+
else if (shared?.state === 'blocked')
|
|
2905
|
+
content = shared.reason === 'foreign' ? 'conflict' : 'unknown';
|
|
2906
|
+
else if (!shared || shared.state === 'unobserved')
|
|
2907
|
+
content = 'unknown';
|
|
2908
|
+
if (content === 'satisfied' && entry.codex.activation.effective !== true)
|
|
2909
|
+
content = 'absent';
|
|
2910
|
+
}
|
|
2911
|
+
return {
|
|
2912
|
+
pluginId: `${entry.source.id}/${entry.name}`, platform, content, blockers,
|
|
2913
|
+
backend: flattenStatusTargets(projectedTargets).find((target) => target.pluginId === `${entry.source.id}/${entry.name}`
|
|
2914
|
+
&& target.platform === platform && target.scope === scope),
|
|
2915
|
+
...(platform === 'codex' && entry.codex?.activation.evidence === 'assumed'
|
|
2916
|
+
? { assumedActivation: true } : {}),
|
|
2917
|
+
};
|
|
2918
|
+
}));
|
|
2098
2919
|
const payload = {
|
|
2099
|
-
schemaVersion:
|
|
2920
|
+
schemaVersion: 8,
|
|
2100
2921
|
catalog: {
|
|
2101
2922
|
primarySourceId: catalog.primarySourceId,
|
|
2102
2923
|
configDigest: catalog.configDigest,
|
|
@@ -2118,6 +2939,7 @@ export async function statusCommandV7(options) {
|
|
|
2118
2939
|
cwd: path.resolve(options.cwd),
|
|
2119
2940
|
},
|
|
2120
2941
|
targets: projectedTargets,
|
|
2942
|
+
...(publicConfigIssues.length > 0 ? { configIssues: publicConfigIssues } : {}),
|
|
2121
2943
|
errors,
|
|
2122
2944
|
};
|
|
2123
2945
|
const hasErrors = payload.catalog.sources.some((source) => source.error !== undefined)
|
|
@@ -2125,9 +2947,20 @@ export async function statusCommandV7(options) {
|
|
|
2125
2947
|
|| payload.targets.some((target) => target.reasons.some((reason) => reason.severity === 'blocking'));
|
|
2126
2948
|
return {
|
|
2127
2949
|
payload,
|
|
2128
|
-
output: options.json ? JSON.stringify(payload) :
|
|
2950
|
+
output: options.json ? JSON.stringify(payload) : renderStatusV8(payload, options.verbose === true),
|
|
2129
2951
|
hasErrors,
|
|
2130
2952
|
targetRevisions,
|
|
2953
|
+
nativeObservations,
|
|
2954
|
+
nativeExtraObserved: ownerInventory.references.flatMap((reference) => {
|
|
2955
|
+
if (!reference.sourceId || !reference.pluginName || reference.scope !== scope
|
|
2956
|
+
|| !['namespacedOwner', 'namespacedConfig', 'namespacedMarketplace'].includes(reference.kind))
|
|
2957
|
+
return [];
|
|
2958
|
+
return [{ pluginId: `${reference.sourceId}/${reference.pluginName}`,
|
|
2959
|
+
...(reference.platform === 'codex' || reference.platform === 'claude'
|
|
2960
|
+
? { platform: reference.platform } : {}), scope, reference }];
|
|
2961
|
+
}),
|
|
2962
|
+
...(projectRoot ? { projectRoot } : {}),
|
|
2963
|
+
projectIntentObservation,
|
|
2131
2964
|
pluginSummaries: available.map((entry) => {
|
|
2132
2965
|
const sourceEntries = available.filter((candidate) => candidate.source.id === entry.source.id);
|
|
2133
2966
|
const byName = new Map(sourceEntries.map((candidate) => [candidate.name, candidate]));
|
|
@@ -2158,6 +2991,7 @@ export async function statusCommandV7(options) {
|
|
|
2158
2991
|
codex: ['user', 'project'].filter((scope) => entry.targets.codex[scope]),
|
|
2159
2992
|
claude: ['user', 'project'].filter((scope) => entry.targets.claude[scope]),
|
|
2160
2993
|
},
|
|
2994
|
+
...(entry.platforms ? { platforms: entry.platforms } : {}),
|
|
2161
2995
|
configFieldCount: Object.keys(entry.configSchema ?? {}).length,
|
|
2162
2996
|
...(entry.configSchema ? { configSchema: entry.configSchema } : {}),
|
|
2163
2997
|
...(entry.configIssues ? { configIssues: entry.configIssues } : {}),
|
|
@@ -2172,4 +3006,29 @@ export async function statusCommandV7(options) {
|
|
|
2172
3006
|
}),
|
|
2173
3007
|
};
|
|
2174
3008
|
}
|
|
3009
|
+
export async function statusCommandV8(options) {
|
|
3010
|
+
options.signal?.throwIfAborted();
|
|
3011
|
+
options = { ...options, nativeCliRunner: bindNativeCliRunnerSignal(options.nativeCliRunner ?? getDefaultNativeCliRunner(), options.signal) };
|
|
3012
|
+
if (options.codexObservationSession) {
|
|
3013
|
+
return statusCommandV8InSession({
|
|
3014
|
+
...options,
|
|
3015
|
+
codexObservationSession: options.codexObservationSession,
|
|
3016
|
+
});
|
|
3017
|
+
}
|
|
3018
|
+
const env = options.env ?? process.env;
|
|
3019
|
+
const session = await createCodexNativeObservationSession({
|
|
3020
|
+
exactCwd: options.cwd,
|
|
3021
|
+
env,
|
|
3022
|
+
runner: options.nativeCliRunner ?? getDefaultNativeCliRunner(),
|
|
3023
|
+
});
|
|
3024
|
+
try {
|
|
3025
|
+
options.signal?.throwIfAborted();
|
|
3026
|
+
const result = await statusCommandV8InSession({ ...options, codexObservationSession: session });
|
|
3027
|
+
options.signal?.throwIfAborted();
|
|
3028
|
+
return result;
|
|
3029
|
+
}
|
|
3030
|
+
finally {
|
|
3031
|
+
await session.dispose();
|
|
3032
|
+
}
|
|
3033
|
+
}
|
|
2175
3034
|
//# sourceMappingURL=status-v6.js.map
|