@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,401 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import fs from 'fs-extra';
|
|
3
|
+
import { isCanonicalCodexMarketplaceRegistration } from '../utils/codex-shared-native.js';
|
|
4
|
+
import { DEFAULT_AGENT_VERSION_PROBE_TIMEOUT_MS } from '../constants.js';
|
|
5
|
+
import { readCodexConfigFile } from '../utils/codex-config.js';
|
|
6
|
+
import { runNativeCli } from '../utils/native-cli.js';
|
|
7
|
+
import { createCodexNativeObservationSession } from '../utils/codex-native-observation.js';
|
|
8
|
+
import { rethrowFatalError } from '../utils/codex-executable-discovery.js';
|
|
9
|
+
import { inspectOwnedComponents, readSkillOwnerMarker } from '../utils/ownership.js';
|
|
10
|
+
import { readPlatformPackageContentDigest } from '../utils/platform-empty-state.js';
|
|
11
|
+
import { installationInvocation } from './discovery.js';
|
|
12
|
+
import { inspectPiDeployment } from './inspection-pi.js';
|
|
13
|
+
import { inspectGrokDeployment } from './inspection-grok.js';
|
|
14
|
+
import { getQualifiedPlatformProfile } from './capabilities.js';
|
|
15
|
+
import { getPhysicalKey } from './identity.js';
|
|
16
|
+
import { queryNativeDeployment, queryNativeDeploymentResult } from './inspection-query.js';
|
|
17
|
+
import { geminiActivationRules, geminiExtensionPaths, geminiScopePattern, geminiUserActivation, readGeminiActivationSnapshot, readGeminiNativeCopyContentDigest } from './gemini-activation.js';
|
|
18
|
+
function object(value) {
|
|
19
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
20
|
+
throw new Error('nativeObservationInvalid');
|
|
21
|
+
return value;
|
|
22
|
+
}
|
|
23
|
+
async function jsonFile(file) {
|
|
24
|
+
try {
|
|
25
|
+
return object(JSON.parse(await fs.readFile(file, 'utf8')));
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
if (['ENOENT', 'ENOTDIR'].includes(error.code ?? ''))
|
|
29
|
+
return {};
|
|
30
|
+
throw error;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function setActivation(result, activation) {
|
|
34
|
+
for (const consumer of result.consumers)
|
|
35
|
+
consumer.activation = activation;
|
|
36
|
+
}
|
|
37
|
+
function rows(stdout) {
|
|
38
|
+
const value = JSON.parse(stdout);
|
|
39
|
+
if (!Array.isArray(value) || value.length > 4096)
|
|
40
|
+
throw new Error('nativeObservationInvalid');
|
|
41
|
+
return value.map(object);
|
|
42
|
+
}
|
|
43
|
+
function diagnostic(result, binding, code, message) {
|
|
44
|
+
result.diagnostics.push({ code, severity: 'warning', message,
|
|
45
|
+
subject: { target: binding.platform, pluginId: binding.plugin.pluginId, scope: binding.scope.kind } });
|
|
46
|
+
}
|
|
47
|
+
async function inspectConfiguration(ctx, binding, result, read) {
|
|
48
|
+
try {
|
|
49
|
+
result.configuration = { scope: binding.scope.kind, ...await read(), reasonCodes: [] };
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
rethrowFatalError(error);
|
|
53
|
+
ctx.signal?.throwIfAborted();
|
|
54
|
+
result.configuration = { scope: binding.scope.kind, activation: 'unknown', reasonCodes: ['nativeConfigurationUnreadable'] };
|
|
55
|
+
if (!['foreign', 'shared'].includes(result.ownership))
|
|
56
|
+
result.ownership = 'unknown';
|
|
57
|
+
diagnostic(result, binding, 'nativeConfigurationUnreadable', 'Local configuration could not be read. Native observations are retained.');
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function configuredActivation(value, allowServerList = false) {
|
|
61
|
+
if (value === undefined)
|
|
62
|
+
return 'absent';
|
|
63
|
+
if (typeof value === 'boolean')
|
|
64
|
+
return value ? 'enabled' : 'disabled';
|
|
65
|
+
if (allowServerList && Array.isArray(value) && value.every((item) => typeof item === 'string'))
|
|
66
|
+
return 'enabled';
|
|
67
|
+
throw new Error('nativeActivationInvalid');
|
|
68
|
+
}
|
|
69
|
+
function nativeSourceMatches(source, expected) {
|
|
70
|
+
return typeof source === 'string' && path.isAbsolute(source) && path.normalize(source) === path.normalize(expected);
|
|
71
|
+
}
|
|
72
|
+
/** Antigravity lists a source type and a copied package path, not the AW source directory. */
|
|
73
|
+
async function inspectAntigravityCopy(binding, layout, result, rows) {
|
|
74
|
+
const matches = rows.filter((row) => row.name === layout.nativeIdentity.packageId);
|
|
75
|
+
if (matches.length > 1)
|
|
76
|
+
throw new Error('nativeIdentityDuplicate');
|
|
77
|
+
result.registration = matches.length ? 'present' : 'absent';
|
|
78
|
+
const row = matches[0];
|
|
79
|
+
if (!row) {
|
|
80
|
+
setActivation(result, 'disabled');
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (typeof row.enabled !== 'boolean')
|
|
84
|
+
throw new Error('nativeActivationInvalid');
|
|
85
|
+
setActivation(result, row.enabled ? 'enabled' : 'disabled');
|
|
86
|
+
const root = layout.physicalIdentity.namespaceRoot;
|
|
87
|
+
const directory = path.join(root, 'plugins', layout.nativeIdentity.packageId);
|
|
88
|
+
if (row.source !== 'antigravity' || row.path !== directory) {
|
|
89
|
+
result.ownership = 'foreign';
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
if (rows.some((other) => other !== row && nativeSourceMatches(other.path, directory))) {
|
|
93
|
+
result.ownership = 'shared';
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const component = { kind: 'owned-directory', path: directory, allowedRoot: root,
|
|
97
|
+
identity: { owner: 'agent-workflows', plugin: layout.nativeIdentity.packageId,
|
|
98
|
+
sourceId: binding.plugin.sourceId, sourceIdentity: binding.plugin.sourceIdentity, pluginId: binding.plugin.pluginId,
|
|
99
|
+
platform: binding.platform, scope: binding.scope.kind, physicalKey: binding.physicalKey, artifactKey: path.basename(layout.packageRoot) } };
|
|
100
|
+
const inspected = (await inspectOwnedComponents({ components: [component] })).components[0];
|
|
101
|
+
if (inspected.state !== 'present') {
|
|
102
|
+
result.ownership = inspected.state === 'foreign' ? 'foreign' : 'unknown';
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
const marker = await readSkillOwnerMarker({ skillRoot: directory, allowedRoot: root, expectedIdentity: component.identity });
|
|
106
|
+
const digest = await readPlatformPackageContentDigest(directory);
|
|
107
|
+
if (!marker?.nativeProjection || getPhysicalKey(marker.nativeProjection.physicalIdentity) !== binding.physicalKey
|
|
108
|
+
|| !digest || digest !== marker.nativeProjection.contentDigest) {
|
|
109
|
+
result.ownership = 'unknown';
|
|
110
|
+
result.diagnostics.push({ code: 'nativePackageContentUnconfirmed', severity: 'warning',
|
|
111
|
+
message: 'The Antigravity copy has unconfirmed content. Keep local data and check its ownership before retrying.',
|
|
112
|
+
subject: { target: binding.platform, pluginId: binding.plugin.pluginId, scope: binding.scope.kind } });
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
// The copy's own exact owner remains usable for removal if the AW source is missing.
|
|
116
|
+
if (result.ownership === 'absent')
|
|
117
|
+
result.ownership = 'aw';
|
|
118
|
+
if (result.ownership !== 'aw')
|
|
119
|
+
return;
|
|
120
|
+
result.nativePackageContentDigest = digest;
|
|
121
|
+
const sourceDigest = await readPlatformPackageContentDigest(layout.packageRoot);
|
|
122
|
+
const reason = !sourceDigest ? 'nativePackageContentUnconfirmed' : sourceDigest !== digest ? 'nativePackageContentDrift' : null;
|
|
123
|
+
if (reason) {
|
|
124
|
+
result.components = result.components.map((component) => ({ ...component, presence: 'unknown', reasonCodes: [...component.reasonCodes, reason] }));
|
|
125
|
+
result.diagnostics.push({ code: reason, severity: 'warning',
|
|
126
|
+
message: 'The Antigravity copy does not confirm the current AW package bytes. Run sync to refresh the native copy.',
|
|
127
|
+
subject: { target: binding.platform, pluginId: binding.plugin.pluginId, scope: binding.scope.kind } });
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
/** Only documented local-directory marketplace sources can establish ownership. */
|
|
131
|
+
export async function inspectClaudeMarketplaceSource(ctx, binding, name, root) {
|
|
132
|
+
const inventory = rows(await queryNativeDeployment(ctx, binding, ['plugin', 'marketplace', 'list', '--json']));
|
|
133
|
+
const matching = inventory.filter((row) => row.name === name);
|
|
134
|
+
if (!matching.length)
|
|
135
|
+
return 'absent';
|
|
136
|
+
if (matching.length !== 1)
|
|
137
|
+
throw new Error('nativeIdentityDuplicate');
|
|
138
|
+
const row = matching[0];
|
|
139
|
+
return row.source === 'directory' && nativeSourceMatches(row.path, root)
|
|
140
|
+
&& (row.installLocation === undefined || nativeSourceMatches(row.installLocation, root)) ? 'canonical' : 'foreign';
|
|
141
|
+
}
|
|
142
|
+
export async function inspectCopilotMarketplaceSource(ctx, binding, name, root) {
|
|
143
|
+
const value = JSON.parse(await queryNativeDeployment(ctx, binding, ['plugin', 'marketplace', 'list', '--json']));
|
|
144
|
+
if (!Array.isArray(value))
|
|
145
|
+
return 'unknown';
|
|
146
|
+
const rows = value.map(object);
|
|
147
|
+
if (rows.some((row) => typeof row.name !== 'string'))
|
|
148
|
+
return 'unknown';
|
|
149
|
+
const matching = rows.filter((row) => row.name === name);
|
|
150
|
+
if (!matching.length)
|
|
151
|
+
return 'absent';
|
|
152
|
+
if (matching.length !== 1)
|
|
153
|
+
return 'unknown';
|
|
154
|
+
const source = matching[0].source;
|
|
155
|
+
if (typeof source === 'string') {
|
|
156
|
+
// Copilot 1.0.95 renders directory sources with this display prefix.
|
|
157
|
+
const location = source.startsWith('Local: ') ? source.slice('Local: '.length) : source;
|
|
158
|
+
return nativeSourceMatches(location, root) ? 'canonical' : 'foreign';
|
|
159
|
+
}
|
|
160
|
+
if (!source || typeof source !== 'object' || Array.isArray(source))
|
|
161
|
+
return 'unknown';
|
|
162
|
+
const descriptor = source;
|
|
163
|
+
if (descriptor.source !== 'directory')
|
|
164
|
+
return typeof descriptor.source === 'string' ? 'foreign' : 'unknown';
|
|
165
|
+
return nativeSourceMatches(descriptor.path, root) ? 'canonical' : 'foreign';
|
|
166
|
+
}
|
|
167
|
+
export async function inspectNativeDeployment(ctx, binding, layout, result) {
|
|
168
|
+
const nativeId = layout.nativeIdentity.registrationId ?? layout.nativeIdentity.packageId;
|
|
169
|
+
switch (binding.route) {
|
|
170
|
+
case 'codex-marketplace': {
|
|
171
|
+
await inspectConfiguration(ctx, binding, result, async () => {
|
|
172
|
+
const config = await readCodexConfigFile(path.join(layout.activationPath, 'config.toml'));
|
|
173
|
+
const host = binding.scope.kind === 'user' ? config : await readCodexConfigFile(path.join(layout.physicalIdentity.namespaceRoot, 'config.toml'));
|
|
174
|
+
const marketplaces = [host.snapshot, config.snapshot].map((snapshot) => snapshot.marketplaces[layout.marketplaceName]).filter((entry) => entry !== undefined);
|
|
175
|
+
const marketplace = marketplaces.some((entry) => !isCanonicalCodexMarketplaceRegistration(entry, layout.marketplaceRoot))
|
|
176
|
+
? 'foreign' : marketplaces.length ? 'canonical' : 'absent';
|
|
177
|
+
if (marketplace === 'foreign')
|
|
178
|
+
result.ownership = 'foreign';
|
|
179
|
+
return { activation: configuredActivation(config.snapshot.plugins[nativeId]?.enabled), marketplace };
|
|
180
|
+
});
|
|
181
|
+
const product = binding.consumers.find((item) => item.entry?.kind === 'cli' && item.availability === 'available');
|
|
182
|
+
if (!product || product.entry?.kind !== 'cli') {
|
|
183
|
+
result.registration = 'unknown';
|
|
184
|
+
setActivation(result, 'unknown');
|
|
185
|
+
result.diagnostics.push({ code: 'nativeEntryUnavailable', severity: 'warning',
|
|
186
|
+
message: 'The native client is unavailable. Its registration and effective activation are unknown.',
|
|
187
|
+
subject: { target: binding.platform, pluginId: binding.plugin.pluginId, scope: binding.scope.kind } });
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
const invocation = await installationInvocation(product, ctx, []);
|
|
191
|
+
const manager = { kind: product.product === 'app' ? 'app' : 'system',
|
|
192
|
+
version: product.version ?? 'unknown', command: invocation.command, argsPrefix: invocation.args };
|
|
193
|
+
const session = ctx.codexObservationSession ?? await createCodexNativeObservationSession({ exactCwd: binding.scope.kind === 'project' ? binding.scope.projectRoot : ctx.cwd,
|
|
194
|
+
env: ctx.env ?? process.env, manager,
|
|
195
|
+
runner: async (request) => {
|
|
196
|
+
const response = await runNativeCli({ ...request, signal: ctx.signal, timeoutMs: DEFAULT_AGENT_VERSION_PROBE_TIMEOUT_MS }, ctx.runner);
|
|
197
|
+
if (Buffer.byteLength(response.stdout) + Buffer.byteLength(response.stderr) > 1024 * 1024)
|
|
198
|
+
throw new Error('nativeObservationOutputLimit');
|
|
199
|
+
return response;
|
|
200
|
+
} });
|
|
201
|
+
try {
|
|
202
|
+
// inspectPlugin binds both list invocations synchronously before yielding.
|
|
203
|
+
// A concurrent product can invalidate the cache, not change these reads.
|
|
204
|
+
session.setManager(manager);
|
|
205
|
+
const observed = await session.inspectPlugin({ pluginId: nativeId, scope: binding.scope.kind });
|
|
206
|
+
if (ctx.observeNative && binding.scope.kind === 'project' && product.product === 'cli'
|
|
207
|
+
&& product.version === '0.167.0' && getQualifiedPlatformProfile('codex', ctx).qualifiedConsumers?.skill?.some((qualified) => qualified.product === product.product && qualified.version === product.version)) {
|
|
208
|
+
session.setManager(manager);
|
|
209
|
+
const trust = await session.inspectProjectTrust(binding.scope.projectRoot);
|
|
210
|
+
for (const consumer of result.consumers)
|
|
211
|
+
if (consumer.productId === product.id && consumer.trust === 'unknown'
|
|
212
|
+
&& trust.state === 'observed')
|
|
213
|
+
consumer.trust = trust.trust === 'trusted' ? 'trusted' : 'blocked';
|
|
214
|
+
if (trust.state === 'failed')
|
|
215
|
+
result.diagnostics.push({ code: 'nativeObservationFailed', severity: 'warning',
|
|
216
|
+
message: 'The native client could not complete its effective project trust observation.',
|
|
217
|
+
subject: { target: binding.platform, pluginId: binding.plugin.pluginId, scope: binding.scope.kind } });
|
|
218
|
+
}
|
|
219
|
+
if (observed.observation.state !== 'observed') {
|
|
220
|
+
result.registration = 'unknown';
|
|
221
|
+
setActivation(result, 'unknown');
|
|
222
|
+
result.diagnostics.push({ code: observed.observation.state === 'failed' ? 'nativeObservationFailed' : 'nativeObservationUnconfirmed',
|
|
223
|
+
severity: 'warning', message: 'The selected native client could not confirm its registration.',
|
|
224
|
+
subject: { target: binding.platform, pluginId: binding.plugin.pluginId, scope: binding.scope.kind } });
|
|
225
|
+
break;
|
|
226
|
+
}
|
|
227
|
+
result.registration = observed.observation.value === 'installed' ? 'present' : 'absent';
|
|
228
|
+
const active = observed.activations[binding.scope.kind];
|
|
229
|
+
setActivation(result, active === true ? 'enabled' : active === false ? 'disabled' : 'unknown');
|
|
230
|
+
}
|
|
231
|
+
finally {
|
|
232
|
+
if (!ctx.codexObservationSession)
|
|
233
|
+
await session.dispose();
|
|
234
|
+
}
|
|
235
|
+
break;
|
|
236
|
+
}
|
|
237
|
+
case 'claude-marketplace': {
|
|
238
|
+
result.scopeRegistration = 'unknown';
|
|
239
|
+
await inspectConfiguration(ctx, binding, result, async () => {
|
|
240
|
+
const settings = await jsonFile(path.join(layout.activationPath, binding.scope.kind === 'project' ? 'settings.local.json' : 'settings.json'));
|
|
241
|
+
return { activation: configuredActivation(settings.enabledPlugins === undefined ? undefined : object(settings.enabledPlugins)[nativeId], true) };
|
|
242
|
+
});
|
|
243
|
+
const [marketplaceRead, pluginsRead] = await Promise.allSettled([
|
|
244
|
+
inspectClaudeMarketplaceSource(ctx, binding, layout.marketplaceName, layout.marketplaceRoot),
|
|
245
|
+
queryNativeDeployment(ctx, binding, ['plugin', 'list', '--json']),
|
|
246
|
+
]);
|
|
247
|
+
if (marketplaceRead.status === 'rejected') {
|
|
248
|
+
rethrowFatalError(marketplaceRead.reason);
|
|
249
|
+
ctx.signal?.throwIfAborted();
|
|
250
|
+
if (!['foreign', 'shared'].includes(result.ownership))
|
|
251
|
+
result.ownership = 'unknown';
|
|
252
|
+
diagnostic(result, binding, 'nativeMarketplaceUnconfirmed', 'The native marketplace source could not be confirmed. Keep the shared package.');
|
|
253
|
+
}
|
|
254
|
+
else if (marketplaceRead.value === 'foreign')
|
|
255
|
+
result.ownership = 'foreign';
|
|
256
|
+
if (pluginsRead.status === 'rejected')
|
|
257
|
+
throw pluginsRead.reason;
|
|
258
|
+
const inventory = rows(pluginsRead.value);
|
|
259
|
+
if (inventory.some((row) => row.id === layout.nativeIdentity.packageId))
|
|
260
|
+
result.ownership = 'foreign';
|
|
261
|
+
const matching = inventory.filter((row) => row.id === nativeId && (['user', 'managed'].includes(String(row.scope))
|
|
262
|
+
|| binding.scope.kind === 'project' && ['project', 'local'].includes(String(row.scope))
|
|
263
|
+
&& nativeSourceMatches(row.projectPath, binding.scope.projectRoot)));
|
|
264
|
+
result.registration = matching.length ? 'present' : 'absent';
|
|
265
|
+
result.scopeRegistration = matching.some((row) => binding.scope.kind === 'user' ? row.scope === 'user'
|
|
266
|
+
: row.scope === 'local' && nativeSourceMatches(row.projectPath, binding.scope.projectRoot)) ? 'present' : 'absent';
|
|
267
|
+
const states = matching.map((row) => row.enabled);
|
|
268
|
+
setActivation(result, states.length && states.every((enabled) => enabled === true) ? 'enabled'
|
|
269
|
+
: states.length && states.every((enabled) => enabled === false) ? 'disabled' : 'unknown');
|
|
270
|
+
// The native path identifies the actual folder used for in-place loading.
|
|
271
|
+
if (matching.some((row) => row.readFromFolder !== undefined && !nativeSourceMatches(row.readFromFolder, layout.packageRoot)))
|
|
272
|
+
result.ownership = 'foreign';
|
|
273
|
+
if (matching.length && marketplaceRead.status === 'fulfilled' && marketplaceRead.value === 'absent'
|
|
274
|
+
&& matching.some((row) => !nativeSourceMatches(row.readFromFolder, layout.packageRoot))
|
|
275
|
+
&& !['foreign', 'shared'].includes(result.ownership))
|
|
276
|
+
result.ownership = 'unknown';
|
|
277
|
+
break;
|
|
278
|
+
}
|
|
279
|
+
case 'antigravity-cli': {
|
|
280
|
+
const value = JSON.parse(await queryNativeDeployment(ctx, binding, ['plugin', 'list', '--json']));
|
|
281
|
+
if (!Array.isArray(value) || value.length > 4096)
|
|
282
|
+
throw new Error('nativeObservationInvalid');
|
|
283
|
+
await inspectAntigravityCopy(binding, layout, result, value.map(object));
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
case 'copilot-marketplace': {
|
|
287
|
+
await inspectConfiguration(ctx, binding, result, async () => {
|
|
288
|
+
const settings = await jsonFile(path.join(layout.activationPath, binding.scope.kind === 'project' ? 'settings.local.json' : 'settings.json'));
|
|
289
|
+
return { activation: configuredActivation(settings.enabledPlugins === undefined ? undefined : object(settings.enabledPlugins)[nativeId]) };
|
|
290
|
+
});
|
|
291
|
+
// These inventories are independent. Finish both reads before returning,
|
|
292
|
+
// including when one fails, so no native read outlives this inspection.
|
|
293
|
+
const [marketplaceRead, pluginsRead] = await Promise.allSettled([
|
|
294
|
+
inspectCopilotMarketplaceSource(ctx, binding, layout.marketplaceName, layout.marketplaceRoot),
|
|
295
|
+
queryNativeDeployment(ctx, binding, ['plugin', 'list', '--json']),
|
|
296
|
+
]);
|
|
297
|
+
const marketplace = marketplaceRead.status === 'fulfilled' ? marketplaceRead.value : 'unknown';
|
|
298
|
+
if (marketplaceRead.status === 'rejected') {
|
|
299
|
+
rethrowFatalError(marketplaceRead.reason);
|
|
300
|
+
ctx.signal?.throwIfAborted();
|
|
301
|
+
diagnostic(result, binding, 'nativeMarketplaceUnconfirmed', 'The native marketplace source could not be confirmed. Keep the shared package.');
|
|
302
|
+
}
|
|
303
|
+
if (marketplace === 'foreign')
|
|
304
|
+
result.ownership = 'foreign';
|
|
305
|
+
if (marketplace === 'unknown' && !['foreign', 'shared'].includes(result.ownership))
|
|
306
|
+
result.ownership = 'unknown';
|
|
307
|
+
if (pluginsRead.status === 'rejected')
|
|
308
|
+
throw pluginsRead.reason;
|
|
309
|
+
const matches = rows(pluginsRead.value).filter((row) => row.name === layout.nativeIdentity.packageId && row.marketplace === layout.marketplaceName);
|
|
310
|
+
if (matches.length > 1)
|
|
311
|
+
throw new Error('nativeIdentityDuplicate');
|
|
312
|
+
result.registration = matches.length ? 'present' : 'absent';
|
|
313
|
+
const row = matches[0];
|
|
314
|
+
if (row && marketplace !== 'canonical' && !nativeSourceMatches(row.source, layout.marketplaceRoot)
|
|
315
|
+
&& !nativeSourceMatches(row.installedFrom, layout.marketplaceRoot) && !['foreign', 'shared'].includes(result.ownership)) {
|
|
316
|
+
// Unrecognized source shapes remain unknown and cannot authorize mutation.
|
|
317
|
+
result.ownership = 'unknown';
|
|
318
|
+
}
|
|
319
|
+
setActivation(result, row?.enabled === true ? 'enabled' : row?.enabled === false ? 'disabled' : 'unknown');
|
|
320
|
+
break;
|
|
321
|
+
}
|
|
322
|
+
case 'pi-package':
|
|
323
|
+
await inspectPiDeployment(ctx, binding, layout, result);
|
|
324
|
+
break;
|
|
325
|
+
case 'gemini-extension': {
|
|
326
|
+
await inspectConfiguration(ctx, binding, result, async () => {
|
|
327
|
+
const snapshot = await readGeminiActivationSnapshot(ctx);
|
|
328
|
+
const rules = geminiActivationRules(snapshot, nativeId);
|
|
329
|
+
if (binding.scope.kind === 'project') {
|
|
330
|
+
const target = geminiScopePattern(binding.scope.projectRoot);
|
|
331
|
+
const explicit = rules.filter((rule) => rule === target || rule === `!${target}`).at(-1);
|
|
332
|
+
return { activation: explicit === undefined ? 'absent' : explicit === target ? 'enabled' : 'disabled' };
|
|
333
|
+
}
|
|
334
|
+
if (!rules.some((rule) => rule === '*' || rule === '!*'))
|
|
335
|
+
return { activation: 'absent' };
|
|
336
|
+
const enabled = geminiUserActivation(snapshot, nativeId, geminiExtensionPaths(ctx).home);
|
|
337
|
+
return { activation: enabled === 'unknown' ? 'unknown' : enabled ? 'enabled' : 'disabled' };
|
|
338
|
+
});
|
|
339
|
+
// Gemini 0.67 flushes its JSON ConsoleLog events to stderr on exit.
|
|
340
|
+
// A second output stream cannot establish an unambiguous inventory.
|
|
341
|
+
const output = await queryNativeDeploymentResult(ctx, binding, ['extensions', 'list', '--output-format', 'json']);
|
|
342
|
+
if (output.stdout.trim())
|
|
343
|
+
throw new Error('nativeObservationInvalid');
|
|
344
|
+
const inventory = rows(output.stderr);
|
|
345
|
+
if (inventory.some((row) => typeof row.name !== 'string' || !row.name.trim()
|
|
346
|
+
|| typeof row.isActive !== 'boolean' || typeof row.path !== 'string'))
|
|
347
|
+
throw new Error('nativeObservationInvalid');
|
|
348
|
+
const matches = inventory.filter((row) => row.name === nativeId);
|
|
349
|
+
if (matches.length > 1)
|
|
350
|
+
throw new Error('nativeIdentityDuplicate');
|
|
351
|
+
result.registration = matches.length ? 'present' : 'absent';
|
|
352
|
+
const row = matches[0];
|
|
353
|
+
setActivation(result, row?.isActive === true ? 'enabled' : row?.isActive === false ? 'disabled' : 'unknown');
|
|
354
|
+
if (!row)
|
|
355
|
+
break;
|
|
356
|
+
// Identity and content checks protect mutation. They cannot negate list facts.
|
|
357
|
+
try {
|
|
358
|
+
const { root } = geminiExtensionPaths(ctx);
|
|
359
|
+
const directory = path.join(root, nativeId);
|
|
360
|
+
if (!nativeSourceMatches(row.path, directory)) {
|
|
361
|
+
result.ownership = 'foreign';
|
|
362
|
+
break;
|
|
363
|
+
}
|
|
364
|
+
const stats = await fs.lstat(directory);
|
|
365
|
+
if (stats.isSymbolicLink() || !stats.isDirectory())
|
|
366
|
+
throw new Error('nativeExtensionPathUnconfirmed');
|
|
367
|
+
const metadata = await jsonFile(path.join(directory, '.gemini-extension-install.json'));
|
|
368
|
+
const manifest = await jsonFile(path.join(directory, 'gemini-extension.json'));
|
|
369
|
+
if (typeof metadata.source !== 'string' || typeof metadata.type !== 'string' || typeof manifest.name !== 'string') {
|
|
370
|
+
throw new Error('nativeExtensionIdentityUnknown');
|
|
371
|
+
}
|
|
372
|
+
if (!['local', 'link'].includes(metadata.type) || !nativeSourceMatches(metadata.source, layout.packageRoot)
|
|
373
|
+
|| manifest.name !== nativeId)
|
|
374
|
+
result.ownership = 'foreign';
|
|
375
|
+
if (result.ownership === 'aw') {
|
|
376
|
+
result.nativePackageContentDigest = await readGeminiNativeCopyContentDigest(ctx, layout.nativeIdentity, {
|
|
377
|
+
owner: 'agent-workflows', plugin: nativeId, pluginId: binding.plugin.pluginId,
|
|
378
|
+
sourceId: binding.plugin.sourceId, sourceIdentity: binding.plugin.sourceIdentity,
|
|
379
|
+
platform: binding.platform, scope: 'user', physicalKey: binding.physicalKey, artifactKey: path.basename(layout.packageRoot),
|
|
380
|
+
});
|
|
381
|
+
if (!result.nativePackageContentDigest)
|
|
382
|
+
diagnostic(result, binding, 'nativePackageContentUnconfirmed', 'The installed extension content could not be confirmed. Keep the native copy until its ownership is checked.');
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
catch (error) {
|
|
386
|
+
rethrowFatalError(error);
|
|
387
|
+
ctx.signal?.throwIfAborted();
|
|
388
|
+
if (!['foreign', 'shared'].includes(result.ownership))
|
|
389
|
+
result.ownership = 'unknown';
|
|
390
|
+
diagnostic(result, binding, 'nativePackageContentUnconfirmed', 'The installed extension identity or content could not be read. Native observations are retained.');
|
|
391
|
+
}
|
|
392
|
+
break;
|
|
393
|
+
}
|
|
394
|
+
case 'grok-cli':
|
|
395
|
+
case 'grok-directory':
|
|
396
|
+
await inspectGrokDeployment(ctx, binding, layout, result, JSON.parse(await queryNativeDeployment(ctx, binding, ['plugin', 'list', '--json'])), JSON.parse(await queryNativeDeployment(ctx, binding, ['inspect', '--json'])));
|
|
397
|
+
break;
|
|
398
|
+
default: break;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
//# sourceMappingURL=inspection-native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspection-native.js","sourceRoot":"","sources":["../../../src/platforms/inspection-native.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,UAAU,CAAC;AAE1B,OAAO,EAAE,uCAAuC,EAAE,MAAM,iCAAiC,CAAC;AAC1F,OAAO,EAAE,sCAAsC,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,mCAAmC,EAAE,MAAM,sCAAsC,CAAC;AAC3F,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AACrF,OAAO,EAAE,gCAAgC,EAAE,MAAM,kCAAkC,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAGxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,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BAAqB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EACtD,IAAI,CAAC,KAAK,CAAC,MAAM,qBAAqB,CAAC,GAAG,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EACnF,IAAI,CAAC,KAAK,CAAC,MAAM,qBAAqB,CAAC,GAAG,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;YAChF,MAAM;QACR,OAAO,CAAC,CAAC,MAAM;IACjB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { DeploymentBinding, DeploymentObservation, ReadContext } from './contracts.js';
|
|
2
|
+
import { type DeploymentLayout } from './layout.js';
|
|
3
|
+
/** Explicit observation starts one scoped, loopback-only private service per supported CLI, without a model session. */
|
|
4
|
+
export declare function inspectOpenCodeDeployment(ctx: ReadContext, binding: DeploymentBinding, layout: DeploymentLayout, result: DeploymentObservation): Promise<void>;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { queryNativeDeployment } from './inspection-query.js';
|
|
3
|
+
import { getDeploymentResourceKey } from './layout.js';
|
|
4
|
+
import { rethrowFatalError } from '../utils/codex-executable-discovery.js';
|
|
5
|
+
function object(value) {
|
|
6
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
7
|
+
throw new Error('opencodeNativeResponseInvalid');
|
|
8
|
+
return value;
|
|
9
|
+
}
|
|
10
|
+
function samePath(value, expected) {
|
|
11
|
+
return typeof value === 'string' && path.isAbsolute(value) && path.normalize(value) === path.normalize(expected);
|
|
12
|
+
}
|
|
13
|
+
function diagnostic(result, binding, code, message) {
|
|
14
|
+
result.diagnostics.push({ code, severity: 'warning', message,
|
|
15
|
+
subject: { target: binding.platform, pluginId: binding.plugin.pluginId, scope: binding.scope.kind } });
|
|
16
|
+
}
|
|
17
|
+
/** V2.0.0 inventory contains active/failed server plugins; it has no disabled state. */
|
|
18
|
+
function nativeState(stdout, cwd, binding, layout) {
|
|
19
|
+
const response = object(JSON.parse(stdout));
|
|
20
|
+
if (!samePath(object(response.location).directory, cwd)
|
|
21
|
+
|| !Array.isArray(response.data) || response.data.length > 4096)
|
|
22
|
+
throw new Error('opencodeNativeLocationUnconfirmed');
|
|
23
|
+
const id = getDeploymentResourceKey(binding.plugin);
|
|
24
|
+
const sourceMatches = (source) => source.type === 'local'
|
|
25
|
+
&& (samePath(source.path, layout.packageRoot) || samePath(source.path, path.join(layout.packageRoot, 'index.mjs')));
|
|
26
|
+
const matches = response.data.map(object).filter((row) => row.id === id || sourceMatches(object(row.source)));
|
|
27
|
+
// A private service can return before asynchronous activation finishes. Absence does not prove disabled state.
|
|
28
|
+
if (!matches.length)
|
|
29
|
+
return 'unknown';
|
|
30
|
+
if (matches.length !== 1)
|
|
31
|
+
throw new Error('opencodeNativeIdentityDuplicate');
|
|
32
|
+
const row = matches[0];
|
|
33
|
+
const state = object(row.state);
|
|
34
|
+
if (!sourceMatches(object(row.source)) || (row.id !== undefined && row.id !== id)
|
|
35
|
+
|| object(row.features).server !== true)
|
|
36
|
+
throw new Error('opencodeNativeIdentityUnconfirmed');
|
|
37
|
+
if (state.status === 'active' && row.id === id)
|
|
38
|
+
return 'active';
|
|
39
|
+
// Load failures can occur before the module exposes its ID. The exact local source still identifies the failure.
|
|
40
|
+
if (state.status === 'failed' && typeof state.error === 'string')
|
|
41
|
+
return 'failed';
|
|
42
|
+
throw new Error('opencodeNativeStateUnconfirmed');
|
|
43
|
+
}
|
|
44
|
+
/** Explicit observation starts one scoped, loopback-only private service per supported CLI, without a model session. */
|
|
45
|
+
export async function inspectOpenCodeDeployment(ctx, binding, layout, result) {
|
|
46
|
+
result.registration = 'not-applicable';
|
|
47
|
+
for (const consumer of result.consumers) {
|
|
48
|
+
consumer.activation = 'unknown';
|
|
49
|
+
consumer.trust = 'unknown';
|
|
50
|
+
consumer.load = 'unknown';
|
|
51
|
+
}
|
|
52
|
+
if (!ctx.observeNative) {
|
|
53
|
+
if (result.package === 'present')
|
|
54
|
+
diagnostic(result, binding, 'opencodeNativeObservationRequired', 'OpenCode activation and loading require explicit native observation. This can start a private local service.');
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const products = binding.consumers.filter((product) => product.product === 'cli' && product.entry?.kind === 'cli'
|
|
58
|
+
&& product.availability === 'available' && product.version === '2.0.0');
|
|
59
|
+
if (!products.length) {
|
|
60
|
+
diagnostic(result, binding, 'opencodeNativeVersionUnverified', 'Native observation requires an available OpenCode 2.0.0 CLI. Other client state remains unknown.');
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const env = { ...(ctx.env ?? process.env), OPENCODE_DISABLE_MODELS_FETCH: '1', OPENCODE_DISABLE_AUTOUPDATE: '1',
|
|
64
|
+
...(binding.scope.kind === 'user' ? { OPENCODE_CONFIG_PROJECT_DISABLE: '1' } : {}) };
|
|
65
|
+
for (const product of products) {
|
|
66
|
+
try {
|
|
67
|
+
let cwd = '';
|
|
68
|
+
const stdout = await queryNativeDeployment({ ...ctx, env }, { ...binding, consumers: [product] }, (queryCwd) => {
|
|
69
|
+
cwd = queryCwd;
|
|
70
|
+
const query = new URLSearchParams({ 'location[directory]': queryCwd });
|
|
71
|
+
// --standalone bypasses managed service discovery and its version/remote reuse.
|
|
72
|
+
// The CLI owns the child's stdin lease and closes its scoped process on command completion.
|
|
73
|
+
return ['api', 'GET', `/api/plugin?${query}`, '--standalone'];
|
|
74
|
+
});
|
|
75
|
+
const state = nativeState(stdout, cwd, binding, layout);
|
|
76
|
+
const consumer = result.consumers.find((candidate) => candidate.productId === product.id);
|
|
77
|
+
if (consumer && state === 'active') {
|
|
78
|
+
consumer.activation = 'enabled';
|
|
79
|
+
consumer.load = 'observed';
|
|
80
|
+
}
|
|
81
|
+
else if (state === 'failed') {
|
|
82
|
+
if (consumer)
|
|
83
|
+
consumer.load = 'not-observed';
|
|
84
|
+
diagnostic(result, binding, 'opencodePluginLoadFailed', 'OpenCode reported a plugin load failure. Check the client diagnostics before retrying native observation.');
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
diagnostic(result, binding, 'opencodeNativeActivationPending', 'The private OpenCode service did not confirm this plugin. Retry native observation after checking client startup and configuration.');
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
rethrowFatalError(error);
|
|
92
|
+
ctx.signal?.throwIfAborted();
|
|
93
|
+
diagnostic(result, binding, 'opencodeNativeObservationFailed', 'OpenCode native state could not be read. Check the exact client and plugin source, then retry native observation.');
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=inspection-opencode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspection-opencode.js","sourceRoot":"","sources":["../../../src/platforms/inspection-opencode.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAyB,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAE3E,SAAS,MAAM,CAAC,KAAc;IAC5B,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IAClH,OAAO,KAAgC,CAAC;AAC1C,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc,EAAE,QAAgB;IAChD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CA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AC;QACzH,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { DeploymentBinding, DeploymentObservation, ReadContext } from './contracts.js';
|
|
2
|
+
import type { DeploymentLayout } from './layout.js';
|
|
3
|
+
export declare function inspectPiDeployment(ctx: ReadContext, binding: DeploymentBinding, layout: DeploymentLayout, result: DeploymentObservation): Promise<void>;
|