@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
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import crypto from 'node:crypto';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { canonicalJson, } from '@lesliechan721/agent-skill-eval';
|
|
4
|
+
import fs from 'fs-extra';
|
|
5
|
+
import { resolveAwSkillEvalCustomCommand, } from '../eval/manifest-v1.js';
|
|
6
|
+
import { calculateFileDigest } from '../utils/bundle-integrity.js';
|
|
7
|
+
const digestPattern = /^sha256:[0-9a-f]{64}$/u;
|
|
8
|
+
const safeSegmentPattern = /^[A-Za-z0-9][A-Za-z0-9._-]*$/u;
|
|
9
|
+
const compareText = (left, right) => left < right ? -1 : left > right ? 1 : 0;
|
|
10
|
+
function digestCanonical(value) {
|
|
11
|
+
return `sha256:${crypto.createHash('sha256').update(canonicalJson(value)).digest('hex')}`;
|
|
12
|
+
}
|
|
13
|
+
function strictRecord(value, keys) {
|
|
14
|
+
return !!value
|
|
15
|
+
&& typeof value === 'object'
|
|
16
|
+
&& !Array.isArray(value)
|
|
17
|
+
&& Object.keys(value).length === keys.length
|
|
18
|
+
&& Object.keys(value).every((key) => keys.includes(key));
|
|
19
|
+
}
|
|
20
|
+
function digestString(value) {
|
|
21
|
+
return typeof value === 'string' && digestPattern.test(value);
|
|
22
|
+
}
|
|
23
|
+
function safeSegment(value) {
|
|
24
|
+
return typeof value === 'string' && safeSegmentPattern.test(value);
|
|
25
|
+
}
|
|
26
|
+
function normalizeRelativePath(value) {
|
|
27
|
+
if (typeof value !== 'string'
|
|
28
|
+
|| value === ''
|
|
29
|
+
|| value.includes('\\')
|
|
30
|
+
|| path.posix.isAbsolute(value)
|
|
31
|
+
|| path.win32.isAbsolute(value)
|
|
32
|
+
|| path.posix.normalize(value) !== value
|
|
33
|
+
|| value === '..'
|
|
34
|
+
|| value.startsWith('../'))
|
|
35
|
+
throw new Error('Eval source input path must be a safe relative POSIX path.');
|
|
36
|
+
return value;
|
|
37
|
+
}
|
|
38
|
+
function workspaceRelativePath(workspaceRoot, target) {
|
|
39
|
+
const relative = path.relative(workspaceRoot, target).split(path.sep).join('/');
|
|
40
|
+
return normalizeRelativePath(relative);
|
|
41
|
+
}
|
|
42
|
+
function evalInputDigest(input) {
|
|
43
|
+
return digestCanonical(input);
|
|
44
|
+
}
|
|
45
|
+
export function parseAwSourceBindingEvalInput(value) {
|
|
46
|
+
const row = value;
|
|
47
|
+
if (!strictRecord(row, [
|
|
48
|
+
'manifestPath',
|
|
49
|
+
'casesPath',
|
|
50
|
+
'selectedCaseIds',
|
|
51
|
+
'suiteDefaultsDigest',
|
|
52
|
+
'selectedCasesDigest',
|
|
53
|
+
'fixturesDigest',
|
|
54
|
+
'providerDigest',
|
|
55
|
+
'inputDigest',
|
|
56
|
+
])
|
|
57
|
+
|| !Array.isArray(row.selectedCaseIds)
|
|
58
|
+
|| row.selectedCaseIds.length === 0
|
|
59
|
+
|| !digestString(row.suiteDefaultsDigest)
|
|
60
|
+
|| !digestString(row.selectedCasesDigest)
|
|
61
|
+
|| !digestString(row.fixturesDigest)
|
|
62
|
+
|| !digestString(row.providerDigest)
|
|
63
|
+
|| !digestString(row.inputDigest))
|
|
64
|
+
throw new Error('Eval source input is invalid.');
|
|
65
|
+
const selectedCaseIds = row.selectedCaseIds.map((entry) => {
|
|
66
|
+
if (!safeSegment(entry))
|
|
67
|
+
throw new Error('Eval source input case id is invalid.');
|
|
68
|
+
return entry;
|
|
69
|
+
});
|
|
70
|
+
if (new Set(selectedCaseIds).size !== selectedCaseIds.length) {
|
|
71
|
+
throw new Error('Eval source input case ids must be unique.');
|
|
72
|
+
}
|
|
73
|
+
const unsigned = {
|
|
74
|
+
manifestPath: normalizeRelativePath(row.manifestPath),
|
|
75
|
+
casesPath: normalizeRelativePath(row.casesPath),
|
|
76
|
+
selectedCaseIds,
|
|
77
|
+
suiteDefaultsDigest: row.suiteDefaultsDigest,
|
|
78
|
+
selectedCasesDigest: row.selectedCasesDigest,
|
|
79
|
+
fixturesDigest: row.fixturesDigest,
|
|
80
|
+
providerDigest: row.providerDigest,
|
|
81
|
+
};
|
|
82
|
+
if (row.inputDigest !== evalInputDigest(unsigned)) {
|
|
83
|
+
throw new Error('Eval source input digest is invalid.');
|
|
84
|
+
}
|
|
85
|
+
return { ...unsigned, inputDigest: row.inputDigest };
|
|
86
|
+
}
|
|
87
|
+
export function selectAwSourceBindingEvalCases(document, selection) {
|
|
88
|
+
if ('caseIds' in selection) {
|
|
89
|
+
if (selection.caseIds.length === 0
|
|
90
|
+
|| selection.caseIds.some((caseId) => !safeSegment(caseId))
|
|
91
|
+
|| new Set(selection.caseIds).size !== selection.caseIds.length)
|
|
92
|
+
throw new Error('Eval case id selection is invalid.');
|
|
93
|
+
const requested = new Set(selection.caseIds);
|
|
94
|
+
const cases = document.cases.filter((entry) => requested.has(entry.id));
|
|
95
|
+
if (cases.length !== requested.size)
|
|
96
|
+
throw new Error('Eval case selection matched no cases.');
|
|
97
|
+
return { ...document, cases };
|
|
98
|
+
}
|
|
99
|
+
if (selection.split !== null && selection.split !== 'all' && !safeSegment(selection.split)) {
|
|
100
|
+
throw new Error('Eval split must be a safe path segment or all.');
|
|
101
|
+
}
|
|
102
|
+
if (selection.caseId !== null && !safeSegment(selection.caseId)) {
|
|
103
|
+
throw new Error('Eval case id must be a safe path segment.');
|
|
104
|
+
}
|
|
105
|
+
const splitCases = selection.split === null || selection.split === 'all'
|
|
106
|
+
? document.cases
|
|
107
|
+
: document.cases.filter((entry) => entry.split === selection.split);
|
|
108
|
+
const cases = selection.caseId === null
|
|
109
|
+
? splitCases
|
|
110
|
+
: splitCases.filter((entry) => entry.id === selection.caseId);
|
|
111
|
+
if (cases.length === 0)
|
|
112
|
+
throw new Error('Eval case selection matched no cases.');
|
|
113
|
+
return { ...document, cases };
|
|
114
|
+
}
|
|
115
|
+
export function computeAwSourceBindingSelectedCasesDigest(document) {
|
|
116
|
+
return digestCanonical(document);
|
|
117
|
+
}
|
|
118
|
+
export function computeAwSourceBindingSuiteDefaultsDigest(suite, defaults) {
|
|
119
|
+
return digestCanonical({ suite, defaults });
|
|
120
|
+
}
|
|
121
|
+
export async function resolveAwSourceBindingEvalProvider(options) {
|
|
122
|
+
if (options.suite.kind === 'trigger')
|
|
123
|
+
return 'codex-trigger';
|
|
124
|
+
if (options.suite.kind === 'conversation')
|
|
125
|
+
return 'codex-conversation';
|
|
126
|
+
const resolved = await resolveAwSkillEvalCustomCommand(options.evalRoot, options.suite.provider);
|
|
127
|
+
const command = [...resolved.command];
|
|
128
|
+
for (const [index, { prefix, relative }] of resolved.localArguments) {
|
|
129
|
+
if (!await fs.pathExists(path.join(options.preparedEvalRoot, relative))) {
|
|
130
|
+
throw new Error(`Prepared custom provider asset is missing: ${relative}`);
|
|
131
|
+
}
|
|
132
|
+
command[index] = `${prefix}workspace/eval/${relative}`;
|
|
133
|
+
}
|
|
134
|
+
return options.suite.provider.type === 'custom-process'
|
|
135
|
+
? { type: 'custom-process', command }
|
|
136
|
+
: {
|
|
137
|
+
type: 'codex-workflow',
|
|
138
|
+
command,
|
|
139
|
+
allowedModels: options.suite.provider.allowedModels,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
async function collectFixtureRecords(root, excludedPaths) {
|
|
143
|
+
const rootInfo = await fs.lstat(root);
|
|
144
|
+
if (!rootInfo.isDirectory() || rootInfo.isSymbolicLink()) {
|
|
145
|
+
throw new Error('Eval fixture root must be a regular directory.');
|
|
146
|
+
}
|
|
147
|
+
const directories = [];
|
|
148
|
+
const files = [];
|
|
149
|
+
const walk = async (directory, relativeDirectory = '') => {
|
|
150
|
+
const entries = await fs.readdir(directory, { withFileTypes: true });
|
|
151
|
+
entries.sort((left, right) => compareText(left.name, right.name));
|
|
152
|
+
for (const entry of entries) {
|
|
153
|
+
const absolutePath = path.join(directory, entry.name);
|
|
154
|
+
const relativePath = path.posix.join(relativeDirectory, entry.name);
|
|
155
|
+
if (excludedPaths.has(relativePath))
|
|
156
|
+
continue;
|
|
157
|
+
const info = await fs.lstat(absolutePath);
|
|
158
|
+
if (info.isSymbolicLink())
|
|
159
|
+
throw new Error(`Eval fixture path contains a symbolic link: ${relativePath}`);
|
|
160
|
+
if (info.isDirectory()) {
|
|
161
|
+
directories.push(relativePath);
|
|
162
|
+
await walk(absolutePath, relativePath);
|
|
163
|
+
}
|
|
164
|
+
else if (info.isFile()) {
|
|
165
|
+
files.push({
|
|
166
|
+
path: relativePath,
|
|
167
|
+
mode: process.platform !== 'win32' && (info.mode & 0o111) !== 0 ? '100755' : '100644',
|
|
168
|
+
digest: await calculateFileDigest(absolutePath),
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
throw new Error(`Eval fixture path has an unsupported node: ${relativePath}`);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
await walk(root);
|
|
177
|
+
directories.sort(compareText);
|
|
178
|
+
files.sort((left, right) => compareText(left.path, right.path));
|
|
179
|
+
return { directories, files };
|
|
180
|
+
}
|
|
181
|
+
export async function resolveEvalSourceBindingInput(options) {
|
|
182
|
+
const selectedCases = selectAwSourceBindingEvalCases(options.cases, options.selection);
|
|
183
|
+
if (!digestString(options.providerDigest))
|
|
184
|
+
throw new Error('Eval provider digest is invalid.');
|
|
185
|
+
const fixtureRecords = await collectFixtureRecords(options.evalRoot, new Set(['manifest.json', ...options.corpusPaths]));
|
|
186
|
+
const fixturesDigest = digestCanonical(fixtureRecords);
|
|
187
|
+
if (options.preparedEvalRoot) {
|
|
188
|
+
const preparedFixtures = await collectFixtureRecords(options.preparedEvalRoot, new Set());
|
|
189
|
+
if (digestCanonical(preparedFixtures) !== fixturesDigest) {
|
|
190
|
+
throw new Error('Prepared Eval fixtures do not match the current source fixtures.');
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
const unsigned = {
|
|
194
|
+
manifestPath: workspaceRelativePath(options.workspaceRoot, options.manifestPath),
|
|
195
|
+
casesPath: workspaceRelativePath(options.workspaceRoot, path.join(options.evalRoot, options.suite.cases)),
|
|
196
|
+
selectedCaseIds: selectedCases.cases.map((entry) => entry.id),
|
|
197
|
+
suiteDefaultsDigest: computeAwSourceBindingSuiteDefaultsDigest(options.suite, options.defaults),
|
|
198
|
+
selectedCasesDigest: computeAwSourceBindingSelectedCasesDigest(selectedCases),
|
|
199
|
+
fixturesDigest,
|
|
200
|
+
providerDigest: options.providerDigest,
|
|
201
|
+
};
|
|
202
|
+
return {
|
|
203
|
+
selectedCases,
|
|
204
|
+
input: { ...unsigned, inputDigest: evalInputDigest(unsigned) },
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
//# sourceMappingURL=eval-source-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eval-source-input.js","sourceRoot":"","sources":["../../../src/review/eval-source-input.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,OAAO,EACL,aAAa,GAGd,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,MAAM,UAAU,CAAA;AAEzB,OAAO,EACL,+BAA+B,GAGhC,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAA;AAElE,MAAM,aAAa,GAAG,wBAAwB,CAAA;AAC9C,MAAM,kBAAkB,GAAG,+BAA+B,CAAA;AAC1D,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,KAAa,EAAU,EAAE,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAiCrG,SAAS,eAAe,CAAC,KAAc;IACrC,OAAO,UA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
|
2
|
+
import { type ReviewPlatform, type ReviewPluginProfileConfig, type ReviewProfile, type ReviewProfileConfig, type ReviewSelectedSkill } from './review-types.js';
|
|
3
|
+
export declare function normalizeReviewProfileConfig(value: unknown): ReviewProfileConfig;
|
|
4
|
+
export declare function parseReviewProfile(value: unknown): ReviewProfile;
|
|
5
|
+
export declare function resolveReviewPluginProfileConfig(options: {
|
|
6
|
+
plugin: PluginMeta;
|
|
7
|
+
plugins?: readonly PluginMeta[];
|
|
8
|
+
scope: Scope;
|
|
9
|
+
platform?: PlatformTarget;
|
|
10
|
+
config: ReviewProfileConfig;
|
|
11
|
+
keys?: readonly string[];
|
|
12
|
+
}): ReviewPluginProfileConfig;
|
|
13
|
+
export declare function createReviewProfile(options: {
|
|
14
|
+
platform: ReviewPlatform;
|
|
15
|
+
scope: Scope;
|
|
16
|
+
config: ReviewProfileConfig;
|
|
17
|
+
skills: readonly ReviewSelectedSkill[];
|
|
18
|
+
pluginConfigs: readonly ReviewPluginProfileConfig[];
|
|
19
|
+
}): ReviewProfile;
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import crypto from 'node:crypto';
|
|
2
|
+
import { canonicalJson } from '@lesliechan721/agent-skill-eval';
|
|
3
|
+
import { canonicalizePluginConfigValues, selectPluginConfigProfile, formatPluginConfigIssue, getPluginConfigDependencyFields, validatePluginConfigCandidate, validatePluginConfigValue, PLATFORM_TARGETS, } from '@lesliechan721/aw-plugin-core';
|
|
4
|
+
import { ReviewSelectionError, } from './review-types.js';
|
|
5
|
+
const digestPattern = /^sha256:[0-9a-f]{64}$/u;
|
|
6
|
+
const safeIdPattern = /^[a-z0-9][a-z0-9-]*$/u;
|
|
7
|
+
const safeConfigKeyPattern = /^[A-Za-z][A-Za-z0-9_]*$/u;
|
|
8
|
+
const dangerousConfigKeys = new Set(['__proto__', 'constructor', 'prototype']);
|
|
9
|
+
function isRecord(value) {
|
|
10
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
11
|
+
}
|
|
12
|
+
function compareText(left, right) {
|
|
13
|
+
return left < right ? -1 : left > right ? 1 : 0;
|
|
14
|
+
}
|
|
15
|
+
function digestCanonical(value) {
|
|
16
|
+
return `sha256:${crypto.createHash('sha256').update(canonicalJson(value)).digest('hex')}`;
|
|
17
|
+
}
|
|
18
|
+
function sameConfigValue(left, right) {
|
|
19
|
+
return canonicalJson(left) === canonicalJson(right);
|
|
20
|
+
}
|
|
21
|
+
function isConfigScalar(value) {
|
|
22
|
+
return typeof value === 'string' || typeof value === 'boolean'
|
|
23
|
+
|| (typeof value === 'number' && Number.isFinite(value));
|
|
24
|
+
}
|
|
25
|
+
function assertConfigScalarArray(value, field) {
|
|
26
|
+
const keys = Object.keys(value);
|
|
27
|
+
if (keys.length === value.length && keys.every((key, index) => key === String(index))) {
|
|
28
|
+
if (value.every((item) => typeof item === 'string'))
|
|
29
|
+
return value;
|
|
30
|
+
if (value.every((item) => typeof item === 'boolean'))
|
|
31
|
+
return value;
|
|
32
|
+
if (value.every((item) => typeof item === 'number' && Number.isFinite(item)))
|
|
33
|
+
return value;
|
|
34
|
+
}
|
|
35
|
+
throw new Error(`Review profile config field "${field}" has an invalid array value.`);
|
|
36
|
+
}
|
|
37
|
+
function assertConfigScalarObject(value, field) {
|
|
38
|
+
const result = {};
|
|
39
|
+
for (const [key, child] of Object.entries(value)) {
|
|
40
|
+
if (dangerousConfigKeys.has(key) || !isConfigScalar(child)) {
|
|
41
|
+
throw new Error(`Review profile config field "${field}" has an invalid object value.`);
|
|
42
|
+
}
|
|
43
|
+
result[key] = child;
|
|
44
|
+
}
|
|
45
|
+
return Object.fromEntries(Object.entries(result).sort(([left], [right]) => compareText(left, right)));
|
|
46
|
+
}
|
|
47
|
+
function assertConfigValueShape(value, field) {
|
|
48
|
+
if (typeof value === 'string' || typeof value === 'boolean')
|
|
49
|
+
return value;
|
|
50
|
+
if (typeof value === 'number' && Number.isFinite(value))
|
|
51
|
+
return value;
|
|
52
|
+
if (Array.isArray(value)) {
|
|
53
|
+
const keys = Object.keys(value);
|
|
54
|
+
if (keys.length !== value.length || keys.some((key, index) => key !== String(index))) {
|
|
55
|
+
throw new Error(`Review profile config field "${field}" has an invalid array value.`);
|
|
56
|
+
}
|
|
57
|
+
const items = value.map((item) => {
|
|
58
|
+
if (Array.isArray(item)) {
|
|
59
|
+
throw new Error(`Review profile config field "${field}" has an invalid array value.`);
|
|
60
|
+
}
|
|
61
|
+
return assertConfigValueShape(item, field);
|
|
62
|
+
});
|
|
63
|
+
const itemType = items[0] !== null && typeof items[0] === 'object' ? 'object' : typeof items[0];
|
|
64
|
+
if (items.some((item) => (typeof item === 'object' ? 'object' : typeof item) !== itemType)) {
|
|
65
|
+
throw new Error(`Review profile config field "${field}" has an invalid array value.`);
|
|
66
|
+
}
|
|
67
|
+
return items;
|
|
68
|
+
}
|
|
69
|
+
if (!isRecord(value)) {
|
|
70
|
+
throw new Error(`Review profile config field "${field}" has an invalid value.`);
|
|
71
|
+
}
|
|
72
|
+
const result = {};
|
|
73
|
+
for (const [key, child] of Object.entries(value)) {
|
|
74
|
+
if (dangerousConfigKeys.has(key)) {
|
|
75
|
+
throw new Error(`Review profile config field "${field}" has an invalid object value.`);
|
|
76
|
+
}
|
|
77
|
+
if (isConfigScalar(child))
|
|
78
|
+
result[key] = child;
|
|
79
|
+
else if (Array.isArray(child))
|
|
80
|
+
result[key] = assertConfigScalarArray(child, field);
|
|
81
|
+
else if (isRecord(child))
|
|
82
|
+
result[key] = assertConfigScalarObject(child, field);
|
|
83
|
+
else
|
|
84
|
+
throw new Error(`Review profile config field "${field}" has an invalid object value.`);
|
|
85
|
+
}
|
|
86
|
+
return Object.fromEntries(Object.entries(result).sort(([left], [right]) => compareText(left, right)));
|
|
87
|
+
}
|
|
88
|
+
export function normalizeReviewProfileConfig(value) {
|
|
89
|
+
if (!isRecord(value))
|
|
90
|
+
throw new Error('Review profile config must be an object.');
|
|
91
|
+
const entries = Object.entries(value).sort(([left], [right]) => compareText(left, right));
|
|
92
|
+
const result = {};
|
|
93
|
+
for (const [plugin, rawConfig] of entries) {
|
|
94
|
+
if (!safeIdPattern.test(plugin) || !isRecord(rawConfig)) {
|
|
95
|
+
throw new Error('Review profile config plugin entries must be named objects.');
|
|
96
|
+
}
|
|
97
|
+
const config = {};
|
|
98
|
+
for (const [key, rawValue] of Object.entries(rawConfig).sort(([left], [right]) => compareText(left, right))) {
|
|
99
|
+
if (!safeConfigKeyPattern.test(key)) {
|
|
100
|
+
throw new Error(`Review profile config for "${plugin}" has an invalid field name.`);
|
|
101
|
+
}
|
|
102
|
+
config[key] = assertConfigValueShape(rawValue, `${plugin}.${key}`);
|
|
103
|
+
}
|
|
104
|
+
if (Object.keys(config).length > 0)
|
|
105
|
+
result[plugin] = canonicalizePluginConfigValues(config);
|
|
106
|
+
}
|
|
107
|
+
return result;
|
|
108
|
+
}
|
|
109
|
+
export function parseReviewProfile(value) {
|
|
110
|
+
if (!isRecord(value))
|
|
111
|
+
throw new Error('Review source binding profile must be an object.');
|
|
112
|
+
const keys = Object.keys(value).sort(compareText);
|
|
113
|
+
if (keys.join(',') !== 'config,id,inputDigest,kind,platform,scope') {
|
|
114
|
+
throw new Error('Review source binding profile fields are invalid.');
|
|
115
|
+
}
|
|
116
|
+
const platform = value.platform;
|
|
117
|
+
const scope = value.scope;
|
|
118
|
+
if (value.kind !== 'review'
|
|
119
|
+
|| !PLATFORM_TARGETS.includes(platform)
|
|
120
|
+
|| (scope !== 'user' && scope !== 'project')
|
|
121
|
+
|| value.id !== `${platform}-${scope}`
|
|
122
|
+
|| typeof value.inputDigest !== 'string'
|
|
123
|
+
|| !digestPattern.test(value.inputDigest))
|
|
124
|
+
throw new Error('Review source binding profile identity is invalid.');
|
|
125
|
+
return {
|
|
126
|
+
kind: 'review',
|
|
127
|
+
id: `${platform}-${scope}`,
|
|
128
|
+
platform: platform,
|
|
129
|
+
scope,
|
|
130
|
+
inputDigest: value.inputDigest,
|
|
131
|
+
config: normalizeReviewProfileConfig(value.config),
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
export function resolveReviewPluginProfileConfig(options) {
|
|
135
|
+
const plugins = options.plugins ?? [options.plugin];
|
|
136
|
+
const definitions = new Map(plugins.map((plugin) => [plugin.manifest.name,
|
|
137
|
+
selectPluginConfigProfile(plugin.manifest.config ?? { schemaVersion: 5, fields: {} }, options.platform)]));
|
|
138
|
+
const definition = definitions.get(options.plugin.manifest.name);
|
|
139
|
+
const context = {
|
|
140
|
+
platform: options.platform,
|
|
141
|
+
plugin: options.plugin.manifest.name,
|
|
142
|
+
dependencies: options.plugin.manifest.dependencies ?? [],
|
|
143
|
+
plugins: Object.fromEntries(plugins.map((plugin) => [plugin.manifest.name, {
|
|
144
|
+
definition: definitions.get(plugin.manifest.name),
|
|
145
|
+
dependencies: plugin.manifest.dependencies ?? [],
|
|
146
|
+
values: {
|
|
147
|
+
...Object.fromEntries(Object.entries(definitions.get(plugin.manifest.name).fields)
|
|
148
|
+
.flatMap(([key, field]) => field.default === undefined ? [] : [[key, field.default]])),
|
|
149
|
+
...(options.config[plugin.manifest.name] ?? {}),
|
|
150
|
+
},
|
|
151
|
+
}])),
|
|
152
|
+
};
|
|
153
|
+
const fields = definition.fields;
|
|
154
|
+
const supplied = options.config[options.plugin.manifest.name] ?? {};
|
|
155
|
+
const selectedKeys = new Set(options.keys ?? Object.keys(fields));
|
|
156
|
+
let validationKeys;
|
|
157
|
+
let dependencies;
|
|
158
|
+
try {
|
|
159
|
+
dependencies = getPluginConfigDependencyFields(definition, [...selectedKeys], context);
|
|
160
|
+
validationKeys = new Set(dependencies.filter((entry) => entry.plugin === context.plugin)
|
|
161
|
+
.map((entry) => entry.field));
|
|
162
|
+
}
|
|
163
|
+
catch (error) {
|
|
164
|
+
throw new ReviewSelectionError('invalidConfig', error instanceof Error ? error.message : 'Unknown config key.');
|
|
165
|
+
}
|
|
166
|
+
const normalizedOverrides = {};
|
|
167
|
+
for (const [key, value] of Object.entries(supplied)) {
|
|
168
|
+
const field = fields[key];
|
|
169
|
+
if (!field) {
|
|
170
|
+
throw new ReviewSelectionError('invalidConfig', `Plugin "${options.plugin.manifest.name}" does not declare config field "${key}".`);
|
|
171
|
+
}
|
|
172
|
+
if (field.sensitive === true) {
|
|
173
|
+
throw new ReviewSelectionError('invalidConfig', `Review config cannot provide sensitive field "${options.plugin.manifest.name}.${key}".`);
|
|
174
|
+
}
|
|
175
|
+
const issues = validatePluginConfigValue(field, value, key);
|
|
176
|
+
if (issues.length > 0) {
|
|
177
|
+
throw new ReviewSelectionError('invalidConfig', `Plugin "${options.plugin.manifest.name}" config is invalid: ${formatPluginConfigIssue(issues[0])}`);
|
|
178
|
+
}
|
|
179
|
+
if (!validationKeys.has(key))
|
|
180
|
+
continue;
|
|
181
|
+
if (field.default === undefined || !sameConfigValue(field.default, value)) {
|
|
182
|
+
normalizedOverrides[key] = value;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
const values = {};
|
|
186
|
+
const sources = {};
|
|
187
|
+
for (const [key, field] of Object.entries(fields)) {
|
|
188
|
+
if (!validationKeys.has(key))
|
|
189
|
+
continue;
|
|
190
|
+
if (field.default !== undefined) {
|
|
191
|
+
values[key] = field.default;
|
|
192
|
+
sources[key] = 'default';
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
for (const [key, value] of Object.entries(normalizedOverrides)) {
|
|
196
|
+
values[key] = value;
|
|
197
|
+
sources[key] = options.platform ? 'platform' : 'common';
|
|
198
|
+
}
|
|
199
|
+
const dependencyInputs = dependencies.map(({ plugin: pluginName, field: key }) => {
|
|
200
|
+
const plugin = plugins.find((entry) => entry.manifest.name === pluginName);
|
|
201
|
+
const field = definitions.get(pluginName).fields[key];
|
|
202
|
+
if (field.sensitive === true && context.plugins[pluginName].values?.[key] !== undefined) {
|
|
203
|
+
throw new ReviewSelectionError('invalidConfig', `Review config cannot read sensitive dependency "${pluginName}.${key}".`);
|
|
204
|
+
}
|
|
205
|
+
const value = context.plugins[pluginName].values?.[key];
|
|
206
|
+
const source = Object.hasOwn(options.config[pluginName] ?? {}, key)
|
|
207
|
+
&& (field.default === undefined || !sameConfigValue(field.default, value))
|
|
208
|
+
? options.platform ? 'platform' : 'common'
|
|
209
|
+
: 'default';
|
|
210
|
+
return { plugin: pluginName, field: key, definition: field, value, source,
|
|
211
|
+
dependencies: plugin.manifest.dependencies ?? [] };
|
|
212
|
+
});
|
|
213
|
+
const issues = validatePluginConfigCandidate(definition, values, [...selectedKeys], context);
|
|
214
|
+
const missing = issues.find((issue) => issue.code === 'required');
|
|
215
|
+
if (missing) {
|
|
216
|
+
throw new ReviewSelectionError('requiredConfigMissing', `Plugin "${missing.path.plugin ?? options.plugin.manifest.name}" requires config field "${missing.path.field}". `
|
|
217
|
+
+ 'Provide required dependency overrides in the same config file.', 3);
|
|
218
|
+
}
|
|
219
|
+
if (issues.length > 0) {
|
|
220
|
+
throw new ReviewSelectionError('invalidConfig', `Plugin "${options.plugin.manifest.name}" config is invalid: ${formatPluginConfigIssue(issues[0])}. `
|
|
221
|
+
+ 'Provide any required dependency config in the same {plugin: {field: value}} config file.');
|
|
222
|
+
}
|
|
223
|
+
const canonicalOverrides = canonicalizePluginConfigValues(normalizedOverrides);
|
|
224
|
+
const canonicalValues = canonicalizePluginConfigValues(Object.fromEntries(Object.entries(values)
|
|
225
|
+
.filter(([key]) => selectedKeys.has(key))));
|
|
226
|
+
const canonicalSources = Object.fromEntries(Object.entries(sources).filter(([key]) => selectedKeys.has(key)).sort(([left], [right]) => compareText(left, right)));
|
|
227
|
+
return {
|
|
228
|
+
plugin: options.plugin,
|
|
229
|
+
pluginName: options.plugin.manifest.name,
|
|
230
|
+
scope: options.scope,
|
|
231
|
+
overrides: canonicalOverrides,
|
|
232
|
+
values: canonicalValues,
|
|
233
|
+
sources: canonicalSources,
|
|
234
|
+
digest: digestCanonical({ platform: options.platform, values: canonicalizePluginConfigValues(values), sources, dependencies: dependencyInputs }),
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
export function createReviewProfile(options) {
|
|
238
|
+
const config = normalizeReviewProfileConfig(Object.fromEntries(Object.entries(options.config)
|
|
239
|
+
.filter(([, values]) => Object.keys(values).length > 0)));
|
|
240
|
+
const skillInputs = options.skills.map((skill) => ({
|
|
241
|
+
plugin: skill.pluginName,
|
|
242
|
+
skill: skill.name,
|
|
243
|
+
targetId: skill.targetId,
|
|
244
|
+
delivery: skill.delivery,
|
|
245
|
+
configScope: skill.configScope,
|
|
246
|
+
configScopes: skill.configScopes,
|
|
247
|
+
refreshKeys: [...skill.refreshKeys].sort(compareText),
|
|
248
|
+
})).sort((left, right) => compareText(`${left.plugin}\0${left.skill}\0${left.targetId ?? ''}`, `${right.plugin}\0${right.skill}\0${right.targetId ?? ''}`));
|
|
249
|
+
const configInputs = options.pluginConfigs.map((entry) => ({
|
|
250
|
+
plugin: entry.pluginName,
|
|
251
|
+
scope: entry.scope,
|
|
252
|
+
values: entry.values,
|
|
253
|
+
sources: entry.sources,
|
|
254
|
+
digest: entry.digest,
|
|
255
|
+
})).sort((left, right) => compareText(`${left.plugin}\0${left.scope}`, `${right.plugin}\0${right.scope}`));
|
|
256
|
+
return {
|
|
257
|
+
kind: 'review',
|
|
258
|
+
id: `${options.platform}-${options.scope}`,
|
|
259
|
+
platform: options.platform,
|
|
260
|
+
scope: options.scope,
|
|
261
|
+
inputDigest: digestCanonical({
|
|
262
|
+
platform: options.platform,
|
|
263
|
+
scope: options.scope,
|
|
264
|
+
skills: skillInputs,
|
|
265
|
+
config: configInputs,
|
|
266
|
+
}),
|
|
267
|
+
config,
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
//# sourceMappingURL=review-profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-profile.js","sourceRoot":"","sources":["../../../src/review/review-profile.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA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KAAK,CAAC,OAAO;QACtB,MAAM,EAAE,KAAK,CAAC,MAAM;KACrB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,WAAW,CACnC,GAAG,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,KAAK,EAAE,EAC/B,GAAG,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,KAAK,EAAE,CAClC,CAAC,CAAA;IACF,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,EAAE,EAAE,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,KAAK,EAAE;QAC1C,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,WAAW,EAAE,eAAe,CAAC;YAC3B,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,MAAM,EAAE,WAAW;YACnB,MAAM,EAAE,YAAY;SACrB,CAAC;QACF,MAAM;KACP,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type CatalogWorkspace, type PluginArtifactTargetDefinition, type PluginMeta, type Scope } from '@lesliechan721/aw-plugin-core';
|
|
2
|
+
import { type ReviewPlatform, type ReviewProfile, type ReviewProfileConfig, type ReviewResolvedProfile, type ReviewSelection, type ReviewSkillSourceKind } from './review-types.js';
|
|
3
|
+
export declare function resolveReviewDynamicSkillSource(options: {
|
|
4
|
+
plugin: PluginMeta;
|
|
5
|
+
target: PluginArtifactTargetDefinition;
|
|
6
|
+
skillPaths?: readonly string[];
|
|
7
|
+
}): Promise<{
|
|
8
|
+
sourcePath: string;
|
|
9
|
+
sourcePaths: string[];
|
|
10
|
+
sourceKind: ReviewSkillSourceKind;
|
|
11
|
+
}>;
|
|
12
|
+
export declare function resolveReviewSelection(options: {
|
|
13
|
+
cwd: string;
|
|
14
|
+
target: string;
|
|
15
|
+
workspaceRoot?: string;
|
|
16
|
+
skills?: readonly string[];
|
|
17
|
+
platform?: ReviewPlatform;
|
|
18
|
+
scope?: Scope;
|
|
19
|
+
configFile?: string;
|
|
20
|
+
config?: ReviewProfileConfig;
|
|
21
|
+
env?: NodeJS.ProcessEnv;
|
|
22
|
+
}): Promise<ReviewSelection>;
|
|
23
|
+
export declare function reviewBindingMatchesSelection(options: {
|
|
24
|
+
workspace: CatalogWorkspace;
|
|
25
|
+
bindingProfile: ReviewProfile;
|
|
26
|
+
requestedProfile: ReviewResolvedProfile;
|
|
27
|
+
pluginName: string;
|
|
28
|
+
skill: string;
|
|
29
|
+
}): Promise<boolean>;
|