@runtypelabs/sdk 11.12.0 → 11.13.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 +6 -4
- package/dist/index.d.cts +179 -12
- package/dist/index.d.ts +179 -12
- package/dist/index.mjs +6 -4
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -13643,6 +13643,7 @@ let globalClient = null;
|
|
|
13643
13643
|
*/
|
|
13644
13644
|
var RuntypeClient$1 = class {
|
|
13645
13645
|
constructor(config = {}) {
|
|
13646
|
+
this.fetchRequest = config.fetch ?? ((url, init) => fetch(url, init));
|
|
13646
13647
|
const baseUrl = config.baseUrl || "https://api.runtype.com";
|
|
13647
13648
|
this.apiVersion = config.apiVersion || "v1";
|
|
13648
13649
|
this.baseUrl = this.apiVersion ? `${baseUrl}/${this.apiVersion}` : baseUrl;
|
|
@@ -13858,7 +13859,7 @@ var RuntypeClient$1 = class {
|
|
|
13858
13859
|
const timeoutId = setTimeout(() => controller.abort(), this.timeout);
|
|
13859
13860
|
const signal = combineAbortSignals(callerSignal, controller.signal) ?? controller.signal;
|
|
13860
13861
|
try {
|
|
13861
|
-
const response = await
|
|
13862
|
+
const response = await this.fetchRequest(url, {
|
|
13862
13863
|
...options,
|
|
13863
13864
|
signal
|
|
13864
13865
|
});
|
|
@@ -14718,7 +14719,7 @@ function transformQueryParams(params) {
|
|
|
14718
14719
|
return result;
|
|
14719
14720
|
}
|
|
14720
14721
|
// src/version.ts
|
|
14721
|
-
const SDK_VERSION = "11.
|
|
14722
|
+
const SDK_VERSION = "11.13.1";
|
|
14722
14723
|
/**
|
|
14723
14724
|
* Canonical client identity the API uses for attribution
|
|
14724
14725
|
* (`detectActorSource` in apps/api/src/lib/audit-log.ts keys `'sdk'` off the
|
|
@@ -14762,6 +14763,7 @@ var RuntypeClient = class {
|
|
|
14762
14763
|
return this.get("/extraction-models");
|
|
14763
14764
|
}
|
|
14764
14765
|
constructor(config = {}) {
|
|
14766
|
+
this.fetchRequest = config.fetch ?? ((url, init) => fetch(url, init));
|
|
14765
14767
|
const baseUrl = config.baseUrl || "https://api.runtype.com";
|
|
14766
14768
|
this.apiVersion = config.apiVersion || "v1";
|
|
14767
14769
|
this.baseUrl = this.apiVersion ? `${baseUrl}/${this.apiVersion}` : baseUrl;
|
|
@@ -15156,7 +15158,7 @@ var RuntypeClient = class {
|
|
|
15156
15158
|
const controller = timeoutMs === null ? null : new AbortController();
|
|
15157
15159
|
const timeoutId = controller && timeoutMs !== null ? setTimeout(() => controller.abort(), timeoutMs) : null;
|
|
15158
15160
|
try {
|
|
15159
|
-
const response = await
|
|
15161
|
+
const response = await this.fetchRequest(url, {
|
|
15160
15162
|
...options,
|
|
15161
15163
|
...controller ? { signal: controller.signal } : {}
|
|
15162
15164
|
});
|
|
@@ -15187,7 +15189,7 @@ var RuntypeClient = class {
|
|
|
15187
15189
|
else callerSignal.addEventListener("abort", () => controller.abort(callerSignal.reason), { once: true });
|
|
15188
15190
|
}
|
|
15189
15191
|
try {
|
|
15190
|
-
const response = await
|
|
15192
|
+
const response = await this.fetchRequest(url, {
|
|
15191
15193
|
...options,
|
|
15192
15194
|
...controller ? { signal: controller.signal } : {}
|
|
15193
15195
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -1020,14 +1020,33 @@ interface paths {
|
|
|
1020
1020
|
};
|
|
1021
1021
|
model?: string;
|
|
1022
1022
|
output?: {
|
|
1023
|
-
validators?: {
|
|
1023
|
+
validators?: ({
|
|
1024
1024
|
maxBounces?: number;
|
|
1025
1025
|
schema?: {
|
|
1026
1026
|
[key: string]: unknown;
|
|
1027
1027
|
};
|
|
1028
1028
|
/** @enum {string} */
|
|
1029
1029
|
type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
|
|
1030
|
-
}
|
|
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
|
+
})[];
|
|
1031
1050
|
};
|
|
1032
1051
|
/** @enum {string} */
|
|
1033
1052
|
piiRedaction?: "default" | "off" | "redact";
|
|
@@ -1586,14 +1605,33 @@ interface paths {
|
|
|
1586
1605
|
};
|
|
1587
1606
|
model?: string;
|
|
1588
1607
|
output?: {
|
|
1589
|
-
validators?: {
|
|
1608
|
+
validators?: ({
|
|
1590
1609
|
maxBounces?: number;
|
|
1591
1610
|
schema?: {
|
|
1592
1611
|
[key: string]: unknown;
|
|
1593
1612
|
};
|
|
1594
1613
|
/** @enum {string} */
|
|
1595
1614
|
type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
|
|
1596
|
-
}
|
|
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
|
+
})[];
|
|
1597
1635
|
};
|
|
1598
1636
|
/** @enum {string} */
|
|
1599
1637
|
piiRedaction?: "default" | "off" | "redact";
|
|
@@ -2442,14 +2480,33 @@ interface paths {
|
|
|
2442
2480
|
};
|
|
2443
2481
|
model?: string;
|
|
2444
2482
|
output?: {
|
|
2445
|
-
validators?: {
|
|
2483
|
+
validators?: ({
|
|
2446
2484
|
maxBounces?: number;
|
|
2447
2485
|
schema?: {
|
|
2448
2486
|
[key: string]: unknown;
|
|
2449
2487
|
};
|
|
2450
2488
|
/** @enum {string} */
|
|
2451
2489
|
type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
|
|
2452
|
-
}
|
|
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
|
+
})[];
|
|
2453
2510
|
};
|
|
2454
2511
|
/** @enum {string} */
|
|
2455
2512
|
piiRedaction?: "default" | "off" | "redact";
|
|
@@ -14017,6 +14074,13 @@ interface paths {
|
|
|
14017
14074
|
/** @enum {string} */
|
|
14018
14075
|
status: "queued" | "running" | "input_required" | "completed" | "failed" | "cancelled";
|
|
14019
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;
|
|
14020
14084
|
toolCallCount: number;
|
|
14021
14085
|
totalCost: number | null;
|
|
14022
14086
|
touchedEntities: {
|
|
@@ -14106,6 +14170,11 @@ interface paths {
|
|
|
14106
14170
|
* @enum {string}
|
|
14107
14171
|
*/
|
|
14108
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";
|
|
14109
14178
|
waitSeconds?: number;
|
|
14110
14179
|
};
|
|
14111
14180
|
};
|
|
@@ -14158,6 +14227,13 @@ interface paths {
|
|
|
14158
14227
|
/** @enum {string} */
|
|
14159
14228
|
status: "queued" | "running" | "input_required" | "completed" | "failed" | "cancelled";
|
|
14160
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;
|
|
14161
14237
|
toolCallCount: number;
|
|
14162
14238
|
totalCost: number | null;
|
|
14163
14239
|
touchedEntities: {
|
|
@@ -14219,6 +14295,13 @@ interface paths {
|
|
|
14219
14295
|
/** @enum {string} */
|
|
14220
14296
|
status: "queued" | "running" | "input_required" | "completed" | "failed" | "cancelled";
|
|
14221
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;
|
|
14222
14305
|
toolCallCount: number;
|
|
14223
14306
|
totalCost: number | null;
|
|
14224
14307
|
touchedEntities: {
|
|
@@ -14465,6 +14548,13 @@ interface paths {
|
|
|
14465
14548
|
/** @enum {string} */
|
|
14466
14549
|
status: "queued" | "running" | "input_required" | "completed" | "failed" | "cancelled";
|
|
14467
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;
|
|
14468
14558
|
toolCallCount: number;
|
|
14469
14559
|
totalCost: number | null;
|
|
14470
14560
|
touchedEntities: {
|
|
@@ -14599,6 +14689,13 @@ interface paths {
|
|
|
14599
14689
|
/** @enum {string} */
|
|
14600
14690
|
status: "queued" | "running" | "input_required" | "completed" | "failed" | "cancelled";
|
|
14601
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;
|
|
14602
14699
|
toolCallCount: number;
|
|
14603
14700
|
totalCost: number | null;
|
|
14604
14701
|
touchedEntities: {
|
|
@@ -14839,6 +14936,13 @@ interface paths {
|
|
|
14839
14936
|
/** @enum {string} */
|
|
14840
14937
|
status: "queued" | "running" | "input_required" | "completed" | "failed" | "cancelled";
|
|
14841
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;
|
|
14842
14946
|
toolCallCount: number;
|
|
14843
14947
|
totalCost: number | null;
|
|
14844
14948
|
touchedEntities: {
|
|
@@ -14881,7 +14985,7 @@ interface paths {
|
|
|
14881
14985
|
"application/json": components["schemas"]["Error"];
|
|
14882
14986
|
};
|
|
14883
14987
|
};
|
|
14884
|
-
/** @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`) */
|
|
14885
14989
|
409: {
|
|
14886
14990
|
headers: {
|
|
14887
14991
|
[name: string]: unknown;
|
|
@@ -59399,6 +59503,7 @@ interface paths {
|
|
|
59399
59503
|
enableChromeSurface: boolean;
|
|
59400
59504
|
enableDashboardAssistant: boolean;
|
|
59401
59505
|
enableDecisionModelsDashboard: boolean;
|
|
59506
|
+
enableDelegateToOtto?: boolean;
|
|
59402
59507
|
enableDelegateToRuntype?: boolean;
|
|
59403
59508
|
enableEndUserUsageAnalytics: boolean;
|
|
59404
59509
|
enableMassiveWebRender: boolean;
|
|
@@ -60239,14 +60344,33 @@ interface components {
|
|
|
60239
60344
|
};
|
|
60240
60345
|
model?: string;
|
|
60241
60346
|
output?: {
|
|
60242
|
-
validators?: {
|
|
60347
|
+
validators?: ({
|
|
60243
60348
|
maxBounces?: number;
|
|
60244
60349
|
schema?: {
|
|
60245
60350
|
[key: string]: unknown;
|
|
60246
60351
|
};
|
|
60247
60352
|
/** @enum {string} */
|
|
60248
60353
|
type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
|
|
60249
|
-
}
|
|
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
|
+
})[];
|
|
60250
60374
|
};
|
|
60251
60375
|
/** @enum {string} */
|
|
60252
60376
|
piiRedaction?: "default" | "off" | "redact";
|
|
@@ -61087,14 +61211,33 @@ interface components {
|
|
|
61087
61211
|
};
|
|
61088
61212
|
model?: string;
|
|
61089
61213
|
output?: {
|
|
61090
|
-
validators?: {
|
|
61214
|
+
validators?: ({
|
|
61091
61215
|
maxBounces?: number;
|
|
61092
61216
|
schema?: {
|
|
61093
61217
|
[key: string]: unknown;
|
|
61094
61218
|
};
|
|
61095
61219
|
/** @enum {string} */
|
|
61096
61220
|
type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
|
|
61097
|
-
}
|
|
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
|
+
})[];
|
|
61098
61241
|
};
|
|
61099
61242
|
/** @enum {string} */
|
|
61100
61243
|
piiRedaction?: "default" | "off" | "redact";
|
|
@@ -62301,7 +62444,8 @@ interface components {
|
|
|
62301
62444
|
outcome?: "completed" | "error" | "aborted";
|
|
62302
62445
|
output?: {
|
|
62303
62446
|
validation?: {
|
|
62304
|
-
|
|
62447
|
+
errored?: string[];
|
|
62448
|
+
failed?: string[];
|
|
62305
62449
|
};
|
|
62306
62450
|
};
|
|
62307
62451
|
seq: number;
|
|
@@ -62777,6 +62921,7 @@ interface components {
|
|
|
62777
62921
|
/** @enum {string} */
|
|
62778
62922
|
type: "tool_output_delta";
|
|
62779
62923
|
} | {
|
|
62924
|
+
completedAt?: string;
|
|
62780
62925
|
error?: string;
|
|
62781
62926
|
executionId: string;
|
|
62782
62927
|
executionTime?: number;
|
|
@@ -67625,6 +67770,8 @@ export interface ClientConfig {
|
|
|
67625
67770
|
apiVersion?: string;
|
|
67626
67771
|
timeout?: number | null;
|
|
67627
67772
|
headers?: Record<string, string>;
|
|
67773
|
+
/** Optional HTTP transport, for hosts that enforce routing or credential boundaries. */
|
|
67774
|
+
fetch?: (url: string, init?: RequestInit) => Promise<Response>;
|
|
67628
67775
|
}
|
|
67629
67776
|
export interface PaginationResponse<T> {
|
|
67630
67777
|
data: T[];
|
|
@@ -76241,6 +76388,22 @@ interface AgentDefinitionConfig {
|
|
|
76241
76388
|
maxBounces?: number;
|
|
76242
76389
|
/** Required on a `json-schema` validator, rejected on the others. */
|
|
76243
76390
|
schema?: Record<string, unknown>;
|
|
76391
|
+
} | {
|
|
76392
|
+
type: 'custom';
|
|
76393
|
+
name: string;
|
|
76394
|
+
maxBounces?: number;
|
|
76395
|
+
timeoutMs?: number;
|
|
76396
|
+
} | {
|
|
76397
|
+
type: 'flow';
|
|
76398
|
+
flowId: string;
|
|
76399
|
+
outputVariable?: string;
|
|
76400
|
+
maxBounces?: number;
|
|
76401
|
+
timeoutMs?: number;
|
|
76402
|
+
} | {
|
|
76403
|
+
type: 'tool';
|
|
76404
|
+
toolId: string;
|
|
76405
|
+
maxBounces?: number;
|
|
76406
|
+
timeoutMs?: number;
|
|
76244
76407
|
}>;
|
|
76245
76408
|
};
|
|
76246
76409
|
}
|
|
@@ -77722,6 +77885,8 @@ interface RuntypeConfig {
|
|
|
77722
77885
|
timeout?: number;
|
|
77723
77886
|
/** Additional headers to include in requests */
|
|
77724
77887
|
headers?: Record<string, string>;
|
|
77888
|
+
/** Optional HTTP transport for host-controlled routing and credential boundaries. */
|
|
77889
|
+
fetch?: (url: string, init?: RequestInit) => Promise<Response>;
|
|
77725
77890
|
}
|
|
77726
77891
|
/**
|
|
77727
77892
|
* Internal client implementation that handles HTTP requests
|
|
@@ -77731,6 +77896,7 @@ declare class RuntypeClient$1 {
|
|
|
77731
77896
|
private apiVersion;
|
|
77732
77897
|
private timeout;
|
|
77733
77898
|
private headers;
|
|
77899
|
+
private fetchRequest;
|
|
77734
77900
|
constructor(config?: RuntypeConfig);
|
|
77735
77901
|
/**
|
|
77736
77902
|
* Set the API key for authentication
|
|
@@ -78989,6 +79155,7 @@ export declare class RuntypeClient implements ApiClient {
|
|
|
78989
79155
|
private apiVersion;
|
|
78990
79156
|
private timeout;
|
|
78991
79157
|
private headers;
|
|
79158
|
+
private fetchRequest;
|
|
78992
79159
|
sandboxDeployments: SandboxDeploymentsNamespace;
|
|
78993
79160
|
signals: SignalsNamespace;
|
|
78994
79161
|
flows: FlowsEndpoint;
|
package/dist/index.d.ts
CHANGED
|
@@ -1020,14 +1020,33 @@ interface paths {
|
|
|
1020
1020
|
};
|
|
1021
1021
|
model?: string;
|
|
1022
1022
|
output?: {
|
|
1023
|
-
validators?: {
|
|
1023
|
+
validators?: ({
|
|
1024
1024
|
maxBounces?: number;
|
|
1025
1025
|
schema?: {
|
|
1026
1026
|
[key: string]: unknown;
|
|
1027
1027
|
};
|
|
1028
1028
|
/** @enum {string} */
|
|
1029
1029
|
type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
|
|
1030
|
-
}
|
|
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
|
+
})[];
|
|
1031
1050
|
};
|
|
1032
1051
|
/** @enum {string} */
|
|
1033
1052
|
piiRedaction?: "default" | "off" | "redact";
|
|
@@ -1586,14 +1605,33 @@ interface paths {
|
|
|
1586
1605
|
};
|
|
1587
1606
|
model?: string;
|
|
1588
1607
|
output?: {
|
|
1589
|
-
validators?: {
|
|
1608
|
+
validators?: ({
|
|
1590
1609
|
maxBounces?: number;
|
|
1591
1610
|
schema?: {
|
|
1592
1611
|
[key: string]: unknown;
|
|
1593
1612
|
};
|
|
1594
1613
|
/** @enum {string} */
|
|
1595
1614
|
type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
|
|
1596
|
-
}
|
|
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
|
+
})[];
|
|
1597
1635
|
};
|
|
1598
1636
|
/** @enum {string} */
|
|
1599
1637
|
piiRedaction?: "default" | "off" | "redact";
|
|
@@ -2442,14 +2480,33 @@ interface paths {
|
|
|
2442
2480
|
};
|
|
2443
2481
|
model?: string;
|
|
2444
2482
|
output?: {
|
|
2445
|
-
validators?: {
|
|
2483
|
+
validators?: ({
|
|
2446
2484
|
maxBounces?: number;
|
|
2447
2485
|
schema?: {
|
|
2448
2486
|
[key: string]: unknown;
|
|
2449
2487
|
};
|
|
2450
2488
|
/** @enum {string} */
|
|
2451
2489
|
type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
|
|
2452
|
-
}
|
|
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
|
+
})[];
|
|
2453
2510
|
};
|
|
2454
2511
|
/** @enum {string} */
|
|
2455
2512
|
piiRedaction?: "default" | "off" | "redact";
|
|
@@ -14017,6 +14074,13 @@ interface paths {
|
|
|
14017
14074
|
/** @enum {string} */
|
|
14018
14075
|
status: "queued" | "running" | "input_required" | "completed" | "failed" | "cancelled";
|
|
14019
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;
|
|
14020
14084
|
toolCallCount: number;
|
|
14021
14085
|
totalCost: number | null;
|
|
14022
14086
|
touchedEntities: {
|
|
@@ -14106,6 +14170,11 @@ interface paths {
|
|
|
14106
14170
|
* @enum {string}
|
|
14107
14171
|
*/
|
|
14108
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";
|
|
14109
14178
|
waitSeconds?: number;
|
|
14110
14179
|
};
|
|
14111
14180
|
};
|
|
@@ -14158,6 +14227,13 @@ interface paths {
|
|
|
14158
14227
|
/** @enum {string} */
|
|
14159
14228
|
status: "queued" | "running" | "input_required" | "completed" | "failed" | "cancelled";
|
|
14160
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;
|
|
14161
14237
|
toolCallCount: number;
|
|
14162
14238
|
totalCost: number | null;
|
|
14163
14239
|
touchedEntities: {
|
|
@@ -14219,6 +14295,13 @@ interface paths {
|
|
|
14219
14295
|
/** @enum {string} */
|
|
14220
14296
|
status: "queued" | "running" | "input_required" | "completed" | "failed" | "cancelled";
|
|
14221
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;
|
|
14222
14305
|
toolCallCount: number;
|
|
14223
14306
|
totalCost: number | null;
|
|
14224
14307
|
touchedEntities: {
|
|
@@ -14465,6 +14548,13 @@ interface paths {
|
|
|
14465
14548
|
/** @enum {string} */
|
|
14466
14549
|
status: "queued" | "running" | "input_required" | "completed" | "failed" | "cancelled";
|
|
14467
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;
|
|
14468
14558
|
toolCallCount: number;
|
|
14469
14559
|
totalCost: number | null;
|
|
14470
14560
|
touchedEntities: {
|
|
@@ -14599,6 +14689,13 @@ interface paths {
|
|
|
14599
14689
|
/** @enum {string} */
|
|
14600
14690
|
status: "queued" | "running" | "input_required" | "completed" | "failed" | "cancelled";
|
|
14601
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;
|
|
14602
14699
|
toolCallCount: number;
|
|
14603
14700
|
totalCost: number | null;
|
|
14604
14701
|
touchedEntities: {
|
|
@@ -14839,6 +14936,13 @@ interface paths {
|
|
|
14839
14936
|
/** @enum {string} */
|
|
14840
14937
|
status: "queued" | "running" | "input_required" | "completed" | "failed" | "cancelled";
|
|
14841
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;
|
|
14842
14946
|
toolCallCount: number;
|
|
14843
14947
|
totalCost: number | null;
|
|
14844
14948
|
touchedEntities: {
|
|
@@ -14881,7 +14985,7 @@ interface paths {
|
|
|
14881
14985
|
"application/json": components["schemas"]["Error"];
|
|
14882
14986
|
};
|
|
14883
14987
|
};
|
|
14884
|
-
/** @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`) */
|
|
14885
14989
|
409: {
|
|
14886
14990
|
headers: {
|
|
14887
14991
|
[name: string]: unknown;
|
|
@@ -59399,6 +59503,7 @@ interface paths {
|
|
|
59399
59503
|
enableChromeSurface: boolean;
|
|
59400
59504
|
enableDashboardAssistant: boolean;
|
|
59401
59505
|
enableDecisionModelsDashboard: boolean;
|
|
59506
|
+
enableDelegateToOtto?: boolean;
|
|
59402
59507
|
enableDelegateToRuntype?: boolean;
|
|
59403
59508
|
enableEndUserUsageAnalytics: boolean;
|
|
59404
59509
|
enableMassiveWebRender: boolean;
|
|
@@ -60239,14 +60344,33 @@ interface components {
|
|
|
60239
60344
|
};
|
|
60240
60345
|
model?: string;
|
|
60241
60346
|
output?: {
|
|
60242
|
-
validators?: {
|
|
60347
|
+
validators?: ({
|
|
60243
60348
|
maxBounces?: number;
|
|
60244
60349
|
schema?: {
|
|
60245
60350
|
[key: string]: unknown;
|
|
60246
60351
|
};
|
|
60247
60352
|
/** @enum {string} */
|
|
60248
60353
|
type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
|
|
60249
|
-
}
|
|
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
|
+
})[];
|
|
60250
60374
|
};
|
|
60251
60375
|
/** @enum {string} */
|
|
60252
60376
|
piiRedaction?: "default" | "off" | "redact";
|
|
@@ -61087,14 +61211,33 @@ interface components {
|
|
|
61087
61211
|
};
|
|
61088
61212
|
model?: string;
|
|
61089
61213
|
output?: {
|
|
61090
|
-
validators?: {
|
|
61214
|
+
validators?: ({
|
|
61091
61215
|
maxBounces?: number;
|
|
61092
61216
|
schema?: {
|
|
61093
61217
|
[key: string]: unknown;
|
|
61094
61218
|
};
|
|
61095
61219
|
/** @enum {string} */
|
|
61096
61220
|
type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
|
|
61097
|
-
}
|
|
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
|
+
})[];
|
|
61098
61241
|
};
|
|
61099
61242
|
/** @enum {string} */
|
|
61100
61243
|
piiRedaction?: "default" | "off" | "redact";
|
|
@@ -62301,7 +62444,8 @@ interface components {
|
|
|
62301
62444
|
outcome?: "completed" | "error" | "aborted";
|
|
62302
62445
|
output?: {
|
|
62303
62446
|
validation?: {
|
|
62304
|
-
|
|
62447
|
+
errored?: string[];
|
|
62448
|
+
failed?: string[];
|
|
62305
62449
|
};
|
|
62306
62450
|
};
|
|
62307
62451
|
seq: number;
|
|
@@ -62777,6 +62921,7 @@ interface components {
|
|
|
62777
62921
|
/** @enum {string} */
|
|
62778
62922
|
type: "tool_output_delta";
|
|
62779
62923
|
} | {
|
|
62924
|
+
completedAt?: string;
|
|
62780
62925
|
error?: string;
|
|
62781
62926
|
executionId: string;
|
|
62782
62927
|
executionTime?: number;
|
|
@@ -67625,6 +67770,8 @@ export interface ClientConfig {
|
|
|
67625
67770
|
apiVersion?: string;
|
|
67626
67771
|
timeout?: number | null;
|
|
67627
67772
|
headers?: Record<string, string>;
|
|
67773
|
+
/** Optional HTTP transport, for hosts that enforce routing or credential boundaries. */
|
|
67774
|
+
fetch?: (url: string, init?: RequestInit) => Promise<Response>;
|
|
67628
67775
|
}
|
|
67629
67776
|
export interface PaginationResponse<T> {
|
|
67630
67777
|
data: T[];
|
|
@@ -76241,6 +76388,22 @@ interface AgentDefinitionConfig {
|
|
|
76241
76388
|
maxBounces?: number;
|
|
76242
76389
|
/** Required on a `json-schema` validator, rejected on the others. */
|
|
76243
76390
|
schema?: Record<string, unknown>;
|
|
76391
|
+
} | {
|
|
76392
|
+
type: 'custom';
|
|
76393
|
+
name: string;
|
|
76394
|
+
maxBounces?: number;
|
|
76395
|
+
timeoutMs?: number;
|
|
76396
|
+
} | {
|
|
76397
|
+
type: 'flow';
|
|
76398
|
+
flowId: string;
|
|
76399
|
+
outputVariable?: string;
|
|
76400
|
+
maxBounces?: number;
|
|
76401
|
+
timeoutMs?: number;
|
|
76402
|
+
} | {
|
|
76403
|
+
type: 'tool';
|
|
76404
|
+
toolId: string;
|
|
76405
|
+
maxBounces?: number;
|
|
76406
|
+
timeoutMs?: number;
|
|
76244
76407
|
}>;
|
|
76245
76408
|
};
|
|
76246
76409
|
}
|
|
@@ -77722,6 +77885,8 @@ interface RuntypeConfig {
|
|
|
77722
77885
|
timeout?: number;
|
|
77723
77886
|
/** Additional headers to include in requests */
|
|
77724
77887
|
headers?: Record<string, string>;
|
|
77888
|
+
/** Optional HTTP transport for host-controlled routing and credential boundaries. */
|
|
77889
|
+
fetch?: (url: string, init?: RequestInit) => Promise<Response>;
|
|
77725
77890
|
}
|
|
77726
77891
|
/**
|
|
77727
77892
|
* Internal client implementation that handles HTTP requests
|
|
@@ -77731,6 +77896,7 @@ declare class RuntypeClient$1 {
|
|
|
77731
77896
|
private apiVersion;
|
|
77732
77897
|
private timeout;
|
|
77733
77898
|
private headers;
|
|
77899
|
+
private fetchRequest;
|
|
77734
77900
|
constructor(config?: RuntypeConfig);
|
|
77735
77901
|
/**
|
|
77736
77902
|
* Set the API key for authentication
|
|
@@ -78989,6 +79155,7 @@ export declare class RuntypeClient implements ApiClient {
|
|
|
78989
79155
|
private apiVersion;
|
|
78990
79156
|
private timeout;
|
|
78991
79157
|
private headers;
|
|
79158
|
+
private fetchRequest;
|
|
78992
79159
|
sandboxDeployments: SandboxDeploymentsNamespace;
|
|
78993
79160
|
signals: SignalsNamespace;
|
|
78994
79161
|
flows: FlowsEndpoint;
|
package/dist/index.mjs
CHANGED
|
@@ -13642,6 +13642,7 @@ let globalClient = null;
|
|
|
13642
13642
|
*/
|
|
13643
13643
|
var RuntypeClient$1 = class {
|
|
13644
13644
|
constructor(config = {}) {
|
|
13645
|
+
this.fetchRequest = config.fetch ?? ((url, init) => fetch(url, init));
|
|
13645
13646
|
const baseUrl = config.baseUrl || "https://api.runtype.com";
|
|
13646
13647
|
this.apiVersion = config.apiVersion || "v1";
|
|
13647
13648
|
this.baseUrl = this.apiVersion ? `${baseUrl}/${this.apiVersion}` : baseUrl;
|
|
@@ -13857,7 +13858,7 @@ var RuntypeClient$1 = class {
|
|
|
13857
13858
|
const timeoutId = setTimeout(() => controller.abort(), this.timeout);
|
|
13858
13859
|
const signal = combineAbortSignals(callerSignal, controller.signal) ?? controller.signal;
|
|
13859
13860
|
try {
|
|
13860
|
-
const response = await
|
|
13861
|
+
const response = await this.fetchRequest(url, {
|
|
13861
13862
|
...options,
|
|
13862
13863
|
signal
|
|
13863
13864
|
});
|
|
@@ -14717,7 +14718,7 @@ function transformQueryParams(params) {
|
|
|
14717
14718
|
return result;
|
|
14718
14719
|
}
|
|
14719
14720
|
// src/version.ts
|
|
14720
|
-
const SDK_VERSION = "11.
|
|
14721
|
+
const SDK_VERSION = "11.13.1";
|
|
14721
14722
|
/**
|
|
14722
14723
|
* Canonical client identity the API uses for attribution
|
|
14723
14724
|
* (`detectActorSource` in apps/api/src/lib/audit-log.ts keys `'sdk'` off the
|
|
@@ -14761,6 +14762,7 @@ var RuntypeClient = class {
|
|
|
14761
14762
|
return this.get("/extraction-models");
|
|
14762
14763
|
}
|
|
14763
14764
|
constructor(config = {}) {
|
|
14765
|
+
this.fetchRequest = config.fetch ?? ((url, init) => fetch(url, init));
|
|
14764
14766
|
const baseUrl = config.baseUrl || "https://api.runtype.com";
|
|
14765
14767
|
this.apiVersion = config.apiVersion || "v1";
|
|
14766
14768
|
this.baseUrl = this.apiVersion ? `${baseUrl}/${this.apiVersion}` : baseUrl;
|
|
@@ -15155,7 +15157,7 @@ var RuntypeClient = class {
|
|
|
15155
15157
|
const controller = timeoutMs === null ? null : new AbortController();
|
|
15156
15158
|
const timeoutId = controller && timeoutMs !== null ? setTimeout(() => controller.abort(), timeoutMs) : null;
|
|
15157
15159
|
try {
|
|
15158
|
-
const response = await
|
|
15160
|
+
const response = await this.fetchRequest(url, {
|
|
15159
15161
|
...options,
|
|
15160
15162
|
...controller ? { signal: controller.signal } : {}
|
|
15161
15163
|
});
|
|
@@ -15186,7 +15188,7 @@ var RuntypeClient = class {
|
|
|
15186
15188
|
else callerSignal.addEventListener("abort", () => controller.abort(callerSignal.reason), { once: true });
|
|
15187
15189
|
}
|
|
15188
15190
|
try {
|
|
15189
|
-
const response = await
|
|
15191
|
+
const response = await this.fetchRequest(url, {
|
|
15190
15192
|
...options,
|
|
15191
15193
|
...controller ? { signal: controller.signal } : {}
|
|
15192
15194
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runtypelabs/sdk",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.13.1",
|
|
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.3",
|
|
28
28
|
"openapi-typescript": "^7.13.0",
|
|
29
29
|
"tsdown": "^0.23.2",
|
|
30
30
|
"typescript": "^6.0.3",
|