@lesliechan721/aw 0.1.0-beta.9 → 0.1.0-beta.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authoring/assets/aw-config.mjs +100 -501
- package/dist/authoring/assets/aw-config.mjs.map +1 -1
- package/dist/authoring/assets/aw-runtime-config.d.mts +13 -0
- package/dist/authoring/assets/aw-runtime-config.mjs +221 -0
- package/dist/authoring/assets/aw-runtime-config.mjs.map +1 -0
- package/dist/authoring/assets/command-runtime-config.d.mts +9 -0
- package/dist/authoring/assets/command-runtime-config.mjs +134 -0
- package/dist/authoring/assets/command-runtime-config.mjs.map +1 -0
- package/dist/authoring/scripts/add-skill.mjs +15 -38
- package/dist/authoring/scripts/add-skill.mjs.map +1 -1
- package/dist/authoring/scripts/init-plugin.mjs +72 -96
- package/dist/authoring/scripts/init-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/lib/plugin-root.mjs +4 -4
- package/dist/authoring/scripts/lib/plugin-root.mjs.map +1 -1
- package/dist/authoring/scripts/lib/plugin-version-check.d.mts +1 -0
- package/dist/authoring/scripts/lib/plugin-version-check.mjs +230 -9
- package/dist/authoring/scripts/lib/plugin-version-check.mjs.map +1 -1
- package/dist/authoring/scripts/lib/skill-scaffold.d.mts +2 -2
- package/dist/authoring/scripts/lib/skill-scaffold.mjs +4 -7
- package/dist/authoring/scripts/lib/skill-scaffold.mjs.map +1 -1
- package/dist/authoring/scripts/remove-plugin.mjs +1 -1
- package/dist/authoring/scripts/remove-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/validate-plugin.mjs +416 -1995
- package/dist/authoring/scripts/validate-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/validate-skill.mjs +1 -1
- package/dist/index.js +2 -6
- package/dist/index.js.map +1 -1
- package/dist/native-runtime/reader-runtime.mjs +34 -0
- package/dist/native-runtime/reader.d.mts +6 -0
- package/dist/native-runtime/reader.mjs +11 -0
- package/dist/scripts/aw-skill-eval-materializer.d.ts +11 -1
- package/dist/scripts/aw-skill-eval-materializer.js +118 -115
- package/dist/scripts/aw-skill-eval-materializer.js.map +1 -1
- package/dist/scripts/bundle-plugins.js +25 -7
- package/dist/scripts/bundle-plugins.js.map +1 -1
- package/dist/scripts/plugin-staging.d.ts +7 -7
- package/dist/scripts/plugin-staging.js +10 -8
- package/dist/scripts/plugin-staging.js.map +1 -1
- package/dist/scripts/plugin-test-reporter.d.mts +2 -0
- package/dist/scripts/plugin-test-reporter.mjs +21 -0
- package/dist/scripts/plugin-test-reporter.mjs.map +1 -0
- package/dist/scripts/test-plugin-scripts.d.ts +5 -0
- package/dist/scripts/test-plugin-scripts.js +284 -78
- package/dist/scripts/test-plugin-scripts.js.map +1 -1
- package/dist/scripts/test-workers.d.mts +24 -0
- package/dist/scripts/test-workers.mjs +59 -0
- package/dist/scripts/test-workers.mjs.map +1 -0
- package/dist/src/adapters/helpers.d.ts +7 -0
- package/dist/src/adapters/helpers.js.map +1 -1
- package/dist/src/authoring/workspace-commands.d.ts +3 -0
- package/dist/src/authoring/workspace-commands.js +7 -2
- package/dist/src/authoring/workspace-commands.js.map +1 -1
- package/dist/src/commands/aw-capabilities.d.ts +1 -1
- package/dist/src/commands/aw-capabilities.js +42 -21
- package/dist/src/commands/aw-capabilities.js.map +1 -1
- package/dist/src/commands/catalog-dev-source.d.ts +42 -3
- package/dist/src/commands/catalog-dev-source.js +351 -43
- package/dist/src/commands/catalog-dev-source.js.map +1 -1
- package/dist/src/commands/catalog-generation.d.ts +8 -0
- package/dist/src/commands/catalog-generation.js +1 -5
- package/dist/src/commands/catalog-generation.js.map +1 -1
- package/dist/src/commands/catalog-publication-inspection.d.ts +42 -3
- package/dist/src/commands/catalog-publication-inspection.js +379 -48
- package/dist/src/commands/catalog-publication-inspection.js.map +1 -1
- package/dist/src/commands/catalog-publication-journal.d.ts +23 -4
- package/dist/src/commands/catalog-publication-journal.js +165 -20
- package/dist/src/commands/catalog-publication-journal.js.map +1 -1
- package/dist/src/commands/catalog-publish.d.ts +34 -3
- package/dist/src/commands/catalog-publish.js +311 -165
- package/dist/src/commands/catalog-publish.js.map +1 -1
- package/dist/src/commands/catalog-source.d.ts +54 -8
- package/dist/src/commands/catalog-source.js +277 -15
- package/dist/src/commands/catalog-source.js.map +1 -1
- package/dist/src/commands/catalog-status.js +2 -2
- package/dist/src/commands/catalog-status.js.map +1 -1
- package/dist/src/commands/catalog-store.d.ts +104 -0
- package/dist/src/commands/catalog-store.js +685 -0
- package/dist/src/commands/catalog-store.js.map +1 -0
- package/dist/src/commands/catalog-workspace-resolution.d.ts +4 -0
- package/dist/src/commands/catalog-workspace-resolution.js +18 -3
- package/dist/src/commands/catalog-workspace-resolution.js.map +1 -1
- package/dist/src/commands/console.js +33 -20
- package/dist/src/commands/console.js.map +1 -1
- package/dist/src/commands/dependency-operation-plan.d.ts +14 -56
- package/dist/src/commands/dependency-operation-plan.js +90 -133
- package/dist/src/commands/dependency-operation-plan.js.map +1 -1
- package/dist/src/commands/deployment-confirmation.d.ts +11 -0
- package/dist/src/commands/deployment-confirmation.js +88 -0
- package/dist/src/commands/deployment-confirmation.js.map +1 -0
- package/dist/src/commands/init.js +1 -1
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/intent-command.d.ts +34 -0
- package/dist/src/commands/intent-command.js +174 -0
- package/dist/src/commands/intent-command.js.map +1 -0
- package/dist/src/commands/lifecycle-command-package.d.ts +45 -0
- package/dist/src/commands/lifecycle-command-package.js +199 -0
- package/dist/src/commands/lifecycle-command-package.js.map +1 -0
- package/dist/src/commands/managed-commands.d.ts +41 -0
- package/dist/src/commands/managed-commands.js +404 -0
- package/dist/src/commands/managed-commands.js.map +1 -0
- package/dist/src/commands/offline-cleanup-evidence.d.ts +29 -3
- package/dist/src/commands/offline-cleanup-evidence.js +80 -10
- package/dist/src/commands/offline-cleanup-evidence.js.map +1 -1
- package/dist/src/commands/operation-plan.d.ts +191 -0
- package/dist/src/commands/operation-plan.js +96 -0
- package/dist/src/commands/operation-plan.js.map +1 -0
- package/dist/src/commands/operation-planner.d.ts +47 -0
- package/dist/src/commands/operation-planner.js +142 -0
- package/dist/src/commands/operation-planner.js.map +1 -0
- package/dist/src/commands/options.d.ts +11 -20
- package/dist/src/commands/options.js +31 -36
- package/dist/src/commands/options.js.map +1 -1
- package/dist/src/commands/permission-batch.d.ts +5 -0
- package/dist/src/commands/permission-batch.js +80 -0
- package/dist/src/commands/permission-batch.js.map +1 -0
- package/dist/src/commands/plugin-capabilities.js +96 -46
- package/dist/src/commands/plugin-capabilities.js.map +1 -1
- package/dist/src/commands/public-config-confirmation.d.ts +14 -0
- package/dist/src/commands/public-config-confirmation.js +73 -0
- package/dist/src/commands/public-config-confirmation.js.map +1 -0
- package/dist/src/commands/public-interruption.d.ts +9 -0
- package/dist/src/commands/public-interruption.js +23 -0
- package/dist/src/commands/public-interruption.js.map +1 -0
- package/dist/src/commands/public-lifecycle-result.d.ts +106 -0
- package/dist/src/commands/public-lifecycle-result.js +518 -0
- package/dist/src/commands/public-lifecycle-result.js.map +1 -0
- package/dist/src/commands/public-lifecycle.d.ts +27 -0
- package/dist/src/commands/public-lifecycle.js +563 -0
- package/dist/src/commands/public-lifecycle.js.map +1 -0
- package/dist/src/commands/public-plugin-query.d.ts +16 -0
- package/dist/src/commands/public-plugin-query.js +230 -0
- package/dist/src/commands/public-plugin-query.js.map +1 -0
- package/dist/src/commands/rebuild-command.d.ts +176 -25
- package/dist/src/commands/rebuild-command.js +3989 -1392
- package/dist/src/commands/rebuild-command.js.map +1 -1
- package/dist/src/commands/rebuild-integration.d.ts +133 -52
- package/dist/src/commands/rebuild-integration.js +1097 -2692
- package/dist/src/commands/rebuild-integration.js.map +1 -1
- package/dist/src/commands/rebuild-operations.d.ts +74 -23
- package/dist/src/commands/rebuild-operations.js +334 -227
- package/dist/src/commands/rebuild-operations.js.map +1 -1
- package/dist/src/commands/rebuild-platform-integration.d.ts +81 -0
- package/dist/src/commands/rebuild-platform-integration.js +1992 -0
- package/dist/src/commands/rebuild-platform-integration.js.map +1 -0
- package/dist/src/commands/reconcile-operation-plan.d.ts +31 -0
- package/dist/src/commands/reconcile-operation-plan.js +48 -0
- package/dist/src/commands/reconcile-operation-plan.js.map +1 -0
- package/dist/src/commands/review-inspection.d.ts +60 -0
- package/dist/src/commands/review-inspection.js +436 -0
- package/dist/src/commands/review-inspection.js.map +1 -0
- package/dist/src/commands/review-preparation.d.ts +51 -0
- package/dist/src/commands/review-preparation.js +400 -0
- package/dist/src/commands/review-preparation.js.map +1 -0
- package/dist/src/commands/runtime.d.ts +6 -6
- package/dist/src/commands/runtime.js +44 -24
- package/dist/src/commands/runtime.js.map +1 -1
- package/dist/src/commands/skill-eval.d.ts +8 -0
- package/dist/src/commands/skill-eval.js +126 -73
- package/dist/src/commands/skill-eval.js.map +1 -1
- package/dist/src/commands/status-v6.d.ts +185 -68
- package/dist/src/commands/status-v6.js +1592 -499
- package/dist/src/commands/status-v6.js.map +1 -1
- package/dist/src/commands/targets-command.d.ts +38 -0
- package/dist/src/commands/targets-command.js +182 -0
- package/dist/src/commands/targets-command.js.map +1 -0
- package/dist/src/commands/wizard.d.ts +8 -5
- package/dist/src/commands/wizard.js +7 -4
- package/dist/src/commands/wizard.js.map +1 -1
- package/dist/src/commands/write-commands.d.ts +9 -3
- package/dist/src/commands/write-commands.js +144 -44
- package/dist/src/commands/write-commands.js.map +1 -1
- package/dist/src/constants.d.ts +2 -3
- package/dist/src/constants.js +2 -3
- package/dist/src/constants.js.map +1 -1
- package/dist/src/eval/manifest-v1.d.ts +6 -2
- package/dist/src/eval/manifest-v1.js +58 -26
- package/dist/src/eval/manifest-v1.js.map +1 -1
- package/dist/src/generators/local-plugin.d.ts +4 -2
- package/dist/src/generators/local-plugin.js +207 -346
- package/dist/src/generators/local-plugin.js.map +1 -1
- package/dist/src/generators/permissions.d.ts +20 -2
- package/dist/src/generators/permissions.js +82 -15
- package/dist/src/generators/permissions.js.map +1 -1
- package/dist/src/index.d.ts +3 -33
- package/dist/src/index.js +1786 -1945
- package/dist/src/index.js.map +1 -1
- package/dist/src/intent/deployment-preferences.d.ts +63 -0
- package/dist/src/intent/deployment-preferences.js +170 -0
- package/dist/src/intent/deployment-preferences.js.map +1 -0
- package/dist/src/intent/diagnostics.d.ts +11 -0
- package/dist/src/intent/diagnostics.js +14 -0
- package/dist/src/intent/diagnostics.js.map +1 -0
- package/dist/src/intent/intent-codec.d.ts +19 -0
- package/dist/src/intent/intent-codec.js +117 -0
- package/dist/src/intent/intent-codec.js.map +1 -0
- package/dist/src/intent/intent-store.d.ts +43 -0
- package/dist/src/intent/intent-store.js +118 -0
- package/dist/src/intent/intent-store.js.map +1 -0
- package/dist/src/intent/scope-context.d.ts +35 -0
- package/dist/src/intent/scope-context.js +179 -0
- package/dist/src/intent/scope-context.js.map +1 -0
- package/dist/src/intent/work-context.d.ts +13 -0
- package/dist/src/intent/work-context.js +22 -0
- package/dist/src/intent/work-context.js.map +1 -0
- package/dist/src/output/command-receipt.d.ts +37 -86
- package/dist/src/output/command-receipt.js +257 -179
- 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 +69 -0
- package/dist/src/output/public-result.js +403 -0
- package/dist/src/output/public-result.js.map +1 -0
- package/dist/src/output/rebuild-progress.d.ts +3 -0
- package/dist/src/output/rebuild-progress.js +34 -16
- package/dist/src/output/rebuild-progress.js.map +1 -1
- package/dist/src/output/receipt-projection.d.ts +7 -0
- package/dist/src/output/receipt-projection.js +664 -0
- package/dist/src/output/receipt-projection.js.map +1 -0
- package/dist/src/output/skill-invocation-notices.d.ts +18 -0
- package/dist/src/output/skill-invocation-notices.js +84 -0
- package/dist/src/output/skill-invocation-notices.js.map +1 -0
- package/dist/src/platforms/antigravity-permissions.d.ts +50 -0
- package/dist/src/platforms/antigravity-permissions.js +388 -0
- package/dist/src/platforms/antigravity-permissions.js.map +1 -0
- package/dist/src/platforms/capabilities.d.ts +17 -0
- package/dist/src/platforms/capabilities.js +328 -0
- package/dist/src/platforms/capabilities.js.map +1 -0
- package/dist/src/platforms/contracts.d.ts +402 -0
- package/dist/src/platforms/contracts.js +2 -0
- package/dist/src/platforms/contracts.js.map +1 -0
- package/dist/src/platforms/cursor-workspace-hook.d.ts +28 -0
- package/dist/src/platforms/cursor-workspace-hook.js +198 -0
- package/dist/src/platforms/cursor-workspace-hook.js.map +1 -0
- package/dist/src/platforms/discovery.d.ts +98 -0
- package/dist/src/platforms/discovery.js +777 -0
- package/dist/src/platforms/discovery.js.map +1 -0
- package/dist/src/platforms/grok-permission-config.d.ts +23 -0
- package/dist/src/platforms/grok-permission-config.js +184 -0
- package/dist/src/platforms/grok-permission-config.js.map +1 -0
- package/dist/src/platforms/grok-permission-document.d.ts +4 -0
- package/dist/src/platforms/grok-permission-document.js +145 -0
- package/dist/src/platforms/grok-permission-document.js.map +1 -0
- package/dist/src/platforms/grok-permissions.d.ts +17 -0
- package/dist/src/platforms/grok-permissions.js +311 -0
- package/dist/src/platforms/grok-permissions.js.map +1 -0
- package/dist/src/platforms/host-permission-policy.d.ts +38 -0
- package/dist/src/platforms/host-permission-policy.js +86 -0
- package/dist/src/platforms/host-permission-policy.js.map +1 -0
- package/dist/src/platforms/identity.d.ts +4 -0
- package/dist/src/platforms/identity.js +22 -0
- package/dist/src/platforms/identity.js.map +1 -0
- package/dist/src/platforms/inspection-grok.d.ts +4 -0
- package/dist/src/platforms/inspection-grok.js +366 -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 +373 -0
- package/dist/src/platforms/inspection-native.js.map +1 -0
- package/dist/src/platforms/inspection-opencode.d.ts +4 -0
- package/dist/src/platforms/inspection-opencode.js +98 -0
- package/dist/src/platforms/inspection-opencode.js.map +1 -0
- package/dist/src/platforms/inspection-pi.d.ts +9 -0
- package/dist/src/platforms/inspection-pi.js +482 -0
- package/dist/src/platforms/inspection-pi.js.map +1 -0
- package/dist/src/platforms/inspection-query.d.ts +24 -0
- package/dist/src/platforms/inspection-query.js +119 -0
- package/dist/src/platforms/inspection-query.js.map +1 -0
- package/dist/src/platforms/inspection.d.ts +20 -0
- package/dist/src/platforms/inspection.js +259 -0
- package/dist/src/platforms/inspection.js.map +1 -0
- package/dist/src/platforms/layout.d.ts +35 -0
- package/dist/src/platforms/layout.js +317 -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 +14 -0
- package/dist/src/platforms/lifecycle-native.js +223 -0
- package/dist/src/platforms/lifecycle-native.js.map +1 -0
- package/dist/src/platforms/lifecycle.d.ts +27 -0
- package/dist/src/platforms/lifecycle.js +567 -0
- package/dist/src/platforms/lifecycle.js.map +1 -0
- package/dist/src/platforms/opencode-permission-config.d.ts +13 -0
- package/dist/src/platforms/opencode-permission-config.js +253 -0
- package/dist/src/platforms/opencode-permission-config.js.map +1 -0
- package/dist/src/platforms/opencode-permissions.d.ts +39 -0
- package/dist/src/platforms/opencode-permissions.js +212 -0
- package/dist/src/platforms/opencode-permissions.js.map +1 -0
- package/dist/src/platforms/opencode-related-permissions.d.ts +40 -0
- package/dist/src/platforms/opencode-related-permissions.js +177 -0
- package/dist/src/platforms/opencode-related-permissions.js.map +1 -0
- package/dist/src/platforms/permission-ownership.d.ts +89 -0
- package/dist/src/platforms/permission-ownership.js +543 -0
- package/dist/src/platforms/permission-ownership.js.map +1 -0
- package/dist/src/platforms/permission-sidecar.d.ts +70 -0
- package/dist/src/platforms/permission-sidecar.js +215 -0
- package/dist/src/platforms/permission-sidecar.js.map +1 -0
- package/dist/src/platforms/projection-code-extension.d.ts +8 -0
- package/dist/src/platforms/projection-code-extension.js +126 -0
- package/dist/src/platforms/projection-code-extension.js.map +1 -0
- package/dist/src/platforms/projection-command-resources.d.ts +7 -0
- package/dist/src/platforms/projection-command-resources.js +74 -0
- package/dist/src/platforms/projection-command-resources.js.map +1 -0
- package/dist/src/platforms/projection-files.d.ts +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 +13 -0
- package/dist/src/platforms/projection.js +576 -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 +20 -0
- package/dist/src/platforms/supplement-layout.js +53 -0
- package/dist/src/platforms/supplement-layout.js.map +1 -0
- package/dist/src/platforms/supplement-state.d.ts +13 -0
- package/dist/src/platforms/supplement-state.js +93 -0
- package/dist/src/platforms/supplement-state.js.map +1 -0
- package/dist/src/portable/commands.d.ts +58 -11
- package/dist/src/portable/commands.js +99 -345
- package/dist/src/portable/commands.js.map +1 -1
- package/dist/src/portable/historical-materialization.d.ts +22 -0
- package/dist/src/portable/historical-materialization.js +124 -0
- package/dist/src/portable/historical-materialization.js.map +1 -0
- package/dist/src/portable/materializer.d.ts +29 -1
- package/dist/src/portable/materializer.js +197 -258
- package/dist/src/portable/materializer.js.map +1 -1
- package/dist/src/portable/recovery-layout.d.ts +17 -0
- package/dist/src/portable/recovery-layout.js +42 -0
- package/dist/src/portable/recovery-layout.js.map +1 -0
- package/dist/src/portable/recovery.d.ts +176 -0
- package/dist/src/portable/recovery.js +556 -0
- package/dist/src/portable/recovery.js.map +1 -0
- package/dist/src/portable/writer.d.ts +67 -0
- package/dist/src/portable/writer.js +321 -0
- package/dist/src/portable/writer.js.map +1 -0
- package/dist/src/recovery/coordinator.d.ts +168 -0
- package/dist/src/recovery/coordinator.js +1558 -0
- package/dist/src/recovery/coordinator.js.map +1 -0
- package/dist/src/recovery/demand.d.ts +53 -0
- package/dist/src/recovery/demand.js +189 -0
- package/dist/src/recovery/demand.js.map +1 -0
- package/dist/src/recovery/install-concurrency.d.ts +48 -0
- package/dist/src/recovery/install-concurrency.js +196 -0
- package/dist/src/recovery/install-concurrency.js.map +1 -0
- package/dist/src/recovery/interruption.d.ts +19 -0
- package/dist/src/recovery/interruption.js +43 -0
- package/dist/src/recovery/interruption.js.map +1 -0
- package/dist/src/recovery/joint-coordinator.d.ts +46 -0
- package/dist/src/recovery/joint-coordinator.js +1641 -0
- package/dist/src/recovery/joint-coordinator.js.map +1 -0
- package/dist/src/recovery/joint-demand.d.ts +72 -0
- package/dist/src/recovery/joint-demand.js +332 -0
- package/dist/src/recovery/joint-demand.js.map +1 -0
- package/dist/src/recovery/joint-install-execution.d.ts +19 -0
- package/dist/src/recovery/joint-install-execution.js +308 -0
- package/dist/src/recovery/joint-install-execution.js.map +1 -0
- package/dist/src/recovery/joint-install-native-rebase.d.ts +4 -0
- package/dist/src/recovery/joint-install-native-rebase.js +67 -0
- package/dist/src/recovery/joint-install-native-rebase.js.map +1 -0
- package/dist/src/recovery/performance.d.ts +4 -0
- package/dist/src/recovery/performance.js +26 -0
- package/dist/src/recovery/performance.js.map +1 -0
- package/dist/src/recovery/receipt.d.ts +129 -0
- package/dist/src/recovery/receipt.js +91 -0
- package/dist/src/recovery/receipt.js.map +1 -0
- package/dist/src/recovery/retirement.d.ts +47 -0
- package/dist/src/recovery/retirement.js +463 -0
- package/dist/src/recovery/retirement.js.map +1 -0
- package/dist/src/recovery/status.d.ts +143 -0
- package/dist/src/recovery/status.js +1517 -0
- package/dist/src/recovery/status.js.map +1 -0
- package/dist/src/recovery/types.d.ts +85 -0
- package/dist/src/recovery/types.js +2 -0
- package/dist/src/recovery/types.js.map +1 -0
- package/dist/src/review/eval-source-input.d.ts +44 -0
- package/dist/src/review/eval-source-input.js +213 -0
- package/dist/src/review/eval-source-input.js.map +1 -0
- package/dist/src/review/platform-profile.d.ts +6 -0
- package/dist/src/review/platform-profile.js +24 -0
- package/dist/src/review/platform-profile.js.map +1 -0
- package/dist/src/review/review-profile.d.ts +20 -0
- package/dist/src/review/review-profile.js +276 -0
- package/dist/src/review/review-profile.js.map +1 -0
- package/dist/src/review/review-selection.d.ts +20 -0
- package/dist/src/review/review-selection.js +502 -0
- package/dist/src/review/review-selection.js.map +1 -0
- package/dist/src/review/review-types.d.ts +71 -0
- package/dist/src/review/review-types.js +16 -0
- package/dist/src/review/review-types.js.map +1 -0
- package/dist/src/review/skill-materialization.d.ts +65 -0
- package/dist/src/review/skill-materialization.js +228 -0
- package/dist/src/review/skill-materialization.js.map +1 -0
- package/dist/src/review/source-binding.d.ts +201 -0
- package/dist/src/review/source-binding.js +782 -0
- package/dist/src/review/source-binding.js.map +1 -0
- package/dist/src/tui/agent-management.d.ts +23 -0
- package/dist/src/tui/agent-management.js +319 -0
- package/dist/src/tui/agent-management.js.map +1 -0
- package/dist/src/tui/agent-settings.d.ts +47 -0
- package/dist/src/tui/agent-settings.js +97 -0
- package/dist/src/tui/agent-settings.js.map +1 -0
- package/dist/src/tui/catalog-freshness.d.ts +1 -0
- package/dist/src/tui/catalog-freshness.js +2 -0
- package/dist/src/tui/catalog-freshness.js.map +1 -0
- package/dist/src/tui/catalog-generation.d.ts +8 -16
- package/dist/src/tui/catalog-generation.js +97 -10
- package/dist/src/tui/catalog-generation.js.map +1 -1
- package/dist/src/tui/catalog-sources/projection.d.ts +4 -0
- package/dist/src/tui/catalog-sources/projection.js +17 -0
- package/dist/src/tui/catalog-sources/projection.js.map +1 -0
- package/dist/src/tui/catalog-sources/review.d.ts +3 -0
- package/dist/src/tui/catalog-sources/review.js +13 -0
- package/dist/src/tui/catalog-sources/review.js.map +1 -0
- package/dist/src/tui/catalog-sources/screens.d.ts +12 -0
- package/dist/src/tui/catalog-sources/screens.js +40 -0
- package/dist/src/tui/catalog-sources/screens.js.map +1 -0
- package/dist/src/tui/catalog-sources/session.d.ts +32 -0
- package/dist/src/tui/catalog-sources/session.js +300 -0
- package/dist/src/tui/catalog-sources/session.js.map +1 -0
- package/dist/src/tui/catalog-sources/types.d.ts +54 -0
- package/dist/src/tui/catalog-sources/types.js +2 -0
- package/dist/src/tui/catalog-sources/types.js.map +1 -0
- package/dist/src/tui/catalog-store-task.d.ts +16 -0
- package/dist/src/tui/catalog-store-task.js +19 -0
- package/dist/src/tui/catalog-store-task.js.map +1 -0
- package/dist/src/tui/clipboard.d.ts +13 -0
- package/dist/src/tui/clipboard.js +95 -0
- package/dist/src/tui/clipboard.js.map +1 -0
- package/dist/src/tui/components.d.ts +113 -3
- package/dist/src/tui/components.js +201 -34
- package/dist/src/tui/components.js.map +1 -1
- package/dist/src/tui/config-array-draft.d.ts +30 -0
- package/dist/src/tui/config-array-draft.js +51 -0
- package/dist/src/tui/config-array-draft.js.map +1 -0
- package/dist/src/tui/config-leaf-editor.d.ts +44 -0
- package/dist/src/tui/config-leaf-editor.js +227 -0
- package/dist/src/tui/config-leaf-editor.js.map +1 -0
- package/dist/src/tui/config-object-suggestions.d.ts +15 -0
- package/dist/src/tui/config-object-suggestions.js +71 -0
- package/dist/src/tui/config-object-suggestions.js.map +1 -0
- package/dist/src/tui/config-references.d.ts +38 -0
- package/dist/src/tui/config-references.js +82 -0
- package/dist/src/tui/config-references.js.map +1 -0
- package/dist/src/tui/config-suggestions.d.ts +27 -0
- package/dist/src/tui/config-suggestions.js +62 -0
- package/dist/src/tui/config-suggestions.js.map +1 -0
- package/dist/src/tui/config-value-presentation.d.ts +21 -0
- package/dist/src/tui/config-value-presentation.js +129 -0
- package/dist/src/tui/config-value-presentation.js.map +1 -0
- package/dist/src/tui/console-app-v4.d.ts +14 -5
- package/dist/src/tui/console-app-v4.js +10344 -2133
- package/dist/src/tui/console-app-v4.js.map +1 -1
- package/dist/src/tui/content-item-card.d.ts +13 -0
- package/dist/src/tui/content-item-card.js +51 -0
- package/dist/src/tui/content-item-card.js.map +1 -0
- package/dist/src/tui/controller-runtime.d.ts +8 -3
- package/dist/src/tui/controller-runtime.js +2301 -842
- package/dist/src/tui/controller-runtime.js.map +1 -1
- package/dist/src/tui/controller.d.ts +664 -79
- package/dist/src/tui/controller.js +3670 -830
- package/dist/src/tui/controller.js.map +1 -1
- package/dist/src/tui/dependency-graph-view.d.ts +39 -0
- package/dist/src/tui/dependency-graph-view.js +121 -0
- package/dist/src/tui/dependency-graph-view.js.map +1 -0
- package/dist/src/tui/dependency-graph.d.ts +81 -0
- package/dist/src/tui/dependency-graph.js +452 -0
- package/dist/src/tui/dependency-graph.js.map +1 -0
- package/dist/src/tui/deployment-view.d.ts +13 -0
- package/dist/src/tui/deployment-view.js +155 -0
- package/dist/src/tui/deployment-view.js.map +1 -0
- package/dist/src/tui/diagnostic-projection.d.ts +31 -0
- package/dist/src/tui/diagnostic-projection.js +681 -0
- package/dist/src/tui/diagnostic-projection.js.map +1 -0
- package/dist/src/tui/diagnostics.d.ts +6 -2
- package/dist/src/tui/diagnostics.js +14 -2
- package/dist/src/tui/diagnostics.js.map +1 -1
- package/dist/src/tui/entity-cards.d.ts +56 -0
- package/dist/src/tui/entity-cards.js +321 -0
- package/dist/src/tui/entity-cards.js.map +1 -0
- package/dist/src/tui/glossary.d.ts +25 -0
- package/dist/src/tui/glossary.js +78 -0
- package/dist/src/tui/glossary.js.map +1 -0
- package/dist/src/tui/guided-setup.d.ts +25 -0
- package/dist/src/tui/guided-setup.js +101 -0
- package/dist/src/tui/guided-setup.js.map +1 -0
- package/dist/src/tui/index.d.ts +5 -1
- package/dist/src/tui/index.js +4 -1
- package/dist/src/tui/index.js.map +1 -1
- package/dist/src/tui/input-display.d.ts +1 -0
- package/dist/src/tui/input-display.js +23 -1
- package/dist/src/tui/input-display.js.map +1 -1
- package/dist/src/tui/keys.d.ts +44 -0
- package/dist/src/tui/keys.js +43 -15
- package/dist/src/tui/keys.js.map +1 -1
- package/dist/src/tui/lifecycle-action-view.d.ts +6 -0
- package/dist/src/tui/lifecycle-action-view.js +36 -0
- package/dist/src/tui/lifecycle-action-view.js.map +1 -0
- package/dist/src/tui/model.d.ts +187 -52
- package/dist/src/tui/model.js +1202 -426
- package/dist/src/tui/model.js.map +1 -1
- package/dist/src/tui/operation-diagnostic-screens.d.ts +8 -0
- package/dist/src/tui/operation-diagnostic-screens.js +76 -0
- package/dist/src/tui/operation-diagnostic-screens.js.map +1 -0
- package/dist/src/tui/operation-history.d.ts +91 -0
- package/dist/src/tui/operation-history.js +167 -0
- package/dist/src/tui/operation-history.js.map +1 -0
- package/dist/src/tui/operation-review-planner.d.ts +28 -0
- package/dist/src/tui/operation-review-planner.js +1456 -0
- package/dist/src/tui/operation-review-planner.js.map +1 -0
- package/dist/src/tui/plugin-content.d.ts +33 -0
- package/dist/src/tui/plugin-content.js +245 -0
- package/dist/src/tui/plugin-content.js.map +1 -0
- package/dist/src/tui/plugin-detail.d.ts +75 -0
- package/dist/src/tui/plugin-detail.js +267 -0
- package/dist/src/tui/plugin-detail.js.map +1 -0
- package/dist/src/tui/plugin-write-task.d.ts +69 -0
- package/dist/src/tui/plugin-write-task.js +286 -0
- package/dist/src/tui/plugin-write-task.js.map +1 -0
- package/dist/src/tui/prompt.js +4 -15
- package/dist/src/tui/prompt.js.map +1 -1
- package/dist/src/tui/query-header.d.ts +30 -0
- package/dist/src/tui/query-header.js +40 -0
- package/dist/src/tui/query-header.js.map +1 -0
- package/dist/src/tui/reader.d.ts +38 -0
- package/dist/src/tui/reader.js +49 -0
- package/dist/src/tui/reader.js.map +1 -0
- package/dist/src/tui/router.d.ts +182 -39
- package/dist/src/tui/router.js +338 -50
- package/dist/src/tui/router.js.map +1 -1
- package/dist/src/tui/scoped-flow.d.ts +49 -0
- package/dist/src/tui/scoped-flow.js +212 -0
- package/dist/src/tui/scoped-flow.js.map +1 -0
- package/dist/src/tui/scoped-inventory.d.ts +131 -0
- package/dist/src/tui/scoped-inventory.js +280 -0
- package/dist/src/tui/scoped-inventory.js.map +1 -0
- package/dist/src/tui/screen-registry.d.ts +696 -0
- package/dist/src/tui/screen-registry.js +226 -0
- package/dist/src/tui/screen-registry.js.map +1 -0
- package/dist/src/tui/session-console-app.d.ts +8 -0
- package/dist/src/tui/session-console-app.js +24 -0
- package/dist/src/tui/session-console-app.js.map +1 -0
- package/dist/src/tui/session-host.d.ts +45 -0
- package/dist/src/tui/session-host.js +219 -0
- package/dist/src/tui/session-host.js.map +1 -0
- package/dist/src/tui/source-detail-card.d.ts +29 -0
- package/dist/src/tui/source-detail-card.js +45 -0
- package/dist/src/tui/source-detail-card.js.map +1 -0
- package/dist/src/tui/theme.d.ts +12 -0
- package/dist/src/tui/theme.js +12 -0
- package/dist/src/tui/theme.js.map +1 -1
- package/dist/src/tui/viewport.d.ts +1 -0
- package/dist/src/tui/viewport.js +23 -0
- package/dist/src/tui/viewport.js.map +1 -1
- package/dist/src/tui/wizard.js +37 -13
- package/dist/src/tui/wizard.js.map +1 -1
- package/dist/src/types.d.ts +177 -85
- package/dist/src/types.js +1 -0
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils/agent-version.d.ts +10 -4
- package/dist/src/utils/agent-version.js +6 -8
- package/dist/src/utils/agent-version.js.map +1 -1
- package/dist/src/utils/artifact-plan.d.ts +17 -24
- package/dist/src/utils/artifact-plan.js +59 -436
- package/dist/src/utils/artifact-plan.js.map +1 -1
- package/dist/src/utils/artifact-renderer.d.ts +61 -89
- package/dist/src/utils/artifact-renderer.js +187 -364
- package/dist/src/utils/artifact-renderer.js.map +1 -1
- package/dist/src/utils/artifact-request.d.ts +21 -0
- package/dist/src/utils/artifact-request.js +57 -0
- package/dist/src/utils/artifact-request.js.map +1 -0
- package/dist/src/utils/artifact-sources.d.ts +4 -8
- package/dist/src/utils/artifact-sources.js +15 -6
- package/dist/src/utils/artifact-sources.js.map +1 -1
- package/dist/src/utils/aw-home-mutation-lock.js +2 -1
- package/dist/src/utils/aw-home-mutation-lock.js.map +1 -1
- package/dist/src/utils/bundle-layout.js +59 -173
- package/dist/src/utils/bundle-layout.js.map +1 -1
- package/dist/src/utils/catalog-capability-projection.d.ts +8 -0
- package/dist/src/utils/catalog-capability-projection.js +14 -0
- package/dist/src/utils/catalog-capability-projection.js.map +1 -0
- package/dist/src/utils/catalog-digests.d.ts +2 -9
- package/dist/src/utils/catalog-digests.js +7 -45
- package/dist/src/utils/catalog-digests.js.map +1 -1
- package/dist/src/utils/catalog-generation-error.d.ts +4 -1
- package/dist/src/utils/catalog-generation-error.js +2 -0
- package/dist/src/utils/catalog-generation-error.js.map +1 -1
- package/dist/src/utils/catalog-generation-resolver.d.ts +32 -3
- package/dist/src/utils/catalog-generation-resolver.js +182 -40
- package/dist/src/utils/catalog-generation-resolver.js.map +1 -1
- package/dist/src/utils/catalog-generation-service.d.ts +142 -2
- package/dist/src/utils/catalog-generation-service.js +1146 -171
- package/dist/src/utils/catalog-generation-service.js.map +1 -1
- package/dist/src/utils/catalog-generation-state.d.ts +5 -0
- package/dist/src/utils/catalog-generation-state.js +25 -1
- package/dist/src/utils/catalog-generation-state.js.map +1 -1
- package/dist/src/utils/catalog-generation-store.d.ts +29 -2
- package/dist/src/utils/catalog-generation-store.js +240 -36
- package/dist/src/utils/catalog-generation-store.js.map +1 -1
- package/dist/src/utils/catalog-manifest-v7.d.ts +5 -0
- package/dist/src/utils/{catalog-manifest-v6.js → catalog-manifest-v7.js} +23 -23
- package/dist/src/utils/{catalog-manifest-v6.js.map → catalog-manifest-v7.js.map} +1 -1
- package/dist/src/utils/catalog-operation-context.d.ts +27 -3
- package/dist/src/utils/catalog-operation-context.js +75 -4
- package/dist/src/utils/catalog-operation-context.js.map +1 -1
- package/dist/src/utils/catalog-public-error.js +7 -0
- package/dist/src/utils/catalog-public-error.js.map +1 -1
- package/dist/src/utils/catalog-runtime-projection.d.ts +4 -3
- package/dist/src/utils/catalog-runtime-projection.js.map +1 -1
- package/dist/src/utils/catalog-snapshot.d.ts +5 -2
- package/dist/src/utils/catalog-snapshot.js +4 -1
- package/dist/src/utils/catalog-snapshot.js.map +1 -1
- package/dist/src/utils/catalog-source-impact.d.ts +21 -0
- package/dist/src/utils/catalog-source-impact.js +344 -0
- package/dist/src/utils/catalog-source-impact.js.map +1 -0
- package/dist/src/utils/catalog-source-references.d.ts +22 -8
- package/dist/src/utils/catalog-source-references.js +457 -365
- package/dist/src/utils/catalog-source-references.js.map +1 -1
- package/dist/src/utils/catalog-sources.d.ts +14 -1
- package/dist/src/utils/catalog-sources.js +155 -11
- package/dist/src/utils/catalog-sources.js.map +1 -1
- package/dist/src/utils/codex-executable-discovery.d.ts +28 -0
- package/dist/src/utils/codex-executable-discovery.js +431 -0
- package/dist/src/utils/codex-executable-discovery.js.map +1 -0
- package/dist/src/utils/codex-manager.d.ts +23 -42
- package/dist/src/utils/codex-manager.js +79 -767
- package/dist/src/utils/codex-manager.js.map +1 -1
- package/dist/src/utils/codex-marketplace-path.d.ts +5 -0
- package/dist/src/utils/codex-marketplace-path.js +45 -0
- package/dist/src/utils/codex-marketplace-path.js.map +1 -0
- package/dist/src/utils/codex-native-observation.d.ts +55 -0
- package/dist/src/utils/codex-native-observation.js +198 -0
- package/dist/src/utils/codex-native-observation.js.map +1 -0
- package/dist/src/utils/codex-reconciler.d.ts +6 -14
- package/dist/src/utils/codex-reconciler.js +45 -50
- package/dist/src/utils/codex-reconciler.js.map +1 -1
- package/dist/src/utils/codex-shared-native.d.ts +28 -39
- package/dist/src/utils/codex-shared-native.js +92 -57
- package/dist/src/utils/codex-shared-native.js.map +1 -1
- package/dist/src/utils/codex-skill-staging.d.ts +4 -3
- package/dist/src/utils/codex-skill-staging.js.map +1 -1
- package/dist/src/utils/codex-skills-root.d.ts +4 -0
- package/dist/src/utils/codex-skills-root.js +25 -0
- package/dist/src/utils/codex-skills-root.js.map +1 -0
- package/dist/src/utils/codex-surface-analysis.d.ts +8 -3
- package/dist/src/utils/codex-surface-analysis.js +35 -62
- package/dist/src/utils/codex-surface-analysis.js.map +1 -1
- package/dist/src/utils/component-command-preparation.d.ts +31 -0
- package/dist/src/utils/component-command-preparation.js +127 -0
- package/dist/src/utils/component-command-preparation.js.map +1 -0
- package/dist/src/utils/component-gap.d.ts +4 -0
- package/dist/src/utils/component-gap.js +20 -0
- package/dist/src/utils/component-gap.js.map +1 -0
- package/dist/src/utils/component-resources.d.ts +51 -0
- package/dist/src/utils/component-resources.js +320 -0
- package/dist/src/utils/component-resources.js.map +1 -0
- package/dist/src/utils/config-platforms.d.ts +21 -0
- package/dist/src/utils/config-platforms.js +51 -0
- package/dist/src/utils/config-platforms.js.map +1 -0
- package/dist/src/utils/dynamic-skill-tree.d.ts +18 -6
- package/dist/src/utils/dynamic-skill-tree.js +33 -40
- package/dist/src/utils/dynamic-skill-tree.js.map +1 -1
- package/dist/src/utils/git-catalog-provider.d.ts +16 -0
- package/dist/src/utils/git-catalog-provider.js +112 -6
- package/dist/src/utils/git-catalog-provider.js.map +1 -1
- package/dist/src/utils/inventory-recovery-diagnostic.d.ts +4 -0
- package/dist/src/utils/inventory-recovery-diagnostic.js +15 -0
- package/dist/src/utils/inventory-recovery-diagnostic.js.map +1 -0
- package/dist/src/utils/local-marketplace.d.ts +17 -12
- package/dist/src/utils/local-marketplace.js +85 -195
- package/dist/src/utils/local-marketplace.js.map +1 -1
- package/dist/src/utils/managed-command-cli-review.d.ts +53 -0
- package/dist/src/utils/managed-command-cli-review.js +431 -0
- package/dist/src/utils/managed-command-cli-review.js.map +1 -0
- package/dist/src/utils/managed-command-closure.d.ts +14 -0
- package/dist/src/utils/managed-command-closure.js +156 -0
- package/dist/src/utils/managed-command-closure.js.map +1 -0
- package/dist/src/utils/managed-command-errors.d.ts +5 -0
- package/dist/src/utils/managed-command-errors.js +10 -0
- package/dist/src/utils/managed-command-errors.js.map +1 -0
- package/dist/src/utils/managed-command-materialization.d.ts +90 -0
- package/dist/src/utils/managed-command-materialization.js +375 -0
- package/dist/src/utils/managed-command-materialization.js.map +1 -0
- package/dist/src/utils/managed-command-preparation.d.ts +30 -0
- package/dist/src/utils/managed-command-preparation.js +39 -0
- package/dist/src/utils/managed-command-preparation.js.map +1 -0
- package/dist/src/utils/managed-command-review.d.ts +33 -0
- package/dist/src/utils/managed-command-review.js +80 -0
- package/dist/src/utils/managed-command-review.js.map +1 -0
- package/dist/src/utils/managed-command-runtime.d.ts +36 -0
- package/dist/src/utils/managed-command-runtime.js +126 -0
- package/dist/src/utils/managed-command-runtime.js.map +1 -0
- package/dist/src/utils/managed-command-snapshots.d.ts +24 -0
- package/dist/src/utils/managed-command-snapshots.js +89 -0
- package/dist/src/utils/managed-command-snapshots.js.map +1 -0
- package/dist/src/utils/managed-command-store.d.ts +141 -0
- package/dist/src/utils/managed-command-store.js +839 -0
- package/dist/src/utils/managed-command-store.js.map +1 -0
- package/dist/src/utils/multi-source-catalog.d.ts +4 -0
- package/dist/src/utils/multi-source-catalog.js +7 -3
- package/dist/src/utils/multi-source-catalog.js.map +1 -1
- package/dist/src/utils/native-cli-interruption.d.ts +8 -0
- package/dist/src/utils/native-cli-interruption.js +65 -0
- package/dist/src/utils/native-cli-interruption.js.map +1 -0
- package/dist/src/utils/native-cli.d.ts +37 -6
- package/dist/src/utils/native-cli.js +523 -60
- package/dist/src/utils/native-cli.js.map +1 -1
- package/dist/src/utils/native-demand.d.ts +29 -0
- package/dist/src/utils/native-demand.js +4 -0
- package/dist/src/utils/native-demand.js.map +1 -0
- package/dist/src/utils/native-tool-context.d.ts +17 -0
- package/dist/src/utils/native-tool-context.js +40 -0
- package/dist/src/utils/native-tool-context.js.map +1 -0
- package/dist/src/utils/native-tool-review.d.ts +8 -0
- package/dist/src/utils/native-tool-review.js +14 -0
- package/dist/src/utils/native-tool-review.js.map +1 -0
- package/dist/src/utils/orphan-marketplace-cleanup.js +0 -2
- package/dist/src/utils/orphan-marketplace-cleanup.js.map +1 -1
- package/dist/src/utils/ownership.d.ts +111 -11
- package/dist/src/utils/ownership.js +247 -126
- package/dist/src/utils/ownership.js.map +1 -1
- package/dist/src/utils/package-content.d.ts +7 -0
- package/dist/src/utils/package-content.js +70 -0
- package/dist/src/utils/package-content.js.map +1 -0
- package/dist/src/utils/path-catalog-provider.js +2 -0
- package/dist/src/utils/path-catalog-provider.js.map +1 -1
- package/dist/src/utils/paths.d.ts +1 -1
- package/dist/src/utils/paths.js +5 -2
- package/dist/src/utils/paths.js.map +1 -1
- package/dist/src/utils/platform-empty-state.d.ts +69 -0
- package/dist/src/utils/platform-empty-state.js +226 -0
- package/dist/src/utils/platform-empty-state.js.map +1 -0
- package/dist/src/utils/platform-support.d.ts +1 -1
- package/dist/src/utils/platform-support.js +1 -1
- package/dist/src/utils/platform-support.js.map +1 -1
- package/dist/src/utils/plugin-config-command-apply.d.ts +33 -0
- package/dist/src/utils/plugin-config-command-apply.js +142 -0
- package/dist/src/utils/plugin-config-command-apply.js.map +1 -0
- package/dist/src/utils/plugin-config-diagnostics.d.ts +16 -0
- package/dist/src/utils/plugin-config-diagnostics.js +44 -0
- package/dist/src/utils/plugin-config-diagnostics.js.map +1 -0
- package/dist/src/utils/plugin-config-impact.d.ts +75 -0
- package/dist/src/utils/plugin-config-impact.js +355 -0
- package/dist/src/utils/plugin-config-impact.js.map +1 -0
- package/dist/src/utils/plugin-config-references.d.ts +96 -0
- package/dist/src/utils/plugin-config-references.js +357 -0
- package/dist/src/utils/plugin-config-references.js.map +1 -0
- package/dist/src/utils/plugin-config-suggestion-runner.d.ts +83 -0
- package/dist/src/utils/plugin-config-suggestion-runner.js +308 -0
- package/dist/src/utils/plugin-config-suggestion-runner.js.map +1 -0
- package/dist/src/utils/plugin-config-suggestions.d.ts +50 -0
- package/dist/src/utils/plugin-config-suggestions.js +302 -0
- package/dist/src/utils/plugin-config-suggestions.js.map +1 -0
- package/dist/src/utils/plugin-config-write.d.ts +123 -31
- package/dist/src/utils/plugin-config-write.js +828 -399
- package/dist/src/utils/plugin-config-write.js.map +1 -1
- package/dist/src/utils/plugin-config.d.ts +192 -109
- package/dist/src/utils/plugin-config.js +970 -1150
- 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 +80 -127
- package/dist/src/utils/plugin-scripts.js +655 -524
- package/dist/src/utils/plugin-scripts.js.map +1 -1
- package/dist/src/utils/process-lock.js +14 -5
- package/dist/src/utils/process-lock.js.map +1 -1
- package/dist/src/utils/process-tree.d.ts +2 -2
- package/dist/src/utils/process-tree.js +1 -1
- package/dist/src/utils/process-tree.js.map +1 -1
- package/dist/src/utils/project-boundary.d.ts +11 -13
- package/dist/src/utils/project-boundary.js +28 -34
- package/dist/src/utils/project-boundary.js.map +1 -1
- package/dist/src/utils/rendered-contract.js +24 -1
- package/dist/src/utils/rendered-contract.js.map +1 -1
- package/dist/src/utils/runtime-config.d.ts +18 -0
- package/dist/src/utils/runtime-config.js +64 -0
- package/dist/src/utils/runtime-config.js.map +1 -0
- package/dist/src/utils/runtime-skill-closure.d.ts +2 -2
- package/dist/src/utils/runtime-skill-closure.js +47 -6
- package/dist/src/utils/runtime-skill-closure.js.map +1 -1
- package/dist/src/utils/safe-fs.d.ts +21 -0
- package/dist/src/utils/safe-fs.js +111 -0
- package/dist/src/utils/safe-fs.js.map +1 -0
- package/dist/src/utils/safe-operation-diagnostic.d.ts +15 -0
- package/dist/src/utils/safe-operation-diagnostic.js +33 -0
- package/dist/src/utils/safe-operation-diagnostic.js.map +1 -0
- package/dist/src/utils/sensitive-content.d.ts +4 -0
- package/dist/src/utils/sensitive-content.js +36 -0
- package/dist/src/utils/sensitive-content.js.map +1 -0
- package/dist/src/utils/skill-invocation-warning.d.ts +20 -0
- package/dist/src/utils/skill-invocation-warning.js +68 -0
- package/dist/src/utils/skill-invocation-warning.js.map +1 -0
- package/dist/src/utils/state-paths.d.ts +8 -3
- package/dist/src/utils/state-paths.js +53 -16
- package/dist/src/utils/state-paths.js.map +1 -1
- package/dist/src/utils/target-eligibility.d.ts +3 -3
- package/dist/src/utils/target-eligibility.js +11 -6
- package/dist/src/utils/target-eligibility.js.map +1 -1
- package/dist/src/utils/windows-claude-shim.d.ts +7 -0
- package/dist/src/utils/windows-claude-shim.js +10 -0
- package/dist/src/utils/windows-claude-shim.js.map +1 -0
- package/dist/src/utils/windows-npm-shim.d.ts +16 -0
- package/dist/src/utils/windows-npm-shim.js +155 -0
- package/dist/src/utils/windows-npm-shim.js.map +1 -0
- package/dist/vitest.config.js +106 -9
- package/dist/vitest.config.js.map +1 -1
- package/package.json +30 -21
- package/dist/src/commands/review-publication.d.ts +0 -99
- package/dist/src/commands/review-publication.js +0 -904
- package/dist/src/commands/review-publication.js.map +0 -1
- package/dist/src/commands/sync-command.d.ts +0 -21
- package/dist/src/commands/sync-command.js +0 -206
- package/dist/src/commands/sync-command.js.map +0 -1
- package/dist/src/portable/skills-cli.d.ts +0 -43
- package/dist/src/portable/skills-cli.js +0 -148
- package/dist/src/portable/skills-cli.js.map +0 -1
- package/dist/src/utils/catalog-manifest-v6.d.ts +0 -5
- package/dist/src/utils/lifecycle-active-store.d.ts +0 -147
- package/dist/src/utils/lifecycle-active-store.js +0 -1064
- package/dist/src/utils/lifecycle-active-store.js.map +0 -1
- package/dist/src/utils/plugin-intent-state.d.ts +0 -39
- package/dist/src/utils/plugin-intent-state.js +0 -325
- package/dist/src/utils/plugin-intent-state.js.map +0 -1
- package/dist/src/utils/slash-commands.d.ts +0 -1
- package/dist/src/utils/slash-commands.js +0 -2
- package/dist/src/utils/slash-commands.js.map +0 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import fs from 'fs-extra';
|
|
3
|
+
export async function resolveCodexSkillsRelativeRoot(plugin, marketplaceFallbackRoot) {
|
|
4
|
+
const manifestPaths = [
|
|
5
|
+
path.join(plugin.rootDir, '.codex-plugin', 'plugin.json'),
|
|
6
|
+
...(marketplaceFallbackRoot
|
|
7
|
+
? [path.join(marketplaceFallbackRoot, '.codex-plugin', 'plugin.json')]
|
|
8
|
+
: []),
|
|
9
|
+
];
|
|
10
|
+
let manifest = null;
|
|
11
|
+
for (const manifestPath of manifestPaths) {
|
|
12
|
+
manifest = await fs.readJson(manifestPath).catch(() => null);
|
|
13
|
+
if (manifest)
|
|
14
|
+
break;
|
|
15
|
+
}
|
|
16
|
+
const raw = typeof manifest?.skills === 'string' && manifest.skills.trim() !== ''
|
|
17
|
+
? manifest.skills
|
|
18
|
+
: plugin.manifest.skills ?? './codex/skills';
|
|
19
|
+
const normalized = path.posix.normalize(raw.replace(/^\.\//u, ''));
|
|
20
|
+
if (normalized === '..' || normalized.startsWith('../') || path.isAbsolute(normalized)) {
|
|
21
|
+
throw new Error(`Codex plugin skills root 越界:${raw}`);
|
|
22
|
+
}
|
|
23
|
+
return normalized;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=codex-skills-root.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex-skills-root.js","sourceRoot":"","sources":["../../../src/utils/codex-skills-root.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,MAAM,UAAU,CAAC;AAI1B,MAAM,CAAC,KAAK,UAAU,8BAA8B,CAClD,MAA0F,EAC1F,uBAAgC;IAEhC,MAAM,aAAa,GAAG;QACpB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,eAAe,EAAE,aAAa,CAAC;QACzD,GAAG,CAAC,uBAAuB;YACzB,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,uBAAuB,EAAE,eAAe,EAAE,aAAa,CAAC,CAAC;YACtE,CAAC,CAAC,EAAE,CAAC;KACR,CAAC;IACF,IAAI,QAAQ,GAAmC,IAAI,CAAC;IACpD,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE,CAAC;QACzC,QAAQ,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAmC,CAAC;QAC/F,IAAI,QAAQ;YAAE,MAAM;IACtB,CAAC;IACD,MAAM,GAAG,GAAG,OAAO,QAAQ,EAAE,MAAM,KAAK,QAAQ,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE;QAC/E,CAAC,CAAC,QAAQ,CAAC,MAAM;QACjB,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,IAAI,gBAAgB,CAAC;IAC/C,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;IACnE,IAAI,UAAU,KAAK,IAAI,IAAI,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QACvF,MAAM,IAAI,KAAK,CAAC,+BAA+B,GAAG,EAAE,CAAC,CAAC;IACxD,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { type ExpectedComponentSet } from '@lesliechan721/aw-plugin-core/manifest';
|
|
1
2
|
import type { NormalizedPluginManifest, Scope } from '../types.js';
|
|
2
|
-
export declare const QUALIFIED_CODEX_NATIVE_KINDS: readonly ["skill", "mcp", "hook", "
|
|
3
|
+
export declare const QUALIFIED_CODEX_NATIVE_KINDS: readonly ["skill", "mcp", "hook", "instruction"];
|
|
3
4
|
export type CodexNativeKind = typeof QUALIFIED_CODEX_NATIVE_KINDS[number];
|
|
4
|
-
export type CodexUnsupportedNativeKind =
|
|
5
|
-
export type CodexExtensionKind = 'skill' | 'instruction' | 'permission' | 'agent'
|
|
5
|
+
export type CodexUnsupportedNativeKind = never;
|
|
6
|
+
export type CodexExtensionKind = 'skill' | 'instruction' | 'permission' | 'agent';
|
|
6
7
|
export type CodexSurfaceClassification = 'empty' | 'native' | 'aw-extension' | 'mixed' | 'unsupported';
|
|
7
8
|
export type CodexSurfaceDeliveryOwner = 'none' | 'codex-native' | 'aw' | 'split' | 'unsupported';
|
|
8
9
|
export type CodexScopeOverlap = 'none' | 'native-compatible' | 'aw-owned-conflict';
|
|
@@ -12,6 +13,7 @@ export interface CodexSurfaceComponent {
|
|
|
12
13
|
owner: 'codex-native' | 'aw';
|
|
13
14
|
scopes: Scope[];
|
|
14
15
|
dynamic: boolean;
|
|
16
|
+
refreshKeys?: string[];
|
|
15
17
|
name?: string;
|
|
16
18
|
}
|
|
17
19
|
export interface CodexSurfaceOwnerCollision {
|
|
@@ -21,9 +23,12 @@ export interface CodexSurfaceOwnerCollision {
|
|
|
21
23
|
}
|
|
22
24
|
export interface CodexSurfaceAnalysisOptions {
|
|
23
25
|
nativeArtifactNames?: Partial<Record<CodexNativeKind, readonly string[]>>;
|
|
26
|
+
preparedComponents?: ExpectedComponentSet;
|
|
24
27
|
}
|
|
25
28
|
export interface CodexSurfaceAnalysis {
|
|
26
29
|
ok: boolean;
|
|
30
|
+
configInputs: string[];
|
|
31
|
+
dynamicComponents: 'prepared' | 'unprepared' | 'not-declared';
|
|
27
32
|
nativeKinds: CodexNativeKind[];
|
|
28
33
|
extensionKinds: CodexExtensionKind[];
|
|
29
34
|
unsupportedKinds: CodexUnsupportedNativeKind[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { selectPluginConfigProfile } from '@lesliechan721/aw-plugin-core/manifest';
|
|
1
2
|
import { resolvePlatformHookDefinitions } from './hooks-contract.js';
|
|
2
3
|
import { resolvePlatformEntries } from './platform-entries.js';
|
|
3
4
|
import { supportsPlatform } from './platform-support.js';
|
|
@@ -5,7 +6,7 @@ export const QUALIFIED_CODEX_NATIVE_KINDS = [
|
|
|
5
6
|
'skill',
|
|
6
7
|
'mcp',
|
|
7
8
|
'hook',
|
|
8
|
-
'
|
|
9
|
+
'instruction',
|
|
9
10
|
];
|
|
10
11
|
export class CodexSurfaceAnalysisError extends Error {
|
|
11
12
|
code;
|
|
@@ -23,16 +24,13 @@ const NATIVE_KIND_ORDER = [
|
|
|
23
24
|
'skill',
|
|
24
25
|
'mcp',
|
|
25
26
|
'hook',
|
|
26
|
-
'
|
|
27
|
-
'slashCommand',
|
|
27
|
+
'instruction',
|
|
28
28
|
];
|
|
29
29
|
const EXTENSION_KIND_ORDER = [
|
|
30
30
|
'skill',
|
|
31
31
|
'instruction',
|
|
32
32
|
'permission',
|
|
33
33
|
'agent',
|
|
34
|
-
'config',
|
|
35
|
-
'lifecycle',
|
|
36
34
|
];
|
|
37
35
|
function compareText(left, right) {
|
|
38
36
|
return left < right ? -1 : left > right ? 1 : 0;
|
|
@@ -89,6 +87,8 @@ export function analyzeCodexSurface(manifest, options = {}) {
|
|
|
89
87
|
if (!supportsPlatform(manifest, 'codex')) {
|
|
90
88
|
return {
|
|
91
89
|
ok: true,
|
|
90
|
+
configInputs: [],
|
|
91
|
+
dynamicComponents: 'not-declared',
|
|
92
92
|
nativeKinds: [],
|
|
93
93
|
extensionKinds: [],
|
|
94
94
|
unsupportedKinds: [],
|
|
@@ -103,49 +103,35 @@ export function analyzeCodexSurface(manifest, options = {}) {
|
|
|
103
103
|
const components = [];
|
|
104
104
|
const nativeKinds = new Set();
|
|
105
105
|
const extensionKinds = new Set();
|
|
106
|
-
const unsupportedKinds = new Set();
|
|
107
106
|
const declareNative = (kind, key) => {
|
|
108
107
|
nativeKinds.add(kind);
|
|
109
108
|
addNativeComponents(components, kind, key, options.nativeArtifactNames?.[kind]);
|
|
110
109
|
};
|
|
111
|
-
if (manifest.skills)
|
|
110
|
+
if (!options.preparedComponents && manifest.skills)
|
|
112
111
|
declareNative('skill', 'manifest.skills');
|
|
113
|
-
if (manifest.mcpServers)
|
|
112
|
+
if (!options.preparedComponents && manifest.mcpServers)
|
|
114
113
|
declareNative('mcp', 'manifest.mcpServers');
|
|
115
|
-
if (resolvePlatformHookDefinitions(manifest, 'codex').length > 0) {
|
|
114
|
+
if (!options.preparedComponents && resolvePlatformHookDefinitions(manifest, 'codex').length > 0) {
|
|
116
115
|
declareNative('hook', 'manifest.hooks');
|
|
117
116
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
if (
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
if (manifest.scripts?.lifecycle && Object.keys(manifest.scripts.lifecycle).length > 0) {
|
|
132
|
-
extensionKinds.add('lifecycle');
|
|
133
|
-
addAwComponent(components, {
|
|
134
|
-
key: 'manifest.scripts.lifecycle',
|
|
135
|
-
kind: 'lifecycle',
|
|
136
|
-
scopes: [...BOTH_SCOPES],
|
|
137
|
-
dynamic: true,
|
|
138
|
-
});
|
|
117
|
+
const configInputs = Object.keys(manifest.config === undefined
|
|
118
|
+
? {} : selectPluginConfigProfile(manifest.config, 'codex').fields).sort(compareText);
|
|
119
|
+
if (options.preparedComponents) {
|
|
120
|
+
for (const component of options.preparedComponents.components) {
|
|
121
|
+
const owner = component.kind === 'agent' ? 'aw' : 'codex-native';
|
|
122
|
+
if (owner === 'aw')
|
|
123
|
+
extensionKinds.add('agent');
|
|
124
|
+
else
|
|
125
|
+
nativeKinds.add(component.kind);
|
|
126
|
+
components.push({ key: component.id, kind: component.kind, owner,
|
|
127
|
+
scopes: [...BOTH_SCOPES], dynamic: options.preparedComponents.sources[component.id] === 'dynamic', name: component.name });
|
|
128
|
+
}
|
|
139
129
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
scopes: [...BOTH_SCOPES],
|
|
146
|
-
dynamic: false,
|
|
147
|
-
name: instruction.name,
|
|
148
|
-
});
|
|
130
|
+
else {
|
|
131
|
+
for (const instruction of resolvePlatformEntries(manifest.extensions?.instructions, 'codex')) {
|
|
132
|
+
nativeKinds.add('instruction');
|
|
133
|
+
addNativeComponents(components, 'instruction', `extensions.instructions:${instruction.name}`, [instruction.name]);
|
|
134
|
+
}
|
|
149
135
|
}
|
|
150
136
|
for (const permission of resolvePlatformEntries(manifest.extensions?.permissions, 'codex')) {
|
|
151
137
|
extensionKinds.add('permission');
|
|
@@ -157,7 +143,7 @@ export function analyzeCodexSurface(manifest, options = {}) {
|
|
|
157
143
|
name: permission.name,
|
|
158
144
|
});
|
|
159
145
|
}
|
|
160
|
-
for (const agent of resolvePlatformEntries(manifest.extensions?.agents, 'codex')) {
|
|
146
|
+
for (const agent of options.preparedComponents ? [] : resolvePlatformEntries(manifest.extensions?.agents, 'codex')) {
|
|
161
147
|
extensionKinds.add('agent');
|
|
162
148
|
addAwComponent(components, {
|
|
163
149
|
key: `extensions.agents:${agent.name}`,
|
|
@@ -167,33 +153,18 @@ export function analyzeCodexSurface(manifest, options = {}) {
|
|
|
167
153
|
name: agent.name,
|
|
168
154
|
});
|
|
169
155
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
const kind = target.target === 'codex.skill'
|
|
174
|
-
? 'skill'
|
|
175
|
-
: target.target === 'codex.agentRole'
|
|
176
|
-
? 'agent'
|
|
177
|
-
: 'instruction';
|
|
178
|
-
extensionKinds.add(kind);
|
|
179
|
-
addAwComponent(components, {
|
|
180
|
-
key: `artifacts.targets:${target.id}`,
|
|
181
|
-
kind,
|
|
182
|
-
scopes: [...target.scopes],
|
|
183
|
-
dynamic: true,
|
|
184
|
-
name: target.skillKey ?? target.roleKey ?? target.id,
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
const orderedNativeKinds = NATIVE_KIND_ORDER
|
|
188
|
-
.filter((kind) => kind !== 'slashCommand' && nativeKinds.has(kind));
|
|
156
|
+
// Dynamic component identities exist only after preparation. Static inspection
|
|
157
|
+
// reports the declarations it can read and leaves that collection unobserved.
|
|
158
|
+
const orderedNativeKinds = NATIVE_KIND_ORDER.filter((kind) => nativeKinds.has(kind));
|
|
189
159
|
const orderedExtensionKinds = EXTENSION_KIND_ORDER.filter((kind) => extensionKinds.has(kind));
|
|
190
|
-
const orderedUnsupportedKinds =
|
|
191
|
-
.filter((kind) => kind === 'slashCommand' && unsupportedKinds.has(kind));
|
|
160
|
+
const orderedUnsupportedKinds = [];
|
|
192
161
|
const collisions = collectOwnerCollisions(components);
|
|
193
162
|
const missingNativeIdentityKinds = orderedNativeKinds.filter((kind) => components.some((component) => component.owner === 'aw'
|
|
194
163
|
&& component.dynamic
|
|
195
164
|
&& component.kind === kind)
|
|
196
|
-
&& (
|
|
165
|
+
&& components.some((component) => component.owner === 'codex-native'
|
|
166
|
+
&& component.kind === kind
|
|
167
|
+
&& !component.name));
|
|
197
168
|
const errorCode = collisions.length > 0
|
|
198
169
|
? 'codexSurfaceOwnerCollision'
|
|
199
170
|
: missingNativeIdentityKinds.length > 0
|
|
@@ -221,6 +192,8 @@ export function analyzeCodexSurface(manifest, options = {}) {
|
|
|
221
192
|
: 'none';
|
|
222
193
|
return {
|
|
223
194
|
ok: errorCode === undefined,
|
|
195
|
+
configInputs,
|
|
196
|
+
dynamicComponents: options.preparedComponents ? 'prepared' : manifest.artifacts ? 'unprepared' : 'not-declared',
|
|
224
197
|
nativeKinds: orderedNativeKinds,
|
|
225
198
|
extensionKinds: orderedExtensionKinds,
|
|
226
199
|
unsupportedKinds: orderedUnsupportedKinds,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-surface-analysis.js","sourceRoot":"","sources":["../../../src/utils/codex-surface-analysis.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"codex-surface-analysis.js","sourceRoot":"","sources":["../../../src/utils/codex-surface-analysis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAA6B,MAAM,wCAAwC,CAAC;AAM9G,OAAO,EAAE,8BAA8B,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,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACpC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,2BAA2B,CACzC,QAA8B;IAE9B,IAAI,CAAC,QAAQ,CAAC,EAAE;QAAE,MAAM,IAAI,yBAAyB,CAAC,QAAQ,CAAC,CAAC;IAChE,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type InstalledCommandProducer } from '@lesliechan721/aw-plugin-core/manifest';
|
|
2
|
+
import { selectPlatformInvocationPolicy } from '../generators/permissions.js';
|
|
3
|
+
import type { RenderUnit } from '../platforms/contracts.js';
|
|
4
|
+
import type { PlatformTarget, PluginMeta } from '../types.js';
|
|
5
|
+
import type { PreparedPlatformComponents } from './artifact-renderer.js';
|
|
6
|
+
import { type DynamicSkillTree } from './dynamic-skill-tree.js';
|
|
7
|
+
export interface FinalizedPlatformComponents {
|
|
8
|
+
prepared: PreparedPlatformComponents;
|
|
9
|
+
invocationPolicy: ReturnType<typeof selectPlatformInvocationPolicy>;
|
|
10
|
+
skills: Array<{
|
|
11
|
+
componentId: string;
|
|
12
|
+
resourceRoot: string;
|
|
13
|
+
tree: DynamicSkillTree;
|
|
14
|
+
}>;
|
|
15
|
+
}
|
|
16
|
+
/** Finalize each Skill and the host policy against one command package record. */
|
|
17
|
+
export declare function finalizePlatformSkillProducers(options: {
|
|
18
|
+
plugin: PluginMeta;
|
|
19
|
+
plugins?: readonly PluginMeta[];
|
|
20
|
+
platform: PlatformTarget;
|
|
21
|
+
renderUnit: Pick<RenderUnit, 'renderScope' | 'kinds'>;
|
|
22
|
+
prepared: PreparedPlatformComponents;
|
|
23
|
+
skillWorkRoot: string;
|
|
24
|
+
cwd: string;
|
|
25
|
+
env: NodeJS.ProcessEnv;
|
|
26
|
+
/** Deployments supply the frozen candidate or installed record. Null means no usable package. */
|
|
27
|
+
commandRecord?: InstalledCommandProducer | null;
|
|
28
|
+
portable?: boolean;
|
|
29
|
+
signal?: AbortSignal;
|
|
30
|
+
scriptTimeoutMs?: number;
|
|
31
|
+
}): Promise<FinalizedPlatformComponents>;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import crypto from 'node:crypto';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import fs from 'fs-extra';
|
|
4
|
+
import { assertManagedCommandPlatform, createAwPluginRequirementsReceipt, createRuntimeConfigOrigin, parseManagedCommandPlaceholders, replaceManagedCommandPlaceholders, resolveInvocationPolicy, validatePortableSkillName, } from '@lesliechan721/aw-plugin-core/manifest';
|
|
5
|
+
import { managedCommandRouteIsReachable, selectPlatformInvocationPolicy } from '../generators/permissions.js';
|
|
6
|
+
import { COMMAND_ROUTE_UNREACHABLE } from '../output/component-delivery.js';
|
|
7
|
+
import { artifactValueDigest } from './artifact-plan.js';
|
|
8
|
+
import { writeDynamicSkillTree } from './dynamic-skill-tree.js';
|
|
9
|
+
import { managedCommandProducerIdentity, prepareManagedCommandPackage } from './managed-command-materialization.js';
|
|
10
|
+
import { injectInstalledRuntimeConfig } from './runtime-config.js';
|
|
11
|
+
import { validateRuntimeSkillClosure } from './runtime-skill-closure.js';
|
|
12
|
+
/** Finalize each Skill and the host policy against one command package record. */
|
|
13
|
+
export async function finalizePlatformSkillProducers(options) {
|
|
14
|
+
const { plugin, platform, renderUnit } = options;
|
|
15
|
+
const subject = { pluginId: plugin.pluginId, target: platform, scope: renderUnit.renderScope.kind };
|
|
16
|
+
if (!renderUnit.kinds.includes('skill')) {
|
|
17
|
+
return { prepared: options.prepared, invocationPolicy: selectPlatformInvocationPolicy({ platform, permissions: [] }, subject), skills: [] };
|
|
18
|
+
}
|
|
19
|
+
const skills = options.prepared.expected.components.flatMap((component) => {
|
|
20
|
+
if (component.kind !== 'skill')
|
|
21
|
+
return [];
|
|
22
|
+
validatePortableSkillName(component.name, 'Skill component name');
|
|
23
|
+
const files = options.prepared.resources.files.filter((file) => file.componentId === component.id);
|
|
24
|
+
const tree = {
|
|
25
|
+
skillKey: component.name,
|
|
26
|
+
files: Object.fromEntries(files.map((file) => [file.path, Buffer.from(file.bytes)])),
|
|
27
|
+
fileModes: Object.fromEntries(files.filter((file) => (file.mode ?? 0) & 0o111).map((file) => [file.path, 0o755])),
|
|
28
|
+
};
|
|
29
|
+
const referencedFiles = Object.entries(tree.files).filter(([file, bytes]) => file.endsWith('.md') && parseManagedCommandPlaceholders(bytes.toString('utf8')).length > 0).map(([file]) => file);
|
|
30
|
+
return [{ componentId: component.id, resourceRoot: path.join(options.skillWorkRoot, component.name), tree, referencedFiles }];
|
|
31
|
+
});
|
|
32
|
+
const referencesCommand = skills.some(({ referencedFiles }) => referencedFiles.length > 0);
|
|
33
|
+
if (referencesCommand) {
|
|
34
|
+
if (platform === 'generic' || options.portable) {
|
|
35
|
+
throw new Error('commandReferenceInvalid: Portable Skills cannot bind native managed commands.');
|
|
36
|
+
}
|
|
37
|
+
if (!plugin.manifest.requires?.aw.capabilities?.includes('aw.managed-commands.v2')) {
|
|
38
|
+
throw new Error('commandReferenceInvalid: Managed command references require aw.managed-commands.v2.');
|
|
39
|
+
}
|
|
40
|
+
try {
|
|
41
|
+
assertManagedCommandPlatform(plugin.manifest, platform, 'Skill {{aw.command}}');
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
throw new Error('commandReferenceInvalid: The command package is unavailable on this platform.', { cause: error });
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const policy = resolveInvocationPolicy(plugin.manifest, platform, plugin.sourceId ? `${plugin.sourceId}/${plugin.manifest.name}` : undefined);
|
|
48
|
+
const hasManagedPermissions = policy.permissions.some((permission) => [permission.allow, permission.ask, permission.deny, permission.sandbox?.excludedCommands]
|
|
49
|
+
.some((entries) => entries?.some((entry) => typeof entry !== 'string')));
|
|
50
|
+
const usesCommand = referencesCommand || hasManagedPermissions;
|
|
51
|
+
let commandRecord = options.commandRecord;
|
|
52
|
+
if (commandRecord === undefined && usesCommand && !options.portable && platform !== 'generic'
|
|
53
|
+
&& plugin.manifest.command?.platforms.includes(platform)) {
|
|
54
|
+
const candidate = await prepareManagedCommandPackage({
|
|
55
|
+
...options, referencePlugins: options.plugins, operation: { kind: 'materialize' },
|
|
56
|
+
});
|
|
57
|
+
commandRecord = candidate.record;
|
|
58
|
+
await candidate.cleanup();
|
|
59
|
+
}
|
|
60
|
+
if (commandRecord) {
|
|
61
|
+
const producer = managedCommandProducerIdentity(options);
|
|
62
|
+
if (commandRecord.producer.sourceId !== producer.sourceId || commandRecord.producer.sourceIdentity !== producer.sourceIdentity
|
|
63
|
+
|| commandRecord.producer.pluginName !== producer.pluginName) {
|
|
64
|
+
throw new Error('commandReferenceInvalid: The command package does not belong to this plugin source.');
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
const routes = commandRecord?.routes ?? null;
|
|
68
|
+
const invocationPolicy = selectPlatformInvocationPolicy(policy, subject, routes, options.portable);
|
|
69
|
+
const hasCommand = managedCommandRouteIsReachable(routes, []);
|
|
70
|
+
const blockedSkills = new Set(skills.filter(({ referencedFiles }) => referencedFiles.length > 0 && !hasCommand).map(({ componentId }) => componentId));
|
|
71
|
+
const retainedSkills = skills.filter(({ componentId }) => !blockedSkills.has(componentId));
|
|
72
|
+
const receipt = Buffer.from(`${JSON.stringify(createAwPluginRequirementsReceipt({ name: plugin.manifest.name, version: plugin.manifest.version }, plugin.manifest.requires?.aw.capabilities ?? []), null, 2)}\n`);
|
|
73
|
+
const components = structuredClone(options.prepared.expected.components.filter((component) => !blockedSkills.has(component.id)));
|
|
74
|
+
const unmet = [...options.prepared.expected.unmet,
|
|
75
|
+
...options.prepared.expected.components.filter((component) => blockedSkills.has(component.id))
|
|
76
|
+
.map((component) => ({ id: component.id, kind: component.kind, name: component.name,
|
|
77
|
+
requiredFeatures: [], reasonCode: COMMAND_ROUTE_UNREACHABLE }))];
|
|
78
|
+
for (const skill of retainedSkills) {
|
|
79
|
+
for (const file of skill.referencedFiles) {
|
|
80
|
+
const text = replaceManagedCommandPlaceholders(skill.tree.files[file].toString('utf8'), policy.invocationSelector);
|
|
81
|
+
skill.tree.files[file] = Buffer.from(text);
|
|
82
|
+
}
|
|
83
|
+
skill.tree.files['aw-plugin-requirements.json'] = receipt;
|
|
84
|
+
const snapshot = options.prepared.runtimeConfigSnapshots[skill.componentId];
|
|
85
|
+
await injectInstalledRuntimeConfig(skill.tree, snapshot, snapshot ? { origin: createRuntimeConfigOrigin({
|
|
86
|
+
snapshot, inputDigest: options.prepared.evidence.renderInputDigest,
|
|
87
|
+
}) } : {});
|
|
88
|
+
await fs.remove(skill.resourceRoot);
|
|
89
|
+
await writeDynamicSkillTree(skill.resourceRoot, skill.tree);
|
|
90
|
+
await validateRuntimeSkillClosure(skill.resourceRoot);
|
|
91
|
+
const component = components.find((component) => component.id === skill.componentId);
|
|
92
|
+
if (!component || component.kind !== 'skill')
|
|
93
|
+
throw new Error('componentSkillIdentityChanged');
|
|
94
|
+
component.content.files = Object.fromEntries(Object.keys(component.content.files).map((file) => {
|
|
95
|
+
const bytes = skill.tree.files[file];
|
|
96
|
+
const original = options.prepared.resources.files.find((entry) => entry.componentId === skill.componentId && entry.path === file);
|
|
97
|
+
const resource = component.content.files[file];
|
|
98
|
+
return [file, resource && original?.bytes.equals(bytes) ? resource : { text: bytes.toString('utf8') }];
|
|
99
|
+
}));
|
|
100
|
+
}
|
|
101
|
+
const files = [
|
|
102
|
+
...options.prepared.resources.files.filter((file) => !skills.some((skill) => skill.componentId === file.componentId)),
|
|
103
|
+
...retainedSkills.flatMap((skill) => Object.entries(skill.tree.files).map(([file, bytes]) => {
|
|
104
|
+
const original = options.prepared.resources.files.find((entry) => entry.componentId === skill.componentId && entry.path === file);
|
|
105
|
+
return {
|
|
106
|
+
componentId: skill.componentId, path: file, bytes,
|
|
107
|
+
...(original?.source && original.bytes.equals(bytes) ? { source: original.source } : {}),
|
|
108
|
+
mode: skill.tree.fileModes?.[file] ?? 0o644,
|
|
109
|
+
};
|
|
110
|
+
})),
|
|
111
|
+
];
|
|
112
|
+
const resourceDigest = artifactValueDigest({ inputDigest: options.prepared.resources.digest, files: files.map(({ componentId, path: file, bytes, mode }) => ({
|
|
113
|
+
componentId, path: file, digest: `sha256:${crypto.createHash('sha256').update(bytes).digest('hex')}`, mode,
|
|
114
|
+
})) });
|
|
115
|
+
const prepared = {
|
|
116
|
+
...options.prepared,
|
|
117
|
+
expected: { ...options.prepared.expected, components, unmet },
|
|
118
|
+
empty: components.length ? null : unmet.length ? 'unmet' : 'intentional',
|
|
119
|
+
resources: { ...options.prepared.resources, files, digest: resourceDigest },
|
|
120
|
+
evidence: { ...options.prepared.evidence, resourceDigest, renderInputDigest: artifactValueDigest({
|
|
121
|
+
components: options.prepared.evidence.renderInputDigest,
|
|
122
|
+
...(usesCommand ? { command: commandRecord ?? null } : {}),
|
|
123
|
+
}) },
|
|
124
|
+
};
|
|
125
|
+
return { prepared, invocationPolicy, skills: retainedSkills };
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=component-command-preparation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-command-preparation.js","sourceRoot":"","sources":["../../../src/utils/component-command-preparation.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,EACL,4BAA4B,EAC5B,iCAAiC,EACjC,yBAAyB,EACzB,+BAA+B,EAC/B,iCAAiC,EACjC,uBAAuB,EACvB,yBAAyB,GAG1B,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAAE,8BAA8B,EAAE,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;AAC9G,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAG5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,E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;QAC7D,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa;QACxE,SAAS,EAAE,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE;QAC3E,QAAQ,EAAE,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,QAAQ,EAAE,cAAc,EAAE,iBAAiB,EAAE,mBAAmB,CAAC;gBAC/F,UAAU,EAAE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,iBAAiB;gBACvD,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,aAAa,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aAC3D,CAAC,EAAE;KACL,CAAC;IACF,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ComponentUnmet } from '@lesliechan721/aw-plugin-core/manifest';
|
|
2
|
+
/** A missing host mapping can finish without a write. Missing inputs and execution errors still need recovery. */
|
|
3
|
+
export declare function isDeliveryCapabilityGap(gap: Pick<ComponentUnmet, 'reasonCode' | 'requiredFeatures'>): boolean;
|
|
4
|
+
export declare function isDeliveryCapabilityGapReason(reasonCode: string): boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** A missing host mapping can finish without a write. Missing inputs and execution errors still need recovery. */
|
|
2
|
+
export function isDeliveryCapabilityGap(gap) {
|
|
3
|
+
return Boolean(gap.requiredFeatures.length) && isDeliveryCapabilityGapReason(gap.reasonCode);
|
|
4
|
+
}
|
|
5
|
+
export function isDeliveryCapabilityGapReason(reasonCode) {
|
|
6
|
+
switch (reasonCode) {
|
|
7
|
+
case 'delivery-unavailable':
|
|
8
|
+
case 'interface-unsupported':
|
|
9
|
+
case 'scope-unsupported':
|
|
10
|
+
case 'capability-unverified':
|
|
11
|
+
case 'consumer-missing':
|
|
12
|
+
case 'consumer-disabled':
|
|
13
|
+
case 'policy-blocked':
|
|
14
|
+
case 'version-unsupported':
|
|
15
|
+
return true;
|
|
16
|
+
default:
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=component-gap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-gap.js","sourceRoot":"","sources":["../../../src/utils/component-gap.ts"],"names":[],"mappings":"AAEA,kHAAkH;AAClH,MAAM,UAAU,uBAAuB,CAAC,GAA4D;IAClG,OAAO,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,MAAM,CAAC,IAAI,6BAA6B,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AAC/F,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,UAAkB;IAC9D,QAAQ,UAAU,EAAE,CAAC;QACnB,KAAK,sBAAsB,CAAC;QAC5B,KAAK,uBAAuB,CAAC;QAC7B,KAAK,mBAAmB,CAAC;QACzB,KAAK,uBAAuB,CAAC;QAC7B,KAAK,kBAAkB,CAAC;QACxB,KAAK,mBAAmB,CAAC;QACzB,KAAK,gBAAgB,CAAC;QACtB,KAAK,qBAAqB;YACxB,OAAO,IAAI,CAAC;QACd;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type ExpectedComponentSet, type PlatformCapabilitiesV2, type PlatformRenderContextV2, type SourceRef } from '@lesliechan721/aw-plugin-core/manifest';
|
|
2
|
+
import type { PlatformTarget, PluginMeta } from '../types.js';
|
|
3
|
+
export interface VerifiedComponentFile {
|
|
4
|
+
componentId: string;
|
|
5
|
+
path: string;
|
|
6
|
+
bytes: Buffer;
|
|
7
|
+
source?: SourceRef;
|
|
8
|
+
mode?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface VerifiedResourceClosure {
|
|
11
|
+
resources: PlatformRenderContextV2['resources'];
|
|
12
|
+
files: VerifiedComponentFile[];
|
|
13
|
+
bundleFiles: Array<{
|
|
14
|
+
path: string;
|
|
15
|
+
bytes: Buffer;
|
|
16
|
+
mode?: number;
|
|
17
|
+
componentIds?: string[];
|
|
18
|
+
}>;
|
|
19
|
+
commandResources: VerifiedCommandResource[];
|
|
20
|
+
digest: string;
|
|
21
|
+
}
|
|
22
|
+
export interface CommandResourceReference {
|
|
23
|
+
start: number;
|
|
24
|
+
end: number;
|
|
25
|
+
path: string;
|
|
26
|
+
}
|
|
27
|
+
export interface VerifiedCommandResource extends CommandResourceReference {
|
|
28
|
+
componentId: string;
|
|
29
|
+
field: 'command' | 'args';
|
|
30
|
+
index?: number;
|
|
31
|
+
original: string;
|
|
32
|
+
}
|
|
33
|
+
/** Only literal package paths are portable. Shell expansion is not a resource declaration. */
|
|
34
|
+
export declare function commandResourceReferences(value: string, shell: boolean, platform: PlatformCapabilitiesV2['platform'], executable?: string): CommandResourceReference[];
|
|
35
|
+
export declare function resolvePlatformComponentResources(plugin: PluginMeta): Promise<PlatformRenderContextV2['resources']>;
|
|
36
|
+
export declare function resolveStaticPlatformResourceRoot(pluginRoot: string, platform: PlatformTarget): Promise<string>;
|
|
37
|
+
/** Read only the bundle bytes used by the admitted static components. */
|
|
38
|
+
export declare function readStaticComponentResourceInputs(options: {
|
|
39
|
+
plugin: PluginMeta;
|
|
40
|
+
expected: ExpectedComponentSet;
|
|
41
|
+
staticResourceRoot: string;
|
|
42
|
+
capabilities: PlatformCapabilitiesV2;
|
|
43
|
+
}): Promise<unknown>;
|
|
44
|
+
export declare function verifyPlatformComponentResources(options: {
|
|
45
|
+
plugin: PluginMeta;
|
|
46
|
+
expected: ExpectedComponentSet;
|
|
47
|
+
resources: PlatformRenderContextV2['resources'];
|
|
48
|
+
capabilities: PlatformCapabilitiesV2;
|
|
49
|
+
sensitiveValues: readonly string[];
|
|
50
|
+
staticResourceRoot?: string;
|
|
51
|
+
}): Promise<VerifiedResourceClosure>;
|