@archastro/sdk 0.13.0 → 0.14.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 (105) hide show
  1. package/dist/channels/api_chat_channel.d.ts +11 -2
  2. package/dist/channels/api_chat_channel.d.ts.map +1 -1
  3. package/dist/channels/api_chat_channel.js +3 -3
  4. package/dist/channels/api_chat_channel.js.map +1 -1
  5. package/dist/client.d.ts +4 -0
  6. package/dist/client.d.ts.map +1 -1
  7. package/dist/client.js +5 -1
  8. package/dist/client.js.map +1 -1
  9. package/dist/types/artifacts.d.ts +35 -35
  10. package/dist/types/automations.d.ts +4 -4
  11. package/dist/types/automations.d.ts.map +1 -1
  12. package/dist/types/automations.js +2 -2
  13. package/dist/types/automations.js.map +1 -1
  14. package/dist/types/chat.d.ts +21037 -18931
  15. package/dist/types/chat.d.ts.map +1 -1
  16. package/dist/types/chat.js +12 -1
  17. package/dist/types/chat.js.map +1 -1
  18. package/dist/types/common.d.ts +10417 -9130
  19. package/dist/types/common.d.ts.map +1 -1
  20. package/dist/types/common.js +246 -143
  21. package/dist/types/common.js.map +1 -1
  22. package/dist/types/extractions.d.ts +112 -112
  23. package/dist/types/image.d.ts +28 -28
  24. package/dist/types/image.d.ts.map +1 -1
  25. package/dist/types/image.js +8 -8
  26. package/dist/types/image.js.map +1 -1
  27. package/dist/types/invites.d.ts +35 -35
  28. package/dist/types/oauth.d.ts +80 -55
  29. package/dist/types/oauth.d.ts.map +1 -1
  30. package/dist/types/status.d.ts +85 -60
  31. package/dist/types/status.d.ts.map +1 -1
  32. package/dist/types/status.js +2 -2
  33. package/dist/types/status.js.map +1 -1
  34. package/dist/types/system.d.ts +52 -22
  35. package/dist/types/system.d.ts.map +1 -1
  36. package/dist/types/system.js +17 -7
  37. package/dist/types/system.js.map +1 -1
  38. package/dist/types/tasks.d.ts +305 -281
  39. package/dist/types/tasks.d.ts.map +1 -1
  40. package/dist/types/tasks.js +26 -18
  41. package/dist/types/tasks.js.map +1 -1
  42. package/dist/types/teams.d.ts +2300 -2240
  43. package/dist/types/teams.d.ts.map +1 -1
  44. package/dist/types/teams.js +13 -13
  45. package/dist/types/teams.js.map +1 -1
  46. package/dist/types/threads.d.ts +1981 -1786
  47. package/dist/types/threads.d.ts.map +1 -1
  48. package/dist/types/threads.js +26 -26
  49. package/dist/types/threads.js.map +1 -1
  50. package/dist/types/users.d.ts +123 -93
  51. package/dist/types/users.d.ts.map +1 -1
  52. package/dist/types/users.js +22 -12
  53. package/dist/types/users.js.map +1 -1
  54. package/dist/v1/resources/activity_feed.d.ts +107 -102
  55. package/dist/v1/resources/activity_feed.d.ts.map +1 -1
  56. package/dist/v1/resources/activity_feed.js +1 -1
  57. package/dist/v1/resources/agents.d.ts +2 -1
  58. package/dist/v1/resources/agents.d.ts.map +1 -1
  59. package/dist/v1/resources/agents.js +1 -1
  60. package/dist/v1/resources/agents.js.map +1 -1
  61. package/dist/v1/resources/event_subscription_deliveries.d.ts +17 -0
  62. package/dist/v1/resources/event_subscription_deliveries.d.ts.map +1 -0
  63. package/dist/v1/resources/event_subscription_deliveries.js +21 -0
  64. package/dist/v1/resources/event_subscription_deliveries.js.map +1 -0
  65. package/dist/v1/resources/event_subscriptions.d.ts +110 -0
  66. package/dist/v1/resources/event_subscriptions.d.ts.map +1 -0
  67. package/dist/v1/resources/event_subscriptions.js +119 -0
  68. package/dist/v1/resources/event_subscriptions.js.map +1 -0
  69. package/dist/v1/resources/index.d.ts +2 -0
  70. package/dist/v1/resources/index.d.ts.map +1 -1
  71. package/dist/v1/resources/index.js +3 -1
  72. package/dist/v1/resources/index.js.map +1 -1
  73. package/dist/v1/resources/private_service_definitions.d.ts +4 -1
  74. package/dist/v1/resources/private_service_definitions.d.ts.map +1 -1
  75. package/dist/v1/resources/private_service_definitions.js +2 -2
  76. package/dist/v1/resources/private_service_definitions.js.map +1 -1
  77. package/dist/v1/resources/solutions.d.ts +11 -1
  78. package/dist/v1/resources/solutions.d.ts.map +1 -1
  79. package/dist/v1/resources/solutions.js +13 -1
  80. package/dist/v1/resources/solutions.js.map +1 -1
  81. package/dist/v1/resources/tasks.d.ts +146 -126
  82. package/dist/v1/resources/tasks.d.ts.map +1 -1
  83. package/dist/v1/resources/tasks.js +5 -1
  84. package/dist/v1/resources/tasks.js.map +1 -1
  85. package/dist/v1/resources/teams.d.ts +574 -491
  86. package/dist/v1/resources/teams.d.ts.map +1 -1
  87. package/dist/v1/resources/teams.js +53 -2
  88. package/dist/v1/resources/teams.js.map +1 -1
  89. package/dist/v1/resources/threads.d.ts +98 -77
  90. package/dist/v1/resources/threads.d.ts.map +1 -1
  91. package/dist/v1/resources/threads.js +3 -2
  92. package/dist/v1/resources/threads.js.map +1 -1
  93. package/dist/v1/resources/trajectories.d.ts +4 -1
  94. package/dist/v1/resources/trajectories.d.ts.map +1 -1
  95. package/dist/v1/resources/trajectories.js +2 -2
  96. package/dist/v1/resources/trajectories.js.map +1 -1
  97. package/dist/v1/resources/users.d.ts +443 -376
  98. package/dist/v1/resources/users.d.ts.map +1 -1
  99. package/dist/v1/resources/users.js +49 -1
  100. package/dist/v1/resources/users.js.map +1 -1
  101. package/dist/v1.d.ts +4 -0
  102. package/dist/v1.d.ts.map +1 -1
  103. package/dist/v1.js +7 -1
  104. package/dist/v1.js.map +1 -1
  105. package/package.json +2 -2
@@ -1,6 +1,6 @@
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: 469ef0f9bdda
3
+ // Content hash: 7045d2507a3d
4
4
  import { z } from "zod";
5
5
  import { automationParticipantSlotSchema, automationPrefillsSchema } from "./automations.js";
6
6
  import { configSchema } from "./config.js";
@@ -34,7 +34,7 @@ export const aclSchema = z.object({
34
34
  /** Runtime validator for {@link ActivityFeedEntry}. */
35
35
  export const activityFeedEntrySchema = z.object({
36
36
  /** The agent that produced this event. Returns an agent ID (`agi_...`) by default, or an expanded agent object when the association is loaded. `null` if no agent is associated. */
37
- agent: z.union([z.string(), z.object({ acl: z.object({ add: z.array(z.object({ actions: z.array(z.string()), principal: z.string().optional(), principal_type: z.string() })).optional(), grants: z.array(z.object({ actions: z.array(z.string()), principal: z.string().optional(), principal_type: z.string() })).optional(), remove: z.array(z.object({ principal: z.string().optional(), principal_type: z.string() })).optional() }).optional(), app: z.string().optional(), created_at: z.string().optional(), default_model: z.string().optional(), description: z.string().optional(), email: z.string().optional(), id: z.string(), identity: z.string().optional(), last_applied_template_config: z.string().optional(), lookup_key: z.string().optional(), metadata: z.record(z.unknown()).optional(), name: z.string().optional(), org: z.string().optional(), org_name: z.string().optional(), originator: z.string().optional(), phone_number: z.string().optional(), sandbox: z.string().optional(), source_solution: z.object({ current_solution: z.object({ category_keys: z.array(z.string()).optional(), created_at: z.string().optional(), description: z.string().optional(), events: z.record(z.unknown()).optional(), id: z.string(), image_url: z.string().optional(), kind: z.string(), latest_solution: z.string().optional(), latest_version: z.string().optional(), lookup_key: z.string().optional(), metadata: z.record(z.unknown()).optional(), name: z.string().optional(), org: z.string().optional(), org_logo: z.object({ file: z.string().optional(), height: z.number().int().optional(), media: z.string().optional(), mime_type: z.string().optional(), refresh_url: z.string().optional(), url: z.string().optional(), width: z.number().int().optional() }).optional(), org_name: z.string().optional(), org_slug: z.string().optional(), owners: z.array(z.string()), readme_url: z.string().optional(), screenshot_urls: z.array(z.string()).optional(), solution_id: z.string().optional(), solution_version: z.string().optional(), tag_keys: z.array(z.string()).optional(), template_kind: z.string().optional(), templates: z.array(z.object({ description: z.string().optional(), details: z.object({ automation_type: z.string().optional(), invoke_contract: z.object({ input_schema: z.record(z.unknown()).optional(), participants: z.array(z.object({ description: z.string().optional(), name: z.string(), required: z.boolean(), type: z.string() })).optional(), prefills: z.object({ participants: z.record(z.unknown()).optional(), payload: z.record(z.unknown()).optional() }) }).optional(), type: z.literal("automation") }).optional(), display_name: z.string().optional(), id: z.string().optional(), kind: z.string(), lookup_key: z.string().optional(), name: z.string().optional(), readme_url: z.string().optional(), virtual_path: z.string().optional() })), updated_at: z.string().optional(), upgrade_available: z.boolean(), virtual_path: z.string().optional() }).optional(), solution: z.object({ category_keys: z.array(z.string()).optional(), created_at: z.string().optional(), description: z.string().optional(), events: z.record(z.unknown()).optional(), id: z.string(), image_url: z.string().optional(), kind: z.string(), latest_solution: z.string().optional(), latest_version: z.string().optional(), lookup_key: z.string().optional(), metadata: z.record(z.unknown()).optional(), name: z.string().optional(), org: z.string().optional(), org_logo: z.object({ file: z.string().optional(), height: z.number().int().optional(), media: z.string().optional(), mime_type: z.string().optional(), refresh_url: z.string().optional(), url: z.string().optional(), width: z.number().int().optional() }).optional(), org_name: z.string().optional(), org_slug: z.string().optional(), owners: z.array(z.string()), readme_url: z.string().optional(), screenshot_urls: z.array(z.string()).optional(), solution_id: z.string().optional(), solution_version: z.string().optional(), tag_keys: z.array(z.string()).optional(), template_kind: z.string().optional(), templates: z.array(z.object({ description: z.string().optional(), details: z.object({ automation_type: z.string().optional(), invoke_contract: z.object({ input_schema: z.record(z.unknown()).optional(), participants: z.array(z.object({ description: z.string().optional(), name: z.string(), required: z.boolean(), type: z.string() })).optional(), prefills: z.object({ participants: z.record(z.unknown()).optional(), payload: z.record(z.unknown()).optional() }) }).optional(), type: z.literal("automation") }).optional(), display_name: z.string().optional(), id: z.string().optional(), kind: z.string(), lookup_key: z.string().optional(), name: z.string().optional(), readme_url: z.string().optional(), virtual_path: z.string().optional() })), updated_at: z.string().optional(), upgrade_available: z.boolean(), virtual_path: z.string().optional() }), template: z.object({ created_at: z.string().optional(), description: z.string().optional(), display_name: z.string().optional(), id: z.string(), kind: z.string(), lookup_key: z.string().optional(), name: z.string().optional(), updated_at: z.string().optional(), virtual_path: z.string().optional() }) }).optional(), team: z.string().optional(), template_upgrade_available: z.boolean().optional(), updated_at: z.string().optional(), user: z.string().optional() })]).optional().describe("The agent that produced this event. Returns an agent ID (`agi_...`) by default, or an expanded agent object when the association is loaded. `null` if no agent is associated."),
37
+ agent: z.union([z.string(), z.object({ acl: z.object({ add: z.array(z.object({ actions: z.array(z.string()), principal: z.string().optional(), principal_type: z.string() })).optional(), grants: z.array(z.object({ actions: z.array(z.string()), principal: z.string().optional(), principal_type: z.string() })).optional(), remove: z.array(z.object({ principal: z.string().optional(), principal_type: z.string() })).optional() }).nullable().optional(), app: z.string().optional(), created_at: z.string().optional(), default_model: z.string().nullable().optional(), description: z.string().nullable().optional(), email: z.string().nullable().optional(), id: z.string(), identity: z.string().nullable().optional(), last_applied_template_config: z.string().nullable().optional(), lookup_key: z.string().nullable().optional(), metadata: z.record(z.unknown()).optional(), name: z.string().optional(), org: z.string().nullable().optional(), org_name: z.string().nullable().optional(), originator: z.string().nullable().optional(), phone_number: z.string().nullable().optional(), sandbox: z.string().nullable().optional(), source_solution: z.object({ current_solution: z.object({ category_keys: z.array(z.string()).optional(), created_at: z.string().optional(), description: z.string().nullable().optional(), events: z.record(z.unknown()).optional(), id: z.string(), image_url: z.string().nullable().optional(), kind: z.string(), latest_solution: z.string().nullable().optional(), latest_version: z.string().nullable().optional(), lookup_key: z.string().nullable().optional(), metadata: z.record(z.unknown()).optional(), name: z.string().nullable().optional(), org: z.string().nullable().optional(), org_logo: z.object({ file: z.string().nullable().optional(), height: z.number().int().nullable().optional(), media: z.string().nullable().optional(), mime_type: z.string().nullable().optional(), refresh_url: z.string().nullable().optional(), url: z.string().nullable().optional(), width: z.number().int().nullable().optional() }).nullable().optional(), org_name: z.string().nullable().optional(), org_slug: z.string().nullable().optional(), owners: z.array(z.string()), readme_url: z.string().nullable().optional(), screenshot_urls: z.array(z.string()).optional(), solution_id: z.string().nullable().optional(), solution_version: z.string().nullable().optional(), tag_keys: z.array(z.string()).optional(), template_kind: z.string().nullable().optional(), templates: z.array(z.object({ description: z.string().nullable().optional(), details: z.object({ automation_type: z.string().nullable().optional(), invoke_contract: z.object({ input_schema: z.record(z.unknown()).nullable().optional(), participants: z.array(z.object({ description: z.string().nullable().optional(), name: z.string(), required: z.boolean(), type: z.string() })).nullable().optional(), prefills: z.object({ participants: z.record(z.unknown()).optional(), payload: z.record(z.unknown()).optional() }) }).nullable().optional(), type: z.literal("automation") }).nullable().optional(), display_name: z.string().nullable().optional(), id: z.string().nullable().optional(), kind: z.string(), lookup_key: z.string().nullable().optional(), name: z.string().nullable().optional(), readme_url: z.string().nullable().optional(), virtual_path: z.string().nullable().optional() })), updated_at: z.string().optional(), upgrade_available: z.boolean(), virtual_path: z.string().nullable().optional() }).optional(), solution: z.object({ category_keys: z.array(z.string()).optional(), created_at: z.string().optional(), description: z.string().nullable().optional(), events: z.record(z.unknown()).optional(), id: z.string(), image_url: z.string().nullable().optional(), kind: z.string(), latest_solution: z.string().nullable().optional(), latest_version: z.string().nullable().optional(), lookup_key: z.string().nullable().optional(), metadata: z.record(z.unknown()).optional(), name: z.string().nullable().optional(), org: z.string().nullable().optional(), org_logo: z.object({ file: z.string().nullable().optional(), height: z.number().int().nullable().optional(), media: z.string().nullable().optional(), mime_type: z.string().nullable().optional(), refresh_url: z.string().nullable().optional(), url: z.string().nullable().optional(), width: z.number().int().nullable().optional() }).nullable().optional(), org_name: z.string().nullable().optional(), org_slug: z.string().nullable().optional(), owners: z.array(z.string()), readme_url: z.string().nullable().optional(), screenshot_urls: z.array(z.string()).optional(), solution_id: z.string().nullable().optional(), solution_version: z.string().nullable().optional(), tag_keys: z.array(z.string()).optional(), template_kind: z.string().nullable().optional(), templates: z.array(z.object({ description: z.string().nullable().optional(), details: z.object({ automation_type: z.string().nullable().optional(), invoke_contract: z.object({ input_schema: z.record(z.unknown()).nullable().optional(), participants: z.array(z.object({ description: z.string().nullable().optional(), name: z.string(), required: z.boolean(), type: z.string() })).nullable().optional(), prefills: z.object({ participants: z.record(z.unknown()).optional(), payload: z.record(z.unknown()).optional() }) }).nullable().optional(), type: z.literal("automation") }).nullable().optional(), display_name: z.string().nullable().optional(), id: z.string().nullable().optional(), kind: z.string(), lookup_key: z.string().nullable().optional(), name: z.string().nullable().optional(), readme_url: z.string().nullable().optional(), virtual_path: z.string().nullable().optional() })), updated_at: z.string().optional(), upgrade_available: z.boolean(), virtual_path: z.string().nullable().optional() }), template: z.object({ created_at: z.string().optional(), description: z.string().nullable().optional(), display_name: z.string().nullable().optional(), id: z.string(), kind: z.string(), lookup_key: z.string().nullable().optional(), name: z.string().nullable().optional(), updated_at: z.string().optional(), virtual_path: z.string().nullable().optional() }) }).nullable().optional(), team: z.string().nullable().optional(), template_upgrade_available: z.boolean().nullable().optional(), updated_at: z.string().optional(), user: z.string().nullable().optional() })]).optional().describe("The agent that produced this event. Returns an agent ID (`agi_...`) by default, or an expanded agent object when the association is loaded. `null` if no agent is associated."),
38
38
  /** ID of the application that produced this entry (`dap_...`). `null` if not scoped to an app. */
39
39
  app: z.string().optional().describe("ID of the application that produced this entry (`dap_...`). `null` if not scoped to an app."),
40
40
  /** Array of attachment objects associated with this entry. Each attachment has a `type` field (e.g. `"file"`, `"task"`, `"artifact"`) and type-specific additional fields. Empty array when there are no attachments. */
@@ -72,7 +72,7 @@ export const activityFeedEntrySchema = z.object({
72
72
  /** When this activity feed entry was last modified (ISO 8601). */
73
73
  updated_at: z.string().optional().describe("When this activity feed entry was last modified (ISO 8601)."),
74
74
  /** The user who triggered this event. Returns a user ID (`usr_...`) by default, or an expanded user object when the association is loaded. `null` if no user is associated. */
75
- user: z.union([z.string(), z.object({ alias: z.string().optional(), app: z.string().optional(), app_name: z.string().optional(), email: z.string().optional(), id: z.string(), is_system_user: z.boolean().optional(), metadata: z.record(z.unknown()).optional(), name: z.string().optional(), org: z.string().optional(), org_name: z.string().optional(), org_role: z.string().optional(), org_slug: z.string().optional(), sandbox: z.string().optional(), sandbox_name: z.string().optional() })]).optional().describe("The user who triggered this event. Returns a user ID (`usr_...`) by default, or an expanded user object when the association is loaded. `null` if no user is associated."),
75
+ user: z.union([z.string(), z.object({ alias: z.string().nullable().optional(), app: z.string().nullable().optional(), app_name: z.string().nullable().optional(), created_by_agent_user: z.string().nullable().optional(), created_by_developer: z.string().nullable().optional(), created_by_org: z.string().nullable().optional(), created_by_team: z.string().nullable().optional(), created_by_user: z.string().nullable().optional(), email: z.string().nullable().optional(), id: z.string(), is_system_user: z.boolean().optional(), metadata: z.record(z.unknown()).optional(), name: z.string().nullable().optional(), org: z.string().nullable().optional(), org_name: z.string().nullable().optional(), org_role: z.string().nullable().optional(), org_slug: z.string().nullable().optional(), sandbox: z.string().nullable().optional(), sandbox_name: z.string().nullable().optional() })]).optional().describe("The user who triggered this event. Returns a user ID (`usr_...`) by default, or an expanded user object when the association is loaded. `null` if no user is associated."),
76
76
  }).describe("A single event record in an activity feed, capturing what happened, who caused it, and which resources were involved.");
77
77
  /** Runtime validator for {@link ActivityFeedEntryListResponse}. */
78
78
  export const activityFeedEntryListResponseSchema = z.object({
@@ -88,34 +88,34 @@ export const activityFeedEntryListResponseSchema = z.object({
88
88
  /** Runtime validator for {@link Actor}. */
89
89
  export const actorSchema = z.object({
90
90
  /** Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured. */
91
- alias: z.string().optional().describe("Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured."),
91
+ alias: z.string().nullable().optional().describe("Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured."),
92
92
  /** Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents. */
93
- id: z.string().optional().describe("Composite actor identifier. Format is `\"user-<usr_...>\"` for human users or `\"agent-<agi_...>\"` for agents."),
93
+ id: z.string().nullable().optional().describe("Composite actor identifier. Format is `\"user-<usr_...>\"` for human users or `\"agent-<agi_...>\"` for agents."),
94
94
  /** Display name of the actor shown in the UI. `null` if no name is set. */
95
- name: z.string().optional().describe("Display name of the actor shown in the UI. `null` if no name is set."),
95
+ name: z.string().nullable().optional().describe("Display name of the actor shown in the UI. `null` if no name is set."),
96
96
  /** Profile picture for the actor. `null` if the actor has no profile picture. */
97
- profile_picture: imageSourceSchema.optional().describe("Profile picture for the actor. `null` if the actor has no profile picture."),
97
+ profile_picture: imageSourceSchema.nullable().optional().describe("Profile picture for the actor. `null` if the actor has no profile picture."),
98
98
  }).describe("The entity that authored a message, either a human user or an agent.");
99
99
  /** Runtime validator for {@link UpgradeTemplateSummary}. */
100
100
  export const upgradeTemplateSummarySchema = z.object({
101
101
  /** When this template config was created (ISO 8601). */
102
102
  created_at: z.string().optional().describe("When this template config was created (ISO 8601)."),
103
103
  /** Description of the template from the config body. `null` if the current version has no `description` field. */
104
- description: z.string().optional().describe("Description of the template from the config body. `null` if the current version has no `description` field."),
104
+ description: z.string().nullable().optional().describe("Description of the template from the config body. `null` if the current version has no `description` field."),
105
105
  /** Human-readable display name from the config body. `null` if the current version has no `display_name` field. */
106
- display_name: z.string().optional().describe("Human-readable display name from the config body. `null` if the current version has no `display_name` field."),
106
+ display_name: z.string().nullable().optional().describe("Human-readable display name from the config body. `null` if the current version has no `display_name` field."),
107
107
  /** Template config ID (`cfg_...`). */
108
108
  id: z.string().describe("Template config ID (`cfg_...`)."),
109
109
  /** Config kind identifier for this template (e.g. `"agent_tool_template"`). */
110
110
  kind: z.string().describe("Config kind identifier for this template (e.g. `\"agent_tool_template\"`)."),
111
111
  /** Stable lookup key assigned to this template config. `null` if no lookup key is set. */
112
- lookup_key: z.string().optional().describe("Stable lookup key assigned to this template config. `null` if no lookup key is set."),
112
+ lookup_key: z.string().nullable().optional().describe("Stable lookup key assigned to this template config. `null` if no lookup key is set."),
113
113
  /** Template name as stored in the config body. `null` if the current version has no `name` field. */
114
- name: z.string().optional().describe("Template name as stored in the config body. `null` if the current version has no `name` field."),
114
+ name: z.string().nullable().optional().describe("Template name as stored in the config body. `null` if the current version has no `name` field."),
115
115
  /** When this template config was last modified (ISO 8601). */
116
116
  updated_at: z.string().optional().describe("When this template config was last modified (ISO 8601)."),
117
117
  /** Virtual filesystem path for this template config. `null` if not set. */
118
- virtual_path: z.string().optional().describe("Virtual filesystem path for this template config. `null` if not set."),
118
+ virtual_path: z.string().nullable().optional().describe("Virtual filesystem path for this template config. `null` if not set."),
119
119
  }).describe("Compact summary of an AgentTemplate config referenced by an agent upgrade or source-solution response.");
120
120
  /** Runtime validator for {@link InstalledConfigEntry}. */
121
121
  export const installedConfigEntrySchema = z.object({
@@ -126,7 +126,7 @@ export const installedConfigEntrySchema = z.object({
126
126
  /** Type of config that was created. One of `"Skill"`, `"File"`, `"Script"`, `"AgentTemplate"`, or `"Config"`. */
127
127
  kind: z.string().describe("Type of config that was created. One of `\"Skill\"`, `\"File\"`, `\"Script\"`, `\"AgentTemplate\"`, or `\"Config\"`."),
128
128
  /** 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`. */
129
- lookup_key: z.string().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`."),
129
+ 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`."),
130
130
  }).describe("A slim summary of a single config record created during an agent install transaction. Returned as an entry in `AgentCreateResponse.installed_configs`.");
131
131
  /** Runtime validator for {@link MessagePolicy}. */
132
132
  export const messagePolicySchema = z.object({
@@ -165,66 +165,66 @@ export const workerStatusSchema = z.object({
165
165
  /** Runtime validator for {@link MediaVariant}. */
166
166
  export const mediaVariantSchema = z.object({
167
167
  /** MIME type of this variant's file (e.g., `"image/jpeg"`, `"video/mp4"`). `null` if the file is not loaded. */
168
- content_type: z.string().optional().describe("MIME type of this variant's file (e.g., `\"image/jpeg\"`, `\"video/mp4\"`). `null` if the file is not loaded."),
168
+ 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."),
169
169
  /** When this variant was created (ISO 8601). */
170
170
  created_at: z.string().optional().describe("When this variant was created (ISO 8601)."),
171
171
  /** ID of the underlying storage file that backs this variant (`fil_...`). */
172
172
  file: z.string().optional().describe("ID of the underlying storage file that backs this variant (`fil_...`)."),
173
173
  /** Original filename of the uploaded file for this variant. `null` if the file is not loaded. */
174
- filename: z.string().optional().describe("Original filename of the uploaded file for this variant. `null` if the file is not loaded."),
174
+ filename: z.string().nullable().optional().describe("Original filename of the uploaded file for this variant. `null` if the file is not loaded."),
175
175
  /** Height of this variant in pixels. `null` if not recorded. */
176
- height: z.number().int().optional().describe("Height of this variant in pixels. `null` if not recorded."),
176
+ height: z.number().int().nullable().optional().describe("Height of this variant in pixels. `null` if not recorded."),
177
177
  /** Media variant ID (`mvr_...`). */
178
178
  id: z.string().describe("Media variant ID (`mvr_...`)."),
179
179
  /** Resolved image delivery metadata for this variant, including dimensions and CDN URL. `null` for non-image content types. */
180
- image_source: imageSourceSchema.optional().describe("Resolved image delivery metadata for this variant, including dimensions and CDN URL. `null` for non-image content types."),
180
+ image_source: imageSourceSchema.nullable().optional().describe("Resolved image delivery metadata for this variant, including dimensions and CDN URL. `null` for non-image content types."),
181
181
  /** When this variant was last updated (ISO 8601). */
182
182
  updated_at: z.string().optional().describe("When this variant was last updated (ISO 8601)."),
183
183
  /** Signed download URL for this variant, resolved at request time. `null` if the file is unavailable. */
184
- url: z.string().optional().describe("Signed download URL for this variant, resolved at request time. `null` if the file is unavailable."),
184
+ url: z.string().nullable().optional().describe("Signed download URL for this variant, resolved at request time. `null` if the file is unavailable."),
185
185
  /** Identifier for this variant's processing tier. Common values include `"original"` (the unmodified upload) and `"thumbnail"` (a resized preview). */
186
186
  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)."),
187
187
  /** Width of this variant in pixels. `null` if not recorded. */
188
- width: z.number().int().optional().describe("Width of this variant in pixels. `null` if not recorded."),
188
+ width: z.number().int().nullable().optional().describe("Width of this variant in pixels. `null` if not recorded."),
189
189
  }).describe("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.");
190
190
  /** Runtime validator for {@link Attachment}. */
191
191
  export const attachmentSchema = z.object({
192
192
  /** MIME type of the attached file, e.g. `"image/png"` or `"application/pdf"`. Present on `file`, `artifact`, and `media` types. `null` otherwise. */
193
- content_type: z.string().optional().describe("MIME type of the attached file, e.g. `\"image/png\"` or `\"application/pdf\"`. Present on `file`, `artifact`, and `media` types. `null` otherwise."),
193
+ content_type: z.string().nullable().optional().describe("MIME type of the attached file, e.g. `\"image/png\"` or `\"application/pdf\"`. Present on `file`, `artifact`, and `media` types. `null` otherwise."),
194
194
  /** Short description. The page meta-description for `scraped_link`, the artifact description for `artifact`, and the task description for `task` types. `null` on other types. */
195
- description: z.string().optional().describe("Short description. The page meta-description for `scraped_link`, the artifact description for `artifact`, and the task description for `task` types. `null` on other types."),
195
+ description: z.string().nullable().optional().describe("Short description. The page meta-description for `scraped_link`, the artifact description for `artifact`, and the task description for `task` types. `null` on other types."),
196
196
  /** Original filename of the attached file, e.g. `"report.pdf"`. Present on `file`, `artifact`, and `media` types. `null` otherwise. */
197
- filename: z.string().optional().describe("Original filename of the attached file, e.g. `\"report.pdf\"`. Present on `file`, `artifact`, and `media` types. `null` otherwise."),
197
+ filename: z.string().nullable().optional().describe("Original filename of the attached file, e.g. `\"report.pdf\"`. Present on `file`, `artifact`, and `media` types. `null` otherwise."),
198
198
  /** Height in pixels of the media item. Present on `media` type only. `null` otherwise. */
199
- height: z.number().int().optional().describe("Height in pixels of the media item. Present on `media` type only. `null` otherwise."),
199
+ height: z.number().int().nullable().optional().describe("Height in pixels of the media item. Present on `media` type only. `null` otherwise."),
200
200
  /** Unique identifier for this attachment within the message. */
201
201
  id: z.string().describe("Unique identifier for this attachment within the message."),
202
202
  /** Height in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise. */
203
- image_height: z.number().int().optional().describe("Height in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise."),
203
+ image_height: z.number().int().nullable().optional().describe("Height in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise."),
204
204
  /** Image source metadata for inline rendering. Present on `file`, `scraped_link`, `artifact`, and `media` types when the content is an image. `null` otherwise. */
205
- image_source: imageSourceSchema.optional().describe("Image source metadata for inline rendering. Present on `file`, `scraped_link`, `artifact`, and `media` types when the content is an image. `null` otherwise."),
205
+ image_source: imageSourceSchema.nullable().optional().describe("Image source metadata for inline rendering. Present on `file`, `scraped_link`, `artifact`, and `media` types when the content is an image. `null` otherwise."),
206
206
  /** URL of the preview image extracted from the scraped page. Present on `scraped_link` type only. `null` otherwise. */
207
- image_url: z.string().optional().describe("URL of the preview image extracted from the scraped page. Present on `scraped_link` type only. `null` otherwise."),
207
+ image_url: z.string().nullable().optional().describe("URL of the preview image extracted from the scraped page. Present on `scraped_link` type only. `null` otherwise."),
208
208
  /** Width in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise. */
209
- image_width: z.number().int().optional().describe("Width in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise."),
210
- /** The media category, e.g. `"video"` or `"audio"`. Present on `media` type only. `null` otherwise. */
211
- media_type: z.string().optional().describe("The media category, e.g. `\"video\"` or `\"audio\"`. Present on `media` type only. `null` otherwise."),
209
+ image_width: z.number().int().nullable().optional().describe("Width in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise."),
210
+ /** The media category, e.g. `"video"` or `"audio"`. Present on `media` type only; omitted otherwise. */
211
+ media_type: z.string().optional().describe("The media category, e.g. `\"video\"` or `\"audio\"`. Present on `media` type only; omitted otherwise."),
212
212
  /** Display name of the media item. Present on `media` type only. `null` otherwise. */
213
- name: z.string().optional().describe("Display name of the media item. Present on `media` type only. `null` otherwise."),
214
- /** The full embedded object payload. For `task` type, contains the task record. For `action` type, contains the action definition. For `chart` type, contains the chart with its inline `spec`. `null` on other types. */
215
- object: z.record(z.unknown()).optional().describe("The full embedded object payload. For `task` type, contains the task record. For `action` type, contains the action definition. For `chart` type, contains the chart with its inline `spec`. `null` on other types."),
213
+ name: z.string().nullable().optional().describe("Display name of the media item. Present on `media` type only. `null` otherwise."),
214
+ /** The full embedded object payload. For `task` type, contains the task record. For `action` type, contains the action definition. For `chart` type, contains the chart with its inline `spec`. Omitted on other types. */
215
+ object: z.record(z.unknown()).optional().describe("The full embedded object payload. For `task` type, contains the task record. For `action` type, contains the action definition. For `chart` type, contains the chart with its inline `spec`. Omitted on other types."),
216
216
  /** Display title. The page title for `scraped_link`, the artifact name for `artifact`, and the task title for `task` types. `null` on other types. */
217
- title: z.string().optional().describe("Display title. The page title for `scraped_link`, the artifact name for `artifact`, and the task title for `task` types. `null` on other types."),
217
+ title: z.string().nullable().optional().describe("Display title. The page title for `scraped_link`, the artifact name for `artifact`, and the task title for `task` types. `null` on other types."),
218
218
  /** The attachment type. One of `"file"`, `"scraped_link"`, `"artifact"`, `"task"`, `"media"`, `"action"`, or `"chart"`. Determines which additional fields are present. */
219
219
  type: z.string().describe("The attachment type. One of `\"file\"`, `\"scraped_link\"`, `\"artifact\"`, `\"task\"`, `\"media\"`, `\"action\"`, or `\"chart\"`. Determines which additional fields are present."),
220
220
  /** URL to access the resource. A signed download URL for `file` and `artifact` types; the original URL for `scraped_link`; a media playback URL for `media`. `null` on `task` and `action` types. */
221
- url: z.string().optional().describe("URL to access the resource. A signed download URL for `file` and `artifact` types; the original URL for `scraped_link`; a media playback URL for `media`. `null` on `task` and `action` types."),
222
- /** Array of available encoding variants for the media item (e.g. different resolutions). Present on `media` type only. `null` otherwise. */
223
- variants: z.array(mediaVariantSchema).optional().describe("Array of available encoding variants for the media item (e.g. different resolutions). Present on `media` type only. `null` otherwise."),
221
+ url: z.string().nullable().optional().describe("URL to access the resource. A signed download URL for `file` and `artifact` types; the original URL for `scraped_link`; a media playback URL for `media`. `null` on `task` and `action` types."),
222
+ /** Array of available encoding variants for the media item (e.g. different resolutions). Present on `media` type only; omitted otherwise. */
223
+ variants: z.array(mediaVariantSchema).optional().describe("Array of available encoding variants for the media item (e.g. different resolutions). Present on `media` type only; omitted otherwise."),
224
224
  /** Version number of the attached artifact at the time of attachment. Present on `artifact` type only. `null` otherwise. */
225
- version: z.number().int().optional().describe("Version number of the attached artifact at the time of attachment. Present on `artifact` type only. `null` otherwise."),
225
+ version: z.number().int().nullable().optional().describe("Version number of the attached artifact at the time of attachment. Present on `artifact` type only. `null` otherwise."),
226
226
  /** Width in pixels of the media item. Present on `media` type only. `null` otherwise. */
227
- width: z.number().int().optional().describe("Width in pixels of the media item. Present on `media` type only. `null` otherwise."),
227
+ width: z.number().int().nullable().optional().describe("Width in pixels of the media item. Present on `media` type only. `null` otherwise."),
228
228
  }).describe("A rich attachment associated with a message, such as a file, scraped link, artifact, task, media item, or inline action.");
229
229
  /** Runtime validator for {@link AuthTokens}. */
230
230
  export const authTokensSchema = z.object({
@@ -310,19 +310,19 @@ export const messageReactionSchema = z.object({
310
310
  /** Runtime validator for {@link Message}. */
311
311
  export const messageSchema = z.object({
312
312
  /** Access control list for private messages (grants with `read` action). Only returned to resource owners (and privileged/org-admin viewers) via server-side `field_redactions: [acl: :owner]`; `null` for everyone else. */
313
- acl: aclSchema.optional().describe("Access control list for private messages (grants with `read` action). Only returned to resource owners (and privileged/org-admin viewers) via server-side `field_redactions: [acl: :owner]`; `null` for everyone else."),
313
+ acl: aclSchema.nullable().optional().describe("Access control list for private messages (grants with `read` action). Only returned to resource owners (and privileged/org-admin viewers) via server-side `field_redactions: [acl: :owner]`; `null` for everyone else."),
314
314
  /** Resolved actor descriptors for the message sender, combining identity and display metadata. Always contains exactly one entry. */
315
315
  actors: z.array(actorSchema).optional().describe("Resolved actor descriptors for the message sender, combining identity and display metadata. Always contains exactly one entry."),
316
316
  /** ID of the agent user that sent this message (`agi_...`). `null` for messages sent by human users. */
317
- agent: z.string().optional().describe("ID of the agent user that sent this message (`agi_...`). `null` for messages sent by human users."),
317
+ agent: z.string().nullable().optional().describe("ID of the agent user that sent this message (`agi_...`). `null` for messages sent by human users."),
318
318
  /** Local agent execution mode for this message. One of `cli`, `embedded`, or `null` when the message was not created by a local agent execution path. */
319
- agent_mode: z.enum(["cli", "embedded"]).optional().describe("Local agent execution mode for this message. One of `cli`, `embedded`, or `null` when the message was not created by a local agent execution path."),
319
+ agent_mode: z.enum(["cli", "embedded"]).nullable().optional().describe("Local agent execution mode for this message. One of `cli`, `embedded`, or `null` when the message was not created by a local agent execution path."),
320
320
  /** Files, links, tasks, media, artifacts, and actions attached to this message. Empty array if there are no attachments. */
321
321
  attachments: z.array(attachmentSchema).optional().describe("Files, links, tasks, media, artifacts, and actions attached to this message. Empty array if there are no attachments."),
322
322
  /** ID of the thread that was branched from this message (`thr_...`). `null` if this message has not spawned a branch thread. */
323
- branched_thread: z.string().optional().describe("ID of the thread that was branched from this message (`thr_...`). `null` if this message has not spawned a branch thread."),
323
+ branched_thread: z.string().nullable().optional().describe("ID of the thread that was branched from this message (`thr_...`). `null` if this message has not spawned a branch thread."),
324
324
  /** Text content of the message. `null` for messages that contain only attachments. */
325
- content: z.string().optional().describe("Text content of the message. `null` for messages that contain only attachments."),
325
+ content: z.string().nullable().optional().describe("Text content of the message. `null` for messages that contain only attachments."),
326
326
  /** When the message was posted (ISO 8601). */
327
327
  created_at: z.string().optional().describe("When the message was posted (ISO 8601)."),
328
328
  /** Whether this message has at least one reply. Only present when explicitly requested or computed by the server. */
@@ -330,41 +330,41 @@ export const messageSchema = z.object({
330
330
  /** Message ID (`msg_...`). */
331
331
  id: z.string().describe("Message ID (`msg_...`)."),
332
332
  /** Client-supplied idempotency key used to deduplicate message sends. `null` if the sender did not provide one. */
333
- idempotency_key: z.string().optional().describe("Client-supplied idempotency key used to deduplicate message sends. `null` if the sender did not provide one."),
333
+ idempotency_key: z.string().nullable().optional().describe("Client-supplied idempotency key used to deduplicate message sends. `null` if the sender did not provide one."),
334
334
  /** Whether this message is a deletion tombstone. `true` only on the `message_updated` broadcast emitted when a message is deleted: the original content is replaced with a placeholder and the message no longer exists on the server. Always `false` for live messages. */
335
335
  is_deleted: z.boolean().optional().describe("Whether this message is a deletion tombstone. `true` only on the `message_updated` broadcast emitted when a message is deleted: the original content is replaced with a placeholder and the message no longer exists on the server. Always `false` for live messages."),
336
336
  /** Identifier of the legacy chat agent that sent this message, if applicable. `null` for messages sent by users or modern agent users. */
337
- legacy_agent: z.string().optional().describe("Identifier of the legacy chat agent that sent this message, if applicable. `null` for messages sent by users or modern agent users."),
337
+ legacy_agent: z.string().nullable().optional().describe("Identifier of the legacy chat agent that sent this message, if applicable. `null` for messages sent by users or modern agent users."),
338
338
  /** Arbitrary key-value metadata attached to the message. Always present; defaults to an empty object when no metadata has been set. */
339
339
  metadata: z.record(z.unknown()).optional().describe("Arbitrary key-value metadata attached to the message. Always present; defaults to an empty object when no metadata has been set."),
340
340
  /** ID of the organization that owns this message (`org_...`). */
341
- org: z.string().optional().describe("ID of the organization that owns this message (`org_...`)."),
341
+ org: z.string().nullable().optional().describe("ID of the organization that owns this message (`org_...`)."),
342
342
  /** Emoji and other reactions added to this message by users. Empty array if no reactions have been added or the association is not preloaded. */
343
343
  reactions: z.array(messageReactionSchema).optional().describe("Emoji and other reactions added to this message by users. Empty array if no reactions have been added or the association is not preloaded."),
344
344
  /** Display hint for how the message should be rendered. One of `"reply"`, `"direct"`, or `"inline"`. `null` for user-authored messages, which are always rendered as standard replies. */
345
- rendering_mode: z.string().optional().describe("Display hint for how the message should be rendered. One of `\"reply\"`, `\"direct\"`, or `\"inline\"`. `null` for user-authored messages, which are always rendered as standard replies."),
345
+ rendering_mode: z.string().nullable().optional().describe("Display hint for how the message should be rendered. One of `\"reply\"`, `\"direct\"`, or `\"inline\"`. `null` for user-authored messages, which are always rendered as standard replies."),
346
346
  /** Inline array of reply messages, each serialized as a full message object. Only present when the server has preloaded replies for this message. */
347
347
  replies: z.array(z.record(z.unknown())).optional().describe("Inline array of reply messages, each serialized as a full message object. Only present when the server has preloaded replies for this message."),
348
348
  /** Opaque pagination cursor to fetch replies posted after the current page. Only present when inline replies are included in the response. */
349
- replies_after_cursor: z.string().optional().describe("Opaque pagination cursor to fetch replies posted after the current page. Only present when inline replies are included in the response."),
349
+ replies_after_cursor: z.string().nullable().optional().describe("Opaque pagination cursor to fetch replies posted after the current page. Only present when inline replies are included in the response."),
350
350
  /** Opaque pagination cursor to fetch replies posted before the current page. Only present when inline replies are included in the response. */
351
- replies_before_cursor: z.string().optional().describe("Opaque pagination cursor to fetch replies posted before the current page. Only present when inline replies are included in the response."),
351
+ replies_before_cursor: z.string().nullable().optional().describe("Opaque pagination cursor to fetch replies posted before the current page. Only present when inline replies are included in the response."),
352
352
  /** Total number of direct replies to this message. Only present when explicitly requested or computed by the server. */
353
353
  reply_count: z.number().int().optional().describe("Total number of direct replies to this message. Only present when explicitly requested or computed by the server."),
354
354
  /** The parent message this message is a reply to, expanded as a full message object when loaded. `null` if this is a top-level message or the association is not preloaded. */
355
- reply_to: z.record(z.unknown()).optional().describe("The parent message this message is a reply to, expanded as a full message object when loaded. `null` if this is a top-level message or the association is not preloaded."),
355
+ reply_to: z.record(z.unknown()).nullable().optional().describe("The parent message this message is a reply to, expanded as a full message object when loaded. `null` if this is a top-level message or the association is not preloaded."),
356
356
  /** ID of the root message in this reply chain (`msg_...`). `null` for a top-level message. The value is persisted when the reply is created, so callers can correlate a multi-turn session without walking parent messages. */
357
357
  root_message_id: z.string().nullable().optional().describe("ID of the root message in this reply chain (`msg_...`). `null` for a top-level message. The value is persisted when the reply is created, so callers can correlate a multi-turn session without walking parent messages."),
358
358
  /** ID of the developer sandbox this message belongs to (`dsb_...`). `null` for non-sandbox messages. */
359
- sandbox: z.string().optional().describe("ID of the developer sandbox this message belongs to (`dsb_...`). `null` for non-sandbox messages."),
359
+ sandbox: z.string().nullable().optional().describe("ID of the developer sandbox this message belongs to (`dsb_...`). `null` for non-sandbox messages."),
360
360
  /** ID of the team this message is scoped to (`tem_...`). `null` if the message is not team-scoped. */
361
- team: z.string().optional().describe("ID of the team this message is scoped to (`tem_...`). `null` if the message is not team-scoped."),
362
- /** ID of the thread this message belongs to (`thr_...`). `null` for messages not yet associated with a thread. */
363
- thread: z.string().optional().describe("ID of the thread this message belongs to (`thr_...`). `null` for messages not yet associated with a thread."),
361
+ team: z.string().nullable().optional().describe("ID of the team this message is scoped to (`tem_...`). `null` if the message is not team-scoped."),
362
+ /** ID of the thread this message belongs to (`thr_...`). */
363
+ thread: z.string().optional().describe("ID of the thread this message belongs to (`thr_...`)."),
364
364
  /** Optional client-defined classification for the message (for example `note` or `status`). Free-form string up to 64 characters. The value `system` is reserved for platform-authored messages and cannot be set by clients. `null` when unset. */
365
- type: z.string().optional().describe("Optional client-defined classification for the message (for example `note` or `status`). Free-form string up to 64 characters. The value `system` is reserved for platform-authored messages and cannot be set by clients. `null` when unset."),
365
+ type: z.string().nullable().optional().describe("Optional client-defined classification for the message (for example `note` or `status`). Free-form string up to 64 characters. The value `system` is reserved for platform-authored messages and cannot be set by clients. `null` when unset."),
366
366
  /** The human user who sent this message. Returns a public ID string (`usr_...`) when the association is not preloaded, or an expanded user object when it is. `null` for messages sent by agents. */
367
- user: z.string().optional().describe("The human user who sent this message. Returns a public ID string (`usr_...`) when the association is not preloaded, or an expanded user object when it is. `null` for messages sent by agents."),
367
+ user: z.union([z.string(), z.object({ alias: z.string().nullable().optional(), app: z.string().nullable().optional(), app_name: z.string().nullable().optional(), created_by_agent_user: z.string().nullable().optional(), created_by_developer: z.string().nullable().optional(), created_by_org: z.string().nullable().optional(), created_by_team: z.string().nullable().optional(), created_by_user: z.string().nullable().optional(), email: z.string().nullable().optional(), id: z.string(), is_system_user: z.boolean().optional(), metadata: z.record(z.unknown()).optional(), name: z.string().nullable().optional(), org: z.string().nullable().optional(), org_name: z.string().nullable().optional(), org_role: z.string().nullable().optional(), org_slug: z.string().nullable().optional(), sandbox: z.string().nullable().optional(), sandbox_name: z.string().nullable().optional() })]).nullable().optional().describe("The human user who sent this message. Returns a public ID string (`usr_...`) when the association is not preloaded, or an expanded user object when it is. `null` for messages sent by agents."),
368
368
  /** Message-level visibility. `default` is visible to anyone who can see the parent thread. `private` is restricted to the sender and explicit ACL `read` grantees. */
369
369
  visibility: z.enum(["default", "private"]).optional().describe("Message-level visibility. `default` is visible to anyone who can see the parent thread. `private` is restricted to the sender and explicit ACL `read` grantees."),
370
370
  }).describe("A chat message posted in a thread, including its content, author, attachments, reactions, and optional reply metadata.");
@@ -553,6 +553,91 @@ export const deploymentSchema = z.object({
553
553
  /** Opaque SHA-256 fingerprint of the image reference, or `null` in local development. */
554
554
  release: z.string().nullable().optional().describe("Opaque SHA-256 fingerprint of the image reference, or `null` in local development."),
555
555
  }).describe("Deployment metadata.");
556
+ /** Runtime validator for {@link DomainEvent}. */
557
+ export const domainEventSchema = z.object({
558
+ agent: z.string().optional(),
559
+ created_at: z.string(),
560
+ event_name: z.string(),
561
+ id: z.string(),
562
+ idempotency_key: z.string().optional(),
563
+ org: z.string().optional(),
564
+ /** Opaque event-specific JSON. Use event_name to select the expected payload schema. */
565
+ payload: z.record(z.unknown()).describe("Opaque event-specific JSON. Use event_name to select the expected payload schema."),
566
+ sandbox: z.string().optional(),
567
+ team: z.string().optional(),
568
+ user: z.string().optional(),
569
+ }).describe("A domain event with stable attribution fields and an event-specific payload.");
570
+ /** Runtime validator for {@link EventSubscription}. */
571
+ export const eventSubscriptionSchema = z.object({
572
+ agent: z.string().optional(),
573
+ available_count: z.number().int(),
574
+ created_at: z.string(),
575
+ dropped_events_total: z.number().int(),
576
+ dropped_through_position: z.number().int(),
577
+ event_names: z.array(z.string()),
578
+ id: z.string(),
579
+ last_overflow_at: z.string().optional(),
580
+ leased_count: z.number().int(),
581
+ max_pending_events: z.number().int(),
582
+ name: z.string(),
583
+ org: z.string().optional(),
584
+ queue_epoch: z.number().int(),
585
+ retention_seconds: z.number().int(),
586
+ sandbox: z.string().optional(),
587
+ status: z.enum(["active", "paused"]),
588
+ team: z.string().optional(),
589
+ updated_at: z.string(),
590
+ user: z.string().optional(),
591
+ visibility_timeout_seconds: z.number().int(),
592
+ }).describe("An app-scoped subscription to exact domain-event names.");
593
+ /** Runtime validator for {@link EventSubscriptionDelivery}. */
594
+ export const eventSubscriptionDeliverySchema = z.object({
595
+ delivery_id: z.string(),
596
+ event: domainEventSchema,
597
+ lease_expires_at: z.string(),
598
+ receipt_handle: z.string(),
599
+ receive_count: z.number().int(),
600
+ sequence: z.number().int(),
601
+ }).describe("A domain event leased from a subscription queue.");
602
+ /** Runtime validator for {@link EventSubscriptionClaim}. */
603
+ export const eventSubscriptionClaimSchema = z.object({
604
+ data: z.array(eventSubscriptionDeliverySchema),
605
+ dropped_events_total: z.number().int(),
606
+ dropped_through_position: z.number().int(),
607
+ has_more: z.boolean(),
608
+ queue_epoch: z.number().int(),
609
+ }).describe("Result of atomically claiming the head delivery.");
610
+ /** Runtime validator for {@link EventSubscriptionQueueEntry}. */
611
+ export const eventSubscriptionQueueEntrySchema = z.object({
612
+ delivery_id: z.string(),
613
+ event: domainEventSchema,
614
+ lease_expires_at: z.string().optional(),
615
+ receive_count: z.number().int(),
616
+ sequence: z.number().int(),
617
+ state: z.enum(["available", "leased"]),
618
+ }).describe("A non-reserving view of one queued delivery.");
619
+ /** Runtime validator for {@link EventSubscriptionHead}. */
620
+ export const eventSubscriptionHeadSchema = z.object({
621
+ data: eventSubscriptionQueueEntrySchema.optional(),
622
+ }).describe("A non-reserving view of the queue head.");
623
+ /** Runtime validator for {@link EventSubscriptionPage}. */
624
+ export const eventSubscriptionPageSchema = z.object({
625
+ data: z.array(eventSubscriptionSchema),
626
+ page: z.number().int(),
627
+ per_page: z.number().int(),
628
+ total_count: z.number().int(),
629
+ total_pages: z.number().int(),
630
+ }).describe("A page of domain-event subscriptions.");
631
+ /** Runtime validator for {@link EventSubscriptionQueue}. */
632
+ export const eventSubscriptionQueueSchema = z.object({
633
+ after_cursor: z.string().optional(),
634
+ before_cursor: z.string().optional(),
635
+ data: z.array(eventSubscriptionQueueEntrySchema),
636
+ dropped_events_total: z.number().int(),
637
+ dropped_through_position: z.number().int(),
638
+ has_more: z.boolean(),
639
+ queue_epoch: z.number().int(),
640
+ }).describe("A cursor-paginated non-reserving view of a subscription queue.");
556
641
  /** Runtime validator for {@link StorageFile}. */
557
642
  export const storageFileSchema = z.object({
558
643
  /** ID of the app this file belongs to (`app_...`). */
@@ -868,6 +953,24 @@ export const privateServicePageSchema = z.object({
868
953
  total_entries: z.number().int(),
869
954
  total_pages: z.number().int(),
870
955
  }).describe("A page of private services.");
956
+ /** Runtime validator for {@link ProductKnowledgeReconcileFailure}. */
957
+ export const productKnowledgeReconcileFailureSchema = z.object({
958
+ /** Stable vendor-defined key for the customer whose agent did not converge. */
959
+ customer_key: z.string().describe("Stable vendor-defined key for the customer whose agent did not converge."),
960
+ /** Stable failure reason for operator and vendor feedback. */
961
+ error: z.string().describe("Stable failure reason for operator and vendor feedback."),
962
+ /** Whether rerunning the desired-state reconciliation is safe. */
963
+ retryable: z.boolean().describe("Whether rerunning the desired-state reconciliation is safe."),
964
+ }).describe("One stamped customer whose product-knowledge tool update did not converge.");
965
+ /** Runtime validator for {@link ProductKnowledgeReconcileResponse}. */
966
+ export const productKnowledgeReconcileResponseSchema = z.object({
967
+ /** True when every stamped customer agent now has the desired source allowlist. */
968
+ complete: z.boolean().describe("True when every stamped customer agent now has the desired source allowlist."),
969
+ /** Per-customer failures. Empty when reconciliation is complete. */
970
+ failures: z.array(productKnowledgeReconcileFailureSchema).describe("Per-customer failures. Empty when reconciliation is complete."),
971
+ /** Customer keys whose agent tool config is converged. */
972
+ reconciled_customers: z.array(z.string()).describe("Customer keys whose agent tool config is converged."),
973
+ }).describe("Desired-state reconciliation result for a CM install's stamped agents.");
871
974
  /** Runtime validator for {@link RoutinePreset}. */
872
975
  export const routinePresetSchema = z.object({
873
976
  /** Event types that routines using this preset may be triggered by. `["*"]` means the preset accepts any event type. Routines assigned to this preset will be rejected at creation time if their trigger event is not in this list. */
@@ -939,17 +1042,17 @@ export const sandboxKeySchema = z.object({
939
1042
  /** When this key was created (ISO 8601). */
940
1043
  created_at: z.string().optional().describe("When this key was created (ISO 8601)."),
941
1044
  /** When this key expires and becomes invalid. `null` if the key does not expire. */
942
- expires_at: z.string().optional().describe("When this key expires and becomes invalid. `null` if the key does not expire."),
1045
+ expires_at: z.string().nullable().optional().describe("When this key expires and becomes invalid. `null` if the key does not expire."),
943
1046
  /** The complete secret key value, returned only once when the key is first created. `null` on subsequent retrievals. */
944
1047
  full_key: z.string().optional().describe("The complete secret key value, returned only once when the key is first created. `null` on subsequent retrievals."),
945
1048
  /** Sandbox key ID (`dsk_...`). */
946
1049
  id: z.string().describe("Sandbox key ID (`dsk_...`)."),
947
1050
  /** A short hint showing the last four characters of the key, used for identification. `null` if no hint is available. */
948
- key_hint: z.string().optional().describe("A short hint showing the last four characters of the key, used for identification. `null` if no hint is available."),
1051
+ key_hint: z.string().nullable().optional().describe("A short hint showing the last four characters of the key, used for identification. `null` if no hint is available."),
949
1052
  /** The full key value for `"publishable"` keys. `null` for `"secret"` keys; use `full_key` instead, which is returned only at creation time. */
950
- key_value: z.string().optional().describe("The full key value for `\"publishable\"` keys. `null` for `\"secret\"` keys; use `full_key` instead, which is returned only at creation time."),
1053
+ key_value: z.string().nullable().optional().describe("The full key value for `\"publishable\"` keys. `null` for `\"secret\"` keys; use `full_key` instead, which is returned only at creation time."),
951
1054
  /** When this key was last used to authenticate a request. `null` if the key has never been used. */
952
- last_used_at: z.string().optional().describe("When this key was last used to authenticate a request. `null` if the key has never been used."),
1055
+ last_used_at: z.string().nullable().optional().describe("When this key was last used to authenticate a request. `null` if the key has never been used."),
953
1056
  /** Current lifecycle status of the key. One of `"active"` (usable) or `"revoked"` (permanently disabled). */
954
1057
  status: z.string().describe("Current lifecycle status of the key. One of `\"active\"` (usable) or `\"revoked\"` (permanently disabled)."),
955
1058
  /** The kind of key. One of `"publishable"` (safe for client-side use) or `"secret"` (server-side only). */
@@ -960,7 +1063,7 @@ export const sandboxSchema = z.object({
960
1063
  /** When this sandbox was created (ISO 8601). */
961
1064
  created_at: z.string().optional().describe("When this sandbox was created (ISO 8601)."),
962
1065
  /** When an eval sandbox expires and becomes eligible for platform cleanup. `null` for ordinary developer sandboxes. */
963
- expires_at: z.string().optional().describe("When an eval sandbox expires and becomes eligible for platform cleanup. `null` for ordinary developer sandboxes."),
1066
+ expires_at: z.string().nullable().optional().describe("When an eval sandbox expires and becomes eligible for platform cleanup. `null` for ordinary developer sandboxes."),
964
1067
  /** Sandbox ID (`dsb_...`). */
965
1068
  id: z.string().describe("Sandbox ID (`dsb_...`)."),
966
1069
  /** API keys associated with this sandbox. `null` if keys were not loaded with this response. */
@@ -968,13 +1071,13 @@ export const sandboxSchema = z.object({
968
1071
  /** Human-readable display name for the sandbox. */
969
1072
  name: z.string().describe("Human-readable display name for the sandbox."),
970
1073
  /** Organization ID this sandbox is scoped to, or `null` for an app-level sandbox. */
971
- org: z.string().optional().describe("Organization ID this sandbox is scoped to, or `null` for an app-level sandbox."),
1074
+ org: z.string().nullable().optional().describe("Organization ID this sandbox is scoped to, or `null` for an app-level sandbox."),
972
1075
  /** Logo of the owning organization, when present. */
973
- org_logo: imageSourceSchema.optional().describe("Logo of the owning organization, when present."),
1076
+ org_logo: imageSourceSchema.nullable().optional().describe("Logo of the owning organization, when present."),
974
1077
  /** Display name of the owning organization, when org-scoped. */
975
- org_name: z.string().optional().describe("Display name of the owning organization, when org-scoped."),
1078
+ org_name: z.string().nullable().optional().describe("Display name of the owning organization, when org-scoped."),
976
1079
  /** Sandbox purpose marker. `"eval"` marks a remote-eval sandbox; `null` for ordinary developer sandboxes. */
977
- purpose: z.string().optional().describe("Sandbox purpose marker. `\"eval\"` marks a remote-eval sandbox; `null` for ordinary developer sandboxes."),
1080
+ purpose: z.string().nullable().optional().describe("Sandbox purpose marker. `\"eval\"` marks a remote-eval sandbox; `null` for ordinary developer sandboxes."),
978
1081
  /** URL-safe identifier for the sandbox, unique within the application (e.g. `"my-sandbox"`). */
979
1082
  slug: z.string().describe("URL-safe identifier for the sandbox, unique within the application (e.g. `\"my-sandbox\"`)."),
980
1083
  /** When this sandbox was last modified (ISO 8601). */
@@ -1052,8 +1155,8 @@ export const slackDeliveryOutcomeSchema = z.object({
1052
1155
  id: z.string().describe("Unique identifier for this delivery outcome."),
1053
1156
  /** ID of the platform message this attempt was carrying. Reading that message still requires access to its thread — this field correlates, it does not grant. */
1054
1157
  message: z.string().optional().describe("ID of the platform message this attempt was carrying. Reading that message still requires access to its thread — this field correlates, it does not grant."),
1055
- /** Whether the attempt posted a new Slack message or updated an existing one (replacing a thinking placeholder). */
1056
- operation: z.enum(["post", "update"]).describe("Whether the attempt posted a new Slack message or updated an existing one (replacing a thinking placeholder)."),
1158
+ /** Which Slack call the attempt made. `post` — a new message in the channel, visible to everyone in it. `post_ephemeral` — a message only one named channel member could see; Slack returns no durable timestamp for one, so it has no `thread_ts` to correlate and cannot be found in the channel's history afterwards. `update` — replacing an existing message (typically a thinking placeholder). */
1159
+ operation: z.enum(["post", "post_ephemeral", "update"]).describe("Which Slack call the attempt made. `post` — a new message in the channel, visible to everyone in it. `post_ephemeral` — a message only one named channel member could see; Slack returns no durable timestamp for one, so it has no `thread_ts` to correlate and cannot be found in the channel's history afterwards. `update` — replacing an existing message (typically a thinking placeholder)."),
1057
1160
  /** What happened to the send. `delivered` — Slack accepted the message. `floored` — a deterministic content guard withheld it, so it never left. `judge_refused` — the cross-org judge decided it was not appropriate for this channel's audience. `failed` — Slack rejected the call, or the content floor could not be evaluated and the send failed closed. */
1058
1161
  outcome: z.enum(["delivered", "floored", "judge_refused", "failed"]).describe("What happened to the send. `delivered` — Slack accepted the message. `floored` — a deterministic content guard withheld it, so it never left. `judge_refused` — the cross-org judge decided it was not appropriate for this channel's audience. `failed` — Slack rejected the call, or the content floor could not be evaluated and the send failed closed."),
1059
1162
  /** When the send was attempted. */
@@ -1076,18 +1179,18 @@ export const slackDeliveryOutcomeListResponseSchema = z.object({
1076
1179
  export const trajectorySchema = z.object({
1077
1180
  /** When the trajectory was recorded (ISO 8601). */
1078
1181
  created_at: z.string().optional().describe("When the trajectory was recorded (ISO 8601)."),
1079
- /** ID of the storage file that persists the raw trajectory data (`fil_...`). `null` if the trajectory has not been written to a file. */
1080
- file: z.string().optional().describe("ID of the storage file that persists the raw trajectory data (`fil_...`). `null` if the trajectory has not been written to a file."),
1182
+ /** ID of the storage file that persists the raw trajectory data (`fil_...`). */
1183
+ file: z.string().optional().describe("ID of the storage file that persists the raw trajectory data (`fil_...`)."),
1081
1184
  /** Trajectory ID (`trj_...`). */
1082
1185
  id: z.string().describe("Trajectory ID (`trj_...`)."),
1083
1186
  /** Serialized message log for this trajectory. Contains the ordered sequence of AI and tool messages produced during the session. */
1084
- messages: z.record(z.unknown()).optional().describe("Serialized message log for this trajectory. Contains the ordered sequence of AI and tool messages produced during the session."),
1187
+ messages: z.array(z.record(z.unknown())).optional().describe("Serialized message log for this trajectory. Contains the ordered sequence of AI and tool messages produced during the session."),
1085
1188
  /** ID of the organization this trajectory belongs to (`org_...`). `null` for trajectories outside an org context. */
1086
- org: z.string().optional().describe("ID of the organization this trajectory belongs to (`org_...`). `null` for trajectories outside an org context."),
1189
+ org: z.string().nullable().optional().describe("ID of the organization this trajectory belongs to (`org_...`). `null` for trajectories outside an org context."),
1087
1190
  /** ID of the developer sandbox this trajectory is scoped to (`sbx_...`). `null` for production trajectories. */
1088
- sandbox: z.string().optional().describe("ID of the developer sandbox this trajectory is scoped to (`sbx_...`). `null` for production trajectories."),
1191
+ sandbox: z.string().nullable().optional().describe("ID of the developer sandbox this trajectory is scoped to (`sbx_...`). `null` for production trajectories."),
1089
1192
  /** ID of the team this trajectory is scoped to (`team_...`). `null` for trajectories not associated with a team. */
1090
- team: z.string().optional().describe("ID of the team this trajectory is scoped to (`team_...`). `null` for trajectories not associated with a team."),
1193
+ team: z.string().nullable().optional().describe("ID of the team this trajectory is scoped to (`team_...`). `null` for trajectories not associated with a team."),
1091
1194
  /** When the trajectory record was last updated (ISO 8601). */
1092
1195
  updated_at: z.string().optional().describe("When the trajectory record was last updated (ISO 8601)."),
1093
1196
  }).describe("A recorded sequence of AI messages and tool interactions representing a single AI reasoning session. Trajectories are stored as structured message logs and can be replayed or inspected after execution.");
@@ -1187,18 +1290,18 @@ export const workingMemoryEntryListResponseSchema = z.object({
1187
1290
  /** Runtime validator for {@link SolutionAutomationInvokeContract}. */
1188
1291
  export const solutionAutomationInvokeContractSchema = z.object({
1189
1292
  /** JSON Schema validated against the whole invoke payload, from the automation's `input_schema_config`. `null` when none is configured. */
1190
- input_schema: z.record(z.unknown()).optional().describe("JSON Schema validated against the whole invoke payload, from the automation's `input_schema_config`. `null` when none is configured."),
1293
+ input_schema: z.record(z.unknown()).nullable().optional().describe("JSON Schema validated against the whole invoke payload, from the automation's `input_schema_config`. `null` when none is configured."),
1191
1294
  /** Named participant slots declared by the workflow, sorted by name. `null` when the workflow declares none. Values supplied under the top-level `participants` field are agent IDs. */
1192
- participants: z.array(automationParticipantSlotSchema).optional().describe("Named participant slots declared by the workflow, sorted by name. `null` when the workflow declares none. Values supplied under the top-level `participants` field are agent IDs."),
1295
+ participants: z.array(automationParticipantSlotSchema).nullable().optional().describe("Named participant slots declared by the workflow, sorted by name. `null` when the workflow declares none. Values supplied under the top-level `participants` field are agent IDs."),
1193
1296
  /** Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected. */
1194
1297
  prefills: automationPrefillsSchema.describe("Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected."),
1195
1298
  }).describe("The schema-driven values an installer may lock when provisioning an invoked automation template.");
1196
1299
  /** Runtime validator for {@link SolutionAutomationTemplateDetails}. */
1197
1300
  export const solutionAutomationTemplateDetailsSchema = z.object({
1198
- /** Automation execution type (`invoked`, `scheduled`, or `trigger`). */
1199
- automation_type: z.string().optional().describe("Automation execution type (`invoked`, `scheduled`, or `trigger`)."),
1200
- /** Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. */
1201
- invoke_contract: solutionAutomationInvokeContractSchema.optional().describe("Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning."),
1301
+ /** Automation execution type (`invoked`, `scheduled`, or `trigger`). `null` when the template body does not declare one. */
1302
+ automation_type: z.string().nullable().optional().describe("Automation execution type (`invoked`, `scheduled`, or `trigger`). `null` when the template body does not declare one."),
1303
+ /** Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. `null` for non-invoked automation types. */
1304
+ invoke_contract: solutionAutomationInvokeContractSchema.nullable().optional().describe("Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. `null` for non-invoked automation types."),
1202
1305
  /** Template-details discriminator. Always `automation` for this variant. */
1203
1306
  type: z.literal("automation").describe("Template-details discriminator. Always `automation` for this variant."),
1204
1307
  }).describe("AutomationTemplate-specific details exposed by a Solution template summary.");
@@ -1207,23 +1310,23 @@ export const solutionTemplateDetailsSchema = z.discriminatedUnion("type", [solut
1207
1310
  /** Runtime validator for {@link SolutionTemplateSummary}. */
1208
1311
  export const solutionTemplateSummarySchema = z.object({
1209
1312
  /** Short prose blurb from the template body's `description:` field. `null` when the body doesn't set one. Used as the card subhead in the Library carousel. */
1210
- description: z.string().optional().describe("Short prose blurb from the template body's `description:` field. `null` when the body doesn't set one. Used as the card subhead in the Library carousel."),
1313
+ description: z.string().nullable().optional().describe("Short prose blurb from the template body's `description:` field. `null` when the body doesn't set one. Used as the card subhead in the Library carousel."),
1211
1314
  /** Template-kind-specific details selected by the `type` discriminator. `null` when this template kind has no additional details. */
1212
- details: solutionTemplateDetailsSchema.optional().describe("Template-kind-specific details selected by the `type` discriminator. `null` when this template kind has no additional details."),
1315
+ details: solutionTemplateDetailsSchema.nullable().optional().describe("Template-kind-specific details selected by the `type` discriminator. `null` when this template kind has no additional details."),
1213
1316
  /** Human-facing label from the template body's `display_name:` field. `null` when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized `name`. */
1214
- display_name: z.string().optional().describe("Human-facing label from the template body's `display_name:` field. `null` when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized `name`."),
1317
+ display_name: z.string().nullable().optional().describe("Human-facing label from the template body's `display_name:` field. `null` when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized `name`."),
1215
1318
  /** Template config ID (`cfg_...`). `null` for inline-only templates. */
1216
- id: z.string().optional().describe("Template config ID (`cfg_...`). `null` for inline-only templates."),
1319
+ id: z.string().nullable().optional().describe("Template config ID (`cfg_...`). `null` for inline-only templates."),
1217
1320
  /** Template config kind, or `SolutionTemplateRef` / `SolutionTemplatePath` when unresolved. */
1218
1321
  kind: z.string().describe("Template config kind, or `SolutionTemplateRef` / `SolutionTemplatePath` when unresolved."),
1219
1322
  /** Lookup key stamped on the template config at import time. `null` when no lookup key was assigned. */
1220
- lookup_key: z.string().optional().describe("Lookup key stamped on the template config at import time. `null` when no lookup key was assigned."),
1323
+ lookup_key: z.string().nullable().optional().describe("Lookup key stamped on the template config at import time. `null` when no lookup key was assigned."),
1221
1324
  /** Canonical name from the template body. For `AgentTemplate` this doubles as the human-facing label; for `AgentToolTemplate` it's the LLM-facing tool function identifier (snake_case); for `AgentRoutineTemplate` it's the routine identifier (kebab-case). Clients rendering carousels should prefer `display_name` and fall back to humanizing `name`. */
1222
- name: z.string().optional().describe("Canonical name from the template body. For `AgentTemplate` this doubles as the human-facing label; for `AgentToolTemplate` it's the LLM-facing tool function identifier (snake_case); for `AgentRoutineTemplate` it's the routine identifier (kebab-case). Clients rendering carousels should prefer `display_name` and fall back to humanizing `name`."),
1325
+ name: z.string().nullable().optional().describe("Canonical name from the template body. For `AgentTemplate` this doubles as the human-facing label; for `AgentToolTemplate` it's the LLM-facing tool function identifier (snake_case); for `AgentRoutineTemplate` it's the routine identifier (kebab-case). Clients rendering carousels should prefer `display_name` and fall back to humanizing `name`."),
1223
1326
  /** Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. `null` when the Solution body's `templates[].readme_path` is unset for this entry. Token expires in 1 hour — refresh via `GET /api/v1/solutions/:solution`. */
1224
- readme_url: z.string().optional().describe("Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. `null` when the Solution body's `templates[].readme_path` is unset for this entry. Token expires in 1 hour — refresh via `GET /api/v1/solutions/:solution`."),
1327
+ readme_url: z.string().nullable().optional().describe("Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. `null` when the Solution body's `templates[].readme_path` is unset for this entry. Token expires in 1 hour — refresh via `GET /api/v1/solutions/:solution`."),
1225
1328
  /** Stable virtual path assigned to the template config. `null` when no virtual path was set. */
1226
- virtual_path: z.string().optional().describe("Stable virtual path assigned to the template config. `null` when no virtual path was set."),
1329
+ virtual_path: z.string().nullable().optional().describe("Stable virtual path assigned to the template config. `null` when no virtual path was set."),
1227
1330
  }).describe("Identity and display metadata for a single template bundled by a Solution, used to represent each wrapped or sibling template at template granularity.");
1228
1331
  /** Runtime validator for {@link SolutionSummary}. */
1229
1332
  export const solutionSummarySchema = z.object({
@@ -1232,47 +1335,47 @@ export const solutionSummarySchema = z.object({
1232
1335
  /** When the Solution config was first imported (ISO 8601). */
1233
1336
  created_at: z.string().optional().describe("When the Solution config was first imported (ISO 8601)."),
1234
1337
  /** Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. `null` when the Solution body does not set one. */
1235
- description: z.string().optional().describe("Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. `null` when the Solution body does not set one."),
1338
+ description: z.string().nullable().optional().describe("Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. `null` when the Solution body does not set one."),
1236
1339
  /** Custom analytics events declared in the Solution body's `events:` manifest — a map of event key (snake_case) to its definition (`label`, optional `description`, optional typed `fields`). Dashboards use the `label` as the event's display name. Present as an empty object when the body declares none. */
1237
1340
  events: z.record(z.unknown()).optional().describe("Custom analytics events declared in the Solution body's `events:` manifest — a map of event key (snake_case) to its definition (`label`, optional `description`, optional typed `fields`). Dashboards use the `label` as the event's display name. Present as an empty object when the body declares none."),
1238
1341
  /** Solution config ID (`cfg_...`). */
1239
1342
  id: z.string().describe("Solution config ID (`cfg_...`)."),
1240
1343
  /** Absolute URL of the Solution's cover image — the bundled asset the body's `image:` field names. A stable, non-expiring capability URL (like `org_logo.url`), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. `null` when the Solution has no cover image, and always `null` for org-scoped rows — the permanent URL is minted for system-scope (catalog) Solutions only. */
1241
- image_url: z.string().optional().describe("Absolute URL of the Solution's cover image — the bundled asset the body's `image:` field names. A stable, non-expiring capability URL (like `org_logo.url`), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. `null` when the Solution has no cover image, and always `null` for org-scoped rows — the permanent URL is minted for system-scope (catalog) Solutions only."),
1344
+ image_url: z.string().nullable().optional().describe("Absolute URL of the Solution's cover image — the bundled asset the body's `image:` field names. A stable, non-expiring capability URL (like `org_logo.url`), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. `null` when the Solution has no cover image, and always `null` for org-scoped rows — the permanent URL is minted for system-scope (catalog) Solutions only."),
1242
1345
  /** Resource type. Always `"Solution"`. */
1243
1346
  kind: z.string().describe("Resource type. Always `\"Solution\"`."),
1244
1347
  /** When `upgrade_available` is `true`, the system-scope Solution config ID (`cfg_...`) that should be used as the upgrade source. `null` otherwise. */
1245
- latest_solution: z.string().optional().describe("When `upgrade_available` is `true`, the system-scope Solution config ID (`cfg_...`) that should be used as the upgrade source. `null` otherwise."),
1348
+ latest_solution: z.string().nullable().optional().describe("When `upgrade_available` is `true`, the system-scope Solution config ID (`cfg_...`) that should be used as the upgrade source. `null` otherwise."),
1246
1349
  /** When `upgrade_available` is `true`, the higher system-scope `solution_version` available to upgrade to. `null` otherwise. */
1247
- latest_version: z.string().optional().describe("When `upgrade_available` is `true`, the higher system-scope `solution_version` available to upgrade to. `null` otherwise."),
1350
+ latest_version: z.string().nullable().optional().describe("When `upgrade_available` is `true`, the higher system-scope `solution_version` available to upgrade to. `null` otherwise."),
1248
1351
  /** The lookup key stored on the Solution config, if one was assigned during import. `null` when no lookup key was set. */
1249
- lookup_key: z.string().optional().describe("The lookup key stored on the Solution config, if one was assigned during import. `null` when no lookup key was set."),
1352
+ lookup_key: z.string().nullable().optional().describe("The lookup key stored on the Solution config, if one was assigned during import. `null` when no lookup key was set."),
1250
1353
  /** Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none. */
1251
1354
  metadata: z.record(z.unknown()).optional().describe("Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none."),
1252
1355
  /** Human-facing display name declared in the Solution body. `null` when the Solution body does not set one. */
1253
- name: z.string().optional().describe("Human-facing display name declared in the Solution body. `null` when the Solution body does not set one."),
1356
+ name: z.string().nullable().optional().describe("Human-facing display name declared in the Solution body. `null` when the Solution body does not set one."),
1254
1357
  /** Organization ID (`org_...`) that owns this Solution config, when the Solution is scoped to a specific org. `null` for system-scope (app-level) Solutions. */
1255
- org: z.string().optional().describe("Organization ID (`org_...`) that owns this Solution config, when the Solution is scoped to a specific org. `null` for system-scope (app-level) Solutions."),
1358
+ org: z.string().nullable().optional().describe("Organization ID (`org_...`) that owns this Solution config, when the Solution is scoped to a specific org. `null` for system-scope (app-level) Solutions."),
1256
1359
  /** Canonical image-source object for the resolved `org`'s logo, used as the principal category section glyph. The `url` is a stable, non-expiring capability URL (`refresh_url` is `null` — there is nothing to refresh). `null` when `org_slug` is `null` or the org has no logo. */
1257
- org_logo: imageSourceSchema.optional().describe("Canonical image-source object for the resolved `org`'s logo, used as the principal category section glyph. The `url` is a stable, non-expiring capability URL (`refresh_url` is `null` — there is nothing to refresh). `null` when `org_slug` is `null` or the org has no logo."),
1360
+ org_logo: imageSourceSchema.nullable().optional().describe("Canonical image-source object for the resolved `org`'s logo, used as the principal category section glyph. The `url` is a stable, non-expiring capability URL (`refresh_url` is `null` — there is nothing to refresh). `null` when `org_slug` is `null` or the org has no logo."),
1258
1361
  /** Display name of the resolved `org`. Pairs with `org_slug` as the principal catalog category's label. `null` when `org_slug` is `null`. */
1259
- org_name: z.string().optional().describe("Display name of the resolved `org`. Pairs with `org_slug` as the principal catalog category's label. `null` when `org_slug` is `null`."),
1362
+ org_name: z.string().nullable().optional().describe("Display name of the resolved `org`. Pairs with `org_slug` as the principal catalog category's label. `null` when `org_slug` is `null`."),
1260
1363
  /** Resolved slug of the Solution body's `org` (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key — clients group the Solution under this org ahead of `category_keys`. `null` when the body has no `org` or it doesn't resolve. */
1261
- org_slug: z.string().optional().describe("Resolved slug of the Solution body's `org` (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key — clients group the Solution under this org ahead of `category_keys`. `null` when the body has no `org` or it doesn't resolve."),
1364
+ org_slug: z.string().nullable().optional().describe("Resolved slug of the Solution body's `org` (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key — clients group the Solution under this org ahead of `category_keys`. `null` when the body has no `org` or it doesn't resolve."),
1262
1365
  /** Owner scopes this Solution appears under. Members: `"system"` (app-level system scope) and/or `"org"` (viewer's org scope). */
1263
1366
  owners: z.array(z.string()).describe("Owner scopes this Solution appears under. Members: `\"system\"` (app-level system scope) and/or `\"org\"` (viewer's org scope)."),
1264
1367
  /** Relative path to the public README endpoint with a signed token already embedded. `null` when the Solution has no README. Token expires in 1 hour — refresh via `GET /api/v1/solutions/:solution`. */
1265
- readme_url: z.string().optional().describe("Relative path to the public README endpoint with a signed token already embedded. `null` when the Solution has no README. Token expires in 1 hour — refresh via `GET /api/v1/solutions/:solution`."),
1368
+ readme_url: z.string().nullable().optional().describe("Relative path to the public README endpoint with a signed token already embedded. `null` when the Solution has no README. Token expires in 1 hour — refresh via `GET /api/v1/solutions/:solution`."),
1266
1369
  /** Absolute URLs of the Solution's gallery screenshots — the bundled assets the body's `screenshots:` field names, in declared order. Each is a stable, non-expiring capability URL with the same cacheability contract as `image_url` (one shared token, a `v` cache key, and a `file` param selecting the screenshot); a URL 404s if the Solution stops declaring its screenshot. An empty array when the Solution declares none, and always empty for org-scoped rows — the permanent URLs are minted for system-scope (catalog) Solutions only. */
1267
1370
  screenshot_urls: z.array(z.string()).optional().describe("Absolute URLs of the Solution's gallery screenshots — the bundled assets the body's `screenshots:` field names, in declared order. Each is a stable, non-expiring capability URL with the same cacheability contract as `image_url` (one shared token, a `v` cache key, and a `file` param selecting the screenshot); a URL 404s if the Solution stops declaring its screenshot. An empty array when the Solution declares none, and always empty for org-scoped rows — the permanent URLs are minted for system-scope (catalog) Solutions only."),
1268
1371
  /** Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. `null` when the body omits it. */
1269
- solution_id: z.string().optional().describe("Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. `null` when the body omits it."),
1372
+ solution_id: z.string().nullable().optional().describe("Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. `null` when the body omits it."),
1270
1373
  /** Semver string declared in the Solution body (e.g. `"1.2.0"`). `null` when the body does not declare a version. */
1271
- solution_version: z.string().optional().describe("Semver string declared in the Solution body (e.g. `\"1.2.0\"`). `null` when the body does not declare a version."),
1374
+ solution_version: z.string().nullable().optional().describe("Semver string declared in the Solution body (e.g. `\"1.2.0\"`). `null` when the body does not declare a version."),
1272
1375
  /** Freeform tag keys declared in the Solution body. An empty array when the body declares none. */
1273
1376
  tag_keys: z.array(z.string()).optional().describe("Freeform tag keys declared in the Solution body. An empty array when the body declares none."),
1274
1377
  /** Wrapped template kind — `"AgentTemplate"`, `"AutomationTemplate"`, `"AgentRoutineTemplate"`, `"AgentToolTemplate"`, `"AgentComputerTemplate"`, or `"SolutionTemplateRef"` for ref-mode bundles. */
1275
- template_kind: z.string().optional().describe("Wrapped template kind — `\"AgentTemplate\"`, `\"AutomationTemplate\"`, `\"AgentRoutineTemplate\"`, `\"AgentToolTemplate\"`, `\"AgentComputerTemplate\"`, or `\"SolutionTemplateRef\"` for ref-mode bundles."),
1378
+ template_kind: z.string().nullable().optional().describe("Wrapped template kind — `\"AgentTemplate\"`, `\"AutomationTemplate\"`, `\"AgentRoutineTemplate\"`, `\"AgentToolTemplate\"`, `\"AgentComputerTemplate\"`, or `\"SolutionTemplateRef\"` for ref-mode bundles."),
1276
1379
  /** Template configs bundled by this Solution, in declaration order — the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references. */
1277
1380
  templates: z.array(solutionTemplateSummarySchema).describe("Template configs bundled by this Solution, in declaration order — the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references."),
1278
1381
  /** When the Solution config was last modified (ISO 8601). */
@@ -1280,7 +1383,7 @@ export const solutionSummarySchema = z.object({
1280
1383
  /** `true` when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher `solution_version`. Always `false` for system-only rows. */
1281
1384
  upgrade_available: z.boolean().describe("`true` when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher `solution_version`. Always `false` for system-only rows."),
1282
1385
  /** The stable virtual path assigned to this Solution config, used as the deduplication key when the same Solution appears under multiple owner scopes. `null` when unset. */
1283
- virtual_path: z.string().optional().describe("The stable virtual path assigned to this Solution config, used as the deduplication key when the same Solution appears under multiple owner scopes. `null` when unset."),
1386
+ virtual_path: z.string().nullable().optional().describe("The stable virtual path assigned to this Solution config, used as the deduplication key when the same Solution appears under multiple owner scopes. `null` when unset."),
1284
1387
  }).describe("A catalog entry for an imported Solution, including its display metadata, bundled templates, owner scopes, and any available upgrade information.");
1285
1388
  /** Runtime validator for {@link AgentSourceSolution}. */
1286
1389
  export const agentSourceSolutionSchema = z.object({
@@ -1294,49 +1397,49 @@ export const agentSourceSolutionSchema = z.object({
1294
1397
  /** Runtime validator for {@link Agent}. */
1295
1398
  export const agentSchema = z.object({
1296
1399
  /** Access control list for the agent. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions`. `null` when no ACL restrictions are applied and the agent is accessible to all members of its scope. */
1297
- acl: aclSchema.optional().describe("Access control list for the agent. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions`. `null` when no ACL restrictions are applied and the agent is accessible to all members of its scope."),
1400
+ acl: aclSchema.nullable().optional().describe("Access control list for the agent. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions`. `null` when no ACL restrictions are applied and the agent is accessible to all members of its scope."),
1298
1401
  /** ID of the application that owns this agent (`dap_...`). */
1299
1402
  app: z.string().optional().describe("ID of the application that owns this agent (`dap_...`)."),
1300
1403
  /** When the agent was created (ISO 8601). */
1301
1404
  created_at: z.string().optional().describe("When the agent was created (ISO 8601)."),
1302
1405
  /** Default LLM model identifier used by this agent when no model is specified at runtime (e.g. `"claude-3-7-sonnet-latest"`). */
1303
- default_model: z.string().optional().describe("Default LLM model identifier used by this agent when no model is specified at runtime (e.g. `\"claude-3-7-sonnet-latest\"`)."),
1406
+ default_model: z.string().nullable().optional().describe("Default LLM model identifier used by this agent when no model is specified at runtime (e.g. `\"claude-3-7-sonnet-latest\"`)."),
1304
1407
  /** Human-readable description of what the agent does. `null` if not set. */
1305
- description: z.string().optional().describe("Human-readable description of what the agent does. `null` if not set."),
1408
+ description: z.string().nullable().optional().describe("Human-readable description of what the agent does. `null` if not set."),
1306
1409
  /** Email address provisioned for this agent. `null` if email delivery is not configured. */
1307
- email: z.string().optional().describe("Email address provisioned for this agent. `null` if email delivery is not configured."),
1410
+ email: z.string().nullable().optional().describe("Email address provisioned for this agent. `null` if email delivery is not configured."),
1308
1411
  /** Agent ID (`agi_...`). */
1309
1412
  id: z.string().describe("Agent ID (`agi_...`)."),
1310
1413
  /** System-level identity prompt that shapes the agent's persona and behavior. */
1311
- identity: z.string().optional().describe("System-level identity prompt that shapes the agent's persona and behavior."),
1414
+ identity: z.string().nullable().optional().describe("System-level identity prompt that shapes the agent's persona and behavior."),
1312
1415
  /** ID of the AgentTemplate config (`cfg_...`) this agent was last provisioned or updated from. `null` for manually created agents. */
1313
- last_applied_template_config: z.string().optional().describe("ID of the AgentTemplate config (`cfg_...`) this agent was last provisioned or updated from. `null` for manually created agents."),
1416
+ last_applied_template_config: z.string().nullable().optional().describe("ID of the AgentTemplate config (`cfg_...`) this agent was last provisioned or updated from. `null` for manually created agents."),
1314
1417
  /** Stable, user-defined identifier for this agent within the application. Unique per app. */
1315
- lookup_key: z.string().optional().describe("Stable, user-defined identifier for this agent within the application. Unique per app."),
1418
+ lookup_key: z.string().nullable().optional().describe("Stable, user-defined identifier for this agent within the application. Unique per app."),
1316
1419
  /** Arbitrary key-value metadata attached to the agent. Not interpreted by the platform. */
1317
1420
  metadata: z.record(z.unknown()).optional().describe("Arbitrary key-value metadata attached to the agent. Not interpreted by the platform."),
1318
1421
  /** Human-readable display name for the agent. `null` if not set. */
1319
1422
  name: z.string().optional().describe("Human-readable display name for the agent. `null` if not set."),
1320
1423
  /** ID of the organization this agent belongs to (`org_...`). `null` if the agent is not org-scoped. */
1321
- org: z.string().optional().describe("ID of the organization this agent belongs to (`org_...`). `null` if the agent is not org-scoped."),
1424
+ org: z.string().nullable().optional().describe("ID of the organization this agent belongs to (`org_...`). `null` if the agent is not org-scoped."),
1322
1425
  /** Display name of the organization this agent belongs to. `null` when the agent is not org-scoped or when the org association was not preloaded. */
1323
- org_name: z.string().optional().describe("Display name of the organization this agent belongs to. `null` when the agent is not org-scoped or when the org association was not preloaded."),
1426
+ org_name: z.string().nullable().optional().describe("Display name of the organization this agent belongs to. `null` when the agent is not org-scoped or when the org association was not preloaded."),
1324
1427
  /** Free-form label identifying the source or author that created this agent (e.g. a username or pipeline name). */
1325
- originator: z.string().optional().describe("Free-form label identifying the source or author that created this agent (e.g. a username or pipeline name)."),
1428
+ originator: z.string().nullable().optional().describe("Free-form label identifying the source or author that created this agent (e.g. a username or pipeline name)."),
1326
1429
  /** Phone number provisioned for this agent. `null` if SMS is not configured. */
1327
- phone_number: z.string().optional().describe("Phone number provisioned for this agent. `null` if SMS is not configured."),
1430
+ phone_number: z.string().nullable().optional().describe("Phone number provisioned for this agent. `null` if SMS is not configured."),
1328
1431
  /** ID of the sandbox environment this agent is scoped to (`dsb_...`). `null` in production deployments. */
1329
- sandbox: z.string().optional().describe("ID of the sandbox environment this agent is scoped to (`dsb_...`). `null` in production deployments."),
1432
+ sandbox: z.string().nullable().optional().describe("ID of the sandbox environment this agent is scoped to (`dsb_...`). `null` in production deployments."),
1330
1433
  /** Source Solution and AgentTemplate summary for agents provisioned from a Solution. Includes `upgrade_available`, `latest_version`, and `latest_solution` so you can render an upgrade badge without a separate dry-run call. `null` for hand-built agents and agents whose tracked template or parent Solution has been deleted. Populated only on single-agent GET responses, never on list endpoints. */
1331
- source_solution: agentSourceSolutionSchema.optional().describe("Source Solution and AgentTemplate summary for agents provisioned from a Solution. Includes `upgrade_available`, `latest_version`, and `latest_solution` so you can render an upgrade badge without a separate dry-run call. `null` for hand-built agents and agents whose tracked template or parent Solution has been deleted. Populated only on single-agent GET responses, never on list endpoints."),
1434
+ source_solution: agentSourceSolutionSchema.nullable().optional().describe("Source Solution and AgentTemplate summary for agents provisioned from a Solution. Includes `upgrade_available`, `latest_version`, and `latest_solution` so you can render an upgrade badge without a separate dry-run call. `null` for hand-built agents and agents whose tracked template or parent Solution has been deleted. Populated only on single-agent GET responses, never on list endpoints."),
1332
1435
  /** ID of the team that owns this agent (`tem_...`). `null` if the agent is not team-scoped. */
1333
- team: z.string().optional().describe("ID of the team that owns this agent (`tem_...`). `null` if the agent is not team-scoped."),
1436
+ team: z.string().nullable().optional().describe("ID of the team that owns this agent (`tem_...`). `null` if the agent is not team-scoped."),
1334
1437
  /** True when the agent's last-applied template version is behind the current version of its AgentTemplate config — i.e. reapplying the template (a per-agent upgrade) would bring it newer Solution content. Self-clears once the agent is reapplied. Computed on both the list endpoints and single-agent GET. Distinct from `source_solution.upgrade_available`, which compares Solution *versions*: an agent can lag its template (`template_upgrade_available: true`) while the org already holds the latest Solution version (`upgrade_available: false`). */
1335
- template_upgrade_available: z.boolean().optional().describe("True when the agent's last-applied template version is behind the current version of its AgentTemplate config — i.e. reapplying the template (a per-agent upgrade) would bring it newer Solution content. Self-clears once the agent is reapplied. Computed on both the list endpoints and single-agent GET. Distinct from `source_solution.upgrade_available`, which compares Solution *versions*: an agent can lag its template (`template_upgrade_available: true`) while the org already holds the latest Solution version (`upgrade_available: false`)."),
1438
+ template_upgrade_available: z.boolean().nullable().optional().describe("True when the agent's last-applied template version is behind the current version of its AgentTemplate config — i.e. reapplying the template (a per-agent upgrade) would bring it newer Solution content. Self-clears once the agent is reapplied. Computed on both the list endpoints and single-agent GET. Distinct from `source_solution.upgrade_available`, which compares Solution *versions*: an agent can lag its template (`template_upgrade_available: true`) while the org already holds the latest Solution version (`upgrade_available: false`)."),
1336
1439
  /** When the agent was last modified (ISO 8601). */
1337
1440
  updated_at: z.string().optional().describe("When the agent was last modified (ISO 8601)."),
1338
1441
  /** ID of the user that owns this agent (`usr_...`). `null` if the agent is not user-scoped. */
1339
- user: z.string().optional().describe("ID of the user that owns this agent (`usr_...`). `null` if the agent is not user-scoped."),
1442
+ user: z.string().nullable().optional().describe("ID of the user that owns this agent (`usr_...`). `null` if the agent is not user-scoped."),
1340
1443
  }).describe("An AI agent that can be configured with tools, routines, and skills, and invoked to handle conversations or tasks.");
1341
1444
  /** Runtime validator for {@link AgentComputer}. */
1342
1445
  export const agentComputerSchema = z.object({
@@ -1379,41 +1482,41 @@ export const agentComputerListResponseSchema = z.object({
1379
1482
  /** Runtime validator for {@link AgentCreateResponse}. */
1380
1483
  export const agentCreateResponseSchema = z.object({
1381
1484
  /** Access control list governing who can interact with this agent. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions`. `null` when no ACL restrictions are applied. */
1382
- acl: aclSchema.optional().describe("Access control list governing who can interact with this agent. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions`. `null` when no ACL restrictions are applied."),
1485
+ acl: aclSchema.nullable().optional().describe("Access control list governing who can interact with this agent. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions`. `null` when no ACL restrictions are applied."),
1383
1486
  /** ID of the app this agent belongs to (`dap_...`). */
1384
1487
  app: z.string().optional().describe("ID of the app this agent belongs to (`dap_...`)."),
1385
1488
  /** When the agent was created (ISO 8601). */
1386
1489
  created_at: z.string().optional().describe("When the agent was created (ISO 8601)."),
1387
1490
  /** Default AI model the agent uses when no model is specified at runtime, e.g. `"claude-3-5-sonnet-20241022"`. `null` if not configured. */
1388
- default_model: z.string().optional().describe("Default AI model the agent uses when no model is specified at runtime, e.g. `\"claude-3-5-sonnet-20241022\"`. `null` if not configured."),
1491
+ default_model: z.string().nullable().optional().describe("Default AI model the agent uses when no model is specified at runtime, e.g. `\"claude-3-5-sonnet-20241022\"`. `null` if not configured."),
1389
1492
  /** Email address assigned to this agent for inbound email handling. `null` if not configured. */
1390
- email: z.string().optional().describe("Email address assigned to this agent for inbound email handling. `null` if not configured."),
1493
+ email: z.string().nullable().optional().describe("Email address assigned to this agent for inbound email handling. `null` if not configured."),
1391
1494
  /** Agent ID (`agi_...`). */
1392
1495
  id: z.string().describe("Agent ID (`agi_...`)."),
1393
1496
  /** System prompt or persona description that shapes the agent's behavior. `null` if not set. */
1394
- identity: z.string().optional().describe("System prompt or persona description that shapes the agent's behavior. `null` if not set."),
1497
+ identity: z.string().nullable().optional().describe("System prompt or persona description that shapes the agent's behavior. `null` if not set."),
1395
1498
  /** List of config records created as part of this request's `template_bundle` install. One entry per persisted config, sorted by `key`. Omitted entirely when the request did not include a `template_bundle`. */
1396
1499
  installed_configs: z.array(installedConfigEntrySchema).optional().describe("List of config records created as part of this request's `template_bundle` install. One entry per persisted config, sorted by `key`. Omitted entirely when the request did not include a `template_bundle`."),
1397
1500
  /** Unique, stable identifier for the agent within its app. `null` if not set. */
1398
- lookup_key: z.string().optional().describe("Unique, stable identifier for the agent within its app. `null` if not set."),
1501
+ lookup_key: z.string().nullable().optional().describe("Unique, stable identifier for the agent within its app. `null` if not set."),
1399
1502
  /** Arbitrary key-value metadata attached to the agent. `null` if none was provided. */
1400
1503
  metadata: z.record(z.unknown()).optional().describe("Arbitrary key-value metadata attached to the agent. `null` if none was provided."),
1401
1504
  /** Human-readable display name for the agent. `null` if not set. */
1402
1505
  name: z.string().optional().describe("Human-readable display name for the agent. `null` if not set."),
1403
1506
  /** ID of the organization this agent belongs to (`org_...`). `null` for agents outside an org. */
1404
- org: z.string().optional().describe("ID of the organization this agent belongs to (`org_...`). `null` for agents outside an org."),
1507
+ org: z.string().nullable().optional().describe("ID of the organization this agent belongs to (`org_...`). `null` for agents outside an org."),
1405
1508
  /** Free-form label identifying the source or author of the agent, e.g. a username or service name. `null` if not set. */
1406
- originator: z.string().optional().describe("Free-form label identifying the source or author of the agent, e.g. a username or service name. `null` if not set."),
1509
+ originator: z.string().nullable().optional().describe("Free-form label identifying the source or author of the agent, e.g. a username or service name. `null` if not set."),
1407
1510
  /** Phone number assigned to this agent for inbound SMS or voice handling. `null` if not configured. */
1408
- phone_number: z.string().optional().describe("Phone number assigned to this agent for inbound SMS or voice handling. `null` if not configured."),
1511
+ phone_number: z.string().nullable().optional().describe("Phone number assigned to this agent for inbound SMS or voice handling. `null` if not configured."),
1409
1512
  /** ID of the sandbox environment this agent is scoped to (`sbx_...`). `null` for agents not scoped to a sandbox. */
1410
- sandbox: z.string().optional().describe("ID of the sandbox environment this agent is scoped to (`sbx_...`). `null` for agents not scoped to a sandbox."),
1513
+ sandbox: z.string().nullable().optional().describe("ID of the sandbox environment this agent is scoped to (`sbx_...`). `null` for agents not scoped to a sandbox."),
1411
1514
  /** ID of the team that owns this agent (`tea_...`). `null` if owned by a user rather than a team. */
1412
- team: z.string().optional().describe("ID of the team that owns this agent (`tea_...`). `null` if owned by a user rather than a team."),
1515
+ team: z.string().nullable().optional().describe("ID of the team that owns this agent (`tea_...`). `null` if owned by a user rather than a team."),
1413
1516
  /** When the agent record was last modified (ISO 8601). */
1414
1517
  updated_at: z.string().optional().describe("When the agent record was last modified (ISO 8601)."),
1415
1518
  /** ID of the user that owns this agent (`usr_...`). `null` if owned by a team. */
1416
- user: z.string().optional().describe("ID of the user that owns this agent (`usr_...`). `null` if owned by a team."),
1519
+ user: z.string().nullable().optional().describe("ID of the user that owns this agent (`usr_...`). `null` if owned by a team."),
1417
1520
  }).describe("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.");
1418
1521
  /** Runtime validator for {@link AgentEnvVarMasked}. */
1419
1522
  export const agentEnvVarMaskedSchema = z.object({
@@ -1958,15 +2061,15 @@ export const solutionImportWarningSchema = z.object({
1958
2061
  /** Runtime validator for {@link SolutionImportResult}. */
1959
2062
  export const solutionImportResultSchema = z.object({
1960
2063
  /** Machine-readable conflict code present when `status` is `"conflict"`, identifying the specific conflict reason. `null` when `status` is `"ready"`. */
1961
- code: z.string().optional().describe("Machine-readable conflict code present when `status` is `\"conflict\"`, identifying the specific conflict reason. `null` when `status` is `\"ready\"`."),
2064
+ code: z.string().nullable().optional().describe("Machine-readable conflict code present when `status` is `\"conflict\"`, identifying the specific conflict reason. `null` when `status` is `\"ready\"`."),
1962
2065
  /** Whether this result was produced by a dry-run check. `true` when the import was validated without persisting any changes. */
1963
2066
  dry_run: z.boolean().describe("Whether this result was produced by a dry-run check. `true` when the import was validated without persisting any changes."),
1964
2067
  /** Semver string of the Solution version already present in the library. `null` when no prior version exists. */
1965
- existing_solution_version: z.string().optional().describe("Semver string of the Solution version already present in the library. `null` when no prior version exists."),
2068
+ existing_solution_version: z.string().nullable().optional().describe("Semver string of the Solution version already present in the library. `null` when no prior version exists."),
1966
2069
  /** Semver string of the Solution version in the bundle being imported. `null` when the bundle does not declare a version. */
1967
- incoming_solution_version: z.string().optional().describe("Semver string of the Solution version in the bundle being imported. `null` when the bundle does not declare a version."),
2070
+ incoming_solution_version: z.string().nullable().optional().describe("Semver string of the Solution version in the bundle being imported. `null` when the bundle does not declare a version."),
1968
2071
  /** Human-readable description of the import status or conflict reason, suitable for display in a confirmation dialog. `null` when no detail is available. */
1969
- message: z.string().optional().describe("Human-readable description of the import status or conflict reason, suitable for display in a confirmation dialog. `null` when no detail is available."),
2072
+ message: z.string().nullable().optional().describe("Human-readable description of the import status or conflict reason, suitable for display in a confirmation dialog. `null` when no detail is available."),
1970
2073
  /** Outcome of the import check. `"ready"` means the import can proceed as a normal create or update. `"conflict"` means a version conflict was detected and the upgrade flow must be used instead. */
1971
2074
  status: z.string().describe("Outcome of the import check. `\"ready\"` means the import can proceed as a normal create or update. `\"conflict\"` means a version conflict was detected and the upgrade flow must be used instead."),
1972
2075
  /** Whether the caller must invoke the dedicated upgrade flow to complete the import. Mirrors `status == "conflict"` as a convenience boolean. */
@@ -1987,13 +2090,13 @@ export const solutionImportResponseSchema = z.object({
1987
2090
  /** Resource type. Always `"Solution"`. */
1988
2091
  kind: z.string().describe("Resource type. Always `\"Solution\"`."),
1989
2092
  /** The `lookup_key` stored on the Solution config after the import's suffix normalization. `null` when the Solution was not given a lookup key. */
1990
- lookup_key: z.string().optional().describe("The `lookup_key` stored on the Solution config after the import's suffix normalization. `null` when the Solution was not given a lookup key."),
2093
+ lookup_key: z.string().nullable().optional().describe("The `lookup_key` stored on the Solution config after the import's suffix normalization. `null` when the Solution was not given a lookup key."),
1991
2094
  /** Full summary of the imported Solution, in the same shape as the individual Solution retrieval endpoint. */
1992
2095
  solution: solutionSummarySchema.describe("Full summary of the imported Solution, in the same shape as the individual Solution retrieval endpoint."),
1993
2096
  /** When the Solution config record was last modified (ISO 8601). */
1994
2097
  updated_at: z.string().optional().describe("When the Solution config record was last modified (ISO 8601)."),
1995
2098
  /** The `virtual_path` stored on the Solution config, used as the stable dedupe key across owner scopes. `null` when no virtual path was assigned. */
1996
- virtual_path: z.string().optional().describe("The `virtual_path` stored on the Solution config, used as the stable dedupe key across owner scopes. `null` when no virtual path was assigned."),
2099
+ virtual_path: z.string().nullable().optional().describe("The `virtual_path` stored on the Solution config, used as the stable dedupe key across owner scopes. `null` when no virtual path was assigned."),
1997
2100
  }).describe("The result of importing a Solution bundle into the library, including the Solution config record, a structured import result, and the list of all configs persisted during the transaction.");
1998
2101
  /** Runtime validator for {@link SolutionInstallResponseWebhook}. */
1999
2102
  export const solutionInstallResponseWebhookSchema = z.object({
@@ -2007,7 +2110,7 @@ export const solutionInstallResponseSchema = z.object({
2007
2110
  /** Type of the provisioned resource. One of `"Agent"`, `"Automation"`, `"AgentRoutine"`, `"AgentTool"`, `"AgentSkill"`, or `"AgentComputer"`. */
2008
2111
  kind: z.string().describe("Type of the provisioned resource. One of `\"Agent\"`, `\"Automation\"`, `\"AgentRoutine\"`, `\"AgentTool\"`, `\"AgentSkill\"`, or `\"AgentComputer\"`."),
2009
2112
  /** The `lookup_key` stamped on the provisioned resource. `null` for `AgentSkill`, which is a join record and does not carry a lookup key. */
2010
- lookup_key: z.string().optional().describe("The `lookup_key` stamped on the provisioned resource. `null` for `AgentSkill`, which is a join record and does not carry a lookup key."),
2113
+ lookup_key: z.string().nullable().optional().describe("The `lookup_key` stamped on the provisioned resource. `null` for `AgentSkill`, which is a join record and does not carry a lookup key."),
2011
2114
  /** Solution config ID (`cfg_...`) that was used as the source for this install. */
2012
2115
  solution: z.string().describe("Solution config ID (`cfg_...`) that was used as the source for this install."),
2013
2116
  /** One-time connection details for a webhook-auth Automation install. */
@@ -2016,25 +2119,25 @@ export const solutionInstallResponseSchema = z.object({
2016
2119
  /** Runtime validator for {@link SolutionInstance}. */
2017
2120
  export const solutionInstanceSchema = z.object({
2018
2121
  /** Materialized agent for this customer (`agi_...`). `null` for a row without an agent. */
2019
- agent: z.string().optional().describe("Materialized agent for this customer (`agi_...`). `null` for a row without an agent."),
2122
+ agent: z.string().nullable().optional().describe("Materialized agent for this customer (`agi_...`). `null` for a row without an agent."),
2020
2123
  /** Human-readable display name of the materialized agent. `null` when no agent is visible. */
2021
- agent_name: z.string().optional().describe("Human-readable display name of the materialized agent. `null` when no agent is visible."),
2124
+ agent_name: z.string().nullable().optional().describe("Human-readable display name of the materialized agent. `null` when no agent is visible."),
2022
2125
  /** Opaque tagged reference to the deployment target. Consumers interpret its kind. */
2023
- attachment_ref: z.record(z.unknown()).optional().describe("Opaque tagged reference to the deployment target. Consumers interpret its kind."),
2126
+ attachment_ref: z.record(z.unknown()).nullable().optional().describe("Opaque tagged reference to the deployment target. Consumers interpret its kind."),
2024
2127
  /** When this instance was stamped. */
2025
2128
  created_at: z.string().describe("When this instance was stamped."),
2026
2129
  /** Stable vendor-defined key for the customer. */
2027
2130
  customer_key: z.string().describe("Stable vendor-defined key for the customer."),
2028
2131
  /** Human-readable customer label. `null` when the vendor did not provide one. */
2029
- customer_label: z.string().optional().describe("Human-readable customer label. `null` when the vendor did not provide one."),
2132
+ customer_label: z.string().nullable().optional().describe("Human-readable customer label. `null` when the vendor did not provide one."),
2030
2133
  /** Solution instance ID (`sli_...`). */
2031
2134
  id: z.string().describe("Solution instance ID (`sli_...`)."),
2032
2135
  /** Count of local agent edits relative to the pinned template. `null` when unavailable. */
2033
- local_edit_count: z.number().int().optional().describe("Count of local agent edits relative to the pinned template. `null` when unavailable."),
2136
+ local_edit_count: z.number().int().nullable().optional().describe("Count of local agent edits relative to the pinned template. `null` when unavailable."),
2034
2137
  /** Pinned template version record (`cfv_...`). `null` when no version is pinned. */
2035
- pinned_template_version: z.string().optional().describe("Pinned template version record (`cfv_...`). `null` when no version is pinned."),
2138
+ pinned_template_version: z.string().nullable().optional().describe("Pinned template version record (`cfv_...`). `null` when no version is pinned."),
2036
2139
  /** Human-readable version number of the pinned template. `null` when unavailable. */
2037
- pinned_version_number: z.number().int().optional().describe("Human-readable version number of the pinned template. `null` when unavailable."),
2140
+ pinned_version_number: z.number().int().nullable().optional().describe("Human-readable version number of the pinned template. `null` when unavailable."),
2038
2141
  /** Installed solution template config that stamped this instance (`cfg_...`). */
2039
2142
  solution_template_config: z.string().describe("Installed solution template config that stamped this instance (`cfg_...`)."),
2040
2143
  /** Lifecycle status of this stamped instance. */