niceeval 0.16.3-canary.99 → 0.17.0
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/cli/bootstrap.cjs +7 -1
- package/dist/cli/bootstrap.cjs.map +1 -1
- package/dist/cli/project-configuration.cjs +8 -11
- package/dist/cli/project-configuration.cjs.map +1 -1
- package/dist/expect/index.cjs.map +1 -1
- package/dist/expect/index.d.cts +1 -0
- package/dist/expect/index.d.mts +1 -0
- package/dist/expect/index.d.ts +1 -0
- package/dist/experiment/host/cli/contribution.cjs +6 -11
- package/dist/experiment/host/cli/contribution.cjs.map +1 -1
- package/dist/experiment/host/cli/contribution.d.cts +0 -16
- package/dist/experiment/host/cli/contribution.d.mts +0 -16
- package/dist/experiment/host/cli/contribution.d.ts +0 -16
- package/dist/experiment/host/operations.cjs +3 -3
- package/dist/experiment/host/operations.cjs.map +1 -1
- package/dist/experiment/host/types.cjs.map +1 -1
- package/dist/experiment/host/types.d.cts +0 -4
- package/dist/experiment/host/types.d.mts +0 -4
- package/dist/experiment/host/types.d.ts +0 -4
- package/dist/fresh-import.cjs +2 -2
- package/dist/fresh-import.cjs.map +1 -1
- package/dist/fresh-import.d.cts +3 -3
- package/dist/fresh-import.d.mts +3 -3
- package/dist/fresh-import.d.ts +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/inspection/codec.cjs.map +1 -1
- package/dist/inspection/codec.d.cts +1 -1
- package/dist/inspection/codec.d.mts +1 -1
- package/dist/inspection/codec.d.ts +1 -1
- package/dist/inspection/facts.cjs +66 -9
- package/dist/inspection/facts.cjs.map +1 -1
- package/dist/inspection/facts.d.cts +4 -0
- package/dist/inspection/facts.d.mts +4 -0
- package/dist/inspection/facts.d.ts +4 -0
- package/dist/inspection/facts.js +4 -2
- package/dist/inspection/index.cjs +1 -3
- package/dist/inspection/index.cjs.map +1 -1
- package/dist/inspection/index.d.cts +1 -1
- package/dist/inspection/index.d.mts +1 -1
- package/dist/inspection/index.d.ts +1 -1
- package/dist/inspection/index.js +44 -48
- package/dist/inspection/limits.cjs +3 -1
- package/dist/inspection/limits.cjs.map +1 -1
- package/dist/inspection/limits.d.cts +2 -0
- package/dist/inspection/limits.d.mts +2 -0
- package/dist/inspection/limits.d.ts +2 -0
- package/dist/inspection/limits.js +6 -4
- package/dist/inspection/project-source.cjs +4 -1
- package/dist/inspection/project-source.cjs.map +1 -1
- package/dist/inspection/protocol.cjs +10 -18
- package/dist/inspection/protocol.cjs.map +1 -1
- package/dist/inspection/protocol.d.cts +111 -173
- package/dist/inspection/protocol.d.mts +111 -173
- package/dist/inspection/protocol.d.ts +111 -173
- package/dist/inspection/public.mjs +73 -109
- package/dist/inspection/results.cjs +12 -48
- package/dist/inspection/results.cjs.map +1 -1
- package/dist/inspection/results.d.cts +124 -122
- package/dist/inspection/results.d.mts +124 -122
- package/dist/inspection/results.d.ts +124 -122
- package/dist/inspection/results.js +16 -20
- package/dist/inspection/select.cjs +80 -117
- package/dist/inspection/select.cjs.map +1 -1
- package/dist/inspection/source.cjs +14 -15
- package/dist/inspection/source.cjs.map +1 -1
- package/dist/inspection/source.d.cts +6 -3
- package/dist/inspection/source.d.mts +6 -3
- package/dist/inspection/source.d.ts +6 -3
- package/dist/inspection/trace.cjs +1 -1
- package/dist/inspection/trace.cjs.map +1 -1
- package/dist/load-config.cjs +17 -11
- package/dist/load-config.cjs.map +1 -1
- package/dist/load-config.d.cts +3 -2
- package/dist/load-config.d.mts +3 -2
- package/dist/load-config.d.ts +3 -2
- package/dist/o11y/adapter-usage-projection.cjs +5 -1
- package/dist/o11y/adapter-usage-projection.cjs.map +1 -1
- package/dist/o11y/adapter-usage-projection.d.cts +109 -1
- package/dist/o11y/adapter-usage-projection.d.mts +109 -1
- package/dist/o11y/adapter-usage-projection.d.ts +109 -1
- package/dist/o11y/cache-read.cjs +113 -0
- package/dist/o11y/cache-read.cjs.map +1 -0
- package/dist/o11y/cache-read.d.cts +80 -0
- package/dist/o11y/cache-read.d.mts +80 -0
- package/dist/o11y/cache-read.d.ts +80 -0
- package/dist/o11y/cache-read.js +8 -0
- package/dist/o11y/cache-read.js.map +1 -0
- package/dist/o11y/eval-usage.cjs +4 -1
- package/dist/o11y/eval-usage.cjs.map +1 -1
- package/dist/o11y/eval-usage.d.cts +4 -1
- package/dist/o11y/eval-usage.d.mts +4 -1
- package/dist/o11y/eval-usage.d.ts +4 -1
- package/dist/record/host/sqlite-host.cjs +188 -53
- package/dist/record/host/sqlite-host.cjs.map +1 -1
- package/dist/record/host/sqlite-host.d.cts +37 -1
- package/dist/record/host/sqlite-host.d.mts +37 -1
- package/dist/record/host/sqlite-host.d.ts +37 -1
- package/dist/record/host/sqlite-host.js +16 -8
- package/dist/record/maintenance/runtime.cjs +3 -3
- package/dist/record/maintenance/runtime.cjs.map +1 -1
- package/dist/record/sqlite/admission-repository.cjs +18 -18
- package/dist/record/sqlite/admission-repository.cjs.map +1 -1
- package/dist/record/sqlite/case-repository.cjs +6 -6
- package/dist/record/sqlite/case-repository.cjs.map +1 -1
- package/dist/record/sqlite/coordination-repository.cjs +25 -25
- package/dist/record/sqlite/coordination-repository.cjs.map +1 -1
- package/dist/record/sqlite/current-schema.cjs +115 -111
- package/dist/record/sqlite/current-schema.cjs.map +1 -1
- package/dist/record/sqlite/current-schema.d.cts +3 -3
- package/dist/record/sqlite/current-schema.d.mts +3 -3
- package/dist/record/sqlite/current-schema.d.ts +3 -3
- package/dist/record/sqlite/database.cjs +56 -53
- package/dist/record/sqlite/database.cjs.map +1 -1
- package/dist/record/sqlite/index.cjs +3 -1
- package/dist/record/sqlite/index.cjs.map +1 -1
- package/dist/record/sqlite/index.d.cts +5 -2
- package/dist/record/sqlite/index.d.mts +5 -2
- package/dist/record/sqlite/index.d.ts +5 -2
- package/dist/record/sqlite/legacy-schema-018.cjs +443 -0
- package/dist/record/sqlite/legacy-schema-018.cjs.map +1 -0
- package/dist/record/sqlite/legacy-schema-018.d.cts +6 -0
- package/dist/record/sqlite/legacy-schema-018.d.mts +6 -0
- package/dist/record/sqlite/legacy-schema-018.d.ts +6 -0
- package/dist/record/sqlite/legacy-schema-018.js +6 -0
- package/dist/record/sqlite/legacy-schema-018.js.map +1 -0
- package/dist/record/sqlite/migration.cjs +105 -46
- package/dist/record/sqlite/migration.cjs.map +1 -1
- package/dist/record/sqlite/migration.d.cts +2 -1
- package/dist/record/sqlite/migration.d.mts +2 -1
- package/dist/record/sqlite/migration.d.ts +2 -1
- package/dist/record/sqlite/portable-capture.cjs +13 -13
- package/dist/record/sqlite/portable-capture.cjs.map +1 -1
- package/dist/record/sqlite/registry-repository.cjs +22 -22
- package/dist/record/sqlite/registry-repository.cjs.map +1 -1
- package/dist/record/sqlite/schema.cjs +10 -2
- package/dist/record/sqlite/schema.cjs.map +1 -1
- package/dist/record/sqlite/schema.d.cts +4 -1
- package/dist/record/sqlite/schema.d.mts +4 -1
- package/dist/record/sqlite/schema.d.ts +4 -1
- package/dist/record/sqlite/schema.js +20 -14
- package/dist/record/sqlite/storage-worker.cjs +1 -1
- package/dist/record/sqlite/storage-worker.cjs.map +1 -1
- package/dist/record/sqlite/storage.cjs +316 -232
- package/dist/record/sqlite/storage.cjs.map +1 -1
- package/dist/record/sqlite/storage.d.cts +10 -2
- package/dist/record/sqlite/storage.d.mts +10 -2
- package/dist/record/sqlite/storage.d.ts +10 -2
- package/dist/record/sqlite/storage.js +54 -50
- package/dist/record/sqlite/types.cjs +1 -1
- package/dist/record/sqlite/types.cjs.map +1 -1
- package/dist/record/sqlite/types.d.cts +13 -1
- package/dist/record/sqlite/types.d.mts +13 -1
- package/dist/record/sqlite/types.d.ts +13 -1
- package/dist/run/cli/contribution.cjs +17 -12
- package/dist/run/cli/contribution.cjs.map +1 -1
- package/dist/run/host/lifecycle-adapter.cjs +1 -1
- package/dist/run/host/lifecycle-adapter.cjs.map +1 -1
- package/dist/run/storage/owner-identity.cjs +78 -16
- package/dist/run/storage/owner-identity.cjs.map +1 -1
- package/dist/run/storage/owner-identity.d.cts +2 -1
- package/dist/run/storage/owner-identity.d.mts +2 -1
- package/dist/run/storage/owner-identity.d.ts +2 -1
- package/dist/run/storage/sqlite.cjs +55 -55
- package/dist/run/storage/sqlite.cjs.map +1 -1
- package/dist/runner/accept.cjs +12 -42
- package/dist/runner/accept.cjs.map +1 -1
- package/dist/runner/accept.d.cts +2 -3
- package/dist/runner/accept.d.mts +2 -3
- package/dist/runner/accept.d.ts +2 -3
- package/dist/runner/adapter-usage.cjs +2 -2
- package/dist/runner/adapter-usage.cjs.map +1 -1
- package/dist/runner/adoption.cjs +14 -26
- package/dist/runner/adoption.cjs.map +1 -1
- package/dist/runner/adoption.d.cts +5 -13
- package/dist/runner/adoption.d.mts +5 -13
- package/dist/runner/adoption.d.ts +5 -13
- package/dist/runner/adoption.js +2 -4
- package/dist/runner/record.cjs +24 -18
- package/dist/runner/record.cjs.map +1 -1
- package/dist/runner/rename-experiment.cjs +5 -7
- package/dist/runner/rename-experiment.cjs.map +1 -1
- package/dist/runner/reuse-plan.cjs +37 -18
- package/dist/runner/reuse-plan.cjs.map +1 -1
- package/dist/runner/reuse-plan.d.cts +4 -1
- package/dist/runner/reuse-plan.d.mts +4 -1
- package/dist/runner/reuse-plan.d.ts +4 -1
- package/dist/runner/setup-prefix-plan.cjs +17 -12
- package/dist/runner/setup-prefix-plan.cjs.map +1 -1
- package/dist/runner/setup-prefix-plan.d.cts +0 -2
- package/dist/runner/setup-prefix-plan.d.mts +0 -2
- package/dist/runner/setup-prefix-plan.d.ts +0 -2
- package/dist/runner/setup-prefix-plan.js +8 -12
- package/dist/sandbox/backend.cjs +10 -1
- package/dist/sandbox/backend.cjs.map +1 -1
- package/dist/sandbox/backend.d.cts +16 -8
- package/dist/sandbox/backend.d.mts +16 -8
- package/dist/sandbox/backend.d.ts +16 -8
- package/dist/sandbox/backend.js +28 -26
- package/dist/sandbox/docker.cjs +7 -1
- package/dist/sandbox/docker.cjs.map +1 -1
- package/dist/sandbox/e2b-cache-repository.cjs +13 -3
- package/dist/sandbox/e2b-cache-repository.cjs.map +1 -1
- package/dist/sandbox/e2b-cache-repository.d.cts +3 -0
- package/dist/sandbox/e2b-cache-repository.d.mts +3 -0
- package/dist/sandbox/e2b-cache-repository.d.ts +3 -0
- package/dist/sandbox/e2b-cache-repository.js +16 -12
- package/dist/sandbox/e2b.cjs +2 -2
- package/dist/sandbox/e2b.cjs.map +1 -1
- package/dist/sandbox/incus/materialize.cjs +1 -1
- package/dist/sandbox/incus/materialize.cjs.map +1 -1
- package/dist/show/contribution.cjs +3 -3
- package/dist/show/contribution.cjs.map +1 -1
- package/dist/show/model.cjs +14 -13
- package/dist/show/model.cjs.map +1 -1
- package/dist/show/model.d.cts +7 -7
- package/dist/show/model.d.mts +7 -7
- package/dist/show/model.d.ts +7 -7
- package/dist/show/render.cjs +14 -0
- package/dist/show/render.cjs.map +1 -1
- package/dist/user-database/storage-worker.cjs +13 -3
- package/dist/user-database/storage-worker.cjs.map +1 -1
- package/dist/view/app-dist/.vite/manifest.json +2 -2
- package/dist/view/app-dist/assets/{index-CmVoXbwG.js → index-B3ijZRph.js} +17 -17
- package/dist/view/app-dist/assets/{quality-cost-scatter-BuLISaH4.js → quality-cost-scatter-B--DfJ9s.js} +1 -1
- package/dist/view/app-dist/index.html +1 -1
- package/dist/view/application-runtime.cjs +8 -0
- package/dist/view/application-runtime.cjs.map +1 -0
- package/dist/view/application-runtime.d.cts +9 -0
- package/dist/view/application-runtime.d.mts +9 -0
- package/dist/view/application-runtime.d.ts +9 -0
- package/dist/view/application-runtime.js +6 -0
- package/dist/view/application-runtime.js.map +1 -0
- package/dist/view/cli/contribution.cjs +5 -2
- package/dist/view/cli/contribution.cjs.map +1 -1
- package/dist/view/cli/contribution.d.cts +2 -1
- package/dist/view/cli/contribution.d.mts +2 -1
- package/dist/view/cli/contribution.d.ts +2 -1
- package/dist/view/function-runtime.mjs +1019 -456
- package/dist/view/http-protocol.d.cts +1 -9
- package/dist/view/http-protocol.d.mts +1 -9
- package/dist/view/http-protocol.d.ts +1 -9
- package/dist/view/inspection-host.cjs +39 -30
- package/dist/view/inspection-host.cjs.map +1 -1
- package/dist/view/inspection-host.d.cts +7545 -2
- package/dist/view/inspection-host.d.mts +7545 -2
- package/dist/view/inspection-host.d.ts +7545 -2
- package/dist/view/server.cjs +8 -5
- package/dist/view/server.cjs.map +1 -1
- package/dist/view/server.d.cts +4 -2
- package/dist/view/server.d.mts +4 -2
- package/dist/view/server.d.ts +4 -2
- package/docs-site/zh/reference/cli.mdx +1 -2
- package/docs-site/zh/tutorials/control-run-cost.mdx +22 -0
- package/docs-site/zh/tutorials/niceeval-taste-application.mdx +21 -0
- package/package.json +1 -1
|
@@ -3937,6 +3937,54 @@ var AssertionDetailResultSchema = Schema.toType(Schema.Union([Schema.Struct({
|
|
|
3937
3937
|
check: DiagnosticNodeSchema,
|
|
3938
3938
|
matcher: MatcherProjectionSchema
|
|
3939
3939
|
})]));
|
|
3940
|
+
//#endregion
|
|
3941
|
+
//#region src/o11y/cache-read.ts
|
|
3942
|
+
var Reason = Schema.Literals([
|
|
3943
|
+
"usage-not-recorded",
|
|
3944
|
+
"source-invalid",
|
|
3945
|
+
"adapter-usage-required",
|
|
3946
|
+
"collection-incomplete",
|
|
3947
|
+
"call-status-unknown",
|
|
3948
|
+
"no-calls",
|
|
3949
|
+
"cache-read-missing",
|
|
3950
|
+
"input-total-missing",
|
|
3951
|
+
"zero-input-total",
|
|
3952
|
+
"unsafe-token-total"
|
|
3953
|
+
]);
|
|
3954
|
+
var fields = {
|
|
3955
|
+
rate: Schema.Union([Schema.Struct({
|
|
3956
|
+
state: Schema.Literal("exact"),
|
|
3957
|
+
value: Schema.Number.check(Schema.makeFilter((value) => Number.isFinite(value) && value >= 0 && value <= 1))
|
|
3958
|
+
}), Schema.Struct({
|
|
3959
|
+
state: Schema.Literal("unavailable"),
|
|
3960
|
+
reason: Reason
|
|
3961
|
+
})]),
|
|
3962
|
+
recordedCalls: NonNegativeSafeIntegerSchema$2,
|
|
3963
|
+
coveredCalls: NonNegativeSafeIntegerSchema$2,
|
|
3964
|
+
missingCacheReadCalls: NonNegativeSafeIntegerSchema$2,
|
|
3965
|
+
missingInputTotalCalls: NonNegativeSafeIntegerSchema$2,
|
|
3966
|
+
unknownStatusCalls: NonNegativeSafeIntegerSchema$2,
|
|
3967
|
+
collectionComplete: Schema.Boolean,
|
|
3968
|
+
reasons: Schema.Array(Reason)
|
|
3969
|
+
};
|
|
3970
|
+
var consistent = (value) => {
|
|
3971
|
+
const count = value.recordedCalls;
|
|
3972
|
+
return count <= 4e3 && value.coveredCalls <= count && value.unknownStatusCalls <= count && value.missingCacheReadCalls <= count && value.missingInputTotalCalls <= count && value.coveredCalls <= count - Math.max(value.missingCacheReadCalls, value.missingInputTotalCalls) && value.coveredCalls >= count - value.missingCacheReadCalls - value.missingInputTotalCalls && new Set(value.reasons).size === value.reasons.length && (value.rate.state === "exact" ? value.reasons.length === 0 && value.collectionComplete && count > 0 && value.coveredCalls === count && value.unknownStatusCalls === 0 : value.rate.reason === value.reasons[0]);
|
|
3973
|
+
};
|
|
3974
|
+
var Summary = Schema.Struct(fields).check(Schema.makeFilter(consistent));
|
|
3975
|
+
var CacheReadReportSchema = Schema.Struct({
|
|
3976
|
+
total: Summary,
|
|
3977
|
+
modelSlots: Schema.Array(Schema.Struct({
|
|
3978
|
+
modelSlot: Schema.NullOr(Schema.String),
|
|
3979
|
+
...fields
|
|
3980
|
+
}).check(Schema.makeFilter(consistent))),
|
|
3981
|
+
models: Schema.Array(Schema.Struct({
|
|
3982
|
+
modelSlot: Schema.NullOr(Schema.String),
|
|
3983
|
+
provider: Schema.NullOr(Schema.String),
|
|
3984
|
+
model: Schema.NullOr(Schema.String),
|
|
3985
|
+
...fields
|
|
3986
|
+
}).check(Schema.makeFilter(consistent)))
|
|
3987
|
+
}).check(Schema.makeFilter((value) => value.modelSlots.length <= 65 && value.models.length <= 4e3));
|
|
3940
3988
|
Object.freeze({
|
|
3941
3989
|
errors: "all",
|
|
3942
3990
|
onExcessProperty: "error"
|
|
@@ -5846,23 +5894,7 @@ var InspectionRunValueSchema = Schema.Struct({
|
|
|
5846
5894
|
completedAt: Schema.optional(UtcMillisSchema),
|
|
5847
5895
|
expectedSlots: Schema.Array(RecordSlotIdentitySchema)
|
|
5848
5896
|
});
|
|
5849
|
-
var
|
|
5850
|
-
value: InspectionRunValueSchema,
|
|
5851
|
-
members: Schema.Array(MemberDocumentSchema),
|
|
5852
|
-
attempts: Schema.Array(AttemptDocumentSchema)
|
|
5853
|
-
});
|
|
5854
|
-
Schema.Array(Schema.Struct({
|
|
5855
|
-
runId: RunIdSchema,
|
|
5856
|
-
state: Schema.Literal("completed"),
|
|
5857
|
-
experimentId: ExperimentIdSchema,
|
|
5858
|
-
invocationId: Schema.Null,
|
|
5859
|
-
startedAt: UtcMillisSchema,
|
|
5860
|
-
completedAt: UtcMillisSchema,
|
|
5861
|
-
coverage: Schema.Struct({
|
|
5862
|
-
published: Schema.Number,
|
|
5863
|
-
expected: Schema.Number
|
|
5864
|
-
})
|
|
5865
|
-
}));
|
|
5897
|
+
var InspectionRunListResultSchema = Schema.Array(RunSummarySchema);
|
|
5866
5898
|
var InspectionScoredValueSchema = Schema.Union([
|
|
5867
5899
|
Schema.Struct({ state: Schema.Literal("not-scored") }),
|
|
5868
5900
|
Schema.Struct({
|
|
@@ -5883,37 +5915,6 @@ var VerdictSchema = Schema.NullOr(Schema.Literals([
|
|
|
5883
5915
|
"errored",
|
|
5884
5916
|
"skipped"
|
|
5885
5917
|
]));
|
|
5886
|
-
var InspectionRunSummaryResultSchema = Schema.Struct({
|
|
5887
|
-
runs: Schema.Array(RunDocumentSchema),
|
|
5888
|
-
denominator: Schema.Struct({
|
|
5889
|
-
expected: Schema.Number,
|
|
5890
|
-
observed: Schema.Number
|
|
5891
|
-
}),
|
|
5892
|
-
members: Schema.Array(Schema.Struct({
|
|
5893
|
-
runId: Schema.String,
|
|
5894
|
-
slotId: Schema.String,
|
|
5895
|
-
evalId: Schema.String,
|
|
5896
|
-
attemptOrdinal: Schema.Number,
|
|
5897
|
-
executionIdentityDigest: Schema.String,
|
|
5898
|
-
state: Schema.Literals([
|
|
5899
|
-
"executed",
|
|
5900
|
-
"carried",
|
|
5901
|
-
"accepted",
|
|
5902
|
-
"not-dispatched",
|
|
5903
|
-
"interrupted",
|
|
5904
|
-
"missing"
|
|
5905
|
-
]),
|
|
5906
|
-
locator: Schema.NullOr(Schema.String),
|
|
5907
|
-
outcome: Schema.NullOr(Schema.Literals([
|
|
5908
|
-
"completed",
|
|
5909
|
-
"errored",
|
|
5910
|
-
"cancelled",
|
|
5911
|
-
"interrupted"
|
|
5912
|
-
])),
|
|
5913
|
-
verdict: VerdictSchema,
|
|
5914
|
-
score: Schema.optional(InspectionScoredValueSchema)
|
|
5915
|
-
}))
|
|
5916
|
-
});
|
|
5917
5918
|
var AttemptCoverageFactSchema = Schema.Struct({
|
|
5918
5919
|
channel: Schema.Literals([
|
|
5919
5920
|
"events",
|
|
@@ -6893,6 +6894,7 @@ var UsageTotalsSchema = Schema.Struct({
|
|
|
6893
6894
|
costs: Schema.optional(EffectiveCostTotalSchema)
|
|
6894
6895
|
});
|
|
6895
6896
|
var InspectionAttemptUsageResultSchema = Schema.Struct({
|
|
6897
|
+
cacheRead: CacheReadReportSchema,
|
|
6896
6898
|
configuredModels: ConfiguredModelsSchema,
|
|
6897
6899
|
modelGroups: ModelGroupsSchema,
|
|
6898
6900
|
judgeUsage: JudgeUsageSchema,
|
|
@@ -6965,7 +6967,8 @@ var RunOverviewMemberLimitationSchema = Schema.Union([
|
|
|
6965
6967
|
})
|
|
6966
6968
|
]);
|
|
6967
6969
|
var RunOverviewMemberSchema = Schema.Struct({
|
|
6968
|
-
|
|
6970
|
+
...RecordSlotIdentitySchema.fields,
|
|
6971
|
+
publication: RunSlotPublicationSchema,
|
|
6969
6972
|
state: Schema.Literals([
|
|
6970
6973
|
"executed",
|
|
6971
6974
|
"carried",
|
|
@@ -6993,20 +6996,16 @@ var RunOverviewLocatedLimitationSchema = Schema.Struct({
|
|
|
6993
6996
|
locator: Schema.NullOr(Schema.String),
|
|
6994
6997
|
limitation: RunOverviewMemberLimitationSchema
|
|
6995
6998
|
});
|
|
6996
|
-
var
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
|
|
7000
|
-
adapter: Schema.NullOr(AdapterIdentitySchema)
|
|
7001
|
-
}),
|
|
7002
|
-
state: RunStateSchema,
|
|
7003
|
-
startedAt: UtcMillisSchema,
|
|
7004
|
-
completedAt: Schema.optional(UtcMillisSchema),
|
|
6999
|
+
var InspectionRunResultSchema = Schema.Struct({
|
|
7000
|
+
value: InspectionRunValueSchema,
|
|
7001
|
+
members: Schema.Array(MemberDocumentSchema),
|
|
7002
|
+
attempts: Schema.Array(AttemptDocumentSchema),
|
|
7005
7003
|
denominator: Schema.Struct({
|
|
7006
7004
|
expected: Schema.Number,
|
|
7007
|
-
|
|
7005
|
+
published: Schema.Number,
|
|
7006
|
+
missing: Schema.Number
|
|
7008
7007
|
}),
|
|
7009
|
-
|
|
7008
|
+
slots: Schema.Array(RunOverviewMemberSchema),
|
|
7010
7009
|
coverage: Schema.Struct({
|
|
7011
7010
|
state: RunOverviewStateSchema,
|
|
7012
7011
|
expectedMemberCount: Schema.Number,
|
|
@@ -7183,16 +7182,11 @@ var operation = (kind, fields) => Schema.Struct({
|
|
|
7183
7182
|
});
|
|
7184
7183
|
var SourceSchema = Schema.Struct({
|
|
7185
7184
|
kind: Schema.Literals(["project-record", "external-record"]),
|
|
7186
|
-
|
|
7185
|
+
publicationCutoffIdentity: Schema.String
|
|
7187
7186
|
});
|
|
7188
|
-
var
|
|
7189
|
-
|
|
7190
|
-
|
|
7191
|
-
runCount: Schema.Number,
|
|
7192
|
-
runs: Schema.Array(Schema.Struct({
|
|
7193
|
-
runId: Schema.String,
|
|
7194
|
-
logicalSealIdentity: Schema.String
|
|
7195
|
-
}))
|
|
7187
|
+
var PublicationCutoffSchema = Schema.Struct({
|
|
7188
|
+
storeGeneration: Schema.String,
|
|
7189
|
+
revision: Schema.Number.check(Schema.isInt(), Schema.isGreaterThanOrEqualTo(0))
|
|
7196
7190
|
});
|
|
7197
7191
|
var SelectionSchema = Schema.Struct({
|
|
7198
7192
|
requestedRunIds: Schema.Array(Schema.String),
|
|
@@ -7204,7 +7198,7 @@ var SuccessMetadataSchema = Schema.Struct({
|
|
|
7204
7198
|
outcome: Schema.Literal("success"),
|
|
7205
7199
|
behaviorVersion: Schema.Literal(INSPECTION_BEHAVIOR_VERSION),
|
|
7206
7200
|
source: SourceSchema,
|
|
7207
|
-
|
|
7201
|
+
publicationCutoff: PublicationCutoffSchema,
|
|
7208
7202
|
selection: SelectionSchema,
|
|
7209
7203
|
issues: Schema.Tuple([]),
|
|
7210
7204
|
evidence: Schema.Struct({ refs: Schema.Array(Schema.String) })
|
|
@@ -7214,17 +7208,12 @@ var RunsListSuccessMetadataSchema = Schema.Struct({
|
|
|
7214
7208
|
outcome: Schema.Literal("success"),
|
|
7215
7209
|
behaviorVersion: Schema.Literal(INSPECTION_BEHAVIOR_VERSION),
|
|
7216
7210
|
source: SourceSchema,
|
|
7217
|
-
|
|
7218
|
-
kind: Schema.Literal("inspection-sealed-cutoff"),
|
|
7219
|
-
identity: Schema.String,
|
|
7220
|
-
runCount: Schema.Number
|
|
7221
|
-
}),
|
|
7211
|
+
publicationCutoff: PublicationCutoffSchema,
|
|
7222
7212
|
selection: Schema.Struct({
|
|
7223
7213
|
requestedRunIds: Schema.Array(Schema.String),
|
|
7224
7214
|
selectedRunIds: Schema.Array(Schema.String),
|
|
7225
7215
|
missingRunIds: Schema.Array(Schema.String),
|
|
7226
7216
|
returnedRunCount: Schema.Number,
|
|
7227
|
-
totalRunCount: Schema.Number,
|
|
7228
7217
|
truncated: Schema.Boolean
|
|
7229
7218
|
}),
|
|
7230
7219
|
issues: Schema.Tuple([]),
|
|
@@ -7253,19 +7242,6 @@ var ArtifactsResultSchema = Schema.Union([Schema.Struct({ state: Schema.Literal(
|
|
|
7253
7242
|
})),
|
|
7254
7243
|
contentsTruncated: Schema.Boolean
|
|
7255
7244
|
})]);
|
|
7256
|
-
var SealedRunSummarySchema = Schema.Struct({
|
|
7257
|
-
runId: Schema.String,
|
|
7258
|
-
writerGeneration: Schema.String,
|
|
7259
|
-
startedAt: Schema.String,
|
|
7260
|
-
logicalSealIdentity: Schema.String,
|
|
7261
|
-
slotCount: Schema.Number,
|
|
7262
|
-
memberCount: Schema.Number,
|
|
7263
|
-
attemptCount: Schema.Number,
|
|
7264
|
-
attachmentCount: Schema.Number,
|
|
7265
|
-
contentCount: Schema.Number,
|
|
7266
|
-
contentByteLength: Schema.Number,
|
|
7267
|
-
sealEntryCount: Schema.Number
|
|
7268
|
-
});
|
|
7269
7245
|
var ComparisonMemberSchema = Schema.Struct({
|
|
7270
7246
|
key: Schema.String,
|
|
7271
7247
|
runId: Schema.String,
|
|
@@ -7329,10 +7305,10 @@ var inspectionProtocolRegistry = Object.freeze({
|
|
|
7329
7305
|
"judge-usage"
|
|
7330
7306
|
]
|
|
7331
7307
|
}),
|
|
7332
|
-
"
|
|
7333
|
-
request: operation("
|
|
7308
|
+
"run.list": spec({
|
|
7309
|
+
request: operation("run.list", { continuation: Schema.optional(Schema.String) }),
|
|
7334
7310
|
result: {
|
|
7335
|
-
runs:
|
|
7311
|
+
runs: InspectionRunListResultSchema,
|
|
7336
7312
|
continuation: Schema.optional(Schema.String)
|
|
7337
7313
|
},
|
|
7338
7314
|
factKinds: ["core"]
|
|
@@ -7340,24 +7316,12 @@ var inspectionProtocolRegistry = Object.freeze({
|
|
|
7340
7316
|
"run.get": spec({
|
|
7341
7317
|
request: operation("run.get", { runId: RunIdSchema }),
|
|
7342
7318
|
result: { run: InspectionRunResultSchema },
|
|
7343
|
-
factKinds: ["core"]
|
|
7344
|
-
}),
|
|
7345
|
-
"run.summary": spec({
|
|
7346
|
-
request: operation("run.summary", { runId: RunIdSchema }),
|
|
7347
|
-
result: { summary: InspectionRunSummaryResultSchema },
|
|
7348
7319
|
factKinds: [
|
|
7349
7320
|
"core",
|
|
7350
7321
|
"assertions",
|
|
7351
|
-
"agent-turns"
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
"run.overview": spec({
|
|
7355
|
-
request: operation("run.overview", { runId: RunIdSchema }),
|
|
7356
|
-
result: { runOverview: InspectionRunOverviewResultSchema },
|
|
7357
|
-
factKinds: [
|
|
7358
|
-
"core",
|
|
7359
|
-
"assertions",
|
|
7360
|
-
"agent-turns"
|
|
7322
|
+
"agent-turns",
|
|
7323
|
+
"adapter-usage",
|
|
7324
|
+
"judge-usage"
|
|
7361
7325
|
]
|
|
7362
7326
|
}),
|
|
7363
7327
|
"attempt.get": spec({
|
|
@@ -7512,7 +7476,7 @@ var successSchema = (id, entry) => {
|
|
|
7512
7476
|
operation: Schema.Literal(id),
|
|
7513
7477
|
...entry.result
|
|
7514
7478
|
});
|
|
7515
|
-
return id === "
|
|
7479
|
+
return id === "run.list" ? RunsListSuccessMetadataSchema.pipe(fields) : id === "runs.compare" ? CompareSuccessMetadataSchema.pipe(fields) : SuccessMetadataSchema.pipe(fields);
|
|
7516
7480
|
};
|
|
7517
7481
|
var InspectionSuccessDocumentSchema = Schema.Union(specs.map(([id, entry]) => successSchema(id, entry)));
|
|
7518
7482
|
var explanationSchema = (id, entry) => {
|
|
@@ -7521,7 +7485,7 @@ var explanationSchema = (id, entry) => {
|
|
|
7521
7485
|
operation: Schema.Literal(id),
|
|
7522
7486
|
factKinds: Schema.Tuple(entry.factKinds.map((value) => Schema.Literal(value)))
|
|
7523
7487
|
});
|
|
7524
|
-
if (id === "
|
|
7488
|
+
if (id === "run.list") return RunsListSuccessMetadataSchema.pipe(fields);
|
|
7525
7489
|
return SuccessMetadataSchema.pipe(fields);
|
|
7526
7490
|
};
|
|
7527
7491
|
var InspectionExplanationDocumentSchema = Schema.Union(specs.map(([id, entry]) => explanationSchema(id, entry)));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InspectionAttemptDiffResultSchema = exports.InspectionAttemptTimingResultSchema = exports.
|
|
3
|
+
exports.InspectionAttemptDiffResultSchema = exports.InspectionAttemptTimingResultSchema = exports.InspectionRunResultSchema = exports.InspectionAttemptUsageResultSchema = exports.InspectionTraceDetailResultSchema = exports.InspectionTraceDetailItemSchema = exports.InspectionTraceResultSchema = exports.InspectionTraceItemSchema = exports.ExecutionDisplayPreviewSchema = exports.InspectionSourcesResultSchema = exports.InspectionAttemptResultSchema = exports.InspectionScoredValueSchema = exports.InspectionRunListResultSchema = exports.InspectionRunValueSchema = exports.InspectionExperimentResultSchema = exports.InspectionOverviewResultSchema = void 0;
|
|
4
|
+
const cache_read_ts_1 = require("../o11y/cache-read.cjs");
|
|
4
5
|
const effect_1 = require("effect");
|
|
5
6
|
const schema_ts_1 = require("../record/family/adapter-usage/schema.cjs");
|
|
6
7
|
const common_ts_1 = require("../record/family/common.cjs");
|
|
@@ -198,23 +199,7 @@ exports.InspectionRunValueSchema = effect_1.Schema.Struct({
|
|
|
198
199
|
completedAt: effect_1.Schema.optional(identifiers_ts_1.UtcMillisSchema),
|
|
199
200
|
expectedSlots: effect_1.Schema.Array(core_ts_1.RecordSlotIdentitySchema),
|
|
200
201
|
});
|
|
201
|
-
exports.
|
|
202
|
-
value: exports.InspectionRunValueSchema,
|
|
203
|
-
members: effect_1.Schema.Array(core_ts_1.MemberDocumentSchema),
|
|
204
|
-
attempts: effect_1.Schema.Array(core_ts_1.AttemptDocumentSchema),
|
|
205
|
-
});
|
|
206
|
-
exports.InspectionRunListResultSchema = effect_1.Schema.Array(effect_1.Schema.Struct({
|
|
207
|
-
runId: identifiers_ts_1.RunIdSchema,
|
|
208
|
-
state: effect_1.Schema.Literal("completed"),
|
|
209
|
-
experimentId: identifiers_ts_1.ExperimentIdSchema,
|
|
210
|
-
invocationId: effect_1.Schema.Null,
|
|
211
|
-
startedAt: identifiers_ts_1.UtcMillisSchema,
|
|
212
|
-
completedAt: identifiers_ts_1.UtcMillisSchema,
|
|
213
|
-
coverage: effect_1.Schema.Struct({
|
|
214
|
-
published: effect_1.Schema.Number,
|
|
215
|
-
expected: effect_1.Schema.Number,
|
|
216
|
-
}),
|
|
217
|
-
}));
|
|
202
|
+
exports.InspectionRunListResultSchema = effect_1.Schema.Array(index_ts_2.RunSummarySchema);
|
|
218
203
|
exports.InspectionScoredValueSchema = effect_1.Schema.Union([
|
|
219
204
|
effect_1.Schema.Struct({ state: effect_1.Schema.Literal("not-scored") }),
|
|
220
205
|
effect_1.Schema.Struct({ state: effect_1.Schema.Literal("complete"), earned: effect_1.Schema.Number, possible: effect_1.Schema.Number }),
|
|
@@ -226,24 +211,6 @@ exports.InspectionScoredValueSchema = effect_1.Schema.Union([
|
|
|
226
211
|
}),
|
|
227
212
|
]);
|
|
228
213
|
const VerdictSchema = effect_1.Schema.NullOr(effect_1.Schema.Literals(["passed", "failed", "errored", "skipped"]));
|
|
229
|
-
exports.InspectionRunSummaryResultSchema = effect_1.Schema.Struct({
|
|
230
|
-
runs: effect_1.Schema.Array(core_ts_1.RunDocumentSchema),
|
|
231
|
-
denominator: effect_1.Schema.Struct({ expected: effect_1.Schema.Number, observed: effect_1.Schema.Number }),
|
|
232
|
-
members: effect_1.Schema.Array(effect_1.Schema.Struct({
|
|
233
|
-
runId: effect_1.Schema.String,
|
|
234
|
-
slotId: effect_1.Schema.String,
|
|
235
|
-
evalId: effect_1.Schema.String,
|
|
236
|
-
attemptOrdinal: effect_1.Schema.Number,
|
|
237
|
-
executionIdentityDigest: effect_1.Schema.String,
|
|
238
|
-
state: effect_1.Schema.Literals([
|
|
239
|
-
"executed", "carried", "accepted", "not-dispatched", "interrupted", "missing",
|
|
240
|
-
]),
|
|
241
|
-
locator: effect_1.Schema.NullOr(effect_1.Schema.String),
|
|
242
|
-
outcome: effect_1.Schema.NullOr(effect_1.Schema.Literals(["completed", "errored", "cancelled", "interrupted"])),
|
|
243
|
-
verdict: VerdictSchema,
|
|
244
|
-
score: effect_1.Schema.optional(exports.InspectionScoredValueSchema),
|
|
245
|
-
})),
|
|
246
|
-
});
|
|
247
214
|
const AttemptCoverageFactSchema = effect_1.Schema.Struct({
|
|
248
215
|
channel: effect_1.Schema.Literals(["events", "actions", "messages", "usage", "status", "data"]),
|
|
249
216
|
status: effect_1.Schema.Literals(["complete", "partial", "unavailable"]),
|
|
@@ -927,6 +894,7 @@ const UsageTotalsSchema = effect_1.Schema.Struct({
|
|
|
927
894
|
costs: effect_1.Schema.optional(EffectiveCostTotalSchema),
|
|
928
895
|
});
|
|
929
896
|
exports.InspectionAttemptUsageResultSchema = effect_1.Schema.Struct({
|
|
897
|
+
cacheRead: cache_read_ts_1.CacheReadReportSchema,
|
|
930
898
|
configuredModels: ConfiguredModelsSchema,
|
|
931
899
|
modelGroups: ModelGroupsSchema,
|
|
932
900
|
judgeUsage: JudgeUsageSchema,
|
|
@@ -982,7 +950,8 @@ const RunOverviewMemberLimitationSchema = effect_1.Schema.Union([
|
|
|
982
950
|
effect_1.Schema.Struct({ kind: effect_1.Schema.Literal("usage"), detail: UsageLimitationSchema }),
|
|
983
951
|
]);
|
|
984
952
|
const RunOverviewMemberSchema = effect_1.Schema.Struct({
|
|
985
|
-
|
|
953
|
+
...core_ts_1.RecordSlotIdentitySchema.fields,
|
|
954
|
+
publication: index_ts_2.RunSlotPublicationSchema,
|
|
986
955
|
state: effect_1.Schema.Literals([
|
|
987
956
|
"executed", "carried", "accepted", "not-dispatched", "interrupted", "pending",
|
|
988
957
|
]),
|
|
@@ -1000,17 +969,12 @@ const RunOverviewLocatedLimitationSchema = effect_1.Schema.Struct({
|
|
|
1000
969
|
locator: effect_1.Schema.NullOr(effect_1.Schema.String),
|
|
1001
970
|
limitation: RunOverviewMemberLimitationSchema,
|
|
1002
971
|
});
|
|
1003
|
-
exports.
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
state: index_ts_2.RunStateSchema,
|
|
1010
|
-
startedAt: identifiers_ts_1.UtcMillisSchema,
|
|
1011
|
-
completedAt: effect_1.Schema.optional(identifiers_ts_1.UtcMillisSchema),
|
|
1012
|
-
denominator: effect_1.Schema.Struct({ expected: effect_1.Schema.Number, observed: effect_1.Schema.Number }),
|
|
1013
|
-
members: effect_1.Schema.Array(RunOverviewMemberSchema),
|
|
972
|
+
exports.InspectionRunResultSchema = effect_1.Schema.Struct({
|
|
973
|
+
value: exports.InspectionRunValueSchema,
|
|
974
|
+
members: effect_1.Schema.Array(core_ts_1.MemberDocumentSchema),
|
|
975
|
+
attempts: effect_1.Schema.Array(core_ts_1.AttemptDocumentSchema),
|
|
976
|
+
denominator: effect_1.Schema.Struct({ expected: effect_1.Schema.Number, published: effect_1.Schema.Number, missing: effect_1.Schema.Number }),
|
|
977
|
+
slots: effect_1.Schema.Array(RunOverviewMemberSchema),
|
|
1014
978
|
coverage: effect_1.Schema.Struct({
|
|
1015
979
|
state: RunOverviewStateSchema,
|
|
1016
980
|
expectedMemberCount: effect_1.Schema.Number,
|