@lesliechan721/aw 0.1.0-beta.9 → 0.1.0-beta.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authoring/assets/aw-config.mjs +100 -501
- package/dist/authoring/assets/aw-config.mjs.map +1 -1
- package/dist/authoring/assets/aw-runtime-config.d.mts +13 -0
- package/dist/authoring/assets/aw-runtime-config.mjs +221 -0
- package/dist/authoring/assets/aw-runtime-config.mjs.map +1 -0
- package/dist/authoring/assets/command-runtime-config.d.mts +9 -0
- package/dist/authoring/assets/command-runtime-config.mjs +134 -0
- package/dist/authoring/assets/command-runtime-config.mjs.map +1 -0
- package/dist/authoring/scripts/add-skill.mjs +15 -38
- package/dist/authoring/scripts/add-skill.mjs.map +1 -1
- package/dist/authoring/scripts/init-plugin.mjs +72 -96
- package/dist/authoring/scripts/init-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/lib/plugin-root.mjs +4 -4
- package/dist/authoring/scripts/lib/plugin-root.mjs.map +1 -1
- package/dist/authoring/scripts/lib/plugin-version-check.d.mts +1 -0
- package/dist/authoring/scripts/lib/plugin-version-check.mjs +230 -9
- package/dist/authoring/scripts/lib/plugin-version-check.mjs.map +1 -1
- package/dist/authoring/scripts/lib/skill-scaffold.d.mts +2 -2
- package/dist/authoring/scripts/lib/skill-scaffold.mjs +4 -7
- package/dist/authoring/scripts/lib/skill-scaffold.mjs.map +1 -1
- package/dist/authoring/scripts/remove-plugin.mjs +1 -1
- package/dist/authoring/scripts/remove-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/validate-plugin.mjs +416 -1995
- package/dist/authoring/scripts/validate-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/validate-skill.mjs +1 -1
- package/dist/index.js +2 -6
- package/dist/index.js.map +1 -1
- package/dist/native-runtime/reader-runtime.mjs +34 -0
- package/dist/native-runtime/reader.d.mts +6 -0
- package/dist/native-runtime/reader.mjs +11 -0
- package/dist/scripts/aw-skill-eval-materializer.d.ts +11 -1
- package/dist/scripts/aw-skill-eval-materializer.js +118 -115
- package/dist/scripts/aw-skill-eval-materializer.js.map +1 -1
- package/dist/scripts/bundle-plugins.js +25 -7
- package/dist/scripts/bundle-plugins.js.map +1 -1
- package/dist/scripts/plugin-staging.d.ts +7 -7
- package/dist/scripts/plugin-staging.js +10 -8
- package/dist/scripts/plugin-staging.js.map +1 -1
- package/dist/scripts/plugin-test-reporter.d.mts +2 -0
- package/dist/scripts/plugin-test-reporter.mjs +21 -0
- package/dist/scripts/plugin-test-reporter.mjs.map +1 -0
- package/dist/scripts/test-plugin-scripts.d.ts +5 -0
- package/dist/scripts/test-plugin-scripts.js +284 -78
- package/dist/scripts/test-plugin-scripts.js.map +1 -1
- package/dist/scripts/test-workers.d.mts +24 -0
- package/dist/scripts/test-workers.mjs +59 -0
- package/dist/scripts/test-workers.mjs.map +1 -0
- package/dist/src/adapters/helpers.d.ts +7 -0
- package/dist/src/adapters/helpers.js.map +1 -1
- package/dist/src/authoring/workspace-commands.d.ts +3 -0
- package/dist/src/authoring/workspace-commands.js +7 -2
- package/dist/src/authoring/workspace-commands.js.map +1 -1
- package/dist/src/commands/aw-capabilities.d.ts +1 -1
- package/dist/src/commands/aw-capabilities.js +42 -21
- package/dist/src/commands/aw-capabilities.js.map +1 -1
- package/dist/src/commands/catalog-dev-source.d.ts +42 -3
- package/dist/src/commands/catalog-dev-source.js +351 -43
- package/dist/src/commands/catalog-dev-source.js.map +1 -1
- package/dist/src/commands/catalog-generation.d.ts +8 -0
- package/dist/src/commands/catalog-generation.js +1 -5
- package/dist/src/commands/catalog-generation.js.map +1 -1
- package/dist/src/commands/catalog-publication-inspection.d.ts +42 -3
- package/dist/src/commands/catalog-publication-inspection.js +379 -48
- package/dist/src/commands/catalog-publication-inspection.js.map +1 -1
- package/dist/src/commands/catalog-publication-journal.d.ts +23 -4
- package/dist/src/commands/catalog-publication-journal.js +165 -20
- package/dist/src/commands/catalog-publication-journal.js.map +1 -1
- package/dist/src/commands/catalog-publish.d.ts +34 -3
- package/dist/src/commands/catalog-publish.js +311 -165
- package/dist/src/commands/catalog-publish.js.map +1 -1
- package/dist/src/commands/catalog-source.d.ts +54 -8
- package/dist/src/commands/catalog-source.js +277 -15
- package/dist/src/commands/catalog-source.js.map +1 -1
- package/dist/src/commands/catalog-status.js +2 -2
- package/dist/src/commands/catalog-status.js.map +1 -1
- package/dist/src/commands/catalog-store.d.ts +104 -0
- package/dist/src/commands/catalog-store.js +685 -0
- package/dist/src/commands/catalog-store.js.map +1 -0
- package/dist/src/commands/catalog-workspace-resolution.d.ts +4 -0
- package/dist/src/commands/catalog-workspace-resolution.js +18 -3
- package/dist/src/commands/catalog-workspace-resolution.js.map +1 -1
- package/dist/src/commands/console.js +33 -20
- package/dist/src/commands/console.js.map +1 -1
- package/dist/src/commands/dependency-operation-plan.d.ts +14 -56
- package/dist/src/commands/dependency-operation-plan.js +90 -133
- package/dist/src/commands/dependency-operation-plan.js.map +1 -1
- package/dist/src/commands/deployment-confirmation.d.ts +11 -0
- package/dist/src/commands/deployment-confirmation.js +88 -0
- package/dist/src/commands/deployment-confirmation.js.map +1 -0
- package/dist/src/commands/init.js +1 -1
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/intent-command.d.ts +34 -0
- package/dist/src/commands/intent-command.js +174 -0
- package/dist/src/commands/intent-command.js.map +1 -0
- package/dist/src/commands/lifecycle-command-package.d.ts +45 -0
- package/dist/src/commands/lifecycle-command-package.js +199 -0
- package/dist/src/commands/lifecycle-command-package.js.map +1 -0
- package/dist/src/commands/managed-commands.d.ts +41 -0
- package/dist/src/commands/managed-commands.js +404 -0
- package/dist/src/commands/managed-commands.js.map +1 -0
- package/dist/src/commands/offline-cleanup-evidence.d.ts +29 -3
- package/dist/src/commands/offline-cleanup-evidence.js +80 -10
- package/dist/src/commands/offline-cleanup-evidence.js.map +1 -1
- package/dist/src/commands/operation-plan.d.ts +191 -0
- package/dist/src/commands/operation-plan.js +96 -0
- package/dist/src/commands/operation-plan.js.map +1 -0
- package/dist/src/commands/operation-planner.d.ts +47 -0
- package/dist/src/commands/operation-planner.js +142 -0
- package/dist/src/commands/operation-planner.js.map +1 -0
- package/dist/src/commands/options.d.ts +11 -20
- package/dist/src/commands/options.js +31 -36
- package/dist/src/commands/options.js.map +1 -1
- package/dist/src/commands/permission-batch.d.ts +5 -0
- package/dist/src/commands/permission-batch.js +80 -0
- package/dist/src/commands/permission-batch.js.map +1 -0
- package/dist/src/commands/plugin-capabilities.js +96 -46
- package/dist/src/commands/plugin-capabilities.js.map +1 -1
- package/dist/src/commands/public-config-confirmation.d.ts +14 -0
- package/dist/src/commands/public-config-confirmation.js +73 -0
- package/dist/src/commands/public-config-confirmation.js.map +1 -0
- package/dist/src/commands/public-interruption.d.ts +9 -0
- package/dist/src/commands/public-interruption.js +23 -0
- package/dist/src/commands/public-interruption.js.map +1 -0
- package/dist/src/commands/public-lifecycle-result.d.ts +106 -0
- package/dist/src/commands/public-lifecycle-result.js +518 -0
- package/dist/src/commands/public-lifecycle-result.js.map +1 -0
- package/dist/src/commands/public-lifecycle.d.ts +27 -0
- package/dist/src/commands/public-lifecycle.js +563 -0
- package/dist/src/commands/public-lifecycle.js.map +1 -0
- package/dist/src/commands/public-plugin-query.d.ts +16 -0
- package/dist/src/commands/public-plugin-query.js +230 -0
- package/dist/src/commands/public-plugin-query.js.map +1 -0
- package/dist/src/commands/rebuild-command.d.ts +176 -25
- package/dist/src/commands/rebuild-command.js +3989 -1392
- package/dist/src/commands/rebuild-command.js.map +1 -1
- package/dist/src/commands/rebuild-integration.d.ts +133 -52
- package/dist/src/commands/rebuild-integration.js +1097 -2692
- package/dist/src/commands/rebuild-integration.js.map +1 -1
- package/dist/src/commands/rebuild-operations.d.ts +74 -23
- package/dist/src/commands/rebuild-operations.js +334 -227
- package/dist/src/commands/rebuild-operations.js.map +1 -1
- package/dist/src/commands/rebuild-platform-integration.d.ts +81 -0
- package/dist/src/commands/rebuild-platform-integration.js +1992 -0
- package/dist/src/commands/rebuild-platform-integration.js.map +1 -0
- package/dist/src/commands/reconcile-operation-plan.d.ts +31 -0
- package/dist/src/commands/reconcile-operation-plan.js +48 -0
- package/dist/src/commands/reconcile-operation-plan.js.map +1 -0
- package/dist/src/commands/review-inspection.d.ts +60 -0
- package/dist/src/commands/review-inspection.js +436 -0
- package/dist/src/commands/review-inspection.js.map +1 -0
- package/dist/src/commands/review-preparation.d.ts +51 -0
- package/dist/src/commands/review-preparation.js +400 -0
- package/dist/src/commands/review-preparation.js.map +1 -0
- package/dist/src/commands/runtime.d.ts +6 -6
- package/dist/src/commands/runtime.js +44 -24
- package/dist/src/commands/runtime.js.map +1 -1
- package/dist/src/commands/skill-eval.d.ts +8 -0
- package/dist/src/commands/skill-eval.js +126 -73
- package/dist/src/commands/skill-eval.js.map +1 -1
- package/dist/src/commands/status-v6.d.ts +185 -68
- package/dist/src/commands/status-v6.js +1592 -499
- package/dist/src/commands/status-v6.js.map +1 -1
- package/dist/src/commands/targets-command.d.ts +38 -0
- package/dist/src/commands/targets-command.js +182 -0
- package/dist/src/commands/targets-command.js.map +1 -0
- package/dist/src/commands/wizard.d.ts +8 -5
- package/dist/src/commands/wizard.js +7 -4
- package/dist/src/commands/wizard.js.map +1 -1
- package/dist/src/commands/write-commands.d.ts +9 -3
- package/dist/src/commands/write-commands.js +144 -44
- package/dist/src/commands/write-commands.js.map +1 -1
- package/dist/src/constants.d.ts +2 -3
- package/dist/src/constants.js +2 -3
- package/dist/src/constants.js.map +1 -1
- package/dist/src/eval/manifest-v1.d.ts +6 -2
- package/dist/src/eval/manifest-v1.js +58 -26
- package/dist/src/eval/manifest-v1.js.map +1 -1
- package/dist/src/generators/local-plugin.d.ts +4 -2
- package/dist/src/generators/local-plugin.js +207 -346
- package/dist/src/generators/local-plugin.js.map +1 -1
- package/dist/src/generators/permissions.d.ts +20 -2
- package/dist/src/generators/permissions.js +82 -15
- package/dist/src/generators/permissions.js.map +1 -1
- package/dist/src/index.d.ts +3 -33
- package/dist/src/index.js +1786 -1945
- package/dist/src/index.js.map +1 -1
- package/dist/src/intent/deployment-preferences.d.ts +63 -0
- package/dist/src/intent/deployment-preferences.js +170 -0
- package/dist/src/intent/deployment-preferences.js.map +1 -0
- package/dist/src/intent/diagnostics.d.ts +11 -0
- package/dist/src/intent/diagnostics.js +14 -0
- package/dist/src/intent/diagnostics.js.map +1 -0
- package/dist/src/intent/intent-codec.d.ts +19 -0
- package/dist/src/intent/intent-codec.js +117 -0
- package/dist/src/intent/intent-codec.js.map +1 -0
- package/dist/src/intent/intent-store.d.ts +43 -0
- package/dist/src/intent/intent-store.js +118 -0
- package/dist/src/intent/intent-store.js.map +1 -0
- package/dist/src/intent/scope-context.d.ts +35 -0
- package/dist/src/intent/scope-context.js +179 -0
- package/dist/src/intent/scope-context.js.map +1 -0
- package/dist/src/intent/work-context.d.ts +13 -0
- package/dist/src/intent/work-context.js +22 -0
- package/dist/src/intent/work-context.js.map +1 -0
- package/dist/src/output/command-receipt.d.ts +37 -86
- package/dist/src/output/command-receipt.js +257 -179
- package/dist/src/output/command-receipt.js.map +1 -1
- package/dist/src/output/component-delivery.d.ts +28 -0
- package/dist/src/output/component-delivery.js +138 -0
- package/dist/src/output/component-delivery.js.map +1 -0
- package/dist/src/output/public-result.d.ts +69 -0
- package/dist/src/output/public-result.js +403 -0
- package/dist/src/output/public-result.js.map +1 -0
- package/dist/src/output/rebuild-progress.d.ts +3 -0
- package/dist/src/output/rebuild-progress.js +34 -16
- package/dist/src/output/rebuild-progress.js.map +1 -1
- package/dist/src/output/receipt-projection.d.ts +7 -0
- package/dist/src/output/receipt-projection.js +664 -0
- package/dist/src/output/receipt-projection.js.map +1 -0
- package/dist/src/output/skill-invocation-notices.d.ts +18 -0
- package/dist/src/output/skill-invocation-notices.js +84 -0
- package/dist/src/output/skill-invocation-notices.js.map +1 -0
- package/dist/src/platforms/antigravity-permissions.d.ts +50 -0
- package/dist/src/platforms/antigravity-permissions.js +388 -0
- package/dist/src/platforms/antigravity-permissions.js.map +1 -0
- package/dist/src/platforms/capabilities.d.ts +17 -0
- package/dist/src/platforms/capabilities.js +328 -0
- package/dist/src/platforms/capabilities.js.map +1 -0
- package/dist/src/platforms/contracts.d.ts +402 -0
- package/dist/src/platforms/contracts.js +2 -0
- package/dist/src/platforms/contracts.js.map +1 -0
- package/dist/src/platforms/cursor-workspace-hook.d.ts +28 -0
- package/dist/src/platforms/cursor-workspace-hook.js +198 -0
- package/dist/src/platforms/cursor-workspace-hook.js.map +1 -0
- package/dist/src/platforms/discovery.d.ts +98 -0
- package/dist/src/platforms/discovery.js +777 -0
- package/dist/src/platforms/discovery.js.map +1 -0
- package/dist/src/platforms/grok-permission-config.d.ts +23 -0
- package/dist/src/platforms/grok-permission-config.js +184 -0
- package/dist/src/platforms/grok-permission-config.js.map +1 -0
- package/dist/src/platforms/grok-permission-document.d.ts +4 -0
- package/dist/src/platforms/grok-permission-document.js +145 -0
- package/dist/src/platforms/grok-permission-document.js.map +1 -0
- package/dist/src/platforms/grok-permissions.d.ts +17 -0
- package/dist/src/platforms/grok-permissions.js +311 -0
- package/dist/src/platforms/grok-permissions.js.map +1 -0
- package/dist/src/platforms/host-permission-policy.d.ts +38 -0
- package/dist/src/platforms/host-permission-policy.js +86 -0
- package/dist/src/platforms/host-permission-policy.js.map +1 -0
- package/dist/src/platforms/identity.d.ts +4 -0
- package/dist/src/platforms/identity.js +22 -0
- package/dist/src/platforms/identity.js.map +1 -0
- package/dist/src/platforms/inspection-grok.d.ts +4 -0
- package/dist/src/platforms/inspection-grok.js +366 -0
- package/dist/src/platforms/inspection-grok.js.map +1 -0
- package/dist/src/platforms/inspection-native.d.ts +6 -0
- package/dist/src/platforms/inspection-native.js +373 -0
- package/dist/src/platforms/inspection-native.js.map +1 -0
- package/dist/src/platforms/inspection-opencode.d.ts +4 -0
- package/dist/src/platforms/inspection-opencode.js +98 -0
- package/dist/src/platforms/inspection-opencode.js.map +1 -0
- package/dist/src/platforms/inspection-pi.d.ts +9 -0
- package/dist/src/platforms/inspection-pi.js +482 -0
- package/dist/src/platforms/inspection-pi.js.map +1 -0
- package/dist/src/platforms/inspection-query.d.ts +24 -0
- package/dist/src/platforms/inspection-query.js +119 -0
- package/dist/src/platforms/inspection-query.js.map +1 -0
- package/dist/src/platforms/inspection.d.ts +20 -0
- package/dist/src/platforms/inspection.js +259 -0
- package/dist/src/platforms/inspection.js.map +1 -0
- package/dist/src/platforms/layout.d.ts +35 -0
- package/dist/src/platforms/layout.js +317 -0
- package/dist/src/platforms/layout.js.map +1 -0
- package/dist/src/platforms/lifecycle-native-services.d.ts +3 -0
- package/dist/src/platforms/lifecycle-native-services.js +147 -0
- package/dist/src/platforms/lifecycle-native-services.js.map +1 -0
- package/dist/src/platforms/lifecycle-native.d.ts +14 -0
- package/dist/src/platforms/lifecycle-native.js +223 -0
- package/dist/src/platforms/lifecycle-native.js.map +1 -0
- package/dist/src/platforms/lifecycle.d.ts +27 -0
- package/dist/src/platforms/lifecycle.js +567 -0
- package/dist/src/platforms/lifecycle.js.map +1 -0
- package/dist/src/platforms/opencode-permission-config.d.ts +13 -0
- package/dist/src/platforms/opencode-permission-config.js +253 -0
- package/dist/src/platforms/opencode-permission-config.js.map +1 -0
- package/dist/src/platforms/opencode-permissions.d.ts +39 -0
- package/dist/src/platforms/opencode-permissions.js +212 -0
- package/dist/src/platforms/opencode-permissions.js.map +1 -0
- package/dist/src/platforms/opencode-related-permissions.d.ts +40 -0
- package/dist/src/platforms/opencode-related-permissions.js +177 -0
- package/dist/src/platforms/opencode-related-permissions.js.map +1 -0
- package/dist/src/platforms/permission-ownership.d.ts +89 -0
- package/dist/src/platforms/permission-ownership.js +543 -0
- package/dist/src/platforms/permission-ownership.js.map +1 -0
- package/dist/src/platforms/permission-sidecar.d.ts +70 -0
- package/dist/src/platforms/permission-sidecar.js +215 -0
- package/dist/src/platforms/permission-sidecar.js.map +1 -0
- package/dist/src/platforms/projection-code-extension.d.ts +8 -0
- package/dist/src/platforms/projection-code-extension.js +126 -0
- package/dist/src/platforms/projection-code-extension.js.map +1 -0
- package/dist/src/platforms/projection-command-resources.d.ts +7 -0
- package/dist/src/platforms/projection-command-resources.js +74 -0
- package/dist/src/platforms/projection-command-resources.js.map +1 -0
- package/dist/src/platforms/projection-files.d.ts +27 -0
- package/dist/src/platforms/projection-files.js +111 -0
- package/dist/src/platforms/projection-files.js.map +1 -0
- package/dist/src/platforms/projection-marketplace.d.ts +19 -0
- package/dist/src/platforms/projection-marketplace.js +42 -0
- package/dist/src/platforms/projection-marketplace.js.map +1 -0
- package/dist/src/platforms/projection.d.ts +13 -0
- package/dist/src/platforms/projection.js +576 -0
- package/dist/src/platforms/projection.js.map +1 -0
- package/dist/src/platforms/registry.d.ts +4 -0
- package/dist/src/platforms/registry.js +30 -0
- package/dist/src/platforms/registry.js.map +1 -0
- package/dist/src/platforms/supplement-layout.d.ts +20 -0
- package/dist/src/platforms/supplement-layout.js +53 -0
- package/dist/src/platforms/supplement-layout.js.map +1 -0
- package/dist/src/platforms/supplement-state.d.ts +13 -0
- package/dist/src/platforms/supplement-state.js +93 -0
- package/dist/src/platforms/supplement-state.js.map +1 -0
- package/dist/src/portable/commands.d.ts +58 -11
- package/dist/src/portable/commands.js +99 -345
- package/dist/src/portable/commands.js.map +1 -1
- package/dist/src/portable/historical-materialization.d.ts +22 -0
- package/dist/src/portable/historical-materialization.js +124 -0
- package/dist/src/portable/historical-materialization.js.map +1 -0
- package/dist/src/portable/materializer.d.ts +29 -1
- package/dist/src/portable/materializer.js +197 -258
- package/dist/src/portable/materializer.js.map +1 -1
- package/dist/src/portable/recovery-layout.d.ts +17 -0
- package/dist/src/portable/recovery-layout.js +42 -0
- package/dist/src/portable/recovery-layout.js.map +1 -0
- package/dist/src/portable/recovery.d.ts +176 -0
- package/dist/src/portable/recovery.js +556 -0
- package/dist/src/portable/recovery.js.map +1 -0
- package/dist/src/portable/writer.d.ts +67 -0
- package/dist/src/portable/writer.js +321 -0
- package/dist/src/portable/writer.js.map +1 -0
- package/dist/src/recovery/coordinator.d.ts +168 -0
- package/dist/src/recovery/coordinator.js +1558 -0
- package/dist/src/recovery/coordinator.js.map +1 -0
- package/dist/src/recovery/demand.d.ts +53 -0
- package/dist/src/recovery/demand.js +189 -0
- package/dist/src/recovery/demand.js.map +1 -0
- package/dist/src/recovery/install-concurrency.d.ts +48 -0
- package/dist/src/recovery/install-concurrency.js +196 -0
- package/dist/src/recovery/install-concurrency.js.map +1 -0
- package/dist/src/recovery/interruption.d.ts +19 -0
- package/dist/src/recovery/interruption.js +43 -0
- package/dist/src/recovery/interruption.js.map +1 -0
- package/dist/src/recovery/joint-coordinator.d.ts +46 -0
- package/dist/src/recovery/joint-coordinator.js +1641 -0
- package/dist/src/recovery/joint-coordinator.js.map +1 -0
- package/dist/src/recovery/joint-demand.d.ts +72 -0
- package/dist/src/recovery/joint-demand.js +332 -0
- package/dist/src/recovery/joint-demand.js.map +1 -0
- package/dist/src/recovery/joint-install-execution.d.ts +19 -0
- package/dist/src/recovery/joint-install-execution.js +308 -0
- package/dist/src/recovery/joint-install-execution.js.map +1 -0
- package/dist/src/recovery/joint-install-native-rebase.d.ts +4 -0
- package/dist/src/recovery/joint-install-native-rebase.js +67 -0
- package/dist/src/recovery/joint-install-native-rebase.js.map +1 -0
- package/dist/src/recovery/performance.d.ts +4 -0
- package/dist/src/recovery/performance.js +26 -0
- package/dist/src/recovery/performance.js.map +1 -0
- package/dist/src/recovery/receipt.d.ts +129 -0
- package/dist/src/recovery/receipt.js +91 -0
- package/dist/src/recovery/receipt.js.map +1 -0
- package/dist/src/recovery/retirement.d.ts +47 -0
- package/dist/src/recovery/retirement.js +463 -0
- package/dist/src/recovery/retirement.js.map +1 -0
- package/dist/src/recovery/status.d.ts +143 -0
- package/dist/src/recovery/status.js +1517 -0
- package/dist/src/recovery/status.js.map +1 -0
- package/dist/src/recovery/types.d.ts +85 -0
- package/dist/src/recovery/types.js +2 -0
- package/dist/src/recovery/types.js.map +1 -0
- package/dist/src/review/eval-source-input.d.ts +44 -0
- package/dist/src/review/eval-source-input.js +213 -0
- package/dist/src/review/eval-source-input.js.map +1 -0
- package/dist/src/review/platform-profile.d.ts +6 -0
- package/dist/src/review/platform-profile.js +24 -0
- package/dist/src/review/platform-profile.js.map +1 -0
- package/dist/src/review/review-profile.d.ts +20 -0
- package/dist/src/review/review-profile.js +276 -0
- package/dist/src/review/review-profile.js.map +1 -0
- package/dist/src/review/review-selection.d.ts +20 -0
- package/dist/src/review/review-selection.js +502 -0
- package/dist/src/review/review-selection.js.map +1 -0
- package/dist/src/review/review-types.d.ts +71 -0
- package/dist/src/review/review-types.js +16 -0
- package/dist/src/review/review-types.js.map +1 -0
- package/dist/src/review/skill-materialization.d.ts +65 -0
- package/dist/src/review/skill-materialization.js +228 -0
- package/dist/src/review/skill-materialization.js.map +1 -0
- package/dist/src/review/source-binding.d.ts +201 -0
- package/dist/src/review/source-binding.js +782 -0
- package/dist/src/review/source-binding.js.map +1 -0
- package/dist/src/tui/agent-management.d.ts +23 -0
- package/dist/src/tui/agent-management.js +319 -0
- package/dist/src/tui/agent-management.js.map +1 -0
- package/dist/src/tui/agent-settings.d.ts +47 -0
- package/dist/src/tui/agent-settings.js +97 -0
- package/dist/src/tui/agent-settings.js.map +1 -0
- package/dist/src/tui/catalog-freshness.d.ts +1 -0
- package/dist/src/tui/catalog-freshness.js +2 -0
- package/dist/src/tui/catalog-freshness.js.map +1 -0
- package/dist/src/tui/catalog-generation.d.ts +8 -16
- package/dist/src/tui/catalog-generation.js +97 -10
- package/dist/src/tui/catalog-generation.js.map +1 -1
- package/dist/src/tui/catalog-sources/projection.d.ts +4 -0
- package/dist/src/tui/catalog-sources/projection.js +17 -0
- package/dist/src/tui/catalog-sources/projection.js.map +1 -0
- package/dist/src/tui/catalog-sources/review.d.ts +3 -0
- package/dist/src/tui/catalog-sources/review.js +13 -0
- package/dist/src/tui/catalog-sources/review.js.map +1 -0
- package/dist/src/tui/catalog-sources/screens.d.ts +12 -0
- package/dist/src/tui/catalog-sources/screens.js +40 -0
- package/dist/src/tui/catalog-sources/screens.js.map +1 -0
- package/dist/src/tui/catalog-sources/session.d.ts +32 -0
- package/dist/src/tui/catalog-sources/session.js +300 -0
- package/dist/src/tui/catalog-sources/session.js.map +1 -0
- package/dist/src/tui/catalog-sources/types.d.ts +54 -0
- package/dist/src/tui/catalog-sources/types.js +2 -0
- package/dist/src/tui/catalog-sources/types.js.map +1 -0
- package/dist/src/tui/catalog-store-task.d.ts +16 -0
- package/dist/src/tui/catalog-store-task.js +19 -0
- package/dist/src/tui/catalog-store-task.js.map +1 -0
- package/dist/src/tui/clipboard.d.ts +13 -0
- package/dist/src/tui/clipboard.js +95 -0
- package/dist/src/tui/clipboard.js.map +1 -0
- package/dist/src/tui/components.d.ts +113 -3
- package/dist/src/tui/components.js +201 -34
- package/dist/src/tui/components.js.map +1 -1
- package/dist/src/tui/config-array-draft.d.ts +30 -0
- package/dist/src/tui/config-array-draft.js +51 -0
- package/dist/src/tui/config-array-draft.js.map +1 -0
- package/dist/src/tui/config-leaf-editor.d.ts +44 -0
- package/dist/src/tui/config-leaf-editor.js +227 -0
- package/dist/src/tui/config-leaf-editor.js.map +1 -0
- package/dist/src/tui/config-object-suggestions.d.ts +15 -0
- package/dist/src/tui/config-object-suggestions.js +71 -0
- package/dist/src/tui/config-object-suggestions.js.map +1 -0
- package/dist/src/tui/config-references.d.ts +38 -0
- package/dist/src/tui/config-references.js +82 -0
- package/dist/src/tui/config-references.js.map +1 -0
- package/dist/src/tui/config-suggestions.d.ts +27 -0
- package/dist/src/tui/config-suggestions.js +62 -0
- package/dist/src/tui/config-suggestions.js.map +1 -0
- package/dist/src/tui/config-value-presentation.d.ts +21 -0
- package/dist/src/tui/config-value-presentation.js +129 -0
- package/dist/src/tui/config-value-presentation.js.map +1 -0
- package/dist/src/tui/console-app-v4.d.ts +14 -5
- package/dist/src/tui/console-app-v4.js +10344 -2133
- package/dist/src/tui/console-app-v4.js.map +1 -1
- package/dist/src/tui/content-item-card.d.ts +13 -0
- package/dist/src/tui/content-item-card.js +51 -0
- package/dist/src/tui/content-item-card.js.map +1 -0
- package/dist/src/tui/controller-runtime.d.ts +8 -3
- package/dist/src/tui/controller-runtime.js +2301 -842
- package/dist/src/tui/controller-runtime.js.map +1 -1
- package/dist/src/tui/controller.d.ts +664 -79
- package/dist/src/tui/controller.js +3670 -830
- package/dist/src/tui/controller.js.map +1 -1
- package/dist/src/tui/dependency-graph-view.d.ts +39 -0
- package/dist/src/tui/dependency-graph-view.js +121 -0
- package/dist/src/tui/dependency-graph-view.js.map +1 -0
- package/dist/src/tui/dependency-graph.d.ts +81 -0
- package/dist/src/tui/dependency-graph.js +452 -0
- package/dist/src/tui/dependency-graph.js.map +1 -0
- package/dist/src/tui/deployment-view.d.ts +13 -0
- package/dist/src/tui/deployment-view.js +155 -0
- package/dist/src/tui/deployment-view.js.map +1 -0
- package/dist/src/tui/diagnostic-projection.d.ts +31 -0
- package/dist/src/tui/diagnostic-projection.js +681 -0
- package/dist/src/tui/diagnostic-projection.js.map +1 -0
- package/dist/src/tui/diagnostics.d.ts +6 -2
- package/dist/src/tui/diagnostics.js +14 -2
- package/dist/src/tui/diagnostics.js.map +1 -1
- package/dist/src/tui/entity-cards.d.ts +56 -0
- package/dist/src/tui/entity-cards.js +321 -0
- package/dist/src/tui/entity-cards.js.map +1 -0
- package/dist/src/tui/glossary.d.ts +25 -0
- package/dist/src/tui/glossary.js +78 -0
- package/dist/src/tui/glossary.js.map +1 -0
- package/dist/src/tui/guided-setup.d.ts +25 -0
- package/dist/src/tui/guided-setup.js +101 -0
- package/dist/src/tui/guided-setup.js.map +1 -0
- package/dist/src/tui/index.d.ts +5 -1
- package/dist/src/tui/index.js +4 -1
- package/dist/src/tui/index.js.map +1 -1
- package/dist/src/tui/input-display.d.ts +1 -0
- package/dist/src/tui/input-display.js +23 -1
- package/dist/src/tui/input-display.js.map +1 -1
- package/dist/src/tui/keys.d.ts +44 -0
- package/dist/src/tui/keys.js +43 -15
- package/dist/src/tui/keys.js.map +1 -1
- package/dist/src/tui/lifecycle-action-view.d.ts +6 -0
- package/dist/src/tui/lifecycle-action-view.js +36 -0
- package/dist/src/tui/lifecycle-action-view.js.map +1 -0
- package/dist/src/tui/model.d.ts +187 -52
- package/dist/src/tui/model.js +1202 -426
- package/dist/src/tui/model.js.map +1 -1
- package/dist/src/tui/operation-diagnostic-screens.d.ts +8 -0
- package/dist/src/tui/operation-diagnostic-screens.js +76 -0
- package/dist/src/tui/operation-diagnostic-screens.js.map +1 -0
- package/dist/src/tui/operation-history.d.ts +91 -0
- package/dist/src/tui/operation-history.js +167 -0
- package/dist/src/tui/operation-history.js.map +1 -0
- package/dist/src/tui/operation-review-planner.d.ts +28 -0
- package/dist/src/tui/operation-review-planner.js +1456 -0
- package/dist/src/tui/operation-review-planner.js.map +1 -0
- package/dist/src/tui/plugin-content.d.ts +33 -0
- package/dist/src/tui/plugin-content.js +245 -0
- package/dist/src/tui/plugin-content.js.map +1 -0
- package/dist/src/tui/plugin-detail.d.ts +75 -0
- package/dist/src/tui/plugin-detail.js +267 -0
- package/dist/src/tui/plugin-detail.js.map +1 -0
- package/dist/src/tui/plugin-write-task.d.ts +69 -0
- package/dist/src/tui/plugin-write-task.js +286 -0
- package/dist/src/tui/plugin-write-task.js.map +1 -0
- package/dist/src/tui/prompt.js +4 -15
- package/dist/src/tui/prompt.js.map +1 -1
- package/dist/src/tui/query-header.d.ts +30 -0
- package/dist/src/tui/query-header.js +40 -0
- package/dist/src/tui/query-header.js.map +1 -0
- package/dist/src/tui/reader.d.ts +38 -0
- package/dist/src/tui/reader.js +49 -0
- package/dist/src/tui/reader.js.map +1 -0
- package/dist/src/tui/router.d.ts +182 -39
- package/dist/src/tui/router.js +338 -50
- package/dist/src/tui/router.js.map +1 -1
- package/dist/src/tui/scoped-flow.d.ts +49 -0
- package/dist/src/tui/scoped-flow.js +212 -0
- package/dist/src/tui/scoped-flow.js.map +1 -0
- package/dist/src/tui/scoped-inventory.d.ts +131 -0
- package/dist/src/tui/scoped-inventory.js +280 -0
- package/dist/src/tui/scoped-inventory.js.map +1 -0
- package/dist/src/tui/screen-registry.d.ts +696 -0
- package/dist/src/tui/screen-registry.js +226 -0
- package/dist/src/tui/screen-registry.js.map +1 -0
- package/dist/src/tui/session-console-app.d.ts +8 -0
- package/dist/src/tui/session-console-app.js +24 -0
- package/dist/src/tui/session-console-app.js.map +1 -0
- package/dist/src/tui/session-host.d.ts +45 -0
- package/dist/src/tui/session-host.js +219 -0
- package/dist/src/tui/session-host.js.map +1 -0
- package/dist/src/tui/source-detail-card.d.ts +29 -0
- package/dist/src/tui/source-detail-card.js +45 -0
- package/dist/src/tui/source-detail-card.js.map +1 -0
- package/dist/src/tui/theme.d.ts +12 -0
- package/dist/src/tui/theme.js +12 -0
- package/dist/src/tui/theme.js.map +1 -1
- package/dist/src/tui/viewport.d.ts +1 -0
- package/dist/src/tui/viewport.js +23 -0
- package/dist/src/tui/viewport.js.map +1 -1
- package/dist/src/tui/wizard.js +37 -13
- package/dist/src/tui/wizard.js.map +1 -1
- package/dist/src/types.d.ts +177 -85
- package/dist/src/types.js +1 -0
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils/agent-version.d.ts +10 -4
- package/dist/src/utils/agent-version.js +6 -8
- package/dist/src/utils/agent-version.js.map +1 -1
- package/dist/src/utils/artifact-plan.d.ts +17 -24
- package/dist/src/utils/artifact-plan.js +59 -436
- package/dist/src/utils/artifact-plan.js.map +1 -1
- package/dist/src/utils/artifact-renderer.d.ts +61 -89
- package/dist/src/utils/artifact-renderer.js +187 -364
- package/dist/src/utils/artifact-renderer.js.map +1 -1
- package/dist/src/utils/artifact-request.d.ts +21 -0
- package/dist/src/utils/artifact-request.js +57 -0
- package/dist/src/utils/artifact-request.js.map +1 -0
- package/dist/src/utils/artifact-sources.d.ts +4 -8
- package/dist/src/utils/artifact-sources.js +15 -6
- package/dist/src/utils/artifact-sources.js.map +1 -1
- package/dist/src/utils/aw-home-mutation-lock.js +2 -1
- package/dist/src/utils/aw-home-mutation-lock.js.map +1 -1
- package/dist/src/utils/bundle-layout.js +59 -173
- package/dist/src/utils/bundle-layout.js.map +1 -1
- package/dist/src/utils/catalog-capability-projection.d.ts +8 -0
- package/dist/src/utils/catalog-capability-projection.js +14 -0
- package/dist/src/utils/catalog-capability-projection.js.map +1 -0
- package/dist/src/utils/catalog-digests.d.ts +2 -9
- package/dist/src/utils/catalog-digests.js +7 -45
- package/dist/src/utils/catalog-digests.js.map +1 -1
- package/dist/src/utils/catalog-generation-error.d.ts +4 -1
- package/dist/src/utils/catalog-generation-error.js +2 -0
- package/dist/src/utils/catalog-generation-error.js.map +1 -1
- package/dist/src/utils/catalog-generation-resolver.d.ts +32 -3
- package/dist/src/utils/catalog-generation-resolver.js +182 -40
- package/dist/src/utils/catalog-generation-resolver.js.map +1 -1
- package/dist/src/utils/catalog-generation-service.d.ts +142 -2
- package/dist/src/utils/catalog-generation-service.js +1146 -171
- package/dist/src/utils/catalog-generation-service.js.map +1 -1
- package/dist/src/utils/catalog-generation-state.d.ts +5 -0
- package/dist/src/utils/catalog-generation-state.js +25 -1
- package/dist/src/utils/catalog-generation-state.js.map +1 -1
- package/dist/src/utils/catalog-generation-store.d.ts +29 -2
- package/dist/src/utils/catalog-generation-store.js +240 -36
- package/dist/src/utils/catalog-generation-store.js.map +1 -1
- package/dist/src/utils/catalog-manifest-v7.d.ts +5 -0
- package/dist/src/utils/{catalog-manifest-v6.js → catalog-manifest-v7.js} +23 -23
- package/dist/src/utils/{catalog-manifest-v6.js.map → catalog-manifest-v7.js.map} +1 -1
- package/dist/src/utils/catalog-operation-context.d.ts +27 -3
- package/dist/src/utils/catalog-operation-context.js +75 -4
- package/dist/src/utils/catalog-operation-context.js.map +1 -1
- package/dist/src/utils/catalog-public-error.js +7 -0
- package/dist/src/utils/catalog-public-error.js.map +1 -1
- package/dist/src/utils/catalog-runtime-projection.d.ts +4 -3
- package/dist/src/utils/catalog-runtime-projection.js.map +1 -1
- package/dist/src/utils/catalog-snapshot.d.ts +5 -2
- package/dist/src/utils/catalog-snapshot.js +4 -1
- package/dist/src/utils/catalog-snapshot.js.map +1 -1
- package/dist/src/utils/catalog-source-impact.d.ts +21 -0
- package/dist/src/utils/catalog-source-impact.js +344 -0
- package/dist/src/utils/catalog-source-impact.js.map +1 -0
- package/dist/src/utils/catalog-source-references.d.ts +22 -8
- package/dist/src/utils/catalog-source-references.js +457 -365
- package/dist/src/utils/catalog-source-references.js.map +1 -1
- package/dist/src/utils/catalog-sources.d.ts +14 -1
- package/dist/src/utils/catalog-sources.js +155 -11
- package/dist/src/utils/catalog-sources.js.map +1 -1
- package/dist/src/utils/codex-executable-discovery.d.ts +28 -0
- package/dist/src/utils/codex-executable-discovery.js +431 -0
- package/dist/src/utils/codex-executable-discovery.js.map +1 -0
- package/dist/src/utils/codex-manager.d.ts +23 -42
- package/dist/src/utils/codex-manager.js +79 -767
- package/dist/src/utils/codex-manager.js.map +1 -1
- package/dist/src/utils/codex-marketplace-path.d.ts +5 -0
- package/dist/src/utils/codex-marketplace-path.js +45 -0
- package/dist/src/utils/codex-marketplace-path.js.map +1 -0
- package/dist/src/utils/codex-native-observation.d.ts +55 -0
- package/dist/src/utils/codex-native-observation.js +198 -0
- package/dist/src/utils/codex-native-observation.js.map +1 -0
- package/dist/src/utils/codex-reconciler.d.ts +6 -14
- package/dist/src/utils/codex-reconciler.js +45 -50
- package/dist/src/utils/codex-reconciler.js.map +1 -1
- package/dist/src/utils/codex-shared-native.d.ts +28 -39
- package/dist/src/utils/codex-shared-native.js +92 -57
- package/dist/src/utils/codex-shared-native.js.map +1 -1
- package/dist/src/utils/codex-skill-staging.d.ts +4 -3
- package/dist/src/utils/codex-skill-staging.js.map +1 -1
- package/dist/src/utils/codex-skills-root.d.ts +4 -0
- package/dist/src/utils/codex-skills-root.js +25 -0
- package/dist/src/utils/codex-skills-root.js.map +1 -0
- package/dist/src/utils/codex-surface-analysis.d.ts +8 -3
- package/dist/src/utils/codex-surface-analysis.js +35 -62
- package/dist/src/utils/codex-surface-analysis.js.map +1 -1
- package/dist/src/utils/component-command-preparation.d.ts +31 -0
- package/dist/src/utils/component-command-preparation.js +127 -0
- package/dist/src/utils/component-command-preparation.js.map +1 -0
- package/dist/src/utils/component-gap.d.ts +4 -0
- package/dist/src/utils/component-gap.js +20 -0
- package/dist/src/utils/component-gap.js.map +1 -0
- package/dist/src/utils/component-resources.d.ts +51 -0
- package/dist/src/utils/component-resources.js +320 -0
- package/dist/src/utils/component-resources.js.map +1 -0
- package/dist/src/utils/config-platforms.d.ts +21 -0
- package/dist/src/utils/config-platforms.js +51 -0
- package/dist/src/utils/config-platforms.js.map +1 -0
- package/dist/src/utils/dynamic-skill-tree.d.ts +18 -6
- package/dist/src/utils/dynamic-skill-tree.js +33 -40
- package/dist/src/utils/dynamic-skill-tree.js.map +1 -1
- package/dist/src/utils/git-catalog-provider.d.ts +16 -0
- package/dist/src/utils/git-catalog-provider.js +112 -6
- package/dist/src/utils/git-catalog-provider.js.map +1 -1
- package/dist/src/utils/inventory-recovery-diagnostic.d.ts +4 -0
- package/dist/src/utils/inventory-recovery-diagnostic.js +15 -0
- package/dist/src/utils/inventory-recovery-diagnostic.js.map +1 -0
- package/dist/src/utils/local-marketplace.d.ts +17 -12
- package/dist/src/utils/local-marketplace.js +85 -195
- package/dist/src/utils/local-marketplace.js.map +1 -1
- package/dist/src/utils/managed-command-cli-review.d.ts +53 -0
- package/dist/src/utils/managed-command-cli-review.js +431 -0
- package/dist/src/utils/managed-command-cli-review.js.map +1 -0
- package/dist/src/utils/managed-command-closure.d.ts +14 -0
- package/dist/src/utils/managed-command-closure.js +156 -0
- package/dist/src/utils/managed-command-closure.js.map +1 -0
- package/dist/src/utils/managed-command-errors.d.ts +5 -0
- package/dist/src/utils/managed-command-errors.js +10 -0
- package/dist/src/utils/managed-command-errors.js.map +1 -0
- package/dist/src/utils/managed-command-materialization.d.ts +90 -0
- package/dist/src/utils/managed-command-materialization.js +375 -0
- package/dist/src/utils/managed-command-materialization.js.map +1 -0
- package/dist/src/utils/managed-command-preparation.d.ts +30 -0
- package/dist/src/utils/managed-command-preparation.js +39 -0
- package/dist/src/utils/managed-command-preparation.js.map +1 -0
- package/dist/src/utils/managed-command-review.d.ts +33 -0
- package/dist/src/utils/managed-command-review.js +80 -0
- package/dist/src/utils/managed-command-review.js.map +1 -0
- package/dist/src/utils/managed-command-runtime.d.ts +36 -0
- package/dist/src/utils/managed-command-runtime.js +126 -0
- package/dist/src/utils/managed-command-runtime.js.map +1 -0
- package/dist/src/utils/managed-command-snapshots.d.ts +24 -0
- package/dist/src/utils/managed-command-snapshots.js +89 -0
- package/dist/src/utils/managed-command-snapshots.js.map +1 -0
- package/dist/src/utils/managed-command-store.d.ts +141 -0
- package/dist/src/utils/managed-command-store.js +839 -0
- package/dist/src/utils/managed-command-store.js.map +1 -0
- package/dist/src/utils/multi-source-catalog.d.ts +4 -0
- package/dist/src/utils/multi-source-catalog.js +7 -3
- package/dist/src/utils/multi-source-catalog.js.map +1 -1
- package/dist/src/utils/native-cli-interruption.d.ts +8 -0
- package/dist/src/utils/native-cli-interruption.js +65 -0
- package/dist/src/utils/native-cli-interruption.js.map +1 -0
- package/dist/src/utils/native-cli.d.ts +37 -6
- package/dist/src/utils/native-cli.js +523 -60
- package/dist/src/utils/native-cli.js.map +1 -1
- package/dist/src/utils/native-demand.d.ts +29 -0
- package/dist/src/utils/native-demand.js +4 -0
- package/dist/src/utils/native-demand.js.map +1 -0
- package/dist/src/utils/native-tool-context.d.ts +17 -0
- package/dist/src/utils/native-tool-context.js +40 -0
- package/dist/src/utils/native-tool-context.js.map +1 -0
- package/dist/src/utils/native-tool-review.d.ts +8 -0
- package/dist/src/utils/native-tool-review.js +14 -0
- package/dist/src/utils/native-tool-review.js.map +1 -0
- package/dist/src/utils/orphan-marketplace-cleanup.js +0 -2
- package/dist/src/utils/orphan-marketplace-cleanup.js.map +1 -1
- package/dist/src/utils/ownership.d.ts +111 -11
- package/dist/src/utils/ownership.js +247 -126
- package/dist/src/utils/ownership.js.map +1 -1
- package/dist/src/utils/package-content.d.ts +7 -0
- package/dist/src/utils/package-content.js +70 -0
- package/dist/src/utils/package-content.js.map +1 -0
- package/dist/src/utils/path-catalog-provider.js +2 -0
- package/dist/src/utils/path-catalog-provider.js.map +1 -1
- package/dist/src/utils/paths.d.ts +1 -1
- package/dist/src/utils/paths.js +5 -2
- package/dist/src/utils/paths.js.map +1 -1
- package/dist/src/utils/platform-empty-state.d.ts +69 -0
- package/dist/src/utils/platform-empty-state.js +226 -0
- package/dist/src/utils/platform-empty-state.js.map +1 -0
- package/dist/src/utils/platform-support.d.ts +1 -1
- package/dist/src/utils/platform-support.js +1 -1
- package/dist/src/utils/platform-support.js.map +1 -1
- package/dist/src/utils/plugin-config-command-apply.d.ts +33 -0
- package/dist/src/utils/plugin-config-command-apply.js +142 -0
- package/dist/src/utils/plugin-config-command-apply.js.map +1 -0
- package/dist/src/utils/plugin-config-diagnostics.d.ts +16 -0
- package/dist/src/utils/plugin-config-diagnostics.js +44 -0
- package/dist/src/utils/plugin-config-diagnostics.js.map +1 -0
- package/dist/src/utils/plugin-config-impact.d.ts +75 -0
- package/dist/src/utils/plugin-config-impact.js +355 -0
- package/dist/src/utils/plugin-config-impact.js.map +1 -0
- package/dist/src/utils/plugin-config-references.d.ts +96 -0
- package/dist/src/utils/plugin-config-references.js +357 -0
- package/dist/src/utils/plugin-config-references.js.map +1 -0
- package/dist/src/utils/plugin-config-suggestion-runner.d.ts +83 -0
- package/dist/src/utils/plugin-config-suggestion-runner.js +308 -0
- package/dist/src/utils/plugin-config-suggestion-runner.js.map +1 -0
- package/dist/src/utils/plugin-config-suggestions.d.ts +50 -0
- package/dist/src/utils/plugin-config-suggestions.js +302 -0
- package/dist/src/utils/plugin-config-suggestions.js.map +1 -0
- package/dist/src/utils/plugin-config-write.d.ts +123 -31
- package/dist/src/utils/plugin-config-write.js +828 -399
- package/dist/src/utils/plugin-config-write.js.map +1 -1
- package/dist/src/utils/plugin-config.d.ts +192 -109
- package/dist/src/utils/plugin-config.js +970 -1150
- package/dist/src/utils/plugin-config.js.map +1 -1
- package/dist/src/utils/plugin-dependencies.d.ts +1 -1
- package/dist/src/utils/plugin-dependencies.js.map +1 -1
- package/dist/src/utils/plugin-scripts.d.ts +80 -127
- package/dist/src/utils/plugin-scripts.js +655 -524
- package/dist/src/utils/plugin-scripts.js.map +1 -1
- package/dist/src/utils/process-lock.js +14 -5
- package/dist/src/utils/process-lock.js.map +1 -1
- package/dist/src/utils/process-tree.d.ts +2 -2
- package/dist/src/utils/process-tree.js +1 -1
- package/dist/src/utils/process-tree.js.map +1 -1
- package/dist/src/utils/project-boundary.d.ts +11 -13
- package/dist/src/utils/project-boundary.js +28 -34
- package/dist/src/utils/project-boundary.js.map +1 -1
- package/dist/src/utils/rendered-contract.js +24 -1
- package/dist/src/utils/rendered-contract.js.map +1 -1
- package/dist/src/utils/runtime-config.d.ts +18 -0
- package/dist/src/utils/runtime-config.js +64 -0
- package/dist/src/utils/runtime-config.js.map +1 -0
- package/dist/src/utils/runtime-skill-closure.d.ts +2 -2
- package/dist/src/utils/runtime-skill-closure.js +47 -6
- package/dist/src/utils/runtime-skill-closure.js.map +1 -1
- package/dist/src/utils/safe-fs.d.ts +21 -0
- package/dist/src/utils/safe-fs.js +111 -0
- package/dist/src/utils/safe-fs.js.map +1 -0
- package/dist/src/utils/safe-operation-diagnostic.d.ts +15 -0
- package/dist/src/utils/safe-operation-diagnostic.js +33 -0
- package/dist/src/utils/safe-operation-diagnostic.js.map +1 -0
- package/dist/src/utils/sensitive-content.d.ts +4 -0
- package/dist/src/utils/sensitive-content.js +36 -0
- package/dist/src/utils/sensitive-content.js.map +1 -0
- package/dist/src/utils/skill-invocation-warning.d.ts +20 -0
- package/dist/src/utils/skill-invocation-warning.js +68 -0
- package/dist/src/utils/skill-invocation-warning.js.map +1 -0
- package/dist/src/utils/state-paths.d.ts +8 -3
- package/dist/src/utils/state-paths.js +53 -16
- package/dist/src/utils/state-paths.js.map +1 -1
- package/dist/src/utils/target-eligibility.d.ts +3 -3
- package/dist/src/utils/target-eligibility.js +11 -6
- package/dist/src/utils/target-eligibility.js.map +1 -1
- package/dist/src/utils/windows-claude-shim.d.ts +7 -0
- package/dist/src/utils/windows-claude-shim.js +10 -0
- package/dist/src/utils/windows-claude-shim.js.map +1 -0
- package/dist/src/utils/windows-npm-shim.d.ts +16 -0
- package/dist/src/utils/windows-npm-shim.js +155 -0
- package/dist/src/utils/windows-npm-shim.js.map +1 -0
- package/dist/vitest.config.js +106 -9
- package/dist/vitest.config.js.map +1 -1
- package/package.json +30 -21
- package/dist/src/commands/review-publication.d.ts +0 -99
- package/dist/src/commands/review-publication.js +0 -904
- package/dist/src/commands/review-publication.js.map +0 -1
- package/dist/src/commands/sync-command.d.ts +0 -21
- package/dist/src/commands/sync-command.js +0 -206
- package/dist/src/commands/sync-command.js.map +0 -1
- package/dist/src/portable/skills-cli.d.ts +0 -43
- package/dist/src/portable/skills-cli.js +0 -148
- package/dist/src/portable/skills-cli.js.map +0 -1
- package/dist/src/utils/catalog-manifest-v6.d.ts +0 -5
- package/dist/src/utils/lifecycle-active-store.d.ts +0 -147
- package/dist/src/utils/lifecycle-active-store.js +0 -1064
- package/dist/src/utils/lifecycle-active-store.js.map +0 -1
- package/dist/src/utils/plugin-intent-state.d.ts +0 -39
- package/dist/src/utils/plugin-intent-state.js +0 -325
- package/dist/src/utils/plugin-intent-state.js.map +0 -1
- package/dist/src/utils/slash-commands.d.ts +0 -1
- package/dist/src/utils/slash-commands.js +0 -2
- package/dist/src/utils/slash-commands.js.map +0 -1
|
@@ -4,26 +4,22 @@ import os from 'node:os';
|
|
|
4
4
|
import path from 'node:path';
|
|
5
5
|
import { promisify } from 'node:util';
|
|
6
6
|
import fs from 'fs-extra';
|
|
7
|
-
import {
|
|
8
|
-
import { buildGeneratedName } from './shared.js';
|
|
7
|
+
import { preparePluginNativeTools, PLATFORM_TARGETS } from '@lesliechan721/aw-plugin-core/manifest';
|
|
9
8
|
import { applyFileRules } from '../utils/file-rules.js';
|
|
10
9
|
import { calculateFileDigest } from '../utils/bundle-integrity.js';
|
|
11
10
|
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';
|
|
11
|
+
import { validateManagedCommandSourceClosure } from '../utils/managed-command-closure.js';
|
|
12
|
+
import { assertManifestPlatformSupport, assertPluginInputTree, checkAwCapabilitySupport, computeAwCapabilitySetDigest, createAwPluginRequirementsReceipt, createBundleSourceManifest, createPlatformManifestBase, isIgnoredPluginInputDirectory, normalizeAwCapabilities, readPluginManifest, resolvePluginRequirements, validatePluginManifest, } from '../utils/manifest.js';
|
|
15
13
|
import { AwCapabilityUnsupportedError, IMPLEMENTED_AW_CAPABILITIES, } from '../commands/aw-capabilities.js';
|
|
16
14
|
import { writeJsonFile } from '../utils/json.js';
|
|
17
15
|
import { resolveSupportedPlatforms } from '../utils/platform-support.js';
|
|
18
16
|
import { renderTemplate } from '../utils/template-engine.js';
|
|
19
|
-
import { resolvePlatformEntries } from '../utils/platform-entries.js';
|
|
20
17
|
import { scanNodeImportContract } from '../utils/plugin-script-contract.js';
|
|
21
18
|
import { isSkillAuthorOnlyPath, isSkillCollectionAuthorOnlyPath, } from '../utils/skill-authoring.js';
|
|
22
19
|
import { assertTestWritablePath } from '../utils/test-path-fence.js';
|
|
23
20
|
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';
|
|
21
|
+
import { validateRuntimeSkillClosure, validateSkillRuntimeProjectionFreshness, } from '../utils/runtime-skill-closure.js';
|
|
22
|
+
import { AW_PLUGIN_REQUIREMENTS_RECEIPT_PATH, validatePortableSkillDirectory, } from '../utils/dynamic-skill-tree.js';
|
|
27
23
|
const execFileAsync = promisify(execFile);
|
|
28
24
|
const requireFromCli = createRequire(import.meta.url);
|
|
29
25
|
const NODE_RUNTIME_EXTENSIONS = new Set(['.js', '.mjs', '.cjs']);
|
|
@@ -33,7 +29,7 @@ const PLATFORM_MANIFEST_DIRS = {
|
|
|
33
29
|
claude: '.claude-plugin',
|
|
34
30
|
codex: '.codex-plugin',
|
|
35
31
|
};
|
|
36
|
-
const
|
|
32
|
+
const EXACT_PNPM_VERSION_PATTERN = /^\d+\.\d+\.\d+$/u;
|
|
37
33
|
function assertLocalPluginStagingPathForTests(targetPath, source) {
|
|
38
34
|
return assertTestWritablePath(targetPath, source, '用 createIsolatedTestEnv() 生成默认 TMPDIR,或通过 registerWritableStateRoot() 登记 local plugin staging 路径。');
|
|
39
35
|
}
|
|
@@ -43,11 +39,14 @@ export async function validateStagingPackageManager(packageRoot) {
|
|
|
43
39
|
readJsonObject(path.join(resolveCliPackageRoot(), 'package.json'), '@lesliechan721/aw package.json'),
|
|
44
40
|
readJsonObject(path.join(packageRoot, 'package.json'), 'scripts.node.packageRoot.package.json'),
|
|
45
41
|
]);
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
42
|
+
// pnpm pack removes packageManager, but preserves runtime dependencies.
|
|
43
|
+
const dependencies = cliPackageJson.dependencies;
|
|
44
|
+
const supportedPnpmVersion = dependencies?.pnpm;
|
|
45
|
+
if (typeof supportedPnpmVersion !== 'string'
|
|
46
|
+
|| !EXACT_PNPM_VERSION_PATTERN.test(supportedPnpmVersion)) {
|
|
47
|
+
throw new Error('Invalid @lesliechan721/aw dependencies.pnpm: expected an exact "<major>.<minor>.<patch>" version.');
|
|
48
|
+
}
|
|
49
|
+
const supportedPackageManager = `pnpm@${supportedPnpmVersion}`;
|
|
51
50
|
if (packageJson.packageManager !== supportedPackageManager) {
|
|
52
51
|
throw new Error('Invalid scripts.node.packageRoot.package.json.packageManager: '
|
|
53
52
|
+ `expected "${supportedPackageManager}".`);
|
|
@@ -99,34 +98,36 @@ async function resolveRuntimePnpmEntry(supportedPackageManager) {
|
|
|
99
98
|
const stats = await fs.stat(entryPath).catch(() => undefined);
|
|
100
99
|
return stats?.isFile() ? entryPath : undefined;
|
|
101
100
|
}
|
|
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
|
-
}
|
|
101
|
+
function createDefaultStagingRunner(commandEnv) {
|
|
102
|
+
return {
|
|
103
|
+
async installPackageRoot(packageRoot) {
|
|
104
|
+
const supportedPackageManager = await validateStagingPackageManager(packageRoot);
|
|
105
|
+
const fixedPnpmEntry = await resolveFixedPnpmEntry(supportedPackageManager, commandEnv)
|
|
106
|
+
?? await resolveRuntimePnpmEntry(supportedPackageManager);
|
|
107
|
+
if (!fixedPnpmEntry) {
|
|
108
|
+
throw new Error(`Cannot stage scripts.node.packageRoot: missing bundled ${supportedPackageManager} runtime dependency.`);
|
|
109
|
+
}
|
|
110
|
+
const args = [
|
|
111
|
+
fixedPnpmEntry,
|
|
112
|
+
'install',
|
|
113
|
+
'--frozen-lockfile',
|
|
114
|
+
'--ignore-scripts',
|
|
115
|
+
];
|
|
116
|
+
await execFileAsync(process.execPath, args, {
|
|
117
|
+
cwd: packageRoot,
|
|
118
|
+
env: commandEnv,
|
|
119
|
+
maxBuffer: 10 * 1024 * 1024,
|
|
120
|
+
});
|
|
121
|
+
},
|
|
122
|
+
async runNodeBuild({ pluginRoot, scriptPath, args, env }) {
|
|
123
|
+
await execFileAsync(process.execPath, [path.join(pluginRoot, stripDotSlash(scriptPath)), ...args], {
|
|
124
|
+
cwd: pluginRoot,
|
|
125
|
+
env,
|
|
126
|
+
maxBuffer: 10 * 1024 * 1024,
|
|
127
|
+
});
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
}
|
|
130
131
|
function stripDotSlash(value) {
|
|
131
132
|
return value.startsWith('./') ? value.slice(2) : value;
|
|
132
133
|
}
|
|
@@ -189,21 +190,6 @@ async function collectFilesForPath(pluginRoot, relativePath) {
|
|
|
189
190
|
}
|
|
190
191
|
return [stripDotSlash(relativePath).split(path.sep).join('/')];
|
|
191
192
|
}
|
|
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
193
|
async function copyFileWithTemplateSupport(pluginRoot, outputRoot, sourceRelativePath, platform, templatePatterns, templateVars) {
|
|
208
194
|
const normalizedSource = sourceRelativePath.split(path.sep).join('/');
|
|
209
195
|
const sourcePath = path.join(pluginRoot, normalizedSource);
|
|
@@ -257,77 +243,57 @@ async function assertArtifactSourceTreePortable(rootDir, fieldName, relativeRoot
|
|
|
257
243
|
}
|
|
258
244
|
}
|
|
259
245
|
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
|
-
});
|
|
246
|
+
for (const [sourceIndex, sourceDir] of (plugin.manifest.artifacts?.sourceDirs ?? []).entries()) {
|
|
247
|
+
const sourcePath = path.join(plugin.rootDir, stripDotSlash(sourceDir));
|
|
248
|
+
await assertArtifactSourceTreePortable(sourcePath, `artifacts.sourceDirs[${sourceIndex}]`);
|
|
249
|
+
const targetRoot = path.join(outputRoot, stripDotSlash(sourceDir));
|
|
250
|
+
await fs.ensureDir(targetRoot);
|
|
251
|
+
for (const relativePath of await listFilesRecursively(sourcePath)) {
|
|
252
|
+
if (isSkillAuthorOnlyPath(relativePath))
|
|
253
|
+
continue;
|
|
254
|
+
const destination = path.join(targetRoot, relativePath);
|
|
255
|
+
await fs.ensureDir(path.dirname(destination));
|
|
256
|
+
await fs.copyFile(path.join(sourcePath, relativePath), destination);
|
|
275
257
|
}
|
|
276
258
|
}
|
|
277
259
|
}
|
|
278
|
-
async function
|
|
279
|
-
const
|
|
280
|
-
if (!
|
|
260
|
+
async function copyManagedCommandPackage(plugin, outputRoot) {
|
|
261
|
+
const command = plugin.manifest.command;
|
|
262
|
+
if (!command)
|
|
281
263
|
return;
|
|
282
|
-
|
|
283
|
-
const
|
|
284
|
-
await
|
|
285
|
-
|
|
264
|
+
await validateManagedCommandSourceClosure(plugin.rootDir, plugin.manifest);
|
|
265
|
+
const relativePath = stripDotSlash(command.sourceDir);
|
|
266
|
+
await fs.copy(path.join(plugin.rootDir, relativePath), path.join(outputRoot, relativePath), {
|
|
267
|
+
overwrite: true,
|
|
286
268
|
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
269
|
});
|
|
270
|
+
await validateManagedCommandSourceClosure(outputRoot, plugin.manifest);
|
|
293
271
|
}
|
|
294
272
|
async function resolveArtifactRuntimeImports(options) {
|
|
295
273
|
const manifest = createBundleSourceManifest(options.plugin);
|
|
296
274
|
const requiredCapabilities = [];
|
|
297
275
|
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
|
-
};
|
|
276
|
+
for (const [importIndex, runtimeImport] of (manifest.artifacts?.runtimeImports ?? []).entries()) {
|
|
277
|
+
if (!options.resolver) {
|
|
278
|
+
throw new Error(`Cannot resolve artifacts.runtimeImports[${importIndex}]: catalog runtime import resolver is required.`);
|
|
327
279
|
}
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
280
|
+
const resolution = await options.resolver.resolve({
|
|
281
|
+
consumer: options.plugin, reference: runtimeImport, purpose: 'artifact-runtime',
|
|
282
|
+
});
|
|
283
|
+
requiredCapabilities.push(...resolution.requiredCapabilities);
|
|
284
|
+
const relativePath = `./.agents-plugin/runtime-imports/${runtimeImport.name}`;
|
|
285
|
+
projections.push({
|
|
286
|
+
sourcePath: resolution.sourcePath,
|
|
287
|
+
targetPath: path.join(options.outputRoot, stripDotSlash(relativePath)),
|
|
288
|
+
sourceDigest: resolution.sourceDigest,
|
|
289
|
+
label: runtimeImport.name,
|
|
290
|
+
});
|
|
291
|
+
runtimeImport.resolved = {
|
|
292
|
+
path: relativePath, digest: resolution.sourceDigest,
|
|
293
|
+
providerPluginId: resolution.provider, providerVersion: resolution.providerVersion,
|
|
294
|
+
source: resolution.source, requiredCapabilities: resolution.requiredCapabilities,
|
|
295
|
+
capabilitySetDigest: resolution.capabilitySetDigest,
|
|
296
|
+
};
|
|
331
297
|
}
|
|
332
298
|
return {
|
|
333
299
|
manifest,
|
|
@@ -346,7 +312,7 @@ async function materializeArtifactRuntimeImports(projections) {
|
|
|
346
312
|
}
|
|
347
313
|
async function injectRequirementsReceipts(options) {
|
|
348
314
|
const receipt = createAwPluginRequirementsReceipt({ name: options.plugin.manifest.name, version: options.plugin.manifest.version }, options.requiredCapabilities);
|
|
349
|
-
for (const relativeRoot of
|
|
315
|
+
for (const relativeRoot of PLATFORM_TARGETS.map((platform) => `${platform}/skills`)) {
|
|
350
316
|
const skillsRoot = path.join(options.outputRoot, relativeRoot);
|
|
351
317
|
if (!(await fs.pathExists(skillsRoot)))
|
|
352
318
|
continue;
|
|
@@ -364,12 +330,6 @@ async function injectRequirementsReceipts(options) {
|
|
|
364
330
|
}
|
|
365
331
|
}
|
|
366
332
|
}
|
|
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
333
|
async function addDeclaredPathFiles(plugin, platform, relativePath, targetFiles) {
|
|
374
334
|
if (!relativePath) {
|
|
375
335
|
return undefined;
|
|
@@ -384,18 +344,11 @@ async function addDeclaredSkillPathFiles(plugin, platform, relativePath, targetF
|
|
|
384
344
|
if (!relativePath)
|
|
385
345
|
return undefined;
|
|
386
346
|
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
347
|
const files = await collectFilesForPath(plugin.rootDir, relativePath);
|
|
393
348
|
let added = false;
|
|
394
349
|
for (const filePath of files) {
|
|
395
350
|
const skillCollectionPath = path.posix.relative(root.split(path.sep).join('/'), filePath.split(path.sep).join('/'));
|
|
396
|
-
|
|
397
|
-
if (!dynamicSkillKeys.has(skillKey ?? '') &&
|
|
398
|
-
!isSkillCollectionAuthorOnlyPath(skillCollectionPath)) {
|
|
351
|
+
if (!isSkillCollectionAuthorOnlyPath(skillCollectionPath)) {
|
|
399
352
|
targetFiles.add(filePath);
|
|
400
353
|
added = true;
|
|
401
354
|
}
|
|
@@ -419,87 +372,20 @@ function isDeclaredSkillAuthorOnlyFile(plugin, filePath) {
|
|
|
419
372
|
if (staticRelative && isSkillCollectionAuthorOnlyPath(staticRelative))
|
|
420
373
|
return true;
|
|
421
374
|
}
|
|
422
|
-
for (const
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
continue;
|
|
426
|
-
const dynamicRoot = `skills/${target.skillKey}`;
|
|
427
|
-
const dynamicRelative = relativePathInside(dynamicRoot, normalizedFile);
|
|
428
|
-
if (dynamicRelative && isSkillAuthorOnlyPath(dynamicRelative))
|
|
375
|
+
for (const sourceDir of plugin.manifest.artifacts?.sourceDirs ?? []) {
|
|
376
|
+
const sourceRelative = relativePathInside(stripDotSlash(sourceDir), normalizedFile);
|
|
377
|
+
if (sourceRelative && isSkillAuthorOnlyPath(sourceRelative))
|
|
429
378
|
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
379
|
}
|
|
436
380
|
return false;
|
|
437
381
|
}
|
|
438
|
-
function
|
|
439
|
-
const
|
|
440
|
-
|
|
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 isNodeRuntimeEntry(entry) {
|
|
480
|
-
return entry.runner === 'node' || (entry.runner === 'auto' &&
|
|
481
|
-
NODE_RUNTIME_EXTENSIONS.has(path.posix.extname(entry.path).toLowerCase()));
|
|
482
|
-
}
|
|
483
|
-
function addLifecycleRuntimeEntries(plugin, rootFiles, nodeEntries) {
|
|
484
|
-
const lifecycle = plugin.manifest.scripts?.lifecycle;
|
|
485
|
-
if (!lifecycle) {
|
|
382
|
+
function addPreApplyRuntimeEntry(plugin, rootFiles, nodeEntries) {
|
|
383
|
+
const entry = plugin.manifest.scripts?.preApply;
|
|
384
|
+
if (!entry)
|
|
486
385
|
return;
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
continue;
|
|
491
|
-
}
|
|
492
|
-
for (const entry of Object.values(selector)) {
|
|
493
|
-
if (!entry) {
|
|
494
|
-
continue;
|
|
495
|
-
}
|
|
496
|
-
const filePath = stripDotSlash(entry.path);
|
|
497
|
-
rootFiles.add(filePath);
|
|
498
|
-
if (isNodeRuntimeEntry(entry)) {
|
|
499
|
-
nodeEntries.add(filePath);
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
}
|
|
386
|
+
const filePath = stripDotSlash(entry.path);
|
|
387
|
+
rootFiles.add(filePath);
|
|
388
|
+
nodeEntries.add(filePath);
|
|
503
389
|
}
|
|
504
390
|
function addHelperRuntimeEntries(plugin, rootFiles, nodeEntries) {
|
|
505
391
|
const configHelper = plugin.manifest.scripts?.helpers?.config;
|
|
@@ -563,6 +449,7 @@ async function collectRuntimeClosureFiles(plugin, entryFiles) {
|
|
|
563
449
|
entryFiles,
|
|
564
450
|
dependencies,
|
|
565
451
|
devDependencies,
|
|
452
|
+
runtimeConfigSkillRoots: plugin.manifest.artifacts?.sourceDirs ?? [],
|
|
566
453
|
});
|
|
567
454
|
if (scan.errors.length > 0) {
|
|
568
455
|
throw new Error(`Invalid scripts.node runtime imports:\n${scan.errors.join('\n')}`);
|
|
@@ -572,12 +459,31 @@ async function collectRuntimeClosureFiles(plugin, entryFiles) {
|
|
|
572
459
|
async function collectAwRuntimeFiles(plugin) {
|
|
573
460
|
const rootFiles = new Set();
|
|
574
461
|
const nodeEntries = new Set();
|
|
575
|
-
|
|
462
|
+
addPreApplyRuntimeEntry(plugin, rootFiles, nodeEntries);
|
|
576
463
|
addHelperRuntimeEntries(plugin, rootFiles, nodeEntries);
|
|
577
464
|
addArtifactRendererRuntimeEntry(plugin, rootFiles, nodeEntries);
|
|
578
|
-
|
|
465
|
+
const configSuggestions = plugin.manifest.scripts?.config?.suggestions;
|
|
466
|
+
if (configSuggestions) {
|
|
467
|
+
const filePath = stripDotSlash(configSuggestions.path);
|
|
468
|
+
rootFiles.add(filePath);
|
|
469
|
+
nodeEntries.add(filePath);
|
|
470
|
+
}
|
|
471
|
+
if (plugin.manifest.nativeTools) {
|
|
472
|
+
rootFiles.add(stripDotSlash(plugin.manifest.nativeTools.reader));
|
|
473
|
+
}
|
|
474
|
+
const closureFiles = await collectRuntimeClosureFiles(plugin, [...nodeEntries]);
|
|
475
|
+
for (const filePath of closureFiles) {
|
|
579
476
|
rootFiles.add(filePath);
|
|
580
477
|
}
|
|
478
|
+
const configHelper = plugin.manifest.scripts?.helpers?.config;
|
|
479
|
+
if (configHelper) {
|
|
480
|
+
const helperDir = path.posix.dirname(stripDotSlash(configHelper));
|
|
481
|
+
const re2RuntimeRoot = path.posix.join(helperDir, 're2-wasm');
|
|
482
|
+
if (closureFiles.includes(path.posix.join(re2RuntimeRoot, 'build/src/re2.js'))) {
|
|
483
|
+
rootFiles.add(path.posix.join(re2RuntimeRoot, 'build/wasm/re2.wasm'));
|
|
484
|
+
rootFiles.add(path.posix.join(re2RuntimeRoot, 'LICENSE'));
|
|
485
|
+
}
|
|
486
|
+
}
|
|
581
487
|
return [...rootFiles].sort();
|
|
582
488
|
}
|
|
583
489
|
function packageRootPath(plugin) {
|
|
@@ -794,17 +700,7 @@ async function assertSkillRuntimeTargetAbsent(skillRoot, target, fieldName) {
|
|
|
794
700
|
}
|
|
795
701
|
async function assertSkillRuntimeProjectionTargets(plugin) {
|
|
796
702
|
for (const [index, entry] of (plugin.manifest.buildConfig?.skillRuntimeFiles ?? []).entries()) {
|
|
797
|
-
const roots = [];
|
|
798
|
-
if (entry.platforms !== undefined || entry.distributions === undefined) {
|
|
799
|
-
roots.push(path.join(plugin.rootDir, 'skills', entry.skill));
|
|
800
|
-
}
|
|
801
|
-
if (entry.distributions?.includes('agent-skills')) {
|
|
802
|
-
const portableRoot = plugin.manifest.distributions?.agentSkills?.skills;
|
|
803
|
-
if (!portableRoot) {
|
|
804
|
-
throw new Error(`Invalid buildConfig.skillRuntimeFiles[${index}].distributions: agent-skills is not declared.`);
|
|
805
|
-
}
|
|
806
|
-
roots.push(path.join(plugin.rootDir, stripDotSlash(portableRoot), entry.skill));
|
|
807
|
-
}
|
|
703
|
+
const roots = [path.join(plugin.rootDir, stripDotSlash(plugin.manifest.skills ?? './skills'), entry.skill)];
|
|
808
704
|
for (const skillRoot of roots) {
|
|
809
705
|
const skillRootStats = await fs.lstat(skillRoot).catch(() => undefined);
|
|
810
706
|
if (!skillRootStats?.isDirectory() || skillRootStats.isSymbolicLink()) {
|
|
@@ -816,11 +712,7 @@ async function assertSkillRuntimeProjectionTargets(plugin) {
|
|
|
816
712
|
}
|
|
817
713
|
async function validateGeneratedSkillRuntimeFiles(plugin, outputRoot, supportedPlatforms) {
|
|
818
714
|
for (const [index, entry] of (plugin.manifest.buildConfig?.generatedSkillRuntimeFiles ?? []).entries()) {
|
|
819
|
-
const surfaces = [];
|
|
820
|
-
if (entry.distributions === undefined) {
|
|
821
|
-
surfaces.push(...supportedPlatforms);
|
|
822
|
-
}
|
|
823
|
-
surfaces.push(...(entry.distributions ?? []));
|
|
715
|
+
const surfaces = entry.platforms?.length ? entry.platforms : [...supportedPlatforms];
|
|
824
716
|
for (const surface of surfaces) {
|
|
825
717
|
const targetPath = path.join(outputRoot, surface, 'skills', entry.skill, ...entry.target.split('/'));
|
|
826
718
|
const stats = await fs.lstat(targetPath).catch(() => undefined);
|
|
@@ -834,19 +726,12 @@ async function projectSkillRuntimeFiles(options) {
|
|
|
834
726
|
const projections = [];
|
|
835
727
|
const claims = new Set();
|
|
836
728
|
for (const [index, entry] of (options.plugin.manifest.buildConfig?.skillRuntimeFiles ?? []).entries()) {
|
|
837
|
-
const
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
}
|
|
841
|
-
surfaces.push(...(entry.distributions ?? []).map((distribution) => ({ distribution })));
|
|
842
|
-
for (const surface of surfaces) {
|
|
843
|
-
const { platform, distribution } = surface;
|
|
844
|
-
if (platform) {
|
|
845
|
-
if (!options.supportedPlatforms.has(platform)) {
|
|
846
|
-
throw new Error(`Invalid buildConfig.skillRuntimeFiles[${index}].platforms: plugin does not support "${platform}".`);
|
|
847
|
-
}
|
|
729
|
+
for (const platform of entry.platforms?.length ? entry.platforms : [...options.supportedPlatforms]) {
|
|
730
|
+
if (!options.supportedPlatforms.has(platform)) {
|
|
731
|
+
throw new Error(`Invalid buildConfig.skillRuntimeFiles[${index}].platforms: plugin does not support "${platform}".`);
|
|
848
732
|
}
|
|
849
|
-
const
|
|
733
|
+
const distribution = platform === 'codex' || platform === 'claude' ? undefined : 'agent-skills';
|
|
734
|
+
const claim = `${platform}:${entry.skill}/${entry.target}`;
|
|
850
735
|
if (claims.has(claim)) {
|
|
851
736
|
throw new Error(`Invalid buildConfig.skillRuntimeFiles: target collision at "${claim}".`);
|
|
852
737
|
}
|
|
@@ -888,7 +773,7 @@ async function projectSkillRuntimeFiles(options) {
|
|
|
888
773
|
bindingKey = `import:${entry.import.plugin}/${entry.import.export}`;
|
|
889
774
|
runtimeProvenance = toRuntimeImportProvenance(resolution);
|
|
890
775
|
}
|
|
891
|
-
const targetPath = path.join(options.outputRoot, platform
|
|
776
|
+
const targetPath = path.join(options.outputRoot, platform, 'skills', entry.skill, ...entry.target.split('/'));
|
|
892
777
|
projections.push({
|
|
893
778
|
bindingKey,
|
|
894
779
|
canonicalSource,
|
|
@@ -910,7 +795,7 @@ async function projectSkillRuntimeFiles(options) {
|
|
|
910
795
|
async function materializeSkillRuntimeFiles(projections) {
|
|
911
796
|
for (const projection of projections) {
|
|
912
797
|
if (await fs.pathExists(projection.targetPath)) {
|
|
913
|
-
const surface = projection.provenance.platform
|
|
798
|
+
const surface = projection.provenance.platform;
|
|
914
799
|
throw new Error(`Invalid buildConfig.skillRuntimeFiles: bundle target already exists at "${surface}:${projection.provenance.skill}/${projection.provenance.target}".`);
|
|
915
800
|
}
|
|
916
801
|
await fs.ensureDir(path.dirname(projection.targetPath));
|
|
@@ -989,7 +874,7 @@ async function validateBuildImportProjectionSources(projections) {
|
|
|
989
874
|
}
|
|
990
875
|
}
|
|
991
876
|
}
|
|
992
|
-
async function createStagedPlugin(plugin, runner, resolver) {
|
|
877
|
+
async function createStagedPlugin(plugin, runner, resolver, commandEnv = process.env) {
|
|
993
878
|
const stagingRoot = await fs.mkdtemp(assertLocalPluginStagingPathForTests(path.join(os.tmpdir(), 'aw-plugin-staging-'), 'local plugin bundle staging root'));
|
|
994
879
|
const stagingPluginRoot = assertLocalPluginStagingPathForTests(path.join(stagingRoot, 'plugin'), 'local plugin staged plugin root');
|
|
995
880
|
try {
|
|
@@ -999,19 +884,25 @@ async function createStagedPlugin(plugin, runner, resolver) {
|
|
|
999
884
|
&& !isMacOsMetadataName(path.basename(source));
|
|
1000
885
|
},
|
|
1001
886
|
});
|
|
887
|
+
const nativeReader = await preparePluginNativeTools(stagingPluginRoot, plugin.manifest);
|
|
1002
888
|
const sourceBuild = plugin.manifest.scripts?.node?.build;
|
|
1003
889
|
const declaredBuildImports = plugin.manifest.buildConfig?.buildImports ?? [];
|
|
1004
890
|
if (declaredBuildImports.length > 0 && !sourceBuild) {
|
|
1005
891
|
throw new Error(`Invalid plugin "${plugin.manifest.name}": buildConfig.buildImports requires scripts.node.build.`);
|
|
1006
892
|
}
|
|
1007
|
-
const buildEnv = { ...
|
|
893
|
+
const buildEnv = { ...commandEnv };
|
|
894
|
+
for (const key of Object.keys(buildEnv))
|
|
895
|
+
if (key.toUpperCase() === 'AW_PLUGIN_NATIVE_READER')
|
|
896
|
+
delete buildEnv[key];
|
|
897
|
+
if (nativeReader)
|
|
898
|
+
buildEnv.AW_PLUGIN_NATIVE_READER = nativeReader;
|
|
1008
899
|
const buildImportProvenance = [];
|
|
1009
900
|
const buildImportProjections = [];
|
|
1010
901
|
for (const buildImport of declaredBuildImports) {
|
|
1011
902
|
if (!resolver) {
|
|
1012
903
|
throw new Error(`Cannot resolve buildConfig.buildImports for plugin "${plugin.manifest.name}": catalog runtime import resolver is required.`);
|
|
1013
904
|
}
|
|
1014
|
-
if (Object.hasOwn(
|
|
905
|
+
if (Object.hasOwn(commandEnv, buildImport.env)) {
|
|
1015
906
|
throw new Error(`Invalid buildConfig.buildImports env "${buildImport.env}": refusing to overwrite an existing environment variable.`);
|
|
1016
907
|
}
|
|
1017
908
|
const resolution = await resolver.resolve({
|
|
@@ -1103,13 +994,15 @@ async function resolveBuildPlugin(plugin, options) {
|
|
|
1103
994
|
cleanup: async () => { },
|
|
1104
995
|
};
|
|
1105
996
|
}
|
|
1106
|
-
return createStagedPlugin(plugin, options.stagingRunner, options.runtimeResolver);
|
|
997
|
+
return createStagedPlugin(plugin, options.stagingRunner, options.runtimeResolver, options.commandEnv);
|
|
1107
998
|
}
|
|
1108
999
|
export async function prepareLocalPluginBundleSource(plugin, options = {}) {
|
|
1109
1000
|
await assertPluginInputTree(plugin.rootDir);
|
|
1110
1001
|
const buildOptions = {
|
|
1111
1002
|
buildMode: options.buildMode ?? 'staging',
|
|
1112
|
-
stagingRunner: options.stagingRunner
|
|
1003
|
+
stagingRunner: options.stagingRunner
|
|
1004
|
+
?? createDefaultStagingRunner(options.commandEnv ?? process.env),
|
|
1005
|
+
commandEnv: options.commandEnv,
|
|
1113
1006
|
runtimeResolver: options.runtimeResolver,
|
|
1114
1007
|
preparedRuntimeContext: undefined,
|
|
1115
1008
|
};
|
|
@@ -1142,9 +1035,12 @@ function assertRequiredCapabilitiesSupported(pluginName, requiredCapabilities) {
|
|
|
1142
1035
|
}
|
|
1143
1036
|
export async function bundleLocalPlugin(plugin, outputRoot, options = {}) {
|
|
1144
1037
|
const historicalComparison = options.runtimeSkillClosureValidation === 'historical';
|
|
1038
|
+
plugin = { ...plugin, manifest: validatePluginManifest(plugin.rootDir, plugin.manifest) };
|
|
1145
1039
|
const buildOptions = {
|
|
1146
1040
|
buildMode: options.buildMode ?? 'build-free',
|
|
1147
|
-
stagingRunner: options.stagingRunner
|
|
1041
|
+
stagingRunner: options.stagingRunner
|
|
1042
|
+
?? createDefaultStagingRunner(options.commandEnv ?? process.env),
|
|
1043
|
+
commandEnv: options.commandEnv,
|
|
1148
1044
|
runtimeResolver: options.runtimeResolver,
|
|
1149
1045
|
preparedRuntimeContext: options.preparedRuntimeContext,
|
|
1150
1046
|
};
|
|
@@ -1161,11 +1057,13 @@ export async function bundleLocalPlugin(plugin, outputRoot, options = {}) {
|
|
|
1161
1057
|
const buildPlugin = await resolveBuildPlugin(plugin, buildOptions);
|
|
1162
1058
|
try {
|
|
1163
1059
|
plugin = buildPlugin.plugin;
|
|
1164
|
-
const requirements =
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1060
|
+
const requirements = buildOptions.buildMode === 'build-free'
|
|
1061
|
+
? sourceRequirements
|
|
1062
|
+
: await resolvePluginRequirements({
|
|
1063
|
+
pluginRoot: plugin.rootDir,
|
|
1064
|
+
manifest: plugin.manifest,
|
|
1065
|
+
implementedCapabilities: IMPLEMENTED_AW_CAPABILITIES,
|
|
1066
|
+
});
|
|
1169
1067
|
if (!historicalComparison) {
|
|
1170
1068
|
assertPluginRequirementsSupported(plugin.manifest.name, requirements, options.strictRequirements ?? false);
|
|
1171
1069
|
}
|
|
@@ -1184,7 +1082,8 @@ export async function bundleLocalPlugin(plugin, outputRoot, options = {}) {
|
|
|
1184
1082
|
.map((entry) => ({
|
|
1185
1083
|
skill: entry.skill,
|
|
1186
1084
|
target: entry.target,
|
|
1187
|
-
|
|
1085
|
+
platform: entry.platform,
|
|
1086
|
+
path: `./${entry.platform}/skills/${entry.skill}/${entry.target}`,
|
|
1188
1087
|
digest: entry.targetDigest,
|
|
1189
1088
|
provider: entry.provider,
|
|
1190
1089
|
providerVersion: entry.providerVersion,
|
|
@@ -1217,9 +1116,6 @@ export async function bundleLocalPlugin(plugin, outputRoot, options = {}) {
|
|
|
1217
1116
|
const buildConfig = plugin.manifest.buildConfig;
|
|
1218
1117
|
const templatePatterns = buildConfig?.templates?.include ?? [];
|
|
1219
1118
|
const templateVars = buildConfig?.templates?.vars ?? {};
|
|
1220
|
-
const resolvedSlashCommands = await resolveSlashCommands(plugin.rootDir, plugin.manifest, {
|
|
1221
|
-
targetPlatforms: supportedPlatforms,
|
|
1222
|
-
});
|
|
1223
1119
|
for (const platform of PLATFORM_ORDER) {
|
|
1224
1120
|
if (!supportedPlatforms.has(platform)) {
|
|
1225
1121
|
continue;
|
|
@@ -1236,105 +1132,60 @@ export async function bundleLocalPlugin(plugin, outputRoot, options = {}) {
|
|
|
1236
1132
|
manifest.skills = await addDeclaredSkillPathFiles(plugin, platform, plugin.manifest.skills, files);
|
|
1237
1133
|
manifest.mcpServers = await addDeclaredPathFiles(plugin, platform, plugin.manifest.mcpServers, files);
|
|
1238
1134
|
}
|
|
1239
|
-
const
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
const
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
const claudeOverrides = buildConfig?.manifestOverrides?.claude;
|
|
1252
|
-
claudeManifest.outputStyles = await addDeclaredPathFiles(plugin, 'claude', claudeOverrides?.outputStyles, claudeFiles);
|
|
1253
|
-
claudeManifest.lspServers = await addDeclaredLspServerFiles(plugin, claudeOverrides?.lspServers, claudeFiles);
|
|
1254
|
-
claudeManifest.userConfig = claudeOverrides?.userConfig;
|
|
1255
|
-
claudeManifest.channels = claudeOverrides?.channels;
|
|
1256
|
-
const hooksArtifact = renderResolvedHooksArtifact(resolvePlatformHookDefinitions(plugin.manifest, 'claude'), 'claude');
|
|
1257
|
-
if (hooksArtifact) {
|
|
1258
|
-
const hooksPath = path.join(outputRoot, 'claude', 'hooks', 'hooks.json');
|
|
1259
|
-
await writeJsonFile(hooksPath, hooksArtifact.content);
|
|
1260
|
-
claudeManifest.hooks = './claude/hooks/hooks.json';
|
|
1261
|
-
}
|
|
1262
|
-
const claudeAgents = resolvePlatformEntries(plugin.manifest.extensions?.agents, 'claude');
|
|
1263
|
-
if (claudeAgents.length > 0) {
|
|
1264
|
-
claudeManifest.agents = [];
|
|
1265
|
-
for (const agent of claudeAgents) {
|
|
1266
|
-
const generatedName = buildGeneratedName(plugin.manifest.name, agent.name);
|
|
1267
|
-
const relativePath = `./claude/agents/${generatedName}.md`;
|
|
1268
|
-
claudeManifest.agents.push(relativePath);
|
|
1269
|
-
await writeTextFile(path.join(outputRoot, stripDotSlash(relativePath)), renderClaudeAgentContent(agent));
|
|
1270
|
-
}
|
|
1135
|
+
for (const platform of supportedPlatforms) {
|
|
1136
|
+
await fs.ensureDir(path.join(outputRoot, platform));
|
|
1137
|
+
if (platform === 'codex' || platform === 'claude')
|
|
1138
|
+
continue;
|
|
1139
|
+
const files = new Set();
|
|
1140
|
+
platformFiles[platform] = files;
|
|
1141
|
+
if (plugin.manifest.skills)
|
|
1142
|
+
await fs.ensureDir(path.join(outputRoot, platform, 'skills'));
|
|
1143
|
+
await addDeclaredSkillPathFiles(plugin, platform, plugin.manifest.skills, files);
|
|
1144
|
+
if (plugin.manifest.mcpServers) {
|
|
1145
|
+
for (const file of await collectFilesForPath(plugin.rootDir, plugin.manifest.mcpServers))
|
|
1146
|
+
files.add(file);
|
|
1271
1147
|
}
|
|
1272
1148
|
}
|
|
1273
1149
|
const sourceFiles = (await listFilesRecursively(plugin.rootDir)).filter((filePath) => !isDeclaredSkillAuthorOnlyFile(plugin, filePath));
|
|
1274
|
-
|
|
1275
|
-
for (const filePath of applyFileRules(sourceFiles.filter((filePath) => !isDynamicSkillSourceFile(plugin, 'claude', filePath)), buildConfig.fileRules.claude.include, buildConfig.fileRules.claude.exclude)) {
|
|
1276
|
-
if (resolvedSlashCommands &&
|
|
1277
|
-
filePath === stripDotSlash(resolvedSlashCommands.rootRelativePath)) {
|
|
1278
|
-
continue;
|
|
1279
|
-
}
|
|
1280
|
-
if (resolvedSlashCommands &&
|
|
1281
|
-
filePath.startsWith(`${stripDotSlash(resolvedSlashCommands.rootRelativePath)}/`)) {
|
|
1282
|
-
continue;
|
|
1283
|
-
}
|
|
1284
|
-
claudeFiles.add(filePath);
|
|
1285
|
-
}
|
|
1286
|
-
}
|
|
1287
|
-
if (codexFiles && buildConfig?.fileRules?.codex) {
|
|
1288
|
-
for (const filePath of applyFileRules(sourceFiles.filter((filePath) => !isDynamicSkillSourceFile(plugin, 'codex', filePath)), buildConfig.fileRules.codex.include, buildConfig.fileRules.codex.exclude)) {
|
|
1289
|
-
if (resolvedSlashCommands &&
|
|
1290
|
-
filePath === stripDotSlash(resolvedSlashCommands.rootRelativePath)) {
|
|
1291
|
-
continue;
|
|
1292
|
-
}
|
|
1293
|
-
if (resolvedSlashCommands &&
|
|
1294
|
-
filePath.startsWith(`${stripDotSlash(resolvedSlashCommands.rootRelativePath)}/`)) {
|
|
1295
|
-
continue;
|
|
1296
|
-
}
|
|
1297
|
-
codexFiles.add(filePath);
|
|
1298
|
-
}
|
|
1299
|
-
}
|
|
1300
|
-
for (const platform of PLATFORM_ORDER) {
|
|
1150
|
+
for (const platform of supportedPlatforms) {
|
|
1301
1151
|
const files = platformFiles[platform];
|
|
1302
|
-
if (!files)
|
|
1152
|
+
if (!files)
|
|
1303
1153
|
continue;
|
|
1154
|
+
const rules = buildConfig?.fileRules?.[platform];
|
|
1155
|
+
if (rules) {
|
|
1156
|
+
for (const filePath of applyFileRules(sourceFiles, rules.include, rules.exclude)) {
|
|
1157
|
+
files.add(filePath);
|
|
1158
|
+
}
|
|
1159
|
+
for (const filePath of [...files]) {
|
|
1160
|
+
if (applyFileRules([filePath], ['**/*'], rules.exclude).length === 0)
|
|
1161
|
+
files.delete(filePath);
|
|
1162
|
+
}
|
|
1304
1163
|
}
|
|
1305
1164
|
for (const filePath of files) {
|
|
1306
1165
|
await copyFileWithTemplateSupport(plugin.rootDir, outputRoot, filePath, platform, templatePatterns, templateVars);
|
|
1307
1166
|
}
|
|
1308
1167
|
}
|
|
1309
|
-
if (resolvedSlashCommands) {
|
|
1310
|
-
if (claudeManifest) {
|
|
1311
|
-
claudeManifest.commands = './claude/commands';
|
|
1312
|
-
}
|
|
1313
|
-
if (codexManifest) {
|
|
1314
|
-
codexManifest.skills ??= './codex/skills';
|
|
1315
|
-
}
|
|
1316
|
-
for (const command of resolvedSlashCommands.commands) {
|
|
1317
|
-
if (claudeManifest && command.claude) {
|
|
1318
|
-
await writeTextFile(path.join(outputRoot, 'claude', 'commands', `${command.name}.md`), renderClaudeSlashCommand(command));
|
|
1319
|
-
}
|
|
1320
|
-
if (codexManifest && command.codex) {
|
|
1321
|
-
await writeTextFile(path.join(outputRoot, 'codex', 'skills', command.name, 'SKILL.md'), renderCodexSlashCommandSkillMarkdown(command));
|
|
1322
|
-
await writeTextFile(path.join(outputRoot, 'codex', 'skills', command.name, 'agents', 'openai.yaml'), renderCodexSlashCommandOpenAiYaml(command));
|
|
1323
|
-
for (const asset of command.codex.assets) {
|
|
1324
|
-
await copySlashCommandAsset(plugin.rootDir, outputRoot, command.name, asset.sourceRelativePath, asset.generatedRelativePath);
|
|
1325
|
-
}
|
|
1326
|
-
}
|
|
1327
|
-
}
|
|
1328
|
-
}
|
|
1329
1168
|
await materializeSkillRuntimeFiles(skillRuntimeFileProjections);
|
|
1330
|
-
await copyPortableStaticSkills(plugin, outputRoot);
|
|
1331
1169
|
if (await fs.pathExists(path.join(plugin.rootDir, 'README.md'))) {
|
|
1332
1170
|
await copyBundleRootFile(plugin.rootDir, outputRoot, 'README.md');
|
|
1333
1171
|
}
|
|
1334
1172
|
for (const filePath of await collectAwRuntimeFiles(plugin)) {
|
|
1335
1173
|
await copyBundleRootFile(plugin.rootDir, outputRoot, filePath);
|
|
1336
1174
|
}
|
|
1175
|
+
if (plugin.manifest.skills) {
|
|
1176
|
+
const collection = stripDotSlash(plugin.manifest.skills);
|
|
1177
|
+
for (const file of await collectFilesForPath(plugin.rootDir, collection)) {
|
|
1178
|
+
const relative = path.posix.relative(collection, file);
|
|
1179
|
+
if (isSkillCollectionAuthorOnlyPath(relative))
|
|
1180
|
+
continue;
|
|
1181
|
+
await copyBundleRootFile(plugin.rootDir, outputRoot, file);
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
if (plugin.manifest.mcpServers) {
|
|
1185
|
+
await copyBundleRootFile(plugin.rootDir, outputRoot, stripDotSlash(plugin.manifest.mcpServers));
|
|
1186
|
+
}
|
|
1337
1187
|
await copyArtifactSourceDirectories(plugin, outputRoot);
|
|
1188
|
+
await copyManagedCommandPackage(plugin, outputRoot);
|
|
1338
1189
|
await copyProductionPackageRoot(plugin, outputRoot);
|
|
1339
1190
|
await materializeArtifactRuntimeImports(artifactRuntimeProjection.projections);
|
|
1340
1191
|
await writeJsonFile(path.join(outputRoot, '.agents-plugin', 'plugin.json'), bundleManifest);
|
|
@@ -1354,21 +1205,31 @@ export async function bundleLocalPlugin(plugin, outputRoot, options = {}) {
|
|
|
1354
1205
|
requiredCapabilities: finalEffective,
|
|
1355
1206
|
});
|
|
1356
1207
|
await validateSkillRuntimeProjectionSources(skillRuntimeFileProjections);
|
|
1357
|
-
await validateSkillRuntimeProjectionFreshness(outputRoot, skillRuntimeFiles
|
|
1208
|
+
await validateSkillRuntimeProjectionFreshness(outputRoot, skillRuntimeFiles);
|
|
1358
1209
|
await validateGeneratedSkillRuntimeFiles(plugin, outputRoot, supportedPlatforms);
|
|
1359
1210
|
if ((options.runtimeSkillClosureValidation ?? 'current') === 'current') {
|
|
1360
|
-
for (const platform of
|
|
1361
|
-
const
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1211
|
+
for (const platform of supportedPlatforms) {
|
|
1212
|
+
const root = path.join(outputRoot, platform, 'skills');
|
|
1213
|
+
for (const entry of await fs.readdir(root, { withFileTypes: true }).catch(() => [])) {
|
|
1214
|
+
const skillRoot = path.join(root, entry.name);
|
|
1215
|
+
if (platform !== 'codex' && platform !== 'claude') {
|
|
1216
|
+
await validatePortableSkillDirectory(skillRoot, { frontmatterProfile: 'claude-current' });
|
|
1217
|
+
}
|
|
1218
|
+
await validateRuntimeSkillClosure(skillRoot);
|
|
1219
|
+
}
|
|
1369
1220
|
}
|
|
1370
1221
|
}
|
|
1371
1222
|
await validateBuildImportProjectionSources(preparedBuildImportProjections.get(buildPlugin.runtimeContext) ?? []);
|
|
1223
|
+
// Git must retain the skills root declared by a dynamic-only Native bundle.
|
|
1224
|
+
for (const platform of PLATFORM_ORDER) {
|
|
1225
|
+
const manifest = platformManifests[platform];
|
|
1226
|
+
if (!manifest?.skills)
|
|
1227
|
+
continue;
|
|
1228
|
+
const skillsRoot = path.join(outputRoot, stripDotSlash(manifest.skills));
|
|
1229
|
+
if ((await fs.readdir(skillsRoot)).length === 0) {
|
|
1230
|
+
await fs.writeFile(path.join(skillsRoot, '.gitkeep'), '');
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1372
1233
|
return {
|
|
1373
1234
|
outputRoot,
|
|
1374
1235
|
plugin,
|