@lesliechan721/aw 0.1.0-beta.8 → 0.1.0-beta.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authoring/assets/aw-config.mjs +100 -501
- package/dist/authoring/assets/aw-config.mjs.map +1 -1
- package/dist/authoring/assets/aw-runtime-config.d.mts +13 -0
- package/dist/authoring/assets/aw-runtime-config.mjs +221 -0
- package/dist/authoring/assets/aw-runtime-config.mjs.map +1 -0
- package/dist/authoring/scripts/add-skill.mjs +17 -40
- package/dist/authoring/scripts/add-skill.mjs.map +1 -1
- package/dist/authoring/scripts/init-plugin.mjs +74 -98
- package/dist/authoring/scripts/init-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/lib/plugin-root.mjs +4 -4
- package/dist/authoring/scripts/lib/plugin-root.mjs.map +1 -1
- package/dist/authoring/scripts/lib/plugin-version-check.d.mts +1 -0
- package/dist/authoring/scripts/lib/plugin-version-check.mjs +230 -9
- package/dist/authoring/scripts/lib/plugin-version-check.mjs.map +1 -1
- package/dist/authoring/scripts/lib/skill-scaffold.d.mts +79 -92
- package/dist/authoring/scripts/lib/skill-scaffold.mjs +103 -127
- package/dist/authoring/scripts/lib/skill-scaffold.mjs.map +1 -1
- package/dist/authoring/scripts/remove-plugin.mjs +2 -2
- package/dist/authoring/scripts/remove-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/validate-plugin.mjs +490 -2841
- package/dist/authoring/scripts/validate-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/validate-skill.mjs +1 -1
- package/dist/native-runtime/reader-runtime.mjs +34 -0
- package/dist/native-runtime/reader.d.mts +6 -0
- package/dist/native-runtime/reader.mjs +11 -0
- package/dist/scripts/aw-skill-eval-materializer.d.ts +30 -0
- package/dist/scripts/aw-skill-eval-materializer.js +278 -0
- package/dist/scripts/aw-skill-eval-materializer.js.map +1 -0
- package/dist/scripts/bundle-plugins.d.ts +1 -0
- package/dist/scripts/bundle-plugins.js +27 -8
- package/dist/scripts/bundle-plugins.js.map +1 -1
- package/dist/scripts/plugin-staging.d.ts +7 -8
- package/dist/scripts/plugin-staging.js +16 -15
- package/dist/scripts/plugin-staging.js.map +1 -1
- package/dist/scripts/plugin-test-reporter.d.mts +2 -0
- package/dist/scripts/plugin-test-reporter.mjs +21 -0
- package/dist/scripts/plugin-test-reporter.mjs.map +1 -0
- package/dist/scripts/test-plugin-scripts.d.ts +5 -0
- package/dist/scripts/test-plugin-scripts.js +273 -78
- package/dist/scripts/test-plugin-scripts.js.map +1 -1
- package/dist/scripts/test-workers.d.mts +24 -0
- package/dist/scripts/test-workers.mjs +59 -0
- package/dist/scripts/test-workers.mjs.map +1 -0
- package/dist/src/adapters/helpers.d.ts +7 -0
- package/dist/src/adapters/helpers.js.map +1 -1
- package/dist/src/authoring/workspace-commands.d.ts +5 -1
- package/dist/src/authoring/workspace-commands.js +7 -2
- package/dist/src/authoring/workspace-commands.js.map +1 -1
- package/dist/src/commands/aw-capabilities.d.ts +2 -2
- package/dist/src/commands/aw-capabilities.js +41 -29
- package/dist/src/commands/aw-capabilities.js.map +1 -1
- package/dist/src/commands/catalog-dev-source.d.ts +58 -13
- package/dist/src/commands/catalog-dev-source.js +549 -305
- package/dist/src/commands/catalog-dev-source.js.map +1 -1
- package/dist/src/commands/catalog-generation.d.ts +14 -19
- package/dist/src/commands/catalog-generation.js +5 -10
- package/dist/src/commands/catalog-generation.js.map +1 -1
- package/dist/src/commands/catalog-publication-inspection.d.ts +70 -30
- package/dist/src/commands/catalog-publication-inspection.js +511 -91
- package/dist/src/commands/catalog-publication-inspection.js.map +1 -1
- package/dist/src/commands/catalog-publication-journal.d.ts +68 -0
- package/dist/src/commands/catalog-publication-journal.js +292 -0
- package/dist/src/commands/catalog-publication-journal.js.map +1 -0
- package/dist/src/commands/catalog-publication-target.d.ts +2 -1
- package/dist/src/commands/catalog-publication-target.js +37 -2
- package/dist/src/commands/catalog-publication-target.js.map +1 -1
- package/dist/src/commands/catalog-publish.d.ts +82 -15
- package/dist/src/commands/catalog-publish.js +722 -219
- package/dist/src/commands/catalog-publish.js.map +1 -1
- package/dist/src/commands/catalog-source.d.ts +55 -35
- package/dist/src/commands/catalog-source.js +298 -148
- package/dist/src/commands/catalog-source.js.map +1 -1
- package/dist/src/commands/catalog-status.d.ts +6 -26
- package/dist/src/commands/catalog-status.js +9 -147
- package/dist/src/commands/catalog-status.js.map +1 -1
- package/dist/src/commands/catalog-store.d.ts +104 -0
- package/dist/src/commands/catalog-store.js +685 -0
- package/dist/src/commands/catalog-store.js.map +1 -0
- package/dist/src/commands/catalog-workspace-resolution.d.ts +17 -0
- package/dist/src/commands/catalog-workspace-resolution.js +57 -0
- package/dist/src/commands/catalog-workspace-resolution.js.map +1 -0
- package/dist/src/commands/console.js +32 -20
- package/dist/src/commands/console.js.map +1 -1
- package/dist/src/commands/dependency-operation-plan.d.ts +52 -15
- package/dist/src/commands/dependency-operation-plan.js +289 -7
- package/dist/src/commands/dependency-operation-plan.js.map +1 -1
- package/dist/src/commands/deployment-confirmation.d.ts +4 -0
- package/dist/src/commands/deployment-confirmation.js +20 -0
- package/dist/src/commands/deployment-confirmation.js.map +1 -0
- package/dist/src/commands/init.d.ts +5 -11
- package/dist/src/commands/init.js +30 -51
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/intent-command.d.ts +32 -0
- package/dist/src/commands/intent-command.js +171 -0
- package/dist/src/commands/intent-command.js.map +1 -0
- package/dist/src/commands/managed-commands.d.ts +35 -0
- package/dist/src/commands/managed-commands.js +361 -0
- package/dist/src/commands/managed-commands.js.map +1 -0
- package/dist/src/commands/offline-cleanup-evidence.d.ts +46 -0
- package/dist/src/commands/offline-cleanup-evidence.js +158 -10
- package/dist/src/commands/offline-cleanup-evidence.js.map +1 -1
- package/dist/src/commands/operation-plan.d.ts +190 -0
- package/dist/src/commands/operation-plan.js +99 -0
- package/dist/src/commands/operation-plan.js.map +1 -0
- package/dist/src/commands/operation-planner.d.ts +47 -0
- package/dist/src/commands/operation-planner.js +142 -0
- package/dist/src/commands/operation-planner.js.map +1 -0
- package/dist/src/commands/options.d.ts +16 -20
- package/dist/src/commands/options.js +94 -41
- package/dist/src/commands/options.js.map +1 -1
- package/dist/src/commands/plugin-capabilities.js +88 -45
- package/dist/src/commands/plugin-capabilities.js.map +1 -1
- package/dist/src/commands/public-config-confirmation.d.ts +8 -0
- package/dist/src/commands/public-config-confirmation.js +56 -0
- package/dist/src/commands/public-config-confirmation.js.map +1 -0
- package/dist/src/commands/public-interruption.d.ts +9 -0
- package/dist/src/commands/public-interruption.js +23 -0
- package/dist/src/commands/public-interruption.js.map +1 -0
- package/dist/src/commands/public-lifecycle-result.d.ts +102 -0
- package/dist/src/commands/public-lifecycle-result.js +307 -0
- package/dist/src/commands/public-lifecycle-result.js.map +1 -0
- package/dist/src/commands/public-lifecycle.d.ts +28 -0
- package/dist/src/commands/public-lifecycle.js +492 -0
- package/dist/src/commands/public-lifecycle.js.map +1 -0
- package/dist/src/commands/public-plugin-query.d.ts +16 -0
- package/dist/src/commands/public-plugin-query.js +193 -0
- package/dist/src/commands/public-plugin-query.js.map +1 -0
- package/dist/src/commands/rebuild-command.d.ts +166 -28
- package/dist/src/commands/rebuild-command.js +3745 -813
- package/dist/src/commands/rebuild-command.js.map +1 -1
- package/dist/src/commands/rebuild-integration.d.ts +137 -25
- package/dist/src/commands/rebuild-integration.js +1343 -2535
- package/dist/src/commands/rebuild-integration.js.map +1 -1
- package/dist/src/commands/rebuild-operations.d.ts +73 -22
- package/dist/src/commands/rebuild-operations.js +313 -216
- package/dist/src/commands/rebuild-operations.js.map +1 -1
- package/dist/src/commands/rebuild-platform-integration.d.ts +62 -0
- package/dist/src/commands/rebuild-platform-integration.js +1317 -0
- package/dist/src/commands/rebuild-platform-integration.js.map +1 -0
- package/dist/src/commands/reconcile-operation-plan.d.ts +28 -0
- package/dist/src/commands/reconcile-operation-plan.js +47 -0
- package/dist/src/commands/reconcile-operation-plan.js.map +1 -0
- package/dist/src/commands/review-inspection.d.ts +60 -0
- package/dist/src/commands/review-inspection.js +436 -0
- package/dist/src/commands/review-inspection.js.map +1 -0
- package/dist/src/commands/review-preparation.d.ts +51 -0
- package/dist/src/commands/review-preparation.js +400 -0
- package/dist/src/commands/review-preparation.js.map +1 -0
- package/dist/src/commands/runtime.d.ts +6 -6
- package/dist/src/commands/runtime.js +44 -24
- package/dist/src/commands/runtime.js.map +1 -1
- package/dist/src/commands/skill-eval.d.ts +41 -0
- package/dist/src/commands/skill-eval.js +407 -0
- package/dist/src/commands/skill-eval.js.map +1 -0
- package/dist/src/commands/status-v6.d.ts +319 -0
- package/dist/src/commands/status-v6.js +2979 -0
- package/dist/src/commands/status-v6.js.map +1 -0
- package/dist/src/commands/targets-command.d.ts +38 -0
- package/dist/src/commands/targets-command.js +182 -0
- package/dist/src/commands/targets-command.js.map +1 -0
- package/dist/src/commands/wizard.d.ts +8 -5
- package/dist/src/commands/wizard.js +7 -4
- package/dist/src/commands/wizard.js.map +1 -1
- package/dist/src/commands/write-commands.d.ts +9 -3
- package/dist/src/commands/write-commands.js +143 -85
- package/dist/src/commands/write-commands.js.map +1 -1
- package/dist/src/constants.d.ts +6 -6
- package/dist/src/constants.js +6 -6
- package/dist/src/constants.js.map +1 -1
- package/dist/src/eval/manifest-v1.d.ts +70 -0
- package/dist/src/eval/manifest-v1.js +358 -0
- package/dist/src/eval/manifest-v1.js.map +1 -0
- package/dist/src/generators/local-plugin.d.ts +7 -2
- package/dist/src/generators/local-plugin.js +313 -389
- package/dist/src/generators/local-plugin.js.map +1 -1
- package/dist/src/generators/permissions.d.ts +5 -2
- package/dist/src/generators/permissions.js +28 -15
- package/dist/src/generators/permissions.js.map +1 -1
- package/dist/src/index.d.ts +2 -31
- package/dist/src/index.js +1666 -1827
- package/dist/src/index.js.map +1 -1
- package/dist/src/intent/deployment-preferences.d.ts +63 -0
- package/dist/src/intent/deployment-preferences.js +170 -0
- package/dist/src/intent/deployment-preferences.js.map +1 -0
- package/dist/src/intent/diagnostics.d.ts +11 -0
- package/dist/src/intent/diagnostics.js +14 -0
- package/dist/src/intent/diagnostics.js.map +1 -0
- package/dist/src/intent/intent-codec.d.ts +19 -0
- package/dist/src/intent/intent-codec.js +117 -0
- package/dist/src/intent/intent-codec.js.map +1 -0
- package/dist/src/intent/intent-store.d.ts +43 -0
- package/dist/src/intent/intent-store.js +118 -0
- package/dist/src/intent/intent-store.js.map +1 -0
- package/dist/src/intent/scope-context.d.ts +33 -0
- package/dist/src/intent/scope-context.js +149 -0
- package/dist/src/intent/scope-context.js.map +1 -0
- package/dist/src/intent/work-context.d.ts +13 -0
- package/dist/src/intent/work-context.js +22 -0
- package/dist/src/intent/work-context.js.map +1 -0
- package/dist/src/output/command-receipt.d.ts +47 -46
- package/dist/src/output/command-receipt.js +286 -79
- package/dist/src/output/command-receipt.js.map +1 -1
- package/dist/src/output/model.d.ts +3 -11
- package/dist/src/output/native-consent.d.ts +2 -0
- package/dist/src/output/native-consent.js +5 -0
- package/dist/src/output/native-consent.js.map +1 -0
- package/dist/src/output/public-result.d.ts +49 -0
- package/dist/src/output/public-result.js +240 -0
- package/dist/src/output/public-result.js.map +1 -0
- package/dist/src/output/rebuild-progress.js +20 -15
- package/dist/src/output/rebuild-progress.js.map +1 -1
- package/dist/src/output/receipt-projection.d.ts +7 -0
- package/dist/src/output/receipt-projection.js +592 -0
- package/dist/src/output/receipt-projection.js.map +1 -0
- package/dist/src/platforms/capabilities.d.ts +12 -0
- package/dist/src/platforms/capabilities.js +205 -0
- package/dist/src/platforms/capabilities.js.map +1 -0
- package/dist/src/platforms/contracts.d.ts +358 -0
- package/dist/src/platforms/contracts.js +2 -0
- package/dist/src/platforms/contracts.js.map +1 -0
- package/dist/src/platforms/cursor-workspace-hook.d.ts +28 -0
- package/dist/src/platforms/cursor-workspace-hook.js +198 -0
- package/dist/src/platforms/cursor-workspace-hook.js.map +1 -0
- package/dist/src/platforms/discovery.d.ts +91 -0
- package/dist/src/platforms/discovery.js +653 -0
- package/dist/src/platforms/discovery.js.map +1 -0
- package/dist/src/platforms/gemini-activation.d.ts +36 -0
- package/dist/src/platforms/gemini-activation.js +331 -0
- package/dist/src/platforms/gemini-activation.js.map +1 -0
- package/dist/src/platforms/gemini-consent.d.ts +8 -0
- package/dist/src/platforms/gemini-consent.js +81 -0
- package/dist/src/platforms/gemini-consent.js.map +1 -0
- package/dist/src/platforms/identity.d.ts +4 -0
- package/dist/src/platforms/identity.js +22 -0
- package/dist/src/platforms/identity.js.map +1 -0
- package/dist/src/platforms/inspection-grok.d.ts +4 -0
- package/dist/src/platforms/inspection-grok.js +212 -0
- package/dist/src/platforms/inspection-grok.js.map +1 -0
- package/dist/src/platforms/inspection-native.d.ts +6 -0
- package/dist/src/platforms/inspection-native.js +406 -0
- package/dist/src/platforms/inspection-native.js.map +1 -0
- package/dist/src/platforms/inspection-opencode.d.ts +4 -0
- package/dist/src/platforms/inspection-opencode.js +98 -0
- package/dist/src/platforms/inspection-opencode.js.map +1 -0
- package/dist/src/platforms/inspection-pi.d.ts +3 -0
- package/dist/src/platforms/inspection-pi.js +282 -0
- package/dist/src/platforms/inspection-pi.js.map +1 -0
- package/dist/src/platforms/inspection-query.d.ts +12 -0
- package/dist/src/platforms/inspection-query.js +96 -0
- package/dist/src/platforms/inspection-query.js.map +1 -0
- package/dist/src/platforms/inspection.d.ts +17 -0
- package/dist/src/platforms/inspection.js +227 -0
- package/dist/src/platforms/inspection.js.map +1 -0
- package/dist/src/platforms/layout.d.ts +21 -0
- package/dist/src/platforms/layout.js +239 -0
- package/dist/src/platforms/layout.js.map +1 -0
- package/dist/src/platforms/lifecycle-native-services.d.ts +3 -0
- package/dist/src/platforms/lifecycle-native-services.js +147 -0
- package/dist/src/platforms/lifecycle-native-services.js.map +1 -0
- package/dist/src/platforms/lifecycle-native.d.ts +13 -0
- package/dist/src/platforms/lifecycle-native.js +283 -0
- package/dist/src/platforms/lifecycle-native.js.map +1 -0
- package/dist/src/platforms/lifecycle.d.ts +25 -0
- package/dist/src/platforms/lifecycle.js +494 -0
- package/dist/src/platforms/lifecycle.js.map +1 -0
- package/dist/src/platforms/managed-command-placement.d.ts +8 -0
- package/dist/src/platforms/managed-command-placement.js +79 -0
- package/dist/src/platforms/managed-command-placement.js.map +1 -0
- package/dist/src/platforms/projection-code-extension.d.ts +8 -0
- package/dist/src/platforms/projection-code-extension.js +121 -0
- package/dist/src/platforms/projection-code-extension.js.map +1 -0
- package/dist/src/platforms/projection-command-resources.d.ts +7 -0
- package/dist/src/platforms/projection-command-resources.js +74 -0
- package/dist/src/platforms/projection-command-resources.js.map +1 -0
- package/dist/src/platforms/projection-files.d.ts +27 -0
- package/dist/src/platforms/projection-files.js +111 -0
- package/dist/src/platforms/projection-files.js.map +1 -0
- package/dist/src/platforms/projection-marketplace.d.ts +19 -0
- package/dist/src/platforms/projection-marketplace.js +42 -0
- package/dist/src/platforms/projection-marketplace.js.map +1 -0
- package/dist/src/platforms/projection.d.ts +10 -0
- package/dist/src/platforms/projection.js +446 -0
- package/dist/src/platforms/projection.js.map +1 -0
- package/dist/src/platforms/registry.d.ts +4 -0
- package/dist/src/platforms/registry.js +30 -0
- package/dist/src/platforms/registry.js.map +1 -0
- package/dist/src/platforms/supplement-layout.d.ts +16 -0
- package/dist/src/platforms/supplement-layout.js +31 -0
- package/dist/src/platforms/supplement-layout.js.map +1 -0
- package/dist/src/platforms/supplement-state.d.ts +13 -0
- package/dist/src/platforms/supplement-state.js +82 -0
- package/dist/src/platforms/supplement-state.js.map +1 -0
- package/dist/src/portable/commands.d.ts +58 -11
- package/dist/src/portable/commands.js +94 -350
- package/dist/src/portable/commands.js.map +1 -1
- package/dist/src/portable/historical-materialization.d.ts +22 -0
- package/dist/src/portable/historical-materialization.js +124 -0
- package/dist/src/portable/historical-materialization.js.map +1 -0
- package/dist/src/portable/materializer.d.ts +24 -4
- package/dist/src/portable/materializer.js +189 -259
- package/dist/src/portable/materializer.js.map +1 -1
- package/dist/src/portable/recovery-layout.d.ts +17 -0
- package/dist/src/portable/recovery-layout.js +42 -0
- package/dist/src/portable/recovery-layout.js.map +1 -0
- package/dist/src/portable/recovery.d.ts +153 -0
- package/dist/src/portable/recovery.js +367 -0
- package/dist/src/portable/recovery.js.map +1 -0
- package/dist/src/portable/writer.d.ts +67 -0
- package/dist/src/portable/writer.js +321 -0
- package/dist/src/portable/writer.js.map +1 -0
- package/dist/src/recovery/coordinator.d.ts +141 -0
- package/dist/src/recovery/coordinator.js +1254 -0
- package/dist/src/recovery/coordinator.js.map +1 -0
- package/dist/src/recovery/demand.d.ts +51 -0
- package/dist/src/recovery/demand.js +159 -0
- package/dist/src/recovery/demand.js.map +1 -0
- package/dist/src/recovery/joint-coordinator.d.ts +25 -0
- package/dist/src/recovery/joint-coordinator.js +991 -0
- package/dist/src/recovery/joint-coordinator.js.map +1 -0
- package/dist/src/recovery/joint-demand.d.ts +50 -0
- package/dist/src/recovery/joint-demand.js +197 -0
- package/dist/src/recovery/joint-demand.js.map +1 -0
- package/dist/src/recovery/performance.d.ts +4 -0
- package/dist/src/recovery/performance.js +26 -0
- package/dist/src/recovery/performance.js.map +1 -0
- package/dist/src/recovery/receipt.d.ts +98 -0
- package/dist/src/recovery/receipt.js +2 -0
- package/dist/src/recovery/receipt.js.map +1 -0
- package/dist/src/recovery/retirement.d.ts +47 -0
- package/dist/src/recovery/retirement.js +469 -0
- package/dist/src/recovery/retirement.js.map +1 -0
- package/dist/src/recovery/status.d.ts +126 -0
- package/dist/src/recovery/status.js +1073 -0
- package/dist/src/recovery/status.js.map +1 -0
- package/dist/src/recovery/types.d.ts +85 -0
- package/dist/src/recovery/types.js +2 -0
- package/dist/src/recovery/types.js.map +1 -0
- package/dist/src/review/eval-source-input.d.ts +43 -0
- package/dist/src/review/eval-source-input.js +207 -0
- package/dist/src/review/eval-source-input.js.map +1 -0
- package/dist/src/review/platform-profile.d.ts +3 -0
- package/dist/src/review/platform-profile.js +14 -0
- package/dist/src/review/platform-profile.js.map +1 -0
- package/dist/src/review/review-profile.d.ts +20 -0
- package/dist/src/review/review-profile.js +276 -0
- package/dist/src/review/review-profile.js.map +1 -0
- package/dist/src/review/review-selection.d.ts +20 -0
- package/dist/src/review/review-selection.js +495 -0
- package/dist/src/review/review-selection.js.map +1 -0
- package/dist/src/review/review-types.d.ts +71 -0
- package/dist/src/review/review-types.js +16 -0
- package/dist/src/review/review-types.js.map +1 -0
- package/dist/src/review/skill-materialization.d.ts +62 -0
- package/dist/src/review/skill-materialization.js +205 -0
- package/dist/src/review/skill-materialization.js.map +1 -0
- package/dist/src/review/source-binding.d.ts +201 -0
- package/dist/src/review/source-binding.js +773 -0
- package/dist/src/review/source-binding.js.map +1 -0
- package/dist/src/tui/agent-management.d.ts +23 -0
- package/dist/src/tui/agent-management.js +319 -0
- package/dist/src/tui/agent-management.js.map +1 -0
- package/dist/src/tui/agent-settings.d.ts +47 -0
- package/dist/src/tui/agent-settings.js +97 -0
- package/dist/src/tui/agent-settings.js.map +1 -0
- package/dist/src/tui/catalog-freshness.d.ts +1 -0
- package/dist/src/tui/catalog-freshness.js +2 -0
- package/dist/src/tui/catalog-freshness.js.map +1 -0
- package/dist/src/tui/catalog-generation.d.ts +18 -53
- package/dist/src/tui/catalog-generation.js +136 -224
- package/dist/src/tui/catalog-generation.js.map +1 -1
- package/dist/src/tui/catalog-sources/projection.d.ts +4 -0
- package/dist/src/tui/catalog-sources/projection.js +17 -0
- package/dist/src/tui/catalog-sources/projection.js.map +1 -0
- package/dist/src/tui/catalog-sources/review.d.ts +3 -0
- package/dist/src/tui/catalog-sources/review.js +13 -0
- package/dist/src/tui/catalog-sources/review.js.map +1 -0
- package/dist/src/tui/catalog-sources/screens.d.ts +12 -0
- package/dist/src/tui/catalog-sources/screens.js +40 -0
- package/dist/src/tui/catalog-sources/screens.js.map +1 -0
- package/dist/src/tui/catalog-sources/session.d.ts +32 -0
- package/dist/src/tui/catalog-sources/session.js +300 -0
- package/dist/src/tui/catalog-sources/session.js.map +1 -0
- package/dist/src/tui/catalog-sources/types.d.ts +54 -0
- package/dist/src/tui/catalog-sources/types.js +2 -0
- package/dist/src/tui/catalog-sources/types.js.map +1 -0
- package/dist/src/tui/catalog-store-task.d.ts +16 -0
- package/dist/src/tui/catalog-store-task.js +19 -0
- package/dist/src/tui/catalog-store-task.js.map +1 -0
- package/dist/src/tui/clipboard.d.ts +13 -0
- package/dist/src/tui/clipboard.js +95 -0
- package/dist/src/tui/clipboard.js.map +1 -0
- package/dist/src/tui/components.d.ts +113 -3
- package/dist/src/tui/components.js +201 -36
- package/dist/src/tui/components.js.map +1 -1
- package/dist/src/tui/config-array-draft.d.ts +29 -0
- package/dist/src/tui/config-array-draft.js +48 -0
- package/dist/src/tui/config-array-draft.js.map +1 -0
- package/dist/src/tui/config-leaf-editor.d.ts +43 -0
- package/dist/src/tui/config-leaf-editor.js +224 -0
- package/dist/src/tui/config-leaf-editor.js.map +1 -0
- package/dist/src/tui/config-references.d.ts +38 -0
- package/dist/src/tui/config-references.js +82 -0
- package/dist/src/tui/config-references.js.map +1 -0
- package/dist/src/tui/config-value-presentation.d.ts +20 -0
- package/dist/src/tui/config-value-presentation.js +104 -0
- package/dist/src/tui/config-value-presentation.js.map +1 -0
- package/dist/src/tui/console-app-v4.d.ts +13 -4
- package/dist/src/tui/console-app-v4.js +9764 -2210
- package/dist/src/tui/console-app-v4.js.map +1 -1
- package/dist/src/tui/content-item-card.d.ts +13 -0
- package/dist/src/tui/content-item-card.js +51 -0
- package/dist/src/tui/content-item-card.js.map +1 -0
- package/dist/src/tui/controller-runtime.d.ts +7 -4
- package/dist/src/tui/controller-runtime.js +2064 -779
- package/dist/src/tui/controller-runtime.js.map +1 -1
- package/dist/src/tui/controller.d.ts +669 -106
- package/dist/src/tui/controller.js +3617 -971
- package/dist/src/tui/controller.js.map +1 -1
- package/dist/src/tui/dependency-graph-view.d.ts +39 -0
- package/dist/src/tui/dependency-graph-view.js +121 -0
- package/dist/src/tui/dependency-graph-view.js.map +1 -0
- package/dist/src/tui/dependency-graph.d.ts +81 -0
- package/dist/src/tui/dependency-graph.js +452 -0
- package/dist/src/tui/dependency-graph.js.map +1 -0
- package/dist/src/tui/deployment-view.d.ts +10 -0
- package/dist/src/tui/deployment-view.js +108 -0
- package/dist/src/tui/deployment-view.js.map +1 -0
- package/dist/src/tui/diagnostic-projection.d.ts +23 -0
- package/dist/src/tui/diagnostic-projection.js +595 -0
- package/dist/src/tui/diagnostic-projection.js.map +1 -0
- package/dist/src/tui/diagnostics.d.ts +6 -3
- package/dist/src/tui/diagnostics.js +14 -2
- package/dist/src/tui/diagnostics.js.map +1 -1
- package/dist/src/tui/entity-cards.d.ts +55 -0
- package/dist/src/tui/entity-cards.js +298 -0
- package/dist/src/tui/entity-cards.js.map +1 -0
- package/dist/src/tui/glossary.d.ts +25 -0
- package/dist/src/tui/glossary.js +72 -0
- package/dist/src/tui/glossary.js.map +1 -0
- package/dist/src/tui/index.d.ts +6 -2
- package/dist/src/tui/index.js +5 -2
- package/dist/src/tui/index.js.map +1 -1
- package/dist/src/tui/input-display.d.ts +1 -0
- package/dist/src/tui/input-display.js +23 -1
- package/dist/src/tui/input-display.js.map +1 -1
- package/dist/src/tui/keys.d.ts +44 -0
- package/dist/src/tui/keys.js +43 -15
- package/dist/src/tui/keys.js.map +1 -1
- package/dist/src/tui/lifecycle-action-view.d.ts +6 -0
- package/dist/src/tui/lifecycle-action-view.js +36 -0
- package/dist/src/tui/lifecycle-action-view.js.map +1 -0
- package/dist/src/tui/model.d.ts +243 -45
- package/dist/src/tui/model.js +1402 -415
- package/dist/src/tui/model.js.map +1 -1
- package/dist/src/tui/operation-diagnostic-screens.d.ts +8 -0
- package/dist/src/tui/operation-diagnostic-screens.js +72 -0
- package/dist/src/tui/operation-diagnostic-screens.js.map +1 -0
- package/dist/src/tui/operation-history.d.ts +82 -0
- package/dist/src/tui/operation-history.js +136 -0
- package/dist/src/tui/operation-history.js.map +1 -0
- package/dist/src/tui/operation-review-planner.d.ts +28 -0
- package/dist/src/tui/operation-review-planner.js +1396 -0
- package/dist/src/tui/operation-review-planner.js.map +1 -0
- package/dist/src/tui/plugin-content.d.ts +33 -0
- package/dist/src/tui/plugin-content.js +245 -0
- package/dist/src/tui/plugin-content.js.map +1 -0
- package/dist/src/tui/plugin-detail.d.ts +72 -0
- package/dist/src/tui/plugin-detail.js +260 -0
- package/dist/src/tui/plugin-detail.js.map +1 -0
- package/dist/src/tui/plugin-write-task.d.ts +69 -0
- package/dist/src/tui/plugin-write-task.js +286 -0
- package/dist/src/tui/plugin-write-task.js.map +1 -0
- package/dist/src/tui/prompt.js +4 -15
- package/dist/src/tui/prompt.js.map +1 -1
- package/dist/src/tui/query-header.d.ts +30 -0
- package/dist/src/tui/query-header.js +40 -0
- package/dist/src/tui/query-header.js.map +1 -0
- package/dist/src/tui/reader.d.ts +38 -0
- package/dist/src/tui/reader.js +49 -0
- package/dist/src/tui/reader.js.map +1 -0
- package/dist/src/tui/router.d.ts +186 -35
- package/dist/src/tui/router.js +338 -50
- package/dist/src/tui/router.js.map +1 -1
- package/dist/src/tui/scoped-flow.d.ts +45 -0
- package/dist/src/tui/scoped-flow.js +96 -0
- package/dist/src/tui/scoped-flow.js.map +1 -0
- package/dist/src/tui/scoped-inventory.d.ts +126 -0
- package/dist/src/tui/scoped-inventory.js +258 -0
- package/dist/src/tui/scoped-inventory.js.map +1 -0
- package/dist/src/tui/screen-registry.d.ts +701 -0
- package/dist/src/tui/screen-registry.js +226 -0
- package/dist/src/tui/screen-registry.js.map +1 -0
- package/dist/src/tui/session-console-app.d.ts +6 -0
- package/dist/src/tui/session-console-app.js +13 -0
- package/dist/src/tui/session-console-app.js.map +1 -0
- package/dist/src/tui/session-host.d.ts +45 -0
- package/dist/src/tui/session-host.js +219 -0
- package/dist/src/tui/session-host.js.map +1 -0
- package/dist/src/tui/source-detail-card.d.ts +29 -0
- package/dist/src/tui/source-detail-card.js +45 -0
- package/dist/src/tui/source-detail-card.js.map +1 -0
- package/dist/src/tui/theme.d.ts +12 -0
- package/dist/src/tui/theme.js +12 -0
- package/dist/src/tui/theme.js.map +1 -1
- package/dist/src/tui/viewport.d.ts +1 -0
- package/dist/src/tui/viewport.js +23 -0
- package/dist/src/tui/viewport.js.map +1 -1
- package/dist/src/tui/wizard.js +37 -13
- package/dist/src/tui/wizard.js.map +1 -1
- package/dist/src/types.d.ts +220 -118
- package/dist/src/types.js +1 -0
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils/agent-version.d.ts +13 -4
- package/dist/src/utils/agent-version.js +27 -4
- package/dist/src/utils/agent-version.js.map +1 -1
- package/dist/src/utils/artifact-plan.d.ts +33 -7
- package/dist/src/utils/artifact-plan.js +115 -430
- package/dist/src/utils/artifact-plan.js.map +1 -1
- package/dist/src/utils/artifact-renderer.d.ts +114 -83
- package/dist/src/utils/artifact-renderer.js +213 -364
- package/dist/src/utils/artifact-renderer.js.map +1 -1
- package/dist/src/utils/artifact-request.d.ts +44 -0
- package/dist/src/utils/artifact-request.js +80 -0
- package/dist/src/utils/artifact-request.js.map +1 -0
- package/dist/src/utils/artifact-sources.d.ts +6 -2
- package/dist/src/utils/artifact-sources.js +17 -0
- package/dist/src/utils/artifact-sources.js.map +1 -1
- package/dist/src/utils/bundle-layout.js +57 -173
- package/dist/src/utils/bundle-layout.js.map +1 -1
- package/dist/src/utils/catalog-capability-projection.d.ts +8 -0
- package/dist/src/utils/catalog-capability-projection.js +14 -0
- package/dist/src/utils/catalog-capability-projection.js.map +1 -0
- package/dist/src/utils/catalog-digests.d.ts +2 -2
- package/dist/src/utils/catalog-digests.js +7 -18
- package/dist/src/utils/catalog-digests.js.map +1 -1
- package/dist/src/utils/catalog-generation-control-snapshot.d.ts +11 -0
- package/dist/src/utils/catalog-generation-control-snapshot.js +45 -0
- package/dist/src/utils/catalog-generation-control-snapshot.js.map +1 -0
- package/dist/src/utils/catalog-generation-error.d.ts +5 -1
- package/dist/src/utils/catalog-generation-error.js +14 -0
- package/dist/src/utils/catalog-generation-error.js.map +1 -1
- package/dist/src/utils/catalog-generation-resolver.d.ts +36 -5
- package/dist/src/utils/catalog-generation-resolver.js +221 -77
- package/dist/src/utils/catalog-generation-resolver.js.map +1 -1
- package/dist/src/utils/catalog-generation-service.d.ts +159 -28
- package/dist/src/utils/catalog-generation-service.js +1186 -525
- package/dist/src/utils/catalog-generation-service.js.map +1 -1
- package/dist/src/utils/catalog-generation-state.d.ts +9 -0
- package/dist/src/utils/catalog-generation-state.js +97 -106
- package/dist/src/utils/catalog-generation-state.js.map +1 -1
- package/dist/src/utils/catalog-generation-store.d.ts +38 -24
- package/dist/src/utils/catalog-generation-store.js +337 -272
- package/dist/src/utils/catalog-generation-store.js.map +1 -1
- package/dist/src/utils/catalog-manifest-v7.d.ts +5 -0
- package/dist/src/utils/{catalog-manifest-v5.js → catalog-manifest-v7.js} +23 -35
- package/dist/src/utils/catalog-manifest-v7.js.map +1 -0
- package/dist/src/utils/catalog-operation-context.d.ts +6 -14
- package/dist/src/utils/catalog-operation-context.js +69 -169
- package/dist/src/utils/catalog-operation-context.js.map +1 -1
- package/dist/src/utils/catalog-public-error.js +8 -4
- package/dist/src/utils/catalog-public-error.js.map +1 -1
- package/dist/src/utils/catalog-runtime-projection.d.ts +7 -3
- package/dist/src/utils/catalog-runtime-projection.js +5 -40
- package/dist/src/utils/catalog-runtime-projection.js.map +1 -1
- package/dist/src/utils/catalog-snapshot.d.ts +2 -2
- package/dist/src/utils/catalog-source-impact.d.ts +21 -0
- package/dist/src/utils/catalog-source-impact.js +344 -0
- package/dist/src/utils/catalog-source-impact.js.map +1 -0
- package/dist/src/utils/catalog-source-references.d.ts +23 -2
- package/dist/src/utils/catalog-source-references.js +456 -382
- package/dist/src/utils/catalog-source-references.js.map +1 -1
- package/dist/src/utils/catalog-sources.d.ts +14 -1
- package/dist/src/utils/catalog-sources.js +178 -18
- package/dist/src/utils/catalog-sources.js.map +1 -1
- package/dist/src/utils/codex-config.d.ts +2 -0
- package/dist/src/utils/codex-config.js +22 -1
- package/dist/src/utils/codex-config.js.map +1 -1
- package/dist/src/utils/codex-executable-discovery.d.ts +28 -0
- package/dist/src/utils/codex-executable-discovery.js +431 -0
- package/dist/src/utils/codex-executable-discovery.js.map +1 -0
- package/dist/src/utils/codex-manager.d.ts +47 -18
- package/dist/src/utils/codex-manager.js +88 -622
- package/dist/src/utils/codex-manager.js.map +1 -1
- package/dist/src/utils/codex-marketplace-path.d.ts +5 -0
- package/dist/src/utils/codex-marketplace-path.js +45 -0
- package/dist/src/utils/codex-marketplace-path.js.map +1 -0
- package/dist/src/utils/codex-native-observation.d.ts +49 -0
- package/dist/src/utils/codex-native-observation.js +169 -0
- package/dist/src/utils/codex-native-observation.js.map +1 -0
- package/dist/src/utils/codex-reconciler.d.ts +123 -0
- package/dist/src/utils/codex-reconciler.js +322 -0
- package/dist/src/utils/codex-reconciler.js.map +1 -0
- package/dist/src/utils/codex-shared-native.d.ts +45 -0
- package/dist/src/utils/codex-shared-native.js +122 -0
- package/dist/src/utils/codex-shared-native.js.map +1 -0
- package/dist/src/utils/codex-skill-staging.d.ts +4 -3
- package/dist/src/utils/codex-skill-staging.js.map +1 -1
- package/dist/src/utils/codex-skills-root.d.ts +4 -0
- package/dist/src/utils/codex-skills-root.js +25 -0
- package/dist/src/utils/codex-skills-root.js.map +1 -0
- package/dist/src/utils/codex-surface-analysis.d.ts +49 -0
- package/dist/src/utils/codex-surface-analysis.js +220 -0
- package/dist/src/utils/codex-surface-analysis.js.map +1 -0
- package/dist/src/utils/component-command-preparation.d.ts +34 -0
- package/dist/src/utils/component-command-preparation.js +228 -0
- package/dist/src/utils/component-command-preparation.js.map +1 -0
- package/dist/src/utils/component-resources.d.ts +51 -0
- package/dist/src/utils/component-resources.js +322 -0
- package/dist/src/utils/component-resources.js.map +1 -0
- package/dist/src/utils/dynamic-skill-tree.d.ts +18 -6
- package/dist/src/utils/dynamic-skill-tree.js +32 -9
- package/dist/src/utils/dynamic-skill-tree.js.map +1 -1
- package/dist/src/utils/git-catalog-provider.d.ts +16 -0
- package/dist/src/utils/git-catalog-provider.js +167 -120
- package/dist/src/utils/git-catalog-provider.js.map +1 -1
- package/dist/src/utils/inventory-recovery-diagnostic.d.ts +4 -0
- package/dist/src/utils/inventory-recovery-diagnostic.js +15 -0
- package/dist/src/utils/inventory-recovery-diagnostic.js.map +1 -0
- package/dist/src/utils/local-marketplace.d.ts +17 -12
- package/dist/src/utils/local-marketplace.js +85 -195
- package/dist/src/utils/local-marketplace.js.map +1 -1
- package/dist/src/utils/managed-command-closure.d.ts +3 -0
- package/dist/src/utils/managed-command-closure.js +35 -0
- package/dist/src/utils/managed-command-closure.js.map +1 -0
- package/dist/src/utils/managed-command-evidence.d.ts +7 -0
- package/dist/src/utils/managed-command-evidence.js +10 -0
- package/dist/src/utils/managed-command-evidence.js.map +1 -0
- package/dist/src/utils/managed-command-materialization.d.ts +124 -0
- package/dist/src/utils/managed-command-materialization.js +369 -0
- package/dist/src/utils/managed-command-materialization.js.map +1 -0
- package/dist/src/utils/managed-command-preparation.d.ts +67 -0
- package/dist/src/utils/managed-command-preparation.js +146 -0
- package/dist/src/utils/managed-command-preparation.js.map +1 -0
- package/dist/src/utils/managed-command-review.d.ts +26 -0
- package/dist/src/utils/managed-command-review.js +68 -0
- package/dist/src/utils/managed-command-review.js.map +1 -0
- package/dist/src/utils/managed-command-runtime.d.ts +33 -0
- package/dist/src/utils/managed-command-runtime.js +121 -0
- package/dist/src/utils/managed-command-runtime.js.map +1 -0
- package/dist/src/utils/managed-command-store.d.ts +143 -0
- package/dist/src/utils/managed-command-store.js +665 -0
- package/dist/src/utils/managed-command-store.js.map +1 -0
- package/dist/src/utils/manifest.d.ts +1 -3
- package/dist/src/utils/manifest.js +1 -3
- package/dist/src/utils/manifest.js.map +1 -1
- package/dist/src/utils/multi-source-catalog.d.ts +1 -10
- package/dist/src/utils/multi-source-catalog.js +9 -175
- package/dist/src/utils/multi-source-catalog.js.map +1 -1
- package/dist/src/utils/native-cli.d.ts +74 -5
- package/dist/src/utils/native-cli.js +479 -31
- package/dist/src/utils/native-cli.js.map +1 -1
- package/dist/src/utils/native-demand.d.ts +29 -0
- package/dist/src/utils/native-demand.js +4 -0
- package/dist/src/utils/native-demand.js.map +1 -0
- package/dist/src/utils/native-tool-context.d.ts +14 -0
- package/dist/src/utils/native-tool-context.js +38 -0
- package/dist/src/utils/native-tool-context.js.map +1 -0
- package/dist/src/utils/native-tool-review.d.ts +18 -0
- package/dist/src/utils/native-tool-review.js +116 -0
- package/dist/src/utils/native-tool-review.js.map +1 -0
- package/dist/src/utils/orphan-marketplace-cleanup.js +0 -1
- package/dist/src/utils/orphan-marketplace-cleanup.js.map +1 -1
- package/dist/src/utils/ownership.d.ts +103 -21
- package/dist/src/utils/ownership.js +232 -210
- package/dist/src/utils/ownership.js.map +1 -1
- package/dist/src/utils/path-catalog-provider.d.ts +1 -1
- package/dist/src/utils/path-catalog-provider.js +47 -62
- package/dist/src/utils/path-catalog-provider.js.map +1 -1
- package/dist/src/utils/paths.d.ts +1 -2
- package/dist/src/utils/paths.js +5 -3
- package/dist/src/utils/paths.js.map +1 -1
- package/dist/src/utils/platform-empty-state.d.ts +45 -0
- package/dist/src/utils/platform-empty-state.js +159 -0
- package/dist/src/utils/platform-empty-state.js.map +1 -0
- package/dist/src/utils/platform-support.d.ts +1 -1
- package/dist/src/utils/platform-support.js +1 -1
- package/dist/src/utils/platform-support.js.map +1 -1
- package/dist/src/utils/plugin-config-impact.d.ts +64 -0
- package/dist/src/utils/plugin-config-impact.js +307 -0
- package/dist/src/utils/plugin-config-impact.js.map +1 -0
- package/dist/src/utils/plugin-config-references.d.ts +89 -0
- package/dist/src/utils/plugin-config-references.js +335 -0
- package/dist/src/utils/plugin-config-references.js.map +1 -0
- package/dist/src/utils/plugin-config-write.d.ts +109 -27
- package/dist/src/utils/plugin-config-write.js +1242 -348
- package/dist/src/utils/plugin-config-write.js.map +1 -1
- package/dist/src/utils/plugin-config.d.ts +187 -109
- package/dist/src/utils/plugin-config.js +916 -1147
- package/dist/src/utils/plugin-config.js.map +1 -1
- package/dist/src/utils/plugin-dependencies.d.ts +1 -1
- package/dist/src/utils/plugin-dependencies.js.map +1 -1
- package/dist/src/utils/plugin-scripts.d.ts +78 -127
- package/dist/src/utils/plugin-scripts.js +566 -524
- package/dist/src/utils/plugin-scripts.js.map +1 -1
- package/dist/src/utils/process-lock.js +14 -5
- package/dist/src/utils/process-lock.js.map +1 -1
- package/dist/src/utils/process-tree.d.ts +2 -2
- package/dist/src/utils/process-tree.js +1 -1
- package/dist/src/utils/process-tree.js.map +1 -1
- package/dist/src/utils/project-boundary.d.ts +11 -13
- package/dist/src/utils/project-boundary.js +28 -34
- package/dist/src/utils/project-boundary.js.map +1 -1
- package/dist/src/utils/rendered-contract.js +18 -1
- package/dist/src/utils/rendered-contract.js.map +1 -1
- package/dist/src/utils/runtime-config.d.ts +18 -0
- package/dist/src/utils/runtime-config.js +64 -0
- package/dist/src/utils/runtime-config.js.map +1 -0
- package/dist/src/utils/runtime-skill-closure.d.ts +2 -2
- package/dist/src/utils/runtime-skill-closure.js +47 -6
- package/dist/src/utils/runtime-skill-closure.js.map +1 -1
- package/dist/src/utils/safe-fs.d.ts +21 -0
- package/dist/src/utils/safe-fs.js +111 -0
- package/dist/src/utils/safe-fs.js.map +1 -0
- package/dist/src/utils/safe-operation-diagnostic.d.ts +15 -0
- package/dist/src/utils/safe-operation-diagnostic.js +33 -0
- package/dist/src/utils/safe-operation-diagnostic.js.map +1 -0
- package/dist/src/utils/sensitive-content.d.ts +4 -0
- package/dist/src/utils/sensitive-content.js +36 -0
- package/dist/src/utils/sensitive-content.js.map +1 -0
- package/dist/src/utils/state-paths.d.ts +8 -3
- package/dist/src/utils/state-paths.js +53 -16
- package/dist/src/utils/state-paths.js.map +1 -1
- package/dist/src/utils/target-eligibility.d.ts +4 -3
- package/dist/src/utils/target-eligibility.js +12 -6
- package/dist/src/utils/target-eligibility.js.map +1 -1
- package/dist/src/utils/windows-claude-shim.d.ts +7 -0
- package/dist/src/utils/windows-claude-shim.js +10 -0
- package/dist/src/utils/windows-claude-shim.js.map +1 -0
- package/dist/src/utils/windows-npm-shim.d.ts +16 -0
- package/dist/src/utils/windows-npm-shim.js +155 -0
- package/dist/src/utils/windows-npm-shim.js.map +1 -0
- package/dist/vitest.config.js +105 -9
- package/dist/vitest.config.js.map +1 -1
- package/package.json +30 -21
- package/dist/scripts/aw-skill-eval-engine.d.ts +0 -13
- package/dist/scripts/aw-skill-eval-engine.js +0 -31
- package/dist/scripts/aw-skill-eval-engine.js.map +0 -1
- package/dist/scripts/codex-eval-app-server.d.ts +0 -91
- package/dist/scripts/codex-eval-app-server.js +0 -1334
- package/dist/scripts/codex-eval-app-server.js.map +0 -1
- package/dist/scripts/codex-eval-isolation.d.ts +0 -61
- package/dist/scripts/codex-eval-isolation.js +0 -318
- package/dist/scripts/codex-eval-isolation.js.map +0 -1
- package/dist/scripts/codex-eval-process-management.d.ts +0 -8
- package/dist/scripts/codex-eval-process-management.js +0 -69
- package/dist/scripts/codex-eval-process-management.js.map +0 -1
- package/dist/scripts/codex-eval-process-tree.d.ts +0 -38
- package/dist/scripts/codex-eval-process-tree.js +0 -803
- package/dist/scripts/codex-eval-process-tree.js.map +0 -1
- package/dist/scripts/codex-eval-runtime-config.d.ts +0 -62
- package/dist/scripts/codex-eval-runtime-config.js +0 -843
- package/dist/scripts/codex-eval-runtime-config.js.map +0 -1
- package/dist/scripts/codex-trigger-eval.d.ts +0 -84
- package/dist/scripts/codex-trigger-eval.js +0 -968
- package/dist/scripts/codex-trigger-eval.js.map +0 -1
- package/dist/scripts/eval-plugin-skills-audited.d.ts +0 -6
- package/dist/scripts/eval-plugin-skills-audited.js +0 -261
- package/dist/scripts/eval-plugin-skills-audited.js.map +0 -1
- package/dist/scripts/eval-plugin-skills.d.ts +0 -45
- package/dist/scripts/eval-plugin-skills.js +0 -1589
- package/dist/scripts/eval-plugin-skills.js.map +0 -1
- package/dist/scripts/eval-run-layout.d.ts +0 -17
- package/dist/scripts/eval-run-layout.js +0 -26
- package/dist/scripts/eval-run-layout.js.map +0 -1
- package/dist/scripts/plugin-eval-contract.d.ts +0 -189
- package/dist/scripts/plugin-eval-contract.js +0 -745
- package/dist/scripts/plugin-eval-contract.js.map +0 -1
- package/dist/scripts/plugin-eval-materializer.d.ts +0 -13
- package/dist/scripts/plugin-eval-materializer.js +0 -421
- package/dist/scripts/plugin-eval-materializer.js.map +0 -1
- package/dist/scripts/skill-reporting.d.ts +0 -212
- package/dist/scripts/skill-reporting.js +0 -922
- package/dist/scripts/skill-reporting.js.map +0 -1
- package/dist/src/commands/catalog-context.d.ts +0 -52
- package/dist/src/commands/catalog-context.js +0 -156
- package/dist/src/commands/catalog-context.js.map +0 -1
- package/dist/src/commands/review-publication.d.ts +0 -99
- package/dist/src/commands/review-publication.js +0 -904
- package/dist/src/commands/review-publication.js.map +0 -1
- package/dist/src/commands/status-v5.d.ts +0 -169
- package/dist/src/commands/status-v5.js +0 -1135
- package/dist/src/commands/status-v5.js.map +0 -1
- package/dist/src/portable/skills-cli.d.ts +0 -43
- package/dist/src/portable/skills-cli.js +0 -148
- package/dist/src/portable/skills-cli.js.map +0 -1
- package/dist/src/utils/catalog-manifest-v5.d.ts +0 -5
- package/dist/src/utils/catalog-manifest-v5.js.map +0 -1
- package/dist/src/utils/catalog-source-cache.d.ts +0 -62
- package/dist/src/utils/catalog-source-cache.js +0 -321
- package/dist/src/utils/catalog-source-cache.js.map +0 -1
- package/dist/src/utils/codex-project-surface.d.ts +0 -3
- package/dist/src/utils/codex-project-surface.js +0 -49
- package/dist/src/utils/codex-project-surface.js.map +0 -1
- package/dist/src/utils/lifecycle-active-store.d.ts +0 -147
- package/dist/src/utils/lifecycle-active-store.js +0 -1064
- package/dist/src/utils/lifecycle-active-store.js.map +0 -1
- package/dist/src/utils/plugin-release.d.ts +0 -2
- package/dist/src/utils/plugin-release.js +0 -2
- package/dist/src/utils/plugin-release.js.map +0 -1
- package/dist/src/utils/slash-commands.d.ts +0 -1
- package/dist/src/utils/slash-commands.js +0 -2
- package/dist/src/utils/slash-commands.js.map +0 -1
|
@@ -1,1589 +0,0 @@
|
|
|
1
|
-
import { execFile } from 'node:child_process';
|
|
2
|
-
import { randomUUID } from 'node:crypto';
|
|
3
|
-
import { promisify } from 'node:util';
|
|
4
|
-
import { fileURLToPath } from 'node:url';
|
|
5
|
-
import path from 'node:path';
|
|
6
|
-
import { runProviderProcess, } from '@lesliechan721/agent-skill-eval';
|
|
7
|
-
import fs from 'fs-extra';
|
|
8
|
-
import { readPluginManifest } from '../src/utils/manifest.js';
|
|
9
|
-
import { resolveCliPackageRoot } from '../src/utils/paths.js';
|
|
10
|
-
import { runCodexConversationSuite } from './codex-eval-app-server.js';
|
|
11
|
-
import { assertCodexEvalKeychainWrapperAbsent } from './codex-eval-isolation.js';
|
|
12
|
-
import { resolveCodexEvalProcessManagement } from './codex-eval-process-management.js';
|
|
13
|
-
import { CODEX_EVAL_PROCESS_TREE_ID_ENV, createPosixProcessTreeMonitor, PROCESS_TREE_CLEANUP_UNCONFIRMED_PREFIX, processTreeCleanupIsUnconfirmed, scrubProcessTreeId, terminatePosixProcessTree, terminateWindowsProcessTree, } from './codex-eval-process-tree.js';
|
|
14
|
-
import { assertCodexEvalCanStartWork, createCodexEvalRuntimeCapsule, redactCodexEvalText, redactCodexEvalValue, registerCodexEvalSignalCleanup, resolveCodexEvalRuntimeConfig, } from './codex-eval-runtime-config.js';
|
|
15
|
-
import { runCodexTriggerSuite } from './codex-trigger-eval.js';
|
|
16
|
-
import { combinePluginEvalOutcome, PLUGIN_EVAL_SCHEMA_VERSION, readPluginEvalManifest, readPluginEvalTriggerCases, resolvePluginSkillAuthorRoot, validatePluginEvalConversationCaseDocument, } from './plugin-eval-contract.js';
|
|
17
|
-
import { createPluginEvalRunLayout, writeEvalRunJson, } from './eval-run-layout.js';
|
|
18
|
-
import { materializePluginEvalSubjects, resolveMaterializedSubjectRoot, } from './plugin-eval-materializer.js';
|
|
19
|
-
import { runAwSkillEvalExecutionPlan } from './aw-skill-eval-engine.js';
|
|
20
|
-
import { completeSkillEvalRun, computeAuthorSourceDigest, createSkillEvalTargetKey, createEnvironmentDigest, failSkillEvalRun, pluginReleaseTargets, publishEvalRunCheckpoint, publishEvalRunToBatch, resolveSkillEvalTargetPlan, validateSkillReportTargetSegment, } from './skill-reporting.js';
|
|
21
|
-
const execFileAsync = promisify(execFile);
|
|
22
|
-
const REPO_ROOT_ENV = 'AW_PLUGIN_EVAL_REPO_ROOT';
|
|
23
|
-
const DEFAULT_OBSERVED_PROCESS_EVIDENCE = {
|
|
24
|
-
mode: 'observed',
|
|
25
|
-
inspectionAvailable: true,
|
|
26
|
-
userAcknowledged: false,
|
|
27
|
-
descendantCleanupGuaranteed: false,
|
|
28
|
-
limitation: 'Process-tree inspection observes and cleans known descendants but does not guarantee descendant cleanup.',
|
|
29
|
-
};
|
|
30
|
-
export { terminatePosixProcessTree, terminateWindowsProcessTree };
|
|
31
|
-
function resolveRepoRoot() {
|
|
32
|
-
return path.resolve(resolveCliPackageRoot(), '..', '..');
|
|
33
|
-
}
|
|
34
|
-
function parsePositiveInteger(value, flag) {
|
|
35
|
-
const parsed = Number(value);
|
|
36
|
-
if (!Number.isInteger(parsed) || parsed <= 0) {
|
|
37
|
-
throw new Error(`${flag} requires a positive integer.`);
|
|
38
|
-
}
|
|
39
|
-
return parsed;
|
|
40
|
-
}
|
|
41
|
-
function optionValue(args, index, flag) {
|
|
42
|
-
const value = args[index + 1];
|
|
43
|
-
if (!value || value.startsWith('-')) {
|
|
44
|
-
throw new Error(`${flag} requires a value.`);
|
|
45
|
-
}
|
|
46
|
-
return value;
|
|
47
|
-
}
|
|
48
|
-
function usage() {
|
|
49
|
-
return [
|
|
50
|
-
'Usage: pnpm plugin:eval <plugin> --skill <skill> [OPTIONS]',
|
|
51
|
-
' pnpm plugin:eval --aw-skill-eval-plan <plan.json>',
|
|
52
|
-
'',
|
|
53
|
-
'Options:',
|
|
54
|
-
' --skill <name> Select exactly one Skill (required)',
|
|
55
|
-
' --suite <id> Run one suite',
|
|
56
|
-
' --profile <id> Select one materialization profile',
|
|
57
|
-
' --split <train|validation|sanity|all>',
|
|
58
|
-
' --case <id> Run one case (requires --suite)',
|
|
59
|
-
' --runs <count> Override repetitions per case',
|
|
60
|
-
' --model <model> Parent Codex model (default: gpt-5.6-luna)',
|
|
61
|
-
' --model-provider <id> Override the inherited Codex model provider',
|
|
62
|
-
' --codex-config <path> Read model/provider config from this config.toml',
|
|
63
|
-
' --no-inherit-codex-config Use a clean official Codex provider config',
|
|
64
|
-
' --codex-bin <path> Codex executable (default: codex)',
|
|
65
|
-
' --batch-name <name> Create a named report batch',
|
|
66
|
-
' --batch-id <id> Append to an existing report batch',
|
|
67
|
-
' --run-id <id> Use an explicit unique report run id',
|
|
68
|
-
' --materialize-only Do not start real Codex model sessions',
|
|
69
|
-
' --allow-environment-skips Diagnostic only; release remains incomplete',
|
|
70
|
-
' --allow-unmanaged-processes Confirm eval without descendant process tracking',
|
|
71
|
-
' --aw-skill-eval-plan <path> Run one AwSkillEvalExecutionPlan with aw-skill-eval',
|
|
72
|
-
].join('\n');
|
|
73
|
-
}
|
|
74
|
-
function awSkillEvalExecutionPlanPath(args) {
|
|
75
|
-
const index = args.indexOf('--aw-skill-eval-plan');
|
|
76
|
-
if (index < 0)
|
|
77
|
-
return undefined;
|
|
78
|
-
if (args.length !== 2 || index !== 0 || !args[1] || args[1].startsWith('-')) {
|
|
79
|
-
throw new Error('--aw-skill-eval-plan requires exactly one plan path and no AW suite options.');
|
|
80
|
-
}
|
|
81
|
-
return path.resolve(args[1]);
|
|
82
|
-
}
|
|
83
|
-
function parseArgs(args) {
|
|
84
|
-
const parsed = {
|
|
85
|
-
codexBin: 'codex',
|
|
86
|
-
inheritCodexConfig: true,
|
|
87
|
-
materializeOnly: false,
|
|
88
|
-
allowEnvironmentSkips: false,
|
|
89
|
-
allowUnmanagedProcesses: false,
|
|
90
|
-
};
|
|
91
|
-
const positional = [];
|
|
92
|
-
for (let index = 0; index < args.length; index += 1) {
|
|
93
|
-
const arg = args[index];
|
|
94
|
-
if (arg === '--') {
|
|
95
|
-
continue;
|
|
96
|
-
}
|
|
97
|
-
if (arg === '--materialize-only') {
|
|
98
|
-
parsed.materializeOnly = true;
|
|
99
|
-
continue;
|
|
100
|
-
}
|
|
101
|
-
if (arg === '--allow-environment-skips') {
|
|
102
|
-
parsed.allowEnvironmentSkips = true;
|
|
103
|
-
continue;
|
|
104
|
-
}
|
|
105
|
-
if (arg === '--allow-unmanaged-processes') {
|
|
106
|
-
parsed.allowUnmanagedProcesses = true;
|
|
107
|
-
continue;
|
|
108
|
-
}
|
|
109
|
-
if (arg === '--no-inherit-codex-config') {
|
|
110
|
-
parsed.inheritCodexConfig = false;
|
|
111
|
-
continue;
|
|
112
|
-
}
|
|
113
|
-
if (arg === '-h' || arg === '--help') {
|
|
114
|
-
throw new Error(usage());
|
|
115
|
-
}
|
|
116
|
-
if (arg === '--skill') {
|
|
117
|
-
parsed.skillName = optionValue(args, index, arg);
|
|
118
|
-
index += 1;
|
|
119
|
-
continue;
|
|
120
|
-
}
|
|
121
|
-
if (arg === '--suite') {
|
|
122
|
-
parsed.suite = optionValue(args, index, arg);
|
|
123
|
-
index += 1;
|
|
124
|
-
continue;
|
|
125
|
-
}
|
|
126
|
-
if (arg === '--profile') {
|
|
127
|
-
parsed.profile = optionValue(args, index, arg);
|
|
128
|
-
index += 1;
|
|
129
|
-
continue;
|
|
130
|
-
}
|
|
131
|
-
if (arg === '--split') {
|
|
132
|
-
const value = optionValue(args, index, arg);
|
|
133
|
-
if (!['train', 'validation', 'sanity', 'all'].includes(value)) {
|
|
134
|
-
throw new Error('--split must be train, validation, sanity, or all.');
|
|
135
|
-
}
|
|
136
|
-
parsed.split = value;
|
|
137
|
-
index += 1;
|
|
138
|
-
continue;
|
|
139
|
-
}
|
|
140
|
-
if (arg === '--case') {
|
|
141
|
-
parsed.caseId = optionValue(args, index, arg);
|
|
142
|
-
index += 1;
|
|
143
|
-
continue;
|
|
144
|
-
}
|
|
145
|
-
if (arg === '--runs') {
|
|
146
|
-
parsed.runs = parsePositiveInteger(optionValue(args, index, arg), arg);
|
|
147
|
-
index += 1;
|
|
148
|
-
continue;
|
|
149
|
-
}
|
|
150
|
-
if (arg === '--model') {
|
|
151
|
-
parsed.model = optionValue(args, index, arg);
|
|
152
|
-
index += 1;
|
|
153
|
-
continue;
|
|
154
|
-
}
|
|
155
|
-
if (arg === '--model-provider') {
|
|
156
|
-
parsed.modelProvider = optionValue(args, index, arg);
|
|
157
|
-
index += 1;
|
|
158
|
-
continue;
|
|
159
|
-
}
|
|
160
|
-
if (arg === '--codex-config') {
|
|
161
|
-
parsed.codexConfig = path.resolve(optionValue(args, index, arg));
|
|
162
|
-
index += 1;
|
|
163
|
-
continue;
|
|
164
|
-
}
|
|
165
|
-
if (arg === '--codex-bin') {
|
|
166
|
-
parsed.codexBin = optionValue(args, index, arg);
|
|
167
|
-
index += 1;
|
|
168
|
-
continue;
|
|
169
|
-
}
|
|
170
|
-
if (arg === '--batch-name') {
|
|
171
|
-
parsed.batchName = optionValue(args, index, arg);
|
|
172
|
-
index += 1;
|
|
173
|
-
continue;
|
|
174
|
-
}
|
|
175
|
-
if (arg === '--batch-id') {
|
|
176
|
-
parsed.batchId = optionValue(args, index, arg);
|
|
177
|
-
index += 1;
|
|
178
|
-
continue;
|
|
179
|
-
}
|
|
180
|
-
if (arg === '--run-id') {
|
|
181
|
-
parsed.runId = optionValue(args, index, arg);
|
|
182
|
-
index += 1;
|
|
183
|
-
continue;
|
|
184
|
-
}
|
|
185
|
-
if (arg.startsWith('-')) {
|
|
186
|
-
throw new Error(`Unknown option "${arg}".\n\n${usage()}`);
|
|
187
|
-
}
|
|
188
|
-
positional.push(arg);
|
|
189
|
-
}
|
|
190
|
-
if (positional.length !== 1) {
|
|
191
|
-
throw new Error(usage());
|
|
192
|
-
}
|
|
193
|
-
if (!parsed.skillName) {
|
|
194
|
-
throw new Error('--skill is required.\n\n' + usage());
|
|
195
|
-
}
|
|
196
|
-
if (parsed.caseId && !parsed.suite) {
|
|
197
|
-
throw new Error('--case requires --suite.');
|
|
198
|
-
}
|
|
199
|
-
if (parsed.caseId) {
|
|
200
|
-
validateSkillReportTargetSegment(parsed.caseId, '--case');
|
|
201
|
-
}
|
|
202
|
-
if (!parsed.inheritCodexConfig && (parsed.codexConfig || parsed.modelProvider)) {
|
|
203
|
-
throw new Error('--no-inherit-codex-config cannot be combined with --codex-config or --model-provider.');
|
|
204
|
-
}
|
|
205
|
-
if (parsed.materializeOnly &&
|
|
206
|
-
(parsed.suite !== undefined ||
|
|
207
|
-
parsed.split !== undefined ||
|
|
208
|
-
parsed.caseId !== undefined ||
|
|
209
|
-
parsed.runs !== undefined ||
|
|
210
|
-
parsed.model !== undefined ||
|
|
211
|
-
parsed.modelProvider !== undefined ||
|
|
212
|
-
parsed.codexConfig !== undefined ||
|
|
213
|
-
parsed.inheritCodexConfig === false ||
|
|
214
|
-
parsed.allowEnvironmentSkips ||
|
|
215
|
-
parsed.allowUnmanagedProcesses)) {
|
|
216
|
-
throw new Error('--materialize-only supports target/profile selection, not suite model-run flags.');
|
|
217
|
-
}
|
|
218
|
-
parsed.pluginName = positional[0];
|
|
219
|
-
if (parsed.pluginName && !/^[a-z0-9][a-z0-9-]*$/u.test(parsed.pluginName)) {
|
|
220
|
-
throw new Error('Plugin name must use lowercase kebab-case without path separators.');
|
|
221
|
-
}
|
|
222
|
-
if (!/^[a-z0-9][a-z0-9-]*$/u.test(parsed.skillName)) {
|
|
223
|
-
throw new Error('Skill name must use lowercase kebab-case without path separators.');
|
|
224
|
-
}
|
|
225
|
-
return parsed;
|
|
226
|
-
}
|
|
227
|
-
export async function runChild(command, args, options) {
|
|
228
|
-
assertCodexEvalCanStartWork();
|
|
229
|
-
const processTreeId = randomUUID();
|
|
230
|
-
const processManagement = options.processManagement ?? DEFAULT_OBSERVED_PROCESS_EVIDENCE;
|
|
231
|
-
const observed = processManagement.mode === 'managed' || processManagement.mode === 'observed';
|
|
232
|
-
if (!observed && (processManagement.mode !== 'unmanaged-confirmed' ||
|
|
233
|
-
!processManagement.userAcknowledged)) {
|
|
234
|
-
throw new Error('Unmanaged process execution requires explicit user confirmation.');
|
|
235
|
-
}
|
|
236
|
-
const abortController = new AbortController();
|
|
237
|
-
let processTreeMonitor;
|
|
238
|
-
let terminationPromise;
|
|
239
|
-
let cleanupDiagnostics = [];
|
|
240
|
-
let cleanupDiagnostic = '';
|
|
241
|
-
const terminateManagedTree = async () => {
|
|
242
|
-
if (!processTreeMonitor)
|
|
243
|
-
return { confirmed: true };
|
|
244
|
-
terminationPromise ??= processTreeMonitor.terminate().catch((error) => [
|
|
245
|
-
`${PROCESS_TREE_CLEANUP_UNCONFIRMED_PREFIX}: ${error instanceof Error ? error.message : String(error)}`,
|
|
246
|
-
]);
|
|
247
|
-
cleanupDiagnostics = await terminationPromise;
|
|
248
|
-
if (cleanupDiagnostics.length > 0) {
|
|
249
|
-
cleanupDiagnostic = `${cleanupDiagnostics.join('\n')}\n`;
|
|
250
|
-
}
|
|
251
|
-
if (processTreeCleanupIsUnconfirmed(cleanupDiagnostics)) {
|
|
252
|
-
throw new Error(cleanupDiagnostics.join('\n'));
|
|
253
|
-
}
|
|
254
|
-
return { confirmed: true };
|
|
255
|
-
};
|
|
256
|
-
const hooks = observed
|
|
257
|
-
? {
|
|
258
|
-
onSpawn: ({ pid }) => {
|
|
259
|
-
processTreeMonitor = options.createProcessTreeMonitor
|
|
260
|
-
? options.createProcessTreeMonitor(pid, processTreeId)
|
|
261
|
-
: createPosixProcessTreeMonitor(pid, { treeId: processTreeId });
|
|
262
|
-
},
|
|
263
|
-
terminateProcessTree: terminateManagedTree,
|
|
264
|
-
}
|
|
265
|
-
: undefined;
|
|
266
|
-
const unregisterSignalCleanup = registerCodexEvalSignalCleanup(async () => {
|
|
267
|
-
abortController.abort();
|
|
268
|
-
if (observed)
|
|
269
|
-
await terminateManagedTree();
|
|
270
|
-
});
|
|
271
|
-
try {
|
|
272
|
-
const result = await runProviderProcess({
|
|
273
|
-
executable: command,
|
|
274
|
-
args,
|
|
275
|
-
cwd: options.cwd,
|
|
276
|
-
env: observed
|
|
277
|
-
? { ...options.env, [CODEX_EVAL_PROCESS_TREE_ID_ENV]: processTreeId }
|
|
278
|
-
: { ...options.env },
|
|
279
|
-
timeoutMs: options.timeoutMs,
|
|
280
|
-
maxBufferBytes: 20 * 1024 * 1024,
|
|
281
|
-
signal: abortController.signal,
|
|
282
|
-
}, hooks, {
|
|
283
|
-
containment: observed ? 'observed' : 'unmanaged-confirmed',
|
|
284
|
-
});
|
|
285
|
-
let stderr = result.stderr;
|
|
286
|
-
if (result.timedOut) {
|
|
287
|
-
stderr += `${stderr.endsWith('\n') || stderr === '' ? '' : '\n'}` +
|
|
288
|
-
`Suite exceeded central timeout of ${options.timeoutMs}ms.\n`;
|
|
289
|
-
}
|
|
290
|
-
stderr += cleanupDiagnostic;
|
|
291
|
-
const safeStdout = result.stdout.replaceAll(processTreeId, '[process-tree-id]');
|
|
292
|
-
const safeStderr = stderr.replaceAll(processTreeId, '[process-tree-id]');
|
|
293
|
-
if (safeStderr) {
|
|
294
|
-
const rendered = options.redact ? options.redact(safeStderr) : safeStderr;
|
|
295
|
-
options.stderr(rendered.endsWith('\n') ? rendered : `${rendered}\n`);
|
|
296
|
-
}
|
|
297
|
-
return {
|
|
298
|
-
...result,
|
|
299
|
-
exitCode: processTreeCleanupIsUnconfirmed(cleanupDiagnostics) &&
|
|
300
|
-
result.exitCode === 0
|
|
301
|
-
? 1
|
|
302
|
-
: result.exitCode,
|
|
303
|
-
stdout: safeStdout,
|
|
304
|
-
stderr: safeStderr,
|
|
305
|
-
processTreeId,
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
finally {
|
|
309
|
-
unregisterSignalCleanup();
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
function supports(suite, capability) {
|
|
313
|
-
return suite.supports.includes(capability);
|
|
314
|
-
}
|
|
315
|
-
function parseCommandReport(stdout, reportPath, processTreeId) {
|
|
316
|
-
let candidate = stdout.trim();
|
|
317
|
-
if (fs.pathExistsSync(reportPath)) {
|
|
318
|
-
candidate = fs.readFileSync(reportPath, 'utf8').trim();
|
|
319
|
-
}
|
|
320
|
-
candidate = candidate.replaceAll(processTreeId, '[process-tree-id]');
|
|
321
|
-
try {
|
|
322
|
-
const parsed = JSON.parse(candidate);
|
|
323
|
-
if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) {
|
|
324
|
-
return parsed;
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
catch {
|
|
328
|
-
// The caller reports a structured incomplete result below.
|
|
329
|
-
}
|
|
330
|
-
throw new Error('Suite did not produce one JSON report.');
|
|
331
|
-
}
|
|
332
|
-
async function parseCommandCaseResults(report, options) {
|
|
333
|
-
if (!supports(options.suite, 'case'))
|
|
334
|
-
return undefined;
|
|
335
|
-
const expectedIds = options.caseId
|
|
336
|
-
? [options.caseId]
|
|
337
|
-
: await readCommandSuiteCaseIds(options.pluginRoot, options.suite);
|
|
338
|
-
if (!Array.isArray(report.case_results)) {
|
|
339
|
-
throw new Error('Case-capable command suite must return case_results.');
|
|
340
|
-
}
|
|
341
|
-
const results = report.case_results.map((value, index) => {
|
|
342
|
-
if (!value || typeof value !== 'object' || Array.isArray(value)) {
|
|
343
|
-
throw new Error(`case_results[${index}] must be an object.`);
|
|
344
|
-
}
|
|
345
|
-
const row = value;
|
|
346
|
-
if (typeof row.id !== 'string' || !/^[a-z0-9_]+$/u.test(row.id)) {
|
|
347
|
-
throw new Error(`case_results[${index}].id must use lowercase snake_case.`);
|
|
348
|
-
}
|
|
349
|
-
if (!['passed', 'failed', 'needs_review', 'incomplete'].includes(String(row.outcome))) {
|
|
350
|
-
throw new Error(`case_results[${index}].outcome is invalid.`);
|
|
351
|
-
}
|
|
352
|
-
if (typeof row.complete !== 'boolean' || typeof row.mechanical_passed !== 'boolean') {
|
|
353
|
-
throw new Error(`case_results[${index}] must declare complete and mechanical_passed.`);
|
|
354
|
-
}
|
|
355
|
-
const summary = row.summary;
|
|
356
|
-
const diagnostics = row.diagnostics;
|
|
357
|
-
if (summary !== undefined && (!summary || typeof summary !== 'object' || Array.isArray(summary))) {
|
|
358
|
-
throw new Error(`case_results[${index}].summary must be an object.`);
|
|
359
|
-
}
|
|
360
|
-
if (diagnostics !== undefined &&
|
|
361
|
-
(!Array.isArray(diagnostics) || diagnostics.some((entry) => typeof entry !== 'string'))) {
|
|
362
|
-
throw new Error(`case_results[${index}].diagnostics must be a string array.`);
|
|
363
|
-
}
|
|
364
|
-
return {
|
|
365
|
-
id: row.id,
|
|
366
|
-
outcome: row.outcome,
|
|
367
|
-
complete: row.complete,
|
|
368
|
-
mechanicalPassed: row.mechanical_passed,
|
|
369
|
-
...(summary ? { summary: summary } : {}),
|
|
370
|
-
...(diagnostics ? { diagnostics: diagnostics } : {}),
|
|
371
|
-
};
|
|
372
|
-
});
|
|
373
|
-
const actualIds = results.map((result) => result.id).sort();
|
|
374
|
-
if (new Set(actualIds).size !== actualIds.length ||
|
|
375
|
-
JSON.stringify(actualIds) !== JSON.stringify([...expectedIds].sort())) {
|
|
376
|
-
throw new Error(`case_results must cover exactly ${JSON.stringify([...expectedIds].sort())}; ` +
|
|
377
|
-
`received ${JSON.stringify(actualIds)}.`);
|
|
378
|
-
}
|
|
379
|
-
return results;
|
|
380
|
-
}
|
|
381
|
-
async function runCommandSuite(options) {
|
|
382
|
-
const sanitize = (report) => redactCodexEvalValue(report, options.codexRuntime);
|
|
383
|
-
const reportName = [
|
|
384
|
-
options.suite.id,
|
|
385
|
-
options.split,
|
|
386
|
-
options.profile,
|
|
387
|
-
options.parsed.caseId,
|
|
388
|
-
]
|
|
389
|
-
.filter(Boolean)
|
|
390
|
-
.join('-');
|
|
391
|
-
const reportPath = path.join(options.outputRoot, 'reports', `${reportName}.json`);
|
|
392
|
-
const rawReportPath = path.join(options.codexRuntimeHome, 'command-reports', options.pluginName, `${reportName}.json`);
|
|
393
|
-
await fs.ensureDir(path.dirname(reportPath));
|
|
394
|
-
await fs.ensureDir(path.dirname(rawReportPath));
|
|
395
|
-
const commandWorkRoot = path.join(options.workRoot, 'command', reportName);
|
|
396
|
-
await fs.ensureDir(commandWorkRoot);
|
|
397
|
-
const args = [path.resolve(options.pluginRoot, options.suite.entry.replace(/^\.\//u, ''))];
|
|
398
|
-
if (options.split && supports(options.suite, 'split')) {
|
|
399
|
-
args.push('--split', options.split);
|
|
400
|
-
}
|
|
401
|
-
if (supports(options.suite, 'runs')) {
|
|
402
|
-
args.push('--runs', String(options.parsed.runs ?? options.suite.defaultRuns));
|
|
403
|
-
}
|
|
404
|
-
if (options.parsed.caseId && supports(options.suite, 'case')) {
|
|
405
|
-
args.push('--case', options.parsed.caseId);
|
|
406
|
-
}
|
|
407
|
-
if (options.parsed.model && supports(options.suite, 'model')) {
|
|
408
|
-
args.push('--model', options.parsed.model);
|
|
409
|
-
}
|
|
410
|
-
if (options.parsed.codexBin !== 'codex' && supports(options.suite, 'codexBin')) {
|
|
411
|
-
args.push('--codex-bin', options.parsed.codexBin);
|
|
412
|
-
}
|
|
413
|
-
if (supports(options.suite, 'timeout')) {
|
|
414
|
-
args.push('--timeout-ms', String(options.suite.perRunTimeoutMs));
|
|
415
|
-
}
|
|
416
|
-
if (options.parsed.allowEnvironmentSkips &&
|
|
417
|
-
supports(options.suite, 'allowEnvironmentSkips')) {
|
|
418
|
-
args.push('--allow-environment-skips');
|
|
419
|
-
}
|
|
420
|
-
args.push('--output', rawReportPath);
|
|
421
|
-
const result = await runChild(process.execPath, args, {
|
|
422
|
-
cwd: options.subjectRoot,
|
|
423
|
-
env: {
|
|
424
|
-
...options.env,
|
|
425
|
-
CODEX_HOME: options.codexRuntimeHome,
|
|
426
|
-
AW_CODEX_EVAL_RUNTIME_HOME: options.codexRuntimeHome,
|
|
427
|
-
AW_CODEX_EVAL_MODEL_PROVIDER: options.codexRuntime.modelProvider,
|
|
428
|
-
AW_CODEX_EVAL_SENSITIVE_ENV_NAMES: JSON.stringify(options.codexRuntime.sensitiveEnvironmentNames),
|
|
429
|
-
AW_PLUGIN_EVAL_PROJECT_ROOT: options.subjectRoot,
|
|
430
|
-
AW_PLUGIN_EVAL_PROFILE: options.profile,
|
|
431
|
-
AW_PLUGIN_EVAL_SKILL: options.parsed.skillName,
|
|
432
|
-
AW_PLUGIN_EVAL_OWNER_SKILL: options.parsed.skillName,
|
|
433
|
-
AW_PLUGIN_EVAL_PARTICIPANT_SKILLS: JSON.stringify(options.suite.skills),
|
|
434
|
-
AW_PLUGIN_EVAL_INSTALLED_PLUGINS: JSON.stringify(options.installedPluginNames),
|
|
435
|
-
AW_PLUGIN_EVAL_WORK_ROOT: commandWorkRoot,
|
|
436
|
-
TMPDIR: commandWorkRoot,
|
|
437
|
-
TEMP: commandWorkRoot,
|
|
438
|
-
TMP: commandWorkRoot,
|
|
439
|
-
},
|
|
440
|
-
stderr: options.stderr,
|
|
441
|
-
redact: (value) => redactCodexEvalText(value, options.codexRuntime),
|
|
442
|
-
timeoutMs: options.timeoutMs ?? options.suite.suiteTimeoutMs,
|
|
443
|
-
processManagement: options.processManagement,
|
|
444
|
-
});
|
|
445
|
-
if (result.timedOut) {
|
|
446
|
-
return sanitize({
|
|
447
|
-
id: options.suite.id,
|
|
448
|
-
kind: 'command',
|
|
449
|
-
skills: options.suite.skills,
|
|
450
|
-
profile: options.profile,
|
|
451
|
-
split: options.split,
|
|
452
|
-
outcome: 'incomplete',
|
|
453
|
-
complete: false,
|
|
454
|
-
mechanicalPassed: false,
|
|
455
|
-
qualitativeReview: 'not_required',
|
|
456
|
-
summary: {},
|
|
457
|
-
diagnostics: [
|
|
458
|
-
`Suite exceeded central timeout of ${options.timeoutMs ?? options.suite.suiteTimeoutMs}ms.`,
|
|
459
|
-
`exitCode=${result.exitCode}, signal=${result.signal}`,
|
|
460
|
-
...(result.stderr.trim() ? [result.stderr.trim()] : []),
|
|
461
|
-
],
|
|
462
|
-
});
|
|
463
|
-
}
|
|
464
|
-
try {
|
|
465
|
-
const report = redactCodexEvalValue(scrubProcessTreeId(parseCommandReport(result.stdout, rawReportPath, result.processTreeId), result.processTreeId), options.codexRuntime);
|
|
466
|
-
const caseResults = await parseCommandCaseResults(report, {
|
|
467
|
-
pluginRoot: options.pluginRoot,
|
|
468
|
-
suite: options.suite,
|
|
469
|
-
caseId: options.parsed.caseId,
|
|
470
|
-
});
|
|
471
|
-
await fs.writeJson(reportPath, report, { spaces: 2 });
|
|
472
|
-
const complete = report.complete !== false &&
|
|
473
|
-
(caseResults === undefined || caseResults.every((entry) => entry.complete));
|
|
474
|
-
const passed = complete && report.passed === true && result.exitCode === 0;
|
|
475
|
-
const outcome = !complete
|
|
476
|
-
? 'incomplete'
|
|
477
|
-
: passed
|
|
478
|
-
? 'passed'
|
|
479
|
-
: 'failed';
|
|
480
|
-
return sanitize({
|
|
481
|
-
id: options.suite.id,
|
|
482
|
-
kind: 'command',
|
|
483
|
-
skills: options.suite.skills,
|
|
484
|
-
profile: options.profile,
|
|
485
|
-
split: options.split,
|
|
486
|
-
outcome,
|
|
487
|
-
complete,
|
|
488
|
-
mechanicalPassed: passed,
|
|
489
|
-
qualitativeReview: 'not_required',
|
|
490
|
-
reportPath: path.relative(options.outputRoot, reportPath).split(path.sep).join('/'),
|
|
491
|
-
...(caseResults ? { caseResults } : {}),
|
|
492
|
-
summary: report.summary && typeof report.summary === 'object'
|
|
493
|
-
? report.summary
|
|
494
|
-
: {},
|
|
495
|
-
diagnostics: [
|
|
496
|
-
...(result.signal ? [`Suite terminated by ${result.signal}.`] : []),
|
|
497
|
-
...(report.environment_error ? [String(report.environment_error)] : []),
|
|
498
|
-
],
|
|
499
|
-
});
|
|
500
|
-
}
|
|
501
|
-
catch (error) {
|
|
502
|
-
return sanitize({
|
|
503
|
-
id: options.suite.id,
|
|
504
|
-
kind: 'command',
|
|
505
|
-
skills: options.suite.skills,
|
|
506
|
-
profile: options.profile,
|
|
507
|
-
split: options.split,
|
|
508
|
-
outcome: 'incomplete',
|
|
509
|
-
complete: false,
|
|
510
|
-
mechanicalPassed: false,
|
|
511
|
-
qualitativeReview: 'not_required',
|
|
512
|
-
summary: {},
|
|
513
|
-
diagnostics: [
|
|
514
|
-
error instanceof Error ? error.message : String(error),
|
|
515
|
-
`exitCode=${result.exitCode}, signal=${result.signal}`,
|
|
516
|
-
...(result.stderr.trim() ? [result.stderr.trim()] : []),
|
|
517
|
-
],
|
|
518
|
-
});
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
function selectedSuites(manifest, parsed) {
|
|
522
|
-
const suites = parsed.suite
|
|
523
|
-
? manifest.suites.filter((suite) => suite.id === parsed.suite)
|
|
524
|
-
: manifest.suites.filter((suite) => suite.requiredForRelease);
|
|
525
|
-
if (suites.length === 0) {
|
|
526
|
-
throw new Error(`Unknown or non-release suite: ${parsed.suite ?? '(none)'}`);
|
|
527
|
-
}
|
|
528
|
-
return suites;
|
|
529
|
-
}
|
|
530
|
-
function collectCoverageDiagnostics(manifest, parsed) {
|
|
531
|
-
const diagnostics = [];
|
|
532
|
-
if (parsed.suite) {
|
|
533
|
-
diagnostics.push('--suite selected a debug subset of release-required suites.');
|
|
534
|
-
}
|
|
535
|
-
if (parsed.profile) {
|
|
536
|
-
diagnostics.push('--profile selected a debug subset of required materialization profiles.');
|
|
537
|
-
}
|
|
538
|
-
if (parsed.split) {
|
|
539
|
-
diagnostics.push('--split selected a debug subset of release-required splits.');
|
|
540
|
-
}
|
|
541
|
-
if (parsed.caseId) {
|
|
542
|
-
diagnostics.push('--case selected a debug subset of suite cases.');
|
|
543
|
-
}
|
|
544
|
-
if (parsed.runs !== undefined) {
|
|
545
|
-
const reducedSuites = selectedSuites(manifest, parsed).filter((suite) => parsed.runs < suite.defaultRuns);
|
|
546
|
-
if (reducedSuites.length > 0) {
|
|
547
|
-
diagnostics.push(`--runs is below the declared default for suites: ${reducedSuites.map((suite) => suite.id).join(', ')}.`);
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
return diagnostics;
|
|
551
|
-
}
|
|
552
|
-
function applyRunCountCoverage(report, suite, parsed) {
|
|
553
|
-
if (parsed.runs === undefined || parsed.runs >= suite.defaultRuns)
|
|
554
|
-
return report;
|
|
555
|
-
return {
|
|
556
|
-
...report,
|
|
557
|
-
outcome: 'incomplete',
|
|
558
|
-
complete: false,
|
|
559
|
-
...(report.caseResults ? {
|
|
560
|
-
caseResults: report.caseResults.map((caseResult) => ({
|
|
561
|
-
...caseResult,
|
|
562
|
-
outcome: 'incomplete',
|
|
563
|
-
complete: false,
|
|
564
|
-
})),
|
|
565
|
-
} : {}),
|
|
566
|
-
diagnostics: [
|
|
567
|
-
...report.diagnostics,
|
|
568
|
-
`Requested runs ${parsed.runs} are below the declared default ${suite.defaultRuns}.`,
|
|
569
|
-
],
|
|
570
|
-
};
|
|
571
|
-
}
|
|
572
|
-
function assertSuiteSupportsRequestedOptions(suite, parsed) {
|
|
573
|
-
if (suite.kind !== 'command') {
|
|
574
|
-
if (suite.kind === 'conversation' && parsed.split) {
|
|
575
|
-
throw new Error(`Conversation suite "${suite.id}" does not support --split.`);
|
|
576
|
-
}
|
|
577
|
-
if (parsed.allowEnvironmentSkips) {
|
|
578
|
-
throw new Error(`${suite.kind === 'trigger' ? 'Trigger' : 'Conversation'} suite ` +
|
|
579
|
-
`"${suite.id}" does not support --allow-environment-skips.`);
|
|
580
|
-
}
|
|
581
|
-
return;
|
|
582
|
-
}
|
|
583
|
-
const requested = [
|
|
584
|
-
['split', parsed.split !== undefined, '--split'],
|
|
585
|
-
['case', parsed.caseId !== undefined, '--case'],
|
|
586
|
-
['runs', parsed.runs !== undefined, '--runs'],
|
|
587
|
-
['model', parsed.model !== undefined, '--model'],
|
|
588
|
-
['codexBin', parsed.codexBin !== 'codex', '--codex-bin'],
|
|
589
|
-
['allowEnvironmentSkips', parsed.allowEnvironmentSkips, '--allow-environment-skips'],
|
|
590
|
-
];
|
|
591
|
-
for (const [capability, enabled, flag] of requested) {
|
|
592
|
-
if (enabled && !supports(suite, capability)) {
|
|
593
|
-
throw new Error(`Suite "${suite.id}" does not support ${flag}.`);
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
function resolveSuiteProfiles(suite, parsed) {
|
|
598
|
-
if (!parsed.profile) {
|
|
599
|
-
return suite.profiles;
|
|
600
|
-
}
|
|
601
|
-
if (!suite.profiles.includes(parsed.profile)) {
|
|
602
|
-
throw new Error(`Suite "${suite.id}" does not support profile "${parsed.profile}".`);
|
|
603
|
-
}
|
|
604
|
-
return [parsed.profile];
|
|
605
|
-
}
|
|
606
|
-
function resolveSuiteSplits(suite, parsed) {
|
|
607
|
-
if (parsed.split) {
|
|
608
|
-
if (suite.kind === 'trigger' || (suite.kind === 'command' && supports(suite, 'split'))) {
|
|
609
|
-
return [parsed.split];
|
|
610
|
-
}
|
|
611
|
-
return [null];
|
|
612
|
-
}
|
|
613
|
-
if (parsed.caseId && suite.kind === 'trigger') {
|
|
614
|
-
return ['all'];
|
|
615
|
-
}
|
|
616
|
-
return suite.releaseSplits.length > 0 ? suite.releaseSplits : [null];
|
|
617
|
-
}
|
|
618
|
-
async function readCommandSuiteCaseIds(pluginRoot, suite) {
|
|
619
|
-
if (!suite.cases)
|
|
620
|
-
return [];
|
|
621
|
-
const document = await fs.readJson(path.resolve(pluginRoot, suite.cases.replace(/^\.\//u, '')));
|
|
622
|
-
return (document.evals ?? []).map((entry) => String(entry.id));
|
|
623
|
-
}
|
|
624
|
-
async function readSuiteCaseIds(options) {
|
|
625
|
-
if (options.suite.kind === 'command') {
|
|
626
|
-
return options.suite.cases
|
|
627
|
-
? readCommandSuiteCaseIds(options.pluginRoot, options.suite)
|
|
628
|
-
: [];
|
|
629
|
-
}
|
|
630
|
-
if (options.suite.kind === 'trigger') {
|
|
631
|
-
const corpus = await readPluginEvalTriggerCases(options.pluginRoot, options.suite);
|
|
632
|
-
return corpus.cases
|
|
633
|
-
.filter((entry) => !options.split || options.split === 'all' || entry.split === options.split)
|
|
634
|
-
.map((entry) => entry.id);
|
|
635
|
-
}
|
|
636
|
-
const casesPath = path.resolve(options.pluginRoot, options.suite.cases.replace(/^\.\//u, ''));
|
|
637
|
-
return validatePluginEvalConversationCaseDocument(await fs.readJson(casesPath), options.manifestSkill, `conversation cases for suite "${options.suite.id}"`, path.dirname(casesPath)).map((entry) => String(entry.id));
|
|
638
|
-
}
|
|
639
|
-
async function releaseTargetCompositions(prepared) {
|
|
640
|
-
const compositions = {};
|
|
641
|
-
for (const suite of prepared.manifest.suites) {
|
|
642
|
-
if (!suite.requiredForRelease || (suite.kind === 'command' && !suite.cases))
|
|
643
|
-
continue;
|
|
644
|
-
for (const profile of suite.profiles) {
|
|
645
|
-
const splits = suite.releaseSplits.length > 0
|
|
646
|
-
? suite.releaseSplits
|
|
647
|
-
: ['all'];
|
|
648
|
-
for (const split of splits) {
|
|
649
|
-
const caseIds = await readSuiteCaseIds({
|
|
650
|
-
pluginRoot: prepared.sourcePlugin.rootDir,
|
|
651
|
-
manifestSkill: prepared.manifest.skill,
|
|
652
|
-
suite,
|
|
653
|
-
split,
|
|
654
|
-
});
|
|
655
|
-
const prefix = `${suite.kind}/${suite.id}/${profile}/${split}`;
|
|
656
|
-
compositions[`${prefix}/all`] = caseIds.map((caseId) => `${prefix}/${caseId}`);
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
return compositions;
|
|
661
|
-
}
|
|
662
|
-
async function preparePluginEval(options) {
|
|
663
|
-
const sourcePlugin = await readPluginManifest(path.join(options.repoRoot, 'plugins', options.pluginName));
|
|
664
|
-
const skillRoot = await resolvePluginSkillAuthorRoot(sourcePlugin.rootDir, options.skillName);
|
|
665
|
-
const manifest = await readPluginEvalManifest(sourcePlugin.rootDir, options.skillName, sourcePlugin.manifest.name);
|
|
666
|
-
const pluginNames = [...new Set(manifest.profiles.flatMap((profile) => profile.plugins.map((plugin) => plugin.name)))];
|
|
667
|
-
const sourcePlugins = [];
|
|
668
|
-
for (const pluginName of pluginNames) {
|
|
669
|
-
const plugin = pluginName === sourcePlugin.manifest.name
|
|
670
|
-
? sourcePlugin
|
|
671
|
-
: await readPluginManifest(path.join(options.repoRoot, 'plugins', pluginName));
|
|
672
|
-
if (plugin.manifest.name !== pluginName) {
|
|
673
|
-
throw new Error(`Eval profile requested plugin "${pluginName}" but repo source declares ` +
|
|
674
|
-
`"${plugin.manifest.name}".`);
|
|
675
|
-
}
|
|
676
|
-
sourcePlugins.push(plugin);
|
|
677
|
-
}
|
|
678
|
-
const skillOwnersByPlugin = new Map();
|
|
679
|
-
for (const plugin of sourcePlugins) {
|
|
680
|
-
const skills = new Set();
|
|
681
|
-
if (plugin.manifest.skills) {
|
|
682
|
-
const staticRoot = path.resolve(plugin.rootDir, plugin.manifest.skills.replace(/^\.\//u, ''));
|
|
683
|
-
if (await fs.pathExists(staticRoot)) {
|
|
684
|
-
for (const entry of await fs.readdir(staticRoot, { withFileTypes: true })) {
|
|
685
|
-
if (entry.isDirectory())
|
|
686
|
-
skills.add(entry.name);
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
for (const target of plugin.manifest.artifacts?.targets ?? []) {
|
|
691
|
-
if (target.target === 'codex.skill' && target.skillKey)
|
|
692
|
-
skills.add(target.skillKey);
|
|
693
|
-
}
|
|
694
|
-
skillOwnersByPlugin.set(plugin.manifest.name, skills);
|
|
695
|
-
}
|
|
696
|
-
for (const profile of manifest.profiles) {
|
|
697
|
-
const owners = new Map();
|
|
698
|
-
for (const installation of profile.plugins) {
|
|
699
|
-
for (const skill of skillOwnersByPlugin.get(installation.name) ?? []) {
|
|
700
|
-
const existing = owners.get(skill);
|
|
701
|
-
if (existing && existing !== installation.name) {
|
|
702
|
-
throw new Error(`Profile "${profile.id}" installs duplicate Codex Skill key "${skill}" ` +
|
|
703
|
-
`from plugins "${existing}" and "${installation.name}".`);
|
|
704
|
-
}
|
|
705
|
-
owners.set(skill, installation.name);
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
for (const suite of manifest.suites.filter((suite) => suite.profiles.includes(profile.id))) {
|
|
709
|
-
for (const skill of suite.skills) {
|
|
710
|
-
if (!owners.has(skill)) {
|
|
711
|
-
throw new Error(`Suite "${suite.id}" requires Skill "${skill}", but profile ` +
|
|
712
|
-
`"${profile.id}" does not install a plugin that declares it.`);
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
if (options.parsed.profile &&
|
|
718
|
-
!manifest.profiles.some((profile) => profile.id === options.parsed.profile)) {
|
|
719
|
-
throw new Error(`Unknown profile "${options.parsed.profile}".`);
|
|
720
|
-
}
|
|
721
|
-
if (options.parsed.materializeOnly) {
|
|
722
|
-
return { sourcePlugin, sourcePlugins, skillRoot, manifest };
|
|
723
|
-
}
|
|
724
|
-
for (const suite of selectedSuites(manifest, options.parsed)) {
|
|
725
|
-
assertSuiteSupportsRequestedOptions(suite, options.parsed);
|
|
726
|
-
resolveSuiteProfiles(suite, options.parsed);
|
|
727
|
-
const splits = resolveSuiteSplits(suite, options.parsed);
|
|
728
|
-
if (!options.parsed.caseId)
|
|
729
|
-
continue;
|
|
730
|
-
if (suite.kind === 'trigger') {
|
|
731
|
-
const corpus = await readPluginEvalTriggerCases(sourcePlugin.rootDir, suite);
|
|
732
|
-
const matchingSplit = splits[0];
|
|
733
|
-
const match = corpus.cases.some((entry) => entry.id === options.parsed.caseId &&
|
|
734
|
-
(matchingSplit === null || matchingSplit === 'all' || entry.split === matchingSplit));
|
|
735
|
-
if (!match) {
|
|
736
|
-
throw new Error(`Unknown trigger case: ${options.parsed.caseId}`);
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
else if (suite.kind === 'conversation') {
|
|
740
|
-
const casesPath = path.resolve(sourcePlugin.rootDir, suite.cases.replace(/^\.\//u, ''));
|
|
741
|
-
const cases = validatePluginEvalConversationCaseDocument(await fs.readJson(casesPath), manifest.skill, `conversation cases for suite "${suite.id}"`, path.dirname(casesPath));
|
|
742
|
-
if (!cases.some((entry) => entry.id === options.parsed.caseId)) {
|
|
743
|
-
throw new Error(`Unknown conversation case: ${options.parsed.caseId}`);
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
else if (suite.cases) {
|
|
747
|
-
const caseIds = await readCommandSuiteCaseIds(sourcePlugin.rootDir, suite);
|
|
748
|
-
if (!caseIds.includes(options.parsed.caseId)) {
|
|
749
|
-
throw new Error(`Unknown command case: ${options.parsed.caseId}`);
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
|
-
return { sourcePlugin, sourcePlugins, skillRoot, manifest };
|
|
754
|
-
}
|
|
755
|
-
async function readCodexVersion(codexBin, env) {
|
|
756
|
-
try {
|
|
757
|
-
const result = await execFileAsync(codexBin, ['--version'], {
|
|
758
|
-
env,
|
|
759
|
-
timeout: 10_000,
|
|
760
|
-
encoding: 'utf8',
|
|
761
|
-
});
|
|
762
|
-
return result.stdout.trim() || result.stderr.trim() || null;
|
|
763
|
-
}
|
|
764
|
-
catch {
|
|
765
|
-
return null;
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
function normalizedSuiteReportPath(reportPath, outputRoot) {
|
|
769
|
-
if (!reportPath)
|
|
770
|
-
return undefined;
|
|
771
|
-
const relative = path.isAbsolute(reportPath)
|
|
772
|
-
? path.relative(outputRoot, reportPath)
|
|
773
|
-
: reportPath;
|
|
774
|
-
return relative.split(path.sep).join('/');
|
|
775
|
-
}
|
|
776
|
-
function batchRawReportPath(runId, reportPath) {
|
|
777
|
-
return reportPath
|
|
778
|
-
? path.posix.join('evals', 'runs', runId, 'raw', reportPath)
|
|
779
|
-
: undefined;
|
|
780
|
-
}
|
|
781
|
-
function targetSummaryCaseResult(target) {
|
|
782
|
-
return {
|
|
783
|
-
id: target.case,
|
|
784
|
-
outcome: target.outcome,
|
|
785
|
-
complete: target.complete,
|
|
786
|
-
mechanicalPassed: target.mechanicalPassed,
|
|
787
|
-
qualitativeReview: target.qualitativeReview,
|
|
788
|
-
...(batchRawReportPath(target.runId, target.reportPath)
|
|
789
|
-
? { reportPath: batchRawReportPath(target.runId, target.reportPath) }
|
|
790
|
-
: {}),
|
|
791
|
-
sourceRunId: target.runId,
|
|
792
|
-
reused: true,
|
|
793
|
-
summary: target.summary,
|
|
794
|
-
diagnostics: target.diagnostics,
|
|
795
|
-
};
|
|
796
|
-
}
|
|
797
|
-
function effectiveCaseResultFromReport(caseId, report) {
|
|
798
|
-
const source = report.caseResults?.find((entry) => entry.id === caseId);
|
|
799
|
-
const complete = report.complete && (source?.complete ?? true);
|
|
800
|
-
const outcome = !complete ||
|
|
801
|
-
report.outcome === 'incomplete' || source?.outcome === 'incomplete'
|
|
802
|
-
? 'incomplete'
|
|
803
|
-
: report.outcome === 'failed' || source?.outcome === 'failed'
|
|
804
|
-
? 'failed'
|
|
805
|
-
: report.outcome === 'needs_review' || source?.outcome === 'needs_review'
|
|
806
|
-
? 'needs_review'
|
|
807
|
-
: 'passed';
|
|
808
|
-
return {
|
|
809
|
-
id: caseId,
|
|
810
|
-
outcome,
|
|
811
|
-
complete,
|
|
812
|
-
mechanicalPassed: report.mechanicalPassed && (source?.mechanicalPassed ?? true),
|
|
813
|
-
qualitativeReview: source?.qualitativeReview ?? report.qualitativeReview,
|
|
814
|
-
summary: source?.summary ?? report.summary,
|
|
815
|
-
diagnostics: [...new Set([
|
|
816
|
-
...(source?.diagnostics ?? []),
|
|
817
|
-
...report.diagnostics,
|
|
818
|
-
])],
|
|
819
|
-
};
|
|
820
|
-
}
|
|
821
|
-
async function writeCaseEvidenceIndex(options) {
|
|
822
|
-
const name = [options.suite.id, options.split, options.profile, 'case-index']
|
|
823
|
-
.filter(Boolean)
|
|
824
|
-
.join('-');
|
|
825
|
-
const reportPath = path.join(options.outputRoot, 'reports', `${name}.json`);
|
|
826
|
-
await fs.ensureDir(path.dirname(reportPath));
|
|
827
|
-
const temporary = `${reportPath}.${process.pid}.${randomUUID()}.tmp`;
|
|
828
|
-
await fs.writeJson(temporary, {
|
|
829
|
-
schema_version: 1,
|
|
830
|
-
type: 'eval-case-index',
|
|
831
|
-
generated_at: new Date().toISOString(),
|
|
832
|
-
suite: options.suite.id,
|
|
833
|
-
kind: options.suite.kind,
|
|
834
|
-
profile: options.profile,
|
|
835
|
-
split: options.split ?? 'all',
|
|
836
|
-
cases: options.cases.map((entry) => ({
|
|
837
|
-
id: entry.id,
|
|
838
|
-
outcome: entry.outcome,
|
|
839
|
-
complete: entry.complete,
|
|
840
|
-
mechanical_passed: entry.mechanicalPassed,
|
|
841
|
-
qualitative_review: entry.qualitativeReview ?? 'not_required',
|
|
842
|
-
source_run_id: entry.sourceRunId ?? null,
|
|
843
|
-
reused: entry.reused === true,
|
|
844
|
-
report_path: entry.reportPath ?? null,
|
|
845
|
-
})),
|
|
846
|
-
}, { spaces: 2 });
|
|
847
|
-
await fs.rename(temporary, reportPath);
|
|
848
|
-
return path.relative(options.outputRoot, reportPath).split(path.sep).join('/');
|
|
849
|
-
}
|
|
850
|
-
function aggregateCaseSuiteReport(options) {
|
|
851
|
-
const byId = new Map(options.cases.map((entry) => [entry.id, entry]));
|
|
852
|
-
const ordered = options.expectedCaseIds.flatMap((id) => {
|
|
853
|
-
const entry = byId.get(id);
|
|
854
|
-
return entry ? [entry] : [];
|
|
855
|
-
});
|
|
856
|
-
const missing = options.expectedCaseIds.filter((id) => !byId.has(id));
|
|
857
|
-
const complete = missing.length === 0 && ordered.every((entry) => entry.complete);
|
|
858
|
-
const outcome = !complete || ordered.some((entry) => entry.outcome === 'incomplete')
|
|
859
|
-
? 'incomplete'
|
|
860
|
-
: ordered.some((entry) => entry.outcome === 'failed')
|
|
861
|
-
? 'failed'
|
|
862
|
-
: ordered.some((entry) => entry.outcome === 'needs_review')
|
|
863
|
-
? 'needs_review'
|
|
864
|
-
: 'passed';
|
|
865
|
-
const qualitativeReview = options.suite.kind === 'conversation' || ordered.some((entry) => entry.qualitativeReview === 'required')
|
|
866
|
-
? 'required'
|
|
867
|
-
: 'not_required';
|
|
868
|
-
return {
|
|
869
|
-
id: options.suite.id,
|
|
870
|
-
kind: options.suite.kind,
|
|
871
|
-
skills: options.suite.skills,
|
|
872
|
-
profile: options.profile,
|
|
873
|
-
split: options.split,
|
|
874
|
-
outcome,
|
|
875
|
-
complete,
|
|
876
|
-
mechanicalPassed: ordered.every((entry) => entry.mechanicalPassed),
|
|
877
|
-
qualitativeReview,
|
|
878
|
-
reportPath: options.reportPath,
|
|
879
|
-
caseResults: ordered,
|
|
880
|
-
summary: {
|
|
881
|
-
cases: options.expectedCaseIds.length,
|
|
882
|
-
completed: ordered.filter((entry) => entry.complete).length,
|
|
883
|
-
passed: ordered.filter((entry) => entry.outcome === 'passed').length,
|
|
884
|
-
failed: ordered.filter((entry) => entry.outcome === 'failed').length,
|
|
885
|
-
needsReview: ordered.filter((entry) => entry.outcome === 'needs_review').length,
|
|
886
|
-
incomplete: missing.length + ordered.filter((entry) => !entry.complete).length,
|
|
887
|
-
},
|
|
888
|
-
diagnostics: [
|
|
889
|
-
...(missing.length > 0 ? [`Missing case evidence: ${missing.join(', ')}.`] : []),
|
|
890
|
-
...ordered.flatMap((entry) => entry.diagnostics ?? []),
|
|
891
|
-
],
|
|
892
|
-
};
|
|
893
|
-
}
|
|
894
|
-
function checkpointEvaluation(subjects, report) {
|
|
895
|
-
return {
|
|
896
|
-
generatedAt: new Date().toISOString(),
|
|
897
|
-
outcome: report.outcome,
|
|
898
|
-
complete: report.complete,
|
|
899
|
-
mechanicalPassed: report.mechanicalPassed,
|
|
900
|
-
subjects,
|
|
901
|
-
suites: [report],
|
|
902
|
-
diagnostics: report.diagnostics,
|
|
903
|
-
};
|
|
904
|
-
}
|
|
905
|
-
async function runOnePlugin(options) {
|
|
906
|
-
assertCodexEvalCanStartWork();
|
|
907
|
-
const { sourcePlugin, manifest } = options;
|
|
908
|
-
const outputRoot = options.outputRoot;
|
|
909
|
-
await fs.ensureDir(outputRoot);
|
|
910
|
-
const selectedProfiles = options.parsed.profile
|
|
911
|
-
? new Set([options.parsed.profile])
|
|
912
|
-
: undefined;
|
|
913
|
-
assertCodexEvalCanStartWork();
|
|
914
|
-
const subjects = await materializePluginEvalSubjects({
|
|
915
|
-
plugin: sourcePlugin,
|
|
916
|
-
plugins: options.sourcePlugins,
|
|
917
|
-
manifest,
|
|
918
|
-
outputRoot,
|
|
919
|
-
workRoot: path.join(options.workRoot, 'materialize'),
|
|
920
|
-
env: options.env,
|
|
921
|
-
selectedProfiles,
|
|
922
|
-
});
|
|
923
|
-
const reports = [];
|
|
924
|
-
if (!options.parsed.materializeOnly) {
|
|
925
|
-
if (!options.layout)
|
|
926
|
-
throw new Error('Real model eval requires a report run layout.');
|
|
927
|
-
suiteLoop: for (const suite of selectedSuites(manifest, options.parsed)) {
|
|
928
|
-
assertCodexEvalCanStartWork();
|
|
929
|
-
for (const profile of resolveSuiteProfiles(suite, options.parsed)) {
|
|
930
|
-
const subject = subjects.find((entry) => entry.profile === profile);
|
|
931
|
-
if (!subject) {
|
|
932
|
-
throw new Error(`Profile "${profile}" was not materialized.`);
|
|
933
|
-
}
|
|
934
|
-
const subjectRoot = resolveMaterializedSubjectRoot(outputRoot, subject);
|
|
935
|
-
for (const split of resolveSuiteSplits(suite, options.parsed)) {
|
|
936
|
-
assertCodexEvalCanStartWork();
|
|
937
|
-
options.stderr(`[plugin:eval] ${sourcePlugin.manifest.name}/${suite.id}` +
|
|
938
|
-
`${split ? `/${split}` : ''} (${profile})\n`);
|
|
939
|
-
const declaredCaseIds = await readSuiteCaseIds({
|
|
940
|
-
pluginRoot: sourcePlugin.rootDir,
|
|
941
|
-
manifestSkill: manifest.skill,
|
|
942
|
-
suite,
|
|
943
|
-
split,
|
|
944
|
-
});
|
|
945
|
-
const expectedCaseIds = options.parsed.caseId
|
|
946
|
-
? declaredCaseIds.filter((id) => id === options.parsed.caseId)
|
|
947
|
-
: declaredCaseIds;
|
|
948
|
-
if (declaredCaseIds.length > 0 && expectedCaseIds.length === 0) {
|
|
949
|
-
throw new Error(`Unknown ${suite.kind} case: ${options.parsed.caseId}`);
|
|
950
|
-
}
|
|
951
|
-
if (expectedCaseIds.length > 0) {
|
|
952
|
-
const targets = expectedCaseIds.map((caseId) => createSkillEvalTargetKey([
|
|
953
|
-
suite.kind,
|
|
954
|
-
suite.id,
|
|
955
|
-
profile,
|
|
956
|
-
split ?? 'all',
|
|
957
|
-
caseId,
|
|
958
|
-
]));
|
|
959
|
-
const plan = await resolveSkillEvalTargetPlan({
|
|
960
|
-
layout: options.layout,
|
|
961
|
-
targets,
|
|
962
|
-
});
|
|
963
|
-
const targetByCase = new Map(targets.map((target, index) => [
|
|
964
|
-
expectedCaseIds[index],
|
|
965
|
-
target,
|
|
966
|
-
]));
|
|
967
|
-
const caseResults = plan.reusable.map(targetSummaryCaseResult);
|
|
968
|
-
const pendingCaseIds = expectedCaseIds.filter((caseId) => plan.pending.includes(targetByCase.get(caseId)));
|
|
969
|
-
if (plan.reusable.length > 0) {
|
|
970
|
-
options.stderr(`[plugin:eval] reuse=${plan.reusable.length} pending=${pendingCaseIds.length} ` +
|
|
971
|
-
`suite=${suite.id} profile=${profile} split=${split ?? 'all'}\n`);
|
|
972
|
-
}
|
|
973
|
-
const recordCase = async (caseId, rawReport) => {
|
|
974
|
-
const report = applyRunCountCoverage({
|
|
975
|
-
...rawReport,
|
|
976
|
-
reportPath: normalizedSuiteReportPath(rawReport.reportPath, outputRoot),
|
|
977
|
-
}, suite, options.parsed);
|
|
978
|
-
await publishEvalRunCheckpoint({
|
|
979
|
-
layout: options.layout,
|
|
980
|
-
evaluation: checkpointEvaluation(subjects, report),
|
|
981
|
-
caseId,
|
|
982
|
-
});
|
|
983
|
-
const effective = effectiveCaseResultFromReport(caseId, report);
|
|
984
|
-
caseResults.push({
|
|
985
|
-
...effective,
|
|
986
|
-
...(report.reportPath ? {
|
|
987
|
-
reportPath: batchRawReportPath(options.layout.runId, report.reportPath),
|
|
988
|
-
} : {}),
|
|
989
|
-
sourceRunId: options.layout.runId,
|
|
990
|
-
reused: false,
|
|
991
|
-
});
|
|
992
|
-
return report;
|
|
993
|
-
};
|
|
994
|
-
const recordedCaseCount = caseResults.length;
|
|
995
|
-
let executionReport = null;
|
|
996
|
-
if (pendingCaseIds.length > 0 && suite.kind === 'conversation') {
|
|
997
|
-
const skillPath = path.join(subjectRoot, '.agents', 'skills', suite.skill, 'SKILL.md');
|
|
998
|
-
if (!(await fs.pathExists(skillPath))) {
|
|
999
|
-
throw new Error(`Conversation suite "${suite.id}" could not find materialized skill ` +
|
|
1000
|
-
`"${suite.skill}" in profile "${profile}".`);
|
|
1001
|
-
}
|
|
1002
|
-
const reportPath = path.join(outputRoot, 'reports', `${suite.id}-${profile}.json`);
|
|
1003
|
-
executionReport = await runCodexConversationSuite({
|
|
1004
|
-
suiteId: suite.id,
|
|
1005
|
-
skillName: suite.skill,
|
|
1006
|
-
skillNames: suite.skills,
|
|
1007
|
-
casesPath: path.resolve(sourcePlugin.rootDir, suite.cases.replace(/^\.\//u, '')),
|
|
1008
|
-
subjectRoot,
|
|
1009
|
-
profile,
|
|
1010
|
-
runs: options.parsed.runs ?? suite.defaultRuns,
|
|
1011
|
-
caseIds: pendingCaseIds,
|
|
1012
|
-
codexBin: options.parsed.codexBin,
|
|
1013
|
-
model: options.parsed.model,
|
|
1014
|
-
codexRuntime: options.codexRuntime,
|
|
1015
|
-
timeoutMs: suite.perRunTimeoutMs,
|
|
1016
|
-
isolation: suite.isolation,
|
|
1017
|
-
environmentPathPrepend: suite.environment?.pathPrepend,
|
|
1018
|
-
environmentFixtureRoot: path.join(options.skillRoot, 'evals'),
|
|
1019
|
-
sourceEnv: options.modelEnv,
|
|
1020
|
-
reportPath,
|
|
1021
|
-
processManagement: options.processManagement,
|
|
1022
|
-
forbiddenHostRoots: options.sourcePlugins.map((plugin) => plugin.rootDir),
|
|
1023
|
-
workRoot: path.join(options.workRoot, 'conversation'),
|
|
1024
|
-
stopOnIncomplete: true,
|
|
1025
|
-
onCaseCompleted: async (checkpoint) => {
|
|
1026
|
-
await recordCase(checkpoint.caseId, checkpoint.report);
|
|
1027
|
-
},
|
|
1028
|
-
});
|
|
1029
|
-
}
|
|
1030
|
-
else if (pendingCaseIds.length > 0 && suite.kind === 'trigger') {
|
|
1031
|
-
const triggerSplit = split ?? 'all';
|
|
1032
|
-
const reportPath = path.join(outputRoot, 'reports', `${suite.id}-${triggerSplit}-${profile}.json`);
|
|
1033
|
-
executionReport = await runCodexTriggerSuite({
|
|
1034
|
-
suite,
|
|
1035
|
-
split: triggerSplit,
|
|
1036
|
-
subjectRoot,
|
|
1037
|
-
pluginRoot: sourcePlugin.rootDir,
|
|
1038
|
-
profile,
|
|
1039
|
-
runs: options.parsed.runs ?? suite.defaultRuns,
|
|
1040
|
-
caseIds: pendingCaseIds,
|
|
1041
|
-
codexBin: options.parsed.codexBin,
|
|
1042
|
-
model: options.parsed.model,
|
|
1043
|
-
codexRuntime: options.codexRuntime,
|
|
1044
|
-
sourceEnv: options.modelEnv,
|
|
1045
|
-
reportPath,
|
|
1046
|
-
stderr: options.stderr,
|
|
1047
|
-
processManagement: options.processManagement,
|
|
1048
|
-
workRoot: path.join(options.workRoot, 'trigger'),
|
|
1049
|
-
stopOnIncomplete: true,
|
|
1050
|
-
onCaseCompleted: async (checkpoint) => {
|
|
1051
|
-
await recordCase(checkpoint.caseId, checkpoint.report);
|
|
1052
|
-
},
|
|
1053
|
-
});
|
|
1054
|
-
}
|
|
1055
|
-
else if (pendingCaseIds.length > 0 && suite.kind === 'command') {
|
|
1056
|
-
const deadline = Date.now() + suite.suiteTimeoutMs;
|
|
1057
|
-
for (const caseId of pendingCaseIds) {
|
|
1058
|
-
const remaining = Math.max(1, deadline - Date.now());
|
|
1059
|
-
const rawReport = await runCommandSuite({
|
|
1060
|
-
pluginName: sourcePlugin.manifest.name,
|
|
1061
|
-
suite,
|
|
1062
|
-
split,
|
|
1063
|
-
profile,
|
|
1064
|
-
subjectRoot,
|
|
1065
|
-
pluginRoot: sourcePlugin.rootDir,
|
|
1066
|
-
outputRoot,
|
|
1067
|
-
parsed: { ...options.parsed, caseId },
|
|
1068
|
-
env: options.modelEnv,
|
|
1069
|
-
codexRuntime: options.codexRuntime,
|
|
1070
|
-
codexRuntimeHome: options.codexRuntimeHome,
|
|
1071
|
-
processManagement: options.processManagement,
|
|
1072
|
-
installedPluginNames: subject.installedPlugins.map((plugin) => plugin.name),
|
|
1073
|
-
workRoot: options.workRoot,
|
|
1074
|
-
stderr: options.stderr,
|
|
1075
|
-
timeoutMs: remaining,
|
|
1076
|
-
});
|
|
1077
|
-
executionReport = await recordCase(caseId, rawReport);
|
|
1078
|
-
if (rawReport.outcome === 'incomplete')
|
|
1079
|
-
break;
|
|
1080
|
-
}
|
|
1081
|
-
}
|
|
1082
|
-
if (executionReport?.outcome === 'incomplete' &&
|
|
1083
|
-
caseResults.length === recordedCaseCount) {
|
|
1084
|
-
const report = applyRunCountCoverage({
|
|
1085
|
-
...executionReport,
|
|
1086
|
-
reportPath: normalizedSuiteReportPath(executionReport.reportPath, outputRoot),
|
|
1087
|
-
}, suite, options.parsed);
|
|
1088
|
-
await publishEvalRunCheckpoint({
|
|
1089
|
-
layout: options.layout,
|
|
1090
|
-
evaluation: checkpointEvaluation(subjects, report),
|
|
1091
|
-
});
|
|
1092
|
-
reports.push(report);
|
|
1093
|
-
break suiteLoop;
|
|
1094
|
-
}
|
|
1095
|
-
const indexPath = await writeCaseEvidenceIndex({
|
|
1096
|
-
outputRoot,
|
|
1097
|
-
suite,
|
|
1098
|
-
profile,
|
|
1099
|
-
split,
|
|
1100
|
-
cases: caseResults,
|
|
1101
|
-
});
|
|
1102
|
-
const report = aggregateCaseSuiteReport({
|
|
1103
|
-
suite,
|
|
1104
|
-
profile,
|
|
1105
|
-
split,
|
|
1106
|
-
expectedCaseIds,
|
|
1107
|
-
cases: caseResults,
|
|
1108
|
-
reportPath: indexPath,
|
|
1109
|
-
});
|
|
1110
|
-
reports.push(report);
|
|
1111
|
-
if (report.outcome === 'incomplete')
|
|
1112
|
-
break suiteLoop;
|
|
1113
|
-
continue;
|
|
1114
|
-
}
|
|
1115
|
-
const target = createSkillEvalTargetKey([
|
|
1116
|
-
suite.kind,
|
|
1117
|
-
suite.id,
|
|
1118
|
-
profile,
|
|
1119
|
-
split ?? 'all',
|
|
1120
|
-
'all',
|
|
1121
|
-
]);
|
|
1122
|
-
const plan = await resolveSkillEvalTargetPlan({
|
|
1123
|
-
layout: options.layout,
|
|
1124
|
-
targets: [target],
|
|
1125
|
-
});
|
|
1126
|
-
if (plan.reusable.length > 0) {
|
|
1127
|
-
const reused = plan.reusable[0];
|
|
1128
|
-
const reference = targetSummaryCaseResult(reused);
|
|
1129
|
-
const reportPath = await writeCaseEvidenceIndex({
|
|
1130
|
-
outputRoot,
|
|
1131
|
-
suite,
|
|
1132
|
-
profile,
|
|
1133
|
-
split,
|
|
1134
|
-
cases: [reference],
|
|
1135
|
-
});
|
|
1136
|
-
reports.push({
|
|
1137
|
-
id: suite.id,
|
|
1138
|
-
kind: suite.kind,
|
|
1139
|
-
skills: suite.skills,
|
|
1140
|
-
profile,
|
|
1141
|
-
split,
|
|
1142
|
-
outcome: reused.outcome,
|
|
1143
|
-
complete: reused.complete,
|
|
1144
|
-
mechanicalPassed: reused.mechanicalPassed,
|
|
1145
|
-
qualitativeReview: reused.qualitativeReview,
|
|
1146
|
-
reportPath,
|
|
1147
|
-
summary: { ...reused.summary, reusedFromRun: reused.runId },
|
|
1148
|
-
diagnostics: reused.diagnostics,
|
|
1149
|
-
});
|
|
1150
|
-
continue;
|
|
1151
|
-
}
|
|
1152
|
-
if (suite.kind !== 'command') {
|
|
1153
|
-
throw new Error(`Suite "${suite.id}" did not expose its declared cases.`);
|
|
1154
|
-
}
|
|
1155
|
-
const report = applyRunCountCoverage(await runCommandSuite({
|
|
1156
|
-
pluginName: sourcePlugin.manifest.name,
|
|
1157
|
-
suite,
|
|
1158
|
-
split,
|
|
1159
|
-
profile,
|
|
1160
|
-
subjectRoot,
|
|
1161
|
-
pluginRoot: sourcePlugin.rootDir,
|
|
1162
|
-
outputRoot,
|
|
1163
|
-
parsed: options.parsed,
|
|
1164
|
-
env: options.modelEnv,
|
|
1165
|
-
codexRuntime: options.codexRuntime,
|
|
1166
|
-
codexRuntimeHome: options.codexRuntimeHome,
|
|
1167
|
-
processManagement: options.processManagement,
|
|
1168
|
-
installedPluginNames: subject.installedPlugins.map((plugin) => plugin.name),
|
|
1169
|
-
workRoot: options.workRoot,
|
|
1170
|
-
stderr: options.stderr,
|
|
1171
|
-
}), suite, options.parsed);
|
|
1172
|
-
await publishEvalRunCheckpoint({
|
|
1173
|
-
layout: options.layout,
|
|
1174
|
-
evaluation: checkpointEvaluation(subjects, report),
|
|
1175
|
-
});
|
|
1176
|
-
reports.push(report);
|
|
1177
|
-
if (report.outcome === 'incomplete')
|
|
1178
|
-
break suiteLoop;
|
|
1179
|
-
}
|
|
1180
|
-
}
|
|
1181
|
-
}
|
|
1182
|
-
}
|
|
1183
|
-
const reportOutcome = options.parsed.materializeOnly
|
|
1184
|
-
? 'passed'
|
|
1185
|
-
: combinePluginEvalOutcome(reports);
|
|
1186
|
-
const coverageDiagnostics = collectCoverageDiagnostics(manifest, options.parsed);
|
|
1187
|
-
const coverageComplete = coverageDiagnostics.length === 0;
|
|
1188
|
-
const reportsComplete = options.parsed.materializeOnly ||
|
|
1189
|
-
reports.every((report) => report.complete);
|
|
1190
|
-
const unredactedBundle = {
|
|
1191
|
-
schemaVersion: PLUGIN_EVAL_SCHEMA_VERSION,
|
|
1192
|
-
generatedAt: new Date().toISOString(),
|
|
1193
|
-
plugin: sourcePlugin.manifest.name,
|
|
1194
|
-
skill: manifest.skill,
|
|
1195
|
-
pluginVersion: sourcePlugin.manifest.version,
|
|
1196
|
-
platform: 'codex',
|
|
1197
|
-
codexVersion: options.parsed.materializeOnly
|
|
1198
|
-
? null
|
|
1199
|
-
: await readCodexVersion(options.parsed.codexBin, options.modelEnv),
|
|
1200
|
-
model: options.parsed.model ?? options.codexRuntime?.model ?? null,
|
|
1201
|
-
modelProvider: options.codexRuntime?.modelProvider ?? null,
|
|
1202
|
-
credentialSource: options.codexRuntime?.credentialSource ?? null,
|
|
1203
|
-
codexConfigDigest: options.codexRuntime?.evidenceDigest ?? null,
|
|
1204
|
-
cliCapsule: options.cliCapsule ?? null,
|
|
1205
|
-
processManagement: options.processManagement,
|
|
1206
|
-
outcome: coverageComplete ? reportOutcome : 'incomplete',
|
|
1207
|
-
complete: coverageComplete && reportsComplete,
|
|
1208
|
-
mechanicalPassed: options.parsed.materializeOnly || reports.every((report) => report.mechanicalPassed),
|
|
1209
|
-
subjects,
|
|
1210
|
-
suites: reports,
|
|
1211
|
-
diagnostics: coverageDiagnostics,
|
|
1212
|
-
};
|
|
1213
|
-
const bundle = options.codexRuntime
|
|
1214
|
-
? redactCodexEvalValue(unredactedBundle, options.codexRuntime)
|
|
1215
|
-
: unredactedBundle;
|
|
1216
|
-
await fs.writeJson(path.join(outputRoot, 'evaluation.json'), bundle, { spaces: 2 });
|
|
1217
|
-
return bundle;
|
|
1218
|
-
}
|
|
1219
|
-
export async function readSourceRevision(options) {
|
|
1220
|
-
try {
|
|
1221
|
-
const pluginPaths = options.pluginNames.map((pluginName) => `plugins/${pluginName}`);
|
|
1222
|
-
const reportExclusions = options.pluginNames.map((pluginName) => `:(exclude)plugins/${pluginName}/**/reports/**`);
|
|
1223
|
-
const [head, status] = await Promise.all([
|
|
1224
|
-
execFileAsync('git', ['rev-parse', 'HEAD'], {
|
|
1225
|
-
cwd: options.repoRoot,
|
|
1226
|
-
encoding: 'utf8',
|
|
1227
|
-
}),
|
|
1228
|
-
execFileAsync('git', [
|
|
1229
|
-
'status',
|
|
1230
|
-
'--porcelain=v1',
|
|
1231
|
-
'--',
|
|
1232
|
-
...pluginPaths,
|
|
1233
|
-
'packages/cli/scripts',
|
|
1234
|
-
'packages/cli/src',
|
|
1235
|
-
...reportExclusions,
|
|
1236
|
-
], {
|
|
1237
|
-
cwd: options.repoRoot,
|
|
1238
|
-
encoding: 'utf8',
|
|
1239
|
-
}),
|
|
1240
|
-
]);
|
|
1241
|
-
return {
|
|
1242
|
-
gitHead: head.stdout.trim() || null,
|
|
1243
|
-
inScopeDirty: status.stdout.trim() !== '',
|
|
1244
|
-
};
|
|
1245
|
-
}
|
|
1246
|
-
catch {
|
|
1247
|
-
return { gitHead: null, inScopeDirty: true };
|
|
1248
|
-
}
|
|
1249
|
-
}
|
|
1250
|
-
function publicProcessManagement(value) {
|
|
1251
|
-
return {
|
|
1252
|
-
mode: value.mode,
|
|
1253
|
-
inspectionAvailable: value.inspectionAvailable,
|
|
1254
|
-
userAcknowledged: value.userAcknowledged,
|
|
1255
|
-
descendantCleanupGuaranteed: value.descendantCleanupGuaranteed,
|
|
1256
|
-
...(value.limitation ? { limitation: value.limitation } : {}),
|
|
1257
|
-
};
|
|
1258
|
-
}
|
|
1259
|
-
async function writePublishedEvalReport(options) {
|
|
1260
|
-
const processManagement = publicProcessManagement(options.bundle.processManagement);
|
|
1261
|
-
const summary = {
|
|
1262
|
-
schemaVersion: 1,
|
|
1263
|
-
runId: options.layout.runId,
|
|
1264
|
-
plugin: options.bundle.plugin,
|
|
1265
|
-
skill: options.bundle.skill,
|
|
1266
|
-
generatedAt: options.bundle.generatedAt,
|
|
1267
|
-
outcome: options.bundle.outcome,
|
|
1268
|
-
complete: options.bundle.complete,
|
|
1269
|
-
mechanicalPassed: options.bundle.mechanicalPassed,
|
|
1270
|
-
codexVersion: options.bundle.codexVersion,
|
|
1271
|
-
model: options.bundle.model,
|
|
1272
|
-
modelProvider: options.bundle.modelProvider,
|
|
1273
|
-
codexConfigDigest: options.bundle.codexConfigDigest,
|
|
1274
|
-
cliCapsule: options.bundle.cliCapsule,
|
|
1275
|
-
processManagement,
|
|
1276
|
-
source: options.sourceRevision,
|
|
1277
|
-
subjects: options.bundle.subjects.map((subject) => ({
|
|
1278
|
-
profile: subject.profile,
|
|
1279
|
-
scope: subject.scope,
|
|
1280
|
-
configDigest: subject.configDigest,
|
|
1281
|
-
bundleDigest: subject.bundleDigest,
|
|
1282
|
-
installedPlugins: subject.installedPlugins,
|
|
1283
|
-
artifacts: subject.artifacts.map((artifact) => ({
|
|
1284
|
-
kind: artifact.kind,
|
|
1285
|
-
...(artifact.key ? { key: artifact.key } : {}),
|
|
1286
|
-
contentDigest: artifact.contentDigest,
|
|
1287
|
-
})),
|
|
1288
|
-
})),
|
|
1289
|
-
suites: options.bundle.suites.map((suite) => ({
|
|
1290
|
-
id: suite.id,
|
|
1291
|
-
kind: suite.kind,
|
|
1292
|
-
skills: suite.skills,
|
|
1293
|
-
profile: suite.profile,
|
|
1294
|
-
split: suite.split,
|
|
1295
|
-
outcome: suite.outcome,
|
|
1296
|
-
complete: suite.complete,
|
|
1297
|
-
mechanicalPassed: suite.mechanicalPassed,
|
|
1298
|
-
qualitativeReview: suite.qualitativeReview,
|
|
1299
|
-
caseResults: suite.caseResults,
|
|
1300
|
-
summary: suite.summary,
|
|
1301
|
-
})),
|
|
1302
|
-
diagnostics: options.bundle.diagnostics,
|
|
1303
|
-
};
|
|
1304
|
-
await writeEvalRunJson(options.layout.reportRoot, 'summary.json', summary);
|
|
1305
|
-
const suiteRows = summary.suites.map((suite) => `| ${suite.id} | ${suite.skills.join(', ')} | ${suite.profile} | ${suite.split ?? '-'} | ${suite.outcome} |`);
|
|
1306
|
-
const report = [
|
|
1307
|
-
'# Plugin Skill Eval Report',
|
|
1308
|
-
'',
|
|
1309
|
-
`- Plugin: \`${summary.plugin}\``,
|
|
1310
|
-
`- Skill: \`${summary.skill}\``,
|
|
1311
|
-
`- Run: \`${summary.runId}\``,
|
|
1312
|
-
`- Outcome: \`${summary.outcome}\``,
|
|
1313
|
-
`- Complete: \`${summary.complete}\``,
|
|
1314
|
-
`- Process management: \`${processManagement.mode}\``,
|
|
1315
|
-
'',
|
|
1316
|
-
'| Suite | Skills | Profile | Split | Outcome |',
|
|
1317
|
-
'| --- | --- | --- | --- | --- |',
|
|
1318
|
-
...suiteRows,
|
|
1319
|
-
'',
|
|
1320
|
-
'完整 subject、trace 和 suite 报告保存在同目录的 `raw/`。',
|
|
1321
|
-
'',
|
|
1322
|
-
].join('\n');
|
|
1323
|
-
await fs.writeFile(path.join(options.layout.reportRoot, 'report.md'), report, 'utf8');
|
|
1324
|
-
}
|
|
1325
|
-
export async function runPluginEvals(args, options = {}) {
|
|
1326
|
-
const stdout = options.stdout ?? ((text) => process.stdout.write(text));
|
|
1327
|
-
const stderr = options.stderr ?? ((text) => process.stderr.write(text));
|
|
1328
|
-
if (args.includes('-h') || args.includes('--help')) {
|
|
1329
|
-
stdout(`${usage()}\n`);
|
|
1330
|
-
return 0;
|
|
1331
|
-
}
|
|
1332
|
-
try {
|
|
1333
|
-
const executionPlanPath = awSkillEvalExecutionPlanPath(args);
|
|
1334
|
-
if (executionPlanPath) {
|
|
1335
|
-
const result = await runAwSkillEvalExecutionPlan(executionPlanPath, {
|
|
1336
|
-
sourceEnv: options.env ?? process.env,
|
|
1337
|
-
platform: options.platform,
|
|
1338
|
-
processTree: options.evalProcessTree,
|
|
1339
|
-
});
|
|
1340
|
-
stdout(`${JSON.stringify(result, null, 2)}\n`);
|
|
1341
|
-
return result.requirementsMet ? 0 : 1;
|
|
1342
|
-
}
|
|
1343
|
-
}
|
|
1344
|
-
catch (error) {
|
|
1345
|
-
stderr(`${error instanceof Error ? error.message : String(error)}\n`);
|
|
1346
|
-
return 2;
|
|
1347
|
-
}
|
|
1348
|
-
let parsed;
|
|
1349
|
-
try {
|
|
1350
|
-
parsed = parseArgs(args);
|
|
1351
|
-
}
|
|
1352
|
-
catch (error) {
|
|
1353
|
-
stderr(`${error instanceof Error ? error.message : String(error)}\n`);
|
|
1354
|
-
return 2;
|
|
1355
|
-
}
|
|
1356
|
-
const env = options.env ?? process.env;
|
|
1357
|
-
const repoRoot = path.resolve(options.repoRoot ?? env[REPO_ROOT_ENV] ?? resolveRepoRoot());
|
|
1358
|
-
let prepared;
|
|
1359
|
-
if ((parsed.batchName ? 1 : 0) + (parsed.batchId ? 1 : 0) !== 1) {
|
|
1360
|
-
if (options.createRunLayout && !parsed.batchName && !parsed.batchId) {
|
|
1361
|
-
parsed.batchName = 'test-batch';
|
|
1362
|
-
}
|
|
1363
|
-
else {
|
|
1364
|
-
stderr('Provide exactly one of --batch-name or --batch-id.\n');
|
|
1365
|
-
return 2;
|
|
1366
|
-
}
|
|
1367
|
-
}
|
|
1368
|
-
try {
|
|
1369
|
-
prepared = await preparePluginEval({
|
|
1370
|
-
repoRoot,
|
|
1371
|
-
pluginName: parsed.pluginName,
|
|
1372
|
-
skillName: parsed.skillName,
|
|
1373
|
-
parsed,
|
|
1374
|
-
});
|
|
1375
|
-
}
|
|
1376
|
-
catch (error) {
|
|
1377
|
-
stderr(`${error instanceof Error ? error.message : String(error)}\n`);
|
|
1378
|
-
return 2;
|
|
1379
|
-
}
|
|
1380
|
-
let codexRuntime;
|
|
1381
|
-
let processManagement = {
|
|
1382
|
-
mode: 'not-applicable',
|
|
1383
|
-
inspectionAvailable: false,
|
|
1384
|
-
userAcknowledged: false,
|
|
1385
|
-
descendantCleanupGuaranteed: false,
|
|
1386
|
-
};
|
|
1387
|
-
if (!parsed.materializeOnly) {
|
|
1388
|
-
try {
|
|
1389
|
-
processManagement = await resolveCodexEvalProcessManagement({
|
|
1390
|
-
allowUnmanaged: parsed.allowUnmanagedProcesses,
|
|
1391
|
-
sourceEnv: env,
|
|
1392
|
-
preflight: () => assertCodexEvalKeychainWrapperAbsent({
|
|
1393
|
-
platform: options.platform,
|
|
1394
|
-
readUserKeychainSearchList: options.readUserKeychainSearchList,
|
|
1395
|
-
}),
|
|
1396
|
-
inspect: options.inspectProcessTree,
|
|
1397
|
-
platform: options.platform,
|
|
1398
|
-
});
|
|
1399
|
-
codexRuntime = await resolveCodexEvalRuntimeConfig({
|
|
1400
|
-
sourceEnv: env,
|
|
1401
|
-
inheritUserConfig: parsed.inheritCodexConfig,
|
|
1402
|
-
configPath: parsed.codexConfig,
|
|
1403
|
-
modelOverride: parsed.model,
|
|
1404
|
-
modelProviderOverride: parsed.modelProvider,
|
|
1405
|
-
});
|
|
1406
|
-
}
|
|
1407
|
-
catch (error) {
|
|
1408
|
-
stderr(`${error instanceof Error ? error.message : String(error)}\n`);
|
|
1409
|
-
return 2;
|
|
1410
|
-
}
|
|
1411
|
-
if (processManagement.mode === 'unmanaged-confirmed') {
|
|
1412
|
-
stderr('[plugin:eval] WARNING: unmanaged process cleanup was explicitly confirmed. ' +
|
|
1413
|
-
'No process-tree inspection was used, and this run does not track or verify descendant cleanup. ' +
|
|
1414
|
-
'Timeout and signal cleanup only target the direct child.\n');
|
|
1415
|
-
}
|
|
1416
|
-
}
|
|
1417
|
-
const sourceRevision = await readSourceRevision({
|
|
1418
|
-
repoRoot,
|
|
1419
|
-
pluginNames: prepared.sourcePlugins.map((plugin) => plugin.manifest.name),
|
|
1420
|
-
});
|
|
1421
|
-
const sourceDigest = await computeAuthorSourceDigest(prepared.sourcePlugins.map((plugin) => ({
|
|
1422
|
-
name: plugin.manifest.name,
|
|
1423
|
-
root: plugin.rootDir,
|
|
1424
|
-
})));
|
|
1425
|
-
const environmentDigest = createEnvironmentDigest({
|
|
1426
|
-
nodeVersion: process.version,
|
|
1427
|
-
platform: process.platform,
|
|
1428
|
-
architecture: process.arch,
|
|
1429
|
-
});
|
|
1430
|
-
const harnessRepoRoot = resolveRepoRoot();
|
|
1431
|
-
const harnessDigest = await computeAuthorSourceDigest([
|
|
1432
|
-
{ name: 'packages/cli/scripts', root: path.join(harnessRepoRoot, 'packages', 'cli', 'scripts') },
|
|
1433
|
-
{ name: 'packages/cli/src', root: path.join(harnessRepoRoot, 'packages', 'cli', 'src') },
|
|
1434
|
-
]);
|
|
1435
|
-
const requiredTargets = pluginReleaseTargets(prepared.manifest);
|
|
1436
|
-
const targetCompositions = await releaseTargetCompositions(prepared);
|
|
1437
|
-
let runtimeCapsule;
|
|
1438
|
-
let layout;
|
|
1439
|
-
try {
|
|
1440
|
-
runtimeCapsule = codexRuntime
|
|
1441
|
-
? await createCodexEvalRuntimeCapsule(codexRuntime, env, {
|
|
1442
|
-
cliPackageRoot: resolveCliPackageRoot(),
|
|
1443
|
-
deployCli: options.deployEvalCli,
|
|
1444
|
-
})
|
|
1445
|
-
: undefined;
|
|
1446
|
-
const modelEnvironmentDigest = parsed.materializeOnly ? null : createEnvironmentDigest({
|
|
1447
|
-
model: parsed.model ?? codexRuntime?.model ?? null,
|
|
1448
|
-
modelProvider: codexRuntime?.modelProvider ?? null,
|
|
1449
|
-
codexConfigDigest: codexRuntime?.evidenceDigest ?? null,
|
|
1450
|
-
codexVersion: await readCodexVersion(parsed.codexBin, env),
|
|
1451
|
-
processManagement: publicProcessManagement(processManagement),
|
|
1452
|
-
cliCapsule: runtimeCapsule?.cli ?? null,
|
|
1453
|
-
});
|
|
1454
|
-
layout = await (options.createRunLayout ?? createPluginEvalRunLayout)({
|
|
1455
|
-
repoRoot,
|
|
1456
|
-
plugin: parsed.pluginName,
|
|
1457
|
-
skill: parsed.skillName,
|
|
1458
|
-
batchName: parsed.batchName,
|
|
1459
|
-
batchId: parsed.batchId,
|
|
1460
|
-
runId: parsed.runId,
|
|
1461
|
-
source: {
|
|
1462
|
-
digest: sourceDigest,
|
|
1463
|
-
gitHead: sourceRevision.gitHead,
|
|
1464
|
-
inScopeDirty: sourceRevision.inScopeDirty,
|
|
1465
|
-
},
|
|
1466
|
-
environmentDigest,
|
|
1467
|
-
modelEnvironmentDigest,
|
|
1468
|
-
harnessDigest,
|
|
1469
|
-
requiredTargets,
|
|
1470
|
-
targetCompositions,
|
|
1471
|
-
});
|
|
1472
|
-
}
|
|
1473
|
-
catch (error) {
|
|
1474
|
-
await runtimeCapsule?.cleanup().catch(() => undefined);
|
|
1475
|
-
stderr(`${error instanceof Error ? error.message : String(error)}\n`);
|
|
1476
|
-
return 2;
|
|
1477
|
-
}
|
|
1478
|
-
const startedAt = layout.startedAt;
|
|
1479
|
-
await writeEvalRunJson(layout.reportRoot, 'run.json', {
|
|
1480
|
-
schemaVersion: 1,
|
|
1481
|
-
type: 'plugin-skill-eval',
|
|
1482
|
-
runId: layout.runId,
|
|
1483
|
-
plugin: parsed.pluginName,
|
|
1484
|
-
skill: parsed.skillName,
|
|
1485
|
-
status: 'running',
|
|
1486
|
-
startedAt,
|
|
1487
|
-
pid: layout.pid,
|
|
1488
|
-
host: layout.host,
|
|
1489
|
-
processManagement: publicProcessManagement(processManagement),
|
|
1490
|
-
source: sourceRevision,
|
|
1491
|
-
rawDirectory: 'raw',
|
|
1492
|
-
});
|
|
1493
|
-
stderr(`[plugin:eval] run=${layout.runId} report=${path.relative(repoRoot, layout.reportRoot)}\n`);
|
|
1494
|
-
if (!parsed.materializeOnly) {
|
|
1495
|
-
stderr('[plugin:eval] Model evals can run for tens of minutes or hours. Keep this process ' +
|
|
1496
|
-
'session open and use the longest responsive wait that the tool allows. A wait timeout ' +
|
|
1497
|
-
'is not an eval failure. Do not start separate status-poll commands.\n');
|
|
1498
|
-
}
|
|
1499
|
-
let exitCode = 1;
|
|
1500
|
-
try {
|
|
1501
|
-
assertCodexEvalCanStartWork();
|
|
1502
|
-
const bundle = await runOnePlugin({
|
|
1503
|
-
sourcePlugin: prepared.sourcePlugin,
|
|
1504
|
-
sourcePlugins: prepared.sourcePlugins,
|
|
1505
|
-
skillRoot: prepared.skillRoot,
|
|
1506
|
-
manifest: prepared.manifest,
|
|
1507
|
-
parsed,
|
|
1508
|
-
outputRoot: layout.rawRoot,
|
|
1509
|
-
workRoot: layout.workRoot,
|
|
1510
|
-
processManagement,
|
|
1511
|
-
env,
|
|
1512
|
-
modelEnv: runtimeCapsule?.env ?? env,
|
|
1513
|
-
codexRuntime: runtimeCapsule?.runtime ?? codexRuntime,
|
|
1514
|
-
cliCapsule: runtimeCapsule?.cli ?? null,
|
|
1515
|
-
codexRuntimeHome: runtimeCapsule?.home,
|
|
1516
|
-
layout,
|
|
1517
|
-
stderr,
|
|
1518
|
-
});
|
|
1519
|
-
await runtimeCapsule?.cleanup();
|
|
1520
|
-
runtimeCapsule = undefined;
|
|
1521
|
-
await writePublishedEvalReport({
|
|
1522
|
-
layout,
|
|
1523
|
-
bundle,
|
|
1524
|
-
sourceRevision,
|
|
1525
|
-
});
|
|
1526
|
-
const batchSummary = parsed.materializeOnly
|
|
1527
|
-
? await publishEvalRunToBatch({
|
|
1528
|
-
repoRoot,
|
|
1529
|
-
layout,
|
|
1530
|
-
evaluation: bundle,
|
|
1531
|
-
caseId: parsed.caseId,
|
|
1532
|
-
requiredTargets,
|
|
1533
|
-
})
|
|
1534
|
-
: await completeSkillEvalRun({ layout, evaluation: bundle });
|
|
1535
|
-
stdout(`${JSON.stringify({
|
|
1536
|
-
schemaVersion: PLUGIN_EVAL_SCHEMA_VERSION,
|
|
1537
|
-
batchId: layout.batchId,
|
|
1538
|
-
batchDir: path.relative(repoRoot, layout.batchRoot).split(path.sep).join('/'),
|
|
1539
|
-
batchSummary,
|
|
1540
|
-
runId: layout.runId,
|
|
1541
|
-
reportDir: path.relative(repoRoot, layout.reportRoot).split(path.sep).join('/'),
|
|
1542
|
-
bundle,
|
|
1543
|
-
}, null, 2)}\n`);
|
|
1544
|
-
exitCode = bundle.outcome === 'failed' || bundle.outcome === 'incomplete' ? 1 : 0;
|
|
1545
|
-
}
|
|
1546
|
-
catch (error) {
|
|
1547
|
-
const message = error instanceof Error ? error.stack ?? error.message : String(error);
|
|
1548
|
-
const safeMessage = codexRuntime ? redactCodexEvalText(message, codexRuntime) : message;
|
|
1549
|
-
stderr(`${parsed.pluginName}: ${safeMessage}\n`);
|
|
1550
|
-
await fs.writeFile(path.join(layout.rawRoot, 'error.txt'), `${safeMessage}\n`, 'utf8');
|
|
1551
|
-
try {
|
|
1552
|
-
await failSkillEvalRun({
|
|
1553
|
-
layout,
|
|
1554
|
-
message: safeMessage,
|
|
1555
|
-
});
|
|
1556
|
-
}
|
|
1557
|
-
catch (refreshError) {
|
|
1558
|
-
stderr(`Failed to mark the report run as failed: ${refreshError instanceof Error ? refreshError.message : String(refreshError)}\n`);
|
|
1559
|
-
}
|
|
1560
|
-
exitCode = 1;
|
|
1561
|
-
}
|
|
1562
|
-
finally {
|
|
1563
|
-
try {
|
|
1564
|
-
await runtimeCapsule?.cleanup();
|
|
1565
|
-
}
|
|
1566
|
-
catch (error) {
|
|
1567
|
-
stderr(`Runtime capsule cleanup failed: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
1568
|
-
exitCode = 1;
|
|
1569
|
-
}
|
|
1570
|
-
try {
|
|
1571
|
-
await layout.cleanupWork();
|
|
1572
|
-
}
|
|
1573
|
-
catch (error) {
|
|
1574
|
-
stderr(`Eval work directory cleanup failed: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
1575
|
-
exitCode = 1;
|
|
1576
|
-
}
|
|
1577
|
-
}
|
|
1578
|
-
return exitCode;
|
|
1579
|
-
}
|
|
1580
|
-
const currentEntryPath = fileURLToPath(import.meta.url);
|
|
1581
|
-
if (process.argv[1] && path.resolve(process.argv[1]) === currentEntryPath) {
|
|
1582
|
-
runPluginEvals(process.argv.slice(2)).then((exitCode) => {
|
|
1583
|
-
process.exitCode = exitCode;
|
|
1584
|
-
}).catch((error) => {
|
|
1585
|
-
console.error(error instanceof Error ? error.stack ?? error.message : String(error));
|
|
1586
|
-
process.exitCode = 1;
|
|
1587
|
-
});
|
|
1588
|
-
}
|
|
1589
|
-
//# sourceMappingURL=eval-plugin-skills.js.map
|