@lesliechan721/aw 0.1.0-beta.84 → 0.1.0-beta.86
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/command-runtime-config.d.mts +9 -0
- package/dist/authoring/assets/command-runtime-config.mjs +106 -0
- package/dist/authoring/assets/command-runtime-config.mjs.map +1 -0
- package/dist/authoring/scripts/validate-plugin.mjs +17 -22
- package/dist/authoring/scripts/validate-plugin.mjs.map +1 -1
- package/dist/index.js +2 -6
- package/dist/index.js.map +1 -1
- package/dist/scripts/aw-skill-eval-materializer.d.ts +4 -0
- package/dist/scripts/aw-skill-eval-materializer.js +27 -0
- package/dist/scripts/aw-skill-eval-materializer.js.map +1 -1
- package/dist/scripts/bundle-plugins.js +1 -1
- package/dist/scripts/bundle-plugins.js.map +1 -1
- package/dist/scripts/test-plugin-scripts.js +13 -2
- 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/catalog-source.d.ts +2 -1
- package/dist/src/commands/catalog-source.js +8 -7
- package/dist/src/commands/catalog-source.js.map +1 -1
- package/dist/src/commands/deployment-confirmation.d.ts +8 -1
- package/dist/src/commands/deployment-confirmation.js +79 -11
- package/dist/src/commands/deployment-confirmation.js.map +1 -1
- package/dist/src/commands/lifecycle-command-package.d.ts +44 -0
- package/dist/src/commands/lifecycle-command-package.js +195 -0
- package/dist/src/commands/lifecycle-command-package.js.map +1 -0
- package/dist/src/commands/managed-commands.d.ts +6 -0
- package/dist/src/commands/managed-commands.js +203 -152
- package/dist/src/commands/managed-commands.js.map +1 -1
- package/dist/src/commands/operation-plan.d.ts +22 -21
- package/dist/src/commands/operation-plan.js +2 -5
- package/dist/src/commands/operation-plan.js.map +1 -1
- package/dist/src/commands/permission-batch.d.ts +5 -0
- package/dist/src/commands/permission-batch.js +80 -0
- package/dist/src/commands/permission-batch.js.map +1 -0
- package/dist/src/commands/plugin-capabilities.js +17 -13
- package/dist/src/commands/plugin-capabilities.js.map +1 -1
- package/dist/src/commands/public-config-confirmation.d.ts +8 -2
- package/dist/src/commands/public-config-confirmation.js +22 -5
- package/dist/src/commands/public-config-confirmation.js.map +1 -1
- package/dist/src/commands/public-lifecycle-result.d.ts +7 -12
- package/dist/src/commands/public-lifecycle-result.js +136 -40
- package/dist/src/commands/public-lifecycle-result.js.map +1 -1
- package/dist/src/commands/public-lifecycle.js +49 -8
- package/dist/src/commands/public-lifecycle.js.map +1 -1
- package/dist/src/commands/public-plugin-query.js +21 -5
- package/dist/src/commands/public-plugin-query.js.map +1 -1
- package/dist/src/commands/rebuild-command.d.ts +4 -0
- package/dist/src/commands/rebuild-command.js +150 -48
- package/dist/src/commands/rebuild-command.js.map +1 -1
- package/dist/src/commands/rebuild-integration.d.ts +12 -3
- package/dist/src/commands/rebuild-integration.js +52 -164
- package/dist/src/commands/rebuild-integration.js.map +1 -1
- package/dist/src/commands/rebuild-operations.d.ts +2 -1
- package/dist/src/commands/rebuild-operations.js +7 -2
- package/dist/src/commands/rebuild-operations.js.map +1 -1
- package/dist/src/commands/rebuild-platform-integration.d.ts +12 -5
- package/dist/src/commands/rebuild-platform-integration.js +691 -186
- package/dist/src/commands/rebuild-platform-integration.js.map +1 -1
- package/dist/src/commands/skill-eval.js +10 -1
- package/dist/src/commands/skill-eval.js.map +1 -1
- package/dist/src/generators/local-plugin.js +14 -15
- package/dist/src/generators/local-plugin.js.map +1 -1
- package/dist/src/generators/permissions.d.ts +18 -4
- package/dist/src/generators/permissions.js +76 -22
- package/dist/src/generators/permissions.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +84 -44
- package/dist/src/index.js.map +1 -1
- package/dist/src/intent/scope-context.d.ts +4 -2
- package/dist/src/intent/scope-context.js +37 -7
- package/dist/src/intent/scope-context.js.map +1 -1
- package/dist/src/output/command-receipt.js +7 -8
- 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 +138 -0
- package/dist/src/output/component-delivery.js.map +1 -0
- package/dist/src/output/public-result.d.ts +17 -0
- package/dist/src/output/public-result.js +121 -25
- package/dist/src/output/public-result.js.map +1 -1
- package/dist/src/output/rebuild-progress.js +7 -4
- package/dist/src/output/rebuild-progress.js.map +1 -1
- package/dist/src/output/receipt-projection.js +51 -31
- package/dist/src/output/receipt-projection.js.map +1 -1
- package/dist/src/output/skill-invocation-notices.d.ts +2 -0
- package/dist/src/output/skill-invocation-notices.js +40 -4
- package/dist/src/output/skill-invocation-notices.js.map +1 -1
- 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 +4 -1
- package/dist/src/platforms/capabilities.js +93 -9
- package/dist/src/platforms/capabilities.js.map +1 -1
- package/dist/src/platforms/contracts.d.ts +46 -2
- package/dist/src/platforms/discovery.d.ts +13 -0
- package/dist/src/platforms/discovery.js +170 -30
- package/dist/src/platforms/discovery.js.map +1 -1
- package/dist/src/platforms/grok-permission-config.d.ts +22 -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/inspection-grok.js +165 -11
- package/dist/src/platforms/inspection-grok.js.map +1 -1
- package/dist/src/platforms/inspection-native.js +53 -18
- package/dist/src/platforms/inspection-native.js.map +1 -1
- package/dist/src/platforms/inspection-pi.d.ts +7 -1
- package/dist/src/platforms/inspection-pi.js +295 -95
- package/dist/src/platforms/inspection-pi.js.map +1 -1
- package/dist/src/platforms/inspection-query.d.ts +4 -2
- package/dist/src/platforms/inspection-query.js +24 -8
- package/dist/src/platforms/inspection-query.js.map +1 -1
- package/dist/src/platforms/inspection.d.ts +4 -1
- package/dist/src/platforms/inspection.js +36 -4
- package/dist/src/platforms/inspection.js.map +1 -1
- package/dist/src/platforms/layout.d.ts +13 -0
- package/dist/src/platforms/layout.js +90 -12
- package/dist/src/platforms/layout.js.map +1 -1
- package/dist/src/platforms/lifecycle-native.d.ts +1 -0
- package/dist/src/platforms/lifecycle-native.js +25 -1
- package/dist/src/platforms/lifecycle-native.js.map +1 -1
- package/dist/src/platforms/lifecycle.d.ts +2 -0
- package/dist/src/platforms/lifecycle.js +98 -25
- package/dist/src/platforms/lifecycle.js.map +1 -1
- 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.js +2 -1
- package/dist/src/platforms/projection-code-extension.js.map +1 -1
- package/dist/src/platforms/projection.js +127 -29
- package/dist/src/platforms/projection.js.map +1 -1
- package/dist/src/platforms/supplement-layout.d.ts +5 -1
- package/dist/src/platforms/supplement-layout.js +23 -1
- package/dist/src/platforms/supplement-layout.js.map +1 -1
- package/dist/src/platforms/supplement-state.d.ts +1 -1
- package/dist/src/platforms/supplement-state.js +18 -7
- package/dist/src/platforms/supplement-state.js.map +1 -1
- package/dist/src/portable/commands.js +1 -1
- package/dist/src/portable/commands.js.map +1 -1
- package/dist/src/portable/materializer.d.ts +4 -0
- package/dist/src/portable/materializer.js +8 -1
- package/dist/src/portable/materializer.js.map +1 -1
- package/dist/src/portable/recovery.d.ts +2 -0
- package/dist/src/portable/recovery.js +45 -8
- package/dist/src/portable/recovery.js.map +1 -1
- package/dist/src/recovery/coordinator.d.ts +3 -1
- package/dist/src/recovery/coordinator.js +101 -37
- package/dist/src/recovery/coordinator.js.map +1 -1
- package/dist/src/recovery/install-concurrency.js +3 -2
- package/dist/src/recovery/install-concurrency.js.map +1 -1
- package/dist/src/recovery/joint-coordinator.d.ts +7 -0
- package/dist/src/recovery/joint-coordinator.js +270 -64
- package/dist/src/recovery/joint-coordinator.js.map +1 -1
- package/dist/src/recovery/joint-demand.d.ts +14 -2
- package/dist/src/recovery/joint-demand.js +54 -7
- package/dist/src/recovery/joint-demand.js.map +1 -1
- package/dist/src/recovery/joint-install-execution.js +2 -1
- package/dist/src/recovery/joint-install-execution.js.map +1 -1
- package/dist/src/recovery/receipt.d.ts +15 -4
- package/dist/src/recovery/receipt.js +23 -0
- package/dist/src/recovery/receipt.js.map +1 -1
- package/dist/src/recovery/retirement.js +11 -17
- package/dist/src/recovery/retirement.js.map +1 -1
- package/dist/src/recovery/status.d.ts +20 -8
- package/dist/src/recovery/status.js +411 -91
- package/dist/src/recovery/status.js.map +1 -1
- package/dist/src/review/eval-source-input.d.ts +1 -0
- package/dist/src/review/eval-source-input.js +7 -1
- package/dist/src/review/eval-source-input.js.map +1 -1
- package/dist/src/review/platform-profile.js +2 -1
- package/dist/src/review/platform-profile.js.map +1 -1
- package/dist/src/review/review-selection.js +12 -5
- package/dist/src/review/review-selection.js.map +1 -1
- package/dist/src/review/skill-materialization.d.ts +2 -1
- package/dist/src/review/skill-materialization.js +45 -43
- package/dist/src/review/skill-materialization.js.map +1 -1
- package/dist/src/review/source-binding.js +5 -1
- package/dist/src/review/source-binding.js.map +1 -1
- package/dist/src/tui/console-app-v4.js +101 -57
- package/dist/src/tui/console-app-v4.js.map +1 -1
- package/dist/src/tui/controller-runtime.js +72 -7
- package/dist/src/tui/controller-runtime.js.map +1 -1
- package/dist/src/tui/controller.d.ts +6 -2
- package/dist/src/tui/controller.js +17 -4
- package/dist/src/tui/controller.js.map +1 -1
- package/dist/src/tui/deployment-view.d.ts +6 -3
- package/dist/src/tui/deployment-view.js +52 -10
- package/dist/src/tui/deployment-view.js.map +1 -1
- package/dist/src/tui/diagnostic-projection.d.ts +7 -1
- package/dist/src/tui/diagnostic-projection.js +55 -5
- package/dist/src/tui/diagnostic-projection.js.map +1 -1
- package/dist/src/tui/entity-cards.d.ts +2 -1
- package/dist/src/tui/entity-cards.js +34 -11
- package/dist/src/tui/entity-cards.js.map +1 -1
- package/dist/src/tui/glossary.js +5 -0
- package/dist/src/tui/glossary.js.map +1 -1
- package/dist/src/tui/model.js +2 -1
- package/dist/src/tui/model.js.map +1 -1
- package/dist/src/tui/operation-diagnostic-screens.js +3 -1
- package/dist/src/tui/operation-diagnostic-screens.js.map +1 -1
- package/dist/src/tui/operation-history.d.ts +6 -0
- package/dist/src/tui/operation-history.js +20 -2
- package/dist/src/tui/operation-history.js.map +1 -1
- package/dist/src/tui/operation-review-planner.js +130 -70
- package/dist/src/tui/operation-review-planner.js.map +1 -1
- package/dist/src/tui/plugin-detail.d.ts +4 -1
- package/dist/src/tui/plugin-detail.js +9 -2
- package/dist/src/tui/plugin-detail.js.map +1 -1
- package/dist/src/tui/scoped-flow.js +34 -16
- package/dist/src/tui/scoped-flow.js.map +1 -1
- package/dist/src/tui/scoped-inventory.d.ts +6 -2
- package/dist/src/tui/scoped-inventory.js +29 -7
- package/dist/src/tui/scoped-inventory.js.map +1 -1
- package/dist/src/types.d.ts +10 -21
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils/artifact-plan.d.ts +3 -36
- package/dist/src/utils/artifact-plan.js +16 -78
- package/dist/src/utils/artifact-plan.js.map +1 -1
- package/dist/src/utils/artifact-renderer.d.ts +1 -60
- package/dist/src/utils/artifact-renderer.js +31 -57
- package/dist/src/utils/artifact-renderer.js.map +1 -1
- package/dist/src/utils/artifact-request.d.ts +3 -26
- package/dist/src/utils/artifact-request.js +13 -36
- package/dist/src/utils/artifact-request.js.map +1 -1
- package/dist/src/utils/artifact-sources.d.ts +0 -8
- package/dist/src/utils/artifact-sources.js +0 -8
- package/dist/src/utils/artifact-sources.js.map +1 -1
- package/dist/src/utils/bundle-layout.js +2 -7
- package/dist/src/utils/bundle-layout.js.map +1 -1
- package/dist/src/utils/catalog-source-references.js +22 -3
- package/dist/src/utils/catalog-source-references.js.map +1 -1
- package/dist/src/utils/codex-native-observation.d.ts +6 -0
- package/dist/src/utils/codex-native-observation.js +32 -3
- package/dist/src/utils/codex-native-observation.js.map +1 -1
- package/dist/src/utils/component-command-preparation.d.ts +8 -11
- package/dist/src/utils/component-command-preparation.js +110 -210
- package/dist/src/utils/component-command-preparation.js.map +1 -1
- package/dist/src/utils/component-gap.d.ts +4 -0
- package/dist/src/utils/component-gap.js +20 -0
- package/dist/src/utils/component-gap.js.map +1 -0
- package/dist/src/utils/component-resources.js +2 -4
- package/dist/src/utils/component-resources.js.map +1 -1
- package/dist/src/utils/dynamic-skill-tree.js +2 -32
- package/dist/src/utils/dynamic-skill-tree.js.map +1 -1
- package/dist/src/utils/managed-command-cli-review.d.ts +43 -0
- package/dist/src/utils/managed-command-cli-review.js +389 -0
- package/dist/src/utils/managed-command-cli-review.js.map +1 -0
- package/dist/src/utils/managed-command-closure.d.ts +14 -3
- package/dist/src/utils/managed-command-closure.js +144 -23
- package/dist/src/utils/managed-command-closure.js.map +1 -1
- 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 +77 -113
- package/dist/src/utils/managed-command-materialization.js +324 -323
- package/dist/src/utils/managed-command-materialization.js.map +1 -1
- package/dist/src/utils/managed-command-preparation.d.ts +28 -65
- package/dist/src/utils/managed-command-preparation.js +33 -140
- package/dist/src/utils/managed-command-preparation.js.map +1 -1
- package/dist/src/utils/managed-command-review.d.ts +11 -4
- package/dist/src/utils/managed-command-review.js +33 -21
- package/dist/src/utils/managed-command-review.js.map +1 -1
- package/dist/src/utils/managed-command-runtime.d.ts +1 -0
- package/dist/src/utils/managed-command-runtime.js +6 -3
- package/dist/src/utils/managed-command-runtime.js.map +1 -1
- package/dist/src/utils/managed-command-snapshots.d.ts +17 -0
- package/dist/src/utils/managed-command-snapshots.js +84 -0
- package/dist/src/utils/managed-command-snapshots.js.map +1 -0
- package/dist/src/utils/managed-command-store.d.ts +65 -78
- package/dist/src/utils/managed-command-store.js +446 -383
- package/dist/src/utils/managed-command-store.js.map +1 -1
- package/dist/src/utils/multi-source-catalog.d.ts +2 -0
- package/dist/src/utils/multi-source-catalog.js +3 -1
- 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 +5 -0
- package/dist/src/utils/native-cli.js +166 -53
- package/dist/src/utils/native-cli.js.map +1 -1
- package/dist/src/utils/native-tool-context.d.ts +6 -3
- package/dist/src/utils/native-tool-context.js +3 -1
- package/dist/src/utils/native-tool-context.js.map +1 -1
- package/dist/src/utils/native-tool-review.d.ts +2 -12
- package/dist/src/utils/native-tool-review.js +6 -108
- package/dist/src/utils/native-tool-review.js.map +1 -1
- package/dist/src/utils/ownership.d.ts +8 -0
- package/dist/src/utils/ownership.js +17 -3
- 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/platform-empty-state.d.ts +32 -6
- package/dist/src/utils/platform-empty-state.js +146 -75
- package/dist/src/utils/platform-empty-state.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 +134 -0
- package/dist/src/utils/plugin-config-command-apply.js.map +1 -0
- package/dist/src/utils/plugin-config-impact.d.ts +19 -9
- package/dist/src/utils/plugin-config-impact.js +56 -37
- package/dist/src/utils/plugin-config-impact.js.map +1 -1
- package/dist/src/utils/plugin-config-write.d.ts +19 -19
- package/dist/src/utils/plugin-config-write.js +196 -770
- package/dist/src/utils/plugin-config-write.js.map +1 -1
- package/dist/src/utils/plugin-scripts.js +19 -8
- package/dist/src/utils/plugin-scripts.js.map +1 -1
- package/dist/src/utils/process-tree.d.ts +1 -1
- package/dist/src/utils/process-tree.js +1 -1
- package/dist/src/utils/process-tree.js.map +1 -1
- package/dist/src/utils/rendered-contract.js +12 -6
- package/dist/src/utils/rendered-contract.js.map +1 -1
- package/dist/src/utils/skill-invocation-warning.d.ts +8 -3
- package/dist/src/utils/skill-invocation-warning.js +27 -1
- package/dist/src/utils/skill-invocation-warning.js.map +1 -1
- package/package.json +4 -3
- package/dist/src/platforms/managed-command-placement.d.ts +0 -8
- package/dist/src/platforms/managed-command-placement.js +0 -79
- package/dist/src/platforms/managed-command-placement.js.map +0 -1
- package/dist/src/utils/managed-command-evidence.d.ts +0 -7
- package/dist/src/utils/managed-command-evidence.js +0 -10
- package/dist/src/utils/managed-command-evidence.js.map +0 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { describeNativeToolClosure } from '../utils/native-tool-review.js';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
+
import { isDeliveryCapabilityGap } from '../utils/component-gap.js';
|
|
3
4
|
import { CatalogSourceInventoryIncompleteError } from '../utils/catalog-source-references.js';
|
|
4
5
|
import { inventoryRecoveryDiagnostic } from '../utils/inventory-recovery-diagnostic.js';
|
|
5
|
-
import {
|
|
6
|
+
import { commandPackageProviderSatisfied } from '../commands/lifecycle-command-package.js';
|
|
6
7
|
import { runRebuildCommand } from '../commands/rebuild-command.js';
|
|
7
8
|
import { buildRebuildReceiptJson } from '../output/command-receipt.js';
|
|
8
9
|
import { withAwHomeMutationLock } from '../utils/aw-home-mutation-lock.js';
|
|
@@ -25,6 +26,7 @@ import { selectAgents, writePreferences } from '../intent/deployment-preferences
|
|
|
25
26
|
import { calculateIntentDigest } from '../intent/intent-codec.js';
|
|
26
27
|
import { observeIntent } from '../intent/intent-store.js';
|
|
27
28
|
import { assertNeutralAncestorChain, createScopeContext } from '../intent/scope-context.js';
|
|
29
|
+
import { retainedOutputDiagnostic, scopeNativeComponentGaps, uniqueRecoveryComponentGaps } from './receipt.js';
|
|
28
30
|
import { prepareJointRecovery, executeJointRecovery } from './joint-coordinator.js';
|
|
29
31
|
import { createEmptyNativeDemandView } from '../utils/native-demand.js';
|
|
30
32
|
import { resolvePluginMetaDependencyClosure } from '../utils/plugin-dependencies.js';
|
|
@@ -218,7 +220,7 @@ function nativeResults(plan, group, result, executed) {
|
|
|
218
220
|
if (executed && result.commandResults?.length) {
|
|
219
221
|
plan.receipt.commandResults = [...new Map([
|
|
220
222
|
...(plan.receipt.commandResults ?? []), ...result.commandResults,
|
|
221
|
-
].map((entry) => [
|
|
223
|
+
].map((entry) => [entry.packageId, entry])).values()];
|
|
222
224
|
}
|
|
223
225
|
const backend = buildRebuildReceiptJson(group.command === 'install' ? 'sync' : group.command, result);
|
|
224
226
|
for (const { pluginId, platform } of nativeGroupTargets(group)) {
|
|
@@ -230,14 +232,20 @@ function nativeResults(plan, group, result, executed) {
|
|
|
230
232
|
const matchesTarget = (entry) => entry.target.pluginId === pluginId
|
|
231
233
|
&& entry.target.platform === platform && entry.target.scope === plan.options.scope;
|
|
232
234
|
const backendTargets = result.targetResults.filter(matchesTarget);
|
|
235
|
+
const rebuildTargets = result.rebuildResults.filter((entry) => entry.target.pluginId === pluginId
|
|
236
|
+
&& entry.target.platform === platform && entry.target.scope === plan.options.scope);
|
|
233
237
|
const deploymentPlans = new Map([
|
|
234
238
|
...(group.preview.operationPlan?.deploymentPlans ?? []),
|
|
235
239
|
...(result.operationPlan?.deploymentPlans ?? []),
|
|
236
240
|
].filter((deployment) => deployment.binding.plugin.pluginId === pluginId
|
|
237
241
|
&& deployment.binding.platform === platform && deployment.binding.scope.kind === plan.options.scope)
|
|
238
242
|
.map((deployment) => [deployment.binding.id, deployment]));
|
|
239
|
-
if (deploymentPlans.size)
|
|
243
|
+
if (deploymentPlans.size) {
|
|
240
244
|
target.deploymentPlans = [...deploymentPlans.values()];
|
|
245
|
+
const gaps = target.deploymentPlans.flatMap(({ expected, evidence }) => scopeNativeComponentGaps(expected.unmet, target, evidence.renderUnits));
|
|
246
|
+
if (gaps.length)
|
|
247
|
+
target.componentGaps = uniqueRecoveryComponentGaps(gaps);
|
|
248
|
+
}
|
|
241
249
|
const exclusions = [
|
|
242
250
|
...(group.preview.deploymentExclusions ?? []),
|
|
243
251
|
...(result.deploymentExclusions ?? []),
|
|
@@ -249,19 +257,13 @@ function nativeResults(plan, group, result, executed) {
|
|
|
249
257
|
target.deploymentExclusions = [...new Map(exclusions.map((entry) => [JSON.stringify([entry.pluginId, entry.platform, entry.scope, entry.productId, entry.reasonCode]), entry])).values()];
|
|
250
258
|
const dependencies = result.dependencyPlan?.targets.filter((entry) => entry.platform === platform && (entry.pluginId === pluginId || entry.requiredBy?.includes(pluginId))) ?? [];
|
|
251
259
|
const producers = (result.commandResults ?? []).filter((entry) => {
|
|
252
|
-
|
|
260
|
+
const producerPluginId = entry.selector;
|
|
261
|
+
const plugin = plan.demand.plugins.find((plugin) => plugin.pluginId === producerPluginId);
|
|
262
|
+
if (plugin && plugin.sourceIdentity !== entry.producer.sourceIdentity)
|
|
263
|
+
return false;
|
|
264
|
+
const declaration = plugin?.manifest.command;
|
|
265
|
+
if (!declaration?.platforms.includes(platform))
|
|
253
266
|
return false;
|
|
254
|
-
if (entry.producer.platform === null) {
|
|
255
|
-
// Package identity is shared by AW; its declaration defines the Native consumers.
|
|
256
|
-
const plugin = plan.demand.plugins.find((plugin) => plugin.sourceId === entry.producer.sourceId
|
|
257
|
-
&& plugin.sourceIdentity === entry.producer.sourceIdentity
|
|
258
|
-
&& plugin.manifest.name === entry.producer.pluginName);
|
|
259
|
-
const declaration = plugin?.manifest.managedCommands?.packages.find((declaration) => declaration.key === entry.producer.key && declaration.scope === entry.producer.scope);
|
|
260
|
-
if (!declaration?.platforms.includes(platform)
|
|
261
|
-
|| entry.producer.scope === 'project' && entry.producer.projectRoot !== plan.context.projectRoot)
|
|
262
|
-
return false;
|
|
263
|
-
}
|
|
264
|
-
const producerPluginId = `${entry.producer.sourceId}/${entry.producer.pluginName}`;
|
|
265
267
|
return producerPluginId === pluginId
|
|
266
268
|
|| dependencies.some((dependency) => dependency.pluginId === producerPluginId)
|
|
267
269
|
|| result.targetResults.some((target) => target.target.pluginId === producerPluginId
|
|
@@ -279,10 +281,8 @@ function nativeResults(plan, group, result, executed) {
|
|
|
279
281
|
block(target, failure.errorCode ?? 'nativeRecoveryFailed');
|
|
280
282
|
}
|
|
281
283
|
// Keep checked recovery locations even when preparation stops before execution.
|
|
282
|
-
const nativeDiagnostics =
|
|
283
|
-
|
|
284
|
-
.flatMap((entry) => entry.deploymentReceipts ?? [])
|
|
285
|
-
.flatMap((entry) => [...entry.diagnostics, ...entry.effects.flatMap((effect) => effect.diagnostics)])
|
|
284
|
+
const nativeDiagnostics = rebuildTargets
|
|
285
|
+
.flatMap((entry) => [...(entry.cleanupNotices ?? []), ...(entry.deploymentReceipts ?? []).flatMap((deployment) => [...deployment.diagnostics, ...deployment.effects.flatMap((effect) => effect.diagnostics)])])
|
|
286
286
|
.filter((entry) => entry.detail);
|
|
287
287
|
for (const entry of nativeDiagnostics) {
|
|
288
288
|
const destination = entry.severity === 'error' ? target.blockers : (target.reasons ??= []);
|
|
@@ -301,14 +301,12 @@ function nativeResults(plan, group, result, executed) {
|
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
if (executed) {
|
|
304
|
-
const deployments =
|
|
305
|
-
&& entry.target.platform === platform && entry.target.scope === plan.options.scope)
|
|
306
|
-
.flatMap((entry) => entry.deploymentReceipts ?? []);
|
|
304
|
+
const deployments = rebuildTargets.flatMap((entry) => entry.deploymentReceipts ?? []);
|
|
307
305
|
if (deployments.length)
|
|
308
306
|
target.deploymentReceipts = deployments.map((entry) => ({ ...entry,
|
|
309
307
|
products: deploymentPlans.get(entry.bindingId)?.binding.consumers ?? [],
|
|
310
308
|
}));
|
|
311
|
-
const commandFailures = producers.filter((entry) => entry
|
|
309
|
+
const commandFailures = producers.filter((entry) => !commandPackageProviderSatisfied(entry));
|
|
312
310
|
for (const producer of commandFailures) {
|
|
313
311
|
for (const error of producer.errors)
|
|
314
312
|
block(target, error.code);
|
|
@@ -318,7 +316,8 @@ function nativeResults(plan, group, result, executed) {
|
|
|
318
316
|
const succeeded = commandFailures.length === 0 && backendTargets.length > 0
|
|
319
317
|
&& backendTargets.every((entry) => entry.state === 'completed');
|
|
320
318
|
const effects = deployments.flatMap((entry) => entry.effects);
|
|
321
|
-
const changed = effects.some((effect) => effect.mutation !== 'none')
|
|
319
|
+
const changed = effects.some((effect) => effect.mutation !== 'none')
|
|
320
|
+
|| rebuildTargets.some((entry) => entry.cleanupMutation !== undefined);
|
|
322
321
|
if (succeeded) {
|
|
323
322
|
const unchanged = deployments.length > 0 ? effects.every((effect) => effect.status === 'unchanged')
|
|
324
323
|
: backendTargets.every((entry) => entry.action === 'skipped');
|
|
@@ -350,6 +349,39 @@ function nativeResults(plan, group, result, executed) {
|
|
|
350
349
|
target.observation = succeeded ? 'verified' : 'unknown';
|
|
351
350
|
target.content = succeeded ? 'satisfied' : 'unknown';
|
|
352
351
|
}
|
|
352
|
+
if (deployments.length && plan.command !== 'cleanup' && plan.command !== 'uninstall') {
|
|
353
|
+
const gaps = deployments.flatMap((entry) => scopeNativeComponentGaps(entry.unmet, target, deploymentPlans.get(entry.bindingId)?.evidence.renderUnits));
|
|
354
|
+
if (gaps.length)
|
|
355
|
+
target.componentGaps = uniqueRecoveryComponentGaps(gaps);
|
|
356
|
+
const installed = new Set(deployments.flatMap((entry) => {
|
|
357
|
+
const deployment = deploymentPlans.get(entry.bindingId);
|
|
358
|
+
if (!deployment)
|
|
359
|
+
return [];
|
|
360
|
+
const ids = new Set(deployment.expected.components.map(({ id }) => id));
|
|
361
|
+
if (!succeeded) {
|
|
362
|
+
const partial = new Set(deployment.effects.filter((effect) => (effect.kind === 'publish-package' || effect.kind === 'write-supplement')
|
|
363
|
+
&& entry.effects.some((actual) => actual.id === effect.id && actual.status === 'applied' && actual.mutation === 'confirmed'))
|
|
364
|
+
.flatMap((effect) => effect.componentIds));
|
|
365
|
+
for (const id of ids)
|
|
366
|
+
if (!partial.has(id))
|
|
367
|
+
ids.delete(id);
|
|
368
|
+
}
|
|
369
|
+
for (const gap of entry.unmet)
|
|
370
|
+
if (!isDeliveryCapabilityGap(gap))
|
|
371
|
+
ids.delete(gap.componentId ?? gap.id);
|
|
372
|
+
return entry.after.components.filter(({ id, presence, reasonCodes }) => ids.has(id) && presence === 'present' && !reasonCodes.length).map(({ id }) => id);
|
|
373
|
+
}));
|
|
374
|
+
if (installed.size || succeeded && target.deploymentPlans?.every(({ expected }) => !expected.components.length)) {
|
|
375
|
+
target.installedComponentCount = installed.size;
|
|
376
|
+
target.installedComponentIds = [...installed];
|
|
377
|
+
}
|
|
378
|
+
if (succeeded && !target.blockers.length && gaps.every(isDeliveryCapabilityGap)) {
|
|
379
|
+
if (installed.size)
|
|
380
|
+
target.satisfaction = 'installed';
|
|
381
|
+
else if (gaps.length && target.deploymentPlans?.every(({ expected }) => !expected.components.length))
|
|
382
|
+
target.satisfaction = 'not-applicable';
|
|
383
|
+
}
|
|
384
|
+
}
|
|
353
385
|
if (!succeeded && !target.blockers.length)
|
|
354
386
|
block(target, 'nativeRecoveryFailed');
|
|
355
387
|
}
|
|
@@ -377,12 +409,13 @@ function portableResults(plan, prepared) {
|
|
|
377
409
|
const gaps = (prepared.unmet ?? []).filter((gap) => gap.agent === agent);
|
|
378
410
|
if (gaps.length)
|
|
379
411
|
target.componentGaps = gaps;
|
|
412
|
+
const blockingGap = gaps.some((gap) => !isDeliveryCapabilityGap(gap));
|
|
380
413
|
target.content = observations.some((entry) => entry.observation === 'conflict') ? 'conflict'
|
|
381
414
|
: observations.some((entry) => entry.observation === 'unknown') ? 'unknown'
|
|
382
415
|
: observations.some((entry) => entry.observation === 'drifted') ? 'drifted'
|
|
383
416
|
: observations.some((entry) => entry.observation === 'absent') ? 'absent'
|
|
384
|
-
: observations.length || prepared.intentionalEmpty
|
|
385
|
-
if (
|
|
417
|
+
: observations.length || prepared.intentionalEmpty || gaps.length && !blockingGap && !prepared.blockers.length ? 'satisfied' : 'unknown';
|
|
418
|
+
if ((blockingGap || observations.some((entry) => entry.disposition === 'retain')) && target.content !== 'conflict')
|
|
386
419
|
target.content = 'unknown';
|
|
387
420
|
target.observation = target.content === 'satisfied' ? 'verified'
|
|
388
421
|
: target.content === 'absent' ? 'missing' : 'unknown';
|
|
@@ -390,9 +423,15 @@ function portableResults(plan, prepared) {
|
|
|
390
423
|
plan.changes.push(`组件未满足 · ${gap.providerPluginId} · ${gap.componentId ?? gap.id} · ${gap.reasonCode}`
|
|
391
424
|
+ gap.requiredFeatures.map((requirement) => ` · ${requirement.feature}${requirement.values ? `: ${requirement.values.join(', ')}` : ''}`).join(''));
|
|
392
425
|
for (const code of [...prepared.globalBlockers, ...observations.flatMap((entry) => entry.blocker
|
|
393
|
-
&& !(entry.disposition === 'retain' && entry.blocker === '
|
|
426
|
+
&& !(entry.disposition === 'retain' && entry.blocker === 'previousDeploymentRetained') ? [entry.blocker] : [])]) {
|
|
394
427
|
block(target, code, portablePreparationDiagnostic(prepared, diagnostic(code), agent));
|
|
395
428
|
}
|
|
429
|
+
const retained = observations.filter((entry) => entry.disposition === 'retain');
|
|
430
|
+
if (retained.length)
|
|
431
|
+
target.reasons = retained.map((entry) => retainedOutputDiagnostic(entry.providerPluginId, agent, target.scope, entry.physicalPath, `skill.${entry.skill}`));
|
|
432
|
+
const policyNotices = prepared.policyNotices?.filter((notice) => notice.subject?.target === agent);
|
|
433
|
+
if (policyNotices?.length)
|
|
434
|
+
(target.reasons ??= []).push(...policyNotices);
|
|
396
435
|
target.backend = observations.map((entry) => ({ skill: entry.skill, providerPluginId: entry.providerPluginId,
|
|
397
436
|
requiredBy: portableRequiredBy(plan, prepared, entry), observation: entry.observation,
|
|
398
437
|
ownership: entry.ownership, associatedAgents: entry.associatedAgents }));
|
|
@@ -412,12 +451,13 @@ function portableOutcomes(plan, prepared, agent, outcomes, globalBlockers) {
|
|
|
412
451
|
const gaps = (prepared.unmet ?? []).filter((gap) => gap.agent === agent);
|
|
413
452
|
if (gaps.length)
|
|
414
453
|
target.componentGaps = gaps;
|
|
415
|
-
const
|
|
454
|
+
const blockingGap = gaps.some((gap) => !isDeliveryCapabilityGap(gap));
|
|
455
|
+
const completeEmpty = prepared.mode === 'deploy' && (prepared.intentionalEmpty || gaps.length > 0 && !blockingGap) && prepared.blockers.length === 0
|
|
416
456
|
&& globalBlockers.length === 0 && preparedTargets.every((entry) => entry.disposition === 'remove')
|
|
417
457
|
&& outcomes.length === preparedTargets.length
|
|
418
458
|
&& outcomes.every((entry) => entry.observation === 'absent' && entry.blockers.length === 0
|
|
419
459
|
&& ['applied', 'no-op'].includes(entry.execution));
|
|
420
|
-
target.execution = (prepared.mode === 'cleanup' ||
|
|
460
|
+
target.execution = (prepared.mode === 'cleanup' || completeEmpty) && outcomes.length === 0 && !globalBlockers.length ? 'no-op' : outcomes.length > 0 && outcomes.every((entry) => entry.execution === 'no-op') ? 'no-op'
|
|
421
461
|
: outcomes.length > 0 && outcomes.every((entry) => ['applied', 'no-op'].includes(entry.execution)) ? 'applied'
|
|
422
462
|
: outcomes.some((entry) => ['applied', 'no-op'].includes(entry.execution)) ? 'partial'
|
|
423
463
|
: outcomes.some((entry) => entry.execution === 'failed') ? 'failed' : 'not-run';
|
|
@@ -436,17 +476,34 @@ function portableOutcomes(plan, prepared, agent, outcomes, globalBlockers) {
|
|
|
436
476
|
target.observation = 'missing';
|
|
437
477
|
target.content = 'absent';
|
|
438
478
|
}
|
|
439
|
-
else if (
|
|
479
|
+
else if (completeEmpty) {
|
|
440
480
|
target.observation = 'verified';
|
|
441
481
|
target.content = 'satisfied';
|
|
442
482
|
}
|
|
443
|
-
if (
|
|
483
|
+
if (prepared.mode === 'deploy') {
|
|
484
|
+
const installed = contentOutcomes.filter((entry) => entry.providerPluginId === target.pluginId
|
|
485
|
+
&& entry.disposition === 'write' && entry.observation === 'satisfied' && !entry.blockers.length);
|
|
486
|
+
if (installed.length || !globalBlockers.length && contentOutcomes.every((entry) => entry.disposition === 'retain' || entry.observation === 'satisfied' || entry.observation === 'absent')) {
|
|
487
|
+
target.installedComponentCount = installed.length;
|
|
488
|
+
if (installed.every((entry) => entry.componentId))
|
|
489
|
+
target.installedComponentIds = installed.map((entry) => entry.componentId);
|
|
490
|
+
}
|
|
491
|
+
if (target.content === 'satisfied' && !blockingGap && !globalBlockers.length && outcomes.every((entry) => !entry.blockers.length)
|
|
492
|
+
&& (target.execution === 'applied' || target.execution === 'no-op')) {
|
|
493
|
+
if (installed.length)
|
|
494
|
+
target.satisfaction = 'installed';
|
|
495
|
+
else if (gaps.some((gap) => gap.providerPluginId === target.pluginId))
|
|
496
|
+
target.satisfaction = 'not-applicable';
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
if (blockingGap || contentOutcomes.some((entry) => entry.disposition === 'retain')) {
|
|
444
500
|
if (target.execution === 'applied' || target.execution === 'no-op')
|
|
445
501
|
target.execution = 'partial';
|
|
446
502
|
if (target.content !== 'conflict')
|
|
447
503
|
target.content = 'unknown';
|
|
448
504
|
target.observation = 'unknown';
|
|
449
|
-
|
|
505
|
+
if (blockingGap)
|
|
506
|
+
block(target, 'portableComponentsUnmet');
|
|
450
507
|
}
|
|
451
508
|
target.backend = outcomes.map((entry) => ({ skill: entry.skill, providerPluginId: entry.providerPluginId,
|
|
452
509
|
requiredBy: portableRequiredBy(plan, prepared, entry), observation: entry.observation,
|
|
@@ -465,7 +522,8 @@ function portablePluginClosure(plan, prepared) {
|
|
|
465
522
|
.filter((plugin) => !prepared.options.excludedPluginIds?.includes(plugin.pluginId));
|
|
466
523
|
}
|
|
467
524
|
function isHealthyPortableProvider(group) {
|
|
468
|
-
return !group.blockers.length &&
|
|
525
|
+
return !group.blockers.length && group.unmet.every(isDeliveryCapabilityGap)
|
|
526
|
+
&& (group.intentionalEmpty || group.unmet.length > 0 || group.targets.length > 0)
|
|
469
527
|
&& group.targets.every((target) => target.disposition === 'write' && target.ownership === 'aw'
|
|
470
528
|
&& target.observation === 'satisfied' && target.installedDigest === target.expectedDigest);
|
|
471
529
|
}
|
|
@@ -794,8 +852,12 @@ export async function prepareScopedRecovery(command, selectors, options, runtime
|
|
|
794
852
|
const delivery = preciseCleanup ? isPortableAgent(agent)
|
|
795
853
|
? { kind: 'agent-skills', provider: 'aw', agentId: 'generic' }
|
|
796
854
|
: { kind: 'native', platform: agent } : resolvedDelivery;
|
|
855
|
+
const configPackageBlocker = delivery?.kind === 'native' && options.existingOnly
|
|
856
|
+
? runtime.configApplyPackages?.targets.find((target) => target.pluginId === pluginId
|
|
857
|
+
&& target.platforms.includes(delivery.platform))?.blocker : undefined;
|
|
797
858
|
receipt.targetResults.push({ pluginId, agent, scope: options.scope, delivery, execution: 'not-run', observation: 'unknown',
|
|
798
859
|
blockers: [...(preciseCleanup ? [] : root?.blockers ?? []).map(diagnostic),
|
|
860
|
+
...(configPackageBlocker ? [configPackageBlocker] : []),
|
|
799
861
|
...(refreshFailures.has(parsePluginId(pluginId).sourceId)
|
|
800
862
|
? [diagnostic(refreshFailures.get(parsePluginId(pluginId).sourceId))] : []),
|
|
801
863
|
...(!delivery ? [diagnostic(preciseCleanup ? 'backend-action-unsupported' : 'deliveryUnsupported')] : [])],
|
|
@@ -855,7 +917,7 @@ export async function prepareScopedRecovery(command, selectors, options, runtime
|
|
|
855
917
|
for (const change of nativeToolChanges) {
|
|
856
918
|
for (const [verb, closure] of [['撤销', change.before], ['使用', change.after]]) {
|
|
857
919
|
if (closure)
|
|
858
|
-
plan.changes.push(...describeNativeToolClosure(closure).map((description) => `${verb}原生工具 · ${change.producer.sourceId}/${change.producer.pluginName} · ${
|
|
920
|
+
plan.changes.push(...describeNativeToolClosure(closure).map((description) => `${verb}原生工具 · ${change.producer.sourceId}/${change.producer.pluginName} · ${description}`));
|
|
859
921
|
}
|
|
860
922
|
}
|
|
861
923
|
for (const override of preview.dependencyPlan?.scopeOverrides ?? []) {
|
|
@@ -1085,8 +1147,7 @@ async function executeNativeGroup(plan, group, nativeRuntime) {
|
|
|
1085
1147
|
}, expectedPlanFingerprint: group.preview.operationPlan?.planFingerprint }, group.command, nativeGroupTargets(group));
|
|
1086
1148
|
receipt.outputsMayHaveChanged ||= result.rebuildResults.some((result) => result.actions.some((action) => action.name === 'stale.cleanup' || action.name === 'native.write' || action.name === 'artifacts.write'
|
|
1087
1149
|
|| action.name === 'recovery.cleanup' || action.name === 'cleanup.owned'))
|
|
1088
|
-
|| (
|
|
1089
|
-
&& result.operationPlan?.actions.some((action) => action.kind === 'syncManagedCommandPackage') === true);
|
|
1150
|
+
|| (result.commandResults ?? []).some(({ action, state }) => action !== 'unchanged' || state === 'partial');
|
|
1090
1151
|
nativeResults(plan, group, result, true);
|
|
1091
1152
|
}
|
|
1092
1153
|
catch (error) {
|
|
@@ -1482,8 +1543,11 @@ export function describeRecoveryPlan(plan) {
|
|
|
1482
1543
|
});
|
|
1483
1544
|
return { inputs: plan.joint?.evidence ?? [plan.originalIntent, plan.preferencesEvidence],
|
|
1484
1545
|
catalog: plan.command === 'install' ? plan.demand.catalogOperationContext?.generationSetDigest : undefined,
|
|
1546
|
+
pendingUserSkills: plan.joint?.pendingUserSkills,
|
|
1547
|
+
providerRetirements: plan.joint ? [...plan.joint.providerRetirements] : undefined,
|
|
1485
1548
|
command: plan.command, dependencyCleanupTargets: plan.dependencyCleanupTargets,
|
|
1486
|
-
declaration: plan.joint?.declaration, packages: plan.runtime.configApplyPackages ? { targets: plan.runtime.configApplyPackages.targets, evidence: plan.runtime.configApplyPackages.evidence } : undefined,
|
|
1549
|
+
declaration: plan.joint?.declaration, packages: plan.runtime.configApplyPackages ? { targets: plan.runtime.configApplyPackages.targets, evidence: plan.runtime.configApplyPackages.evidence } : undefined,
|
|
1550
|
+
portableCommandWithdrawals: plan.portableCommandWithdrawals, blockers: plan.receipt.blockers,
|
|
1487
1551
|
children: (plan.joint?.children ?? [plan]).map(describe) };
|
|
1488
1552
|
}
|
|
1489
1553
|
//# sourceMappingURL=coordinator.js.map
|