@archastro/sdk 0.20.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 (152) 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 +6 -0
  6. package/dist/client.d.ts.map +1 -1
  7. package/dist/client.js +7 -1
  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 +388 -0
  26. package/dist/types/chat.d.ts.map +1 -1
  27. package/dist/types/common.d.ts +1132 -287
  28. package/dist/types/common.d.ts.map +1 -1
  29. package/dist/types/common.js +146 -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/threads.d.ts +64 -0
  52. package/dist/types/threads.d.ts.map +1 -1
  53. package/dist/v1/resources/agent_computers.d.ts +33 -1
  54. package/dist/v1/resources/agent_computers.d.ts.map +1 -1
  55. package/dist/v1/resources/agent_computers.js +17 -1
  56. package/dist/v1/resources/agent_computers.js.map +1 -1
  57. package/dist/v1/resources/agent_requests.d.ts +54 -0
  58. package/dist/v1/resources/agent_requests.d.ts.map +1 -0
  59. package/dist/v1/resources/agent_requests.js +71 -0
  60. package/dist/v1/resources/agent_requests.js.map +1 -0
  61. package/dist/v1/resources/agent_sessions.d.ts +23 -1
  62. package/dist/v1/resources/agent_sessions.d.ts.map +1 -1
  63. package/dist/v1/resources/agent_sessions.js +26 -1
  64. package/dist/v1/resources/agent_sessions.js.map +1 -1
  65. package/dist/v1/resources/agents.d.ts +31 -1
  66. package/dist/v1/resources/agents.d.ts.map +1 -1
  67. package/dist/v1/resources/agents.js +12 -2
  68. package/dist/v1/resources/agents.js.map +1 -1
  69. package/dist/v1/resources/ai.d.ts +55 -4
  70. package/dist/v1/resources/ai.d.ts.map +1 -1
  71. package/dist/v1/resources/ai.js +44 -4
  72. package/dist/v1/resources/ai.js.map +1 -1
  73. package/dist/v1/resources/artifacts.d.ts +34 -2
  74. package/dist/v1/resources/artifacts.d.ts.map +1 -1
  75. package/dist/v1/resources/artifacts.js +3 -2
  76. package/dist/v1/resources/artifacts.js.map +1 -1
  77. package/dist/v1/resources/custom_objects.d.ts +94 -0
  78. package/dist/v1/resources/custom_objects.d.ts.map +1 -1
  79. package/dist/v1/resources/custom_objects.js +60 -1
  80. package/dist/v1/resources/custom_objects.js.map +1 -1
  81. package/dist/v1/resources/event_subscriptions.d.ts +12 -0
  82. package/dist/v1/resources/event_subscriptions.d.ts.map +1 -1
  83. package/dist/v1/resources/event_subscriptions.js +7 -1
  84. package/dist/v1/resources/event_subscriptions.js.map +1 -1
  85. package/dist/v1/resources/files.d.ts +32 -10
  86. package/dist/v1/resources/files.d.ts.map +1 -1
  87. package/dist/v1/resources/files.js +32 -11
  88. package/dist/v1/resources/files.js.map +1 -1
  89. package/dist/v1/resources/index.d.ts +3 -0
  90. package/dist/v1/resources/index.d.ts.map +1 -1
  91. package/dist/v1/resources/index.js +4 -1
  92. package/dist/v1/resources/index.js.map +1 -1
  93. package/dist/v1/resources/knowledge_sources.d.ts +4 -0
  94. package/dist/v1/resources/knowledge_sources.d.ts.map +1 -1
  95. package/dist/v1/resources/knowledge_sources.js +1 -1
  96. package/dist/v1/resources/kv.d.ts +75 -31
  97. package/dist/v1/resources/kv.d.ts.map +1 -1
  98. package/dist/v1/resources/kv.js +79 -32
  99. package/dist/v1/resources/kv.js.map +1 -1
  100. package/dist/v1/resources/notifications.d.ts +14 -0
  101. package/dist/v1/resources/notifications.d.ts.map +1 -1
  102. package/dist/v1/resources/notifications.js +13 -1
  103. package/dist/v1/resources/notifications.js.map +1 -1
  104. package/dist/v1/resources/oauth.d.ts +2 -0
  105. package/dist/v1/resources/oauth.d.ts.map +1 -1
  106. package/dist/v1/resources/oauth.js +2 -1
  107. package/dist/v1/resources/oauth.js.map +1 -1
  108. package/dist/v1/resources/orgs.d.ts +630 -1
  109. package/dist/v1/resources/orgs.d.ts.map +1 -1
  110. package/dist/v1/resources/orgs.js +351 -2
  111. package/dist/v1/resources/orgs.js.map +1 -1
  112. package/dist/v1/resources/private_service_enrollments.d.ts +7 -0
  113. package/dist/v1/resources/private_service_enrollments.d.ts.map +1 -1
  114. package/dist/v1/resources/private_service_enrollments.js +10 -1
  115. package/dist/v1/resources/private_service_enrollments.js.map +1 -1
  116. package/dist/v1/resources/relays.d.ts +38 -0
  117. package/dist/v1/resources/relays.d.ts.map +1 -0
  118. package/dist/v1/resources/relays.js +44 -0
  119. package/dist/v1/resources/relays.js.map +1 -0
  120. package/dist/v1/resources/scripts.d.ts +20 -9
  121. package/dist/v1/resources/scripts.d.ts.map +1 -1
  122. package/dist/v1/resources/scripts.js +18 -10
  123. package/dist/v1/resources/scripts.js.map +1 -1
  124. package/dist/v1/resources/task_ownership_conversions.d.ts +14 -0
  125. package/dist/v1/resources/task_ownership_conversions.d.ts.map +1 -0
  126. package/dist/v1/resources/task_ownership_conversions.js +19 -0
  127. package/dist/v1/resources/task_ownership_conversions.js.map +1 -0
  128. package/dist/v1/resources/tasks.d.ts +62 -1
  129. package/dist/v1/resources/tasks.d.ts.map +1 -1
  130. package/dist/v1/resources/tasks.js +35 -1
  131. package/dist/v1/resources/tasks.js.map +1 -1
  132. package/dist/v1/resources/teams.d.ts +129 -1
  133. package/dist/v1/resources/teams.d.ts.map +1 -1
  134. package/dist/v1/resources/teams.js +71 -1
  135. package/dist/v1/resources/teams.js.map +1 -1
  136. package/dist/v1/resources/threads.d.ts +76 -0
  137. package/dist/v1/resources/threads.d.ts.map +1 -1
  138. package/dist/v1/resources/threads.js +42 -1
  139. package/dist/v1/resources/threads.js.map +1 -1
  140. package/dist/v1/resources/users.d.ts +129 -3
  141. package/dist/v1/resources/users.d.ts.map +1 -1
  142. package/dist/v1/resources/users.js +73 -3
  143. package/dist/v1/resources/users.js.map +1 -1
  144. package/dist/v1/resources/workflows.d.ts +5 -1
  145. package/dist/v1/resources/workflows.d.ts.map +1 -1
  146. package/dist/v1/resources/workflows.js +6 -2
  147. package/dist/v1/resources/workflows.js.map +1 -1
  148. package/dist/v1.d.ts +6 -0
  149. package/dist/v1.d.ts.map +1 -1
  150. package/dist/v1.js +10 -1
  151. package/dist/v1.js.map +1 -1
  152. package/package.json +1 -1
@@ -1,12 +1,17 @@
1
1
  // Copyright (c) 2026 ArchAstro Inc. Licensed under the MIT License.
2
2
  // This file is auto-generated by @archastro/sdk-generator. Do not edit.
3
- // Content hash: afbd6dd19860
3
+ // Content hash: e9c10f6c8b7c
4
4
  import { z } from "zod";
5
5
  import { automationParticipantSlotSchema, automationPrefillsSchema } from "./automations.js";
6
6
  import { configSchema } from "./config.js";
7
7
  import { imageSourceSchema } from "./image.js";
8
8
  import { userSchema } from "./users.js";
9
9
  import { workflowJournalSchema, workflowJournalEntrySchema } from "./workflows.js";
10
+ /** Runtime validator for {@link Refusal}. */
11
+ export const refusalSchema = z.object({
12
+ id: z.string(),
13
+ type: z.literal("refusal"),
14
+ }).describe("The model declined to judge this question.");
10
15
  /** Runtime validator for {@link AclGrant}. */
11
16
  export const aclGrantSchema = z.object({
12
17
  /** Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry. */
@@ -129,6 +134,30 @@ export const installedConfigEntrySchema = z.object({
129
134
  /** Stored `lookup_key` for this config after any suffix has been applied. `null` for `File` children inside a skill bundle, which are keyed by `(parent_id, relative_path)` rather than by `lookup_key`. */
130
135
  lookup_key: z.string().nullable().optional().describe("Stored `lookup_key` for this config after any suffix has been applied. `null` for `File` children inside a skill bundle, which are keyed by `(parent_id, relative_path)` rather than by `lookup_key`."),
131
136
  }).describe("A slim summary of a single config record created during an agent install transaction. Returned as an entry in `AgentCreateResponse.installed_configs`.");
137
+ /** Runtime validator for {@link Approvers}. */
138
+ export const approversSchema = z.object({
139
+ mode: z.string(),
140
+ }).describe("Approval policy, excluding user IDs.");
141
+ /** Runtime validator for {@link Origin}. */
142
+ export const originSchema = z.object({
143
+ routine_id: z.string().nullable().optional(),
144
+ session_id: z.string().nullable().optional(),
145
+ thread_id: z.string().nullable().optional(),
146
+ }).describe("Origin references.");
147
+ /** Runtime validator for {@link Payload}. */
148
+ export const payloadSchema = z.object({
149
+ question: z.string(),
150
+ }).describe("Question request payload.");
151
+ /** Runtime validator for {@link Resolution}. */
152
+ export const resolutionSchema = z.object({
153
+ answer: z.string().optional(),
154
+ reason: z.string().optional(),
155
+ }).describe("Answer or rejection reason; null before resolution.");
156
+ /** Runtime validator for {@link Summary}. */
157
+ export const summarySchema = z.object({
158
+ lines: z.array(z.string()),
159
+ title: z.string(),
160
+ }).describe("Kind-provided summary.");
132
161
  /** Runtime validator for {@link MessagePolicy}. */
133
162
  export const messagePolicySchema = z.object({
134
163
  /** Required and non-empty for private visibility. Sources are additive. Routine owner includes the agent owner and optional user co-owner. */
@@ -174,10 +203,14 @@ export const setupSchema = z.object({
174
203
  }).describe("Current MCP setup assessment, not a historical downgrade reason or upstream protocol probe.");
175
204
  /** Runtime validator for {@link MediaVariant}. */
176
205
  export const mediaVariantSchema = z.object({
206
+ /** Size of the stored bytes. */
207
+ byte_size: z.number().int().nullable().optional().describe("Size of the stored bytes."),
177
208
  /** MIME type of this variant's file (e.g., `"image/jpeg"`, `"video/mp4"`). `null` if the file is not loaded. */
178
209
  content_type: z.string().nullable().optional().describe("MIME type of this variant's file (e.g., `\"image/jpeg\"`, `\"video/mp4\"`). `null` if the file is not loaded."),
179
210
  /** When this variant was created (ISO 8601). */
180
211
  created_at: z.string().optional().describe("When this variant was created (ISO 8601)."),
212
+ /** Client-declared video duration in milliseconds; not server-probed. */
213
+ duration_ms: z.number().int().nullable().optional().describe("Client-declared video duration in milliseconds; not server-probed."),
181
214
  /** ID of the underlying storage file that backs this variant (`fil_...`). */
182
215
  file: z.string().optional().describe("ID of the underlying storage file that backs this variant (`fil_...`)."),
183
216
  /** Original filename of the uploaded file for this variant. `null` if the file is not loaded. */
@@ -188,10 +221,14 @@ export const mediaVariantSchema = z.object({
188
221
  id: z.string().describe("Media variant ID (`mvr_...`)."),
189
222
  /** Resolved image delivery metadata for this variant, including dimensions and CDN URL. `null` for non-image content types. */
190
223
  image_source: imageSourceSchema.nullable().optional().describe("Resolved image delivery metadata for this variant, including dimensions and CDN URL. `null` for non-image content types."),
224
+ /** Lowercase SHA-256 of the stored bytes. */
225
+ sha256: z.string().nullable().optional().describe("Lowercase SHA-256 of the stored bytes."),
191
226
  /** When this variant was last updated (ISO 8601). */
192
227
  updated_at: z.string().optional().describe("When this variant was last updated (ISO 8601)."),
193
228
  /** Signed download URL for this variant, resolved at request time. `null` if the file is unavailable. */
194
229
  url: z.string().nullable().optional().describe("Signed download URL for this variant, resolved at request time. `null` if the file is unavailable."),
230
+ /** Expiry of this variant's playable URL. */
231
+ url_expires_at: z.string().nullable().optional().describe("Expiry of this variant's playable URL."),
195
232
  /** Identifier for this variant's processing tier. Common values include `"original"` (the unmodified upload) and `"thumbnail"` (a resized preview). */
196
233
  variant_key: z.string().optional().describe("Identifier for this variant's processing tier. Common values include `\"original\"` (the unmodified upload) and `\"thumbnail\"` (a resized preview)."),
197
234
  /** Width of this variant in pixels. `null` if not recorded. */
@@ -422,13 +459,6 @@ export const commandSchema = z.object({
422
459
  /** JSON Schema describing the shape of a successful output. `null` if the command produces no output on success. */
423
460
  successOutput: z.record(z.custom((value) => value !== undefined)).optional().describe("JSON Schema describing the shape of a successful output. `null` if the command produces no output on success."),
424
461
  }).describe("A workflow command that a workflow node can invoke, including its identifier, human-readable name, and JSON schemas for its inputs and outputs.");
425
- /** Runtime validator for {@link ComputerExecResult}. */
426
- export const computerExecResultSchema = z.object({
427
- /** 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. */
428
- exit_code: z.number().int().optional().describe("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."),
429
- /** The combined stdout and stderr output produced by the command. `null` if the command produced no output. */
430
- output: z.string().optional().describe("The combined stdout and stderr output produced by the command. `null` if the command produced no output."),
431
- }).describe("The result of executing a shell command on an agent's computer environment. Contains the captured output and the process exit code.");
432
462
  /** Runtime validator for {@link ContextDocument}. */
433
463
  export const contextDocumentSchema = z.object({
434
464
  /** ID of the agent that owns this document (`agi_...`). `null` if owned by a user or team. */
@@ -547,12 +577,20 @@ export const effectiveAccessEntitlementSchema = z.object({
547
577
  granted: z.boolean().describe("Whether any eligible source grants the key."),
548
578
  /** Stable entitlement catalog key. */
549
579
  key: z.string().describe("Stable entitlement catalog key."),
580
+ /** Unexpired metered allowance, including exhausted grants; null for boolean entitlements. */
581
+ limit: z.number().int().nullable().optional().describe("Unexpired metered allowance, including exhausted grants; null for boolean entitlements."),
550
582
  /** Privacy-safe principal kinds that contribute to the effective value. */
551
583
  provided_by: z.array(z.enum(["personal", "organization"])).describe("Privacy-safe principal kinds that contribute to the effective value."),
584
+ /** 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. */
585
+ quantity: z.number().int().nullable().optional().describe("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."),
586
+ /** Remaining metered allowance credits; null for boolean entitlements. */
587
+ remaining: z.number().int().nullable().optional().describe("Remaining metered allowance credits; null for boolean entitlements."),
588
+ /** Signed metered consumption in the allowance window; may be negative after reversals. Null for boolean entitlements. */
589
+ used: z.number().int().nullable().optional().describe("Signed metered consumption in the allowance window; may be negative after reversals. Null for boolean entitlements."),
552
590
  /** Merged entitlement value, or `null` when the key is not granted. */
553
591
  value: z.boolean().nullable().optional().describe("Merged entitlement value, or `null` when the key is not granted."),
554
592
  /** Catalog type used to interpret `value`. */
555
- value_type: z.literal("boolean").describe("Catalog type used to interpret `value`."),
593
+ value_type: z.enum(["boolean", "metered"]).describe("Catalog type used to interpret `value`."),
556
594
  }).describe("A billing-derived effective entitlement for the authenticated user.");
557
595
  /** Runtime validator for {@link EffectiveAccess}. */
558
596
  export const effectiveAccessSchema = z.object({
@@ -583,6 +621,8 @@ export const currentUserSchema = z.object({
583
621
  name: z.string().nullable().optional().describe("Full display name of the user."),
584
622
  /** The authenticated user's notification preferences. */
585
623
  notification_settings: z.record(z.custom((value) => value !== undefined)).describe("The authenticated user's notification preferences."),
624
+ /** Registered display name of the verified OAuth client, when available. Not a verified vendor identity. */
625
+ oauth_client_name: z.string().optional().describe("Registered display name of the verified OAuth client, when available. Not a verified vendor identity."),
586
626
  /** ID of the current organization (`org_...`). */
587
627
  org: z.string().nullable().optional().describe("ID of the current organization (`org_...`)."),
588
628
  /** Whether the current organization is company-domain or person-owned. */
@@ -606,8 +646,12 @@ export const currentUserSchema = z.object({
606
646
  export const customObjectSchema = z.object({
607
647
  /** 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. */
608
648
  acl: aclSchema.optional().describe("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."),
649
+ /** ID of the agent that owns this object (`agt_...`). `null` for other ownership types. */
650
+ agent: z.string().optional().describe("ID of the agent that owns this object (`agt_...`). `null` for other ownership types."),
609
651
  /** When the custom object was created (ISO 8601). */
610
652
  created_at: z.string().optional().describe("When the custom object was created (ISO 8601)."),
653
+ /** Absolute expiry time (RFC 3339). Null when no expiry is set. */
654
+ expires_at: z.string().nullable().optional().describe("Absolute expiry time (RFC 3339). Null when no expiry is set."),
611
655
  /** Map of field names to their current values as defined by the object's schema type. */
612
656
  fields: z.record(z.custom((value) => value !== undefined)).optional().describe("Map of field names to their current values as defined by the object's schema type."),
613
657
  /** Unique identifier for the custom object (`cobj_...`). */
@@ -654,10 +698,10 @@ export const customObjectListResponseSchema = z.object({
654
698
  page: z.number().int().describe("The current page number (1-indexed)."),
655
699
  /** Maximum number of results returned per page. */
656
700
  page_size: z.number().int().describe("Maximum number of results returned per page."),
657
- /** Total number of custom objects matching the query across all pages. */
658
- total_entries: z.number().int().describe("Total number of custom objects matching the query across all pages."),
659
- /** Total number of pages available for the current query. */
660
- total_pages: z.number().int().describe("Total number of pages available for the current query."),
701
+ /** Total number of custom objects matching the query across all pages; null when include_count is false. */
702
+ total_entries: z.number().int().nullable().describe("Total number of custom objects matching the query across all pages; null when include_count is false."),
703
+ /** Total number of pages available for the current query; null when include_count is false. */
704
+ total_pages: z.number().int().nullable().describe("Total number of pages available for the current query; null when include_count is false."),
661
705
  }).describe("A paginated page of custom objects returned by a list operation. Use the pagination fields to navigate through result sets.");
662
706
  /** Runtime validator for {@link CustomObjectPresenceAck}. */
663
707
  export const customObjectPresenceAckSchema = z.object({
@@ -898,27 +942,43 @@ export const installationSourceListResponseSchema = z.object({
898
942
  }).describe("Paginated list response containing installation source objects attached to an installation.");
899
943
  /** Runtime validator for {@link KeyValueStorageEntry}. */
900
944
  export const keyValueStorageEntrySchema = z.object({
945
+ /** Agent owner, if any. */
946
+ agent: z.string().optional().describe("Agent owner, if any."),
901
947
  /** When this storage entry was first created (ISO 8601). `null` if not yet persisted. */
902
948
  created_at: z.string().optional().describe("When this storage entry was first created (ISO 8601). `null` if not yet persisted."),
949
+ /** Expiry deadline, or null for entries without expiry. */
950
+ expires_at: z.string().optional().describe("Expiry deadline, or null for entries without expiry."),
903
951
  /** The string key used to store and look up this entry. */
904
952
  key: z.string().describe("The string key used to store and look up this entry."),
953
+ /** Organization scope. */
954
+ org: z.string().optional().describe("Organization scope."),
955
+ /** Team owner, if any. */
956
+ team: z.string().optional().describe("Team owner, if any."),
905
957
  /** When this storage entry was last updated (ISO 8601). `null` if not yet persisted. */
906
958
  updated_at: z.string().optional().describe("When this storage entry was last updated (ISO 8601). `null` if not yet persisted."),
907
- /** ID of the user who owns this storage entry (`usr_...`). */
908
- user: z.string().describe("ID of the user who owns this storage entry (`usr_...`)."),
959
+ /** ID of the user owner, or null for non-user ownership. */
960
+ user: z.string().optional().describe("ID of the user owner, or null for non-user ownership."),
909
961
  /** The string value stored under `key` for this user. */
910
962
  value: z.string().describe("The string value stored under `key` for this user."),
911
- }).describe("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.");
963
+ }).describe("An owner-scoped key/value pair within an app, optionally expiring.");
912
964
  /** Runtime validator for {@link KeyValueStorageEntryWithUser}. */
913
965
  export const keyValueStorageEntryWithUserSchema = z.object({
966
+ /** Agent owner, if any. */
967
+ agent: z.string().optional().describe("Agent owner, if any."),
914
968
  /** When this storage entry was first created (ISO 8601). */
915
969
  created_at: z.string().describe("When this storage entry was first created (ISO 8601)."),
970
+ /** Expiry deadline, or null for entries without expiry. */
971
+ expires_at: z.string().optional().describe("Expiry deadline, or null for entries without expiry."),
916
972
  /** The string key used to store and look up this entry. */
917
973
  key: z.string().describe("The string key used to store and look up this entry."),
974
+ /** Organization scope. */
975
+ org: z.string().optional().describe("Organization scope."),
976
+ /** Team owner, if any. */
977
+ team: z.string().optional().describe("Team owner, if any."),
918
978
  /** When this storage entry was last updated (ISO 8601). */
919
979
  updated_at: z.string().describe("When this storage entry was last updated (ISO 8601)."),
920
- /** ID of the user who owns this storage entry (`usr_...`). */
921
- user: z.string().describe("ID of the user who owns this storage entry (`usr_...`)."),
980
+ /** ID of the user owner, or null for non-user ownership. */
981
+ user: z.string().optional().describe("ID of the user owner, or null for non-user ownership."),
922
982
  /** Email address of the owning user. `null` for end-user (user-JWT) callers; populated for developer and server-to-server callers. */
923
983
  user_email: z.string().optional().describe("Email address of the owning user. `null` for end-user (user-JWT) callers; populated for developer and server-to-server callers."),
924
984
  /** Display name of the owning user. `null` for end-user (user-JWT) callers; populated for developer and server-to-server callers. */
@@ -1517,7 +1577,7 @@ export const agentSchema = z.object({
1517
1577
  /** Runtime validator for {@link AgentComputer}. */
1518
1578
  export const agentComputerSchema = z.object({
1519
1579
  /** ID of the agent that owns this computer (`agi_...`). `null` if the computer is not yet assigned to an agent. */
1520
- agent: z.string().optional().describe("ID of the agent that owns this computer (`agi_...`). `null` if the computer is not yet assigned to an agent."),
1580
+ agent: z.string().nullable().optional().describe("ID of the agent that owns this computer (`agi_...`). `null` if the computer is not yet assigned to an agent."),
1521
1581
  /** ID of the app this computer belongs to (`dap_...`). */
1522
1582
  app: z.string().optional().describe("ID of the app this computer belongs to (`dap_...`)."),
1523
1583
  /** Provider-specific configuration key-value pairs for the computer. Structure depends on the underlying compute provider. */
@@ -1525,25 +1585,29 @@ export const agentComputerSchema = z.object({
1525
1585
  /** When the computer was created (ISO 8601). */
1526
1586
  created_at: z.string().optional().describe("When the computer was created (ISO 8601)."),
1527
1587
  /** Human-readable error description when `status` is `"error"`. `null` otherwise. */
1528
- error_message: z.string().optional().describe("Human-readable error description when `status` is `\"error\"`. `null` otherwise."),
1588
+ error_message: z.string().nullable().optional().describe("Human-readable error description when `status` is `\"error\"`. `null` otherwise."),
1529
1589
  /** Computer ID (`cmp_...`). */
1530
1590
  id: z.string().describe("Computer ID (`cmp_...`)."),
1591
+ /** Stable key unique within the thread, or null if unset. */
1592
+ key: z.string().nullable().optional().describe("Stable key unique within the thread, or null if unset."),
1531
1593
  /** When the computer last reported activity or received a command. `null` if the computer has never been active. */
1532
- last_active_at: z.string().optional().describe("When the computer last reported activity or received a command. `null` if the computer has never been active."),
1594
+ last_active_at: z.string().nullable().optional().describe("When the computer last reported activity or received a command. `null` if the computer has never been active."),
1533
1595
  /** Unique, stable identifier you assign to this computer within its app. `null` if not set. */
1534
- lookup_key: z.string().optional().describe("Unique, stable identifier you assign to this computer within its app. `null` if not set."),
1596
+ lookup_key: z.string().nullable().optional().describe("Unique, stable identifier you assign to this computer within its app. `null` if not set."),
1535
1597
  /** Arbitrary key-value metadata you attached to the computer. `null` if none was provided. */
1536
1598
  metadata: z.record(z.custom((value) => value !== undefined)).optional().describe("Arbitrary key-value metadata you attached to the computer. `null` if none was provided."),
1537
1599
  /** Human-readable display name for the computer. `null` if not set. */
1538
1600
  name: z.string().optional().describe("Human-readable display name for the computer. `null` if not set."),
1539
- /** Compute backend powering this computer: `"sprites"` (Fly Sprites) or `"vercel"` (Vercel Sandbox). */
1540
- provider: z.string().optional().describe("Compute backend powering this computer: `\"sprites\"` (Fly Sprites) or `\"vercel\"` (Vercel Sandbox)."),
1541
- /** 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"`). */
1542
- region: z.string().optional().describe("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\"`)."),
1601
+ /** Compute backend powering this computer: `"sprites"` (Fly Sprites), `"vercel"` (Vercel Sandbox) or `"e2b"` (E2B). */
1602
+ provider: z.string().optional().describe("Compute backend powering this computer: `\"sprites\"` (Fly Sprites), `\"vercel\"` (Vercel Sandbox) or `\"e2b\"` (E2B)."),
1603
+ /** 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"`). */
1604
+ region: z.string().nullable().optional().describe("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\"`)."),
1543
1605
  /** URL of the live screenshot sprite used to render a real-time preview of the computer's screen. `null` when no sprite is available. */
1544
- sprite_url: z.string().optional().describe("URL of the live screenshot sprite used to render a real-time preview of the computer's screen. `null` when no sprite is available."),
1606
+ sprite_url: z.string().nullable().optional().describe("URL of the live screenshot sprite used to render a real-time preview of the computer's screen. `null` when no sprite is available."),
1545
1607
  /** Current lifecycle state of the computer. Common values include `"provisioning"`, `"ready"`, `"error"`, and `"terminated"`. */
1546
- status: z.string().optional().describe("Current lifecycle state of the computer. Common values include `\"provisioning\"`, `\"ready\"`, `\"error\"`, and `\"terminated\"`."),
1608
+ status: z.string().nullable().optional().describe("Current lifecycle state of the computer. Common values include `\"provisioning\"`, `\"ready\"`, `\"error\"`, and `\"terminated\"`."),
1609
+ /** Thread this computer belongs to, or null for a non-thread computer. */
1610
+ thread_id: z.string().nullable().optional().describe("Thread this computer belongs to, or null for a non-thread computer."),
1547
1611
  /** When the computer record was last modified (ISO 8601). */
1548
1612
  updated_at: z.string().optional().describe("When the computer record was last modified (ISO 8601)."),
1549
1613
  }).describe("A cloud computer resource provisioned for an agent to use for browser and desktop automation tasks.");
@@ -1658,6 +1722,47 @@ export const agentListResponseSchema = z.object({
1658
1722
  /** Total number of pages available given the current `page_size`. */
1659
1723
  total_pages: z.number().int().optional().describe("Total number of pages available given the current `page_size`."),
1660
1724
  }).describe("Paginated list of agent objects. Use the pagination fields to traverse multiple pages of results.");
1725
+ /** Runtime validator for {@link AgentRequestAgent}. */
1726
+ export const agentRequestAgentSchema = z.object({
1727
+ id: z.string(),
1728
+ name: z.string().nullable().optional(),
1729
+ }).describe("Originating agent.");
1730
+ /** Runtime validator for {@link AgentRequest}. */
1731
+ export const agentRequestSchema = z.object({
1732
+ /** Originating agent. */
1733
+ agent: agentRequestAgentSchema.optional().describe("Originating agent."),
1734
+ /** Approval policy, excluding user IDs. */
1735
+ approvers: approversSchema.optional().describe("Approval policy, excluding user IDs."),
1736
+ /** Expiration time. */
1737
+ expires_at: z.string().optional().describe("Expiration time."),
1738
+ /** Request ID (`arq_...`). */
1739
+ id: z.string().describe("Request ID (`arq_...`)."),
1740
+ /** Whether the authenticated caller is an approver, regardless of request status. */
1741
+ is_approver: z.boolean().optional().describe("Whether the authenticated caller is an approver, regardless of request status."),
1742
+ /** Registered request kind. */
1743
+ kind: z.string().optional().describe("Registered request kind."),
1744
+ /** Origin references. */
1745
+ origin: originSchema.optional().describe("Origin references."),
1746
+ /** Question request payload. */
1747
+ payload: payloadSchema.optional().describe("Question request payload."),
1748
+ /** Answer or rejection reason; null before resolution. */
1749
+ resolution: resolutionSchema.nullable().optional().describe("Answer or rejection reason; null before resolution."),
1750
+ /** Resolution time. */
1751
+ resolved_at: z.string().optional().describe("Resolution time."),
1752
+ /** Resolving user ID. */
1753
+ resolved_by: z.string().optional().describe("Resolving user ID."),
1754
+ /** Request status. */
1755
+ status: z.string().optional().describe("Request status."),
1756
+ /** Kind-provided summary. */
1757
+ summary: summarySchema.optional().describe("Kind-provided summary."),
1758
+ }).describe("A request for human approval or input. Secret input is never returned.");
1759
+ /** Runtime validator for {@link AgentRequestListResponse}. */
1760
+ export const agentRequestListResponseSchema = z.object({
1761
+ /** Visible requests. */
1762
+ data: z.array(agentRequestSchema).describe("Visible requests."),
1763
+ /** Pass as cursor for the next page; null at the end. */
1764
+ next_cursor: z.string().optional().describe("Pass as cursor for the next page; null at the end."),
1765
+ }).describe("A page of visible agent requests.");
1661
1766
  /** Runtime validator for {@link AgentRoutine}. */
1662
1767
  export const agentRoutineSchema = z.object({
1663
1768
  /** 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. */
@@ -1851,6 +1956,19 @@ export const agentSessionSchema = z.object({
1851
1956
  /** ID of the trajectory that records the full message history for this session (`trj_...`). `null` until the session has started. */
1852
1957
  trajectory: z.string().optional().describe("ID of the trajectory that records the full message history for this session (`trj_...`). `null` until the session has started."),
1853
1958
  }).describe("A durable agent session record representing a single AI task execution. Tracks status, trajectory, result, and any inbox messages delivered to the session.");
1959
+ /** Runtime validator for {@link AgentSessionEvent}. */
1960
+ export const agentSessionEventSchema = z.object({
1961
+ /** Event name: `session_started`, `message`, `tool_use`, `needs_input`, `activity`, `error`, `turn_complete`, `finished`, `adopted`, or `harness_raw`. */
1962
+ event: z.string().optional().describe("Event name: `session_started`, `message`, `tool_use`, `needs_input`, `activity`, `error`, `turn_complete`, `finished`, `adopted`, or `harness_raw`."),
1963
+ /** Harness that emitted it. */
1964
+ harness: z.string().nullable().optional().describe("Harness that emitted it."),
1965
+ /** Event ID; pass as `after` to page. */
1966
+ id: z.string().optional().describe("Event ID; pass as `after` to page."),
1967
+ /** When the event happened in the sandbox. */
1968
+ occurred_at: z.string().optional().describe("When the event happened in the sandbox."),
1969
+ /** Harness-specific event data. */
1970
+ payload: z.record(z.custom((value) => value !== undefined)).nullable().optional().describe("Harness-specific event data."),
1971
+ }).describe("One event from the coding harness running an agent session on a computer.");
1854
1972
  /** Runtime validator for {@link AgentSessionListResponse}. */
1855
1973
  export const agentSessionListResponseSchema = z.object({
1856
1974
  /** Array of agent session objects for the current page. */