@runtypelabs/sdk 9.0.0 → 9.1.1
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 +8 -3
- package/dist/index.d.cts +144 -12
- package/dist/index.d.ts +144 -12
- package/dist/index.mjs +8 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -404,7 +404,8 @@ function createAgentEventTranslator() {
|
|
|
404
404
|
agentName: data.agentName,
|
|
405
405
|
maxTurns: data.maxTurns,
|
|
406
406
|
startedAt: data.startedAt,
|
|
407
|
-
config: data.config
|
|
407
|
+
config: data.config,
|
|
408
|
+
resumed: data.resumed
|
|
408
409
|
})
|
|
409
410
|
];
|
|
410
411
|
case "turn_start":
|
|
@@ -542,6 +543,10 @@ function createAgentEventTranslator() {
|
|
|
542
543
|
toolName: data.toolName,
|
|
543
544
|
success: data.success,
|
|
544
545
|
result: data.result,
|
|
546
|
+
// A failure's reason travels on the frame's `error` field — the
|
|
547
|
+
// only carrier for complete-only failures like the MCP discovery
|
|
548
|
+
// connection pseudo-tool, which no longer emits an `error` frame.
|
|
549
|
+
error: str(data.error),
|
|
545
550
|
executionTime: data.executionTime
|
|
546
551
|
})
|
|
547
552
|
];
|
|
@@ -6437,7 +6442,7 @@ var Runtype = class {
|
|
|
6437
6442
|
|
|
6438
6443
|
// src/version.ts
|
|
6439
6444
|
var FALLBACK_VERSION = "0.0.0";
|
|
6440
|
-
var SDK_VERSION = "9.
|
|
6445
|
+
var SDK_VERSION = "9.1.1".length > 0 ? "9.1.1" : FALLBACK_VERSION;
|
|
6441
6446
|
var RUNTYPE_CLIENT_KIND = "sdk";
|
|
6442
6447
|
var SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
|
|
6443
6448
|
|
|
@@ -10005,7 +10010,7 @@ var _AgentsEndpoint = class _AgentsEndpoint {
|
|
|
10005
10010
|
...callbacks,
|
|
10006
10011
|
onAgentStart: (event) => {
|
|
10007
10012
|
lastSeenExecutionId = event.executionId;
|
|
10008
|
-
callbacks?.onAgentStart?.(event);
|
|
10013
|
+
if (!event.resumed) callbacks?.onAgentStart?.(event);
|
|
10009
10014
|
},
|
|
10010
10015
|
onTurnDelta: (event) => {
|
|
10011
10016
|
if (event.contentType === "text") {
|
package/dist/index.d.cts
CHANGED
|
@@ -2804,6 +2804,8 @@ interface paths {
|
|
|
2804
2804
|
agentSpec?: unknown;
|
|
2805
2805
|
cancelRequestedAt: string | null;
|
|
2806
2806
|
completedAt: string | null;
|
|
2807
|
+
/** @description The conversation thread this run belongs to, so consumers can group a multi-turn conversation's runs without a per-run log query. This is the run's OWN thread, distinct from `parentConversationId` (subagent lineage, the conversation of the run that spawned it). `null` on stateless surfaces (webhook, schedule, eval, one-shot API) and on runs persisted before the column existed. */
|
|
2808
|
+
conversationId: string | null;
|
|
2807
2809
|
createdAt: string;
|
|
2808
2810
|
executionId: string;
|
|
2809
2811
|
/** @enum {string} */
|
|
@@ -2937,6 +2939,8 @@ interface paths {
|
|
|
2937
2939
|
agentSpec?: unknown;
|
|
2938
2940
|
cancelRequestedAt: string | null;
|
|
2939
2941
|
completedAt: string | null;
|
|
2942
|
+
/** @description The conversation thread this run belongs to, so consumers can group a multi-turn conversation's runs without a per-run log query. This is the run's OWN thread, distinct from `parentConversationId` (subagent lineage, the conversation of the run that spawned it). `null` on stateless surfaces (webhook, schedule, eval, one-shot API) and on runs persisted before the column existed. */
|
|
2943
|
+
conversationId: string | null;
|
|
2940
2944
|
createdAt: string;
|
|
2941
2945
|
executionId: string;
|
|
2942
2946
|
/** @enum {string} */
|
|
@@ -5292,6 +5296,11 @@ interface paths {
|
|
|
5292
5296
|
"application/json": {
|
|
5293
5297
|
batchExecutionId: string;
|
|
5294
5298
|
completedAt?: string;
|
|
5299
|
+
/**
|
|
5300
|
+
* @description Run-level engine summary derived from the batch's per-record executionEngine values: 'runtime' or 'legacy' when every attributed record ran on that engine, 'mixed' when the batch spans both (e.g. a mid-flight fallback), and null when the run has no attributed records (runs recorded before attribution shipped).
|
|
5301
|
+
* @enum {string|null}
|
|
5302
|
+
*/
|
|
5303
|
+
executionEngineSummary?: "runtime" | "legacy" | "mixed" | null;
|
|
5295
5304
|
failedRecords: number;
|
|
5296
5305
|
flowId: string;
|
|
5297
5306
|
processedRecords: number;
|
|
@@ -5587,6 +5596,11 @@ interface paths {
|
|
|
5587
5596
|
durationMs: number | null;
|
|
5588
5597
|
errorMessage?: string | null;
|
|
5589
5598
|
estimatedCost?: string | null;
|
|
5599
|
+
/**
|
|
5600
|
+
* @description Engine that actually executed this step ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
|
|
5601
|
+
* @enum {string|null}
|
|
5602
|
+
*/
|
|
5603
|
+
executionEngine?: "runtime" | "legacy" | null;
|
|
5590
5604
|
executionSessionId: string | null;
|
|
5591
5605
|
flowId: string | null;
|
|
5592
5606
|
flowVersionId: string | null;
|
|
@@ -6850,6 +6864,15 @@ interface paths {
|
|
|
6850
6864
|
"application/json": components["schemas"]["Error"];
|
|
6851
6865
|
};
|
|
6852
6866
|
};
|
|
6867
|
+
/** @description Approval-gated execution is unsupported because Client Chat has no continuation channel that can deliver an owner-approved result back to the visitor (`APPROVAL_MODE_UNSUPPORTED`). */
|
|
6868
|
+
501: {
|
|
6869
|
+
headers: {
|
|
6870
|
+
[name: string]: unknown;
|
|
6871
|
+
};
|
|
6872
|
+
content: {
|
|
6873
|
+
"application/json": components["schemas"]["Error"];
|
|
6874
|
+
};
|
|
6875
|
+
};
|
|
6853
6876
|
};
|
|
6854
6877
|
};
|
|
6855
6878
|
delete?: never;
|
|
@@ -9299,7 +9322,8 @@ interface paths {
|
|
|
9299
9322
|
[key: string]: unknown;
|
|
9300
9323
|
};
|
|
9301
9324
|
modelId?: string;
|
|
9302
|
-
ownerId
|
|
9325
|
+
/** @description Owner key for this conversation, stored in the indexed owner_id column and filterable via ?ownerId=. Overrides a nested metadata.ownerId. Null means no owner. */
|
|
9326
|
+
ownerId?: string | null;
|
|
9303
9327
|
systemPrompt?: string;
|
|
9304
9328
|
/** @default New Chat */
|
|
9305
9329
|
title?: string;
|
|
@@ -9543,7 +9567,8 @@ interface paths {
|
|
|
9543
9567
|
[key: string]: unknown;
|
|
9544
9568
|
};
|
|
9545
9569
|
modelId?: string;
|
|
9546
|
-
ownerId
|
|
9570
|
+
/** @description Reassigns the owner (indexed owner_id column, filterable via ?ownerId=). Overrides a nested metadata.ownerId. Null clears the owner; omit to leave it unchanged. */
|
|
9571
|
+
ownerId?: string | null;
|
|
9547
9572
|
systemPrompt?: string;
|
|
9548
9573
|
title?: string;
|
|
9549
9574
|
};
|
|
@@ -11089,7 +11114,7 @@ interface paths {
|
|
|
11089
11114
|
/** @default true */
|
|
11090
11115
|
createVersionOnChange?: boolean;
|
|
11091
11116
|
};
|
|
11092
|
-
/** @description For FLOW dispatches
|
|
11117
|
+
/** @description Compatibility execution-lane OPT-OUT. For FLOW dispatches the field is accepted but ignored: eligible flows always use the @runtypelabs/runtime lane, while ineligible flows still fold to legacy silently. For AGENT dispatches, an eligible agent now uses the @runtypelabs/runtime lane by DEFAULT when this field is omitted; only an explicit `false` forces the legacy engine. Definitions the runtime lane cannot execute faithfully still fold to legacy on their own. */
|
|
11093
11118
|
useRuntimePackage?: boolean;
|
|
11094
11119
|
versionLabel?: string;
|
|
11095
11120
|
versionNotes?: string;
|
|
@@ -11454,7 +11479,7 @@ interface paths {
|
|
|
11454
11479
|
/** @default true */
|
|
11455
11480
|
createVersionOnChange?: boolean;
|
|
11456
11481
|
};
|
|
11457
|
-
/** @description For FLOW dispatches
|
|
11482
|
+
/** @description Compatibility execution-lane OPT-OUT. For FLOW dispatches the field is accepted but ignored: eligible flows always use the @runtypelabs/runtime lane, while ineligible flows still fold to legacy silently. For AGENT dispatches, an eligible agent now uses the @runtypelabs/runtime lane by DEFAULT when this field is omitted; only an explicit `false` forces the legacy engine. Definitions the runtime lane cannot execute faithfully still fold to legacy on their own. */
|
|
11458
11483
|
useRuntimePackage?: boolean;
|
|
11459
11484
|
versionLabel?: string;
|
|
11460
11485
|
versionNotes?: string;
|
|
@@ -15606,6 +15631,11 @@ interface paths {
|
|
|
15606
15631
|
errorMessage: string | null;
|
|
15607
15632
|
errorStack: string | null;
|
|
15608
15633
|
executedAt: string;
|
|
15634
|
+
/**
|
|
15635
|
+
* @description Engine that actually executed this step ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
|
|
15636
|
+
* @enum {string|null}
|
|
15637
|
+
*/
|
|
15638
|
+
executionEngine?: "runtime" | "legacy" | null;
|
|
15609
15639
|
executionSessionId: string | null;
|
|
15610
15640
|
inputVariables?: unknown;
|
|
15611
15641
|
messageHistory: unknown[] | null;
|
|
@@ -17418,6 +17448,8 @@ interface paths {
|
|
|
17418
17448
|
* @description **Limited preview — not yet generally available.** This endpoint is dark-launched and returns `404 Not Found` in production until GA; it is only reachable in non-production environments today.
|
|
17419
17449
|
*
|
|
17420
17450
|
* Export a fully-resolved, self-contained flow definition that the @runtypelabs/runtime package can consume directly at boot. All step configs are inlined; no live DB queries are needed at execution time.
|
|
17451
|
+
*
|
|
17452
|
+
* Flows containing a durable-class step (`wait-until` or `crawl`) are rejected with `422 Unprocessable Entity` (code `DURABLE_FLOW_EXPORT_UNSUPPORTED`): those steps park their pause on a Cloudflare Workflow, which cannot run inside an exported runtime artifact, so durable flows run hosted only.
|
|
17421
17453
|
*/
|
|
17422
17454
|
get: {
|
|
17423
17455
|
parameters: {
|
|
@@ -17490,6 +17522,23 @@ interface paths {
|
|
|
17490
17522
|
"application/json": components["schemas"]["Error"];
|
|
17491
17523
|
};
|
|
17492
17524
|
};
|
|
17525
|
+
/** @description The flow contains durable-class steps and runs hosted only (code `DURABLE_FLOW_EXPORT_UNSUPPORTED`) */
|
|
17526
|
+
422: {
|
|
17527
|
+
headers: {
|
|
17528
|
+
[name: string]: unknown;
|
|
17529
|
+
};
|
|
17530
|
+
content: {
|
|
17531
|
+
"application/json": {
|
|
17532
|
+
/** @enum {string} */
|
|
17533
|
+
code: "DURABLE_FLOW_EXPORT_UNSUPPORTED";
|
|
17534
|
+
durableSteps: {
|
|
17535
|
+
stepId: string;
|
|
17536
|
+
stepType: string;
|
|
17537
|
+
}[];
|
|
17538
|
+
error: string;
|
|
17539
|
+
};
|
|
17540
|
+
};
|
|
17541
|
+
};
|
|
17493
17542
|
/** @description Internal server error */
|
|
17494
17543
|
500: {
|
|
17495
17544
|
headers: {
|
|
@@ -17815,6 +17864,11 @@ interface paths {
|
|
|
17815
17864
|
durationMs: number | null;
|
|
17816
17865
|
errorMessage?: string | null;
|
|
17817
17866
|
estimatedCost?: string | null;
|
|
17867
|
+
/**
|
|
17868
|
+
* @description Engine that actually executed this step ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
|
|
17869
|
+
* @enum {string|null}
|
|
17870
|
+
*/
|
|
17871
|
+
executionEngine?: "runtime" | "legacy" | null;
|
|
17818
17872
|
executionSessionId: string | null;
|
|
17819
17873
|
flowId: string | null;
|
|
17820
17874
|
flowVersionId: string | null;
|
|
@@ -34831,6 +34885,7 @@ interface paths {
|
|
|
34831
34885
|
type?: string;
|
|
34832
34886
|
search?: string;
|
|
34833
34887
|
name?: string;
|
|
34888
|
+
ownerId?: string;
|
|
34834
34889
|
distinct?: string;
|
|
34835
34890
|
includeFields?: string;
|
|
34836
34891
|
include_fields?: string;
|
|
@@ -34878,6 +34933,7 @@ interface paths {
|
|
|
34878
34933
|
};
|
|
34879
34934
|
name: string;
|
|
34880
34935
|
organizationId: string | null;
|
|
34936
|
+
ownerId: string | null;
|
|
34881
34937
|
productSurfaceId: string | null;
|
|
34882
34938
|
schemaValid: boolean | null;
|
|
34883
34939
|
type: string;
|
|
@@ -34961,6 +35017,8 @@ interface paths {
|
|
|
34961
35017
|
[key: string]: unknown;
|
|
34962
35018
|
};
|
|
34963
35019
|
name: string;
|
|
35020
|
+
/** @description Owner key for this record, stored in the indexed owner_id column and filterable via ?ownerId=. Overrides a nested metadata.ownerId. Null means no owner. */
|
|
35021
|
+
ownerId?: string | null;
|
|
34964
35022
|
type: string;
|
|
34965
35023
|
};
|
|
34966
35024
|
};
|
|
@@ -34989,6 +35047,7 @@ interface paths {
|
|
|
34989
35047
|
};
|
|
34990
35048
|
name: string;
|
|
34991
35049
|
organizationId: string | null;
|
|
35050
|
+
ownerId: string | null;
|
|
34992
35051
|
productSurfaceId: string | null;
|
|
34993
35052
|
schemaValid: boolean | null;
|
|
34994
35053
|
schemaWarnings?: {
|
|
@@ -35317,6 +35376,7 @@ interface paths {
|
|
|
35317
35376
|
type?: string;
|
|
35318
35377
|
search?: string;
|
|
35319
35378
|
name?: string;
|
|
35379
|
+
ownerId?: string;
|
|
35320
35380
|
distinct?: string;
|
|
35321
35381
|
includeFields?: string;
|
|
35322
35382
|
include_fields?: string;
|
|
@@ -35820,6 +35880,7 @@ interface paths {
|
|
|
35820
35880
|
};
|
|
35821
35881
|
name: string;
|
|
35822
35882
|
organizationId: string | null;
|
|
35883
|
+
ownerId: string | null;
|
|
35823
35884
|
productSurfaceId: string | null;
|
|
35824
35885
|
schemaValid: boolean | null;
|
|
35825
35886
|
type: string;
|
|
@@ -35901,6 +35962,8 @@ interface paths {
|
|
|
35901
35962
|
[key: string]: unknown;
|
|
35902
35963
|
};
|
|
35903
35964
|
name?: string;
|
|
35965
|
+
/** @description Reassigns the owner (indexed owner_id column, filterable via ?ownerId=). Overrides a nested metadata.ownerId. Null clears the owner; omit to leave it unchanged. */
|
|
35966
|
+
ownerId?: string | null;
|
|
35904
35967
|
type?: string;
|
|
35905
35968
|
};
|
|
35906
35969
|
};
|
|
@@ -35929,6 +35992,7 @@ interface paths {
|
|
|
35929
35992
|
};
|
|
35930
35993
|
name: string;
|
|
35931
35994
|
organizationId: string | null;
|
|
35995
|
+
ownerId: string | null;
|
|
35932
35996
|
productSurfaceId: string | null;
|
|
35933
35997
|
schemaValid: boolean | null;
|
|
35934
35998
|
schemaWarnings?: {
|
|
@@ -36228,14 +36292,23 @@ interface paths {
|
|
|
36228
36292
|
"application/json": {
|
|
36229
36293
|
data: {
|
|
36230
36294
|
createdAt: string;
|
|
36295
|
+
estimatedCost: string | null;
|
|
36296
|
+
/**
|
|
36297
|
+
* @description Engine that actually executed this record execution ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
|
|
36298
|
+
* @enum {string|null}
|
|
36299
|
+
*/
|
|
36300
|
+
executionEngine?: "runtime" | "legacy" | null;
|
|
36301
|
+
executionTimeMs: number | null;
|
|
36231
36302
|
flowId: string | null;
|
|
36232
36303
|
flowName: string | null;
|
|
36233
36304
|
id: string;
|
|
36305
|
+
modelUsed: string | null;
|
|
36234
36306
|
promptId: string | null;
|
|
36235
36307
|
promptName: string | null;
|
|
36236
36308
|
recordId: string;
|
|
36237
36309
|
result?: unknown;
|
|
36238
36310
|
status: string;
|
|
36311
|
+
totalTokens: number | null;
|
|
36239
36312
|
}[];
|
|
36240
36313
|
pagination: {
|
|
36241
36314
|
hasMore: boolean;
|
|
@@ -36428,6 +36501,11 @@ interface paths {
|
|
|
36428
36501
|
durationMs: number | null;
|
|
36429
36502
|
errorMessage?: string | null;
|
|
36430
36503
|
estimatedCost?: string | null;
|
|
36504
|
+
/**
|
|
36505
|
+
* @description Engine that actually executed this step ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
|
|
36506
|
+
* @enum {string|null}
|
|
36507
|
+
*/
|
|
36508
|
+
executionEngine?: "runtime" | "legacy" | null;
|
|
36431
36509
|
executionSessionId: string | null;
|
|
36432
36510
|
flowId: string | null;
|
|
36433
36511
|
flowVersionId: string | null;
|
|
@@ -37521,6 +37599,7 @@ interface paths {
|
|
|
37521
37599
|
} | null;
|
|
37522
37600
|
name: string;
|
|
37523
37601
|
organizationId: string | null;
|
|
37602
|
+
ownerId?: string | null;
|
|
37524
37603
|
productSurfaceId?: string | null;
|
|
37525
37604
|
schemaValid?: boolean | null;
|
|
37526
37605
|
type: string;
|
|
@@ -37687,6 +37766,7 @@ interface paths {
|
|
|
37687
37766
|
} | null;
|
|
37688
37767
|
name: string;
|
|
37689
37768
|
organizationId: string | null;
|
|
37769
|
+
ownerId?: string | null;
|
|
37690
37770
|
productSurfaceId?: string | null;
|
|
37691
37771
|
schemaValid?: boolean | null;
|
|
37692
37772
|
type: string;
|
|
@@ -37833,6 +37913,7 @@ interface paths {
|
|
|
37833
37913
|
} | null;
|
|
37834
37914
|
name: string;
|
|
37835
37915
|
organizationId: string | null;
|
|
37916
|
+
ownerId?: string | null;
|
|
37836
37917
|
productSurfaceId?: string | null;
|
|
37837
37918
|
schemaValid?: boolean | null;
|
|
37838
37919
|
type: string;
|
|
@@ -37981,6 +38062,7 @@ interface paths {
|
|
|
37981
38062
|
} | null;
|
|
37982
38063
|
name: string;
|
|
37983
38064
|
organizationId: string | null;
|
|
38065
|
+
ownerId?: string | null;
|
|
37984
38066
|
productSurfaceId?: string | null;
|
|
37985
38067
|
schemaValid?: boolean | null;
|
|
37986
38068
|
type: string;
|
|
@@ -38472,6 +38554,11 @@ interface paths {
|
|
|
38472
38554
|
durationMs: number | null;
|
|
38473
38555
|
error: string | null;
|
|
38474
38556
|
executedAt: string | null;
|
|
38557
|
+
/**
|
|
38558
|
+
* @description Engine that actually executed this record execution ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
|
|
38559
|
+
* @enum {string|null}
|
|
38560
|
+
*/
|
|
38561
|
+
executionEngine?: "runtime" | "legacy" | null;
|
|
38475
38562
|
failedAt: string | null;
|
|
38476
38563
|
failedStepCount: number | null;
|
|
38477
38564
|
flowId: string | null;
|
|
@@ -38659,6 +38746,11 @@ interface paths {
|
|
|
38659
38746
|
durationMs: number | null;
|
|
38660
38747
|
error: string | null;
|
|
38661
38748
|
executedAt: string | null;
|
|
38749
|
+
/**
|
|
38750
|
+
* @description Engine that actually executed this record execution ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
|
|
38751
|
+
* @enum {string|null}
|
|
38752
|
+
*/
|
|
38753
|
+
executionEngine?: "runtime" | "legacy" | null;
|
|
38662
38754
|
failedAt: string | null;
|
|
38663
38755
|
failedStepCount: number | null;
|
|
38664
38756
|
flowId: string | null;
|
|
@@ -45064,6 +45156,11 @@ interface components {
|
|
|
45064
45156
|
cases: {
|
|
45065
45157
|
/** @description The saved eval case id; null when the case row was deleted or the record could not be mapped to a case. */
|
|
45066
45158
|
caseId: string | null;
|
|
45159
|
+
/**
|
|
45160
|
+
* @description Engine that actually executed this graded case ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
|
|
45161
|
+
* @enum {string|null}
|
|
45162
|
+
*/
|
|
45163
|
+
executionEngine?: "runtime" | "legacy" | null;
|
|
45067
45164
|
name: string;
|
|
45068
45165
|
/** @description For a checkpoint ("saved from run") case run in next-step mode: the tool-call intent(s) the target emitted as its graded next step. An empty array means it replied with a message instead of calling a tool. Null for ordinary runs and for runs recorded before this field shipped. */
|
|
45069
45166
|
nextStepToolCalls: {
|
|
@@ -45255,6 +45352,7 @@ interface components {
|
|
|
45255
45352
|
/** @enum {string} */
|
|
45256
45353
|
kind: "agent" | "flow";
|
|
45257
45354
|
maxTurns?: number;
|
|
45355
|
+
resumed?: boolean;
|
|
45258
45356
|
seq: number;
|
|
45259
45357
|
source?: string;
|
|
45260
45358
|
startedAt: string;
|
|
@@ -47865,6 +47963,16 @@ interface CreatePromptRequest {
|
|
|
47865
47963
|
interface CreateRecordRequest {
|
|
47866
47964
|
type: string;
|
|
47867
47965
|
name: string;
|
|
47966
|
+
/**
|
|
47967
|
+
* First-class owner key (#3395) — persisted to the indexed `owner_id` column
|
|
47968
|
+
* and queryable via {@link RecordListParams.ownerId}. A nested
|
|
47969
|
+
* `metadata.ownerId` is still lifted into the column by the API; a top-level
|
|
47970
|
+
* value here wins over it.
|
|
47971
|
+
*
|
|
47972
|
+
* On `records.update()` (which takes `Partial<CreateRecordRequest>`),
|
|
47973
|
+
* `null` CLEARS the stored owner and omitting the field leaves it untouched.
|
|
47974
|
+
*/
|
|
47975
|
+
ownerId?: string | null;
|
|
47868
47976
|
metadata?: Metadata;
|
|
47869
47977
|
}
|
|
47870
47978
|
interface BulkEditCondition {
|
|
@@ -48267,6 +48375,7 @@ interface ListParams {
|
|
|
48267
48375
|
interface RecordListParams extends ListParams {
|
|
48268
48376
|
metadataKeys?: string;
|
|
48269
48377
|
metadataKeysAll?: string;
|
|
48378
|
+
ownerId?: string;
|
|
48270
48379
|
minFields?: number;
|
|
48271
48380
|
maxFields?: number;
|
|
48272
48381
|
metadataTypes?: string;
|
|
@@ -48284,9 +48393,10 @@ interface FlowToolConfig {
|
|
|
48284
48393
|
flowId?: string;
|
|
48285
48394
|
toolId?: string;
|
|
48286
48395
|
/**
|
|
48287
|
-
* Inline flow definition. Runtime-selected agent dispatches support this
|
|
48288
|
-
* `options.useRuntimePackage:
|
|
48289
|
-
* require a `flowId`/`toolId`
|
|
48396
|
+
* Inline flow definition. Runtime-selected agent dispatches support this
|
|
48397
|
+
* (the runtime lane is the default unless `options.useRuntimePackage: false`
|
|
48398
|
+
* opts out); hosted flow definitions currently require a `flowId`/`toolId`
|
|
48399
|
+
* reference.
|
|
48290
48400
|
*/
|
|
48291
48401
|
flow?: Record<string, unknown>;
|
|
48292
48402
|
/** Registered-flow name key for the runtime lane (`flowName ?? flowId`). */
|
|
@@ -48434,9 +48544,10 @@ interface RuntimeFlowToolConfig {
|
|
|
48434
48544
|
flowId?: string;
|
|
48435
48545
|
toolId?: string;
|
|
48436
48546
|
/**
|
|
48437
|
-
* Inline flow definition. Runtime-selected agent dispatches support this
|
|
48438
|
-
* `options.useRuntimePackage:
|
|
48439
|
-
* require a `flowId`/`toolId`
|
|
48547
|
+
* Inline flow definition. Runtime-selected agent dispatches support this
|
|
48548
|
+
* (the runtime lane is the default unless `options.useRuntimePackage: false`
|
|
48549
|
+
* opts out); hosted flow definitions currently require a `flowId`/`toolId`
|
|
48550
|
+
* reference.
|
|
48440
48551
|
*/
|
|
48441
48552
|
flow?: Record<string, unknown>;
|
|
48442
48553
|
/** Registered-flow name key for the runtime lane (`flowName ?? flowId`). */
|
|
@@ -48676,14 +48787,24 @@ interface CreateConversationRequest {
|
|
|
48676
48787
|
title?: string;
|
|
48677
48788
|
modelId?: string;
|
|
48678
48789
|
systemPrompt?: string;
|
|
48679
|
-
|
|
48790
|
+
/**
|
|
48791
|
+
* First-class owner key (#3395) — persisted to the indexed `owner_id` column
|
|
48792
|
+
* and queryable via {@link ConversationListParams.ownerId}. `null` is accepted
|
|
48793
|
+
* for symmetry with {@link UpdateConversationRequest} and simply means "no
|
|
48794
|
+
* owner" on create.
|
|
48795
|
+
*/
|
|
48796
|
+
ownerId?: string | null;
|
|
48680
48797
|
metadata?: Record<string, unknown>;
|
|
48681
48798
|
}
|
|
48682
48799
|
interface UpdateConversationRequest {
|
|
48683
48800
|
title?: string;
|
|
48684
48801
|
modelId?: string;
|
|
48685
48802
|
systemPrompt?: string;
|
|
48686
|
-
|
|
48803
|
+
/**
|
|
48804
|
+
* First-class owner key (#3395). `null` CLEARS the stored owner; omitting the
|
|
48805
|
+
* field leaves it untouched.
|
|
48806
|
+
*/
|
|
48807
|
+
ownerId?: string | null;
|
|
48687
48808
|
metadata?: Record<string, unknown>;
|
|
48688
48809
|
messages?: ConversationMessage[];
|
|
48689
48810
|
}
|
|
@@ -54382,6 +54503,15 @@ interface AgentStartEvent extends BaseAgentEvent {
|
|
|
54382
54503
|
model?: string;
|
|
54383
54504
|
enableReflection?: boolean;
|
|
54384
54505
|
};
|
|
54506
|
+
/**
|
|
54507
|
+
* `true` when this start opens the RESUME leg of a paused run (approval or
|
|
54508
|
+
* client-tool continuation) rather than a new run. The runtime opens every
|
|
54509
|
+
* response with a start frame; keep run-level state (turn counts, spend
|
|
54510
|
+
* totals, accumulated output) across a resumed start instead of resetting.
|
|
54511
|
+
* `executeWithLocalTools` already folds resumed starts away — its
|
|
54512
|
+
* `onAgentStart` fires once per session.
|
|
54513
|
+
*/
|
|
54514
|
+
resumed?: boolean;
|
|
54385
54515
|
}
|
|
54386
54516
|
/**
|
|
54387
54517
|
* Agent iteration start event
|
|
@@ -54498,6 +54628,8 @@ interface AgentToolCompleteEvent extends BaseAgentEvent {
|
|
|
54498
54628
|
toolName: string;
|
|
54499
54629
|
success: boolean;
|
|
54500
54630
|
result?: unknown;
|
|
54631
|
+
/** Failure reason when `success` is false (e.g. an MCP discovery connection failure). */
|
|
54632
|
+
error?: string;
|
|
54501
54633
|
executionTime?: number;
|
|
54502
54634
|
}
|
|
54503
54635
|
interface AgentMediaEvent extends BaseAgentEvent {
|
package/dist/index.d.ts
CHANGED
|
@@ -2804,6 +2804,8 @@ interface paths {
|
|
|
2804
2804
|
agentSpec?: unknown;
|
|
2805
2805
|
cancelRequestedAt: string | null;
|
|
2806
2806
|
completedAt: string | null;
|
|
2807
|
+
/** @description The conversation thread this run belongs to, so consumers can group a multi-turn conversation's runs without a per-run log query. This is the run's OWN thread, distinct from `parentConversationId` (subagent lineage, the conversation of the run that spawned it). `null` on stateless surfaces (webhook, schedule, eval, one-shot API) and on runs persisted before the column existed. */
|
|
2808
|
+
conversationId: string | null;
|
|
2807
2809
|
createdAt: string;
|
|
2808
2810
|
executionId: string;
|
|
2809
2811
|
/** @enum {string} */
|
|
@@ -2937,6 +2939,8 @@ interface paths {
|
|
|
2937
2939
|
agentSpec?: unknown;
|
|
2938
2940
|
cancelRequestedAt: string | null;
|
|
2939
2941
|
completedAt: string | null;
|
|
2942
|
+
/** @description The conversation thread this run belongs to, so consumers can group a multi-turn conversation's runs without a per-run log query. This is the run's OWN thread, distinct from `parentConversationId` (subagent lineage, the conversation of the run that spawned it). `null` on stateless surfaces (webhook, schedule, eval, one-shot API) and on runs persisted before the column existed. */
|
|
2943
|
+
conversationId: string | null;
|
|
2940
2944
|
createdAt: string;
|
|
2941
2945
|
executionId: string;
|
|
2942
2946
|
/** @enum {string} */
|
|
@@ -5292,6 +5296,11 @@ interface paths {
|
|
|
5292
5296
|
"application/json": {
|
|
5293
5297
|
batchExecutionId: string;
|
|
5294
5298
|
completedAt?: string;
|
|
5299
|
+
/**
|
|
5300
|
+
* @description Run-level engine summary derived from the batch's per-record executionEngine values: 'runtime' or 'legacy' when every attributed record ran on that engine, 'mixed' when the batch spans both (e.g. a mid-flight fallback), and null when the run has no attributed records (runs recorded before attribution shipped).
|
|
5301
|
+
* @enum {string|null}
|
|
5302
|
+
*/
|
|
5303
|
+
executionEngineSummary?: "runtime" | "legacy" | "mixed" | null;
|
|
5295
5304
|
failedRecords: number;
|
|
5296
5305
|
flowId: string;
|
|
5297
5306
|
processedRecords: number;
|
|
@@ -5587,6 +5596,11 @@ interface paths {
|
|
|
5587
5596
|
durationMs: number | null;
|
|
5588
5597
|
errorMessage?: string | null;
|
|
5589
5598
|
estimatedCost?: string | null;
|
|
5599
|
+
/**
|
|
5600
|
+
* @description Engine that actually executed this step ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
|
|
5601
|
+
* @enum {string|null}
|
|
5602
|
+
*/
|
|
5603
|
+
executionEngine?: "runtime" | "legacy" | null;
|
|
5590
5604
|
executionSessionId: string | null;
|
|
5591
5605
|
flowId: string | null;
|
|
5592
5606
|
flowVersionId: string | null;
|
|
@@ -6850,6 +6864,15 @@ interface paths {
|
|
|
6850
6864
|
"application/json": components["schemas"]["Error"];
|
|
6851
6865
|
};
|
|
6852
6866
|
};
|
|
6867
|
+
/** @description Approval-gated execution is unsupported because Client Chat has no continuation channel that can deliver an owner-approved result back to the visitor (`APPROVAL_MODE_UNSUPPORTED`). */
|
|
6868
|
+
501: {
|
|
6869
|
+
headers: {
|
|
6870
|
+
[name: string]: unknown;
|
|
6871
|
+
};
|
|
6872
|
+
content: {
|
|
6873
|
+
"application/json": components["schemas"]["Error"];
|
|
6874
|
+
};
|
|
6875
|
+
};
|
|
6853
6876
|
};
|
|
6854
6877
|
};
|
|
6855
6878
|
delete?: never;
|
|
@@ -9299,7 +9322,8 @@ interface paths {
|
|
|
9299
9322
|
[key: string]: unknown;
|
|
9300
9323
|
};
|
|
9301
9324
|
modelId?: string;
|
|
9302
|
-
ownerId
|
|
9325
|
+
/** @description Owner key for this conversation, stored in the indexed owner_id column and filterable via ?ownerId=. Overrides a nested metadata.ownerId. Null means no owner. */
|
|
9326
|
+
ownerId?: string | null;
|
|
9303
9327
|
systemPrompt?: string;
|
|
9304
9328
|
/** @default New Chat */
|
|
9305
9329
|
title?: string;
|
|
@@ -9543,7 +9567,8 @@ interface paths {
|
|
|
9543
9567
|
[key: string]: unknown;
|
|
9544
9568
|
};
|
|
9545
9569
|
modelId?: string;
|
|
9546
|
-
ownerId
|
|
9570
|
+
/** @description Reassigns the owner (indexed owner_id column, filterable via ?ownerId=). Overrides a nested metadata.ownerId. Null clears the owner; omit to leave it unchanged. */
|
|
9571
|
+
ownerId?: string | null;
|
|
9547
9572
|
systemPrompt?: string;
|
|
9548
9573
|
title?: string;
|
|
9549
9574
|
};
|
|
@@ -11089,7 +11114,7 @@ interface paths {
|
|
|
11089
11114
|
/** @default true */
|
|
11090
11115
|
createVersionOnChange?: boolean;
|
|
11091
11116
|
};
|
|
11092
|
-
/** @description For FLOW dispatches
|
|
11117
|
+
/** @description Compatibility execution-lane OPT-OUT. For FLOW dispatches the field is accepted but ignored: eligible flows always use the @runtypelabs/runtime lane, while ineligible flows still fold to legacy silently. For AGENT dispatches, an eligible agent now uses the @runtypelabs/runtime lane by DEFAULT when this field is omitted; only an explicit `false` forces the legacy engine. Definitions the runtime lane cannot execute faithfully still fold to legacy on their own. */
|
|
11093
11118
|
useRuntimePackage?: boolean;
|
|
11094
11119
|
versionLabel?: string;
|
|
11095
11120
|
versionNotes?: string;
|
|
@@ -11454,7 +11479,7 @@ interface paths {
|
|
|
11454
11479
|
/** @default true */
|
|
11455
11480
|
createVersionOnChange?: boolean;
|
|
11456
11481
|
};
|
|
11457
|
-
/** @description For FLOW dispatches
|
|
11482
|
+
/** @description Compatibility execution-lane OPT-OUT. For FLOW dispatches the field is accepted but ignored: eligible flows always use the @runtypelabs/runtime lane, while ineligible flows still fold to legacy silently. For AGENT dispatches, an eligible agent now uses the @runtypelabs/runtime lane by DEFAULT when this field is omitted; only an explicit `false` forces the legacy engine. Definitions the runtime lane cannot execute faithfully still fold to legacy on their own. */
|
|
11458
11483
|
useRuntimePackage?: boolean;
|
|
11459
11484
|
versionLabel?: string;
|
|
11460
11485
|
versionNotes?: string;
|
|
@@ -15606,6 +15631,11 @@ interface paths {
|
|
|
15606
15631
|
errorMessage: string | null;
|
|
15607
15632
|
errorStack: string | null;
|
|
15608
15633
|
executedAt: string;
|
|
15634
|
+
/**
|
|
15635
|
+
* @description Engine that actually executed this step ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
|
|
15636
|
+
* @enum {string|null}
|
|
15637
|
+
*/
|
|
15638
|
+
executionEngine?: "runtime" | "legacy" | null;
|
|
15609
15639
|
executionSessionId: string | null;
|
|
15610
15640
|
inputVariables?: unknown;
|
|
15611
15641
|
messageHistory: unknown[] | null;
|
|
@@ -17418,6 +17448,8 @@ interface paths {
|
|
|
17418
17448
|
* @description **Limited preview — not yet generally available.** This endpoint is dark-launched and returns `404 Not Found` in production until GA; it is only reachable in non-production environments today.
|
|
17419
17449
|
*
|
|
17420
17450
|
* Export a fully-resolved, self-contained flow definition that the @runtypelabs/runtime package can consume directly at boot. All step configs are inlined; no live DB queries are needed at execution time.
|
|
17451
|
+
*
|
|
17452
|
+
* Flows containing a durable-class step (`wait-until` or `crawl`) are rejected with `422 Unprocessable Entity` (code `DURABLE_FLOW_EXPORT_UNSUPPORTED`): those steps park their pause on a Cloudflare Workflow, which cannot run inside an exported runtime artifact, so durable flows run hosted only.
|
|
17421
17453
|
*/
|
|
17422
17454
|
get: {
|
|
17423
17455
|
parameters: {
|
|
@@ -17490,6 +17522,23 @@ interface paths {
|
|
|
17490
17522
|
"application/json": components["schemas"]["Error"];
|
|
17491
17523
|
};
|
|
17492
17524
|
};
|
|
17525
|
+
/** @description The flow contains durable-class steps and runs hosted only (code `DURABLE_FLOW_EXPORT_UNSUPPORTED`) */
|
|
17526
|
+
422: {
|
|
17527
|
+
headers: {
|
|
17528
|
+
[name: string]: unknown;
|
|
17529
|
+
};
|
|
17530
|
+
content: {
|
|
17531
|
+
"application/json": {
|
|
17532
|
+
/** @enum {string} */
|
|
17533
|
+
code: "DURABLE_FLOW_EXPORT_UNSUPPORTED";
|
|
17534
|
+
durableSteps: {
|
|
17535
|
+
stepId: string;
|
|
17536
|
+
stepType: string;
|
|
17537
|
+
}[];
|
|
17538
|
+
error: string;
|
|
17539
|
+
};
|
|
17540
|
+
};
|
|
17541
|
+
};
|
|
17493
17542
|
/** @description Internal server error */
|
|
17494
17543
|
500: {
|
|
17495
17544
|
headers: {
|
|
@@ -17815,6 +17864,11 @@ interface paths {
|
|
|
17815
17864
|
durationMs: number | null;
|
|
17816
17865
|
errorMessage?: string | null;
|
|
17817
17866
|
estimatedCost?: string | null;
|
|
17867
|
+
/**
|
|
17868
|
+
* @description Engine that actually executed this step ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
|
|
17869
|
+
* @enum {string|null}
|
|
17870
|
+
*/
|
|
17871
|
+
executionEngine?: "runtime" | "legacy" | null;
|
|
17818
17872
|
executionSessionId: string | null;
|
|
17819
17873
|
flowId: string | null;
|
|
17820
17874
|
flowVersionId: string | null;
|
|
@@ -34831,6 +34885,7 @@ interface paths {
|
|
|
34831
34885
|
type?: string;
|
|
34832
34886
|
search?: string;
|
|
34833
34887
|
name?: string;
|
|
34888
|
+
ownerId?: string;
|
|
34834
34889
|
distinct?: string;
|
|
34835
34890
|
includeFields?: string;
|
|
34836
34891
|
include_fields?: string;
|
|
@@ -34878,6 +34933,7 @@ interface paths {
|
|
|
34878
34933
|
};
|
|
34879
34934
|
name: string;
|
|
34880
34935
|
organizationId: string | null;
|
|
34936
|
+
ownerId: string | null;
|
|
34881
34937
|
productSurfaceId: string | null;
|
|
34882
34938
|
schemaValid: boolean | null;
|
|
34883
34939
|
type: string;
|
|
@@ -34961,6 +35017,8 @@ interface paths {
|
|
|
34961
35017
|
[key: string]: unknown;
|
|
34962
35018
|
};
|
|
34963
35019
|
name: string;
|
|
35020
|
+
/** @description Owner key for this record, stored in the indexed owner_id column and filterable via ?ownerId=. Overrides a nested metadata.ownerId. Null means no owner. */
|
|
35021
|
+
ownerId?: string | null;
|
|
34964
35022
|
type: string;
|
|
34965
35023
|
};
|
|
34966
35024
|
};
|
|
@@ -34989,6 +35047,7 @@ interface paths {
|
|
|
34989
35047
|
};
|
|
34990
35048
|
name: string;
|
|
34991
35049
|
organizationId: string | null;
|
|
35050
|
+
ownerId: string | null;
|
|
34992
35051
|
productSurfaceId: string | null;
|
|
34993
35052
|
schemaValid: boolean | null;
|
|
34994
35053
|
schemaWarnings?: {
|
|
@@ -35317,6 +35376,7 @@ interface paths {
|
|
|
35317
35376
|
type?: string;
|
|
35318
35377
|
search?: string;
|
|
35319
35378
|
name?: string;
|
|
35379
|
+
ownerId?: string;
|
|
35320
35380
|
distinct?: string;
|
|
35321
35381
|
includeFields?: string;
|
|
35322
35382
|
include_fields?: string;
|
|
@@ -35820,6 +35880,7 @@ interface paths {
|
|
|
35820
35880
|
};
|
|
35821
35881
|
name: string;
|
|
35822
35882
|
organizationId: string | null;
|
|
35883
|
+
ownerId: string | null;
|
|
35823
35884
|
productSurfaceId: string | null;
|
|
35824
35885
|
schemaValid: boolean | null;
|
|
35825
35886
|
type: string;
|
|
@@ -35901,6 +35962,8 @@ interface paths {
|
|
|
35901
35962
|
[key: string]: unknown;
|
|
35902
35963
|
};
|
|
35903
35964
|
name?: string;
|
|
35965
|
+
/** @description Reassigns the owner (indexed owner_id column, filterable via ?ownerId=). Overrides a nested metadata.ownerId. Null clears the owner; omit to leave it unchanged. */
|
|
35966
|
+
ownerId?: string | null;
|
|
35904
35967
|
type?: string;
|
|
35905
35968
|
};
|
|
35906
35969
|
};
|
|
@@ -35929,6 +35992,7 @@ interface paths {
|
|
|
35929
35992
|
};
|
|
35930
35993
|
name: string;
|
|
35931
35994
|
organizationId: string | null;
|
|
35995
|
+
ownerId: string | null;
|
|
35932
35996
|
productSurfaceId: string | null;
|
|
35933
35997
|
schemaValid: boolean | null;
|
|
35934
35998
|
schemaWarnings?: {
|
|
@@ -36228,14 +36292,23 @@ interface paths {
|
|
|
36228
36292
|
"application/json": {
|
|
36229
36293
|
data: {
|
|
36230
36294
|
createdAt: string;
|
|
36295
|
+
estimatedCost: string | null;
|
|
36296
|
+
/**
|
|
36297
|
+
* @description Engine that actually executed this record execution ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
|
|
36298
|
+
* @enum {string|null}
|
|
36299
|
+
*/
|
|
36300
|
+
executionEngine?: "runtime" | "legacy" | null;
|
|
36301
|
+
executionTimeMs: number | null;
|
|
36231
36302
|
flowId: string | null;
|
|
36232
36303
|
flowName: string | null;
|
|
36233
36304
|
id: string;
|
|
36305
|
+
modelUsed: string | null;
|
|
36234
36306
|
promptId: string | null;
|
|
36235
36307
|
promptName: string | null;
|
|
36236
36308
|
recordId: string;
|
|
36237
36309
|
result?: unknown;
|
|
36238
36310
|
status: string;
|
|
36311
|
+
totalTokens: number | null;
|
|
36239
36312
|
}[];
|
|
36240
36313
|
pagination: {
|
|
36241
36314
|
hasMore: boolean;
|
|
@@ -36428,6 +36501,11 @@ interface paths {
|
|
|
36428
36501
|
durationMs: number | null;
|
|
36429
36502
|
errorMessage?: string | null;
|
|
36430
36503
|
estimatedCost?: string | null;
|
|
36504
|
+
/**
|
|
36505
|
+
* @description Engine that actually executed this step ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
|
|
36506
|
+
* @enum {string|null}
|
|
36507
|
+
*/
|
|
36508
|
+
executionEngine?: "runtime" | "legacy" | null;
|
|
36431
36509
|
executionSessionId: string | null;
|
|
36432
36510
|
flowId: string | null;
|
|
36433
36511
|
flowVersionId: string | null;
|
|
@@ -37521,6 +37599,7 @@ interface paths {
|
|
|
37521
37599
|
} | null;
|
|
37522
37600
|
name: string;
|
|
37523
37601
|
organizationId: string | null;
|
|
37602
|
+
ownerId?: string | null;
|
|
37524
37603
|
productSurfaceId?: string | null;
|
|
37525
37604
|
schemaValid?: boolean | null;
|
|
37526
37605
|
type: string;
|
|
@@ -37687,6 +37766,7 @@ interface paths {
|
|
|
37687
37766
|
} | null;
|
|
37688
37767
|
name: string;
|
|
37689
37768
|
organizationId: string | null;
|
|
37769
|
+
ownerId?: string | null;
|
|
37690
37770
|
productSurfaceId?: string | null;
|
|
37691
37771
|
schemaValid?: boolean | null;
|
|
37692
37772
|
type: string;
|
|
@@ -37833,6 +37913,7 @@ interface paths {
|
|
|
37833
37913
|
} | null;
|
|
37834
37914
|
name: string;
|
|
37835
37915
|
organizationId: string | null;
|
|
37916
|
+
ownerId?: string | null;
|
|
37836
37917
|
productSurfaceId?: string | null;
|
|
37837
37918
|
schemaValid?: boolean | null;
|
|
37838
37919
|
type: string;
|
|
@@ -37981,6 +38062,7 @@ interface paths {
|
|
|
37981
38062
|
} | null;
|
|
37982
38063
|
name: string;
|
|
37983
38064
|
organizationId: string | null;
|
|
38065
|
+
ownerId?: string | null;
|
|
37984
38066
|
productSurfaceId?: string | null;
|
|
37985
38067
|
schemaValid?: boolean | null;
|
|
37986
38068
|
type: string;
|
|
@@ -38472,6 +38554,11 @@ interface paths {
|
|
|
38472
38554
|
durationMs: number | null;
|
|
38473
38555
|
error: string | null;
|
|
38474
38556
|
executedAt: string | null;
|
|
38557
|
+
/**
|
|
38558
|
+
* @description Engine that actually executed this record execution ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
|
|
38559
|
+
* @enum {string|null}
|
|
38560
|
+
*/
|
|
38561
|
+
executionEngine?: "runtime" | "legacy" | null;
|
|
38475
38562
|
failedAt: string | null;
|
|
38476
38563
|
failedStepCount: number | null;
|
|
38477
38564
|
flowId: string | null;
|
|
@@ -38659,6 +38746,11 @@ interface paths {
|
|
|
38659
38746
|
durationMs: number | null;
|
|
38660
38747
|
error: string | null;
|
|
38661
38748
|
executedAt: string | null;
|
|
38749
|
+
/**
|
|
38750
|
+
* @description Engine that actually executed this record execution ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
|
|
38751
|
+
* @enum {string|null}
|
|
38752
|
+
*/
|
|
38753
|
+
executionEngine?: "runtime" | "legacy" | null;
|
|
38662
38754
|
failedAt: string | null;
|
|
38663
38755
|
failedStepCount: number | null;
|
|
38664
38756
|
flowId: string | null;
|
|
@@ -45064,6 +45156,11 @@ interface components {
|
|
|
45064
45156
|
cases: {
|
|
45065
45157
|
/** @description The saved eval case id; null when the case row was deleted or the record could not be mapped to a case. */
|
|
45066
45158
|
caseId: string | null;
|
|
45159
|
+
/**
|
|
45160
|
+
* @description Engine that actually executed this graded case ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
|
|
45161
|
+
* @enum {string|null}
|
|
45162
|
+
*/
|
|
45163
|
+
executionEngine?: "runtime" | "legacy" | null;
|
|
45067
45164
|
name: string;
|
|
45068
45165
|
/** @description For a checkpoint ("saved from run") case run in next-step mode: the tool-call intent(s) the target emitted as its graded next step. An empty array means it replied with a message instead of calling a tool. Null for ordinary runs and for runs recorded before this field shipped. */
|
|
45069
45166
|
nextStepToolCalls: {
|
|
@@ -45255,6 +45352,7 @@ interface components {
|
|
|
45255
45352
|
/** @enum {string} */
|
|
45256
45353
|
kind: "agent" | "flow";
|
|
45257
45354
|
maxTurns?: number;
|
|
45355
|
+
resumed?: boolean;
|
|
45258
45356
|
seq: number;
|
|
45259
45357
|
source?: string;
|
|
45260
45358
|
startedAt: string;
|
|
@@ -47865,6 +47963,16 @@ interface CreatePromptRequest {
|
|
|
47865
47963
|
interface CreateRecordRequest {
|
|
47866
47964
|
type: string;
|
|
47867
47965
|
name: string;
|
|
47966
|
+
/**
|
|
47967
|
+
* First-class owner key (#3395) — persisted to the indexed `owner_id` column
|
|
47968
|
+
* and queryable via {@link RecordListParams.ownerId}. A nested
|
|
47969
|
+
* `metadata.ownerId` is still lifted into the column by the API; a top-level
|
|
47970
|
+
* value here wins over it.
|
|
47971
|
+
*
|
|
47972
|
+
* On `records.update()` (which takes `Partial<CreateRecordRequest>`),
|
|
47973
|
+
* `null` CLEARS the stored owner and omitting the field leaves it untouched.
|
|
47974
|
+
*/
|
|
47975
|
+
ownerId?: string | null;
|
|
47868
47976
|
metadata?: Metadata;
|
|
47869
47977
|
}
|
|
47870
47978
|
interface BulkEditCondition {
|
|
@@ -48267,6 +48375,7 @@ interface ListParams {
|
|
|
48267
48375
|
interface RecordListParams extends ListParams {
|
|
48268
48376
|
metadataKeys?: string;
|
|
48269
48377
|
metadataKeysAll?: string;
|
|
48378
|
+
ownerId?: string;
|
|
48270
48379
|
minFields?: number;
|
|
48271
48380
|
maxFields?: number;
|
|
48272
48381
|
metadataTypes?: string;
|
|
@@ -48284,9 +48393,10 @@ interface FlowToolConfig {
|
|
|
48284
48393
|
flowId?: string;
|
|
48285
48394
|
toolId?: string;
|
|
48286
48395
|
/**
|
|
48287
|
-
* Inline flow definition. Runtime-selected agent dispatches support this
|
|
48288
|
-
* `options.useRuntimePackage:
|
|
48289
|
-
* require a `flowId`/`toolId`
|
|
48396
|
+
* Inline flow definition. Runtime-selected agent dispatches support this
|
|
48397
|
+
* (the runtime lane is the default unless `options.useRuntimePackage: false`
|
|
48398
|
+
* opts out); hosted flow definitions currently require a `flowId`/`toolId`
|
|
48399
|
+
* reference.
|
|
48290
48400
|
*/
|
|
48291
48401
|
flow?: Record<string, unknown>;
|
|
48292
48402
|
/** Registered-flow name key for the runtime lane (`flowName ?? flowId`). */
|
|
@@ -48434,9 +48544,10 @@ interface RuntimeFlowToolConfig {
|
|
|
48434
48544
|
flowId?: string;
|
|
48435
48545
|
toolId?: string;
|
|
48436
48546
|
/**
|
|
48437
|
-
* Inline flow definition. Runtime-selected agent dispatches support this
|
|
48438
|
-
* `options.useRuntimePackage:
|
|
48439
|
-
* require a `flowId`/`toolId`
|
|
48547
|
+
* Inline flow definition. Runtime-selected agent dispatches support this
|
|
48548
|
+
* (the runtime lane is the default unless `options.useRuntimePackage: false`
|
|
48549
|
+
* opts out); hosted flow definitions currently require a `flowId`/`toolId`
|
|
48550
|
+
* reference.
|
|
48440
48551
|
*/
|
|
48441
48552
|
flow?: Record<string, unknown>;
|
|
48442
48553
|
/** Registered-flow name key for the runtime lane (`flowName ?? flowId`). */
|
|
@@ -48676,14 +48787,24 @@ interface CreateConversationRequest {
|
|
|
48676
48787
|
title?: string;
|
|
48677
48788
|
modelId?: string;
|
|
48678
48789
|
systemPrompt?: string;
|
|
48679
|
-
|
|
48790
|
+
/**
|
|
48791
|
+
* First-class owner key (#3395) — persisted to the indexed `owner_id` column
|
|
48792
|
+
* and queryable via {@link ConversationListParams.ownerId}. `null` is accepted
|
|
48793
|
+
* for symmetry with {@link UpdateConversationRequest} and simply means "no
|
|
48794
|
+
* owner" on create.
|
|
48795
|
+
*/
|
|
48796
|
+
ownerId?: string | null;
|
|
48680
48797
|
metadata?: Record<string, unknown>;
|
|
48681
48798
|
}
|
|
48682
48799
|
interface UpdateConversationRequest {
|
|
48683
48800
|
title?: string;
|
|
48684
48801
|
modelId?: string;
|
|
48685
48802
|
systemPrompt?: string;
|
|
48686
|
-
|
|
48803
|
+
/**
|
|
48804
|
+
* First-class owner key (#3395). `null` CLEARS the stored owner; omitting the
|
|
48805
|
+
* field leaves it untouched.
|
|
48806
|
+
*/
|
|
48807
|
+
ownerId?: string | null;
|
|
48687
48808
|
metadata?: Record<string, unknown>;
|
|
48688
48809
|
messages?: ConversationMessage[];
|
|
48689
48810
|
}
|
|
@@ -54382,6 +54503,15 @@ interface AgentStartEvent extends BaseAgentEvent {
|
|
|
54382
54503
|
model?: string;
|
|
54383
54504
|
enableReflection?: boolean;
|
|
54384
54505
|
};
|
|
54506
|
+
/**
|
|
54507
|
+
* `true` when this start opens the RESUME leg of a paused run (approval or
|
|
54508
|
+
* client-tool continuation) rather than a new run. The runtime opens every
|
|
54509
|
+
* response with a start frame; keep run-level state (turn counts, spend
|
|
54510
|
+
* totals, accumulated output) across a resumed start instead of resetting.
|
|
54511
|
+
* `executeWithLocalTools` already folds resumed starts away — its
|
|
54512
|
+
* `onAgentStart` fires once per session.
|
|
54513
|
+
*/
|
|
54514
|
+
resumed?: boolean;
|
|
54385
54515
|
}
|
|
54386
54516
|
/**
|
|
54387
54517
|
* Agent iteration start event
|
|
@@ -54498,6 +54628,8 @@ interface AgentToolCompleteEvent extends BaseAgentEvent {
|
|
|
54498
54628
|
toolName: string;
|
|
54499
54629
|
success: boolean;
|
|
54500
54630
|
result?: unknown;
|
|
54631
|
+
/** Failure reason when `success` is false (e.g. an MCP discovery connection failure). */
|
|
54632
|
+
error?: string;
|
|
54501
54633
|
executionTime?: number;
|
|
54502
54634
|
}
|
|
54503
54635
|
interface AgentMediaEvent extends BaseAgentEvent {
|
package/dist/index.mjs
CHANGED
|
@@ -216,7 +216,8 @@ function createAgentEventTranslator() {
|
|
|
216
216
|
agentName: data.agentName,
|
|
217
217
|
maxTurns: data.maxTurns,
|
|
218
218
|
startedAt: data.startedAt,
|
|
219
|
-
config: data.config
|
|
219
|
+
config: data.config,
|
|
220
|
+
resumed: data.resumed
|
|
220
221
|
})
|
|
221
222
|
];
|
|
222
223
|
case "turn_start":
|
|
@@ -354,6 +355,10 @@ function createAgentEventTranslator() {
|
|
|
354
355
|
toolName: data.toolName,
|
|
355
356
|
success: data.success,
|
|
356
357
|
result: data.result,
|
|
358
|
+
// A failure's reason travels on the frame's `error` field — the
|
|
359
|
+
// only carrier for complete-only failures like the MCP discovery
|
|
360
|
+
// connection pseudo-tool, which no longer emits an `error` frame.
|
|
361
|
+
error: str(data.error),
|
|
357
362
|
executionTime: data.executionTime
|
|
358
363
|
})
|
|
359
364
|
];
|
|
@@ -6249,7 +6254,7 @@ var Runtype = class {
|
|
|
6249
6254
|
|
|
6250
6255
|
// src/version.ts
|
|
6251
6256
|
var FALLBACK_VERSION = "0.0.0";
|
|
6252
|
-
var SDK_VERSION = "9.
|
|
6257
|
+
var SDK_VERSION = "9.1.1".length > 0 ? "9.1.1" : FALLBACK_VERSION;
|
|
6253
6258
|
var RUNTYPE_CLIENT_KIND = "sdk";
|
|
6254
6259
|
var SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
|
|
6255
6260
|
|
|
@@ -9817,7 +9822,7 @@ var _AgentsEndpoint = class _AgentsEndpoint {
|
|
|
9817
9822
|
...callbacks,
|
|
9818
9823
|
onAgentStart: (event) => {
|
|
9819
9824
|
lastSeenExecutionId = event.executionId;
|
|
9820
|
-
callbacks?.onAgentStart?.(event);
|
|
9825
|
+
if (!event.resumed) callbacks?.onAgentStart?.(event);
|
|
9821
9826
|
},
|
|
9822
9827
|
onTurnDelta: (event) => {
|
|
9823
9828
|
if (event.contentType === "text") {
|
package/package.json
CHANGED