@lesliechan721/aw 0.1.0-beta.8 → 0.1.0-beta.80
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 +459 -2843
- 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 -29
- package/dist/src/commands/catalog-publication-inspection.js +475 -62
- 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
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { selectPluginConfigProfile } from '@lesliechan721/aw-plugin-core/manifest';
|
|
2
|
+
import { resolvePlatformHookDefinitions } from './hooks-contract.js';
|
|
3
|
+
import { resolvePlatformEntries } from './platform-entries.js';
|
|
4
|
+
import { supportsPlatform } from './platform-support.js';
|
|
5
|
+
export const QUALIFIED_CODEX_NATIVE_KINDS = [
|
|
6
|
+
'skill',
|
|
7
|
+
'mcp',
|
|
8
|
+
'hook',
|
|
9
|
+
'instruction',
|
|
10
|
+
];
|
|
11
|
+
export class CodexSurfaceAnalysisError extends Error {
|
|
12
|
+
code;
|
|
13
|
+
analysis;
|
|
14
|
+
constructor(analysis) {
|
|
15
|
+
const code = analysis.errorCode ?? 'codexNativeKindUnsupported';
|
|
16
|
+
super(`${code}: Codex surface delivery is ambiguous or unsupported.`);
|
|
17
|
+
this.name = 'CodexSurfaceAnalysisError';
|
|
18
|
+
this.code = code;
|
|
19
|
+
this.analysis = analysis;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
const BOTH_SCOPES = ['project', 'user'];
|
|
23
|
+
const NATIVE_KIND_ORDER = [
|
|
24
|
+
'skill',
|
|
25
|
+
'mcp',
|
|
26
|
+
'hook',
|
|
27
|
+
'instruction',
|
|
28
|
+
];
|
|
29
|
+
const EXTENSION_KIND_ORDER = [
|
|
30
|
+
'skill',
|
|
31
|
+
'instruction',
|
|
32
|
+
'permission',
|
|
33
|
+
'agent',
|
|
34
|
+
];
|
|
35
|
+
function compareText(left, right) {
|
|
36
|
+
return left < right ? -1 : left > right ? 1 : 0;
|
|
37
|
+
}
|
|
38
|
+
function addNativeComponents(components, kind, key, names) {
|
|
39
|
+
const canonicalNames = [...new Set(names ?? [])].sort(compareText);
|
|
40
|
+
if (canonicalNames.length === 0) {
|
|
41
|
+
components.push({
|
|
42
|
+
key,
|
|
43
|
+
kind,
|
|
44
|
+
owner: 'codex-native',
|
|
45
|
+
scopes: [...BOTH_SCOPES],
|
|
46
|
+
dynamic: false,
|
|
47
|
+
});
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
for (const name of canonicalNames) {
|
|
51
|
+
components.push({
|
|
52
|
+
key: `${key}:${name}`,
|
|
53
|
+
kind,
|
|
54
|
+
owner: 'codex-native',
|
|
55
|
+
scopes: [...BOTH_SCOPES],
|
|
56
|
+
dynamic: false,
|
|
57
|
+
name,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function addAwComponent(components, component) {
|
|
62
|
+
components.push({ ...component, owner: 'aw' });
|
|
63
|
+
}
|
|
64
|
+
function collectOwnerCollisions(components) {
|
|
65
|
+
const byIdentity = new Map();
|
|
66
|
+
for (const component of components) {
|
|
67
|
+
if (!component.name)
|
|
68
|
+
continue;
|
|
69
|
+
const identity = `${component.kind}\0${component.name}`;
|
|
70
|
+
const owners = byIdentity.get(identity) ?? new Set();
|
|
71
|
+
owners.add(component.owner);
|
|
72
|
+
byIdentity.set(identity, owners);
|
|
73
|
+
}
|
|
74
|
+
return [...byIdentity.entries()]
|
|
75
|
+
.filter(([, owners]) => owners.size > 1)
|
|
76
|
+
.map(([identity]) => {
|
|
77
|
+
const [kind, name] = identity.split('\0');
|
|
78
|
+
return {
|
|
79
|
+
kind,
|
|
80
|
+
name,
|
|
81
|
+
owners: ['codex-native', 'aw'],
|
|
82
|
+
};
|
|
83
|
+
})
|
|
84
|
+
.sort((left, right) => compareText(`${left.kind}\0${left.name}`, `${right.kind}\0${right.name}`));
|
|
85
|
+
}
|
|
86
|
+
export function analyzeCodexSurface(manifest, options = {}) {
|
|
87
|
+
if (!supportsPlatform(manifest, 'codex')) {
|
|
88
|
+
return {
|
|
89
|
+
ok: true,
|
|
90
|
+
configInputs: [],
|
|
91
|
+
dynamicComponents: 'not-declared',
|
|
92
|
+
nativeKinds: [],
|
|
93
|
+
extensionKinds: [],
|
|
94
|
+
unsupportedKinds: [],
|
|
95
|
+
classification: 'empty',
|
|
96
|
+
deliveryOwner: 'none',
|
|
97
|
+
scopeOverlap: 'none',
|
|
98
|
+
components: [],
|
|
99
|
+
collisions: [],
|
|
100
|
+
missingNativeIdentityKinds: [],
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
const components = [];
|
|
104
|
+
const nativeKinds = new Set();
|
|
105
|
+
const extensionKinds = new Set();
|
|
106
|
+
const declareNative = (kind, key) => {
|
|
107
|
+
nativeKinds.add(kind);
|
|
108
|
+
addNativeComponents(components, kind, key, options.nativeArtifactNames?.[kind]);
|
|
109
|
+
};
|
|
110
|
+
if (!options.preparedComponents && manifest.skills)
|
|
111
|
+
declareNative('skill', 'manifest.skills');
|
|
112
|
+
if (!options.preparedComponents && manifest.mcpServers)
|
|
113
|
+
declareNative('mcp', 'manifest.mcpServers');
|
|
114
|
+
if (!options.preparedComponents && resolvePlatformHookDefinitions(manifest, 'codex').length > 0) {
|
|
115
|
+
declareNative('hook', 'manifest.hooks');
|
|
116
|
+
}
|
|
117
|
+
const configInputs = Object.keys(manifest.config === undefined
|
|
118
|
+
? {} : selectPluginConfigProfile(manifest.config, 'codex').fields).sort(compareText);
|
|
119
|
+
if (options.preparedComponents) {
|
|
120
|
+
for (const component of options.preparedComponents.components) {
|
|
121
|
+
const owner = component.kind === 'agent' ? 'aw' : 'codex-native';
|
|
122
|
+
if (owner === 'aw')
|
|
123
|
+
extensionKinds.add('agent');
|
|
124
|
+
else
|
|
125
|
+
nativeKinds.add(component.kind);
|
|
126
|
+
components.push({ key: component.id, kind: component.kind, owner,
|
|
127
|
+
scopes: [...BOTH_SCOPES], dynamic: options.preparedComponents.sources[component.id] === 'dynamic', name: component.name });
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
for (const instruction of resolvePlatformEntries(manifest.extensions?.instructions, 'codex')) {
|
|
132
|
+
nativeKinds.add('instruction');
|
|
133
|
+
addNativeComponents(components, 'instruction', `extensions.instructions:${instruction.name}`, [instruction.name]);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
for (const permission of resolvePlatformEntries(manifest.extensions?.permissions, 'codex')) {
|
|
137
|
+
extensionKinds.add('permission');
|
|
138
|
+
addAwComponent(components, {
|
|
139
|
+
key: `extensions.permissions:${permission.name}`,
|
|
140
|
+
kind: 'permission',
|
|
141
|
+
scopes: [...BOTH_SCOPES],
|
|
142
|
+
dynamic: false,
|
|
143
|
+
name: permission.name,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
for (const agent of options.preparedComponents ? [] : resolvePlatformEntries(manifest.extensions?.agents, 'codex')) {
|
|
147
|
+
extensionKinds.add('agent');
|
|
148
|
+
addAwComponent(components, {
|
|
149
|
+
key: `extensions.agents:${agent.name}`,
|
|
150
|
+
kind: 'agent',
|
|
151
|
+
scopes: [...BOTH_SCOPES],
|
|
152
|
+
dynamic: false,
|
|
153
|
+
name: agent.name,
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
// Dynamic component identities exist only after preparation. Static inspection
|
|
157
|
+
// reports the declarations it can read and leaves that collection unobserved.
|
|
158
|
+
const orderedNativeKinds = NATIVE_KIND_ORDER.filter((kind) => nativeKinds.has(kind));
|
|
159
|
+
const orderedExtensionKinds = EXTENSION_KIND_ORDER.filter((kind) => extensionKinds.has(kind));
|
|
160
|
+
const orderedUnsupportedKinds = [];
|
|
161
|
+
const collisions = collectOwnerCollisions(components);
|
|
162
|
+
const missingNativeIdentityKinds = orderedNativeKinds.filter((kind) => components.some((component) => component.owner === 'aw'
|
|
163
|
+
&& component.dynamic
|
|
164
|
+
&& component.kind === kind)
|
|
165
|
+
&& components.some((component) => component.owner === 'codex-native'
|
|
166
|
+
&& component.kind === kind
|
|
167
|
+
&& !component.name));
|
|
168
|
+
const errorCode = collisions.length > 0
|
|
169
|
+
? 'codexSurfaceOwnerCollision'
|
|
170
|
+
: missingNativeIdentityKinds.length > 0
|
|
171
|
+
? 'codexSurfaceNativeIdentityMissing'
|
|
172
|
+
: orderedUnsupportedKinds.length > 0
|
|
173
|
+
? 'codexNativeKindUnsupported'
|
|
174
|
+
: undefined;
|
|
175
|
+
const classification = errorCode
|
|
176
|
+
? 'unsupported'
|
|
177
|
+
: orderedNativeKinds.length > 0 && orderedExtensionKinds.length > 0
|
|
178
|
+
? 'mixed'
|
|
179
|
+
: orderedNativeKinds.length > 0
|
|
180
|
+
? 'native'
|
|
181
|
+
: orderedExtensionKinds.length > 0
|
|
182
|
+
? 'aw-extension'
|
|
183
|
+
: 'empty';
|
|
184
|
+
const deliveryOwner = errorCode
|
|
185
|
+
? 'unsupported'
|
|
186
|
+
: classification === 'mixed'
|
|
187
|
+
? 'split'
|
|
188
|
+
: classification === 'native'
|
|
189
|
+
? 'codex-native'
|
|
190
|
+
: classification === 'aw-extension'
|
|
191
|
+
? 'aw'
|
|
192
|
+
: 'none';
|
|
193
|
+
return {
|
|
194
|
+
ok: errorCode === undefined,
|
|
195
|
+
configInputs,
|
|
196
|
+
dynamicComponents: options.preparedComponents ? 'prepared' : manifest.artifacts ? 'unprepared' : 'not-declared',
|
|
197
|
+
nativeKinds: orderedNativeKinds,
|
|
198
|
+
extensionKinds: orderedExtensionKinds,
|
|
199
|
+
unsupportedKinds: orderedUnsupportedKinds,
|
|
200
|
+
classification,
|
|
201
|
+
deliveryOwner,
|
|
202
|
+
scopeOverlap: errorCode
|
|
203
|
+
? 'none'
|
|
204
|
+
: orderedExtensionKinds.length > 0
|
|
205
|
+
? 'aw-owned-conflict'
|
|
206
|
+
: orderedNativeKinds.length > 0
|
|
207
|
+
? 'native-compatible'
|
|
208
|
+
: 'none',
|
|
209
|
+
components,
|
|
210
|
+
collisions,
|
|
211
|
+
missingNativeIdentityKinds,
|
|
212
|
+
...(errorCode ? { errorCode } : {}),
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
export function assertCodexSurfaceSupported(analysis) {
|
|
216
|
+
if (!analysis.ok)
|
|
217
|
+
throw new CodexSurfaceAnalysisError(analysis);
|
|
218
|
+
return analysis;
|
|
219
|
+
}
|
|
220
|
+
//# sourceMappingURL=codex-surface-analysis.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex-surface-analysis.js","sourceRoot":"","sources":["../../../src/utils/codex-surface-analysis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAA6B,MAAM,wCAAwC,CAAC;AAM9G,OAAO,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,OAAO;IACP,KAAK;IACL,MAAM;IACN,aAAa;CACL,CAAC;AA0DX,MAAM,OAAO,yBAA0B,SAAQ,KAAK;IACzC,IAAI,CAGoB;IACxB,QAAQ,CAAuB;IAExC,YAAY,QAA8B;QACxC,MAAM,IAAI,GAAG,QAAQ,CAAC,SAAS,IAAI,4BAA4B,CAAC;QAChE,KAAK,CAAC,GAAG,IAAI,uDAAuD,CAAC,CAAC;QACtE,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;QACxC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;CACF;AAED,MAAM,WAAW,GAAY,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AACjD,MAAM,iBAAiB,GAAwD;IAC7E,OAAO;IACP,KAAK;IACL,MAAM;IACN,aAAa;CACd,CAAC;AACF,MAAM,oBAAoB,GAAyB;IACjD,OAAO;IACP,aAAa;IACb,YAAY;IACZ,OAAO;CACR,CAAC;AAEF,SAAS,WAAW,CAAC,IAAY,EAAE,KAAa;IAC9C,OAAO,IAAI,GAAG,KAAK,CAAC,CA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B;QACrC,gBAAgB,EAAE,uBAAuB;QACzC,cAAc;QACd,aAAa;QACb,YAAY,EAAE,SAAS;YACrB,CAAC,CAAC,MAAM;YACR,CAAC,CAAC,qBAAqB,CAAC,MAAM,GAAG,CAAC;gBAChC,CAAC,CAAC,mBAAmB;gBACrB,CAAC,CAAC,kBAAkB,CAAC,MAAM,GAAG,CAAC;oBAC7B,CAAC,CAAC,mBAAmB;oBACrB,CAAC,CAAC,MAAM;QACd,UAAU;QACV,UAAU;QACV,0BAA0B;QAC1B,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACpC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,2BAA2B,CACzC,QAA8B;IAE9B,IAAI,CAAC,QAAQ,CAAC,EAAE;QAAE,MAAM,IAAI,yBAAyB,CAAC,QAAQ,CAAC,CAAC;IAChE,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type ManagedCommandReference } from '@lesliechan721/aw-plugin-core/manifest';
|
|
2
|
+
import type { RenderUnit } from '../platforms/contracts.js';
|
|
3
|
+
import type { PlatformTarget, PluginMeta } from '../types.js';
|
|
4
|
+
import type { PreparedPlatformComponents } from './artifact-renderer.js';
|
|
5
|
+
import { type DynamicSkillTree } from './dynamic-skill-tree.js';
|
|
6
|
+
import { prepareManagedCommandPackage, type ManagedCommandCandidate } from './managed-command-materialization.js';
|
|
7
|
+
import { type ManagedCommandSkillProducerResolution } from './managed-command-preparation.js';
|
|
8
|
+
export interface FinalizedPlatformComponents {
|
|
9
|
+
prepared: PreparedPlatformComponents;
|
|
10
|
+
commandCandidates: ManagedCommandCandidate[];
|
|
11
|
+
producerResolutions: ManagedCommandSkillProducerResolution[];
|
|
12
|
+
commandResolver?: (reference: ManagedCommandReference) => string;
|
|
13
|
+
skills: Array<{
|
|
14
|
+
componentId: string;
|
|
15
|
+
resourceRoot: string;
|
|
16
|
+
tree: DynamicSkillTree;
|
|
17
|
+
}>;
|
|
18
|
+
cleanup(): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
/** Prepare command bindings and AW runtime files against one already computed component set. */
|
|
21
|
+
export declare function finalizePlatformSkillProducers(options: {
|
|
22
|
+
plugin: PluginMeta;
|
|
23
|
+
plugins?: readonly PluginMeta[];
|
|
24
|
+
platform: PlatformTarget;
|
|
25
|
+
renderUnit: Pick<RenderUnit, 'physicalKey' | 'renderScope' | 'kinds'>;
|
|
26
|
+
prepared: PreparedPlatformComponents;
|
|
27
|
+
skillWorkRoot: string;
|
|
28
|
+
cwd: string;
|
|
29
|
+
env: NodeJS.ProcessEnv;
|
|
30
|
+
signal?: AbortSignal;
|
|
31
|
+
scriptTimeoutMs?: number;
|
|
32
|
+
/** An operation-owned cache. Its owner retains and cleans roots after every consumer completes. */
|
|
33
|
+
packagePreparationCache?: Map<string, Promise<Awaited<ReturnType<typeof prepareManagedCommandPackage>>>>;
|
|
34
|
+
}): Promise<FinalizedPlatformComponents>;
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import crypto from 'node:crypto';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import fs from 'fs-extra';
|
|
4
|
+
import { computeCanonicalDirectoryDigest } from '@lesliechan721/agent-skill-eval';
|
|
5
|
+
import { createAwPluginRequirementsReceipt, createRuntimeConfigOrigin, COMMAND_PRODUCER_RECORD_FILE, getCommandPackageId, normalizeInstalledCommandProducer, parseManagedCommandPlaceholders, validatePortableSkillName, resolveInvocationPolicy, } from '@lesliechan721/aw-plugin-core/manifest';
|
|
6
|
+
import { artifactValueDigest } from './artifact-plan.js';
|
|
7
|
+
import { writeDynamicSkillTree } from './dynamic-skill-tree.js';
|
|
8
|
+
import { createManagedCommandReferenceResolver, injectNativeToolClosureFiles, managedCommandProducerIdentity, prepareManagedCommandPackage, resolveSkillManagedCommandReferences, } from './managed-command-materialization.js';
|
|
9
|
+
import { prepareAgentCommandSets, resolveManagedCommandSkillProducers } from './managed-command-preparation.js';
|
|
10
|
+
import { readSafeOperationError } from './safe-operation-diagnostic.js';
|
|
11
|
+
import { injectInstalledRuntimeConfig } from './runtime-config.js';
|
|
12
|
+
import { validateRuntimeSkillClosure } from './runtime-skill-closure.js';
|
|
13
|
+
/** Prepare command bindings and AW runtime files against one already computed component set. */
|
|
14
|
+
export async function finalizePlatformSkillProducers(options) {
|
|
15
|
+
if (!options.renderUnit.kinds.includes('skill')) {
|
|
16
|
+
return { prepared: options.prepared, commandCandidates: [], producerResolutions: [], skills: [], cleanup: async () => { } };
|
|
17
|
+
}
|
|
18
|
+
const skills = [];
|
|
19
|
+
const cleanupPackages = [];
|
|
20
|
+
const commandCandidates = [];
|
|
21
|
+
const producerResolutions = [];
|
|
22
|
+
const skillCandidates = new Map();
|
|
23
|
+
const unavailableProducers = [];
|
|
24
|
+
const blockedSkills = new Set();
|
|
25
|
+
const commandResources = [];
|
|
26
|
+
try {
|
|
27
|
+
for (const component of options.prepared.expected.components) {
|
|
28
|
+
if (component.kind !== 'skill')
|
|
29
|
+
continue;
|
|
30
|
+
validatePortableSkillName(component.name, 'Skill component name');
|
|
31
|
+
const files = options.prepared.resources.files.filter((file) => file.componentId === component.id);
|
|
32
|
+
const tree = {
|
|
33
|
+
skillKey: component.name,
|
|
34
|
+
files: Object.fromEntries(files.map((file) => [file.path, Buffer.from(file.bytes)])),
|
|
35
|
+
fileModes: Object.fromEntries(files.filter((file) => (file.mode ?? 0) & 0o111).map((file) => [file.path, 0o755])),
|
|
36
|
+
};
|
|
37
|
+
const resourceRoot = path.join(options.skillWorkRoot, component.name);
|
|
38
|
+
await writeDynamicSkillTree(resourceRoot, tree);
|
|
39
|
+
skills.push({ componentId: component.id, resourceRoot, tree });
|
|
40
|
+
}
|
|
41
|
+
if (options.platform !== 'generic') {
|
|
42
|
+
const resolved = await resolveManagedCommandSkillProducers({
|
|
43
|
+
...options,
|
|
44
|
+
platform: options.platform,
|
|
45
|
+
components: options.prepared.expected,
|
|
46
|
+
skillResources: skills.map((skill) => ({ ...skill, physicalKey: options.renderUnit.physicalKey })),
|
|
47
|
+
dynamicScopeOffered: options.plugin.manifest.artifacts?.scopes?.includes(options.renderUnit.renderScope.kind) ?? true,
|
|
48
|
+
});
|
|
49
|
+
producerResolutions.push(...resolved);
|
|
50
|
+
for (const producer of resolved) {
|
|
51
|
+
if (producer.state !== 'ready') {
|
|
52
|
+
unavailableProducers.push(producer.producer);
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
try {
|
|
56
|
+
const candidate = await prepareAgentCommandSets({
|
|
57
|
+
...options, resolved: producer, referencePlugins: options.plugins,
|
|
58
|
+
});
|
|
59
|
+
commandCandidates.push(candidate);
|
|
60
|
+
skillCandidates.set(producer.componentId, candidate);
|
|
61
|
+
commandResources.push({ producer: candidate.producer, resourceRoot: candidate.resourceRoot });
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
options.signal?.throwIfAborted();
|
|
65
|
+
if (readSafeOperationError(error))
|
|
66
|
+
throw error;
|
|
67
|
+
producerResolutions[producerResolutions.indexOf(producer)] = { ...producer, state: 'failed',
|
|
68
|
+
error: error instanceof Error ? error : new Error('commandReferenceInvalid: Skill command preparation failed.') };
|
|
69
|
+
unavailableProducers.push(producer.producer);
|
|
70
|
+
blockedSkills.add(producer.componentId);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
const references = skills.filter((skill) => !blockedSkills.has(skill.componentId)).flatMap(({ tree }) => Object.entries(tree.files)
|
|
75
|
+
.filter(([file]) => file.endsWith('.md'))
|
|
76
|
+
.flatMap(([, bytes]) => parseManagedCommandPlaceholders(bytes.toString('utf8'))));
|
|
77
|
+
if (references.length && !options.plugin.manifest.requires?.aw.capabilities?.includes('aw.managed-commands.v1')) {
|
|
78
|
+
throw new Error('commandReferenceInvalid: Managed command references require aw.managed-commands.v1.');
|
|
79
|
+
}
|
|
80
|
+
if (references.length && options.platform === 'generic') {
|
|
81
|
+
throw new Error('commandReferenceInvalid: Generic Skills cannot bind native managed commands.');
|
|
82
|
+
}
|
|
83
|
+
const permissions = resolveInvocationPolicy(options.plugin.manifest, options.platform).permissions;
|
|
84
|
+
const permissionReferences = permissions.flatMap((permission) => [
|
|
85
|
+
...(permission.allow ?? []), ...(permission.ask ?? []), ...(permission.deny ?? []),
|
|
86
|
+
...(permission.sandbox?.excludedCommands ?? []),
|
|
87
|
+
]).flatMap((entry) => typeof entry === 'string' ? [] : [entry.command]);
|
|
88
|
+
const referencedPackages = new Set([...references.map(({ reference }) => reference), ...permissionReferences].flatMap((reference) => {
|
|
89
|
+
const set = options.plugin.manifest.managedCommands?.sets.find((set) => set.set === reference.set);
|
|
90
|
+
if (!set)
|
|
91
|
+
throw new Error('commandReferenceInvalid: The command set is not declared by this plugin.');
|
|
92
|
+
return set.producer.kind === 'package' ? [set.producer.packageKey] : [];
|
|
93
|
+
}));
|
|
94
|
+
for (const packageKey of referencedPackages) {
|
|
95
|
+
if (options.platform === 'generic')
|
|
96
|
+
throw new Error('commandReferenceInvalid: Generic Skills cannot bind native command packages.');
|
|
97
|
+
const declaration = options.plugin.manifest.managedCommands?.packages.find((entry) => entry.key === packageKey);
|
|
98
|
+
if (!declaration?.platforms.includes(options.platform)
|
|
99
|
+
|| options.renderUnit.renderScope.kind === 'user' && declaration.scope === 'project') {
|
|
100
|
+
throw new Error('commandReferenceInvalid: The command package is unavailable to this consumer.');
|
|
101
|
+
}
|
|
102
|
+
const identity = await managedCommandProducerIdentity({
|
|
103
|
+
...options, producer: { kind: 'package', packageKey }, scope: declaration.scope,
|
|
104
|
+
});
|
|
105
|
+
const cacheKey = getCommandPackageId(identity);
|
|
106
|
+
let preparation = options.packagePreparationCache?.get(cacheKey);
|
|
107
|
+
if (!preparation) {
|
|
108
|
+
preparation = prepareManagedCommandPackage({
|
|
109
|
+
...options, referencePlugins: options.plugins, packageKey, scope: declaration.scope, event: 'materialize',
|
|
110
|
+
});
|
|
111
|
+
options.packagePreparationCache?.set(cacheKey, preparation);
|
|
112
|
+
}
|
|
113
|
+
const candidate = await preparation;
|
|
114
|
+
if (!options.packagePreparationCache)
|
|
115
|
+
cleanupPackages.push(candidate.cleanup);
|
|
116
|
+
commandCandidates.push(candidate);
|
|
117
|
+
commandResources.push({ producer: candidate.producer, resourceRoot: candidate.resourceRoot });
|
|
118
|
+
}
|
|
119
|
+
const skillReferences = new Map(skills.map((skill) => [skill.componentId, Object.entries(skill.tree.files)
|
|
120
|
+
.filter(([file]) => file.endsWith('.md'))
|
|
121
|
+
.flatMap(([, bytes]) => parseManagedCommandPlaceholders(bytes.toString('utf8')).map(({ reference }) => reference))]));
|
|
122
|
+
let commandResolver;
|
|
123
|
+
let changed;
|
|
124
|
+
do {
|
|
125
|
+
changed = false;
|
|
126
|
+
commandResolver = options.platform === 'generic' ? undefined : await createManagedCommandReferenceResolver({
|
|
127
|
+
...options, platform: options.platform, scope: options.renderUnit.renderScope.kind, candidates: commandCandidates, unavailableProducers,
|
|
128
|
+
});
|
|
129
|
+
for (const skill of skills) {
|
|
130
|
+
if (blockedSkills.has(skill.componentId) || !commandResolver)
|
|
131
|
+
continue;
|
|
132
|
+
try {
|
|
133
|
+
for (const reference of skillReferences.get(skill.componentId) ?? [])
|
|
134
|
+
commandResolver(reference);
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
blockedSkills.add(skill.componentId);
|
|
138
|
+
changed = true;
|
|
139
|
+
const candidate = skillCandidates.get(skill.componentId);
|
|
140
|
+
if (!candidate)
|
|
141
|
+
continue;
|
|
142
|
+
commandCandidates.splice(commandCandidates.indexOf(candidate), 1);
|
|
143
|
+
unavailableProducers.push(candidate.producer);
|
|
144
|
+
const index = producerResolutions.findIndex((producer) => producer.componentId === skill.componentId);
|
|
145
|
+
const producer = producerResolutions[index];
|
|
146
|
+
if (producer)
|
|
147
|
+
producerResolutions[index] = { ...producer, state: 'failed',
|
|
148
|
+
error: error instanceof Error ? error : new Error('commandReferenceInvalid: A required command is unavailable.') };
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
} while (changed);
|
|
152
|
+
const retainedSkills = skills.filter((skill) => !blockedSkills.has(skill.componentId));
|
|
153
|
+
if (commandResolver)
|
|
154
|
+
for (const { tree } of retainedSkills)
|
|
155
|
+
resolveSkillManagedCommandReferences(tree, commandResolver);
|
|
156
|
+
const receipt = Buffer.from(`${JSON.stringify(createAwPluginRequirementsReceipt({ name: options.plugin.manifest.name, version: options.plugin.manifest.version }, options.plugin.manifest.requires?.aw.capabilities ?? []), null, 2)}\n`);
|
|
157
|
+
const components = structuredClone(options.prepared.expected.components.filter((component) => !blockedSkills.has(component.id)));
|
|
158
|
+
const unmet = [...options.prepared.expected.unmet,
|
|
159
|
+
...options.prepared.expected.components.filter((component) => blockedSkills.has(component.id))
|
|
160
|
+
.map((component) => ({ id: component.id, kind: component.kind, name: component.name,
|
|
161
|
+
requiredFeatures: [], reasonCode: 'dependency-unmet' }))];
|
|
162
|
+
for (const skill of retainedSkills) {
|
|
163
|
+
const commandCandidate = skillCandidates.get(skill.componentId);
|
|
164
|
+
if (commandCandidate) {
|
|
165
|
+
const nativeTools = injectNativeToolClosureFiles(skill.tree.files, commandCandidate.nativeTools);
|
|
166
|
+
if (nativeTools)
|
|
167
|
+
commandCandidate.nativeTools = nativeTools;
|
|
168
|
+
const record = normalizeInstalledCommandProducer({ schemaVersion: 1,
|
|
169
|
+
producer: commandCandidate.producer, sets: commandCandidate.sets,
|
|
170
|
+
...(nativeTools ? { nativeTools } : {}),
|
|
171
|
+
});
|
|
172
|
+
skill.tree.files[COMMAND_PRODUCER_RECORD_FILE] = Buffer.from(`${JSON.stringify(record, null, 2)}\n`);
|
|
173
|
+
}
|
|
174
|
+
skill.tree.files['aw-plugin-requirements.json'] = receipt;
|
|
175
|
+
const snapshot = options.prepared.runtimeConfigSnapshots[skill.componentId];
|
|
176
|
+
await injectInstalledRuntimeConfig(skill.tree, snapshot, snapshot ? { origin: createRuntimeConfigOrigin({
|
|
177
|
+
snapshot, inputDigest: options.prepared.evidence.renderInputDigest,
|
|
178
|
+
}) } : {});
|
|
179
|
+
await fs.remove(skill.resourceRoot);
|
|
180
|
+
await writeDynamicSkillTree(skill.resourceRoot, skill.tree);
|
|
181
|
+
await validateRuntimeSkillClosure(skill.resourceRoot);
|
|
182
|
+
const component = components.find((component) => component.id === skill.componentId);
|
|
183
|
+
if (!component || component.kind !== 'skill')
|
|
184
|
+
throw new Error('componentSkillIdentityChanged');
|
|
185
|
+
component.content.files = Object.fromEntries(Object.keys(component.content.files).map((file) => {
|
|
186
|
+
const bytes = skill.tree.files[file];
|
|
187
|
+
const original = options.prepared.resources.files.find((entry) => entry.componentId === skill.componentId && entry.path === file);
|
|
188
|
+
const resource = component.content.files[file];
|
|
189
|
+
return [file, resource && original?.bytes.equals(bytes) ? resource : { text: bytes.toString('utf8') }];
|
|
190
|
+
}));
|
|
191
|
+
}
|
|
192
|
+
const files = [
|
|
193
|
+
...options.prepared.resources.files.filter((file) => !skills.some((skill) => skill.componentId === file.componentId)),
|
|
194
|
+
...retainedSkills.flatMap((skill) => Object.entries(skill.tree.files).map(([file, bytes]) => {
|
|
195
|
+
const original = options.prepared.resources.files.find((entry) => entry.componentId === skill.componentId && entry.path === file);
|
|
196
|
+
return {
|
|
197
|
+
componentId: skill.componentId, path: file, bytes,
|
|
198
|
+
...(original?.source && original.bytes.equals(bytes) ? { source: original.source } : {}),
|
|
199
|
+
mode: skill.tree.fileModes?.[file] ?? 0o644,
|
|
200
|
+
};
|
|
201
|
+
})),
|
|
202
|
+
];
|
|
203
|
+
const resourceDigest = artifactValueDigest({ inputDigest: options.prepared.resources.digest, files: files.map(({ componentId, path: file, bytes, mode }) => ({
|
|
204
|
+
componentId, path: file, digest: `sha256:${crypto.createHash('sha256').update(bytes).digest('hex')}`, mode,
|
|
205
|
+
})) });
|
|
206
|
+
const commands = await Promise.all(commandResources.filter((entry) => commandCandidates.some((candidate) => candidate.producer === entry.producer)).map(async (entry) => ({
|
|
207
|
+
producer: entry.producer,
|
|
208
|
+
resourceDigest: await computeCanonicalDirectoryDigest(entry.resourceRoot),
|
|
209
|
+
sets: commandCandidates.find((candidate) => candidate.producer === entry.producer)?.sets ?? [],
|
|
210
|
+
nativeTools: commandCandidates.find((candidate) => candidate.producer === entry.producer)?.nativeTools,
|
|
211
|
+
})));
|
|
212
|
+
const prepared = {
|
|
213
|
+
...options.prepared,
|
|
214
|
+
expected: { ...options.prepared.expected, components, unmet },
|
|
215
|
+
empty: components.length ? null : unmet.length ? 'unmet' : 'intentional',
|
|
216
|
+
resources: { ...options.prepared.resources, files, digest: resourceDigest },
|
|
217
|
+
evidence: { ...options.prepared.evidence, resourceDigest,
|
|
218
|
+
renderInputDigest: artifactValueDigest({ components: options.prepared.evidence.renderInputDigest, commands, unavailableProducers }),
|
|
219
|
+
},
|
|
220
|
+
};
|
|
221
|
+
return { prepared, skills: retainedSkills, commandCandidates, producerResolutions, ...(commandResolver ? { commandResolver } : {}), cleanup: async () => { await Promise.all(cleanupPackages.map((cleanup) => cleanup())); } };
|
|
222
|
+
}
|
|
223
|
+
catch (error) {
|
|
224
|
+
await Promise.all(cleanupPackages.map((cleanup) => cleanup()));
|
|
225
|
+
throw error;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
//# sourceMappingURL=component-command-preparation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-command-preparation.js","sourceRoot":"","sources":["../../../src/utils/component-command-preparation.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,EAAE,+BAA+B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,EACL,iCAAiC,EACjC,yBAAyB,EACzB,4BAA4B,EAC5B,mBAAmB,EACnB,iCAAiC,EACjC,+BAA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E;YAC7D,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa;YACxE,SAAS,EAAE,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE;YAC3E,QAAQ,EAAE,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,QAAQ,EAAE,cAAc;gBACtD,iBAAiB,EAAE,mBAAmB,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,iBAAiB,EAAE,QAAQ,EAAE,oBAAoB,EAAE,CAAC;aACpI;SACF,CAAC;QACF,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,IAAI,EAAE,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACjO,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QAC/D,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type ExpectedComponentSet, type PlatformCapabilitiesV2, type PlatformRenderContextV2, type SourceRef } from '@lesliechan721/aw-plugin-core/manifest';
|
|
2
|
+
import type { PlatformTarget, PluginMeta } from '../types.js';
|
|
3
|
+
export interface VerifiedComponentFile {
|
|
4
|
+
componentId: string;
|
|
5
|
+
path: string;
|
|
6
|
+
bytes: Buffer;
|
|
7
|
+
source?: SourceRef;
|
|
8
|
+
mode?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface VerifiedResourceClosure {
|
|
11
|
+
resources: PlatformRenderContextV2['resources'];
|
|
12
|
+
files: VerifiedComponentFile[];
|
|
13
|
+
bundleFiles: Array<{
|
|
14
|
+
path: string;
|
|
15
|
+
bytes: Buffer;
|
|
16
|
+
mode?: number;
|
|
17
|
+
componentIds?: string[];
|
|
18
|
+
}>;
|
|
19
|
+
commandResources: VerifiedCommandResource[];
|
|
20
|
+
digest: string;
|
|
21
|
+
}
|
|
22
|
+
export interface CommandResourceReference {
|
|
23
|
+
start: number;
|
|
24
|
+
end: number;
|
|
25
|
+
path: string;
|
|
26
|
+
}
|
|
27
|
+
export interface VerifiedCommandResource extends CommandResourceReference {
|
|
28
|
+
componentId: string;
|
|
29
|
+
field: 'command' | 'args';
|
|
30
|
+
index?: number;
|
|
31
|
+
original: string;
|
|
32
|
+
}
|
|
33
|
+
/** Only literal package paths are portable. Shell expansion is not a resource declaration. */
|
|
34
|
+
export declare function commandResourceReferences(value: string, shell: boolean, platform: PlatformCapabilitiesV2['platform'], executable?: string): CommandResourceReference[];
|
|
35
|
+
export declare function resolvePlatformComponentResources(plugin: PluginMeta): Promise<PlatformRenderContextV2['resources']>;
|
|
36
|
+
export declare function resolveStaticPlatformResourceRoot(pluginRoot: string, platform: PlatformTarget): Promise<string>;
|
|
37
|
+
/** Read only the bundle bytes used by the admitted static components. */
|
|
38
|
+
export declare function readStaticComponentResourceInputs(options: {
|
|
39
|
+
plugin: PluginMeta;
|
|
40
|
+
expected: ExpectedComponentSet;
|
|
41
|
+
staticResourceRoot: string;
|
|
42
|
+
capabilities: PlatformCapabilitiesV2;
|
|
43
|
+
}): Promise<unknown>;
|
|
44
|
+
export declare function verifyPlatformComponentResources(options: {
|
|
45
|
+
plugin: PluginMeta;
|
|
46
|
+
expected: ExpectedComponentSet;
|
|
47
|
+
resources: PlatformRenderContextV2['resources'];
|
|
48
|
+
capabilities: PlatformCapabilitiesV2;
|
|
49
|
+
sensitiveValues: readonly string[];
|
|
50
|
+
staticResourceRoot?: string;
|
|
51
|
+
}): Promise<VerifiedResourceClosure>;
|