niceeval 0.13.2 → 0.13.3
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/agents/bub.cjs +4 -4
- package/dist/agents/bub.cjs.map +1 -1
- package/dist/agents/bub.d.cts +2 -2
- package/dist/agents/bub.d.mts +2 -2
- package/dist/agents/bub.d.ts +2 -2
- package/dist/agents/claude-code-native.cjs +213 -0
- package/dist/agents/claude-code-native.cjs.map +1 -0
- package/dist/agents/claude-code-native.d.cts +5 -0
- package/dist/agents/claude-code-native.d.mts +5 -0
- package/dist/agents/claude-code-native.d.ts +5 -0
- package/dist/agents/claude-code-native.js +6 -0
- package/dist/agents/claude-code-native.js.map +1 -0
- package/dist/agents/claude-code.cjs +26 -80
- package/dist/agents/claude-code.cjs.map +1 -1
- package/dist/agents/codex-app-server.cjs +314 -0
- package/dist/agents/codex-app-server.cjs.map +1 -0
- package/dist/agents/codex-app-server.d.cts +9 -0
- package/dist/agents/codex-app-server.d.mts +9 -0
- package/dist/agents/codex-app-server.d.ts +9 -0
- package/dist/agents/codex-app-server.js +6 -0
- package/dist/agents/codex-app-server.js.map +1 -0
- package/dist/agents/codex.cjs +19 -68
- package/dist/agents/codex.cjs.map +1 -1
- package/dist/agents/codex.d.cts +3 -3
- package/dist/agents/codex.d.mts +3 -3
- package/dist/agents/codex.d.ts +3 -3
- package/dist/agents/index.cjs +3 -1
- package/dist/agents/index.cjs.map +1 -1
- package/dist/agents/index.d.cts +1 -0
- package/dist/agents/index.d.mts +1 -0
- package/dist/agents/index.d.ts +1 -0
- package/dist/agents/index.js +84 -82
- package/dist/agents/index.mjs +84 -82
- package/dist/agents/managed-jsonl.cjs +207 -0
- package/dist/agents/managed-jsonl.cjs.map +1 -0
- package/dist/agents/managed-jsonl.d.cts +39 -0
- package/dist/agents/managed-jsonl.d.mts +39 -0
- package/dist/agents/managed-jsonl.d.ts +39 -0
- package/dist/agents/managed-jsonl.js +6 -0
- package/dist/agents/managed-jsonl.js.map +1 -0
- package/dist/agents/managed-process.cjs +31 -0
- package/dist/agents/managed-process.cjs.map +1 -0
- package/dist/agents/managed-process.d.cts +3 -0
- package/dist/agents/managed-process.d.mts +3 -0
- package/dist/agents/managed-process.d.ts +3 -0
- package/dist/agents/managed-process.js +6 -0
- package/dist/agents/managed-process.js.map +1 -0
- package/dist/agents/omp.cjs +18 -1
- package/dist/agents/omp.cjs.map +1 -1
- package/dist/agents/sdk-streams.cjs +11 -4
- package/dist/agents/sdk-streams.cjs.map +1 -1
- package/dist/agents/types.cjs.map +1 -1
- package/dist/agents/types.d.cts +8 -0
- package/dist/agents/types.d.mts +8 -0
- package/dist/agents/types.d.ts +8 -0
- package/dist/analysis/bindings.cjs +74 -19
- package/dist/analysis/bindings.cjs.map +1 -1
- package/dist/analysis/bindings.d.cts +534 -156
- package/dist/analysis/bindings.d.mts +534 -156
- package/dist/analysis/bindings.d.ts +534 -156
- package/dist/analysis/domain-view.cjs.map +1 -1
- package/dist/analysis/domain-view.d.cts +137 -8
- package/dist/analysis/domain-view.d.mts +137 -8
- package/dist/analysis/domain-view.d.ts +137 -8
- 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/assertions/api.cjs.map +1 -1
- package/dist/assertions/api.d.cts +62 -0
- package/dist/assertions/api.d.mts +62 -0
- package/dist/assertions/api.d.ts +62 -0
- package/dist/assertions/judge.cjs +56 -5
- package/dist/assertions/judge.cjs.map +1 -1
- package/dist/assertions/match.cjs +66 -42
- package/dist/assertions/match.cjs.map +1 -1
- package/dist/assertions/match.d.cts +13 -0
- package/dist/assertions/match.d.mts +13 -0
- package/dist/assertions/match.d.ts +13 -0
- package/dist/assertions/record/attachment.cjs +104 -33
- package/dist/assertions/record/attachment.cjs.map +1 -1
- package/dist/assertions/record/attachment.d.cts +294 -57
- package/dist/assertions/record/attachment.d.mts +294 -57
- package/dist/assertions/record/attachment.d.ts +294 -57
- package/dist/assertions/record/codec.cjs +91 -17
- package/dist/assertions/record/codec.cjs.map +1 -1
- package/dist/assertions/record/codec.d.cts +280 -52
- package/dist/assertions/record/codec.d.mts +280 -52
- package/dist/assertions/record/codec.d.ts +280 -52
- package/dist/assertions/record/index.js +2 -0
- package/dist/assertions/record/model.cjs +16 -0
- package/dist/assertions/record/model.cjs.map +1 -1
- package/dist/assertions/record/model.d.cts +120 -13
- package/dist/assertions/record/model.d.mts +120 -13
- package/dist/assertions/record/model.d.ts +120 -13
- package/dist/assertions/record/model.js +2 -0
- package/dist/assertions/record/producer.cjs +70 -50
- package/dist/assertions/record/producer.cjs.map +1 -1
- package/dist/assertions/record/producer.d.cts +8 -7
- package/dist/assertions/record/producer.d.mts +8 -7
- package/dist/assertions/record/producer.d.ts +8 -7
- package/dist/assertions/runtime.cjs +49 -7
- package/dist/assertions/runtime.cjs.map +1 -1
- package/dist/cli/application.cjs +40 -0
- package/dist/cli/application.cjs.map +1 -0
- package/dist/cli/application.d.cts +129 -0
- package/dist/cli/application.d.mts +129 -0
- package/dist/cli/application.d.ts +129 -0
- package/dist/cli/application.js +24 -0
- package/dist/cli/application.js.map +1 -0
- package/dist/cli/bootstrap.cjs +10 -4
- package/dist/cli/bootstrap.cjs.map +1 -1
- package/dist/cli/node-application.cjs +123 -0
- package/dist/cli/node-application.cjs.map +1 -0
- package/dist/cli/node-application.d.cts +14 -0
- package/dist/cli/node-application.d.mts +14 -0
- package/dist/cli/node-application.d.ts +14 -0
- package/dist/cli/node-application.js +26 -0
- package/dist/cli/node-application.js.map +1 -0
- package/dist/cli/program.cjs +2807 -0
- package/dist/cli/program.cjs.map +1 -0
- package/dist/cli/program.d.cts +352 -0
- package/dist/cli/program.d.mts +352 -0
- package/dist/cli/program.d.ts +352 -0
- package/dist/cli/program.js +36 -0
- package/dist/cli/program.js.map +1 -0
- package/dist/cli/project-configuration.cjs +134 -0
- package/dist/cli/project-configuration.cjs.map +1 -0
- package/dist/cli/project-configuration.d.cts +64 -0
- package/dist/cli/project-configuration.d.mts +64 -0
- package/dist/cli/project-configuration.d.ts +64 -0
- package/dist/cli/project-configuration.js +22 -0
- package/dist/cli/project-configuration.js.map +1 -0
- package/dist/cli/record.cjs +20 -4
- package/dist/cli/record.cjs.map +1 -1
- package/dist/cli/record.d.cts +3 -3
- package/dist/cli/record.d.mts +3 -3
- package/dist/cli/record.d.ts +3 -3
- package/dist/cli.cjs +19 -3130
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.d.cts +2 -148
- package/dist/cli.d.mts +2 -148
- package/dist/cli.d.ts +2 -148
- package/dist/cli.js +22 -30
- package/dist/context/assert-first.cjs +21 -15
- package/dist/context/assert-first.cjs.map +1 -1
- package/dist/context/assert-first.d.cts +1 -0
- package/dist/context/assert-first.d.mts +1 -0
- package/dist/context/assert-first.d.ts +1 -0
- package/dist/context/attempt-resources.cjs +13 -0
- package/dist/context/attempt-resources.cjs.map +1 -0
- package/dist/context/attempt-resources.d.cts +3 -0
- package/dist/context/attempt-resources.d.mts +3 -0
- package/dist/context/attempt-resources.d.ts +3 -0
- package/dist/context/attempt-resources.js +8 -0
- package/dist/context/attempt-resources.js.map +1 -0
- package/dist/context/session.cjs +4 -3
- package/dist/context/session.cjs.map +1 -1
- package/dist/context/session.d.cts +1 -0
- package/dist/context/session.d.mts +1 -0
- package/dist/context/session.d.ts +1 -0
- package/dist/eval/record/verdict.cjs +3 -2
- package/dist/eval/record/verdict.cjs.map +1 -1
- package/dist/experiment/host/index.cjs +1 -6
- package/dist/experiment/host/index.cjs.map +1 -1
- package/dist/experiment/host/index.d.cts +1 -0
- package/dist/experiment/host/index.d.mts +1 -0
- package/dist/experiment/host/index.d.ts +1 -0
- package/dist/load-config.cjs +13 -4
- package/dist/load-config.cjs.map +1 -1
- package/dist/load-config.d.cts +4 -3
- package/dist/load-config.d.mts +4 -3
- package/dist/load-config.d.ts +4 -3
- package/dist/load-config.js +4 -2
- package/dist/o11y/parsers/codex.cjs +29 -7
- package/dist/o11y/parsers/codex.cjs.map +1 -1
- package/dist/record/codec/core.d.cts +0 -2
- package/dist/record/codec/core.d.mts +0 -2
- package/dist/record/codec/core.d.ts +0 -2
- package/dist/record/codec/identifiers.cjs +2 -3
- package/dist/record/codec/identifiers.cjs.map +1 -1
- package/dist/record/codec/identifiers.d.cts +1 -2
- package/dist/record/codec/identifiers.d.mts +1 -2
- package/dist/record/codec/identifiers.d.ts +1 -2
- package/dist/record/codec/identifiers.js +10 -12
- package/dist/record/codec/index.js +42 -44
- package/dist/record/definition/attachment.cjs +1 -0
- package/dist/record/definition/attachment.cjs.map +1 -1
- package/dist/record/definition/attachment.d.cts +14 -0
- package/dist/record/definition/attachment.d.mts +14 -0
- package/dist/record/definition/attachment.d.ts +14 -0
- package/dist/record/family/assertions-v1.cjs +104 -0
- package/dist/record/family/assertions-v1.cjs.map +1 -0
- package/dist/record/family/assertions-v1.d.cts +2 -0
- package/dist/record/family/assertions-v1.d.mts +2 -0
- package/dist/record/family/assertions-v1.d.ts +2 -0
- package/dist/record/family/assertions-v1.js +6 -0
- package/dist/record/family/assertions-v1.js.map +1 -0
- package/dist/record/family/assertions.cjs +16 -5
- package/dist/record/family/assertions.cjs.map +1 -1
- package/dist/record/family/assertions.d.cts +510 -56
- package/dist/record/family/assertions.d.mts +510 -56
- package/dist/record/family/assertions.d.ts +510 -56
- package/dist/record/family/assertions.js +14 -10
- package/dist/record/family/catalog.cjs +17 -1
- package/dist/record/family/catalog.cjs.map +1 -1
- package/dist/record/family/catalog.d.cts +1292 -104
- package/dist/record/family/catalog.d.mts +1292 -104
- package/dist/record/family/catalog.d.ts +1292 -104
- package/dist/record/family/catalog.js +22 -20
- package/dist/record/family/index.js +144 -138
- package/dist/record/family/observability-v1.cjs +5 -0
- package/dist/record/family/observability-v1.cjs.map +1 -1
- package/dist/record/family/observability.cjs +1 -1
- package/dist/record/family/observability.cjs.map +1 -1
- package/dist/record/host/runtime.cjs +323 -173
- 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 +9 -7
- package/dist/record/host/types.d.mts +9 -7
- package/dist/record/host/types.d.ts +9 -7
- package/dist/record/model/core.cjs.map +1 -1
- package/dist/record/model/core.d.cts +1 -2
- package/dist/record/model/core.d.mts +1 -2
- package/dist/record/model/core.d.ts +1 -2
- package/dist/record/model/definition.cjs +1 -2
- package/dist/record/model/definition.cjs.map +1 -1
- package/dist/record/model/definition.d.cts +1 -7
- package/dist/record/model/definition.d.mts +1 -7
- package/dist/record/model/definition.d.ts +1 -7
- package/dist/record/model/identifiers.cjs +2 -3
- package/dist/record/model/identifiers.cjs.map +1 -1
- package/dist/record/model/identifiers.d.cts +1 -3
- package/dist/record/model/identifiers.d.mts +1 -3
- package/dist/record/model/identifiers.d.ts +1 -3
- package/dist/record/model/identifiers.js +36 -38
- package/dist/record/model/index.js +60 -62
- package/dist/record/platform/node.cjs +17 -7
- package/dist/record/platform/node.cjs.map +1 -1
- package/dist/record/platform/services.cjs.map +1 -1
- package/dist/record/platform/services.d.cts +8 -3
- package/dist/record/platform/services.d.mts +8 -3
- package/dist/record/platform/services.d.ts +8 -3
- package/dist/record/reader/format.cjs +16 -65
- package/dist/record/reader/format.cjs.map +1 -1
- package/dist/record/reader/format.d.cts +5 -9
- package/dist/record/reader/format.d.mts +5 -9
- package/dist/record/reader/format.d.ts +5 -9
- package/dist/record/reader/index.js +10 -8
- package/dist/record/reader/runtime.cjs +63 -32
- package/dist/record/reader/runtime.cjs.map +1 -1
- package/dist/record/reader/runtime.d.cts +40 -4
- package/dist/record/reader/runtime.d.mts +40 -4
- package/dist/record/reader/runtime.d.ts +40 -4
- package/dist/record/reader/runtime.js +6 -4
- package/dist/report/assets/enhance.js +5 -5
- package/dist/report/assets/styles.css +190 -24
- package/dist/report/built-in/result-components.cjs +8 -5
- package/dist/report/built-in/result-components.cjs.map +1 -1
- package/dist/report/built-in/standard.cjs +3 -0
- package/dist/report/built-in/standard.cjs.map +1 -1
- package/dist/report/built-in/standard.d.cts +2 -0
- package/dist/report/built-in/standard.d.mts +2 -0
- package/dist/report/built-in/standard.d.ts +2 -0
- package/dist/report/client-dist/app.js +53 -0
- package/dist/report/components/attempt-detail/compute.cjs +108 -231
- package/dist/report/components/attempt-detail/compute.cjs.map +1 -1
- package/dist/report/components/attempt-detail/compute.d.cts +11 -45
- package/dist/report/components/attempt-detail/compute.d.mts +11 -45
- package/dist/report/components/attempt-detail/compute.d.ts +11 -45
- package/dist/report/components/attempt-detail/compute.js +2 -4
- package/dist/report/components/attempt-detail/content.cjs +4 -4
- package/dist/report/components/attempt-detail/content.cjs.map +1 -1
- package/dist/report/components/attempt-detail/validate.cjs +47 -4
- package/dist/report/components/attempt-detail/validate.cjs.map +1 -1
- package/dist/report/components/entity-lists/compute.cjs +9 -15
- package/dist/report/components/entity-lists/compute.cjs.map +1 -1
- package/dist/report/components/entity-lists/content.cjs +53 -40
- package/dist/report/components/entity-lists/content.cjs.map +1 -1
- package/dist/report/components/entity-lists/index.cjs +1 -3
- package/dist/report/components/entity-lists/index.cjs.map +1 -1
- package/dist/report/components/experiment-detail/compute.cjs +4 -6
- package/dist/report/components/experiment-detail/compute.cjs.map +1 -1
- package/dist/report/components/summaries/index.cjs +5 -1
- package/dist/report/components/summaries/index.cjs.map +1 -1
- package/dist/report/definition/cell.cjs +14 -7
- package/dist/report/definition/cell.cjs.map +1 -1
- package/dist/report/definition/cell.d.cts +4 -0
- package/dist/report/definition/cell.d.mts +4 -0
- package/dist/report/definition/cell.d.ts +4 -0
- package/dist/report/definition/primitives/assertion-evidence.cjs +96 -0
- package/dist/report/definition/primitives/assertion-evidence.cjs.map +1 -0
- package/dist/report/definition/primitives/assertion-evidence.d.cts +11 -0
- package/dist/report/definition/primitives/assertion-evidence.d.mts +11 -0
- package/dist/report/definition/primitives/assertion-evidence.d.ts +11 -0
- package/dist/report/definition/primitives/assertion-evidence.js +6 -0
- package/dist/report/definition/primitives/assertion-evidence.js.map +1 -0
- package/dist/report/definition/primitives/conversation.cjs +7 -0
- package/dist/report/definition/primitives/conversation.cjs.map +1 -1
- package/dist/report/definition/primitives/conversation.d.cts +2 -0
- package/dist/report/definition/primitives/conversation.d.mts +2 -0
- package/dist/report/definition/primitives/conversation.d.ts +2 -0
- package/dist/report/definition/primitives/turn-trace.cjs +53 -3
- package/dist/report/definition/primitives/turn-trace.cjs.map +1 -1
- package/dist/report/definition/primitives.cjs +14 -1
- package/dist/report/definition/primitives.cjs.map +1 -1
- package/dist/report/definition/report.cjs +16 -8
- package/dist/report/definition/report.cjs.map +1 -1
- package/dist/report/definition/report.d.cts +6 -0
- package/dist/report/definition/report.d.mts +6 -0
- package/dist/report/definition/report.d.ts +6 -0
- package/dist/report/definition/table-text.cjs +12 -3
- package/dist/report/definition/table-text.cjs.map +1 -1
- package/dist/report/definition/table-text.d.cts +6 -1
- package/dist/report/definition/table-text.d.mts +6 -1
- package/dist/report/definition/table-text.d.ts +6 -1
- package/dist/report/execution/model.cjs +6 -14
- package/dist/report/execution/model.cjs.map +1 -1
- package/dist/report/execution/model.d.cts +5 -10
- package/dist/report/execution/model.d.mts +5 -10
- package/dist/report/execution/model.d.ts +5 -10
- package/dist/report/execution/model.js +6 -6
- package/dist/report/execution/paths.cjs +0 -11
- package/dist/report/execution/paths.cjs.map +1 -1
- package/dist/report/execution/paths.d.cts +0 -1
- package/dist/report/execution/paths.d.mts +0 -1
- package/dist/report/execution/paths.d.ts +0 -1
- package/dist/report/execution/paths.js +6 -8
- package/dist/report/host/execute.cjs +13 -22
- package/dist/report/host/execute.cjs.map +1 -1
- package/dist/report/host/execute.d.cts +1 -4
- package/dist/report/host/execute.d.mts +1 -4
- package/dist/report/host/execute.d.ts +1 -4
- package/dist/report/host/from-record.cjs +3 -0
- package/dist/report/host/from-record.cjs.map +1 -1
- package/dist/report/host/from-record.d.cts +4 -1
- package/dist/report/host/from-record.d.mts +4 -1
- package/dist/report/host/from-record.d.ts +4 -1
- package/dist/report/host/site-assets.cjs +1 -2
- package/dist/report/host/site-assets.cjs.map +1 -1
- package/dist/report/host/site-assets.d.cts +0 -1
- package/dist/report/host/site-assets.d.mts +0 -1
- package/dist/report/host/site-assets.d.ts +0 -1
- package/dist/report/host/site-assets.js +2 -4
- package/dist/report/host/static.cjs +71 -346
- package/dist/report/host/static.cjs.map +1 -1
- package/dist/report/host/static.d.cts +1 -3
- package/dist/report/host/static.d.mts +1 -3
- package/dist/report/host/static.d.ts +1 -3
- package/dist/report/host/static.js +2 -2
- package/dist/report/host/view-session.cjs.map +1 -1
- package/dist/report/host/view-session.d.cts +1 -1
- package/dist/report/host/view-session.d.mts +1 -1
- package/dist/report/host/view-session.d.ts +1 -1
- package/dist/report/model/locale.cjs +1 -1
- package/dist/report/model/locale.cjs.map +1 -1
- package/dist/report/model/locale.d.cts +1 -1
- package/dist/report/model/locale.d.mts +1 -1
- package/dist/report/model/locale.d.ts +1 -1
- package/dist/report/model/pricing.cjs +2 -2
- package/dist/report/model/pricing.cjs.map +1 -1
- package/dist/report/react/enhance.js +5 -5
- package/dist/report/react/styles.css +190 -24
- package/dist/runner/adoption.cjs +4 -7
- package/dist/runner/adoption.cjs.map +1 -1
- package/dist/runner/attempt-resources.cjs +60 -0
- package/dist/runner/attempt-resources.cjs.map +1 -0
- package/dist/runner/attempt-resources.d.cts +13 -0
- package/dist/runner/attempt-resources.d.mts +13 -0
- package/dist/runner/attempt-resources.d.ts +13 -0
- package/dist/runner/attempt-resources.js +6 -0
- package/dist/runner/attempt-resources.js.map +1 -0
- package/dist/runner/attempt.cjs +37 -3
- package/dist/runner/attempt.cjs.map +1 -1
- package/dist/runner/feedback/failure.cjs +77 -2
- package/dist/runner/feedback/failure.cjs.map +1 -1
- package/dist/runner/feedback/failure.d.cts +2 -1
- package/dist/runner/feedback/failure.d.mts +2 -1
- package/dist/runner/feedback/failure.d.ts +2 -1
- package/dist/runner/project-current.cjs +2 -13
- package/dist/runner/project-current.cjs.map +1 -1
- package/dist/runner/project-current.d.cts +4 -2
- package/dist/runner/project-current.d.mts +4 -2
- package/dist/runner/project-current.d.ts +4 -2
- package/dist/runner/reporters/braintrust.cjs +7 -7
- package/dist/runner/reporters/braintrust.cjs.map +1 -1
- package/dist/runner/reuse-readback.cjs +3 -4
- package/dist/runner/reuse-readback.cjs.map +1 -1
- package/dist/runner/run.cjs +5 -2
- package/dist/runner/run.cjs.map +1 -1
- package/dist/sandbox/backend.cjs +32 -2
- package/dist/sandbox/backend.cjs.map +1 -1
- package/dist/sandbox/backend.d.cts +12 -1
- package/dist/sandbox/backend.d.mts +12 -1
- package/dist/sandbox/backend.d.ts +12 -1
- package/dist/sandbox/backend.js +28 -22
- package/dist/sandbox/docker.cjs +140 -0
- package/dist/sandbox/docker.cjs.map +1 -1
- package/dist/sandbox/docker.d.cts +3 -1
- package/dist/sandbox/docker.d.mts +3 -1
- package/dist/sandbox/docker.d.ts +3 -1
- package/dist/sandbox/e2b.cjs +42 -0
- package/dist/sandbox/e2b.cjs.map +1 -1
- package/dist/sandbox/e2b.d.cts +2 -0
- package/dist/sandbox/e2b.d.mts +2 -0
- package/dist/sandbox/e2b.d.ts +2 -0
- package/dist/sandbox/local.cjs +64 -0
- package/dist/sandbox/local.cjs.map +1 -1
- package/dist/sandbox/local.d.cts +3 -1
- package/dist/sandbox/local.d.mts +3 -1
- package/dist/sandbox/local.d.ts +3 -1
- package/dist/sandbox/managed-process.cjs +49 -0
- package/dist/sandbox/managed-process.cjs.map +1 -0
- package/dist/sandbox/managed-process.d.cts +11 -0
- package/dist/sandbox/managed-process.d.mts +11 -0
- package/dist/sandbox/managed-process.d.ts +11 -0
- package/dist/sandbox/managed-process.js +6 -0
- package/dist/sandbox/managed-process.js.map +1 -0
- package/dist/sandbox/types.cjs.map +1 -1
- package/dist/sandbox/types.d.cts +24 -0
- package/dist/sandbox/types.d.mts +24 -0
- package/dist/sandbox/types.d.ts +24 -0
- package/dist/sandbox/vercel.cjs +1 -0
- package/dist/sandbox/vercel.cjs.map +1 -1
- package/dist/sandbox/vercel.d.cts +1 -0
- package/dist/sandbox/vercel.d.mts +1 -0
- package/dist/sandbox/vercel.d.ts +1 -0
- package/dist/view/server.cjs +2 -37
- package/dist/view/server.cjs.map +1 -1
- package/dist/view/server.d.cts +0 -3
- package/dist/view/server.d.mts +0 -3
- package/dist/view/server.d.ts +0 -3
- package/docs-site/zh/reference/builtin-agents.mdx +7 -7
- package/docs-site/zh/reference/official-adapters.mdx +4 -4
- package/docs-site/zh/reference/report-components.mdx +2 -2
- package/docs-site/zh/tutorials/configuration.mdx +2 -2
- package/docs-site/zh/tutorials/deploy-report-site.mdx +24 -2
- package/docs-site/zh/tutorials/publish-report.mdx +4 -4
- package/docs-site/zh/tutorials/sandbox-agent.mdx +5 -5
- package/docs-site/zh/tutorials/theming.mdx +2 -2
- package/package.json +4 -6
- package/dist/record/migration/index.cjs +0 -5
- package/dist/record/migration/index.cjs.map +0 -1
- package/dist/record/migration/index.d.cts +0 -11
- package/dist/record/migration/index.d.mts +0 -11
- package/dist/record/migration/index.d.ts +0 -11
- package/dist/record/migration/index.js +0 -6
- package/dist/record/migration/index.js.map +0 -1
- package/dist/report/host/site-runtime.cjs +0 -92
- package/dist/report/host/site-runtime.cjs.map +0 -1
- package/dist/report/host/site-runtime.d.cts +0 -9
- package/dist/report/host/site-runtime.d.mts +0 -9
- package/dist/report/host/site-runtime.d.ts +0 -9
- package/dist/report/host/site-runtime.js +0 -10
- package/dist/report/host/site-runtime.js.map +0 -1
- package/dist/view/client-dist/app.css +0 -2
- package/dist/view/client-dist/app.js +0 -49
- package/dist/view/data.cjs +0 -3
- package/dist/view/data.cjs.map +0 -1
- package/dist/view/data.d.cts +0 -9
- package/dist/view/data.d.mts +0 -9
- package/dist/view/data.d.ts +0 -9
- package/dist/view/data.js +0 -4
- package/dist/view/data.js.map +0 -1
- package/dist/view/index.cjs +0 -24
- package/dist/view/index.cjs.map +0 -1
- package/dist/view/index.d.cts +0 -9
- package/dist/view/index.d.mts +0 -9
- package/dist/view/index.d.ts +0 -9
- package/dist/view/index.js +0 -28
- package/dist/view/index.js.map +0 -1
- package/dist/view/report-view-cache.cjs +0 -200
- package/dist/view/report-view-cache.cjs.map +0 -1
- package/dist/view/report-view-cache.d.cts +0 -67
- package/dist/view/report-view-cache.d.mts +0 -67
- package/dist/view/report-view-cache.d.ts +0 -67
- package/dist/view/report-view-cache.js +0 -8
- package/dist/view/report-view-cache.js.map +0 -1
- package/dist/view/shared/types.cjs +0 -3
- package/dist/view/shared/types.cjs.map +0 -1
- package/dist/view/shared/types.d.cts +0 -51
- package/dist/view/shared/types.d.mts +0 -51
- package/dist/view/shared/types.d.ts +0 -51
- package/dist/view/shared/types.js +0 -4
- package/dist/view/shared/types.js.map +0 -1
- package/dist/view/site.cjs +0 -32
- package/dist/view/site.cjs.map +0 -1
- package/dist/view/site.d.cts +0 -24
- package/dist/view/site.d.mts +0 -24
- package/dist/view/site.d.ts +0 -24
- package/dist/view/site.js +0 -8
- package/dist/view/site.js.map +0 -1
- package/dist/view/styles.css +0 -170
- package/dist/view/template.html +0 -17
package/dist/agents/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { shared } from "./shared.js";
|
|
|
4
4
|
export type { Shared } from "./shared.js";
|
|
5
5
|
export { createNpmCliInstaller, agentBin } from "./npm-staged.js";
|
|
6
6
|
export type { NpmCliInstallerOptions } from "./npm-staged.js";
|
|
7
|
+
export { acquireManagedProcess } from "./managed-process.js";
|
|
7
8
|
export { completeEvidenceCoverage } from "../assertions/coverage.js";
|
|
8
9
|
export type { EvidenceCoverageStatus, EvidenceCoverageEntry, EvidenceCoverage, TurnEvidenceCoverage, } from "../types.js";
|
|
9
10
|
export { LOGICAL_COMMAND_NORMALIZER, commandProjection, normalizeLogicalCommand, notCommandProjection, opaqueCommandProjection, } from "../o11y/command-projection.js";
|
package/dist/agents/index.js
CHANGED
|
@@ -5,86 +5,88 @@ const __niceevalExport0 = __niceevalCanonical["BUILTIN_AGENTS"];
|
|
|
5
5
|
export { __niceevalExport0 as BUILTIN_AGENTS };
|
|
6
6
|
const __niceevalExport1 = __niceevalCanonical["LOGICAL_COMMAND_NORMALIZER"];
|
|
7
7
|
export { __niceevalExport1 as LOGICAL_COMMAND_NORMALIZER };
|
|
8
|
-
const __niceevalExport2 = __niceevalCanonical["
|
|
9
|
-
export { __niceevalExport2 as
|
|
10
|
-
const __niceevalExport3 = __niceevalCanonical["
|
|
11
|
-
export { __niceevalExport3 as
|
|
12
|
-
const __niceevalExport4 = __niceevalCanonical["
|
|
13
|
-
export { __niceevalExport4 as
|
|
14
|
-
const __niceevalExport5 = __niceevalCanonical["
|
|
15
|
-
export { __niceevalExport5 as
|
|
16
|
-
const __niceevalExport6 = __niceevalCanonical["
|
|
17
|
-
export { __niceevalExport6 as
|
|
18
|
-
const __niceevalExport7 = __niceevalCanonical["
|
|
19
|
-
export { __niceevalExport7 as
|
|
20
|
-
const __niceevalExport8 = __niceevalCanonical["
|
|
21
|
-
export { __niceevalExport8 as
|
|
22
|
-
const __niceevalExport9 = __niceevalCanonical["
|
|
23
|
-
export { __niceevalExport9 as
|
|
24
|
-
const __niceevalExport10 = __niceevalCanonical["
|
|
25
|
-
export { __niceevalExport10 as
|
|
26
|
-
const __niceevalExport11 = __niceevalCanonical["
|
|
27
|
-
export { __niceevalExport11 as
|
|
28
|
-
const __niceevalExport12 = __niceevalCanonical["
|
|
29
|
-
export { __niceevalExport12 as
|
|
30
|
-
const __niceevalExport13 = __niceevalCanonical["
|
|
31
|
-
export { __niceevalExport13 as
|
|
32
|
-
const __niceevalExport14 = __niceevalCanonical["
|
|
33
|
-
export { __niceevalExport14 as
|
|
34
|
-
const __niceevalExport15 = __niceevalCanonical["
|
|
35
|
-
export { __niceevalExport15 as
|
|
36
|
-
const __niceevalExport16 = __niceevalCanonical["
|
|
37
|
-
export { __niceevalExport16 as
|
|
38
|
-
const __niceevalExport17 = __niceevalCanonical["
|
|
39
|
-
export { __niceevalExport17 as
|
|
40
|
-
const __niceevalExport18 = __niceevalCanonical["
|
|
41
|
-
export { __niceevalExport18 as
|
|
42
|
-
const __niceevalExport19 = __niceevalCanonical["
|
|
43
|
-
export { __niceevalExport19 as
|
|
44
|
-
const __niceevalExport20 = __niceevalCanonical["
|
|
45
|
-
export { __niceevalExport20 as
|
|
46
|
-
const __niceevalExport21 = __niceevalCanonical["
|
|
47
|
-
export { __niceevalExport21 as
|
|
48
|
-
const __niceevalExport22 = __niceevalCanonical["
|
|
49
|
-
export { __niceevalExport22 as
|
|
50
|
-
const __niceevalExport23 = __niceevalCanonical["
|
|
51
|
-
export { __niceevalExport23 as
|
|
52
|
-
const __niceevalExport24 = __niceevalCanonical["
|
|
53
|
-
export { __niceevalExport24 as
|
|
54
|
-
const __niceevalExport25 = __niceevalCanonical["
|
|
55
|
-
export { __niceevalExport25 as
|
|
56
|
-
const __niceevalExport26 = __niceevalCanonical["
|
|
57
|
-
export { __niceevalExport26 as
|
|
58
|
-
const __niceevalExport27 = __niceevalCanonical["
|
|
59
|
-
export { __niceevalExport27 as
|
|
60
|
-
const __niceevalExport28 = __niceevalCanonical["
|
|
61
|
-
export { __niceevalExport28 as
|
|
62
|
-
const __niceevalExport29 = __niceevalCanonical["
|
|
63
|
-
export { __niceevalExport29 as
|
|
64
|
-
const __niceevalExport30 = __niceevalCanonical["
|
|
65
|
-
export { __niceevalExport30 as
|
|
66
|
-
const __niceevalExport31 = __niceevalCanonical["
|
|
67
|
-
export { __niceevalExport31 as
|
|
68
|
-
const __niceevalExport32 = __niceevalCanonical["
|
|
69
|
-
export { __niceevalExport32 as
|
|
70
|
-
const __niceevalExport33 = __niceevalCanonical["
|
|
71
|
-
export { __niceevalExport33 as
|
|
72
|
-
const __niceevalExport34 = __niceevalCanonical["
|
|
73
|
-
export { __niceevalExport34 as
|
|
74
|
-
const __niceevalExport35 = __niceevalCanonical["
|
|
75
|
-
export { __niceevalExport35 as
|
|
76
|
-
const __niceevalExport36 = __niceevalCanonical["
|
|
77
|
-
export { __niceevalExport36 as
|
|
78
|
-
const __niceevalExport37 = __niceevalCanonical["
|
|
79
|
-
export { __niceevalExport37 as
|
|
80
|
-
const __niceevalExport38 = __niceevalCanonical["
|
|
81
|
-
export { __niceevalExport38 as
|
|
82
|
-
const __niceevalExport39 = __niceevalCanonical["
|
|
83
|
-
export { __niceevalExport39 as
|
|
84
|
-
const __niceevalExport40 = __niceevalCanonical["
|
|
85
|
-
export { __niceevalExport40 as
|
|
86
|
-
const __niceevalExport41 = __niceevalCanonical["
|
|
87
|
-
export { __niceevalExport41 as
|
|
88
|
-
const __niceevalExport42 = __niceevalCanonical["
|
|
89
|
-
export { __niceevalExport42 as
|
|
8
|
+
const __niceevalExport2 = __niceevalCanonical["acquireManagedProcess"];
|
|
9
|
+
export { __niceevalExport2 as acquireManagedProcess };
|
|
10
|
+
const __niceevalExport3 = __niceevalCanonical["agentBin"];
|
|
11
|
+
export { __niceevalExport3 as agentBin };
|
|
12
|
+
const __niceevalExport4 = __niceevalCanonical["aiSdkAgent"];
|
|
13
|
+
export { __niceevalExport4 as aiSdkAgent };
|
|
14
|
+
const __niceevalExport5 = __niceevalCanonical["bubAgent"];
|
|
15
|
+
export { __niceevalExport5 as bubAgent };
|
|
16
|
+
const __niceevalExport6 = __niceevalCanonical["chatCompletionEvidenceCoverage"];
|
|
17
|
+
export { __niceevalExport6 as chatCompletionEvidenceCoverage };
|
|
18
|
+
const __niceevalExport7 = __niceevalCanonical["claudeCodeAgent"];
|
|
19
|
+
export { __niceevalExport7 as claudeCodeAgent };
|
|
20
|
+
const __niceevalExport8 = __niceevalCanonical["codexAgent"];
|
|
21
|
+
export { __niceevalExport8 as codexAgent };
|
|
22
|
+
const __niceevalExport9 = __niceevalCanonical["commandProjection"];
|
|
23
|
+
export { __niceevalExport9 as commandProjection };
|
|
24
|
+
const __niceevalExport10 = __niceevalCanonical["completeEvidenceCoverage"];
|
|
25
|
+
export { __niceevalExport10 as completeEvidenceCoverage };
|
|
26
|
+
const __niceevalExport11 = __niceevalCanonical["createClaudeSdkEventStream"];
|
|
27
|
+
export { __niceevalExport11 as createClaudeSdkEventStream };
|
|
28
|
+
const __niceevalExport12 = __niceevalCanonical["createCodexThreadEventStream"];
|
|
29
|
+
export { __niceevalExport12 as createCodexThreadEventStream };
|
|
30
|
+
const __niceevalExport13 = __niceevalCanonical["createLangGraphEventStream"];
|
|
31
|
+
export { __niceevalExport13 as createLangGraphEventStream };
|
|
32
|
+
const __niceevalExport14 = __niceevalCanonical["createNpmCliInstaller"];
|
|
33
|
+
export { __niceevalExport14 as createNpmCliInstaller };
|
|
34
|
+
const __niceevalExport15 = __niceevalCanonical["createPiAgentEventStream"];
|
|
35
|
+
export { __niceevalExport15 as createPiAgentEventStream };
|
|
36
|
+
const __niceevalExport16 = __niceevalCanonical["createSessionSlot"];
|
|
37
|
+
export { __niceevalExport16 as createSessionSlot };
|
|
38
|
+
const __niceevalExport17 = __niceevalCanonical["deepSeekHarnessAgent"];
|
|
39
|
+
export { __niceevalExport17 as deepSeekHarnessAgent };
|
|
40
|
+
const __niceevalExport18 = __niceevalCanonical["defineAgent"];
|
|
41
|
+
export { __niceevalExport18 as defineAgent };
|
|
42
|
+
const __niceevalExport19 = __niceevalCanonical["defineSandboxAgent"];
|
|
43
|
+
export { __niceevalExport19 as defineSandboxAgent };
|
|
44
|
+
const __niceevalExport20 = __niceevalCanonical["deltaStream"];
|
|
45
|
+
export { __niceevalExport20 as deltaStream };
|
|
46
|
+
const __niceevalExport21 = __niceevalCanonical["driveFrameStream"];
|
|
47
|
+
export { __niceevalExport21 as driveFrameStream };
|
|
48
|
+
const __niceevalExport22 = __niceevalCanonical["externalCauseMessageChain"];
|
|
49
|
+
export { __niceevalExport22 as externalCauseMessageChain };
|
|
50
|
+
const __niceevalExport23 = __niceevalCanonical["externalCauseText"];
|
|
51
|
+
export { __niceevalExport23 as externalCauseText };
|
|
52
|
+
const __niceevalExport24 = __niceevalCanonical["hermesAgent"];
|
|
53
|
+
export { __niceevalExport24 as hermesAgent };
|
|
54
|
+
const __niceevalExport25 = __niceevalCanonical["heuristicTag"];
|
|
55
|
+
export { __niceevalExport25 as heuristicTag };
|
|
56
|
+
const __niceevalExport26 = __niceevalCanonical["makeSendFailure"];
|
|
57
|
+
export { __niceevalExport26 as makeSendFailure };
|
|
58
|
+
const __niceevalExport27 = __niceevalCanonical["mapCodexSpans"];
|
|
59
|
+
export { __niceevalExport27 as mapCodexSpans };
|
|
60
|
+
const __niceevalExport28 = __niceevalCanonical["normalizeExternalCause"];
|
|
61
|
+
export { __niceevalExport28 as normalizeExternalCause };
|
|
62
|
+
const __niceevalExport29 = __niceevalCanonical["normalizeLogicalCommand"];
|
|
63
|
+
export { __niceevalExport29 as normalizeLogicalCommand };
|
|
64
|
+
const __niceevalExport30 = __niceevalCanonical["notCommandProjection"];
|
|
65
|
+
export { __niceevalExport30 as notCommandProjection };
|
|
66
|
+
const __niceevalExport31 = __niceevalCanonical["ompAgent"];
|
|
67
|
+
export { __niceevalExport31 as ompAgent };
|
|
68
|
+
const __niceevalExport32 = __niceevalCanonical["opaqueCommandProjection"];
|
|
69
|
+
export { __niceevalExport32 as opaqueCommandProjection };
|
|
70
|
+
const __niceevalExport33 = __niceevalCanonical["openClawAgent"];
|
|
71
|
+
export { __niceevalExport33 as openClawAgent };
|
|
72
|
+
const __niceevalExport34 = __niceevalCanonical["openCodeAgent"];
|
|
73
|
+
export { __niceevalExport34 as openCodeAgent };
|
|
74
|
+
const __niceevalExport35 = __niceevalCanonical["responsesEvidenceCoverage"];
|
|
75
|
+
export { __niceevalExport35 as responsesEvidenceCoverage };
|
|
76
|
+
const __niceevalExport36 = __niceevalCanonical["sendFailureText"];
|
|
77
|
+
export { __niceevalExport36 as sendFailureText };
|
|
78
|
+
const __niceevalExport37 = __niceevalCanonical["shared"];
|
|
79
|
+
export { __niceevalExport37 as shared };
|
|
80
|
+
const __niceevalExport38 = __niceevalCanonical["sseJsonFrames"];
|
|
81
|
+
export { __niceevalExport38 as sseJsonFrames };
|
|
82
|
+
const __niceevalExport39 = __niceevalCanonical["tagSpan"];
|
|
83
|
+
export { __niceevalExport39 as tagSpan };
|
|
84
|
+
const __niceevalExport40 = __niceevalCanonical["turnFromAiSdk"];
|
|
85
|
+
export { __niceevalExport40 as turnFromAiSdk };
|
|
86
|
+
const __niceevalExport41 = __niceevalCanonical["turnFromChatCompletion"];
|
|
87
|
+
export { __niceevalExport41 as turnFromChatCompletion };
|
|
88
|
+
const __niceevalExport42 = __niceevalCanonical["turnFromResponses"];
|
|
89
|
+
export { __niceevalExport42 as turnFromResponses };
|
|
90
|
+
const __niceevalExport43 = __niceevalCanonical["uiMessageStreamAgent"];
|
|
91
|
+
export { __niceevalExport43 as uiMessageStreamAgent };
|
|
90
92
|
//# sourceMappingURL=index.js.map
|
package/dist/agents/index.mjs
CHANGED
|
@@ -5,86 +5,88 @@ const __niceevalExport0 = __niceevalCanonical["BUILTIN_AGENTS"];
|
|
|
5
5
|
export { __niceevalExport0 as BUILTIN_AGENTS };
|
|
6
6
|
const __niceevalExport1 = __niceevalCanonical["LOGICAL_COMMAND_NORMALIZER"];
|
|
7
7
|
export { __niceevalExport1 as LOGICAL_COMMAND_NORMALIZER };
|
|
8
|
-
const __niceevalExport2 = __niceevalCanonical["
|
|
9
|
-
export { __niceevalExport2 as
|
|
10
|
-
const __niceevalExport3 = __niceevalCanonical["
|
|
11
|
-
export { __niceevalExport3 as
|
|
12
|
-
const __niceevalExport4 = __niceevalCanonical["
|
|
13
|
-
export { __niceevalExport4 as
|
|
14
|
-
const __niceevalExport5 = __niceevalCanonical["
|
|
15
|
-
export { __niceevalExport5 as
|
|
16
|
-
const __niceevalExport6 = __niceevalCanonical["
|
|
17
|
-
export { __niceevalExport6 as
|
|
18
|
-
const __niceevalExport7 = __niceevalCanonical["
|
|
19
|
-
export { __niceevalExport7 as
|
|
20
|
-
const __niceevalExport8 = __niceevalCanonical["
|
|
21
|
-
export { __niceevalExport8 as
|
|
22
|
-
const __niceevalExport9 = __niceevalCanonical["
|
|
23
|
-
export { __niceevalExport9 as
|
|
24
|
-
const __niceevalExport10 = __niceevalCanonical["
|
|
25
|
-
export { __niceevalExport10 as
|
|
26
|
-
const __niceevalExport11 = __niceevalCanonical["
|
|
27
|
-
export { __niceevalExport11 as
|
|
28
|
-
const __niceevalExport12 = __niceevalCanonical["
|
|
29
|
-
export { __niceevalExport12 as
|
|
30
|
-
const __niceevalExport13 = __niceevalCanonical["
|
|
31
|
-
export { __niceevalExport13 as
|
|
32
|
-
const __niceevalExport14 = __niceevalCanonical["
|
|
33
|
-
export { __niceevalExport14 as
|
|
34
|
-
const __niceevalExport15 = __niceevalCanonical["
|
|
35
|
-
export { __niceevalExport15 as
|
|
36
|
-
const __niceevalExport16 = __niceevalCanonical["
|
|
37
|
-
export { __niceevalExport16 as
|
|
38
|
-
const __niceevalExport17 = __niceevalCanonical["
|
|
39
|
-
export { __niceevalExport17 as
|
|
40
|
-
const __niceevalExport18 = __niceevalCanonical["
|
|
41
|
-
export { __niceevalExport18 as
|
|
42
|
-
const __niceevalExport19 = __niceevalCanonical["
|
|
43
|
-
export { __niceevalExport19 as
|
|
44
|
-
const __niceevalExport20 = __niceevalCanonical["
|
|
45
|
-
export { __niceevalExport20 as
|
|
46
|
-
const __niceevalExport21 = __niceevalCanonical["
|
|
47
|
-
export { __niceevalExport21 as
|
|
48
|
-
const __niceevalExport22 = __niceevalCanonical["
|
|
49
|
-
export { __niceevalExport22 as
|
|
50
|
-
const __niceevalExport23 = __niceevalCanonical["
|
|
51
|
-
export { __niceevalExport23 as
|
|
52
|
-
const __niceevalExport24 = __niceevalCanonical["
|
|
53
|
-
export { __niceevalExport24 as
|
|
54
|
-
const __niceevalExport25 = __niceevalCanonical["
|
|
55
|
-
export { __niceevalExport25 as
|
|
56
|
-
const __niceevalExport26 = __niceevalCanonical["
|
|
57
|
-
export { __niceevalExport26 as
|
|
58
|
-
const __niceevalExport27 = __niceevalCanonical["
|
|
59
|
-
export { __niceevalExport27 as
|
|
60
|
-
const __niceevalExport28 = __niceevalCanonical["
|
|
61
|
-
export { __niceevalExport28 as
|
|
62
|
-
const __niceevalExport29 = __niceevalCanonical["
|
|
63
|
-
export { __niceevalExport29 as
|
|
64
|
-
const __niceevalExport30 = __niceevalCanonical["
|
|
65
|
-
export { __niceevalExport30 as
|
|
66
|
-
const __niceevalExport31 = __niceevalCanonical["
|
|
67
|
-
export { __niceevalExport31 as
|
|
68
|
-
const __niceevalExport32 = __niceevalCanonical["
|
|
69
|
-
export { __niceevalExport32 as
|
|
70
|
-
const __niceevalExport33 = __niceevalCanonical["
|
|
71
|
-
export { __niceevalExport33 as
|
|
72
|
-
const __niceevalExport34 = __niceevalCanonical["
|
|
73
|
-
export { __niceevalExport34 as
|
|
74
|
-
const __niceevalExport35 = __niceevalCanonical["
|
|
75
|
-
export { __niceevalExport35 as
|
|
76
|
-
const __niceevalExport36 = __niceevalCanonical["
|
|
77
|
-
export { __niceevalExport36 as
|
|
78
|
-
const __niceevalExport37 = __niceevalCanonical["
|
|
79
|
-
export { __niceevalExport37 as
|
|
80
|
-
const __niceevalExport38 = __niceevalCanonical["
|
|
81
|
-
export { __niceevalExport38 as
|
|
82
|
-
const __niceevalExport39 = __niceevalCanonical["
|
|
83
|
-
export { __niceevalExport39 as
|
|
84
|
-
const __niceevalExport40 = __niceevalCanonical["
|
|
85
|
-
export { __niceevalExport40 as
|
|
86
|
-
const __niceevalExport41 = __niceevalCanonical["
|
|
87
|
-
export { __niceevalExport41 as
|
|
88
|
-
const __niceevalExport42 = __niceevalCanonical["
|
|
89
|
-
export { __niceevalExport42 as
|
|
8
|
+
const __niceevalExport2 = __niceevalCanonical["acquireManagedProcess"];
|
|
9
|
+
export { __niceevalExport2 as acquireManagedProcess };
|
|
10
|
+
const __niceevalExport3 = __niceevalCanonical["agentBin"];
|
|
11
|
+
export { __niceevalExport3 as agentBin };
|
|
12
|
+
const __niceevalExport4 = __niceevalCanonical["aiSdkAgent"];
|
|
13
|
+
export { __niceevalExport4 as aiSdkAgent };
|
|
14
|
+
const __niceevalExport5 = __niceevalCanonical["bubAgent"];
|
|
15
|
+
export { __niceevalExport5 as bubAgent };
|
|
16
|
+
const __niceevalExport6 = __niceevalCanonical["chatCompletionEvidenceCoverage"];
|
|
17
|
+
export { __niceevalExport6 as chatCompletionEvidenceCoverage };
|
|
18
|
+
const __niceevalExport7 = __niceevalCanonical["claudeCodeAgent"];
|
|
19
|
+
export { __niceevalExport7 as claudeCodeAgent };
|
|
20
|
+
const __niceevalExport8 = __niceevalCanonical["codexAgent"];
|
|
21
|
+
export { __niceevalExport8 as codexAgent };
|
|
22
|
+
const __niceevalExport9 = __niceevalCanonical["commandProjection"];
|
|
23
|
+
export { __niceevalExport9 as commandProjection };
|
|
24
|
+
const __niceevalExport10 = __niceevalCanonical["completeEvidenceCoverage"];
|
|
25
|
+
export { __niceevalExport10 as completeEvidenceCoverage };
|
|
26
|
+
const __niceevalExport11 = __niceevalCanonical["createClaudeSdkEventStream"];
|
|
27
|
+
export { __niceevalExport11 as createClaudeSdkEventStream };
|
|
28
|
+
const __niceevalExport12 = __niceevalCanonical["createCodexThreadEventStream"];
|
|
29
|
+
export { __niceevalExport12 as createCodexThreadEventStream };
|
|
30
|
+
const __niceevalExport13 = __niceevalCanonical["createLangGraphEventStream"];
|
|
31
|
+
export { __niceevalExport13 as createLangGraphEventStream };
|
|
32
|
+
const __niceevalExport14 = __niceevalCanonical["createNpmCliInstaller"];
|
|
33
|
+
export { __niceevalExport14 as createNpmCliInstaller };
|
|
34
|
+
const __niceevalExport15 = __niceevalCanonical["createPiAgentEventStream"];
|
|
35
|
+
export { __niceevalExport15 as createPiAgentEventStream };
|
|
36
|
+
const __niceevalExport16 = __niceevalCanonical["createSessionSlot"];
|
|
37
|
+
export { __niceevalExport16 as createSessionSlot };
|
|
38
|
+
const __niceevalExport17 = __niceevalCanonical["deepSeekHarnessAgent"];
|
|
39
|
+
export { __niceevalExport17 as deepSeekHarnessAgent };
|
|
40
|
+
const __niceevalExport18 = __niceevalCanonical["defineAgent"];
|
|
41
|
+
export { __niceevalExport18 as defineAgent };
|
|
42
|
+
const __niceevalExport19 = __niceevalCanonical["defineSandboxAgent"];
|
|
43
|
+
export { __niceevalExport19 as defineSandboxAgent };
|
|
44
|
+
const __niceevalExport20 = __niceevalCanonical["deltaStream"];
|
|
45
|
+
export { __niceevalExport20 as deltaStream };
|
|
46
|
+
const __niceevalExport21 = __niceevalCanonical["driveFrameStream"];
|
|
47
|
+
export { __niceevalExport21 as driveFrameStream };
|
|
48
|
+
const __niceevalExport22 = __niceevalCanonical["externalCauseMessageChain"];
|
|
49
|
+
export { __niceevalExport22 as externalCauseMessageChain };
|
|
50
|
+
const __niceevalExport23 = __niceevalCanonical["externalCauseText"];
|
|
51
|
+
export { __niceevalExport23 as externalCauseText };
|
|
52
|
+
const __niceevalExport24 = __niceevalCanonical["hermesAgent"];
|
|
53
|
+
export { __niceevalExport24 as hermesAgent };
|
|
54
|
+
const __niceevalExport25 = __niceevalCanonical["heuristicTag"];
|
|
55
|
+
export { __niceevalExport25 as heuristicTag };
|
|
56
|
+
const __niceevalExport26 = __niceevalCanonical["makeSendFailure"];
|
|
57
|
+
export { __niceevalExport26 as makeSendFailure };
|
|
58
|
+
const __niceevalExport27 = __niceevalCanonical["mapCodexSpans"];
|
|
59
|
+
export { __niceevalExport27 as mapCodexSpans };
|
|
60
|
+
const __niceevalExport28 = __niceevalCanonical["normalizeExternalCause"];
|
|
61
|
+
export { __niceevalExport28 as normalizeExternalCause };
|
|
62
|
+
const __niceevalExport29 = __niceevalCanonical["normalizeLogicalCommand"];
|
|
63
|
+
export { __niceevalExport29 as normalizeLogicalCommand };
|
|
64
|
+
const __niceevalExport30 = __niceevalCanonical["notCommandProjection"];
|
|
65
|
+
export { __niceevalExport30 as notCommandProjection };
|
|
66
|
+
const __niceevalExport31 = __niceevalCanonical["ompAgent"];
|
|
67
|
+
export { __niceevalExport31 as ompAgent };
|
|
68
|
+
const __niceevalExport32 = __niceevalCanonical["opaqueCommandProjection"];
|
|
69
|
+
export { __niceevalExport32 as opaqueCommandProjection };
|
|
70
|
+
const __niceevalExport33 = __niceevalCanonical["openClawAgent"];
|
|
71
|
+
export { __niceevalExport33 as openClawAgent };
|
|
72
|
+
const __niceevalExport34 = __niceevalCanonical["openCodeAgent"];
|
|
73
|
+
export { __niceevalExport34 as openCodeAgent };
|
|
74
|
+
const __niceevalExport35 = __niceevalCanonical["responsesEvidenceCoverage"];
|
|
75
|
+
export { __niceevalExport35 as responsesEvidenceCoverage };
|
|
76
|
+
const __niceevalExport36 = __niceevalCanonical["sendFailureText"];
|
|
77
|
+
export { __niceevalExport36 as sendFailureText };
|
|
78
|
+
const __niceevalExport37 = __niceevalCanonical["shared"];
|
|
79
|
+
export { __niceevalExport37 as shared };
|
|
80
|
+
const __niceevalExport38 = __niceevalCanonical["sseJsonFrames"];
|
|
81
|
+
export { __niceevalExport38 as sseJsonFrames };
|
|
82
|
+
const __niceevalExport39 = __niceevalCanonical["tagSpan"];
|
|
83
|
+
export { __niceevalExport39 as tagSpan };
|
|
84
|
+
const __niceevalExport40 = __niceevalCanonical["turnFromAiSdk"];
|
|
85
|
+
export { __niceevalExport40 as turnFromAiSdk };
|
|
86
|
+
const __niceevalExport41 = __niceevalCanonical["turnFromChatCompletion"];
|
|
87
|
+
export { __niceevalExport41 as turnFromChatCompletion };
|
|
88
|
+
const __niceevalExport42 = __niceevalCanonical["turnFromResponses"];
|
|
89
|
+
export { __niceevalExport42 as turnFromResponses };
|
|
90
|
+
const __niceevalExport43 = __niceevalCanonical["uiMessageStreamAgent"];
|
|
91
|
+
export { __niceevalExport43 as uiMessageStreamAgent };
|
|
90
92
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ManagedJsonlDriver = void 0;
|
|
4
|
+
const backend_ts_1 = require("../sandbox/backend.cjs");
|
|
5
|
+
const encoder = new TextEncoder();
|
|
6
|
+
function timeout(promise, milliseconds) {
|
|
7
|
+
return new Promise((resolve, reject) => {
|
|
8
|
+
const timer = setTimeout(() => reject(new Error(`managed process did not exit within ${milliseconds}ms`)), milliseconds);
|
|
9
|
+
promise.then((value) => { clearTimeout(timer); resolve(value); }, (error) => { clearTimeout(timer); reject(error); });
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
class ManagedJsonlDriver {
|
|
13
|
+
process;
|
|
14
|
+
shutdownFrame;
|
|
15
|
+
onFrame;
|
|
16
|
+
frames = [];
|
|
17
|
+
waiters = new Set();
|
|
18
|
+
stderrText = "";
|
|
19
|
+
outputFailure;
|
|
20
|
+
state = "open";
|
|
21
|
+
revision = 0;
|
|
22
|
+
shutdownReceipt;
|
|
23
|
+
releaseReceipt;
|
|
24
|
+
writes = Promise.resolve();
|
|
25
|
+
exit;
|
|
26
|
+
observedExit;
|
|
27
|
+
constructor(process, shutdownFrame, onFrame) {
|
|
28
|
+
this.process = process;
|
|
29
|
+
this.shutdownFrame = shutdownFrame;
|
|
30
|
+
this.onFrame = onFrame;
|
|
31
|
+
this.exit = process.wait().then((receipt) => {
|
|
32
|
+
this.observedExit = receipt;
|
|
33
|
+
this.state = "closed";
|
|
34
|
+
return receipt;
|
|
35
|
+
});
|
|
36
|
+
void this.consume();
|
|
37
|
+
}
|
|
38
|
+
static async start(sandbox, agent, resources, input, shutdownFrame, onFrame) {
|
|
39
|
+
const startProcess = (0, backend_ts_1.requireManagedProcessCapability)(sandbox, agent);
|
|
40
|
+
return resources.acquire(async () => {
|
|
41
|
+
const process = await startProcess(input);
|
|
42
|
+
try {
|
|
43
|
+
return new ManagedJsonlDriver(process, shutdownFrame, onFrame);
|
|
44
|
+
}
|
|
45
|
+
catch (cause) {
|
|
46
|
+
// The process exists but the registry has not received a Driver yet.
|
|
47
|
+
// Close this constructor gap locally with the same bounded cleanup.
|
|
48
|
+
await process.closeStdin().catch(() => undefined);
|
|
49
|
+
await process.terminate().catch(() => undefined);
|
|
50
|
+
await timeout(process.wait(), 2000).catch(() => undefined);
|
|
51
|
+
throw cause;
|
|
52
|
+
}
|
|
53
|
+
}, {
|
|
54
|
+
shutdown: (driver) => driver.shutdown(),
|
|
55
|
+
release: (driver) => driver.release(),
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
cursor() { return this.frames.length; }
|
|
59
|
+
stderr() { return this.stderrText; }
|
|
60
|
+
processReceipt() {
|
|
61
|
+
return {
|
|
62
|
+
...(this.observedExit?.exitCode == null ? {} : { exitCode: this.observedExit.exitCode }),
|
|
63
|
+
...(this.observedExit?.signal === undefined ? {} : { signal: this.observedExit.signal }),
|
|
64
|
+
stderr: this.stderrText,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
async write(value) {
|
|
68
|
+
if (this.state !== "open")
|
|
69
|
+
throw new Error("managed process stdin is closing or closed");
|
|
70
|
+
const receipt = this.writes.then(() => this.writeRaw(value));
|
|
71
|
+
this.writes = receipt.catch(() => undefined);
|
|
72
|
+
await receipt;
|
|
73
|
+
}
|
|
74
|
+
async waitFor(cursor, accept, signal) {
|
|
75
|
+
let next = cursor;
|
|
76
|
+
for (;;) {
|
|
77
|
+
while (next < this.frames.length) {
|
|
78
|
+
const frame = this.frames[next++];
|
|
79
|
+
if (accept(frame))
|
|
80
|
+
return { frame, cursor: next };
|
|
81
|
+
}
|
|
82
|
+
if (this.outputFailure !== undefined)
|
|
83
|
+
throw this.outputFailure;
|
|
84
|
+
const observedRevision = this.revision;
|
|
85
|
+
const outcome = await Promise.race([
|
|
86
|
+
this.waitForChange(observedRevision, signal).then(() => ({ exited: false })),
|
|
87
|
+
this.exit.then((receipt) => ({ exited: true, receipt })),
|
|
88
|
+
]);
|
|
89
|
+
if (outcome.exited && next >= this.frames.length) {
|
|
90
|
+
throw new Error(`managed process exited before the expected protocol frame (exitCode=${outcome.receipt.exitCode ?? "null"}, signal=${outcome.receipt.signal ?? "none"})${this.stderrText ? `: ${this.stderrText.slice(-1000)}` : ""}`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
framesSince(cursor) { return this.frames.slice(cursor); }
|
|
95
|
+
frameKinds() {
|
|
96
|
+
return this.frames.slice(-12).map((value) => {
|
|
97
|
+
if (value === null || typeof value !== "object" || Array.isArray(value))
|
|
98
|
+
return typeof value;
|
|
99
|
+
const frame = value;
|
|
100
|
+
return String(frame.type ?? frame.method ?? (frame.id === undefined ? "object" : `response:${String(frame.id)}`));
|
|
101
|
+
}).join(",");
|
|
102
|
+
}
|
|
103
|
+
shutdown() {
|
|
104
|
+
return this.shutdownReceipt ??= (async () => {
|
|
105
|
+
if (this.state !== "open")
|
|
106
|
+
return;
|
|
107
|
+
this.state = "closing";
|
|
108
|
+
await this.writes;
|
|
109
|
+
const frame = this.shutdownFrame?.();
|
|
110
|
+
if (frame !== undefined)
|
|
111
|
+
await this.writeRaw(frame).catch(() => undefined);
|
|
112
|
+
await this.process.closeStdin().catch(() => undefined);
|
|
113
|
+
this.state = "closed";
|
|
114
|
+
})();
|
|
115
|
+
}
|
|
116
|
+
release() {
|
|
117
|
+
return this.releaseReceipt ??= (async () => {
|
|
118
|
+
await this.shutdown();
|
|
119
|
+
try {
|
|
120
|
+
await timeout(this.exit, 2000);
|
|
121
|
+
}
|
|
122
|
+
catch {
|
|
123
|
+
await this.process.terminate();
|
|
124
|
+
await timeout(this.exit, 2000);
|
|
125
|
+
}
|
|
126
|
+
})();
|
|
127
|
+
}
|
|
128
|
+
async consume() {
|
|
129
|
+
const stdoutDecoder = new TextDecoder();
|
|
130
|
+
const stderrDecoder = new TextDecoder();
|
|
131
|
+
let stdout = "";
|
|
132
|
+
try {
|
|
133
|
+
for await (const chunk of this.process.output) {
|
|
134
|
+
if (chunk._tag === "Stderr") {
|
|
135
|
+
this.stderrText += stderrDecoder.decode(chunk.bytes, { stream: true });
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
stdout += stdoutDecoder.decode(chunk.bytes, { stream: true });
|
|
139
|
+
for (;;) {
|
|
140
|
+
const newline = stdout.indexOf("\n");
|
|
141
|
+
if (newline < 0)
|
|
142
|
+
break;
|
|
143
|
+
const line = stdout.slice(0, newline).trim();
|
|
144
|
+
stdout = stdout.slice(newline + 1);
|
|
145
|
+
if (!line)
|
|
146
|
+
continue;
|
|
147
|
+
const frame = JSON.parse(line);
|
|
148
|
+
this.frames.push(frame);
|
|
149
|
+
this.onFrame?.(frame);
|
|
150
|
+
this.notify();
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
const tail = `${stdout}${stdoutDecoder.decode()}`.trim();
|
|
154
|
+
if (tail) {
|
|
155
|
+
const frame = JSON.parse(tail);
|
|
156
|
+
this.frames.push(frame);
|
|
157
|
+
this.onFrame?.(frame);
|
|
158
|
+
this.notify();
|
|
159
|
+
}
|
|
160
|
+
this.stderrText += stderrDecoder.decode();
|
|
161
|
+
}
|
|
162
|
+
catch (error) {
|
|
163
|
+
this.outputFailure = error;
|
|
164
|
+
}
|
|
165
|
+
finally {
|
|
166
|
+
this.notify();
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
writeRaw(value) {
|
|
170
|
+
return this.process.writeStdin(encoder.encode(`${JSON.stringify(value)}\n`));
|
|
171
|
+
}
|
|
172
|
+
waitForChange(observedRevision, signal) {
|
|
173
|
+
if (signal.aborted)
|
|
174
|
+
return Promise.reject(signal.reason);
|
|
175
|
+
return new Promise((resolve, reject) => {
|
|
176
|
+
let settled = false;
|
|
177
|
+
const cleanup = () => { signal.removeEventListener("abort", aborted); this.waiters.delete(done); };
|
|
178
|
+
const done = () => {
|
|
179
|
+
if (settled)
|
|
180
|
+
return;
|
|
181
|
+
settled = true;
|
|
182
|
+
cleanup();
|
|
183
|
+
resolve();
|
|
184
|
+
};
|
|
185
|
+
const aborted = () => {
|
|
186
|
+
if (settled)
|
|
187
|
+
return;
|
|
188
|
+
settled = true;
|
|
189
|
+
cleanup();
|
|
190
|
+
reject(signal.reason);
|
|
191
|
+
};
|
|
192
|
+
this.waiters.add(done);
|
|
193
|
+
signal.addEventListener("abort", aborted, { once: true });
|
|
194
|
+
if (signal.aborted)
|
|
195
|
+
aborted();
|
|
196
|
+
else if (this.revision !== observedRevision)
|
|
197
|
+
done();
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
notify() {
|
|
201
|
+
this.revision += 1;
|
|
202
|
+
for (const waiter of [...this.waiters])
|
|
203
|
+
waiter();
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
exports.ManagedJsonlDriver = ManagedJsonlDriver;
|
|
207
|
+
//# sourceMappingURL=managed-jsonl.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"managed-jsonl.js","sourceRoot":"","sources":["managed-jsonl.ts"],"names":[],"mappings":";;;AACA,sDAAwE;AACxE,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;AAClC,SAAS,OAAO,CAAI,OAAmB,EAAE,YAAoB;IACzD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACnC,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,uCAAuC,YAAY,IAAI,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;QACzH,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1H,CAAC,CAAC,CAAC;AACP,CAAC;AACD,MAAa,kBAAkB;IAYU;IAA0C;IAAyE;IAXvI,MAAM,GAAc,EAAE,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MAAM,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC;YAClC,MAAM,EAAE,CAAC;IACjB,CAAC;CACJ;AAlMD,gDAkMC","sourcesContent":["import type { AgentContext, ManagedProcess, ManagedProcessStart, Sandbox } from \"../types.ts\";\nimport { requireManagedProcessCapability } from \"../sandbox/backend.ts\";\nconst encoder = new TextEncoder();\nfunction timeout<T>(promise: Promise<T>, milliseconds: number): Promise<T> {\n return new Promise((resolve, reject) => {\n const timer = setTimeout(() => reject(new Error(`managed process did not exit within ${milliseconds}ms`)), milliseconds);\n promise.then((value) => { clearTimeout(timer); resolve(value); }, (error) => { clearTimeout(timer); reject(error); });\n });\n}\nexport class ManagedJsonlDriver {\n private readonly frames: unknown[] = [];\n private readonly waiters = new Set<() => void>();\n private stderrText = \"\";\n private outputFailure: unknown;\n private state: \"open\" | \"closing\" | \"closed\" = \"open\";\n private revision = 0;\n private shutdownReceipt?: Promise<void>;\n private releaseReceipt?: Promise<void>;\n private writes: Promise<void> = Promise.resolve();\n private readonly exit: ReturnType<ManagedProcess[\"wait\"]>;\n private observedExit?: Awaited<ReturnType<ManagedProcess[\"wait\"]>>;\n private constructor(private readonly process: ManagedProcess, private readonly shutdownFrame: (() => unknown | undefined) | undefined, private readonly onFrame: ((frame: unknown) => void) | undefined) {\n this.exit = process.wait().then((receipt) => {\n this.observedExit = receipt;\n this.state = \"closed\";\n return receipt;\n });\n void this.consume();\n }\n static async start(sandbox: Sandbox, agent: string, resources: import(\"../types.ts\").AttemptResourceRegistry, input: ManagedProcessStart, shutdownFrame?: () => unknown | undefined, onFrame?: (frame: unknown) => void): Promise<ManagedJsonlDriver> {\n const startProcess = requireManagedProcessCapability(sandbox, agent);\n return resources.acquire(async () => {\n const process = await startProcess(input);\n try {\n return new ManagedJsonlDriver(process, shutdownFrame, onFrame);\n }\n catch (cause) {\n // The process exists but the registry has not received a Driver yet.\n // Close this constructor gap locally with the same bounded cleanup.\n await process.closeStdin().catch(() => undefined);\n await process.terminate().catch(() => undefined);\n await timeout(process.wait(), 2000).catch(() => undefined);\n throw cause;\n }\n }, {\n shutdown: (driver) => driver.shutdown(),\n release: (driver) => driver.release(),\n });\n }\n cursor(): number { return this.frames.length; }\n stderr(): string { return this.stderrText; }\n processReceipt(): {\n readonly exitCode?: number;\n readonly signal?: string;\n readonly stderr: string;\n } {\n return {\n ...(this.observedExit?.exitCode == null ? {} : { exitCode: this.observedExit.exitCode }),\n ...(this.observedExit?.signal === undefined ? {} : { signal: this.observedExit.signal }),\n stderr: this.stderrText,\n };\n }\n async write(value: unknown): Promise<void> {\n if (this.state !== \"open\")\n throw new Error(\"managed process stdin is closing or closed\");\n const receipt = this.writes.then(() => this.writeRaw(value));\n this.writes = receipt.catch(() => undefined);\n await receipt;\n }\n async waitFor(cursor: number, accept: (frame: unknown) => boolean, signal: AbortSignal): Promise<{\n readonly frame: unknown;\n readonly cursor: number;\n }> {\n let next = cursor;\n for (;;) {\n while (next < this.frames.length) {\n const frame = this.frames[next++]!;\n if (accept(frame))\n return { frame, cursor: next };\n }\n if (this.outputFailure !== undefined)\n throw this.outputFailure;\n const observedRevision = this.revision;\n const outcome = await Promise.race([\n this.waitForChange(observedRevision, signal).then(() => ({ exited: false as const })),\n this.exit.then((receipt) => ({ exited: true as const, receipt })),\n ]);\n if (outcome.exited && next >= this.frames.length) {\n throw new Error(`managed process exited before the expected protocol frame (exitCode=${outcome.receipt.exitCode ?? \"null\"}, signal=${outcome.receipt.signal ?? \"none\"})${this.stderrText ? `: ${this.stderrText.slice(-1000)}` : \"\"}`);\n }\n }\n }\n framesSince(cursor: number): readonly unknown[] { return this.frames.slice(cursor); }\n frameKinds(): string {\n return this.frames.slice(-12).map((value) => {\n if (value === null || typeof value !== \"object\" || Array.isArray(value))\n return typeof value;\n const frame = value as Record<string, unknown>;\n return String(frame.type ?? frame.method ?? (frame.id === undefined ? \"object\" : `response:${String(frame.id)}`));\n }).join(\",\");\n }\n shutdown(): Promise<void> {\n return this.shutdownReceipt ??= (async () => {\n if (this.state !== \"open\")\n return;\n this.state = \"closing\";\n await this.writes;\n const frame = this.shutdownFrame?.();\n if (frame !== undefined)\n await this.writeRaw(frame).catch(() => undefined);\n await this.process.closeStdin().catch(() => undefined);\n this.state = \"closed\";\n })();\n }\n release(): Promise<void> {\n return this.releaseReceipt ??= (async () => {\n await this.shutdown();\n try {\n await timeout(this.exit, 2000);\n }\n catch {\n await this.process.terminate();\n await timeout(this.exit, 2000);\n }\n })();\n }\n private async consume(): Promise<void> {\n const stdoutDecoder = new TextDecoder();\n const stderrDecoder = new TextDecoder();\n let stdout = \"\";\n try {\n for await (const chunk of this.process.output) {\n if (chunk._tag === \"Stderr\") {\n this.stderrText += stderrDecoder.decode(chunk.bytes, { stream: true });\n continue;\n }\n stdout += stdoutDecoder.decode(chunk.bytes, { stream: true });\n for (;;) {\n const newline = stdout.indexOf(\"\\n\");\n if (newline < 0)\n break;\n const line = stdout.slice(0, newline).trim();\n stdout = stdout.slice(newline + 1);\n if (!line)\n continue;\n const frame: unknown = JSON.parse(line);\n this.frames.push(frame);\n this.onFrame?.(frame);\n this.notify();\n }\n }\n const tail = `${stdout}${stdoutDecoder.decode()}`.trim();\n if (tail) {\n const frame: unknown = JSON.parse(tail);\n this.frames.push(frame);\n this.onFrame?.(frame);\n this.notify();\n }\n this.stderrText += stderrDecoder.decode();\n }\n catch (error) {\n this.outputFailure = error;\n }\n finally {\n this.notify();\n }\n }\n private writeRaw(value: unknown): Promise<void> {\n return this.process.writeStdin(encoder.encode(`${JSON.stringify(value)}\\n`));\n }\n private waitForChange(observedRevision: number, signal: AbortSignal): Promise<void> {\n if (signal.aborted)\n return Promise.reject(signal.reason);\n return new Promise((resolve, reject) => {\n let settled = false;\n const cleanup = (): void => { signal.removeEventListener(\"abort\", aborted); this.waiters.delete(done); };\n const done = (): void => {\n if (settled)\n return;\n settled = true;\n cleanup();\n resolve();\n };\n const aborted = (): void => {\n if (settled)\n return;\n settled = true;\n cleanup();\n reject(signal.reason);\n };\n this.waiters.add(done);\n signal.addEventListener(\"abort\", aborted, { once: true });\n if (signal.aborted)\n aborted();\n else if (this.revision !== observedRevision)\n done();\n });\n }\n private notify(): void {\n this.revision += 1;\n for (const waiter of [...this.waiters])\n waiter();\n }\n}\n"]}
|