@archastro/sdk 0.19.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/dist/channels/api_artifact_channel.d.ts +48 -0
  2. package/dist/channels/api_artifact_channel.d.ts.map +1 -0
  3. package/dist/channels/api_artifact_channel.js +85 -0
  4. package/dist/channels/api_artifact_channel.js.map +1 -0
  5. package/dist/client.d.ts +7 -1
  6. package/dist/client.d.ts.map +1 -1
  7. package/dist/client.js +9 -3
  8. package/dist/client.js.map +1 -1
  9. package/dist/index.d.ts +1 -0
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +2 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/types/ai.d.ts +124 -10
  14. package/dist/types/ai.d.ts.map +1 -1
  15. package/dist/types/ai.js +27 -7
  16. package/dist/types/ai.js.map +1 -1
  17. package/dist/types/artifacts.d.ts +351 -0
  18. package/dist/types/artifacts.d.ts.map +1 -1
  19. package/dist/types/artifacts.js +65 -1
  20. package/dist/types/artifacts.js.map +1 -1
  21. package/dist/types/automations.d.ts +22 -22
  22. package/dist/types/automations.d.ts.map +1 -1
  23. package/dist/types/automations.js +7 -7
  24. package/dist/types/automations.js.map +1 -1
  25. package/dist/types/chat.d.ts +467 -0
  26. package/dist/types/chat.d.ts.map +1 -1
  27. package/dist/types/common.d.ts +1161 -296
  28. package/dist/types/common.d.ts.map +1 -1
  29. package/dist/types/common.js +148 -28
  30. package/dist/types/common.js.map +1 -1
  31. package/dist/types/computers.d.ts +22 -0
  32. package/dist/types/computers.d.ts.map +1 -0
  33. package/dist/types/computers.js +12 -0
  34. package/dist/types/computers.js.map +1 -0
  35. package/dist/types/events.d.ts +34 -16
  36. package/dist/types/events.d.ts.map +1 -1
  37. package/dist/types/events.js +3 -1
  38. package/dist/types/events.js.map +1 -1
  39. package/dist/types/index.d.ts +2 -0
  40. package/dist/types/index.d.ts.map +1 -1
  41. package/dist/types/index.js +3 -1
  42. package/dist/types/index.js.map +1 -1
  43. package/dist/types/relays.d.ts +22 -0
  44. package/dist/types/relays.d.ts.map +1 -0
  45. package/dist/types/relays.js +12 -0
  46. package/dist/types/relays.js.map +1 -0
  47. package/dist/types/tasks.d.ts +598 -14
  48. package/dist/types/tasks.d.ts.map +1 -1
  49. package/dist/types/tasks.js +43 -11
  50. package/dist/types/tasks.js.map +1 -1
  51. package/dist/types/teams.d.ts +20 -0
  52. package/dist/types/teams.d.ts.map +1 -1
  53. package/dist/types/teams.js +8 -1
  54. package/dist/types/teams.js.map +1 -1
  55. package/dist/types/threads.d.ts +78 -2
  56. package/dist/types/threads.d.ts.map +1 -1
  57. package/dist/types/threads.js +3 -3
  58. package/dist/types/threads.js.map +1 -1
  59. package/dist/v1/resources/agent_computers.d.ts +33 -1
  60. package/dist/v1/resources/agent_computers.d.ts.map +1 -1
  61. package/dist/v1/resources/agent_computers.js +17 -1
  62. package/dist/v1/resources/agent_computers.js.map +1 -1
  63. package/dist/v1/resources/agent_requests.d.ts +54 -0
  64. package/dist/v1/resources/agent_requests.d.ts.map +1 -0
  65. package/dist/v1/resources/agent_requests.js +71 -0
  66. package/dist/v1/resources/agent_requests.js.map +1 -0
  67. package/dist/v1/resources/agent_sessions.d.ts +23 -1
  68. package/dist/v1/resources/agent_sessions.d.ts.map +1 -1
  69. package/dist/v1/resources/agent_sessions.js +26 -1
  70. package/dist/v1/resources/agent_sessions.js.map +1 -1
  71. package/dist/v1/resources/agents.d.ts +32 -2
  72. package/dist/v1/resources/agents.d.ts.map +1 -1
  73. package/dist/v1/resources/agents.js +12 -2
  74. package/dist/v1/resources/agents.js.map +1 -1
  75. package/dist/v1/resources/ai.d.ts +76 -7
  76. package/dist/v1/resources/ai.d.ts.map +1 -1
  77. package/dist/v1/resources/ai.js +54 -4
  78. package/dist/v1/resources/ai.js.map +1 -1
  79. package/dist/v1/resources/artifacts.d.ts +35 -2
  80. package/dist/v1/resources/artifacts.d.ts.map +1 -1
  81. package/dist/v1/resources/artifacts.js +3 -2
  82. package/dist/v1/resources/artifacts.js.map +1 -1
  83. package/dist/v1/resources/custom_objects.d.ts +99 -0
  84. package/dist/v1/resources/custom_objects.d.ts.map +1 -1
  85. package/dist/v1/resources/custom_objects.js +64 -1
  86. package/dist/v1/resources/custom_objects.js.map +1 -1
  87. package/dist/v1/resources/event_subscriptions.d.ts +12 -0
  88. package/dist/v1/resources/event_subscriptions.d.ts.map +1 -1
  89. package/dist/v1/resources/event_subscriptions.js +7 -1
  90. package/dist/v1/resources/event_subscriptions.js.map +1 -1
  91. package/dist/v1/resources/files.d.ts +32 -10
  92. package/dist/v1/resources/files.d.ts.map +1 -1
  93. package/dist/v1/resources/files.js +32 -11
  94. package/dist/v1/resources/files.js.map +1 -1
  95. package/dist/v1/resources/index.d.ts +4 -1
  96. package/dist/v1/resources/index.d.ts.map +1 -1
  97. package/dist/v1/resources/index.js +5 -2
  98. package/dist/v1/resources/index.js.map +1 -1
  99. package/dist/v1/resources/knowledge_sources.d.ts +4 -0
  100. package/dist/v1/resources/knowledge_sources.d.ts.map +1 -1
  101. package/dist/v1/resources/knowledge_sources.js +1 -1
  102. package/dist/v1/resources/kv.d.ts +75 -31
  103. package/dist/v1/resources/kv.d.ts.map +1 -1
  104. package/dist/v1/resources/kv.js +79 -32
  105. package/dist/v1/resources/kv.js.map +1 -1
  106. package/dist/v1/resources/notifications.d.ts +14 -0
  107. package/dist/v1/resources/notifications.d.ts.map +1 -1
  108. package/dist/v1/resources/notifications.js +13 -1
  109. package/dist/v1/resources/notifications.js.map +1 -1
  110. package/dist/v1/resources/oauth.d.ts +2 -0
  111. package/dist/v1/resources/oauth.d.ts.map +1 -1
  112. package/dist/v1/resources/oauth.js +2 -1
  113. package/dist/v1/resources/oauth.js.map +1 -1
  114. package/dist/v1/resources/orgs.d.ts +662 -2
  115. package/dist/v1/resources/orgs.d.ts.map +1 -1
  116. package/dist/v1/resources/orgs.js +380 -2
  117. package/dist/v1/resources/orgs.js.map +1 -1
  118. package/dist/v1/resources/private_service_enrollments.d.ts +7 -0
  119. package/dist/v1/resources/private_service_enrollments.d.ts.map +1 -1
  120. package/dist/v1/resources/private_service_enrollments.js +10 -1
  121. package/dist/v1/resources/private_service_enrollments.js.map +1 -1
  122. package/dist/v1/resources/relays.d.ts +38 -0
  123. package/dist/v1/resources/relays.d.ts.map +1 -0
  124. package/dist/v1/resources/relays.js +44 -0
  125. package/dist/v1/resources/relays.js.map +1 -0
  126. package/dist/v1/resources/scripts.d.ts +20 -9
  127. package/dist/v1/resources/scripts.d.ts.map +1 -1
  128. package/dist/v1/resources/scripts.js +18 -10
  129. package/dist/v1/resources/scripts.js.map +1 -1
  130. package/dist/v1/resources/task_ownership_conversions.d.ts +14 -0
  131. package/dist/v1/resources/task_ownership_conversions.d.ts.map +1 -0
  132. package/dist/v1/resources/task_ownership_conversions.js +19 -0
  133. package/dist/v1/resources/task_ownership_conversions.js.map +1 -0
  134. package/dist/v1/resources/tasks.d.ts +62 -1
  135. package/dist/v1/resources/tasks.d.ts.map +1 -1
  136. package/dist/v1/resources/tasks.js +35 -1
  137. package/dist/v1/resources/tasks.js.map +1 -1
  138. package/dist/v1/resources/teams.d.ts +141 -3
  139. package/dist/v1/resources/teams.d.ts.map +1 -1
  140. package/dist/v1/resources/teams.js +82 -1
  141. package/dist/v1/resources/teams.js.map +1 -1
  142. package/dist/v1/resources/threads.d.ts +79 -0
  143. package/dist/v1/resources/threads.d.ts.map +1 -1
  144. package/dist/v1/resources/threads.js +44 -1
  145. package/dist/v1/resources/threads.js.map +1 -1
  146. package/dist/v1/resources/users.d.ts +131 -4
  147. package/dist/v1/resources/users.d.ts.map +1 -1
  148. package/dist/v1/resources/users.js +73 -3
  149. package/dist/v1/resources/users.js.map +1 -1
  150. package/dist/v1/resources/workflows.d.ts +5 -1
  151. package/dist/v1/resources/workflows.d.ts.map +1 -1
  152. package/dist/v1/resources/workflows.js +6 -2
  153. package/dist/v1/resources/workflows.js.map +1 -1
  154. package/dist/v1.d.ts +7 -1
  155. package/dist/v1.d.ts.map +1 -1
  156. package/dist/v1.js +12 -3
  157. package/dist/v1.js.map +1 -1
  158. package/package.json +1 -1
@@ -4,6 +4,22 @@ import type { Config } from "./config.js";
4
4
  import type { ImageSource } from "./image.js";
5
5
  import type { User } from "./users.js";
6
6
  import type { WorkflowJournal, WorkflowJournalEntry } from "./workflows.js";
7
+ /** The model declined to judge this question. */
8
+ export interface Refusal {
9
+ id: string;
10
+ type: "refusal";
11
+ }
12
+ /** Runtime validator for {@link Refusal}. */
13
+ export declare const refusalSchema: z.ZodObject<{
14
+ id: z.ZodString;
15
+ type: z.ZodLiteral<"refusal">;
16
+ }, "strip", z.ZodTypeAny, {
17
+ type: "refusal";
18
+ id: string;
19
+ }, {
20
+ type: "refusal";
21
+ id: string;
22
+ }>;
7
23
  /** A single access-control grant that pairs a principal with the set of actions it is allowed to perform. */
8
24
  export interface AclGrant {
9
25
  /** Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry. */
@@ -4932,6 +4948,82 @@ export declare const installedConfigEntrySchema: z.ZodObject<{
4932
4948
  id: string;
4933
4949
  lookup_key?: string | null | undefined;
4934
4950
  }>;
4951
+ /** Approval policy, excluding user IDs. */
4952
+ export interface Approvers {
4953
+ mode: string;
4954
+ }
4955
+ /** Runtime validator for {@link Approvers}. */
4956
+ export declare const approversSchema: z.ZodObject<{
4957
+ mode: z.ZodString;
4958
+ }, "strip", z.ZodTypeAny, {
4959
+ mode: string;
4960
+ }, {
4961
+ mode: string;
4962
+ }>;
4963
+ /** Origin references. */
4964
+ export interface Origin {
4965
+ routine_id?: string | null | undefined;
4966
+ session_id?: string | null | undefined;
4967
+ thread_id?: string | null | undefined;
4968
+ }
4969
+ /** Runtime validator for {@link Origin}. */
4970
+ export declare const originSchema: z.ZodObject<{
4971
+ routine_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4972
+ session_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4973
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4974
+ }, "strip", z.ZodTypeAny, {
4975
+ routine_id?: string | null | undefined;
4976
+ session_id?: string | null | undefined;
4977
+ thread_id?: string | null | undefined;
4978
+ }, {
4979
+ routine_id?: string | null | undefined;
4980
+ session_id?: string | null | undefined;
4981
+ thread_id?: string | null | undefined;
4982
+ }>;
4983
+ /** Question request payload. */
4984
+ export interface Payload {
4985
+ question: string;
4986
+ }
4987
+ /** Runtime validator for {@link Payload}. */
4988
+ export declare const payloadSchema: z.ZodObject<{
4989
+ question: z.ZodString;
4990
+ }, "strip", z.ZodTypeAny, {
4991
+ question: string;
4992
+ }, {
4993
+ question: string;
4994
+ }>;
4995
+ /** Answer or rejection reason; null before resolution. */
4996
+ export interface Resolution {
4997
+ answer?: string | undefined;
4998
+ reason?: string | undefined;
4999
+ }
5000
+ /** Runtime validator for {@link Resolution}. */
5001
+ export declare const resolutionSchema: z.ZodObject<{
5002
+ answer: z.ZodOptional<z.ZodString>;
5003
+ reason: z.ZodOptional<z.ZodString>;
5004
+ }, "strip", z.ZodTypeAny, {
5005
+ answer?: string | undefined;
5006
+ reason?: string | undefined;
5007
+ }, {
5008
+ answer?: string | undefined;
5009
+ reason?: string | undefined;
5010
+ }>;
5011
+ /** Kind-provided summary. */
5012
+ export interface Summary {
5013
+ lines: string[];
5014
+ title: string;
5015
+ }
5016
+ /** Runtime validator for {@link Summary}. */
5017
+ export declare const summarySchema: z.ZodObject<{
5018
+ lines: z.ZodArray<z.ZodString, "many">;
5019
+ title: z.ZodString;
5020
+ }, "strip", z.ZodTypeAny, {
5021
+ title: string;
5022
+ lines: string[];
5023
+ }, {
5024
+ title: string;
5025
+ lines: string[];
5026
+ }>;
4935
5027
  /** Controls visibility and canonical recipient selection for routine-emitted messages. */
4936
5028
  export interface MessagePolicy {
4937
5029
  /** Required and non-empty for private visibility. Sources are additive. Routine owner includes the agent owner and optional user co-owner. */
@@ -5059,20 +5151,24 @@ export declare const setupSchema: z.ZodObject<{
5059
5151
  /** Reason for the current MCP setup state. */
5060
5152
  reason: z.ZodString;
5061
5153
  }, "strip", z.ZodTypeAny, {
5154
+ reason: string;
5062
5155
  next_action: string;
5063
5156
  protocol_status: "not_checked";
5064
- reason: string;
5065
5157
  }, {
5158
+ reason: string;
5066
5159
  next_action: string;
5067
5160
  protocol_status: "not_checked";
5068
- reason: string;
5069
5161
  }>;
5070
5162
  /** A processed variant of a media item, such as the original upload or a resized thumbnail, including a signed download URL resolved at request time. */
5071
5163
  export interface MediaVariant {
5164
+ /** Size of the stored bytes. */
5165
+ byte_size?: number | null | undefined;
5072
5166
  /** MIME type of this variant's file (e.g., `"image/jpeg"`, `"video/mp4"`). `null` if the file is not loaded. */
5073
5167
  content_type?: string | null | undefined;
5074
5168
  /** When this variant was created (ISO 8601). */
5075
5169
  created_at?: string | undefined;
5170
+ /** Client-declared video duration in milliseconds; not server-probed. */
5171
+ duration_ms?: number | null | undefined;
5076
5172
  /** ID of the underlying storage file that backs this variant (`fil_...`). */
5077
5173
  file?: string | undefined;
5078
5174
  /** Original filename of the uploaded file for this variant. `null` if the file is not loaded. */
@@ -5083,10 +5179,14 @@ export interface MediaVariant {
5083
5179
  id: string;
5084
5180
  /** Resolved image delivery metadata for this variant, including dimensions and CDN URL. `null` for non-image content types. */
5085
5181
  image_source?: ImageSource | null | undefined;
5182
+ /** Lowercase SHA-256 of the stored bytes. */
5183
+ sha256?: string | null | undefined;
5086
5184
  /** When this variant was last updated (ISO 8601). */
5087
5185
  updated_at?: string | undefined;
5088
5186
  /** Signed download URL for this variant, resolved at request time. `null` if the file is unavailable. */
5089
5187
  url?: string | null | undefined;
5188
+ /** Expiry of this variant's playable URL. */
5189
+ url_expires_at?: string | null | undefined;
5090
5190
  /** Identifier for this variant's processing tier. Common values include `"original"` (the unmodified upload) and `"thumbnail"` (a resized preview). */
5091
5191
  variant_key?: string | undefined;
5092
5192
  /** Width of this variant in pixels. `null` if not recorded. */
@@ -5094,10 +5194,14 @@ export interface MediaVariant {
5094
5194
  }
5095
5195
  /** Runtime validator for {@link MediaVariant}. */
5096
5196
  export declare const mediaVariantSchema: z.ZodObject<{
5197
+ /** Size of the stored bytes. */
5198
+ byte_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5097
5199
  /** MIME type of this variant's file (e.g., `"image/jpeg"`, `"video/mp4"`). `null` if the file is not loaded. */
5098
5200
  content_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5099
5201
  /** When this variant was created (ISO 8601). */
5100
5202
  created_at: z.ZodOptional<z.ZodString>;
5203
+ /** Client-declared video duration in milliseconds; not server-probed. */
5204
+ duration_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5101
5205
  /** ID of the underlying storage file that backs this variant (`fil_...`). */
5102
5206
  file: z.ZodOptional<z.ZodString>;
5103
5207
  /** Original filename of the uploaded file for this variant. `null` if the file is not loaded. */
@@ -5132,10 +5236,14 @@ export declare const mediaVariantSchema: z.ZodObject<{
5132
5236
  url?: string | null | undefined;
5133
5237
  width?: number | null | undefined;
5134
5238
  }>>>;
5239
+ /** Lowercase SHA-256 of the stored bytes. */
5240
+ sha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5135
5241
  /** When this variant was last updated (ISO 8601). */
5136
5242
  updated_at: z.ZodOptional<z.ZodString>;
5137
5243
  /** Signed download URL for this variant, resolved at request time. `null` if the file is unavailable. */
5138
5244
  url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5245
+ /** Expiry of this variant's playable URL. */
5246
+ url_expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5139
5247
  /** Identifier for this variant's processing tier. Common values include `"original"` (the unmodified upload) and `"thumbnail"` (a resized preview). */
5140
5248
  variant_key: z.ZodOptional<z.ZodString>;
5141
5249
  /** Width of this variant in pixels. `null` if not recorded. */
@@ -5148,7 +5256,9 @@ export declare const mediaVariantSchema: z.ZodObject<{
5148
5256
  height?: number | null | undefined;
5149
5257
  url?: string | null | undefined;
5150
5258
  width?: number | null | undefined;
5259
+ byte_size?: number | null | undefined;
5151
5260
  content_type?: string | null | undefined;
5261
+ duration_ms?: number | null | undefined;
5152
5262
  filename?: string | null | undefined;
5153
5263
  image_source?: {
5154
5264
  mime_type?: string | null | undefined;
@@ -5159,6 +5269,8 @@ export declare const mediaVariantSchema: z.ZodObject<{
5159
5269
  url?: string | null | undefined;
5160
5270
  width?: number | null | undefined;
5161
5271
  } | null | undefined;
5272
+ sha256?: string | null | undefined;
5273
+ url_expires_at?: string | null | undefined;
5162
5274
  variant_key?: string | undefined;
5163
5275
  }, {
5164
5276
  id: string;
@@ -5168,7 +5280,9 @@ export declare const mediaVariantSchema: z.ZodObject<{
5168
5280
  height?: number | null | undefined;
5169
5281
  url?: string | null | undefined;
5170
5282
  width?: number | null | undefined;
5283
+ byte_size?: number | null | undefined;
5171
5284
  content_type?: string | null | undefined;
5285
+ duration_ms?: number | null | undefined;
5172
5286
  filename?: string | null | undefined;
5173
5287
  image_source?: {
5174
5288
  mime_type?: string | null | undefined;
@@ -5179,6 +5293,8 @@ export declare const mediaVariantSchema: z.ZodObject<{
5179
5293
  url?: string | null | undefined;
5180
5294
  width?: number | null | undefined;
5181
5295
  } | null | undefined;
5296
+ sha256?: string | null | undefined;
5297
+ url_expires_at?: string | null | undefined;
5182
5298
  variant_key?: string | undefined;
5183
5299
  }>;
5184
5300
  /** A rich attachment associated with a message, such as a file, scraped link, artifact, task, media item, or inline action. */
@@ -5201,6 +5317,8 @@ export interface Attachment {
5201
5317
  image_url?: string | null | undefined;
5202
5318
  /** Width in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise. */
5203
5319
  image_width?: number | null | undefined;
5320
+ /** For `structured_data` type, what the data is about as set by the sender (for example `"pr:14963"`), copied from the record so it can be read without `object`. Not unique. `null` when unset and on other types. */
5321
+ key?: string | null | undefined;
5204
5322
  /** The media category, e.g. `"video"` or `"audio"`. Present on `media` type only; omitted otherwise. */
5205
5323
  media_type?: string | undefined;
5206
5324
  /** Display name of the media item. Present on `media` type only. `null` otherwise. */
@@ -5264,6 +5382,8 @@ export declare const attachmentSchema: z.ZodObject<{
5264
5382
  image_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5265
5383
  /** Width in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise. */
5266
5384
  image_width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5385
+ /** For `structured_data` type, what the data is about as set by the sender (for example `"pr:14963"`), copied from the record so it can be read without `object`. Not unique. `null` when unset and on other types. */
5386
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5267
5387
  /** The media category, e.g. `"video"` or `"audio"`. Present on `media` type only; omitted otherwise. */
5268
5388
  media_type: z.ZodOptional<z.ZodString>;
5269
5389
  /** Display name of the media item. Present on `media` type only. `null` otherwise. */
@@ -5278,10 +5398,14 @@ export declare const attachmentSchema: z.ZodObject<{
5278
5398
  url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5279
5399
  /** Array of available encoding variants for the media item (e.g. different resolutions). Present on `media` type only; omitted otherwise. */
5280
5400
  variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
5401
+ /** Size of the stored bytes. */
5402
+ byte_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5281
5403
  /** MIME type of this variant's file (e.g., `"image/jpeg"`, `"video/mp4"`). `null` if the file is not loaded. */
5282
5404
  content_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5283
5405
  /** When this variant was created (ISO 8601). */
5284
5406
  created_at: z.ZodOptional<z.ZodString>;
5407
+ /** Client-declared video duration in milliseconds; not server-probed. */
5408
+ duration_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5285
5409
  /** ID of the underlying storage file that backs this variant (`fil_...`). */
5286
5410
  file: z.ZodOptional<z.ZodString>;
5287
5411
  /** Original filename of the uploaded file for this variant. `null` if the file is not loaded. */
@@ -5316,10 +5440,14 @@ export declare const attachmentSchema: z.ZodObject<{
5316
5440
  url?: string | null | undefined;
5317
5441
  width?: number | null | undefined;
5318
5442
  }>>>;
5443
+ /** Lowercase SHA-256 of the stored bytes. */
5444
+ sha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5319
5445
  /** When this variant was last updated (ISO 8601). */
5320
5446
  updated_at: z.ZodOptional<z.ZodString>;
5321
5447
  /** Signed download URL for this variant, resolved at request time. `null` if the file is unavailable. */
5322
5448
  url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5449
+ /** Expiry of this variant's playable URL. */
5450
+ url_expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5323
5451
  /** Identifier for this variant's processing tier. Common values include `"original"` (the unmodified upload) and `"thumbnail"` (a resized preview). */
5324
5452
  variant_key: z.ZodOptional<z.ZodString>;
5325
5453
  /** Width of this variant in pixels. `null` if not recorded. */
@@ -5332,7 +5460,9 @@ export declare const attachmentSchema: z.ZodObject<{
5332
5460
  height?: number | null | undefined;
5333
5461
  url?: string | null | undefined;
5334
5462
  width?: number | null | undefined;
5463
+ byte_size?: number | null | undefined;
5335
5464
  content_type?: string | null | undefined;
5465
+ duration_ms?: number | null | undefined;
5336
5466
  filename?: string | null | undefined;
5337
5467
  image_source?: {
5338
5468
  mime_type?: string | null | undefined;
@@ -5343,6 +5473,8 @@ export declare const attachmentSchema: z.ZodObject<{
5343
5473
  url?: string | null | undefined;
5344
5474
  width?: number | null | undefined;
5345
5475
  } | null | undefined;
5476
+ sha256?: string | null | undefined;
5477
+ url_expires_at?: string | null | undefined;
5346
5478
  variant_key?: string | undefined;
5347
5479
  }, {
5348
5480
  id: string;
@@ -5352,7 +5484,9 @@ export declare const attachmentSchema: z.ZodObject<{
5352
5484
  height?: number | null | undefined;
5353
5485
  url?: string | null | undefined;
5354
5486
  width?: number | null | undefined;
5487
+ byte_size?: number | null | undefined;
5355
5488
  content_type?: string | null | undefined;
5489
+ duration_ms?: number | null | undefined;
5356
5490
  filename?: string | null | undefined;
5357
5491
  image_source?: {
5358
5492
  mime_type?: string | null | undefined;
@@ -5363,6 +5497,8 @@ export declare const attachmentSchema: z.ZodObject<{
5363
5497
  url?: string | null | undefined;
5364
5498
  width?: number | null | undefined;
5365
5499
  } | null | undefined;
5500
+ sha256?: string | null | undefined;
5501
+ url_expires_at?: string | null | undefined;
5366
5502
  variant_key?: string | undefined;
5367
5503
  }>, "many">>;
5368
5504
  /** Version number of the attached artifact at the time of attachment. Present on `artifact` type only. `null` otherwise. */
@@ -5373,6 +5509,7 @@ export declare const attachmentSchema: z.ZodObject<{
5373
5509
  type: string;
5374
5510
  id: string;
5375
5511
  object?: Record<string, {} | null> | undefined;
5512
+ key?: string | null | undefined;
5376
5513
  name?: string | null | undefined;
5377
5514
  description?: string | null | undefined;
5378
5515
  height?: number | null | undefined;
@@ -5402,7 +5539,9 @@ export declare const attachmentSchema: z.ZodObject<{
5402
5539
  height?: number | null | undefined;
5403
5540
  url?: string | null | undefined;
5404
5541
  width?: number | null | undefined;
5542
+ byte_size?: number | null | undefined;
5405
5543
  content_type?: string | null | undefined;
5544
+ duration_ms?: number | null | undefined;
5406
5545
  filename?: string | null | undefined;
5407
5546
  image_source?: {
5408
5547
  mime_type?: string | null | undefined;
@@ -5413,6 +5552,8 @@ export declare const attachmentSchema: z.ZodObject<{
5413
5552
  url?: string | null | undefined;
5414
5553
  width?: number | null | undefined;
5415
5554
  } | null | undefined;
5555
+ sha256?: string | null | undefined;
5556
+ url_expires_at?: string | null | undefined;
5416
5557
  variant_key?: string | undefined;
5417
5558
  }[] | undefined;
5418
5559
  version?: number | null | undefined;
@@ -5420,6 +5561,7 @@ export declare const attachmentSchema: z.ZodObject<{
5420
5561
  type: string;
5421
5562
  id: string;
5422
5563
  object?: Record<string, {} | null> | undefined;
5564
+ key?: string | null | undefined;
5423
5565
  name?: string | null | undefined;
5424
5566
  description?: string | null | undefined;
5425
5567
  height?: number | null | undefined;
@@ -5449,7 +5591,9 @@ export declare const attachmentSchema: z.ZodObject<{
5449
5591
  height?: number | null | undefined;
5450
5592
  url?: string | null | undefined;
5451
5593
  width?: number | null | undefined;
5594
+ byte_size?: number | null | undefined;
5452
5595
  content_type?: string | null | undefined;
5596
+ duration_ms?: number | null | undefined;
5453
5597
  filename?: string | null | undefined;
5454
5598
  image_source?: {
5455
5599
  mime_type?: string | null | undefined;
@@ -5460,6 +5604,8 @@ export declare const attachmentSchema: z.ZodObject<{
5460
5604
  url?: string | null | undefined;
5461
5605
  width?: number | null | undefined;
5462
5606
  } | null | undefined;
5607
+ sha256?: string | null | undefined;
5608
+ url_expires_at?: string | null | undefined;
5463
5609
  variant_key?: string | undefined;
5464
5610
  }[] | undefined;
5465
5611
  version?: number | null | undefined;
@@ -6151,6 +6297,8 @@ export declare const messageSchema: z.ZodObject<{
6151
6297
  image_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6152
6298
  /** Width in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise. */
6153
6299
  image_width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
6300
+ /** For `structured_data` type, what the data is about as set by the sender (for example `"pr:14963"`), copied from the record so it can be read without `object`. Not unique. `null` when unset and on other types. */
6301
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6154
6302
  /** The media category, e.g. `"video"` or `"audio"`. Present on `media` type only; omitted otherwise. */
6155
6303
  media_type: z.ZodOptional<z.ZodString>;
6156
6304
  /** Display name of the media item. Present on `media` type only. `null` otherwise. */
@@ -6165,10 +6313,14 @@ export declare const messageSchema: z.ZodObject<{
6165
6313
  url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6166
6314
  /** Array of available encoding variants for the media item (e.g. different resolutions). Present on `media` type only; omitted otherwise. */
6167
6315
  variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
6316
+ /** Size of the stored bytes. */
6317
+ byte_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
6168
6318
  /** MIME type of this variant's file (e.g., `"image/jpeg"`, `"video/mp4"`). `null` if the file is not loaded. */
6169
6319
  content_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6170
6320
  /** When this variant was created (ISO 8601). */
6171
6321
  created_at: z.ZodOptional<z.ZodString>;
6322
+ /** Client-declared video duration in milliseconds; not server-probed. */
6323
+ duration_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
6172
6324
  /** ID of the underlying storage file that backs this variant (`fil_...`). */
6173
6325
  file: z.ZodOptional<z.ZodString>;
6174
6326
  /** Original filename of the uploaded file for this variant. `null` if the file is not loaded. */
@@ -6203,10 +6355,14 @@ export declare const messageSchema: z.ZodObject<{
6203
6355
  url?: string | null | undefined;
6204
6356
  width?: number | null | undefined;
6205
6357
  }>>>;
6358
+ /** Lowercase SHA-256 of the stored bytes. */
6359
+ sha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6206
6360
  /** When this variant was last updated (ISO 8601). */
6207
6361
  updated_at: z.ZodOptional<z.ZodString>;
6208
6362
  /** Signed download URL for this variant, resolved at request time. `null` if the file is unavailable. */
6209
6363
  url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6364
+ /** Expiry of this variant's playable URL. */
6365
+ url_expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6210
6366
  /** Identifier for this variant's processing tier. Common values include `"original"` (the unmodified upload) and `"thumbnail"` (a resized preview). */
6211
6367
  variant_key: z.ZodOptional<z.ZodString>;
6212
6368
  /** Width of this variant in pixels. `null` if not recorded. */
@@ -6219,7 +6375,9 @@ export declare const messageSchema: z.ZodObject<{
6219
6375
  height?: number | null | undefined;
6220
6376
  url?: string | null | undefined;
6221
6377
  width?: number | null | undefined;
6378
+ byte_size?: number | null | undefined;
6222
6379
  content_type?: string | null | undefined;
6380
+ duration_ms?: number | null | undefined;
6223
6381
  filename?: string | null | undefined;
6224
6382
  image_source?: {
6225
6383
  mime_type?: string | null | undefined;
@@ -6230,6 +6388,8 @@ export declare const messageSchema: z.ZodObject<{
6230
6388
  url?: string | null | undefined;
6231
6389
  width?: number | null | undefined;
6232
6390
  } | null | undefined;
6391
+ sha256?: string | null | undefined;
6392
+ url_expires_at?: string | null | undefined;
6233
6393
  variant_key?: string | undefined;
6234
6394
  }, {
6235
6395
  id: string;
@@ -6239,7 +6399,9 @@ export declare const messageSchema: z.ZodObject<{
6239
6399
  height?: number | null | undefined;
6240
6400
  url?: string | null | undefined;
6241
6401
  width?: number | null | undefined;
6402
+ byte_size?: number | null | undefined;
6242
6403
  content_type?: string | null | undefined;
6404
+ duration_ms?: number | null | undefined;
6243
6405
  filename?: string | null | undefined;
6244
6406
  image_source?: {
6245
6407
  mime_type?: string | null | undefined;
@@ -6250,6 +6412,8 @@ export declare const messageSchema: z.ZodObject<{
6250
6412
  url?: string | null | undefined;
6251
6413
  width?: number | null | undefined;
6252
6414
  } | null | undefined;
6415
+ sha256?: string | null | undefined;
6416
+ url_expires_at?: string | null | undefined;
6253
6417
  variant_key?: string | undefined;
6254
6418
  }>, "many">>;
6255
6419
  /** Version number of the attached artifact at the time of attachment. Present on `artifact` type only. `null` otherwise. */
@@ -6260,6 +6424,7 @@ export declare const messageSchema: z.ZodObject<{
6260
6424
  type: string;
6261
6425
  id: string;
6262
6426
  object?: Record<string, {} | null> | undefined;
6427
+ key?: string | null | undefined;
6263
6428
  name?: string | null | undefined;
6264
6429
  description?: string | null | undefined;
6265
6430
  height?: number | null | undefined;
@@ -6289,7 +6454,9 @@ export declare const messageSchema: z.ZodObject<{
6289
6454
  height?: number | null | undefined;
6290
6455
  url?: string | null | undefined;
6291
6456
  width?: number | null | undefined;
6457
+ byte_size?: number | null | undefined;
6292
6458
  content_type?: string | null | undefined;
6459
+ duration_ms?: number | null | undefined;
6293
6460
  filename?: string | null | undefined;
6294
6461
  image_source?: {
6295
6462
  mime_type?: string | null | undefined;
@@ -6300,6 +6467,8 @@ export declare const messageSchema: z.ZodObject<{
6300
6467
  url?: string | null | undefined;
6301
6468
  width?: number | null | undefined;
6302
6469
  } | null | undefined;
6470
+ sha256?: string | null | undefined;
6471
+ url_expires_at?: string | null | undefined;
6303
6472
  variant_key?: string | undefined;
6304
6473
  }[] | undefined;
6305
6474
  version?: number | null | undefined;
@@ -6307,6 +6476,7 @@ export declare const messageSchema: z.ZodObject<{
6307
6476
  type: string;
6308
6477
  id: string;
6309
6478
  object?: Record<string, {} | null> | undefined;
6479
+ key?: string | null | undefined;
6310
6480
  name?: string | null | undefined;
6311
6481
  description?: string | null | undefined;
6312
6482
  height?: number | null | undefined;
@@ -6336,7 +6506,9 @@ export declare const messageSchema: z.ZodObject<{
6336
6506
  height?: number | null | undefined;
6337
6507
  url?: string | null | undefined;
6338
6508
  width?: number | null | undefined;
6509
+ byte_size?: number | null | undefined;
6339
6510
  content_type?: string | null | undefined;
6511
+ duration_ms?: number | null | undefined;
6340
6512
  filename?: string | null | undefined;
6341
6513
  image_source?: {
6342
6514
  mime_type?: string | null | undefined;
@@ -6347,6 +6519,8 @@ export declare const messageSchema: z.ZodObject<{
6347
6519
  url?: string | null | undefined;
6348
6520
  width?: number | null | undefined;
6349
6521
  } | null | undefined;
6522
+ sha256?: string | null | undefined;
6523
+ url_expires_at?: string | null | undefined;
6350
6524
  variant_key?: string | undefined;
6351
6525
  }[] | undefined;
6352
6526
  version?: number | null | undefined;
@@ -6547,6 +6721,7 @@ export declare const messageSchema: z.ZodObject<{
6547
6721
  type: string;
6548
6722
  id: string;
6549
6723
  object?: Record<string, {} | null> | undefined;
6724
+ key?: string | null | undefined;
6550
6725
  name?: string | null | undefined;
6551
6726
  description?: string | null | undefined;
6552
6727
  height?: number | null | undefined;
@@ -6576,7 +6751,9 @@ export declare const messageSchema: z.ZodObject<{
6576
6751
  height?: number | null | undefined;
6577
6752
  url?: string | null | undefined;
6578
6753
  width?: number | null | undefined;
6754
+ byte_size?: number | null | undefined;
6579
6755
  content_type?: string | null | undefined;
6756
+ duration_ms?: number | null | undefined;
6580
6757
  filename?: string | null | undefined;
6581
6758
  image_source?: {
6582
6759
  mime_type?: string | null | undefined;
@@ -6587,6 +6764,8 @@ export declare const messageSchema: z.ZodObject<{
6587
6764
  url?: string | null | undefined;
6588
6765
  width?: number | null | undefined;
6589
6766
  } | null | undefined;
6767
+ sha256?: string | null | undefined;
6768
+ url_expires_at?: string | null | undefined;
6590
6769
  variant_key?: string | undefined;
6591
6770
  }[] | undefined;
6592
6771
  version?: number | null | undefined;
@@ -6682,6 +6861,7 @@ export declare const messageSchema: z.ZodObject<{
6682
6861
  type: string;
6683
6862
  id: string;
6684
6863
  object?: Record<string, {} | null> | undefined;
6864
+ key?: string | null | undefined;
6685
6865
  name?: string | null | undefined;
6686
6866
  description?: string | null | undefined;
6687
6867
  height?: number | null | undefined;
@@ -6711,7 +6891,9 @@ export declare const messageSchema: z.ZodObject<{
6711
6891
  height?: number | null | undefined;
6712
6892
  url?: string | null | undefined;
6713
6893
  width?: number | null | undefined;
6894
+ byte_size?: number | null | undefined;
6714
6895
  content_type?: string | null | undefined;
6896
+ duration_ms?: number | null | undefined;
6715
6897
  filename?: string | null | undefined;
6716
6898
  image_source?: {
6717
6899
  mime_type?: string | null | undefined;
@@ -6722,6 +6904,8 @@ export declare const messageSchema: z.ZodObject<{
6722
6904
  url?: string | null | undefined;
6723
6905
  width?: number | null | undefined;
6724
6906
  } | null | undefined;
6907
+ sha256?: string | null | undefined;
6908
+ url_expires_at?: string | null | undefined;
6725
6909
  variant_key?: string | undefined;
6726
6910
  }[] | undefined;
6727
6911
  version?: number | null | undefined;
@@ -6830,26 +7014,6 @@ export declare const commandSchema: z.ZodObject<{
6830
7014
  expectedInput?: Record<string, {} | null> | undefined;
6831
7015
  successOutput?: Record<string, {} | null> | undefined;
6832
7016
  }>;
6833
- /** The result of executing a shell command on an agent's computer environment. Contains the captured output and the process exit code. */
6834
- export interface ComputerExecResult {
6835
- /** The UNIX exit code returned by the process. `0` indicates success; any non-zero value indicates an error. `null` if the process did not terminate normally. */
6836
- exit_code?: number | undefined;
6837
- /** The combined stdout and stderr output produced by the command. `null` if the command produced no output. */
6838
- output?: string | undefined;
6839
- }
6840
- /** Runtime validator for {@link ComputerExecResult}. */
6841
- export declare const computerExecResultSchema: z.ZodObject<{
6842
- /** The UNIX exit code returned by the process. `0` indicates success; any non-zero value indicates an error. `null` if the process did not terminate normally. */
6843
- exit_code: z.ZodOptional<z.ZodNumber>;
6844
- /** The combined stdout and stderr output produced by the command. `null` if the command produced no output. */
6845
- output: z.ZodOptional<z.ZodString>;
6846
- }, "strip", z.ZodTypeAny, {
6847
- exit_code?: number | undefined;
6848
- output?: string | undefined;
6849
- }, {
6850
- exit_code?: number | undefined;
6851
- output?: string | undefined;
6852
- }>;
6853
7017
  /** A context document stored within a context source. Carries metadata and size information only; retrieve the full text content via the `/content` endpoint. */
6854
7018
  export interface ContextDocument {
6855
7019
  /** ID of the agent that owns this document (`agi_...`). `null` if owned by a user or team. */
@@ -7216,12 +7380,20 @@ export interface EffectiveAccessEntitlement {
7216
7380
  granted: boolean;
7217
7381
  /** Stable entitlement catalog key. */
7218
7382
  key: string;
7383
+ /** Unexpired metered allowance, including exhausted grants; null for boolean entitlements. */
7384
+ limit?: number | null | undefined;
7219
7385
  /** Privacy-safe principal kinds that contribute to the effective value. */
7220
7386
  provided_by: ("personal" | "organization")[];
7387
+ /** Effective purchased quantity from the recurring terms linked to this key (for example seats), summed across granting principals. `null` when the key is not granted or no granting plan links a term to it. */
7388
+ quantity?: number | null | undefined;
7389
+ /** Remaining metered allowance credits; null for boolean entitlements. */
7390
+ remaining?: number | null | undefined;
7391
+ /** Signed metered consumption in the allowance window; may be negative after reversals. Null for boolean entitlements. */
7392
+ used?: number | null | undefined;
7221
7393
  /** Merged entitlement value, or `null` when the key is not granted. */
7222
7394
  value?: boolean | null | undefined;
7223
7395
  /** Catalog type used to interpret `value`. */
7224
- value_type: "boolean";
7396
+ value_type: "boolean" | "metered";
7225
7397
  }
7226
7398
  /** Runtime validator for {@link EffectiveAccessEntitlement}. */
7227
7399
  export declare const effectiveAccessEntitlementSchema: z.ZodObject<{
@@ -7229,24 +7401,40 @@ export declare const effectiveAccessEntitlementSchema: z.ZodObject<{
7229
7401
  granted: z.ZodBoolean;
7230
7402
  /** Stable entitlement catalog key. */
7231
7403
  key: z.ZodString;
7404
+ /** Unexpired metered allowance, including exhausted grants; null for boolean entitlements. */
7405
+ limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
7232
7406
  /** Privacy-safe principal kinds that contribute to the effective value. */
7233
7407
  provided_by: z.ZodArray<z.ZodEnum<["personal", "organization"]>, "many">;
7408
+ /** Effective purchased quantity from the recurring terms linked to this key (for example seats), summed across granting principals. `null` when the key is not granted or no granting plan links a term to it. */
7409
+ quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
7410
+ /** Remaining metered allowance credits; null for boolean entitlements. */
7411
+ remaining: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
7412
+ /** Signed metered consumption in the allowance window; may be negative after reversals. Null for boolean entitlements. */
7413
+ used: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
7234
7414
  /** Merged entitlement value, or `null` when the key is not granted. */
7235
7415
  value: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
7236
7416
  /** Catalog type used to interpret `value`. */
7237
- value_type: z.ZodLiteral<"boolean">;
7417
+ value_type: z.ZodEnum<["boolean", "metered"]>;
7238
7418
  }, "strip", z.ZodTypeAny, {
7239
7419
  key: string;
7240
7420
  granted: boolean;
7241
7421
  provided_by: ("personal" | "organization")[];
7242
- value_type: "boolean";
7422
+ value_type: "boolean" | "metered";
7243
7423
  value?: boolean | null | undefined;
7424
+ limit?: number | null | undefined;
7425
+ quantity?: number | null | undefined;
7426
+ remaining?: number | null | undefined;
7427
+ used?: number | null | undefined;
7244
7428
  }, {
7245
7429
  key: string;
7246
7430
  granted: boolean;
7247
7431
  provided_by: ("personal" | "organization")[];
7248
- value_type: "boolean";
7432
+ value_type: "boolean" | "metered";
7249
7433
  value?: boolean | null | undefined;
7434
+ limit?: number | null | undefined;
7435
+ quantity?: number | null | undefined;
7436
+ remaining?: number | null | undefined;
7437
+ used?: number | null | undefined;
7250
7438
  }>;
7251
7439
  /** Live effective access, billing authority, and relevant trials for the authenticated user. */
7252
7440
  export interface EffectiveAccess {
@@ -7302,24 +7490,40 @@ export declare const effectiveAccessSchema: z.ZodObject<{
7302
7490
  granted: z.ZodBoolean;
7303
7491
  /** Stable entitlement catalog key. */
7304
7492
  key: z.ZodString;
7493
+ /** Unexpired metered allowance, including exhausted grants; null for boolean entitlements. */
7494
+ limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
7305
7495
  /** Privacy-safe principal kinds that contribute to the effective value. */
7306
7496
  provided_by: z.ZodArray<z.ZodEnum<["personal", "organization"]>, "many">;
7497
+ /** Effective purchased quantity from the recurring terms linked to this key (for example seats), summed across granting principals. `null` when the key is not granted or no granting plan links a term to it. */
7498
+ quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
7499
+ /** Remaining metered allowance credits; null for boolean entitlements. */
7500
+ remaining: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
7501
+ /** Signed metered consumption in the allowance window; may be negative after reversals. Null for boolean entitlements. */
7502
+ used: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
7307
7503
  /** Merged entitlement value, or `null` when the key is not granted. */
7308
7504
  value: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
7309
7505
  /** Catalog type used to interpret `value`. */
7310
- value_type: z.ZodLiteral<"boolean">;
7506
+ value_type: z.ZodEnum<["boolean", "metered"]>;
7311
7507
  }, "strip", z.ZodTypeAny, {
7312
7508
  key: string;
7313
7509
  granted: boolean;
7314
7510
  provided_by: ("personal" | "organization")[];
7315
- value_type: "boolean";
7511
+ value_type: "boolean" | "metered";
7316
7512
  value?: boolean | null | undefined;
7513
+ limit?: number | null | undefined;
7514
+ quantity?: number | null | undefined;
7515
+ remaining?: number | null | undefined;
7516
+ used?: number | null | undefined;
7317
7517
  }, {
7318
7518
  key: string;
7319
7519
  granted: boolean;
7320
7520
  provided_by: ("personal" | "organization")[];
7321
- value_type: "boolean";
7521
+ value_type: "boolean" | "metered";
7322
7522
  value?: boolean | null | undefined;
7523
+ limit?: number | null | undefined;
7524
+ quantity?: number | null | undefined;
7525
+ remaining?: number | null | undefined;
7526
+ used?: number | null | undefined;
7323
7527
  }>, "many">;
7324
7528
  }, "strip", z.ZodTypeAny, {
7325
7529
  billing: {
@@ -7335,8 +7539,12 @@ export declare const effectiveAccessSchema: z.ZodObject<{
7335
7539
  key: string;
7336
7540
  granted: boolean;
7337
7541
  provided_by: ("personal" | "organization")[];
7338
- value_type: "boolean";
7542
+ value_type: "boolean" | "metered";
7339
7543
  value?: boolean | null | undefined;
7544
+ limit?: number | null | undefined;
7545
+ quantity?: number | null | undefined;
7546
+ remaining?: number | null | undefined;
7547
+ used?: number | null | undefined;
7340
7548
  }[];
7341
7549
  }, {
7342
7550
  billing: {
@@ -7352,8 +7560,12 @@ export declare const effectiveAccessSchema: z.ZodObject<{
7352
7560
  key: string;
7353
7561
  granted: boolean;
7354
7562
  provided_by: ("personal" | "organization")[];
7355
- value_type: "boolean";
7563
+ value_type: "boolean" | "metered";
7356
7564
  value?: boolean | null | undefined;
7565
+ limit?: number | null | undefined;
7566
+ quantity?: number | null | undefined;
7567
+ remaining?: number | null | undefined;
7568
+ used?: number | null | undefined;
7357
7569
  }[];
7358
7570
  }>;
7359
7571
  /** The authenticated user's profile, live session context, and optional effective access. */
@@ -7378,6 +7590,8 @@ export interface CurrentUser {
7378
7590
  name?: string | null | undefined;
7379
7591
  /** The authenticated user's notification preferences. */
7380
7592
  notification_settings: Record<string, unknown>;
7593
+ /** Registered display name of the verified OAuth client, when available. Not a verified vendor identity. */
7594
+ oauth_client_name?: string | undefined;
7381
7595
  /** ID of the current organization (`org_...`). */
7382
7596
  org?: string | null | undefined;
7383
7597
  /** Whether the current organization is company-domain or person-owned. */
@@ -7452,24 +7666,40 @@ export declare const currentUserSchema: z.ZodObject<{
7452
7666
  granted: z.ZodBoolean;
7453
7667
  /** Stable entitlement catalog key. */
7454
7668
  key: z.ZodString;
7669
+ /** Unexpired metered allowance, including exhausted grants; null for boolean entitlements. */
7670
+ limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
7455
7671
  /** Privacy-safe principal kinds that contribute to the effective value. */
7456
7672
  provided_by: z.ZodArray<z.ZodEnum<["personal", "organization"]>, "many">;
7673
+ /** Effective purchased quantity from the recurring terms linked to this key (for example seats), summed across granting principals. `null` when the key is not granted or no granting plan links a term to it. */
7674
+ quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
7675
+ /** Remaining metered allowance credits; null for boolean entitlements. */
7676
+ remaining: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
7677
+ /** Signed metered consumption in the allowance window; may be negative after reversals. Null for boolean entitlements. */
7678
+ used: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
7457
7679
  /** Merged entitlement value, or `null` when the key is not granted. */
7458
7680
  value: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
7459
7681
  /** Catalog type used to interpret `value`. */
7460
- value_type: z.ZodLiteral<"boolean">;
7682
+ value_type: z.ZodEnum<["boolean", "metered"]>;
7461
7683
  }, "strip", z.ZodTypeAny, {
7462
7684
  key: string;
7463
7685
  granted: boolean;
7464
7686
  provided_by: ("personal" | "organization")[];
7465
- value_type: "boolean";
7687
+ value_type: "boolean" | "metered";
7466
7688
  value?: boolean | null | undefined;
7689
+ limit?: number | null | undefined;
7690
+ quantity?: number | null | undefined;
7691
+ remaining?: number | null | undefined;
7692
+ used?: number | null | undefined;
7467
7693
  }, {
7468
7694
  key: string;
7469
7695
  granted: boolean;
7470
7696
  provided_by: ("personal" | "organization")[];
7471
- value_type: "boolean";
7697
+ value_type: "boolean" | "metered";
7472
7698
  value?: boolean | null | undefined;
7699
+ limit?: number | null | undefined;
7700
+ quantity?: number | null | undefined;
7701
+ remaining?: number | null | undefined;
7702
+ used?: number | null | undefined;
7473
7703
  }>, "many">;
7474
7704
  }, "strip", z.ZodTypeAny, {
7475
7705
  billing: {
@@ -7485,8 +7715,12 @@ export declare const currentUserSchema: z.ZodObject<{
7485
7715
  key: string;
7486
7716
  granted: boolean;
7487
7717
  provided_by: ("personal" | "organization")[];
7488
- value_type: "boolean";
7718
+ value_type: "boolean" | "metered";
7489
7719
  value?: boolean | null | undefined;
7720
+ limit?: number | null | undefined;
7721
+ quantity?: number | null | undefined;
7722
+ remaining?: number | null | undefined;
7723
+ used?: number | null | undefined;
7490
7724
  }[];
7491
7725
  }, {
7492
7726
  billing: {
@@ -7502,8 +7736,12 @@ export declare const currentUserSchema: z.ZodObject<{
7502
7736
  key: string;
7503
7737
  granted: boolean;
7504
7738
  provided_by: ("personal" | "organization")[];
7505
- value_type: "boolean";
7739
+ value_type: "boolean" | "metered";
7506
7740
  value?: boolean | null | undefined;
7741
+ limit?: number | null | undefined;
7742
+ quantity?: number | null | undefined;
7743
+ remaining?: number | null | undefined;
7744
+ used?: number | null | undefined;
7507
7745
  }[];
7508
7746
  }>>;
7509
7747
  /** Email address of the user. */
@@ -7518,6 +7756,8 @@ export declare const currentUserSchema: z.ZodObject<{
7518
7756
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7519
7757
  /** The authenticated user's notification preferences. */
7520
7758
  notification_settings: z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>;
7759
+ /** Registered display name of the verified OAuth client, when available. Not a verified vendor identity. */
7760
+ oauth_client_name: z.ZodOptional<z.ZodString>;
7521
7761
  /** ID of the current organization (`org_...`). */
7522
7762
  org: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7523
7763
  /** Whether the current organization is company-domain or person-owned. */
@@ -7600,10 +7840,15 @@ export declare const currentUserSchema: z.ZodObject<{
7600
7840
  key: string;
7601
7841
  granted: boolean;
7602
7842
  provided_by: ("personal" | "organization")[];
7603
- value_type: "boolean";
7843
+ value_type: "boolean" | "metered";
7604
7844
  value?: boolean | null | undefined;
7845
+ limit?: number | null | undefined;
7846
+ quantity?: number | null | undefined;
7847
+ remaining?: number | null | undefined;
7848
+ used?: number | null | undefined;
7605
7849
  }[];
7606
7850
  } | undefined;
7851
+ oauth_client_name?: string | undefined;
7607
7852
  org_kind?: "personal" | "company" | null | undefined;
7608
7853
  }, {
7609
7854
  id: string;
@@ -7645,18 +7890,27 @@ export declare const currentUserSchema: z.ZodObject<{
7645
7890
  key: string;
7646
7891
  granted: boolean;
7647
7892
  provided_by: ("personal" | "organization")[];
7648
- value_type: "boolean";
7893
+ value_type: "boolean" | "metered";
7649
7894
  value?: boolean | null | undefined;
7895
+ limit?: number | null | undefined;
7896
+ quantity?: number | null | undefined;
7897
+ remaining?: number | null | undefined;
7898
+ used?: number | null | undefined;
7650
7899
  }[];
7651
7900
  } | undefined;
7901
+ oauth_client_name?: string | undefined;
7652
7902
  org_kind?: "personal" | "company" | null | undefined;
7653
7903
  }>;
7654
7904
  /** A custom object belonging to an organization. Custom objects store arbitrary structured data defined by a schema type and are scoped to an org, team, or user. */
7655
7905
  export interface CustomObject {
7656
7906
  /** Access control list governing read and write access to this custom object. Only returned to resource owners and privileged or organization-admin viewers; `null` for everyone else. */
7657
7907
  acl?: Acl | undefined;
7908
+ /** ID of the agent that owns this object (`agt_...`). `null` for other ownership types. */
7909
+ agent?: string | undefined;
7658
7910
  /** When the custom object was created (ISO 8601). */
7659
7911
  created_at?: string | undefined;
7912
+ /** Absolute expiry time (RFC 3339). Null when no expiry is set. */
7913
+ expires_at?: string | null | undefined;
7660
7914
  /** Map of field names to their current values as defined by the object's schema type. */
7661
7915
  fields?: Record<string, unknown> | undefined;
7662
7916
  /** Unique identifier for the custom object (`cobj_...`). */
@@ -7760,8 +8014,12 @@ export declare const customObjectSchema: z.ZodObject<{
7760
8014
  principal?: string | undefined;
7761
8015
  }[] | undefined;
7762
8016
  }>>;
8017
+ /** ID of the agent that owns this object (`agt_...`). `null` for other ownership types. */
8018
+ agent: z.ZodOptional<z.ZodString>;
7763
8019
  /** When the custom object was created (ISO 8601). */
7764
8020
  created_at: z.ZodOptional<z.ZodString>;
8021
+ /** Absolute expiry time (RFC 3339). Null when no expiry is set. */
8022
+ expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7765
8023
  /** Map of field names to their current values as defined by the object's schema type. */
7766
8024
  fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
7767
8025
  /** Unique identifier for the custom object (`cobj_...`). */
@@ -7786,6 +8044,7 @@ export declare const customObjectSchema: z.ZodObject<{
7786
8044
  id: string;
7787
8045
  user?: string | undefined;
7788
8046
  org?: string | undefined;
8047
+ agent?: string | undefined;
7789
8048
  team?: string | undefined;
7790
8049
  created_at?: string | undefined;
7791
8050
  updated_at?: string | undefined;
@@ -7807,6 +8066,7 @@ export declare const customObjectSchema: z.ZodObject<{
7807
8066
  }[] | undefined;
7808
8067
  } | undefined;
7809
8068
  version?: number | undefined;
8069
+ expires_at?: string | null | undefined;
7810
8070
  fields?: Record<string, {} | null> | undefined;
7811
8071
  row_key?: string | undefined;
7812
8072
  schema_type?: string | undefined;
@@ -7814,6 +8074,7 @@ export declare const customObjectSchema: z.ZodObject<{
7814
8074
  id: string;
7815
8075
  user?: string | undefined;
7816
8076
  org?: string | undefined;
8077
+ agent?: string | undefined;
7817
8078
  team?: string | undefined;
7818
8079
  created_at?: string | undefined;
7819
8080
  updated_at?: string | undefined;
@@ -7835,6 +8096,7 @@ export declare const customObjectSchema: z.ZodObject<{
7835
8096
  }[] | undefined;
7836
8097
  } | undefined;
7837
8098
  version?: number | undefined;
8099
+ expires_at?: string | null | undefined;
7838
8100
  fields?: Record<string, {} | null> | undefined;
7839
8101
  row_key?: string | undefined;
7840
8102
  schema_type?: string | undefined;
@@ -7889,10 +8151,10 @@ export interface CustomObjectListResponse {
7889
8151
  page: number;
7890
8152
  /** Maximum number of results returned per page. */
7891
8153
  page_size: number;
7892
- /** Total number of custom objects matching the query across all pages. */
7893
- total_entries: number;
7894
- /** Total number of pages available for the current query. */
7895
- total_pages: number;
8154
+ /** Total number of custom objects matching the query across all pages; null when include_count is false. */
8155
+ total_entries: number | null;
8156
+ /** Total number of pages available for the current query; null when include_count is false. */
8157
+ total_pages: number | null;
7896
8158
  }
7897
8159
  /** Runtime validator for {@link CustomObjectListResponse}. */
7898
8160
  export declare const customObjectListResponseSchema: z.ZodObject<{
@@ -7978,8 +8240,12 @@ export declare const customObjectListResponseSchema: z.ZodObject<{
7978
8240
  principal?: string | undefined;
7979
8241
  }[] | undefined;
7980
8242
  }>>;
8243
+ /** ID of the agent that owns this object (`agt_...`). `null` for other ownership types. */
8244
+ agent: z.ZodOptional<z.ZodString>;
7981
8245
  /** When the custom object was created (ISO 8601). */
7982
8246
  created_at: z.ZodOptional<z.ZodString>;
8247
+ /** Absolute expiry time (RFC 3339). Null when no expiry is set. */
8248
+ expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7983
8249
  /** Map of field names to their current values as defined by the object's schema type. */
7984
8250
  fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
7985
8251
  /** Unique identifier for the custom object (`cobj_...`). */
@@ -8004,6 +8270,7 @@ export declare const customObjectListResponseSchema: z.ZodObject<{
8004
8270
  id: string;
8005
8271
  user?: string | undefined;
8006
8272
  org?: string | undefined;
8273
+ agent?: string | undefined;
8007
8274
  team?: string | undefined;
8008
8275
  created_at?: string | undefined;
8009
8276
  updated_at?: string | undefined;
@@ -8025,6 +8292,7 @@ export declare const customObjectListResponseSchema: z.ZodObject<{
8025
8292
  }[] | undefined;
8026
8293
  } | undefined;
8027
8294
  version?: number | undefined;
8295
+ expires_at?: string | null | undefined;
8028
8296
  fields?: Record<string, {} | null> | undefined;
8029
8297
  row_key?: string | undefined;
8030
8298
  schema_type?: string | undefined;
@@ -8032,6 +8300,7 @@ export declare const customObjectListResponseSchema: z.ZodObject<{
8032
8300
  id: string;
8033
8301
  user?: string | undefined;
8034
8302
  org?: string | undefined;
8303
+ agent?: string | undefined;
8035
8304
  team?: string | undefined;
8036
8305
  created_at?: string | undefined;
8037
8306
  updated_at?: string | undefined;
@@ -8053,6 +8322,7 @@ export declare const customObjectListResponseSchema: z.ZodObject<{
8053
8322
  }[] | undefined;
8054
8323
  } | undefined;
8055
8324
  version?: number | undefined;
8325
+ expires_at?: string | null | undefined;
8056
8326
  fields?: Record<string, {} | null> | undefined;
8057
8327
  row_key?: string | undefined;
8058
8328
  schema_type?: string | undefined;
@@ -8065,15 +8335,16 @@ export declare const customObjectListResponseSchema: z.ZodObject<{
8065
8335
  page: z.ZodNumber;
8066
8336
  /** Maximum number of results returned per page. */
8067
8337
  page_size: z.ZodNumber;
8068
- /** Total number of custom objects matching the query across all pages. */
8069
- total_entries: z.ZodNumber;
8070
- /** Total number of pages available for the current query. */
8071
- total_pages: z.ZodNumber;
8338
+ /** Total number of custom objects matching the query across all pages; null when include_count is false. */
8339
+ total_entries: z.ZodNullable<z.ZodNumber>;
8340
+ /** Total number of pages available for the current query; null when include_count is false. */
8341
+ total_pages: z.ZodNullable<z.ZodNumber>;
8072
8342
  }, "strip", z.ZodTypeAny, {
8073
8343
  data: {
8074
8344
  id: string;
8075
8345
  user?: string | undefined;
8076
8346
  org?: string | undefined;
8347
+ agent?: string | undefined;
8077
8348
  team?: string | undefined;
8078
8349
  created_at?: string | undefined;
8079
8350
  updated_at?: string | undefined;
@@ -8095,6 +8366,7 @@ export declare const customObjectListResponseSchema: z.ZodObject<{
8095
8366
  }[] | undefined;
8096
8367
  } | undefined;
8097
8368
  version?: number | undefined;
8369
+ expires_at?: string | null | undefined;
8098
8370
  fields?: Record<string, {} | null> | undefined;
8099
8371
  row_key?: string | undefined;
8100
8372
  schema_type?: string | undefined;
@@ -8103,13 +8375,14 @@ export declare const customObjectListResponseSchema: z.ZodObject<{
8103
8375
  has_prev: boolean;
8104
8376
  page: number;
8105
8377
  page_size: number;
8106
- total_entries: number;
8107
- total_pages: number;
8378
+ total_entries: number | null;
8379
+ total_pages: number | null;
8108
8380
  }, {
8109
8381
  data: {
8110
8382
  id: string;
8111
8383
  user?: string | undefined;
8112
8384
  org?: string | undefined;
8385
+ agent?: string | undefined;
8113
8386
  team?: string | undefined;
8114
8387
  created_at?: string | undefined;
8115
8388
  updated_at?: string | undefined;
@@ -8131,6 +8404,7 @@ export declare const customObjectListResponseSchema: z.ZodObject<{
8131
8404
  }[] | undefined;
8132
8405
  } | undefined;
8133
8406
  version?: number | undefined;
8407
+ expires_at?: string | null | undefined;
8134
8408
  fields?: Record<string, {} | null> | undefined;
8135
8409
  row_key?: string | undefined;
8136
8410
  schema_type?: string | undefined;
@@ -8139,8 +8413,8 @@ export declare const customObjectListResponseSchema: z.ZodObject<{
8139
8413
  has_prev: boolean;
8140
8414
  page: number;
8141
8415
  page_size: number;
8142
- total_entries: number;
8143
- total_pages: number;
8416
+ total_entries: number | null;
8417
+ total_pages: number | null;
8144
8418
  }>;
8145
8419
  /** Acknowledges an ephemeral custom-object presence update. */
8146
8420
  export interface CustomObjectPresenceAck {
@@ -9312,54 +9586,86 @@ export declare const installationSourceListResponseSchema: z.ZodObject<{
9312
9586
  parent_source?: string | undefined;
9313
9587
  }[];
9314
9588
  }>;
9315
- /** A single key-value storage entry belonging to a user. Represents one key/value pair written to a user's isolated storage namespace within an app. */
9589
+ /** An owner-scoped key/value pair within an app, optionally expiring. */
9316
9590
  export interface KeyValueStorageEntry {
9591
+ /** Agent owner, if any. */
9592
+ agent?: string | undefined;
9317
9593
  /** When this storage entry was first created (ISO 8601). `null` if not yet persisted. */
9318
9594
  created_at?: string | undefined;
9595
+ /** Expiry deadline, or null for entries without expiry. */
9596
+ expires_at?: string | undefined;
9319
9597
  /** The string key used to store and look up this entry. */
9320
9598
  key: string;
9599
+ /** Organization scope. */
9600
+ org?: string | undefined;
9601
+ /** Team owner, if any. */
9602
+ team?: string | undefined;
9321
9603
  /** When this storage entry was last updated (ISO 8601). `null` if not yet persisted. */
9322
9604
  updated_at?: string | undefined;
9323
- /** ID of the user who owns this storage entry (`usr_...`). */
9324
- user: string;
9605
+ /** ID of the user owner, or null for non-user ownership. */
9606
+ user?: string | undefined;
9325
9607
  /** The string value stored under `key` for this user. */
9326
9608
  value: string;
9327
9609
  }
9328
9610
  /** Runtime validator for {@link KeyValueStorageEntry}. */
9329
9611
  export declare const keyValueStorageEntrySchema: z.ZodObject<{
9612
+ /** Agent owner, if any. */
9613
+ agent: z.ZodOptional<z.ZodString>;
9330
9614
  /** When this storage entry was first created (ISO 8601). `null` if not yet persisted. */
9331
9615
  created_at: z.ZodOptional<z.ZodString>;
9616
+ /** Expiry deadline, or null for entries without expiry. */
9617
+ expires_at: z.ZodOptional<z.ZodString>;
9332
9618
  /** The string key used to store and look up this entry. */
9333
9619
  key: z.ZodString;
9620
+ /** Organization scope. */
9621
+ org: z.ZodOptional<z.ZodString>;
9622
+ /** Team owner, if any. */
9623
+ team: z.ZodOptional<z.ZodString>;
9334
9624
  /** When this storage entry was last updated (ISO 8601). `null` if not yet persisted. */
9335
9625
  updated_at: z.ZodOptional<z.ZodString>;
9336
- /** ID of the user who owns this storage entry (`usr_...`). */
9337
- user: z.ZodString;
9626
+ /** ID of the user owner, or null for non-user ownership. */
9627
+ user: z.ZodOptional<z.ZodString>;
9338
9628
  /** The string value stored under `key` for this user. */
9339
9629
  value: z.ZodString;
9340
9630
  }, "strip", z.ZodTypeAny, {
9341
9631
  value: string;
9342
9632
  key: string;
9343
- user: string;
9633
+ user?: string | undefined;
9634
+ org?: string | undefined;
9635
+ agent?: string | undefined;
9636
+ team?: string | undefined;
9344
9637
  created_at?: string | undefined;
9345
9638
  updated_at?: string | undefined;
9639
+ expires_at?: string | undefined;
9346
9640
  }, {
9347
9641
  value: string;
9348
9642
  key: string;
9349
- user: string;
9643
+ user?: string | undefined;
9644
+ org?: string | undefined;
9645
+ agent?: string | undefined;
9646
+ team?: string | undefined;
9350
9647
  created_at?: string | undefined;
9351
9648
  updated_at?: string | undefined;
9649
+ expires_at?: string | undefined;
9352
9650
  }>;
9353
9651
  /** A key-value storage entry enriched with owner information. Developer and server-to-server callers receive `user_email` and `user_name` populated; end-user (user-JWT) callers receive those fields as `null`. */
9354
9652
  export interface KeyValueStorageEntryWithUser {
9653
+ /** Agent owner, if any. */
9654
+ agent?: string | undefined;
9355
9655
  /** When this storage entry was first created (ISO 8601). */
9356
9656
  created_at: string;
9657
+ /** Expiry deadline, or null for entries without expiry. */
9658
+ expires_at?: string | undefined;
9357
9659
  /** The string key used to store and look up this entry. */
9358
9660
  key: string;
9661
+ /** Organization scope. */
9662
+ org?: string | undefined;
9663
+ /** Team owner, if any. */
9664
+ team?: string | undefined;
9359
9665
  /** When this storage entry was last updated (ISO 8601). */
9360
9666
  updated_at: string;
9361
- /** ID of the user who owns this storage entry (`usr_...`). */
9362
- user: string;
9667
+ /** ID of the user owner, or null for non-user ownership. */
9668
+ user?: string | undefined;
9363
9669
  /** Email address of the owning user. `null` for end-user (user-JWT) callers; populated for developer and server-to-server callers. */
9364
9670
  user_email?: string | undefined;
9365
9671
  /** Display name of the owning user. `null` for end-user (user-JWT) callers; populated for developer and server-to-server callers. */
@@ -9369,14 +9675,22 @@ export interface KeyValueStorageEntryWithUser {
9369
9675
  }
9370
9676
  /** Runtime validator for {@link KeyValueStorageEntryWithUser}. */
9371
9677
  export declare const keyValueStorageEntryWithUserSchema: z.ZodObject<{
9678
+ /** Agent owner, if any. */
9679
+ agent: z.ZodOptional<z.ZodString>;
9372
9680
  /** When this storage entry was first created (ISO 8601). */
9373
9681
  created_at: z.ZodString;
9682
+ /** Expiry deadline, or null for entries without expiry. */
9683
+ expires_at: z.ZodOptional<z.ZodString>;
9374
9684
  /** The string key used to store and look up this entry. */
9375
9685
  key: z.ZodString;
9686
+ /** Organization scope. */
9687
+ org: z.ZodOptional<z.ZodString>;
9688
+ /** Team owner, if any. */
9689
+ team: z.ZodOptional<z.ZodString>;
9376
9690
  /** When this storage entry was last updated (ISO 8601). */
9377
9691
  updated_at: z.ZodString;
9378
- /** ID of the user who owns this storage entry (`usr_...`). */
9379
- user: z.ZodString;
9692
+ /** ID of the user owner, or null for non-user ownership. */
9693
+ user: z.ZodOptional<z.ZodString>;
9380
9694
  /** Email address of the owning user. `null` for end-user (user-JWT) callers; populated for developer and server-to-server callers. */
9381
9695
  user_email: z.ZodOptional<z.ZodString>;
9382
9696
  /** Display name of the owning user. `null` for end-user (user-JWT) callers; populated for developer and server-to-server callers. */
@@ -9386,17 +9700,25 @@ export declare const keyValueStorageEntryWithUserSchema: z.ZodObject<{
9386
9700
  }, "strip", z.ZodTypeAny, {
9387
9701
  value: string;
9388
9702
  key: string;
9389
- user: string;
9390
9703
  created_at: string;
9391
9704
  updated_at: string;
9705
+ user?: string | undefined;
9706
+ org?: string | undefined;
9707
+ agent?: string | undefined;
9708
+ team?: string | undefined;
9709
+ expires_at?: string | undefined;
9392
9710
  user_email?: string | undefined;
9393
9711
  user_name?: string | undefined;
9394
9712
  }, {
9395
9713
  value: string;
9396
9714
  key: string;
9397
- user: string;
9398
9715
  created_at: string;
9399
9716
  updated_at: string;
9717
+ user?: string | undefined;
9718
+ org?: string | undefined;
9719
+ agent?: string | undefined;
9720
+ team?: string | undefined;
9721
+ expires_at?: string | undefined;
9400
9722
  user_email?: string | undefined;
9401
9723
  user_name?: string | undefined;
9402
9724
  }>;
@@ -9421,14 +9743,22 @@ export interface KeyValueStorageEntryPage {
9421
9743
  export declare const keyValueStorageEntryPageSchema: z.ZodObject<{
9422
9744
  /** Array of key-value storage entries for the current page. */
9423
9745
  data: z.ZodArray<z.ZodObject<{
9746
+ /** Agent owner, if any. */
9747
+ agent: z.ZodOptional<z.ZodString>;
9424
9748
  /** When this storage entry was first created (ISO 8601). */
9425
9749
  created_at: z.ZodString;
9750
+ /** Expiry deadline, or null for entries without expiry. */
9751
+ expires_at: z.ZodOptional<z.ZodString>;
9426
9752
  /** The string key used to store and look up this entry. */
9427
9753
  key: z.ZodString;
9754
+ /** Organization scope. */
9755
+ org: z.ZodOptional<z.ZodString>;
9756
+ /** Team owner, if any. */
9757
+ team: z.ZodOptional<z.ZodString>;
9428
9758
  /** When this storage entry was last updated (ISO 8601). */
9429
9759
  updated_at: z.ZodString;
9430
- /** ID of the user who owns this storage entry (`usr_...`). */
9431
- user: z.ZodString;
9760
+ /** ID of the user owner, or null for non-user ownership. */
9761
+ user: z.ZodOptional<z.ZodString>;
9432
9762
  /** Email address of the owning user. `null` for end-user (user-JWT) callers; populated for developer and server-to-server callers. */
9433
9763
  user_email: z.ZodOptional<z.ZodString>;
9434
9764
  /** Display name of the owning user. `null` for end-user (user-JWT) callers; populated for developer and server-to-server callers. */
@@ -9438,17 +9768,25 @@ export declare const keyValueStorageEntryPageSchema: z.ZodObject<{
9438
9768
  }, "strip", z.ZodTypeAny, {
9439
9769
  value: string;
9440
9770
  key: string;
9441
- user: string;
9442
9771
  created_at: string;
9443
9772
  updated_at: string;
9773
+ user?: string | undefined;
9774
+ org?: string | undefined;
9775
+ agent?: string | undefined;
9776
+ team?: string | undefined;
9777
+ expires_at?: string | undefined;
9444
9778
  user_email?: string | undefined;
9445
9779
  user_name?: string | undefined;
9446
9780
  }, {
9447
9781
  value: string;
9448
9782
  key: string;
9449
- user: string;
9450
9783
  created_at: string;
9451
9784
  updated_at: string;
9785
+ user?: string | undefined;
9786
+ org?: string | undefined;
9787
+ agent?: string | undefined;
9788
+ team?: string | undefined;
9789
+ expires_at?: string | undefined;
9452
9790
  user_email?: string | undefined;
9453
9791
  user_name?: string | undefined;
9454
9792
  }>, "many">;
@@ -9468,9 +9806,13 @@ export declare const keyValueStorageEntryPageSchema: z.ZodObject<{
9468
9806
  data: {
9469
9807
  value: string;
9470
9808
  key: string;
9471
- user: string;
9472
9809
  created_at: string;
9473
9810
  updated_at: string;
9811
+ user?: string | undefined;
9812
+ org?: string | undefined;
9813
+ agent?: string | undefined;
9814
+ team?: string | undefined;
9815
+ expires_at?: string | undefined;
9474
9816
  user_email?: string | undefined;
9475
9817
  user_name?: string | undefined;
9476
9818
  }[];
@@ -9484,9 +9826,13 @@ export declare const keyValueStorageEntryPageSchema: z.ZodObject<{
9484
9826
  data: {
9485
9827
  value: string;
9486
9828
  key: string;
9487
- user: string;
9488
9829
  created_at: string;
9489
9830
  updated_at: string;
9831
+ user?: string | undefined;
9832
+ org?: string | undefined;
9833
+ agent?: string | undefined;
9834
+ team?: string | undefined;
9835
+ expires_at?: string | undefined;
9490
9836
  user_email?: string | undefined;
9491
9837
  user_name?: string | undefined;
9492
9838
  }[];
@@ -10035,6 +10381,8 @@ export declare const paginatedRepliesSchema: z.ZodObject<{
10035
10381
  image_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10036
10382
  /** Width in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise. */
10037
10383
  image_width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
10384
+ /** For `structured_data` type, what the data is about as set by the sender (for example `"pr:14963"`), copied from the record so it can be read without `object`. Not unique. `null` when unset and on other types. */
10385
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10038
10386
  /** The media category, e.g. `"video"` or `"audio"`. Present on `media` type only; omitted otherwise. */
10039
10387
  media_type: z.ZodOptional<z.ZodString>;
10040
10388
  /** Display name of the media item. Present on `media` type only. `null` otherwise. */
@@ -10049,10 +10397,14 @@ export declare const paginatedRepliesSchema: z.ZodObject<{
10049
10397
  url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10050
10398
  /** Array of available encoding variants for the media item (e.g. different resolutions). Present on `media` type only; omitted otherwise. */
10051
10399
  variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
10400
+ /** Size of the stored bytes. */
10401
+ byte_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
10052
10402
  /** MIME type of this variant's file (e.g., `"image/jpeg"`, `"video/mp4"`). `null` if the file is not loaded. */
10053
10403
  content_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10054
10404
  /** When this variant was created (ISO 8601). */
10055
10405
  created_at: z.ZodOptional<z.ZodString>;
10406
+ /** Client-declared video duration in milliseconds; not server-probed. */
10407
+ duration_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
10056
10408
  /** ID of the underlying storage file that backs this variant (`fil_...`). */
10057
10409
  file: z.ZodOptional<z.ZodString>;
10058
10410
  /** Original filename of the uploaded file for this variant. `null` if the file is not loaded. */
@@ -10087,10 +10439,14 @@ export declare const paginatedRepliesSchema: z.ZodObject<{
10087
10439
  url?: string | null | undefined;
10088
10440
  width?: number | null | undefined;
10089
10441
  }>>>;
10442
+ /** Lowercase SHA-256 of the stored bytes. */
10443
+ sha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10090
10444
  /** When this variant was last updated (ISO 8601). */
10091
10445
  updated_at: z.ZodOptional<z.ZodString>;
10092
10446
  /** Signed download URL for this variant, resolved at request time. `null` if the file is unavailable. */
10093
10447
  url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10448
+ /** Expiry of this variant's playable URL. */
10449
+ url_expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10094
10450
  /** Identifier for this variant's processing tier. Common values include `"original"` (the unmodified upload) and `"thumbnail"` (a resized preview). */
10095
10451
  variant_key: z.ZodOptional<z.ZodString>;
10096
10452
  /** Width of this variant in pixels. `null` if not recorded. */
@@ -10103,7 +10459,9 @@ export declare const paginatedRepliesSchema: z.ZodObject<{
10103
10459
  height?: number | null | undefined;
10104
10460
  url?: string | null | undefined;
10105
10461
  width?: number | null | undefined;
10462
+ byte_size?: number | null | undefined;
10106
10463
  content_type?: string | null | undefined;
10464
+ duration_ms?: number | null | undefined;
10107
10465
  filename?: string | null | undefined;
10108
10466
  image_source?: {
10109
10467
  mime_type?: string | null | undefined;
@@ -10114,6 +10472,8 @@ export declare const paginatedRepliesSchema: z.ZodObject<{
10114
10472
  url?: string | null | undefined;
10115
10473
  width?: number | null | undefined;
10116
10474
  } | null | undefined;
10475
+ sha256?: string | null | undefined;
10476
+ url_expires_at?: string | null | undefined;
10117
10477
  variant_key?: string | undefined;
10118
10478
  }, {
10119
10479
  id: string;
@@ -10123,7 +10483,9 @@ export declare const paginatedRepliesSchema: z.ZodObject<{
10123
10483
  height?: number | null | undefined;
10124
10484
  url?: string | null | undefined;
10125
10485
  width?: number | null | undefined;
10486
+ byte_size?: number | null | undefined;
10126
10487
  content_type?: string | null | undefined;
10488
+ duration_ms?: number | null | undefined;
10127
10489
  filename?: string | null | undefined;
10128
10490
  image_source?: {
10129
10491
  mime_type?: string | null | undefined;
@@ -10134,6 +10496,8 @@ export declare const paginatedRepliesSchema: z.ZodObject<{
10134
10496
  url?: string | null | undefined;
10135
10497
  width?: number | null | undefined;
10136
10498
  } | null | undefined;
10499
+ sha256?: string | null | undefined;
10500
+ url_expires_at?: string | null | undefined;
10137
10501
  variant_key?: string | undefined;
10138
10502
  }>, "many">>;
10139
10503
  /** Version number of the attached artifact at the time of attachment. Present on `artifact` type only. `null` otherwise. */
@@ -10144,6 +10508,7 @@ export declare const paginatedRepliesSchema: z.ZodObject<{
10144
10508
  type: string;
10145
10509
  id: string;
10146
10510
  object?: Record<string, {} | null> | undefined;
10511
+ key?: string | null | undefined;
10147
10512
  name?: string | null | undefined;
10148
10513
  description?: string | null | undefined;
10149
10514
  height?: number | null | undefined;
@@ -10173,7 +10538,9 @@ export declare const paginatedRepliesSchema: z.ZodObject<{
10173
10538
  height?: number | null | undefined;
10174
10539
  url?: string | null | undefined;
10175
10540
  width?: number | null | undefined;
10541
+ byte_size?: number | null | undefined;
10176
10542
  content_type?: string | null | undefined;
10543
+ duration_ms?: number | null | undefined;
10177
10544
  filename?: string | null | undefined;
10178
10545
  image_source?: {
10179
10546
  mime_type?: string | null | undefined;
@@ -10184,6 +10551,8 @@ export declare const paginatedRepliesSchema: z.ZodObject<{
10184
10551
  url?: string | null | undefined;
10185
10552
  width?: number | null | undefined;
10186
10553
  } | null | undefined;
10554
+ sha256?: string | null | undefined;
10555
+ url_expires_at?: string | null | undefined;
10187
10556
  variant_key?: string | undefined;
10188
10557
  }[] | undefined;
10189
10558
  version?: number | null | undefined;
@@ -10191,6 +10560,7 @@ export declare const paginatedRepliesSchema: z.ZodObject<{
10191
10560
  type: string;
10192
10561
  id: string;
10193
10562
  object?: Record<string, {} | null> | undefined;
10563
+ key?: string | null | undefined;
10194
10564
  name?: string | null | undefined;
10195
10565
  description?: string | null | undefined;
10196
10566
  height?: number | null | undefined;
@@ -10220,7 +10590,9 @@ export declare const paginatedRepliesSchema: z.ZodObject<{
10220
10590
  height?: number | null | undefined;
10221
10591
  url?: string | null | undefined;
10222
10592
  width?: number | null | undefined;
10593
+ byte_size?: number | null | undefined;
10223
10594
  content_type?: string | null | undefined;
10595
+ duration_ms?: number | null | undefined;
10224
10596
  filename?: string | null | undefined;
10225
10597
  image_source?: {
10226
10598
  mime_type?: string | null | undefined;
@@ -10231,6 +10603,8 @@ export declare const paginatedRepliesSchema: z.ZodObject<{
10231
10603
  url?: string | null | undefined;
10232
10604
  width?: number | null | undefined;
10233
10605
  } | null | undefined;
10606
+ sha256?: string | null | undefined;
10607
+ url_expires_at?: string | null | undefined;
10234
10608
  variant_key?: string | undefined;
10235
10609
  }[] | undefined;
10236
10610
  version?: number | null | undefined;
@@ -10431,6 +10805,7 @@ export declare const paginatedRepliesSchema: z.ZodObject<{
10431
10805
  type: string;
10432
10806
  id: string;
10433
10807
  object?: Record<string, {} | null> | undefined;
10808
+ key?: string | null | undefined;
10434
10809
  name?: string | null | undefined;
10435
10810
  description?: string | null | undefined;
10436
10811
  height?: number | null | undefined;
@@ -10460,7 +10835,9 @@ export declare const paginatedRepliesSchema: z.ZodObject<{
10460
10835
  height?: number | null | undefined;
10461
10836
  url?: string | null | undefined;
10462
10837
  width?: number | null | undefined;
10838
+ byte_size?: number | null | undefined;
10463
10839
  content_type?: string | null | undefined;
10840
+ duration_ms?: number | null | undefined;
10464
10841
  filename?: string | null | undefined;
10465
10842
  image_source?: {
10466
10843
  mime_type?: string | null | undefined;
@@ -10471,6 +10848,8 @@ export declare const paginatedRepliesSchema: z.ZodObject<{
10471
10848
  url?: string | null | undefined;
10472
10849
  width?: number | null | undefined;
10473
10850
  } | null | undefined;
10851
+ sha256?: string | null | undefined;
10852
+ url_expires_at?: string | null | undefined;
10474
10853
  variant_key?: string | undefined;
10475
10854
  }[] | undefined;
10476
10855
  version?: number | null | undefined;
@@ -10566,6 +10945,7 @@ export declare const paginatedRepliesSchema: z.ZodObject<{
10566
10945
  type: string;
10567
10946
  id: string;
10568
10947
  object?: Record<string, {} | null> | undefined;
10948
+ key?: string | null | undefined;
10569
10949
  name?: string | null | undefined;
10570
10950
  description?: string | null | undefined;
10571
10951
  height?: number | null | undefined;
@@ -10595,7 +10975,9 @@ export declare const paginatedRepliesSchema: z.ZodObject<{
10595
10975
  height?: number | null | undefined;
10596
10976
  url?: string | null | undefined;
10597
10977
  width?: number | null | undefined;
10978
+ byte_size?: number | null | undefined;
10598
10979
  content_type?: string | null | undefined;
10980
+ duration_ms?: number | null | undefined;
10599
10981
  filename?: string | null | undefined;
10600
10982
  image_source?: {
10601
10983
  mime_type?: string | null | undefined;
@@ -10606,6 +10988,8 @@ export declare const paginatedRepliesSchema: z.ZodObject<{
10606
10988
  url?: string | null | undefined;
10607
10989
  width?: number | null | undefined;
10608
10990
  } | null | undefined;
10991
+ sha256?: string | null | undefined;
10992
+ url_expires_at?: string | null | undefined;
10609
10993
  variant_key?: string | undefined;
10610
10994
  }[] | undefined;
10611
10995
  version?: number | null | undefined;
@@ -10705,6 +11089,7 @@ export declare const paginatedRepliesSchema: z.ZodObject<{
10705
11089
  type: string;
10706
11090
  id: string;
10707
11091
  object?: Record<string, {} | null> | undefined;
11092
+ key?: string | null | undefined;
10708
11093
  name?: string | null | undefined;
10709
11094
  description?: string | null | undefined;
10710
11095
  height?: number | null | undefined;
@@ -10734,7 +11119,9 @@ export declare const paginatedRepliesSchema: z.ZodObject<{
10734
11119
  height?: number | null | undefined;
10735
11120
  url?: string | null | undefined;
10736
11121
  width?: number | null | undefined;
11122
+ byte_size?: number | null | undefined;
10737
11123
  content_type?: string | null | undefined;
11124
+ duration_ms?: number | null | undefined;
10738
11125
  filename?: string | null | undefined;
10739
11126
  image_source?: {
10740
11127
  mime_type?: string | null | undefined;
@@ -10745,6 +11132,8 @@ export declare const paginatedRepliesSchema: z.ZodObject<{
10745
11132
  url?: string | null | undefined;
10746
11133
  width?: number | null | undefined;
10747
11134
  } | null | undefined;
11135
+ sha256?: string | null | undefined;
11136
+ url_expires_at?: string | null | undefined;
10748
11137
  variant_key?: string | undefined;
10749
11138
  }[] | undefined;
10750
11139
  version?: number | null | undefined;
@@ -10846,6 +11235,7 @@ export declare const paginatedRepliesSchema: z.ZodObject<{
10846
11235
  type: string;
10847
11236
  id: string;
10848
11237
  object?: Record<string, {} | null> | undefined;
11238
+ key?: string | null | undefined;
10849
11239
  name?: string | null | undefined;
10850
11240
  description?: string | null | undefined;
10851
11241
  height?: number | null | undefined;
@@ -10875,7 +11265,9 @@ export declare const paginatedRepliesSchema: z.ZodObject<{
10875
11265
  height?: number | null | undefined;
10876
11266
  url?: string | null | undefined;
10877
11267
  width?: number | null | undefined;
11268
+ byte_size?: number | null | undefined;
10878
11269
  content_type?: string | null | undefined;
11270
+ duration_ms?: number | null | undefined;
10879
11271
  filename?: string | null | undefined;
10880
11272
  image_source?: {
10881
11273
  mime_type?: string | null | undefined;
@@ -10886,6 +11278,8 @@ export declare const paginatedRepliesSchema: z.ZodObject<{
10886
11278
  url?: string | null | undefined;
10887
11279
  width?: number | null | undefined;
10888
11280
  } | null | undefined;
11281
+ sha256?: string | null | undefined;
11282
+ url_expires_at?: string | null | undefined;
10889
11283
  variant_key?: string | undefined;
10890
11284
  }[] | undefined;
10891
11285
  version?: number | null | undefined;
@@ -11460,14 +11854,14 @@ export declare const runtimeCapabilitySchema: z.ZodObject<{
11460
11854
  expires_at: z.ZodString;
11461
11855
  gateway_url: z.ZodString;
11462
11856
  }, "strip", z.ZodTypeAny, {
11857
+ expires_at: string;
11463
11858
  bindings: Record<string, {} | null>;
11464
11859
  capability: string;
11465
- expires_at: string;
11466
11860
  gateway_url: string;
11467
11861
  }, {
11862
+ expires_at: string;
11468
11863
  bindings: Record<string, {} | null>;
11469
11864
  capability: string;
11470
- expires_at: string;
11471
11865
  gateway_url: string;
11472
11866
  }>;
11473
11867
  /** A single runtime environment variable available within a script execution context, including its key, description, and origin. */
@@ -16040,7 +16434,7 @@ export declare const agentSchema: z.ZodObject<{
16040
16434
  /** A cloud computer resource provisioned for an agent to use for browser and desktop automation tasks. */
16041
16435
  export interface AgentComputer {
16042
16436
  /** ID of the agent that owns this computer (`agi_...`). `null` if the computer is not yet assigned to an agent. */
16043
- agent?: string | undefined;
16437
+ agent?: string | null | undefined;
16044
16438
  /** ID of the app this computer belongs to (`dap_...`). */
16045
16439
  app?: string | undefined;
16046
16440
  /** Provider-specific configuration key-value pairs for the computer. Structure depends on the underlying compute provider. */
@@ -16048,32 +16442,36 @@ export interface AgentComputer {
16048
16442
  /** When the computer was created (ISO 8601). */
16049
16443
  created_at?: string | undefined;
16050
16444
  /** Human-readable error description when `status` is `"error"`. `null` otherwise. */
16051
- error_message?: string | undefined;
16445
+ error_message?: string | null | undefined;
16052
16446
  /** Computer ID (`cmp_...`). */
16053
16447
  id: string;
16448
+ /** Stable key unique within the thread, or null if unset. */
16449
+ key?: string | null | undefined;
16054
16450
  /** When the computer last reported activity or received a command. `null` if the computer has never been active. */
16055
- last_active_at?: string | undefined;
16451
+ last_active_at?: string | null | undefined;
16056
16452
  /** Unique, stable identifier you assign to this computer within its app. `null` if not set. */
16057
- lookup_key?: string | undefined;
16453
+ lookup_key?: string | null | undefined;
16058
16454
  /** Arbitrary key-value metadata you attached to the computer. `null` if none was provided. */
16059
16455
  metadata?: Record<string, unknown> | undefined;
16060
16456
  /** Human-readable display name for the computer. `null` if not set. */
16061
16457
  name?: string | undefined;
16062
- /** Compute backend powering this computer: `"sprites"` (Fly Sprites) or `"vercel"` (Vercel Sandbox). */
16458
+ /** Compute backend powering this computer: `"sprites"` (Fly Sprites), `"vercel"` (Vercel Sandbox) or `"e2b"` (E2B). */
16063
16459
  provider?: string | undefined;
16064
- /** Cloud region where the computer is hosted, e.g. `"us-east-1"`. `null` if not yet assigned or when the provider has no region concept (e.g. `"vercel"`). */
16065
- region?: string | undefined;
16460
+ /** Cloud region where the computer is hosted, e.g. `"us-east-1"`. `null` if not yet assigned or when the provider has no region concept (e.g. `"vercel"`, `"e2b"`). */
16461
+ region?: string | null | undefined;
16066
16462
  /** URL of the live screenshot sprite used to render a real-time preview of the computer's screen. `null` when no sprite is available. */
16067
- sprite_url?: string | undefined;
16463
+ sprite_url?: string | null | undefined;
16068
16464
  /** Current lifecycle state of the computer. Common values include `"provisioning"`, `"ready"`, `"error"`, and `"terminated"`. */
16069
- status?: string | undefined;
16465
+ status?: string | null | undefined;
16466
+ /** Thread this computer belongs to, or null for a non-thread computer. */
16467
+ thread_id?: string | null | undefined;
16070
16468
  /** When the computer record was last modified (ISO 8601). */
16071
16469
  updated_at?: string | undefined;
16072
16470
  }
16073
16471
  /** Runtime validator for {@link AgentComputer}. */
16074
16472
  export declare const agentComputerSchema: z.ZodObject<{
16075
16473
  /** ID of the agent that owns this computer (`agi_...`). `null` if the computer is not yet assigned to an agent. */
16076
- agent: z.ZodOptional<z.ZodString>;
16474
+ agent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16077
16475
  /** ID of the app this computer belongs to (`dap_...`). */
16078
16476
  app: z.ZodOptional<z.ZodString>;
16079
16477
  /** Provider-specific configuration key-value pairs for the computer. Structure depends on the underlying compute provider. */
@@ -16081,59 +16479,67 @@ export declare const agentComputerSchema: z.ZodObject<{
16081
16479
  /** When the computer was created (ISO 8601). */
16082
16480
  created_at: z.ZodOptional<z.ZodString>;
16083
16481
  /** Human-readable error description when `status` is `"error"`. `null` otherwise. */
16084
- error_message: z.ZodOptional<z.ZodString>;
16482
+ error_message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16085
16483
  /** Computer ID (`cmp_...`). */
16086
16484
  id: z.ZodString;
16485
+ /** Stable key unique within the thread, or null if unset. */
16486
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16087
16487
  /** When the computer last reported activity or received a command. `null` if the computer has never been active. */
16088
- last_active_at: z.ZodOptional<z.ZodString>;
16488
+ last_active_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16089
16489
  /** Unique, stable identifier you assign to this computer within its app. `null` if not set. */
16090
- lookup_key: z.ZodOptional<z.ZodString>;
16490
+ lookup_key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16091
16491
  /** Arbitrary key-value metadata you attached to the computer. `null` if none was provided. */
16092
16492
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
16093
16493
  /** Human-readable display name for the computer. `null` if not set. */
16094
16494
  name: z.ZodOptional<z.ZodString>;
16095
- /** Compute backend powering this computer: `"sprites"` (Fly Sprites) or `"vercel"` (Vercel Sandbox). */
16495
+ /** Compute backend powering this computer: `"sprites"` (Fly Sprites), `"vercel"` (Vercel Sandbox) or `"e2b"` (E2B). */
16096
16496
  provider: z.ZodOptional<z.ZodString>;
16097
- /** Cloud region where the computer is hosted, e.g. `"us-east-1"`. `null` if not yet assigned or when the provider has no region concept (e.g. `"vercel"`). */
16098
- region: z.ZodOptional<z.ZodString>;
16497
+ /** Cloud region where the computer is hosted, e.g. `"us-east-1"`. `null` if not yet assigned or when the provider has no region concept (e.g. `"vercel"`, `"e2b"`). */
16498
+ region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16099
16499
  /** URL of the live screenshot sprite used to render a real-time preview of the computer's screen. `null` when no sprite is available. */
16100
- sprite_url: z.ZodOptional<z.ZodString>;
16500
+ sprite_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16101
16501
  /** Current lifecycle state of the computer. Common values include `"provisioning"`, `"ready"`, `"error"`, and `"terminated"`. */
16102
- status: z.ZodOptional<z.ZodString>;
16502
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16503
+ /** Thread this computer belongs to, or null for a non-thread computer. */
16504
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16103
16505
  /** When the computer record was last modified (ISO 8601). */
16104
16506
  updated_at: z.ZodOptional<z.ZodString>;
16105
16507
  }, "strip", z.ZodTypeAny, {
16106
16508
  id: string;
16509
+ key?: string | null | undefined;
16107
16510
  name?: string | undefined;
16108
- agent?: string | undefined;
16109
- status?: string | undefined;
16511
+ agent?: string | null | undefined;
16512
+ status?: string | null | undefined;
16110
16513
  app?: string | undefined;
16111
16514
  created_at?: string | undefined;
16112
16515
  updated_at?: string | undefined;
16113
- lookup_key?: string | undefined;
16516
+ lookup_key?: string | null | undefined;
16114
16517
  metadata?: Record<string, {} | null> | undefined;
16518
+ thread_id?: string | null | undefined;
16115
16519
  config?: Record<string, {} | null> | undefined;
16116
16520
  provider?: string | undefined;
16117
- error_message?: string | undefined;
16118
- last_active_at?: string | undefined;
16119
- region?: string | undefined;
16120
- sprite_url?: string | undefined;
16521
+ error_message?: string | null | undefined;
16522
+ last_active_at?: string | null | undefined;
16523
+ region?: string | null | undefined;
16524
+ sprite_url?: string | null | undefined;
16121
16525
  }, {
16122
16526
  id: string;
16527
+ key?: string | null | undefined;
16123
16528
  name?: string | undefined;
16124
- agent?: string | undefined;
16125
- status?: string | undefined;
16529
+ agent?: string | null | undefined;
16530
+ status?: string | null | undefined;
16126
16531
  app?: string | undefined;
16127
16532
  created_at?: string | undefined;
16128
16533
  updated_at?: string | undefined;
16129
- lookup_key?: string | undefined;
16534
+ lookup_key?: string | null | undefined;
16130
16535
  metadata?: Record<string, {} | null> | undefined;
16536
+ thread_id?: string | null | undefined;
16131
16537
  config?: Record<string, {} | null> | undefined;
16132
16538
  provider?: string | undefined;
16133
- error_message?: string | undefined;
16134
- last_active_at?: string | undefined;
16135
- region?: string | undefined;
16136
- sprite_url?: string | undefined;
16539
+ error_message?: string | null | undefined;
16540
+ last_active_at?: string | null | undefined;
16541
+ region?: string | null | undefined;
16542
+ sprite_url?: string | null | undefined;
16137
16543
  }>;
16138
16544
  /** A list of agent computers returned by a list query. */
16139
16545
  export interface AgentComputerListResponse {
@@ -16145,7 +16551,7 @@ export declare const agentComputerListResponseSchema: z.ZodObject<{
16145
16551
  /** Array of agent computer objects matching the query. */
16146
16552
  data: z.ZodArray<z.ZodObject<{
16147
16553
  /** ID of the agent that owns this computer (`agi_...`). `null` if the computer is not yet assigned to an agent. */
16148
- agent: z.ZodOptional<z.ZodString>;
16554
+ agent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16149
16555
  /** ID of the app this computer belongs to (`dap_...`). */
16150
16556
  app: z.ZodOptional<z.ZodString>;
16151
16557
  /** Provider-specific configuration key-value pairs for the computer. Structure depends on the underlying compute provider. */
@@ -16153,95 +16559,107 @@ export declare const agentComputerListResponseSchema: z.ZodObject<{
16153
16559
  /** When the computer was created (ISO 8601). */
16154
16560
  created_at: z.ZodOptional<z.ZodString>;
16155
16561
  /** Human-readable error description when `status` is `"error"`. `null` otherwise. */
16156
- error_message: z.ZodOptional<z.ZodString>;
16562
+ error_message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16157
16563
  /** Computer ID (`cmp_...`). */
16158
16564
  id: z.ZodString;
16565
+ /** Stable key unique within the thread, or null if unset. */
16566
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16159
16567
  /** When the computer last reported activity or received a command. `null` if the computer has never been active. */
16160
- last_active_at: z.ZodOptional<z.ZodString>;
16568
+ last_active_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16161
16569
  /** Unique, stable identifier you assign to this computer within its app. `null` if not set. */
16162
- lookup_key: z.ZodOptional<z.ZodString>;
16570
+ lookup_key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16163
16571
  /** Arbitrary key-value metadata you attached to the computer. `null` if none was provided. */
16164
16572
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
16165
16573
  /** Human-readable display name for the computer. `null` if not set. */
16166
16574
  name: z.ZodOptional<z.ZodString>;
16167
- /** Compute backend powering this computer: `"sprites"` (Fly Sprites) or `"vercel"` (Vercel Sandbox). */
16575
+ /** Compute backend powering this computer: `"sprites"` (Fly Sprites), `"vercel"` (Vercel Sandbox) or `"e2b"` (E2B). */
16168
16576
  provider: z.ZodOptional<z.ZodString>;
16169
- /** Cloud region where the computer is hosted, e.g. `"us-east-1"`. `null` if not yet assigned or when the provider has no region concept (e.g. `"vercel"`). */
16170
- region: z.ZodOptional<z.ZodString>;
16577
+ /** Cloud region where the computer is hosted, e.g. `"us-east-1"`. `null` if not yet assigned or when the provider has no region concept (e.g. `"vercel"`, `"e2b"`). */
16578
+ region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16171
16579
  /** URL of the live screenshot sprite used to render a real-time preview of the computer's screen. `null` when no sprite is available. */
16172
- sprite_url: z.ZodOptional<z.ZodString>;
16580
+ sprite_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16173
16581
  /** Current lifecycle state of the computer. Common values include `"provisioning"`, `"ready"`, `"error"`, and `"terminated"`. */
16174
- status: z.ZodOptional<z.ZodString>;
16582
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16583
+ /** Thread this computer belongs to, or null for a non-thread computer. */
16584
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16175
16585
  /** When the computer record was last modified (ISO 8601). */
16176
16586
  updated_at: z.ZodOptional<z.ZodString>;
16177
16587
  }, "strip", z.ZodTypeAny, {
16178
16588
  id: string;
16589
+ key?: string | null | undefined;
16179
16590
  name?: string | undefined;
16180
- agent?: string | undefined;
16181
- status?: string | undefined;
16591
+ agent?: string | null | undefined;
16592
+ status?: string | null | undefined;
16182
16593
  app?: string | undefined;
16183
16594
  created_at?: string | undefined;
16184
16595
  updated_at?: string | undefined;
16185
- lookup_key?: string | undefined;
16596
+ lookup_key?: string | null | undefined;
16186
16597
  metadata?: Record<string, {} | null> | undefined;
16598
+ thread_id?: string | null | undefined;
16187
16599
  config?: Record<string, {} | null> | undefined;
16188
16600
  provider?: string | undefined;
16189
- error_message?: string | undefined;
16190
- last_active_at?: string | undefined;
16191
- region?: string | undefined;
16192
- sprite_url?: string | undefined;
16601
+ error_message?: string | null | undefined;
16602
+ last_active_at?: string | null | undefined;
16603
+ region?: string | null | undefined;
16604
+ sprite_url?: string | null | undefined;
16193
16605
  }, {
16194
16606
  id: string;
16607
+ key?: string | null | undefined;
16195
16608
  name?: string | undefined;
16196
- agent?: string | undefined;
16197
- status?: string | undefined;
16609
+ agent?: string | null | undefined;
16610
+ status?: string | null | undefined;
16198
16611
  app?: string | undefined;
16199
16612
  created_at?: string | undefined;
16200
16613
  updated_at?: string | undefined;
16201
- lookup_key?: string | undefined;
16614
+ lookup_key?: string | null | undefined;
16202
16615
  metadata?: Record<string, {} | null> | undefined;
16616
+ thread_id?: string | null | undefined;
16203
16617
  config?: Record<string, {} | null> | undefined;
16204
16618
  provider?: string | undefined;
16205
- error_message?: string | undefined;
16206
- last_active_at?: string | undefined;
16207
- region?: string | undefined;
16208
- sprite_url?: string | undefined;
16619
+ error_message?: string | null | undefined;
16620
+ last_active_at?: string | null | undefined;
16621
+ region?: string | null | undefined;
16622
+ sprite_url?: string | null | undefined;
16209
16623
  }>, "many">;
16210
16624
  }, "strip", z.ZodTypeAny, {
16211
16625
  data: {
16212
16626
  id: string;
16627
+ key?: string | null | undefined;
16213
16628
  name?: string | undefined;
16214
- agent?: string | undefined;
16215
- status?: string | undefined;
16629
+ agent?: string | null | undefined;
16630
+ status?: string | null | undefined;
16216
16631
  app?: string | undefined;
16217
16632
  created_at?: string | undefined;
16218
16633
  updated_at?: string | undefined;
16219
- lookup_key?: string | undefined;
16634
+ lookup_key?: string | null | undefined;
16220
16635
  metadata?: Record<string, {} | null> | undefined;
16636
+ thread_id?: string | null | undefined;
16221
16637
  config?: Record<string, {} | null> | undefined;
16222
16638
  provider?: string | undefined;
16223
- error_message?: string | undefined;
16224
- last_active_at?: string | undefined;
16225
- region?: string | undefined;
16226
- sprite_url?: string | undefined;
16639
+ error_message?: string | null | undefined;
16640
+ last_active_at?: string | null | undefined;
16641
+ region?: string | null | undefined;
16642
+ sprite_url?: string | null | undefined;
16227
16643
  }[];
16228
16644
  }, {
16229
16645
  data: {
16230
16646
  id: string;
16647
+ key?: string | null | undefined;
16231
16648
  name?: string | undefined;
16232
- agent?: string | undefined;
16233
- status?: string | undefined;
16649
+ agent?: string | null | undefined;
16650
+ status?: string | null | undefined;
16234
16651
  app?: string | undefined;
16235
16652
  created_at?: string | undefined;
16236
16653
  updated_at?: string | undefined;
16237
- lookup_key?: string | undefined;
16654
+ lookup_key?: string | null | undefined;
16238
16655
  metadata?: Record<string, {} | null> | undefined;
16656
+ thread_id?: string | null | undefined;
16239
16657
  config?: Record<string, {} | null> | undefined;
16240
16658
  provider?: string | undefined;
16241
- error_message?: string | undefined;
16242
- last_active_at?: string | undefined;
16243
- region?: string | undefined;
16244
- sprite_url?: string | undefined;
16659
+ error_message?: string | null | undefined;
16660
+ last_active_at?: string | null | undefined;
16661
+ region?: string | null | undefined;
16662
+ sprite_url?: string | null | undefined;
16245
16663
  }[];
16246
16664
  }>;
16247
16665
  /** The response returned by `POST /api/v1/agents`. Contains all agent fields plus an optional `installed_configs` array when a `template_bundle` was supplied in the request. */
@@ -20828,67 +21246,476 @@ export declare const agentListResponseSchema: z.ZodObject<{
20828
21246
  total_entries?: number | undefined;
20829
21247
  total_pages?: number | undefined;
20830
21248
  }>;
20831
- /** An agent routine defines a reusable handler — script, preset, or chain — that runs in response to events or on a schedule. */
20832
- export interface AgentRoutine {
20833
- /** Access control list for the routine. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions` (`"read"`, `"invoke"`, or `"assign"` — an `"assign"` grant names the agents or orgs that may be handed this routine's embedded work items). `null` when no ACL restrictions are applied and the routine is accessible to all members of its scope. */
20834
- acl?: Acl | undefined;
20835
- /** ID of the agent that owns this routine (`agi_...`). */
20836
- agent?: string | undefined;
20837
- /** Application that scopes this routine (`dap_...`). */
20838
- app?: string | undefined;
20839
- /** ID of the Config record that backs this routine's configuration (`cfg_...`). `null` when the routine is not config-backed. */
20840
- config?: string | undefined;
20841
- /** When this routine was created (ISO 8601). */
20842
- created_at?: string | undefined;
20843
- /** Optional description of what this routine does. `null` when not set. */
20844
- description?: string | undefined;
20845
- /** Additional configuration controlling how the event trigger is matched or filtered. Shape depends on `event_type`. `null` when not configured. */
20846
- event_config?: Record<string, unknown> | undefined;
20847
- /** Platform event type that triggers this routine, e.g. `"agentroutine.invoked"`. `null` for schedule-only routines. */
20848
- event_type?: string | undefined;
20849
- /** Execution strategy for this routine. One of `"workflow_graph"`, `"script"`, `"preset"`, or `"chain"`. */
20850
- handler_type?: string | undefined;
20851
- /** Routine ID (`arn_...`). */
21249
+ /** Originating agent. */
21250
+ export interface AgentRequestAgent {
20852
21251
  id: string;
20853
- /** ID of the AgentRoutineTemplate Config this routine was last provisioned or updated from (`cfg_...`). `null` for hand-built routines. */
20854
- last_applied_template_config?: string | undefined;
20855
- /** Unique human-readable key used to look up this routine without knowing its ID. `null` when not set. */
20856
- lookup_key?: string | undefined;
20857
- /** Visibility and explicit recipient selection for messages emitted by this routine. */
20858
- message_policy?: MessagePolicy | undefined;
20859
- /** Arbitrary key-value metadata attached to this routine. `null` when not set. */
20860
- metadata?: Record<string, unknown> | undefined;
20861
- /** Human-readable name for the routine. */
20862
- name?: string | undefined;
20863
- /** Resolved preset configuration when `handler_type` is `"preset"`. `null` for other handler types. */
20864
- preset_config?: PresetConfig | undefined;
20865
- /** Name of the preset invoked when `handler_type` is `"preset"`. `null` for other handler types. */
20866
- preset_name?: string | undefined;
20867
- /** Cron expression controlling when the routine fires on a schedule. `null` for event-only routines. */
20868
- schedule?: string | undefined;
20869
- /** Inline script body executed when `handler_type` is `"script"`. `null` for other handler types. */
20870
- script?: string | undefined;
20871
- /** Lifecycle status of the routine. One of `"draft"`, `"active"`, or `"paused"`. Only `"active"` routines respond to triggers. */
21252
+ name?: string | null | undefined;
21253
+ }
21254
+ /** Runtime validator for {@link AgentRequestAgent}. */
21255
+ export declare const agentRequestAgentSchema: z.ZodObject<{
21256
+ id: z.ZodString;
21257
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21258
+ }, "strip", z.ZodTypeAny, {
21259
+ id: string;
21260
+ name?: string | null | undefined;
21261
+ }, {
21262
+ id: string;
21263
+ name?: string | null | undefined;
21264
+ }>;
21265
+ /** A request for human approval or input. Secret input is never returned. */
21266
+ export interface AgentRequest {
21267
+ /** Originating agent. */
21268
+ agent?: AgentRequestAgent | undefined;
21269
+ /** Approval policy, excluding user IDs. */
21270
+ approvers?: Approvers | undefined;
21271
+ /** Expiration time. */
21272
+ expires_at?: string | undefined;
21273
+ /** Request ID (`arq_...`). */
21274
+ id: string;
21275
+ /** Whether the authenticated caller is an approver, regardless of request status. */
21276
+ is_approver?: boolean | undefined;
21277
+ /** Registered request kind. */
21278
+ kind?: string | undefined;
21279
+ /** Origin references. */
21280
+ origin?: Origin | undefined;
21281
+ /** Question request payload. */
21282
+ payload?: Payload | undefined;
21283
+ /** Answer or rejection reason; null before resolution. */
21284
+ resolution?: Resolution | null | undefined;
21285
+ /** Resolution time. */
21286
+ resolved_at?: string | undefined;
21287
+ /** Resolving user ID. */
21288
+ resolved_by?: string | undefined;
21289
+ /** Request status. */
20872
21290
  status?: string | undefined;
20873
- /** Ordered list of chain steps (present when handler_type is "chain"). Each step is a plain map with handler_type, optional body fields (preset_name / preset_config / script / config), and step-local plumbing (name, inputs, output_key, on_error). */
20874
- steps?: Record<string, unknown>[] | undefined;
20875
- /** Execution context in which runs are created. One of `"event"` (background job) or `"chat_session"` (interactive session). Defaults to `"event"`. */
20876
- trigger_context?: string | undefined;
20877
- /** When this routine was last updated (ISO 8601). */
20878
- updated_at?: string | undefined;
20879
- /** Optional co-owner user (`usr_...`). When set, that user shares view/modify/delete authority on this routine without administering the parent agent. `null` when not set. Never inferred from the caller — only present when explicitly provided on create/update. */
20880
- user?: string | undefined;
21291
+ /** Kind-provided summary. */
21292
+ summary?: Summary | undefined;
20881
21293
  }
20882
- /** Runtime validator for {@link AgentRoutine}. */
20883
- export declare const agentRoutineSchema: z.ZodObject<{
20884
- /** Access control list for the routine. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions` (`"read"`, `"invoke"`, or `"assign"` — an `"assign"` grant names the agents or orgs that may be handed this routine's embedded work items). `null` when no ACL restrictions are applied and the routine is accessible to all members of its scope. */
20885
- acl: z.ZodOptional<z.ZodObject<{
20886
- /** Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`. */
20887
- add: z.ZodOptional<z.ZodArray<z.ZodObject<{
20888
- /** Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry. */
20889
- actions: z.ZodArray<z.ZodString, "many">;
20890
- /** The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`. */
20891
- principal: z.ZodOptional<z.ZodString>;
21294
+ /** Runtime validator for {@link AgentRequest}. */
21295
+ export declare const agentRequestSchema: z.ZodObject<{
21296
+ /** Originating agent. */
21297
+ agent: z.ZodOptional<z.ZodObject<{
21298
+ id: z.ZodString;
21299
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21300
+ }, "strip", z.ZodTypeAny, {
21301
+ id: string;
21302
+ name?: string | null | undefined;
21303
+ }, {
21304
+ id: string;
21305
+ name?: string | null | undefined;
21306
+ }>>;
21307
+ /** Approval policy, excluding user IDs. */
21308
+ approvers: z.ZodOptional<z.ZodObject<{
21309
+ mode: z.ZodString;
21310
+ }, "strip", z.ZodTypeAny, {
21311
+ mode: string;
21312
+ }, {
21313
+ mode: string;
21314
+ }>>;
21315
+ /** Expiration time. */
21316
+ expires_at: z.ZodOptional<z.ZodString>;
21317
+ /** Request ID (`arq_...`). */
21318
+ id: z.ZodString;
21319
+ /** Whether the authenticated caller is an approver, regardless of request status. */
21320
+ is_approver: z.ZodOptional<z.ZodBoolean>;
21321
+ /** Registered request kind. */
21322
+ kind: z.ZodOptional<z.ZodString>;
21323
+ /** Origin references. */
21324
+ origin: z.ZodOptional<z.ZodObject<{
21325
+ routine_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21326
+ session_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21327
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21328
+ }, "strip", z.ZodTypeAny, {
21329
+ routine_id?: string | null | undefined;
21330
+ session_id?: string | null | undefined;
21331
+ thread_id?: string | null | undefined;
21332
+ }, {
21333
+ routine_id?: string | null | undefined;
21334
+ session_id?: string | null | undefined;
21335
+ thread_id?: string | null | undefined;
21336
+ }>>;
21337
+ /** Question request payload. */
21338
+ payload: z.ZodOptional<z.ZodObject<{
21339
+ question: z.ZodString;
21340
+ }, "strip", z.ZodTypeAny, {
21341
+ question: string;
21342
+ }, {
21343
+ question: string;
21344
+ }>>;
21345
+ /** Answer or rejection reason; null before resolution. */
21346
+ resolution: z.ZodOptional<z.ZodNullable<z.ZodObject<{
21347
+ answer: z.ZodOptional<z.ZodString>;
21348
+ reason: z.ZodOptional<z.ZodString>;
21349
+ }, "strip", z.ZodTypeAny, {
21350
+ answer?: string | undefined;
21351
+ reason?: string | undefined;
21352
+ }, {
21353
+ answer?: string | undefined;
21354
+ reason?: string | undefined;
21355
+ }>>>;
21356
+ /** Resolution time. */
21357
+ resolved_at: z.ZodOptional<z.ZodString>;
21358
+ /** Resolving user ID. */
21359
+ resolved_by: z.ZodOptional<z.ZodString>;
21360
+ /** Request status. */
21361
+ status: z.ZodOptional<z.ZodString>;
21362
+ /** Kind-provided summary. */
21363
+ summary: z.ZodOptional<z.ZodObject<{
21364
+ lines: z.ZodArray<z.ZodString, "many">;
21365
+ title: z.ZodString;
21366
+ }, "strip", z.ZodTypeAny, {
21367
+ title: string;
21368
+ lines: string[];
21369
+ }, {
21370
+ title: string;
21371
+ lines: string[];
21372
+ }>>;
21373
+ }, "strip", z.ZodTypeAny, {
21374
+ id: string;
21375
+ kind?: string | undefined;
21376
+ agent?: {
21377
+ id: string;
21378
+ name?: string | null | undefined;
21379
+ } | undefined;
21380
+ status?: string | undefined;
21381
+ payload?: {
21382
+ question: string;
21383
+ } | undefined;
21384
+ expires_at?: string | undefined;
21385
+ approvers?: {
21386
+ mode: string;
21387
+ } | undefined;
21388
+ is_approver?: boolean | undefined;
21389
+ origin?: {
21390
+ routine_id?: string | null | undefined;
21391
+ session_id?: string | null | undefined;
21392
+ thread_id?: string | null | undefined;
21393
+ } | undefined;
21394
+ resolution?: {
21395
+ answer?: string | undefined;
21396
+ reason?: string | undefined;
21397
+ } | null | undefined;
21398
+ resolved_at?: string | undefined;
21399
+ resolved_by?: string | undefined;
21400
+ summary?: {
21401
+ title: string;
21402
+ lines: string[];
21403
+ } | undefined;
21404
+ }, {
21405
+ id: string;
21406
+ kind?: string | undefined;
21407
+ agent?: {
21408
+ id: string;
21409
+ name?: string | null | undefined;
21410
+ } | undefined;
21411
+ status?: string | undefined;
21412
+ payload?: {
21413
+ question: string;
21414
+ } | undefined;
21415
+ expires_at?: string | undefined;
21416
+ approvers?: {
21417
+ mode: string;
21418
+ } | undefined;
21419
+ is_approver?: boolean | undefined;
21420
+ origin?: {
21421
+ routine_id?: string | null | undefined;
21422
+ session_id?: string | null | undefined;
21423
+ thread_id?: string | null | undefined;
21424
+ } | undefined;
21425
+ resolution?: {
21426
+ answer?: string | undefined;
21427
+ reason?: string | undefined;
21428
+ } | null | undefined;
21429
+ resolved_at?: string | undefined;
21430
+ resolved_by?: string | undefined;
21431
+ summary?: {
21432
+ title: string;
21433
+ lines: string[];
21434
+ } | undefined;
21435
+ }>;
21436
+ /** A page of visible agent requests. */
21437
+ export interface AgentRequestListResponse {
21438
+ /** Visible requests. */
21439
+ data: AgentRequest[];
21440
+ /** Pass as cursor for the next page; null at the end. */
21441
+ next_cursor?: string | undefined;
21442
+ }
21443
+ /** Runtime validator for {@link AgentRequestListResponse}. */
21444
+ export declare const agentRequestListResponseSchema: z.ZodObject<{
21445
+ /** Visible requests. */
21446
+ data: z.ZodArray<z.ZodObject<{
21447
+ /** Originating agent. */
21448
+ agent: z.ZodOptional<z.ZodObject<{
21449
+ id: z.ZodString;
21450
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21451
+ }, "strip", z.ZodTypeAny, {
21452
+ id: string;
21453
+ name?: string | null | undefined;
21454
+ }, {
21455
+ id: string;
21456
+ name?: string | null | undefined;
21457
+ }>>;
21458
+ /** Approval policy, excluding user IDs. */
21459
+ approvers: z.ZodOptional<z.ZodObject<{
21460
+ mode: z.ZodString;
21461
+ }, "strip", z.ZodTypeAny, {
21462
+ mode: string;
21463
+ }, {
21464
+ mode: string;
21465
+ }>>;
21466
+ /** Expiration time. */
21467
+ expires_at: z.ZodOptional<z.ZodString>;
21468
+ /** Request ID (`arq_...`). */
21469
+ id: z.ZodString;
21470
+ /** Whether the authenticated caller is an approver, regardless of request status. */
21471
+ is_approver: z.ZodOptional<z.ZodBoolean>;
21472
+ /** Registered request kind. */
21473
+ kind: z.ZodOptional<z.ZodString>;
21474
+ /** Origin references. */
21475
+ origin: z.ZodOptional<z.ZodObject<{
21476
+ routine_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21477
+ session_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21478
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21479
+ }, "strip", z.ZodTypeAny, {
21480
+ routine_id?: string | null | undefined;
21481
+ session_id?: string | null | undefined;
21482
+ thread_id?: string | null | undefined;
21483
+ }, {
21484
+ routine_id?: string | null | undefined;
21485
+ session_id?: string | null | undefined;
21486
+ thread_id?: string | null | undefined;
21487
+ }>>;
21488
+ /** Question request payload. */
21489
+ payload: z.ZodOptional<z.ZodObject<{
21490
+ question: z.ZodString;
21491
+ }, "strip", z.ZodTypeAny, {
21492
+ question: string;
21493
+ }, {
21494
+ question: string;
21495
+ }>>;
21496
+ /** Answer or rejection reason; null before resolution. */
21497
+ resolution: z.ZodOptional<z.ZodNullable<z.ZodObject<{
21498
+ answer: z.ZodOptional<z.ZodString>;
21499
+ reason: z.ZodOptional<z.ZodString>;
21500
+ }, "strip", z.ZodTypeAny, {
21501
+ answer?: string | undefined;
21502
+ reason?: string | undefined;
21503
+ }, {
21504
+ answer?: string | undefined;
21505
+ reason?: string | undefined;
21506
+ }>>>;
21507
+ /** Resolution time. */
21508
+ resolved_at: z.ZodOptional<z.ZodString>;
21509
+ /** Resolving user ID. */
21510
+ resolved_by: z.ZodOptional<z.ZodString>;
21511
+ /** Request status. */
21512
+ status: z.ZodOptional<z.ZodString>;
21513
+ /** Kind-provided summary. */
21514
+ summary: z.ZodOptional<z.ZodObject<{
21515
+ lines: z.ZodArray<z.ZodString, "many">;
21516
+ title: z.ZodString;
21517
+ }, "strip", z.ZodTypeAny, {
21518
+ title: string;
21519
+ lines: string[];
21520
+ }, {
21521
+ title: string;
21522
+ lines: string[];
21523
+ }>>;
21524
+ }, "strip", z.ZodTypeAny, {
21525
+ id: string;
21526
+ kind?: string | undefined;
21527
+ agent?: {
21528
+ id: string;
21529
+ name?: string | null | undefined;
21530
+ } | undefined;
21531
+ status?: string | undefined;
21532
+ payload?: {
21533
+ question: string;
21534
+ } | undefined;
21535
+ expires_at?: string | undefined;
21536
+ approvers?: {
21537
+ mode: string;
21538
+ } | undefined;
21539
+ is_approver?: boolean | undefined;
21540
+ origin?: {
21541
+ routine_id?: string | null | undefined;
21542
+ session_id?: string | null | undefined;
21543
+ thread_id?: string | null | undefined;
21544
+ } | undefined;
21545
+ resolution?: {
21546
+ answer?: string | undefined;
21547
+ reason?: string | undefined;
21548
+ } | null | undefined;
21549
+ resolved_at?: string | undefined;
21550
+ resolved_by?: string | undefined;
21551
+ summary?: {
21552
+ title: string;
21553
+ lines: string[];
21554
+ } | undefined;
21555
+ }, {
21556
+ id: string;
21557
+ kind?: string | undefined;
21558
+ agent?: {
21559
+ id: string;
21560
+ name?: string | null | undefined;
21561
+ } | undefined;
21562
+ status?: string | undefined;
21563
+ payload?: {
21564
+ question: string;
21565
+ } | undefined;
21566
+ expires_at?: string | undefined;
21567
+ approvers?: {
21568
+ mode: string;
21569
+ } | undefined;
21570
+ is_approver?: boolean | undefined;
21571
+ origin?: {
21572
+ routine_id?: string | null | undefined;
21573
+ session_id?: string | null | undefined;
21574
+ thread_id?: string | null | undefined;
21575
+ } | undefined;
21576
+ resolution?: {
21577
+ answer?: string | undefined;
21578
+ reason?: string | undefined;
21579
+ } | null | undefined;
21580
+ resolved_at?: string | undefined;
21581
+ resolved_by?: string | undefined;
21582
+ summary?: {
21583
+ title: string;
21584
+ lines: string[];
21585
+ } | undefined;
21586
+ }>, "many">;
21587
+ /** Pass as cursor for the next page; null at the end. */
21588
+ next_cursor: z.ZodOptional<z.ZodString>;
21589
+ }, "strip", z.ZodTypeAny, {
21590
+ data: {
21591
+ id: string;
21592
+ kind?: string | undefined;
21593
+ agent?: {
21594
+ id: string;
21595
+ name?: string | null | undefined;
21596
+ } | undefined;
21597
+ status?: string | undefined;
21598
+ payload?: {
21599
+ question: string;
21600
+ } | undefined;
21601
+ expires_at?: string | undefined;
21602
+ approvers?: {
21603
+ mode: string;
21604
+ } | undefined;
21605
+ is_approver?: boolean | undefined;
21606
+ origin?: {
21607
+ routine_id?: string | null | undefined;
21608
+ session_id?: string | null | undefined;
21609
+ thread_id?: string | null | undefined;
21610
+ } | undefined;
21611
+ resolution?: {
21612
+ answer?: string | undefined;
21613
+ reason?: string | undefined;
21614
+ } | null | undefined;
21615
+ resolved_at?: string | undefined;
21616
+ resolved_by?: string | undefined;
21617
+ summary?: {
21618
+ title: string;
21619
+ lines: string[];
21620
+ } | undefined;
21621
+ }[];
21622
+ next_cursor?: string | undefined;
21623
+ }, {
21624
+ data: {
21625
+ id: string;
21626
+ kind?: string | undefined;
21627
+ agent?: {
21628
+ id: string;
21629
+ name?: string | null | undefined;
21630
+ } | undefined;
21631
+ status?: string | undefined;
21632
+ payload?: {
21633
+ question: string;
21634
+ } | undefined;
21635
+ expires_at?: string | undefined;
21636
+ approvers?: {
21637
+ mode: string;
21638
+ } | undefined;
21639
+ is_approver?: boolean | undefined;
21640
+ origin?: {
21641
+ routine_id?: string | null | undefined;
21642
+ session_id?: string | null | undefined;
21643
+ thread_id?: string | null | undefined;
21644
+ } | undefined;
21645
+ resolution?: {
21646
+ answer?: string | undefined;
21647
+ reason?: string | undefined;
21648
+ } | null | undefined;
21649
+ resolved_at?: string | undefined;
21650
+ resolved_by?: string | undefined;
21651
+ summary?: {
21652
+ title: string;
21653
+ lines: string[];
21654
+ } | undefined;
21655
+ }[];
21656
+ next_cursor?: string | undefined;
21657
+ }>;
21658
+ /** An agent routine defines a reusable handler — script, preset, or chain — that runs in response to events or on a schedule. */
21659
+ export interface AgentRoutine {
21660
+ /** Access control list for the routine. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions` (`"read"`, `"invoke"`, or `"assign"` — an `"assign"` grant names the agents or orgs that may be handed this routine's embedded work items). `null` when no ACL restrictions are applied and the routine is accessible to all members of its scope. */
21661
+ acl?: Acl | undefined;
21662
+ /** ID of the agent that owns this routine (`agi_...`). */
21663
+ agent?: string | undefined;
21664
+ /** Application that scopes this routine (`dap_...`). */
21665
+ app?: string | undefined;
21666
+ /** ID of the Config record that backs this routine's configuration (`cfg_...`). `null` when the routine is not config-backed. */
21667
+ config?: string | undefined;
21668
+ /** When this routine was created (ISO 8601). */
21669
+ created_at?: string | undefined;
21670
+ /** Optional description of what this routine does. `null` when not set. */
21671
+ description?: string | undefined;
21672
+ /** Additional configuration controlling how the event trigger is matched or filtered. Shape depends on `event_type`. `null` when not configured. */
21673
+ event_config?: Record<string, unknown> | undefined;
21674
+ /** Platform event type that triggers this routine, e.g. `"agentroutine.invoked"`. `null` for schedule-only routines. */
21675
+ event_type?: string | undefined;
21676
+ /** Execution strategy for this routine. One of `"workflow_graph"`, `"script"`, `"preset"`, or `"chain"`. */
21677
+ handler_type?: string | undefined;
21678
+ /** Routine ID (`arn_...`). */
21679
+ id: string;
21680
+ /** ID of the AgentRoutineTemplate Config this routine was last provisioned or updated from (`cfg_...`). `null` for hand-built routines. */
21681
+ last_applied_template_config?: string | undefined;
21682
+ /** Unique human-readable key used to look up this routine without knowing its ID. `null` when not set. */
21683
+ lookup_key?: string | undefined;
21684
+ /** Visibility and explicit recipient selection for messages emitted by this routine. */
21685
+ message_policy?: MessagePolicy | undefined;
21686
+ /** Arbitrary key-value metadata attached to this routine. `null` when not set. */
21687
+ metadata?: Record<string, unknown> | undefined;
21688
+ /** Human-readable name for the routine. */
21689
+ name?: string | undefined;
21690
+ /** Resolved preset configuration when `handler_type` is `"preset"`. `null` for other handler types. */
21691
+ preset_config?: PresetConfig | undefined;
21692
+ /** Name of the preset invoked when `handler_type` is `"preset"`. `null` for other handler types. */
21693
+ preset_name?: string | undefined;
21694
+ /** Cron expression controlling when the routine fires on a schedule. `null` for event-only routines. */
21695
+ schedule?: string | undefined;
21696
+ /** Inline script body executed when `handler_type` is `"script"`. `null` for other handler types. */
21697
+ script?: string | undefined;
21698
+ /** Lifecycle status of the routine. One of `"draft"`, `"active"`, or `"paused"`. Only `"active"` routines respond to triggers. */
21699
+ status?: string | undefined;
21700
+ /** Ordered list of chain steps (present when handler_type is "chain"). Each step is a plain map with handler_type, optional body fields (preset_name / preset_config / script / config), and step-local plumbing (name, inputs, output_key, on_error). */
21701
+ steps?: Record<string, unknown>[] | undefined;
21702
+ /** Execution context in which runs are created. One of `"event"` (background job) or `"chat_session"` (interactive session). Defaults to `"event"`. */
21703
+ trigger_context?: string | undefined;
21704
+ /** When this routine was last updated (ISO 8601). */
21705
+ updated_at?: string | undefined;
21706
+ /** Optional co-owner user (`usr_...`). When set, that user shares view/modify/delete authority on this routine without administering the parent agent. `null` when not set. Never inferred from the caller — only present when explicitly provided on create/update. */
21707
+ user?: string | undefined;
21708
+ }
21709
+ /** Runtime validator for {@link AgentRoutine}. */
21710
+ export declare const agentRoutineSchema: z.ZodObject<{
21711
+ /** Access control list for the routine. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions` (`"read"`, `"invoke"`, or `"assign"` — an `"assign"` grant names the agents or orgs that may be handed this routine's embedded work items). `null` when no ACL restrictions are applied and the routine is accessible to all members of its scope. */
21712
+ acl: z.ZodOptional<z.ZodObject<{
21713
+ /** Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`. */
21714
+ add: z.ZodOptional<z.ZodArray<z.ZodObject<{
21715
+ /** Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry. */
21716
+ actions: z.ZodArray<z.ZodString, "many">;
21717
+ /** The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`. */
21718
+ principal: z.ZodOptional<z.ZodString>;
20892
21719
  /** The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`. */
20893
21720
  principal_type: z.ZodString;
20894
21721
  }, "strip", z.ZodTypeAny, {
@@ -21820,6 +22647,7 @@ export declare const agentRoutineRunSchema: z.ZodObject<{
21820
22647
  principal?: string | undefined;
21821
22648
  }[] | undefined;
21822
22649
  } | undefined;
22650
+ duration_ms?: number | undefined;
21823
22651
  delivery?: {
21824
22652
  type: "thread" | "none" | "reply";
21825
22653
  status: "pending" | "failed" | "delivered" | "not_requested";
@@ -21829,7 +22657,6 @@ export declare const agentRoutineRunSchema: z.ZodObject<{
21829
22657
  delivered_message?: string | undefined;
21830
22658
  last_error?: string | undefined;
21831
22659
  } | undefined;
21832
- duration_ms?: number | undefined;
21833
22660
  routine?: string | undefined;
21834
22661
  structured_response?: Record<string, {} | null> | undefined;
21835
22662
  worker?: {
@@ -21865,6 +22692,7 @@ export declare const agentRoutineRunSchema: z.ZodObject<{
21865
22692
  principal?: string | undefined;
21866
22693
  }[] | undefined;
21867
22694
  } | undefined;
22695
+ duration_ms?: number | undefined;
21868
22696
  delivery?: {
21869
22697
  type: "thread" | "none" | "reply";
21870
22698
  status: "pending" | "failed" | "delivered" | "not_requested";
@@ -21874,7 +22702,6 @@ export declare const agentRoutineRunSchema: z.ZodObject<{
21874
22702
  delivered_message?: string | undefined;
21875
22703
  last_error?: string | undefined;
21876
22704
  } | undefined;
21877
- duration_ms?: number | undefined;
21878
22705
  routine?: string | undefined;
21879
22706
  structured_response?: Record<string, {} | null> | undefined;
21880
22707
  worker?: {
@@ -22086,6 +22913,7 @@ export declare const agentRoutineRunListResponseSchema: z.ZodObject<{
22086
22913
  principal?: string | undefined;
22087
22914
  }[] | undefined;
22088
22915
  } | undefined;
22916
+ duration_ms?: number | undefined;
22089
22917
  delivery?: {
22090
22918
  type: "thread" | "none" | "reply";
22091
22919
  status: "pending" | "failed" | "delivered" | "not_requested";
@@ -22095,7 +22923,6 @@ export declare const agentRoutineRunListResponseSchema: z.ZodObject<{
22095
22923
  delivered_message?: string | undefined;
22096
22924
  last_error?: string | undefined;
22097
22925
  } | undefined;
22098
- duration_ms?: number | undefined;
22099
22926
  routine?: string | undefined;
22100
22927
  structured_response?: Record<string, {} | null> | undefined;
22101
22928
  worker?: {
@@ -22131,6 +22958,7 @@ export declare const agentRoutineRunListResponseSchema: z.ZodObject<{
22131
22958
  principal?: string | undefined;
22132
22959
  }[] | undefined;
22133
22960
  } | undefined;
22961
+ duration_ms?: number | undefined;
22134
22962
  delivery?: {
22135
22963
  type: "thread" | "none" | "reply";
22136
22964
  status: "pending" | "failed" | "delivered" | "not_requested";
@@ -22140,7 +22968,6 @@ export declare const agentRoutineRunListResponseSchema: z.ZodObject<{
22140
22968
  delivered_message?: string | undefined;
22141
22969
  last_error?: string | undefined;
22142
22970
  } | undefined;
22143
- duration_ms?: number | undefined;
22144
22971
  routine?: string | undefined;
22145
22972
  structured_response?: Record<string, {} | null> | undefined;
22146
22973
  worker?: {
@@ -22178,6 +23005,7 @@ export declare const agentRoutineRunListResponseSchema: z.ZodObject<{
22178
23005
  principal?: string | undefined;
22179
23006
  }[] | undefined;
22180
23007
  } | undefined;
23008
+ duration_ms?: number | undefined;
22181
23009
  delivery?: {
22182
23010
  type: "thread" | "none" | "reply";
22183
23011
  status: "pending" | "failed" | "delivered" | "not_requested";
@@ -22187,7 +23015,6 @@ export declare const agentRoutineRunListResponseSchema: z.ZodObject<{
22187
23015
  delivered_message?: string | undefined;
22188
23016
  last_error?: string | undefined;
22189
23017
  } | undefined;
22190
- duration_ms?: number | undefined;
22191
23018
  routine?: string | undefined;
22192
23019
  structured_response?: Record<string, {} | null> | undefined;
22193
23020
  worker?: {
@@ -22227,6 +23054,7 @@ export declare const agentRoutineRunListResponseSchema: z.ZodObject<{
22227
23054
  principal?: string | undefined;
22228
23055
  }[] | undefined;
22229
23056
  } | undefined;
23057
+ duration_ms?: number | undefined;
22230
23058
  delivery?: {
22231
23059
  type: "thread" | "none" | "reply";
22232
23060
  status: "pending" | "failed" | "delivered" | "not_requested";
@@ -22236,7 +23064,6 @@ export declare const agentRoutineRunListResponseSchema: z.ZodObject<{
22236
23064
  delivered_message?: string | undefined;
22237
23065
  last_error?: string | undefined;
22238
23066
  } | undefined;
22239
- duration_ms?: number | undefined;
22240
23067
  routine?: string | undefined;
22241
23068
  structured_response?: Record<string, {} | null> | undefined;
22242
23069
  worker?: {
@@ -22468,6 +23295,44 @@ export declare const agentSessionSchema: z.ZodObject<{
22468
23295
  max_turns?: number | undefined;
22469
23296
  trajectory?: string | undefined;
22470
23297
  }>;
23298
+ /** One event from the coding harness running an agent session on a computer. */
23299
+ export interface AgentSessionEvent {
23300
+ /** Event name: `session_started`, `message`, `tool_use`, `needs_input`, `activity`, `error`, `turn_complete`, `finished`, `adopted`, or `harness_raw`. */
23301
+ event?: string | undefined;
23302
+ /** Harness that emitted it. */
23303
+ harness?: string | null | undefined;
23304
+ /** Event ID; pass as `after` to page. */
23305
+ id?: string | undefined;
23306
+ /** When the event happened in the sandbox. */
23307
+ occurred_at?: string | undefined;
23308
+ /** Harness-specific event data. */
23309
+ payload?: Record<string, unknown> | null | undefined;
23310
+ }
23311
+ /** Runtime validator for {@link AgentSessionEvent}. */
23312
+ export declare const agentSessionEventSchema: z.ZodObject<{
23313
+ /** Event name: `session_started`, `message`, `tool_use`, `needs_input`, `activity`, `error`, `turn_complete`, `finished`, `adopted`, or `harness_raw`. */
23314
+ event: z.ZodOptional<z.ZodString>;
23315
+ /** Harness that emitted it. */
23316
+ harness: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23317
+ /** Event ID; pass as `after` to page. */
23318
+ id: z.ZodOptional<z.ZodString>;
23319
+ /** When the event happened in the sandbox. */
23320
+ occurred_at: z.ZodOptional<z.ZodString>;
23321
+ /** Harness-specific event data. */
23322
+ payload: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>>;
23323
+ }, "strip", z.ZodTypeAny, {
23324
+ payload?: Record<string, {} | null> | null | undefined;
23325
+ id?: string | undefined;
23326
+ event?: string | undefined;
23327
+ harness?: string | null | undefined;
23328
+ occurred_at?: string | undefined;
23329
+ }, {
23330
+ payload?: Record<string, {} | null> | null | undefined;
23331
+ id?: string | undefined;
23332
+ event?: string | undefined;
23333
+ harness?: string | null | undefined;
23334
+ occurred_at?: string | undefined;
23335
+ }>;
22471
23336
  /** Paginated list response containing an array of agent session objects. */
22472
23337
  export interface AgentSessionListResponse {
22473
23338
  /** Array of agent session objects for the current page. */
@@ -22832,13 +23697,13 @@ export declare const agentToolSchema: z.ZodObject<{
22832
23697
  /** Reason for the current MCP setup state. */
22833
23698
  reason: z.ZodString;
22834
23699
  }, "strip", z.ZodTypeAny, {
23700
+ reason: string;
22835
23701
  next_action: string;
22836
23702
  protocol_status: "not_checked";
22837
- reason: string;
22838
23703
  }, {
23704
+ reason: string;
22839
23705
  next_action: string;
22840
23706
  protocol_status: "not_checked";
22841
- reason: string;
22842
23707
  }>>>;
22843
23708
  /** Current status of the tool. One of `"active"` or `"draft"`. */
22844
23709
  status: z.ZodOptional<z.ZodString>;
@@ -22867,9 +23732,9 @@ export declare const agentToolSchema: z.ZodObject<{
22867
23732
  parameters?: Record<string, {} | null> | undefined;
22868
23733
  parameters_config?: string | undefined;
22869
23734
  setup?: {
23735
+ reason: string;
22870
23736
  next_action: string;
22871
23737
  protocol_status: "not_checked";
22872
- reason: string;
22873
23738
  } | null | undefined;
22874
23739
  }, {
22875
23740
  id: string;
@@ -22894,9 +23759,9 @@ export declare const agentToolSchema: z.ZodObject<{
22894
23759
  parameters?: Record<string, {} | null> | undefined;
22895
23760
  parameters_config?: string | undefined;
22896
23761
  setup?: {
23762
+ reason: string;
22897
23763
  next_action: string;
22898
23764
  protocol_status: "not_checked";
22899
- reason: string;
22900
23765
  } | null | undefined;
22901
23766
  }>;
22902
23767
  /** Paginated list response containing the tools attached to an agent. */
@@ -22955,13 +23820,13 @@ export declare const agentToolListResponseSchema: z.ZodObject<{
22955
23820
  /** Reason for the current MCP setup state. */
22956
23821
  reason: z.ZodString;
22957
23822
  }, "strip", z.ZodTypeAny, {
23823
+ reason: string;
22958
23824
  next_action: string;
22959
23825
  protocol_status: "not_checked";
22960
- reason: string;
22961
23826
  }, {
23827
+ reason: string;
22962
23828
  next_action: string;
22963
23829
  protocol_status: "not_checked";
22964
- reason: string;
22965
23830
  }>>>;
22966
23831
  /** Current status of the tool. One of `"active"` or `"draft"`. */
22967
23832
  status: z.ZodOptional<z.ZodString>;
@@ -22990,9 +23855,9 @@ export declare const agentToolListResponseSchema: z.ZodObject<{
22990
23855
  parameters?: Record<string, {} | null> | undefined;
22991
23856
  parameters_config?: string | undefined;
22992
23857
  setup?: {
23858
+ reason: string;
22993
23859
  next_action: string;
22994
23860
  protocol_status: "not_checked";
22995
- reason: string;
22996
23861
  } | null | undefined;
22997
23862
  }, {
22998
23863
  id: string;
@@ -23017,9 +23882,9 @@ export declare const agentToolListResponseSchema: z.ZodObject<{
23017
23882
  parameters?: Record<string, {} | null> | undefined;
23018
23883
  parameters_config?: string | undefined;
23019
23884
  setup?: {
23885
+ reason: string;
23020
23886
  next_action: string;
23021
23887
  protocol_status: "not_checked";
23022
- reason: string;
23023
23888
  } | null | undefined;
23024
23889
  }>, "many">;
23025
23890
  }, "strip", z.ZodTypeAny, {
@@ -23046,9 +23911,9 @@ export declare const agentToolListResponseSchema: z.ZodObject<{
23046
23911
  parameters?: Record<string, {} | null> | undefined;
23047
23912
  parameters_config?: string | undefined;
23048
23913
  setup?: {
23914
+ reason: string;
23049
23915
  next_action: string;
23050
23916
  protocol_status: "not_checked";
23051
- reason: string;
23052
23917
  } | null | undefined;
23053
23918
  }[];
23054
23919
  }, {
@@ -23075,9 +23940,9 @@ export declare const agentToolListResponseSchema: z.ZodObject<{
23075
23940
  parameters?: Record<string, {} | null> | undefined;
23076
23941
  parameters_config?: string | undefined;
23077
23942
  setup?: {
23943
+ reason: string;
23078
23944
  next_action: string;
23079
23945
  protocol_status: "not_checked";
23080
- reason: string;
23081
23946
  } | null | undefined;
23082
23947
  }[];
23083
23948
  }>;
@@ -23621,6 +24486,13 @@ export declare const agentUpgradeResultSchema: z.ZodObject<{
23621
24486
  }>;
23622
24487
  }, "strip", z.ZodTypeAny, {
23623
24488
  status: string;
24489
+ mode: string;
24490
+ summary: {
24491
+ adds: number;
24492
+ noops: number;
24493
+ removes: number;
24494
+ updates: number;
24495
+ };
23624
24496
  changes: {
23625
24497
  action: string;
23626
24498
  parent_template_config: {
@@ -23660,6 +24532,9 @@ export declare const agentUpgradeResultSchema: z.ZodObject<{
23660
24532
  } | undefined;
23661
24533
  }[];
23662
24534
  dry_run: boolean;
24535
+ review_fingerprint?: string | undefined;
24536
+ }, {
24537
+ status: string;
23663
24538
  mode: string;
23664
24539
  summary: {
23665
24540
  adds: number;
@@ -23667,9 +24542,6 @@ export declare const agentUpgradeResultSchema: z.ZodObject<{
23667
24542
  removes: number;
23668
24543
  updates: number;
23669
24544
  };
23670
- review_fingerprint?: string | undefined;
23671
- }, {
23672
- status: string;
23673
24545
  changes: {
23674
24546
  action: string;
23675
24547
  parent_template_config: {
@@ -23709,13 +24581,6 @@ export declare const agentUpgradeResultSchema: z.ZodObject<{
23709
24581
  } | undefined;
23710
24582
  }[];
23711
24583
  dry_run: boolean;
23712
- mode: string;
23713
- summary: {
23714
- adds: number;
23715
- noops: number;
23716
- removes: number;
23717
- updates: number;
23718
- };
23719
24584
  review_fingerprint?: string | undefined;
23720
24585
  }>;
23721
24586
  /** Response returned by the agent upgrade endpoint, combining the updated agent, its source Solution and template, and the full upgrade diff. */
@@ -25928,6 +26793,13 @@ export declare const agentUpgradeResponseSchema: z.ZodObject<{
25928
26793
  }>;
25929
26794
  }, "strip", z.ZodTypeAny, {
25930
26795
  status: string;
26796
+ mode: string;
26797
+ summary: {
26798
+ adds: number;
26799
+ noops: number;
26800
+ removes: number;
26801
+ updates: number;
26802
+ };
25931
26803
  changes: {
25932
26804
  action: string;
25933
26805
  parent_template_config: {
@@ -25967,6 +26839,9 @@ export declare const agentUpgradeResponseSchema: z.ZodObject<{
25967
26839
  } | undefined;
25968
26840
  }[];
25969
26841
  dry_run: boolean;
26842
+ review_fingerprint?: string | undefined;
26843
+ }, {
26844
+ status: string;
25970
26845
  mode: string;
25971
26846
  summary: {
25972
26847
  adds: number;
@@ -25974,9 +26849,6 @@ export declare const agentUpgradeResponseSchema: z.ZodObject<{
25974
26849
  removes: number;
25975
26850
  updates: number;
25976
26851
  };
25977
- review_fingerprint?: string | undefined;
25978
- }, {
25979
- status: string;
25980
26852
  changes: {
25981
26853
  action: string;
25982
26854
  parent_template_config: {
@@ -26016,13 +26888,6 @@ export declare const agentUpgradeResponseSchema: z.ZodObject<{
26016
26888
  } | undefined;
26017
26889
  }[];
26018
26890
  dry_run: boolean;
26019
- mode: string;
26020
- summary: {
26021
- adds: number;
26022
- noops: number;
26023
- removes: number;
26024
- updates: number;
26025
- };
26026
26891
  review_fingerprint?: string | undefined;
26027
26892
  }>;
26028
26893
  }, "strip", z.ZodTypeAny, {
@@ -26103,6 +26968,13 @@ export declare const agentUpgradeResponseSchema: z.ZodObject<{
26103
26968
  };
26104
26969
  upgrade_result: {
26105
26970
  status: string;
26971
+ mode: string;
26972
+ summary: {
26973
+ adds: number;
26974
+ noops: number;
26975
+ removes: number;
26976
+ updates: number;
26977
+ };
26106
26978
  changes: {
26107
26979
  action: string;
26108
26980
  parent_template_config: {
@@ -26142,13 +27014,6 @@ export declare const agentUpgradeResponseSchema: z.ZodObject<{
26142
27014
  } | undefined;
26143
27015
  }[];
26144
27016
  dry_run: boolean;
26145
- mode: string;
26146
- summary: {
26147
- adds: number;
26148
- noops: number;
26149
- removes: number;
26150
- updates: number;
26151
- };
26152
27017
  review_fingerprint?: string | undefined;
26153
27018
  };
26154
27019
  agent?: {
@@ -26408,6 +27273,13 @@ export declare const agentUpgradeResponseSchema: z.ZodObject<{
26408
27273
  };
26409
27274
  upgrade_result: {
26410
27275
  status: string;
27276
+ mode: string;
27277
+ summary: {
27278
+ adds: number;
27279
+ noops: number;
27280
+ removes: number;
27281
+ updates: number;
27282
+ };
26411
27283
  changes: {
26412
27284
  action: string;
26413
27285
  parent_template_config: {
@@ -26447,13 +27319,6 @@ export declare const agentUpgradeResponseSchema: z.ZodObject<{
26447
27319
  } | undefined;
26448
27320
  }[];
26449
27321
  dry_run: boolean;
26450
- mode: string;
26451
- summary: {
26452
- adds: number;
26453
- noops: number;
26454
- removes: number;
26455
- updates: number;
26456
- };
26457
27322
  review_fingerprint?: string | undefined;
26458
27323
  };
26459
27324
  agent?: {
@@ -29074,6 +29939,14 @@ export declare const solutionUpgradeResultSchema: z.ZodObject<{
29074
29939
  version_change: z.ZodString;
29075
29940
  }, "strip", z.ZodTypeAny, {
29076
29941
  status: string;
29942
+ summary: {
29943
+ adds: number;
29944
+ noops: number;
29945
+ updates: number;
29946
+ deletes: number;
29947
+ orphans: number;
29948
+ referenced_orphans: number;
29949
+ };
29077
29950
  changes: {
29078
29951
  key: string;
29079
29952
  action: string;
@@ -29093,14 +29966,6 @@ export declare const solutionUpgradeResultSchema: z.ZodObject<{
29093
29966
  }[] | undefined;
29094
29967
  }[];
29095
29968
  dry_run: boolean;
29096
- summary: {
29097
- adds: number;
29098
- noops: number;
29099
- updates: number;
29100
- deletes: number;
29101
- orphans: number;
29102
- referenced_orphans: number;
29103
- };
29104
29969
  version_change: string;
29105
29970
  message?: string | undefined;
29106
29971
  code?: string | undefined;
@@ -29109,6 +29974,14 @@ export declare const solutionUpgradeResultSchema: z.ZodObject<{
29109
29974
  incoming_solution_version?: string | undefined;
29110
29975
  }, {
29111
29976
  status: string;
29977
+ summary: {
29978
+ adds: number;
29979
+ noops: number;
29980
+ updates: number;
29981
+ deletes: number;
29982
+ orphans: number;
29983
+ referenced_orphans: number;
29984
+ };
29112
29985
  changes: {
29113
29986
  key: string;
29114
29987
  action: string;
@@ -29128,14 +30001,6 @@ export declare const solutionUpgradeResultSchema: z.ZodObject<{
29128
30001
  }[] | undefined;
29129
30002
  }[];
29130
30003
  dry_run: boolean;
29131
- summary: {
29132
- adds: number;
29133
- noops: number;
29134
- updates: number;
29135
- deletes: number;
29136
- orphans: number;
29137
- referenced_orphans: number;
29138
- };
29139
30004
  version_change: string;
29140
30005
  message?: string | undefined;
29141
30006
  code?: string | undefined;
@@ -29698,6 +30563,14 @@ export declare const solutionUpgradeResponseSchema: z.ZodObject<{
29698
30563
  version_change: z.ZodString;
29699
30564
  }, "strip", z.ZodTypeAny, {
29700
30565
  status: string;
30566
+ summary: {
30567
+ adds: number;
30568
+ noops: number;
30569
+ updates: number;
30570
+ deletes: number;
30571
+ orphans: number;
30572
+ referenced_orphans: number;
30573
+ };
29701
30574
  changes: {
29702
30575
  key: string;
29703
30576
  action: string;
@@ -29717,14 +30590,6 @@ export declare const solutionUpgradeResponseSchema: z.ZodObject<{
29717
30590
  }[] | undefined;
29718
30591
  }[];
29719
30592
  dry_run: boolean;
29720
- summary: {
29721
- adds: number;
29722
- noops: number;
29723
- updates: number;
29724
- deletes: number;
29725
- orphans: number;
29726
- referenced_orphans: number;
29727
- };
29728
30593
  version_change: string;
29729
30594
  message?: string | undefined;
29730
30595
  code?: string | undefined;
@@ -29733,6 +30598,14 @@ export declare const solutionUpgradeResponseSchema: z.ZodObject<{
29733
30598
  incoming_solution_version?: string | undefined;
29734
30599
  }, {
29735
30600
  status: string;
30601
+ summary: {
30602
+ adds: number;
30603
+ noops: number;
30604
+ updates: number;
30605
+ deletes: number;
30606
+ orphans: number;
30607
+ referenced_orphans: number;
30608
+ };
29736
30609
  changes: {
29737
30610
  key: string;
29738
30611
  action: string;
@@ -29752,14 +30625,6 @@ export declare const solutionUpgradeResponseSchema: z.ZodObject<{
29752
30625
  }[] | undefined;
29753
30626
  }[];
29754
30627
  dry_run: boolean;
29755
- summary: {
29756
- adds: number;
29757
- noops: number;
29758
- updates: number;
29759
- deletes: number;
29760
- orphans: number;
29761
- referenced_orphans: number;
29762
- };
29763
30628
  version_change: string;
29764
30629
  message?: string | undefined;
29765
30630
  code?: string | undefined;
@@ -29838,6 +30703,14 @@ export declare const solutionUpgradeResponseSchema: z.ZodObject<{
29838
30703
  };
29839
30704
  upgrade_result: {
29840
30705
  status: string;
30706
+ summary: {
30707
+ adds: number;
30708
+ noops: number;
30709
+ updates: number;
30710
+ deletes: number;
30711
+ orphans: number;
30712
+ referenced_orphans: number;
30713
+ };
29841
30714
  changes: {
29842
30715
  key: string;
29843
30716
  action: string;
@@ -29857,14 +30730,6 @@ export declare const solutionUpgradeResponseSchema: z.ZodObject<{
29857
30730
  }[] | undefined;
29858
30731
  }[];
29859
30732
  dry_run: boolean;
29860
- summary: {
29861
- adds: number;
29862
- noops: number;
29863
- updates: number;
29864
- deletes: number;
29865
- orphans: number;
29866
- referenced_orphans: number;
29867
- };
29868
30733
  version_change: string;
29869
30734
  message?: string | undefined;
29870
30735
  code?: string | undefined;
@@ -29951,6 +30816,14 @@ export declare const solutionUpgradeResponseSchema: z.ZodObject<{
29951
30816
  };
29952
30817
  upgrade_result: {
29953
30818
  status: string;
30819
+ summary: {
30820
+ adds: number;
30821
+ noops: number;
30822
+ updates: number;
30823
+ deletes: number;
30824
+ orphans: number;
30825
+ referenced_orphans: number;
30826
+ };
29954
30827
  changes: {
29955
30828
  key: string;
29956
30829
  action: string;
@@ -29970,14 +30843,6 @@ export declare const solutionUpgradeResponseSchema: z.ZodObject<{
29970
30843
  }[] | undefined;
29971
30844
  }[];
29972
30845
  dry_run: boolean;
29973
- summary: {
29974
- adds: number;
29975
- noops: number;
29976
- updates: number;
29977
- deletes: number;
29978
- orphans: number;
29979
- referenced_orphans: number;
29980
- };
29981
30846
  version_change: string;
29982
30847
  message?: string | undefined;
29983
30848
  code?: string | undefined;