@runtypelabs/sdk 6.6.2 → 6.6.3

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.d.ts CHANGED
@@ -6750,13 +6750,16 @@ interface paths {
6750
6750
  "application/json": components["schemas"]["Error"];
6751
6751
  };
6752
6752
  };
6753
- /** @description Session not found or expired */
6753
+ /** @description Session not found or expired, or an `identityProof` was supplied that failed verification (`invalid_identity_proof`, fail-closed: the turn never runs). Identity-proof rejections carry `errorDescription` naming the reason. */
6754
6754
  401: {
6755
6755
  headers: {
6756
6756
  [name: string]: unknown;
6757
6757
  };
6758
6758
  content: {
6759
- "application/json": components["schemas"]["Error"];
6759
+ "application/json": components["schemas"]["Error"] & {
6760
+ /** @description Why the supplied `identityProof` was refused (for example an expired assertion, an unknown issuer, or a proof minted for another tenant). Diagnostic text for the embedding site, not a value to branch on. */
6761
+ errorDescription?: string;
6762
+ };
6760
6763
  };
6761
6764
  };
6762
6765
  /** @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). */
@@ -6777,7 +6780,7 @@ interface paths {
6777
6780
  "application/json": components["schemas"]["Error"];
6778
6781
  };
6779
6782
  };
6780
- /** @description Conflict. Either the client tools registry fingerprint was not found (`client_tools_resend_required`; resend full clientTools[]. The response may include `clientToolsFingerprint` for retry correlation), or this turn was superseded by a newer interrupting turn before it could start (`turn_superseded`). */
6783
+ /** @description Conflict. Either the client tools registry fingerprint was not found (`client_tools_resend_required`; resend the full `clientTools[]` with the fingerprint), or this turn was superseded by a newer interrupting turn before it could start (`turn_superseded`). The body carries `error` alone. */
6781
6784
  409: {
6782
6785
  headers: {
6783
6786
  [name: string]: unknown;
@@ -6812,6 +6815,426 @@ interface paths {
6812
6815
  patch?: never;
6813
6816
  trace?: never;
6814
6817
  };
6818
+ "/v1/client/conversations": {
6819
+ parameters: {
6820
+ query?: never;
6821
+ header?: never;
6822
+ path?: never;
6823
+ cookie?: never;
6824
+ };
6825
+ /**
6826
+ * List the visitor's own conversations
6827
+ * @description List conversations belonging to the calling browser's anonymous visitor, newest first, cursor-paginated. Requires both a live `sessionId` and the `X-Visitor-Token` secret from `/client/init`; the site-wide client token alone can never reach this route.
6828
+ */
6829
+ get: {
6830
+ parameters: {
6831
+ query: {
6832
+ /** @description Client session id from /client/init. */
6833
+ sessionId: string;
6834
+ /** @description Only return conversations for this flow or agent id. */
6835
+ flowId?: string;
6836
+ /** @description Opaque cursor returned as `nextCursor` by a previous page. Omit for the first page. */
6837
+ cursor?: string;
6838
+ /** @description Page size as a decimal string. Defaults to 25, clamped to a maximum of 100. A non-numeric or non-positive value falls back to the default. */
6839
+ limit?: string;
6840
+ };
6841
+ header: {
6842
+ /** @description The browser's anonymous visitor secret (`cvt_…`) returned by `/client/init`. It is what scopes the request to one visitor's own conversations, so a request without it is refused. Sent as a header so it never lands in access logs or `Referer`. */
6843
+ "x-visitor-token": string;
6844
+ /** @description Optional fresh hosted end-user identity proof. When admitted and already bound to the presented visitor, expands the request from this exact browser to sibling visitors for the same verified person. Without it, even a previously bound visitor remains exact-browser scoped. */
6845
+ "x-identity-proof"?: string;
6846
+ };
6847
+ path?: never;
6848
+ cookie?: never;
6849
+ };
6850
+ requestBody?: never;
6851
+ responses: {
6852
+ /** @description Conversations page */
6853
+ 200: {
6854
+ headers: {
6855
+ [name: string]: unknown;
6856
+ };
6857
+ content: {
6858
+ "application/json": {
6859
+ /** @description Conversations owned by the calling visitor, newest first. */
6860
+ data: {
6861
+ /** @description ISO-8601 timestamp of the first turn, i.e. when the conversation was created. */
6862
+ createdAt: string;
6863
+ /** @description The flow or agent this conversation ran against. Null for a conversation stored without one. */
6864
+ flowId: string | null;
6865
+ /** @description Conversation id. */
6866
+ id: string;
6867
+ /** @description Number of stored messages. Falls back to the length of the stored transcript when the conversation predates the counter. */
6868
+ messageCount: number;
6869
+ /** @description Display title. Uses a timestamp fallback unless conversation-title generation is enabled and produces a title from the opening exchange. */
6870
+ title: string;
6871
+ /** @description ISO-8601 timestamp of the most recent write. Sort key for "resume where I left off" in a widget. */
6872
+ updatedAt: string;
6873
+ }[];
6874
+ /** @description Opaque cursor for the next page, or null when exhausted. */
6875
+ nextCursor: string | null;
6876
+ };
6877
+ };
6878
+ };
6879
+ /** @description Missing or malformed `sessionId`, or an undecodable `cursor` */
6880
+ 400: {
6881
+ headers: {
6882
+ [name: string]: unknown;
6883
+ };
6884
+ content: {
6885
+ "application/json": components["schemas"]["Error"];
6886
+ };
6887
+ };
6888
+ /** @description Session expired, or missing/invalid visitor token */
6889
+ 401: {
6890
+ headers: {
6891
+ [name: string]: unknown;
6892
+ };
6893
+ content: {
6894
+ "application/json": components["schemas"]["Error"];
6895
+ };
6896
+ };
6897
+ /** @description Client token inactive or origin mismatch */
6898
+ 403: {
6899
+ headers: {
6900
+ [name: string]: unknown;
6901
+ };
6902
+ content: {
6903
+ "application/json": components["schemas"]["Error"];
6904
+ };
6905
+ };
6906
+ /** @description Rate limit exceeded for this client token or session. The response carries a `Retry-After` header with the advisory wait in seconds. */
6907
+ 429: {
6908
+ headers: {
6909
+ [name: string]: unknown;
6910
+ };
6911
+ content: {
6912
+ "application/json": components["schemas"]["Error"];
6913
+ };
6914
+ };
6915
+ /** @description Internal server error */
6916
+ 500: {
6917
+ headers: {
6918
+ [name: string]: unknown;
6919
+ };
6920
+ content: {
6921
+ "application/json": components["schemas"]["Error"];
6922
+ };
6923
+ };
6924
+ };
6925
+ };
6926
+ put?: never;
6927
+ post?: never;
6928
+ /**
6929
+ * Delete all of the visitor's own conversations
6930
+ * @description Permanently delete every conversation belonging to the calling visitor, with their transcripts. Intended for a widget's "clear my history" control and for host-site privacy-erasure hooks.
6931
+ */
6932
+ delete: {
6933
+ parameters: {
6934
+ query: {
6935
+ /** @description Client session id from /client/init. */
6936
+ sessionId: string;
6937
+ };
6938
+ header: {
6939
+ /** @description The browser's anonymous visitor secret (`cvt_…`) returned by `/client/init`. It is what scopes the request to one visitor's own conversations, so a request without it is refused. Sent as a header so it never lands in access logs or `Referer`. */
6940
+ "x-visitor-token": string;
6941
+ /** @description Optional fresh hosted end-user identity proof. When admitted and already bound to the presented visitor, expands the request from this exact browser to sibling visitors for the same verified person. Without it, even a previously bound visitor remains exact-browser scoped. */
6942
+ "x-identity-proof"?: string;
6943
+ };
6944
+ path?: never;
6945
+ cookie?: never;
6946
+ };
6947
+ requestBody?: never;
6948
+ responses: {
6949
+ /** @description Deleted. `deleted` counts the rows removed and is 0 when the visitor had no history. */
6950
+ 200: {
6951
+ headers: {
6952
+ [name: string]: unknown;
6953
+ };
6954
+ content: {
6955
+ "application/json": {
6956
+ /** @description Number of conversations deleted. The delete-all route returns 0 when the visitor has no history, rather than an error. */
6957
+ deleted: number;
6958
+ };
6959
+ };
6960
+ };
6961
+ /** @description Missing or malformed `sessionId` */
6962
+ 400: {
6963
+ headers: {
6964
+ [name: string]: unknown;
6965
+ };
6966
+ content: {
6967
+ "application/json": components["schemas"]["Error"];
6968
+ };
6969
+ };
6970
+ /** @description Session expired, or missing/invalid visitor token */
6971
+ 401: {
6972
+ headers: {
6973
+ [name: string]: unknown;
6974
+ };
6975
+ content: {
6976
+ "application/json": components["schemas"]["Error"];
6977
+ };
6978
+ };
6979
+ /** @description Client token inactive or origin mismatch */
6980
+ 403: {
6981
+ headers: {
6982
+ [name: string]: unknown;
6983
+ };
6984
+ content: {
6985
+ "application/json": components["schemas"]["Error"];
6986
+ };
6987
+ };
6988
+ /** @description Rate limit exceeded for this client token or session. The response carries a `Retry-After` header with the advisory wait in seconds. */
6989
+ 429: {
6990
+ headers: {
6991
+ [name: string]: unknown;
6992
+ };
6993
+ content: {
6994
+ "application/json": components["schemas"]["Error"];
6995
+ };
6996
+ };
6997
+ /** @description Internal server error */
6998
+ 500: {
6999
+ headers: {
7000
+ [name: string]: unknown;
7001
+ };
7002
+ content: {
7003
+ "application/json": components["schemas"]["Error"];
7004
+ };
7005
+ };
7006
+ };
7007
+ };
7008
+ options?: never;
7009
+ head?: never;
7010
+ patch?: never;
7011
+ trace?: never;
7012
+ };
7013
+ "/v1/client/conversations/{id}": {
7014
+ parameters: {
7015
+ query?: never;
7016
+ header?: never;
7017
+ path?: never;
7018
+ cookie?: never;
7019
+ };
7020
+ /**
7021
+ * Read one of the visitor's own conversations
7022
+ * @description Return a single conversation with its message transcript. Answers 404 (never 403) for a conversation the caller does not own, so the route cannot be used to probe for other visitors' conversations.
7023
+ */
7024
+ get: {
7025
+ parameters: {
7026
+ query: {
7027
+ /** @description Client session id from /client/init. */
7028
+ sessionId: string;
7029
+ /** @description Opaque cursor returned as `nextMessageCursor` by a previous detail response. Omit for the newest message page. */
7030
+ messageCursor?: string;
7031
+ /** @description Message page size as a decimal string. Defaults to 25 and is clamped to 25 to bound media rehydration and Worker memory. */
7032
+ messageLimit?: string;
7033
+ };
7034
+ header: {
7035
+ /** @description The browser's anonymous visitor secret (`cvt_…`) returned by `/client/init`. It is what scopes the request to one visitor's own conversations, so a request without it is refused. Sent as a header so it never lands in access logs or `Referer`. */
7036
+ "x-visitor-token": string;
7037
+ /** @description Optional fresh hosted end-user identity proof. When admitted and already bound to the presented visitor, expands the request from this exact browser to sibling visitors for the same verified person. Without it, even a previously bound visitor remains exact-browser scoped. */
7038
+ "x-identity-proof"?: string;
7039
+ };
7040
+ path: {
7041
+ /** @description Conversation id from the list route. */
7042
+ id: string;
7043
+ };
7044
+ cookie?: never;
7045
+ };
7046
+ requestBody?: never;
7047
+ responses: {
7048
+ /** @description Conversation */
7049
+ 200: {
7050
+ headers: {
7051
+ [name: string]: unknown;
7052
+ };
7053
+ content: {
7054
+ "application/json": {
7055
+ /** @description ISO-8601 timestamp of the first turn, i.e. when the conversation was created. */
7056
+ createdAt: string;
7057
+ /** @description The flow or agent this conversation ran against. Null for a conversation stored without one. */
7058
+ flowId: string | null;
7059
+ /** @description Conversation id. */
7060
+ id: string;
7061
+ /** @description Number of stored messages. Falls back to the length of the stored transcript when the conversation predates the counter. */
7062
+ messageCount: number;
7063
+ /** @description The stored transcript, oldest first. Renderable fields only: tool invocations and other execution internals are not exposed here. */
7064
+ messages: {
7065
+ /** @description Message content exactly as stored: a plain string, or an array of multi-modal content parts. Absent on a stored message that carried no content. */
7066
+ content?: unknown;
7067
+ /** @description Client-supplied or server-minted message id. */
7068
+ id: string;
7069
+ /** @description Message author, typically 'user' or 'assistant'. */
7070
+ role: string;
7071
+ /** @description ISO-8601 send time. Absent on messages stored without one. */
7072
+ timestamp?: string;
7073
+ }[];
7074
+ /** @description Opaque cursor for the next older message page, or null when the beginning is reached. */
7075
+ nextMessageCursor: string | null;
7076
+ /** @description Display title. Uses a timestamp fallback unless conversation-title generation is enabled and produces a title from the opening exchange. */
7077
+ title: string;
7078
+ /** @description ISO-8601 timestamp of the most recent write. Sort key for "resume where I left off" in a widget. */
7079
+ updatedAt: string;
7080
+ };
7081
+ };
7082
+ };
7083
+ /** @description Missing or malformed `sessionId` */
7084
+ 400: {
7085
+ headers: {
7086
+ [name: string]: unknown;
7087
+ };
7088
+ content: {
7089
+ "application/json": components["schemas"]["Error"];
7090
+ };
7091
+ };
7092
+ /** @description Session expired, or missing/invalid visitor token */
7093
+ 401: {
7094
+ headers: {
7095
+ [name: string]: unknown;
7096
+ };
7097
+ content: {
7098
+ "application/json": components["schemas"]["Error"];
7099
+ };
7100
+ };
7101
+ /** @description Client token inactive or origin mismatch */
7102
+ 403: {
7103
+ headers: {
7104
+ [name: string]: unknown;
7105
+ };
7106
+ content: {
7107
+ "application/json": components["schemas"]["Error"];
7108
+ };
7109
+ };
7110
+ /** @description No such conversation for this visitor */
7111
+ 404: {
7112
+ headers: {
7113
+ [name: string]: unknown;
7114
+ };
7115
+ content: {
7116
+ "application/json": components["schemas"]["Error"];
7117
+ };
7118
+ };
7119
+ /** @description Rate limit exceeded for this client token or session. The response carries a `Retry-After` header with the advisory wait in seconds. */
7120
+ 429: {
7121
+ headers: {
7122
+ [name: string]: unknown;
7123
+ };
7124
+ content: {
7125
+ "application/json": components["schemas"]["Error"];
7126
+ };
7127
+ };
7128
+ /** @description Internal server error */
7129
+ 500: {
7130
+ headers: {
7131
+ [name: string]: unknown;
7132
+ };
7133
+ content: {
7134
+ "application/json": components["schemas"]["Error"];
7135
+ };
7136
+ };
7137
+ };
7138
+ };
7139
+ put?: never;
7140
+ post?: never;
7141
+ /**
7142
+ * Delete one of the visitor's own conversations
7143
+ * @description Permanently delete a conversation and its stored transcript. Answers 404 (never 403) for a conversation the caller does not own.
7144
+ */
7145
+ delete: {
7146
+ parameters: {
7147
+ query: {
7148
+ /** @description Client session id from /client/init. */
7149
+ sessionId: string;
7150
+ };
7151
+ header: {
7152
+ /** @description The browser's anonymous visitor secret (`cvt_…`) returned by `/client/init`. It is what scopes the request to one visitor's own conversations, so a request without it is refused. Sent as a header so it never lands in access logs or `Referer`. */
7153
+ "x-visitor-token": string;
7154
+ /** @description Optional fresh hosted end-user identity proof. When admitted and already bound to the presented visitor, expands the request from this exact browser to sibling visitors for the same verified person. Without it, even a previously bound visitor remains exact-browser scoped. */
7155
+ "x-identity-proof"?: string;
7156
+ };
7157
+ path: {
7158
+ /** @description Conversation id from the list route. */
7159
+ id: string;
7160
+ };
7161
+ cookie?: never;
7162
+ };
7163
+ requestBody?: never;
7164
+ responses: {
7165
+ /** @description Deleted. `deleted` is always 1 on this route. */
7166
+ 200: {
7167
+ headers: {
7168
+ [name: string]: unknown;
7169
+ };
7170
+ content: {
7171
+ "application/json": {
7172
+ /** @description Number of conversations deleted. The delete-all route returns 0 when the visitor has no history, rather than an error. */
7173
+ deleted: number;
7174
+ };
7175
+ };
7176
+ };
7177
+ /** @description Missing or malformed `sessionId` */
7178
+ 400: {
7179
+ headers: {
7180
+ [name: string]: unknown;
7181
+ };
7182
+ content: {
7183
+ "application/json": components["schemas"]["Error"];
7184
+ };
7185
+ };
7186
+ /** @description Session expired, or missing/invalid visitor token */
7187
+ 401: {
7188
+ headers: {
7189
+ [name: string]: unknown;
7190
+ };
7191
+ content: {
7192
+ "application/json": components["schemas"]["Error"];
7193
+ };
7194
+ };
7195
+ /** @description Client token inactive or origin mismatch */
7196
+ 403: {
7197
+ headers: {
7198
+ [name: string]: unknown;
7199
+ };
7200
+ content: {
7201
+ "application/json": components["schemas"]["Error"];
7202
+ };
7203
+ };
7204
+ /** @description No such conversation for this visitor */
7205
+ 404: {
7206
+ headers: {
7207
+ [name: string]: unknown;
7208
+ };
7209
+ content: {
7210
+ "application/json": components["schemas"]["Error"];
7211
+ };
7212
+ };
7213
+ /** @description Rate limit exceeded for this client token or session. The response carries a `Retry-After` header with the advisory wait in seconds. */
7214
+ 429: {
7215
+ headers: {
7216
+ [name: string]: unknown;
7217
+ };
7218
+ content: {
7219
+ "application/json": components["schemas"]["Error"];
7220
+ };
7221
+ };
7222
+ /** @description Internal server error */
7223
+ 500: {
7224
+ headers: {
7225
+ [name: string]: unknown;
7226
+ };
7227
+ content: {
7228
+ "application/json": components["schemas"]["Error"];
7229
+ };
7230
+ };
7231
+ };
7232
+ };
7233
+ options?: never;
7234
+ head?: never;
7235
+ patch?: never;
7236
+ trace?: never;
7237
+ };
6815
7238
  "/v1/client/feedback": {
6816
7239
  parameters: {
6817
7240
  query?: never;
@@ -6886,7 +7309,7 @@ interface paths {
6886
7309
  "application/json": components["schemas"]["Error"];
6887
7310
  };
6888
7311
  };
6889
- /** @description Invalid client token (when a `token` is supplied) */
7312
+ /** @description Invalid client token. The `token` field is required on every feedback call. */
6890
7313
  401: {
6891
7314
  headers: {
6892
7315
  [name: string]: unknown;
@@ -6941,7 +7364,7 @@ interface paths {
6941
7364
  put?: never;
6942
7365
  /**
6943
7366
  * Initialize a client session
6944
- * @description Exchange a client token for a browser chat session. Validates the token + request `Origin`, resolves the target flow or agent, and returns the session id plus widget display config. Pass an existing `sessionId` to reuse a prior conversation record.
7367
+ * @description Exchange a client token for a browser chat session. Validates the token + request `Origin`, resolves the target flow or agent, and returns the session id plus widget display config. Pass an existing `sessionId` for legacy resume, or a visitor-authorized `conversationId` returned by the history list to reopen a conversation across sessions or verified devices.
6945
7368
  */
6946
7369
  post: {
6947
7370
  parameters: {
@@ -6954,8 +7377,31 @@ interface paths {
6954
7377
  content: {
6955
7378
  "application/json": {
6956
7379
  flowId?: string;
6957
- sessionId?: string;
7380
+ identityProof?: string;
7381
+ token: string;
7382
+ visitorHistory?: boolean;
7383
+ visitorToken?: string;
7384
+ } | {
7385
+ flowId?: string;
7386
+ identityProof?: string;
7387
+ sessionId: string;
7388
+ token: string;
7389
+ visitorHistory?: boolean;
7390
+ visitorToken?: string;
7391
+ } | {
7392
+ conversationId: string;
7393
+ flowId?: string;
7394
+ identityProof?: string;
6958
7395
  token: string;
7396
+ visitorHistory?: boolean;
7397
+ visitorToken: string;
7398
+ } | {
7399
+ conversationId: string;
7400
+ flowId?: string;
7401
+ identityProof: string;
7402
+ token: string;
7403
+ visitorHistory?: boolean;
7404
+ visitorToken?: string;
6959
7405
  };
6960
7406
  };
6961
7407
  };
@@ -6967,22 +7413,44 @@ interface paths {
6967
7413
  };
6968
7414
  content: {
6969
7415
  "application/json": {
7416
+ /** @description Present instead of `flow` for a Runtype App token whose manifest declares record namespaces but no flows or agents. Exactly one of `flow` and `app` is returned. */
7417
+ app?: {
7418
+ /** @description Runtype App id backing this session. */
7419
+ id: string;
7420
+ };
7421
+ /** @description Widget display config, read from the client token's stored config. Always returned, with null standing in for an unset welcome message or theme. */
6970
7422
  config: {
6971
- placeholder?: string;
7423
+ /** @description Composer placeholder text. Defaults to 'Type your message...' when the client token sets none. */
7424
+ placeholder: string;
7425
+ /** @description Persona theme tokens stored on the client token, passed through verbatim. Null when unthemed. */
6972
7426
  theme?: unknown;
6973
- welcomeMessage?: string | null;
7427
+ /** @description Opening message to render before the visitor's first turn. Null when the client token sets none. */
7428
+ welcomeMessage: string | null;
6974
7429
  };
6975
7430
  /** @description ISO-8601 session idle-expiry timestamp. */
6976
7431
  expiresAt: string;
6977
- /** @description Resolved flow/agent for this session. */
7432
+ /** @description Resolved flow or agent for this session. Present on every response except the data-only Runtype App branch, which returns `app` instead. */
6978
7433
  flow?: {
7434
+ /** @description Flow description, null when the flow has none. Flow sessions only. */
6979
7435
  description?: string | null;
6980
7436
  /** @description Resolved flow or agent ID for this session. */
6981
7437
  id: string;
6982
- name?: string | null;
7438
+ /** @description Flow name. Present only for a flow session; the agent branch returns `id` alone because the widget does not render either field. */
7439
+ name?: string;
6983
7440
  };
6984
7441
  /** @description The created (or resumed) client session ID. */
6985
7442
  sessionId: string;
7443
+ /** @description The browser's anonymous visitor identity. Present when the request opts into visitor history (or supplies a visitor token, identity proof, or conversation id). Authenticates the `/client/conversations*` history routes, which the site-wide client token alone cannot reach. */
7444
+ visitor?: {
7445
+ /** @description The verified end user (`eu_…`) this browser is bound to, when an `identityProof` was admitted. Null while anonymous. Cross-device reads still require a fresh `identityProof` on that request; the stored binding alone remains exact-browser scoped. */
7446
+ endUserId: string | null;
7447
+ /** @description ISO-8601 sliding idle-expiry for this visitor. */
7448
+ expiresAt: string;
7449
+ /** @description Durable anonymous visitor id (`cvis_…`). */
7450
+ id: string;
7451
+ /** @description The raw visitor secret (`cvt_…`). Returned ONLY when this init newly mints a visitor. Store it and send it back as `visitorToken` on the next init; it is unrecoverable afterwards. Reset itself returns no replacement; the next history-capable init mints one. */
7452
+ token?: string;
7453
+ };
6986
7454
  };
6987
7455
  };
6988
7456
  };
@@ -6995,13 +7463,16 @@ interface paths {
6995
7463
  "application/json": components["schemas"]["Error"];
6996
7464
  };
6997
7465
  };
6998
- /** @description Invalid client token */
7466
+ /** @description Invalid client token, or an `identityProof` was supplied that failed verification (`invalid_identity_proof`, fail-closed: nothing is bound). Identity-proof rejections carry `errorDescription` naming the reason. */
6999
7467
  401: {
7000
7468
  headers: {
7001
7469
  [name: string]: unknown;
7002
7470
  };
7003
7471
  content: {
7004
- "application/json": components["schemas"]["Error"];
7472
+ "application/json": components["schemas"]["Error"] & {
7473
+ /** @description Why the supplied `identityProof` was refused (for example an expired assertion, an unknown issuer, or a proof minted for another tenant). Diagnostic text for the embedding site, not a value to branch on. */
7474
+ errorDescription?: string;
7475
+ };
7005
7476
  };
7006
7477
  };
7007
7478
  /** @description Client token inactive or origin not allowed */
@@ -7013,7 +7484,7 @@ interface paths {
7013
7484
  "application/json": components["schemas"]["Error"];
7014
7485
  };
7015
7486
  };
7016
- /** @description Referenced flow or agent not found */
7487
+ /** @description Referenced flow, agent, or visitor-authorized conversation not found. Conversations outside the visitor scope also answer 404. */
7017
7488
  404: {
7018
7489
  headers: {
7019
7490
  [name: string]: unknown;
@@ -7197,6 +7668,102 @@ interface paths {
7197
7668
  patch?: never;
7198
7669
  trace?: never;
7199
7670
  };
7671
+ "/v1/client/visitor/reset": {
7672
+ parameters: {
7673
+ query?: never;
7674
+ header?: never;
7675
+ path?: never;
7676
+ cookie?: never;
7677
+ };
7678
+ get?: never;
7679
+ put?: never;
7680
+ /**
7681
+ * Reset the current browser visitor
7682
+ * @description Explicit widget shutdown/logout lifecycle. Revokes the presented browser visitor when it still resolves, without deleting conversation records. The response is idempotent so it cannot reveal whether a visitor secret was valid. Clear the locally stored secret after success; a later history-capable init creates a clean anonymous visitor.
7683
+ */
7684
+ post: {
7685
+ parameters: {
7686
+ query: {
7687
+ /** @description Live client session id from /client/init. */
7688
+ sessionId: string;
7689
+ };
7690
+ header?: {
7691
+ /** @description The visitor secret to revoke. Omit when local storage is already empty; reset remains idempotent. */
7692
+ "x-visitor-token"?: string;
7693
+ };
7694
+ path?: never;
7695
+ cookie?: never;
7696
+ };
7697
+ requestBody?: never;
7698
+ responses: {
7699
+ /** @description Visitor reset accepted. */
7700
+ 200: {
7701
+ headers: {
7702
+ [name: string]: unknown;
7703
+ };
7704
+ content: {
7705
+ "application/json": {
7706
+ /**
7707
+ * @description Always true after the reset request is accepted, including when the supplied visitor was already expired or revoked.
7708
+ * @enum {boolean}
7709
+ */
7710
+ reset: true;
7711
+ };
7712
+ };
7713
+ };
7714
+ /** @description Missing or malformed `sessionId` */
7715
+ 400: {
7716
+ headers: {
7717
+ [name: string]: unknown;
7718
+ };
7719
+ content: {
7720
+ "application/json": components["schemas"]["Error"];
7721
+ };
7722
+ };
7723
+ /** @description Session expired */
7724
+ 401: {
7725
+ headers: {
7726
+ [name: string]: unknown;
7727
+ };
7728
+ content: {
7729
+ "application/json": components["schemas"]["Error"];
7730
+ };
7731
+ };
7732
+ /** @description Client token inactive or origin mismatch */
7733
+ 403: {
7734
+ headers: {
7735
+ [name: string]: unknown;
7736
+ };
7737
+ content: {
7738
+ "application/json": components["schemas"]["Error"];
7739
+ };
7740
+ };
7741
+ /** @description Rate limit exceeded for this client token or session. The response carries a `Retry-After` header. */
7742
+ 429: {
7743
+ headers: {
7744
+ [name: string]: unknown;
7745
+ };
7746
+ content: {
7747
+ "application/json": components["schemas"]["Error"];
7748
+ };
7749
+ };
7750
+ /** @description Internal server error */
7751
+ 500: {
7752
+ headers: {
7753
+ [name: string]: unknown;
7754
+ };
7755
+ content: {
7756
+ "application/json": components["schemas"]["Error"];
7757
+ };
7758
+ };
7759
+ };
7760
+ };
7761
+ delete?: never;
7762
+ options?: never;
7763
+ head?: never;
7764
+ patch?: never;
7765
+ trace?: never;
7766
+ };
7200
7767
  "/v1/collections": {
7201
7768
  parameters: {
7202
7769
  query?: never;
@@ -43392,6 +43959,8 @@ interface components {
43392
43959
  daily?: {
43393
43960
  atSpendLimit: boolean;
43394
43961
  date: string;
43962
+ /** @enum {string|null} */
43963
+ executionCapReason: "no_card_ceiling" | null;
43395
43964
  executionLimit: number;
43396
43965
  executionsUsed: number;
43397
43966
  inSlowMode: boolean;
@@ -43411,6 +43980,8 @@ interface components {
43411
43980
  monthly?: {
43412
43981
  atSpendLimit: boolean;
43413
43982
  date: string;
43983
+ /** @enum {string|null} */
43984
+ executionCapReason: "no_card_ceiling" | null;
43414
43985
  executionLimit: number;
43415
43986
  executionsUsed: number;
43416
43987
  inSlowMode: boolean;
@@ -44951,6 +45522,8 @@ interface components {
44951
45522
  daily?: {
44952
45523
  atSpendLimit: boolean;
44953
45524
  date: string;
45525
+ /** @enum {string|null} */
45526
+ executionCapReason: "no_card_ceiling" | null;
44954
45527
  executionLimit: number;
44955
45528
  executionsUsed: number;
44956
45529
  inSlowMode: boolean;
@@ -44974,6 +45547,8 @@ interface components {
44974
45547
  monthly?: {
44975
45548
  atSpendLimit: boolean;
44976
45549
  date: string;
45550
+ /** @enum {string|null} */
45551
+ executionCapReason: "no_card_ceiling" | null;
44977
45552
  executionLimit: number;
44978
45553
  executionsUsed: number;
44979
45554
  inSlowMode: boolean;