@lesliechan721/aw 0.1.0-beta.10 → 0.1.0-beta.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authoring/assets/aw-config.d.mts +1 -50
- package/dist/authoring/assets/aw-config.mjs +58 -928
- package/dist/authoring/assets/aw-config.mjs.map +1 -1
- package/dist/authoring/assets/aw-runtime-config.d.mts +13 -0
- package/dist/authoring/assets/aw-runtime-config.mjs +221 -0
- package/dist/authoring/assets/aw-runtime-config.mjs.map +1 -0
- package/dist/authoring/assets/command-runtime-config.d.mts +9 -0
- package/dist/authoring/assets/command-runtime-config.mjs +134 -0
- package/dist/authoring/assets/command-runtime-config.mjs.map +1 -0
- package/dist/authoring/scripts/add-skill.mjs +16 -39
- package/dist/authoring/scripts/add-skill.mjs.map +1 -1
- package/dist/authoring/scripts/init-plugin.mjs +43 -71
- package/dist/authoring/scripts/init-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/lib/plugin-root.mjs +4 -4
- package/dist/authoring/scripts/lib/plugin-root.mjs.map +1 -1
- package/dist/authoring/scripts/lib/plugin-version-check.d.mts +1 -0
- package/dist/authoring/scripts/lib/plugin-version-check.mjs +230 -9
- package/dist/authoring/scripts/lib/plugin-version-check.mjs.map +1 -1
- package/dist/authoring/scripts/lib/skill-scaffold.d.mts +3 -3
- package/dist/authoring/scripts/lib/skill-scaffold.mjs +5 -8
- package/dist/authoring/scripts/lib/skill-scaffold.mjs.map +1 -1
- package/dist/authoring/scripts/remove-plugin.mjs +1 -1
- package/dist/authoring/scripts/remove-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/validate-plugin.mjs +408 -1748
- package/dist/authoring/scripts/validate-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/validate-skill.mjs +1 -1
- package/dist/index.js +2 -6
- package/dist/index.js.map +1 -1
- package/dist/native-runtime/reader-runtime.mjs +34 -0
- package/dist/native-runtime/reader.d.mts +6 -0
- package/dist/native-runtime/reader.mjs +11 -0
- package/dist/scripts/aw-skill-eval-materializer.d.ts +11 -1
- package/dist/scripts/aw-skill-eval-materializer.js +119 -114
- package/dist/scripts/aw-skill-eval-materializer.js.map +1 -1
- package/dist/scripts/bundle-plugins.js +32 -7
- package/dist/scripts/bundle-plugins.js.map +1 -1
- package/dist/scripts/plugin-staging.d.ts +1 -1
- package/dist/scripts/plugin-staging.js +5 -2
- package/dist/scripts/plugin-staging.js.map +1 -1
- package/dist/scripts/plugin-test-context-guard.d.mts +1 -0
- package/dist/scripts/plugin-test-context-guard.mjs +59 -0
- package/dist/scripts/plugin-test-context-guard.mjs.map +1 -0
- package/dist/scripts/plugin-test-reporter.d.mts +2 -0
- package/dist/scripts/plugin-test-reporter.mjs +21 -0
- package/dist/scripts/plugin-test-reporter.mjs.map +1 -0
- package/dist/scripts/test-plugin-scripts.d.ts +5 -0
- package/dist/scripts/test-plugin-scripts.js +343 -58
- package/dist/scripts/test-plugin-scripts.js.map +1 -1
- package/dist/scripts/test-workers.d.mts +24 -0
- package/dist/scripts/test-workers.mjs +59 -0
- package/dist/scripts/test-workers.mjs.map +1 -0
- package/dist/src/adapters/helpers.d.ts +7 -0
- package/dist/src/adapters/helpers.js.map +1 -1
- package/dist/src/authoring/workspace-commands.d.ts +3 -0
- package/dist/src/authoring/workspace-commands.js +7 -2
- package/dist/src/authoring/workspace-commands.js.map +1 -1
- package/dist/src/commands/aw-capabilities.d.ts +1 -1
- package/dist/src/commands/aw-capabilities.js +48 -19
- package/dist/src/commands/aw-capabilities.js.map +1 -1
- package/dist/src/commands/catalog-dev-source.d.ts +40 -3
- package/dist/src/commands/catalog-dev-source.js +333 -42
- package/dist/src/commands/catalog-dev-source.js.map +1 -1
- package/dist/src/commands/catalog-generation.d.ts +5 -0
- package/dist/src/commands/catalog-generation.js.map +1 -1
- package/dist/src/commands/catalog-publication-inspection.d.ts +11 -3
- package/dist/src/commands/catalog-publication-inspection.js +211 -59
- package/dist/src/commands/catalog-publication-inspection.js.map +1 -1
- package/dist/src/commands/catalog-publication-journal.d.ts +12 -0
- package/dist/src/commands/catalog-publication-journal.js +78 -1
- package/dist/src/commands/catalog-publication-journal.js.map +1 -1
- package/dist/src/commands/catalog-publish.d.ts +21 -1
- package/dist/src/commands/catalog-publish.js +133 -92
- package/dist/src/commands/catalog-publish.js.map +1 -1
- package/dist/src/commands/catalog-source.d.ts +25 -5
- package/dist/src/commands/catalog-source.js +153 -27
- package/dist/src/commands/catalog-source.js.map +1 -1
- package/dist/src/commands/catalog-status.js +2 -2
- package/dist/src/commands/catalog-status.js.map +1 -1
- package/dist/src/commands/catalog-store.d.ts +31 -7
- package/dist/src/commands/catalog-store.js +379 -42
- package/dist/src/commands/catalog-store.js.map +1 -1
- package/dist/src/commands/catalog-workspace-resolution.d.ts +4 -0
- package/dist/src/commands/catalog-workspace-resolution.js +18 -3
- package/dist/src/commands/catalog-workspace-resolution.js.map +1 -1
- package/dist/src/commands/console.js +33 -20
- package/dist/src/commands/console.js.map +1 -1
- package/dist/src/commands/dependency-operation-plan.d.ts +7 -0
- package/dist/src/commands/dependency-operation-plan.js +66 -30
- package/dist/src/commands/dependency-operation-plan.js.map +1 -1
- package/dist/src/commands/deployment-confirmation.d.ts +11 -0
- package/dist/src/commands/deployment-confirmation.js +101 -0
- package/dist/src/commands/deployment-confirmation.js.map +1 -0
- package/dist/src/commands/init.js +1 -1
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/intent-command.d.ts +34 -0
- package/dist/src/commands/intent-command.js +174 -0
- package/dist/src/commands/intent-command.js.map +1 -0
- package/dist/src/commands/lifecycle-command-package.d.ts +45 -0
- package/dist/src/commands/lifecycle-command-package.js +199 -0
- package/dist/src/commands/lifecycle-command-package.js.map +1 -0
- package/dist/src/commands/managed-commands.d.ts +41 -0
- package/dist/src/commands/managed-commands.js +404 -0
- package/dist/src/commands/managed-commands.js.map +1 -0
- package/dist/src/commands/offline-cleanup-evidence.d.ts +12 -2
- package/dist/src/commands/offline-cleanup-evidence.js +57 -35
- package/dist/src/commands/offline-cleanup-evidence.js.map +1 -1
- package/dist/src/commands/operation-plan.d.ts +72 -2
- package/dist/src/commands/operation-plan.js +54 -3
- package/dist/src/commands/operation-plan.js.map +1 -1
- package/dist/src/commands/operation-planner.d.ts +6 -5
- package/dist/src/commands/operation-planner.js +23 -20
- package/dist/src/commands/operation-planner.js.map +1 -1
- package/dist/src/commands/options.d.ts +11 -16
- package/dist/src/commands/options.js +31 -25
- package/dist/src/commands/options.js.map +1 -1
- package/dist/src/commands/permission-batch.d.ts +5 -0
- package/dist/src/commands/permission-batch.js +83 -0
- package/dist/src/commands/permission-batch.js.map +1 -0
- package/dist/src/commands/plugin-capabilities.js +128 -58
- package/dist/src/commands/plugin-capabilities.js.map +1 -1
- package/dist/src/commands/public-config-confirmation.d.ts +14 -0
- package/dist/src/commands/public-config-confirmation.js +73 -0
- package/dist/src/commands/public-config-confirmation.js.map +1 -0
- package/dist/src/commands/public-interruption.d.ts +9 -0
- package/dist/src/commands/public-interruption.js +23 -0
- package/dist/src/commands/public-interruption.js.map +1 -0
- package/dist/src/commands/public-lifecycle-result.d.ts +106 -0
- package/dist/src/commands/public-lifecycle-result.js +536 -0
- package/dist/src/commands/public-lifecycle-result.js.map +1 -0
- package/dist/src/commands/public-lifecycle.d.ts +27 -0
- package/dist/src/commands/public-lifecycle.js +569 -0
- package/dist/src/commands/public-lifecycle.js.map +1 -0
- package/dist/src/commands/public-plugin-query.d.ts +16 -0
- package/dist/src/commands/public-plugin-query.js +231 -0
- package/dist/src/commands/public-plugin-query.js.map +1 -0
- package/dist/src/commands/rebuild-command.d.ts +177 -16
- package/dist/src/commands/rebuild-command.js +3370 -1559
- package/dist/src/commands/rebuild-command.js.map +1 -1
- package/dist/src/commands/rebuild-integration.d.ts +100 -55
- package/dist/src/commands/rebuild-integration.js +866 -3275
- package/dist/src/commands/rebuild-integration.js.map +1 -1
- package/dist/src/commands/rebuild-operations.d.ts +68 -13
- package/dist/src/commands/rebuild-operations.js +309 -120
- package/dist/src/commands/rebuild-operations.js.map +1 -1
- package/dist/src/commands/rebuild-platform-integration.d.ts +99 -0
- package/dist/src/commands/rebuild-platform-integration.js +2329 -0
- package/dist/src/commands/rebuild-platform-integration.js.map +1 -0
- package/dist/src/commands/reconcile-operation-plan.d.ts +14 -9
- package/dist/src/commands/reconcile-operation-plan.js +26 -6
- package/dist/src/commands/reconcile-operation-plan.js.map +1 -1
- package/dist/src/commands/review-inspection.d.ts +60 -0
- package/dist/src/commands/review-inspection.js +437 -0
- package/dist/src/commands/review-inspection.js.map +1 -0
- package/dist/src/commands/review-preparation.d.ts +51 -0
- package/dist/src/commands/review-preparation.js +400 -0
- package/dist/src/commands/review-preparation.js.map +1 -0
- package/dist/src/commands/runtime.d.ts +5 -1
- package/dist/src/commands/runtime.js +41 -8
- package/dist/src/commands/runtime.js.map +1 -1
- package/dist/src/commands/skill-eval.d.ts +8 -0
- package/dist/src/commands/skill-eval.js +126 -73
- package/dist/src/commands/skill-eval.js.map +1 -1
- package/dist/src/commands/status-v6.d.ts +148 -35
- package/dist/src/commands/status-v6.js +1166 -307
- package/dist/src/commands/status-v6.js.map +1 -1
- package/dist/src/commands/targets-command.d.ts +38 -0
- package/dist/src/commands/targets-command.js +182 -0
- package/dist/src/commands/targets-command.js.map +1 -0
- package/dist/src/commands/wizard.d.ts +7 -3
- package/dist/src/commands/wizard.js +7 -4
- package/dist/src/commands/wizard.js.map +1 -1
- package/dist/src/commands/write-commands.d.ts +7 -1
- package/dist/src/commands/write-commands.js +129 -38
- package/dist/src/commands/write-commands.js.map +1 -1
- package/dist/src/constants.d.ts +2 -3
- package/dist/src/constants.js +2 -3
- package/dist/src/constants.js.map +1 -1
- package/dist/src/eval/manifest-v1.d.ts +6 -3
- package/dist/src/eval/manifest-v1.js +44 -33
- package/dist/src/eval/manifest-v1.js.map +1 -1
- package/dist/src/generators/local-plugin.d.ts +4 -2
- package/dist/src/generators/local-plugin.js +319 -353
- package/dist/src/generators/local-plugin.js.map +1 -1
- package/dist/src/generators/permissions.d.ts +20 -2
- package/dist/src/generators/permissions.js +82 -15
- package/dist/src/generators/permissions.js.map +1 -1
- package/dist/src/index.d.ts +2 -33
- package/dist/src/index.js +1575 -1919
- package/dist/src/index.js.map +1 -1
- package/dist/src/intent/deployment-preferences.d.ts +63 -0
- package/dist/src/intent/deployment-preferences.js +170 -0
- package/dist/src/intent/deployment-preferences.js.map +1 -0
- package/dist/src/intent/diagnostics.d.ts +11 -0
- package/dist/src/intent/diagnostics.js +14 -0
- package/dist/src/intent/diagnostics.js.map +1 -0
- package/dist/src/intent/intent-codec.d.ts +19 -0
- package/dist/src/intent/intent-codec.js +117 -0
- package/dist/src/intent/intent-codec.js.map +1 -0
- package/dist/src/intent/intent-store.d.ts +43 -0
- package/dist/src/intent/intent-store.js +118 -0
- package/dist/src/intent/intent-store.js.map +1 -0
- package/dist/src/intent/scope-context.d.ts +35 -0
- package/dist/src/intent/scope-context.js +179 -0
- package/dist/src/intent/scope-context.js.map +1 -0
- package/dist/src/intent/work-context.d.ts +13 -0
- package/dist/src/intent/work-context.js +22 -0
- package/dist/src/intent/work-context.js.map +1 -0
- package/dist/src/output/command-receipt.d.ts +6 -2
- package/dist/src/output/command-receipt.js +67 -32
- package/dist/src/output/command-receipt.js.map +1 -1
- package/dist/src/output/component-delivery.d.ts +28 -0
- package/dist/src/output/component-delivery.js +141 -0
- package/dist/src/output/component-delivery.js.map +1 -0
- package/dist/src/output/public-result.d.ts +69 -0
- package/dist/src/output/public-result.js +403 -0
- package/dist/src/output/public-result.js.map +1 -0
- package/dist/src/output/rebuild-progress.d.ts +3 -0
- package/dist/src/output/rebuild-progress.js +34 -9
- package/dist/src/output/rebuild-progress.js.map +1 -1
- package/dist/src/output/receipt-projection.d.ts +7 -0
- package/dist/src/output/receipt-projection.js +664 -0
- package/dist/src/output/receipt-projection.js.map +1 -0
- package/dist/src/output/skill-invocation-notices.d.ts +18 -0
- package/dist/src/output/skill-invocation-notices.js +84 -0
- package/dist/src/output/skill-invocation-notices.js.map +1 -0
- package/dist/src/platforms/antigravity-permissions.d.ts +50 -0
- package/dist/src/platforms/antigravity-permissions.js +388 -0
- package/dist/src/platforms/antigravity-permissions.js.map +1 -0
- package/dist/src/platforms/capabilities.d.ts +9 -0
- package/dist/src/platforms/capabilities.js +125 -0
- package/dist/src/platforms/capabilities.js.map +1 -0
- package/dist/src/platforms/contracts.d.ts +394 -0
- package/dist/src/platforms/contracts.js +2 -0
- package/dist/src/platforms/contracts.js.map +1 -0
- package/dist/src/platforms/cursor-workspace-hook.d.ts +28 -0
- package/dist/src/platforms/cursor-workspace-hook.js +198 -0
- package/dist/src/platforms/cursor-workspace-hook.js.map +1 -0
- package/dist/src/platforms/discovery.d.ts +100 -0
- package/dist/src/platforms/discovery.js +779 -0
- package/dist/src/platforms/discovery.js.map +1 -0
- package/dist/src/platforms/grok-permission-config.d.ts +23 -0
- package/dist/src/platforms/grok-permission-config.js +184 -0
- package/dist/src/platforms/grok-permission-config.js.map +1 -0
- package/dist/src/platforms/grok-permission-document.d.ts +4 -0
- package/dist/src/platforms/grok-permission-document.js +145 -0
- package/dist/src/platforms/grok-permission-document.js.map +1 -0
- package/dist/src/platforms/grok-permissions.d.ts +17 -0
- package/dist/src/platforms/grok-permissions.js +311 -0
- package/dist/src/platforms/grok-permissions.js.map +1 -0
- package/dist/src/platforms/host-permission-policy.d.ts +38 -0
- package/dist/src/platforms/host-permission-policy.js +86 -0
- package/dist/src/platforms/host-permission-policy.js.map +1 -0
- package/dist/src/platforms/identity.d.ts +4 -0
- package/dist/src/platforms/identity.js +22 -0
- package/dist/src/platforms/identity.js.map +1 -0
- package/dist/src/platforms/inspection-grok.d.ts +4 -0
- package/dist/src/platforms/inspection-grok.js +380 -0
- package/dist/src/platforms/inspection-grok.js.map +1 -0
- package/dist/src/platforms/inspection-native.d.ts +8 -0
- package/dist/src/platforms/inspection-native.js +584 -0
- package/dist/src/platforms/inspection-native.js.map +1 -0
- package/dist/src/platforms/inspection-opencode.d.ts +4 -0
- package/dist/src/platforms/inspection-opencode.js +98 -0
- package/dist/src/platforms/inspection-opencode.js.map +1 -0
- package/dist/src/platforms/inspection-pi.d.ts +9 -0
- package/dist/src/platforms/inspection-pi.js +490 -0
- package/dist/src/platforms/inspection-pi.js.map +1 -0
- package/dist/src/platforms/inspection-query.d.ts +26 -0
- package/dist/src/platforms/inspection-query.js +118 -0
- package/dist/src/platforms/inspection-query.js.map +1 -0
- package/dist/src/platforms/inspection.d.ts +20 -0
- package/dist/src/platforms/inspection.js +259 -0
- package/dist/src/platforms/inspection.js.map +1 -0
- package/dist/src/platforms/layout.d.ts +35 -0
- package/dist/src/platforms/layout.js +332 -0
- package/dist/src/platforms/layout.js.map +1 -0
- package/dist/src/platforms/lifecycle-native-services.d.ts +3 -0
- package/dist/src/platforms/lifecycle-native-services.js +213 -0
- package/dist/src/platforms/lifecycle-native-services.js.map +1 -0
- package/dist/src/platforms/lifecycle-native.d.ts +14 -0
- package/dist/src/platforms/lifecycle-native.js +234 -0
- package/dist/src/platforms/lifecycle-native.js.map +1 -0
- package/dist/src/platforms/lifecycle.d.ts +29 -0
- package/dist/src/platforms/lifecycle.js +688 -0
- package/dist/src/platforms/lifecycle.js.map +1 -0
- package/dist/src/platforms/opencode-permission-config.d.ts +13 -0
- package/dist/src/platforms/opencode-permission-config.js +253 -0
- package/dist/src/platforms/opencode-permission-config.js.map +1 -0
- package/dist/src/platforms/opencode-permissions.d.ts +39 -0
- package/dist/src/platforms/opencode-permissions.js +212 -0
- package/dist/src/platforms/opencode-permissions.js.map +1 -0
- package/dist/src/platforms/opencode-related-permissions.d.ts +40 -0
- package/dist/src/platforms/opencode-related-permissions.js +177 -0
- package/dist/src/platforms/opencode-related-permissions.js.map +1 -0
- package/dist/src/platforms/permission-ownership.d.ts +89 -0
- package/dist/src/platforms/permission-ownership.js +543 -0
- package/dist/src/platforms/permission-ownership.js.map +1 -0
- package/dist/src/platforms/permission-sidecar.d.ts +70 -0
- package/dist/src/platforms/permission-sidecar.js +215 -0
- package/dist/src/platforms/permission-sidecar.js.map +1 -0
- package/dist/src/platforms/projection-code-extension.d.ts +8 -0
- package/dist/src/platforms/projection-code-extension.js +126 -0
- package/dist/src/platforms/projection-code-extension.js.map +1 -0
- package/dist/src/platforms/projection-command-resources.d.ts +7 -0
- package/dist/src/platforms/projection-command-resources.js +74 -0
- package/dist/src/platforms/projection-command-resources.js.map +1 -0
- package/dist/src/platforms/projection-files.d.ts +28 -0
- package/dist/src/platforms/projection-files.js +113 -0
- package/dist/src/platforms/projection-files.js.map +1 -0
- package/dist/src/platforms/projection-marketplace.d.ts +19 -0
- package/dist/src/platforms/projection-marketplace.js +42 -0
- package/dist/src/platforms/projection-marketplace.js.map +1 -0
- package/dist/src/platforms/projection.d.ts +13 -0
- package/dist/src/platforms/projection.js +578 -0
- package/dist/src/platforms/projection.js.map +1 -0
- package/dist/src/platforms/read-only-retry-policy.d.ts +34 -0
- package/dist/src/platforms/read-only-retry-policy.js +70 -0
- package/dist/src/platforms/read-only-retry-policy.js.map +1 -0
- package/dist/src/platforms/registry.d.ts +4 -0
- package/dist/src/platforms/registry.js +30 -0
- package/dist/src/platforms/registry.js.map +1 -0
- package/dist/src/platforms/retirement-native.d.ts +6 -0
- package/dist/src/platforms/retirement-native.js +95 -0
- package/dist/src/platforms/retirement-native.js.map +1 -0
- package/dist/src/platforms/supplement-layout.d.ts +20 -0
- package/dist/src/platforms/supplement-layout.js +54 -0
- package/dist/src/platforms/supplement-layout.js.map +1 -0
- package/dist/src/platforms/supplement-state.d.ts +13 -0
- package/dist/src/platforms/supplement-state.js +93 -0
- package/dist/src/platforms/supplement-state.js.map +1 -0
- package/dist/src/portable/commands.d.ts +60 -11
- package/dist/src/portable/commands.js +88 -346
- package/dist/src/portable/commands.js.map +1 -1
- package/dist/src/portable/historical-materialization.d.ts +25 -0
- package/dist/src/portable/historical-materialization.js +148 -0
- package/dist/src/portable/historical-materialization.js.map +1 -0
- package/dist/src/portable/materializer.d.ts +46 -2
- package/dist/src/portable/materializer.js +262 -259
- package/dist/src/portable/materializer.js.map +1 -1
- package/dist/src/portable/recovery-layout.d.ts +17 -0
- package/dist/src/portable/recovery-layout.js +42 -0
- package/dist/src/portable/recovery-layout.js.map +1 -0
- package/dist/src/portable/recovery.d.ts +177 -0
- package/dist/src/portable/recovery.js +597 -0
- package/dist/src/portable/recovery.js.map +1 -0
- package/dist/src/portable/writer.d.ts +67 -0
- package/dist/src/portable/writer.js +321 -0
- package/dist/src/portable/writer.js.map +1 -0
- package/dist/src/recovery/coordinator.d.ts +175 -0
- package/dist/src/recovery/coordinator.js +1624 -0
- package/dist/src/recovery/coordinator.js.map +1 -0
- package/dist/src/recovery/demand.d.ts +53 -0
- package/dist/src/recovery/demand.js +189 -0
- package/dist/src/recovery/demand.js.map +1 -0
- package/dist/src/recovery/install-concurrency.d.ts +48 -0
- package/dist/src/recovery/install-concurrency.js +196 -0
- package/dist/src/recovery/install-concurrency.js.map +1 -0
- package/dist/src/recovery/interruption.d.ts +19 -0
- package/dist/src/recovery/interruption.js +43 -0
- package/dist/src/recovery/interruption.js.map +1 -0
- package/dist/src/recovery/joint-coordinator.d.ts +46 -0
- package/dist/src/recovery/joint-coordinator.js +1723 -0
- package/dist/src/recovery/joint-coordinator.js.map +1 -0
- package/dist/src/recovery/joint-demand.d.ts +72 -0
- package/dist/src/recovery/joint-demand.js +332 -0
- package/dist/src/recovery/joint-demand.js.map +1 -0
- package/dist/src/recovery/joint-install-execution.d.ts +19 -0
- package/dist/src/recovery/joint-install-execution.js +308 -0
- package/dist/src/recovery/joint-install-execution.js.map +1 -0
- package/dist/src/recovery/joint-install-native-rebase.d.ts +4 -0
- package/dist/src/recovery/joint-install-native-rebase.js +67 -0
- package/dist/src/recovery/joint-install-native-rebase.js.map +1 -0
- package/dist/src/recovery/performance.d.ts +4 -0
- package/dist/src/recovery/performance.js +26 -0
- package/dist/src/recovery/performance.js.map +1 -0
- package/dist/src/recovery/receipt.d.ts +131 -0
- package/dist/src/recovery/receipt.js +91 -0
- package/dist/src/recovery/receipt.js.map +1 -0
- package/dist/src/recovery/retirement.d.ts +47 -0
- package/dist/src/recovery/retirement.js +499 -0
- package/dist/src/recovery/retirement.js.map +1 -0
- package/dist/src/recovery/status.d.ts +143 -0
- package/dist/src/recovery/status.js +1528 -0
- package/dist/src/recovery/status.js.map +1 -0
- package/dist/src/recovery/types.d.ts +85 -0
- package/dist/src/recovery/types.js +2 -0
- package/dist/src/recovery/types.js.map +1 -0
- package/dist/src/review/eval-source-input.d.ts +44 -0
- package/dist/src/review/eval-source-input.js +213 -0
- package/dist/src/review/eval-source-input.js.map +1 -0
- package/dist/src/review/platform-profile.d.ts +5 -0
- package/dist/src/review/platform-profile.js +13 -0
- package/dist/src/review/platform-profile.js.map +1 -0
- package/dist/src/review/review-profile.d.ts +20 -0
- package/dist/src/review/review-profile.js +286 -0
- package/dist/src/review/review-profile.js.map +1 -0
- package/dist/src/review/review-selection.d.ts +20 -0
- package/dist/src/review/review-selection.js +502 -0
- package/dist/src/review/review-selection.js.map +1 -0
- package/dist/src/review/review-types.d.ts +71 -0
- package/dist/src/review/review-types.js +16 -0
- package/dist/src/review/review-types.js.map +1 -0
- package/dist/src/review/skill-materialization.d.ts +67 -0
- package/dist/src/review/skill-materialization.js +235 -0
- package/dist/src/review/skill-materialization.js.map +1 -0
- package/dist/src/review/source-binding.d.ts +203 -0
- package/dist/src/review/source-binding.js +791 -0
- package/dist/src/review/source-binding.js.map +1 -0
- package/dist/src/tui/agent-management.d.ts +23 -0
- package/dist/src/tui/agent-management.js +319 -0
- package/dist/src/tui/agent-management.js.map +1 -0
- package/dist/src/tui/agent-settings.d.ts +47 -0
- package/dist/src/tui/agent-settings.js +97 -0
- package/dist/src/tui/agent-settings.js.map +1 -0
- package/dist/src/tui/catalog-generation.d.ts +9 -0
- package/dist/src/tui/catalog-generation.js +96 -6
- package/dist/src/tui/catalog-generation.js.map +1 -1
- package/dist/src/tui/catalog-sources/projection.d.ts +2 -2
- package/dist/src/tui/catalog-sources/screens.js +19 -12
- package/dist/src/tui/catalog-sources/screens.js.map +1 -1
- package/dist/src/tui/catalog-sources/session.d.ts +11 -1
- package/dist/src/tui/catalog-sources/session.js +80 -5
- package/dist/src/tui/catalog-sources/session.js.map +1 -1
- package/dist/src/tui/catalog-sources/types.d.ts +15 -2
- package/dist/src/tui/catalog-store-task.d.ts +16 -0
- package/dist/src/tui/catalog-store-task.js +19 -0
- package/dist/src/tui/catalog-store-task.js.map +1 -0
- package/dist/src/tui/clipboard.d.ts +13 -0
- package/dist/src/tui/clipboard.js +95 -0
- package/dist/src/tui/clipboard.js.map +1 -0
- package/dist/src/tui/components.d.ts +113 -3
- package/dist/src/tui/components.js +201 -34
- package/dist/src/tui/components.js.map +1 -1
- package/dist/src/tui/config-array-draft.d.ts +30 -0
- package/dist/src/tui/config-array-draft.js +51 -0
- package/dist/src/tui/config-array-draft.js.map +1 -0
- package/dist/src/tui/config-leaf-editor.d.ts +44 -0
- package/dist/src/tui/config-leaf-editor.js +227 -0
- package/dist/src/tui/config-leaf-editor.js.map +1 -0
- package/dist/src/tui/config-object-suggestions.d.ts +15 -0
- package/dist/src/tui/config-object-suggestions.js +71 -0
- package/dist/src/tui/config-object-suggestions.js.map +1 -0
- package/dist/src/tui/config-references.d.ts +38 -0
- package/dist/src/tui/config-references.js +82 -0
- package/dist/src/tui/config-references.js.map +1 -0
- package/dist/src/tui/config-suggestions.d.ts +27 -0
- package/dist/src/tui/config-suggestions.js +62 -0
- package/dist/src/tui/config-suggestions.js.map +1 -0
- package/dist/src/tui/config-value-presentation.d.ts +23 -0
- package/dist/src/tui/config-value-presentation.js +151 -0
- package/dist/src/tui/config-value-presentation.js.map +1 -0
- package/dist/src/tui/console-app-v4.d.ts +14 -5
- package/dist/src/tui/console-app-v4.js +9779 -2488
- package/dist/src/tui/console-app-v4.js.map +1 -1
- package/dist/src/tui/content-item-card.d.ts +13 -0
- package/dist/src/tui/content-item-card.js +51 -0
- package/dist/src/tui/content-item-card.js.map +1 -0
- package/dist/src/tui/controller-runtime.d.ts +4 -3
- package/dist/src/tui/controller-runtime.js +1610 -590
- package/dist/src/tui/controller-runtime.js.map +1 -1
- package/dist/src/tui/controller.d.ts +583 -80
- package/dist/src/tui/controller.js +3362 -263
- package/dist/src/tui/controller.js.map +1 -1
- package/dist/src/tui/dependency-graph-view.d.ts +39 -0
- package/dist/src/tui/dependency-graph-view.js +121 -0
- package/dist/src/tui/dependency-graph-view.js.map +1 -0
- package/dist/src/tui/dependency-graph.d.ts +81 -0
- package/dist/src/tui/dependency-graph.js +452 -0
- package/dist/src/tui/dependency-graph.js.map +1 -0
- package/dist/src/tui/deployment-view.d.ts +14 -0
- package/dist/src/tui/deployment-view.js +175 -0
- package/dist/src/tui/deployment-view.js.map +1 -0
- package/dist/src/tui/diagnostic-projection.d.ts +31 -0
- package/dist/src/tui/diagnostic-projection.js +681 -0
- package/dist/src/tui/diagnostic-projection.js.map +1 -0
- package/dist/src/tui/diagnostics.d.ts +6 -2
- package/dist/src/tui/diagnostics.js +14 -2
- package/dist/src/tui/diagnostics.js.map +1 -1
- package/dist/src/tui/entity-cards.d.ts +56 -0
- package/dist/src/tui/entity-cards.js +327 -0
- package/dist/src/tui/entity-cards.js.map +1 -0
- package/dist/src/tui/glossary.d.ts +25 -0
- package/dist/src/tui/glossary.js +78 -0
- package/dist/src/tui/glossary.js.map +1 -0
- package/dist/src/tui/guided-setup.d.ts +25 -0
- package/dist/src/tui/guided-setup.js +101 -0
- package/dist/src/tui/guided-setup.js.map +1 -0
- package/dist/src/tui/index.d.ts +4 -1
- package/dist/src/tui/index.js +4 -1
- package/dist/src/tui/index.js.map +1 -1
- package/dist/src/tui/input-display.d.ts +1 -0
- package/dist/src/tui/input-display.js +23 -1
- package/dist/src/tui/input-display.js.map +1 -1
- package/dist/src/tui/keys.d.ts +44 -0
- package/dist/src/tui/keys.js +43 -15
- package/dist/src/tui/keys.js.map +1 -1
- package/dist/src/tui/lifecycle-action-view.d.ts +6 -0
- package/dist/src/tui/lifecycle-action-view.js +36 -0
- package/dist/src/tui/lifecycle-action-view.js.map +1 -0
- package/dist/src/tui/model.d.ts +141 -28
- package/dist/src/tui/model.js +968 -285
- package/dist/src/tui/model.js.map +1 -1
- package/dist/src/tui/operation-diagnostic-screens.d.ts +8 -0
- package/dist/src/tui/operation-diagnostic-screens.js +76 -0
- package/dist/src/tui/operation-diagnostic-screens.js.map +1 -0
- package/dist/src/tui/operation-history.d.ts +91 -0
- package/dist/src/tui/operation-history.js +167 -0
- package/dist/src/tui/operation-history.js.map +1 -0
- package/dist/src/tui/operation-review-planner.d.ts +7 -0
- package/dist/src/tui/operation-review-planner.js +980 -146
- package/dist/src/tui/operation-review-planner.js.map +1 -1
- package/dist/src/tui/plugin-content.d.ts +33 -0
- package/dist/src/tui/plugin-content.js +245 -0
- package/dist/src/tui/plugin-content.js.map +1 -0
- package/dist/src/tui/plugin-detail.d.ts +75 -0
- package/dist/src/tui/plugin-detail.js +267 -0
- package/dist/src/tui/plugin-detail.js.map +1 -0
- package/dist/src/tui/plugin-write-task.d.ts +69 -0
- package/dist/src/tui/plugin-write-task.js +286 -0
- package/dist/src/tui/plugin-write-task.js.map +1 -0
- package/dist/src/tui/query-header.d.ts +30 -0
- package/dist/src/tui/query-header.js +40 -0
- package/dist/src/tui/query-header.js.map +1 -0
- package/dist/src/tui/reader.d.ts +38 -0
- package/dist/src/tui/reader.js +49 -0
- package/dist/src/tui/reader.js.map +1 -0
- package/dist/src/tui/router.d.ts +170 -39
- package/dist/src/tui/router.js +338 -50
- package/dist/src/tui/router.js.map +1 -1
- package/dist/src/tui/scoped-flow.d.ts +49 -0
- package/dist/src/tui/scoped-flow.js +212 -0
- package/dist/src/tui/scoped-flow.js.map +1 -0
- package/dist/src/tui/scoped-inventory.d.ts +139 -0
- package/dist/src/tui/scoped-inventory.js +295 -0
- package/dist/src/tui/scoped-inventory.js.map +1 -0
- package/dist/src/tui/screen-registry.d.ts +696 -0
- package/dist/src/tui/screen-registry.js +226 -0
- package/dist/src/tui/screen-registry.js.map +1 -0
- package/dist/src/tui/session-console-app.d.ts +8 -0
- package/dist/src/tui/session-console-app.js +24 -0
- package/dist/src/tui/session-console-app.js.map +1 -0
- package/dist/src/tui/session-host.d.ts +45 -0
- package/dist/src/tui/session-host.js +219 -0
- package/dist/src/tui/session-host.js.map +1 -0
- package/dist/src/tui/source-detail-card.d.ts +29 -0
- package/dist/src/tui/source-detail-card.js +45 -0
- package/dist/src/tui/source-detail-card.js.map +1 -0
- package/dist/src/tui/theme.d.ts +12 -0
- package/dist/src/tui/theme.js +12 -0
- package/dist/src/tui/theme.js.map +1 -1
- package/dist/src/tui/viewport.d.ts +1 -0
- package/dist/src/tui/viewport.js +23 -0
- package/dist/src/tui/viewport.js.map +1 -1
- package/dist/src/tui/wizard.js +26 -4
- package/dist/src/tui/wizard.js.map +1 -1
- package/dist/src/types.d.ts +105 -83
- package/dist/src/types.js +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils/agent-version.d.ts +10 -4
- package/dist/src/utils/agent-version.js +6 -8
- package/dist/src/utils/agent-version.js.map +1 -1
- package/dist/src/utils/artifact-plan.d.ts +18 -25
- package/dist/src/utils/artifact-plan.js +59 -445
- package/dist/src/utils/artifact-plan.js.map +1 -1
- package/dist/src/utils/artifact-renderer.d.ts +64 -90
- package/dist/src/utils/artifact-renderer.js +202 -303
- package/dist/src/utils/artifact-renderer.js.map +1 -1
- package/dist/src/utils/artifact-request.d.ts +19 -14
- package/dist/src/utils/artifact-request.js +51 -36
- package/dist/src/utils/artifact-request.js.map +1 -1
- package/dist/src/utils/artifact-sources.d.ts +4 -8
- package/dist/src/utils/artifact-sources.js +15 -6
- package/dist/src/utils/artifact-sources.js.map +1 -1
- package/dist/src/utils/aw-home-mutation-lock.js +2 -1
- package/dist/src/utils/aw-home-mutation-lock.js.map +1 -1
- package/dist/src/utils/bundle-layout.d.ts +2 -0
- package/dist/src/utils/bundle-layout.js +88 -158
- package/dist/src/utils/bundle-layout.js.map +1 -1
- package/dist/src/utils/catalog-capability-projection.d.ts +8 -0
- package/dist/src/utils/catalog-capability-projection.js +14 -0
- package/dist/src/utils/catalog-capability-projection.js.map +1 -0
- package/dist/src/utils/catalog-digests.d.ts +2 -12
- package/dist/src/utils/catalog-digests.js +7 -55
- package/dist/src/utils/catalog-digests.js.map +1 -1
- package/dist/src/utils/catalog-generation-resolver.d.ts +28 -4
- package/dist/src/utils/catalog-generation-resolver.js +146 -40
- package/dist/src/utils/catalog-generation-resolver.js.map +1 -1
- package/dist/src/utils/catalog-generation-service.d.ts +24 -2
- package/dist/src/utils/catalog-generation-service.js +92 -48
- package/dist/src/utils/catalog-generation-service.js.map +1 -1
- package/dist/src/utils/catalog-generation-state.js +1 -1
- package/dist/src/utils/catalog-generation-state.js.map +1 -1
- package/dist/src/utils/catalog-generation-store.d.ts +4 -0
- package/dist/src/utils/catalog-generation-store.js +68 -10
- package/dist/src/utils/catalog-generation-store.js.map +1 -1
- package/dist/src/utils/catalog-operation-context.d.ts +61 -4
- package/dist/src/utils/catalog-operation-context.js +225 -4
- package/dist/src/utils/catalog-operation-context.js.map +1 -1
- package/dist/src/utils/catalog-public-error.js +4 -0
- package/dist/src/utils/catalog-public-error.js.map +1 -1
- package/dist/src/utils/catalog-runtime-projection.d.ts +4 -3
- package/dist/src/utils/catalog-runtime-projection.js.map +1 -1
- package/dist/src/utils/catalog-snapshot.d.ts +3 -0
- package/dist/src/utils/catalog-snapshot.js +4 -1
- package/dist/src/utils/catalog-snapshot.js.map +1 -1
- package/dist/src/utils/catalog-source-impact.d.ts +3 -2
- package/dist/src/utils/catalog-source-impact.js +142 -20
- package/dist/src/utils/catalog-source-impact.js.map +1 -1
- package/dist/src/utils/catalog-source-references.d.ts +57 -1
- package/dist/src/utils/catalog-source-references.js +755 -162
- package/dist/src/utils/catalog-source-references.js.map +1 -1
- package/dist/src/utils/catalog-sources.d.ts +1 -1
- package/dist/src/utils/catalog-sources.js +21 -5
- package/dist/src/utils/catalog-sources.js.map +1 -1
- package/dist/src/utils/codex-config.d.ts +3 -0
- package/dist/src/utils/codex-config.js +7 -0
- package/dist/src/utils/codex-config.js.map +1 -1
- package/dist/src/utils/codex-executable-discovery.d.ts +28 -0
- package/dist/src/utils/codex-executable-discovery.js +431 -0
- package/dist/src/utils/codex-executable-discovery.js.map +1 -0
- package/dist/src/utils/codex-manager.d.ts +23 -42
- package/dist/src/utils/codex-manager.js +79 -767
- package/dist/src/utils/codex-manager.js.map +1 -1
- package/dist/src/utils/codex-native-observation.d.ts +40 -1
- package/dist/src/utils/codex-native-observation.js +172 -0
- package/dist/src/utils/codex-native-observation.js.map +1 -1
- package/dist/src/utils/codex-reconciler.d.ts +2 -7
- package/dist/src/utils/codex-reconciler.js +33 -5
- package/dist/src/utils/codex-reconciler.js.map +1 -1
- package/dist/src/utils/codex-shared-native.d.ts +8 -26
- package/dist/src/utils/codex-shared-native.js +63 -83
- package/dist/src/utils/codex-shared-native.js.map +1 -1
- package/dist/src/utils/codex-skill-staging.d.ts +4 -3
- package/dist/src/utils/codex-skill-staging.js.map +1 -1
- package/dist/src/utils/codex-skills-root.d.ts +4 -0
- package/dist/src/utils/codex-skills-root.js +29 -0
- package/dist/src/utils/codex-skills-root.js.map +1 -0
- package/dist/src/utils/codex-surface-analysis.d.ts +6 -2
- package/dist/src/utils/codex-surface-analysis.js +31 -56
- package/dist/src/utils/codex-surface-analysis.js.map +1 -1
- package/dist/src/utils/component-agent-binding.d.ts +17 -0
- package/dist/src/utils/component-agent-binding.js +119 -0
- package/dist/src/utils/component-agent-binding.js.map +1 -0
- package/dist/src/utils/component-command-preparation.d.ts +33 -0
- package/dist/src/utils/component-command-preparation.js +129 -0
- package/dist/src/utils/component-command-preparation.js.map +1 -0
- package/dist/src/utils/component-gap.d.ts +4 -0
- package/dist/src/utils/component-gap.js +16 -0
- package/dist/src/utils/component-gap.js.map +1 -0
- package/dist/src/utils/component-resources.d.ts +53 -0
- package/dist/src/utils/component-resources.js +340 -0
- package/dist/src/utils/component-resources.js.map +1 -0
- package/dist/src/utils/config-platforms.d.ts +21 -0
- package/dist/src/utils/config-platforms.js +51 -0
- package/dist/src/utils/config-platforms.js.map +1 -0
- package/dist/src/utils/dynamic-skill-tree.d.ts +18 -6
- package/dist/src/utils/dynamic-skill-tree.js +33 -40
- package/dist/src/utils/dynamic-skill-tree.js.map +1 -1
- package/dist/src/utils/git-catalog-provider.d.ts +3 -0
- package/dist/src/utils/git-catalog-provider.js +49 -3
- package/dist/src/utils/git-catalog-provider.js.map +1 -1
- package/dist/src/utils/inventory-recovery-diagnostic.d.ts +4 -0
- package/dist/src/utils/inventory-recovery-diagnostic.js +15 -0
- package/dist/src/utils/inventory-recovery-diagnostic.js.map +1 -0
- package/dist/src/utils/local-marketplace.d.ts +19 -12
- package/dist/src/utils/local-marketplace.js +97 -194
- package/dist/src/utils/local-marketplace.js.map +1 -1
- package/dist/src/utils/managed-command-cli-review.d.ts +53 -0
- package/dist/src/utils/managed-command-cli-review.js +431 -0
- package/dist/src/utils/managed-command-cli-review.js.map +1 -0
- package/dist/src/utils/managed-command-closure.d.ts +14 -0
- package/dist/src/utils/managed-command-closure.js +156 -0
- package/dist/src/utils/managed-command-closure.js.map +1 -0
- package/dist/src/utils/managed-command-errors.d.ts +5 -0
- package/dist/src/utils/managed-command-errors.js +10 -0
- package/dist/src/utils/managed-command-errors.js.map +1 -0
- package/dist/src/utils/managed-command-materialization.d.ts +90 -0
- package/dist/src/utils/managed-command-materialization.js +375 -0
- package/dist/src/utils/managed-command-materialization.js.map +1 -0
- package/dist/src/utils/managed-command-preparation.d.ts +30 -0
- package/dist/src/utils/managed-command-preparation.js +39 -0
- package/dist/src/utils/managed-command-preparation.js.map +1 -0
- package/dist/src/utils/managed-command-review.d.ts +33 -0
- package/dist/src/utils/managed-command-review.js +80 -0
- package/dist/src/utils/managed-command-review.js.map +1 -0
- package/dist/src/utils/managed-command-runtime.d.ts +36 -0
- package/dist/src/utils/managed-command-runtime.js +126 -0
- package/dist/src/utils/managed-command-runtime.js.map +1 -0
- package/dist/src/utils/managed-command-snapshots.d.ts +24 -0
- package/dist/src/utils/managed-command-snapshots.js +89 -0
- package/dist/src/utils/managed-command-snapshots.js.map +1 -0
- package/dist/src/utils/managed-command-store.d.ts +141 -0
- package/dist/src/utils/managed-command-store.js +839 -0
- package/dist/src/utils/managed-command-store.js.map +1 -0
- package/dist/src/utils/multi-source-catalog.d.ts +6 -1
- package/dist/src/utils/multi-source-catalog.js +9 -4
- package/dist/src/utils/multi-source-catalog.js.map +1 -1
- package/dist/src/utils/native-cli-interruption.d.ts +8 -0
- package/dist/src/utils/native-cli-interruption.js +65 -0
- package/dist/src/utils/native-cli-interruption.js.map +1 -0
- package/dist/src/utils/native-cli.d.ts +37 -6
- package/dist/src/utils/native-cli.js +523 -60
- package/dist/src/utils/native-cli.js.map +1 -1
- package/dist/src/utils/native-demand.d.ts +29 -0
- package/dist/src/utils/native-demand.js +4 -0
- package/dist/src/utils/native-demand.js.map +1 -0
- package/dist/src/utils/native-tool-context.d.ts +17 -0
- package/dist/src/utils/native-tool-context.js +40 -0
- package/dist/src/utils/native-tool-context.js.map +1 -0
- package/dist/src/utils/native-tool-review.d.ts +8 -0
- package/dist/src/utils/native-tool-review.js +14 -0
- package/dist/src/utils/native-tool-review.js.map +1 -0
- package/dist/src/utils/ownership.d.ts +38 -3
- package/dist/src/utils/ownership.js +118 -11
- package/dist/src/utils/ownership.js.map +1 -1
- package/dist/src/utils/package-content.d.ts +7 -0
- package/dist/src/utils/package-content.js +70 -0
- package/dist/src/utils/package-content.js.map +1 -0
- package/dist/src/utils/path-catalog-provider.js +2 -0
- package/dist/src/utils/path-catalog-provider.js.map +1 -1
- package/dist/src/utils/paths.d.ts +1 -1
- package/dist/src/utils/paths.js +5 -2
- package/dist/src/utils/paths.js.map +1 -1
- package/dist/src/utils/platform-empty-state.d.ts +69 -0
- package/dist/src/utils/platform-empty-state.js +249 -0
- package/dist/src/utils/platform-empty-state.js.map +1 -0
- package/dist/src/utils/platform-support.d.ts +1 -1
- package/dist/src/utils/platform-support.js +1 -1
- package/dist/src/utils/platform-support.js.map +1 -1
- package/dist/src/utils/plugin-config-command-apply.d.ts +33 -0
- package/dist/src/utils/plugin-config-command-apply.js +142 -0
- package/dist/src/utils/plugin-config-command-apply.js.map +1 -0
- package/dist/src/utils/plugin-config-diagnostics.d.ts +16 -0
- package/dist/src/utils/plugin-config-diagnostics.js +44 -0
- package/dist/src/utils/plugin-config-diagnostics.js.map +1 -0
- package/dist/src/utils/plugin-config-impact.d.ts +76 -0
- package/dist/src/utils/plugin-config-impact.js +359 -0
- package/dist/src/utils/plugin-config-impact.js.map +1 -0
- package/dist/src/utils/plugin-config-references.d.ts +116 -0
- package/dist/src/utils/plugin-config-references.js +379 -0
- package/dist/src/utils/plugin-config-references.js.map +1 -0
- package/dist/src/utils/plugin-config-suggestion-runner.d.ts +83 -0
- package/dist/src/utils/plugin-config-suggestion-runner.js +308 -0
- package/dist/src/utils/plugin-config-suggestion-runner.js.map +1 -0
- package/dist/src/utils/plugin-config-suggestions.d.ts +50 -0
- package/dist/src/utils/plugin-config-suggestions.js +322 -0
- package/dist/src/utils/plugin-config-suggestions.js.map +1 -0
- package/dist/src/utils/plugin-config-write.d.ts +108 -19
- package/dist/src/utils/plugin-config-write.js +781 -568
- package/dist/src/utils/plugin-config-write.js.map +1 -1
- package/dist/src/utils/plugin-config.d.ts +122 -43
- package/dist/src/utils/plugin-config.js +574 -610
- package/dist/src/utils/plugin-config.js.map +1 -1
- package/dist/src/utils/plugin-dependencies.d.ts +1 -1
- package/dist/src/utils/plugin-dependencies.js.map +1 -1
- package/dist/src/utils/plugin-scripts.d.ts +41 -17
- package/dist/src/utils/plugin-scripts.js +586 -123
- package/dist/src/utils/plugin-scripts.js.map +1 -1
- package/dist/src/utils/process-lock.js +14 -5
- package/dist/src/utils/process-lock.js.map +1 -1
- package/dist/src/utils/process-tree.d.ts +2 -2
- package/dist/src/utils/process-tree.js +1 -1
- package/dist/src/utils/process-tree.js.map +1 -1
- package/dist/src/utils/project-boundary.d.ts +11 -1
- package/dist/src/utils/project-boundary.js +33 -11
- package/dist/src/utils/project-boundary.js.map +1 -1
- package/dist/src/utils/rendered-contract.js +24 -1
- package/dist/src/utils/rendered-contract.js.map +1 -1
- package/dist/src/utils/runtime-config.d.ts +18 -0
- package/dist/src/utils/runtime-config.js +64 -0
- package/dist/src/utils/runtime-config.js.map +1 -0
- package/dist/src/utils/runtime-skill-closure.d.ts +2 -2
- package/dist/src/utils/runtime-skill-closure.js +50 -7
- package/dist/src/utils/runtime-skill-closure.js.map +1 -1
- package/dist/src/utils/safe-operation-diagnostic.d.ts +15 -0
- package/dist/src/utils/safe-operation-diagnostic.js +33 -0
- package/dist/src/utils/safe-operation-diagnostic.js.map +1 -0
- package/dist/src/utils/sensitive-content.d.ts +4 -0
- package/dist/src/utils/sensitive-content.js +36 -0
- package/dist/src/utils/sensitive-content.js.map +1 -0
- package/dist/src/utils/skill-invocation-warning.d.ts +19 -0
- package/dist/src/utils/skill-invocation-warning.js +43 -0
- package/dist/src/utils/skill-invocation-warning.js.map +1 -0
- package/dist/src/utils/skill-validation.js +0 -5
- package/dist/src/utils/skill-validation.js.map +1 -1
- package/dist/src/utils/state-paths.d.ts +8 -3
- package/dist/src/utils/state-paths.js +53 -16
- package/dist/src/utils/state-paths.js.map +1 -1
- package/dist/src/utils/target-eligibility.d.ts +2 -2
- package/dist/src/utils/target-eligibility.js.map +1 -1
- package/dist/src/utils/windows-claude-shim.d.ts +7 -0
- package/dist/src/utils/windows-claude-shim.js +10 -0
- package/dist/src/utils/windows-claude-shim.js.map +1 -0
- package/dist/src/utils/windows-npm-shim.d.ts +16 -0
- package/dist/src/utils/windows-npm-shim.js +155 -0
- package/dist/src/utils/windows-npm-shim.js.map +1 -0
- package/dist/vitest.config.js +109 -9
- package/dist/vitest.config.js.map +1 -1
- package/package.json +20 -12
- package/dist/authoring/templates/aw-config-runtime.d.mts +0 -2
- package/dist/authoring/templates/aw-config-runtime.mjs +0 -407
- package/dist/authoring/templates/aw-config-runtime.mjs.map +0 -1
- package/dist/src/commands/review-publication.d.ts +0 -99
- package/dist/src/commands/review-publication.js +0 -904
- package/dist/src/commands/review-publication.js.map +0 -1
- package/dist/src/commands/sync-command.d.ts +0 -23
- package/dist/src/commands/sync-command.js +0 -242
- package/dist/src/commands/sync-command.js.map +0 -1
- package/dist/src/portable/skills-cli.d.ts +0 -43
- package/dist/src/portable/skills-cli.js +0 -148
- package/dist/src/portable/skills-cli.js.map +0 -1
- package/dist/src/utils/codex-native-render-receipt.d.ts +0 -40
- package/dist/src/utils/codex-native-render-receipt.js +0 -205
- package/dist/src/utils/codex-native-render-receipt.js.map +0 -1
- package/dist/src/utils/plugin-intent-state.d.ts +0 -34
- package/dist/src/utils/plugin-intent-state.js +0 -289
- package/dist/src/utils/plugin-intent-state.js.map +0 -1
- package/dist/src/utils/slash-commands.d.ts +0 -1
- package/dist/src/utils/slash-commands.js +0 -2
- package/dist/src/utils/slash-commands.js.map +0 -1
|
@@ -1,29 +1,26 @@
|
|
|
1
1
|
import { execFile } from 'node:child_process';
|
|
2
|
+
import crypto from 'node:crypto';
|
|
2
3
|
import { createRequire } from 'node:module';
|
|
3
4
|
import os from 'node:os';
|
|
4
5
|
import path from 'node:path';
|
|
5
6
|
import { promisify } from 'node:util';
|
|
6
7
|
import fs from 'fs-extra';
|
|
7
|
-
import {
|
|
8
|
-
import { buildGeneratedName } from './shared.js';
|
|
8
|
+
import { preparePluginNativeTools, PLATFORM_TARGETS, resolveBundlePlatformRoot, SKILL_AGENT_PLACEHOLDER_CAPABILITY, scanSkillCollectionAgentReferences, validateStaticSkillAgentReferences, } from '@lesliechan721/aw-plugin-core/manifest';
|
|
9
9
|
import { applyFileRules } from '../utils/file-rules.js';
|
|
10
10
|
import { calculateFileDigest } from '../utils/bundle-integrity.js';
|
|
11
11
|
import { resolveCanonicalRuntimeSourceIdentity } from '../utils/catalog-runtime-projection.js';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { assertManifestPlatformSupport, assertPluginInputTree, checkAwCapabilitySupport, computeAwCapabilitySetDigest, createAwPluginRequirementsReceipt, createBundleSourceManifest, createPlatformManifestBase, isIgnoredPluginInputDirectory, normalizePluginRelativePath, normalizeAwCapabilities, readPluginManifest, resolvePluginRequirements, } from '../utils/manifest.js';
|
|
12
|
+
import { validateManagedCommandSourceClosure } from '../utils/managed-command-closure.js';
|
|
13
|
+
import { assertManifestPlatformSupport, assertPluginInputTree, checkAwCapabilitySupport, computeAwCapabilitySetDigest, createAwPluginRequirementsReceipt, createBundleSourceManifest, createPlatformManifestBase, isIgnoredPluginInputDirectory, normalizeAwCapabilities, readPluginManifest, resolvePluginRequirements, validatePluginManifest, } from '../utils/manifest.js';
|
|
15
14
|
import { AwCapabilityUnsupportedError, IMPLEMENTED_AW_CAPABILITIES, } from '../commands/aw-capabilities.js';
|
|
16
15
|
import { writeJsonFile } from '../utils/json.js';
|
|
17
16
|
import { resolveSupportedPlatforms } from '../utils/platform-support.js';
|
|
18
17
|
import { renderTemplate } from '../utils/template-engine.js';
|
|
19
|
-
import { resolvePlatformEntries } from '../utils/platform-entries.js';
|
|
20
18
|
import { scanNodeImportContract } from '../utils/plugin-script-contract.js';
|
|
21
19
|
import { isSkillAuthorOnlyPath, isSkillCollectionAuthorOnlyPath, } from '../utils/skill-authoring.js';
|
|
22
20
|
import { assertTestWritablePath } from '../utils/test-path-fence.js';
|
|
23
21
|
import { resolveCliPackageRoot } from '../utils/paths.js';
|
|
24
|
-
import {
|
|
25
|
-
import { AW_PLUGIN_REQUIREMENTS_RECEIPT_PATH,
|
|
26
|
-
import { renderClaudeSlashCommand, renderCodexSlashCommandOpenAiYaml, renderCodexSlashCommandSkillMarkdown, resolveSlashCommands, } from '../utils/slash-commands.js';
|
|
22
|
+
import { validateRuntimeSkillClosure, validateSkillRuntimeProjectionFreshness, } from '../utils/runtime-skill-closure.js';
|
|
23
|
+
import { AW_PLUGIN_REQUIREMENTS_RECEIPT_PATH, validatePortableSkillDirectory, } from '../utils/dynamic-skill-tree.js';
|
|
27
24
|
const execFileAsync = promisify(execFile);
|
|
28
25
|
const requireFromCli = createRequire(import.meta.url);
|
|
29
26
|
const NODE_RUNTIME_EXTENSIONS = new Set(['.js', '.mjs', '.cjs']);
|
|
@@ -33,7 +30,7 @@ const PLATFORM_MANIFEST_DIRS = {
|
|
|
33
30
|
claude: '.claude-plugin',
|
|
34
31
|
codex: '.codex-plugin',
|
|
35
32
|
};
|
|
36
|
-
const
|
|
33
|
+
const EXACT_PNPM_VERSION_PATTERN = /^\d+\.\d+\.\d+$/u;
|
|
37
34
|
function assertLocalPluginStagingPathForTests(targetPath, source) {
|
|
38
35
|
return assertTestWritablePath(targetPath, source, '用 createIsolatedTestEnv() 生成默认 TMPDIR,或通过 registerWritableStateRoot() 登记 local plugin staging 路径。');
|
|
39
36
|
}
|
|
@@ -43,11 +40,14 @@ export async function validateStagingPackageManager(packageRoot) {
|
|
|
43
40
|
readJsonObject(path.join(resolveCliPackageRoot(), 'package.json'), '@lesliechan721/aw package.json'),
|
|
44
41
|
readJsonObject(path.join(packageRoot, 'package.json'), 'scripts.node.packageRoot.package.json'),
|
|
45
42
|
]);
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
43
|
+
// pnpm pack removes packageManager, but preserves runtime dependencies.
|
|
44
|
+
const dependencies = cliPackageJson.dependencies;
|
|
45
|
+
const supportedPnpmVersion = dependencies?.pnpm;
|
|
46
|
+
if (typeof supportedPnpmVersion !== 'string'
|
|
47
|
+
|| !EXACT_PNPM_VERSION_PATTERN.test(supportedPnpmVersion)) {
|
|
48
|
+
throw new Error('Invalid @lesliechan721/aw dependencies.pnpm: expected an exact "<major>.<minor>.<patch>" version.');
|
|
49
|
+
}
|
|
50
|
+
const supportedPackageManager = `pnpm@${supportedPnpmVersion}`;
|
|
51
51
|
if (packageJson.packageManager !== supportedPackageManager) {
|
|
52
52
|
throw new Error('Invalid scripts.node.packageRoot.package.json.packageManager: '
|
|
53
53
|
+ `expected "${supportedPackageManager}".`);
|
|
@@ -99,34 +99,36 @@ async function resolveRuntimePnpmEntry(supportedPackageManager) {
|
|
|
99
99
|
const stats = await fs.stat(entryPath).catch(() => undefined);
|
|
100
100
|
return stats?.isFile() ? entryPath : undefined;
|
|
101
101
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
102
|
+
function createDefaultStagingRunner(commandEnv) {
|
|
103
|
+
return {
|
|
104
|
+
async installPackageRoot(packageRoot) {
|
|
105
|
+
const supportedPackageManager = await validateStagingPackageManager(packageRoot);
|
|
106
|
+
const fixedPnpmEntry = await resolveFixedPnpmEntry(supportedPackageManager, commandEnv)
|
|
107
|
+
?? await resolveRuntimePnpmEntry(supportedPackageManager);
|
|
108
|
+
if (!fixedPnpmEntry) {
|
|
109
|
+
throw new Error(`Cannot stage scripts.node.packageRoot: missing bundled ${supportedPackageManager} runtime dependency.`);
|
|
110
|
+
}
|
|
111
|
+
const args = [
|
|
112
|
+
fixedPnpmEntry,
|
|
113
|
+
'install',
|
|
114
|
+
'--frozen-lockfile',
|
|
115
|
+
'--ignore-scripts',
|
|
116
|
+
];
|
|
117
|
+
await execFileAsync(process.execPath, args, {
|
|
118
|
+
cwd: packageRoot,
|
|
119
|
+
env: commandEnv,
|
|
120
|
+
maxBuffer: 10 * 1024 * 1024,
|
|
121
|
+
});
|
|
122
|
+
},
|
|
123
|
+
async runNodeBuild({ pluginRoot, scriptPath, args, env }) {
|
|
124
|
+
await execFileAsync(process.execPath, [path.join(pluginRoot, stripDotSlash(scriptPath)), ...args], {
|
|
125
|
+
cwd: pluginRoot,
|
|
126
|
+
env,
|
|
127
|
+
maxBuffer: 10 * 1024 * 1024,
|
|
128
|
+
});
|
|
129
|
+
},
|
|
130
|
+
};
|
|
131
|
+
}
|
|
130
132
|
function stripDotSlash(value) {
|
|
131
133
|
return value.startsWith('./') ? value.slice(2) : value;
|
|
132
134
|
}
|
|
@@ -189,21 +191,6 @@ async function collectFilesForPath(pluginRoot, relativePath) {
|
|
|
189
191
|
}
|
|
190
192
|
return [stripDotSlash(relativePath).split(path.sep).join('/')];
|
|
191
193
|
}
|
|
192
|
-
function renderClaudeAgentContent(agent) {
|
|
193
|
-
const frontmatterLines = ['---', `name: ${JSON.stringify(agent.name)}`, `description: ${JSON.stringify(agent.description)}`];
|
|
194
|
-
if (agent.tools && agent.tools.length > 0) {
|
|
195
|
-
frontmatterLines.push('tools:');
|
|
196
|
-
for (const tool of agent.tools) {
|
|
197
|
-
frontmatterLines.push(` - ${tool}`);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
frontmatterLines.push('---', '');
|
|
201
|
-
return `${frontmatterLines.join('\n')}${agent.prompt.trim()}\n`;
|
|
202
|
-
}
|
|
203
|
-
async function writeTextFile(filePath, content) {
|
|
204
|
-
await fs.ensureDir(path.dirname(filePath));
|
|
205
|
-
await fs.writeFile(filePath, content, 'utf8');
|
|
206
|
-
}
|
|
207
194
|
async function copyFileWithTemplateSupport(pluginRoot, outputRoot, sourceRelativePath, platform, templatePatterns, templateVars) {
|
|
208
195
|
const normalizedSource = sourceRelativePath.split(path.sep).join('/');
|
|
209
196
|
const sourcePath = path.join(pluginRoot, normalizedSource);
|
|
@@ -257,77 +244,57 @@ async function assertArtifactSourceTreePortable(rootDir, fieldName, relativeRoot
|
|
|
257
244
|
}
|
|
258
245
|
}
|
|
259
246
|
async function copyArtifactSourceDirectories(plugin, outputRoot) {
|
|
260
|
-
for (const [
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
dereference: false,
|
|
272
|
-
filter: (source) => !isMacOsMetadataName(path.basename(source))
|
|
273
|
-
&& !isSkillAuthorOnlyPath(path.relative(sourcePath, source)),
|
|
274
|
-
});
|
|
247
|
+
for (const [sourceIndex, sourceDir] of (plugin.manifest.artifacts?.sourceDirs ?? []).entries()) {
|
|
248
|
+
const sourcePath = path.join(plugin.rootDir, stripDotSlash(sourceDir));
|
|
249
|
+
await assertArtifactSourceTreePortable(sourcePath, `artifacts.sourceDirs[${sourceIndex}]`);
|
|
250
|
+
const targetRoot = path.join(outputRoot, stripDotSlash(sourceDir));
|
|
251
|
+
await fs.ensureDir(targetRoot);
|
|
252
|
+
for (const relativePath of await listFilesRecursively(sourcePath)) {
|
|
253
|
+
if (isSkillAuthorOnlyPath(relativePath))
|
|
254
|
+
continue;
|
|
255
|
+
const destination = path.join(targetRoot, relativePath);
|
|
256
|
+
await fs.ensureDir(path.dirname(destination));
|
|
257
|
+
await fs.copyFile(path.join(sourcePath, relativePath), destination);
|
|
275
258
|
}
|
|
276
259
|
}
|
|
277
260
|
}
|
|
278
|
-
async function
|
|
279
|
-
const
|
|
280
|
-
if (!
|
|
261
|
+
async function copyManagedCommandPackage(plugin, outputRoot) {
|
|
262
|
+
const command = plugin.manifest.command;
|
|
263
|
+
if (!command)
|
|
281
264
|
return;
|
|
282
|
-
|
|
283
|
-
const
|
|
284
|
-
await
|
|
285
|
-
|
|
265
|
+
await validateManagedCommandSourceClosure(plugin.rootDir, plugin.manifest);
|
|
266
|
+
const relativePath = stripDotSlash(command.sourceDir);
|
|
267
|
+
await fs.copy(path.join(plugin.rootDir, relativePath), path.join(outputRoot, relativePath), {
|
|
268
|
+
overwrite: true,
|
|
286
269
|
dereference: false,
|
|
287
|
-
filter: (source) => {
|
|
288
|
-
const relative = path.relative(sourceRoot, source).split(path.sep).join('/');
|
|
289
|
-
return !isMacOsMetadataName(path.basename(source))
|
|
290
|
-
&& !isSkillCollectionAuthorOnlyPath(relative);
|
|
291
|
-
},
|
|
292
270
|
});
|
|
271
|
+
await validateManagedCommandSourceClosure(outputRoot, plugin.manifest);
|
|
293
272
|
}
|
|
294
273
|
async function resolveArtifactRuntimeImports(options) {
|
|
295
274
|
const manifest = createBundleSourceManifest(options.plugin);
|
|
296
275
|
const requiredCapabilities = [];
|
|
297
276
|
const projections = [];
|
|
298
|
-
for (const [
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
throw new Error(`Cannot resolve artifacts.targets[${targetIndex}].runtimeImports[${importIndex}]: catalog runtime import resolver is required.`);
|
|
302
|
-
}
|
|
303
|
-
const resolution = await options.resolver.resolve({
|
|
304
|
-
consumer: options.plugin,
|
|
305
|
-
reference: runtimeImport,
|
|
306
|
-
purpose: 'artifact-runtime',
|
|
307
|
-
});
|
|
308
|
-
requiredCapabilities.push(...resolution.requiredCapabilities);
|
|
309
|
-
const relativePath = `./.agents-plugin/runtime-imports/${target.id}/${runtimeImport.name}`;
|
|
310
|
-
const targetPath = path.join(options.outputRoot, stripDotSlash(relativePath));
|
|
311
|
-
const digest = resolution.sourceDigest;
|
|
312
|
-
projections.push({
|
|
313
|
-
sourcePath: resolution.sourcePath,
|
|
314
|
-
targetPath,
|
|
315
|
-
sourceDigest: resolution.sourceDigest,
|
|
316
|
-
label: `${target.id}/${runtimeImport.name}`,
|
|
317
|
-
});
|
|
318
|
-
runtimeImport.resolved = {
|
|
319
|
-
path: relativePath,
|
|
320
|
-
digest,
|
|
321
|
-
providerPluginId: resolution.provider,
|
|
322
|
-
providerVersion: resolution.providerVersion,
|
|
323
|
-
source: resolution.source,
|
|
324
|
-
requiredCapabilities: resolution.requiredCapabilities,
|
|
325
|
-
capabilitySetDigest: resolution.capabilitySetDigest,
|
|
326
|
-
};
|
|
277
|
+
for (const [importIndex, runtimeImport] of (manifest.artifacts?.runtimeImports ?? []).entries()) {
|
|
278
|
+
if (!options.resolver) {
|
|
279
|
+
throw new Error(`Cannot resolve artifacts.runtimeImports[${importIndex}]: catalog runtime import resolver is required.`);
|
|
327
280
|
}
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
281
|
+
const resolution = await options.resolver.resolve({
|
|
282
|
+
consumer: options.plugin, reference: runtimeImport, purpose: 'artifact-runtime',
|
|
283
|
+
});
|
|
284
|
+
requiredCapabilities.push(...resolution.requiredCapabilities);
|
|
285
|
+
const relativePath = `./.agents-plugin/runtime-imports/${runtimeImport.name}`;
|
|
286
|
+
projections.push({
|
|
287
|
+
sourcePath: resolution.sourcePath,
|
|
288
|
+
targetPath: path.join(options.outputRoot, stripDotSlash(relativePath)),
|
|
289
|
+
sourceDigest: resolution.sourceDigest,
|
|
290
|
+
label: runtimeImport.name,
|
|
291
|
+
});
|
|
292
|
+
runtimeImport.resolved = {
|
|
293
|
+
path: relativePath, digest: resolution.sourceDigest,
|
|
294
|
+
providerPluginId: resolution.provider, providerVersion: resolution.providerVersion,
|
|
295
|
+
source: resolution.source, requiredCapabilities: resolution.requiredCapabilities,
|
|
296
|
+
capabilitySetDigest: resolution.capabilitySetDigest,
|
|
297
|
+
};
|
|
331
298
|
}
|
|
332
299
|
return {
|
|
333
300
|
manifest,
|
|
@@ -345,8 +312,11 @@ async function materializeArtifactRuntimeImports(projections) {
|
|
|
345
312
|
}
|
|
346
313
|
}
|
|
347
314
|
async function injectRequirementsReceipts(options) {
|
|
315
|
+
if (!options.plugin.manifest.skills) {
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
348
318
|
const receipt = createAwPluginRequirementsReceipt({ name: options.plugin.manifest.name, version: options.plugin.manifest.version }, options.requiredCapabilities);
|
|
349
|
-
for (const relativeRoot of ['
|
|
319
|
+
for (const relativeRoot of ['skills', ...PLATFORM_TARGETS.map((platform) => `${platform}/skills`)]) {
|
|
350
320
|
const skillsRoot = path.join(options.outputRoot, relativeRoot);
|
|
351
321
|
if (!(await fs.pathExists(skillsRoot)))
|
|
352
322
|
continue;
|
|
@@ -364,12 +334,6 @@ async function injectRequirementsReceipts(options) {
|
|
|
364
334
|
}
|
|
365
335
|
}
|
|
366
336
|
}
|
|
367
|
-
async function copySlashCommandAsset(pluginRoot, outputRoot, skillName, sourceRelativePath, generatedRelativePath) {
|
|
368
|
-
const sourcePath = path.join(pluginRoot, sourceRelativePath);
|
|
369
|
-
const targetPath = path.join(outputRoot, 'codex', 'skills', skillName, stripDotSlash(generatedRelativePath));
|
|
370
|
-
await fs.ensureDir(path.dirname(targetPath));
|
|
371
|
-
await fs.copyFile(sourcePath, targetPath);
|
|
372
|
-
}
|
|
373
337
|
async function addDeclaredPathFiles(plugin, platform, relativePath, targetFiles) {
|
|
374
338
|
if (!relativePath) {
|
|
375
339
|
return undefined;
|
|
@@ -384,18 +348,11 @@ async function addDeclaredSkillPathFiles(plugin, platform, relativePath, targetF
|
|
|
384
348
|
if (!relativePath)
|
|
385
349
|
return undefined;
|
|
386
350
|
const root = stripDotSlash(relativePath);
|
|
387
|
-
const dynamicSkillKeys = new Set((plugin.manifest.artifacts?.targets ?? [])
|
|
388
|
-
.filter((target) => target.platform === platform &&
|
|
389
|
-
(target.target === 'codex.skill' || target.target === 'claude.skill') &&
|
|
390
|
-
target.skillKey)
|
|
391
|
-
.map((target) => target.skillKey));
|
|
392
351
|
const files = await collectFilesForPath(plugin.rootDir, relativePath);
|
|
393
352
|
let added = false;
|
|
394
353
|
for (const filePath of files) {
|
|
395
354
|
const skillCollectionPath = path.posix.relative(root.split(path.sep).join('/'), filePath.split(path.sep).join('/'));
|
|
396
|
-
|
|
397
|
-
if (!dynamicSkillKeys.has(skillKey ?? '') &&
|
|
398
|
-
!isSkillCollectionAuthorOnlyPath(skillCollectionPath)) {
|
|
355
|
+
if (!isSkillCollectionAuthorOnlyPath(skillCollectionPath)) {
|
|
399
356
|
targetFiles.add(filePath);
|
|
400
357
|
added = true;
|
|
401
358
|
}
|
|
@@ -419,65 +376,15 @@ function isDeclaredSkillAuthorOnlyFile(plugin, filePath) {
|
|
|
419
376
|
if (staticRelative && isSkillCollectionAuthorOnlyPath(staticRelative))
|
|
420
377
|
return true;
|
|
421
378
|
}
|
|
422
|
-
for (const
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
continue;
|
|
426
|
-
const dynamicRoot = `skills/${target.skillKey}`;
|
|
427
|
-
const dynamicRelative = relativePathInside(dynamicRoot, normalizedFile);
|
|
428
|
-
if (dynamicRelative && isSkillAuthorOnlyPath(dynamicRelative))
|
|
379
|
+
for (const sourceDir of plugin.manifest.artifacts?.sourceDirs ?? []) {
|
|
380
|
+
const sourceRelative = relativePathInside(stripDotSlash(sourceDir), normalizedFile);
|
|
381
|
+
if (sourceRelative && isSkillAuthorOnlyPath(sourceRelative))
|
|
429
382
|
return true;
|
|
430
|
-
for (const sourceDir of target.sourceDirs ?? []) {
|
|
431
|
-
const sourceRelative = relativePathInside(stripDotSlash(sourceDir).split(path.sep).join('/'), normalizedFile);
|
|
432
|
-
if (sourceRelative && isSkillAuthorOnlyPath(sourceRelative))
|
|
433
|
-
return true;
|
|
434
|
-
}
|
|
435
383
|
}
|
|
436
384
|
return false;
|
|
437
385
|
}
|
|
438
|
-
function
|
|
439
|
-
const
|
|
440
|
-
return (plugin.manifest.artifacts?.targets ?? []).some((target) => {
|
|
441
|
-
if (target.platform !== platform ||
|
|
442
|
-
(target.target !== 'codex.skill' && target.target !== 'claude.skill') ||
|
|
443
|
-
!target.skillKey)
|
|
444
|
-
return false;
|
|
445
|
-
return relativePathInside(`skills/${target.skillKey}`, normalizedFile) !== null;
|
|
446
|
-
});
|
|
447
|
-
}
|
|
448
|
-
async function addDeclaredLspServerFiles(plugin, value, targetFiles) {
|
|
449
|
-
if (value === undefined) {
|
|
450
|
-
return undefined;
|
|
451
|
-
}
|
|
452
|
-
if (typeof value === 'string') {
|
|
453
|
-
const normalized = normalizePluginRelativePath(plugin.rootDir, value, 'buildConfig.manifestOverrides.claude.lspServers');
|
|
454
|
-
const files = await collectFilesForPath(plugin.rootDir, normalized);
|
|
455
|
-
for (const filePath of files) {
|
|
456
|
-
targetFiles.add(filePath);
|
|
457
|
-
}
|
|
458
|
-
return toPlatformRelativePath(normalized, 'claude');
|
|
459
|
-
}
|
|
460
|
-
if (Array.isArray(value)) {
|
|
461
|
-
const rendered = [];
|
|
462
|
-
for (const entry of value) {
|
|
463
|
-
if (typeof entry === 'string') {
|
|
464
|
-
const normalized = normalizePluginRelativePath(plugin.rootDir, entry, 'buildConfig.manifestOverrides.claude.lspServers');
|
|
465
|
-
const files = await collectFilesForPath(plugin.rootDir, normalized);
|
|
466
|
-
for (const filePath of files) {
|
|
467
|
-
targetFiles.add(filePath);
|
|
468
|
-
}
|
|
469
|
-
rendered.push(toPlatformRelativePath(normalized, 'claude'));
|
|
470
|
-
}
|
|
471
|
-
else {
|
|
472
|
-
rendered.push(entry);
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
return rendered;
|
|
476
|
-
}
|
|
477
|
-
return value;
|
|
478
|
-
}
|
|
479
|
-
function addPostApplyRuntimeEntry(plugin, rootFiles, nodeEntries) {
|
|
480
|
-
const entry = plugin.manifest.scripts?.postApply;
|
|
386
|
+
function addPreApplyRuntimeEntry(plugin, rootFiles, nodeEntries) {
|
|
387
|
+
const entry = plugin.manifest.scripts?.preApply;
|
|
481
388
|
if (!entry)
|
|
482
389
|
return;
|
|
483
390
|
const filePath = stripDotSlash(entry.path);
|
|
@@ -546,6 +453,7 @@ async function collectRuntimeClosureFiles(plugin, entryFiles) {
|
|
|
546
453
|
entryFiles,
|
|
547
454
|
dependencies,
|
|
548
455
|
devDependencies,
|
|
456
|
+
runtimeConfigSkillRoots: plugin.manifest.artifacts?.sourceDirs ?? [],
|
|
549
457
|
});
|
|
550
458
|
if (scan.errors.length > 0) {
|
|
551
459
|
throw new Error(`Invalid scripts.node runtime imports:\n${scan.errors.join('\n')}`);
|
|
@@ -555,11 +463,30 @@ async function collectRuntimeClosureFiles(plugin, entryFiles) {
|
|
|
555
463
|
async function collectAwRuntimeFiles(plugin) {
|
|
556
464
|
const rootFiles = new Set();
|
|
557
465
|
const nodeEntries = new Set();
|
|
558
|
-
|
|
466
|
+
addPreApplyRuntimeEntry(plugin, rootFiles, nodeEntries);
|
|
559
467
|
addHelperRuntimeEntries(plugin, rootFiles, nodeEntries);
|
|
560
468
|
addArtifactRendererRuntimeEntry(plugin, rootFiles, nodeEntries);
|
|
561
|
-
|
|
469
|
+
const configSuggestions = plugin.manifest.scripts?.config?.suggestions;
|
|
470
|
+
if (configSuggestions) {
|
|
471
|
+
const filePath = stripDotSlash(configSuggestions.path);
|
|
562
472
|
rootFiles.add(filePath);
|
|
473
|
+
nodeEntries.add(filePath);
|
|
474
|
+
}
|
|
475
|
+
if (plugin.manifest.nativeTools) {
|
|
476
|
+
rootFiles.add(stripDotSlash(plugin.manifest.nativeTools.reader));
|
|
477
|
+
}
|
|
478
|
+
const closureFiles = await collectRuntimeClosureFiles(plugin, [...nodeEntries]);
|
|
479
|
+
for (const filePath of closureFiles) {
|
|
480
|
+
rootFiles.add(filePath);
|
|
481
|
+
}
|
|
482
|
+
const configHelper = plugin.manifest.scripts?.helpers?.config;
|
|
483
|
+
if (configHelper) {
|
|
484
|
+
const helperDir = path.posix.dirname(stripDotSlash(configHelper));
|
|
485
|
+
const re2RuntimeRoot = path.posix.join(helperDir, 're2-wasm');
|
|
486
|
+
if (closureFiles.includes(path.posix.join(re2RuntimeRoot, 'build/src/re2.js'))) {
|
|
487
|
+
rootFiles.add(path.posix.join(re2RuntimeRoot, 'build/wasm/re2.wasm'));
|
|
488
|
+
rootFiles.add(path.posix.join(re2RuntimeRoot, 'LICENSE'));
|
|
489
|
+
}
|
|
563
490
|
}
|
|
564
491
|
return [...rootFiles].sort();
|
|
565
492
|
}
|
|
@@ -777,17 +704,7 @@ async function assertSkillRuntimeTargetAbsent(skillRoot, target, fieldName) {
|
|
|
777
704
|
}
|
|
778
705
|
async function assertSkillRuntimeProjectionTargets(plugin) {
|
|
779
706
|
for (const [index, entry] of (plugin.manifest.buildConfig?.skillRuntimeFiles ?? []).entries()) {
|
|
780
|
-
const roots = [];
|
|
781
|
-
if (entry.platforms !== undefined || entry.distributions === undefined) {
|
|
782
|
-
roots.push(path.join(plugin.rootDir, 'skills', entry.skill));
|
|
783
|
-
}
|
|
784
|
-
if (entry.distributions?.includes('agent-skills')) {
|
|
785
|
-
const portableRoot = plugin.manifest.distributions?.agentSkills?.skills;
|
|
786
|
-
if (!portableRoot) {
|
|
787
|
-
throw new Error(`Invalid buildConfig.skillRuntimeFiles[${index}].distributions: agent-skills is not declared.`);
|
|
788
|
-
}
|
|
789
|
-
roots.push(path.join(plugin.rootDir, stripDotSlash(portableRoot), entry.skill));
|
|
790
|
-
}
|
|
707
|
+
const roots = [path.join(plugin.rootDir, stripDotSlash(plugin.manifest.skills ?? './skills'), entry.skill)];
|
|
791
708
|
for (const skillRoot of roots) {
|
|
792
709
|
const skillRootStats = await fs.lstat(skillRoot).catch(() => undefined);
|
|
793
710
|
if (!skillRootStats?.isDirectory() || skillRootStats.isSymbolicLink()) {
|
|
@@ -799,13 +716,10 @@ async function assertSkillRuntimeProjectionTargets(plugin) {
|
|
|
799
716
|
}
|
|
800
717
|
async function validateGeneratedSkillRuntimeFiles(plugin, outputRoot, supportedPlatforms) {
|
|
801
718
|
for (const [index, entry] of (plugin.manifest.buildConfig?.generatedSkillRuntimeFiles ?? []).entries()) {
|
|
802
|
-
const surfaces = [];
|
|
803
|
-
if (entry.distributions === undefined) {
|
|
804
|
-
surfaces.push(...supportedPlatforms);
|
|
805
|
-
}
|
|
806
|
-
surfaces.push(...(entry.distributions ?? []));
|
|
719
|
+
const surfaces = entry.platforms?.length ? entry.platforms : [...supportedPlatforms];
|
|
807
720
|
for (const surface of surfaces) {
|
|
808
|
-
const
|
|
721
|
+
const resolved = await resolveBundlePlatformRoot(outputRoot, surface, { skills: './skills' });
|
|
722
|
+
const targetPath = path.join(resolved.skillsRoot, entry.skill, ...entry.target.split('/'));
|
|
809
723
|
const stats = await fs.lstat(targetPath).catch(() => undefined);
|
|
810
724
|
if (!stats?.isFile() || stats.isSymbolicLink()) {
|
|
811
725
|
throw new Error(`Invalid buildConfig.generatedSkillRuntimeFiles[${index}]: build did not create regular final target "${surface}:${entry.skill}/${entry.target}".`);
|
|
@@ -817,19 +731,12 @@ async function projectSkillRuntimeFiles(options) {
|
|
|
817
731
|
const projections = [];
|
|
818
732
|
const claims = new Set();
|
|
819
733
|
for (const [index, entry] of (options.plugin.manifest.buildConfig?.skillRuntimeFiles ?? []).entries()) {
|
|
820
|
-
const
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
}
|
|
824
|
-
surfaces.push(...(entry.distributions ?? []).map((distribution) => ({ distribution })));
|
|
825
|
-
for (const surface of surfaces) {
|
|
826
|
-
const { platform, distribution } = surface;
|
|
827
|
-
if (platform) {
|
|
828
|
-
if (!options.supportedPlatforms.has(platform)) {
|
|
829
|
-
throw new Error(`Invalid buildConfig.skillRuntimeFiles[${index}].platforms: plugin does not support "${platform}".`);
|
|
830
|
-
}
|
|
734
|
+
for (const platform of entry.platforms?.length ? entry.platforms : [...options.supportedPlatforms]) {
|
|
735
|
+
if (!options.supportedPlatforms.has(platform)) {
|
|
736
|
+
throw new Error(`Invalid buildConfig.skillRuntimeFiles[${index}].platforms: plugin does not support "${platform}".`);
|
|
831
737
|
}
|
|
832
|
-
const
|
|
738
|
+
const distribution = platform === 'codex' || platform === 'claude' ? undefined : 'agent-skills';
|
|
739
|
+
const claim = `${platform}:${entry.skill}/${entry.target}`;
|
|
833
740
|
if (claims.has(claim)) {
|
|
834
741
|
throw new Error(`Invalid buildConfig.skillRuntimeFiles: target collision at "${claim}".`);
|
|
835
742
|
}
|
|
@@ -871,7 +778,7 @@ async function projectSkillRuntimeFiles(options) {
|
|
|
871
778
|
bindingKey = `import:${entry.import.plugin}/${entry.import.export}`;
|
|
872
779
|
runtimeProvenance = toRuntimeImportProvenance(resolution);
|
|
873
780
|
}
|
|
874
|
-
const targetPath = path.join(options.outputRoot, platform
|
|
781
|
+
const targetPath = path.join(options.outputRoot, platform, 'skills', entry.skill, ...entry.target.split('/'));
|
|
875
782
|
projections.push({
|
|
876
783
|
bindingKey,
|
|
877
784
|
canonicalSource,
|
|
@@ -893,7 +800,7 @@ async function projectSkillRuntimeFiles(options) {
|
|
|
893
800
|
async function materializeSkillRuntimeFiles(projections) {
|
|
894
801
|
for (const projection of projections) {
|
|
895
802
|
if (await fs.pathExists(projection.targetPath)) {
|
|
896
|
-
const surface = projection.provenance.platform
|
|
803
|
+
const surface = projection.provenance.platform;
|
|
897
804
|
throw new Error(`Invalid buildConfig.skillRuntimeFiles: bundle target already exists at "${surface}:${projection.provenance.skill}/${projection.provenance.target}".`);
|
|
898
805
|
}
|
|
899
806
|
await fs.ensureDir(path.dirname(projection.targetPath));
|
|
@@ -972,7 +879,7 @@ async function validateBuildImportProjectionSources(projections) {
|
|
|
972
879
|
}
|
|
973
880
|
}
|
|
974
881
|
}
|
|
975
|
-
async function createStagedPlugin(plugin, runner, resolver) {
|
|
882
|
+
async function createStagedPlugin(plugin, runner, resolver, commandEnv = process.env) {
|
|
976
883
|
const stagingRoot = await fs.mkdtemp(assertLocalPluginStagingPathForTests(path.join(os.tmpdir(), 'aw-plugin-staging-'), 'local plugin bundle staging root'));
|
|
977
884
|
const stagingPluginRoot = assertLocalPluginStagingPathForTests(path.join(stagingRoot, 'plugin'), 'local plugin staged plugin root');
|
|
978
885
|
try {
|
|
@@ -982,19 +889,25 @@ async function createStagedPlugin(plugin, runner, resolver) {
|
|
|
982
889
|
&& !isMacOsMetadataName(path.basename(source));
|
|
983
890
|
},
|
|
984
891
|
});
|
|
892
|
+
const nativeReader = await preparePluginNativeTools(stagingPluginRoot, plugin.manifest);
|
|
985
893
|
const sourceBuild = plugin.manifest.scripts?.node?.build;
|
|
986
894
|
const declaredBuildImports = plugin.manifest.buildConfig?.buildImports ?? [];
|
|
987
895
|
if (declaredBuildImports.length > 0 && !sourceBuild) {
|
|
988
896
|
throw new Error(`Invalid plugin "${plugin.manifest.name}": buildConfig.buildImports requires scripts.node.build.`);
|
|
989
897
|
}
|
|
990
|
-
const buildEnv = { ...
|
|
898
|
+
const buildEnv = { ...commandEnv };
|
|
899
|
+
for (const key of Object.keys(buildEnv))
|
|
900
|
+
if (key.toUpperCase() === 'AW_PLUGIN_NATIVE_READER')
|
|
901
|
+
delete buildEnv[key];
|
|
902
|
+
if (nativeReader)
|
|
903
|
+
buildEnv.AW_PLUGIN_NATIVE_READER = nativeReader;
|
|
991
904
|
const buildImportProvenance = [];
|
|
992
905
|
const buildImportProjections = [];
|
|
993
906
|
for (const buildImport of declaredBuildImports) {
|
|
994
907
|
if (!resolver) {
|
|
995
908
|
throw new Error(`Cannot resolve buildConfig.buildImports for plugin "${plugin.manifest.name}": catalog runtime import resolver is required.`);
|
|
996
909
|
}
|
|
997
|
-
if (Object.hasOwn(
|
|
910
|
+
if (Object.hasOwn(commandEnv, buildImport.env)) {
|
|
998
911
|
throw new Error(`Invalid buildConfig.buildImports env "${buildImport.env}": refusing to overwrite an existing environment variable.`);
|
|
999
912
|
}
|
|
1000
913
|
const resolution = await resolver.resolve({
|
|
@@ -1086,13 +999,15 @@ async function resolveBuildPlugin(plugin, options) {
|
|
|
1086
999
|
cleanup: async () => { },
|
|
1087
1000
|
};
|
|
1088
1001
|
}
|
|
1089
|
-
return createStagedPlugin(plugin, options.stagingRunner, options.runtimeResolver);
|
|
1002
|
+
return createStagedPlugin(plugin, options.stagingRunner, options.runtimeResolver, options.commandEnv);
|
|
1090
1003
|
}
|
|
1091
1004
|
export async function prepareLocalPluginBundleSource(plugin, options = {}) {
|
|
1092
1005
|
await assertPluginInputTree(plugin.rootDir);
|
|
1093
1006
|
const buildOptions = {
|
|
1094
1007
|
buildMode: options.buildMode ?? 'staging',
|
|
1095
|
-
stagingRunner: options.stagingRunner
|
|
1008
|
+
stagingRunner: options.stagingRunner
|
|
1009
|
+
?? createDefaultStagingRunner(options.commandEnv ?? process.env),
|
|
1010
|
+
commandEnv: options.commandEnv,
|
|
1096
1011
|
runtimeResolver: options.runtimeResolver,
|
|
1097
1012
|
preparedRuntimeContext: undefined,
|
|
1098
1013
|
};
|
|
@@ -1123,11 +1038,105 @@ function assertRequiredCapabilitiesSupported(pluginName, requiredCapabilities) {
|
|
|
1123
1038
|
throw new AwCapabilityUnsupportedError(pluginName, support.missing);
|
|
1124
1039
|
}
|
|
1125
1040
|
}
|
|
1041
|
+
async function computePlatformBundleTree(platformRoot) {
|
|
1042
|
+
if (!(await fs.pathExists(platformRoot))) {
|
|
1043
|
+
return { files: [], digest: crypto.createHash('sha256').update('').digest('hex') };
|
|
1044
|
+
}
|
|
1045
|
+
const files = (await listFilesRecursively(platformRoot)).sort();
|
|
1046
|
+
const records = [];
|
|
1047
|
+
for (const relative of files) {
|
|
1048
|
+
const filePath = path.join(platformRoot, ...relative.split('/'));
|
|
1049
|
+
const stat = await fs.lstat(filePath);
|
|
1050
|
+
const mode = (stat.mode & 0o111) === 0 ? '100644' : '100755';
|
|
1051
|
+
const digest = await calculateFileDigest(filePath);
|
|
1052
|
+
records.push(`${relative}\0${mode}\0${digest}`);
|
|
1053
|
+
}
|
|
1054
|
+
return {
|
|
1055
|
+
files,
|
|
1056
|
+
digest: crypto.createHash('sha256').update(records.join('\n')).digest('hex'),
|
|
1057
|
+
};
|
|
1058
|
+
}
|
|
1059
|
+
function isCanonicalRootEligible(files, manifest) {
|
|
1060
|
+
const mcpRelative = manifest.mcpServers ? stripDotSlash(manifest.mcpServers) : undefined;
|
|
1061
|
+
return files.every((file) => ((Boolean(manifest.skills) && file.startsWith('skills/'))
|
|
1062
|
+
|| (mcpRelative !== undefined && file === mcpRelative)));
|
|
1063
|
+
}
|
|
1064
|
+
async function deduplicateBundlePlatforms(options) {
|
|
1065
|
+
const { outputRoot, plugin, supportedPlatforms, platformManifests } = options;
|
|
1066
|
+
const orderedPlatforms = PLATFORM_TARGETS.filter((platform) => supportedPlatforms.has(platform));
|
|
1067
|
+
const inspected = new Map();
|
|
1068
|
+
const digestCounts = new Map();
|
|
1069
|
+
for (const platform of orderedPlatforms) {
|
|
1070
|
+
const platformRoot = path.join(outputRoot, platform);
|
|
1071
|
+
const { files, digest } = await computePlatformBundleTree(platformRoot);
|
|
1072
|
+
const eligible = isCanonicalRootEligible(files, plugin.manifest);
|
|
1073
|
+
inspected.set(platform, { files, digest, eligible });
|
|
1074
|
+
if (eligible) {
|
|
1075
|
+
digestCounts.set(digest, (digestCounts.get(digest) ?? 0) + 1);
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
let canonicalDigest;
|
|
1079
|
+
let canonicalPlatform;
|
|
1080
|
+
let maxCount = 0;
|
|
1081
|
+
for (const platform of orderedPlatforms) {
|
|
1082
|
+
const entry = inspected.get(platform);
|
|
1083
|
+
if (!entry?.eligible)
|
|
1084
|
+
continue;
|
|
1085
|
+
const count = digestCounts.get(entry.digest) ?? 0;
|
|
1086
|
+
if (count > maxCount) {
|
|
1087
|
+
maxCount = count;
|
|
1088
|
+
canonicalDigest = entry.digest;
|
|
1089
|
+
canonicalPlatform = platform;
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
if (!canonicalPlatform || canonicalDigest === undefined) {
|
|
1093
|
+
return;
|
|
1094
|
+
}
|
|
1095
|
+
const canonicalRoot = path.join(outputRoot, canonicalPlatform);
|
|
1096
|
+
if (plugin.manifest.skills) {
|
|
1097
|
+
const targetSkillsRoot = path.join(outputRoot, 'skills');
|
|
1098
|
+
const sourceSkillsRoot = path.join(canonicalRoot, 'skills');
|
|
1099
|
+
await fs.remove(targetSkillsRoot);
|
|
1100
|
+
if (await fs.pathExists(sourceSkillsRoot)) {
|
|
1101
|
+
await fs.copy(sourceSkillsRoot, targetSkillsRoot, { dereference: false });
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
if (plugin.manifest.mcpServers) {
|
|
1105
|
+
const mcpRelative = stripDotSlash(plugin.manifest.mcpServers);
|
|
1106
|
+
const targetMcpPath = path.join(outputRoot, ...mcpRelative.split('/'));
|
|
1107
|
+
const sourceMcpPath = path.join(canonicalRoot, ...mcpRelative.split('/'));
|
|
1108
|
+
await fs.remove(targetMcpPath);
|
|
1109
|
+
if (await fs.pathExists(sourceMcpPath)) {
|
|
1110
|
+
await fs.ensureDir(path.dirname(targetMcpPath));
|
|
1111
|
+
await fs.copy(sourceMcpPath, targetMcpPath, { dereference: false });
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
for (const platform of orderedPlatforms) {
|
|
1115
|
+
const entry = inspected.get(platform);
|
|
1116
|
+
if (!entry?.eligible || entry.digest !== canonicalDigest)
|
|
1117
|
+
continue;
|
|
1118
|
+
await fs.remove(path.join(outputRoot, platform));
|
|
1119
|
+
if (platform === 'codex' || platform === 'claude') {
|
|
1120
|
+
const manifest = platformManifests[platform];
|
|
1121
|
+
if (!manifest)
|
|
1122
|
+
continue;
|
|
1123
|
+
if (manifest.skills && plugin.manifest.skills) {
|
|
1124
|
+
manifest.skills = plugin.manifest.skills;
|
|
1125
|
+
}
|
|
1126
|
+
if (manifest.mcpServers && plugin.manifest.mcpServers) {
|
|
1127
|
+
manifest.mcpServers = plugin.manifest.mcpServers;
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1126
1132
|
export async function bundleLocalPlugin(plugin, outputRoot, options = {}) {
|
|
1127
1133
|
const historicalComparison = options.runtimeSkillClosureValidation === 'historical';
|
|
1134
|
+
plugin = { ...plugin, manifest: validatePluginManifest(plugin.rootDir, plugin.manifest) };
|
|
1128
1135
|
const buildOptions = {
|
|
1129
1136
|
buildMode: options.buildMode ?? 'build-free',
|
|
1130
|
-
stagingRunner: options.stagingRunner
|
|
1137
|
+
stagingRunner: options.stagingRunner
|
|
1138
|
+
?? createDefaultStagingRunner(options.commandEnv ?? process.env),
|
|
1139
|
+
commandEnv: options.commandEnv,
|
|
1131
1140
|
runtimeResolver: options.runtimeResolver,
|
|
1132
1141
|
preparedRuntimeContext: options.preparedRuntimeContext,
|
|
1133
1142
|
};
|
|
@@ -1144,11 +1153,13 @@ export async function bundleLocalPlugin(plugin, outputRoot, options = {}) {
|
|
|
1144
1153
|
const buildPlugin = await resolveBuildPlugin(plugin, buildOptions);
|
|
1145
1154
|
try {
|
|
1146
1155
|
plugin = buildPlugin.plugin;
|
|
1147
|
-
const requirements =
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1156
|
+
const requirements = buildOptions.buildMode === 'build-free'
|
|
1157
|
+
? sourceRequirements
|
|
1158
|
+
: await resolvePluginRequirements({
|
|
1159
|
+
pluginRoot: plugin.rootDir,
|
|
1160
|
+
manifest: plugin.manifest,
|
|
1161
|
+
implementedCapabilities: IMPLEMENTED_AW_CAPABILITIES,
|
|
1162
|
+
});
|
|
1152
1163
|
if (!historicalComparison) {
|
|
1153
1164
|
assertPluginRequirementsSupported(plugin.manifest.name, requirements, options.strictRequirements ?? false);
|
|
1154
1165
|
}
|
|
@@ -1162,37 +1173,11 @@ export async function bundleLocalPlugin(plugin, outputRoot, options = {}) {
|
|
|
1162
1173
|
resolver: buildPlugin.runtimeContext.resolver,
|
|
1163
1174
|
});
|
|
1164
1175
|
const skillRuntimeFiles = skillRuntimeFileProjections.map(({ provenance }) => provenance);
|
|
1165
|
-
const portableRuntimeFiles = skillRuntimeFiles
|
|
1166
|
-
.filter((entry) => entry.distribution === 'agent-skills')
|
|
1167
|
-
.map((entry) => ({
|
|
1168
|
-
skill: entry.skill,
|
|
1169
|
-
target: entry.target,
|
|
1170
|
-
path: `./agent-skills/skills/${entry.skill}/${entry.target}`,
|
|
1171
|
-
digest: entry.targetDigest,
|
|
1172
|
-
provider: entry.provider,
|
|
1173
|
-
providerVersion: entry.providerVersion,
|
|
1174
|
-
exportName: entry.name,
|
|
1175
|
-
source: entry.source,
|
|
1176
|
-
sourceDigest: entry.sourceDigest,
|
|
1177
|
-
requiredCapabilities: entry.requiredCapabilities,
|
|
1178
|
-
capabilitySetDigest: entry.capabilitySetDigest,
|
|
1179
|
-
}));
|
|
1180
1176
|
const artifactRuntimeProjection = await resolveArtifactRuntimeImports({
|
|
1181
1177
|
plugin,
|
|
1182
1178
|
outputRoot,
|
|
1183
1179
|
resolver: buildPlugin.runtimeContext.resolver,
|
|
1184
1180
|
});
|
|
1185
|
-
const finalEffective = normalizeAwCapabilities([
|
|
1186
|
-
...requirements.effective,
|
|
1187
|
-
...skillRuntimeFiles.flatMap((entry) => entry.requiredCapabilities),
|
|
1188
|
-
...artifactRuntimeProjection.requiredCapabilities,
|
|
1189
|
-
]);
|
|
1190
|
-
if (!historicalComparison) {
|
|
1191
|
-
assertRequiredCapabilitiesSupported(plugin.manifest.name, finalEffective);
|
|
1192
|
-
}
|
|
1193
|
-
artifactRuntimeProjection.manifest.requires = {
|
|
1194
|
-
aw: { capabilities: finalEffective },
|
|
1195
|
-
};
|
|
1196
1181
|
const bundleManifest = artifactRuntimeProjection.manifest;
|
|
1197
1182
|
await fs.ensureDir(outputRoot);
|
|
1198
1183
|
const platformFiles = {};
|
|
@@ -1200,9 +1185,6 @@ export async function bundleLocalPlugin(plugin, outputRoot, options = {}) {
|
|
|
1200
1185
|
const buildConfig = plugin.manifest.buildConfig;
|
|
1201
1186
|
const templatePatterns = buildConfig?.templates?.include ?? [];
|
|
1202
1187
|
const templateVars = buildConfig?.templates?.vars ?? {};
|
|
1203
|
-
const resolvedSlashCommands = await resolveSlashCommands(plugin.rootDir, plugin.manifest, {
|
|
1204
|
-
targetPlatforms: supportedPlatforms,
|
|
1205
|
-
});
|
|
1206
1188
|
for (const platform of PLATFORM_ORDER) {
|
|
1207
1189
|
if (!supportedPlatforms.has(platform)) {
|
|
1208
1190
|
continue;
|
|
@@ -1219,98 +1201,59 @@ export async function bundleLocalPlugin(plugin, outputRoot, options = {}) {
|
|
|
1219
1201
|
manifest.skills = await addDeclaredSkillPathFiles(plugin, platform, plugin.manifest.skills, files);
|
|
1220
1202
|
manifest.mcpServers = await addDeclaredPathFiles(plugin, platform, plugin.manifest.mcpServers, files);
|
|
1221
1203
|
}
|
|
1222
|
-
const
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
const
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
const claudeOverrides = buildConfig?.manifestOverrides?.claude;
|
|
1235
|
-
claudeManifest.outputStyles = await addDeclaredPathFiles(plugin, 'claude', claudeOverrides?.outputStyles, claudeFiles);
|
|
1236
|
-
claudeManifest.lspServers = await addDeclaredLspServerFiles(plugin, claudeOverrides?.lspServers, claudeFiles);
|
|
1237
|
-
claudeManifest.userConfig = claudeOverrides?.userConfig;
|
|
1238
|
-
claudeManifest.channels = claudeOverrides?.channels;
|
|
1239
|
-
const hooksArtifact = renderResolvedHooksArtifact(resolvePlatformHookDefinitions(plugin.manifest, 'claude'), 'claude');
|
|
1240
|
-
if (hooksArtifact) {
|
|
1241
|
-
const hooksPath = path.join(outputRoot, 'claude', 'hooks', 'hooks.json');
|
|
1242
|
-
await writeJsonFile(hooksPath, hooksArtifact.content);
|
|
1243
|
-
claudeManifest.hooks = './claude/hooks/hooks.json';
|
|
1244
|
-
}
|
|
1245
|
-
const claudeAgents = resolvePlatformEntries(plugin.manifest.extensions?.agents, 'claude');
|
|
1246
|
-
if (claudeAgents.length > 0) {
|
|
1247
|
-
claudeManifest.agents = [];
|
|
1248
|
-
for (const agent of claudeAgents) {
|
|
1249
|
-
const generatedName = buildGeneratedName(plugin.manifest.name, agent.name);
|
|
1250
|
-
const relativePath = `./claude/agents/${generatedName}.md`;
|
|
1251
|
-
claudeManifest.agents.push(relativePath);
|
|
1252
|
-
await writeTextFile(path.join(outputRoot, stripDotSlash(relativePath)), renderClaudeAgentContent(agent));
|
|
1253
|
-
}
|
|
1204
|
+
for (const platform of supportedPlatforms) {
|
|
1205
|
+
await fs.ensureDir(path.join(outputRoot, platform));
|
|
1206
|
+
if (platform === 'codex' || platform === 'claude')
|
|
1207
|
+
continue;
|
|
1208
|
+
const files = new Set();
|
|
1209
|
+
platformFiles[platform] = files;
|
|
1210
|
+
if (plugin.manifest.skills)
|
|
1211
|
+
await fs.ensureDir(path.join(outputRoot, platform, 'skills'));
|
|
1212
|
+
await addDeclaredSkillPathFiles(plugin, platform, plugin.manifest.skills, files);
|
|
1213
|
+
if (plugin.manifest.mcpServers) {
|
|
1214
|
+
for (const file of await collectFilesForPath(plugin.rootDir, plugin.manifest.mcpServers))
|
|
1215
|
+
files.add(file);
|
|
1254
1216
|
}
|
|
1255
1217
|
}
|
|
1256
1218
|
const sourceFiles = (await listFilesRecursively(plugin.rootDir)).filter((filePath) => !isDeclaredSkillAuthorOnlyFile(plugin, filePath));
|
|
1257
|
-
|
|
1258
|
-
for (const filePath of applyFileRules(sourceFiles.filter((filePath) => !isDynamicSkillSourceFile(plugin, 'claude', filePath)), buildConfig.fileRules.claude.include, buildConfig.fileRules.claude.exclude)) {
|
|
1259
|
-
if (resolvedSlashCommands &&
|
|
1260
|
-
filePath === stripDotSlash(resolvedSlashCommands.rootRelativePath)) {
|
|
1261
|
-
continue;
|
|
1262
|
-
}
|
|
1263
|
-
if (resolvedSlashCommands &&
|
|
1264
|
-
filePath.startsWith(`${stripDotSlash(resolvedSlashCommands.rootRelativePath)}/`)) {
|
|
1265
|
-
continue;
|
|
1266
|
-
}
|
|
1267
|
-
claudeFiles.add(filePath);
|
|
1268
|
-
}
|
|
1269
|
-
}
|
|
1270
|
-
if (codexFiles && buildConfig?.fileRules?.codex) {
|
|
1271
|
-
for (const filePath of applyFileRules(sourceFiles.filter((filePath) => !isDynamicSkillSourceFile(plugin, 'codex', filePath)), buildConfig.fileRules.codex.include, buildConfig.fileRules.codex.exclude)) {
|
|
1272
|
-
if (resolvedSlashCommands &&
|
|
1273
|
-
filePath === stripDotSlash(resolvedSlashCommands.rootRelativePath)) {
|
|
1274
|
-
continue;
|
|
1275
|
-
}
|
|
1276
|
-
if (resolvedSlashCommands &&
|
|
1277
|
-
filePath.startsWith(`${stripDotSlash(resolvedSlashCommands.rootRelativePath)}/`)) {
|
|
1278
|
-
continue;
|
|
1279
|
-
}
|
|
1280
|
-
codexFiles.add(filePath);
|
|
1281
|
-
}
|
|
1282
|
-
}
|
|
1283
|
-
for (const platform of PLATFORM_ORDER) {
|
|
1219
|
+
for (const platform of supportedPlatforms) {
|
|
1284
1220
|
const files = platformFiles[platform];
|
|
1285
|
-
if (!files)
|
|
1221
|
+
if (!files)
|
|
1286
1222
|
continue;
|
|
1223
|
+
const rules = buildConfig?.fileRules?.[platform];
|
|
1224
|
+
if (rules) {
|
|
1225
|
+
for (const filePath of applyFileRules(sourceFiles, rules.include, rules.exclude)) {
|
|
1226
|
+
files.add(filePath);
|
|
1227
|
+
}
|
|
1228
|
+
for (const filePath of [...files]) {
|
|
1229
|
+
if (applyFileRules([filePath], ['**'], rules.exclude).length === 0)
|
|
1230
|
+
files.delete(filePath);
|
|
1231
|
+
}
|
|
1287
1232
|
}
|
|
1288
1233
|
for (const filePath of files) {
|
|
1289
1234
|
await copyFileWithTemplateSupport(plugin.rootDir, outputRoot, filePath, platform, templatePatterns, templateVars);
|
|
1290
1235
|
}
|
|
1291
1236
|
}
|
|
1292
|
-
if (resolvedSlashCommands) {
|
|
1293
|
-
if (claudeManifest) {
|
|
1294
|
-
claudeManifest.commands = './claude/commands';
|
|
1295
|
-
}
|
|
1296
|
-
if (codexManifest) {
|
|
1297
|
-
codexManifest.skills ??= './codex/skills';
|
|
1298
|
-
}
|
|
1299
|
-
for (const command of resolvedSlashCommands.commands) {
|
|
1300
|
-
if (claudeManifest && command.claude) {
|
|
1301
|
-
await writeTextFile(path.join(outputRoot, 'claude', 'commands', `${command.name}.md`), renderClaudeSlashCommand(command));
|
|
1302
|
-
}
|
|
1303
|
-
if (codexManifest && command.codex) {
|
|
1304
|
-
await writeTextFile(path.join(outputRoot, 'codex', 'skills', command.name, 'SKILL.md'), renderCodexSlashCommandSkillMarkdown(command));
|
|
1305
|
-
await writeTextFile(path.join(outputRoot, 'codex', 'skills', command.name, 'agents', 'openai.yaml'), renderCodexSlashCommandOpenAiYaml(command));
|
|
1306
|
-
for (const asset of command.codex.assets) {
|
|
1307
|
-
await copySlashCommandAsset(plugin.rootDir, outputRoot, command.name, asset.sourceRelativePath, asset.generatedRelativePath);
|
|
1308
|
-
}
|
|
1309
|
-
}
|
|
1310
|
-
}
|
|
1311
|
-
}
|
|
1312
1237
|
await materializeSkillRuntimeFiles(skillRuntimeFileProjections);
|
|
1313
|
-
|
|
1238
|
+
let hasAgentReferences = false;
|
|
1239
|
+
for (const platform of supportedPlatforms) {
|
|
1240
|
+
const references = await scanSkillCollectionAgentReferences(path.join(outputRoot, platform));
|
|
1241
|
+
validateStaticSkillAgentReferences(references, plugin.manifest, [platform]);
|
|
1242
|
+
if (references.size)
|
|
1243
|
+
hasAgentReferences = true;
|
|
1244
|
+
}
|
|
1245
|
+
const finalEffective = normalizeAwCapabilities([
|
|
1246
|
+
...requirements.effective,
|
|
1247
|
+
...(hasAgentReferences ? [SKILL_AGENT_PLACEHOLDER_CAPABILITY] : []),
|
|
1248
|
+
...skillRuntimeFiles.flatMap((entry) => entry.requiredCapabilities),
|
|
1249
|
+
...artifactRuntimeProjection.requiredCapabilities,
|
|
1250
|
+
]);
|
|
1251
|
+
if (!historicalComparison) {
|
|
1252
|
+
assertRequiredCapabilitiesSupported(plugin.manifest.name, finalEffective);
|
|
1253
|
+
}
|
|
1254
|
+
bundleManifest.requires = {
|
|
1255
|
+
aw: { capabilities: finalEffective },
|
|
1256
|
+
};
|
|
1314
1257
|
if (await fs.pathExists(path.join(plugin.rootDir, 'README.md'))) {
|
|
1315
1258
|
await copyBundleRootFile(plugin.rootDir, outputRoot, 'README.md');
|
|
1316
1259
|
}
|
|
@@ -1318,12 +1261,16 @@ export async function bundleLocalPlugin(plugin, outputRoot, options = {}) {
|
|
|
1318
1261
|
await copyBundleRootFile(plugin.rootDir, outputRoot, filePath);
|
|
1319
1262
|
}
|
|
1320
1263
|
await copyArtifactSourceDirectories(plugin, outputRoot);
|
|
1264
|
+
await copyManagedCommandPackage(plugin, outputRoot);
|
|
1321
1265
|
await copyProductionPackageRoot(plugin, outputRoot);
|
|
1322
1266
|
await materializeArtifactRuntimeImports(artifactRuntimeProjection.projections);
|
|
1323
1267
|
await writeJsonFile(path.join(outputRoot, '.agents-plugin', 'plugin.json'), bundleManifest);
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1268
|
+
await deduplicateBundlePlatforms({
|
|
1269
|
+
outputRoot,
|
|
1270
|
+
plugin,
|
|
1271
|
+
supportedPlatforms,
|
|
1272
|
+
platformManifests,
|
|
1273
|
+
});
|
|
1327
1274
|
for (const platform of PLATFORM_ORDER) {
|
|
1328
1275
|
const manifest = platformManifests[platform];
|
|
1329
1276
|
if (!manifest) {
|
|
@@ -1337,21 +1284,40 @@ export async function bundleLocalPlugin(plugin, outputRoot, options = {}) {
|
|
|
1337
1284
|
requiredCapabilities: finalEffective,
|
|
1338
1285
|
});
|
|
1339
1286
|
await validateSkillRuntimeProjectionSources(skillRuntimeFileProjections);
|
|
1340
|
-
await validateSkillRuntimeProjectionFreshness(outputRoot, skillRuntimeFiles
|
|
1287
|
+
await validateSkillRuntimeProjectionFreshness(outputRoot, skillRuntimeFiles);
|
|
1341
1288
|
await validateGeneratedSkillRuntimeFiles(plugin, outputRoot, supportedPlatforms);
|
|
1342
1289
|
if ((options.runtimeSkillClosureValidation ?? 'current') === 'current') {
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1290
|
+
const validatedSkillRoots = new Set();
|
|
1291
|
+
for (const platform of supportedPlatforms) {
|
|
1292
|
+
const resolved = await resolveBundlePlatformRoot(outputRoot, platform, plugin.manifest);
|
|
1293
|
+
const root = resolved.skillsRoot;
|
|
1294
|
+
if (!root)
|
|
1346
1295
|
continue;
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1296
|
+
const requiresPortable = platform !== 'codex' && platform !== 'claude';
|
|
1297
|
+
const rootKey = `${root}:${requiresPortable ? 'portable' : 'native'}`;
|
|
1298
|
+
if (validatedSkillRoots.has(rootKey))
|
|
1299
|
+
continue;
|
|
1300
|
+
validatedSkillRoots.add(rootKey);
|
|
1301
|
+
for (const entry of await fs.readdir(root, { withFileTypes: true }).catch(() => [])) {
|
|
1302
|
+
const skillRoot = path.join(root, entry.name);
|
|
1303
|
+
if (requiresPortable) {
|
|
1304
|
+
await validatePortableSkillDirectory(skillRoot, { frontmatterProfile: 'claude-current' });
|
|
1305
|
+
}
|
|
1306
|
+
await validateRuntimeSkillClosure(skillRoot);
|
|
1307
|
+
}
|
|
1352
1308
|
}
|
|
1353
1309
|
}
|
|
1354
1310
|
await validateBuildImportProjectionSources(preparedBuildImportProjections.get(buildPlugin.runtimeContext) ?? []);
|
|
1311
|
+
// Git must retain the skills root declared by a dynamic-only Native bundle.
|
|
1312
|
+
for (const platform of PLATFORM_ORDER) {
|
|
1313
|
+
const manifest = platformManifests[platform];
|
|
1314
|
+
if (!manifest?.skills)
|
|
1315
|
+
continue;
|
|
1316
|
+
const skillsRoot = path.join(outputRoot, stripDotSlash(manifest.skills));
|
|
1317
|
+
if ((await fs.readdir(skillsRoot)).length === 0) {
|
|
1318
|
+
await fs.writeFile(path.join(skillsRoot, '.gitkeep'), '');
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1355
1321
|
return {
|
|
1356
1322
|
outputRoot,
|
|
1357
1323
|
plugin,
|