@lesliechan721/aw 0.1.0-beta.73 → 0.1.0-beta.75
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-runtime-config.mjs +65 -43
- package/dist/authoring/assets/aw-runtime-config.mjs.map +1 -1
- package/dist/authoring/scripts/add-skill.mjs +5 -14
- package/dist/authoring/scripts/add-skill.mjs.map +1 -1
- package/dist/authoring/scripts/init-plugin.mjs +4 -28
- package/dist/authoring/scripts/init-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/lib/plugin-version-check.mjs +2 -2
- package/dist/authoring/scripts/lib/plugin-version-check.mjs.map +1 -1
- package/dist/authoring/scripts/lib/skill-scaffold.mjs +0 -1
- package/dist/authoring/scripts/lib/skill-scaffold.mjs.map +1 -1
- package/dist/authoring/scripts/validate-plugin.mjs +234 -1422
- package/dist/authoring/scripts/validate-plugin.mjs.map +1 -1
- package/dist/scripts/aw-skill-eval-materializer.d.ts +2 -0
- package/dist/scripts/aw-skill-eval-materializer.js +19 -80
- package/dist/scripts/aw-skill-eval-materializer.js.map +1 -1
- package/dist/scripts/bundle-plugins.js.map +1 -1
- package/dist/scripts/test-plugin-scripts.js +6 -8
- package/dist/scripts/test-plugin-scripts.js.map +1 -1
- package/dist/src/commands/aw-capabilities.d.ts +1 -1
- package/dist/src/commands/aw-capabilities.js +2 -2
- package/dist/src/commands/aw-capabilities.js.map +1 -1
- package/dist/src/commands/dependency-operation-plan.js +3 -3
- package/dist/src/commands/dependency-operation-plan.js.map +1 -1
- package/dist/src/commands/deployment-confirmation.d.ts +4 -0
- package/dist/src/commands/deployment-confirmation.js +20 -0
- package/dist/src/commands/deployment-confirmation.js.map +1 -0
- package/dist/src/commands/managed-commands.js +4 -2
- package/dist/src/commands/managed-commands.js.map +1 -1
- package/dist/src/commands/offline-cleanup-evidence.d.ts +3 -1
- package/dist/src/commands/offline-cleanup-evidence.js +9 -4
- package/dist/src/commands/offline-cleanup-evidence.js.map +1 -1
- package/dist/src/commands/operation-plan.d.ts +6 -0
- package/dist/src/commands/operation-plan.js +29 -2
- package/dist/src/commands/operation-plan.js.map +1 -1
- package/dist/src/commands/options.d.ts +6 -2
- package/dist/src/commands/options.js +5 -4
- package/dist/src/commands/options.js.map +1 -1
- package/dist/src/commands/plugin-capabilities.js +29 -41
- package/dist/src/commands/plugin-capabilities.js.map +1 -1
- package/dist/src/commands/public-config-confirmation.js +5 -5
- package/dist/src/commands/public-config-confirmation.js.map +1 -1
- package/dist/src/commands/public-lifecycle-result.d.ts +47 -0
- package/dist/src/commands/public-lifecycle-result.js +125 -4
- package/dist/src/commands/public-lifecycle-result.js.map +1 -1
- package/dist/src/commands/public-lifecycle.d.ts +1 -0
- package/dist/src/commands/public-lifecycle.js +15 -2
- package/dist/src/commands/public-lifecycle.js.map +1 -1
- package/dist/src/commands/public-plugin-query.d.ts +1 -0
- package/dist/src/commands/public-plugin-query.js +27 -8
- package/dist/src/commands/public-plugin-query.js.map +1 -1
- package/dist/src/commands/rebuild-command.d.ts +12 -11
- package/dist/src/commands/rebuild-command.js +531 -769
- package/dist/src/commands/rebuild-command.js.map +1 -1
- package/dist/src/commands/rebuild-integration.d.ts +21 -43
- package/dist/src/commands/rebuild-integration.js +306 -3600
- package/dist/src/commands/rebuild-integration.js.map +1 -1
- package/dist/src/commands/rebuild-operations.d.ts +13 -0
- package/dist/src/commands/rebuild-operations.js +60 -15
- package/dist/src/commands/rebuild-operations.js.map +1 -1
- package/dist/src/commands/rebuild-platform-integration.d.ts +60 -0
- package/dist/src/commands/rebuild-platform-integration.js +1264 -0
- package/dist/src/commands/rebuild-platform-integration.js.map +1 -0
- package/dist/src/commands/review-inspection.js +41 -4
- package/dist/src/commands/review-inspection.js.map +1 -1
- package/dist/src/commands/review-preparation.d.ts +2 -0
- package/dist/src/commands/review-preparation.js +23 -60
- package/dist/src/commands/review-preparation.js.map +1 -1
- package/dist/src/commands/skill-eval.js +1 -0
- package/dist/src/commands/skill-eval.js.map +1 -1
- package/dist/src/commands/status-v6.d.ts +3 -1
- package/dist/src/commands/status-v6.js +24 -15
- package/dist/src/commands/status-v6.js.map +1 -1
- package/dist/src/commands/targets-command.d.ts +9 -0
- package/dist/src/commands/targets-command.js +57 -6
- package/dist/src/commands/targets-command.js.map +1 -1
- package/dist/src/commands/write-commands.js +43 -28
- package/dist/src/commands/write-commands.js.map +1 -1
- package/dist/src/constants.d.ts +2 -2
- package/dist/src/constants.js +2 -2
- package/dist/src/constants.js.map +1 -1
- package/dist/src/generators/local-plugin.js +59 -248
- package/dist/src/generators/local-plugin.js.map +1 -1
- package/dist/src/index.js +40 -14
- package/dist/src/index.js.map +1 -1
- package/dist/src/output/command-receipt.d.ts +1 -1
- package/dist/src/output/command-receipt.js +3 -1
- package/dist/src/output/command-receipt.js.map +1 -1
- package/dist/src/output/native-consent.d.ts +2 -0
- package/dist/src/output/native-consent.js +5 -0
- package/dist/src/output/native-consent.js.map +1 -0
- package/dist/src/output/public-result.js +72 -0
- package/dist/src/output/public-result.js.map +1 -1
- package/dist/src/output/rebuild-progress.js +5 -5
- package/dist/src/output/rebuild-progress.js.map +1 -1
- package/dist/src/output/receipt-projection.js +19 -2
- package/dist/src/output/receipt-projection.js.map +1 -1
- package/dist/src/platforms/capabilities.d.ts +10 -0
- package/dist/src/platforms/capabilities.js +158 -0
- package/dist/src/platforms/capabilities.js.map +1 -0
- package/dist/src/platforms/contracts.d.ts +351 -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 +22 -0
- package/dist/src/platforms/cursor-workspace-hook.js +185 -0
- package/dist/src/platforms/cursor-workspace-hook.js.map +1 -0
- package/dist/src/platforms/discovery.d.ts +80 -0
- package/dist/src/platforms/discovery.js +604 -0
- package/dist/src/platforms/discovery.js.map +1 -0
- package/dist/src/platforms/gemini-activation.d.ts +36 -0
- package/dist/src/platforms/gemini-activation.js +331 -0
- package/dist/src/platforms/gemini-activation.js.map +1 -0
- package/dist/src/platforms/gemini-consent.d.ts +8 -0
- package/dist/src/platforms/gemini-consent.js +79 -0
- package/dist/src/platforms/gemini-consent.js.map +1 -0
- package/dist/src/platforms/identity.d.ts +4 -0
- package/dist/src/platforms/identity.js +22 -0
- package/dist/src/platforms/identity.js.map +1 -0
- package/dist/src/platforms/inspection-grok.d.ts +4 -0
- package/dist/src/platforms/inspection-grok.js +204 -0
- package/dist/src/platforms/inspection-grok.js.map +1 -0
- package/dist/src/platforms/inspection-native.d.ts +6 -0
- package/dist/src/platforms/inspection-native.js +401 -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 +97 -0
- package/dist/src/platforms/inspection-opencode.js.map +1 -0
- package/dist/src/platforms/inspection-pi.d.ts +3 -0
- package/dist/src/platforms/inspection-pi.js +287 -0
- package/dist/src/platforms/inspection-pi.js.map +1 -0
- package/dist/src/platforms/inspection-query.d.ts +5 -0
- package/dist/src/platforms/inspection-query.js +36 -0
- package/dist/src/platforms/inspection-query.js.map +1 -0
- package/dist/src/platforms/inspection.d.ts +13 -0
- package/dist/src/platforms/inspection.js +180 -0
- package/dist/src/platforms/inspection.js.map +1 -0
- package/dist/src/platforms/layout.d.ts +21 -0
- package/dist/src/platforms/layout.js +239 -0
- package/dist/src/platforms/layout.js.map +1 -0
- package/dist/src/platforms/lifecycle-native-services.d.ts +3 -0
- package/dist/src/platforms/lifecycle-native-services.js +147 -0
- package/dist/src/platforms/lifecycle-native-services.js.map +1 -0
- package/dist/src/platforms/lifecycle-native.d.ts +13 -0
- package/dist/src/platforms/lifecycle-native.js +276 -0
- package/dist/src/platforms/lifecycle-native.js.map +1 -0
- package/dist/src/platforms/lifecycle.d.ts +25 -0
- package/dist/src/platforms/lifecycle.js +470 -0
- package/dist/src/platforms/lifecycle.js.map +1 -0
- package/dist/src/platforms/managed-command-placement.d.ts +8 -0
- package/dist/src/platforms/managed-command-placement.js +79 -0
- package/dist/src/platforms/managed-command-placement.js.map +1 -0
- package/dist/src/platforms/projection-code-extension.d.ts +8 -0
- package/dist/src/platforms/projection-code-extension.js +121 -0
- package/dist/src/platforms/projection-code-extension.js.map +1 -0
- package/dist/src/platforms/projection-command-resources.d.ts +7 -0
- package/dist/src/platforms/projection-command-resources.js +74 -0
- package/dist/src/platforms/projection-command-resources.js.map +1 -0
- package/dist/src/platforms/projection-files.d.ts +27 -0
- package/dist/src/platforms/projection-files.js +111 -0
- package/dist/src/platforms/projection-files.js.map +1 -0
- package/dist/src/platforms/projection-marketplace.d.ts +19 -0
- package/dist/src/platforms/projection-marketplace.js +42 -0
- package/dist/src/platforms/projection-marketplace.js.map +1 -0
- package/dist/src/platforms/projection.d.ts +10 -0
- package/dist/src/platforms/projection.js +446 -0
- package/dist/src/platforms/projection.js.map +1 -0
- package/dist/src/platforms/registry.d.ts +4 -0
- package/dist/src/platforms/registry.js +30 -0
- package/dist/src/platforms/registry.js.map +1 -0
- package/dist/src/platforms/supplement-layout.d.ts +16 -0
- package/dist/src/platforms/supplement-layout.js +31 -0
- package/dist/src/platforms/supplement-layout.js.map +1 -0
- package/dist/src/portable/commands.d.ts +7 -5
- package/dist/src/portable/commands.js +6 -1
- package/dist/src/portable/commands.js.map +1 -1
- package/dist/src/portable/materializer.d.ts +8 -6
- package/dist/src/portable/materializer.js +47 -245
- package/dist/src/portable/materializer.js.map +1 -1
- package/dist/src/portable/recovery-layout.js +2 -15
- package/dist/src/portable/recovery-layout.js.map +1 -1
- package/dist/src/portable/recovery.d.ts +10 -1
- package/dist/src/portable/recovery.js +34 -8
- package/dist/src/portable/recovery.js.map +1 -1
- package/dist/src/recovery/coordinator.d.ts +4 -7
- package/dist/src/recovery/coordinator.js +151 -119
- package/dist/src/recovery/coordinator.js.map +1 -1
- package/dist/src/recovery/demand.d.ts +1 -1
- package/dist/src/recovery/demand.js +10 -42
- package/dist/src/recovery/demand.js.map +1 -1
- package/dist/src/recovery/joint-coordinator.js +112 -52
- package/dist/src/recovery/joint-coordinator.js.map +1 -1
- package/dist/src/recovery/joint-demand.d.ts +4 -22
- package/dist/src/recovery/joint-demand.js +51 -40
- package/dist/src/recovery/joint-demand.js.map +1 -1
- package/dist/src/recovery/receipt.d.ts +23 -8
- package/dist/src/recovery/retirement.d.ts +1 -1
- package/dist/src/recovery/retirement.js +131 -29
- package/dist/src/recovery/retirement.js.map +1 -1
- package/dist/src/recovery/status.d.ts +13 -6
- package/dist/src/recovery/status.js +483 -79
- package/dist/src/recovery/status.js.map +1 -1
- package/dist/src/recovery/types.d.ts +3 -3
- package/dist/src/review/platform-profile.d.ts +3 -0
- package/dist/src/review/platform-profile.js +16 -0
- package/dist/src/review/platform-profile.js.map +1 -0
- package/dist/src/review/review-profile.d.ts +1 -0
- package/dist/src/review/review-profile.js +8 -2
- package/dist/src/review/review-profile.js.map +1 -1
- package/dist/src/review/review-selection.d.ts +2 -11
- package/dist/src/review/review-selection.js +97 -71
- package/dist/src/review/review-selection.js.map +1 -1
- package/dist/src/review/review-types.d.ts +3 -0
- package/dist/src/review/review-types.js.map +1 -1
- package/dist/src/review/skill-materialization.d.ts +44 -9
- package/dist/src/review/skill-materialization.js +112 -136
- package/dist/src/review/skill-materialization.js.map +1 -1
- package/dist/src/review/source-binding.d.ts +8 -5
- package/dist/src/review/source-binding.js +99 -41
- package/dist/src/review/source-binding.js.map +1 -1
- package/dist/src/tui/agent-management.js +112 -10
- package/dist/src/tui/agent-management.js.map +1 -1
- package/dist/src/tui/agent-settings.d.ts +3 -0
- package/dist/src/tui/agent-settings.js +10 -11
- package/dist/src/tui/agent-settings.js.map +1 -1
- package/dist/src/tui/console-app-v4.js +58 -20
- package/dist/src/tui/console-app-v4.js.map +1 -1
- package/dist/src/tui/content-item-card.js +2 -2
- package/dist/src/tui/content-item-card.js.map +1 -1
- package/dist/src/tui/controller-runtime.js +198 -152
- package/dist/src/tui/controller-runtime.js.map +1 -1
- package/dist/src/tui/controller.d.ts +5 -9
- package/dist/src/tui/controller.js +40 -18
- package/dist/src/tui/controller.js.map +1 -1
- package/dist/src/tui/deployment-view.d.ts +10 -0
- package/dist/src/tui/deployment-view.js +103 -0
- package/dist/src/tui/deployment-view.js.map +1 -0
- package/dist/src/tui/glossary.js +4 -4
- package/dist/src/tui/glossary.js.map +1 -1
- package/dist/src/tui/model.d.ts +5 -0
- package/dist/src/tui/model.js +73 -12
- package/dist/src/tui/model.js.map +1 -1
- package/dist/src/tui/operation-diagnostic-screens.js +2 -1
- package/dist/src/tui/operation-diagnostic-screens.js.map +1 -1
- package/dist/src/tui/operation-history.d.ts +5 -4
- package/dist/src/tui/operation-history.js.map +1 -1
- package/dist/src/tui/operation-review-planner.d.ts +7 -2
- package/dist/src/tui/operation-review-planner.js +97 -42
- package/dist/src/tui/operation-review-planner.js.map +1 -1
- package/dist/src/tui/plugin-content.d.ts +5 -3
- package/dist/src/tui/plugin-content.js +70 -508
- package/dist/src/tui/plugin-content.js.map +1 -1
- package/dist/src/tui/plugin-detail.d.ts +3 -2
- package/dist/src/tui/plugin-detail.js +33 -25
- package/dist/src/tui/plugin-detail.js.map +1 -1
- package/dist/src/tui/scoped-inventory.d.ts +10 -6
- package/dist/src/tui/scoped-inventory.js +34 -1
- package/dist/src/tui/scoped-inventory.js.map +1 -1
- package/dist/src/types.d.ts +4 -63
- 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.map +1 -1
- package/dist/src/utils/artifact-plan.d.ts +26 -2
- package/dist/src/utils/artifact-plan.js +113 -489
- package/dist/src/utils/artifact-plan.js.map +1 -1
- package/dist/src/utils/artifact-renderer.d.ts +100 -93
- package/dist/src/utils/artifact-renderer.js +173 -346
- package/dist/src/utils/artifact-renderer.js.map +1 -1
- package/dist/src/utils/artifact-request.d.ts +21 -11
- package/dist/src/utils/artifact-request.js +56 -80
- package/dist/src/utils/artifact-request.js.map +1 -1
- package/dist/src/utils/bundle-layout.js +30 -146
- package/dist/src/utils/bundle-layout.js.map +1 -1
- package/dist/src/utils/catalog-digests.d.ts +2 -12
- package/dist/src/utils/catalog-digests.js +0 -39
- package/dist/src/utils/catalog-digests.js.map +1 -1
- package/dist/src/utils/catalog-source-references.d.ts +7 -0
- package/dist/src/utils/catalog-source-references.js +234 -19
- package/dist/src/utils/catalog-source-references.js.map +1 -1
- package/dist/src/utils/codex-config-observation.d.ts +19 -0
- package/dist/src/utils/codex-config-observation.js +145 -0
- package/dist/src/utils/codex-config-observation.js.map +1 -0
- package/dist/src/utils/codex-executable-discovery.d.ts +2 -0
- package/dist/src/utils/codex-executable-discovery.js +47 -13
- package/dist/src/utils/codex-executable-discovery.js.map +1 -1
- package/dist/src/utils/codex-manager.js +1 -1
- package/dist/src/utils/codex-manager.js.map +1 -1
- package/dist/src/utils/codex-native-observation.d.ts +3 -0
- package/dist/src/utils/codex-native-observation.js +53 -0
- package/dist/src/utils/codex-native-observation.js.map +1 -1
- package/dist/src/utils/codex-shared-native.d.ts +3 -1
- package/dist/src/utils/codex-shared-native.js +46 -5
- 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-surface-analysis.d.ts +5 -2
- package/dist/src/utils/codex-surface-analysis.js +28 -57
- package/dist/src/utils/codex-surface-analysis.js.map +1 -1
- package/dist/src/utils/component-command-preparation.d.ts +34 -0
- package/dist/src/utils/component-command-preparation.js +228 -0
- package/dist/src/utils/component-command-preparation.js.map +1 -0
- package/dist/src/utils/component-resources.d.ts +43 -0
- package/dist/src/utils/component-resources.js +304 -0
- package/dist/src/utils/component-resources.js.map +1 -0
- package/dist/src/utils/dynamic-skill-tree.d.ts +17 -6
- package/dist/src/utils/dynamic-skill-tree.js +7 -3
- package/dist/src/utils/dynamic-skill-tree.js.map +1 -1
- package/dist/src/utils/local-marketplace.d.ts +11 -44
- package/dist/src/utils/local-marketplace.js +11 -638
- package/dist/src/utils/local-marketplace.js.map +1 -1
- package/dist/src/utils/managed-command-evidence.d.ts +2 -2
- package/dist/src/utils/managed-command-evidence.js +5 -81
- package/dist/src/utils/managed-command-evidence.js.map +1 -1
- package/dist/src/utils/managed-command-materialization.d.ts +5 -2
- package/dist/src/utils/managed-command-materialization.js +35 -35
- package/dist/src/utils/managed-command-materialization.js.map +1 -1
- package/dist/src/utils/managed-command-preparation.d.ts +67 -0
- package/dist/src/utils/managed-command-preparation.js +146 -0
- package/dist/src/utils/managed-command-preparation.js.map +1 -0
- package/dist/src/utils/managed-command-review.d.ts +26 -0
- package/dist/src/utils/managed-command-review.js +68 -0
- package/dist/src/utils/managed-command-review.js.map +1 -0
- package/dist/src/utils/managed-command-store.js +26 -15
- package/dist/src/utils/managed-command-store.js.map +1 -1
- package/dist/src/utils/native-cli.d.ts +23 -0
- package/dist/src/utils/native-cli.js +51 -2
- package/dist/src/utils/native-cli.js.map +1 -1
- package/dist/src/utils/native-demand.d.ts +20 -1
- package/dist/src/utils/native-demand.js.map +1 -1
- package/dist/src/utils/native-tool-review.d.ts +3 -6
- package/dist/src/utils/native-tool-review.js +25 -11
- package/dist/src/utils/native-tool-review.js.map +1 -1
- package/dist/src/utils/ownership.d.ts +26 -3
- package/dist/src/utils/ownership.js +95 -9
- package/dist/src/utils/ownership.js.map +1 -1
- package/dist/src/utils/paths.d.ts +1 -1
- package/dist/src/utils/paths.js +2 -0
- package/dist/src/utils/paths.js.map +1 -1
- package/dist/src/utils/platform-empty-state.d.ts +46 -0
- package/dist/src/utils/platform-empty-state.js +123 -0
- package/dist/src/utils/platform-empty-state.js.map +1 -0
- package/dist/src/utils/plugin-config-impact.d.ts +17 -11
- package/dist/src/utils/plugin-config-impact.js +46 -62
- package/dist/src/utils/plugin-config-impact.js.map +1 -1
- package/dist/src/utils/plugin-config-write.js +52 -53
- package/dist/src/utils/plugin-config-write.js.map +1 -1
- package/dist/src/utils/plugin-config.d.ts +0 -2
- package/dist/src/utils/plugin-config.js +0 -6
- 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 +4 -0
- package/dist/src/utils/plugin-scripts.js +11 -0
- package/dist/src/utils/plugin-scripts.js.map +1 -1
- package/dist/src/utils/runtime-config.d.ts +5 -7
- package/dist/src/utils/runtime-config.js +12 -25
- package/dist/src/utils/runtime-config.js.map +1 -1
- package/dist/src/utils/windows-npm-shim.js +19 -2
- package/dist/src/utils/windows-npm-shim.js.map +1 -1
- package/package.json +3 -3
- package/dist/src/utils/claude-native-render-receipt.d.ts +0 -14
- package/dist/src/utils/claude-native-render-receipt.js +0 -26
- package/dist/src/utils/claude-native-render-receipt.js.map +0 -1
- package/dist/src/utils/claude-skills-root.d.ts +0 -8
- package/dist/src/utils/claude-skills-root.js +0 -87
- package/dist/src/utils/claude-skills-root.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/slash-commands.d.ts +0 -1
- package/dist/src/utils/slash-commands.js +0 -2
- package/dist/src/utils/slash-commands.js.map +0 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FrozenDeploymentPlan, DeploymentExclusion } from '../platforms/contracts.js';
|
|
2
|
+
import type { PublicDeploymentResult, PublicDeploymentObservation, PublicDeploymentExclusion, PublicComponentGap } from '../commands/public-lifecycle-result.js';
|
|
3
|
+
import type { ComponentUnmet } from '@lesliechan721/aw-plugin-core/manifest';
|
|
4
|
+
export declare function componentGapText(gap: ComponentUnmet): string;
|
|
5
|
+
export declare function componentGapLines(gaps: readonly PublicComponentGap[]): string[];
|
|
6
|
+
export declare function deploymentExclusionLines(exclusions: readonly (DeploymentExclusion | PublicDeploymentExclusion)[]): string[];
|
|
7
|
+
/** Text is derived from frozen plans. It does not inspect or render again. */
|
|
8
|
+
export declare function deploymentPlanLines(plans: readonly FrozenDeploymentPlan[], technical?: boolean): string[];
|
|
9
|
+
export declare function deploymentResultLines(receipts: readonly PublicDeploymentResult[], technical?: boolean): string[];
|
|
10
|
+
export declare function deploymentObservationLines(observations: readonly PublicDeploymentObservation[], technical?: boolean): string[];
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { agentLabel, scopeLabel } from './glossary.js';
|
|
2
|
+
const stateLabels = { present: '存在', absent: '缺失', unknown: '未知', 'not-applicable': '不适用',
|
|
3
|
+
enabled: '已启用', disabled: '未启用', blocked: '受阻', trusted: '已信任', required: '需要信任',
|
|
4
|
+
observed: '已观察到加载', 'not-observed': '尚未观察到加载', available: '可用', missing: '未安装', unsupported: '不支持', notApplicable: '无需客户端',
|
|
5
|
+
applied: '已完成', unchanged: '未改变', failed: '失败', skipped: '已跳过', confirmed: '已确认变更', possible: '可能已变更', none: '无变更' };
|
|
6
|
+
const stateLabel = (state) => stateLabels[state] ?? state;
|
|
7
|
+
const effectLabels = { 'publish-package': '发布包', register: '登记', refresh: '刷新', activate: '启用',
|
|
8
|
+
deactivate: '停用', unregister: '撤销登记', 'write-supplement': '写入附加内容', 'remove-owned': '移除专属内容' };
|
|
9
|
+
const reloadLabels = { none: '无需重载', 'new-session': '需要新会话', 'workspace-reload': '需要重载工作区',
|
|
10
|
+
'host-restart': '需要重启客户端', unknown: '重载条件未知' };
|
|
11
|
+
export function componentGapText(gap) {
|
|
12
|
+
return `${gap.componentId ?? gap.id} · ${gap.kind} · ${gap.reasonCode}${gap.requiredFeatures.length
|
|
13
|
+
? ` · ${gap.requiredFeatures.map((requirement) => `${requirement.feature}${requirement.values ? `: ${requirement.values.join(', ')}` : ''}`).join(';')}` : ''}`;
|
|
14
|
+
}
|
|
15
|
+
export function componentGapLines(gaps) {
|
|
16
|
+
return gaps.map((gap) => ` ! ${gap.providerPluginId} · ${scopeLabel(gap.renderScope)} · 缺失 ${componentGapText(gap)}`);
|
|
17
|
+
}
|
|
18
|
+
export function deploymentExclusionLines(exclusions) {
|
|
19
|
+
return exclusions.flatMap((entry) => [
|
|
20
|
+
` → ${agentLabel(entry.platform)} ${entry.product?.product === 'app' ? 'App' : entry.product?.product === 'cli' ? 'CLI' : '产品面'} · ${entry.product?.version ?? '版本未取得'} · 未执行 · ${entry.reasonCode}`,
|
|
21
|
+
...entry.recoveryActions.map((action) => ` 恢复:${action}`),
|
|
22
|
+
]);
|
|
23
|
+
}
|
|
24
|
+
function nativeSourceLines(after) {
|
|
25
|
+
const evidence = after.prerequisites?.nativeSources;
|
|
26
|
+
return evidence ? [
|
|
27
|
+
` 原生来源观测:${evidence.observation === 'complete' ? '完整' : '未知'}`,
|
|
28
|
+
...evidence.sources.map((source) => ` ${source.name} · ${source.version ?? '版本未知'} · ${source.scope} · ${source.origin} · ${source.enabled === null ? '启用未知' : source.enabled ? '已启用' : '未启用'} · ${source.effectiveComponents.join(', ') || '无生效组件'}`),
|
|
29
|
+
...(evidence.overlaps.length ? [` 同名来源:${evidence.overlaps.join(', ')}`] : []),
|
|
30
|
+
] : [];
|
|
31
|
+
}
|
|
32
|
+
function configurationLines(after) {
|
|
33
|
+
const config = after.configuration;
|
|
34
|
+
const scope = after.scopeRegistration ? [` 原生独立 scope 登记:${stateLabel(after.scopeRegistration)}`] : [];
|
|
35
|
+
if (!config)
|
|
36
|
+
return scope;
|
|
37
|
+
const activation = config.activation === 'absent' ? '无显式启用条目' : config.activation === 'unknown'
|
|
38
|
+
? '启用条目未知' : config.activation === 'enabled' ? '显式启用' : '显式停用';
|
|
39
|
+
return [...scope, ` 本地配置补充 · ${scopeLabel(config.scope)} · ${activation}(不代表原生有效状态)`,
|
|
40
|
+
...(config.reasonCodes.length ? [` 配置诊断:${config.reasonCodes.join(', ')}`] : [])];
|
|
41
|
+
}
|
|
42
|
+
/** Text is derived from frozen plans. It does not inspect or render again. */
|
|
43
|
+
export function deploymentPlanLines(plans, technical = false) {
|
|
44
|
+
const groups = new Map();
|
|
45
|
+
const seenEffects = new Set();
|
|
46
|
+
for (const plan of plans)
|
|
47
|
+
groups.set(plan.binding.platform, [...(groups.get(plan.binding.platform) ?? []), plan]);
|
|
48
|
+
return [...groups].flatMap(([platform, entries]) => [
|
|
49
|
+
`${agentLabel(platform)} · 原生部署`,
|
|
50
|
+
...entries.flatMap((plan) => [
|
|
51
|
+
` ${plan.binding.plugin.pluginId} · ${scopeLabel(plan.binding.scope.kind)}`,
|
|
52
|
+
...plan.binding.consumers.map((product) => ` → ${product.product === 'app' ? 'App' : product.product === 'cli' ? 'CLI' : '通用输出'} · ${product.version ?? '版本未取得'} · ${stateLabel(product.availability)}`),
|
|
53
|
+
...(plan.binding.consumers.length > 1 ? [' CLI / App 共用此物理包;物理动作只执行一次。'] : []),
|
|
54
|
+
...plan.expected.components.map((component) => ` 组件 ${component.id} · ${component.kind}`),
|
|
55
|
+
...plan.expected.unmet.map((gap) => ` ! 缺失 ${componentGapText(gap)}`),
|
|
56
|
+
...plan.expected.omitted.map((component) => ` ${component.id} · ${component.reason === 'config-disabled' ? '配置已关闭' : '本平台有意不提供'}`),
|
|
57
|
+
...plan.effects.flatMap((effect) => {
|
|
58
|
+
const key = `${effect.physicalKey}\0${effect.id}`;
|
|
59
|
+
if (seenEffects.has(key))
|
|
60
|
+
return [];
|
|
61
|
+
seenEffects.add(key);
|
|
62
|
+
return [` ${effect.destructive ? '−' : '+'} ${effectLabels[effect.kind] ?? effect.kind}${effect.componentIds.length ? ` · ${effect.componentIds.join(', ')}` : ''}${technical ? ` · ${effect.destination}` : ''}`];
|
|
63
|
+
}),
|
|
64
|
+
...(plan.evidence.sharedReferences !== 'none' ? [` ! ${plan.evidence.sharedReferences === 'present' ? '有其他共享引用' : '共享引用尚未确认'};保留其他使用位置。`] : []),
|
|
65
|
+
...(technical ? [` 物理位置 ${plan.evidence.layout.packageRoot}`, ` 冻结依据 ${plan.evidence.fingerprint}`] : []),
|
|
66
|
+
]),
|
|
67
|
+
]);
|
|
68
|
+
}
|
|
69
|
+
export function deploymentResultLines(receipts, technical = false) {
|
|
70
|
+
return receipts.flatMap((receipt) => [
|
|
71
|
+
...receipt.products.flatMap((product) => {
|
|
72
|
+
const observation = receipt.after.consumers.find((consumer) => consumer.productId === product.id);
|
|
73
|
+
return [
|
|
74
|
+
` → ${product.product === 'app' ? 'App' : product.product === 'cli' ? 'CLI' : '通用输出'} · ${product.version ?? '版本未取得'} · ${stateLabel(product.availability)}`,
|
|
75
|
+
` 启用 ${observation ? stateLabel(observation.activation) : '未知'} · ${observation ? stateLabel(observation.load) : '加载未知'} · 信任 ${observation ? stateLabel(observation.trust) : '未知'}`,
|
|
76
|
+
...receipt.after.components.map((component) => ` 组件 ${component.id} · 物理内容${stateLabel(component.presence)}`),
|
|
77
|
+
...receipt.unmet.filter((gap) => !gap.productIds.length || gap.productIds.includes(product.id)).map((gap) => ` ! 缺失 ${componentGapText(gap)}`),
|
|
78
|
+
...(technical && product.entry ? [` 安装入口 ${product.entry.kind === 'cli' ? product.entry.executable : product.entry.kind === 'directory' ? product.entry.configRoot : product.entry.root}`] : []),
|
|
79
|
+
];
|
|
80
|
+
}),
|
|
81
|
+
...(receipt.products.length ? [] : [' 产品面未能关联;加载状态保持未知。', ...receipt.unmet.map((gap) => ` ! 缺失 ${componentGapText(gap)}`)]),
|
|
82
|
+
...receipt.effects.map((effect) => ` 动作 ${effect.id} · ${stateLabel(effect.status)} · ${stateLabel(effect.mutation)}`),
|
|
83
|
+
` 包${stateLabel(receipt.after.package)} · 登记${stateLabel(receipt.after.registration)} · ${reloadLabels[receipt.reload] ?? receipt.reload}`,
|
|
84
|
+
...nativeSourceLines(receipt.after),
|
|
85
|
+
...configurationLines(receipt.after),
|
|
86
|
+
...receipt.diagnostics.map((entry) => ` ! ${technical ? `${entry.code} · ` : ''}${entry.message}`),
|
|
87
|
+
]);
|
|
88
|
+
}
|
|
89
|
+
export function deploymentObservationLines(observations, technical = false) {
|
|
90
|
+
return observations.flatMap((observation) => [
|
|
91
|
+
...observation.products.flatMap((product) => {
|
|
92
|
+
const consumer = observation.after.consumers.find((item) => item.productId === product.id);
|
|
93
|
+
return [` → ${product.product === 'app' ? 'App' : product.product === 'cli' ? 'CLI' : '通用输出'} · ${product.version ?? '版本未取得'}`,
|
|
94
|
+
` 启用 ${consumer ? stateLabel(consumer.activation) : '未知'} · ${consumer ? stateLabel(consumer.load) : '加载未知'} · 信任 ${consumer ? stateLabel(consumer.trust) : '未知'}`,
|
|
95
|
+
...observation.after.components.map((component) => ` 组件 ${component.id} · 物理内容${stateLabel(component.presence)}`),
|
|
96
|
+
...(technical ? [` 物理身份 ${observation.after.physicalKey}`] : [])];
|
|
97
|
+
}),
|
|
98
|
+
` 包${stateLabel(observation.after.package)} · 登记${stateLabel(observation.after.registration)}`,
|
|
99
|
+
...nativeSourceLines(observation.after),
|
|
100
|
+
...configurationLines(observation.after),
|
|
101
|
+
]);
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=deployment-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployment-view.js","sourceRoot":"","sources":["../../../src/tui/deployment-view.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEvD,MAAM,WAAW,GAA2B,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK;IAC/G,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM;IAChF,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,aAAa,EAAE,OAAO;IA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,IAAI,OAAO,EAAE;gBAC7H,UAAU,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,SAAS,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE;gBACrK,GAAG,WAAW,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,UAAU,SAAS,CAAC,EAAE,UAAU,UAAU,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACpH,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,YAAY,WAAW,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACzE,CAAC,CAAC;QACF,MAAM,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE;QAC/F,GAAG,iBAAiB,CAAC,WAAW,CAAC,KAAK,CAAC;QACvC,GAAG,kBAAkB,CAAC,WAAW,CAAC,KAAK,CAAC;KACzC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/src/tui/glossary.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { TARGET_DISPLAY_NAMES } from '../platforms/discovery.js';
|
|
2
|
+
import { isPlatformTarget } from '@lesliechan721/aw-plugin-core';
|
|
1
3
|
export const productTerms = {
|
|
2
4
|
catalog: '插件目录',
|
|
3
5
|
active: '当前启用版本',
|
|
@@ -17,12 +19,10 @@ export const productTerms = {
|
|
|
17
19
|
generation: '目录版本副本',
|
|
18
20
|
};
|
|
19
21
|
export function platformLabel(platform) {
|
|
20
|
-
return platform
|
|
22
|
+
return TARGET_DISPLAY_NAMES[platform];
|
|
21
23
|
}
|
|
22
24
|
export function agentLabel(agent) {
|
|
23
|
-
return agent
|
|
24
|
-
: agent === 'cursor' ? 'Cursor' : agent === 'antigravity' ? 'Antigravity'
|
|
25
|
-
: agent === 'opencode' ? 'OpenCode' : agent === 'pi' ? 'Pi' : agent === 'generic' ? 'Generic' : agent;
|
|
25
|
+
return isPlatformTarget(agent) ? TARGET_DISPLAY_NAMES[agent] : agent;
|
|
26
26
|
}
|
|
27
27
|
export function scopeLabel(scope) {
|
|
28
28
|
return scope === 'user' ? '所有项目' : '当前项目';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glossary.js","sourceRoot":"","sources":["../../../src/tui/glossary.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"glossary.js","sourceRoot":"","sources":["../../../src/tui/glossary.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,OAAO,EAAE,MAAM;IACf,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,OAAO;IAClB,OAAO,EAAE,SAAS;IAClB,gBAAgB,EAAE,QAAQ;IAC1B,eAAe,EAAE,QAAQ;IACzB,YAAY,EAAE,UAAU;IACxB,UAAU,EAAE,MAAM;IAClB,MAAM,EAAE,WAAW;IACnB,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,YAAY;IACxB,QAAQ,EAAE,SAAS;IACnB,YAAY,EAAE,MAAM;IACpB,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,QAAQ;CACZ,CAAC;AAEX,MAAM,UAAU,aAAa,CAAC,QAAsB;IAClD,OAAO,oBAAoB,CAAC,QAAQ,CAAC,CAAC;AACxC,CAAC;AAED,M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AmB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,WAAW;QAC3E,mBAAmB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,aAAa;QAC1E,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU;KACrD,CAAC;IACF,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,cAAc,CAAC;AACxC,CAAC"}
|
package/dist/src/tui/model.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RecoveryTarget } from '../recovery/receipt.js';
|
|
1
2
|
export { configObjectHasSensitiveChild } from './config-value-presentation.js';
|
|
2
3
|
import type { PlatformName, PlatformTarget, PluginConfigFieldType, PluginConfigPreset, PluginConfigSchemaField, PluginConfigJoinSummary, PluginConfigValue, Scope } from '../types.js';
|
|
3
4
|
import type { PluginConfigCompiledDefinition } from '@lesliechan721/aw-plugin-core/manifest';
|
|
@@ -169,6 +170,8 @@ export interface DependencyPlacementDescriptorViewModel {
|
|
|
169
170
|
project: 'current' | 'other' | null;
|
|
170
171
|
}
|
|
171
172
|
export interface DependencyPlacementReferenceViewModel {
|
|
173
|
+
/** The root requirement whose current-scope observation confirms this edge. */
|
|
174
|
+
requirementScope?: Scope;
|
|
172
175
|
consumer: DependencyPlacementDescriptorViewModel & {
|
|
173
176
|
pluginId: string;
|
|
174
177
|
};
|
|
@@ -479,6 +482,8 @@ export declare function buildTuiViewModel(options: {
|
|
|
479
482
|
status: StatusV8Payload;
|
|
480
483
|
pluginSummaries: StatusV8PluginSummary[];
|
|
481
484
|
targetRevisions?: StatusTargetRevision[];
|
|
485
|
+
recoveryTargets?: readonly RecoveryTarget[];
|
|
486
|
+
retainedNativePluginIds?: readonly string[];
|
|
482
487
|
sourceHealth?: ReadonlyMap<string, SourceHealthViewModel>;
|
|
483
488
|
sourceDetails?: SourceDetailViewModel[];
|
|
484
489
|
catalogFreshness?: ReadonlyMap<string, CatalogSourceFreshnessViewModel>;
|
package/dist/src/tui/model.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { agentLabel } from './glossary.js';
|
|
1
2
|
import { configObjectHasSensitiveChild, presentConfigValue, safeConfigText } from './config-value-presentation.js';
|
|
2
3
|
export { configObjectHasSensitiveChild } from './config-value-presentation.js';
|
|
3
|
-
import { matchPluginConfigPreset, resolvePluginConfigObjectProperties, stablePluginConfigStringify, } from '@lesliechan721/aw-plugin-core/manifest';
|
|
4
|
+
import { matchPluginConfigPreset, NATIVE_PLATFORM_TARGETS, resolvePluginConfigObjectProperties, stablePluginConfigStringify, } from '@lesliechan721/aw-plugin-core/manifest';
|
|
4
5
|
import { flattenStatusTargets, statusTargetActivation, statusTargetExtensions, statusTargetIntent, statusTargetOwnershipState, statusTargetSharedNative, } from '../commands/status-v6.js';
|
|
5
6
|
import { buildAllowedLifecycleActions } from '../commands/operation-planner.js';
|
|
6
7
|
import { safeDiagnosticCode, } from './diagnostics.js';
|
|
@@ -1432,7 +1433,7 @@ function collapseRootIssues(issues) {
|
|
|
1432
1433
|
|| compareText(left.scope, right.scope));
|
|
1433
1434
|
const projected = rootEntity && !direct ? {
|
|
1434
1435
|
...primary,
|
|
1435
|
-
title: `${rootEntity.pluginId} · ${rootEntity.platform
|
|
1436
|
+
title: `${rootEntity.pluginId} · ${agentLabel(rootEntity.platform)} · ${primary.category === 'artifactCollision' ? '输出冲突' : primary.title.split(' · ').at(-1) ?? primary.title}`,
|
|
1436
1437
|
entity: { kind: 'plugin', id: rootEntity.pluginId },
|
|
1437
1438
|
pluginId: rootEntity.pluginId,
|
|
1438
1439
|
platform: rootEntity.platform,
|
|
@@ -1450,6 +1451,62 @@ function collapseRootIssues(issues) {
|
|
|
1450
1451
|
};
|
|
1451
1452
|
});
|
|
1452
1453
|
}
|
|
1454
|
+
/** Project current read-only target facts. Source summaries contain no installation facts. */
|
|
1455
|
+
function recoveryTargetIssues(targets) {
|
|
1456
|
+
const current = new Map(targets.map((target) => [`${target.pluginId}\0${target.agent}\0${target.scope}`, target]));
|
|
1457
|
+
return [...current.values()].flatMap((target) => {
|
|
1458
|
+
if (target.agent === 'generic' || target.content === 'satisfied' && target.blockers.length === 0)
|
|
1459
|
+
return [];
|
|
1460
|
+
const platform = target.agent;
|
|
1461
|
+
const entity = { pluginId: target.pluginId, platform, scope: target.scope };
|
|
1462
|
+
const consumers = [...new Map((target.contributions ?? []).flatMap((contribution) => {
|
|
1463
|
+
if (contribution.path.length < 2 || contribution.path[0] !== contribution.root
|
|
1464
|
+
|| contribution.path.at(-1) !== target.pluginId || contribution.root === target.pluginId)
|
|
1465
|
+
return [];
|
|
1466
|
+
const consumer = current.get(`${contribution.root}\0${platform}\0${contribution.scope}`);
|
|
1467
|
+
return consumer ? [[`${consumer.pluginId}\0${consumer.agent}\0${consumer.scope}`, {
|
|
1468
|
+
pluginId: consumer.pluginId, platform, scope: consumer.scope, relationship: 'consumer',
|
|
1469
|
+
}]] : [];
|
|
1470
|
+
})).values()];
|
|
1471
|
+
const conflict = target.content === 'conflict';
|
|
1472
|
+
const missing = target.content === 'absent' || target.observation === 'missing'
|
|
1473
|
+
|| target.deploymentObservations?.some(({ after }) => after.components.some((component) => component.presence === 'absent')) === true;
|
|
1474
|
+
const incomplete = missing || target.content === 'drifted';
|
|
1475
|
+
const dependency = consumers.length > 0;
|
|
1476
|
+
const category = conflict ? 'artifactCollision' : dependency ? missing ? 'dependencyMissing' : 'dependencyNotReady'
|
|
1477
|
+
: incomplete ? 'incompleteInstallation' : 'diagnostic';
|
|
1478
|
+
const explicitRoot = target.contributions?.some((contribution) => contribution.path.length === 1
|
|
1479
|
+
&& contribution.root === target.pluginId && contribution.scope === target.scope) === true;
|
|
1480
|
+
const relationship = conflict || !dependency || explicitRoot ? 'direct' : 'consumer';
|
|
1481
|
+
const explanation = conflict ? '当前目标位置含有未确认归属的内容。'
|
|
1482
|
+
: incomplete ? '当前目标缺少已声明的内容,或现场内容与当前需求不同。'
|
|
1483
|
+
: '当前目标的满足状态尚未确认。';
|
|
1484
|
+
const details = [...target.blockers, ...(target.reasons ?? [])].map(({ code, message }) => ({ code, message }));
|
|
1485
|
+
if (dependency)
|
|
1486
|
+
details.push({ code: missing ? 'dependencyMissing' : 'dependencyNotReady',
|
|
1487
|
+
message: '当前依赖尚未满足其实际使用位置,关联的根插件需要恢复。' });
|
|
1488
|
+
const affectedTargets = [...(relationship === 'direct' ? [{ ...entity, relationship: 'direct' }] : []), ...consumers];
|
|
1489
|
+
const recover = !conflict ? [
|
|
1490
|
+
...(relationship === 'direct' ? [entity] : []), ...consumers,
|
|
1491
|
+
].flatMap((consumer) => [{ id: 'sync', label: '同步', ...consumer, writeAction: 'sync' },
|
|
1492
|
+
{ id: 'reinstall', label: '重新安装', ...consumer, writeAction: 'reinstall' }]) : [];
|
|
1493
|
+
return [{
|
|
1494
|
+
issueId: dependency || conflict ? `${category}:${target.pluginId}:${platform}:${target.scope}`
|
|
1495
|
+
: `recovery:${target.pluginId}:${platform}:${target.scope}`,
|
|
1496
|
+
category, title: `${target.pluginId} · ${agentLabel(platform)} · ${target.scope === 'project' ? '当前项目' : '所有项目'}`,
|
|
1497
|
+
explanation, impact: ['该位置尚不能确认满足当前插件需求。'],
|
|
1498
|
+
entity: { kind: 'plugin', id: target.pluginId }, ...entity,
|
|
1499
|
+
sourceId: target.pluginId.split('/')[0],
|
|
1500
|
+
rootCode: conflict ? 'artifactCollision' : dependency ? missing ? 'dependencyMissing' : 'dependencyNotReady'
|
|
1501
|
+
: incomplete ? 'partial' : 'targetDiagnostic',
|
|
1502
|
+
relationship, rootEntity: entity, affectedTargets, mergeEligible: false,
|
|
1503
|
+
actions: [...recover,
|
|
1504
|
+
...(dependency ? [{ id: 'viewDependencyIssue', label: '查看依赖插件问题', pluginId: target.pluginId }] : []),
|
|
1505
|
+
{ id: 'viewTechnical', label: '查看技术详情' }],
|
|
1506
|
+
technicalDetails: details.length ? details : [{ code: `targetContent:${target.content ?? 'unknown'}`, message: explanation }],
|
|
1507
|
+
}];
|
|
1508
|
+
});
|
|
1509
|
+
}
|
|
1453
1510
|
export function buildTuiViewModel(options) {
|
|
1454
1511
|
const dependencyById = new Map((options.dependencyOverviews ?? [])
|
|
1455
1512
|
.map((overview) => [overview.pluginId, overview]));
|
|
@@ -1465,6 +1522,7 @@ export function buildTuiViewModel(options) {
|
|
|
1465
1522
|
scopes.add(store.scope);
|
|
1466
1523
|
configScopesByPlugin.set(store.pluginId, scopes);
|
|
1467
1524
|
}
|
|
1525
|
+
const retainedNativeIds = new Set(options.retainedNativePluginIds ?? []);
|
|
1468
1526
|
const retainedStatusIds = new Set([...targetsByPlugin].flatMap(([pluginId, targets]) => targets.some((target) => target.state !== 'absent'
|
|
1469
1527
|
|| statusTargetIntent(target).enabled
|
|
1470
1528
|
|| target.reasons.length > 0)
|
|
@@ -1472,6 +1530,7 @@ export function buildTuiViewModel(options) {
|
|
|
1472
1530
|
const pluginIds = new Set([
|
|
1473
1531
|
...summaryById.keys(),
|
|
1474
1532
|
...retainedStatusIds,
|
|
1533
|
+
...retainedNativeIds,
|
|
1475
1534
|
...configScopesByPlugin.keys(),
|
|
1476
1535
|
]);
|
|
1477
1536
|
const plugins = [...pluginIds].map((pluginId) => {
|
|
@@ -1481,9 +1540,9 @@ export function buildTuiViewModel(options) {
|
|
|
1481
1540
|
const sourceId = targets[0]?.sourceId ?? pluginId.slice(0, pluginId.indexOf('/'));
|
|
1482
1541
|
const savedConfigScopes = [...(configScopesByPlugin.get(pluginId) ?? [])]
|
|
1483
1542
|
.sort((left, right) => (left === 'user' ? 0 : 1) - (right === 'user' ? 0 : 1));
|
|
1484
|
-
const configOnly = summary === undefined && targets.length === 0 && savedConfigScopes.length > 0;
|
|
1485
|
-
const removedPluginCleanupRequired = targets.some((target) => target.reasons.some((reason) => reason.code === 'removedPluginCleanupRequired'));
|
|
1486
|
-
const placements =
|
|
1543
|
+
const configOnly = summary === undefined && targets.length === 0 && savedConfigScopes.length > 0 && !retainedNativeIds.has(pluginId);
|
|
1544
|
+
const removedPluginCleanupRequired = summary === undefined && retainedNativeIds.has(pluginId) || targets.some((target) => target.reasons.some((reason) => reason.code === 'removedPluginCleanupRequired'));
|
|
1545
|
+
const placements = NATIVE_PLATFORM_TARGETS.flatMap((platform) => {
|
|
1487
1546
|
const platformTargets = targets.filter((target) => target.platform === platform);
|
|
1488
1547
|
const aggregateConflict = platform === 'codex' && options.status.targets.some((target) => target.pluginId === pluginId
|
|
1489
1548
|
&& target.platform === platform
|
|
@@ -1508,7 +1567,9 @@ export function buildTuiViewModel(options) {
|
|
|
1508
1567
|
|| (placement.state === 'installed'
|
|
1509
1568
|
&& (placement.health !== 'ready' || placement.blockingReason !== undefined)));
|
|
1510
1569
|
const installed = placements.some((placement) => placement.state === 'installed' || placement.state === 'scopeConflict');
|
|
1511
|
-
const sourceUnavailable =
|
|
1570
|
+
const sourceUnavailable = summary === undefined && retainedNativeIds.has(pluginId)
|
|
1571
|
+
|| summary?.definitionUnavailable === true
|
|
1572
|
+
|| options.sourceHealth?.get(sourceId)?.state === 'unavailable'
|
|
1512
1573
|
|| sourceById.get(sourceId)?.error !== undefined;
|
|
1513
1574
|
const capabilityTargets = targets.filter((target) => target.reasons.some((reason) => reason.code === 'awCapabilityUnsupported'));
|
|
1514
1575
|
const capabilityUnsupported = (summary?.missingCapabilities?.length ?? 0) > 0
|
|
@@ -1537,12 +1598,9 @@ export function buildTuiViewModel(options) {
|
|
|
1537
1598
|
?? Object.keys(summary?.configSchema ?? {}).length,
|
|
1538
1599
|
sourceLabel: sourceId,
|
|
1539
1600
|
supportedPlatforms: summary?.supportedTargets
|
|
1540
|
-
?
|
|
1601
|
+
? NATIVE_PLATFORM_TARGETS.filter((platform) => (summary.supportedTargets[platform]?.length ?? 0) > 0)
|
|
1541
1602
|
: placements.map((placement) => placement.platform),
|
|
1542
|
-
...(summary?.supportedTargets ? { supportedScopes: {
|
|
1543
|
-
codex: [...summary.supportedTargets.codex],
|
|
1544
|
-
claude: [...summary.supportedTargets.claude],
|
|
1545
|
-
} } : {}),
|
|
1603
|
+
...(summary?.supportedTargets ? { supportedScopes: Object.fromEntries(NATIVE_PLATFORM_TARGETS.map((platform) => [platform, [...(summary.supportedTargets[platform] ?? [])]])) } : {}),
|
|
1546
1604
|
installedPlacements: placements,
|
|
1547
1605
|
aggregateStatus: unavailable ? 'unavailable' : attention ? 'needsAttention' : installed ? 'installed' : 'available',
|
|
1548
1606
|
portableSkills: options.portablePluginIds?.includes(pluginId) ?? false,
|
|
@@ -1613,7 +1671,9 @@ export function buildTuiViewModel(options) {
|
|
|
1613
1671
|
const sourceRootIds = new Set([...(options.sourceHealth?.values() ?? [])]
|
|
1614
1672
|
.filter((health) => health.state === 'unavailable')
|
|
1615
1673
|
.map((health) => health.sourceId));
|
|
1616
|
-
const
|
|
1674
|
+
const currentTargets = options.recoveryTargets ?? [];
|
|
1675
|
+
const allTargetIssues = targetIssues(options.status, options.targetRevisions).filter((issue) => !currentTargets.some((target) => target.pluginId === issue.pluginId && target.agent === issue.platform
|
|
1676
|
+
&& (issue.scope === undefined || target.scope === issue.scope)));
|
|
1617
1677
|
const mergedTargetIssues = new Map();
|
|
1618
1678
|
for (const issue of allTargetIssues) {
|
|
1619
1679
|
if (!issue.mergeEligible || !issue.sourceId || !sourceRootIds.has(issue.sourceId))
|
|
@@ -1622,6 +1682,7 @@ export function buildTuiViewModel(options) {
|
|
|
1622
1682
|
}
|
|
1623
1683
|
const sourceDetails = new Map((options.sourceDetails ?? []).map((detail) => [detail.id, detail]));
|
|
1624
1684
|
const issueDrafts = [
|
|
1685
|
+
...recoveryTargetIssues(options.recoveryTargets ?? []),
|
|
1625
1686
|
...allTargetIssues.filter((issue) => !issue.mergeEligible
|
|
1626
1687
|
|| !issue.sourceId || !sourceRootIds.has(issue.sourceId)),
|
|
1627
1688
|
...statusIssues(options.status),
|