@runtypelabs/sdk 11.11.0 → 11.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +10 -7
- package/dist/index.d.cts +226 -1
- package/dist/index.d.ts +226 -1
- package/dist/index.mjs +10 -7
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -11991,25 +11991,28 @@ const AGENT_CONFIG_KEYS = [
|
|
|
11991
11991
|
"tenancyStrategy",
|
|
11992
11992
|
"durability",
|
|
11993
11993
|
"busyMessageRouting",
|
|
11994
|
-
"state"
|
|
11994
|
+
"state",
|
|
11995
|
+
"output"
|
|
11995
11996
|
];
|
|
11996
11997
|
const AGENT_CONFIG_KEY_LIST = [...AGENT_CONFIG_KEYS].sort();
|
|
11997
11998
|
function isPlainObject(value) {
|
|
11998
11999
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
11999
12000
|
}
|
|
12000
|
-
function normalizeValue(value) {
|
|
12001
|
-
if (Array.isArray(value)) return value.map((item) => normalizeValue(item));
|
|
12001
|
+
function normalizeValue(value, keepNulls = false) {
|
|
12002
|
+
if (Array.isArray(value)) return value.map((item) => normalizeValue(item, keepNulls));
|
|
12002
12003
|
if (isPlainObject(value)) {
|
|
12003
12004
|
const normalized = {};
|
|
12004
12005
|
for (const key of Object.keys(value).sort()) {
|
|
12005
12006
|
const entry = value[key];
|
|
12006
|
-
if (entry === void 0 || entry === null) continue;
|
|
12007
|
-
normalized[key] = normalizeValue(entry);
|
|
12007
|
+
if (entry === void 0 || entry === null && !keepNulls) continue;
|
|
12008
|
+
normalized[key] = normalizeValue(entry, keepNulls);
|
|
12008
12009
|
}
|
|
12009
12010
|
return normalized;
|
|
12010
12011
|
}
|
|
12011
12012
|
return value;
|
|
12012
12013
|
}
|
|
12014
|
+
/** Config keys whose nested nulls are literal values (a validator schema's `const: null`), not "unset". */
|
|
12015
|
+
const NULL_LITERAL_CONFIG_KEYS = /* @__PURE__ */ new Set(["output"]);
|
|
12013
12016
|
/** Canonical normalized form — must stay byte-identical to the shared impl. */
|
|
12014
12017
|
function normalizeAgentDefinition(definition) {
|
|
12015
12018
|
const config = {};
|
|
@@ -12017,7 +12020,7 @@ function normalizeAgentDefinition(definition) {
|
|
|
12017
12020
|
for (const key of AGENT_CONFIG_KEY_LIST) {
|
|
12018
12021
|
const value = rawConfig[key];
|
|
12019
12022
|
if (value === void 0 || value === null) continue;
|
|
12020
|
-
config[key] = normalizeValue(value);
|
|
12023
|
+
config[key] = normalizeValue(value, NULL_LITERAL_CONFIG_KEYS.has(key));
|
|
12021
12024
|
}
|
|
12022
12025
|
return {
|
|
12023
12026
|
name: definition.name,
|
|
@@ -14715,7 +14718,7 @@ function transformQueryParams(params) {
|
|
|
14715
14718
|
return result;
|
|
14716
14719
|
}
|
|
14717
14720
|
// src/version.ts
|
|
14718
|
-
const SDK_VERSION = "11.
|
|
14721
|
+
const SDK_VERSION = "11.13.0";
|
|
14719
14722
|
/**
|
|
14720
14723
|
* Canonical client identity the API uses for attribution
|
|
14721
14724
|
* (`detectActorSource` in apps/api/src/lib/audit-log.ts keys `'sdk'` off the
|
package/dist/index.d.cts
CHANGED
|
@@ -1019,6 +1019,35 @@ interface paths {
|
|
|
1019
1019
|
profileTemplate?: string;
|
|
1020
1020
|
};
|
|
1021
1021
|
model?: string;
|
|
1022
|
+
output?: {
|
|
1023
|
+
validators?: ({
|
|
1024
|
+
maxBounces?: number;
|
|
1025
|
+
schema?: {
|
|
1026
|
+
[key: string]: unknown;
|
|
1027
|
+
};
|
|
1028
|
+
/** @enum {string} */
|
|
1029
|
+
type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
|
|
1030
|
+
} | {
|
|
1031
|
+
maxBounces?: number;
|
|
1032
|
+
name: string;
|
|
1033
|
+
timeoutMs?: number;
|
|
1034
|
+
/** @enum {string} */
|
|
1035
|
+
type: "custom";
|
|
1036
|
+
} | {
|
|
1037
|
+
flowId: string;
|
|
1038
|
+
maxBounces?: number;
|
|
1039
|
+
outputVariable?: string;
|
|
1040
|
+
timeoutMs?: number;
|
|
1041
|
+
/** @enum {string} */
|
|
1042
|
+
type: "flow";
|
|
1043
|
+
} | {
|
|
1044
|
+
maxBounces?: number;
|
|
1045
|
+
timeoutMs?: number;
|
|
1046
|
+
toolId: string;
|
|
1047
|
+
/** @enum {string} */
|
|
1048
|
+
type: "tool";
|
|
1049
|
+
})[];
|
|
1050
|
+
};
|
|
1022
1051
|
/** @enum {string} */
|
|
1023
1052
|
piiRedaction?: "default" | "off" | "redact";
|
|
1024
1053
|
presencePenalty?: number;
|
|
@@ -1575,6 +1604,35 @@ interface paths {
|
|
|
1575
1604
|
profileTemplate?: string;
|
|
1576
1605
|
};
|
|
1577
1606
|
model?: string;
|
|
1607
|
+
output?: {
|
|
1608
|
+
validators?: ({
|
|
1609
|
+
maxBounces?: number;
|
|
1610
|
+
schema?: {
|
|
1611
|
+
[key: string]: unknown;
|
|
1612
|
+
};
|
|
1613
|
+
/** @enum {string} */
|
|
1614
|
+
type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
|
|
1615
|
+
} | {
|
|
1616
|
+
maxBounces?: number;
|
|
1617
|
+
name: string;
|
|
1618
|
+
timeoutMs?: number;
|
|
1619
|
+
/** @enum {string} */
|
|
1620
|
+
type: "custom";
|
|
1621
|
+
} | {
|
|
1622
|
+
flowId: string;
|
|
1623
|
+
maxBounces?: number;
|
|
1624
|
+
outputVariable?: string;
|
|
1625
|
+
timeoutMs?: number;
|
|
1626
|
+
/** @enum {string} */
|
|
1627
|
+
type: "flow";
|
|
1628
|
+
} | {
|
|
1629
|
+
maxBounces?: number;
|
|
1630
|
+
timeoutMs?: number;
|
|
1631
|
+
toolId: string;
|
|
1632
|
+
/** @enum {string} */
|
|
1633
|
+
type: "tool";
|
|
1634
|
+
})[];
|
|
1635
|
+
};
|
|
1578
1636
|
/** @enum {string} */
|
|
1579
1637
|
piiRedaction?: "default" | "off" | "redact";
|
|
1580
1638
|
presencePenalty?: number;
|
|
@@ -2421,6 +2479,35 @@ interface paths {
|
|
|
2421
2479
|
profileTemplate?: string;
|
|
2422
2480
|
};
|
|
2423
2481
|
model?: string;
|
|
2482
|
+
output?: {
|
|
2483
|
+
validators?: ({
|
|
2484
|
+
maxBounces?: number;
|
|
2485
|
+
schema?: {
|
|
2486
|
+
[key: string]: unknown;
|
|
2487
|
+
};
|
|
2488
|
+
/** @enum {string} */
|
|
2489
|
+
type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
|
|
2490
|
+
} | {
|
|
2491
|
+
maxBounces?: number;
|
|
2492
|
+
name: string;
|
|
2493
|
+
timeoutMs?: number;
|
|
2494
|
+
/** @enum {string} */
|
|
2495
|
+
type: "custom";
|
|
2496
|
+
} | {
|
|
2497
|
+
flowId: string;
|
|
2498
|
+
maxBounces?: number;
|
|
2499
|
+
outputVariable?: string;
|
|
2500
|
+
timeoutMs?: number;
|
|
2501
|
+
/** @enum {string} */
|
|
2502
|
+
type: "flow";
|
|
2503
|
+
} | {
|
|
2504
|
+
maxBounces?: number;
|
|
2505
|
+
timeoutMs?: number;
|
|
2506
|
+
toolId: string;
|
|
2507
|
+
/** @enum {string} */
|
|
2508
|
+
type: "tool";
|
|
2509
|
+
})[];
|
|
2510
|
+
};
|
|
2424
2511
|
/** @enum {string} */
|
|
2425
2512
|
piiRedaction?: "default" | "off" | "redact";
|
|
2426
2513
|
presencePenalty?: number;
|
|
@@ -13987,6 +14074,13 @@ interface paths {
|
|
|
13987
14074
|
/** @enum {string} */
|
|
13988
14075
|
status: "queued" | "running" | "input_required" | "completed" | "failed" | "cancelled";
|
|
13989
14076
|
summary: string | null;
|
|
14077
|
+
/**
|
|
14078
|
+
* @description Who works the task; `operator` when absent.
|
|
14079
|
+
* @enum {string}
|
|
14080
|
+
*/
|
|
14081
|
+
target?: "operator" | "otto";
|
|
14082
|
+
/** @description The worker's execution for the latest turn, when it has its own: an Otto run. */
|
|
14083
|
+
targetExecutionId?: string | null;
|
|
13990
14084
|
toolCallCount: number;
|
|
13991
14085
|
totalCost: number | null;
|
|
13992
14086
|
touchedEntities: {
|
|
@@ -14076,6 +14170,11 @@ interface paths {
|
|
|
14076
14170
|
* @enum {string}
|
|
14077
14171
|
*/
|
|
14078
14172
|
priority?: "standard" | "fast";
|
|
14173
|
+
/**
|
|
14174
|
+
* @description Who works the task. Defaults to `operator`; `otto` hands it to Otto, the account's saved product-engineer agent, and needs the `delegate-to-otto` account flag.
|
|
14175
|
+
* @enum {string}
|
|
14176
|
+
*/
|
|
14177
|
+
target?: "operator" | "otto";
|
|
14079
14178
|
waitSeconds?: number;
|
|
14080
14179
|
};
|
|
14081
14180
|
};
|
|
@@ -14128,6 +14227,13 @@ interface paths {
|
|
|
14128
14227
|
/** @enum {string} */
|
|
14129
14228
|
status: "queued" | "running" | "input_required" | "completed" | "failed" | "cancelled";
|
|
14130
14229
|
summary: string | null;
|
|
14230
|
+
/**
|
|
14231
|
+
* @description Who works the task; `operator` when absent.
|
|
14232
|
+
* @enum {string}
|
|
14233
|
+
*/
|
|
14234
|
+
target?: "operator" | "otto";
|
|
14235
|
+
/** @description The worker's execution for the latest turn, when it has its own: an Otto run. */
|
|
14236
|
+
targetExecutionId?: string | null;
|
|
14131
14237
|
toolCallCount: number;
|
|
14132
14238
|
totalCost: number | null;
|
|
14133
14239
|
touchedEntities: {
|
|
@@ -14189,6 +14295,13 @@ interface paths {
|
|
|
14189
14295
|
/** @enum {string} */
|
|
14190
14296
|
status: "queued" | "running" | "input_required" | "completed" | "failed" | "cancelled";
|
|
14191
14297
|
summary: string | null;
|
|
14298
|
+
/**
|
|
14299
|
+
* @description Who works the task; `operator` when absent.
|
|
14300
|
+
* @enum {string}
|
|
14301
|
+
*/
|
|
14302
|
+
target?: "operator" | "otto";
|
|
14303
|
+
/** @description The worker's execution for the latest turn, when it has its own: an Otto run. */
|
|
14304
|
+
targetExecutionId?: string | null;
|
|
14192
14305
|
toolCallCount: number;
|
|
14193
14306
|
totalCost: number | null;
|
|
14194
14307
|
touchedEntities: {
|
|
@@ -14435,6 +14548,13 @@ interface paths {
|
|
|
14435
14548
|
/** @enum {string} */
|
|
14436
14549
|
status: "queued" | "running" | "input_required" | "completed" | "failed" | "cancelled";
|
|
14437
14550
|
summary: string | null;
|
|
14551
|
+
/**
|
|
14552
|
+
* @description Who works the task; `operator` when absent.
|
|
14553
|
+
* @enum {string}
|
|
14554
|
+
*/
|
|
14555
|
+
target?: "operator" | "otto";
|
|
14556
|
+
/** @description The worker's execution for the latest turn, when it has its own: an Otto run. */
|
|
14557
|
+
targetExecutionId?: string | null;
|
|
14438
14558
|
toolCallCount: number;
|
|
14439
14559
|
totalCost: number | null;
|
|
14440
14560
|
touchedEntities: {
|
|
@@ -14569,6 +14689,13 @@ interface paths {
|
|
|
14569
14689
|
/** @enum {string} */
|
|
14570
14690
|
status: "queued" | "running" | "input_required" | "completed" | "failed" | "cancelled";
|
|
14571
14691
|
summary: string | null;
|
|
14692
|
+
/**
|
|
14693
|
+
* @description Who works the task; `operator` when absent.
|
|
14694
|
+
* @enum {string}
|
|
14695
|
+
*/
|
|
14696
|
+
target?: "operator" | "otto";
|
|
14697
|
+
/** @description The worker's execution for the latest turn, when it has its own: an Otto run. */
|
|
14698
|
+
targetExecutionId?: string | null;
|
|
14572
14699
|
toolCallCount: number;
|
|
14573
14700
|
totalCost: number | null;
|
|
14574
14701
|
touchedEntities: {
|
|
@@ -14809,6 +14936,13 @@ interface paths {
|
|
|
14809
14936
|
/** @enum {string} */
|
|
14810
14937
|
status: "queued" | "running" | "input_required" | "completed" | "failed" | "cancelled";
|
|
14811
14938
|
summary: string | null;
|
|
14939
|
+
/**
|
|
14940
|
+
* @description Who works the task; `operator` when absent.
|
|
14941
|
+
* @enum {string}
|
|
14942
|
+
*/
|
|
14943
|
+
target?: "operator" | "otto";
|
|
14944
|
+
/** @description The worker's execution for the latest turn, when it has its own: an Otto run. */
|
|
14945
|
+
targetExecutionId?: string | null;
|
|
14812
14946
|
toolCallCount: number;
|
|
14813
14947
|
totalCost: number | null;
|
|
14814
14948
|
touchedEntities: {
|
|
@@ -14851,7 +14985,7 @@ interface paths {
|
|
|
14851
14985
|
"application/json": components["schemas"]["Error"];
|
|
14852
14986
|
};
|
|
14853
14987
|
};
|
|
14854
|
-
/** @description The task has already settled (`DELEGATE_TASK_SETTLED`),
|
|
14988
|
+
/** @description The task has already settled (`DELEGATE_TASK_SETTLED`), no longer waits on the question named by `answersQuestionSeq` (`DELEGATE_TASK_QUESTION_ANSWERED`), or is an `otto` task mid-turn, which takes no message until it settles or asks (`DELEGATE_TASK_BUSY`) */
|
|
14855
14989
|
409: {
|
|
14856
14990
|
headers: {
|
|
14857
14991
|
[name: string]: unknown;
|
|
@@ -59369,6 +59503,7 @@ interface paths {
|
|
|
59369
59503
|
enableChromeSurface: boolean;
|
|
59370
59504
|
enableDashboardAssistant: boolean;
|
|
59371
59505
|
enableDecisionModelsDashboard: boolean;
|
|
59506
|
+
enableDelegateToOtto?: boolean;
|
|
59372
59507
|
enableDelegateToRuntype?: boolean;
|
|
59373
59508
|
enableEndUserUsageAnalytics: boolean;
|
|
59374
59509
|
enableMassiveWebRender: boolean;
|
|
@@ -60208,6 +60343,35 @@ interface components {
|
|
|
60208
60343
|
profileTemplate?: string;
|
|
60209
60344
|
};
|
|
60210
60345
|
model?: string;
|
|
60346
|
+
output?: {
|
|
60347
|
+
validators?: ({
|
|
60348
|
+
maxBounces?: number;
|
|
60349
|
+
schema?: {
|
|
60350
|
+
[key: string]: unknown;
|
|
60351
|
+
};
|
|
60352
|
+
/** @enum {string} */
|
|
60353
|
+
type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
|
|
60354
|
+
} | {
|
|
60355
|
+
maxBounces?: number;
|
|
60356
|
+
name: string;
|
|
60357
|
+
timeoutMs?: number;
|
|
60358
|
+
/** @enum {string} */
|
|
60359
|
+
type: "custom";
|
|
60360
|
+
} | {
|
|
60361
|
+
flowId: string;
|
|
60362
|
+
maxBounces?: number;
|
|
60363
|
+
outputVariable?: string;
|
|
60364
|
+
timeoutMs?: number;
|
|
60365
|
+
/** @enum {string} */
|
|
60366
|
+
type: "flow";
|
|
60367
|
+
} | {
|
|
60368
|
+
maxBounces?: number;
|
|
60369
|
+
timeoutMs?: number;
|
|
60370
|
+
toolId: string;
|
|
60371
|
+
/** @enum {string} */
|
|
60372
|
+
type: "tool";
|
|
60373
|
+
})[];
|
|
60374
|
+
};
|
|
60211
60375
|
/** @enum {string} */
|
|
60212
60376
|
piiRedaction?: "default" | "off" | "redact";
|
|
60213
60377
|
presencePenalty?: number;
|
|
@@ -61046,6 +61210,35 @@ interface components {
|
|
|
61046
61210
|
profileTemplate?: string;
|
|
61047
61211
|
};
|
|
61048
61212
|
model?: string;
|
|
61213
|
+
output?: {
|
|
61214
|
+
validators?: ({
|
|
61215
|
+
maxBounces?: number;
|
|
61216
|
+
schema?: {
|
|
61217
|
+
[key: string]: unknown;
|
|
61218
|
+
};
|
|
61219
|
+
/** @enum {string} */
|
|
61220
|
+
type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
|
|
61221
|
+
} | {
|
|
61222
|
+
maxBounces?: number;
|
|
61223
|
+
name: string;
|
|
61224
|
+
timeoutMs?: number;
|
|
61225
|
+
/** @enum {string} */
|
|
61226
|
+
type: "custom";
|
|
61227
|
+
} | {
|
|
61228
|
+
flowId: string;
|
|
61229
|
+
maxBounces?: number;
|
|
61230
|
+
outputVariable?: string;
|
|
61231
|
+
timeoutMs?: number;
|
|
61232
|
+
/** @enum {string} */
|
|
61233
|
+
type: "flow";
|
|
61234
|
+
} | {
|
|
61235
|
+
maxBounces?: number;
|
|
61236
|
+
timeoutMs?: number;
|
|
61237
|
+
toolId: string;
|
|
61238
|
+
/** @enum {string} */
|
|
61239
|
+
type: "tool";
|
|
61240
|
+
})[];
|
|
61241
|
+
};
|
|
61049
61242
|
/** @enum {string} */
|
|
61050
61243
|
piiRedaction?: "default" | "off" | "redact";
|
|
61051
61244
|
presencePenalty?: number;
|
|
@@ -62249,6 +62442,12 @@ interface components {
|
|
|
62249
62442
|
* @enum {string}
|
|
62250
62443
|
*/
|
|
62251
62444
|
outcome?: "completed" | "error" | "aborted";
|
|
62445
|
+
output?: {
|
|
62446
|
+
validation?: {
|
|
62447
|
+
errored?: string[];
|
|
62448
|
+
failed?: string[];
|
|
62449
|
+
};
|
|
62450
|
+
};
|
|
62252
62451
|
seq: number;
|
|
62253
62452
|
stepErrorCount?: number;
|
|
62254
62453
|
stopReason?: string;
|
|
@@ -62722,6 +62921,7 @@ interface components {
|
|
|
62722
62921
|
/** @enum {string} */
|
|
62723
62922
|
type: "tool_output_delta";
|
|
62724
62923
|
} | {
|
|
62924
|
+
completedAt?: string;
|
|
62725
62925
|
error?: string;
|
|
62726
62926
|
executionId: string;
|
|
62727
62927
|
executionTime?: number;
|
|
@@ -76179,6 +76379,31 @@ interface AgentDefinitionConfig {
|
|
|
76179
76379
|
toolArgument: string;
|
|
76180
76380
|
}>;
|
|
76181
76381
|
};
|
|
76382
|
+
/** Settlement validators the loop runs before it settles; a failing one re-prompts up to `maxBounces` times. */
|
|
76383
|
+
output?: {
|
|
76384
|
+
validators?: Array<{
|
|
76385
|
+
type: 'candidate-question' | 'requested-json' | 'no-action' | 'json-schema';
|
|
76386
|
+
maxBounces?: number;
|
|
76387
|
+
/** Required on a `json-schema` validator, rejected on the others. */
|
|
76388
|
+
schema?: Record<string, unknown>;
|
|
76389
|
+
} | {
|
|
76390
|
+
type: 'custom';
|
|
76391
|
+
name: string;
|
|
76392
|
+
maxBounces?: number;
|
|
76393
|
+
timeoutMs?: number;
|
|
76394
|
+
} | {
|
|
76395
|
+
type: 'flow';
|
|
76396
|
+
flowId: string;
|
|
76397
|
+
outputVariable?: string;
|
|
76398
|
+
maxBounces?: number;
|
|
76399
|
+
timeoutMs?: number;
|
|
76400
|
+
} | {
|
|
76401
|
+
type: 'tool';
|
|
76402
|
+
toolId: string;
|
|
76403
|
+
maxBounces?: number;
|
|
76404
|
+
timeoutMs?: number;
|
|
76405
|
+
}>;
|
|
76406
|
+
};
|
|
76182
76407
|
}
|
|
76183
76408
|
/**
|
|
76184
76409
|
* `defineAgent` input — the flat authoring shape: identity + presentation
|
package/dist/index.d.ts
CHANGED
|
@@ -1019,6 +1019,35 @@ interface paths {
|
|
|
1019
1019
|
profileTemplate?: string;
|
|
1020
1020
|
};
|
|
1021
1021
|
model?: string;
|
|
1022
|
+
output?: {
|
|
1023
|
+
validators?: ({
|
|
1024
|
+
maxBounces?: number;
|
|
1025
|
+
schema?: {
|
|
1026
|
+
[key: string]: unknown;
|
|
1027
|
+
};
|
|
1028
|
+
/** @enum {string} */
|
|
1029
|
+
type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
|
|
1030
|
+
} | {
|
|
1031
|
+
maxBounces?: number;
|
|
1032
|
+
name: string;
|
|
1033
|
+
timeoutMs?: number;
|
|
1034
|
+
/** @enum {string} */
|
|
1035
|
+
type: "custom";
|
|
1036
|
+
} | {
|
|
1037
|
+
flowId: string;
|
|
1038
|
+
maxBounces?: number;
|
|
1039
|
+
outputVariable?: string;
|
|
1040
|
+
timeoutMs?: number;
|
|
1041
|
+
/** @enum {string} */
|
|
1042
|
+
type: "flow";
|
|
1043
|
+
} | {
|
|
1044
|
+
maxBounces?: number;
|
|
1045
|
+
timeoutMs?: number;
|
|
1046
|
+
toolId: string;
|
|
1047
|
+
/** @enum {string} */
|
|
1048
|
+
type: "tool";
|
|
1049
|
+
})[];
|
|
1050
|
+
};
|
|
1022
1051
|
/** @enum {string} */
|
|
1023
1052
|
piiRedaction?: "default" | "off" | "redact";
|
|
1024
1053
|
presencePenalty?: number;
|
|
@@ -1575,6 +1604,35 @@ interface paths {
|
|
|
1575
1604
|
profileTemplate?: string;
|
|
1576
1605
|
};
|
|
1577
1606
|
model?: string;
|
|
1607
|
+
output?: {
|
|
1608
|
+
validators?: ({
|
|
1609
|
+
maxBounces?: number;
|
|
1610
|
+
schema?: {
|
|
1611
|
+
[key: string]: unknown;
|
|
1612
|
+
};
|
|
1613
|
+
/** @enum {string} */
|
|
1614
|
+
type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
|
|
1615
|
+
} | {
|
|
1616
|
+
maxBounces?: number;
|
|
1617
|
+
name: string;
|
|
1618
|
+
timeoutMs?: number;
|
|
1619
|
+
/** @enum {string} */
|
|
1620
|
+
type: "custom";
|
|
1621
|
+
} | {
|
|
1622
|
+
flowId: string;
|
|
1623
|
+
maxBounces?: number;
|
|
1624
|
+
outputVariable?: string;
|
|
1625
|
+
timeoutMs?: number;
|
|
1626
|
+
/** @enum {string} */
|
|
1627
|
+
type: "flow";
|
|
1628
|
+
} | {
|
|
1629
|
+
maxBounces?: number;
|
|
1630
|
+
timeoutMs?: number;
|
|
1631
|
+
toolId: string;
|
|
1632
|
+
/** @enum {string} */
|
|
1633
|
+
type: "tool";
|
|
1634
|
+
})[];
|
|
1635
|
+
};
|
|
1578
1636
|
/** @enum {string} */
|
|
1579
1637
|
piiRedaction?: "default" | "off" | "redact";
|
|
1580
1638
|
presencePenalty?: number;
|
|
@@ -2421,6 +2479,35 @@ interface paths {
|
|
|
2421
2479
|
profileTemplate?: string;
|
|
2422
2480
|
};
|
|
2423
2481
|
model?: string;
|
|
2482
|
+
output?: {
|
|
2483
|
+
validators?: ({
|
|
2484
|
+
maxBounces?: number;
|
|
2485
|
+
schema?: {
|
|
2486
|
+
[key: string]: unknown;
|
|
2487
|
+
};
|
|
2488
|
+
/** @enum {string} */
|
|
2489
|
+
type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
|
|
2490
|
+
} | {
|
|
2491
|
+
maxBounces?: number;
|
|
2492
|
+
name: string;
|
|
2493
|
+
timeoutMs?: number;
|
|
2494
|
+
/** @enum {string} */
|
|
2495
|
+
type: "custom";
|
|
2496
|
+
} | {
|
|
2497
|
+
flowId: string;
|
|
2498
|
+
maxBounces?: number;
|
|
2499
|
+
outputVariable?: string;
|
|
2500
|
+
timeoutMs?: number;
|
|
2501
|
+
/** @enum {string} */
|
|
2502
|
+
type: "flow";
|
|
2503
|
+
} | {
|
|
2504
|
+
maxBounces?: number;
|
|
2505
|
+
timeoutMs?: number;
|
|
2506
|
+
toolId: string;
|
|
2507
|
+
/** @enum {string} */
|
|
2508
|
+
type: "tool";
|
|
2509
|
+
})[];
|
|
2510
|
+
};
|
|
2424
2511
|
/** @enum {string} */
|
|
2425
2512
|
piiRedaction?: "default" | "off" | "redact";
|
|
2426
2513
|
presencePenalty?: number;
|
|
@@ -13987,6 +14074,13 @@ interface paths {
|
|
|
13987
14074
|
/** @enum {string} */
|
|
13988
14075
|
status: "queued" | "running" | "input_required" | "completed" | "failed" | "cancelled";
|
|
13989
14076
|
summary: string | null;
|
|
14077
|
+
/**
|
|
14078
|
+
* @description Who works the task; `operator` when absent.
|
|
14079
|
+
* @enum {string}
|
|
14080
|
+
*/
|
|
14081
|
+
target?: "operator" | "otto";
|
|
14082
|
+
/** @description The worker's execution for the latest turn, when it has its own: an Otto run. */
|
|
14083
|
+
targetExecutionId?: string | null;
|
|
13990
14084
|
toolCallCount: number;
|
|
13991
14085
|
totalCost: number | null;
|
|
13992
14086
|
touchedEntities: {
|
|
@@ -14076,6 +14170,11 @@ interface paths {
|
|
|
14076
14170
|
* @enum {string}
|
|
14077
14171
|
*/
|
|
14078
14172
|
priority?: "standard" | "fast";
|
|
14173
|
+
/**
|
|
14174
|
+
* @description Who works the task. Defaults to `operator`; `otto` hands it to Otto, the account's saved product-engineer agent, and needs the `delegate-to-otto` account flag.
|
|
14175
|
+
* @enum {string}
|
|
14176
|
+
*/
|
|
14177
|
+
target?: "operator" | "otto";
|
|
14079
14178
|
waitSeconds?: number;
|
|
14080
14179
|
};
|
|
14081
14180
|
};
|
|
@@ -14128,6 +14227,13 @@ interface paths {
|
|
|
14128
14227
|
/** @enum {string} */
|
|
14129
14228
|
status: "queued" | "running" | "input_required" | "completed" | "failed" | "cancelled";
|
|
14130
14229
|
summary: string | null;
|
|
14230
|
+
/**
|
|
14231
|
+
* @description Who works the task; `operator` when absent.
|
|
14232
|
+
* @enum {string}
|
|
14233
|
+
*/
|
|
14234
|
+
target?: "operator" | "otto";
|
|
14235
|
+
/** @description The worker's execution for the latest turn, when it has its own: an Otto run. */
|
|
14236
|
+
targetExecutionId?: string | null;
|
|
14131
14237
|
toolCallCount: number;
|
|
14132
14238
|
totalCost: number | null;
|
|
14133
14239
|
touchedEntities: {
|
|
@@ -14189,6 +14295,13 @@ interface paths {
|
|
|
14189
14295
|
/** @enum {string} */
|
|
14190
14296
|
status: "queued" | "running" | "input_required" | "completed" | "failed" | "cancelled";
|
|
14191
14297
|
summary: string | null;
|
|
14298
|
+
/**
|
|
14299
|
+
* @description Who works the task; `operator` when absent.
|
|
14300
|
+
* @enum {string}
|
|
14301
|
+
*/
|
|
14302
|
+
target?: "operator" | "otto";
|
|
14303
|
+
/** @description The worker's execution for the latest turn, when it has its own: an Otto run. */
|
|
14304
|
+
targetExecutionId?: string | null;
|
|
14192
14305
|
toolCallCount: number;
|
|
14193
14306
|
totalCost: number | null;
|
|
14194
14307
|
touchedEntities: {
|
|
@@ -14435,6 +14548,13 @@ interface paths {
|
|
|
14435
14548
|
/** @enum {string} */
|
|
14436
14549
|
status: "queued" | "running" | "input_required" | "completed" | "failed" | "cancelled";
|
|
14437
14550
|
summary: string | null;
|
|
14551
|
+
/**
|
|
14552
|
+
* @description Who works the task; `operator` when absent.
|
|
14553
|
+
* @enum {string}
|
|
14554
|
+
*/
|
|
14555
|
+
target?: "operator" | "otto";
|
|
14556
|
+
/** @description The worker's execution for the latest turn, when it has its own: an Otto run. */
|
|
14557
|
+
targetExecutionId?: string | null;
|
|
14438
14558
|
toolCallCount: number;
|
|
14439
14559
|
totalCost: number | null;
|
|
14440
14560
|
touchedEntities: {
|
|
@@ -14569,6 +14689,13 @@ interface paths {
|
|
|
14569
14689
|
/** @enum {string} */
|
|
14570
14690
|
status: "queued" | "running" | "input_required" | "completed" | "failed" | "cancelled";
|
|
14571
14691
|
summary: string | null;
|
|
14692
|
+
/**
|
|
14693
|
+
* @description Who works the task; `operator` when absent.
|
|
14694
|
+
* @enum {string}
|
|
14695
|
+
*/
|
|
14696
|
+
target?: "operator" | "otto";
|
|
14697
|
+
/** @description The worker's execution for the latest turn, when it has its own: an Otto run. */
|
|
14698
|
+
targetExecutionId?: string | null;
|
|
14572
14699
|
toolCallCount: number;
|
|
14573
14700
|
totalCost: number | null;
|
|
14574
14701
|
touchedEntities: {
|
|
@@ -14809,6 +14936,13 @@ interface paths {
|
|
|
14809
14936
|
/** @enum {string} */
|
|
14810
14937
|
status: "queued" | "running" | "input_required" | "completed" | "failed" | "cancelled";
|
|
14811
14938
|
summary: string | null;
|
|
14939
|
+
/**
|
|
14940
|
+
* @description Who works the task; `operator` when absent.
|
|
14941
|
+
* @enum {string}
|
|
14942
|
+
*/
|
|
14943
|
+
target?: "operator" | "otto";
|
|
14944
|
+
/** @description The worker's execution for the latest turn, when it has its own: an Otto run. */
|
|
14945
|
+
targetExecutionId?: string | null;
|
|
14812
14946
|
toolCallCount: number;
|
|
14813
14947
|
totalCost: number | null;
|
|
14814
14948
|
touchedEntities: {
|
|
@@ -14851,7 +14985,7 @@ interface paths {
|
|
|
14851
14985
|
"application/json": components["schemas"]["Error"];
|
|
14852
14986
|
};
|
|
14853
14987
|
};
|
|
14854
|
-
/** @description The task has already settled (`DELEGATE_TASK_SETTLED`),
|
|
14988
|
+
/** @description The task has already settled (`DELEGATE_TASK_SETTLED`), no longer waits on the question named by `answersQuestionSeq` (`DELEGATE_TASK_QUESTION_ANSWERED`), or is an `otto` task mid-turn, which takes no message until it settles or asks (`DELEGATE_TASK_BUSY`) */
|
|
14855
14989
|
409: {
|
|
14856
14990
|
headers: {
|
|
14857
14991
|
[name: string]: unknown;
|
|
@@ -59369,6 +59503,7 @@ interface paths {
|
|
|
59369
59503
|
enableChromeSurface: boolean;
|
|
59370
59504
|
enableDashboardAssistant: boolean;
|
|
59371
59505
|
enableDecisionModelsDashboard: boolean;
|
|
59506
|
+
enableDelegateToOtto?: boolean;
|
|
59372
59507
|
enableDelegateToRuntype?: boolean;
|
|
59373
59508
|
enableEndUserUsageAnalytics: boolean;
|
|
59374
59509
|
enableMassiveWebRender: boolean;
|
|
@@ -60208,6 +60343,35 @@ interface components {
|
|
|
60208
60343
|
profileTemplate?: string;
|
|
60209
60344
|
};
|
|
60210
60345
|
model?: string;
|
|
60346
|
+
output?: {
|
|
60347
|
+
validators?: ({
|
|
60348
|
+
maxBounces?: number;
|
|
60349
|
+
schema?: {
|
|
60350
|
+
[key: string]: unknown;
|
|
60351
|
+
};
|
|
60352
|
+
/** @enum {string} */
|
|
60353
|
+
type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
|
|
60354
|
+
} | {
|
|
60355
|
+
maxBounces?: number;
|
|
60356
|
+
name: string;
|
|
60357
|
+
timeoutMs?: number;
|
|
60358
|
+
/** @enum {string} */
|
|
60359
|
+
type: "custom";
|
|
60360
|
+
} | {
|
|
60361
|
+
flowId: string;
|
|
60362
|
+
maxBounces?: number;
|
|
60363
|
+
outputVariable?: string;
|
|
60364
|
+
timeoutMs?: number;
|
|
60365
|
+
/** @enum {string} */
|
|
60366
|
+
type: "flow";
|
|
60367
|
+
} | {
|
|
60368
|
+
maxBounces?: number;
|
|
60369
|
+
timeoutMs?: number;
|
|
60370
|
+
toolId: string;
|
|
60371
|
+
/** @enum {string} */
|
|
60372
|
+
type: "tool";
|
|
60373
|
+
})[];
|
|
60374
|
+
};
|
|
60211
60375
|
/** @enum {string} */
|
|
60212
60376
|
piiRedaction?: "default" | "off" | "redact";
|
|
60213
60377
|
presencePenalty?: number;
|
|
@@ -61046,6 +61210,35 @@ interface components {
|
|
|
61046
61210
|
profileTemplate?: string;
|
|
61047
61211
|
};
|
|
61048
61212
|
model?: string;
|
|
61213
|
+
output?: {
|
|
61214
|
+
validators?: ({
|
|
61215
|
+
maxBounces?: number;
|
|
61216
|
+
schema?: {
|
|
61217
|
+
[key: string]: unknown;
|
|
61218
|
+
};
|
|
61219
|
+
/** @enum {string} */
|
|
61220
|
+
type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
|
|
61221
|
+
} | {
|
|
61222
|
+
maxBounces?: number;
|
|
61223
|
+
name: string;
|
|
61224
|
+
timeoutMs?: number;
|
|
61225
|
+
/** @enum {string} */
|
|
61226
|
+
type: "custom";
|
|
61227
|
+
} | {
|
|
61228
|
+
flowId: string;
|
|
61229
|
+
maxBounces?: number;
|
|
61230
|
+
outputVariable?: string;
|
|
61231
|
+
timeoutMs?: number;
|
|
61232
|
+
/** @enum {string} */
|
|
61233
|
+
type: "flow";
|
|
61234
|
+
} | {
|
|
61235
|
+
maxBounces?: number;
|
|
61236
|
+
timeoutMs?: number;
|
|
61237
|
+
toolId: string;
|
|
61238
|
+
/** @enum {string} */
|
|
61239
|
+
type: "tool";
|
|
61240
|
+
})[];
|
|
61241
|
+
};
|
|
61049
61242
|
/** @enum {string} */
|
|
61050
61243
|
piiRedaction?: "default" | "off" | "redact";
|
|
61051
61244
|
presencePenalty?: number;
|
|
@@ -62249,6 +62442,12 @@ interface components {
|
|
|
62249
62442
|
* @enum {string}
|
|
62250
62443
|
*/
|
|
62251
62444
|
outcome?: "completed" | "error" | "aborted";
|
|
62445
|
+
output?: {
|
|
62446
|
+
validation?: {
|
|
62447
|
+
errored?: string[];
|
|
62448
|
+
failed?: string[];
|
|
62449
|
+
};
|
|
62450
|
+
};
|
|
62252
62451
|
seq: number;
|
|
62253
62452
|
stepErrorCount?: number;
|
|
62254
62453
|
stopReason?: string;
|
|
@@ -62722,6 +62921,7 @@ interface components {
|
|
|
62722
62921
|
/** @enum {string} */
|
|
62723
62922
|
type: "tool_output_delta";
|
|
62724
62923
|
} | {
|
|
62924
|
+
completedAt?: string;
|
|
62725
62925
|
error?: string;
|
|
62726
62926
|
executionId: string;
|
|
62727
62927
|
executionTime?: number;
|
|
@@ -76179,6 +76379,31 @@ interface AgentDefinitionConfig {
|
|
|
76179
76379
|
toolArgument: string;
|
|
76180
76380
|
}>;
|
|
76181
76381
|
};
|
|
76382
|
+
/** Settlement validators the loop runs before it settles; a failing one re-prompts up to `maxBounces` times. */
|
|
76383
|
+
output?: {
|
|
76384
|
+
validators?: Array<{
|
|
76385
|
+
type: 'candidate-question' | 'requested-json' | 'no-action' | 'json-schema';
|
|
76386
|
+
maxBounces?: number;
|
|
76387
|
+
/** Required on a `json-schema` validator, rejected on the others. */
|
|
76388
|
+
schema?: Record<string, unknown>;
|
|
76389
|
+
} | {
|
|
76390
|
+
type: 'custom';
|
|
76391
|
+
name: string;
|
|
76392
|
+
maxBounces?: number;
|
|
76393
|
+
timeoutMs?: number;
|
|
76394
|
+
} | {
|
|
76395
|
+
type: 'flow';
|
|
76396
|
+
flowId: string;
|
|
76397
|
+
outputVariable?: string;
|
|
76398
|
+
maxBounces?: number;
|
|
76399
|
+
timeoutMs?: number;
|
|
76400
|
+
} | {
|
|
76401
|
+
type: 'tool';
|
|
76402
|
+
toolId: string;
|
|
76403
|
+
maxBounces?: number;
|
|
76404
|
+
timeoutMs?: number;
|
|
76405
|
+
}>;
|
|
76406
|
+
};
|
|
76182
76407
|
}
|
|
76183
76408
|
/**
|
|
76184
76409
|
* `defineAgent` input — the flat authoring shape: identity + presentation
|
package/dist/index.mjs
CHANGED
|
@@ -11990,25 +11990,28 @@ const AGENT_CONFIG_KEYS = [
|
|
|
11990
11990
|
"tenancyStrategy",
|
|
11991
11991
|
"durability",
|
|
11992
11992
|
"busyMessageRouting",
|
|
11993
|
-
"state"
|
|
11993
|
+
"state",
|
|
11994
|
+
"output"
|
|
11994
11995
|
];
|
|
11995
11996
|
const AGENT_CONFIG_KEY_LIST = [...AGENT_CONFIG_KEYS].sort();
|
|
11996
11997
|
function isPlainObject(value) {
|
|
11997
11998
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
11998
11999
|
}
|
|
11999
|
-
function normalizeValue(value) {
|
|
12000
|
-
if (Array.isArray(value)) return value.map((item) => normalizeValue(item));
|
|
12000
|
+
function normalizeValue(value, keepNulls = false) {
|
|
12001
|
+
if (Array.isArray(value)) return value.map((item) => normalizeValue(item, keepNulls));
|
|
12001
12002
|
if (isPlainObject(value)) {
|
|
12002
12003
|
const normalized = {};
|
|
12003
12004
|
for (const key of Object.keys(value).sort()) {
|
|
12004
12005
|
const entry = value[key];
|
|
12005
|
-
if (entry === void 0 || entry === null) continue;
|
|
12006
|
-
normalized[key] = normalizeValue(entry);
|
|
12006
|
+
if (entry === void 0 || entry === null && !keepNulls) continue;
|
|
12007
|
+
normalized[key] = normalizeValue(entry, keepNulls);
|
|
12007
12008
|
}
|
|
12008
12009
|
return normalized;
|
|
12009
12010
|
}
|
|
12010
12011
|
return value;
|
|
12011
12012
|
}
|
|
12013
|
+
/** Config keys whose nested nulls are literal values (a validator schema's `const: null`), not "unset". */
|
|
12014
|
+
const NULL_LITERAL_CONFIG_KEYS = /* @__PURE__ */ new Set(["output"]);
|
|
12012
12015
|
/** Canonical normalized form — must stay byte-identical to the shared impl. */
|
|
12013
12016
|
function normalizeAgentDefinition(definition) {
|
|
12014
12017
|
const config = {};
|
|
@@ -12016,7 +12019,7 @@ function normalizeAgentDefinition(definition) {
|
|
|
12016
12019
|
for (const key of AGENT_CONFIG_KEY_LIST) {
|
|
12017
12020
|
const value = rawConfig[key];
|
|
12018
12021
|
if (value === void 0 || value === null) continue;
|
|
12019
|
-
config[key] = normalizeValue(value);
|
|
12022
|
+
config[key] = normalizeValue(value, NULL_LITERAL_CONFIG_KEYS.has(key));
|
|
12020
12023
|
}
|
|
12021
12024
|
return {
|
|
12022
12025
|
name: definition.name,
|
|
@@ -14714,7 +14717,7 @@ function transformQueryParams(params) {
|
|
|
14714
14717
|
return result;
|
|
14715
14718
|
}
|
|
14716
14719
|
// src/version.ts
|
|
14717
|
-
const SDK_VERSION = "11.
|
|
14720
|
+
const SDK_VERSION = "11.13.0";
|
|
14718
14721
|
/**
|
|
14719
14722
|
* Canonical client identity the API uses for attribution
|
|
14720
14723
|
* (`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.13.0",
|
|
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.104.1",
|
|
28
28
|
"openapi-typescript": "^7.13.0",
|
|
29
29
|
"tsdown": "^0.23.2",
|
|
30
30
|
"typescript": "^6.0.3",
|