@lesliechan721/aw 0.1.0-beta.7 → 0.1.0-beta.72
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 +199 -0
- package/dist/authoring/assets/aw-runtime-config.mjs.map +1 -0
- package/dist/authoring/scripts/add-skill.mjs +13 -27
- package/dist/authoring/scripts/add-skill.mjs.map +1 -1
- package/dist/authoring/scripts/init-plugin.mjs +74 -103
- 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 +229 -8
- 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 -126
- package/dist/authoring/scripts/lib/skill-scaffold.mjs.map +1 -1
- package/dist/authoring/scripts/plugin-status.mjs +8 -11
- package/dist/authoring/scripts/plugin-status.mjs.map +1 -1
- package/dist/authoring/scripts/remove-plugin.mjs +3 -2
- package/dist/authoring/scripts/remove-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/validate-plugin.mjs +527 -1673
- 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 +28 -0
- package/dist/scripts/aw-skill-eval-materializer.js +339 -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 +8 -10
- package/dist/scripts/plugin-staging.js +19 -30
- 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 +246 -108
- 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 +2 -2
- package/dist/src/adapters/helpers.js.map +1 -1
- package/dist/src/authoring/workspace-commands.d.ts +20 -1
- package/dist/src/authoring/workspace-commands.js +28 -6
- package/dist/src/authoring/workspace-commands.js.map +1 -1
- package/dist/src/commands/aw-capabilities.d.ts +78 -0
- package/dist/src/commands/aw-capabilities.js +270 -0
- package/dist/src/commands/aw-capabilities.js.map +1 -0
- package/dist/src/commands/catalog-dev-source.d.ts +157 -0
- package/dist/src/commands/catalog-dev-source.js +725 -0
- package/dist/src/commands/catalog-dev-source.js.map +1 -0
- package/dist/src/commands/catalog-generation.d.ts +21 -0
- package/dist/src/commands/catalog-generation.js +9 -0
- package/dist/src/commands/catalog-generation.js.map +1 -0
- package/dist/src/commands/catalog-publication-inspection.d.ts +71 -30
- package/dist/src/commands/catalog-publication-inspection.js +475 -63
- 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 +18 -0
- package/dist/src/commands/catalog-publication-target.js +95 -0
- package/dist/src/commands/catalog-publication-target.js.map +1 -0
- package/dist/src/commands/catalog-publish.d.ts +89 -15
- package/dist/src/commands/catalog-publish.js +736 -210
- package/dist/src/commands/catalog-publish.js.map +1 -1
- package/dist/src/commands/catalog-source.d.ts +64 -22
- package/dist/src/commands/catalog-source.js +327 -91
- package/dist/src/commands/catalog-source.js.map +1 -1
- package/dist/src/commands/catalog-status.d.ts +18 -22
- package/dist/src/commands/catalog-status.js +82 -116
- 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/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 +359 -0
- package/dist/src/commands/managed-commands.js.map +1 -0
- package/dist/src/commands/offline-cleanup-evidence.d.ts +67 -0
- package/dist/src/commands/offline-cleanup-evidence.js +181 -0
- package/dist/src/commands/offline-cleanup-evidence.js.map +1 -0
- package/dist/src/commands/operation-plan.d.ts +184 -0
- package/dist/src/commands/operation-plan.js +72 -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 +10 -17
- package/dist/src/commands/options.js +91 -38
- package/dist/src/commands/options.js.map +1 -1
- package/dist/src/commands/plugin-capabilities.js +85 -30
- 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 +53 -0
- package/dist/src/commands/public-lifecycle-result.js +102 -0
- package/dist/src/commands/public-lifecycle-result.js.map +1 -0
- package/dist/src/commands/public-lifecycle.d.ts +26 -0
- package/dist/src/commands/public-lifecycle.js +469 -0
- package/dist/src/commands/public-lifecycle.js.map +1 -0
- package/dist/src/commands/public-plugin-query.d.ts +15 -0
- package/dist/src/commands/public-plugin-query.js +154 -0
- package/dist/src/commands/public-plugin-query.js.map +1 -0
- package/dist/src/commands/rebuild-command.d.ts +177 -29
- package/dist/src/commands/rebuild-command.js +4113 -745
- package/dist/src/commands/rebuild-command.js.map +1 -1
- package/dist/src/commands/rebuild-integration.d.ts +163 -22
- package/dist/src/commands/rebuild-integration.js +3553 -1456
- package/dist/src/commands/rebuild-integration.js.map +1 -1
- package/dist/src/commands/rebuild-operations.d.ts +60 -30
- package/dist/src/commands/rebuild-operations.js +266 -320
- package/dist/src/commands/rebuild-operations.js.map +1 -1
- 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 +399 -0
- package/dist/src/commands/review-inspection.js.map +1 -0
- package/dist/src/commands/review-preparation.d.ts +49 -0
- package/dist/src/commands/review-preparation.js +437 -0
- package/dist/src/commands/review-preparation.js.map +1 -0
- package/dist/src/commands/runtime.d.ts +5 -5
- package/dist/src/commands/runtime.js +42 -54
- 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 +406 -0
- package/dist/src/commands/skill-eval.js.map +1 -0
- package/dist/src/commands/status-v6.d.ts +317 -0
- package/dist/src/commands/status-v6.js +2970 -0
- package/dist/src/commands/status-v6.js.map +1 -0
- package/dist/src/commands/targets-command.d.ts +29 -0
- package/dist/src/commands/targets-command.js +131 -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 +6 -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 +129 -30
- package/dist/src/commands/write-commands.js.map +1 -1
- package/dist/src/constants.d.ts +7 -2
- package/dist/src/constants.js +7 -2
- 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 +377 -210
- 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 +1 -27
- package/dist/src/index.js +1877 -1592
- 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 +145 -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 +284 -79
- package/dist/src/output/command-receipt.js.map +1 -1
- package/dist/src/output/model.d.ts +3 -44
- package/dist/src/output/model.js +1 -144
- package/dist/src/output/model.js.map +1 -1
- package/dist/src/output/public-result.d.ts +43 -0
- package/dist/src/output/public-result.js +139 -0
- package/dist/src/output/public-result.js.map +1 -0
- package/dist/src/output/rebuild-progress.js +15 -13
- 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 +575 -0
- package/dist/src/output/receipt-projection.js.map +1 -0
- package/dist/src/portable/commands.d.ts +59 -10
- package/dist/src/portable/commands.js +98 -302
- 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 +25 -4
- package/dist/src/portable/materializer.js +247 -68
- 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 +55 -0
- package/dist/src/portable/recovery-layout.js.map +1 -0
- package/dist/src/portable/recovery.d.ts +143 -0
- package/dist/src/portable/recovery.js +339 -0
- package/dist/src/portable/recovery.js.map +1 -0
- package/dist/src/portable/writer.d.ts +64 -0
- package/dist/src/portable/writer.js +316 -0
- package/dist/src/portable/writer.js.map +1 -0
- package/dist/src/recovery/coordinator.d.ts +140 -0
- package/dist/src/recovery/coordinator.js +1200 -0
- package/dist/src/recovery/coordinator.js.map +1 -0
- package/dist/src/recovery/demand.d.ts +44 -0
- package/dist/src/recovery/demand.js +178 -0
- package/dist/src/recovery/demand.js.map +1 -0
- package/dist/src/recovery/joint-coordinator.d.ts +24 -0
- package/dist/src/recovery/joint-coordinator.js +797 -0
- package/dist/src/recovery/joint-coordinator.js.map +1 -0
- package/dist/src/recovery/joint-demand.d.ts +68 -0
- package/dist/src/recovery/joint-demand.js +166 -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 +81 -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 +367 -0
- package/dist/src/recovery/retirement.js.map +1 -0
- package/dist/src/recovery/status.d.ts +108 -0
- package/dist/src/recovery/status.js +418 -0
- package/dist/src/recovery/status.js.map +1 -0
- package/dist/src/recovery/types.d.ts +86 -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/review-profile.d.ts +19 -0
- package/dist/src/review/review-profile.js +270 -0
- package/dist/src/review/review-profile.js.map +1 -0
- package/dist/src/review/review-selection.d.ts +29 -0
- package/dist/src/review/review-selection.js +469 -0
- package/dist/src/review/review-selection.js.map +1 -0
- package/dist/src/review/review-types.d.ts +68 -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 +27 -0
- package/dist/src/review/skill-materialization.js +228 -0
- package/dist/src/review/skill-materialization.js.map +1 -0
- package/dist/src/review/source-binding.d.ts +198 -0
- package/dist/src/review/source-binding.js +714 -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 +217 -0
- package/dist/src/tui/agent-management.js.map +1 -0
- package/dist/src/tui/agent-settings.d.ts +44 -0
- package/dist/src/tui/agent-settings.js +98 -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 +21 -0
- package/dist/src/tui/catalog-generation.js +156 -0
- package/dist/src/tui/catalog-generation.js.map +1 -0
- 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 +192 -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 -1955
- 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 +11 -2
- package/dist/src/tui/controller-runtime.js +2223 -471
- package/dist/src/tui/controller-runtime.js.map +1 -1
- package/dist/src/tui/controller.d.ts +697 -66
- package/dist/src/tui/controller.js +3695 -778
- 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/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 +3 -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 +62 -0
- package/dist/src/tui/glossary.js.map +1 -0
- package/dist/src/tui/index.d.ts +6 -1
- package/dist/src/tui/index.js +5 -1
- package/dist/src/tui/index.js.map +1 -1
- package/dist/src/tui/input-display.d.ts +9 -0
- package/dist/src/tui/input-display.js +58 -0
- package/dist/src/tui/input-display.js.map +1 -0
- 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 +246 -35
- package/dist/src/tui/model.js +1514 -401
- 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 +71 -0
- package/dist/src/tui/operation-diagnostic-screens.js.map +1 -0
- package/dist/src/tui/operation-history.d.ts +81 -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 +23 -0
- package/dist/src/tui/operation-review-planner.js +1341 -0
- package/dist/src/tui/operation-review-planner.js.map +1 -0
- package/dist/src/tui/plugin-content.d.ts +31 -0
- package/dist/src/tui/plugin-content.js +683 -0
- package/dist/src/tui/plugin-content.js.map +1 -0
- package/dist/src/tui/plugin-detail.d.ts +71 -0
- package/dist/src/tui/plugin-detail.js +252 -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 +194 -17
- 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 +122 -0
- package/dist/src/tui/scoped-inventory.js +225 -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/source-ref-presets.d.ts +3 -0
- package/dist/src/tui/source-ref-presets.js +11 -0
- package/dist/src/tui/source-ref-presets.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/views.js +31 -3
- package/dist/src/tui/views.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 +268 -23
- package/dist/src/types.js +1 -0
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils/agent-version.d.ts +7 -1
- package/dist/src/utils/agent-version.js +38 -7
- package/dist/src/utils/agent-version.js.map +1 -1
- package/dist/src/utils/artifact-plan.d.ts +8 -6
- package/dist/src/utils/artifact-plan.js +80 -19
- package/dist/src/utils/artifact-plan.js.map +1 -1
- package/dist/src/utils/artifact-renderer.d.ts +35 -11
- package/dist/src/utils/artifact-renderer.js +250 -227
- package/dist/src/utils/artifact-renderer.js.map +1 -1
- package/dist/src/utils/artifact-request.d.ts +33 -0
- package/dist/src/utils/artifact-request.js +100 -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/aw-home-mutation-lock.d.ts +1 -0
- package/dist/src/utils/aw-home-mutation-lock.js +32 -4
- package/dist/src/utils/aw-home-mutation-lock.js.map +1 -1
- package/dist/src/utils/bundle-integrity.d.ts +0 -1
- package/dist/src/utils/bundle-integrity.js +0 -25
- package/dist/src/utils/bundle-integrity.js.map +1 -1
- package/dist/src/utils/bundle-layout.js +47 -45
- 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 +10 -0
- package/dist/src/utils/catalog-digests.js +59 -20
- 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 +16 -0
- package/dist/src/utils/catalog-generation-error.js +30 -0
- package/dist/src/utils/catalog-generation-error.js.map +1 -0
- package/dist/src/utils/catalog-generation-resolver.d.ts +44 -0
- package/dist/src/utils/catalog-generation-resolver.js +273 -0
- package/dist/src/utils/catalog-generation-resolver.js.map +1 -0
- package/dist/src/utils/catalog-generation-service.d.ts +183 -0
- package/dist/src/utils/catalog-generation-service.js +1281 -0
- package/dist/src/utils/catalog-generation-service.js.map +1 -0
- package/dist/src/utils/catalog-generation-state.d.ts +22 -0
- package/dist/src/utils/catalog-generation-state.js +192 -0
- package/dist/src/utils/catalog-generation-state.js.map +1 -0
- package/dist/src/utils/catalog-generation-store.d.ts +58 -0
- package/dist/src/utils/catalog-generation-store.js +452 -0
- package/dist/src/utils/catalog-generation-store.js.map +1 -0
- package/dist/src/utils/catalog-manifest-v7.d.ts +5 -0
- package/dist/src/utils/{catalog-manifest-v4.js → catalog-manifest-v7.js} +35 -43
- package/dist/src/utils/catalog-manifest-v7.js.map +1 -0
- package/dist/src/utils/catalog-operation-context.d.ts +20 -0
- package/dist/src/utils/catalog-operation-context.js +142 -0
- package/dist/src/utils/catalog-operation-context.js.map +1 -0
- package/dist/src/utils/catalog-public-error.d.ts +7 -3
- package/dist/src/utils/catalog-public-error.js +28 -8
- 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 +5 -3
- package/dist/src/utils/catalog-snapshot.js +11 -3
- package/dist/src/utils/catalog-snapshot.js.map +1 -1
- package/dist/src/utils/catalog-source-identity.d.ts +1 -0
- package/dist/src/utils/catalog-source-identity.js +21 -2
- package/dist/src/utils/catalog-source-identity.js.map +1 -1
- package/dist/src/utils/catalog-source-impact.d.ts +21 -0
- package/dist/src/utils/catalog-source-impact.js +344 -0
- package/dist/src/utils/catalog-source-impact.js.map +1 -0
- package/dist/src/utils/catalog-source-references.d.ts +8 -2
- package/dist/src/utils/catalog-source-references.js +200 -367
- package/dist/src/utils/catalog-source-references.js.map +1 -1
- package/dist/src/utils/catalog-sources.d.ts +15 -1
- package/dist/src/utils/catalog-sources.js +206 -27
- package/dist/src/utils/catalog-sources.js.map +1 -1
- package/dist/src/utils/claude-native-render-receipt.d.ts +14 -0
- package/dist/src/utils/claude-native-render-receipt.js +26 -0
- package/dist/src/utils/claude-native-render-receipt.js.map +1 -0
- package/dist/src/utils/claude-skills-root.d.ts +8 -0
- package/dist/src/utils/claude-skills-root.js +87 -0
- package/dist/src/utils/claude-skills-root.js.map +1 -0
- package/dist/src/utils/codex-config.d.ts +2 -0
- package/dist/src/utils/codex-config.js +26 -5
- package/dist/src/utils/codex-config.js.map +1 -1
- package/dist/src/utils/codex-executable-discovery.d.ts +26 -0
- package/dist/src/utils/codex-executable-discovery.js +397 -0
- package/dist/src/utils/codex-executable-discovery.js.map +1 -0
- package/dist/src/utils/codex-manager.d.ts +62 -0
- package/dist/src/utils/codex-manager.js +122 -0
- package/dist/src/utils/codex-manager.js.map +1 -0
- 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-native-render-receipt.d.ts +40 -0
- package/dist/src/utils/codex-native-render-receipt.js +205 -0
- package/dist/src/utils/codex-native-render-receipt.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 +43 -0
- package/dist/src/utils/codex-shared-native.js +81 -0
- package/dist/src/utils/codex-shared-native.js.map +1 -0
- package/dist/src/utils/codex-skill-staging.d.ts +2 -0
- 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 +46 -0
- package/dist/src/utils/codex-surface-analysis.js +249 -0
- package/dist/src/utils/codex-surface-analysis.js.map +1 -0
- package/dist/src/utils/dynamic-skill-tree.d.ts +5 -0
- package/dist/src/utils/dynamic-skill-tree.js +56 -7
- 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 +177 -145
- package/dist/src/utils/git-catalog-provider.js.map +1 -1
- package/dist/src/utils/local-marketplace.d.ts +39 -1
- package/dist/src/utils/local-marketplace.js +601 -84
- 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 +86 -0
- package/dist/src/utils/managed-command-evidence.js.map +1 -0
- package/dist/src/utils/managed-command-materialization.d.ts +121 -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-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 +654 -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 +3 -9
- package/dist/src/utils/multi-source-catalog.js +54 -110
- package/dist/src/utils/multi-source-catalog.js.map +1 -1
- package/dist/src/utils/native-cli.d.ts +62 -7
- package/dist/src/utils/native-cli.js +449 -58
- package/dist/src/utils/native-cli.js.map +1 -1
- package/dist/src/utils/native-demand.d.ts +10 -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 +21 -0
- package/dist/src/utils/native-tool-review.js +102 -0
- package/dist/src/utils/native-tool-review.js.map +1 -0
- package/dist/src/utils/orphan-marketplace-cleanup.js +0 -4
- package/dist/src/utils/orphan-marketplace-cleanup.js.map +1 -1
- package/dist/src/utils/ownership.d.ts +88 -20
- package/dist/src/utils/ownership.js +187 -223
- 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 +54 -65
- package/dist/src/utils/path-catalog-provider.js.map +1 -1
- package/dist/src/utils/paths.d.ts +0 -1
- package/dist/src/utils/paths.js +1 -2
- package/dist/src/utils/paths.js.map +1 -1
- 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 +58 -0
- package/dist/src/utils/plugin-config-impact.js +323 -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 +1246 -368
- package/dist/src/utils/plugin-config-write.js.map +1 -1
- package/dist/src/utils/plugin-config.d.ts +189 -120
- package/dist/src/utils/plugin-config.js +926 -1270
- package/dist/src/utils/plugin-config.js.map +1 -1
- package/dist/src/utils/plugin-scripts.d.ts +75 -128
- package/dist/src/utils/plugin-scripts.js +556 -525
- 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 +20 -0
- package/dist/src/utils/runtime-config.js +77 -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 +51 -9
- package/dist/src/utils/state-paths.js.map +1 -1
- package/dist/src/utils/target-eligibility.d.ts +8 -2
- package/dist/src/utils/target-eligibility.js +17 -8
- 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 +138 -0
- package/dist/src/utils/windows-npm-shim.js.map +1 -0
- package/dist/vitest.config.js +101 -9
- package/dist/vitest.config.js.map +1 -1
- package/package.json +31 -21
- package/dist/authoring/scripts/check-plugin-versions.d.mts +0 -2
- package/dist/authoring/scripts/check-plugin-versions.mjs +0 -5
- package/dist/authoring/scripts/check-plugin-versions.mjs.map +0 -1
- 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 -89
- package/dist/scripts/codex-eval-app-server.js +0 -1228
- 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 -1586
- 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 -185
- package/dist/scripts/plugin-eval-contract.js +0 -695
- 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/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-v4.d.ts +0 -123
- package/dist/src/commands/status-v4.js +0 -905
- package/dist/src/commands/status-v4.js.map +0 -1
- package/dist/src/commands/status.d.ts +0 -93
- package/dist/src/commands/status.js +0 -442
- package/dist/src/commands/status.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/active-marketplace-runtime-lock.d.ts +0 -12
- package/dist/src/utils/active-marketplace-runtime-lock.js +0 -133
- package/dist/src/utils/active-marketplace-runtime-lock.js.map +0 -1
- package/dist/src/utils/catalog-manifest-v3.d.ts +0 -2
- package/dist/src/utils/catalog-manifest-v3.js +0 -3
- package/dist/src/utils/catalog-manifest-v3.js.map +0 -1
- package/dist/src/utils/catalog-manifest-v4.d.ts +0 -5
- package/dist/src/utils/catalog-manifest-v4.js.map +0 -1
- package/dist/src/utils/catalog-source-cache.d.ts +0 -62
- package/dist/src/utils/catalog-source-cache.js +0 -296
- 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 -175
- package/dist/src/utils/lifecycle-active-store.js +0 -1276
- 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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CommandOptions, InstallCommandOptions, PlatformSelection, Scope, StatusCommandOptions
|
|
1
|
+
import type { CommandOptions, InstallCommandOptions, PlatformSelection, PlatformTarget, Scope, StatusCommandOptions } from '../types.js';
|
|
2
2
|
export interface NormalizeCommandOptionsDefaults {
|
|
3
3
|
cwd?: string;
|
|
4
4
|
defaultScope?: Scope;
|
|
@@ -12,10 +12,11 @@ export type RawCommandOptions = {
|
|
|
12
12
|
platform?: string;
|
|
13
13
|
scriptTimeout?: string | number;
|
|
14
14
|
scriptTimeoutMs?: string | number;
|
|
15
|
+
yes?: boolean;
|
|
15
16
|
};
|
|
16
|
-
export type RawInstallCommandOptions = RawCommandOptions & {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
export type RawInstallCommandOptions = RawCommandOptions & {
|
|
18
|
+
dependencyScope?: string | string[];
|
|
19
|
+
dependencyScopeOverrides?: InstallCommandOptions['dependencyScopeOverrides'];
|
|
19
20
|
};
|
|
20
21
|
export type RawStatusCommandOptions = {
|
|
21
22
|
cwd?: string;
|
|
@@ -40,26 +41,18 @@ export type RawReinstallCommandOptions = RawCommandOptions & {
|
|
|
40
41
|
export interface ReinstallCommandOptions extends InstallCommandOptions {
|
|
41
42
|
json?: boolean;
|
|
42
43
|
}
|
|
43
|
-
export interface RawConfigProjectLayerOptions {
|
|
44
|
-
scope?: string;
|
|
45
|
-
local?: boolean;
|
|
46
|
-
}
|
|
47
44
|
export declare const SCRIPT_TIMEOUT_MIN_MS = 1000;
|
|
48
|
-
export declare const SCRIPT_TIMEOUT_MAX_MS =
|
|
49
|
-
export declare const SCRIPT_TIMEOUT_DEFAULT_MS =
|
|
50
|
-
export declare const CONFIG_WRITE_DEFAULT_SCOPE: Scope;
|
|
51
|
-
export type ConfigReadResolution = Scope | 'effective';
|
|
52
|
-
export declare const CONFIG_READ_DEFAULT_RESOLUTION: ConfigReadResolution;
|
|
45
|
+
export declare const SCRIPT_TIMEOUT_MAX_MS = 1800000;
|
|
46
|
+
export declare const SCRIPT_TIMEOUT_DEFAULT_MS = 300000;
|
|
53
47
|
export declare function parseScopeValue(scope: unknown): Scope;
|
|
48
|
+
export declare function parseContextValue(context: unknown): Scope;
|
|
49
|
+
export declare function parsePlatformTargetValue(platform: unknown): PlatformTarget;
|
|
54
50
|
export declare function parsePlatformValue(platform: unknown): PlatformSelection;
|
|
51
|
+
export declare function parseDependencyScopeOverrides(values: string | readonly string[] | undefined): NonNullable<InstallCommandOptions['dependencyScopeOverrides']>;
|
|
55
52
|
export declare function parseScriptTimeoutMs(value: unknown): number;
|
|
56
53
|
export declare function resolveScriptTimeoutMs(raw: Pick<RawCommandOptions, 'scriptTimeout' | 'scriptTimeoutMs'>): number | undefined;
|
|
57
|
-
export declare function resolveConfigWriteScope(scope: unknown): Scope;
|
|
58
|
-
export declare function resolveConfigReadResolution(scope: unknown): ConfigReadResolution;
|
|
59
|
-
export declare function resolveConfigProjectLayer(raw?: RawConfigProjectLayerOptions): 'shared' | 'local';
|
|
60
54
|
export declare function normalizeCommandOptions(raw?: RawCommandOptions, defaults?: NormalizeCommandOptionsDefaults): CommandOptions;
|
|
61
55
|
export declare function normalizeInstallCommandOptions(raw?: RawInstallCommandOptions, defaults?: NormalizeCommandOptionsDefaults): InstallCommandOptions;
|
|
62
|
-
export declare function normalizeUpgradeCommandOptions(raw?: RawUpgradeCommandOptions, defaults?: NormalizeCommandOptionsDefaults): UpgradeCommandOptions;
|
|
63
56
|
export declare function normalizeStatusCommandOptions(raw?: RawStatusCommandOptions, defaults?: {
|
|
64
57
|
cwd?: string;
|
|
65
58
|
}): StatusCommandOptions;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { parsePluginId } from '../utils/multi-source-catalog.js';
|
|
2
|
+
import { isPlatformTarget } from '@lesliechan721/aw-plugin-core/manifest';
|
|
1
3
|
export const SCRIPT_TIMEOUT_MIN_MS = 1000;
|
|
2
|
-
export const SCRIPT_TIMEOUT_MAX_MS =
|
|
3
|
-
export const SCRIPT_TIMEOUT_DEFAULT_MS =
|
|
4
|
-
export const CONFIG_WRITE_DEFAULT_SCOPE = 'user';
|
|
5
|
-
export const CONFIG_READ_DEFAULT_RESOLUTION = 'effective';
|
|
4
|
+
export const SCRIPT_TIMEOUT_MAX_MS = 1800000;
|
|
5
|
+
export const SCRIPT_TIMEOUT_DEFAULT_MS = 300000;
|
|
6
6
|
function renderUnsupportedValue(value) {
|
|
7
7
|
return typeof value === 'string' ? value : String(value);
|
|
8
8
|
}
|
|
@@ -12,12 +12,69 @@ export function parseScopeValue(scope) {
|
|
|
12
12
|
}
|
|
13
13
|
throw new Error(`Unsupported scope "${renderUnsupportedValue(scope)}".`);
|
|
14
14
|
}
|
|
15
|
+
export function parseContextValue(context) {
|
|
16
|
+
if (context === 'project' || context === 'user')
|
|
17
|
+
return context;
|
|
18
|
+
throw new Error(`Unsupported context "${renderUnsupportedValue(context)}". Expected user or project.`);
|
|
19
|
+
}
|
|
20
|
+
export function parsePlatformTargetValue(platform) {
|
|
21
|
+
if (isPlatformTarget(platform))
|
|
22
|
+
return platform;
|
|
23
|
+
throw new Error(`Unsupported platform target "${renderUnsupportedValue(platform)}".`);
|
|
24
|
+
}
|
|
15
25
|
export function parsePlatformValue(platform) {
|
|
16
26
|
if (platform === 'codex' || platform === 'claude' || platform === 'both') {
|
|
17
27
|
return platform;
|
|
18
28
|
}
|
|
19
29
|
throw new Error(`Unsupported platform "${renderUnsupportedValue(platform)}". Expected one of: codex, claude, both.`);
|
|
20
30
|
}
|
|
31
|
+
export function parseDependencyScopeOverrides(values) {
|
|
32
|
+
const inputs = values === undefined ? [] : typeof values === 'string' ? [values] : [...values];
|
|
33
|
+
const byKey = new Map();
|
|
34
|
+
for (const input of inputs) {
|
|
35
|
+
if (input !== input.trim() || input.trim() === '') {
|
|
36
|
+
throw new Error('Invalid dependency scope override: expected <pluginId>[#platform]=<project|user>.');
|
|
37
|
+
}
|
|
38
|
+
const separator = input.lastIndexOf('=');
|
|
39
|
+
if (separator <= 0 || separator !== input.indexOf('=')) {
|
|
40
|
+
throw new Error(`Invalid dependency scope override "${input}".`);
|
|
41
|
+
}
|
|
42
|
+
const selector = input.slice(0, separator);
|
|
43
|
+
const scope = parseScopeValue(input.slice(separator + 1));
|
|
44
|
+
const platformSeparator = selector.lastIndexOf('#');
|
|
45
|
+
const pluginId = platformSeparator < 0 ? selector : selector.slice(0, platformSeparator);
|
|
46
|
+
const parsed = parsePluginId(pluginId);
|
|
47
|
+
if (!parsed.sourceId) {
|
|
48
|
+
throw new Error(`Invalid dependency scope plugin ID "${pluginId}": expected source/plugin.`);
|
|
49
|
+
}
|
|
50
|
+
const canonicalPluginId = `${parsed.sourceId}/${parsed.pluginName}`;
|
|
51
|
+
const parsedPlatform = platformSeparator < 0
|
|
52
|
+
? undefined
|
|
53
|
+
: parsePlatformValue(selector.slice(platformSeparator + 1));
|
|
54
|
+
if (parsedPlatform === 'both') {
|
|
55
|
+
throw new Error('Invalid dependency scope platform: expected codex or claude.');
|
|
56
|
+
}
|
|
57
|
+
const key = `${canonicalPluginId}\0${parsedPlatform ?? '*'}`;
|
|
58
|
+
const current = byKey.get(key);
|
|
59
|
+
if (current && current.scope !== scope) {
|
|
60
|
+
throw new Error(`dependencyScopeOverrideConflict: ${canonicalPluginId}`
|
|
61
|
+
+ `${parsedPlatform ? `#${parsedPlatform}` : ''}`);
|
|
62
|
+
}
|
|
63
|
+
byKey.set(key, {
|
|
64
|
+
pluginId: canonicalPluginId,
|
|
65
|
+
...(parsedPlatform ? { platform: parsedPlatform } : {}),
|
|
66
|
+
scope,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return [...byKey.values()].sort((left, right) => {
|
|
70
|
+
const leftKey = `${left.pluginId}\0${left.platform ?? '*'}`;
|
|
71
|
+
const rightKey = `${right.pluginId}\0${right.platform ?? '*'}`;
|
|
72
|
+
return leftKey < rightKey ? -1 : leftKey > rightKey ? 1 : 0;
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function normalizeDependencyScopeOverrides(overrides) {
|
|
76
|
+
return parseDependencyScopeOverrides(overrides.map((override) => `${override.pluginId}${override.platform ? `#${override.platform}` : ''}=${override.scope}`));
|
|
77
|
+
}
|
|
21
78
|
export function parseScriptTimeoutMs(value) {
|
|
22
79
|
const rendered = renderUnsupportedValue(value);
|
|
23
80
|
const parsed = typeof value === 'number'
|
|
@@ -37,21 +94,6 @@ export function resolveScriptTimeoutMs(raw) {
|
|
|
37
94
|
const value = raw.scriptTimeoutMs ?? raw.scriptTimeout;
|
|
38
95
|
return value === undefined ? undefined : parseScriptTimeoutMs(value);
|
|
39
96
|
}
|
|
40
|
-
export function resolveConfigWriteScope(scope) {
|
|
41
|
-
return scope === undefined ? CONFIG_WRITE_DEFAULT_SCOPE : parseScopeValue(scope);
|
|
42
|
-
}
|
|
43
|
-
export function resolveConfigReadResolution(scope) {
|
|
44
|
-
return scope === undefined ? CONFIG_READ_DEFAULT_RESOLUTION : parseScopeValue(scope);
|
|
45
|
-
}
|
|
46
|
-
export function resolveConfigProjectLayer(raw = {}) {
|
|
47
|
-
if (!raw.local) {
|
|
48
|
-
return 'shared';
|
|
49
|
-
}
|
|
50
|
-
if (raw.scope !== 'project') {
|
|
51
|
-
throw new Error('`--local` 只能与 `--scope project` 一起使用。');
|
|
52
|
-
}
|
|
53
|
-
return 'local';
|
|
54
|
-
}
|
|
55
97
|
function resolveCwd(rawCwd, defaultCwd) {
|
|
56
98
|
return rawCwd ?? defaultCwd ?? process.cwd();
|
|
57
99
|
}
|
|
@@ -66,27 +108,26 @@ export function normalizeCommandOptions(raw = {}, defaults = {}) {
|
|
|
66
108
|
scope: parseScopeValue(raw.scope ?? defaults.defaultScope ?? 'user'),
|
|
67
109
|
platform: parsePlatformValue(platformInput ?? 'both'),
|
|
68
110
|
...(scriptTimeoutMs === undefined ? {} : { scriptTimeoutMs }),
|
|
111
|
+
...(raw.yes === true ? { yes: true } : {}),
|
|
69
112
|
};
|
|
70
113
|
}
|
|
71
114
|
export function normalizeInstallCommandOptions(raw = {}, defaults = {}) {
|
|
115
|
+
const normalized = normalizeCommandOptions(raw, {
|
|
116
|
+
defaultScope: 'user',
|
|
117
|
+
requirePlatform: true,
|
|
118
|
+
missingPlatformMessage: 'install 命令需要显式指定 `--platform codex|claude|both`。',
|
|
119
|
+
...defaults,
|
|
120
|
+
});
|
|
121
|
+
const dependencyScopeOverrides = [
|
|
122
|
+
...parseDependencyScopeOverrides(raw.dependencyScope),
|
|
123
|
+
...normalizeDependencyScopeOverrides(raw.dependencyScopeOverrides ?? []),
|
|
124
|
+
];
|
|
125
|
+
const normalizedDependencyScopeOverrides = normalizeDependencyScopeOverrides(dependencyScopeOverrides);
|
|
72
126
|
return {
|
|
73
|
-
...
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
...defaults,
|
|
78
|
-
}),
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
export function normalizeUpgradeCommandOptions(raw = {}, defaults = {}) {
|
|
82
|
-
return {
|
|
83
|
-
...normalizeCommandOptions(raw, {
|
|
84
|
-
defaultScope: 'user',
|
|
85
|
-
requirePlatform: true,
|
|
86
|
-
missingPlatformMessage: 'upgrade 命令需要显式指定 `--platform codex|claude|both`。',
|
|
87
|
-
...defaults,
|
|
88
|
-
}),
|
|
89
|
-
all: raw.all,
|
|
127
|
+
...normalized,
|
|
128
|
+
...(normalizedDependencyScopeOverrides.length > 0
|
|
129
|
+
? { dependencyScopeOverrides: normalizedDependencyScopeOverrides }
|
|
130
|
+
: {}),
|
|
90
131
|
};
|
|
91
132
|
}
|
|
92
133
|
function parseStatusPlatformFilter(platform) {
|
|
@@ -107,8 +148,14 @@ export function normalizeStatusCommandOptions(raw = {}, defaults = {}) {
|
|
|
107
148
|
};
|
|
108
149
|
}
|
|
109
150
|
export function normalizeUninstallCommandOptions(raw = {}, defaults = {}) {
|
|
151
|
+
const supported = {
|
|
152
|
+
cwd: raw.cwd,
|
|
153
|
+
scope: raw.scope,
|
|
154
|
+
platform: raw.platform,
|
|
155
|
+
yes: raw.yes,
|
|
156
|
+
};
|
|
110
157
|
return {
|
|
111
|
-
...normalizeCommandOptions(
|
|
158
|
+
...normalizeCommandOptions(supported, {
|
|
112
159
|
defaultScope: 'user',
|
|
113
160
|
requirePlatform: true,
|
|
114
161
|
missingPlatformMessage: 'uninstall 命令需要显式指定 `--platform codex|claude|both`。',
|
|
@@ -120,8 +167,14 @@ export function normalizeCleanupCommandOptions(raw = {}, defaults = {}) {
|
|
|
120
167
|
if (raw.scope === undefined) {
|
|
121
168
|
throw new Error('cleanup 命令需要显式指定 `--scope project|user`。');
|
|
122
169
|
}
|
|
170
|
+
const supported = {
|
|
171
|
+
cwd: raw.cwd,
|
|
172
|
+
scope: raw.scope,
|
|
173
|
+
platform: raw.platform,
|
|
174
|
+
yes: raw.yes,
|
|
175
|
+
};
|
|
123
176
|
const normalized = {
|
|
124
|
-
...normalizeCommandOptions(
|
|
177
|
+
...normalizeCommandOptions(supported, {
|
|
125
178
|
defaultScope: 'user',
|
|
126
179
|
requirePlatform: true,
|
|
127
180
|
missingPlatformMessage: 'cleanup 命令需要显式指定 `--platform codex|claude|both`。',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../src/commands/options.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../src/commands/options.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAqD1E,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAC1C,MAAM,CAAC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AK,IAAI;QACvB,KAAK,EAAE,GAAG,CAAC,KAAK,KAAK,IAAI;KACM,CAAC;IAElC,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,gCAAgC,CAC9C,MAAkC,EAAE,EACpC,WAA4C,EAAE;IAE9C,OAAO;QACL,GAAG,8BAA8B,CAAC,GAAG,EAAE;YACrC,YAAY,EAAE,MAAM;YACpB,eAAe,EAAE,IAAI;YACrB,sBAAsB,EAAE,oDAAoD;YAC5E,GAAG,QAAQ;SACZ,CAAC;QACF,IAAI,EAAE,GAAG,CAAC,IAAI,KAAK,IAAI;KACU,CAAC;AACtC,CAAC"}
|
|
@@ -4,51 +4,55 @@ const CLI_ADAPTER_PROVENANCE = '@lesliechan721/aw CLI authoring adapter';
|
|
|
4
4
|
const adapterFacts = {
|
|
5
5
|
manifest: {
|
|
6
6
|
dependencies: {
|
|
7
|
-
requires: 'Each dependency
|
|
7
|
+
requires: 'Each same-source dependency covers every supported consumer platform, including transitive edges.',
|
|
8
8
|
conflicts: 'The plugin itself, missing providers, and dependency cycles.',
|
|
9
9
|
},
|
|
10
|
-
|
|
11
|
-
profiles: '
|
|
12
|
-
requires: '
|
|
13
|
-
conflicts: '
|
|
14
|
-
provenance: ['CLI source
|
|
10
|
+
platforms: {
|
|
11
|
+
profiles: 'codex, claude, antigravity, cursor, opencode, pi, generic',
|
|
12
|
+
requires: 'Omitted or empty platforms support all seven canonical targets; each selected projection must be valid.',
|
|
13
|
+
conflicts: 'Unknown or duplicate target IDs, distributions.agentSkills, and marketplace.policy.products.',
|
|
14
|
+
provenance: ['CLI source and bundle validators'],
|
|
15
15
|
},
|
|
16
|
-
|
|
17
|
-
profiles: '
|
|
18
|
-
requires: 'Each
|
|
19
|
-
|
|
20
|
-
provenance: ['CLI source plugin validator'],
|
|
21
|
-
},
|
|
22
|
-
'marketplace.policy.products': {
|
|
23
|
-
profiles: 'Omitted means CODEX and CLAUDE.',
|
|
24
|
-
provenance: ['CLI author validator'],
|
|
16
|
+
skills: {
|
|
17
|
+
profiles: 'Native and Portable targets from one ./skills source root',
|
|
18
|
+
requires: 'Each final Skill has a production README.md and valid target metadata and resource closure.',
|
|
19
|
+
provenance: ['CLI target projection and Skill validators'],
|
|
25
20
|
},
|
|
26
21
|
},
|
|
27
22
|
'build-config': {
|
|
28
23
|
'buildConfig.cacheable': { requires: 'A deterministic scripts.node.build.' },
|
|
29
24
|
'buildConfig.runtimeExports': { conflicts: 'Skill, report, eval, generated, and dependency roots.' },
|
|
25
|
+
'buildConfig.runtimeExports[].requires.aw.capabilities': {
|
|
26
|
+
requires: 'The provider-owned complete capability set for this export; an empty set is valid.',
|
|
27
|
+
provenance: ['CLI runtime import resolver'],
|
|
28
|
+
},
|
|
30
29
|
'buildConfig.buildImports': { requires: 'scripts.node.build and a unique AW_PLUGIN_IMPORT_* environment variable.' },
|
|
31
|
-
'buildConfig.manifestOverrides.claude': { profiles: 'CLAUDE', requires: '
|
|
30
|
+
'buildConfig.manifestOverrides.claude': { profiles: 'CLAUDE', requires: 'claude target support.' },
|
|
32
31
|
'buildConfig.skillRuntimeFiles': { requires: 'A declared static Skill and a target below references/, assets/, or scripts/.' },
|
|
33
|
-
'buildConfig.skillRuntimeFiles[].
|
|
34
|
-
profiles: '
|
|
35
|
-
requires: '
|
|
36
|
-
conflicts: '
|
|
32
|
+
'buildConfig.skillRuntimeFiles[].platforms': {
|
|
33
|
+
profiles: 'canonical target projection',
|
|
34
|
+
requires: 'A declared static Skill key and targets within plugin platforms.',
|
|
35
|
+
conflicts: 'Overlapping target selections for the same Skill runtime path; omitted or empty selection covers supported targets.',
|
|
37
36
|
},
|
|
38
37
|
'buildConfig.generatedSkillRuntimeFiles': {
|
|
39
|
-
requires: 'scripts.node.build creates each declared final target; omitted
|
|
38
|
+
requires: 'scripts.node.build creates each declared final target; omitted or empty platforms cover supported targets.',
|
|
40
39
|
provenance: ['CLI bundle validator'],
|
|
41
40
|
},
|
|
42
|
-
'buildConfig.generatedSkillRuntimeFiles[].
|
|
43
|
-
profiles: '
|
|
44
|
-
requires: '
|
|
45
|
-
conflicts: 'Omission selects native surfaces; explicit agent-skills selects only the portable surface.',
|
|
41
|
+
'buildConfig.generatedSkillRuntimeFiles[].platforms': {
|
|
42
|
+
profiles: 'canonical target projection',
|
|
43
|
+
requires: 'A declared static Skill key and targets within plugin platforms.',
|
|
46
44
|
provenance: ['CLI bundle validator'],
|
|
47
45
|
},
|
|
48
46
|
},
|
|
49
47
|
extensions: {
|
|
50
|
-
'extensions.
|
|
51
|
-
|
|
48
|
+
'extensions.permissions[].agentOverrides.claude.sandbox.excludedCommands': {
|
|
49
|
+
profiles: 'CLAUDE',
|
|
50
|
+
requires: 'aw.claude.sandbox-exclusions.v1; a validated command reference. Independent of allow.',
|
|
51
|
+
conflicts: 'Plain strings, Codex overrides, and widening to all aw commands.',
|
|
52
|
+
provenance: ['CLI managed command reference resolver and Claude permission writer'],
|
|
53
|
+
},
|
|
54
|
+
'extensions.nativeHooks.claude': { profiles: 'CLAUDE', requires: 'claude target support.' },
|
|
55
|
+
'extensions.nativeHooks.codex': { profiles: 'CODEX', requires: 'codex target support.' },
|
|
52
56
|
},
|
|
53
57
|
'slash-commands': {
|
|
54
58
|
claude: { profiles: 'CLAUDE' },
|
|
@@ -66,18 +70,69 @@ const adapterFacts = {
|
|
|
66
70
|
config: {
|
|
67
71
|
'config.presentation': { conflicts: 'Schema mutation and sensitive or path values in presets.' },
|
|
68
72
|
},
|
|
69
|
-
|
|
70
|
-
'scripts.
|
|
73
|
+
'pre-apply': {
|
|
74
|
+
'scripts.preApply': { requires: 'A Node entry inside the plugin root.' },
|
|
71
75
|
},
|
|
72
76
|
artifacts: {
|
|
73
|
-
'scripts.artifacts.render': { requires: 'artifacts.targets.' },
|
|
77
|
+
'scripts.artifacts.render': { requires: 'artifacts.targets, dynamic command sets, or render:true command packages.' },
|
|
78
|
+
'rendererContext.commandSources': {
|
|
79
|
+
requires: 'Only packages involved in the exact requested command targets; fixed bundle directories are read-only.',
|
|
80
|
+
provenance: ['CLI artifact renderer context'],
|
|
81
|
+
},
|
|
82
|
+
'rendererContext.requestedArtifactIds': {
|
|
83
|
+
requires: 'Return exactly these declared artifacts and no other artifacts.',
|
|
84
|
+
provenance: ['CLI artifact renderer context'],
|
|
85
|
+
},
|
|
74
86
|
'artifacts.targets': { requires: 'scripts.artifacts.render and complete static target identity.' },
|
|
87
|
+
'artifacts.targets[].platform': {
|
|
88
|
+
profiles: 'one explicit canonical target',
|
|
89
|
+
requires: 'codex.skill and claude.skill use Native shared-user production; agent-skills.skill binds one Portable target.',
|
|
90
|
+
conflicts: 'Missing targets, agent-skills as a platform, and authored delivery choices.',
|
|
91
|
+
},
|
|
92
|
+
'artifacts.targets[].refreshKeys': {
|
|
93
|
+
requires: 'Fields exist in the selected target schema. Skill renderers cannot read sensitive fields; Native Skill content uses user configuration.',
|
|
94
|
+
},
|
|
95
|
+
'artifacts.targets[].runtimeConfig': {
|
|
96
|
+
requires: 'aw.installed-runtime-config.v2 and a native Skill target. AW injects the reader and binding; source and renderer cannot provide reserved files.',
|
|
97
|
+
conflicts: 'Sensitive keys or sensitive dependency closure.',
|
|
98
|
+
},
|
|
75
99
|
'artifacts.targets[].runtimeImports': {
|
|
76
100
|
requires: 'A provider runtimeExports entry resolved into the consumer bundle.',
|
|
77
101
|
conflicts: 'Using the reuse edge as an installation dependency.',
|
|
78
102
|
provenance: ['CLI runtime import resolver'],
|
|
79
103
|
},
|
|
80
104
|
},
|
|
105
|
+
'native-tools': {
|
|
106
|
+
nativeTools: {
|
|
107
|
+
requires: 'aw.native-tools.v2. Installed protocol requirements and consumer bindings are reviewed before producer publication.',
|
|
108
|
+
provenance: ['CLI installed producer evidence and managed command host'],
|
|
109
|
+
},
|
|
110
|
+
'nativeTools.consumers[].kind': {
|
|
111
|
+
requires: 'Managed command sets prepare the installed host tool before spawn; plugin tests use the installed host tool or an explicit test fixture.',
|
|
112
|
+
conflicts: 'Uncontrolled hooks, MCP entry paths, implicit package discovery, or source sync changing installed command evidence.',
|
|
113
|
+
},
|
|
114
|
+
'nativeTools.consumers[].tools[].fallback': {
|
|
115
|
+
requires: 'Preferred consumers use the same protocol contract for native and portable backends; backend selection remains fixed after launch.',
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
'managed-commands': {
|
|
119
|
+
managedCommands: {
|
|
120
|
+
requires: 'aw.managed-commands.v1. Bindings publish only after the producer succeeds.',
|
|
121
|
+
provenance: ['CLI managed command materialization and resolver'],
|
|
122
|
+
},
|
|
123
|
+
'managedCommands.packages[].sourceDir': {
|
|
124
|
+
requires: 'A complete runnable directory in the fixed bundle; only ordinary files and directories.',
|
|
125
|
+
conflicts: 'Links, protected trees, executable entry replacement by generated files.',
|
|
126
|
+
},
|
|
127
|
+
'managedCommands.packages[].scope': {
|
|
128
|
+
requires: 'One fixed effective configuration per producer; project producers bind the canonical project location.',
|
|
129
|
+
conflicts: 'User/shared-user consumers referring to project packages.',
|
|
130
|
+
},
|
|
131
|
+
'Skill Markdown placeholder': {
|
|
132
|
+
requires: 'A validated candidate or healthy installed producer in the same source/plugin and legal scope.',
|
|
133
|
+
conflicts: 'Portable targets and unresolved, disabled, or foreign commands.',
|
|
134
|
+
},
|
|
135
|
+
},
|
|
81
136
|
};
|
|
82
137
|
export function parsePluginCapabilitySurface(value) {
|
|
83
138
|
if (!PLUGIN_AUTHORING_CAPABILITY_SURFACES.includes(value)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-capabilities.js","sourceRoot":"","sources":["../../../src/commands/plugin-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,8BAA8B,EAC9B,oCAAoC,GAGrC,MAAM,wCAAwC,CAAA;AAS/C,MAAM,wBAAwB,GAAG,2DAA2D,CAAA;AAC5F,MAAM,sBAAsB,GAAG,yCAAyC,CAAA;AAExE,MAAM,YAAY,GAGZ;IACJ,QAAQ,EAAE;QACR,YAAY,EAAE;YACZ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,cAAc,EAAE;oBACpC,CAAC,CAAC,EAAE,CAAA;YACR,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;YACrE,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;YACrE,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,eAAe,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;YACzE,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,KAAK,MAAM,KAAK,CAAC,IAAI,KAAK,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,EAAE,CAAC,CAAA;QACxG,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Confirmation } from '../output/public-result.js';
|
|
2
|
+
import { type PluginConfigImpactMutation } from '../utils/plugin-config-impact.js';
|
|
3
|
+
import { type ApplyPluginConfigOptions } from '../utils/plugin-config-write.js';
|
|
4
|
+
/** The candidate impact is computed in memory while the caller holds the existing mutation lock. */
|
|
5
|
+
export declare function preparePublicConfigConfirmation(options: ApplyPluginConfigOptions & {
|
|
6
|
+
yes?: boolean;
|
|
7
|
+
mutation?: PluginConfigImpactMutation;
|
|
8
|
+
}): Promise<Confirmation>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { analyzePluginConfigMutationImpact } from '../utils/plugin-config-impact.js';
|
|
2
|
+
import { preparePluginConfigApply, disposePluginConfigApply, resolveConfigPreApplyAuthorization } from '../utils/plugin-config-write.js';
|
|
3
|
+
import { resolvePluginConfigReferencePlugins } from '../utils/plugin-config-references.js';
|
|
4
|
+
/** The candidate impact is computed in memory while the caller holds the existing mutation lock. */
|
|
5
|
+
export async function preparePublicConfigConfirmation(options) {
|
|
6
|
+
const prepared = await preparePluginConfigApply(options);
|
|
7
|
+
try {
|
|
8
|
+
const referencePlugins = await resolvePluginConfigReferencePlugins({ sourceId: options.plugin.sourceId,
|
|
9
|
+
sourceIdentity: options.plugin.sourceIdentity, logicalIdentity: options.plugin.catalogLogicalIdentity,
|
|
10
|
+
env: options.env, plugins: options.rebuildRuntime?.referencePlugins });
|
|
11
|
+
const requested = prepared.plan.receipt.requestedTargets.filter((target) => !prepared.plan.receipt.targetResults.some((result) => result.pluginId === target.pluginId && result.agent === target.agent && result.scope === target.scope
|
|
12
|
+
&& (result.satisfaction === 'unsupported' || result.satisfaction === 'excluded')));
|
|
13
|
+
const native = requested.flatMap((target) => target.agent === 'codex' || target.agent === 'claude'
|
|
14
|
+
? [{ pluginName: target.pluginId.split('/').at(-1), pluginId: target.pluginId, platform: target.agent, scope: target.scope }] : []);
|
|
15
|
+
const impact = options.mutation ? await analyzePluginConfigMutationImpact({ plugin: options.plugin,
|
|
16
|
+
scope: options.context ?? options.scope, platform: options.platform, cwd: options.cwd, env: options.env,
|
|
17
|
+
visibleTargets: native, mutation: options.mutation, referencePlugins,
|
|
18
|
+
commandDiscovery: { packages: prepared.commandPackages, errors: prepared.commandDiscoveryErrors } }) : undefined;
|
|
19
|
+
const effects = [];
|
|
20
|
+
const affected = impact ? requested.filter((target) => target.agent !== 'codex' && target.agent !== 'claude'
|
|
21
|
+
? impact.storeChanged : impact.affectedTargets.some((candidate) => candidate.pluginId === target.pluginId && candidate.platform === target.agent && candidate.scope === target.scope)) : requested;
|
|
22
|
+
const authorization = await resolveConfigPreApplyAuthorization({
|
|
23
|
+
...options,
|
|
24
|
+
applyTargets: impact?.affectedTargets ?? native,
|
|
25
|
+
rebuildRuntime: { ...prepared.plan.runtime, referencePlugins },
|
|
26
|
+
});
|
|
27
|
+
if (authorization.unavailableTargetResults.length > 0) {
|
|
28
|
+
throw Object.assign(new Error('The preApply authorization scope cannot be resolved for the affected outputs.'), { code: 'sourceUnavailable' });
|
|
29
|
+
}
|
|
30
|
+
// Configuration consumers and their dependency scripts have different identities.
|
|
31
|
+
// Use the script closure of the affected consumers, not a same-plugin match.
|
|
32
|
+
for (const target of authorization.targets) {
|
|
33
|
+
effects.push({ code: 'runPreApply', message: 'Run the plugin preApply script before applying configuration.', subject: { pluginId: target.pluginId, target: target.platform, scope: target.scope }, impact: 'unknown' });
|
|
34
|
+
}
|
|
35
|
+
for (const target of affected) {
|
|
36
|
+
const plugin = referencePlugins.find((entry) => entry.pluginId === target.pluginId) ?? options.plugin;
|
|
37
|
+
const scripted = target.agent !== 'codex' && target.agent !== 'claude'
|
|
38
|
+
&& (plugin.manifest.scripts?.preApply !== undefined || prepared.preApplyAuthorization.some((entry) => entry.pluginId === target.pluginId && entry.platform === target.agent && entry.scope === target.scope));
|
|
39
|
+
if (scripted)
|
|
40
|
+
effects.push({ code: 'runPreApply', message: 'Run the plugin preApply script before applying configuration.', subject: { pluginId: target.pluginId, target: target.agent, scope: target.scope }, impact: 'unknown' });
|
|
41
|
+
if (target.agent === 'codex' && (impact === undefined || impact.sharedNativeRenderTargets.some((entry) => (entry.pluginName ?? options.plugin.manifest.name) === plugin.manifest.name && (entry.platform ?? 'codex') === target.agent))) {
|
|
42
|
+
effects.push({ code: 'replaceSharedOutput', message: 'Refresh the shared native output with the proposed configuration.', subject: { pluginId: target.pluginId, target: target.agent, scope: target.scope }, impact: 'shared' });
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
for (const item of impact?.affectedCommandPackages ?? prepared.commandPackages)
|
|
46
|
+
effects.push({ code: 'replaceSharedOutput', message: 'Refresh the installed command package with the proposed configuration.', subject: { pluginId: `${item.producer.sourceId}/${item.producer.pluginName}`, scope: item.producer.scope }, impact: item.producer.scope === 'user' ? 'shared' : 'selected-scope' });
|
|
47
|
+
const confirmation = { required: effects.length > 0, provided: options.yes === true, effects };
|
|
48
|
+
if (confirmation.required && !confirmation.provided)
|
|
49
|
+
throw Object.assign(new Error('Repeat the command with --yes to confirm the listed effects.'), { code: 'confirmationRequired', confirmation });
|
|
50
|
+
return confirmation;
|
|
51
|
+
}
|
|
52
|
+
finally {
|
|
53
|
+
await disposePluginConfigApply(prepared.plan);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=public-config-confirmation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-config-confirmation.js","sourceRoot":"","sources":["../../../src/commands/public-config-confirmation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iCAAiC,EAAmC,MAAM,kCAAkC,CAAC;AACtH,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,kCAAkC,EAAiC,MAAM,iCAAiC,CAAC;AACxK,OAAO,EAAE,mCAAmC,EAAE,MAAM,sCAAsC,CAAC;AAG3F,oGAAoG;AACpG,MAAM,CAAC,KAAK,UAAU,+BAA+B,CAAC,OAGrD;IACC,MAAM,QAAQ,GAAG,MAAM,wBAAwB,CAAC,OAAO,CAAC,CAAC;IACzD,IAAI,CAAC;QACH,MAAM,gBAAgB,GAAG,MAAM,mCAAmC,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ;YACpG,cAAc,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,eAAe,EAAE,OAAO,CAAC,MAAM,CAAC,sBAAsB;YACrG,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,cAAc,EAAE,gBAAgB,EAAE,CAAC,CAAC;QACzE,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAC/H,M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,CAAC;AAC9D,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** One CLI invocation's cancellation state. It never persists across commands. */
|
|
2
|
+
export interface PublicCommandInterruption {
|
|
3
|
+
signal: AbortSignal;
|
|
4
|
+
exitCode?: 130 | 143;
|
|
5
|
+
cleanupFailed: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function createPublicCommandInterruption(): PublicCommandInterruption & {
|
|
8
|
+
listen(): () => void;
|
|
9
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export function createPublicCommandInterruption() {
|
|
2
|
+
const controller = new AbortController();
|
|
3
|
+
const state = { signal: controller.signal, cleanupFailed: false };
|
|
4
|
+
const interrupt = (code) => {
|
|
5
|
+
if (controller.signal.aborted)
|
|
6
|
+
return;
|
|
7
|
+
state.exitCode = code;
|
|
8
|
+
controller.abort(Object.assign(new Error('The command was interrupted.'), { name: 'AbortError', code: 'operationInterrupted' }));
|
|
9
|
+
};
|
|
10
|
+
return Object.assign(state, {
|
|
11
|
+
listen() {
|
|
12
|
+
const sigint = () => interrupt(130);
|
|
13
|
+
const sigterm = () => interrupt(143);
|
|
14
|
+
process.on('SIGINT', sigint);
|
|
15
|
+
process.on('SIGTERM', sigterm);
|
|
16
|
+
return () => {
|
|
17
|
+
process.removeListener('SIGINT', sigint);
|
|
18
|
+
process.removeListener('SIGTERM', sigterm);
|
|
19
|
+
};
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=public-interruption.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-interruption.js","sourceRoot":"","sources":["../../../src/commands/public-interruption.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,+BAA+B;IAC7C,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;IACzC,MAAM,KAAK,GAA8B,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC;IAC7F,MAAM,SAAS,GAAG,CAAC,IAAe,EAAQ,EAAE;QAC1C,IAAI,UAAU,CAAC,MAAM,CAAC,OAAO;YAAE,OAAO;QACtC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC;QACtB,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,8BAA8B,CAAC,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,sBAAsB,EAAE,CAAC,CAAC,CAAC;IACnI,CAAC,CAAC;IACF,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE;QAC1B,MAAM;YACJ,MAAM,MAAM,GAAG,GAAS,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;YAC1C,MAAM,OAAO,GAAG,GAAS,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;YAC3C,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YAC7B,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;YAC/B,OAAO,GAAG,EAAE;gBACV,OAAO,CAAC,cAAc,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;gBACzC,OAAO,CAAC,cAAc,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;YAC7C,CAAC,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|