niceeval 0.13.3 → 0.13.4-canary.39
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/INDEX.md +5 -5
- package/dist/agents/index.cjs +2 -2
- package/dist/agents/index.cjs.map +1 -1
- package/dist/agents/project.json +6 -0
- package/dist/agents/streaming.cjs.map +1 -1
- package/dist/agents/types.cjs.map +1 -1
- package/dist/agents/types.d.cts +1 -1
- package/dist/agents/types.d.mts +1 -1
- package/dist/agents/types.d.ts +1 -1
- package/dist/analysis/bindings.d.cts +8 -8
- package/dist/analysis/bindings.d.mts +8 -8
- package/dist/analysis/bindings.d.ts +8 -8
- package/dist/analysis/contracts.cjs.map +1 -1
- package/dist/analysis/contracts.d.cts +8 -19
- package/dist/analysis/contracts.d.mts +8 -19
- package/dist/analysis/contracts.d.ts +8 -19
- package/dist/analysis/experiment-groups.cjs +7 -14
- package/dist/analysis/experiment-groups.cjs.map +1 -1
- package/dist/analysis/index.cjs.map +1 -1
- package/dist/analysis/index.d.cts +1 -1
- package/dist/analysis/index.d.mts +1 -1
- package/dist/analysis/index.d.ts +1 -1
- package/dist/cli/application.cjs +4 -13
- package/dist/cli/application.cjs.map +1 -1
- package/dist/cli/application.d.cts +62 -59
- package/dist/cli/application.d.mts +62 -59
- package/dist/cli/application.d.ts +62 -59
- package/dist/cli/application.js +6 -12
- package/dist/cli/bootstrap.cjs +28 -2
- package/dist/cli/bootstrap.cjs.map +1 -1
- package/dist/cli/contribution.cjs +185 -0
- package/dist/cli/contribution.cjs.map +1 -0
- package/dist/cli/contribution.d.cts +55 -0
- package/dist/cli/contribution.d.mts +55 -0
- package/dist/cli/contribution.d.ts +55 -0
- package/dist/cli/contribution.js +20 -0
- package/dist/cli/contribution.js.map +1 -0
- package/dist/cli/node-application.cjs +119 -87
- package/dist/cli/node-application.cjs.map +1 -1
- package/dist/cli/node-application.d.cts +2 -8
- package/dist/cli/node-application.d.mts +2 -8
- package/dist/cli/node-application.d.ts +2 -8
- package/dist/cli/node-application.js +12 -22
- package/dist/cli/program.cjs +87 -2756
- package/dist/cli/program.cjs.map +1 -1
- package/dist/cli/program.d.cts +11 -332
- package/dist/cli/program.d.mts +11 -332
- package/dist/cli/program.d.ts +11 -332
- package/dist/cli/program.js +4 -28
- package/dist/cli.cjs +0 -3
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.d.cts +0 -1
- package/dist/cli.d.mts +0 -1
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +6 -14
- package/dist/define.cjs +1 -1
- package/dist/define.cjs.map +1 -1
- package/dist/docker/cache-administration.cjs +8 -0
- package/dist/docker/cache-administration.cjs.map +1 -0
- package/dist/docker/cache-administration.d.cts +33 -0
- package/dist/docker/cache-administration.d.mts +33 -0
- package/dist/docker/cache-administration.d.ts +33 -0
- package/dist/docker/cache-administration.js +6 -0
- package/dist/docker/cache-administration.js.map +1 -0
- package/dist/docker/cache-live.cjs +27 -0
- package/dist/docker/cache-live.cjs.map +1 -0
- package/dist/docker/cache-live.d.cts +3 -0
- package/dist/docker/cache-live.d.mts +3 -0
- package/dist/docker/cache-live.d.ts +3 -0
- package/dist/docker/cache-live.js +6 -0
- package/dist/docker/cache-live.js.map +1 -0
- package/dist/docker/cli/contribution.cjs +223 -0
- package/dist/docker/cli/contribution.cjs.map +1 -0
- package/dist/docker/cli/contribution.d.cts +48 -0
- package/dist/docker/cli/contribution.d.mts +48 -0
- package/dist/docker/cli/contribution.d.ts +48 -0
- package/dist/docker/cli/contribution.js +8 -0
- package/dist/docker/cli/contribution.js.map +1 -0
- package/dist/eval/cli/contribution.cjs +62 -0
- package/dist/eval/cli/contribution.cjs.map +1 -0
- package/dist/eval/cli/contribution.d.cts +21 -0
- package/dist/eval/cli/contribution.d.mts +21 -0
- package/dist/eval/cli/contribution.d.ts +21 -0
- package/dist/eval/cli/contribution.js +8 -0
- package/dist/eval/cli/contribution.js.map +1 -0
- package/dist/eval/host/index.cjs +23 -0
- package/dist/eval/host/index.cjs.map +1 -0
- package/dist/eval/host/index.d.cts +27 -0
- package/dist/eval/host/index.d.mts +27 -0
- package/dist/eval/host/index.d.ts +27 -0
- package/dist/eval/host/index.js +8 -0
- package/dist/eval/host/index.js.map +1 -0
- package/dist/eval/host/index.mjs +8 -0
- package/dist/eval/host/index.mjs.map +1 -0
- package/dist/experiment/host/cli/contribution.cjs +835 -0
- package/dist/experiment/host/cli/contribution.cjs.map +1 -0
- package/dist/experiment/host/cli/contribution.d.cts +329 -0
- package/dist/experiment/host/cli/contribution.d.mts +329 -0
- package/dist/experiment/host/cli/contribution.d.ts +329 -0
- package/dist/experiment/host/cli/contribution.js +22 -0
- package/dist/experiment/host/cli/contribution.js.map +1 -0
- package/dist/experiment/host/cli/index.cjs +9 -0
- package/dist/experiment/host/cli/index.cjs.map +1 -0
- package/dist/experiment/host/cli/index.d.cts +2 -0
- package/dist/experiment/host/cli/index.d.mts +2 -0
- package/dist/experiment/host/cli/index.d.ts +2 -0
- package/dist/experiment/host/cli/index.js +10 -0
- package/dist/experiment/host/cli/index.js.map +1 -0
- package/dist/experiment/host/cli/terminal.cjs +15 -0
- package/dist/experiment/host/cli/terminal.cjs.map +1 -0
- package/dist/experiment/host/cli/terminal.d.cts +14 -0
- package/dist/experiment/host/cli/terminal.d.mts +14 -0
- package/dist/experiment/host/cli/terminal.d.ts +14 -0
- package/dist/experiment/host/cli/terminal.js +8 -0
- package/dist/experiment/host/cli/terminal.js.map +1 -0
- package/dist/experiment/host/index.cjs +35 -58
- package/dist/experiment/host/index.cjs.map +1 -1
- package/dist/experiment/host/index.d.cts +5 -79
- package/dist/experiment/host/index.d.mts +5 -79
- package/dist/experiment/host/index.d.ts +5 -79
- package/dist/experiment/host/index.js +4 -2
- package/dist/experiment/host/index.mjs +4 -2
- package/dist/experiment/host/operations.cjs +678 -0
- package/dist/experiment/host/operations.cjs.map +1 -0
- package/dist/experiment/host/operations.d.cts +19 -0
- package/dist/experiment/host/operations.d.mts +19 -0
- package/dist/experiment/host/operations.d.ts +19 -0
- package/dist/experiment/host/operations.js +24 -0
- package/dist/experiment/host/operations.js.map +1 -0
- package/dist/experiment/host/presentation.cjs +81 -0
- package/dist/experiment/host/presentation.cjs.map +1 -0
- package/dist/experiment/host/presentation.d.cts +9 -0
- package/dist/experiment/host/presentation.d.mts +9 -0
- package/dist/experiment/host/presentation.d.ts +9 -0
- package/dist/experiment/host/presentation.js +8 -0
- package/dist/experiment/host/presentation.js.map +1 -0
- package/dist/experiment/host/teardown.cjs +394 -0
- package/dist/experiment/host/teardown.cjs.map +1 -0
- package/dist/experiment/host/teardown.d.cts +5 -0
- package/dist/experiment/host/teardown.d.mts +5 -0
- package/dist/experiment/host/teardown.d.ts +5 -0
- package/dist/experiment/host/teardown.js +8 -0
- package/dist/experiment/host/teardown.js.map +1 -0
- package/dist/experiment/host/types.cjs +9 -0
- package/dist/experiment/host/types.cjs.map +1 -0
- package/dist/experiment/host/types.d.cts +423 -0
- package/dist/experiment/host/types.d.mts +423 -0
- package/dist/experiment/host/types.d.ts +423 -0
- package/dist/experiment/host/types.js +6 -0
- package/dist/experiment/host/types.js.map +1 -0
- package/dist/i18n/en.cjs +8 -50
- package/dist/i18n/en.cjs.map +1 -1
- package/dist/i18n/en.d.cts +2 -6
- package/dist/i18n/en.d.mts +2 -6
- package/dist/i18n/en.d.ts +2 -6
- package/dist/o11y/project.json +6 -0
- package/dist/project/cli/contribution.cjs +66 -0
- package/dist/project/cli/contribution.cjs.map +1 -0
- package/dist/project/cli/contribution.d.cts +17 -0
- package/dist/project/cli/contribution.d.mts +17 -0
- package/dist/project/cli/contribution.d.ts +17 -0
- package/dist/project/cli/contribution.js +8 -0
- package/dist/project/cli/contribution.js.map +1 -0
- package/dist/project/cli/index.cjs +7 -0
- package/dist/project/cli/index.cjs.map +1 -0
- package/dist/project/cli/index.d.cts +1 -0
- package/dist/project/cli/index.d.mts +1 -0
- package/dist/project/cli/index.d.ts +1 -0
- package/dist/project/cli/index.js +8 -0
- package/dist/project/cli/index.js.map +1 -0
- package/dist/project/host/index.cjs +11 -0
- package/dist/project/host/index.cjs.map +1 -0
- package/dist/project/host/index.d.cts +4 -0
- package/dist/project/host/index.d.mts +4 -0
- package/dist/project/host/index.d.ts +4 -0
- package/dist/project/host/index.js +14 -0
- package/dist/project/host/index.js.map +1 -0
- package/dist/project/host/index.mjs +14 -0
- package/dist/project/host/index.mjs.map +1 -0
- package/dist/project/host.cjs +59 -0
- package/dist/project/host.cjs.map +1 -0
- package/dist/project/host.d.cts +17 -0
- package/dist/project/host.d.mts +17 -0
- package/dist/project/host.d.ts +17 -0
- package/dist/project/host.js +6 -0
- package/dist/project/host.js.map +1 -0
- package/dist/project/index.cjs +11 -0
- package/dist/project/index.cjs.map +1 -0
- package/dist/project/index.d.cts +4 -0
- package/dist/project/index.d.mts +4 -0
- package/dist/project/index.d.ts +4 -0
- package/dist/project/index.js +14 -0
- package/dist/project/index.js.map +1 -0
- package/dist/project/node.cjs +91 -0
- package/dist/project/node.cjs.map +1 -0
- package/dist/project/node.d.cts +6 -0
- package/dist/project/node.d.mts +6 -0
- package/dist/project/node.d.ts +6 -0
- package/dist/project/node.js +12 -0
- package/dist/project/node.js.map +1 -0
- package/dist/project/services.cjs +17 -0
- package/dist/project/services.cjs.map +1 -0
- package/dist/project/services.d.cts +47 -0
- package/dist/project/services.d.mts +47 -0
- package/dist/project/services.d.ts +47 -0
- package/dist/project/services.js +12 -0
- package/dist/project/services.js.map +1 -0
- package/dist/project/templates.cjs +28 -0
- package/dist/project/templates.cjs.map +1 -0
- package/dist/project/templates.d.cts +4 -0
- package/dist/project/templates.d.mts +4 -0
- package/dist/project/templates.d.ts +4 -0
- package/dist/project/templates.js +12 -0
- package/dist/project/templates.js.map +1 -0
- package/dist/project.json +6 -0
- package/dist/record/family/catalog.d.cts +10 -10
- package/dist/record/family/catalog.d.mts +10 -10
- package/dist/record/family/catalog.d.ts +10 -10
- package/dist/record/family/file-changes.d.cts +8 -8
- package/dist/record/family/file-changes.d.mts +8 -8
- package/dist/record/family/file-changes.d.ts +8 -8
- package/dist/record/host/cli/contribution.cjs +206 -0
- package/dist/record/host/cli/contribution.cjs.map +1 -0
- package/dist/record/host/cli/contribution.d.cts +32 -0
- package/dist/record/host/cli/contribution.d.mts +32 -0
- package/dist/record/host/cli/contribution.d.ts +32 -0
- package/dist/record/host/cli/contribution.js +10 -0
- package/dist/record/host/cli/contribution.js.map +1 -0
- package/dist/record/host/cli/index.cjs +8 -0
- package/dist/record/host/cli/index.cjs.map +1 -0
- package/dist/record/host/cli/index.d.cts +1 -0
- package/dist/record/host/cli/index.d.mts +1 -0
- package/dist/record/host/cli/index.d.ts +1 -0
- package/dist/record/host/cli/index.js +10 -0
- package/dist/record/host/cli/index.js.map +1 -0
- package/dist/record/host/cli/presentation.cjs +122 -0
- package/dist/record/host/cli/presentation.cjs.map +1 -0
- package/dist/record/host/cli/presentation.d.cts +7 -0
- package/dist/record/host/cli/presentation.d.mts +7 -0
- package/dist/record/host/cli/presentation.d.ts +7 -0
- package/dist/record/host/cli/presentation.js +12 -0
- package/dist/record/host/cli/presentation.js.map +1 -0
- package/dist/record/host/index.cjs.map +1 -1
- package/dist/record/host/index.d.cts +1 -1
- package/dist/record/host/index.d.mts +1 -1
- package/dist/record/host/index.d.ts +1 -1
- package/dist/record/host/runtime.cjs +184 -1
- package/dist/record/host/runtime.cjs.map +1 -1
- package/dist/record/host/types.cjs.map +1 -1
- package/dist/record/host/types.d.cts +120 -0
- package/dist/record/host/types.d.mts +120 -0
- package/dist/record/host/types.d.ts +120 -0
- package/dist/record/project.json +6 -0
- package/dist/report/assets/styles.css +80 -0
- package/dist/report/cli/contribution.cjs +325 -0
- package/dist/report/cli/contribution.cjs.map +1 -0
- package/dist/report/cli/contribution.d.cts +143 -0
- package/dist/report/cli/contribution.d.mts +143 -0
- package/dist/report/cli/contribution.d.ts +143 -0
- package/dist/report/cli/contribution.js +12 -0
- package/dist/report/cli/contribution.js.map +1 -0
- package/dist/report/client-dist/app.js +9 -9
- package/dist/report/components/attempt-detail/content.cjs +1 -1
- package/dist/report/components/attempt-detail/content.cjs.map +1 -1
- package/dist/report/components/entity-lists/compute.cjs +5 -0
- package/dist/report/components/entity-lists/compute.cjs.map +1 -1
- package/dist/report/components/entity-lists/compute.d.cts +2 -0
- package/dist/report/components/entity-lists/compute.d.mts +2 -0
- package/dist/report/components/entity-lists/compute.d.ts +2 -0
- package/dist/report/components/entity-lists/content.cjs +35 -12
- package/dist/report/components/entity-lists/content.cjs.map +1 -1
- package/dist/report/components/entity-lists/index.cjs +0 -3
- package/dist/report/components/entity-lists/index.cjs.map +1 -1
- package/dist/report/components/summaries/index.cjs +2 -4
- package/dist/report/components/summaries/index.cjs.map +1 -1
- package/dist/report/definition/cell.cjs +7 -2
- package/dist/report/definition/cell.cjs.map +1 -1
- package/dist/report/definition/cell.d.cts +2 -0
- package/dist/report/definition/cell.d.mts +2 -0
- package/dist/report/definition/cell.d.ts +2 -0
- package/dist/report/definition/primitives/assertion-evidence.cjs +190 -4
- package/dist/report/definition/primitives/assertion-evidence.cjs.map +1 -1
- package/dist/report/definition/primitives/assertion-evidence.d.cts +4 -0
- package/dist/report/definition/primitives/assertion-evidence.d.mts +4 -0
- package/dist/report/definition/primitives/assertion-evidence.d.ts +4 -0
- package/dist/report/execution/machine.cjs +2 -3
- package/dist/report/execution/machine.cjs.map +1 -1
- package/dist/report/execution/machine.d.cts +11 -8
- package/dist/report/execution/machine.d.mts +11 -8
- package/dist/report/execution/machine.d.ts +11 -8
- package/dist/report/host/from-record.cjs +13 -8
- package/dist/report/host/from-record.cjs.map +1 -1
- package/dist/report/host/index.cjs +5 -1
- package/dist/report/host/index.cjs.map +1 -1
- package/dist/report/host/index.d.cts +1 -0
- package/dist/report/host/index.d.mts +1 -0
- package/dist/report/host/index.d.ts +1 -0
- package/dist/report/host/index.js +8 -2
- package/dist/report/host/index.mjs +8 -2
- package/dist/report/host/machine.cjs +23 -22
- package/dist/report/host/machine.cjs.map +1 -1
- package/dist/report/host/machine.d.cts +1 -1
- package/dist/report/host/machine.d.mts +1 -1
- package/dist/report/host/machine.d.ts +1 -1
- package/dist/report/host/node/loader.cjs +4 -2
- package/dist/report/host/node/loader.cjs.map +1 -1
- package/dist/report/host/node/loader.d.cts +3 -1
- package/dist/report/host/node/loader.d.mts +3 -1
- package/dist/report/host/node/loader.d.ts +3 -1
- package/dist/report/host/node.cjs +44 -9
- package/dist/report/host/node.cjs.map +1 -1
- package/dist/report/host/node.d.cts +13 -3
- package/dist/report/host/node.d.mts +13 -3
- package/dist/report/host/node.d.ts +13 -3
- package/dist/report/host/node.js +44 -32
- package/dist/report/host/operations.cjs +14 -0
- package/dist/report/host/operations.cjs.map +1 -0
- package/dist/report/host/operations.d.cts +39 -0
- package/dist/report/host/operations.d.mts +39 -0
- package/dist/report/host/operations.d.ts +39 -0
- package/dist/report/host/operations.js +10 -0
- package/dist/report/host/operations.js.map +1 -0
- package/dist/report/model/chart/plot.cjs +1 -1
- package/dist/report/model/chart/plot.cjs.map +1 -1
- package/dist/report/model/locale.cjs +4 -0
- package/dist/report/model/locale.cjs.map +1 -1
- package/dist/report/model/locale.d.cts +3 -1
- package/dist/report/model/locale.d.mts +3 -1
- package/dist/report/model/locale.d.ts +3 -1
- package/dist/report/react/styles.css +80 -0
- package/dist/runner/build-preparation.cjs +5 -5
- package/dist/runner/build-preparation.cjs.map +1 -1
- package/dist/runner/build-preparation.d.cts +2 -3
- package/dist/runner/build-preparation.d.mts +2 -3
- package/dist/runner/build-preparation.d.ts +2 -3
- package/dist/runner/feedback/coordinator.cjs +18 -15
- package/dist/runner/feedback/coordinator.cjs.map +1 -1
- package/dist/runner/feedback/coordinator.d.cts +6 -0
- package/dist/runner/feedback/coordinator.d.mts +6 -0
- package/dist/runner/feedback/coordinator.d.ts +6 -0
- package/dist/runner/ledger.cjs +3 -13
- package/dist/runner/ledger.cjs.map +1 -1
- package/dist/runner/ledger.d.cts +1 -3
- package/dist/runner/ledger.d.mts +1 -3
- package/dist/runner/ledger.d.ts +1 -3
- package/dist/runner/run.cjs +63 -18
- package/dist/runner/run.cjs.map +1 -1
- package/dist/runner/session.cjs +10 -0
- package/dist/runner/session.cjs.map +1 -1
- package/dist/runner/session.d.cts +25 -0
- package/dist/runner/session.d.mts +25 -0
- package/dist/runner/session.d.ts +25 -0
- package/dist/runner/types.cjs.map +1 -1
- package/dist/runner/types.d.cts +1 -2
- package/dist/runner/types.d.mts +1 -2
- package/dist/runner/types.d.ts +1 -2
- package/dist/sandbox/build-coordinator.cjs +38 -19
- package/dist/sandbox/build-coordinator.cjs.map +1 -1
- package/dist/sandbox/build-coordinator.d.cts +47 -7
- package/dist/sandbox/build-coordinator.d.mts +47 -7
- package/dist/sandbox/build-coordinator.d.ts +47 -7
- package/dist/sandbox/build-coordinator.js +8 -4
- package/dist/sandbox/cli/contribution.cjs +128 -0
- package/dist/sandbox/cli/contribution.cjs.map +1 -0
- package/dist/sandbox/cli/contribution.d.cts +71 -0
- package/dist/sandbox/cli/contribution.d.mts +71 -0
- package/dist/sandbox/cli/contribution.d.ts +71 -0
- package/dist/sandbox/cli/contribution.js +8 -0
- package/dist/sandbox/cli/contribution.js.map +1 -0
- package/dist/sandbox/cli-commands.cjs +14 -21
- package/dist/sandbox/cli-commands.cjs.map +1 -1
- package/dist/sandbox/cli-commands.d.cts +12 -8
- package/dist/sandbox/cli-commands.d.mts +12 -8
- package/dist/sandbox/cli-commands.d.ts +12 -8
- package/dist/sandbox/compose.cjs +22 -2
- package/dist/sandbox/compose.cjs.map +1 -1
- package/dist/sandbox/compose.d.cts +1 -1
- package/dist/sandbox/compose.d.mts +1 -1
- package/dist/sandbox/compose.d.ts +1 -1
- package/dist/sandbox/docker-profile/cli.cjs +13 -9
- package/dist/sandbox/docker-profile/cli.cjs.map +1 -1
- package/dist/sandbox/docker-profile/cli.d.cts +2 -0
- package/dist/sandbox/docker-profile/cli.d.mts +2 -0
- package/dist/sandbox/docker-profile/cli.d.ts +2 -0
- package/dist/sandbox/docker-profile/runtime.cjs +68 -7
- package/dist/sandbox/docker-profile/runtime.cjs.map +1 -1
- package/dist/sandbox/docker-profile/runtime.d.cts +19 -1
- package/dist/sandbox/docker-profile/runtime.d.mts +19 -1
- package/dist/sandbox/docker-profile/runtime.d.ts +19 -1
- package/dist/sandbox/docker-profile/runtime.js +10 -8
- package/dist/sandbox/docker-profile/schema.cjs +68 -19
- package/dist/sandbox/docker-profile/schema.cjs.map +1 -1
- package/dist/sandbox/docker-profile/schema.d.cts +23 -9
- package/dist/sandbox/docker-profile/schema.d.mts +23 -9
- package/dist/sandbox/docker-profile/schema.d.ts +23 -9
- package/dist/sandbox/docker-task-build-cache.cjs +532 -0
- package/dist/sandbox/docker-task-build-cache.cjs.map +1 -0
- package/dist/sandbox/docker-task-build-cache.d.cts +68 -0
- package/dist/sandbox/docker-task-build-cache.d.mts +68 -0
- package/dist/sandbox/docker-task-build-cache.d.ts +68 -0
- package/dist/sandbox/docker-task-build-cache.js +20 -0
- package/dist/sandbox/docker-task-build-cache.js.map +1 -0
- package/dist/sandbox/docker.cjs +50 -0
- package/dist/sandbox/docker.cjs.map +1 -1
- package/dist/sandbox/docker.d.cts +15 -0
- package/dist/sandbox/docker.d.mts +15 -0
- package/dist/sandbox/docker.d.ts +15 -0
- package/dist/sandbox/dockerfile-build.cjs +55 -5
- package/dist/sandbox/dockerfile-build.cjs.map +1 -1
- package/dist/sandbox/dockerfile-build.d.cts +2 -2
- package/dist/sandbox/dockerfile-build.d.mts +2 -2
- package/dist/sandbox/dockerfile-build.d.ts +2 -2
- package/dist/sandbox/index.cjs +5 -3
- package/dist/sandbox/index.cjs.map +1 -1
- package/dist/sandbox/index.d.cts +4 -3
- package/dist/sandbox/index.d.mts +4 -3
- package/dist/sandbox/index.d.ts +4 -3
- package/dist/sandbox/index.js +16 -14
- package/dist/sandbox/index.mjs +16 -14
- package/dist/sandbox/keep.cjs +1 -3
- package/dist/sandbox/keep.cjs.map +1 -1
- package/dist/sandbox/layer.cjs +70 -79
- package/dist/sandbox/layer.cjs.map +1 -1
- package/dist/sandbox/layer.d.cts +6 -12
- package/dist/sandbox/layer.d.mts +6 -12
- package/dist/sandbox/layer.d.ts +6 -12
- package/dist/sandbox/layer.js +16 -18
- package/dist/sandbox/ledger-paths.cjs +4 -18
- package/dist/sandbox/ledger-paths.cjs.map +1 -1
- package/dist/sandbox/ledger-paths.d.cts +3 -13
- package/dist/sandbox/ledger-paths.d.mts +3 -13
- package/dist/sandbox/ledger-paths.d.ts +3 -13
- package/dist/sandbox/ledger-paths.js +4 -8
- package/dist/sandbox/registry.cjs +1 -1
- package/dist/sandbox/registry.cjs.map +1 -1
- package/dist/sandbox/runtime.cjs +27 -37
- package/dist/sandbox/runtime.cjs.map +1 -1
- package/dist/sandbox/runtime.d.cts +1 -2
- package/dist/sandbox/runtime.d.mts +1 -2
- package/dist/sandbox/runtime.d.ts +1 -2
- package/dist/sandbox/runtime.js +6 -8
- package/dist/sandbox/types.cjs.map +1 -1
- package/dist/sandbox/types.d.cts +3 -3
- package/dist/sandbox/types.d.mts +3 -3
- package/dist/sandbox/types.d.ts +3 -3
- package/dist/sources/project.json +6 -0
- package/dist/vendor/remark/remark-gfm.cjs +72 -72
- package/dist/vendor/remark/remark-gfm.cjs.map +1 -1
- package/dist/vendor/remark/remark-parse.cjs +54 -54
- package/dist/vendor/remark/remark-parse.cjs.map +1 -1
- package/dist/vendor/remark/remark.cjs +125 -125
- package/dist/vendor/remark/remark.cjs.map +2 -2
- package/docs-site/zh/README.md +1 -1
- package/docs-site/zh/explanation/assert.mdx +4 -0
- package/docs-site/zh/explanation/judge.mdx +40 -9
- package/docs-site/zh/reference/cli.mdx +67 -43
- package/docs-site/zh/reference/define-agent.mdx +2 -2
- package/docs-site/zh/reference/report-components.mdx +4 -3
- package/docs-site/zh/troubleshooting/debug-sandbox.mdx +6 -0
- package/docs-site/zh/troubleshooting/debugging.mdx +28 -1
- package/docs-site/zh/tutorials/agent-feedback-loop.mdx +4 -2
- package/docs-site/zh/tutorials/concurrency.mdx +2 -2
- package/docs-site/zh/tutorials/custom-reports.mdx +175 -9
- package/docs-site/zh/tutorials/docker-in-docker.mdx +52 -7
- package/docs-site/zh/tutorials/eval-groups.mdx +1 -2
- package/docs-site/zh/tutorials/evaluation-kinds.mdx +39 -6
- package/docs-site/zh/tutorials/nixos-managed-dind.mdx +14 -5
- package/docs-site/zh/tutorials/sandbox-providers.mdx +1 -28
- package/docs-site/zh/tutorials/sandbox-reuse.mdx +1 -1
- package/docs-site/zh/tutorials/viewing-results.mdx +2 -0
- package/package.json +24 -19
- package/README.md +0 -176
- package/README.zh.md +0 -176
- package/dist/cli/record.cjs +0 -246
- package/dist/cli/record.cjs.map +0 -1
- package/dist/cli/record.d.cts +0 -40
- package/dist/cli/record.d.mts +0 -40
- package/dist/cli/record.d.ts +0 -40
- package/dist/cli/record.js +0 -10
- package/dist/cli/record.js.map +0 -1
- package/dist/sandbox/local.cjs +0 -361
- package/dist/sandbox/local.cjs.map +0 -1
- package/dist/sandbox/local.d.cts +0 -80
- package/dist/sandbox/local.d.mts +0 -80
- package/dist/sandbox/local.d.ts +0 -80
- package/dist/sandbox/local.js +0 -6
- package/dist/sandbox/local.js.map +0 -1
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.reportCliContributions = exports.reportViewCliCommand = exports.reportShowCliCommand = exports.REPORT_CLI_OPTIONS = void 0;
|
|
4
|
+
const effect_1 = require("effect");
|
|
5
|
+
const attempt_locator_ts_1 = require("../../attempt-locator.cjs");
|
|
6
|
+
const identifiers_ts_1 = require("../../record/codec/identifiers.cjs");
|
|
7
|
+
const index_ts_1 = require("../../record/index.cjs");
|
|
8
|
+
const runtime_ts_1 = require("../../record/host/runtime.cjs");
|
|
9
|
+
const presentation_ts_1 = require("../../record/host/cli/presentation.cjs");
|
|
10
|
+
const index_ts_2 = require("../../experiment/host/index.cjs");
|
|
11
|
+
const application_ts_1 = require("../../cli/application.cjs");
|
|
12
|
+
const project_configuration_ts_1 = require("../../cli/project-configuration.cjs");
|
|
13
|
+
const contribution_ts_1 = require("../../cli/contribution.cjs");
|
|
14
|
+
const attempt_overview_ts_1 = require("../built-in/attempt-overview.cjs");
|
|
15
|
+
const execution_ts_1 = require("../built-in/execution.cjs");
|
|
16
|
+
const run_membership_overview_ts_1 = require("../built-in/run-membership-overview.cjs");
|
|
17
|
+
const source_ts_1 = require("../built-in/source.cjs");
|
|
18
|
+
const standard_tsx_1 = require("../built-in/standard.cjs");
|
|
19
|
+
const from_record_ts_1 = require("../host/from-record.cjs");
|
|
20
|
+
const index_ts_3 = require("../host/index.cjs");
|
|
21
|
+
const panel_ts_1 = require("../model/panel.cjs");
|
|
22
|
+
const theme_ts_1 = require("../theme.cjs");
|
|
23
|
+
const operations_ts_1 = require("../host/operations.cjs");
|
|
24
|
+
const help = (summary, visibility = "public") => Object.freeze({ summary, visibility });
|
|
25
|
+
const option = (value) => Object.freeze(value);
|
|
26
|
+
exports.REPORT_CLI_OPTIONS = Object.freeze({
|
|
27
|
+
record: option({ type: "string", help: help("Use a specific NiceEval Record root.") }),
|
|
28
|
+
run: option({ type: "string", multiple: true, help: help("Select an exact published Run; repeat to select more than one.") }),
|
|
29
|
+
experiment: option({ type: "string", multiple: true, help: help("Narrow current-project results by Experiment selector.") }),
|
|
30
|
+
report: option({ type: "string", help: help("Use the standard Report or a trusted Report module path.") }),
|
|
31
|
+
theme: option({ type: "string", help: help("Use basalt, chalk, or a trusted Theme module path.") }),
|
|
32
|
+
page: option({ type: "string", help: help("Select the show target or initial view route.") }),
|
|
33
|
+
json: option({ type: "boolean", help: help("Write the show machine document as canonical JSON.") }),
|
|
34
|
+
source: option({ type: "boolean", optionalValue: Object.freeze({ default: true }), help: help("Show an Attempt source snapshot, optionally for one file.") }),
|
|
35
|
+
execution: option({ type: "boolean", help: help("Show retained execution evidence for one Attempt.") }),
|
|
36
|
+
timing: option({ type: "boolean", optionalValue: Object.freeze({ default: "summary", values: Object.freeze(["summary", "full"]) }), help: help("Show summary or full timing evidence for one Attempt.") }),
|
|
37
|
+
grep: option({ type: "string", help: help("Filter execution evidence with a JavaScript regular expression.") }),
|
|
38
|
+
diff: option({ type: "boolean", optionalValue: Object.freeze({ default: true }), help: help("Show the selected Attempt file changes, optionally for one inline path.") }),
|
|
39
|
+
out: option({ type: "string", help: help("Export a complete static Report site.") }),
|
|
40
|
+
host: option({ type: "boolean", optionalValue: Object.freeze({ default: "0.0.0.0", separated: true }), help: help("Listen on an address; bare --host exposes 0.0.0.0.") }),
|
|
41
|
+
port: option({ type: "string", help: help("Listen on this port; defaults to an available port.") }),
|
|
42
|
+
open: option({ type: "boolean", help: help("Open the live Report in a browser.") }),
|
|
43
|
+
"no-open": option({ type: "boolean", help: help("Do not open the live Report in a browser.") }),
|
|
44
|
+
help: option({ type: "boolean", short: "h", help: help("Print help for this Report command.") }),
|
|
45
|
+
});
|
|
46
|
+
const SHOW_HELP = `niceeval show — render one Report target\n\nUsage:\n niceeval show [@<locator>] [--run <id>...] [--experiment <selector>...] [--report <module>] [--page <route>] [--json]\n niceeval show @<locator> (--source[=<file>] | --execution [--grep <regexp>] | --timing[=summary|full] | --diff)\n`;
|
|
47
|
+
const VIEW_HELP = `niceeval view — build a complete Report site\n\nUsage:\n niceeval view [selection] [--report <module>] [--page <route>] [--host <address>] [--port <port>] [--no-open]\n niceeval view [selection] [--report <module>] --out <directory>\n`;
|
|
48
|
+
function failure(command, operation, cause, display) {
|
|
49
|
+
return new contribution_ts_1.CliFeatureError({
|
|
50
|
+
feature: `report ${command}`,
|
|
51
|
+
operation,
|
|
52
|
+
cause,
|
|
53
|
+
exitCode: 1,
|
|
54
|
+
...(display === undefined ? {} : { display }),
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
function write(channel, text) {
|
|
58
|
+
return effect_1.Effect.flatMap(application_ts_1.CliOutput, (output) => channel === "stdout" ? output.writeStdout(text) : output.writeStderr(text));
|
|
59
|
+
}
|
|
60
|
+
function usage(command, message) {
|
|
61
|
+
return write("stderr", `${message.endsWith("\n") ? message : `${message}\n`}`).pipe(effect_1.Effect.mapError((cause) => failure(command, "write usage", cause)), effect_1.Effect.as(1));
|
|
62
|
+
}
|
|
63
|
+
function strings(value) {
|
|
64
|
+
return typeof value === "string" ? [value] : Array.isArray(value) ? value : [];
|
|
65
|
+
}
|
|
66
|
+
function parseRunIds(values) {
|
|
67
|
+
const result = [];
|
|
68
|
+
for (const value of [...new Set(values)]) {
|
|
69
|
+
const decoded = effect_1.Schema.decodeUnknownEither(index_ts_1.RunIdSchema)(value);
|
|
70
|
+
if (effect_1.Either.isLeft(decoded))
|
|
71
|
+
return `Invalid --run value ${JSON.stringify(value)}: expected one exact portable RunId.`;
|
|
72
|
+
result.push(decoded.right);
|
|
73
|
+
}
|
|
74
|
+
return Object.freeze(result);
|
|
75
|
+
}
|
|
76
|
+
function parseExperimentSelectors(values) {
|
|
77
|
+
const result = [];
|
|
78
|
+
for (const value of [...new Set(values)]) {
|
|
79
|
+
const decoded = effect_1.Schema.decodeUnknownEither(identifiers_ts_1.ExperimentIdSchema)(value);
|
|
80
|
+
if (effect_1.Either.isLeft(decoded))
|
|
81
|
+
return `Invalid --experiment value ${JSON.stringify(value)}.`;
|
|
82
|
+
result.push(decoded.right);
|
|
83
|
+
}
|
|
84
|
+
return Object.freeze(result);
|
|
85
|
+
}
|
|
86
|
+
function trusted(path, value) {
|
|
87
|
+
return value.startsWith("./") || value.startsWith("../") || path.isAbsolute(value);
|
|
88
|
+
}
|
|
89
|
+
function parseRequest(command, cwd, positionals, values, path, platform) {
|
|
90
|
+
const rootText = typeof values.record === "string" ? values.record : ".niceeval/record";
|
|
91
|
+
if (rootText.trim() === "")
|
|
92
|
+
return "--record requires an actual Record root directory.";
|
|
93
|
+
const rootPath = path.resolve(cwd, rootText);
|
|
94
|
+
const made = (0, index_ts_1.makeRecordRoot)(rootPath);
|
|
95
|
+
if (effect_1.Either.isLeft(made))
|
|
96
|
+
return `Invalid --record root: ${made.left.code}.`;
|
|
97
|
+
const runs = parseRunIds(strings(values.run));
|
|
98
|
+
if (typeof runs === "string")
|
|
99
|
+
return runs;
|
|
100
|
+
const experiments = parseExperimentSelectors(strings(values.experiment));
|
|
101
|
+
if (typeof experiments === "string")
|
|
102
|
+
return experiments;
|
|
103
|
+
if (runs.length > 0 && experiments.length > 0)
|
|
104
|
+
return "--experiment cannot combine with explicit --run.";
|
|
105
|
+
if (positionals.length > 1)
|
|
106
|
+
return `niceeval ${command} accepts at most one exact Attempt locator.`;
|
|
107
|
+
const reportValue = typeof values.report === "string" ? values.report : undefined;
|
|
108
|
+
let reportSelection = reportValue === undefined ? { kind: "config" } : reportValue === "standard"
|
|
109
|
+
? { kind: "standard" }
|
|
110
|
+
: trusted(path, reportValue) ? { kind: "module", path: platform.resolveModulePath(cwd, reportValue) }
|
|
111
|
+
: { kind: "config" };
|
|
112
|
+
if (reportValue !== undefined && reportValue !== "standard" && !trusted(path, reportValue)) {
|
|
113
|
+
return "--report accepts standard or an explicit trusted module path.";
|
|
114
|
+
}
|
|
115
|
+
const themeValue = typeof values.theme === "string" ? values.theme : undefined;
|
|
116
|
+
const themeSelection = themeValue === undefined ? { kind: "config" } : themeValue === "basalt" || themeValue === "chalk"
|
|
117
|
+
? { kind: "built-in", name: themeValue }
|
|
118
|
+
: trusted(path, themeValue) ? { kind: "module", path: platform.resolveModulePath(cwd, themeValue) }
|
|
119
|
+
: { kind: "config" };
|
|
120
|
+
if (themeValue !== undefined && themeValue !== "basalt" && themeValue !== "chalk" && !trusted(path, themeValue)) {
|
|
121
|
+
return "--theme accepts basalt, chalk, or an explicit trusted module path.";
|
|
122
|
+
}
|
|
123
|
+
const evidence = [values.source !== undefined ? "source" : undefined, values.execution === true ? "execution" : undefined,
|
|
124
|
+
values.timing !== undefined ? "timing" : undefined, values.diff !== undefined ? "diff" : undefined].filter(Boolean);
|
|
125
|
+
if (command === "view" && evidence.length > 0)
|
|
126
|
+
return "niceeval view does not accept evidence slicing options.";
|
|
127
|
+
if (evidence.length > 1)
|
|
128
|
+
return "niceeval show chooses one evidence Report at a time.";
|
|
129
|
+
if (values.grep !== undefined && values.execution !== true)
|
|
130
|
+
return "--grep only combines with --execution.";
|
|
131
|
+
let target;
|
|
132
|
+
if (positionals.length === 1) {
|
|
133
|
+
if (runs.length > 0 || experiments.length > 0)
|
|
134
|
+
return "An Attempt locator cannot combine with --run or --experiment.";
|
|
135
|
+
const parsed = (0, attempt_locator_ts_1.parseAttemptLocator)(positionals[0]);
|
|
136
|
+
if (!parsed.valid)
|
|
137
|
+
return `Invalid Attempt locator ${JSON.stringify(positionals[0])}.`;
|
|
138
|
+
target = { kind: "attempt", locator: parsed.locator };
|
|
139
|
+
if (values.execution === true) {
|
|
140
|
+
if (reportValue !== undefined)
|
|
141
|
+
return "--execution selects its built-in Report; remove --report.";
|
|
142
|
+
if (typeof values.grep === "string") {
|
|
143
|
+
try {
|
|
144
|
+
new RegExp(values.grep);
|
|
145
|
+
}
|
|
146
|
+
catch {
|
|
147
|
+
return `--grep ${JSON.stringify(values.grep)} is not a valid JavaScript regular expression.`;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
reportSelection = { kind: "fixed", report: (0, execution_ts_1.executionEvidenceReport)(typeof values.grep === "string" ? { grep: values.grep } : {}) };
|
|
151
|
+
}
|
|
152
|
+
else if (values.timing !== undefined) {
|
|
153
|
+
if (reportValue !== undefined)
|
|
154
|
+
return "--timing selects its built-in Report; remove --report.";
|
|
155
|
+
reportSelection = { kind: "fixed", report: (0, execution_ts_1.timingEvidenceReport)({ mode: values.timing === "full" ? "full" : "summary" }) };
|
|
156
|
+
}
|
|
157
|
+
else if (values.source !== undefined) {
|
|
158
|
+
if (reportValue !== undefined)
|
|
159
|
+
return "--source selects its built-in Report; remove --report.";
|
|
160
|
+
reportSelection = { kind: "fixed", report: (0, source_ts_1.sourceEvidenceReport)(typeof values.source === "string" ? { file: values.source } : {}) };
|
|
161
|
+
}
|
|
162
|
+
else if (reportValue === undefined)
|
|
163
|
+
reportSelection = { kind: "fixed", report: attempt_overview_ts_1.defaultAttemptOverviewReport };
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
if (evidence.length > 0)
|
|
167
|
+
return "Evidence slicing requires exactly one Attempt locator.";
|
|
168
|
+
if (runs.length > 0) {
|
|
169
|
+
const [first, ...rest] = runs;
|
|
170
|
+
target = { kind: "selection", selection: { policy: "explicit-runs", runIds: [first, ...rest] } };
|
|
171
|
+
if (reportValue === undefined)
|
|
172
|
+
reportSelection = { kind: "fixed", report: run_membership_overview_ts_1.defaultRunMembershipOverviewReport };
|
|
173
|
+
}
|
|
174
|
+
else
|
|
175
|
+
target = { kind: "project-current", ...(experiments.length === 0 ? {} : { experimentSelectors: experiments }) };
|
|
176
|
+
}
|
|
177
|
+
return Object.freeze({ cwd, root: made.right, rootPath, target, reportSelection, themeSelection,
|
|
178
|
+
...(typeof values.page === "string" ? { page: values.page } : {}) });
|
|
179
|
+
}
|
|
180
|
+
function loadInputs(command, request, includeTheme) {
|
|
181
|
+
return effect_1.Effect.gen(function* () {
|
|
182
|
+
const project = yield* project_configuration_ts_1.ProjectConfiguration;
|
|
183
|
+
const platform = yield* operations_ts_1.ReportModulePlatform;
|
|
184
|
+
const path = yield* application_ts_1.CliPath;
|
|
185
|
+
const config = yield* project.rebuild(request.cwd).pipe(effect_1.Effect.mapError((cause) => failure(command, "load project config", cause)));
|
|
186
|
+
const current = request.target.kind === "project-current" ? yield* index_ts_2.experimentHost.resolveProjectCurrentTarget({
|
|
187
|
+
cwd: request.cwd,
|
|
188
|
+
config,
|
|
189
|
+
freshImport: true,
|
|
190
|
+
...(request.target.experimentSelectors === undefined ? {} : { experimentSelectors: request.target.experimentSelectors }),
|
|
191
|
+
}).pipe(effect_1.Effect.mapError((cause) => failure(command, "load current project target", cause))) : undefined;
|
|
192
|
+
const configured = yield* platform.loadConfig(request.cwd, { includeTheme }).pipe(effect_1.Effect.mapError((cause) => failure(command, "load trusted Report config", cause)));
|
|
193
|
+
const reportLoaded = request.reportSelection.kind === "fixed" ? { report: request.reportSelection.report, watchInputs: [] }
|
|
194
|
+
: request.reportSelection.kind === "standard" ? { report: standard_tsx_1.standard, watchInputs: [] }
|
|
195
|
+
: request.reportSelection.kind === "module" ? yield* platform.loadReport(request.reportSelection.path).pipe(effect_1.Effect.mapError((cause) => failure(command, "load trusted Report module", cause)))
|
|
196
|
+
: { report: configured.report ?? standard_tsx_1.standard, watchInputs: [] };
|
|
197
|
+
const themeLoaded = !includeTheme ? undefined : request.themeSelection.kind === "built-in"
|
|
198
|
+
? { theme: request.themeSelection.name === "chalk" ? theme_ts_1.chalk : theme_ts_1.basalt, watchInputs: [] }
|
|
199
|
+
: request.themeSelection.kind === "module" ? yield* platform.loadTheme(request.themeSelection.path).pipe(effect_1.Effect.mapError((cause) => failure(command, "load trusted Theme module", cause)))
|
|
200
|
+
: { theme: configured.theme ?? theme_ts_1.basalt, watchInputs: [] };
|
|
201
|
+
const watchInputs = Object.freeze([...new Set([request.rootPath, ...(current?.watchInputs ?? []), ...configured.watchInputs,
|
|
202
|
+
...reportLoaded.watchInputs, ...(themeLoaded?.watchInputs ?? [])].map((entry) => path.resolve(entry)))].sort());
|
|
203
|
+
const selection = current?.selection;
|
|
204
|
+
return Object.freeze({ report: reportLoaded.report, ...(themeLoaded === undefined ? {} : { theme: themeLoaded.theme }),
|
|
205
|
+
...(selection === undefined ? {} : { selection }), watchInputs });
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
function build(request, inputs) {
|
|
209
|
+
return request.target.kind === "attempt" ? (0, from_record_ts_1.buildReportSiteFromRecord)({ root: request.root, locator: request.target.locator,
|
|
210
|
+
report: inputs.report, theme: inputs.theme }) : (0, from_record_ts_1.buildReportSiteFromRecord)({ root: request.root,
|
|
211
|
+
selection: request.target.kind === "selection" ? request.target.selection : inputs.selection, report: inputs.report, theme: inputs.theme });
|
|
212
|
+
}
|
|
213
|
+
function ensureCurrentRecord(command, request) {
|
|
214
|
+
return runtime_ts_1.recordHost.ensureAutomaticMigration({ root: request.root }).pipe(effect_1.Effect.mapError((cause) => failure(command, "ensure automatic Record migration", cause, (0, presentation_ts_1.renderAutomaticMigrationFailure)(cause))), effect_1.Effect.tap((result) => {
|
|
215
|
+
const notice = (0, presentation_ts_1.renderAutomaticMigrationResult)(result);
|
|
216
|
+
return notice === undefined
|
|
217
|
+
? effect_1.Effect.void
|
|
218
|
+
: write("stderr", notice).pipe(effect_1.Effect.mapError((cause) => failure(command, "write automatic Record migration notice", cause)));
|
|
219
|
+
}));
|
|
220
|
+
}
|
|
221
|
+
function showCommand(argv) {
|
|
222
|
+
return effect_1.Effect.gen(function* () {
|
|
223
|
+
const parser = yield* application_ts_1.CliArguments;
|
|
224
|
+
const parsed = yield* effect_1.Effect.try({ try: () => parser.parse(argv, exports.REPORT_CLI_OPTIONS), catch: (cause) => failure("show", "parse arguments", cause) });
|
|
225
|
+
if (parsed.values.help === true)
|
|
226
|
+
return yield* write("stdout", SHOW_HELP).pipe(effect_1.Effect.mapError((cause) => failure("show", "write help", cause)), effect_1.Effect.as(0));
|
|
227
|
+
const factsService = yield* application_ts_1.CliInvocationFacts;
|
|
228
|
+
const facts = yield* factsService.facts.pipe(effect_1.Effect.mapError((cause) => failure("show", "read invocation facts", cause)));
|
|
229
|
+
const path = yield* application_ts_1.CliPath;
|
|
230
|
+
const platform = yield* operations_ts_1.ReportModulePlatform;
|
|
231
|
+
const request = parseRequest("show", facts.cwd, parsed.positionals, parsed.values, path, platform);
|
|
232
|
+
if (typeof request === "string")
|
|
233
|
+
return yield* usage("show", request);
|
|
234
|
+
if (parsed.values.out !== undefined || parsed.values.host !== undefined || parsed.values.port !== undefined || parsed.values.open !== undefined || parsed.values["no-open"] !== undefined)
|
|
235
|
+
return yield* usage("show", "niceeval show does not accept view server/export options.");
|
|
236
|
+
yield* ensureCurrentRecord("show", request);
|
|
237
|
+
const inputs = yield* loadInputs("show", request, false);
|
|
238
|
+
const projection = parsed.values.json === true ? undefined : (0, panel_ts_1.panelCapabilityOf)({ isTTY: facts.stdout.isTTY, width: facts.stdout.columns });
|
|
239
|
+
const output = yield* index_ts_3.reportHost.show({ root: request.root,
|
|
240
|
+
...(request.target.kind === "attempt" ? { locator: request.target.locator } : { selection: request.target.kind === "selection" ? request.target.selection : inputs.selection }),
|
|
241
|
+
report: inputs.report, ...(request.page === undefined ? {} : { route: request.page }), format: parsed.values.json === true ? "json" : "text",
|
|
242
|
+
...(projection === undefined ? {} : { textProjection: { width: projection.width, panelMode: projection.mode } }), }).pipe(effect_1.Effect.mapError((cause) => failure("show", "execute Report", cause)));
|
|
243
|
+
yield* write("stdout", output).pipe(effect_1.Effect.mapError((cause) => failure("show", "write output", cause)));
|
|
244
|
+
return 0;
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
function viewCommand(argv) {
|
|
248
|
+
return effect_1.Effect.gen(function* () {
|
|
249
|
+
const parser = yield* application_ts_1.CliArguments;
|
|
250
|
+
const parsed = yield* effect_1.Effect.try({ try: () => parser.parse(argv, exports.REPORT_CLI_OPTIONS), catch: (cause) => failure("view", "parse arguments", cause) });
|
|
251
|
+
if (parsed.values.help === true)
|
|
252
|
+
return yield* write("stdout", VIEW_HELP).pipe(effect_1.Effect.mapError((cause) => failure("view", "write help", cause)), effect_1.Effect.as(0));
|
|
253
|
+
if (parsed.values.json === true)
|
|
254
|
+
return yield* usage("view", "niceeval view does not accept --json.");
|
|
255
|
+
const factsService = yield* application_ts_1.CliInvocationFacts;
|
|
256
|
+
const facts = yield* factsService.facts.pipe(effect_1.Effect.mapError((cause) => failure("view", "read invocation facts", cause)));
|
|
257
|
+
const path = yield* application_ts_1.CliPath;
|
|
258
|
+
const platform = yield* operations_ts_1.ReportModulePlatform;
|
|
259
|
+
const request = parseRequest("view", facts.cwd, parsed.positionals, parsed.values, path, platform);
|
|
260
|
+
if (typeof request === "string")
|
|
261
|
+
return yield* usage("view", request);
|
|
262
|
+
const out = typeof parsed.values.out === "string" ? parsed.values.out : undefined;
|
|
263
|
+
const host = typeof parsed.values.host === "string" ? parsed.values.host.trim() : "127.0.0.1";
|
|
264
|
+
if (host === "")
|
|
265
|
+
return yield* usage("view", "--host requires a non-empty address.");
|
|
266
|
+
const portText = typeof parsed.values.port === "string" ? parsed.values.port : "0";
|
|
267
|
+
const port = Number(portText);
|
|
268
|
+
if (!Number.isInteger(port) || port < 0 || port > 65535)
|
|
269
|
+
return yield* usage("view", `--port must be an integer from 0 through 65535, got ${portText}.`);
|
|
270
|
+
if (out !== undefined && (parsed.values.host !== undefined || parsed.values.port !== undefined || parsed.values.open === true || request.page !== undefined)) {
|
|
271
|
+
return yield* usage("view", "view --out does not accept --host, --port, --open, or --page.");
|
|
272
|
+
}
|
|
273
|
+
yield* ensureCurrentRecord("view", request);
|
|
274
|
+
const inputs = yield* loadInputs("view", request, true);
|
|
275
|
+
const initial = yield* build(request, inputs).pipe(effect_1.Effect.mapError((cause) => failure("view", "build Report site", cause)));
|
|
276
|
+
if (out !== undefined) {
|
|
277
|
+
const target = path.resolve(facts.cwd, out);
|
|
278
|
+
const receipt = yield* index_ts_3.reportHost.export({ revision: initial, out: target }).pipe(effect_1.Effect.mapError((cause) => failure("view", "export static Report", cause)));
|
|
279
|
+
yield* write("stdout", `Exported static report site: ${receipt.out}\n`).pipe(effect_1.Effect.mapError((cause) => failure("view", "write output", cause)));
|
|
280
|
+
return 0;
|
|
281
|
+
}
|
|
282
|
+
const rebuild = () => effect_1.Effect.gen(function* () {
|
|
283
|
+
yield* ensureCurrentRecord("view", request);
|
|
284
|
+
const next = yield* loadInputs("view", request, true);
|
|
285
|
+
const revision = yield* build(request, next).pipe(effect_1.Effect.mapError((cause) => ({ summary: reportFailureSummary(cause) })));
|
|
286
|
+
return Object.freeze({ kind: "site", site: revision, watchInputs: next.watchInputs });
|
|
287
|
+
}).pipe(effect_1.Effect.mapError((cause) => "summary" in cause ? cause : ({ summary: reportFailureSummary(cause) })), effect_1.Effect.tapError((problem) => write("stderr", `view rebuild failed: ${problem.summary}\n`).pipe(effect_1.Effect.ignore)));
|
|
288
|
+
const server = yield* index_ts_3.reportHost.serve({ url: `http://${host.includes(":") ? `[${host}]` : host}:${port}/`, host, port,
|
|
289
|
+
watchInputs: inputs.watchInputs, initial: effect_1.Effect.succeed(initial), rebuild }).pipe(effect_1.Effect.mapError((cause) => failure("view", "open Report view", cause)));
|
|
290
|
+
const urls = server.urls.map((entry) => {
|
|
291
|
+
if (request.page === undefined)
|
|
292
|
+
return entry;
|
|
293
|
+
const target = new URL(entry);
|
|
294
|
+
target.hash = `#${request.page}`;
|
|
295
|
+
return target.toString();
|
|
296
|
+
});
|
|
297
|
+
if (host !== "127.0.0.1" && host !== "::1" && host !== "localhost")
|
|
298
|
+
yield* write("stderr", "Warning: niceeval view is listening beyond loopback without authentication or TLS; " +
|
|
299
|
+
"every reachable client can read report data, execution JSON, and downloads.\n").pipe(effect_1.Effect.mapError((cause) => failure("view", "write warning", cause)));
|
|
300
|
+
yield* write("stdout", `niceeval view — open in a browser:\n${urls.join("\n")}\n`).pipe(effect_1.Effect.mapError((cause) => failure("view", "write output", cause)));
|
|
301
|
+
if (parsed.values["no-open"] !== true) {
|
|
302
|
+
const browser = yield* operations_ts_1.ReportBrowser;
|
|
303
|
+
yield* browser.open(urls[0]).pipe(effect_1.Effect.catchAll(() => effect_1.Effect.succeed(false)));
|
|
304
|
+
}
|
|
305
|
+
return yield* effect_1.Effect.never;
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
function reportFailureSummary(cause) {
|
|
309
|
+
if (cause instanceof contribution_ts_1.CliFeatureError) {
|
|
310
|
+
const nested = cause.cause;
|
|
311
|
+
if (typeof nested === "object" && nested !== null && "code" in nested && typeof nested.code === "string") {
|
|
312
|
+
return nested.code;
|
|
313
|
+
}
|
|
314
|
+
return cause.operation;
|
|
315
|
+
}
|
|
316
|
+
return cause instanceof Error ? cause.message : String(cause);
|
|
317
|
+
}
|
|
318
|
+
exports.reportShowCliCommand = Object.freeze({
|
|
319
|
+
name: "show", summary: "render one closed Report target", options: exports.REPORT_CLI_OPTIONS, run: showCommand,
|
|
320
|
+
});
|
|
321
|
+
exports.reportViewCliCommand = Object.freeze({
|
|
322
|
+
name: "view", summary: "serve or export a complete Report site", options: exports.REPORT_CLI_OPTIONS, run: viewCommand,
|
|
323
|
+
});
|
|
324
|
+
exports.reportCliContributions = Object.freeze([exports.reportShowCliCommand, exports.reportViewCliCommand]);
|
|
325
|
+
//# sourceMappingURL=contribution.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contribution.js","sourceRoot":"","sources":["contribution.ts"],"names":[],"mappings":";;;AAAA,mCAAgD;AAEhD,iEAAoF;AAEpF,sEAAuE;AACvE,oDAAqF;AAGrF,6DAA0D;AAC1D,2EAAyH;AACzH,6DAAiG;AACjG,6DAAgJ;AAChJ,iFAA0E;AAC1E,+DAAyF;AACzF,yEAA+E;AAC/E,2DAAyF;AACzF,uFAA4F;AAC5F,qDAA6D;AAC7D,0DAAoD;AAEpD,2DAAmE;AACnE,+CAA8C;AAC9C,gDAAsD;AACtD,0CAAkE;AAElE,yDAA+G;AAC/G,MAAM,IAAI,GAAG,CAAC,OAAe,EAAE,aAAkC,QAAQ,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;AACrH,MAAM,MAAM,GAAG,CAAC,KAA0B,EAAuB,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC5E,QAAA,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC5C,MAAM,EAAE,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,sCAAsC,CAAC,EAAE,CAAC;IACtF,GAAG,EAAE,MAAM,CAAC,EAAE,IAA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I,MAAM,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YACvG,OAAO,MAAM,CAAC,IAAI,CAAC;QACvB,CAAC;QACD,OAAO,KAAK,CAAC,SAAS,CAAC;IAC3B,CAAC;IACD,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAClE,CAAC;AACY,QAAA,oBAAoB,GAAkE,MAAM,CAAC,MAAM,CAAC;IAC7G,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,iCAAiC,EAAE,OAAO,EAAE,0BAAkB,EAAE,GAAG,EAAE,WAAW;CAC1G,CAAC,CAAC;AACU,QAAA,oBAAoB,GAAkE,MAAM,CAAC,MAAM,CAAC;IAC7G,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,wCAAwC,EAAE,OAAO,EAAE,0BAAkB,EAAE,GAAG,EAAE,WAAW;CACjH,CAAC,CAAC;AACU,QAAA,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,4BAAoB,EAAE,4BAAoB,CAAC,CAAC,CAAC","sourcesContent":["import { Effect, Either, Schema } from \"effect\";\nimport type * as Scope from \"effect/Scope\";\nimport { parseAttemptLocator, type AttemptLocator } from \"../../attempt-locator.ts\";\nimport type { AnalysisSelectionRequest, ExperimentId, RunId } from \"../../analysis/index.ts\";\nimport { ExperimentIdSchema } from \"../../record/codec/identifiers.ts\";\nimport { makeRecordRoot, RunIdSchema, type RecordRoot } from \"../../record/index.ts\";\nimport type { RecordCoordination } from \"../../coordination/record-leases.ts\";\nimport type { RecordFileSystem, RecordGit } from \"../../record/platform/services.ts\";\nimport { recordHost } from \"../../record/host/runtime.ts\";\nimport { renderAutomaticMigrationFailure, renderAutomaticMigrationResult, } from \"../../record/host/cli/presentation.ts\";\nimport { experimentHost, type ExperimentHostRequirements } from \"../../experiment/host/index.ts\";\nimport { CliArguments, CliInvocationFacts, CliOutput, CliPath, type CliOptionDefinition, type CliPathService, } from \"../../cli/application.ts\";\nimport { ProjectConfiguration } from \"../../cli/project-configuration.ts\";\nimport { CliFeatureError, type CliCommandContribution } from \"../../cli/contribution.ts\";\nimport { defaultAttemptOverviewReport } from \"../built-in/attempt-overview.ts\";\nimport { executionEvidenceReport, timingEvidenceReport } from \"../built-in/execution.ts\";\nimport { defaultRunMembershipOverviewReport } from \"../built-in/run-membership-overview.ts\";\nimport { sourceEvidenceReport } from \"../built-in/source.ts\";\nimport { standard } from \"../built-in/standard.tsx\";\nimport type { ReportDefinition } from \"../definition/report.ts\";\nimport { buildReportSiteFromRecord } from \"../host/from-record.ts\";\nimport { reportHost } from \"../host/index.ts\";\nimport { panelCapabilityOf } from \"../model/panel.ts\";\nimport { basalt, chalk, type ThemeDefinition } from \"../theme.ts\";\nimport { ReportFileSystem } from \"../host/static.ts\";\nimport { ReportBrowser, ReportModulePlatform, type ReportModulePlatformService, } from \"../host/operations.ts\";\nconst help = (summary: string, visibility: \"public\" | \"hidden\" = \"public\") => Object.freeze({ summary, visibility });\nconst option = (value: CliOptionDefinition): CliOptionDefinition => Object.freeze(value);\nexport const REPORT_CLI_OPTIONS = Object.freeze({\n record: option({ type: \"string\", help: help(\"Use a specific NiceEval Record root.\") }),\n run: option({ type: \"string\", multiple: true, help: help(\"Select an exact published Run; repeat to select more than one.\") }),\n experiment: option({ type: \"string\", multiple: true, help: help(\"Narrow current-project results by Experiment selector.\") }),\n report: option({ type: \"string\", help: help(\"Use the standard Report or a trusted Report module path.\") }),\n theme: option({ type: \"string\", help: help(\"Use basalt, chalk, or a trusted Theme module path.\") }),\n page: option({ type: \"string\", help: help(\"Select the show target or initial view route.\") }),\n json: option({ type: \"boolean\", help: help(\"Write the show machine document as canonical JSON.\") }),\n source: option({ type: \"boolean\", optionalValue: Object.freeze({ default: true }), help: help(\"Show an Attempt source snapshot, optionally for one file.\") }),\n execution: option({ type: \"boolean\", help: help(\"Show retained execution evidence for one Attempt.\") }),\n timing: option({ type: \"boolean\", optionalValue: Object.freeze({ default: \"summary\", values: Object.freeze([\"summary\", \"full\"]) }), help: help(\"Show summary or full timing evidence for one Attempt.\") }),\n grep: option({ type: \"string\", help: help(\"Filter execution evidence with a JavaScript regular expression.\") }),\n diff: option({ type: \"boolean\", optionalValue: Object.freeze({ default: true }), help: help(\"Show the selected Attempt file changes, optionally for one inline path.\") }),\n out: option({ type: \"string\", help: help(\"Export a complete static Report site.\") }),\n host: option({ type: \"boolean\", optionalValue: Object.freeze({ default: \"0.0.0.0\", separated: true }), help: help(\"Listen on an address; bare --host exposes 0.0.0.0.\") }),\n port: option({ type: \"string\", help: help(\"Listen on this port; defaults to an available port.\") }),\n open: option({ type: \"boolean\", help: help(\"Open the live Report in a browser.\") }),\n \"no-open\": option({ type: \"boolean\", help: help(\"Do not open the live Report in a browser.\") }),\n help: option({ type: \"boolean\", short: \"h\", help: help(\"Print help for this Report command.\") }),\n} satisfies Readonly<Record<string, CliOptionDefinition>>);\nconst SHOW_HELP = `niceeval show — render one Report target\\n\\nUsage:\\n niceeval show [@<locator>] [--run <id>...] [--experiment <selector>...] [--report <module>] [--page <route>] [--json]\\n niceeval show @<locator> (--source[=<file>] | --execution [--grep <regexp>] | --timing[=summary|full] | --diff)\\n`;\nconst VIEW_HELP = `niceeval view — build a complete Report site\\n\\nUsage:\\n niceeval view [selection] [--report <module>] [--page <route>] [--host <address>] [--port <port>] [--no-open]\\n niceeval view [selection] [--report <module>] --out <directory>\\n`;\ntype Values = Record<string, string | boolean | string[] | undefined>;\ntype ReportCliRequirements = CliArguments | CliInvocationFacts | CliOutput | CliPath | ReportModulePlatform | ProjectConfiguration | ReportBrowser | RecordFileSystem | RecordGit | RecordCoordination | ReportFileSystem | ExperimentHostRequirements | Scope.Scope;\ntype ReportCliError = CliFeatureError;\ntype ReportSelection = {\n readonly kind: \"fixed\";\n readonly report: ReportDefinition;\n} | {\n readonly kind: \"config\";\n} | {\n readonly kind: \"standard\";\n} | {\n readonly kind: \"module\";\n readonly path: string;\n};\ntype ThemeSelection = {\n readonly kind: \"config\";\n} | {\n readonly kind: \"built-in\";\n readonly name: \"basalt\" | \"chalk\";\n} | {\n readonly kind: \"module\";\n readonly path: string;\n};\ntype Target = {\n readonly kind: \"selection\";\n readonly selection: AnalysisSelectionRequest;\n} | {\n readonly kind: \"project-current\";\n readonly experimentSelectors?: readonly string[];\n} | {\n readonly kind: \"attempt\";\n readonly locator: AttemptLocator;\n};\ninterface Request {\n readonly cwd: string;\n readonly root: RecordRoot;\n readonly rootPath: string;\n readonly target: Target;\n readonly reportSelection: ReportSelection;\n readonly themeSelection: ThemeSelection;\n readonly page?: string;\n}\ninterface LoadedInputs {\n readonly report: ReportDefinition;\n readonly theme?: ThemeDefinition;\n readonly selection?: AnalysisSelectionRequest;\n readonly watchInputs: readonly string[];\n}\nfunction failure(command: \"show\" | \"view\", operation: string, cause: unknown, display?: string): ReportCliError {\n return new CliFeatureError({\n feature: `report ${command}`,\n operation,\n cause,\n exitCode: 1,\n ...(display === undefined ? {} : { display }),\n });\n}\nfunction write(channel: \"stdout\" | \"stderr\", text: string) {\n return Effect.flatMap(CliOutput, (output) => channel === \"stdout\" ? output.writeStdout(text) : output.writeStderr(text));\n}\nfunction usage(command: \"show\" | \"view\", message: string) {\n return write(\"stderr\", `${message.endsWith(\"\\n\") ? message : `${message}\\n`}`).pipe(Effect.mapError((cause) => failure(command, \"write usage\", cause)), Effect.as(1));\n}\nfunction strings(value: string | string[] | boolean | undefined): readonly string[] {\n return typeof value === \"string\" ? [value] : Array.isArray(value) ? value : [];\n}\nfunction parseRunIds(values: readonly string[]): readonly RunId[] | string {\n const result: RunId[] = [];\n for (const value of [...new Set(values)]) {\n const decoded = Schema.decodeUnknownEither(RunIdSchema)(value);\n if (Either.isLeft(decoded))\n return `Invalid --run value ${JSON.stringify(value)}: expected one exact portable RunId.`;\n result.push(decoded.right);\n }\n return Object.freeze(result);\n}\nfunction parseExperimentSelectors(values: readonly string[]): readonly ExperimentId[] | string {\n const result: ExperimentId[] = [];\n for (const value of [...new Set(values)]) {\n const decoded = Schema.decodeUnknownEither(ExperimentIdSchema)(value);\n if (Either.isLeft(decoded))\n return `Invalid --experiment value ${JSON.stringify(value)}.`;\n result.push(decoded.right);\n }\n return Object.freeze(result);\n}\nfunction trusted(path: CliPathService, value: string): boolean {\n return value.startsWith(\"./\") || value.startsWith(\"../\") || path.isAbsolute(value);\n}\nfunction parseRequest(command: \"show\" | \"view\", cwd: string, positionals: readonly string[], values: Values, path: CliPathService, platform: ReportModulePlatformService): Request | string {\n const rootText = typeof values.record === \"string\" ? values.record : \".niceeval/record\";\n if (rootText.trim() === \"\")\n return \"--record requires an actual Record root directory.\";\n const rootPath = path.resolve(cwd, rootText);\n const made = makeRecordRoot(rootPath);\n if (Either.isLeft(made))\n return `Invalid --record root: ${made.left.code}.`;\n const runs = parseRunIds(strings(values.run));\n if (typeof runs === \"string\")\n return runs;\n const experiments = parseExperimentSelectors(strings(values.experiment));\n if (typeof experiments === \"string\")\n return experiments;\n if (runs.length > 0 && experiments.length > 0)\n return \"--experiment cannot combine with explicit --run.\";\n if (positionals.length > 1)\n return `niceeval ${command} accepts at most one exact Attempt locator.`;\n const reportValue = typeof values.report === \"string\" ? values.report : undefined;\n let reportSelection: ReportSelection = reportValue === undefined ? { kind: \"config\" } : reportValue === \"standard\"\n ? { kind: \"standard\" }\n : trusted(path, reportValue) ? { kind: \"module\", path: platform.resolveModulePath(cwd, reportValue) }\n : { kind: \"config\" };\n if (reportValue !== undefined && reportValue !== \"standard\" && !trusted(path, reportValue)) {\n return \"--report accepts standard or an explicit trusted module path.\";\n }\n const themeValue = typeof values.theme === \"string\" ? values.theme : undefined;\n const themeSelection: ThemeSelection = themeValue === undefined ? { kind: \"config\" } : themeValue === \"basalt\" || themeValue === \"chalk\"\n ? { kind: \"built-in\", name: themeValue }\n : trusted(path, themeValue) ? { kind: \"module\", path: platform.resolveModulePath(cwd, themeValue) }\n : { kind: \"config\" };\n if (themeValue !== undefined && themeValue !== \"basalt\" && themeValue !== \"chalk\" && !trusted(path, themeValue)) {\n return \"--theme accepts basalt, chalk, or an explicit trusted module path.\";\n }\n const evidence = [values.source !== undefined ? \"source\" : undefined, values.execution === true ? \"execution\" : undefined,\n values.timing !== undefined ? \"timing\" : undefined, values.diff !== undefined ? \"diff\" : undefined].filter(Boolean);\n if (command === \"view\" && evidence.length > 0)\n return \"niceeval view does not accept evidence slicing options.\";\n if (evidence.length > 1)\n return \"niceeval show chooses one evidence Report at a time.\";\n if (values.grep !== undefined && values.execution !== true)\n return \"--grep only combines with --execution.\";\n let target: Target;\n if (positionals.length === 1) {\n if (runs.length > 0 || experiments.length > 0)\n return \"An Attempt locator cannot combine with --run or --experiment.\";\n const parsed = parseAttemptLocator(positionals[0]!);\n if (!parsed.valid)\n return `Invalid Attempt locator ${JSON.stringify(positionals[0])}.`;\n target = { kind: \"attempt\", locator: parsed.locator };\n if (values.execution === true) {\n if (reportValue !== undefined)\n return \"--execution selects its built-in Report; remove --report.\";\n if (typeof values.grep === \"string\") {\n try {\n new RegExp(values.grep);\n }\n catch {\n return `--grep ${JSON.stringify(values.grep)} is not a valid JavaScript regular expression.`;\n }\n }\n reportSelection = { kind: \"fixed\", report: executionEvidenceReport(typeof values.grep === \"string\" ? { grep: values.grep } : {}) };\n }\n else if (values.timing !== undefined) {\n if (reportValue !== undefined)\n return \"--timing selects its built-in Report; remove --report.\";\n reportSelection = { kind: \"fixed\", report: timingEvidenceReport({ mode: values.timing === \"full\" ? \"full\" : \"summary\" }) };\n }\n else if (values.source !== undefined) {\n if (reportValue !== undefined)\n return \"--source selects its built-in Report; remove --report.\";\n reportSelection = { kind: \"fixed\", report: sourceEvidenceReport(typeof values.source === \"string\" ? { file: values.source } : {}) };\n }\n else if (reportValue === undefined)\n reportSelection = { kind: \"fixed\", report: defaultAttemptOverviewReport };\n }\n else {\n if (evidence.length > 0)\n return \"Evidence slicing requires exactly one Attempt locator.\";\n if (runs.length > 0) {\n const [first, ...rest] = runs;\n target = { kind: \"selection\", selection: { policy: \"explicit-runs\", runIds: [first!, ...rest] } };\n if (reportValue === undefined)\n reportSelection = { kind: \"fixed\", report: defaultRunMembershipOverviewReport };\n }\n else\n target = { kind: \"project-current\", ...(experiments.length === 0 ? {} : { experimentSelectors: experiments }) };\n }\n return Object.freeze({ cwd, root: made.right, rootPath, target, reportSelection, themeSelection,\n ...(typeof values.page === \"string\" ? { page: values.page } : {}) });\n}\nfunction loadInputs(command: \"show\" | \"view\", request: Request, includeTheme: boolean): Effect.Effect<LoadedInputs, ReportCliError, ProjectConfiguration | ReportModulePlatform | CliPath | ExperimentHostRequirements> {\n return Effect.gen(function* () {\n const project = yield* ProjectConfiguration;\n const platform = yield* ReportModulePlatform;\n const path = yield* CliPath;\n const config = yield* project.rebuild(request.cwd).pipe(Effect.mapError((cause) => failure(command, \"load project config\", cause)));\n const current = request.target.kind === \"project-current\" ? yield* experimentHost.resolveProjectCurrentTarget({\n cwd: request.cwd,\n config,\n freshImport: true,\n ...(request.target.experimentSelectors === undefined ? {} : { experimentSelectors: request.target.experimentSelectors }),\n }).pipe(Effect.mapError((cause) => failure(command, \"load current project target\", cause))) : undefined;\n const configured = yield* platform.loadConfig(request.cwd, { includeTheme }).pipe(Effect.mapError((cause) => failure(command, \"load trusted Report config\", cause)));\n const reportLoaded = request.reportSelection.kind === \"fixed\" ? { report: request.reportSelection.report, watchInputs: [] as readonly string[] }\n : request.reportSelection.kind === \"standard\" ? { report: standard, watchInputs: [] as readonly string[] }\n : request.reportSelection.kind === \"module\" ? yield* platform.loadReport(request.reportSelection.path).pipe(Effect.mapError((cause) => failure(command, \"load trusted Report module\", cause)))\n : { report: configured.report ?? standard, watchInputs: [] as readonly string[] };\n const themeLoaded = !includeTheme ? undefined : request.themeSelection.kind === \"built-in\"\n ? { theme: request.themeSelection.name === \"chalk\" ? chalk : basalt, watchInputs: [] as readonly string[] }\n : request.themeSelection.kind === \"module\" ? yield* platform.loadTheme(request.themeSelection.path).pipe(Effect.mapError((cause) => failure(command, \"load trusted Theme module\", cause)))\n : { theme: configured.theme ?? basalt, watchInputs: [] as readonly string[] };\n const watchInputs = Object.freeze([...new Set([request.rootPath, ...(current?.watchInputs ?? []), ...configured.watchInputs,\n ...reportLoaded.watchInputs, ...(themeLoaded?.watchInputs ?? [])].map((entry) => path.resolve(entry)))].sort());\n const selection = current?.selection;\n return Object.freeze({ report: reportLoaded.report, ...(themeLoaded === undefined ? {} : { theme: themeLoaded.theme }),\n ...(selection === undefined ? {} : { selection }), watchInputs });\n });\n}\nfunction build(request: Request, inputs: LoadedInputs) {\n return request.target.kind === \"attempt\" ? buildReportSiteFromRecord({ root: request.root, locator: request.target.locator,\n report: inputs.report, theme: inputs.theme }) : buildReportSiteFromRecord({ root: request.root,\n selection: request.target.kind === \"selection\" ? request.target.selection : inputs.selection!, report: inputs.report, theme: inputs.theme });\n}\nfunction ensureCurrentRecord(command: \"show\" | \"view\", request: Request) {\n return recordHost.ensureAutomaticMigration({ root: request.root }).pipe(Effect.mapError((cause) => failure(command, \"ensure automatic Record migration\", cause, renderAutomaticMigrationFailure(cause))), Effect.tap((result) => {\n const notice = renderAutomaticMigrationResult(result);\n return notice === undefined\n ? Effect.void\n : write(\"stderr\", notice).pipe(Effect.mapError((cause) => failure(command, \"write automatic Record migration notice\", cause)));\n }));\n}\nfunction showCommand(argv: readonly string[]): Effect.Effect<number, ReportCliError, ReportCliRequirements> {\n return Effect.gen(function* () {\n const parser = yield* CliArguments;\n const parsed = yield* Effect.try({ try: () => parser.parse(argv, REPORT_CLI_OPTIONS), catch: (cause) => failure(\"show\", \"parse arguments\", cause) });\n if (parsed.values.help === true)\n return yield* write(\"stdout\", SHOW_HELP).pipe(Effect.mapError((cause) => failure(\"show\", \"write help\", cause)), Effect.as(0));\n const factsService = yield* CliInvocationFacts;\n const facts = yield* factsService.facts.pipe(Effect.mapError((cause) => failure(\"show\", \"read invocation facts\", cause)));\n const path = yield* CliPath;\n const platform = yield* ReportModulePlatform;\n const request = parseRequest(\"show\", facts.cwd, parsed.positionals, parsed.values, path, platform);\n if (typeof request === \"string\")\n return yield* usage(\"show\", request);\n if (parsed.values.out !== undefined || parsed.values.host !== undefined || parsed.values.port !== undefined || parsed.values.open !== undefined || parsed.values[\"no-open\"] !== undefined)\n return yield* usage(\"show\", \"niceeval show does not accept view server/export options.\");\n yield* ensureCurrentRecord(\"show\", request);\n const inputs = yield* loadInputs(\"show\", request, false);\n const projection = parsed.values.json === true ? undefined : panelCapabilityOf({ isTTY: facts.stdout.isTTY, width: facts.stdout.columns });\n const output = yield* reportHost.show({ root: request.root,\n ...(request.target.kind === \"attempt\" ? { locator: request.target.locator } : { selection: request.target.kind === \"selection\" ? request.target.selection : inputs.selection! }),\n report: inputs.report, ...(request.page === undefined ? {} : { route: request.page }), format: parsed.values.json === true ? \"json\" : \"text\",\n ...(projection === undefined ? {} : { textProjection: { width: projection.width, panelMode: projection.mode } }),\n }).pipe(Effect.mapError((cause) => failure(\"show\", \"execute Report\", cause)));\n yield* write(\"stdout\", output).pipe(Effect.mapError((cause) => failure(\"show\", \"write output\", cause)));\n return 0;\n });\n}\nfunction viewCommand(argv: readonly string[]): Effect.Effect<number, ReportCliError, ReportCliRequirements> {\n return Effect.gen(function* () {\n const parser = yield* CliArguments;\n const parsed = yield* Effect.try({ try: () => parser.parse(argv, REPORT_CLI_OPTIONS), catch: (cause) => failure(\"view\", \"parse arguments\", cause) });\n if (parsed.values.help === true)\n return yield* write(\"stdout\", VIEW_HELP).pipe(Effect.mapError((cause) => failure(\"view\", \"write help\", cause)), Effect.as(0));\n if (parsed.values.json === true)\n return yield* usage(\"view\", \"niceeval view does not accept --json.\");\n const factsService = yield* CliInvocationFacts;\n const facts = yield* factsService.facts.pipe(Effect.mapError((cause) => failure(\"view\", \"read invocation facts\", cause)));\n const path = yield* CliPath;\n const platform = yield* ReportModulePlatform;\n const request = parseRequest(\"view\", facts.cwd, parsed.positionals, parsed.values, path, platform);\n if (typeof request === \"string\")\n return yield* usage(\"view\", request);\n const out = typeof parsed.values.out === \"string\" ? parsed.values.out : undefined;\n const host = typeof parsed.values.host === \"string\" ? parsed.values.host.trim() : \"127.0.0.1\";\n if (host === \"\")\n return yield* usage(\"view\", \"--host requires a non-empty address.\");\n const portText = typeof parsed.values.port === \"string\" ? parsed.values.port : \"0\";\n const port = Number(portText);\n if (!Number.isInteger(port) || port < 0 || port > 65535)\n return yield* usage(\"view\", `--port must be an integer from 0 through 65535, got ${portText}.`);\n if (out !== undefined && (parsed.values.host !== undefined || parsed.values.port !== undefined || parsed.values.open === true || request.page !== undefined)) {\n return yield* usage(\"view\", \"view --out does not accept --host, --port, --open, or --page.\");\n }\n yield* ensureCurrentRecord(\"view\", request);\n const inputs = yield* loadInputs(\"view\", request, true);\n const initial = yield* build(request, inputs).pipe(Effect.mapError((cause) => failure(\"view\", \"build Report site\", cause)));\n if (out !== undefined) {\n const target = path.resolve(facts.cwd, out);\n const receipt = yield* reportHost.export({ revision: initial, out: target }).pipe(Effect.mapError((cause) => failure(\"view\", \"export static Report\", cause)));\n yield* write(\"stdout\", `Exported static report site: ${receipt.out}\\n`).pipe(Effect.mapError((cause) => failure(\"view\", \"write output\", cause)));\n return 0;\n }\n const rebuild = () => Effect.gen(function* () {\n yield* ensureCurrentRecord(\"view\", request);\n const next = yield* loadInputs(\"view\", request, true);\n const revision = yield* build(request, next).pipe(Effect.mapError((cause) => ({ summary: reportFailureSummary(cause) })));\n return Object.freeze({ kind: \"site\" as const, site: revision, watchInputs: next.watchInputs });\n }).pipe(Effect.mapError((cause) => \"summary\" in cause ? cause : ({ summary: reportFailureSummary(cause) })), Effect.tapError((problem) => write(\"stderr\", `view rebuild failed: ${problem.summary}\\n`).pipe(Effect.ignore)));\n const server = yield* reportHost.serve({ url: `http://${host.includes(\":\") ? `[${host}]` : host}:${port}/`, host, port,\n watchInputs: inputs.watchInputs, initial: Effect.succeed(initial), rebuild }).pipe(Effect.mapError((cause) => failure(\"view\", \"open Report view\", cause)));\n const urls = server.urls.map((entry) => {\n if (request.page === undefined)\n return entry;\n const target = new URL(entry);\n target.hash = `#${request.page}`;\n return target.toString();\n });\n if (host !== \"127.0.0.1\" && host !== \"::1\" && host !== \"localhost\")\n yield* write(\"stderr\", \"Warning: niceeval view is listening beyond loopback without authentication or TLS; \" +\n \"every reachable client can read report data, execution JSON, and downloads.\\n\").pipe(Effect.mapError((cause) => failure(\"view\", \"write warning\", cause)));\n yield* write(\"stdout\", `niceeval view — open in a browser:\\n${urls.join(\"\\n\")}\\n`).pipe(Effect.mapError((cause) => failure(\"view\", \"write output\", cause)));\n if (parsed.values[\"no-open\"] !== true) {\n const browser = yield* ReportBrowser;\n yield* browser.open(urls[0]!).pipe(Effect.catchAll(() => Effect.succeed(false)));\n }\n return yield* Effect.never;\n });\n}\nfunction reportFailureSummary(cause: unknown): string {\n if (cause instanceof CliFeatureError) {\n const nested = cause.cause;\n if (typeof nested === \"object\" && nested !== null && \"code\" in nested && typeof nested.code === \"string\") {\n return nested.code;\n }\n return cause.operation;\n }\n return cause instanceof Error ? cause.message : String(cause);\n}\nexport const reportShowCliCommand: CliCommandContribution<ReportCliRequirements, ReportCliError> = Object.freeze({\n name: \"show\", summary: \"render one closed Report target\", options: REPORT_CLI_OPTIONS, run: showCommand,\n});\nexport const reportViewCliCommand: CliCommandContribution<ReportCliRequirements, ReportCliError> = Object.freeze({\n name: \"view\", summary: \"serve or export a complete Report site\", options: REPORT_CLI_OPTIONS, run: viewCommand,\n});\nexport const reportCliContributions = Object.freeze([reportShowCliCommand, reportViewCliCommand]);\n"]}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import type * as Scope from "effect/Scope";
|
|
2
|
+
import type { RecordCoordination } from "../../coordination/record-leases.cjs";
|
|
3
|
+
import type { RecordFileSystem, RecordGit } from "../../record/platform/services.cjs";
|
|
4
|
+
import { type ExperimentHostRequirements } from "../../experiment/host/index.cjs";
|
|
5
|
+
import { CliArguments, CliInvocationFacts, CliOutput, CliPath } from "../../cli/application.cjs";
|
|
6
|
+
import { ProjectConfiguration } from "../../cli/project-configuration.cjs";
|
|
7
|
+
import { CliFeatureError, type CliCommandContribution } from "../../cli/contribution.cjs";
|
|
8
|
+
import { ReportFileSystem } from "../host/static.cjs";
|
|
9
|
+
import { ReportBrowser, ReportModulePlatform } from "../host/operations.cjs";
|
|
10
|
+
export declare const REPORT_CLI_OPTIONS: Readonly<{
|
|
11
|
+
record: Readonly<{
|
|
12
|
+
readonly type: "string" | "boolean";
|
|
13
|
+
readonly multiple?: true;
|
|
14
|
+
readonly short?: string;
|
|
15
|
+
readonly optionalValue?: import("../../cli/application.cjs").CliOptionalOptionValue;
|
|
16
|
+
readonly help?: import("../../cli/application.cjs").CliOptionHelp;
|
|
17
|
+
}>;
|
|
18
|
+
run: Readonly<{
|
|
19
|
+
readonly type: "string" | "boolean";
|
|
20
|
+
readonly multiple?: true;
|
|
21
|
+
readonly short?: string;
|
|
22
|
+
readonly optionalValue?: import("../../cli/application.cjs").CliOptionalOptionValue;
|
|
23
|
+
readonly help?: import("../../cli/application.cjs").CliOptionHelp;
|
|
24
|
+
}>;
|
|
25
|
+
experiment: Readonly<{
|
|
26
|
+
readonly type: "string" | "boolean";
|
|
27
|
+
readonly multiple?: true;
|
|
28
|
+
readonly short?: string;
|
|
29
|
+
readonly optionalValue?: import("../../cli/application.cjs").CliOptionalOptionValue;
|
|
30
|
+
readonly help?: import("../../cli/application.cjs").CliOptionHelp;
|
|
31
|
+
}>;
|
|
32
|
+
report: Readonly<{
|
|
33
|
+
readonly type: "string" | "boolean";
|
|
34
|
+
readonly multiple?: true;
|
|
35
|
+
readonly short?: string;
|
|
36
|
+
readonly optionalValue?: import("../../cli/application.cjs").CliOptionalOptionValue;
|
|
37
|
+
readonly help?: import("../../cli/application.cjs").CliOptionHelp;
|
|
38
|
+
}>;
|
|
39
|
+
theme: Readonly<{
|
|
40
|
+
readonly type: "string" | "boolean";
|
|
41
|
+
readonly multiple?: true;
|
|
42
|
+
readonly short?: string;
|
|
43
|
+
readonly optionalValue?: import("../../cli/application.cjs").CliOptionalOptionValue;
|
|
44
|
+
readonly help?: import("../../cli/application.cjs").CliOptionHelp;
|
|
45
|
+
}>;
|
|
46
|
+
page: Readonly<{
|
|
47
|
+
readonly type: "string" | "boolean";
|
|
48
|
+
readonly multiple?: true;
|
|
49
|
+
readonly short?: string;
|
|
50
|
+
readonly optionalValue?: import("../../cli/application.cjs").CliOptionalOptionValue;
|
|
51
|
+
readonly help?: import("../../cli/application.cjs").CliOptionHelp;
|
|
52
|
+
}>;
|
|
53
|
+
json: Readonly<{
|
|
54
|
+
readonly type: "string" | "boolean";
|
|
55
|
+
readonly multiple?: true;
|
|
56
|
+
readonly short?: string;
|
|
57
|
+
readonly optionalValue?: import("../../cli/application.cjs").CliOptionalOptionValue;
|
|
58
|
+
readonly help?: import("../../cli/application.cjs").CliOptionHelp;
|
|
59
|
+
}>;
|
|
60
|
+
source: Readonly<{
|
|
61
|
+
readonly type: "string" | "boolean";
|
|
62
|
+
readonly multiple?: true;
|
|
63
|
+
readonly short?: string;
|
|
64
|
+
readonly optionalValue?: import("../../cli/application.cjs").CliOptionalOptionValue;
|
|
65
|
+
readonly help?: import("../../cli/application.cjs").CliOptionHelp;
|
|
66
|
+
}>;
|
|
67
|
+
execution: Readonly<{
|
|
68
|
+
readonly type: "string" | "boolean";
|
|
69
|
+
readonly multiple?: true;
|
|
70
|
+
readonly short?: string;
|
|
71
|
+
readonly optionalValue?: import("../../cli/application.cjs").CliOptionalOptionValue;
|
|
72
|
+
readonly help?: import("../../cli/application.cjs").CliOptionHelp;
|
|
73
|
+
}>;
|
|
74
|
+
timing: Readonly<{
|
|
75
|
+
readonly type: "string" | "boolean";
|
|
76
|
+
readonly multiple?: true;
|
|
77
|
+
readonly short?: string;
|
|
78
|
+
readonly optionalValue?: import("../../cli/application.cjs").CliOptionalOptionValue;
|
|
79
|
+
readonly help?: import("../../cli/application.cjs").CliOptionHelp;
|
|
80
|
+
}>;
|
|
81
|
+
grep: Readonly<{
|
|
82
|
+
readonly type: "string" | "boolean";
|
|
83
|
+
readonly multiple?: true;
|
|
84
|
+
readonly short?: string;
|
|
85
|
+
readonly optionalValue?: import("../../cli/application.cjs").CliOptionalOptionValue;
|
|
86
|
+
readonly help?: import("../../cli/application.cjs").CliOptionHelp;
|
|
87
|
+
}>;
|
|
88
|
+
diff: Readonly<{
|
|
89
|
+
readonly type: "string" | "boolean";
|
|
90
|
+
readonly multiple?: true;
|
|
91
|
+
readonly short?: string;
|
|
92
|
+
readonly optionalValue?: import("../../cli/application.cjs").CliOptionalOptionValue;
|
|
93
|
+
readonly help?: import("../../cli/application.cjs").CliOptionHelp;
|
|
94
|
+
}>;
|
|
95
|
+
out: Readonly<{
|
|
96
|
+
readonly type: "string" | "boolean";
|
|
97
|
+
readonly multiple?: true;
|
|
98
|
+
readonly short?: string;
|
|
99
|
+
readonly optionalValue?: import("../../cli/application.cjs").CliOptionalOptionValue;
|
|
100
|
+
readonly help?: import("../../cli/application.cjs").CliOptionHelp;
|
|
101
|
+
}>;
|
|
102
|
+
host: Readonly<{
|
|
103
|
+
readonly type: "string" | "boolean";
|
|
104
|
+
readonly multiple?: true;
|
|
105
|
+
readonly short?: string;
|
|
106
|
+
readonly optionalValue?: import("../../cli/application.cjs").CliOptionalOptionValue;
|
|
107
|
+
readonly help?: import("../../cli/application.cjs").CliOptionHelp;
|
|
108
|
+
}>;
|
|
109
|
+
port: Readonly<{
|
|
110
|
+
readonly type: "string" | "boolean";
|
|
111
|
+
readonly multiple?: true;
|
|
112
|
+
readonly short?: string;
|
|
113
|
+
readonly optionalValue?: import("../../cli/application.cjs").CliOptionalOptionValue;
|
|
114
|
+
readonly help?: import("../../cli/application.cjs").CliOptionHelp;
|
|
115
|
+
}>;
|
|
116
|
+
open: Readonly<{
|
|
117
|
+
readonly type: "string" | "boolean";
|
|
118
|
+
readonly multiple?: true;
|
|
119
|
+
readonly short?: string;
|
|
120
|
+
readonly optionalValue?: import("../../cli/application.cjs").CliOptionalOptionValue;
|
|
121
|
+
readonly help?: import("../../cli/application.cjs").CliOptionHelp;
|
|
122
|
+
}>;
|
|
123
|
+
"no-open": Readonly<{
|
|
124
|
+
readonly type: "string" | "boolean";
|
|
125
|
+
readonly multiple?: true;
|
|
126
|
+
readonly short?: string;
|
|
127
|
+
readonly optionalValue?: import("../../cli/application.cjs").CliOptionalOptionValue;
|
|
128
|
+
readonly help?: import("../../cli/application.cjs").CliOptionHelp;
|
|
129
|
+
}>;
|
|
130
|
+
help: Readonly<{
|
|
131
|
+
readonly type: "string" | "boolean";
|
|
132
|
+
readonly multiple?: true;
|
|
133
|
+
readonly short?: string;
|
|
134
|
+
readonly optionalValue?: import("../../cli/application.cjs").CliOptionalOptionValue;
|
|
135
|
+
readonly help?: import("../../cli/application.cjs").CliOptionHelp;
|
|
136
|
+
}>;
|
|
137
|
+
}>;
|
|
138
|
+
type ReportCliRequirements = CliArguments | CliInvocationFacts | CliOutput | CliPath | ReportModulePlatform | ProjectConfiguration | ReportBrowser | RecordFileSystem | RecordGit | RecordCoordination | ReportFileSystem | ExperimentHostRequirements | Scope.Scope;
|
|
139
|
+
type ReportCliError = CliFeatureError;
|
|
140
|
+
export declare const reportShowCliCommand: CliCommandContribution<ReportCliRequirements, ReportCliError>;
|
|
141
|
+
export declare const reportViewCliCommand: CliCommandContribution<ReportCliRequirements, ReportCliError>;
|
|
142
|
+
export declare const reportCliContributions: readonly CliCommandContribution<ReportCliRequirements, CliFeatureError>[];
|
|
143
|
+
export {};
|