@runtypelabs/sdk 11.23.0 → 11.24.2
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/index.cjs +10 -5
- package/dist/index.d.cts +75 -9
- package/dist/index.d.ts +75 -9
- package/dist/index.mjs +10 -5
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -4946,10 +4946,10 @@ var RecordsEndpoint = class {
|
|
|
4946
4946
|
return this.client.postFormData("/records/upload-csv", formData);
|
|
4947
4947
|
}
|
|
4948
4948
|
/**
|
|
4949
|
-
* Get record types
|
|
4949
|
+
* Get distinct record types, optionally including per-type counts and latest write timestamps.
|
|
4950
4950
|
*/
|
|
4951
|
-
async getTypes() {
|
|
4952
|
-
return this.client.get("/records?distinct=types");
|
|
4951
|
+
async getTypes(options) {
|
|
4952
|
+
return this.client.get(options?.includeSummary ? "/records?distinct=types&includeSummary=true" : "/records?distinct=types");
|
|
4953
4953
|
}
|
|
4954
4954
|
/**
|
|
4955
4955
|
* Get example record by type and/or name
|
|
@@ -13944,7 +13944,12 @@ var RuntypeClient$1 = class {
|
|
|
13944
13944
|
const relPath = path.startsWith("/") ? path.slice(1) : path;
|
|
13945
13945
|
const url = new URL(relPath, base);
|
|
13946
13946
|
if (params) Object.entries(params).forEach(([key, value]) => {
|
|
13947
|
-
if (value !== void 0 && value !== null)
|
|
13947
|
+
if (value !== void 0 && value !== null) {
|
|
13948
|
+
if (Array.isArray(value)) value.forEach((item) => {
|
|
13949
|
+
if (item !== void 0 && item !== null) url.searchParams.append(key, String(item));
|
|
13950
|
+
});
|
|
13951
|
+
else url.searchParams.set(key, String(value));
|
|
13952
|
+
}
|
|
13948
13953
|
});
|
|
13949
13954
|
return url.toString();
|
|
13950
13955
|
}
|
|
@@ -14832,7 +14837,7 @@ function transformQueryParams(params) {
|
|
|
14832
14837
|
return result;
|
|
14833
14838
|
}
|
|
14834
14839
|
// src/version.ts
|
|
14835
|
-
const SDK_VERSION = "11.
|
|
14840
|
+
const SDK_VERSION = "11.24.2";
|
|
14836
14841
|
/**
|
|
14837
14842
|
* Canonical client identity the API uses for attribution
|
|
14838
14843
|
* (`detectActorSource` in apps/api/src/lib/audit-log.ts keys `'sdk'` off the
|
package/dist/index.d.cts
CHANGED
|
@@ -14294,6 +14294,7 @@ interface paths {
|
|
|
14294
14294
|
id: string;
|
|
14295
14295
|
kind: string;
|
|
14296
14296
|
name?: string;
|
|
14297
|
+
runIds?: string[];
|
|
14297
14298
|
}[];
|
|
14298
14299
|
warnings?: string[];
|
|
14299
14300
|
} | null;
|
|
@@ -14316,6 +14317,7 @@ interface paths {
|
|
|
14316
14317
|
id: string;
|
|
14317
14318
|
kind: string;
|
|
14318
14319
|
name?: string;
|
|
14320
|
+
runIds?: string[];
|
|
14319
14321
|
}[];
|
|
14320
14322
|
updatedAt: string;
|
|
14321
14323
|
userId: string;
|
|
@@ -14463,6 +14465,7 @@ interface paths {
|
|
|
14463
14465
|
id: string;
|
|
14464
14466
|
kind: string;
|
|
14465
14467
|
name?: string;
|
|
14468
|
+
runIds?: string[];
|
|
14466
14469
|
}[];
|
|
14467
14470
|
warnings?: string[];
|
|
14468
14471
|
} | null;
|
|
@@ -14485,6 +14488,7 @@ interface paths {
|
|
|
14485
14488
|
id: string;
|
|
14486
14489
|
kind: string;
|
|
14487
14490
|
name?: string;
|
|
14491
|
+
runIds?: string[];
|
|
14488
14492
|
}[];
|
|
14489
14493
|
updatedAt: string;
|
|
14490
14494
|
userId: string;
|
|
@@ -14537,6 +14541,7 @@ interface paths {
|
|
|
14537
14541
|
id: string;
|
|
14538
14542
|
kind: string;
|
|
14539
14543
|
name?: string;
|
|
14544
|
+
runIds?: string[];
|
|
14540
14545
|
}[];
|
|
14541
14546
|
warnings?: string[];
|
|
14542
14547
|
} | null;
|
|
@@ -14559,6 +14564,7 @@ interface paths {
|
|
|
14559
14564
|
id: string;
|
|
14560
14565
|
kind: string;
|
|
14561
14566
|
name?: string;
|
|
14567
|
+
runIds?: string[];
|
|
14562
14568
|
}[];
|
|
14563
14569
|
updatedAt: string;
|
|
14564
14570
|
userId: string;
|
|
@@ -14695,6 +14701,7 @@ interface paths {
|
|
|
14695
14701
|
id: string;
|
|
14696
14702
|
kind: string;
|
|
14697
14703
|
name?: string;
|
|
14704
|
+
runIds?: string[];
|
|
14698
14705
|
};
|
|
14699
14706
|
ok: boolean;
|
|
14700
14707
|
/** @enum {boolean} */
|
|
@@ -14740,6 +14747,7 @@ interface paths {
|
|
|
14740
14747
|
id: string;
|
|
14741
14748
|
kind: string;
|
|
14742
14749
|
name?: string;
|
|
14750
|
+
runIds?: string[];
|
|
14743
14751
|
}[];
|
|
14744
14752
|
warnings?: string[];
|
|
14745
14753
|
};
|
|
@@ -14796,6 +14804,7 @@ interface paths {
|
|
|
14796
14804
|
id: string;
|
|
14797
14805
|
kind: string;
|
|
14798
14806
|
name?: string;
|
|
14807
|
+
runIds?: string[];
|
|
14799
14808
|
}[];
|
|
14800
14809
|
warnings?: string[];
|
|
14801
14810
|
} | null;
|
|
@@ -14818,6 +14827,7 @@ interface paths {
|
|
|
14818
14827
|
id: string;
|
|
14819
14828
|
kind: string;
|
|
14820
14829
|
name?: string;
|
|
14830
|
+
runIds?: string[];
|
|
14821
14831
|
}[];
|
|
14822
14832
|
updatedAt: string;
|
|
14823
14833
|
userId: string;
|
|
@@ -15028,6 +15038,7 @@ interface paths {
|
|
|
15028
15038
|
id: string;
|
|
15029
15039
|
kind: string;
|
|
15030
15040
|
name?: string;
|
|
15041
|
+
runIds?: string[];
|
|
15031
15042
|
}[];
|
|
15032
15043
|
warnings?: string[];
|
|
15033
15044
|
} | null;
|
|
@@ -15050,6 +15061,7 @@ interface paths {
|
|
|
15050
15061
|
id: string;
|
|
15051
15062
|
kind: string;
|
|
15052
15063
|
name?: string;
|
|
15064
|
+
runIds?: string[];
|
|
15053
15065
|
}[];
|
|
15054
15066
|
updatedAt: string;
|
|
15055
15067
|
userId: string;
|
|
@@ -15281,6 +15293,7 @@ interface paths {
|
|
|
15281
15293
|
id: string;
|
|
15282
15294
|
kind: string;
|
|
15283
15295
|
name?: string;
|
|
15296
|
+
runIds?: string[];
|
|
15284
15297
|
}[];
|
|
15285
15298
|
warnings?: string[];
|
|
15286
15299
|
} | null;
|
|
@@ -15303,6 +15316,7 @@ interface paths {
|
|
|
15303
15316
|
id: string;
|
|
15304
15317
|
kind: string;
|
|
15305
15318
|
name?: string;
|
|
15319
|
+
runIds?: string[];
|
|
15306
15320
|
}[];
|
|
15307
15321
|
updatedAt: string;
|
|
15308
15322
|
userId: string;
|
|
@@ -35858,6 +35872,8 @@ interface paths {
|
|
|
35858
35872
|
kind: "agent" | "flow";
|
|
35859
35873
|
/** @description Last heartbeat. Absent means the overlay did not answer, which is not false and not null. */
|
|
35860
35874
|
lastHeartbeatAt?: string | null;
|
|
35875
|
+
/** @description Model of the run's first model call (served model when reported, otherwise requested model); null when no model call recorded one. */
|
|
35876
|
+
model?: string | null;
|
|
35861
35877
|
/**
|
|
35862
35878
|
* @description Where the run was dispatched from, taken from the caller's authenticated principal and never from a request field. ANY entrance that resolves a principal stamps it: a Clerk session answers dashboard; a management API key answers api, which includes the Runtype MCP server's tools and Code Mode, since both reach dispatch with a management key; and Runtype's own internal caller answers internal, for example the hosted /v1/mcp proxy. A lane that resolves NO principal carries NULL BY DESIGN: schedule, webhook, messaging, A2A, an agent exposed AS an MCP surface, subagent, nested flow, a client-token product surface (an end user is none of the three origins) and an ingested OTLP run. So NULL says "no authenticated principal at this entrance" rather than "unknown caller". The one NULL that is not a statement about the lane is a row whose header predates the field or came from the backfill: it stamps nothing even for a run that did resolve a principal.
|
|
35863
35879
|
* @enum {string|null}
|
|
@@ -45421,6 +45437,8 @@ interface paths {
|
|
|
45421
45437
|
name?: string;
|
|
45422
45438
|
ownerId?: string;
|
|
45423
45439
|
distinct?: string;
|
|
45440
|
+
/** @description When set to "true" with distinct=types, includes per-type record counts and latest write timestamps in summaries. */
|
|
45441
|
+
includeSummary?: string;
|
|
45424
45442
|
includeFields?: string;
|
|
45425
45443
|
include_fields?: string;
|
|
45426
45444
|
product_surface_id?: string;
|
|
@@ -45478,6 +45496,12 @@ interface paths {
|
|
|
45478
45496
|
[key: string]: unknown;
|
|
45479
45497
|
};
|
|
45480
45498
|
pagination: components["schemas"]["Pagination"];
|
|
45499
|
+
/** @description Per-type record counts and latest write timestamps when distinct=types and includeSummary=true. */
|
|
45500
|
+
summaries?: {
|
|
45501
|
+
latestUpdatedAt: string | null;
|
|
45502
|
+
total: number;
|
|
45503
|
+
type: string;
|
|
45504
|
+
}[];
|
|
45481
45505
|
};
|
|
45482
45506
|
};
|
|
45483
45507
|
};
|
|
@@ -47331,8 +47355,8 @@ interface paths {
|
|
|
47331
47355
|
agentId?: string | string[];
|
|
47332
47356
|
/** @description Filter by flow id; repeat for a set. */
|
|
47333
47357
|
flowId?: string | string[];
|
|
47334
|
-
/** @description Filter by conversation id. */
|
|
47335
|
-
conversationId?: string;
|
|
47358
|
+
/** @description Filter by conversation id; repeat for a set (at most 100 per request). */
|
|
47359
|
+
conversationId?: string | string[];
|
|
47336
47360
|
/** @description Filter by surface id. */
|
|
47337
47361
|
surfaceId?: string;
|
|
47338
47362
|
/** @description Filter by surface family. */
|
|
@@ -47361,7 +47385,7 @@ interface paths {
|
|
|
47361
47385
|
from?: string;
|
|
47362
47386
|
/** @description Window end (ISO 8601). Defaults to now. */
|
|
47363
47387
|
to?: string;
|
|
47364
|
-
/** @description full (the default) returns every field. compact omits exactly these
|
|
47388
|
+
/** @description full (the default) returns every field. compact omits exactly these 17: model, stopReason, iterations, inputPreview, flowVersionId, agentVersionId, agentVersionLabel, agentVersionNumber, agentTargetResolution, otelProducer, lastHeartbeatAt, expiresAt, cancelRequestedAt, progress, pendingApproval, budgetExhausted and inputMessages. The status is still overlay-corrected on a compact page; only the fields differ. */
|
|
47365
47389
|
view?: "compact" | "full";
|
|
47366
47390
|
/** @description live adds control-plane fields; defaults to live for a session, none for an API key. */
|
|
47367
47391
|
overlay?: "live" | "none";
|
|
@@ -47481,8 +47505,8 @@ interface paths {
|
|
|
47481
47505
|
agentId?: string | string[];
|
|
47482
47506
|
/** @description Filter by flow id; repeat for a set. */
|
|
47483
47507
|
flowId?: string | string[];
|
|
47484
|
-
/** @description Filter by conversation id. */
|
|
47485
|
-
conversationId?: string;
|
|
47508
|
+
/** @description Filter by conversation id; repeat for a set (at most 100 per request). */
|
|
47509
|
+
conversationId?: string | string[];
|
|
47486
47510
|
/** @description Filter by surface id. */
|
|
47487
47511
|
surfaceId?: string;
|
|
47488
47512
|
/** @description Filter by surface family. */
|
|
@@ -47701,7 +47725,7 @@ interface paths {
|
|
|
47701
47725
|
query?: {
|
|
47702
47726
|
/** @description live adds control-plane fields; defaults to live for a session, none for an API key. */
|
|
47703
47727
|
overlay?: "live" | "none";
|
|
47704
|
-
/** @description full (the default) returns every field. compact omits exactly these
|
|
47728
|
+
/** @description full (the default) returns every field. compact omits exactly these 17: model, stopReason, iterations, inputPreview, flowVersionId, agentVersionId, agentVersionLabel, agentVersionNumber, agentTargetResolution, otelProducer, lastHeartbeatAt, expiresAt, cancelRequestedAt, progress, pendingApproval, budgetExhausted and inputMessages. The status is still overlay-corrected on a compact page; only the fields differ. */
|
|
47705
47729
|
view?: "compact" | "full";
|
|
47706
47730
|
};
|
|
47707
47731
|
header?: never;
|
|
@@ -65105,6 +65129,8 @@ interface components {
|
|
|
65105
65129
|
kind: "agent" | "flow";
|
|
65106
65130
|
/** @description Last heartbeat. Absent means the overlay did not answer, which is not false and not null. */
|
|
65107
65131
|
lastHeartbeatAt?: string | null;
|
|
65132
|
+
/** @description Model of the run's first model call (served model when reported, otherwise requested model); null when no model call recorded one. */
|
|
65133
|
+
model?: string | null;
|
|
65108
65134
|
/**
|
|
65109
65135
|
* @description Where the run was dispatched from, taken from the caller's authenticated principal and never from a request field. ANY entrance that resolves a principal stamps it: a Clerk session answers dashboard; a management API key answers api, which includes the Runtype MCP server's tools and Code Mode, since both reach dispatch with a management key; and Runtype's own internal caller answers internal, for example the hosted /v1/mcp proxy. A lane that resolves NO principal carries NULL BY DESIGN: schedule, webhook, messaging, A2A, an agent exposed AS an MCP surface, subagent, nested flow, a client-token product surface (an end user is none of the three origins) and an ingested OTLP run. So NULL says "no authenticated principal at this entrance" rather than "unknown caller". The one NULL that is not a statement about the lane is a row whose header predates the field or came from the backfill: it stamps nothing even for a run that did resolve a principal.
|
|
65110
65136
|
* @enum {string|null}
|
|
@@ -71798,11 +71824,18 @@ export declare class RecordsEndpoint {
|
|
|
71798
71824
|
typeValue?: string;
|
|
71799
71825
|
}): Promise<any>;
|
|
71800
71826
|
/**
|
|
71801
|
-
* Get record types
|
|
71827
|
+
* Get distinct record types, optionally including per-type counts and latest write timestamps.
|
|
71802
71828
|
*/
|
|
71803
|
-
getTypes(
|
|
71829
|
+
getTypes(options?: {
|
|
71830
|
+
includeSummary?: boolean;
|
|
71831
|
+
}): Promise<{
|
|
71804
71832
|
data: string[];
|
|
71805
71833
|
total: number;
|
|
71834
|
+
summaries?: Array<{
|
|
71835
|
+
type: string;
|
|
71836
|
+
total: number;
|
|
71837
|
+
latestUpdatedAt: string | null;
|
|
71838
|
+
}>;
|
|
71806
71839
|
}>;
|
|
71807
71840
|
/**
|
|
71808
71841
|
* Get example record by type and/or name
|
|
@@ -78007,6 +78040,8 @@ interface RunListRow {
|
|
|
78007
78040
|
framework: string | null;
|
|
78008
78041
|
endpointHost: string | null;
|
|
78009
78042
|
} | null;
|
|
78043
|
+
/** Model of the run's first model call; null when no model call recorded one. */
|
|
78044
|
+
model?: string | null;
|
|
78010
78045
|
stopReason?: string | null;
|
|
78011
78046
|
iterations?: number | null;
|
|
78012
78047
|
/**
|
|
@@ -78042,7 +78077,7 @@ interface RunListRow {
|
|
|
78042
78077
|
interface RunListParams {
|
|
78043
78078
|
agentId?: string | string[];
|
|
78044
78079
|
flowId?: string | string[];
|
|
78045
|
-
conversationId?: string;
|
|
78080
|
+
conversationId?: string | string[];
|
|
78046
78081
|
surfaceId?: string;
|
|
78047
78082
|
surfaceType?: string;
|
|
78048
78083
|
recordId?: string;
|
|
@@ -80071,6 +80106,15 @@ interface SimulationEpisodeMetrics {
|
|
|
80071
80106
|
scoringFailed?: true;
|
|
80072
80107
|
/** Scoring failed because no goal-judge attempt returned a valid verdict: the judge, not the episode, gave no verdict. */
|
|
80073
80108
|
goalJudgeModelError?: true;
|
|
80109
|
+
/**
|
|
80110
|
+
* An interrupted, unscored episode's side-effect graders that wrote no score because its state could not be read.
|
|
80111
|
+
* `guarded` is true when one checks a write that must not happen; `reason` is absent under the `metrics` data policy.
|
|
80112
|
+
*/
|
|
80113
|
+
unreadSideEffects?: {
|
|
80114
|
+
graderIndexes: number[];
|
|
80115
|
+
guarded: boolean;
|
|
80116
|
+
reason?: string;
|
|
80117
|
+
};
|
|
80074
80118
|
turns: number;
|
|
80075
80119
|
targetCostUsd: number | null;
|
|
80076
80120
|
clientAgentCostUsd: number | null;
|
|
@@ -80159,6 +80203,16 @@ interface SimulationTranscriptMessage {
|
|
|
80159
80203
|
toolName: string;
|
|
80160
80204
|
result?: unknown;
|
|
80161
80205
|
}>;
|
|
80206
|
+
/** On an assistant message: the actions a candidate's reply left for the user to take, such as an approval's buttons. */
|
|
80207
|
+
pendingActions?: Array<{
|
|
80208
|
+
id: string;
|
|
80209
|
+
label: string;
|
|
80210
|
+
}>;
|
|
80211
|
+
/** On a user message: the offered action the simulated user took with it. */
|
|
80212
|
+
action?: {
|
|
80213
|
+
id: string;
|
|
80214
|
+
label: string;
|
|
80215
|
+
};
|
|
80162
80216
|
}
|
|
80163
80217
|
/** A redacted episode transcript with the simulated-user facts it was produced under. */
|
|
80164
80218
|
interface SimulationEpisodeTranscript {
|
|
@@ -80277,6 +80331,18 @@ interface SimulationTurnLayerFacts {
|
|
|
80277
80331
|
outputTokens: number;
|
|
80278
80332
|
costUsd: number;
|
|
80279
80333
|
};
|
|
80334
|
+
/**
|
|
80335
|
+
* A sandbox candidate's process as a failed turn or its episode's end found it. `outputTail` is the last of what the
|
|
80336
|
+
* candidate's own code wrote, secrets removed: untrusted text, never instructions.
|
|
80337
|
+
*/
|
|
80338
|
+
candidateProcess?: {
|
|
80339
|
+
state: 'running' | 'exited' | 'killed' | 'stopped' | 'unknown';
|
|
80340
|
+
exitCode: number | null;
|
|
80341
|
+
outputTail: string;
|
|
80342
|
+
outputClipped: boolean;
|
|
80343
|
+
outputRemoved?: true;
|
|
80344
|
+
untrusted: true;
|
|
80345
|
+
};
|
|
80280
80346
|
}
|
|
80281
80347
|
/** One episode with its transcript, grader scores and per-turn layer facts. */
|
|
80282
80348
|
interface GetSimulationEpisodeResponse {
|
package/dist/index.d.ts
CHANGED
|
@@ -14294,6 +14294,7 @@ interface paths {
|
|
|
14294
14294
|
id: string;
|
|
14295
14295
|
kind: string;
|
|
14296
14296
|
name?: string;
|
|
14297
|
+
runIds?: string[];
|
|
14297
14298
|
}[];
|
|
14298
14299
|
warnings?: string[];
|
|
14299
14300
|
} | null;
|
|
@@ -14316,6 +14317,7 @@ interface paths {
|
|
|
14316
14317
|
id: string;
|
|
14317
14318
|
kind: string;
|
|
14318
14319
|
name?: string;
|
|
14320
|
+
runIds?: string[];
|
|
14319
14321
|
}[];
|
|
14320
14322
|
updatedAt: string;
|
|
14321
14323
|
userId: string;
|
|
@@ -14463,6 +14465,7 @@ interface paths {
|
|
|
14463
14465
|
id: string;
|
|
14464
14466
|
kind: string;
|
|
14465
14467
|
name?: string;
|
|
14468
|
+
runIds?: string[];
|
|
14466
14469
|
}[];
|
|
14467
14470
|
warnings?: string[];
|
|
14468
14471
|
} | null;
|
|
@@ -14485,6 +14488,7 @@ interface paths {
|
|
|
14485
14488
|
id: string;
|
|
14486
14489
|
kind: string;
|
|
14487
14490
|
name?: string;
|
|
14491
|
+
runIds?: string[];
|
|
14488
14492
|
}[];
|
|
14489
14493
|
updatedAt: string;
|
|
14490
14494
|
userId: string;
|
|
@@ -14537,6 +14541,7 @@ interface paths {
|
|
|
14537
14541
|
id: string;
|
|
14538
14542
|
kind: string;
|
|
14539
14543
|
name?: string;
|
|
14544
|
+
runIds?: string[];
|
|
14540
14545
|
}[];
|
|
14541
14546
|
warnings?: string[];
|
|
14542
14547
|
} | null;
|
|
@@ -14559,6 +14564,7 @@ interface paths {
|
|
|
14559
14564
|
id: string;
|
|
14560
14565
|
kind: string;
|
|
14561
14566
|
name?: string;
|
|
14567
|
+
runIds?: string[];
|
|
14562
14568
|
}[];
|
|
14563
14569
|
updatedAt: string;
|
|
14564
14570
|
userId: string;
|
|
@@ -14695,6 +14701,7 @@ interface paths {
|
|
|
14695
14701
|
id: string;
|
|
14696
14702
|
kind: string;
|
|
14697
14703
|
name?: string;
|
|
14704
|
+
runIds?: string[];
|
|
14698
14705
|
};
|
|
14699
14706
|
ok: boolean;
|
|
14700
14707
|
/** @enum {boolean} */
|
|
@@ -14740,6 +14747,7 @@ interface paths {
|
|
|
14740
14747
|
id: string;
|
|
14741
14748
|
kind: string;
|
|
14742
14749
|
name?: string;
|
|
14750
|
+
runIds?: string[];
|
|
14743
14751
|
}[];
|
|
14744
14752
|
warnings?: string[];
|
|
14745
14753
|
};
|
|
@@ -14796,6 +14804,7 @@ interface paths {
|
|
|
14796
14804
|
id: string;
|
|
14797
14805
|
kind: string;
|
|
14798
14806
|
name?: string;
|
|
14807
|
+
runIds?: string[];
|
|
14799
14808
|
}[];
|
|
14800
14809
|
warnings?: string[];
|
|
14801
14810
|
} | null;
|
|
@@ -14818,6 +14827,7 @@ interface paths {
|
|
|
14818
14827
|
id: string;
|
|
14819
14828
|
kind: string;
|
|
14820
14829
|
name?: string;
|
|
14830
|
+
runIds?: string[];
|
|
14821
14831
|
}[];
|
|
14822
14832
|
updatedAt: string;
|
|
14823
14833
|
userId: string;
|
|
@@ -15028,6 +15038,7 @@ interface paths {
|
|
|
15028
15038
|
id: string;
|
|
15029
15039
|
kind: string;
|
|
15030
15040
|
name?: string;
|
|
15041
|
+
runIds?: string[];
|
|
15031
15042
|
}[];
|
|
15032
15043
|
warnings?: string[];
|
|
15033
15044
|
} | null;
|
|
@@ -15050,6 +15061,7 @@ interface paths {
|
|
|
15050
15061
|
id: string;
|
|
15051
15062
|
kind: string;
|
|
15052
15063
|
name?: string;
|
|
15064
|
+
runIds?: string[];
|
|
15053
15065
|
}[];
|
|
15054
15066
|
updatedAt: string;
|
|
15055
15067
|
userId: string;
|
|
@@ -15281,6 +15293,7 @@ interface paths {
|
|
|
15281
15293
|
id: string;
|
|
15282
15294
|
kind: string;
|
|
15283
15295
|
name?: string;
|
|
15296
|
+
runIds?: string[];
|
|
15284
15297
|
}[];
|
|
15285
15298
|
warnings?: string[];
|
|
15286
15299
|
} | null;
|
|
@@ -15303,6 +15316,7 @@ interface paths {
|
|
|
15303
15316
|
id: string;
|
|
15304
15317
|
kind: string;
|
|
15305
15318
|
name?: string;
|
|
15319
|
+
runIds?: string[];
|
|
15306
15320
|
}[];
|
|
15307
15321
|
updatedAt: string;
|
|
15308
15322
|
userId: string;
|
|
@@ -35858,6 +35872,8 @@ interface paths {
|
|
|
35858
35872
|
kind: "agent" | "flow";
|
|
35859
35873
|
/** @description Last heartbeat. Absent means the overlay did not answer, which is not false and not null. */
|
|
35860
35874
|
lastHeartbeatAt?: string | null;
|
|
35875
|
+
/** @description Model of the run's first model call (served model when reported, otherwise requested model); null when no model call recorded one. */
|
|
35876
|
+
model?: string | null;
|
|
35861
35877
|
/**
|
|
35862
35878
|
* @description Where the run was dispatched from, taken from the caller's authenticated principal and never from a request field. ANY entrance that resolves a principal stamps it: a Clerk session answers dashboard; a management API key answers api, which includes the Runtype MCP server's tools and Code Mode, since both reach dispatch with a management key; and Runtype's own internal caller answers internal, for example the hosted /v1/mcp proxy. A lane that resolves NO principal carries NULL BY DESIGN: schedule, webhook, messaging, A2A, an agent exposed AS an MCP surface, subagent, nested flow, a client-token product surface (an end user is none of the three origins) and an ingested OTLP run. So NULL says "no authenticated principal at this entrance" rather than "unknown caller". The one NULL that is not a statement about the lane is a row whose header predates the field or came from the backfill: it stamps nothing even for a run that did resolve a principal.
|
|
35863
35879
|
* @enum {string|null}
|
|
@@ -45421,6 +45437,8 @@ interface paths {
|
|
|
45421
45437
|
name?: string;
|
|
45422
45438
|
ownerId?: string;
|
|
45423
45439
|
distinct?: string;
|
|
45440
|
+
/** @description When set to "true" with distinct=types, includes per-type record counts and latest write timestamps in summaries. */
|
|
45441
|
+
includeSummary?: string;
|
|
45424
45442
|
includeFields?: string;
|
|
45425
45443
|
include_fields?: string;
|
|
45426
45444
|
product_surface_id?: string;
|
|
@@ -45478,6 +45496,12 @@ interface paths {
|
|
|
45478
45496
|
[key: string]: unknown;
|
|
45479
45497
|
};
|
|
45480
45498
|
pagination: components["schemas"]["Pagination"];
|
|
45499
|
+
/** @description Per-type record counts and latest write timestamps when distinct=types and includeSummary=true. */
|
|
45500
|
+
summaries?: {
|
|
45501
|
+
latestUpdatedAt: string | null;
|
|
45502
|
+
total: number;
|
|
45503
|
+
type: string;
|
|
45504
|
+
}[];
|
|
45481
45505
|
};
|
|
45482
45506
|
};
|
|
45483
45507
|
};
|
|
@@ -47331,8 +47355,8 @@ interface paths {
|
|
|
47331
47355
|
agentId?: string | string[];
|
|
47332
47356
|
/** @description Filter by flow id; repeat for a set. */
|
|
47333
47357
|
flowId?: string | string[];
|
|
47334
|
-
/** @description Filter by conversation id. */
|
|
47335
|
-
conversationId?: string;
|
|
47358
|
+
/** @description Filter by conversation id; repeat for a set (at most 100 per request). */
|
|
47359
|
+
conversationId?: string | string[];
|
|
47336
47360
|
/** @description Filter by surface id. */
|
|
47337
47361
|
surfaceId?: string;
|
|
47338
47362
|
/** @description Filter by surface family. */
|
|
@@ -47361,7 +47385,7 @@ interface paths {
|
|
|
47361
47385
|
from?: string;
|
|
47362
47386
|
/** @description Window end (ISO 8601). Defaults to now. */
|
|
47363
47387
|
to?: string;
|
|
47364
|
-
/** @description full (the default) returns every field. compact omits exactly these
|
|
47388
|
+
/** @description full (the default) returns every field. compact omits exactly these 17: model, stopReason, iterations, inputPreview, flowVersionId, agentVersionId, agentVersionLabel, agentVersionNumber, agentTargetResolution, otelProducer, lastHeartbeatAt, expiresAt, cancelRequestedAt, progress, pendingApproval, budgetExhausted and inputMessages. The status is still overlay-corrected on a compact page; only the fields differ. */
|
|
47365
47389
|
view?: "compact" | "full";
|
|
47366
47390
|
/** @description live adds control-plane fields; defaults to live for a session, none for an API key. */
|
|
47367
47391
|
overlay?: "live" | "none";
|
|
@@ -47481,8 +47505,8 @@ interface paths {
|
|
|
47481
47505
|
agentId?: string | string[];
|
|
47482
47506
|
/** @description Filter by flow id; repeat for a set. */
|
|
47483
47507
|
flowId?: string | string[];
|
|
47484
|
-
/** @description Filter by conversation id. */
|
|
47485
|
-
conversationId?: string;
|
|
47508
|
+
/** @description Filter by conversation id; repeat for a set (at most 100 per request). */
|
|
47509
|
+
conversationId?: string | string[];
|
|
47486
47510
|
/** @description Filter by surface id. */
|
|
47487
47511
|
surfaceId?: string;
|
|
47488
47512
|
/** @description Filter by surface family. */
|
|
@@ -47701,7 +47725,7 @@ interface paths {
|
|
|
47701
47725
|
query?: {
|
|
47702
47726
|
/** @description live adds control-plane fields; defaults to live for a session, none for an API key. */
|
|
47703
47727
|
overlay?: "live" | "none";
|
|
47704
|
-
/** @description full (the default) returns every field. compact omits exactly these
|
|
47728
|
+
/** @description full (the default) returns every field. compact omits exactly these 17: model, stopReason, iterations, inputPreview, flowVersionId, agentVersionId, agentVersionLabel, agentVersionNumber, agentTargetResolution, otelProducer, lastHeartbeatAt, expiresAt, cancelRequestedAt, progress, pendingApproval, budgetExhausted and inputMessages. The status is still overlay-corrected on a compact page; only the fields differ. */
|
|
47705
47729
|
view?: "compact" | "full";
|
|
47706
47730
|
};
|
|
47707
47731
|
header?: never;
|
|
@@ -65105,6 +65129,8 @@ interface components {
|
|
|
65105
65129
|
kind: "agent" | "flow";
|
|
65106
65130
|
/** @description Last heartbeat. Absent means the overlay did not answer, which is not false and not null. */
|
|
65107
65131
|
lastHeartbeatAt?: string | null;
|
|
65132
|
+
/** @description Model of the run's first model call (served model when reported, otherwise requested model); null when no model call recorded one. */
|
|
65133
|
+
model?: string | null;
|
|
65108
65134
|
/**
|
|
65109
65135
|
* @description Where the run was dispatched from, taken from the caller's authenticated principal and never from a request field. ANY entrance that resolves a principal stamps it: a Clerk session answers dashboard; a management API key answers api, which includes the Runtype MCP server's tools and Code Mode, since both reach dispatch with a management key; and Runtype's own internal caller answers internal, for example the hosted /v1/mcp proxy. A lane that resolves NO principal carries NULL BY DESIGN: schedule, webhook, messaging, A2A, an agent exposed AS an MCP surface, subagent, nested flow, a client-token product surface (an end user is none of the three origins) and an ingested OTLP run. So NULL says "no authenticated principal at this entrance" rather than "unknown caller". The one NULL that is not a statement about the lane is a row whose header predates the field or came from the backfill: it stamps nothing even for a run that did resolve a principal.
|
|
65110
65136
|
* @enum {string|null}
|
|
@@ -71798,11 +71824,18 @@ export declare class RecordsEndpoint {
|
|
|
71798
71824
|
typeValue?: string;
|
|
71799
71825
|
}): Promise<any>;
|
|
71800
71826
|
/**
|
|
71801
|
-
* Get record types
|
|
71827
|
+
* Get distinct record types, optionally including per-type counts and latest write timestamps.
|
|
71802
71828
|
*/
|
|
71803
|
-
getTypes(
|
|
71829
|
+
getTypes(options?: {
|
|
71830
|
+
includeSummary?: boolean;
|
|
71831
|
+
}): Promise<{
|
|
71804
71832
|
data: string[];
|
|
71805
71833
|
total: number;
|
|
71834
|
+
summaries?: Array<{
|
|
71835
|
+
type: string;
|
|
71836
|
+
total: number;
|
|
71837
|
+
latestUpdatedAt: string | null;
|
|
71838
|
+
}>;
|
|
71806
71839
|
}>;
|
|
71807
71840
|
/**
|
|
71808
71841
|
* Get example record by type and/or name
|
|
@@ -78007,6 +78040,8 @@ interface RunListRow {
|
|
|
78007
78040
|
framework: string | null;
|
|
78008
78041
|
endpointHost: string | null;
|
|
78009
78042
|
} | null;
|
|
78043
|
+
/** Model of the run's first model call; null when no model call recorded one. */
|
|
78044
|
+
model?: string | null;
|
|
78010
78045
|
stopReason?: string | null;
|
|
78011
78046
|
iterations?: number | null;
|
|
78012
78047
|
/**
|
|
@@ -78042,7 +78077,7 @@ interface RunListRow {
|
|
|
78042
78077
|
interface RunListParams {
|
|
78043
78078
|
agentId?: string | string[];
|
|
78044
78079
|
flowId?: string | string[];
|
|
78045
|
-
conversationId?: string;
|
|
78080
|
+
conversationId?: string | string[];
|
|
78046
78081
|
surfaceId?: string;
|
|
78047
78082
|
surfaceType?: string;
|
|
78048
78083
|
recordId?: string;
|
|
@@ -80071,6 +80106,15 @@ interface SimulationEpisodeMetrics {
|
|
|
80071
80106
|
scoringFailed?: true;
|
|
80072
80107
|
/** Scoring failed because no goal-judge attempt returned a valid verdict: the judge, not the episode, gave no verdict. */
|
|
80073
80108
|
goalJudgeModelError?: true;
|
|
80109
|
+
/**
|
|
80110
|
+
* An interrupted, unscored episode's side-effect graders that wrote no score because its state could not be read.
|
|
80111
|
+
* `guarded` is true when one checks a write that must not happen; `reason` is absent under the `metrics` data policy.
|
|
80112
|
+
*/
|
|
80113
|
+
unreadSideEffects?: {
|
|
80114
|
+
graderIndexes: number[];
|
|
80115
|
+
guarded: boolean;
|
|
80116
|
+
reason?: string;
|
|
80117
|
+
};
|
|
80074
80118
|
turns: number;
|
|
80075
80119
|
targetCostUsd: number | null;
|
|
80076
80120
|
clientAgentCostUsd: number | null;
|
|
@@ -80159,6 +80203,16 @@ interface SimulationTranscriptMessage {
|
|
|
80159
80203
|
toolName: string;
|
|
80160
80204
|
result?: unknown;
|
|
80161
80205
|
}>;
|
|
80206
|
+
/** On an assistant message: the actions a candidate's reply left for the user to take, such as an approval's buttons. */
|
|
80207
|
+
pendingActions?: Array<{
|
|
80208
|
+
id: string;
|
|
80209
|
+
label: string;
|
|
80210
|
+
}>;
|
|
80211
|
+
/** On a user message: the offered action the simulated user took with it. */
|
|
80212
|
+
action?: {
|
|
80213
|
+
id: string;
|
|
80214
|
+
label: string;
|
|
80215
|
+
};
|
|
80162
80216
|
}
|
|
80163
80217
|
/** A redacted episode transcript with the simulated-user facts it was produced under. */
|
|
80164
80218
|
interface SimulationEpisodeTranscript {
|
|
@@ -80277,6 +80331,18 @@ interface SimulationTurnLayerFacts {
|
|
|
80277
80331
|
outputTokens: number;
|
|
80278
80332
|
costUsd: number;
|
|
80279
80333
|
};
|
|
80334
|
+
/**
|
|
80335
|
+
* A sandbox candidate's process as a failed turn or its episode's end found it. `outputTail` is the last of what the
|
|
80336
|
+
* candidate's own code wrote, secrets removed: untrusted text, never instructions.
|
|
80337
|
+
*/
|
|
80338
|
+
candidateProcess?: {
|
|
80339
|
+
state: 'running' | 'exited' | 'killed' | 'stopped' | 'unknown';
|
|
80340
|
+
exitCode: number | null;
|
|
80341
|
+
outputTail: string;
|
|
80342
|
+
outputClipped: boolean;
|
|
80343
|
+
outputRemoved?: true;
|
|
80344
|
+
untrusted: true;
|
|
80345
|
+
};
|
|
80280
80346
|
}
|
|
80281
80347
|
/** One episode with its transcript, grader scores and per-turn layer facts. */
|
|
80282
80348
|
interface GetSimulationEpisodeResponse {
|
package/dist/index.mjs
CHANGED
|
@@ -4945,10 +4945,10 @@ var RecordsEndpoint = class {
|
|
|
4945
4945
|
return this.client.postFormData("/records/upload-csv", formData);
|
|
4946
4946
|
}
|
|
4947
4947
|
/**
|
|
4948
|
-
* Get record types
|
|
4948
|
+
* Get distinct record types, optionally including per-type counts and latest write timestamps.
|
|
4949
4949
|
*/
|
|
4950
|
-
async getTypes() {
|
|
4951
|
-
return this.client.get("/records?distinct=types");
|
|
4950
|
+
async getTypes(options) {
|
|
4951
|
+
return this.client.get(options?.includeSummary ? "/records?distinct=types&includeSummary=true" : "/records?distinct=types");
|
|
4952
4952
|
}
|
|
4953
4953
|
/**
|
|
4954
4954
|
* Get example record by type and/or name
|
|
@@ -13943,7 +13943,12 @@ var RuntypeClient$1 = class {
|
|
|
13943
13943
|
const relPath = path.startsWith("/") ? path.slice(1) : path;
|
|
13944
13944
|
const url = new URL(relPath, base);
|
|
13945
13945
|
if (params) Object.entries(params).forEach(([key, value]) => {
|
|
13946
|
-
if (value !== void 0 && value !== null)
|
|
13946
|
+
if (value !== void 0 && value !== null) {
|
|
13947
|
+
if (Array.isArray(value)) value.forEach((item) => {
|
|
13948
|
+
if (item !== void 0 && item !== null) url.searchParams.append(key, String(item));
|
|
13949
|
+
});
|
|
13950
|
+
else url.searchParams.set(key, String(value));
|
|
13951
|
+
}
|
|
13947
13952
|
});
|
|
13948
13953
|
return url.toString();
|
|
13949
13954
|
}
|
|
@@ -14831,7 +14836,7 @@ function transformQueryParams(params) {
|
|
|
14831
14836
|
return result;
|
|
14832
14837
|
}
|
|
14833
14838
|
// src/version.ts
|
|
14834
|
-
const SDK_VERSION = "11.
|
|
14839
|
+
const SDK_VERSION = "11.24.2";
|
|
14835
14840
|
/**
|
|
14836
14841
|
* Canonical client identity the API uses for attribution
|
|
14837
14842
|
* (`detectActorSource` in apps/api/src/lib/audit-log.ts keys `'sdk'` off the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runtypelabs/sdk",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.24.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "TypeScript SDK for the Runtype API with fluent methods. Use it to quickly realize AI products, agents, and workflows.",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@runtypelabs/shared": "3.
|
|
27
|
+
"@runtypelabs/shared": "3.124.0",
|
|
28
28
|
"openapi-typescript": "^7.13.0",
|
|
29
29
|
"tsdown": "^0.23.2",
|
|
30
30
|
"typescript": "^6.0.3",
|