@runtypelabs/sdk 10.1.1 → 10.1.4

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 CHANGED
@@ -13854,7 +13854,10 @@ var Runtype = class {
13854
13854
  }
13855
13855
  /**
13856
13856
  * Runs namespace - the one list of agent and flow runs, read from the span
13857
- * store. Includes runs dispatched with `storeResults: false` as `test: true`.
13857
+ * store. Each row states two separate facts: `origin` (who dispatched, from
13858
+ * the caller's principal; `test` is its deprecated alias) and `storeResults`
13859
+ * (whether the transcript was kept). A run that wrote no control-plane row
13860
+ * is still listed.
13858
13861
  *
13859
13862
  * @example
13860
13863
  * ```typescript
@@ -14146,7 +14149,7 @@ function transformQueryParams(params) {
14146
14149
 
14147
14150
  // src/version.ts
14148
14151
  var FALLBACK_VERSION = "0.0.0";
14149
- var SDK_VERSION = "10.1.1".length > 0 ? "10.1.1" : FALLBACK_VERSION;
14152
+ var SDK_VERSION = "10.1.4".length > 0 ? "10.1.4" : FALLBACK_VERSION;
14150
14153
  var RUNTYPE_CLIENT_KIND = "sdk";
14151
14154
  var SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
14152
14155
 
package/dist/index.d.cts CHANGED
@@ -25206,6 +25206,8 @@ interface paths {
25206
25206
  content: {
25207
25207
  "application/json": {
25208
25208
  data: {
25209
+ /** @description True when the historical segment was served by the flat fallback plan because the deduplicating one was rejected, so a re-sent delivery can appear more than once. Absent on healthy responses. */
25210
+ dedupeFallback?: boolean;
25209
25211
  /** @description True when part of the window could not be read, so entries may be missing. Evicted ordinary rows are recovered from R2 when old enough; receipt-backed recovery remains degraded when source time cannot prove ingestion. Absent on healthy responses. */
25210
25212
  degraded?: boolean;
25211
25213
  entries: {
@@ -25494,6 +25496,8 @@ interface paths {
25494
25496
  byType: {
25495
25497
  [key: string]: number;
25496
25498
  };
25499
+ /** @description True when counts came from the flat fallback plan because the deduplicating one was rejected, so a re-sent delivery can be counted more than once. Such a response is never cached. Absent on healthy responses. */
25500
+ dedupeFallback?: boolean;
25497
25501
  /** @description True when part of the window could not be read, so counts may be partial. Evicted ordinary rows are counted from R2 when old enough; receipt-backed recovery remains degraded when source time cannot prove ingestion. Absent on healthy responses, which are the only ones cached. */
25498
25502
  degraded?: boolean;
25499
25503
  histogram: {
@@ -30820,8 +30824,12 @@ interface paths {
30820
30824
  fidelityTier: string | null;
30821
30825
  /** @description Flow that ran. */
30822
30826
  flowId: string | null;
30827
+ /** @description True when the dispatch carried a complete inline agent definition (name and model) beside or instead of an agentId, so the run executed that inline config and no stored version; such a row stamps no agentVersionId. False when the run executed the saved definition by reference. NULL when the header states nothing: a flow run, a lane that resolves no agent definition, or a row that predates the field. */
30828
+ inlineDefinition: boolean | null;
30823
30829
  /** @description Messages the run started from. Absent means the overlay did not answer, which is not false and not null. */
30824
30830
  inputMessages?: unknown;
30831
+ /** @description The run's first user message, secret-scrubbed and cut to 160 characters, so a list can say what a run was asked to do without reading content. Absent means no input text is recorded for this run, which is not an empty message: the span store holds no run-level input at all, so a run with no control-plane row (a flow leg, a storeResults:false run) has none. */
30832
+ inputPreview?: string | null;
30825
30833
  /** @description Input tokens reported. */
30826
30834
  inputTokens: number | null;
30827
30835
  /** @description Loop iterations from the terminal frame. */
@@ -30833,6 +30841,11 @@ interface paths {
30833
30841
  kind: "agent" | "flow";
30834
30842
  /** @description Last heartbeat. Absent means the overlay did not answer, which is not false and not null. */
30835
30843
  lastHeartbeatAt?: string | null;
30844
+ /**
30845
+ * @description Where the run was dispatched from, taken from the caller's authenticated principal and never from a request field: dashboard for a Clerk session, api for a management API key, internal for a Runtype worker. NULL means the header states nothing about it, which is not "unknown caller": headers written before this field shipped, lanes that never see an auth principal, and every backfilled row carry no origin stamp.
30846
+ * @enum {string|null}
30847
+ */
30848
+ origin: "dashboard" | "api" | "internal" | null;
30836
30849
  /** @description Framework identity the producer reported, for a versionless run group. Absent means the overlay did not answer, which is not false and not null. */
30837
30850
  otelProducer?: unknown;
30838
30851
  /** @description Output tokens reported. */
@@ -30869,11 +30882,16 @@ interface paths {
30869
30882
  status: "queued" | "running" | "awaiting" | "completed" | "failed" | "cancelled";
30870
30883
  /** @description Stop reason from the terminal frame. */
30871
30884
  stopReason?: string | null;
30885
+ /** @description The persistence posture the dispatch declared. FALSE means the run wrote no control-plane row, no journal outputs and no span content, so a surface that reports a missing transcript keys on this and never on origin. NULL means the header states nothing, which is not "true": a lane that takes no such flag carries no stamp, and an ingested (OTLP) run declared none. A row served from the legacy control-plane lane answers true, because that row exists only when the run stored. */
30886
+ storeResults: boolean | null;
30872
30887
  /** @description Product surface that entered this run. */
30873
30888
  surfaceId: string | null;
30874
30889
  /** @description Surface family (api, chat, webhook, schedule, ...). */
30875
30890
  surfaceType: string | null;
30876
- /** @description True when the run was dispatched with storeResults: false, so it has no control-plane row and no overlay. NULL means the header states nothing about it, which is not false: headers written before this field shipped, and lanes that take no such flag, carry no dispatch stamp and are never backfilled. */
30891
+ /**
30892
+ * @deprecated
30893
+ * @description DEPRECATED: a derived alias of origin, kept for one release — read origin instead. True when the run came from the dashboard, i.e. origin === "dashboard"; NULL exactly when origin is NULL. It is never derived from storeResults, which defaults to false across the whole flow lane and which an API caller sets for its own privacy reasons: reading it as "test" labelled production runs as tests. A run whose header predates origin therefore reads NULL rather than claiming either answer.
30894
+ */
30877
30895
  test: boolean | null;
30878
30896
  /** @description Metered cost as a decimal string. */
30879
30897
  totalCost: string | null;
@@ -40041,7 +40059,7 @@ interface paths {
40041
40059
  };
40042
40060
  /**
40043
40061
  * List runs
40044
- * @description Every agent and flow run in the span store, newest start first. A run dispatched with `storeResults: false` is listed with `test: true` rather than being invisible. `overlay=live` adds live control-plane fields; the overlay never adds, drops or reorders a row. Returns 404 when run reads are not enabled for the organization.
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"`; both are null when the header states nothing. `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.
40045
40063
  */
40046
40064
  get: {
40047
40065
  parameters: {
@@ -40074,7 +40092,7 @@ interface paths {
40074
40092
  from?: string;
40075
40093
  /** @description Window end (ISO 8601). Defaults to now. */
40076
40094
  to?: string;
40077
- /** @description full (the default) returns every field. compact omits exactly these 14: stopReason, iterations, agentVersionId, agentVersionLabel, agentVersionNumber, agentTargetResolution, otelProducer, lastHeartbeatAt, expiresAt, cancelRequestedAt, progress, pendingApproval, budgetExhausted and inputMessages. The status is still overlay-corrected on a compact page; only the fields differ. */
40095
+ /** @description full (the default) returns every field. compact omits exactly these 15: stopReason, iterations, inputPreview, agentVersionId, agentVersionLabel, agentVersionNumber, agentTargetResolution, otelProducer, lastHeartbeatAt, expiresAt, cancelRequestedAt, progress, pendingApproval, budgetExhausted and inputMessages. The status is still overlay-corrected on a compact page; only the fields differ. */
40078
40096
  view?: "compact" | "full";
40079
40097
  /** @description live adds control-plane fields; defaults to live for a session, none for an API key. */
40080
40098
  overlay?: "live" | "none";
@@ -40138,13 +40156,20 @@ interface paths {
40138
40156
  "application/json": components["schemas"]["Error"];
40139
40157
  };
40140
40158
  };
40141
- /** @description Run reads are not enabled for this organization */
40159
+ /** @description No plane can answer: store run reads are off for this organization and the request names a predicate the control plane cannot express */
40142
40160
  404: {
40143
40161
  headers: {
40144
40162
  [name: string]: unknown;
40145
40163
  };
40146
40164
  content: {
40147
- "application/json": components["schemas"]["Error"];
40165
+ "application/json": {
40166
+ /**
40167
+ * @description Neither plane can serve this page, so the caller shows "no run history" rather than a failed read. Matching on the sentence is never the contract.
40168
+ * @enum {string}
40169
+ */
40170
+ code: "run_history_unavailable";
40171
+ error: string;
40172
+ };
40148
40173
  };
40149
40174
  };
40150
40175
  /** @description Internal server error */
@@ -40182,7 +40207,7 @@ interface paths {
40182
40207
  query?: {
40183
40208
  /** @description live adds control-plane fields; defaults to live for a session, none for an API key. */
40184
40209
  overlay?: "live" | "none";
40185
- /** @description full (the default) returns every field. compact omits exactly these 14: stopReason, iterations, agentVersionId, agentVersionLabel, agentVersionNumber, agentTargetResolution, otelProducer, lastHeartbeatAt, expiresAt, cancelRequestedAt, progress, pendingApproval, budgetExhausted and inputMessages. The status is still overlay-corrected on a compact page; only the fields differ. */
40210
+ /** @description full (the default) returns every field. compact omits exactly these 15: stopReason, iterations, inputPreview, agentVersionId, agentVersionLabel, agentVersionNumber, agentTargetResolution, otelProducer, lastHeartbeatAt, expiresAt, cancelRequestedAt, progress, pendingApproval, budgetExhausted and inputMessages. The status is still overlay-corrected on a compact page; only the fields differ. */
40186
40211
  view?: "compact" | "full";
40187
40212
  };
40188
40213
  header?: never;
@@ -50949,8 +50974,12 @@ interface components {
50949
50974
  fidelityTier: string | null;
50950
50975
  /** @description Flow that ran. */
50951
50976
  flowId: string | null;
50977
+ /** @description True when the dispatch carried a complete inline agent definition (name and model) beside or instead of an agentId, so the run executed that inline config and no stored version; such a row stamps no agentVersionId. False when the run executed the saved definition by reference. NULL when the header states nothing: a flow run, a lane that resolves no agent definition, or a row that predates the field. */
50978
+ inlineDefinition: boolean | null;
50952
50979
  /** @description Messages the run started from. Absent means the overlay did not answer, which is not false and not null. */
50953
50980
  inputMessages?: unknown;
50981
+ /** @description The run's first user message, secret-scrubbed and cut to 160 characters, so a list can say what a run was asked to do without reading content. Absent means no input text is recorded for this run, which is not an empty message: the span store holds no run-level input at all, so a run with no control-plane row (a flow leg, a storeResults:false run) has none. */
50982
+ inputPreview?: string | null;
50954
50983
  /** @description Input tokens reported. */
50955
50984
  inputTokens: number | null;
50956
50985
  /** @description Loop iterations from the terminal frame. */
@@ -50962,6 +50991,11 @@ interface components {
50962
50991
  kind: "agent" | "flow";
50963
50992
  /** @description Last heartbeat. Absent means the overlay did not answer, which is not false and not null. */
50964
50993
  lastHeartbeatAt?: string | null;
50994
+ /**
50995
+ * @description Where the run was dispatched from, taken from the caller's authenticated principal and never from a request field: dashboard for a Clerk session, api for a management API key, internal for a Runtype worker. NULL means the header states nothing about it, which is not "unknown caller": headers written before this field shipped, lanes that never see an auth principal, and every backfilled row carry no origin stamp.
50996
+ * @enum {string|null}
50997
+ */
50998
+ origin: "dashboard" | "api" | "internal" | null;
50965
50999
  /** @description Framework identity the producer reported, for a versionless run group. Absent means the overlay did not answer, which is not false and not null. */
50966
51000
  otelProducer?: unknown;
50967
51001
  /** @description Output tokens reported. */
@@ -50998,11 +51032,16 @@ interface components {
50998
51032
  status: "queued" | "running" | "awaiting" | "completed" | "failed" | "cancelled";
50999
51033
  /** @description Stop reason from the terminal frame. */
51000
51034
  stopReason?: string | null;
51035
+ /** @description The persistence posture the dispatch declared. FALSE means the run wrote no control-plane row, no journal outputs and no span content, so a surface that reports a missing transcript keys on this and never on origin. NULL means the header states nothing, which is not "true": a lane that takes no such flag carries no stamp, and an ingested (OTLP) run declared none. A row served from the legacy control-plane lane answers true, because that row exists only when the run stored. */
51036
+ storeResults: boolean | null;
51001
51037
  /** @description Product surface that entered this run. */
51002
51038
  surfaceId: string | null;
51003
51039
  /** @description Surface family (api, chat, webhook, schedule, ...). */
51004
51040
  surfaceType: string | null;
51005
- /** @description True when the run was dispatched with storeResults: false, so it has no control-plane row and no overlay. NULL means the header states nothing about it, which is not false: headers written before this field shipped, and lanes that take no such flag, carry no dispatch stamp and are never backfilled. */
51041
+ /**
51042
+ * @deprecated
51043
+ * @description DEPRECATED: a derived alias of origin, kept for one release — read origin instead. True when the run came from the dashboard, i.e. origin === "dashboard"; NULL exactly when origin is NULL. It is never derived from storeResults, which defaults to false across the whole flow lane and which an API caller sets for its own privacy reasons: reading it as "test" labelled production runs as tests. A run whose header predates origin therefore reads NULL rather than claiming either answer.
51044
+ */
51006
51045
  test: boolean | null;
51007
51046
  /** @description Metered cost as a decimal string. */
51008
51047
  totalCost: string | null;
@@ -57898,13 +57937,39 @@ interface RunListRow {
57898
57937
  totalCost: string | null;
57899
57938
  selfReportedCost: string | null;
57900
57939
  /**
57901
- * True when the run was dispatched with `storeResults: false`, such as an
57902
- * editor test. NULL means the header states nothing about it, which is not
57903
- * `false`: headers written before the field shipped carry no dispatch stamp.
57940
+ * Where the run was dispatched from, taken from the caller's authenticated
57941
+ * principal and never from a request field. NULL means the header states
57942
+ * nothing about it: a lane that sees no principal, or a backfilled row.
57943
+ */
57944
+ origin: 'dashboard' | 'api' | 'internal' | null;
57945
+ /**
57946
+ * The persistence posture the dispatch declared. `false` means the run kept no
57947
+ * control-plane row, no journal outputs and no span content, so a surface
57948
+ * reporting a missing transcript reads this and never `origin`.
57949
+ */
57950
+ storeResults: boolean | null;
57951
+ /**
57952
+ * True when the dispatch carried a complete inline definition, so the run
57953
+ * executed that config and stamps no `agentVersionId`. False for a run of the
57954
+ * saved definition by reference. NULL when the header states nothing.
57955
+ */
57956
+ inlineDefinition: boolean | null;
57957
+ /**
57958
+ * True when the run came from the dashboard (`origin === 'dashboard'`), such
57959
+ * as an editor test.
57960
+ * @deprecated Derived alias of `origin`; read `origin` instead. Kept for one
57961
+ * release. NULL exactly when `origin` is NULL, including on a run whose header
57962
+ * predates the field.
57904
57963
  */
57905
57964
  test: boolean | null;
57906
57965
  stopReason?: string | null;
57907
57966
  iterations?: number | null;
57967
+ /**
57968
+ * The run's first user message, secret-scrubbed and bounded. Absent means no
57969
+ * input text is recorded for the run, which is not an empty message: a run
57970
+ * with no control-plane row carries none.
57971
+ */
57972
+ inputPreview?: string | null;
57908
57973
  /** Overlay fields. Absent means the overlay did not answer, never `false`. */
57909
57974
  agentVersionId?: string | null;
57910
57975
  agentVersionLabel?: string | null;
@@ -57959,8 +58024,8 @@ interface RunListResponse {
57959
58024
  }
57960
58025
  /**
57961
58026
  * Read-only namespace over `/v1/runs`, the one list of agent and flow runs.
57962
- * A run dispatched with `storeResults: false` is listed with `test: true`
57963
- * rather than being absent.
58027
+ * A dashboard editor test is listed with `origin: 'dashboard'` (and its `test`
58028
+ * alias) rather than being absent.
57964
58029
  */
57965
58030
  declare class RunsNamespace {
57966
58031
  private readonly getClient;
@@ -58931,7 +58996,10 @@ declare class Runtype {
58931
58996
  static get executions(): ExecutionsNamespace;
58932
58997
  /**
58933
58998
  * Runs namespace - the one list of agent and flow runs, read from the span
58934
- * store. Includes runs dispatched with `storeResults: false` as `test: true`.
58999
+ * store. Each row states two separate facts: `origin` (who dispatched, from
59000
+ * the caller's principal; `test` is its deprecated alias) and `storeResults`
59001
+ * (whether the transcript was kept). A run that wrote no control-plane row
59002
+ * is still listed.
58935
59003
  *
58936
59004
  * @example
58937
59005
  * ```typescript
package/dist/index.d.ts CHANGED
@@ -25206,6 +25206,8 @@ interface paths {
25206
25206
  content: {
25207
25207
  "application/json": {
25208
25208
  data: {
25209
+ /** @description True when the historical segment was served by the flat fallback plan because the deduplicating one was rejected, so a re-sent delivery can appear more than once. Absent on healthy responses. */
25210
+ dedupeFallback?: boolean;
25209
25211
  /** @description True when part of the window could not be read, so entries may be missing. Evicted ordinary rows are recovered from R2 when old enough; receipt-backed recovery remains degraded when source time cannot prove ingestion. Absent on healthy responses. */
25210
25212
  degraded?: boolean;
25211
25213
  entries: {
@@ -25494,6 +25496,8 @@ interface paths {
25494
25496
  byType: {
25495
25497
  [key: string]: number;
25496
25498
  };
25499
+ /** @description True when counts came from the flat fallback plan because the deduplicating one was rejected, so a re-sent delivery can be counted more than once. Such a response is never cached. Absent on healthy responses. */
25500
+ dedupeFallback?: boolean;
25497
25501
  /** @description True when part of the window could not be read, so counts may be partial. Evicted ordinary rows are counted from R2 when old enough; receipt-backed recovery remains degraded when source time cannot prove ingestion. Absent on healthy responses, which are the only ones cached. */
25498
25502
  degraded?: boolean;
25499
25503
  histogram: {
@@ -30820,8 +30824,12 @@ interface paths {
30820
30824
  fidelityTier: string | null;
30821
30825
  /** @description Flow that ran. */
30822
30826
  flowId: string | null;
30827
+ /** @description True when the dispatch carried a complete inline agent definition (name and model) beside or instead of an agentId, so the run executed that inline config and no stored version; such a row stamps no agentVersionId. False when the run executed the saved definition by reference. NULL when the header states nothing: a flow run, a lane that resolves no agent definition, or a row that predates the field. */
30828
+ inlineDefinition: boolean | null;
30823
30829
  /** @description Messages the run started from. Absent means the overlay did not answer, which is not false and not null. */
30824
30830
  inputMessages?: unknown;
30831
+ /** @description The run's first user message, secret-scrubbed and cut to 160 characters, so a list can say what a run was asked to do without reading content. Absent means no input text is recorded for this run, which is not an empty message: the span store holds no run-level input at all, so a run with no control-plane row (a flow leg, a storeResults:false run) has none. */
30832
+ inputPreview?: string | null;
30825
30833
  /** @description Input tokens reported. */
30826
30834
  inputTokens: number | null;
30827
30835
  /** @description Loop iterations from the terminal frame. */
@@ -30833,6 +30841,11 @@ interface paths {
30833
30841
  kind: "agent" | "flow";
30834
30842
  /** @description Last heartbeat. Absent means the overlay did not answer, which is not false and not null. */
30835
30843
  lastHeartbeatAt?: string | null;
30844
+ /**
30845
+ * @description Where the run was dispatched from, taken from the caller's authenticated principal and never from a request field: dashboard for a Clerk session, api for a management API key, internal for a Runtype worker. NULL means the header states nothing about it, which is not "unknown caller": headers written before this field shipped, lanes that never see an auth principal, and every backfilled row carry no origin stamp.
30846
+ * @enum {string|null}
30847
+ */
30848
+ origin: "dashboard" | "api" | "internal" | null;
30836
30849
  /** @description Framework identity the producer reported, for a versionless run group. Absent means the overlay did not answer, which is not false and not null. */
30837
30850
  otelProducer?: unknown;
30838
30851
  /** @description Output tokens reported. */
@@ -30869,11 +30882,16 @@ interface paths {
30869
30882
  status: "queued" | "running" | "awaiting" | "completed" | "failed" | "cancelled";
30870
30883
  /** @description Stop reason from the terminal frame. */
30871
30884
  stopReason?: string | null;
30885
+ /** @description The persistence posture the dispatch declared. FALSE means the run wrote no control-plane row, no journal outputs and no span content, so a surface that reports a missing transcript keys on this and never on origin. NULL means the header states nothing, which is not "true": a lane that takes no such flag carries no stamp, and an ingested (OTLP) run declared none. A row served from the legacy control-plane lane answers true, because that row exists only when the run stored. */
30886
+ storeResults: boolean | null;
30872
30887
  /** @description Product surface that entered this run. */
30873
30888
  surfaceId: string | null;
30874
30889
  /** @description Surface family (api, chat, webhook, schedule, ...). */
30875
30890
  surfaceType: string | null;
30876
- /** @description True when the run was dispatched with storeResults: false, so it has no control-plane row and no overlay. NULL means the header states nothing about it, which is not false: headers written before this field shipped, and lanes that take no such flag, carry no dispatch stamp and are never backfilled. */
30891
+ /**
30892
+ * @deprecated
30893
+ * @description DEPRECATED: a derived alias of origin, kept for one release — read origin instead. True when the run came from the dashboard, i.e. origin === "dashboard"; NULL exactly when origin is NULL. It is never derived from storeResults, which defaults to false across the whole flow lane and which an API caller sets for its own privacy reasons: reading it as "test" labelled production runs as tests. A run whose header predates origin therefore reads NULL rather than claiming either answer.
30894
+ */
30877
30895
  test: boolean | null;
30878
30896
  /** @description Metered cost as a decimal string. */
30879
30897
  totalCost: string | null;
@@ -40041,7 +40059,7 @@ interface paths {
40041
40059
  };
40042
40060
  /**
40043
40061
  * List runs
40044
- * @description Every agent and flow run in the span store, newest start first. A run dispatched with `storeResults: false` is listed with `test: true` rather than being invisible. `overlay=live` adds live control-plane fields; the overlay never adds, drops or reorders a row. Returns 404 when run reads are not enabled for the organization.
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"`; both are null when the header states nothing. `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.
40045
40063
  */
40046
40064
  get: {
40047
40065
  parameters: {
@@ -40074,7 +40092,7 @@ interface paths {
40074
40092
  from?: string;
40075
40093
  /** @description Window end (ISO 8601). Defaults to now. */
40076
40094
  to?: string;
40077
- /** @description full (the default) returns every field. compact omits exactly these 14: stopReason, iterations, agentVersionId, agentVersionLabel, agentVersionNumber, agentTargetResolution, otelProducer, lastHeartbeatAt, expiresAt, cancelRequestedAt, progress, pendingApproval, budgetExhausted and inputMessages. The status is still overlay-corrected on a compact page; only the fields differ. */
40095
+ /** @description full (the default) returns every field. compact omits exactly these 15: stopReason, iterations, inputPreview, agentVersionId, agentVersionLabel, agentVersionNumber, agentTargetResolution, otelProducer, lastHeartbeatAt, expiresAt, cancelRequestedAt, progress, pendingApproval, budgetExhausted and inputMessages. The status is still overlay-corrected on a compact page; only the fields differ. */
40078
40096
  view?: "compact" | "full";
40079
40097
  /** @description live adds control-plane fields; defaults to live for a session, none for an API key. */
40080
40098
  overlay?: "live" | "none";
@@ -40138,13 +40156,20 @@ interface paths {
40138
40156
  "application/json": components["schemas"]["Error"];
40139
40157
  };
40140
40158
  };
40141
- /** @description Run reads are not enabled for this organization */
40159
+ /** @description No plane can answer: store run reads are off for this organization and the request names a predicate the control plane cannot express */
40142
40160
  404: {
40143
40161
  headers: {
40144
40162
  [name: string]: unknown;
40145
40163
  };
40146
40164
  content: {
40147
- "application/json": components["schemas"]["Error"];
40165
+ "application/json": {
40166
+ /**
40167
+ * @description Neither plane can serve this page, so the caller shows "no run history" rather than a failed read. Matching on the sentence is never the contract.
40168
+ * @enum {string}
40169
+ */
40170
+ code: "run_history_unavailable";
40171
+ error: string;
40172
+ };
40148
40173
  };
40149
40174
  };
40150
40175
  /** @description Internal server error */
@@ -40182,7 +40207,7 @@ interface paths {
40182
40207
  query?: {
40183
40208
  /** @description live adds control-plane fields; defaults to live for a session, none for an API key. */
40184
40209
  overlay?: "live" | "none";
40185
- /** @description full (the default) returns every field. compact omits exactly these 14: stopReason, iterations, agentVersionId, agentVersionLabel, agentVersionNumber, agentTargetResolution, otelProducer, lastHeartbeatAt, expiresAt, cancelRequestedAt, progress, pendingApproval, budgetExhausted and inputMessages. The status is still overlay-corrected on a compact page; only the fields differ. */
40210
+ /** @description full (the default) returns every field. compact omits exactly these 15: stopReason, iterations, inputPreview, agentVersionId, agentVersionLabel, agentVersionNumber, agentTargetResolution, otelProducer, lastHeartbeatAt, expiresAt, cancelRequestedAt, progress, pendingApproval, budgetExhausted and inputMessages. The status is still overlay-corrected on a compact page; only the fields differ. */
40186
40211
  view?: "compact" | "full";
40187
40212
  };
40188
40213
  header?: never;
@@ -50949,8 +50974,12 @@ interface components {
50949
50974
  fidelityTier: string | null;
50950
50975
  /** @description Flow that ran. */
50951
50976
  flowId: string | null;
50977
+ /** @description True when the dispatch carried a complete inline agent definition (name and model) beside or instead of an agentId, so the run executed that inline config and no stored version; such a row stamps no agentVersionId. False when the run executed the saved definition by reference. NULL when the header states nothing: a flow run, a lane that resolves no agent definition, or a row that predates the field. */
50978
+ inlineDefinition: boolean | null;
50952
50979
  /** @description Messages the run started from. Absent means the overlay did not answer, which is not false and not null. */
50953
50980
  inputMessages?: unknown;
50981
+ /** @description The run's first user message, secret-scrubbed and cut to 160 characters, so a list can say what a run was asked to do without reading content. Absent means no input text is recorded for this run, which is not an empty message: the span store holds no run-level input at all, so a run with no control-plane row (a flow leg, a storeResults:false run) has none. */
50982
+ inputPreview?: string | null;
50954
50983
  /** @description Input tokens reported. */
50955
50984
  inputTokens: number | null;
50956
50985
  /** @description Loop iterations from the terminal frame. */
@@ -50962,6 +50991,11 @@ interface components {
50962
50991
  kind: "agent" | "flow";
50963
50992
  /** @description Last heartbeat. Absent means the overlay did not answer, which is not false and not null. */
50964
50993
  lastHeartbeatAt?: string | null;
50994
+ /**
50995
+ * @description Where the run was dispatched from, taken from the caller's authenticated principal and never from a request field: dashboard for a Clerk session, api for a management API key, internal for a Runtype worker. NULL means the header states nothing about it, which is not "unknown caller": headers written before this field shipped, lanes that never see an auth principal, and every backfilled row carry no origin stamp.
50996
+ * @enum {string|null}
50997
+ */
50998
+ origin: "dashboard" | "api" | "internal" | null;
50965
50999
  /** @description Framework identity the producer reported, for a versionless run group. Absent means the overlay did not answer, which is not false and not null. */
50966
51000
  otelProducer?: unknown;
50967
51001
  /** @description Output tokens reported. */
@@ -50998,11 +51032,16 @@ interface components {
50998
51032
  status: "queued" | "running" | "awaiting" | "completed" | "failed" | "cancelled";
50999
51033
  /** @description Stop reason from the terminal frame. */
51000
51034
  stopReason?: string | null;
51035
+ /** @description The persistence posture the dispatch declared. FALSE means the run wrote no control-plane row, no journal outputs and no span content, so a surface that reports a missing transcript keys on this and never on origin. NULL means the header states nothing, which is not "true": a lane that takes no such flag carries no stamp, and an ingested (OTLP) run declared none. A row served from the legacy control-plane lane answers true, because that row exists only when the run stored. */
51036
+ storeResults: boolean | null;
51001
51037
  /** @description Product surface that entered this run. */
51002
51038
  surfaceId: string | null;
51003
51039
  /** @description Surface family (api, chat, webhook, schedule, ...). */
51004
51040
  surfaceType: string | null;
51005
- /** @description True when the run was dispatched with storeResults: false, so it has no control-plane row and no overlay. NULL means the header states nothing about it, which is not false: headers written before this field shipped, and lanes that take no such flag, carry no dispatch stamp and are never backfilled. */
51041
+ /**
51042
+ * @deprecated
51043
+ * @description DEPRECATED: a derived alias of origin, kept for one release — read origin instead. True when the run came from the dashboard, i.e. origin === "dashboard"; NULL exactly when origin is NULL. It is never derived from storeResults, which defaults to false across the whole flow lane and which an API caller sets for its own privacy reasons: reading it as "test" labelled production runs as tests. A run whose header predates origin therefore reads NULL rather than claiming either answer.
51044
+ */
51006
51045
  test: boolean | null;
51007
51046
  /** @description Metered cost as a decimal string. */
51008
51047
  totalCost: string | null;
@@ -57898,13 +57937,39 @@ interface RunListRow {
57898
57937
  totalCost: string | null;
57899
57938
  selfReportedCost: string | null;
57900
57939
  /**
57901
- * True when the run was dispatched with `storeResults: false`, such as an
57902
- * editor test. NULL means the header states nothing about it, which is not
57903
- * `false`: headers written before the field shipped carry no dispatch stamp.
57940
+ * Where the run was dispatched from, taken from the caller's authenticated
57941
+ * principal and never from a request field. NULL means the header states
57942
+ * nothing about it: a lane that sees no principal, or a backfilled row.
57943
+ */
57944
+ origin: 'dashboard' | 'api' | 'internal' | null;
57945
+ /**
57946
+ * The persistence posture the dispatch declared. `false` means the run kept no
57947
+ * control-plane row, no journal outputs and no span content, so a surface
57948
+ * reporting a missing transcript reads this and never `origin`.
57949
+ */
57950
+ storeResults: boolean | null;
57951
+ /**
57952
+ * True when the dispatch carried a complete inline definition, so the run
57953
+ * executed that config and stamps no `agentVersionId`. False for a run of the
57954
+ * saved definition by reference. NULL when the header states nothing.
57955
+ */
57956
+ inlineDefinition: boolean | null;
57957
+ /**
57958
+ * True when the run came from the dashboard (`origin === 'dashboard'`), such
57959
+ * as an editor test.
57960
+ * @deprecated Derived alias of `origin`; read `origin` instead. Kept for one
57961
+ * release. NULL exactly when `origin` is NULL, including on a run whose header
57962
+ * predates the field.
57904
57963
  */
57905
57964
  test: boolean | null;
57906
57965
  stopReason?: string | null;
57907
57966
  iterations?: number | null;
57967
+ /**
57968
+ * The run's first user message, secret-scrubbed and bounded. Absent means no
57969
+ * input text is recorded for the run, which is not an empty message: a run
57970
+ * with no control-plane row carries none.
57971
+ */
57972
+ inputPreview?: string | null;
57908
57973
  /** Overlay fields. Absent means the overlay did not answer, never `false`. */
57909
57974
  agentVersionId?: string | null;
57910
57975
  agentVersionLabel?: string | null;
@@ -57959,8 +58024,8 @@ interface RunListResponse {
57959
58024
  }
57960
58025
  /**
57961
58026
  * Read-only namespace over `/v1/runs`, the one list of agent and flow runs.
57962
- * A run dispatched with `storeResults: false` is listed with `test: true`
57963
- * rather than being absent.
58027
+ * A dashboard editor test is listed with `origin: 'dashboard'` (and its `test`
58028
+ * alias) rather than being absent.
57964
58029
  */
57965
58030
  declare class RunsNamespace {
57966
58031
  private readonly getClient;
@@ -58931,7 +58996,10 @@ declare class Runtype {
58931
58996
  static get executions(): ExecutionsNamespace;
58932
58997
  /**
58933
58998
  * Runs namespace - the one list of agent and flow runs, read from the span
58934
- * store. Includes runs dispatched with `storeResults: false` as `test: true`.
58999
+ * store. Each row states two separate facts: `origin` (who dispatched, from
59000
+ * the caller's principal; `test` is its deprecated alias) and `storeResults`
59001
+ * (whether the transcript was kept). A run that wrote no control-plane row
59002
+ * is still listed.
58935
59003
  *
58936
59004
  * @example
58937
59005
  * ```typescript
package/dist/index.mjs CHANGED
@@ -13639,7 +13639,10 @@ var Runtype = class {
13639
13639
  }
13640
13640
  /**
13641
13641
  * Runs namespace - the one list of agent and flow runs, read from the span
13642
- * store. Includes runs dispatched with `storeResults: false` as `test: true`.
13642
+ * store. Each row states two separate facts: `origin` (who dispatched, from
13643
+ * the caller's principal; `test` is its deprecated alias) and `storeResults`
13644
+ * (whether the transcript was kept). A run that wrote no control-plane row
13645
+ * is still listed.
13643
13646
  *
13644
13647
  * @example
13645
13648
  * ```typescript
@@ -13931,7 +13934,7 @@ function transformQueryParams(params) {
13931
13934
 
13932
13935
  // src/version.ts
13933
13936
  var FALLBACK_VERSION = "0.0.0";
13934
- var SDK_VERSION = "10.1.1".length > 0 ? "10.1.1" : FALLBACK_VERSION;
13937
+ var SDK_VERSION = "10.1.4".length > 0 ? "10.1.4" : FALLBACK_VERSION;
13935
13938
  var RUNTYPE_CLIENT_KIND = "sdk";
13936
13939
  var SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
13937
13940
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtypelabs/sdk",
3
- "version": "10.1.1",
3
+ "version": "10.1.4",
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.57.2",
27
+ "@runtypelabs/shared": "3.58.1",
28
28
  "openapi-typescript": "^7.13.0",
29
29
  "tsup": "^8.0.2",
30
30
  "typescript": "^6.0.3",