@lesliechan721/aw 0.1.0-beta.8 → 0.1.0-beta.81
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/scripts/add-skill.mjs +17 -40
- package/dist/authoring/scripts/add-skill.mjs.map +1 -1
- package/dist/authoring/scripts/init-plugin.mjs +74 -98
- 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 +79 -92
- package/dist/authoring/scripts/lib/skill-scaffold.mjs +103 -127
- package/dist/authoring/scripts/lib/skill-scaffold.mjs.map +1 -1
- package/dist/authoring/scripts/remove-plugin.mjs +2 -2
- package/dist/authoring/scripts/remove-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/validate-plugin.mjs +490 -2841
- package/dist/authoring/scripts/validate-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/validate-skill.mjs +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 +30 -0
- package/dist/scripts/aw-skill-eval-materializer.js +278 -0
- package/dist/scripts/aw-skill-eval-materializer.js.map +1 -0
- package/dist/scripts/bundle-plugins.d.ts +1 -0
- package/dist/scripts/bundle-plugins.js +27 -8
- package/dist/scripts/bundle-plugins.js.map +1 -1
- package/dist/scripts/plugin-staging.d.ts +7 -8
- package/dist/scripts/plugin-staging.js +16 -15
- 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 +273 -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 +5 -1
- 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 +2 -2
- package/dist/src/commands/aw-capabilities.js +41 -29
- package/dist/src/commands/aw-capabilities.js.map +1 -1
- package/dist/src/commands/catalog-dev-source.d.ts +58 -13
- package/dist/src/commands/catalog-dev-source.js +549 -305
- package/dist/src/commands/catalog-dev-source.js.map +1 -1
- package/dist/src/commands/catalog-generation.d.ts +14 -19
- package/dist/src/commands/catalog-generation.js +5 -10
- package/dist/src/commands/catalog-generation.js.map +1 -1
- package/dist/src/commands/catalog-publication-inspection.d.ts +70 -30
- package/dist/src/commands/catalog-publication-inspection.js +511 -91
- package/dist/src/commands/catalog-publication-inspection.js.map +1 -1
- package/dist/src/commands/catalog-publication-journal.d.ts +68 -0
- package/dist/src/commands/catalog-publication-journal.js +292 -0
- package/dist/src/commands/catalog-publication-journal.js.map +1 -0
- package/dist/src/commands/catalog-publication-target.d.ts +2 -1
- package/dist/src/commands/catalog-publication-target.js +37 -2
- package/dist/src/commands/catalog-publication-target.js.map +1 -1
- package/dist/src/commands/catalog-publish.d.ts +82 -15
- package/dist/src/commands/catalog-publish.js +722 -219
- package/dist/src/commands/catalog-publish.js.map +1 -1
- package/dist/src/commands/catalog-source.d.ts +55 -35
- package/dist/src/commands/catalog-source.js +298 -148
- package/dist/src/commands/catalog-source.js.map +1 -1
- package/dist/src/commands/catalog-status.d.ts +6 -26
- package/dist/src/commands/catalog-status.js +9 -147
- 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 +17 -0
- package/dist/src/commands/catalog-workspace-resolution.js +57 -0
- package/dist/src/commands/catalog-workspace-resolution.js.map +1 -0
- package/dist/src/commands/console.js +32 -20
- package/dist/src/commands/console.js.map +1 -1
- package/dist/src/commands/dependency-operation-plan.d.ts +52 -15
- package/dist/src/commands/dependency-operation-plan.js +289 -7
- package/dist/src/commands/dependency-operation-plan.js.map +1 -1
- package/dist/src/commands/deployment-confirmation.d.ts +4 -0
- package/dist/src/commands/deployment-confirmation.js +20 -0
- package/dist/src/commands/deployment-confirmation.js.map +1 -0
- package/dist/src/commands/init.d.ts +5 -11
- package/dist/src/commands/init.js +30 -51
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/intent-command.d.ts +32 -0
- package/dist/src/commands/intent-command.js +171 -0
- package/dist/src/commands/intent-command.js.map +1 -0
- package/dist/src/commands/managed-commands.d.ts +35 -0
- package/dist/src/commands/managed-commands.js +361 -0
- package/dist/src/commands/managed-commands.js.map +1 -0
- package/dist/src/commands/offline-cleanup-evidence.d.ts +46 -0
- package/dist/src/commands/offline-cleanup-evidence.js +158 -10
- package/dist/src/commands/offline-cleanup-evidence.js.map +1 -1
- package/dist/src/commands/operation-plan.d.ts +190 -0
- package/dist/src/commands/operation-plan.js +99 -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 +16 -20
- package/dist/src/commands/options.js +94 -41
- package/dist/src/commands/options.js.map +1 -1
- package/dist/src/commands/plugin-capabilities.js +88 -45
- package/dist/src/commands/plugin-capabilities.js.map +1 -1
- package/dist/src/commands/public-config-confirmation.d.ts +8 -0
- package/dist/src/commands/public-config-confirmation.js +56 -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 +102 -0
- package/dist/src/commands/public-lifecycle-result.js +307 -0
- package/dist/src/commands/public-lifecycle-result.js.map +1 -0
- package/dist/src/commands/public-lifecycle.d.ts +28 -0
- package/dist/src/commands/public-lifecycle.js +492 -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 +193 -0
- package/dist/src/commands/public-plugin-query.js.map +1 -0
- package/dist/src/commands/rebuild-command.d.ts +166 -28
- package/dist/src/commands/rebuild-command.js +3745 -813
- package/dist/src/commands/rebuild-command.js.map +1 -1
- package/dist/src/commands/rebuild-integration.d.ts +137 -25
- package/dist/src/commands/rebuild-integration.js +1343 -2535
- package/dist/src/commands/rebuild-integration.js.map +1 -1
- package/dist/src/commands/rebuild-operations.d.ts +73 -22
- package/dist/src/commands/rebuild-operations.js +313 -216
- package/dist/src/commands/rebuild-operations.js.map +1 -1
- package/dist/src/commands/rebuild-platform-integration.d.ts +62 -0
- package/dist/src/commands/rebuild-platform-integration.js +1317 -0
- package/dist/src/commands/rebuild-platform-integration.js.map +1 -0
- package/dist/src/commands/reconcile-operation-plan.d.ts +28 -0
- package/dist/src/commands/reconcile-operation-plan.js +47 -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 +41 -0
- package/dist/src/commands/skill-eval.js +407 -0
- package/dist/src/commands/skill-eval.js.map +1 -0
- package/dist/src/commands/status-v6.d.ts +319 -0
- package/dist/src/commands/status-v6.js +2979 -0
- package/dist/src/commands/status-v6.js.map +1 -0
- 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 +143 -85
- package/dist/src/commands/write-commands.js.map +1 -1
- package/dist/src/constants.d.ts +6 -6
- package/dist/src/constants.js +6 -6
- package/dist/src/constants.js.map +1 -1
- package/dist/src/eval/manifest-v1.d.ts +70 -0
- package/dist/src/eval/manifest-v1.js +358 -0
- package/dist/src/eval/manifest-v1.js.map +1 -0
- package/dist/src/generators/local-plugin.d.ts +7 -2
- package/dist/src/generators/local-plugin.js +313 -389
- package/dist/src/generators/local-plugin.js.map +1 -1
- package/dist/src/generators/permissions.d.ts +5 -2
- package/dist/src/generators/permissions.js +28 -15
- package/dist/src/generators/permissions.js.map +1 -1
- package/dist/src/index.d.ts +2 -31
- package/dist/src/index.js +1666 -1827
- 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 +33 -0
- package/dist/src/intent/scope-context.js +149 -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 +47 -46
- package/dist/src/output/command-receipt.js +286 -79
- package/dist/src/output/command-receipt.js.map +1 -1
- package/dist/src/output/model.d.ts +3 -11
- package/dist/src/output/native-consent.d.ts +2 -0
- package/dist/src/output/native-consent.js +5 -0
- package/dist/src/output/native-consent.js.map +1 -0
- package/dist/src/output/public-result.d.ts +49 -0
- package/dist/src/output/public-result.js +240 -0
- package/dist/src/output/public-result.js.map +1 -0
- package/dist/src/output/rebuild-progress.js +20 -15
- 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 +592 -0
- package/dist/src/output/receipt-projection.js.map +1 -0
- package/dist/src/platforms/capabilities.d.ts +12 -0
- package/dist/src/platforms/capabilities.js +205 -0
- package/dist/src/platforms/capabilities.js.map +1 -0
- package/dist/src/platforms/contracts.d.ts +358 -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 +91 -0
- package/dist/src/platforms/discovery.js +653 -0
- package/dist/src/platforms/discovery.js.map +1 -0
- package/dist/src/platforms/gemini-activation.d.ts +36 -0
- package/dist/src/platforms/gemini-activation.js +331 -0
- package/dist/src/platforms/gemini-activation.js.map +1 -0
- package/dist/src/platforms/gemini-consent.d.ts +8 -0
- package/dist/src/platforms/gemini-consent.js +81 -0
- package/dist/src/platforms/gemini-consent.js.map +1 -0
- package/dist/src/platforms/identity.d.ts +4 -0
- package/dist/src/platforms/identity.js +22 -0
- package/dist/src/platforms/identity.js.map +1 -0
- package/dist/src/platforms/inspection-grok.d.ts +4 -0
- package/dist/src/platforms/inspection-grok.js +212 -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 +406 -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 +3 -0
- package/dist/src/platforms/inspection-pi.js +282 -0
- package/dist/src/platforms/inspection-pi.js.map +1 -0
- package/dist/src/platforms/inspection-query.d.ts +12 -0
- package/dist/src/platforms/inspection-query.js +96 -0
- package/dist/src/platforms/inspection-query.js.map +1 -0
- package/dist/src/platforms/inspection.d.ts +17 -0
- package/dist/src/platforms/inspection.js +227 -0
- package/dist/src/platforms/inspection.js.map +1 -0
- package/dist/src/platforms/layout.d.ts +21 -0
- package/dist/src/platforms/layout.js +239 -0
- package/dist/src/platforms/layout.js.map +1 -0
- package/dist/src/platforms/lifecycle-native-services.d.ts +3 -0
- package/dist/src/platforms/lifecycle-native-services.js +147 -0
- package/dist/src/platforms/lifecycle-native-services.js.map +1 -0
- package/dist/src/platforms/lifecycle-native.d.ts +13 -0
- package/dist/src/platforms/lifecycle-native.js +283 -0
- package/dist/src/platforms/lifecycle-native.js.map +1 -0
- package/dist/src/platforms/lifecycle.d.ts +25 -0
- package/dist/src/platforms/lifecycle.js +494 -0
- package/dist/src/platforms/lifecycle.js.map +1 -0
- package/dist/src/platforms/managed-command-placement.d.ts +8 -0
- package/dist/src/platforms/managed-command-placement.js +79 -0
- package/dist/src/platforms/managed-command-placement.js.map +1 -0
- package/dist/src/platforms/projection-code-extension.d.ts +8 -0
- package/dist/src/platforms/projection-code-extension.js +121 -0
- package/dist/src/platforms/projection-code-extension.js.map +1 -0
- package/dist/src/platforms/projection-command-resources.d.ts +7 -0
- package/dist/src/platforms/projection-command-resources.js +74 -0
- package/dist/src/platforms/projection-command-resources.js.map +1 -0
- package/dist/src/platforms/projection-files.d.ts +27 -0
- package/dist/src/platforms/projection-files.js +111 -0
- package/dist/src/platforms/projection-files.js.map +1 -0
- package/dist/src/platforms/projection-marketplace.d.ts +19 -0
- package/dist/src/platforms/projection-marketplace.js +42 -0
- package/dist/src/platforms/projection-marketplace.js.map +1 -0
- package/dist/src/platforms/projection.d.ts +10 -0
- package/dist/src/platforms/projection.js +446 -0
- package/dist/src/platforms/projection.js.map +1 -0
- package/dist/src/platforms/registry.d.ts +4 -0
- package/dist/src/platforms/registry.js +30 -0
- package/dist/src/platforms/registry.js.map +1 -0
- package/dist/src/platforms/supplement-layout.d.ts +16 -0
- package/dist/src/platforms/supplement-layout.js +31 -0
- package/dist/src/platforms/supplement-layout.js.map +1 -0
- package/dist/src/platforms/supplement-state.d.ts +13 -0
- package/dist/src/platforms/supplement-state.js +82 -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 +94 -350
- 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 +24 -4
- package/dist/src/portable/materializer.js +189 -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 +153 -0
- package/dist/src/portable/recovery.js +367 -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 +141 -0
- package/dist/src/recovery/coordinator.js +1254 -0
- package/dist/src/recovery/coordinator.js.map +1 -0
- package/dist/src/recovery/demand.d.ts +51 -0
- package/dist/src/recovery/demand.js +159 -0
- package/dist/src/recovery/demand.js.map +1 -0
- package/dist/src/recovery/joint-coordinator.d.ts +25 -0
- package/dist/src/recovery/joint-coordinator.js +991 -0
- package/dist/src/recovery/joint-coordinator.js.map +1 -0
- package/dist/src/recovery/joint-demand.d.ts +50 -0
- package/dist/src/recovery/joint-demand.js +197 -0
- package/dist/src/recovery/joint-demand.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 +98 -0
- package/dist/src/recovery/receipt.js +2 -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 +469 -0
- package/dist/src/recovery/retirement.js.map +1 -0
- package/dist/src/recovery/status.d.ts +126 -0
- package/dist/src/recovery/status.js +1073 -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 +43 -0
- package/dist/src/review/eval-source-input.js +207 -0
- package/dist/src/review/eval-source-input.js.map +1 -0
- package/dist/src/review/platform-profile.d.ts +3 -0
- package/dist/src/review/platform-profile.js +14 -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 +495 -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 +62 -0
- package/dist/src/review/skill-materialization.js +205 -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 +773 -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 +18 -53
- package/dist/src/tui/catalog-generation.js +136 -224
- 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 -36
- package/dist/src/tui/components.js.map +1 -1
- package/dist/src/tui/config-array-draft.d.ts +29 -0
- package/dist/src/tui/config-array-draft.js +48 -0
- package/dist/src/tui/config-array-draft.js.map +1 -0
- package/dist/src/tui/config-leaf-editor.d.ts +43 -0
- package/dist/src/tui/config-leaf-editor.js +224 -0
- package/dist/src/tui/config-leaf-editor.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-value-presentation.d.ts +20 -0
- package/dist/src/tui/config-value-presentation.js +104 -0
- package/dist/src/tui/config-value-presentation.js.map +1 -0
- package/dist/src/tui/console-app-v4.d.ts +13 -4
- package/dist/src/tui/console-app-v4.js +9764 -2210
- 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 +7 -4
- package/dist/src/tui/controller-runtime.js +2064 -779
- package/dist/src/tui/controller-runtime.js.map +1 -1
- package/dist/src/tui/controller.d.ts +669 -106
- package/dist/src/tui/controller.js +3617 -971
- 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 +10 -0
- package/dist/src/tui/deployment-view.js +108 -0
- package/dist/src/tui/deployment-view.js.map +1 -0
- package/dist/src/tui/diagnostic-projection.d.ts +23 -0
- package/dist/src/tui/diagnostic-projection.js +595 -0
- package/dist/src/tui/diagnostic-projection.js.map +1 -0
- package/dist/src/tui/diagnostics.d.ts +6 -3
- 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 +55 -0
- package/dist/src/tui/entity-cards.js +298 -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 +72 -0
- package/dist/src/tui/glossary.js.map +1 -0
- package/dist/src/tui/index.d.ts +6 -2
- package/dist/src/tui/index.js +5 -2
- 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 +243 -45
- package/dist/src/tui/model.js +1402 -415
- 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 +72 -0
- package/dist/src/tui/operation-diagnostic-screens.js.map +1 -0
- package/dist/src/tui/operation-history.d.ts +82 -0
- package/dist/src/tui/operation-history.js +136 -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 +1396 -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 +72 -0
- package/dist/src/tui/plugin-detail.js +260 -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 +186 -35
- 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 +45 -0
- package/dist/src/tui/scoped-flow.js +96 -0
- package/dist/src/tui/scoped-flow.js.map +1 -0
- package/dist/src/tui/scoped-inventory.d.ts +126 -0
- package/dist/src/tui/scoped-inventory.js +258 -0
- package/dist/src/tui/scoped-inventory.js.map +1 -0
- package/dist/src/tui/screen-registry.d.ts +701 -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 +6 -0
- package/dist/src/tui/session-console-app.js +13 -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 +220 -118
- package/dist/src/types.js +1 -0
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils/agent-version.d.ts +13 -4
- package/dist/src/utils/agent-version.js +27 -4
- package/dist/src/utils/agent-version.js.map +1 -1
- package/dist/src/utils/artifact-plan.d.ts +33 -7
- package/dist/src/utils/artifact-plan.js +115 -430
- package/dist/src/utils/artifact-plan.js.map +1 -1
- package/dist/src/utils/artifact-renderer.d.ts +114 -83
- package/dist/src/utils/artifact-renderer.js +213 -364
- package/dist/src/utils/artifact-renderer.js.map +1 -1
- package/dist/src/utils/artifact-request.d.ts +44 -0
- package/dist/src/utils/artifact-request.js +80 -0
- package/dist/src/utils/artifact-request.js.map +1 -0
- package/dist/src/utils/artifact-sources.d.ts +6 -2
- package/dist/src/utils/artifact-sources.js +17 -0
- package/dist/src/utils/artifact-sources.js.map +1 -1
- package/dist/src/utils/bundle-layout.js +57 -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 -2
- package/dist/src/utils/catalog-digests.js +7 -18
- package/dist/src/utils/catalog-digests.js.map +1 -1
- package/dist/src/utils/catalog-generation-control-snapshot.d.ts +11 -0
- package/dist/src/utils/catalog-generation-control-snapshot.js +45 -0
- package/dist/src/utils/catalog-generation-control-snapshot.js.map +1 -0
- package/dist/src/utils/catalog-generation-error.d.ts +5 -1
- package/dist/src/utils/catalog-generation-error.js +14 -0
- package/dist/src/utils/catalog-generation-error.js.map +1 -1
- package/dist/src/utils/catalog-generation-resolver.d.ts +36 -5
- package/dist/src/utils/catalog-generation-resolver.js +221 -77
- package/dist/src/utils/catalog-generation-resolver.js.map +1 -1
- package/dist/src/utils/catalog-generation-service.d.ts +159 -28
- package/dist/src/utils/catalog-generation-service.js +1186 -525
- package/dist/src/utils/catalog-generation-service.js.map +1 -1
- package/dist/src/utils/catalog-generation-state.d.ts +9 -0
- package/dist/src/utils/catalog-generation-state.js +97 -106
- package/dist/src/utils/catalog-generation-state.js.map +1 -1
- package/dist/src/utils/catalog-generation-store.d.ts +38 -24
- package/dist/src/utils/catalog-generation-store.js +337 -272
- 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-v5.js → catalog-manifest-v7.js} +23 -35
- package/dist/src/utils/catalog-manifest-v7.js.map +1 -0
- package/dist/src/utils/catalog-operation-context.d.ts +6 -14
- package/dist/src/utils/catalog-operation-context.js +69 -169
- package/dist/src/utils/catalog-operation-context.js.map +1 -1
- package/dist/src/utils/catalog-public-error.js +8 -4
- package/dist/src/utils/catalog-public-error.js.map +1 -1
- package/dist/src/utils/catalog-runtime-projection.d.ts +7 -3
- package/dist/src/utils/catalog-runtime-projection.js +5 -40
- package/dist/src/utils/catalog-runtime-projection.js.map +1 -1
- package/dist/src/utils/catalog-snapshot.d.ts +2 -2
- 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 +23 -2
- package/dist/src/utils/catalog-source-references.js +456 -382
- 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 +178 -18
- package/dist/src/utils/catalog-sources.js.map +1 -1
- package/dist/src/utils/codex-config.d.ts +2 -0
- package/dist/src/utils/codex-config.js +22 -1
- 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 +47 -18
- package/dist/src/utils/codex-manager.js +88 -622
- 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 +49 -0
- package/dist/src/utils/codex-native-observation.js +169 -0
- package/dist/src/utils/codex-native-observation.js.map +1 -0
- package/dist/src/utils/codex-reconciler.d.ts +123 -0
- package/dist/src/utils/codex-reconciler.js +322 -0
- package/dist/src/utils/codex-reconciler.js.map +1 -0
- package/dist/src/utils/codex-shared-native.d.ts +45 -0
- package/dist/src/utils/codex-shared-native.js +122 -0
- package/dist/src/utils/codex-shared-native.js.map +1 -0
- 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 +49 -0
- package/dist/src/utils/codex-surface-analysis.js +220 -0
- package/dist/src/utils/codex-surface-analysis.js.map +1 -0
- package/dist/src/utils/component-command-preparation.d.ts +34 -0
- package/dist/src/utils/component-command-preparation.js +228 -0
- package/dist/src/utils/component-command-preparation.js.map +1 -0
- package/dist/src/utils/component-resources.d.ts +51 -0
- package/dist/src/utils/component-resources.js +322 -0
- package/dist/src/utils/component-resources.js.map +1 -0
- package/dist/src/utils/dynamic-skill-tree.d.ts +18 -6
- package/dist/src/utils/dynamic-skill-tree.js +32 -9
- 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 +167 -120
- 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-closure.d.ts +3 -0
- package/dist/src/utils/managed-command-closure.js +35 -0
- package/dist/src/utils/managed-command-closure.js.map +1 -0
- package/dist/src/utils/managed-command-evidence.d.ts +7 -0
- package/dist/src/utils/managed-command-evidence.js +10 -0
- package/dist/src/utils/managed-command-evidence.js.map +1 -0
- package/dist/src/utils/managed-command-materialization.d.ts +124 -0
- package/dist/src/utils/managed-command-materialization.js +369 -0
- package/dist/src/utils/managed-command-materialization.js.map +1 -0
- package/dist/src/utils/managed-command-preparation.d.ts +67 -0
- package/dist/src/utils/managed-command-preparation.js +146 -0
- package/dist/src/utils/managed-command-preparation.js.map +1 -0
- package/dist/src/utils/managed-command-review.d.ts +26 -0
- package/dist/src/utils/managed-command-review.js +68 -0
- package/dist/src/utils/managed-command-review.js.map +1 -0
- package/dist/src/utils/managed-command-runtime.d.ts +33 -0
- package/dist/src/utils/managed-command-runtime.js +121 -0
- package/dist/src/utils/managed-command-runtime.js.map +1 -0
- package/dist/src/utils/managed-command-store.d.ts +143 -0
- package/dist/src/utils/managed-command-store.js +665 -0
- package/dist/src/utils/managed-command-store.js.map +1 -0
- package/dist/src/utils/manifest.d.ts +1 -3
- package/dist/src/utils/manifest.js +1 -3
- package/dist/src/utils/manifest.js.map +1 -1
- package/dist/src/utils/multi-source-catalog.d.ts +1 -10
- package/dist/src/utils/multi-source-catalog.js +9 -175
- package/dist/src/utils/multi-source-catalog.js.map +1 -1
- package/dist/src/utils/native-cli.d.ts +74 -5
- package/dist/src/utils/native-cli.js +479 -31
- 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 +14 -0
- package/dist/src/utils/native-tool-context.js +38 -0
- package/dist/src/utils/native-tool-context.js.map +1 -0
- package/dist/src/utils/native-tool-review.d.ts +18 -0
- package/dist/src/utils/native-tool-review.js +116 -0
- package/dist/src/utils/native-tool-review.js.map +1 -0
- package/dist/src/utils/orphan-marketplace-cleanup.js +0 -1
- package/dist/src/utils/orphan-marketplace-cleanup.js.map +1 -1
- package/dist/src/utils/ownership.d.ts +103 -21
- package/dist/src/utils/ownership.js +232 -210
- package/dist/src/utils/ownership.js.map +1 -1
- package/dist/src/utils/path-catalog-provider.d.ts +1 -1
- package/dist/src/utils/path-catalog-provider.js +47 -62
- package/dist/src/utils/path-catalog-provider.js.map +1 -1
- package/dist/src/utils/paths.d.ts +1 -2
- package/dist/src/utils/paths.js +5 -3
- package/dist/src/utils/paths.js.map +1 -1
- package/dist/src/utils/platform-empty-state.d.ts +45 -0
- package/dist/src/utils/platform-empty-state.js +159 -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-impact.d.ts +64 -0
- package/dist/src/utils/plugin-config-impact.js +307 -0
- package/dist/src/utils/plugin-config-impact.js.map +1 -0
- package/dist/src/utils/plugin-config-references.d.ts +89 -0
- package/dist/src/utils/plugin-config-references.js +335 -0
- package/dist/src/utils/plugin-config-references.js.map +1 -0
- package/dist/src/utils/plugin-config-write.d.ts +109 -27
- package/dist/src/utils/plugin-config-write.js +1242 -348
- package/dist/src/utils/plugin-config-write.js.map +1 -1
- package/dist/src/utils/plugin-config.d.ts +187 -109
- package/dist/src/utils/plugin-config.js +916 -1147
- 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 +78 -127
- package/dist/src/utils/plugin-scripts.js +566 -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 +18 -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/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 +4 -3
- package/dist/src/utils/target-eligibility.js +12 -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 +105 -9
- package/dist/vitest.config.js.map +1 -1
- package/package.json +30 -21
- package/dist/scripts/aw-skill-eval-engine.d.ts +0 -13
- package/dist/scripts/aw-skill-eval-engine.js +0 -31
- package/dist/scripts/aw-skill-eval-engine.js.map +0 -1
- package/dist/scripts/codex-eval-app-server.d.ts +0 -91
- package/dist/scripts/codex-eval-app-server.js +0 -1334
- package/dist/scripts/codex-eval-app-server.js.map +0 -1
- package/dist/scripts/codex-eval-isolation.d.ts +0 -61
- package/dist/scripts/codex-eval-isolation.js +0 -318
- package/dist/scripts/codex-eval-isolation.js.map +0 -1
- package/dist/scripts/codex-eval-process-management.d.ts +0 -8
- package/dist/scripts/codex-eval-process-management.js +0 -69
- package/dist/scripts/codex-eval-process-management.js.map +0 -1
- package/dist/scripts/codex-eval-process-tree.d.ts +0 -38
- package/dist/scripts/codex-eval-process-tree.js +0 -803
- package/dist/scripts/codex-eval-process-tree.js.map +0 -1
- package/dist/scripts/codex-eval-runtime-config.d.ts +0 -62
- package/dist/scripts/codex-eval-runtime-config.js +0 -843
- package/dist/scripts/codex-eval-runtime-config.js.map +0 -1
- package/dist/scripts/codex-trigger-eval.d.ts +0 -84
- package/dist/scripts/codex-trigger-eval.js +0 -968
- package/dist/scripts/codex-trigger-eval.js.map +0 -1
- package/dist/scripts/eval-plugin-skills-audited.d.ts +0 -6
- package/dist/scripts/eval-plugin-skills-audited.js +0 -261
- package/dist/scripts/eval-plugin-skills-audited.js.map +0 -1
- package/dist/scripts/eval-plugin-skills.d.ts +0 -45
- package/dist/scripts/eval-plugin-skills.js +0 -1589
- package/dist/scripts/eval-plugin-skills.js.map +0 -1
- package/dist/scripts/eval-run-layout.d.ts +0 -17
- package/dist/scripts/eval-run-layout.js +0 -26
- package/dist/scripts/eval-run-layout.js.map +0 -1
- package/dist/scripts/plugin-eval-contract.d.ts +0 -189
- package/dist/scripts/plugin-eval-contract.js +0 -745
- package/dist/scripts/plugin-eval-contract.js.map +0 -1
- package/dist/scripts/plugin-eval-materializer.d.ts +0 -13
- package/dist/scripts/plugin-eval-materializer.js +0 -421
- package/dist/scripts/plugin-eval-materializer.js.map +0 -1
- package/dist/scripts/skill-reporting.d.ts +0 -212
- package/dist/scripts/skill-reporting.js +0 -922
- package/dist/scripts/skill-reporting.js.map +0 -1
- package/dist/src/commands/catalog-context.d.ts +0 -52
- package/dist/src/commands/catalog-context.js +0 -156
- package/dist/src/commands/catalog-context.js.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/status-v5.d.ts +0 -169
- package/dist/src/commands/status-v5.js +0 -1135
- package/dist/src/commands/status-v5.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-v5.d.ts +0 -5
- package/dist/src/utils/catalog-manifest-v5.js.map +0 -1
- package/dist/src/utils/catalog-source-cache.d.ts +0 -62
- package/dist/src/utils/catalog-source-cache.js +0 -321
- package/dist/src/utils/catalog-source-cache.js.map +0 -1
- package/dist/src/utils/codex-project-surface.d.ts +0 -3
- package/dist/src/utils/codex-project-surface.js +0 -49
- package/dist/src/utils/codex-project-surface.js.map +0 -1
- 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-release.d.ts +0 -2
- package/dist/src/utils/plugin-release.js +0 -2
- package/dist/src/utils/plugin-release.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, validateManagedCommandSources, 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, createAwPluginRequirementsReceipt, createBundleSourceManifest, createPlatformManifestBase, isIgnoredPluginInputDirectory, normalizePluginRelativePath, readPluginManifest, resolvePluginRequirements, } from '../utils/manifest.js';
|
|
11
|
+
import { validateManagedCommandPackageClosure } 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
|
-
|
|
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.');
|
|
50
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,77 @@ 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
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
&& !isSkillCollectionAuthorOnlyPath(relative);
|
|
291
|
-
},
|
|
292
|
-
});
|
|
260
|
+
async function copyManagedCommandPackages(plugin, outputRoot) {
|
|
261
|
+
await validateManagedCommandSources(plugin.rootDir, plugin.manifest);
|
|
262
|
+
for (const commandPackage of plugin.manifest.managedCommands?.packages ?? []) {
|
|
263
|
+
const relativePath = stripDotSlash(commandPackage.sourceDir);
|
|
264
|
+
await fs.copy(path.join(plugin.rootDir, relativePath), path.join(outputRoot, relativePath), {
|
|
265
|
+
overwrite: true,
|
|
266
|
+
dereference: false,
|
|
267
|
+
});
|
|
268
|
+
const entries = (plugin.manifest.managedCommands?.sets ?? []).flatMap((set) => set.producer.kind === 'package' && set.producer.packageKey === commandPackage.key && set.mode === 'static' ? set.entries : []);
|
|
269
|
+
await validateManagedCommandPackageClosure(path.join(outputRoot, relativePath), entries);
|
|
270
|
+
}
|
|
271
|
+
await validateManagedCommandSources(outputRoot, plugin.manifest);
|
|
293
272
|
}
|
|
294
273
|
async function resolveArtifactRuntimeImports(options) {
|
|
295
|
-
const manifest = createBundleSourceManifest(options.plugin
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
}
|
|
301
|
-
const resolution = await options.resolver.resolve({
|
|
302
|
-
consumer: options.plugin,
|
|
303
|
-
reference: runtimeImport,
|
|
304
|
-
purpose: 'artifact-runtime',
|
|
305
|
-
});
|
|
306
|
-
const relativePath = `./.agents-plugin/runtime-imports/${target.id}/${runtimeImport.name}`;
|
|
307
|
-
const targetPath = path.join(options.outputRoot, stripDotSlash(relativePath));
|
|
308
|
-
await fs.ensureDir(path.dirname(targetPath));
|
|
309
|
-
await fs.copyFile(resolution.sourcePath, targetPath);
|
|
310
|
-
const digest = await calculateFileDigest(targetPath);
|
|
311
|
-
if (digest !== resolution.sourceDigest) {
|
|
312
|
-
throw new Error(`Artifact runtime import digest mismatch at "${target.id}/${runtimeImport.name}".`);
|
|
313
|
-
}
|
|
314
|
-
runtimeImport.resolved = {
|
|
315
|
-
path: relativePath,
|
|
316
|
-
digest,
|
|
317
|
-
providerPluginId: resolution.provider,
|
|
318
|
-
providerVersion: resolution.providerVersion,
|
|
319
|
-
source: resolution.source,
|
|
320
|
-
};
|
|
274
|
+
const manifest = createBundleSourceManifest(options.plugin);
|
|
275
|
+
const requiredCapabilities = [];
|
|
276
|
+
const projections = [];
|
|
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.`);
|
|
321
280
|
}
|
|
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
|
+
};
|
|
322
298
|
}
|
|
323
|
-
|
|
324
|
-
manifest
|
|
299
|
+
return {
|
|
300
|
+
manifest,
|
|
301
|
+
requiredCapabilities: normalizeAwCapabilities(requiredCapabilities),
|
|
302
|
+
projections,
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
async function materializeArtifactRuntimeImports(projections) {
|
|
306
|
+
for (const projection of projections) {
|
|
307
|
+
await fs.ensureDir(path.dirname(projection.targetPath));
|
|
308
|
+
await fs.copyFile(projection.sourcePath, projection.targetPath);
|
|
309
|
+
if (await calculateFileDigest(projection.targetPath) !== projection.sourceDigest) {
|
|
310
|
+
throw new Error(`Artifact runtime import digest mismatch at "${projection.label}".`);
|
|
311
|
+
}
|
|
325
312
|
}
|
|
326
|
-
return manifest;
|
|
327
313
|
}
|
|
328
314
|
async function injectRequirementsReceipts(options) {
|
|
329
315
|
const receipt = createAwPluginRequirementsReceipt({ name: options.plugin.manifest.name, version: options.plugin.manifest.version }, options.requiredCapabilities);
|
|
330
|
-
for (const relativeRoot of
|
|
316
|
+
for (const relativeRoot of PLATFORM_TARGETS.map((platform) => `${platform}/skills`)) {
|
|
331
317
|
const skillsRoot = path.join(options.outputRoot, relativeRoot);
|
|
332
318
|
if (!(await fs.pathExists(skillsRoot)))
|
|
333
319
|
continue;
|
|
@@ -345,12 +331,6 @@ async function injectRequirementsReceipts(options) {
|
|
|
345
331
|
}
|
|
346
332
|
}
|
|
347
333
|
}
|
|
348
|
-
async function copySlashCommandAsset(pluginRoot, outputRoot, skillName, sourceRelativePath, generatedRelativePath) {
|
|
349
|
-
const sourcePath = path.join(pluginRoot, sourceRelativePath);
|
|
350
|
-
const targetPath = path.join(outputRoot, 'codex', 'skills', skillName, stripDotSlash(generatedRelativePath));
|
|
351
|
-
await fs.ensureDir(path.dirname(targetPath));
|
|
352
|
-
await fs.copyFile(sourcePath, targetPath);
|
|
353
|
-
}
|
|
354
334
|
async function addDeclaredPathFiles(plugin, platform, relativePath, targetFiles) {
|
|
355
335
|
if (!relativePath) {
|
|
356
336
|
return undefined;
|
|
@@ -365,18 +345,11 @@ async function addDeclaredSkillPathFiles(plugin, platform, relativePath, targetF
|
|
|
365
345
|
if (!relativePath)
|
|
366
346
|
return undefined;
|
|
367
347
|
const root = stripDotSlash(relativePath);
|
|
368
|
-
const dynamicSkillKeys = new Set((plugin.manifest.artifacts?.targets ?? [])
|
|
369
|
-
.filter((target) => target.platform === platform &&
|
|
370
|
-
(target.target === 'codex.skill' || target.target === 'claude.skill') &&
|
|
371
|
-
target.skillKey)
|
|
372
|
-
.map((target) => target.skillKey));
|
|
373
348
|
const files = await collectFilesForPath(plugin.rootDir, relativePath);
|
|
374
349
|
let added = false;
|
|
375
350
|
for (const filePath of files) {
|
|
376
351
|
const skillCollectionPath = path.posix.relative(root.split(path.sep).join('/'), filePath.split(path.sep).join('/'));
|
|
377
|
-
|
|
378
|
-
if (!dynamicSkillKeys.has(skillKey ?? '') &&
|
|
379
|
-
!isSkillCollectionAuthorOnlyPath(skillCollectionPath)) {
|
|
352
|
+
if (!isSkillCollectionAuthorOnlyPath(skillCollectionPath)) {
|
|
380
353
|
targetFiles.add(filePath);
|
|
381
354
|
added = true;
|
|
382
355
|
}
|
|
@@ -400,87 +373,20 @@ function isDeclaredSkillAuthorOnlyFile(plugin, filePath) {
|
|
|
400
373
|
if (staticRelative && isSkillCollectionAuthorOnlyPath(staticRelative))
|
|
401
374
|
return true;
|
|
402
375
|
}
|
|
403
|
-
for (const
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
continue;
|
|
407
|
-
const dynamicRoot = `skills/${target.skillKey}`;
|
|
408
|
-
const dynamicRelative = relativePathInside(dynamicRoot, normalizedFile);
|
|
409
|
-
if (dynamicRelative && isSkillAuthorOnlyPath(dynamicRelative))
|
|
376
|
+
for (const sourceDir of plugin.manifest.artifacts?.sourceDirs ?? []) {
|
|
377
|
+
const sourceRelative = relativePathInside(stripDotSlash(sourceDir), normalizedFile);
|
|
378
|
+
if (sourceRelative && isSkillAuthorOnlyPath(sourceRelative))
|
|
410
379
|
return true;
|
|
411
|
-
for (const sourceDir of target.sourceDirs ?? []) {
|
|
412
|
-
const sourceRelative = relativePathInside(stripDotSlash(sourceDir).split(path.sep).join('/'), normalizedFile);
|
|
413
|
-
if (sourceRelative && isSkillAuthorOnlyPath(sourceRelative))
|
|
414
|
-
return true;
|
|
415
|
-
}
|
|
416
380
|
}
|
|
417
381
|
return false;
|
|
418
382
|
}
|
|
419
|
-
function
|
|
420
|
-
const
|
|
421
|
-
|
|
422
|
-
if (target.platform !== platform ||
|
|
423
|
-
(target.target !== 'codex.skill' && target.target !== 'claude.skill') ||
|
|
424
|
-
!target.skillKey)
|
|
425
|
-
return false;
|
|
426
|
-
return relativePathInside(`skills/${target.skillKey}`, normalizedFile) !== null;
|
|
427
|
-
});
|
|
428
|
-
}
|
|
429
|
-
async function addDeclaredLspServerFiles(plugin, value, targetFiles) {
|
|
430
|
-
if (value === undefined) {
|
|
431
|
-
return undefined;
|
|
432
|
-
}
|
|
433
|
-
if (typeof value === 'string') {
|
|
434
|
-
const normalized = normalizePluginRelativePath(plugin.rootDir, value, 'buildConfig.manifestOverrides.claude.lspServers');
|
|
435
|
-
const files = await collectFilesForPath(plugin.rootDir, normalized);
|
|
436
|
-
for (const filePath of files) {
|
|
437
|
-
targetFiles.add(filePath);
|
|
438
|
-
}
|
|
439
|
-
return toPlatformRelativePath(normalized, 'claude');
|
|
440
|
-
}
|
|
441
|
-
if (Array.isArray(value)) {
|
|
442
|
-
const rendered = [];
|
|
443
|
-
for (const entry of value) {
|
|
444
|
-
if (typeof entry === 'string') {
|
|
445
|
-
const normalized = normalizePluginRelativePath(plugin.rootDir, entry, 'buildConfig.manifestOverrides.claude.lspServers');
|
|
446
|
-
const files = await collectFilesForPath(plugin.rootDir, normalized);
|
|
447
|
-
for (const filePath of files) {
|
|
448
|
-
targetFiles.add(filePath);
|
|
449
|
-
}
|
|
450
|
-
rendered.push(toPlatformRelativePath(normalized, 'claude'));
|
|
451
|
-
}
|
|
452
|
-
else {
|
|
453
|
-
rendered.push(entry);
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
return rendered;
|
|
457
|
-
}
|
|
458
|
-
return value;
|
|
459
|
-
}
|
|
460
|
-
function isNodeRuntimeEntry(entry) {
|
|
461
|
-
return entry.runner === 'node' || (entry.runner === 'auto' &&
|
|
462
|
-
NODE_RUNTIME_EXTENSIONS.has(path.posix.extname(entry.path).toLowerCase()));
|
|
463
|
-
}
|
|
464
|
-
function addLifecycleRuntimeEntries(plugin, rootFiles, nodeEntries) {
|
|
465
|
-
const lifecycle = plugin.manifest.scripts?.lifecycle;
|
|
466
|
-
if (!lifecycle) {
|
|
383
|
+
function addPreApplyRuntimeEntry(plugin, rootFiles, nodeEntries) {
|
|
384
|
+
const entry = plugin.manifest.scripts?.preApply;
|
|
385
|
+
if (!entry)
|
|
467
386
|
return;
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
continue;
|
|
472
|
-
}
|
|
473
|
-
for (const entry of Object.values(selector)) {
|
|
474
|
-
if (!entry) {
|
|
475
|
-
continue;
|
|
476
|
-
}
|
|
477
|
-
const filePath = stripDotSlash(entry.path);
|
|
478
|
-
rootFiles.add(filePath);
|
|
479
|
-
if (isNodeRuntimeEntry(entry)) {
|
|
480
|
-
nodeEntries.add(filePath);
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
}
|
|
387
|
+
const filePath = stripDotSlash(entry.path);
|
|
388
|
+
rootFiles.add(filePath);
|
|
389
|
+
nodeEntries.add(filePath);
|
|
484
390
|
}
|
|
485
391
|
function addHelperRuntimeEntries(plugin, rootFiles, nodeEntries) {
|
|
486
392
|
const configHelper = plugin.manifest.scripts?.helpers?.config;
|
|
@@ -544,6 +450,7 @@ async function collectRuntimeClosureFiles(plugin, entryFiles) {
|
|
|
544
450
|
entryFiles,
|
|
545
451
|
dependencies,
|
|
546
452
|
devDependencies,
|
|
453
|
+
runtimeConfigSkillRoots: plugin.manifest.artifacts?.sourceDirs ?? [],
|
|
547
454
|
});
|
|
548
455
|
if (scan.errors.length > 0) {
|
|
549
456
|
throw new Error(`Invalid scripts.node runtime imports:\n${scan.errors.join('\n')}`);
|
|
@@ -553,12 +460,25 @@ async function collectRuntimeClosureFiles(plugin, entryFiles) {
|
|
|
553
460
|
async function collectAwRuntimeFiles(plugin) {
|
|
554
461
|
const rootFiles = new Set();
|
|
555
462
|
const nodeEntries = new Set();
|
|
556
|
-
|
|
463
|
+
addPreApplyRuntimeEntry(plugin, rootFiles, nodeEntries);
|
|
557
464
|
addHelperRuntimeEntries(plugin, rootFiles, nodeEntries);
|
|
558
465
|
addArtifactRendererRuntimeEntry(plugin, rootFiles, nodeEntries);
|
|
559
|
-
|
|
466
|
+
if (plugin.manifest.nativeTools) {
|
|
467
|
+
rootFiles.add(stripDotSlash(plugin.manifest.nativeTools.reader));
|
|
468
|
+
}
|
|
469
|
+
const closureFiles = await collectRuntimeClosureFiles(plugin, [...nodeEntries]);
|
|
470
|
+
for (const filePath of closureFiles) {
|
|
560
471
|
rootFiles.add(filePath);
|
|
561
472
|
}
|
|
473
|
+
const configHelper = plugin.manifest.scripts?.helpers?.config;
|
|
474
|
+
if (configHelper) {
|
|
475
|
+
const helperDir = path.posix.dirname(stripDotSlash(configHelper));
|
|
476
|
+
const re2RuntimeRoot = path.posix.join(helperDir, 're2-wasm');
|
|
477
|
+
if (closureFiles.includes(path.posix.join(re2RuntimeRoot, 'build/src/re2.js'))) {
|
|
478
|
+
rootFiles.add(path.posix.join(re2RuntimeRoot, 'build/wasm/re2.wasm'));
|
|
479
|
+
rootFiles.add(path.posix.join(re2RuntimeRoot, 'LICENSE'));
|
|
480
|
+
}
|
|
481
|
+
}
|
|
562
482
|
return [...rootFiles].sort();
|
|
563
483
|
}
|
|
564
484
|
function packageRootPath(plugin) {
|
|
@@ -742,6 +662,8 @@ function toRuntimeImportProvenance(resolution) {
|
|
|
742
662
|
name: resolution.name,
|
|
743
663
|
source: resolution.source,
|
|
744
664
|
sourceDigest: resolution.sourceDigest,
|
|
665
|
+
requiredCapabilities: resolution.requiredCapabilities,
|
|
666
|
+
capabilitySetDigest: resolution.capabilitySetDigest,
|
|
745
667
|
};
|
|
746
668
|
}
|
|
747
669
|
async function resolveOwnSkillRuntimeSource(plugin, source) {
|
|
@@ -773,17 +695,7 @@ async function assertSkillRuntimeTargetAbsent(skillRoot, target, fieldName) {
|
|
|
773
695
|
}
|
|
774
696
|
async function assertSkillRuntimeProjectionTargets(plugin) {
|
|
775
697
|
for (const [index, entry] of (plugin.manifest.buildConfig?.skillRuntimeFiles ?? []).entries()) {
|
|
776
|
-
const roots = [];
|
|
777
|
-
if (entry.platforms !== undefined || entry.distributions === undefined) {
|
|
778
|
-
roots.push(path.join(plugin.rootDir, 'skills', entry.skill));
|
|
779
|
-
}
|
|
780
|
-
if (entry.distributions?.includes('agent-skills')) {
|
|
781
|
-
const portableRoot = plugin.manifest.distributions?.agentSkills?.skills;
|
|
782
|
-
if (!portableRoot) {
|
|
783
|
-
throw new Error(`Invalid buildConfig.skillRuntimeFiles[${index}].distributions: agent-skills is not declared.`);
|
|
784
|
-
}
|
|
785
|
-
roots.push(path.join(plugin.rootDir, stripDotSlash(portableRoot), entry.skill));
|
|
786
|
-
}
|
|
698
|
+
const roots = [path.join(plugin.rootDir, stripDotSlash(plugin.manifest.skills ?? './skills'), entry.skill)];
|
|
787
699
|
for (const skillRoot of roots) {
|
|
788
700
|
const skillRootStats = await fs.lstat(skillRoot).catch(() => undefined);
|
|
789
701
|
if (!skillRootStats?.isDirectory() || skillRootStats.isSymbolicLink()) {
|
|
@@ -795,11 +707,7 @@ async function assertSkillRuntimeProjectionTargets(plugin) {
|
|
|
795
707
|
}
|
|
796
708
|
async function validateGeneratedSkillRuntimeFiles(plugin, outputRoot, supportedPlatforms) {
|
|
797
709
|
for (const [index, entry] of (plugin.manifest.buildConfig?.generatedSkillRuntimeFiles ?? []).entries()) {
|
|
798
|
-
const surfaces = [];
|
|
799
|
-
if (entry.distributions === undefined) {
|
|
800
|
-
surfaces.push(...supportedPlatforms);
|
|
801
|
-
}
|
|
802
|
-
surfaces.push(...(entry.distributions ?? []));
|
|
710
|
+
const surfaces = entry.platforms?.length ? entry.platforms : [...supportedPlatforms];
|
|
803
711
|
for (const surface of surfaces) {
|
|
804
712
|
const targetPath = path.join(outputRoot, surface, 'skills', entry.skill, ...entry.target.split('/'));
|
|
805
713
|
const stats = await fs.lstat(targetPath).catch(() => undefined);
|
|
@@ -813,19 +721,12 @@ async function projectSkillRuntimeFiles(options) {
|
|
|
813
721
|
const projections = [];
|
|
814
722
|
const claims = new Set();
|
|
815
723
|
for (const [index, entry] of (options.plugin.manifest.buildConfig?.skillRuntimeFiles ?? []).entries()) {
|
|
816
|
-
const
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
}
|
|
820
|
-
surfaces.push(...(entry.distributions ?? []).map((distribution) => ({ distribution })));
|
|
821
|
-
for (const surface of surfaces) {
|
|
822
|
-
const { platform, distribution } = surface;
|
|
823
|
-
if (platform) {
|
|
824
|
-
if (!options.supportedPlatforms.has(platform)) {
|
|
825
|
-
throw new Error(`Invalid buildConfig.skillRuntimeFiles[${index}].platforms: plugin does not support "${platform}".`);
|
|
826
|
-
}
|
|
724
|
+
for (const platform of entry.platforms?.length ? entry.platforms : [...options.supportedPlatforms]) {
|
|
725
|
+
if (!options.supportedPlatforms.has(platform)) {
|
|
726
|
+
throw new Error(`Invalid buildConfig.skillRuntimeFiles[${index}].platforms: plugin does not support "${platform}".`);
|
|
827
727
|
}
|
|
828
|
-
const
|
|
728
|
+
const distribution = platform === 'codex' || platform === 'claude' ? undefined : 'agent-skills';
|
|
729
|
+
const claim = `${platform}:${entry.skill}/${entry.target}`;
|
|
829
730
|
if (claims.has(claim)) {
|
|
830
731
|
throw new Error(`Invalid buildConfig.skillRuntimeFiles: target collision at "${claim}".`);
|
|
831
732
|
}
|
|
@@ -847,6 +748,8 @@ async function projectSkillRuntimeFiles(options) {
|
|
|
847
748
|
name: entry.source,
|
|
848
749
|
source: entry.source,
|
|
849
750
|
sourceDigest,
|
|
751
|
+
requiredCapabilities: [],
|
|
752
|
+
capabilitySetDigest: computeAwCapabilitySetDigest([]),
|
|
850
753
|
};
|
|
851
754
|
}
|
|
852
755
|
else {
|
|
@@ -865,32 +768,38 @@ async function projectSkillRuntimeFiles(options) {
|
|
|
865
768
|
bindingKey = `import:${entry.import.plugin}/${entry.import.export}`;
|
|
866
769
|
runtimeProvenance = toRuntimeImportProvenance(resolution);
|
|
867
770
|
}
|
|
868
|
-
const targetPath = path.join(options.outputRoot, platform
|
|
869
|
-
if (await fs.pathExists(targetPath)) {
|
|
870
|
-
throw new Error(`Invalid buildConfig.skillRuntimeFiles: bundle target already exists at "${claim}".`);
|
|
871
|
-
}
|
|
872
|
-
await fs.ensureDir(path.dirname(targetPath));
|
|
873
|
-
await fs.copyFile(sourcePath, targetPath);
|
|
874
|
-
const targetDigest = await calculateFileDigest(targetPath);
|
|
875
|
-
if (sourceDigest !== targetDigest) {
|
|
876
|
-
throw new Error(`Invalid buildConfig.skillRuntimeFiles: digest mismatch at "${claim}".`);
|
|
877
|
-
}
|
|
771
|
+
const targetPath = path.join(options.outputRoot, platform, 'skills', entry.skill, ...entry.target.split('/'));
|
|
878
772
|
projections.push({
|
|
879
773
|
bindingKey,
|
|
880
774
|
canonicalSource,
|
|
775
|
+
sourcePath,
|
|
776
|
+
targetPath,
|
|
881
777
|
provenance: {
|
|
882
778
|
...runtimeProvenance,
|
|
883
779
|
platform,
|
|
884
780
|
distribution,
|
|
885
781
|
skill: entry.skill,
|
|
886
782
|
target: entry.target,
|
|
887
|
-
targetDigest,
|
|
783
|
+
targetDigest: sourceDigest,
|
|
888
784
|
},
|
|
889
785
|
});
|
|
890
786
|
}
|
|
891
787
|
}
|
|
892
788
|
return projections;
|
|
893
789
|
}
|
|
790
|
+
async function materializeSkillRuntimeFiles(projections) {
|
|
791
|
+
for (const projection of projections) {
|
|
792
|
+
if (await fs.pathExists(projection.targetPath)) {
|
|
793
|
+
const surface = projection.provenance.platform;
|
|
794
|
+
throw new Error(`Invalid buildConfig.skillRuntimeFiles: bundle target already exists at "${surface}:${projection.provenance.skill}/${projection.provenance.target}".`);
|
|
795
|
+
}
|
|
796
|
+
await fs.ensureDir(path.dirname(projection.targetPath));
|
|
797
|
+
await fs.copyFile(projection.sourcePath, projection.targetPath);
|
|
798
|
+
if (await calculateFileDigest(projection.targetPath) !== projection.provenance.sourceDigest) {
|
|
799
|
+
throw new Error(`Canonical source "${projection.provenance.source}" changed during runtime Skill projection.`);
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
}
|
|
894
803
|
function hasSameCanonicalSource(left, right) {
|
|
895
804
|
return left.rootPath === right.rootPath
|
|
896
805
|
&& left.rootRealPath === right.rootRealPath
|
|
@@ -907,6 +816,9 @@ async function validateSkillRuntimeProjectionSources(projections) {
|
|
|
907
816
|
|| existing.provenance.name !== projection.provenance.name
|
|
908
817
|
|| existing.provenance.source !== projection.provenance.source
|
|
909
818
|
|| existing.provenance.sourceDigest !== projection.provenance.sourceDigest
|
|
819
|
+
|| existing.provenance.capabilitySetDigest !== projection.provenance.capabilitySetDigest
|
|
820
|
+
|| JSON.stringify(existing.provenance.requiredCapabilities)
|
|
821
|
+
!== JSON.stringify(projection.provenance.requiredCapabilities)
|
|
910
822
|
|| !hasSameCanonicalSource(existing.canonicalSource, projection.canonicalSource))) {
|
|
911
823
|
throw new Error(`Canonical source "${projection.provenance.source}" changed during runtime Skill projection.`);
|
|
912
824
|
}
|
|
@@ -936,6 +848,9 @@ async function validateBuildImportProjectionSources(projections) {
|
|
|
936
848
|
|| existing.provenance.name !== projection.provenance.name
|
|
937
849
|
|| existing.provenance.source !== projection.provenance.source
|
|
938
850
|
|| existing.provenance.sourceDigest !== projection.provenance.sourceDigest
|
|
851
|
+
|| existing.provenance.capabilitySetDigest !== projection.provenance.capabilitySetDigest
|
|
852
|
+
|| JSON.stringify(existing.provenance.requiredCapabilities)
|
|
853
|
+
!== JSON.stringify(projection.provenance.requiredCapabilities)
|
|
939
854
|
|| !hasSameCanonicalSource(existing.canonicalSource, projection.canonicalSource))) {
|
|
940
855
|
throw new Error(`Catalog runtime import "${projection.provenance.provider}/${projection.provenance.name}" changed during build import projection.`);
|
|
941
856
|
}
|
|
@@ -954,7 +869,7 @@ async function validateBuildImportProjectionSources(projections) {
|
|
|
954
869
|
}
|
|
955
870
|
}
|
|
956
871
|
}
|
|
957
|
-
async function createStagedPlugin(plugin, runner, resolver) {
|
|
872
|
+
async function createStagedPlugin(plugin, runner, resolver, commandEnv = process.env) {
|
|
958
873
|
const stagingRoot = await fs.mkdtemp(assertLocalPluginStagingPathForTests(path.join(os.tmpdir(), 'aw-plugin-staging-'), 'local plugin bundle staging root'));
|
|
959
874
|
const stagingPluginRoot = assertLocalPluginStagingPathForTests(path.join(stagingRoot, 'plugin'), 'local plugin staged plugin root');
|
|
960
875
|
try {
|
|
@@ -964,19 +879,25 @@ async function createStagedPlugin(plugin, runner, resolver) {
|
|
|
964
879
|
&& !isMacOsMetadataName(path.basename(source));
|
|
965
880
|
},
|
|
966
881
|
});
|
|
882
|
+
const nativeReader = await preparePluginNativeTools(stagingPluginRoot, plugin.manifest);
|
|
967
883
|
const sourceBuild = plugin.manifest.scripts?.node?.build;
|
|
968
884
|
const declaredBuildImports = plugin.manifest.buildConfig?.buildImports ?? [];
|
|
969
885
|
if (declaredBuildImports.length > 0 && !sourceBuild) {
|
|
970
886
|
throw new Error(`Invalid plugin "${plugin.manifest.name}": buildConfig.buildImports requires scripts.node.build.`);
|
|
971
887
|
}
|
|
972
|
-
const buildEnv = { ...
|
|
888
|
+
const buildEnv = { ...commandEnv };
|
|
889
|
+
for (const key of Object.keys(buildEnv))
|
|
890
|
+
if (key.toUpperCase() === 'AW_PLUGIN_NATIVE_READER')
|
|
891
|
+
delete buildEnv[key];
|
|
892
|
+
if (nativeReader)
|
|
893
|
+
buildEnv.AW_PLUGIN_NATIVE_READER = nativeReader;
|
|
973
894
|
const buildImportProvenance = [];
|
|
974
895
|
const buildImportProjections = [];
|
|
975
896
|
for (const buildImport of declaredBuildImports) {
|
|
976
897
|
if (!resolver) {
|
|
977
898
|
throw new Error(`Cannot resolve buildConfig.buildImports for plugin "${plugin.manifest.name}": catalog runtime import resolver is required.`);
|
|
978
899
|
}
|
|
979
|
-
if (Object.hasOwn(
|
|
900
|
+
if (Object.hasOwn(commandEnv, buildImport.env)) {
|
|
980
901
|
throw new Error(`Invalid buildConfig.buildImports env "${buildImport.env}": refusing to overwrite an existing environment variable.`);
|
|
981
902
|
}
|
|
982
903
|
const resolution = await resolver.resolve({
|
|
@@ -1068,34 +989,53 @@ async function resolveBuildPlugin(plugin, options) {
|
|
|
1068
989
|
cleanup: async () => { },
|
|
1069
990
|
};
|
|
1070
991
|
}
|
|
1071
|
-
return createStagedPlugin(plugin, options.stagingRunner, options.runtimeResolver);
|
|
992
|
+
return createStagedPlugin(plugin, options.stagingRunner, options.runtimeResolver, options.commandEnv);
|
|
1072
993
|
}
|
|
1073
994
|
export async function prepareLocalPluginBundleSource(plugin, options = {}) {
|
|
1074
995
|
await assertPluginInputTree(plugin.rootDir);
|
|
1075
996
|
const buildOptions = {
|
|
1076
997
|
buildMode: options.buildMode ?? 'staging',
|
|
1077
|
-
stagingRunner: options.stagingRunner
|
|
998
|
+
stagingRunner: options.stagingRunner
|
|
999
|
+
?? createDefaultStagingRunner(options.commandEnv ?? process.env),
|
|
1000
|
+
commandEnv: options.commandEnv,
|
|
1078
1001
|
runtimeResolver: options.runtimeResolver,
|
|
1079
1002
|
preparedRuntimeContext: undefined,
|
|
1080
1003
|
};
|
|
1081
1004
|
return resolveBuildPlugin(plugin, buildOptions);
|
|
1082
1005
|
}
|
|
1083
|
-
function assertPluginRequirementsSupported(pluginName, requirements) {
|
|
1006
|
+
function assertPluginRequirementsSupported(pluginName, requirements, strictRequirements = false) {
|
|
1084
1007
|
if (requirements.unsupportedByCurrentAw.length > 0) {
|
|
1085
1008
|
throw new AwCapabilityUnsupportedError(pluginName, requirements.unsupportedByCurrentAw);
|
|
1086
1009
|
}
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1010
|
+
if (!strictRequirements)
|
|
1011
|
+
return;
|
|
1012
|
+
const satisfied = new Set([...requirements.declared, ...requirements.derived]);
|
|
1013
|
+
const strictObservations = requirements.observations.filter((observation) => (observation.code !== 'aw-command-detected'
|
|
1014
|
+
|| observation.capability === undefined
|
|
1015
|
+
|| !satisfied.has(observation.capability)));
|
|
1016
|
+
if (strictObservations.length > 0) {
|
|
1017
|
+
const error = new Error(`Official strict requirements failed: ${strictObservations.map((observation) => (`plugin=${JSON.stringify(pluginName)} path=${JSON.stringify(observation.path)} `
|
|
1018
|
+
+ `command=${JSON.stringify(observation.command ?? '<dynamic>')} `
|
|
1019
|
+
+ `capability=${JSON.stringify(observation.capability ?? (observation.code === 'aw-command-dynamic' ? '<dynamic>' : '<unmapped>'))}`)).join('; ')}`);
|
|
1020
|
+
error.code = 'awCapabilityStrictRequirements';
|
|
1021
|
+
error.observations = strictObservations;
|
|
1092
1022
|
throw error;
|
|
1093
1023
|
}
|
|
1094
1024
|
}
|
|
1025
|
+
function assertRequiredCapabilitiesSupported(pluginName, requiredCapabilities) {
|
|
1026
|
+
const support = checkAwCapabilitySupport(requiredCapabilities, IMPLEMENTED_AW_CAPABILITIES);
|
|
1027
|
+
if (!support.supported) {
|
|
1028
|
+
throw new AwCapabilityUnsupportedError(pluginName, support.missing);
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1095
1031
|
export async function bundleLocalPlugin(plugin, outputRoot, options = {}) {
|
|
1032
|
+
const historicalComparison = options.runtimeSkillClosureValidation === 'historical';
|
|
1033
|
+
plugin = { ...plugin, manifest: validatePluginManifest(plugin.rootDir, plugin.manifest) };
|
|
1096
1034
|
const buildOptions = {
|
|
1097
1035
|
buildMode: options.buildMode ?? 'build-free',
|
|
1098
|
-
stagingRunner: options.stagingRunner
|
|
1036
|
+
stagingRunner: options.stagingRunner
|
|
1037
|
+
?? createDefaultStagingRunner(options.commandEnv ?? process.env),
|
|
1038
|
+
commandEnv: options.commandEnv,
|
|
1099
1039
|
runtimeResolver: options.runtimeResolver,
|
|
1100
1040
|
preparedRuntimeContext: options.preparedRuntimeContext,
|
|
1101
1041
|
};
|
|
@@ -1105,29 +1045,72 @@ export async function bundleLocalPlugin(plugin, outputRoot, options = {}) {
|
|
|
1105
1045
|
manifest: plugin.manifest,
|
|
1106
1046
|
implementedCapabilities: IMPLEMENTED_AW_CAPABILITIES,
|
|
1107
1047
|
});
|
|
1108
|
-
|
|
1048
|
+
if (!historicalComparison) {
|
|
1049
|
+
assertPluginRequirementsSupported(plugin.manifest.name, sourceRequirements, options.strictRequirements ?? false);
|
|
1050
|
+
}
|
|
1109
1051
|
await fs.remove(outputRoot);
|
|
1110
1052
|
const buildPlugin = await resolveBuildPlugin(plugin, buildOptions);
|
|
1111
1053
|
try {
|
|
1112
1054
|
plugin = buildPlugin.plugin;
|
|
1113
|
-
const requirements =
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1055
|
+
const requirements = buildOptions.buildMode === 'build-free'
|
|
1056
|
+
? sourceRequirements
|
|
1057
|
+
: await resolvePluginRequirements({
|
|
1058
|
+
pluginRoot: plugin.rootDir,
|
|
1059
|
+
manifest: plugin.manifest,
|
|
1060
|
+
implementedCapabilities: IMPLEMENTED_AW_CAPABILITIES,
|
|
1061
|
+
});
|
|
1062
|
+
if (!historicalComparison) {
|
|
1063
|
+
assertPluginRequirementsSupported(plugin.manifest.name, requirements, options.strictRequirements ?? false);
|
|
1064
|
+
}
|
|
1119
1065
|
assertManifestPlatformSupport(plugin.manifest.name, plugin.manifest);
|
|
1120
|
-
await fs.ensureDir(outputRoot);
|
|
1121
1066
|
const supportedPlatforms = resolveSupportedPlatforms(plugin.manifest);
|
|
1122
1067
|
await assertSkillRuntimeProjectionTargets(plugin);
|
|
1068
|
+
const skillRuntimeFileProjections = await projectSkillRuntimeFiles({
|
|
1069
|
+
plugin,
|
|
1070
|
+
outputRoot,
|
|
1071
|
+
supportedPlatforms,
|
|
1072
|
+
resolver: buildPlugin.runtimeContext.resolver,
|
|
1073
|
+
});
|
|
1074
|
+
const skillRuntimeFiles = skillRuntimeFileProjections.map(({ provenance }) => provenance);
|
|
1075
|
+
const portableRuntimeFiles = skillRuntimeFiles
|
|
1076
|
+
.filter((entry) => entry.distribution === 'agent-skills')
|
|
1077
|
+
.map((entry) => ({
|
|
1078
|
+
skill: entry.skill,
|
|
1079
|
+
target: entry.target,
|
|
1080
|
+
platform: entry.platform,
|
|
1081
|
+
path: `./${entry.platform}/skills/${entry.skill}/${entry.target}`,
|
|
1082
|
+
digest: entry.targetDigest,
|
|
1083
|
+
provider: entry.provider,
|
|
1084
|
+
providerVersion: entry.providerVersion,
|
|
1085
|
+
exportName: entry.name,
|
|
1086
|
+
source: entry.source,
|
|
1087
|
+
sourceDigest: entry.sourceDigest,
|
|
1088
|
+
requiredCapabilities: entry.requiredCapabilities,
|
|
1089
|
+
capabilitySetDigest: entry.capabilitySetDigest,
|
|
1090
|
+
}));
|
|
1091
|
+
const artifactRuntimeProjection = await resolveArtifactRuntimeImports({
|
|
1092
|
+
plugin,
|
|
1093
|
+
outputRoot,
|
|
1094
|
+
resolver: buildPlugin.runtimeContext.resolver,
|
|
1095
|
+
});
|
|
1096
|
+
const finalEffective = normalizeAwCapabilities([
|
|
1097
|
+
...requirements.effective,
|
|
1098
|
+
...skillRuntimeFiles.flatMap((entry) => entry.requiredCapabilities),
|
|
1099
|
+
...artifactRuntimeProjection.requiredCapabilities,
|
|
1100
|
+
]);
|
|
1101
|
+
if (!historicalComparison) {
|
|
1102
|
+
assertRequiredCapabilitiesSupported(plugin.manifest.name, finalEffective);
|
|
1103
|
+
}
|
|
1104
|
+
artifactRuntimeProjection.manifest.requires = {
|
|
1105
|
+
aw: { capabilities: finalEffective },
|
|
1106
|
+
};
|
|
1107
|
+
const bundleManifest = artifactRuntimeProjection.manifest;
|
|
1108
|
+
await fs.ensureDir(outputRoot);
|
|
1123
1109
|
const platformFiles = {};
|
|
1124
1110
|
const platformManifests = {};
|
|
1125
1111
|
const buildConfig = plugin.manifest.buildConfig;
|
|
1126
1112
|
const templatePatterns = buildConfig?.templates?.include ?? [];
|
|
1127
1113
|
const templateVars = buildConfig?.templates?.vars ?? {};
|
|
1128
|
-
const resolvedSlashCommands = await resolveSlashCommands(plugin.rootDir, plugin.manifest, {
|
|
1129
|
-
targetPlatforms: supportedPlatforms,
|
|
1130
|
-
});
|
|
1131
1114
|
for (const platform of PLATFORM_ORDER) {
|
|
1132
1115
|
if (!supportedPlatforms.has(platform)) {
|
|
1133
1116
|
continue;
|
|
@@ -1144,131 +1127,62 @@ export async function bundleLocalPlugin(plugin, outputRoot, options = {}) {
|
|
|
1144
1127
|
manifest.skills = await addDeclaredSkillPathFiles(plugin, platform, plugin.manifest.skills, files);
|
|
1145
1128
|
manifest.mcpServers = await addDeclaredPathFiles(plugin, platform, plugin.manifest.mcpServers, files);
|
|
1146
1129
|
}
|
|
1147
|
-
const
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
const
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
const claudeOverrides = buildConfig?.manifestOverrides?.claude;
|
|
1160
|
-
claudeManifest.outputStyles = await addDeclaredPathFiles(plugin, 'claude', claudeOverrides?.outputStyles, claudeFiles);
|
|
1161
|
-
claudeManifest.lspServers = await addDeclaredLspServerFiles(plugin, claudeOverrides?.lspServers, claudeFiles);
|
|
1162
|
-
claudeManifest.userConfig = claudeOverrides?.userConfig;
|
|
1163
|
-
claudeManifest.channels = claudeOverrides?.channels;
|
|
1164
|
-
const hooksArtifact = renderResolvedHooksArtifact(resolvePlatformHookDefinitions(plugin.manifest, 'claude'), 'claude');
|
|
1165
|
-
if (hooksArtifact) {
|
|
1166
|
-
const hooksPath = path.join(outputRoot, 'claude', 'hooks', 'hooks.json');
|
|
1167
|
-
await writeJsonFile(hooksPath, hooksArtifact.content);
|
|
1168
|
-
claudeManifest.hooks = './claude/hooks/hooks.json';
|
|
1169
|
-
}
|
|
1170
|
-
const claudeAgents = resolvePlatformEntries(plugin.manifest.extensions?.agents, 'claude');
|
|
1171
|
-
if (claudeAgents.length > 0) {
|
|
1172
|
-
claudeManifest.agents = [];
|
|
1173
|
-
for (const agent of claudeAgents) {
|
|
1174
|
-
const generatedName = buildGeneratedName(plugin.manifest.name, agent.name);
|
|
1175
|
-
const relativePath = `./claude/agents/${generatedName}.md`;
|
|
1176
|
-
claudeManifest.agents.push(relativePath);
|
|
1177
|
-
await writeTextFile(path.join(outputRoot, stripDotSlash(relativePath)), renderClaudeAgentContent(agent));
|
|
1178
|
-
}
|
|
1130
|
+
for (const platform of supportedPlatforms) {
|
|
1131
|
+
await fs.ensureDir(path.join(outputRoot, platform));
|
|
1132
|
+
if (platform === 'codex' || platform === 'claude')
|
|
1133
|
+
continue;
|
|
1134
|
+
const files = new Set();
|
|
1135
|
+
platformFiles[platform] = files;
|
|
1136
|
+
if (plugin.manifest.skills)
|
|
1137
|
+
await fs.ensureDir(path.join(outputRoot, platform, 'skills'));
|
|
1138
|
+
await addDeclaredSkillPathFiles(plugin, platform, plugin.manifest.skills, files);
|
|
1139
|
+
if (plugin.manifest.mcpServers) {
|
|
1140
|
+
for (const file of await collectFilesForPath(plugin.rootDir, plugin.manifest.mcpServers))
|
|
1141
|
+
files.add(file);
|
|
1179
1142
|
}
|
|
1180
1143
|
}
|
|
1181
1144
|
const sourceFiles = (await listFilesRecursively(plugin.rootDir)).filter((filePath) => !isDeclaredSkillAuthorOnlyFile(plugin, filePath));
|
|
1182
|
-
|
|
1183
|
-
for (const filePath of applyFileRules(sourceFiles.filter((filePath) => !isDynamicSkillSourceFile(plugin, 'claude', filePath)), buildConfig.fileRules.claude.include, buildConfig.fileRules.claude.exclude)) {
|
|
1184
|
-
if (resolvedSlashCommands &&
|
|
1185
|
-
filePath === stripDotSlash(resolvedSlashCommands.rootRelativePath)) {
|
|
1186
|
-
continue;
|
|
1187
|
-
}
|
|
1188
|
-
if (resolvedSlashCommands &&
|
|
1189
|
-
filePath.startsWith(`${stripDotSlash(resolvedSlashCommands.rootRelativePath)}/`)) {
|
|
1190
|
-
continue;
|
|
1191
|
-
}
|
|
1192
|
-
claudeFiles.add(filePath);
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
|
-
if (codexFiles && buildConfig?.fileRules?.codex) {
|
|
1196
|
-
for (const filePath of applyFileRules(sourceFiles.filter((filePath) => !isDynamicSkillSourceFile(plugin, 'codex', filePath)), buildConfig.fileRules.codex.include, buildConfig.fileRules.codex.exclude)) {
|
|
1197
|
-
if (resolvedSlashCommands &&
|
|
1198
|
-
filePath === stripDotSlash(resolvedSlashCommands.rootRelativePath)) {
|
|
1199
|
-
continue;
|
|
1200
|
-
}
|
|
1201
|
-
if (resolvedSlashCommands &&
|
|
1202
|
-
filePath.startsWith(`${stripDotSlash(resolvedSlashCommands.rootRelativePath)}/`)) {
|
|
1203
|
-
continue;
|
|
1204
|
-
}
|
|
1205
|
-
codexFiles.add(filePath);
|
|
1206
|
-
}
|
|
1207
|
-
}
|
|
1208
|
-
for (const platform of PLATFORM_ORDER) {
|
|
1145
|
+
for (const platform of supportedPlatforms) {
|
|
1209
1146
|
const files = platformFiles[platform];
|
|
1210
|
-
if (!files)
|
|
1147
|
+
if (!files)
|
|
1211
1148
|
continue;
|
|
1149
|
+
const rules = buildConfig?.fileRules?.[platform];
|
|
1150
|
+
if (rules) {
|
|
1151
|
+
for (const filePath of applyFileRules(sourceFiles, rules.include, rules.exclude)) {
|
|
1152
|
+
files.add(filePath);
|
|
1153
|
+
}
|
|
1154
|
+
for (const filePath of [...files]) {
|
|
1155
|
+
if (applyFileRules([filePath], ['**/*'], rules.exclude).length === 0)
|
|
1156
|
+
files.delete(filePath);
|
|
1157
|
+
}
|
|
1212
1158
|
}
|
|
1213
1159
|
for (const filePath of files) {
|
|
1214
1160
|
await copyFileWithTemplateSupport(plugin.rootDir, outputRoot, filePath, platform, templatePatterns, templateVars);
|
|
1215
1161
|
}
|
|
1216
1162
|
}
|
|
1217
|
-
|
|
1218
|
-
if (claudeManifest) {
|
|
1219
|
-
claudeManifest.commands = './claude/commands';
|
|
1220
|
-
}
|
|
1221
|
-
if (codexManifest) {
|
|
1222
|
-
codexManifest.skills ??= './codex/skills';
|
|
1223
|
-
}
|
|
1224
|
-
for (const command of resolvedSlashCommands.commands) {
|
|
1225
|
-
if (claudeManifest && command.claude) {
|
|
1226
|
-
await writeTextFile(path.join(outputRoot, 'claude', 'commands', `${command.name}.md`), renderClaudeSlashCommand(command));
|
|
1227
|
-
}
|
|
1228
|
-
if (codexManifest && command.codex) {
|
|
1229
|
-
await writeTextFile(path.join(outputRoot, 'codex', 'skills', command.name, 'SKILL.md'), renderCodexSlashCommandSkillMarkdown(command));
|
|
1230
|
-
await writeTextFile(path.join(outputRoot, 'codex', 'skills', command.name, 'agents', 'openai.yaml'), renderCodexSlashCommandOpenAiYaml(command));
|
|
1231
|
-
for (const asset of command.codex.assets) {
|
|
1232
|
-
await copySlashCommandAsset(plugin.rootDir, outputRoot, command.name, asset.sourceRelativePath, asset.generatedRelativePath);
|
|
1233
|
-
}
|
|
1234
|
-
}
|
|
1235
|
-
}
|
|
1236
|
-
}
|
|
1237
|
-
const skillRuntimeFileProjections = await projectSkillRuntimeFiles({
|
|
1238
|
-
plugin,
|
|
1239
|
-
outputRoot,
|
|
1240
|
-
supportedPlatforms,
|
|
1241
|
-
resolver: buildPlugin.runtimeContext.resolver,
|
|
1242
|
-
});
|
|
1243
|
-
const skillRuntimeFiles = skillRuntimeFileProjections.map(({ provenance }) => provenance);
|
|
1244
|
-
const portableRuntimeFiles = skillRuntimeFiles
|
|
1245
|
-
.filter((entry) => entry.distribution === 'agent-skills')
|
|
1246
|
-
.map((entry) => ({
|
|
1247
|
-
skill: entry.skill,
|
|
1248
|
-
target: entry.target,
|
|
1249
|
-
path: `./agent-skills/skills/${entry.skill}/${entry.target}`,
|
|
1250
|
-
digest: entry.targetDigest,
|
|
1251
|
-
provider: entry.provider,
|
|
1252
|
-
providerVersion: entry.providerVersion,
|
|
1253
|
-
exportName: entry.name,
|
|
1254
|
-
source: entry.source,
|
|
1255
|
-
sourceDigest: entry.sourceDigest,
|
|
1256
|
-
}));
|
|
1257
|
-
await copyPortableStaticSkills(plugin, outputRoot);
|
|
1163
|
+
await materializeSkillRuntimeFiles(skillRuntimeFileProjections);
|
|
1258
1164
|
if (await fs.pathExists(path.join(plugin.rootDir, 'README.md'))) {
|
|
1259
1165
|
await copyBundleRootFile(plugin.rootDir, outputRoot, 'README.md');
|
|
1260
1166
|
}
|
|
1261
1167
|
for (const filePath of await collectAwRuntimeFiles(plugin)) {
|
|
1262
1168
|
await copyBundleRootFile(plugin.rootDir, outputRoot, filePath);
|
|
1263
1169
|
}
|
|
1170
|
+
if (plugin.manifest.skills) {
|
|
1171
|
+
const collection = stripDotSlash(plugin.manifest.skills);
|
|
1172
|
+
for (const file of await collectFilesForPath(plugin.rootDir, collection)) {
|
|
1173
|
+
const relative = path.posix.relative(collection, file);
|
|
1174
|
+
if (isSkillCollectionAuthorOnlyPath(relative))
|
|
1175
|
+
continue;
|
|
1176
|
+
await copyBundleRootFile(plugin.rootDir, outputRoot, file);
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
if (plugin.manifest.mcpServers) {
|
|
1180
|
+
await copyBundleRootFile(plugin.rootDir, outputRoot, stripDotSlash(plugin.manifest.mcpServers));
|
|
1181
|
+
}
|
|
1264
1182
|
await copyArtifactSourceDirectories(plugin, outputRoot);
|
|
1183
|
+
await copyManagedCommandPackages(plugin, outputRoot);
|
|
1265
1184
|
await copyProductionPackageRoot(plugin, outputRoot);
|
|
1266
|
-
|
|
1267
|
-
plugin,
|
|
1268
|
-
outputRoot,
|
|
1269
|
-
resolver: buildPlugin.runtimeContext.resolver,
|
|
1270
|
-
requiredCapabilities: requirements.effective,
|
|
1271
|
-
});
|
|
1185
|
+
await materializeArtifactRuntimeImports(artifactRuntimeProjection.projections);
|
|
1272
1186
|
await writeJsonFile(path.join(outputRoot, '.agents-plugin', 'plugin.json'), bundleManifest);
|
|
1273
1187
|
if (portableRuntimeFiles.length > 0) {
|
|
1274
1188
|
await writeJsonFile(path.join(outputRoot, '.agents-plugin', 'portable-runtime-files.json'), portableRuntimeFiles);
|
|
@@ -1283,24 +1197,34 @@ export async function bundleLocalPlugin(plugin, outputRoot, options = {}) {
|
|
|
1283
1197
|
await injectRequirementsReceipts({
|
|
1284
1198
|
outputRoot,
|
|
1285
1199
|
plugin,
|
|
1286
|
-
requiredCapabilities:
|
|
1200
|
+
requiredCapabilities: finalEffective,
|
|
1287
1201
|
});
|
|
1288
1202
|
await validateSkillRuntimeProjectionSources(skillRuntimeFileProjections);
|
|
1289
|
-
await validateSkillRuntimeProjectionFreshness(outputRoot, skillRuntimeFiles
|
|
1203
|
+
await validateSkillRuntimeProjectionFreshness(outputRoot, skillRuntimeFiles);
|
|
1290
1204
|
await validateGeneratedSkillRuntimeFiles(plugin, outputRoot, supportedPlatforms);
|
|
1291
1205
|
if ((options.runtimeSkillClosureValidation ?? 'current') === 'current') {
|
|
1292
|
-
for (const platform of
|
|
1293
|
-
const
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1206
|
+
for (const platform of supportedPlatforms) {
|
|
1207
|
+
const root = path.join(outputRoot, platform, 'skills');
|
|
1208
|
+
for (const entry of await fs.readdir(root, { withFileTypes: true }).catch(() => [])) {
|
|
1209
|
+
const skillRoot = path.join(root, entry.name);
|
|
1210
|
+
if (platform !== 'codex' && platform !== 'claude') {
|
|
1211
|
+
await validatePortableSkillDirectory(skillRoot, { frontmatterProfile: 'claude-current' });
|
|
1212
|
+
}
|
|
1213
|
+
await validateRuntimeSkillClosure(skillRoot);
|
|
1214
|
+
}
|
|
1301
1215
|
}
|
|
1302
1216
|
}
|
|
1303
1217
|
await validateBuildImportProjectionSources(preparedBuildImportProjections.get(buildPlugin.runtimeContext) ?? []);
|
|
1218
|
+
// Git must retain the skills root declared by a dynamic-only Native bundle.
|
|
1219
|
+
for (const platform of PLATFORM_ORDER) {
|
|
1220
|
+
const manifest = platformManifests[platform];
|
|
1221
|
+
if (!manifest?.skills)
|
|
1222
|
+
continue;
|
|
1223
|
+
const skillsRoot = path.join(outputRoot, stripDotSlash(manifest.skills));
|
|
1224
|
+
if ((await fs.readdir(skillsRoot)).length === 0) {
|
|
1225
|
+
await fs.writeFile(path.join(skillsRoot, '.gitkeep'), '');
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1304
1228
|
return {
|
|
1305
1229
|
outputRoot,
|
|
1306
1230
|
plugin,
|