@runtypelabs/sdk 10.1.4 → 10.2.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 +1 -1
- package/dist/index.d.cts +66 -25
- package/dist/index.d.ts +66 -25
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -14149,7 +14149,7 @@ function transformQueryParams(params) {
|
|
|
14149
14149
|
|
|
14150
14150
|
// src/version.ts
|
|
14151
14151
|
var FALLBACK_VERSION = "0.0.0";
|
|
14152
|
-
var SDK_VERSION = "10.1
|
|
14152
|
+
var SDK_VERSION = "10.2.1".length > 0 ? "10.2.1" : FALLBACK_VERSION;
|
|
14153
14153
|
var RUNTYPE_CLIENT_KIND = "sdk";
|
|
14154
14154
|
var SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
|
|
14155
14155
|
|
package/dist/index.d.cts
CHANGED
|
@@ -8682,7 +8682,7 @@ interface paths {
|
|
|
8682
8682
|
};
|
|
8683
8683
|
};
|
|
8684
8684
|
};
|
|
8685
|
-
/** @description Forbidden. Either the client token is inactive or the origin is not allowed, or the tenancy lock-down refused the execution: the agent requires an end-user scope and no valid `identityProof` was supplied (`end_user_scope_required`), or this session's conversation record belongs to a different signed-in end user (`conversation_scope_mismatch`; start a new conversation). */
|
|
8685
|
+
/** @description Forbidden. Either the client token is inactive or the origin is not allowed, or the tenancy lock-down refused the execution: the agent requires an end-user scope and no valid `identityProof` was supplied (`end_user_scope_required`), or this session's conversation record belongs to a different signed-in end user (`conversation_scope_mismatch`; start a new conversation), or a Claude Managed target's conversation is not owned by the visitor making the request (`CLIENT_CONVERSATION_NOT_VISITOR_OWNED`; initialize with `durableRecovery: true` and send `X-Visitor-Token`). */
|
|
8686
8686
|
403: {
|
|
8687
8687
|
headers: {
|
|
8688
8688
|
[name: string]: unknown;
|
|
@@ -8700,7 +8700,7 @@ interface paths {
|
|
|
8700
8700
|
"application/json": components["schemas"]["Error"];
|
|
8701
8701
|
};
|
|
8702
8702
|
};
|
|
8703
|
-
/** @description Conflict. Either the client tools registry fingerprint was not found (`client_tools_resend_required`; resend the full `clientTools[]` with the fingerprint),
|
|
8703
|
+
/** @description Conflict. Either the client tools registry fingerprint was not found (`client_tools_resend_required`; resend the full `clientTools[]` with the fingerprint), this turn was superseded by a newer interrupting turn before it could start (`turn_superseded`), or a Claude Managed target was refused because the caller has not opted into durable turns (`CLAUDE_MANAGED_DURABLE_TURNS_REQUIRED`; `hint` names the exact opt-in) or the session carries no conversation record (`CLAUDE_MANAGED_CONVERSATION_REQUIRED`). A join refusal uses `JOIN_UNAVAILABLE`. */
|
|
8704
8704
|
409: {
|
|
8705
8705
|
headers: {
|
|
8706
8706
|
[name: string]: unknown;
|
|
@@ -8977,8 +8977,8 @@ interface paths {
|
|
|
8977
8977
|
get?: never;
|
|
8978
8978
|
put?: never;
|
|
8979
8979
|
/**
|
|
8980
|
-
* Stop a
|
|
8981
|
-
* @description Cancel the specified execution without starting a replacement.
|
|
8980
|
+
* Stop a durable client execution
|
|
8981
|
+
* @description Cancel the specified execution without starting a replacement. For a native agent, pending inputs become not applied; for a Claude Managed agent, the hosted session is interrupted and stays resumable. Requires the exact visitor and session bound to the conversation.
|
|
8982
8982
|
*/
|
|
8983
8983
|
post: {
|
|
8984
8984
|
parameters: {
|
|
@@ -9047,6 +9047,7 @@ interface paths {
|
|
|
9047
9047
|
"application/json": {
|
|
9048
9048
|
accepted: boolean;
|
|
9049
9049
|
executionId: string;
|
|
9050
|
+
reason?: string;
|
|
9050
9051
|
};
|
|
9051
9052
|
};
|
|
9052
9053
|
};
|
|
@@ -9736,7 +9737,7 @@ interface paths {
|
|
|
9736
9737
|
conversationRevision: string;
|
|
9737
9738
|
/** @description Returned when the request negotiates `durableRecovery`. Older servers omit it; clients must then keep ordinary streaming behavior. */
|
|
9738
9739
|
durableRecovery?: {
|
|
9739
|
-
/** @description Whether this initialized client-token session has the visitor credential and
|
|
9740
|
+
/** @description Whether this initialized client-token session has the visitor credential and the durable-turns opt-in needed to use the durable execution reconnect route. The opt-in is the chat surface `behavior.durableTurns.enabled` for a surface-bound token and `config.durableTurns.enabled` for a standalone token. Reporting only: individual turns still self-identify as durable through replay cursors. */
|
|
9740
9741
|
enabled: boolean;
|
|
9741
9742
|
/** @description Whether the native durable target supports non-interrupting user-message delivery. */
|
|
9742
9743
|
join?: boolean;
|
|
@@ -25156,7 +25157,7 @@ interface paths {
|
|
|
25156
25157
|
};
|
|
25157
25158
|
/**
|
|
25158
25159
|
* Query customer logs
|
|
25159
|
-
* @description Query persisted customer logs
|
|
25160
|
+
* @description Query persisted customer logs with filtering, pagination, and search. When `data.live` is present the page came from the span store: one entry is one execution seam, so sub-seam rows (step skips, sources, context notices, artifacts, state snapshots, custom events) are not listed, a start/complete pair is one row carrying a duration, runs still in progress appear once they finish, and `search` matches a span's message, name, operation, tool name or error class. Otherwise each entry is one event. Requests naming `audit` or `schedule`, and an audit-entitled unfiltered read, are always served from the event tier.
|
|
25160
25161
|
*/
|
|
25161
25162
|
get: {
|
|
25162
25163
|
parameters: {
|
|
@@ -25169,9 +25170,9 @@ interface paths {
|
|
|
25169
25170
|
startTime?: string;
|
|
25170
25171
|
/** @description Alias for to. Ignored when to is also given. */
|
|
25171
25172
|
endTime?: string;
|
|
25172
|
-
/** @description Comma-separated log levels (debug,info,warn,error) */
|
|
25173
|
+
/** @description Comma-separated log levels (debug,info,warn,error). An unknown value is rejected with 400. */
|
|
25173
25174
|
level?: string;
|
|
25174
|
-
/** @description Comma-separated categories */
|
|
25175
|
+
/** @description Comma-separated categories (execution,agent,tool,model,system,error,schedule,batch,audit). An unknown value is rejected with 400. */
|
|
25175
25176
|
category?: string;
|
|
25176
25177
|
/** @description Filter by flow ID */
|
|
25177
25178
|
flowId?: string;
|
|
@@ -25213,8 +25214,18 @@ interface paths {
|
|
|
25213
25214
|
entries: {
|
|
25214
25215
|
[key: string]: unknown;
|
|
25215
25216
|
}[];
|
|
25217
|
+
/** @description Present only when the page was served from the span store. Runs still in progress appear once they finish; the minutes above the cut-line come from the live tier when it answers in time. Absent otherwise. */
|
|
25218
|
+
live?: {
|
|
25219
|
+
/** @description Entries at or below this instant came from the span store; newer ones from the live tier. */
|
|
25220
|
+
cutline: string;
|
|
25221
|
+
/** @enum {string} */
|
|
25222
|
+
reason?: "hot_tier_failed" | "outside_window";
|
|
25223
|
+
served: boolean;
|
|
25224
|
+
};
|
|
25216
25225
|
pagination: {
|
|
25217
25226
|
cursor: string | null;
|
|
25227
|
+
/** @description True when the supplied cursor could not be honoured and the read restarted at page one. A paging client must stop rather than follow the fresh cursor. Absent otherwise. */
|
|
25228
|
+
cursorReset?: boolean;
|
|
25218
25229
|
hasMore: boolean;
|
|
25219
25230
|
};
|
|
25220
25231
|
};
|
|
@@ -25348,21 +25359,17 @@ interface paths {
|
|
|
25348
25359
|
};
|
|
25349
25360
|
/**
|
|
25350
25361
|
* Read one log entry in full
|
|
25351
|
-
* @description Returns a single log entry
|
|
25362
|
+
* @description Returns a single log entry, including the model-call transcript the paged list projection omits. Addressed by the span key: traceId, spanId and timestamp. Bounded to one span, so a detail read never costs a page.
|
|
25352
25363
|
*/
|
|
25353
25364
|
get: {
|
|
25354
25365
|
parameters: {
|
|
25355
25366
|
query: {
|
|
25356
|
-
/** @description
|
|
25357
|
-
executionId: string;
|
|
25358
|
-
/** @description The entry's exact timestamp (ISO 8601) */
|
|
25367
|
+
/** @description The span's exact started_at (ISO 8601) */
|
|
25359
25368
|
timestamp: string;
|
|
25360
|
-
/** @description
|
|
25361
|
-
|
|
25362
|
-
/** @description
|
|
25363
|
-
|
|
25364
|
-
/** @description Narrow to one tail event name */
|
|
25365
|
-
eventName?: string;
|
|
25369
|
+
/** @description Trace the span belongs to; a span id is unique only within its trace. */
|
|
25370
|
+
traceId: string;
|
|
25371
|
+
/** @description Span to read, from a list row’s otlpSpanId. */
|
|
25372
|
+
spanId: string;
|
|
25366
25373
|
};
|
|
25367
25374
|
header?: never;
|
|
25368
25375
|
path?: never;
|
|
@@ -25445,9 +25452,9 @@ interface paths {
|
|
|
25445
25452
|
startTime?: string;
|
|
25446
25453
|
/** @description Alias for to. Ignored when to is also given. */
|
|
25447
25454
|
endTime?: string;
|
|
25448
|
-
/** @description Comma-separated log levels (debug,info,warn,error) */
|
|
25455
|
+
/** @description Comma-separated log levels (debug,info,warn,error). An unknown value is rejected with 400. */
|
|
25449
25456
|
level?: string;
|
|
25450
|
-
/** @description Comma-separated categories */
|
|
25457
|
+
/** @description Comma-separated categories (execution,agent,tool,model,system,error,schedule,batch,audit). An unknown value is rejected with 400. */
|
|
25451
25458
|
category?: string;
|
|
25452
25459
|
/** @description Filter by flow ID */
|
|
25453
25460
|
flowId?: string;
|
|
@@ -30805,6 +30812,8 @@ interface paths {
|
|
|
30805
30812
|
budgetExhausted?: boolean | null;
|
|
30806
30813
|
/** @description Cancel request. Absent means the overlay did not answer, which is not false and not null. */
|
|
30807
30814
|
cancelRequestedAt?: string | null;
|
|
30815
|
+
/** @description How many runs name this one as their parent. The unscoped feed returns roots only, so this is the size of the fold underneath a row; read the children with parentExecutionId=<executionId>. It is populated on a resource-scoped page too, where nothing is folded, so a surface can still offer the same expansion. WHICH children are counted depends on the arm that served the row: the span store counts every child, agent and nested-flow alike, while the legacy control-plane fallback counts agent children only, so on that arm a parent whose only child is a nested flow reports 0. That is deliberate — the fallback arm cannot enumerate a nested-flow child either, so counting one would advertise a fold that opens on nothing. It counts only children the CALLER may read: a credential holding one execution family (AGENTS:READ or FLOWS:READ alone) counts the children of that family and no others, so a count never discloses a run the same credential could not list. NULL means the arm cannot count children at all, which is not zero. */
|
|
30816
|
+
childCount: number | null;
|
|
30808
30817
|
/**
|
|
30809
30818
|
* @description Storage completeness; null on a row the control-plane arm served.
|
|
30810
30819
|
* @enum {string|null}
|
|
@@ -30842,7 +30851,7 @@ interface paths {
|
|
|
30842
30851
|
/** @description Last heartbeat. Absent means the overlay did not answer, which is not false and not null. */
|
|
30843
30852
|
lastHeartbeatAt?: string | null;
|
|
30844
30853
|
/**
|
|
30845
|
-
* @description Where the run was dispatched from, taken from the caller's authenticated principal and never from a request field
|
|
30854
|
+
* @description Where the run was dispatched from, taken from the caller's authenticated principal and never from a request field. ANY entrance that resolves a principal stamps it: a Clerk session answers dashboard; a management API key answers api, which includes the Runtype MCP server's tools and Code Mode, since both reach dispatch with a management key; and Runtype's own internal caller answers internal, for example the hosted /v1/mcp proxy. A lane that resolves NO principal carries NULL BY DESIGN: schedule, webhook, messaging, A2A, an agent exposed AS an MCP surface, subagent, nested flow, a client-token product surface (an end user is none of the three origins) and an ingested OTLP run. So NULL says "no authenticated principal at this entrance" rather than "unknown caller". The one NULL that is not a statement about the lane is a row whose header predates the field or came from the backfill: it stamps nothing even for a run that did resolve a principal.
|
|
30846
30855
|
* @enum {string|null}
|
|
30847
30856
|
*/
|
|
30848
30857
|
origin: "dashboard" | "api" | "internal" | null;
|
|
@@ -40059,7 +40068,7 @@ interface paths {
|
|
|
40059
40068
|
};
|
|
40060
40069
|
/**
|
|
40061
40070
|
* List runs
|
|
40062
|
-
* @description Every agent and flow run in the span store, newest start first, including runs that write no control-plane row. Each row carries `origin` (dashboard | api | internal | null), read from the caller's authenticated principal, and `test` as its derived alias for `origin === "dashboard"`;
|
|
40071
|
+
* @description Every agent and flow run in the span store, newest start first, including runs that write no control-plane row. The UNSCOPED feed is ROOT runs only: a subagent or nested-flow run folds under its parent, `childCount` says how many are folded there, and `parentExecutionId=<id>` reads them. Pass `includeChildren=true` for the flat enumeration. Any resource-scoped filter (`agentId`, `flowId`, `conversationId`, `surfaceId`, `recordId`, `batchExecutionId`, `parentExecutionId`, `rootExecutionId`, `executionId`) is already an explicit selection and never folds, so an agent that only ever runs as a subagent still lists under `agentId`. Each row carries `origin` (dashboard | api | internal | null), read from the caller's authenticated principal, and `test` as its derived alias for `origin === "dashboard"`; any entrance that resolves a principal stamps origin, including the Runtype MCP server tools and Code Mode (`api`) and the hosted `/v1/mcp` proxy (`internal`). A lane with no principal answers null for both by design: schedule, webhook, messaging, A2A, an agent exposed as an MCP surface, subagent, nested flow, a client-token product surface, an ingested run, and any row whose header predates the field. `overlay=live` adds live control-plane fields; the overlay never adds, drops or reorders a row. Returns 404 with `code: "run_history_unavailable"` when neither plane can serve the page, which a client renders as "no run history here" rather than as a failed read.
|
|
40063
40072
|
*/
|
|
40064
40073
|
get: {
|
|
40065
40074
|
parameters: {
|
|
@@ -40082,6 +40091,8 @@ interface paths {
|
|
|
40082
40091
|
parentExecutionId?: string;
|
|
40083
40092
|
/** @description Runs in this execution tree. */
|
|
40084
40093
|
rootExecutionId?: string;
|
|
40094
|
+
/** @description true restores the flat enumeration on the UNSCOPED feed, in which a subagent run and a nested-flow run list beside their parent. The unscoped feed is roots only by default: a row whose parentExecutionId is set folds under its parent and is read with parentExecutionId=<executionId>. Any filter that scopes to a resource — agentId, flowId, conversationId, surfaceId, recordId, batchExecutionId, parentExecutionId, rootExecutionId or executionId — is already an explicit selection and never folds, so an agent that only ever runs as a subagent still lists under agentId. This parameter changes nothing on a scoped request. */
|
|
40095
|
+
includeChildren?: "true" | "false";
|
|
40085
40096
|
/** @description Read specific runs by id; at most 100 per request. */
|
|
40086
40097
|
executionId?: string | string[];
|
|
40087
40098
|
/** @description Filter by producing lane. */
|
|
@@ -50955,6 +50966,8 @@ interface components {
|
|
|
50955
50966
|
budgetExhausted?: boolean | null;
|
|
50956
50967
|
/** @description Cancel request. Absent means the overlay did not answer, which is not false and not null. */
|
|
50957
50968
|
cancelRequestedAt?: string | null;
|
|
50969
|
+
/** @description How many runs name this one as their parent. The unscoped feed returns roots only, so this is the size of the fold underneath a row; read the children with parentExecutionId=<executionId>. It is populated on a resource-scoped page too, where nothing is folded, so a surface can still offer the same expansion. WHICH children are counted depends on the arm that served the row: the span store counts every child, agent and nested-flow alike, while the legacy control-plane fallback counts agent children only, so on that arm a parent whose only child is a nested flow reports 0. That is deliberate — the fallback arm cannot enumerate a nested-flow child either, so counting one would advertise a fold that opens on nothing. It counts only children the CALLER may read: a credential holding one execution family (AGENTS:READ or FLOWS:READ alone) counts the children of that family and no others, so a count never discloses a run the same credential could not list. NULL means the arm cannot count children at all, which is not zero. */
|
|
50970
|
+
childCount: number | null;
|
|
50958
50971
|
/**
|
|
50959
50972
|
* @description Storage completeness; null on a row the control-plane arm served.
|
|
50960
50973
|
* @enum {string|null}
|
|
@@ -50992,7 +51005,7 @@ interface components {
|
|
|
50992
51005
|
/** @description Last heartbeat. Absent means the overlay did not answer, which is not false and not null. */
|
|
50993
51006
|
lastHeartbeatAt?: string | null;
|
|
50994
51007
|
/**
|
|
50995
|
-
* @description Where the run was dispatched from, taken from the caller's authenticated principal and never from a request field
|
|
51008
|
+
* @description Where the run was dispatched from, taken from the caller's authenticated principal and never from a request field. ANY entrance that resolves a principal stamps it: a Clerk session answers dashboard; a management API key answers api, which includes the Runtype MCP server's tools and Code Mode, since both reach dispatch with a management key; and Runtype's own internal caller answers internal, for example the hosted /v1/mcp proxy. A lane that resolves NO principal carries NULL BY DESIGN: schedule, webhook, messaging, A2A, an agent exposed AS an MCP surface, subagent, nested flow, a client-token product surface (an end user is none of the three origins) and an ingested OTLP run. So NULL says "no authenticated principal at this entrance" rather than "unknown caller". The one NULL that is not a statement about the lane is a row whose header predates the field or came from the backfill: it stamps nothing even for a run that did resolve a principal.
|
|
50996
51009
|
* @enum {string|null}
|
|
50997
51010
|
*/
|
|
50998
51011
|
origin: "dashboard" | "api" | "internal" | null;
|
|
@@ -57927,6 +57940,18 @@ interface RunListRow {
|
|
|
57927
57940
|
parentExecutionId: string | null;
|
|
57928
57941
|
parentToolCallId: string | null;
|
|
57929
57942
|
rootExecutionId: string | null;
|
|
57943
|
+
/**
|
|
57944
|
+
* How many runs name this one as their parent. The unscoped feed returns
|
|
57945
|
+
* roots only, so this is the size of the fold underneath a row; read the
|
|
57946
|
+
* children with `parentExecutionId`. It is populated on a resource-scoped
|
|
57947
|
+
* page too. The span store counts agent and nested-flow children alike; the
|
|
57948
|
+
* legacy control-plane fallback counts agent children only, so a
|
|
57949
|
+
* nested-flow-only parent reports 0 there — that arm cannot enumerate such a
|
|
57950
|
+
* child either. It counts only children the caller may read, so a
|
|
57951
|
+
* single-family credential never learns the other family's children exist.
|
|
57952
|
+
* NULL when the serving arm cannot count at all.
|
|
57953
|
+
*/
|
|
57954
|
+
childCount: number | null;
|
|
57930
57955
|
source: 'hosted' | 'ingested';
|
|
57931
57956
|
fidelityTier: string | null;
|
|
57932
57957
|
completeness: 'partial' | 'complete' | 'conflicted' | 'expired' | 'deleted' | null;
|
|
@@ -57938,8 +57963,9 @@ interface RunListRow {
|
|
|
57938
57963
|
selfReportedCost: string | null;
|
|
57939
57964
|
/**
|
|
57940
57965
|
* Where the run was dispatched from, taken from the caller's authenticated
|
|
57941
|
-
* principal and never from a request field.
|
|
57942
|
-
*
|
|
57966
|
+
* principal and never from a request field. Any entrance that resolves a
|
|
57967
|
+
* principal stamps it (MCP tools and Code Mode answer `api`, the hosted
|
|
57968
|
+
* `/v1/mcp` proxy `internal`); a lane with none carries NULL by design.
|
|
57943
57969
|
*/
|
|
57944
57970
|
origin: 'dashboard' | 'api' | 'internal' | null;
|
|
57945
57971
|
/**
|
|
@@ -57996,6 +58022,13 @@ interface RunListParams {
|
|
|
57996
58022
|
parentExecutionId?: string;
|
|
57997
58023
|
rootExecutionId?: string;
|
|
57998
58024
|
executionId?: string | string[];
|
|
58025
|
+
/**
|
|
58026
|
+
* `'true'` restores the flat enumeration on the unscoped feed, which is roots
|
|
58027
|
+
* only by default: a subagent or nested-flow run folds under its parent. Any
|
|
58028
|
+
* resource-scoped filter is already an explicit selection and never folds, so
|
|
58029
|
+
* this changes nothing there.
|
|
58030
|
+
*/
|
|
58031
|
+
includeChildren?: 'true' | 'false';
|
|
57999
58032
|
source?: 'hosted' | 'ingested';
|
|
58000
58033
|
/**
|
|
58001
58034
|
* `running`, `completed` or `failed` only. `queued`, `awaiting` and
|
|
@@ -59430,6 +59463,14 @@ interface ClientTokenConfig {
|
|
|
59430
59463
|
theme?: ClientWidgetTheme;
|
|
59431
59464
|
/** Custom data passed to flows */
|
|
59432
59465
|
customData?: Record<string, unknown>;
|
|
59466
|
+
/**
|
|
59467
|
+
* Durable-turn opt-in for a token with no product surface. A surface-bound
|
|
59468
|
+
* token reads the surface's `behavior.durableTurns` instead and ignores this.
|
|
59469
|
+
*/
|
|
59470
|
+
durableTurns?: {
|
|
59471
|
+
/** Defaults to false when absent. */
|
|
59472
|
+
enabled?: boolean;
|
|
59473
|
+
};
|
|
59433
59474
|
}
|
|
59434
59475
|
/**
|
|
59435
59476
|
* Client token data returned from the API
|
package/dist/index.d.ts
CHANGED
|
@@ -8682,7 +8682,7 @@ interface paths {
|
|
|
8682
8682
|
};
|
|
8683
8683
|
};
|
|
8684
8684
|
};
|
|
8685
|
-
/** @description Forbidden. Either the client token is inactive or the origin is not allowed, or the tenancy lock-down refused the execution: the agent requires an end-user scope and no valid `identityProof` was supplied (`end_user_scope_required`), or this session's conversation record belongs to a different signed-in end user (`conversation_scope_mismatch`; start a new conversation). */
|
|
8685
|
+
/** @description Forbidden. Either the client token is inactive or the origin is not allowed, or the tenancy lock-down refused the execution: the agent requires an end-user scope and no valid `identityProof` was supplied (`end_user_scope_required`), or this session's conversation record belongs to a different signed-in end user (`conversation_scope_mismatch`; start a new conversation), or a Claude Managed target's conversation is not owned by the visitor making the request (`CLIENT_CONVERSATION_NOT_VISITOR_OWNED`; initialize with `durableRecovery: true` and send `X-Visitor-Token`). */
|
|
8686
8686
|
403: {
|
|
8687
8687
|
headers: {
|
|
8688
8688
|
[name: string]: unknown;
|
|
@@ -8700,7 +8700,7 @@ interface paths {
|
|
|
8700
8700
|
"application/json": components["schemas"]["Error"];
|
|
8701
8701
|
};
|
|
8702
8702
|
};
|
|
8703
|
-
/** @description Conflict. Either the client tools registry fingerprint was not found (`client_tools_resend_required`; resend the full `clientTools[]` with the fingerprint),
|
|
8703
|
+
/** @description Conflict. Either the client tools registry fingerprint was not found (`client_tools_resend_required`; resend the full `clientTools[]` with the fingerprint), this turn was superseded by a newer interrupting turn before it could start (`turn_superseded`), or a Claude Managed target was refused because the caller has not opted into durable turns (`CLAUDE_MANAGED_DURABLE_TURNS_REQUIRED`; `hint` names the exact opt-in) or the session carries no conversation record (`CLAUDE_MANAGED_CONVERSATION_REQUIRED`). A join refusal uses `JOIN_UNAVAILABLE`. */
|
|
8704
8704
|
409: {
|
|
8705
8705
|
headers: {
|
|
8706
8706
|
[name: string]: unknown;
|
|
@@ -8977,8 +8977,8 @@ interface paths {
|
|
|
8977
8977
|
get?: never;
|
|
8978
8978
|
put?: never;
|
|
8979
8979
|
/**
|
|
8980
|
-
* Stop a
|
|
8981
|
-
* @description Cancel the specified execution without starting a replacement.
|
|
8980
|
+
* Stop a durable client execution
|
|
8981
|
+
* @description Cancel the specified execution without starting a replacement. For a native agent, pending inputs become not applied; for a Claude Managed agent, the hosted session is interrupted and stays resumable. Requires the exact visitor and session bound to the conversation.
|
|
8982
8982
|
*/
|
|
8983
8983
|
post: {
|
|
8984
8984
|
parameters: {
|
|
@@ -9047,6 +9047,7 @@ interface paths {
|
|
|
9047
9047
|
"application/json": {
|
|
9048
9048
|
accepted: boolean;
|
|
9049
9049
|
executionId: string;
|
|
9050
|
+
reason?: string;
|
|
9050
9051
|
};
|
|
9051
9052
|
};
|
|
9052
9053
|
};
|
|
@@ -9736,7 +9737,7 @@ interface paths {
|
|
|
9736
9737
|
conversationRevision: string;
|
|
9737
9738
|
/** @description Returned when the request negotiates `durableRecovery`. Older servers omit it; clients must then keep ordinary streaming behavior. */
|
|
9738
9739
|
durableRecovery?: {
|
|
9739
|
-
/** @description Whether this initialized client-token session has the visitor credential and
|
|
9740
|
+
/** @description Whether this initialized client-token session has the visitor credential and the durable-turns opt-in needed to use the durable execution reconnect route. The opt-in is the chat surface `behavior.durableTurns.enabled` for a surface-bound token and `config.durableTurns.enabled` for a standalone token. Reporting only: individual turns still self-identify as durable through replay cursors. */
|
|
9740
9741
|
enabled: boolean;
|
|
9741
9742
|
/** @description Whether the native durable target supports non-interrupting user-message delivery. */
|
|
9742
9743
|
join?: boolean;
|
|
@@ -25156,7 +25157,7 @@ interface paths {
|
|
|
25156
25157
|
};
|
|
25157
25158
|
/**
|
|
25158
25159
|
* Query customer logs
|
|
25159
|
-
* @description Query persisted customer logs
|
|
25160
|
+
* @description Query persisted customer logs with filtering, pagination, and search. When `data.live` is present the page came from the span store: one entry is one execution seam, so sub-seam rows (step skips, sources, context notices, artifacts, state snapshots, custom events) are not listed, a start/complete pair is one row carrying a duration, runs still in progress appear once they finish, and `search` matches a span's message, name, operation, tool name or error class. Otherwise each entry is one event. Requests naming `audit` or `schedule`, and an audit-entitled unfiltered read, are always served from the event tier.
|
|
25160
25161
|
*/
|
|
25161
25162
|
get: {
|
|
25162
25163
|
parameters: {
|
|
@@ -25169,9 +25170,9 @@ interface paths {
|
|
|
25169
25170
|
startTime?: string;
|
|
25170
25171
|
/** @description Alias for to. Ignored when to is also given. */
|
|
25171
25172
|
endTime?: string;
|
|
25172
|
-
/** @description Comma-separated log levels (debug,info,warn,error) */
|
|
25173
|
+
/** @description Comma-separated log levels (debug,info,warn,error). An unknown value is rejected with 400. */
|
|
25173
25174
|
level?: string;
|
|
25174
|
-
/** @description Comma-separated categories */
|
|
25175
|
+
/** @description Comma-separated categories (execution,agent,tool,model,system,error,schedule,batch,audit). An unknown value is rejected with 400. */
|
|
25175
25176
|
category?: string;
|
|
25176
25177
|
/** @description Filter by flow ID */
|
|
25177
25178
|
flowId?: string;
|
|
@@ -25213,8 +25214,18 @@ interface paths {
|
|
|
25213
25214
|
entries: {
|
|
25214
25215
|
[key: string]: unknown;
|
|
25215
25216
|
}[];
|
|
25217
|
+
/** @description Present only when the page was served from the span store. Runs still in progress appear once they finish; the minutes above the cut-line come from the live tier when it answers in time. Absent otherwise. */
|
|
25218
|
+
live?: {
|
|
25219
|
+
/** @description Entries at or below this instant came from the span store; newer ones from the live tier. */
|
|
25220
|
+
cutline: string;
|
|
25221
|
+
/** @enum {string} */
|
|
25222
|
+
reason?: "hot_tier_failed" | "outside_window";
|
|
25223
|
+
served: boolean;
|
|
25224
|
+
};
|
|
25216
25225
|
pagination: {
|
|
25217
25226
|
cursor: string | null;
|
|
25227
|
+
/** @description True when the supplied cursor could not be honoured and the read restarted at page one. A paging client must stop rather than follow the fresh cursor. Absent otherwise. */
|
|
25228
|
+
cursorReset?: boolean;
|
|
25218
25229
|
hasMore: boolean;
|
|
25219
25230
|
};
|
|
25220
25231
|
};
|
|
@@ -25348,21 +25359,17 @@ interface paths {
|
|
|
25348
25359
|
};
|
|
25349
25360
|
/**
|
|
25350
25361
|
* Read one log entry in full
|
|
25351
|
-
* @description Returns a single log entry
|
|
25362
|
+
* @description Returns a single log entry, including the model-call transcript the paged list projection omits. Addressed by the span key: traceId, spanId and timestamp. Bounded to one span, so a detail read never costs a page.
|
|
25352
25363
|
*/
|
|
25353
25364
|
get: {
|
|
25354
25365
|
parameters: {
|
|
25355
25366
|
query: {
|
|
25356
|
-
/** @description
|
|
25357
|
-
executionId: string;
|
|
25358
|
-
/** @description The entry's exact timestamp (ISO 8601) */
|
|
25367
|
+
/** @description The span's exact started_at (ISO 8601) */
|
|
25359
25368
|
timestamp: string;
|
|
25360
|
-
/** @description
|
|
25361
|
-
|
|
25362
|
-
/** @description
|
|
25363
|
-
|
|
25364
|
-
/** @description Narrow to one tail event name */
|
|
25365
|
-
eventName?: string;
|
|
25369
|
+
/** @description Trace the span belongs to; a span id is unique only within its trace. */
|
|
25370
|
+
traceId: string;
|
|
25371
|
+
/** @description Span to read, from a list row’s otlpSpanId. */
|
|
25372
|
+
spanId: string;
|
|
25366
25373
|
};
|
|
25367
25374
|
header?: never;
|
|
25368
25375
|
path?: never;
|
|
@@ -25445,9 +25452,9 @@ interface paths {
|
|
|
25445
25452
|
startTime?: string;
|
|
25446
25453
|
/** @description Alias for to. Ignored when to is also given. */
|
|
25447
25454
|
endTime?: string;
|
|
25448
|
-
/** @description Comma-separated log levels (debug,info,warn,error) */
|
|
25455
|
+
/** @description Comma-separated log levels (debug,info,warn,error). An unknown value is rejected with 400. */
|
|
25449
25456
|
level?: string;
|
|
25450
|
-
/** @description Comma-separated categories */
|
|
25457
|
+
/** @description Comma-separated categories (execution,agent,tool,model,system,error,schedule,batch,audit). An unknown value is rejected with 400. */
|
|
25451
25458
|
category?: string;
|
|
25452
25459
|
/** @description Filter by flow ID */
|
|
25453
25460
|
flowId?: string;
|
|
@@ -30805,6 +30812,8 @@ interface paths {
|
|
|
30805
30812
|
budgetExhausted?: boolean | null;
|
|
30806
30813
|
/** @description Cancel request. Absent means the overlay did not answer, which is not false and not null. */
|
|
30807
30814
|
cancelRequestedAt?: string | null;
|
|
30815
|
+
/** @description How many runs name this one as their parent. The unscoped feed returns roots only, so this is the size of the fold underneath a row; read the children with parentExecutionId=<executionId>. It is populated on a resource-scoped page too, where nothing is folded, so a surface can still offer the same expansion. WHICH children are counted depends on the arm that served the row: the span store counts every child, agent and nested-flow alike, while the legacy control-plane fallback counts agent children only, so on that arm a parent whose only child is a nested flow reports 0. That is deliberate — the fallback arm cannot enumerate a nested-flow child either, so counting one would advertise a fold that opens on nothing. It counts only children the CALLER may read: a credential holding one execution family (AGENTS:READ or FLOWS:READ alone) counts the children of that family and no others, so a count never discloses a run the same credential could not list. NULL means the arm cannot count children at all, which is not zero. */
|
|
30816
|
+
childCount: number | null;
|
|
30808
30817
|
/**
|
|
30809
30818
|
* @description Storage completeness; null on a row the control-plane arm served.
|
|
30810
30819
|
* @enum {string|null}
|
|
@@ -30842,7 +30851,7 @@ interface paths {
|
|
|
30842
30851
|
/** @description Last heartbeat. Absent means the overlay did not answer, which is not false and not null. */
|
|
30843
30852
|
lastHeartbeatAt?: string | null;
|
|
30844
30853
|
/**
|
|
30845
|
-
* @description Where the run was dispatched from, taken from the caller's authenticated principal and never from a request field
|
|
30854
|
+
* @description Where the run was dispatched from, taken from the caller's authenticated principal and never from a request field. ANY entrance that resolves a principal stamps it: a Clerk session answers dashboard; a management API key answers api, which includes the Runtype MCP server's tools and Code Mode, since both reach dispatch with a management key; and Runtype's own internal caller answers internal, for example the hosted /v1/mcp proxy. A lane that resolves NO principal carries NULL BY DESIGN: schedule, webhook, messaging, A2A, an agent exposed AS an MCP surface, subagent, nested flow, a client-token product surface (an end user is none of the three origins) and an ingested OTLP run. So NULL says "no authenticated principal at this entrance" rather than "unknown caller". The one NULL that is not a statement about the lane is a row whose header predates the field or came from the backfill: it stamps nothing even for a run that did resolve a principal.
|
|
30846
30855
|
* @enum {string|null}
|
|
30847
30856
|
*/
|
|
30848
30857
|
origin: "dashboard" | "api" | "internal" | null;
|
|
@@ -40059,7 +40068,7 @@ interface paths {
|
|
|
40059
40068
|
};
|
|
40060
40069
|
/**
|
|
40061
40070
|
* List runs
|
|
40062
|
-
* @description Every agent and flow run in the span store, newest start first, including runs that write no control-plane row. Each row carries `origin` (dashboard | api | internal | null), read from the caller's authenticated principal, and `test` as its derived alias for `origin === "dashboard"`;
|
|
40071
|
+
* @description Every agent and flow run in the span store, newest start first, including runs that write no control-plane row. The UNSCOPED feed is ROOT runs only: a subagent or nested-flow run folds under its parent, `childCount` says how many are folded there, and `parentExecutionId=<id>` reads them. Pass `includeChildren=true` for the flat enumeration. Any resource-scoped filter (`agentId`, `flowId`, `conversationId`, `surfaceId`, `recordId`, `batchExecutionId`, `parentExecutionId`, `rootExecutionId`, `executionId`) is already an explicit selection and never folds, so an agent that only ever runs as a subagent still lists under `agentId`. Each row carries `origin` (dashboard | api | internal | null), read from the caller's authenticated principal, and `test` as its derived alias for `origin === "dashboard"`; any entrance that resolves a principal stamps origin, including the Runtype MCP server tools and Code Mode (`api`) and the hosted `/v1/mcp` proxy (`internal`). A lane with no principal answers null for both by design: schedule, webhook, messaging, A2A, an agent exposed as an MCP surface, subagent, nested flow, a client-token product surface, an ingested run, and any row whose header predates the field. `overlay=live` adds live control-plane fields; the overlay never adds, drops or reorders a row. Returns 404 with `code: "run_history_unavailable"` when neither plane can serve the page, which a client renders as "no run history here" rather than as a failed read.
|
|
40063
40072
|
*/
|
|
40064
40073
|
get: {
|
|
40065
40074
|
parameters: {
|
|
@@ -40082,6 +40091,8 @@ interface paths {
|
|
|
40082
40091
|
parentExecutionId?: string;
|
|
40083
40092
|
/** @description Runs in this execution tree. */
|
|
40084
40093
|
rootExecutionId?: string;
|
|
40094
|
+
/** @description true restores the flat enumeration on the UNSCOPED feed, in which a subagent run and a nested-flow run list beside their parent. The unscoped feed is roots only by default: a row whose parentExecutionId is set folds under its parent and is read with parentExecutionId=<executionId>. Any filter that scopes to a resource — agentId, flowId, conversationId, surfaceId, recordId, batchExecutionId, parentExecutionId, rootExecutionId or executionId — is already an explicit selection and never folds, so an agent that only ever runs as a subagent still lists under agentId. This parameter changes nothing on a scoped request. */
|
|
40095
|
+
includeChildren?: "true" | "false";
|
|
40085
40096
|
/** @description Read specific runs by id; at most 100 per request. */
|
|
40086
40097
|
executionId?: string | string[];
|
|
40087
40098
|
/** @description Filter by producing lane. */
|
|
@@ -50955,6 +50966,8 @@ interface components {
|
|
|
50955
50966
|
budgetExhausted?: boolean | null;
|
|
50956
50967
|
/** @description Cancel request. Absent means the overlay did not answer, which is not false and not null. */
|
|
50957
50968
|
cancelRequestedAt?: string | null;
|
|
50969
|
+
/** @description How many runs name this one as their parent. The unscoped feed returns roots only, so this is the size of the fold underneath a row; read the children with parentExecutionId=<executionId>. It is populated on a resource-scoped page too, where nothing is folded, so a surface can still offer the same expansion. WHICH children are counted depends on the arm that served the row: the span store counts every child, agent and nested-flow alike, while the legacy control-plane fallback counts agent children only, so on that arm a parent whose only child is a nested flow reports 0. That is deliberate — the fallback arm cannot enumerate a nested-flow child either, so counting one would advertise a fold that opens on nothing. It counts only children the CALLER may read: a credential holding one execution family (AGENTS:READ or FLOWS:READ alone) counts the children of that family and no others, so a count never discloses a run the same credential could not list. NULL means the arm cannot count children at all, which is not zero. */
|
|
50970
|
+
childCount: number | null;
|
|
50958
50971
|
/**
|
|
50959
50972
|
* @description Storage completeness; null on a row the control-plane arm served.
|
|
50960
50973
|
* @enum {string|null}
|
|
@@ -50992,7 +51005,7 @@ interface components {
|
|
|
50992
51005
|
/** @description Last heartbeat. Absent means the overlay did not answer, which is not false and not null. */
|
|
50993
51006
|
lastHeartbeatAt?: string | null;
|
|
50994
51007
|
/**
|
|
50995
|
-
* @description Where the run was dispatched from, taken from the caller's authenticated principal and never from a request field
|
|
51008
|
+
* @description Where the run was dispatched from, taken from the caller's authenticated principal and never from a request field. ANY entrance that resolves a principal stamps it: a Clerk session answers dashboard; a management API key answers api, which includes the Runtype MCP server's tools and Code Mode, since both reach dispatch with a management key; and Runtype's own internal caller answers internal, for example the hosted /v1/mcp proxy. A lane that resolves NO principal carries NULL BY DESIGN: schedule, webhook, messaging, A2A, an agent exposed AS an MCP surface, subagent, nested flow, a client-token product surface (an end user is none of the three origins) and an ingested OTLP run. So NULL says "no authenticated principal at this entrance" rather than "unknown caller". The one NULL that is not a statement about the lane is a row whose header predates the field or came from the backfill: it stamps nothing even for a run that did resolve a principal.
|
|
50996
51009
|
* @enum {string|null}
|
|
50997
51010
|
*/
|
|
50998
51011
|
origin: "dashboard" | "api" | "internal" | null;
|
|
@@ -57927,6 +57940,18 @@ interface RunListRow {
|
|
|
57927
57940
|
parentExecutionId: string | null;
|
|
57928
57941
|
parentToolCallId: string | null;
|
|
57929
57942
|
rootExecutionId: string | null;
|
|
57943
|
+
/**
|
|
57944
|
+
* How many runs name this one as their parent. The unscoped feed returns
|
|
57945
|
+
* roots only, so this is the size of the fold underneath a row; read the
|
|
57946
|
+
* children with `parentExecutionId`. It is populated on a resource-scoped
|
|
57947
|
+
* page too. The span store counts agent and nested-flow children alike; the
|
|
57948
|
+
* legacy control-plane fallback counts agent children only, so a
|
|
57949
|
+
* nested-flow-only parent reports 0 there — that arm cannot enumerate such a
|
|
57950
|
+
* child either. It counts only children the caller may read, so a
|
|
57951
|
+
* single-family credential never learns the other family's children exist.
|
|
57952
|
+
* NULL when the serving arm cannot count at all.
|
|
57953
|
+
*/
|
|
57954
|
+
childCount: number | null;
|
|
57930
57955
|
source: 'hosted' | 'ingested';
|
|
57931
57956
|
fidelityTier: string | null;
|
|
57932
57957
|
completeness: 'partial' | 'complete' | 'conflicted' | 'expired' | 'deleted' | null;
|
|
@@ -57938,8 +57963,9 @@ interface RunListRow {
|
|
|
57938
57963
|
selfReportedCost: string | null;
|
|
57939
57964
|
/**
|
|
57940
57965
|
* Where the run was dispatched from, taken from the caller's authenticated
|
|
57941
|
-
* principal and never from a request field.
|
|
57942
|
-
*
|
|
57966
|
+
* principal and never from a request field. Any entrance that resolves a
|
|
57967
|
+
* principal stamps it (MCP tools and Code Mode answer `api`, the hosted
|
|
57968
|
+
* `/v1/mcp` proxy `internal`); a lane with none carries NULL by design.
|
|
57943
57969
|
*/
|
|
57944
57970
|
origin: 'dashboard' | 'api' | 'internal' | null;
|
|
57945
57971
|
/**
|
|
@@ -57996,6 +58022,13 @@ interface RunListParams {
|
|
|
57996
58022
|
parentExecutionId?: string;
|
|
57997
58023
|
rootExecutionId?: string;
|
|
57998
58024
|
executionId?: string | string[];
|
|
58025
|
+
/**
|
|
58026
|
+
* `'true'` restores the flat enumeration on the unscoped feed, which is roots
|
|
58027
|
+
* only by default: a subagent or nested-flow run folds under its parent. Any
|
|
58028
|
+
* resource-scoped filter is already an explicit selection and never folds, so
|
|
58029
|
+
* this changes nothing there.
|
|
58030
|
+
*/
|
|
58031
|
+
includeChildren?: 'true' | 'false';
|
|
57999
58032
|
source?: 'hosted' | 'ingested';
|
|
58000
58033
|
/**
|
|
58001
58034
|
* `running`, `completed` or `failed` only. `queued`, `awaiting` and
|
|
@@ -59430,6 +59463,14 @@ interface ClientTokenConfig {
|
|
|
59430
59463
|
theme?: ClientWidgetTheme;
|
|
59431
59464
|
/** Custom data passed to flows */
|
|
59432
59465
|
customData?: Record<string, unknown>;
|
|
59466
|
+
/**
|
|
59467
|
+
* Durable-turn opt-in for a token with no product surface. A surface-bound
|
|
59468
|
+
* token reads the surface's `behavior.durableTurns` instead and ignores this.
|
|
59469
|
+
*/
|
|
59470
|
+
durableTurns?: {
|
|
59471
|
+
/** Defaults to false when absent. */
|
|
59472
|
+
enabled?: boolean;
|
|
59473
|
+
};
|
|
59433
59474
|
}
|
|
59434
59475
|
/**
|
|
59435
59476
|
* Client token data returned from the API
|
package/dist/index.mjs
CHANGED
|
@@ -13934,7 +13934,7 @@ function transformQueryParams(params) {
|
|
|
13934
13934
|
|
|
13935
13935
|
// src/version.ts
|
|
13936
13936
|
var FALLBACK_VERSION = "0.0.0";
|
|
13937
|
-
var SDK_VERSION = "10.1
|
|
13937
|
+
var SDK_VERSION = "10.2.1".length > 0 ? "10.2.1" : FALLBACK_VERSION;
|
|
13938
13938
|
var RUNTYPE_CLIENT_KIND = "sdk";
|
|
13939
13939
|
var SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
|
|
13940
13940
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runtypelabs/sdk",
|
|
3
|
-
"version": "10.1
|
|
3
|
+
"version": "10.2.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.59.0",
|
|
28
28
|
"openapi-typescript": "^7.13.0",
|
|
29
29
|
"tsup": "^8.0.2",
|
|
30
30
|
"typescript": "^6.0.3",
|