evalution 1.0.7 → 1.0.8
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/{check-BTg6THHB.d.ts → check-CR4fU1S5.d.ts} +43 -15
- package/dist/checks/index.d.ts +1 -1
- package/dist/cli/index.js +50 -21
- package/dist/client/assets/DatasetView-BqSWI_pm.js +15 -0
- package/dist/client/assets/EvalRunView-CR6ZksSu.js +2 -0
- package/dist/client/assets/EvalView-JPEM5IY8.js +1 -0
- package/dist/client/assets/{data-grid-overlay-editor-CBVV2omk.js → data-grid-overlay-editor-B_nPhXKR.js} +1 -1
- package/dist/client/assets/{highlighted-body-KPVGNVTW-BqsjUFPI.js → highlighted-body-KPVGNVTW-dPpneB8R.js} +1 -1
- package/dist/client/assets/{index-B7OFMd2c.css → index-BGcZZetP.css} +1 -1
- package/dist/client/assets/{index-DOmAST6D.js → index-CwjMcK6S.js} +137 -137
- package/dist/client/assets/{number-overlay-editor-DhCVhD05.js → number-overlay-editor-CRWFlaQs.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/{dataset-types-CSjbM_Vz.d.ts → dataset-types-Dqi5vVg-.d.ts} +20 -5
- package/dist/index.d.ts +8 -7
- package/dist/index.js +22 -11
- package/dist/{trace-Dn6Pfcc5.d.ts → trace-DGj5oW7z.d.ts} +1 -1
- package/dist/{trace-event-ingestor-DI-HkA4Q.js → trace-event-ingestor-BghQcCHe.js} +124 -16
- package/dist/views/datasets/index.d.ts +1 -1
- package/dist/views/index.d.ts +2 -2
- package/dist/views/react/index.d.ts +1 -1
- package/package.json +2 -2
- package/dist/client/assets/DatasetView-CWw3B_XI.js +0 -15
- package/dist/client/assets/EvalRunView-DJNSAydj.js +0 -2
- package/dist/client/assets/EvalView-R0Nkikzs.js +0 -1
|
@@ -107,9 +107,19 @@ interface SpanToolResultPart {
|
|
|
107
107
|
/** Whether the result reports a failure (an error, or a denied call). */
|
|
108
108
|
isError?: boolean;
|
|
109
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* The reasoning (thinking) a model produced ahead of its answer, within a
|
|
112
|
+
* multi-part {@link SpanMessage} content — how a conversation's earlier
|
|
113
|
+
* assistant turns carry theirs. The turn a span records keeps its own in
|
|
114
|
+
* {@link LLMSpanDetails.reasoning}.
|
|
115
|
+
*/
|
|
116
|
+
interface SpanReasoningPart {
|
|
117
|
+
type: "reasoning";
|
|
118
|
+
text: string;
|
|
119
|
+
}
|
|
110
120
|
type SpanMessageRole = "user" | "assistant" | "system" | "tool" | (string & {});
|
|
111
121
|
/** One segment of a multi-part {@link SpanMessage} content. */
|
|
112
|
-
type SpanContentPart = SpanTextPart | SpanImagePart | SpanToolCallPart | SpanToolResultPart;
|
|
122
|
+
type SpanContentPart = SpanTextPart | SpanImagePart | SpanToolCallPart | SpanToolResultPart | SpanReasoningPart;
|
|
113
123
|
/**
|
|
114
124
|
* A single message within an LLM span's input/output.
|
|
115
125
|
*
|
|
@@ -148,6 +158,11 @@ interface LLMSpanDetails {
|
|
|
148
158
|
* output and for any model whose answer is data rather than prose.
|
|
149
159
|
*/
|
|
150
160
|
output?: unknown;
|
|
161
|
+
/**
|
|
162
|
+
* The reasoning the model produced on the way to {@link output}, kept apart
|
|
163
|
+
* from it so an output stays the answer that checks and agents read.
|
|
164
|
+
*/
|
|
165
|
+
reasoning?: string;
|
|
151
166
|
/** Input tokens, counting any read from or written to a prompt cache. */
|
|
152
167
|
promptTokens?: number;
|
|
153
168
|
completionTokens?: number;
|
|
@@ -276,6 +291,20 @@ interface TraceSummary extends TraceBase {
|
|
|
276
291
|
* and the runs in flight.
|
|
277
292
|
*/
|
|
278
293
|
evalRun?: TraceEvalRun;
|
|
294
|
+
/**
|
|
295
|
+
* How the checks recorded against the trace break down, once it has any.
|
|
296
|
+
* Filled in by the server alongside {@link TraceSummary.evalRun}.
|
|
297
|
+
*/
|
|
298
|
+
checkCounts?: EvalCounts;
|
|
299
|
+
}
|
|
300
|
+
/** How a run's, or a trace's, check results break down. */
|
|
301
|
+
interface EvalCounts {
|
|
302
|
+
pass: number;
|
|
303
|
+
fail: number;
|
|
304
|
+
error: number;
|
|
305
|
+
skipped: number;
|
|
306
|
+
/** Scores reported without a threshold, so neither pass nor fail. */
|
|
307
|
+
scored: number;
|
|
279
308
|
}
|
|
280
309
|
/** The eval run a trace came from — what the trace list groups by. */
|
|
281
310
|
interface TraceEvalRun {
|
|
@@ -287,6 +316,10 @@ interface TraceEvalRun {
|
|
|
287
316
|
runId: string;
|
|
288
317
|
/** When the run started (ms). */
|
|
289
318
|
startedAt: number;
|
|
319
|
+
/** The arm of the run that produced the trace. */
|
|
320
|
+
armId: string;
|
|
321
|
+
/** That arm's label: the version it ran, as the run view names it. */
|
|
322
|
+
armLabel: string;
|
|
290
323
|
}
|
|
291
324
|
/**
|
|
292
325
|
* The OpenTelemetry semantic-convention resource attribute naming the
|
|
@@ -470,15 +503,6 @@ interface EvalArm {
|
|
|
470
503
|
}
|
|
471
504
|
/** A run's lifecycle. */
|
|
472
505
|
type EvalRunStatus = "running" | "done" | "cancelled" | "error";
|
|
473
|
-
/** How a run's check results break down. */
|
|
474
|
-
interface EvalCounts {
|
|
475
|
-
pass: number;
|
|
476
|
-
fail: number;
|
|
477
|
-
error: number;
|
|
478
|
-
skipped: number;
|
|
479
|
-
/** Scores reported without a threshold, so neither pass nor fail. */
|
|
480
|
-
scored: number;
|
|
481
|
-
}
|
|
482
506
|
/** What `EvalProvider.createRun` takes. */
|
|
483
507
|
interface NewEvalRun {
|
|
484
508
|
/** The eval as it was when the run started — runs keep meaning what they measured. */
|
|
@@ -600,11 +624,15 @@ interface TraceCheckResult extends EvalCheckResult {
|
|
|
600
624
|
/** The check's label as the run's definition had it. */
|
|
601
625
|
checkLabel: string;
|
|
602
626
|
armLabel: string;
|
|
627
|
+
/** When the run started (ms). */
|
|
628
|
+
startedAt: number;
|
|
603
629
|
}
|
|
604
630
|
/** A trace an eval run produced, with the run — see `EvalProvider.listTraceRuns`. */
|
|
605
631
|
interface EvalTraceRun extends Omit<TraceEvalRun, "providerId"> {
|
|
606
632
|
traceProviderId: string;
|
|
607
633
|
traceId: string;
|
|
634
|
+
/** How the trace's check results break down, once it has any. */
|
|
635
|
+
checkCounts?: EvalCounts;
|
|
608
636
|
}
|
|
609
637
|
/** The kind of change an {@link EvalChangeEvent} describes. */
|
|
610
638
|
type EvalChangeType = "add" | "update" | "remove";
|
|
@@ -1362,10 +1390,10 @@ interface DatasetField {
|
|
|
1362
1390
|
/** Name, type, description — the checker's view of the slot this field came from. */
|
|
1363
1391
|
def: PropDefinition$1;
|
|
1364
1392
|
/**
|
|
1365
|
-
* Set on a field added by hand
|
|
1366
|
-
*
|
|
1367
|
-
*
|
|
1368
|
-
* parameters.
|
|
1393
|
+
* Set on a field added by hand — through `DatasetProvider.addField`, or
|
|
1394
|
+
* given as `{ name, type }` or `{ from }` when the dataset was created —
|
|
1395
|
+
* rather than derived from the linked prompt. Such a field never came from
|
|
1396
|
+
* that prompt, so it isn't flagged when it matches none of its parameters.
|
|
1369
1397
|
*/
|
|
1370
1398
|
added?: true;
|
|
1371
1399
|
}
|
|
@@ -1922,4 +1950,4 @@ declare function check<const N extends ResourceInputs = Record<string, never>>(d
|
|
|
1922
1950
|
/** Whether `value` was produced by {@link check}. */
|
|
1923
1951
|
declare function isCheck(value: unknown): value is Check;
|
|
1924
1952
|
//#endregion
|
|
1925
|
-
export { NormalizedPromptBase as $,
|
|
1953
|
+
export { NormalizedPromptBase as $, Annotation as $t, DatasetRowsOverview as A, TraceSummary as An, EvalArm as At, ChatPromptUpdates as B, EvalProviderInfo as Bt, DatasetFieldShape as C, Trace as Cn, ValueCatalogPreset as Ct, DatasetRow as D, TraceLiveEvent as Dn, VariationInfo as Dt, DatasetProviderInfo as E, TraceEvalRun as En, VariationId as Et, KnownColumnSpec as F, EvalCheckOutcome as Ft, ExecutionInput as G, EvalRunProgress as Gt, ConflictChoices as H, EvalRowResult as Ht, AddPromptContext as I, EvalCheckResult as It, InputLayout as J, EvalSummary as Jt, ExtractedProps as K, EvalRunStatus as Kt, AddPromptField as L, EvalDefinition as Lt, ColumnPath as M, isCheckSpan as Mn, EvalChangeEvent as Mt, DatasetColumnSpec as N, spanMessages as Nn, EvalChangeType as Nt, DatasetRowSource as O, TraceProviderInfo as On, VersionId as Ot, ForeignColumnSpec as P, EvalCheck as Pt, NormalizedPrompt as Q, TraceCheckResult as Qt, CalleeBinding as R, EvalDefinitionPatch as Rt, DatasetField as S, ToolSpanDetails as Sn, ValueCatalogGroup as St, DatasetPathChild as T, TraceChangeType as Tn, VariationConflict as Tt, ExecuteRequest as U, EvalRowStatus as Ut, CheckInfo as V, EvalResults as Vt, ExecuteResponse as W, EvalRun as Wt, NormalizedMessage as X, NewEvalDefinition as Xt, NormalizedChatPrompt as Y, EvalTraceRun as Yt, NormalizedParameter as Z, NewEvalRun as Zt, isStandardSchema as _, SpanMessageRole as _n, ResourceScope as _t, check as a, CHECK_ATTRIBUTE as an, PromptChangeEvent as at, DatasetChangeEvent as b, SpanToolCallPart as bn, UpdatePromptResponse as bt, ResolvedResourceInputs as c, LLMSpanDetails as cn, PromptRef as ct, ResourceInput as d, SERVICE_NAME_ATTRIBUTE as dn, PropType as dt, AnnotationChanges as en, NormalizedPromptUpdates as et, ResourceInputs as f, Span as fn, PropValue$1 as ft, isResource as g, SpanMessage as gn, ResourceInstanceInput as gt, StaticResourceDefinition as h, SpanKind as hn, ResourceInfo as ht, CheckRun as i, AnnotationSource as in, PendingConflicts as it, DatasetSummary as j, TraceWithSpans as jn, EvalArmSpec as jt, DatasetRowUpdate as k, TraceStreamEvent as kn, VersionInfo as kt, Resource as l, PLAYGROUND_ENVIRONMENT as ln, PromptStyle as lt, ResourceOutputDefinition as m, SpanImagePart as mn, RebaseResult as mt, CheckDefinition as n, AnnotationEventOp as nn, NormalizedToolCall as nt, isCheck as o, DEPLOYMENT_ENVIRONMENT_ATTRIBUTE as on, PromptInputSources as ot, ResourceInstance as p, SpanContentPart as pn, QuestionsPromptUpdates as pt, FieldValues as q, EvalRunSummary as qt, CheckOutcome as r, AnnotationKind as rn, ParsedPrompt as rt, DynamicResourceDefinition as s, EvalCounts as sn, PromptProviderInfo as st, Check as t, AnnotationEvent as tn, NormalizedQuestionsPrompt as tt, ResourceDefinition as u, PromptID as un, PropDefinition$1 as ut, resource as v, SpanReasoningPart as vn, RunResources as vt, DatasetInstanceShape as w, TraceChangeEvent as wn, ValueFactory$1 as wt, DatasetChangeType as x, SpanToolResultPart as xn, ValueCatalog as xt, Dataset as y, SpanTextPart as yn, SourceSpan as yt, ChangeEventType as z, EvalInputs as zt };
|
package/dist/checks/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { V as CheckInfo, i as CheckRun, jn as TraceWithSpans, t as Check } from "../check-CR4fU1S5.js";
|
|
2
2
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
3
3
|
|
|
4
4
|
//#region src/checks/index.d.ts
|
package/dist/cli/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as fieldsForPrompt, A as DEFAULT_QUERY_TIMEOUT_MS, C as VariationConflictError, D as normalizeOtlpRequest, E as decodeOtlpProtobuf, F as parseColumnSpecs,
|
|
1
|
+
import { $ as fieldsForPrompt, A as DEFAULT_QUERY_TIMEOUT_MS, At as isPromptStyle, C as VariationConflictError, D as normalizeOtlpRequest, E as decodeOtlpProtobuf, F as parseColumnSpecs, G as evalProblems, H as EvalRunner, I as pathField, It as PLAYGROUND_RESOURCE, J as parseBinding, K as InvalidCellError, L as pathInstance, M as InvalidColumnPathError, Mt as TypeSafeSDK, N as isPathColumn, O as EvalNotFoundError, P as parseColumnPath, Q as PRIMITIVE_FIELD_TYPES, R as DatasetNotFoundError, S as datasetQueryColumns, Tt as TRACE_EVENTS_PATH, U as emptyCounts, V as EvalRunRefusedError, W as CheckScopeTraceSink, X as parseResources, Y as parseCell, Z as primitiveBase, an as LocalFileProvider, b as mkdirSelfIgnoring, dt as instanceNames, et as isPrimitiveFieldType, in as setupStepCommand, j as SqlQueryError, kt as isNonEmptyStringArray, l as LocalEvalProvider, ln as registerFreshImportHook, n as OtlpTraceIngestor, nt as InputResolutionError, p as LocalDirectoryDatasetProvider, q as fitsPrimitiveBase, r as LocalDatabaseTraceProvider, rn as CONFIG_FILE_RELATIVE_PATH, rt as runPrompt, s as isTraceSink, sn as registerVariationLoaderHook, t as TraceEventIngestor, tt as portableDef, un as registerBundlerResolutionFallback, x as rollupSpans, yt as VercelAISDK, z as DatasetValidationError } from "../trace-event-ingestor-BghQcCHe.js";
|
|
2
2
|
import { r as builtinCheckInfos } from "../checks-Cq97JU-h.js";
|
|
3
3
|
import module, { builtinModules } from "node:module";
|
|
4
4
|
import path, { join, resolve } from "node:path";
|
|
@@ -23,7 +23,7 @@ import { StreamableHTTPClientTransport } from "@modelcontextprotocol/client";
|
|
|
23
23
|
import { StdioServerTransport } from "@modelcontextprotocol/server/stdio";
|
|
24
24
|
import { spawn } from "node:child_process";
|
|
25
25
|
//#region package.json
|
|
26
|
-
var version = "1.0.
|
|
26
|
+
var version = "1.0.8";
|
|
27
27
|
//#endregion
|
|
28
28
|
//#region src/agent/command-builder.ts
|
|
29
29
|
/** Characters an argument may consist of to be left unquoted. */
|
|
@@ -889,7 +889,8 @@ async function parseFields(value, lookupPrompt) {
|
|
|
889
889
|
for (const [i, field] of value.entries()) {
|
|
890
890
|
const def = isRecord$1(field) ? field.def : void 0;
|
|
891
891
|
let parsed;
|
|
892
|
-
|
|
892
|
+
const byHand = def === void 0 && !!lookupPrompt && isRecord$1(field);
|
|
893
|
+
if (byHand) try {
|
|
893
894
|
parsed = await parseNewField(field, lookupPrompt);
|
|
894
895
|
} catch (err) {
|
|
895
896
|
throw err instanceof BadRequest$1 ? new BadRequest$1(`fields[${i}]: ${err.message}`) : err;
|
|
@@ -899,7 +900,10 @@ async function parseFields(value, lookupPrompt) {
|
|
|
899
900
|
const key = `${parsed.name}\u0000${parsed.type.syntax}`;
|
|
900
901
|
if (seen.has(key)) throw new BadRequest$1(`fields[${i}] duplicates "${parsed.name}: ${parsed.type.syntax}"`);
|
|
901
902
|
seen.add(key);
|
|
902
|
-
fields.push({
|
|
903
|
+
fields.push({
|
|
904
|
+
def: parsed,
|
|
905
|
+
...byHand && { added: true }
|
|
906
|
+
});
|
|
903
907
|
}
|
|
904
908
|
return fields;
|
|
905
909
|
}
|
|
@@ -1963,11 +1967,18 @@ const QUERY_UNSUPPORTED = errorResult(405, "This trace provider does not support
|
|
|
1963
1967
|
/**
|
|
1964
1968
|
* Each trace an eval run produced, keyed `traceProviderId:traceId`. Never
|
|
1965
1969
|
* throws: a provider that can't answer just leaves its traces ungrouped.
|
|
1970
|
+
* A run in flight only knows its traces, so what's recorded of their checks
|
|
1971
|
+
* survives it being added after the providers.
|
|
1966
1972
|
*/
|
|
1967
1973
|
async function traceEvalRuns(sources) {
|
|
1968
1974
|
const found = /* @__PURE__ */ new Map();
|
|
1969
|
-
const add = ({ traceProviderId, traceId, ...
|
|
1970
|
-
|
|
1975
|
+
const add = ({ traceProviderId, traceId, checkCounts, ...evalRun }) => {
|
|
1976
|
+
const key = `${traceProviderId}:${traceId}`;
|
|
1977
|
+
const counts = checkCounts ?? found.get(key)?.checkCounts;
|
|
1978
|
+
found.set(key, {
|
|
1979
|
+
evalRun,
|
|
1980
|
+
...counts && { checkCounts: counts }
|
|
1981
|
+
});
|
|
1971
1982
|
};
|
|
1972
1983
|
await Promise.all(Array.from(sources.providers, async (provider) => {
|
|
1973
1984
|
try {
|
|
@@ -1985,7 +1996,7 @@ async function traceEvalRuns(sources) {
|
|
|
1985
1996
|
/**
|
|
1986
1997
|
* `GET /api/traces` — summaries of every trace across `providers`, per
|
|
1987
1998
|
* provider newest first. With `evals`, each trace an eval run produced
|
|
1988
|
-
* carries its `evalRun`.
|
|
1999
|
+
* carries its `evalRun` and `checkCounts`.
|
|
1989
2000
|
*/
|
|
1990
2001
|
async function handleListTraces(providers, evals) {
|
|
1991
2002
|
try {
|
|
@@ -1997,13 +2008,10 @@ async function handleListTraces(providers, evals) {
|
|
|
1997
2008
|
};
|
|
1998
2009
|
return {
|
|
1999
2010
|
status: 200,
|
|
2000
|
-
body: traces.map((trace) => {
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
evalRun
|
|
2005
|
-
} : trace;
|
|
2006
|
-
})
|
|
2011
|
+
body: traces.map((trace) => ({
|
|
2012
|
+
...trace,
|
|
2013
|
+
...evalRuns.get(`${trace.providerId}:${trace.id}`)
|
|
2014
|
+
}))
|
|
2007
2015
|
};
|
|
2008
2016
|
} catch (error) {
|
|
2009
2017
|
return errorResult(500, error.message);
|
|
@@ -2638,6 +2646,20 @@ function propValueToJson(value) {
|
|
|
2638
2646
|
default: return;
|
|
2639
2647
|
}
|
|
2640
2648
|
}
|
|
2649
|
+
/**
|
|
2650
|
+
* Whether a `PropValue` holds an `undefined` at any depth. JSON can't say so,
|
|
2651
|
+
* and {@link propValueToJson} reads one as `null` — a different value to a
|
|
2652
|
+
* schema — so whoever must preserve the difference asks here first.
|
|
2653
|
+
*/
|
|
2654
|
+
function holdsUndefined(value) {
|
|
2655
|
+
switch (value.kind) {
|
|
2656
|
+
case "primitive": return value.value === void 0;
|
|
2657
|
+
case "array":
|
|
2658
|
+
case "tuple": return value.elements.some(holdsUndefined);
|
|
2659
|
+
case "object": return Object.values(value.properties).some(holdsUndefined);
|
|
2660
|
+
default: return false;
|
|
2661
|
+
}
|
|
2662
|
+
}
|
|
2641
2663
|
//#endregion
|
|
2642
2664
|
//#region src/eval/run-summary.ts
|
|
2643
2665
|
/**
|
|
@@ -2766,8 +2788,10 @@ function withReferencedInstances(inputs, own, stored) {
|
|
|
2766
2788
|
return Object.keys(out).length > 0 ? out : void 0;
|
|
2767
2789
|
}
|
|
2768
2790
|
/**
|
|
2769
|
-
* Proposes bindings for every unbound slot and check parameter
|
|
2770
|
-
* touching one already set (`specs/evals.md` §F.1)
|
|
2791
|
+
* Proposes bindings for every unbound slot and check parameter in `scope`,
|
|
2792
|
+
* never touching one already set (`specs/evals.md` §F.1). Meant for setting
|
|
2793
|
+
* an eval up, not for every time it's opened: a slot left unbound on purpose
|
|
2794
|
+
* would be bound again.
|
|
2771
2795
|
*
|
|
2772
2796
|
* - A prompt slot takes a column that matches it by name and type, else
|
|
2773
2797
|
* what the playground last ran it with.
|
|
@@ -2778,8 +2802,9 @@ function withReferencedInstances(inputs, own, stored) {
|
|
|
2778
2802
|
* that fits": a confident wrong binding is worse than an obvious empty one.
|
|
2779
2803
|
*/
|
|
2780
2804
|
function prefillBindings(input) {
|
|
2781
|
-
const { prompt, fields, stored } = input;
|
|
2805
|
+
const { prompt, fields, stored, scope = "all" } = input;
|
|
2782
2806
|
const matched = [];
|
|
2807
|
+
const checkIds = scope === "all" ? void 0 : new Set(scope.checkIds);
|
|
2783
2808
|
const fillHalf = (params, current, storedHalf, prefix) => {
|
|
2784
2809
|
const out = { ...current };
|
|
2785
2810
|
for (const param of params) {
|
|
@@ -2788,15 +2813,18 @@ function prefillBindings(input) {
|
|
|
2788
2813
|
}
|
|
2789
2814
|
return out;
|
|
2790
2815
|
};
|
|
2791
|
-
const inputs = {
|
|
2816
|
+
const inputs = checkIds ? input.inputs : {
|
|
2792
2817
|
functionInputs: fillHalf(prompt.functionParameters, input.inputs.functionInputs, stored?.functionInputs, "fn"),
|
|
2793
2818
|
executeInputs: fillHalf(prompt.executeParameters ?? [], input.inputs.executeInputs, stored?.executeInputs, "exec")
|
|
2794
2819
|
};
|
|
2795
|
-
|
|
2796
|
-
|
|
2820
|
+
if (!checkIds) {
|
|
2821
|
+
const resources = withReferencedInstances(inputs, input.inputs.resources, stored?.resources);
|
|
2822
|
+
if (resources) inputs.resources = resources;
|
|
2823
|
+
}
|
|
2797
2824
|
return {
|
|
2798
2825
|
inputs,
|
|
2799
2826
|
checks: input.checks.map((check) => {
|
|
2827
|
+
if (checkIds && !checkIds.has(check.id)) return check;
|
|
2800
2828
|
const info = input.checkInfos.find((c) => c.uri === check.uri);
|
|
2801
2829
|
if (!info) return check;
|
|
2802
2830
|
const args = { ...check.args };
|
|
@@ -3055,6 +3083,7 @@ function describeBinding(input, fields) {
|
|
|
3055
3083
|
return column ? { column } : input;
|
|
3056
3084
|
}
|
|
3057
3085
|
case "value": {
|
|
3086
|
+
if (holdsUndefined(input.value)) return input;
|
|
3058
3087
|
const plain = propValueToJson(input.value);
|
|
3059
3088
|
return plain === void 0 ? input : { json: plain };
|
|
3060
3089
|
}
|
|
@@ -3093,7 +3122,7 @@ function checkIdFor(uri, taken) {
|
|
|
3093
3122
|
taken.add(id);
|
|
3094
3123
|
return id;
|
|
3095
3124
|
}
|
|
3096
|
-
const binding = z.record(z.string(), z.unknown()).describe("How to fill a slot: {column: \"<dataset field name>\"} for the row's value (a field sharing its name with an earlier one goes by its query column, e.g. \"city#3\"), {json: <plain JSON>} for a fixed value, {kind: \"input\", half: \"function\" | \"execute\", path} for what the run bound to one of the prompt's own slots, {kind: \"object\", properties: {name: binding}} to fill an object property by property, or {kind: \"instance\", name, output?} for one of the eval's (or each row's) named resource instances, or an output of it.");
|
|
3125
|
+
const binding = z.record(z.string(), z.unknown()).describe("How to fill a slot: {column: \"<dataset field name>\"} for the row's value (a field sharing its name with an earlier one goes by its query column, e.g. \"city#3\"), {json: <plain JSON>} for a fixed value, {kind: \"value\", value: {kind: \"primitive\"}} for a value left undefined, {kind: \"input\", half: \"function\" | \"execute\", path} for what the run bound to one of the prompt's own slots, {kind: \"object\", properties: {name: binding}} to fill an object property by property, or {kind: \"instance\", name, output?} for one of the eval's (or each row's) named resource instances, or an output of it.");
|
|
3097
3126
|
const bindings = z.record(z.string(), binding).describe("Parameter name → binding.");
|
|
3098
3127
|
const resourceSpec = z.object({
|
|
3099
3128
|
uri: z.string().describe("The resource's uri (`<module>#<export>`), never an output's."),
|