@archastro/sdk 0.14.0 → 0.16.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.
- package/dist/channels/api_chat_channel.d.ts +8 -0
- package/dist/channels/api_chat_channel.d.ts.map +1 -1
- package/dist/channels/api_chat_channel.js +17 -1
- package/dist/channels/api_chat_channel.js.map +1 -1
- package/dist/client.d.ts +6 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +7 -1
- package/dist/client.js.map +1 -1
- package/dist/effective-access.d.ts +34 -0
- package/dist/effective-access.d.ts.map +1 -0
- package/dist/effective-access.js +51 -0
- package/dist/effective-access.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/types/ai.d.ts +109 -109
- package/dist/types/ai.js +10 -10
- package/dist/types/ai.js.map +1 -1
- package/dist/types/automations.d.ts +15 -15
- package/dist/types/automations.js +6 -6
- package/dist/types/automations.js.map +1 -1
- package/dist/types/chat.d.ts +3005 -2434
- package/dist/types/chat.d.ts.map +1 -1
- package/dist/types/chat.js +22 -4
- package/dist/types/chat.js.map +1 -1
- package/dist/types/common.d.ts +2703 -3254
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/common.js +235 -227
- package/dist/types/common.js.map +1 -1
- package/dist/types/config.d.ts +11 -11
- package/dist/types/config.js +3 -3
- package/dist/types/config.js.map +1 -1
- package/dist/types/events.d.ts +810 -0
- package/dist/types/events.d.ts.map +1 -0
- package/dist/types/events.js +77 -0
- package/dist/types/events.js.map +1 -0
- package/dist/types/expressions.d.ts +66 -0
- package/dist/types/expressions.d.ts.map +1 -0
- package/dist/types/expressions.js +27 -0
- package/dist/types/expressions.js.map +1 -0
- package/dist/types/extractions.d.ts +3 -3
- package/dist/types/extractions.js +2 -2
- package/dist/types/extractions.js.map +1 -1
- package/dist/types/graph.d.ts +34 -0
- package/dist/types/graph.d.ts.map +1 -0
- package/dist/types/graph.js +16 -0
- package/dist/types/graph.js.map +1 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +6 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/notifications.d.ts +3 -3
- package/dist/types/notifications.js +2 -2
- package/dist/types/notifications.js.map +1 -1
- package/dist/types/oauth.d.ts +5 -5
- package/dist/types/scripts.d.ts +800 -0
- package/dist/types/scripts.d.ts.map +1 -0
- package/dist/types/scripts.js +112 -0
- package/dist/types/scripts.js.map +1 -0
- package/dist/types/status.d.ts +8 -8
- package/dist/types/status.js +2 -2
- package/dist/types/status.js.map +1 -1
- package/dist/types/system.d.ts +2 -2
- package/dist/types/tasks.d.ts +12 -6
- package/dist/types/tasks.d.ts.map +1 -1
- package/dist/types/tasks.js +5 -3
- package/dist/types/tasks.js.map +1 -1
- package/dist/types/teams.d.ts +334 -334
- package/dist/types/teams.js +5 -5
- package/dist/types/teams.js.map +1 -1
- package/dist/types/threads.d.ts +242 -202
- package/dist/types/threads.d.ts.map +1 -1
- package/dist/types/threads.js +6 -6
- package/dist/types/threads.js.map +1 -1
- package/dist/types/users.d.ts +50 -6
- package/dist/types/users.d.ts.map +1 -1
- package/dist/types/users.js +18 -3
- package/dist/types/users.js.map +1 -1
- package/dist/types/workflows.d.ts +544 -0
- package/dist/types/workflows.d.ts.map +1 -0
- package/dist/types/workflows.js +91 -0
- package/dist/types/workflows.js.map +1 -0
- package/dist/v1/resources/agents.d.ts +4 -3
- package/dist/v1/resources/agents.d.ts.map +1 -1
- package/dist/v1/resources/agents.js +1 -1
- package/dist/v1/resources/agents.js.map +1 -1
- package/dist/v1/resources/ai.d.ts +2 -2
- package/dist/v1/resources/ai.d.ts.map +1 -1
- package/dist/v1/resources/ai.js +1 -1
- package/dist/v1/resources/event_subscriptions.d.ts +1 -1
- package/dist/v1/resources/event_subscriptions.js +1 -1
- package/dist/v1/resources/index.d.ts +3 -0
- package/dist/v1/resources/index.d.ts.map +1 -1
- package/dist/v1/resources/index.js +4 -1
- package/dist/v1/resources/index.js.map +1 -1
- package/dist/v1/resources/scripts.d.ts +117 -0
- package/dist/v1/resources/scripts.d.ts.map +1 -0
- package/dist/v1/resources/scripts.js +116 -0
- package/dist/v1/resources/scripts.js.map +1 -0
- package/dist/v1/resources/ssh_keys.d.ts +13 -0
- package/dist/v1/resources/ssh_keys.d.ts.map +1 -0
- package/dist/v1/resources/ssh_keys.js +19 -0
- package/dist/v1/resources/ssh_keys.js.map +1 -0
- package/dist/v1/resources/tasks.d.ts +7 -0
- package/dist/v1/resources/tasks.d.ts.map +1 -1
- package/dist/v1/resources/tasks.js +4 -1
- package/dist/v1/resources/tasks.js.map +1 -1
- package/dist/v1/resources/teams.d.ts +10 -0
- package/dist/v1/resources/teams.d.ts.map +1 -1
- package/dist/v1/resources/teams.js +1 -1
- package/dist/v1/resources/threads.d.ts +6 -0
- package/dist/v1/resources/threads.d.ts.map +1 -1
- package/dist/v1/resources/threads.js +1 -1
- package/dist/v1/resources/users.d.ts +66 -4
- package/dist/v1/resources/users.d.ts.map +1 -1
- package/dist/v1/resources/users.js +52 -3
- package/dist/v1/resources/users.js.map +1 -1
- package/dist/v1/resources/work_items.d.ts +1 -1
- package/dist/v1/resources/work_items.d.ts.map +1 -1
- package/dist/v1/resources/work_items.js +1 -1
- package/dist/v1/resources/workflows.d.ts +205 -0
- package/dist/v1/resources/workflows.d.ts.map +1 -0
- package/dist/v1/resources/workflows.js +205 -0
- package/dist/v1/resources/workflows.js.map +1 -0
- package/dist/v1.d.ts +6 -0
- package/dist/v1.d.ts.map +1 -1
- package/dist/v1.js +10 -1
- package/dist/v1.js.map +1 -1
- package/package.json +1 -1
package/dist/types/common.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
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:
|
|
3
|
+
// Content hash: 9577d3104f06
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { automationParticipantSlotSchema, automationPrefillsSchema } from "./automations.js";
|
|
6
6
|
import { configSchema } from "./config.js";
|
|
7
7
|
import { imageSourceSchema } from "./image.js";
|
|
8
8
|
import { userSchema } from "./users.js";
|
|
9
|
+
import { workflowJournalSchema, workflowJournalEntrySchema } from "./workflows.js";
|
|
9
10
|
/** Runtime validator for {@link AclGrant}. */
|
|
10
11
|
export const aclGrantSchema = z.object({
|
|
11
12
|
/** Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry. */
|
|
@@ -34,11 +35,11 @@ export const aclSchema = z.object({
|
|
|
34
35
|
/** Runtime validator for {@link ActivityFeedEntry}. */
|
|
35
36
|
export const activityFeedEntrySchema = z.object({
|
|
36
37
|
/** 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.
|
|
38
|
+
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.custom((value) => value !== undefined)).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.custom((value) => value !== undefined)).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.custom((value) => value !== undefined)).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.custom((value) => value !== undefined)).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.custom((value) => value !== undefined)).optional(), payload: z.record(z.custom((value) => value !== undefined)).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.custom((value) => value !== undefined)).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.custom((value) => value !== undefined)).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.custom((value) => value !== undefined)).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.custom((value) => value !== undefined)).optional(), payload: z.record(z.custom((value) => value !== undefined)).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
39
|
/** ID of the application that produced this entry (`dap_...`). `null` if not scoped to an app. */
|
|
39
40
|
app: z.string().optional().describe("ID of the application that produced this entry (`dap_...`). `null` if not scoped to an app."),
|
|
40
41
|
/** 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. */
|
|
41
|
-
attachments: z.array(z.record(z.
|
|
42
|
+
attachments: z.array(z.record(z.custom((value) => value !== undefined))).optional().describe("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."),
|
|
42
43
|
/** ID of the automation run that produced this entry (`atr_...`). `null` if not produced by an automation run. */
|
|
43
44
|
automation_run: z.string().optional().describe("ID of the automation run that produced this entry (`atr_...`). `null` if not produced by an automation run."),
|
|
44
45
|
/** A longer explanation of the event rendered as Markdown. `null` if no additional content is available. */
|
|
@@ -54,7 +55,7 @@ export const activityFeedEntrySchema = z.object({
|
|
|
54
55
|
/** Severity level of the event. One of `"info"`, `"warning"`, or `"error"`. `null` if no severity is set. */
|
|
55
56
|
level: z.string().optional().describe("Severity level of the event. One of `\"info\"`, `\"warning\"`, or `\"error\"`. `null` if no severity is set."),
|
|
56
57
|
/** Arbitrary key-value metadata stored on this entry. Returns an empty object when no metadata is set. */
|
|
57
|
-
metadata: z.record(z.
|
|
58
|
+
metadata: z.record(z.custom((value) => value !== undefined)).optional().describe("Arbitrary key-value metadata stored on this entry. Returns an empty object when no metadata is set."),
|
|
58
59
|
/** ID of the organization this entry belongs to (`org_...`). `null` if not org-scoped. */
|
|
59
60
|
org: z.string().optional().describe("ID of the organization this entry belongs to (`org_...`). `null` if not org-scoped."),
|
|
60
61
|
/** ID of the agent routine run that produced this entry (`arr_...`). `null` if not produced by a routine run. */
|
|
@@ -72,7 +73,7 @@ export const activityFeedEntrySchema = z.object({
|
|
|
72
73
|
/** When this activity feed entry was last modified (ISO 8601). */
|
|
73
74
|
updated_at: z.string().optional().describe("When this activity feed entry was last modified (ISO 8601)."),
|
|
74
75
|
/** 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.
|
|
76
|
+
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.custom((value) => value !== undefined)).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
77
|
}).describe("A single event record in an activity feed, capturing what happened, who caused it, and which resources were involved.");
|
|
77
78
|
/** Runtime validator for {@link ActivityFeedEntryListResponse}. */
|
|
78
79
|
export const activityFeedEntryListResponseSchema = z.object({
|
|
@@ -212,7 +213,7 @@ export const attachmentSchema = z.object({
|
|
|
212
213
|
/** Display name of the media item. Present on `media` type only. `null` otherwise. */
|
|
213
214
|
name: z.string().nullable().optional().describe("Display name of the media item. Present on `media` type only. `null` otherwise."),
|
|
214
215
|
/** 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.
|
|
216
|
+
object: z.record(z.custom((value) => value !== undefined)).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
217
|
/** 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
218
|
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
219
|
/** The attachment type. One of `"file"`, `"scraped_link"`, `"artifact"`, `"task"`, `"media"`, `"action"`, or `"chart"`. Determines which additional fields are present. */
|
|
@@ -231,7 +232,7 @@ export const authTokensSchema = z.object({
|
|
|
231
232
|
/** Number of seconds until `token` expires. After this period, use `refresh_token` to obtain a new access token. */
|
|
232
233
|
expires_in: z.number().int().describe("Number of seconds until `token` expires. After this period, use `refresh_token` to obtain a new access token."),
|
|
233
234
|
/** Optional auxiliary data associated with this authentication event, such as `onboarding_job_id` when the user is completing onboarding. `null` when no extra context is present. */
|
|
234
|
-
metadata: z.record(z.
|
|
235
|
+
metadata: z.record(z.custom((value) => value !== undefined)).optional().describe("Optional auxiliary data associated with this authentication event, such as `onboarding_job_id` when the user is completing onboarding. `null` when no extra context is present."),
|
|
235
236
|
/** Long-lived opaque refresh token. Use this to obtain a new access token when `token` expires. */
|
|
236
237
|
refresh_token: z.string().describe("Long-lived opaque refresh token. Use this to obtain a new access token when `token` expires."),
|
|
237
238
|
/** Short-lived JWT access token. Include this value in the `Authorization: Bearer <token>` header for all authenticated API requests. */
|
|
@@ -250,7 +251,7 @@ export const bugReportSchema = z.object({
|
|
|
250
251
|
/** Version string of the submitting client at the time of submission, e.g. `"1.4.2"`. */
|
|
251
252
|
client_version: z.string().describe("Version string of the submitting client at the time of submission, e.g. `\"1.4.2\"`."),
|
|
252
253
|
/** Optional free-form JSON object providing additional context captured by the client (e.g. viewport size, active route). `null` when no context was provided. Maximum 5 KB when serialized. */
|
|
253
|
-
context: z.record(z.
|
|
254
|
+
context: z.record(z.custom((value) => value !== undefined)).optional().describe("Optional free-form JSON object providing additional context captured by the client (e.g. viewport size, active route). `null` when no context was provided. Maximum 5 KB when serialized."),
|
|
254
255
|
/** When the bug report was submitted (ISO 8601). */
|
|
255
256
|
created_at: z.string().optional().describe("When the bug report was submitted (ISO 8601)."),
|
|
256
257
|
/** Freeform text describing the issue or feedback, as entered by the user. Up to 10,000 characters. */
|
|
@@ -276,7 +277,7 @@ export const builtinToolSchema = z.object({
|
|
|
276
277
|
/** Runtime validator for {@link BuiltinToolCatalogEntry}. */
|
|
277
278
|
export const builtinToolCatalogEntrySchema = z.object({
|
|
278
279
|
/** JSON Schema object describing the configuration options for this tool category. Clients should use this schema to render and validate configuration forms before submitting. `null` when no configuration is needed. */
|
|
279
|
-
config_schema: z.record(z.
|
|
280
|
+
config_schema: z.record(z.custom((value) => value !== undefined)).optional().describe("JSON Schema object describing the configuration options for this tool category. Clients should use this schema to render and validate configuration forms before submitting. `null` when no configuration is needed."),
|
|
280
281
|
/** Short prose description of what this tool category does. Suitable for display in setup UIs. `null` when no description has been defined. */
|
|
281
282
|
description: z.string().optional().describe("Short prose description of what this tool category does. Suitable for display in setup UIs. `null` when no description has been defined."),
|
|
282
283
|
/** Additional guidance surfaced to the agent at runtime when this tool category is enabled. `null` when no custom instruction is set. */
|
|
@@ -296,12 +297,29 @@ export const builtinToolCatalogEntrySchema = z.object({
|
|
|
296
297
|
/** Array of individual tool definitions included in this category. Each entry describes a single callable tool with its own name and description. */
|
|
297
298
|
tools: z.array(builtinToolSchema).optional().describe("Array of individual tool definitions included in this category. Each entry describes a single callable tool with its own name and description."),
|
|
298
299
|
}).describe("A catalog entry describing a category of platform-provided (builtin) tools that can be enabled for an agent. Each entry groups one or more individual tools under a shared key, label, and configuration schema.");
|
|
300
|
+
/** Runtime validator for {@link Cancelled}. */
|
|
301
|
+
export const cancelledSchema = z.object({
|
|
302
|
+
call_id: z.string(),
|
|
303
|
+
reason: z.string(),
|
|
304
|
+
status: z.literal("cancelled"),
|
|
305
|
+
}).describe("A cancelled local-tool outcome.");
|
|
299
306
|
/** Runtime validator for {@link ChannelAck}. */
|
|
300
307
|
export const channelAckSchema = z.object({}).describe("Empty acknowledgement payload returned by channel message handlers that produce no data. The wire envelope is `{\"status\": \"ok\", \"response\": {}}`.");
|
|
308
|
+
/** Runtime validator for {@link MessageContext}. */
|
|
309
|
+
export const messageContextSchema = z.object({
|
|
310
|
+
/** Scalar key-value fields describing the context, such as route, repository, or pull-request number. */
|
|
311
|
+
attributes: z.record(z.custom((value) => value !== undefined)).optional().describe("Scalar key-value fields describing the context, such as route, repository, or pull-request number."),
|
|
312
|
+
/** Optional context body. The model receives it as escaped XML data, not a system instruction. */
|
|
313
|
+
content: z.string().nullable().optional().describe("Optional context body. The model receives it as escaped XML data, not a system instruction."),
|
|
314
|
+
/** Optional human-readable label for this context block. */
|
|
315
|
+
title: z.string().nullable().optional().describe("Optional human-readable label for this context block."),
|
|
316
|
+
/** Stable context kind. Must start with a lowercase letter and contain only lowercase letters, numbers, dots, dashes, or underscores. */
|
|
317
|
+
type: z.string().describe("Stable context kind. Must start with a lowercase letter and contain only lowercase letters, numbers, dots, dashes, or underscores."),
|
|
318
|
+
}).describe("Structured context captured with a chat message and delivered to agents as data.");
|
|
301
319
|
/** Runtime validator for {@link MessageReaction}. */
|
|
302
320
|
export const messageReactionSchema = z.object({
|
|
303
321
|
/** Type-specific reaction data. For `"emoji_reaction"` reactions, contains an `emoji` key with the Unicode emoji string (e.g., `"👍"`). */
|
|
304
|
-
payload: z.record(z.
|
|
322
|
+
payload: z.record(z.custom((value) => value !== undefined)).optional().describe("Type-specific reaction data. For `\"emoji_reaction\"` reactions, contains an `emoji` key with the Unicode emoji string (e.g., `\"👍\"`)."),
|
|
305
323
|
/** Reaction type identifier. Currently always `"emoji_reaction"` for emoji-based reactions. */
|
|
306
324
|
type: z.string().describe("Reaction type identifier. Currently always `\"emoji_reaction\"` for emoji-based reactions."),
|
|
307
325
|
/** Public ID of the user who added the reaction (`usr_...`). */
|
|
@@ -323,6 +341,8 @@ export const messageSchema = z.object({
|
|
|
323
341
|
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
342
|
/** Text content of the message. `null` for messages that contain only attachments. */
|
|
325
343
|
content: z.string().nullable().optional().describe("Text content of the message. `null` for messages that contain only attachments."),
|
|
344
|
+
/** Immutable structured context captured when the message was posted. Each entry has `type`, optional `title` and `content`, and scalar `attributes`. Always present; defaults to an empty array. Context is delivered to agents as escaped XML data, not as system instructions. */
|
|
345
|
+
context: z.array(messageContextSchema).optional().describe("Immutable structured context captured when the message was posted. Each entry has `type`, optional `title` and `content`, and scalar `attributes`. Always present; defaults to an empty array. Context is delivered to agents as escaped XML data, not as system instructions."),
|
|
326
346
|
/** When the message was posted (ISO 8601). */
|
|
327
347
|
created_at: z.string().optional().describe("When the message was posted (ISO 8601)."),
|
|
328
348
|
/** Whether this message has at least one reply. Only present when explicitly requested or computed by the server. */
|
|
@@ -336,7 +356,7 @@ export const messageSchema = z.object({
|
|
|
336
356
|
/** Identifier of the legacy chat agent that sent this message, if applicable. `null` for messages sent by users or modern agent users. */
|
|
337
357
|
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
358
|
/** Arbitrary key-value metadata attached to the message. Always present; defaults to an empty object when no metadata has been set. */
|
|
339
|
-
metadata: z.record(z.
|
|
359
|
+
metadata: z.record(z.custom((value) => value !== undefined)).optional().describe("Arbitrary key-value metadata attached to the message. Always present; defaults to an empty object when no metadata has been set."),
|
|
340
360
|
/** ID of the organization that owns this message (`org_...`). */
|
|
341
361
|
org: z.string().nullable().optional().describe("ID of the organization that owns this message (`org_...`)."),
|
|
342
362
|
/** 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,7 +364,7 @@ export const messageSchema = z.object({
|
|
|
344
364
|
/** 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
365
|
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
366
|
/** Inline array of reply messages, each serialized as a full message object. Only present when the server has preloaded replies for this message. */
|
|
347
|
-
replies: z.array(z.record(z.
|
|
367
|
+
replies: z.array(z.record(z.custom((value) => value !== undefined))).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
368
|
/** Opaque pagination cursor to fetch replies posted after the current page. Only present when inline replies are included in the response. */
|
|
349
369
|
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
370
|
/** Opaque pagination cursor to fetch replies posted before the current page. Only present when inline replies are included in the response. */
|
|
@@ -352,7 +372,7 @@ export const messageSchema = z.object({
|
|
|
352
372
|
/** Total number of direct replies to this message. Only present when explicitly requested or computed by the server. */
|
|
353
373
|
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
374
|
/** 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.
|
|
375
|
+
reply_to: z.record(z.custom((value) => value !== undefined)).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
376
|
/** 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
377
|
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
378
|
/** ID of the developer sandbox this message belongs to (`dsb_...`). `null` for non-sandbox messages. */
|
|
@@ -364,10 +384,38 @@ export const messageSchema = z.object({
|
|
|
364
384
|
/** 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
385
|
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
386
|
/** 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.
|
|
387
|
+
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.custom((value) => value !== undefined)).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
388
|
/** 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
389
|
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
390
|
}).describe("A chat message posted in a thread, including its content, author, attachments, reactions, and optional reply metadata.");
|
|
391
|
+
/** Runtime validator for {@link Ok}. */
|
|
392
|
+
export const okSchema = z.object({
|
|
393
|
+
call_id: z.string(),
|
|
394
|
+
content: z.string(),
|
|
395
|
+
status: z.literal("ok"),
|
|
396
|
+
}).describe("A successful local-tool outcome.");
|
|
397
|
+
/** Runtime validator for {@link Error}. */
|
|
398
|
+
export const errorSchema = z.object({
|
|
399
|
+
call_id: z.string(),
|
|
400
|
+
code: z.string(),
|
|
401
|
+
message: z.string(),
|
|
402
|
+
status: z.literal("error"),
|
|
403
|
+
}).describe("A failed local-tool outcome.");
|
|
404
|
+
/** Runtime validator for {@link Command}. */
|
|
405
|
+
export const commandSchema = z.object({
|
|
406
|
+
/** Human-readable description of what the command does, shown alongside the name in the workflow builder. */
|
|
407
|
+
description: z.string().describe("Human-readable description of what the command does, shown alongside the name in the workflow builder."),
|
|
408
|
+
/** JSON Schema describing the shape of an error output. `null` if the command does not produce structured error data. */
|
|
409
|
+
errorOutput: z.record(z.custom((value) => value !== undefined)).optional().describe("JSON Schema describing the shape of an error output. `null` if the command does not produce structured error data."),
|
|
410
|
+
/** JSON Schema describing the input the command expects. `null` if the command takes no input. */
|
|
411
|
+
expectedInput: z.record(z.custom((value) => value !== undefined)).optional().describe("JSON Schema describing the input the command expects. `null` if the command takes no input."),
|
|
412
|
+
/** Unique string identifier for the command, used to reference it in workflow node configurations. */
|
|
413
|
+
id: z.string().describe("Unique string identifier for the command, used to reference it in workflow node configurations."),
|
|
414
|
+
/** Human-readable display name for the command shown in the workflow builder. */
|
|
415
|
+
name: z.string().describe("Human-readable display name for the command shown in the workflow builder."),
|
|
416
|
+
/** JSON Schema describing the shape of a successful output. `null` if the command produces no output on success. */
|
|
417
|
+
successOutput: z.record(z.custom((value) => value !== undefined)).optional().describe("JSON Schema describing the shape of a successful output. `null` if the command produces no output on success."),
|
|
418
|
+
}).describe("A workflow command that a workflow node can invoke, including its identifier, human-readable name, and JSON schemas for its inputs and outputs.");
|
|
371
419
|
/** Runtime validator for {@link ComputerExecResult}. */
|
|
372
420
|
export const computerExecResultSchema = z.object({
|
|
373
421
|
/** The UNIX exit code returned by the process. `0` indicates success; any non-zero value indicates an error. `null` if the process did not terminate normally. */
|
|
@@ -388,7 +436,7 @@ export const contextDocumentSchema = z.object({
|
|
|
388
436
|
/** Context document ID (`cdo_...`). */
|
|
389
437
|
id: z.string().describe("Context document ID (`cdo_...`)."),
|
|
390
438
|
/** Arbitrary key-value metadata attached to the document. Shape varies by source type. */
|
|
391
|
-
metadata: z.record(z.
|
|
439
|
+
metadata: z.record(z.custom((value) => value !== undefined)).optional().describe("Arbitrary key-value metadata attached to the document. Shape varies by source type."),
|
|
392
440
|
/** ID of the context source this document belongs to (`cso_...`). */
|
|
393
441
|
source: z.string().optional().describe("ID of the context source this document belongs to (`cso_...`)."),
|
|
394
442
|
/** ID of the team that owns this document (`tem_...`). `null` if owned by a user or agent. */
|
|
@@ -417,7 +465,7 @@ export const contextDocumentContentSchema = z.object({
|
|
|
417
465
|
/** The `limit` value echoed from the request. `null` when no limit was requested. */
|
|
418
466
|
limit: z.number().int().optional().describe("The `limit` value echoed from the request. `null` when no limit was requested."),
|
|
419
467
|
/** Arbitrary key-value metadata attached to the document, such as source URL or author. `null` if no metadata was recorded. */
|
|
420
|
-
metadata: z.record(z.
|
|
468
|
+
metadata: z.record(z.custom((value) => value !== undefined)).optional().describe("Arbitrary key-value metadata attached to the document, such as source URL or author. `null` if no metadata was recorded."),
|
|
421
469
|
/** The `offset` value echoed from the request. `null` when no offset was requested. */
|
|
422
470
|
offset: z.number().int().optional().describe("The `offset` value echoed from the request. `null` when no offset was requested."),
|
|
423
471
|
/** Zero-based index of the first byte included in `content`. Populated only when `unit` is `"bytes"`; `null` otherwise. */
|
|
@@ -442,11 +490,11 @@ export const contextIngestionSchema = z.object({
|
|
|
442
490
|
/** When the ingestion was submitted (ISO 8601). */
|
|
443
491
|
created_at: z.string().optional().describe("When the ingestion was submitted (ISO 8601)."),
|
|
444
492
|
/** Structured error details when the ingestion has `status: "failed"`. `null` for any other status. */
|
|
445
|
-
error: z.record(z.
|
|
493
|
+
error: z.record(z.custom((value) => value !== undefined)).optional().describe("Structured error details when the ingestion has `status: \"failed\"`. `null` for any other status."),
|
|
446
494
|
/** Context ingestion ID (`cig_...`). */
|
|
447
495
|
id: z.string().describe("Context ingestion ID (`cig_...`)."),
|
|
448
496
|
/** Arbitrary key-value metadata associated with this ingestion run. Shape is caller-defined. */
|
|
449
|
-
metadata: z.record(z.
|
|
497
|
+
metadata: z.record(z.custom((value) => value !== undefined)).optional().describe("Arbitrary key-value metadata associated with this ingestion run. Shape is caller-defined."),
|
|
450
498
|
/** ID of the context source being ingested (`cso_...`). `null` if the source has been deleted. */
|
|
451
499
|
source: z.string().optional().describe("ID of the context source being ingested (`cso_...`). `null` if the source has been deleted."),
|
|
452
500
|
/** When the ingestion job began processing. `null` if the job is still pending. */
|
|
@@ -470,6 +518,71 @@ export const createdPrivateServiceEnrollmentSchema = z.object({
|
|
|
470
518
|
id: z.string(),
|
|
471
519
|
private_service: z.string(),
|
|
472
520
|
}).describe("Creation-only private service enrollment response. The raw token is shown once and is omitted from every read schema.");
|
|
521
|
+
/** Runtime validator for {@link EffectiveAccessBillingPrincipal}. */
|
|
522
|
+
export const effectiveAccessBillingPrincipalSchema = z.object({
|
|
523
|
+
/** Whether the authenticated user may administer this principal's billing account. */
|
|
524
|
+
administrator: z.boolean().describe("Whether the authenticated user may administer this principal's billing account."),
|
|
525
|
+
principal_type: z.enum(["user", "org"]),
|
|
526
|
+
}).describe("Billing administration authority for one Viewer-derived principal kind.");
|
|
527
|
+
/** Runtime validator for {@link EffectiveAccessEntitlement}. */
|
|
528
|
+
export const effectiveAccessEntitlementSchema = z.object({
|
|
529
|
+
/** Whether any eligible source grants the key. */
|
|
530
|
+
granted: z.boolean().describe("Whether any eligible source grants the key."),
|
|
531
|
+
/** Stable entitlement catalog key. */
|
|
532
|
+
key: z.string().describe("Stable entitlement catalog key."),
|
|
533
|
+
/** Privacy-safe principal kinds that contribute to the effective value. */
|
|
534
|
+
provided_by: z.array(z.enum(["personal", "organization"])).describe("Privacy-safe principal kinds that contribute to the effective value."),
|
|
535
|
+
/** Merged entitlement value, or `null` when the key is not granted. */
|
|
536
|
+
value: z.boolean().nullable().optional().describe("Merged entitlement value, or `null` when the key is not granted."),
|
|
537
|
+
/** Catalog type used to interpret `value`. */
|
|
538
|
+
value_type: z.literal("boolean").describe("Catalog type used to interpret `value`."),
|
|
539
|
+
}).describe("A billing-derived effective entitlement for the authenticated user.");
|
|
540
|
+
/** Runtime validator for {@link EffectiveAccess}. */
|
|
541
|
+
export const effectiveAccessSchema = z.object({
|
|
542
|
+
/** Administration authority for the personal and current-organization principals. */
|
|
543
|
+
billing: z.array(effectiveAccessBillingPrincipalSchema).describe("Administration authority for the personal and current-organization principals."),
|
|
544
|
+
/** Requested catalog entitlements in request order. */
|
|
545
|
+
entitlements: z.array(effectiveAccessEntitlementSchema).describe("Requested catalog entitlements in request order."),
|
|
546
|
+
}).describe("Live effective access and billing authority for the authenticated user.");
|
|
547
|
+
/** Runtime validator for {@link CurrentUser}. */
|
|
548
|
+
export const currentUserSchema = z.object({
|
|
549
|
+
/** Short handle or alias of the user. */
|
|
550
|
+
alias: z.string().nullable().optional().describe("Short handle or alias of the user."),
|
|
551
|
+
/** ID of the token-scoped app (`dap_...`). */
|
|
552
|
+
app: z.string().nullable().optional().describe("ID of the token-scoped app (`dap_...`)."),
|
|
553
|
+
/** Display name of the token-scoped app. */
|
|
554
|
+
app_name: z.string().nullable().optional().describe("Display name of the token-scoped app."),
|
|
555
|
+
/** Present only when the request supplies one or more `entitlement[]` values. */
|
|
556
|
+
effective_access: effectiveAccessSchema.optional().describe("Present only when the request supplies one or more `entitlement[]` values."),
|
|
557
|
+
/** Email address of the user. */
|
|
558
|
+
email: z.string().nullable().optional().describe("Email address of the user."),
|
|
559
|
+
/** User ID (`usr_...`). */
|
|
560
|
+
id: z.string().describe("User ID (`usr_...`)."),
|
|
561
|
+
/** Whether the authenticated account is an internal system user. */
|
|
562
|
+
is_system_user: z.boolean().describe("Whether the authenticated account is an internal system user."),
|
|
563
|
+
/** Arbitrary user metadata. */
|
|
564
|
+
metadata: z.record(z.custom((value) => value !== undefined)).optional().describe("Arbitrary user metadata."),
|
|
565
|
+
/** Full display name of the user. */
|
|
566
|
+
name: z.string().nullable().optional().describe("Full display name of the user."),
|
|
567
|
+
/** The authenticated user's notification preferences. */
|
|
568
|
+
notification_settings: z.record(z.custom((value) => value !== undefined)).describe("The authenticated user's notification preferences."),
|
|
569
|
+
/** ID of the current organization (`org_...`). */
|
|
570
|
+
org: z.string().nullable().optional().describe("ID of the current organization (`org_...`)."),
|
|
571
|
+
/** Display name of the current organization. */
|
|
572
|
+
org_name: z.string().nullable().optional().describe("Display name of the current organization."),
|
|
573
|
+
/** The authenticated user's role in the current organization. */
|
|
574
|
+
org_role: z.string().nullable().optional().describe("The authenticated user's role in the current organization."),
|
|
575
|
+
/** Stable slug of the current organization. */
|
|
576
|
+
org_slug: z.string().nullable().optional().describe("Stable slug of the current organization."),
|
|
577
|
+
/** Resolved profile picture metadata. */
|
|
578
|
+
profile_picture: imageSourceSchema.nullable().optional().describe("Resolved profile picture metadata."),
|
|
579
|
+
/** ID of the current sandbox (`sbx_...`). */
|
|
580
|
+
sandbox: z.string().nullable().optional().describe("ID of the current sandbox (`sbx_...`)."),
|
|
581
|
+
/** Display name of the current sandbox. */
|
|
582
|
+
sandbox_name: z.string().nullable().optional().describe("Display name of the current sandbox."),
|
|
583
|
+
/** The user's IANA timezone. */
|
|
584
|
+
timezone: z.string().nullable().optional().describe("The user's IANA timezone."),
|
|
585
|
+
}).describe("The authenticated user's profile, live session context, and optional effective access.");
|
|
473
586
|
/** Runtime validator for {@link CustomObject}. */
|
|
474
587
|
export const customObjectSchema = z.object({
|
|
475
588
|
/** Access control list governing read and write access to this custom object. Only returned to resource owners and privileged or organization-admin viewers; `null` for everyone else. */
|
|
@@ -477,7 +590,7 @@ export const customObjectSchema = z.object({
|
|
|
477
590
|
/** When the custom object was created (ISO 8601). */
|
|
478
591
|
created_at: z.string().optional().describe("When the custom object was created (ISO 8601)."),
|
|
479
592
|
/** Map of field names to their current values as defined by the object's schema type. */
|
|
480
|
-
fields: z.record(z.
|
|
593
|
+
fields: z.record(z.custom((value) => value !== undefined)).optional().describe("Map of field names to their current values as defined by the object's schema type."),
|
|
481
594
|
/** Unique identifier for the custom object (`cobj_...`). */
|
|
482
595
|
id: z.string().describe("Unique identifier for the custom object (`cobj_...`)."),
|
|
483
596
|
/** ID of the organization this object belongs to (`org_...`). */
|
|
@@ -502,11 +615,11 @@ export const customObjectJoinResponseSchema = z.object({
|
|
|
502
615
|
/** Collision-free identifier for this browser connection. */
|
|
503
616
|
connection_id: z.string().describe("Collision-free identifier for this browser connection."),
|
|
504
617
|
/** Current materialized fields, or `null` while waiting for object creation. */
|
|
505
|
-
fields: z.record(z.
|
|
618
|
+
fields: z.record(z.custom((value) => value !== undefined)).nullable().describe("Current materialized fields, or `null` while waiting for object creation."),
|
|
506
619
|
/** Custom-object ID, or `null` while a row-key subscription waits for creation. */
|
|
507
620
|
id: z.string().nullable().describe("Custom-object ID, or `null` while a row-key subscription waits for creation."),
|
|
508
621
|
/** Current ephemeral collaborator presence. */
|
|
509
|
-
presence: z.array(z.record(z.
|
|
622
|
+
presence: z.array(z.record(z.custom((value) => value !== undefined))).describe("Current ephemeral collaborator presence."),
|
|
510
623
|
/** Whether the current connection may only read the object. */
|
|
511
624
|
readonly: z.boolean().describe("Whether the current connection may only read the object."),
|
|
512
625
|
}).describe("Initial authoritative snapshot returned by a custom-object channel join.");
|
|
@@ -540,7 +653,7 @@ export const customObjectSaveResponseSchema = z.object({
|
|
|
540
653
|
/** Runtime validator for {@link CustomObjectUpdateFieldsResponse}. */
|
|
541
654
|
export const customObjectUpdateFieldsResponseSchema = z.object({
|
|
542
655
|
/** The materialized object fields after the update. */
|
|
543
|
-
fields: z.record(z.
|
|
656
|
+
fields: z.record(z.custom((value) => value !== undefined)).describe("The materialized object fields after the update."),
|
|
544
657
|
/** ID of the custom object that was updated (`cobj_...`). */
|
|
545
658
|
id: z.string().describe("ID of the custom object that was updated (`cobj_...`)."),
|
|
546
659
|
/** Idempotency key acknowledged for this update. */
|
|
@@ -562,82 +675,11 @@ export const domainEventSchema = z.object({
|
|
|
562
675
|
idempotency_key: z.string().optional(),
|
|
563
676
|
org: z.string().optional(),
|
|
564
677
|
/** Opaque event-specific JSON. Use event_name to select the expected payload schema. */
|
|
565
|
-
payload: z.record(z.
|
|
678
|
+
payload: z.record(z.custom((value) => value !== undefined)).describe("Opaque event-specific JSON. Use event_name to select the expected payload schema."),
|
|
566
679
|
sandbox: z.string().optional(),
|
|
567
680
|
team: z.string().optional(),
|
|
568
681
|
user: z.string().optional(),
|
|
569
682
|
}).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.");
|
|
641
683
|
/** Runtime validator for {@link StorageFile}. */
|
|
642
684
|
export const storageFileSchema = z.object({
|
|
643
685
|
/** ID of the app this file belongs to (`app_...`). */
|
|
@@ -692,7 +734,7 @@ export const agentHealthActionSchema = z.object({
|
|
|
692
734
|
/** ID of the organization this action is associated with (`org_...`). `null` when not org-scoped. */
|
|
693
735
|
org: z.string().optional().describe("ID of the organization this action is associated with (`org_...`). `null` when not org-scoped."),
|
|
694
736
|
/** Kind-specific structured data used to construct the deep-link for this action. For `"env_var"` actions includes `key` and `scope`; for `"install"` actions includes `installation_kind`; for `"integration"` actions includes `mcp_server_ref`, and when resolvable also includes `provider`, `integration_id` for OAuth handoff, and `connection_status` (`"connected"`, `"disconnected"`, or `"token_expired"`). Empty object `{}` when no additional parameters are needed. */
|
|
695
|
-
params: z.record(z.
|
|
737
|
+
params: z.record(z.custom((value) => value !== undefined)).optional().describe("Kind-specific structured data used to construct the deep-link for this action. For `\"env_var\"` actions includes `key` and `scope`; for `\"install\"` actions includes `installation_kind`; for `\"integration\"` actions includes `mcp_server_ref`, and when resolvable also includes `provider`, `integration_id` for OAuth handoff, and `connection_status` (`\"connected\"`, `\"disconnected\"`, or `\"token_expired\"`). Empty object `{}` when no additional parameters are needed."),
|
|
696
738
|
/** `true` if this action must be completed before the agent is considered fully operational and counts toward the blocking checklist progress bar. */
|
|
697
739
|
required: z.boolean().describe("`true` if this action must be completed before the agent is considered fully operational and counts toward the blocking checklist progress bar."),
|
|
698
740
|
/** Display order within the same `source` group. Lower values appear first. */
|
|
@@ -706,7 +748,7 @@ export const agentHealthActionSchema = z.object({
|
|
|
706
748
|
/** When this health action was last modified (ISO 8601). */
|
|
707
749
|
updated_at: z.string().optional().describe("When this health action was last modified (ISO 8601)."),
|
|
708
750
|
/** Configuration for the action's verifier step. Contains at minimum a `type` field that indicates which verification affordance to render. Server-internal fields are stripped before this is returned. */
|
|
709
|
-
verify_config: z.record(z.
|
|
751
|
+
verify_config: z.record(z.custom((value) => value !== undefined)).optional().describe("Configuration for the action's verifier step. Contains at minimum a `type` field that indicates which verification affordance to render. Server-internal fields are stripped before this is returned."),
|
|
710
752
|
}).describe("A single actionable item in an agent's health or setup checklist, carrying the structured data needed to render the item and deep-link to the resolution flow.");
|
|
711
753
|
/** Runtime validator for {@link HealthActionListResponse}. */
|
|
712
754
|
export const healthActionListResponseSchema = z.object({
|
|
@@ -718,7 +760,7 @@ export const installationSchema = z.object({
|
|
|
718
760
|
/** ID of the agent that owns this installation (`agi_...`). `null` if the installation has no agent owner. */
|
|
719
761
|
agent: z.string().optional().describe("ID of the agent that owns this installation (`agi_...`). `null` if the installation has no agent owner."),
|
|
720
762
|
/** Kind-specific configuration object for this installation. Shape depends on the `kind` value. `null` if the kind requires no configuration. */
|
|
721
|
-
config: z.record(z.
|
|
763
|
+
config: z.record(z.custom((value) => value !== undefined)).optional().describe("Kind-specific configuration object for this installation. Shape depends on the `kind` value. `null` if the kind requires no configuration."),
|
|
722
764
|
/** When the installation was created (ISO 8601). */
|
|
723
765
|
created_at: z.string().optional().describe("When the installation was created (ISO 8601)."),
|
|
724
766
|
/** Installation ID (`cin_...`). */
|
|
@@ -732,7 +774,7 @@ export const installationSchema = z.object({
|
|
|
732
774
|
/** Current lifecycle state of the installation. One of `"pending"`, `"active"`, `"paused"`, or `"error"`. `"error"` indicates the installation was suspended due to a policy or compliance issue and requires attention. */
|
|
733
775
|
state: z.string().optional().describe("Current lifecycle state of the installation. One of `\"pending\"`, `\"active\"`, `\"paused\"`, or `\"error\"`. `\"error\"` indicates the installation was suspended due to a policy or compliance issue and requires attention."),
|
|
734
776
|
/** Provider-supplied status detail for this installation, set during activation or event processing. `null` if no status has been reported. */
|
|
735
|
-
status_payload: z.record(z.
|
|
777
|
+
status_payload: z.record(z.custom((value) => value !== undefined)).optional().describe("Provider-supplied status detail for this installation, set during activation or event processing. `null` if no status has been reported."),
|
|
736
778
|
/** When the installation record was last updated (ISO 8601). */
|
|
737
779
|
updated_at: z.string().optional().describe("When the installation record was last updated (ISO 8601)."),
|
|
738
780
|
}).describe("An installation representing a connection between an agent and an external service or enablement channel. Tracks configuration, lifecycle state, and any bound integration.");
|
|
@@ -743,7 +785,7 @@ export const installationKindSchema = z.object({
|
|
|
743
785
|
/** Grouping category for UI display purposes, e.g. `"enablement"` or `"integration"`. `null` if uncategorized. */
|
|
744
786
|
category: z.string().optional().describe("Grouping category for UI display purposes, e.g. `\"enablement\"` or `\"integration\"`. `null` if uncategorized."),
|
|
745
787
|
/** JSON Schema object describing the shape of the `config` parameter accepted when creating or updating an installation of this kind. `null` if the kind accepts no configuration. */
|
|
746
|
-
config_schema: z.record(z.
|
|
788
|
+
config_schema: z.record(z.custom((value) => value !== undefined)).optional().describe("JSON Schema object describing the shape of the `config` parameter accepted when creating or updating an installation of this kind. `null` if the kind accepts no configuration."),
|
|
747
789
|
/** Short prose description of what this kind connects to and how it is used. `null` if no description is defined. */
|
|
748
790
|
description: z.string().optional().describe("Short prose description of what this kind connects to and how it is used. `null` if no description is defined."),
|
|
749
791
|
/** Unique slug identifying this installation kind, e.g. `"enablement/github_app"`, `"integration/gmail"`, or `"web/site"`. Pass this value as `kind` when creating an installation. */
|
|
@@ -776,11 +818,11 @@ export const installationSourceSchema = z.object({
|
|
|
776
818
|
/** Source ID (`cso_...`). */
|
|
777
819
|
id: z.string().describe("Source ID (`cso_...`)."),
|
|
778
820
|
/** Arbitrary key-value metadata associated with this source. Shape is caller-defined. `null` if no metadata was set. */
|
|
779
|
-
metadata: z.record(z.
|
|
821
|
+
metadata: z.record(z.custom((value) => value !== undefined)).optional().describe("Arbitrary key-value metadata associated with this source. Shape is caller-defined. `null` if no metadata was set."),
|
|
780
822
|
/** ID of the parent source (`cso_...`) when this source was derived from another source. `null` for top-level sources. */
|
|
781
823
|
parent_source: z.string().optional().describe("ID of the parent source (`cso_...`) when this source was derived from another source. `null` for top-level sources."),
|
|
782
824
|
/** Type-specific payload provided when the source was created. The shape depends on the `type` value. `null` if no payload was supplied. */
|
|
783
|
-
payload: z.record(z.
|
|
825
|
+
payload: z.record(z.custom((value) => value !== undefined)).optional().describe("Type-specific payload provided when the source was created. The shape depends on the `type` value. `null` if no payload was supplied."),
|
|
784
826
|
/** Current lifecycle state of this source. One of `"active"` (ingestion running normally) or `"paused"` (ingestion suspended). Note that per-run ingestion progress is tracked separately and is not exposed on this field. */
|
|
785
827
|
state: z.string().optional().describe("Current lifecycle state of this source. One of `\"active\"` (ingestion running normally) or `\"paused\"` (ingestion suspended). Note that per-run ingestion progress is tracked separately and is not exposed on this field."),
|
|
786
828
|
/** ID of the team associated with this source (`tem_...`). `null` if the source has no team association. */
|
|
@@ -857,13 +899,13 @@ export const knowledgeSourceSchema = z.object({
|
|
|
857
899
|
/** Knowledge source ID (`cso_...`). */
|
|
858
900
|
id: z.string().describe("Knowledge source ID (`cso_...`)."),
|
|
859
901
|
/** Arbitrary key-value metadata attached to this source. Useful for storing caller-defined labels or references. */
|
|
860
|
-
metadata: z.record(z.
|
|
902
|
+
metadata: z.record(z.custom((value) => value !== undefined)).optional().describe("Arbitrary key-value metadata attached to this source. Useful for storing caller-defined labels or references."),
|
|
861
903
|
/** ID of the organization this source belongs to (`org_...`). `null` if not scoped to an org. */
|
|
862
904
|
org: z.string().optional().describe("ID of the organization this source belongs to (`org_...`). `null` if not scoped to an org."),
|
|
863
905
|
/** ID of the parent knowledge source (`cso_...`) when this source was derived from another. `null` for top-level sources. */
|
|
864
906
|
parent_source: z.string().optional().describe("ID of the parent knowledge source (`cso_...`) when this source was derived from another. `null` for top-level sources."),
|
|
865
907
|
/** Type-specific configuration object. The keys depend on the source `type`; see the create endpoint for the expected shape per type. */
|
|
866
|
-
payload: z.record(z.
|
|
908
|
+
payload: z.record(z.custom((value) => value !== undefined)).optional().describe("Type-specific configuration object. The keys depend on the source `type`; see the create endpoint for the expected shape per type."),
|
|
867
909
|
/** ID of the developer sandbox this source is scoped to (`sbx_...`). `null` outside sandbox contexts. */
|
|
868
910
|
sandbox: z.string().optional().describe("ID of the developer sandbox this source is scoped to (`sbx_...`). `null` outside sandbox contexts."),
|
|
869
911
|
/** Current lifecycle state of the source. One of `"active"` (ingestion running normally) or `"paused"` (ingestion suspended). */
|
|
@@ -893,6 +935,44 @@ export const knowledgeSourceKindListResponseSchema = z.object({
|
|
|
893
935
|
/** Array of knowledge source kind objects describing each creatable source type. */
|
|
894
936
|
data: z.array(knowledgeSourceKindSchema).describe("Array of knowledge source kind objects describing each creatable source type."),
|
|
895
937
|
}).describe("List response containing the knowledge source kinds available for creation via the API.");
|
|
938
|
+
/** Runtime validator for {@link NodeField}. */
|
|
939
|
+
export const nodeFieldSchema = z.object({
|
|
940
|
+
/** Whether the field accepts expressions */
|
|
941
|
+
allowExpression: z.boolean().optional().describe("Whether the field accepts expressions"),
|
|
942
|
+
/** Default JSON-safe value for the field */
|
|
943
|
+
defaultValue: z.custom((value) => value !== undefined).optional().describe("Default JSON-safe value for the field"),
|
|
944
|
+
/** Field description */
|
|
945
|
+
description: z.string().optional().describe("Field description"),
|
|
946
|
+
/** Field identifier */
|
|
947
|
+
key: z.string().describe("Field identifier"),
|
|
948
|
+
/** Display label */
|
|
949
|
+
label: z.string().describe("Display label"),
|
|
950
|
+
/** Available options for select fields */
|
|
951
|
+
options: z.array(z.record(z.custom((value) => value !== undefined))).optional().describe("Available options for select fields"),
|
|
952
|
+
/** Whether the field is required */
|
|
953
|
+
required: z.boolean().optional().describe("Whether the field is required"),
|
|
954
|
+
/** Field type (string, number, boolean, expression, etc.) */
|
|
955
|
+
type: z.string().describe("Field type (string, number, boolean, expression, etc.)"),
|
|
956
|
+
}).describe("Schema for a field definition within a node type");
|
|
957
|
+
/** Runtime validator for {@link NodeType}. */
|
|
958
|
+
export const nodeTypeSchema = z.object({
|
|
959
|
+
/** Short badge text for UI */
|
|
960
|
+
badge: z.string().optional().describe("Short badge text for UI"),
|
|
961
|
+
/** Category for grouping (e.g., Logic, Network, Utility) */
|
|
962
|
+
category: z.string().optional().describe("Category for grouping (e.g., Logic, Network, Utility)"),
|
|
963
|
+
/** Hex color for UI display */
|
|
964
|
+
color: z.string().optional().describe("Hex color for UI display"),
|
|
965
|
+
/** Node description */
|
|
966
|
+
description: z.string().describe("Node description"),
|
|
967
|
+
/** Extended documentation */
|
|
968
|
+
docs: z.string().optional().describe("Extended documentation"),
|
|
969
|
+
/** Field definitions for this node type */
|
|
970
|
+
fields: z.array(nodeFieldSchema).describe("Field definitions for this node type"),
|
|
971
|
+
/** Unique node type identifier */
|
|
972
|
+
id: z.string().describe("Unique node type identifier"),
|
|
973
|
+
/** Display label */
|
|
974
|
+
label: z.string().describe("Display label"),
|
|
975
|
+
}).describe("Schema for a workflow node type definition");
|
|
896
976
|
/** Runtime validator for {@link PaginatedReplies}. */
|
|
897
977
|
export const paginatedRepliesSchema = z.object({
|
|
898
978
|
/** Opaque cursor to pass as the pagination cursor to retrieve the page of replies that follow this one. `null` when no further pages exist. */
|
|
@@ -911,11 +991,11 @@ export const privateServiceFunctionSchema = z.object({
|
|
|
911
991
|
/** Human-readable guidance describing when and why to call the operation. */
|
|
912
992
|
description: z.string().describe("Human-readable guidance describing when and why to call the operation."),
|
|
913
993
|
/** JSON Schema Draft 7 object describing the operation's argument object. */
|
|
914
|
-
input_schema: z.record(z.
|
|
994
|
+
input_schema: z.record(z.custom((value) => value !== undefined)).describe("JSON Schema Draft 7 object describing the operation's argument object."),
|
|
915
995
|
/** Stable operation name used when invoking the private service. */
|
|
916
996
|
name: z.string().describe("Stable operation name used when invoking the private service."),
|
|
917
997
|
/** Optional JSON Schema Draft 7 object describing the successful result. */
|
|
918
|
-
output_schema: z.record(z.
|
|
998
|
+
output_schema: z.record(z.custom((value) => value !== undefined)).optional().describe("Optional JSON Schema Draft 7 object describing the successful result."),
|
|
919
999
|
}).describe("A documented callable operation exposed by a private service.");
|
|
920
1000
|
/** Runtime validator for {@link PrivateService}. */
|
|
921
1001
|
export const privateServiceSchema = z.object({
|
|
@@ -988,42 +1068,6 @@ export const routinePresetSchema = z.object({
|
|
|
988
1068
|
/** Whether at most one routine with this preset may exist per agent. Attempting to create a second routine with a unique preset on the same agent will be rejected. */
|
|
989
1069
|
unique: z.boolean().describe("Whether at most one routine with this preset may exist per agent. Attempting to create a second routine with a unique preset on the same agent will be rejected."),
|
|
990
1070
|
}).describe("A named preset that defines the execution model and constraints for a routine. Presets are shared definitions; individual routines reference a preset by name.");
|
|
991
|
-
/** Runtime validator for {@link WorkflowJournalEntry}. */
|
|
992
|
-
export const workflowJournalEntrySchema = z.object({
|
|
993
|
-
/** Durable command identifier associated with the record, when present. */
|
|
994
|
-
command_id: z.string().optional().describe("Durable command identifier associated with the record, when present."),
|
|
995
|
-
/** When this entry was durably committed. */
|
|
996
|
-
created_at: z.string().optional().describe("When this entry was durably committed."),
|
|
997
|
-
/** Journal entry ID (`wdr_...`). */
|
|
998
|
-
id: z.string().describe("Journal entry ID (`wdr_...`)."),
|
|
999
|
-
/** Workflow node associated with the record. `null` for execution-level records. */
|
|
1000
|
-
node_id: z.string().optional().describe("Workflow node associated with the record. `null` for execution-level records."),
|
|
1001
|
-
/** Replayable workflow record body, including payload, context, environment, metadata, and timestamp. */
|
|
1002
|
-
record: z.record(z.unknown()).describe("Replayable workflow record body, including payload, context, environment, metadata, and timestamp."),
|
|
1003
|
-
/** Monotonically increasing sequence within the journal. */
|
|
1004
|
-
sequence: z.number().int().describe("Monotonically increasing sequence within the journal."),
|
|
1005
|
-
/** Durable timer identifier associated with the record, when present. */
|
|
1006
|
-
timer_id: z.string().optional().describe("Durable timer identifier associated with the record, when present."),
|
|
1007
|
-
/** Workflow record type, such as `node_started`, `node_completed`, or `node_failed`. */
|
|
1008
|
-
type: z.string().describe("Workflow record type, such as `node_started`, `node_completed`, or `node_failed`."),
|
|
1009
|
-
}).describe("One ordered, replayable record from a durable workflow journal.");
|
|
1010
|
-
/** Runtime validator for {@link WorkflowJournal}. */
|
|
1011
|
-
export const workflowJournalSchema = z.object({
|
|
1012
|
-
/** When durable workflow execution reached a terminal state. `null` while it is active. */
|
|
1013
|
-
completed_at: z.string().optional().describe("When durable workflow execution reached a terminal state. `null` while it is active."),
|
|
1014
|
-
/** When the journal was created. */
|
|
1015
|
-
created_at: z.string().optional().describe("When the journal was created."),
|
|
1016
|
-
/** Highest workflow record sequence durably committed to this journal. */
|
|
1017
|
-
current_sequence: z.number().int().describe("Highest workflow record sequence durably committed to this journal."),
|
|
1018
|
-
/** Journal execution ID (`wde_...`). */
|
|
1019
|
-
id: z.string().describe("Journal execution ID (`wde_...`)."),
|
|
1020
|
-
/** When durable workflow execution started. */
|
|
1021
|
-
started_at: z.string().optional().describe("When durable workflow execution started."),
|
|
1022
|
-
/** Current durable execution status: `pending`, `running`, `waiting`, `completed`, `failed`, or `cancelled`. */
|
|
1023
|
-
status: z.string().describe("Current durable execution status: `pending`, `running`, `waiting`, `completed`, `failed`, or `cancelled`."),
|
|
1024
|
-
/** When the journal was last updated. */
|
|
1025
|
-
updated_at: z.string().optional().describe("When the journal was last updated."),
|
|
1026
|
-
}).describe("Summary of the durable workflow execution journal associated with a run.");
|
|
1027
1071
|
/** Runtime validator for {@link RunJournalPage}. */
|
|
1028
1072
|
export const runJournalPageSchema = z.object({
|
|
1029
1073
|
/** Opaque cursor for the next entry page. `null` when this is the final page. */
|
|
@@ -1037,6 +1081,20 @@ export const runJournalPageSchema = z.object({
|
|
|
1037
1081
|
/** Durable execution summary. `null` when this run has no journal, which is valid for script-backed, preview, or legacy runs. */
|
|
1038
1082
|
journal: workflowJournalSchema.optional().describe("Durable execution summary. `null` when this run has no journal, which is valid for script-backed, preview, or legacy runs."),
|
|
1039
1083
|
}).describe("A forward-paginated journal entry page for an automation or routine run.");
|
|
1084
|
+
/** Runtime validator for {@link RuntimeEnvVar}. */
|
|
1085
|
+
export const runtimeEnvVarSchema = z.object({
|
|
1086
|
+
/** Human-readable explanation of the variable's purpose. `null` if no description has been set. */
|
|
1087
|
+
description: z.string().optional().describe("Human-readable explanation of the variable's purpose. `null` if no description has been set."),
|
|
1088
|
+
/** The name of the environment variable as it appears in the script runtime (e.g. `DATABASE_URL`). */
|
|
1089
|
+
key: z.string().describe("The name of the environment variable as it appears in the script runtime (e.g. `DATABASE_URL`)."),
|
|
1090
|
+
/** Origin of the environment variable. One of `"app"` (set on the application) or `"org"` (inherited from the organization). */
|
|
1091
|
+
source: z.string().describe("Origin of the environment variable. One of `\"app\"` (set on the application) or `\"org\"` (inherited from the organization)."),
|
|
1092
|
+
}).describe("A single runtime environment variable available within a script execution context, including its key, description, and origin.");
|
|
1093
|
+
/** Runtime validator for {@link RuntimeEnvVarList}. */
|
|
1094
|
+
export const runtimeEnvVarListSchema = z.object({
|
|
1095
|
+
/** Array of runtime environment variable objects available in the current script execution context. */
|
|
1096
|
+
data: z.array(runtimeEnvVarSchema).describe("Array of runtime environment variable objects available in the current script execution context."),
|
|
1097
|
+
}).describe("The collection of runtime environment variables available to the current script execution context.");
|
|
1040
1098
|
/** Runtime validator for {@link SandboxKey}. */
|
|
1041
1099
|
export const sandboxKeySchema = z.object({
|
|
1042
1100
|
/** When this key was created (ISO 8601). */
|
|
@@ -1184,7 +1242,7 @@ export const trajectorySchema = z.object({
|
|
|
1184
1242
|
/** Trajectory ID (`trj_...`). */
|
|
1185
1243
|
id: z.string().describe("Trajectory ID (`trj_...`)."),
|
|
1186
1244
|
/** 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.
|
|
1245
|
+
messages: z.array(z.record(z.custom((value) => value !== undefined))).optional().describe("Serialized message log for this trajectory. Contains the ordered sequence of AI and tool messages produced during the session."),
|
|
1188
1246
|
/** ID of the organization this trajectory belongs to (`org_...`). `null` for trajectories outside an org context. */
|
|
1189
1247
|
org: z.string().nullable().optional().describe("ID of the organization this trajectory belongs to (`org_...`). `null` for trajectories outside an org context."),
|
|
1190
1248
|
/** ID of the developer sandbox this trajectory is scoped to (`sbx_...`). `null` for production trajectories. */
|
|
@@ -1203,56 +1261,6 @@ export const validationResultSchema = z.object({
|
|
|
1203
1261
|
/** List of human-readable warning messages emitted during validation. Warnings do not cause `valid` to be `false` but indicate potentially problematic configuration. */
|
|
1204
1262
|
warnings: z.array(z.string()).optional().describe("List of human-readable warning messages emitted during validation. Warnings do not cause `valid` to be `false` but indicate potentially problematic configuration."),
|
|
1205
1263
|
}).describe("The result of a configuration validation check, indicating whether the config is valid and listing any errors or warnings.");
|
|
1206
|
-
/** Runtime validator for {@link WorkflowWorkItem}. */
|
|
1207
|
-
export const workflowWorkItemSchema = z.object({
|
|
1208
|
-
/** Agent assigned to execute this work. */
|
|
1209
|
-
agent: z.string().describe("Agent assigned to execute this work."),
|
|
1210
|
-
/** Number of times this work has been freshly claimed or reclaimed. */
|
|
1211
|
-
attempt_count: z.number().int().describe("Number of times this work has been freshly claimed or reclaimed."),
|
|
1212
|
-
/** Opaque journal command identity used to resume the workflow exactly once. */
|
|
1213
|
-
command_id: z.string().describe("Opaque journal command identity used to resume the workflow exactly once."),
|
|
1214
|
-
created_at: z.string(),
|
|
1215
|
-
/** Durable workflow execution that owns this work. */
|
|
1216
|
-
execution: z.string().describe("Durable workflow execution that owns this work."),
|
|
1217
|
-
/** Work item ID (`wdi_...`). */
|
|
1218
|
-
id: z.string().describe("Work item ID (`wdi_...`)."),
|
|
1219
|
-
/** When the current claim expires. Null for queued or terminal work. */
|
|
1220
|
-
lease_expires_at: z.string().optional().describe("When the current claim expires. Null for queued or terminal work."),
|
|
1221
|
-
/** Workflow graph node that yielded the work. */
|
|
1222
|
-
node_id: z.string().describe("Workflow graph node that yielded the work."),
|
|
1223
|
-
/** Instructions and participant bindings needed to execute the work. */
|
|
1224
|
-
payload: z.record(z.unknown()).describe("Instructions and participant bindings needed to execute the work."),
|
|
1225
|
-
/** Routine run that owns the execution, when this work came from a routine. */
|
|
1226
|
-
routine_run: z.string().optional().describe("Routine run that owns the execution, when this work came from a routine."),
|
|
1227
|
-
/** Current queue lifecycle status. */
|
|
1228
|
-
status: z.string().describe("Current queue lifecycle status."),
|
|
1229
|
-
/** Stable resource discriminator. Always `workflow_work_item`. */
|
|
1230
|
-
type: z.string().describe("Stable resource discriminator. Always `workflow_work_item`."),
|
|
1231
|
-
updated_at: z.string(),
|
|
1232
|
-
}).describe("Externally executable work yielded by a durable workflow.");
|
|
1233
|
-
/** Runtime validator for {@link WorkflowWorkItemLease}. */
|
|
1234
|
-
export const workflowWorkItemLeaseSchema = z.object({
|
|
1235
|
-
/** Opaque lease token that must be persisted and presented for later transitions. */
|
|
1236
|
-
lease_owner: z.string().describe("Opaque lease token that must be persisted and presented for later transitions."),
|
|
1237
|
-
/** The claimed, resumed, started, or heartbeated work item. */
|
|
1238
|
-
work_item: workflowWorkItemSchema.describe("The claimed, resumed, started, or heartbeated work item."),
|
|
1239
|
-
}).describe("A claimed workflow work item and its caller-held lease token.");
|
|
1240
|
-
/** Runtime validator for {@link WorkflowWorkItemClaim}. */
|
|
1241
|
-
export const workflowWorkItemClaimSchema = z.object({
|
|
1242
|
-
/** Claimed or resumed work and its lease; null when no eligible item exists. */
|
|
1243
|
-
data: workflowWorkItemLeaseSchema.optional().describe("Claimed or resumed work and its lease; null when no eligible item exists."),
|
|
1244
|
-
}).describe("Result of polling an agent's durable workflow work queue.");
|
|
1245
|
-
/** Runtime validator for {@link WorkflowWorkItemList}. */
|
|
1246
|
-
export const workflowWorkItemListSchema = z.object({
|
|
1247
|
-
/** Opaque cursor for the next page, or null at the end. */
|
|
1248
|
-
after_cursor: z.string().optional().describe("Opaque cursor for the next page, or null at the end."),
|
|
1249
|
-
/** Always null because queue pagination is forward-only. */
|
|
1250
|
-
before_cursor: z.string().optional().describe("Always null because queue pagination is forward-only."),
|
|
1251
|
-
/** Active work items. Lease tokens are intentionally never included in list responses. */
|
|
1252
|
-
data: z.array(workflowWorkItemSchema).describe("Active work items. Lease tokens are intentionally never included in list responses."),
|
|
1253
|
-
/** Whether another page of work exists. */
|
|
1254
|
-
has_more: z.boolean().describe("Whether another page of work exists."),
|
|
1255
|
-
}).describe("Active durable workflow work available to the viewer.");
|
|
1256
1264
|
/** Runtime validator for {@link WorkingMemoryEntry}. */
|
|
1257
1265
|
export const workingMemoryEntrySchema = z.object({
|
|
1258
1266
|
/** ID of the agent that owns this memory entry (`agt_...`). */
|
|
@@ -1290,7 +1298,7 @@ export const workingMemoryEntryListResponseSchema = z.object({
|
|
|
1290
1298
|
/** Runtime validator for {@link SolutionAutomationInvokeContract}. */
|
|
1291
1299
|
export const solutionAutomationInvokeContractSchema = z.object({
|
|
1292
1300
|
/** 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.
|
|
1301
|
+
input_schema: z.record(z.custom((value) => value !== undefined)).nullable().optional().describe("JSON Schema validated against the whole invoke payload, from the automation's `input_schema_config`. `null` when none is configured."),
|
|
1294
1302
|
/** 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
1303
|
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."),
|
|
1296
1304
|
/** Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected. */
|
|
@@ -1337,7 +1345,7 @@ export const solutionSummarySchema = z.object({
|
|
|
1337
1345
|
/** 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
1346
|
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."),
|
|
1339
1347
|
/** 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. */
|
|
1340
|
-
events: z.record(z.
|
|
1348
|
+
events: z.record(z.custom((value) => value !== undefined)).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."),
|
|
1341
1349
|
/** Solution config ID (`cfg_...`). */
|
|
1342
1350
|
id: z.string().describe("Solution config ID (`cfg_...`)."),
|
|
1343
1351
|
/** 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. */
|
|
@@ -1351,7 +1359,7 @@ export const solutionSummarySchema = z.object({
|
|
|
1351
1359
|
/** The lookup key stored on the Solution config, if one was assigned during import. `null` when no lookup key was set. */
|
|
1352
1360
|
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."),
|
|
1353
1361
|
/** 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. */
|
|
1354
|
-
metadata: z.record(z.
|
|
1362
|
+
metadata: z.record(z.custom((value) => value !== undefined)).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."),
|
|
1355
1363
|
/** Human-facing display name declared in the Solution body. `null` when the Solution body does not set one. */
|
|
1356
1364
|
name: z.string().nullable().optional().describe("Human-facing display name declared in the Solution body. `null` when the Solution body does not set one."),
|
|
1357
1365
|
/** Organization ID (`org_...`) that owns this Solution config, when the Solution is scoped to a specific org. `null` for system-scope (app-level) Solutions. */
|
|
@@ -1417,7 +1425,7 @@ export const agentSchema = z.object({
|
|
|
1417
1425
|
/** Stable, user-defined identifier for this agent within the application. Unique per app. */
|
|
1418
1426
|
lookup_key: z.string().nullable().optional().describe("Stable, user-defined identifier for this agent within the application. Unique per app."),
|
|
1419
1427
|
/** Arbitrary key-value metadata attached to the agent. Not interpreted by the platform. */
|
|
1420
|
-
metadata: z.record(z.
|
|
1428
|
+
metadata: z.record(z.custom((value) => value !== undefined)).optional().describe("Arbitrary key-value metadata attached to the agent. Not interpreted by the platform."),
|
|
1421
1429
|
/** Human-readable display name for the agent. `null` if not set. */
|
|
1422
1430
|
name: z.string().optional().describe("Human-readable display name for the agent. `null` if not set."),
|
|
1423
1431
|
/** ID of the organization this agent belongs to (`org_...`). `null` if the agent is not org-scoped. */
|
|
@@ -1448,7 +1456,7 @@ export const agentComputerSchema = z.object({
|
|
|
1448
1456
|
/** ID of the app this computer belongs to (`dap_...`). */
|
|
1449
1457
|
app: z.string().optional().describe("ID of the app this computer belongs to (`dap_...`)."),
|
|
1450
1458
|
/** Provider-specific configuration key-value pairs for the computer. Structure depends on the underlying compute provider. */
|
|
1451
|
-
config: z.record(z.
|
|
1459
|
+
config: z.record(z.custom((value) => value !== undefined)).optional().describe("Provider-specific configuration key-value pairs for the computer. Structure depends on the underlying compute provider."),
|
|
1452
1460
|
/** When the computer was created (ISO 8601). */
|
|
1453
1461
|
created_at: z.string().optional().describe("When the computer was created (ISO 8601)."),
|
|
1454
1462
|
/** Human-readable error description when `status` is `"error"`. `null` otherwise. */
|
|
@@ -1460,7 +1468,7 @@ export const agentComputerSchema = z.object({
|
|
|
1460
1468
|
/** Unique, stable identifier you assign to this computer within its app. `null` if not set. */
|
|
1461
1469
|
lookup_key: z.string().optional().describe("Unique, stable identifier you assign to this computer within its app. `null` if not set."),
|
|
1462
1470
|
/** Arbitrary key-value metadata you attached to the computer. `null` if none was provided. */
|
|
1463
|
-
metadata: z.record(z.
|
|
1471
|
+
metadata: z.record(z.custom((value) => value !== undefined)).optional().describe("Arbitrary key-value metadata you attached to the computer. `null` if none was provided."),
|
|
1464
1472
|
/** Human-readable display name for the computer. `null` if not set. */
|
|
1465
1473
|
name: z.string().optional().describe("Human-readable display name for the computer. `null` if not set."),
|
|
1466
1474
|
/** Compute backend powering this computer: `"sprites"` (Fly Sprites) or `"vercel"` (Vercel Sandbox). */
|
|
@@ -1500,7 +1508,7 @@ export const agentCreateResponseSchema = z.object({
|
|
|
1500
1508
|
/** Unique, stable identifier for the agent within its app. `null` if not set. */
|
|
1501
1509
|
lookup_key: z.string().nullable().optional().describe("Unique, stable identifier for the agent within its app. `null` if not set."),
|
|
1502
1510
|
/** Arbitrary key-value metadata attached to the agent. `null` if none was provided. */
|
|
1503
|
-
metadata: z.record(z.
|
|
1511
|
+
metadata: z.record(z.custom((value) => value !== undefined)).optional().describe("Arbitrary key-value metadata attached to the agent. `null` if none was provided."),
|
|
1504
1512
|
/** Human-readable display name for the agent. `null` if not set. */
|
|
1505
1513
|
name: z.string().optional().describe("Human-readable display name for the agent. `null` if not set."),
|
|
1506
1514
|
/** ID of the organization this agent belongs to (`org_...`). `null` for agents outside an org. */
|
|
@@ -1545,24 +1553,24 @@ export const agentExportSchema = z.object({
|
|
|
1545
1553
|
/** Ordered list of config file objects that the agent depends on. Included in full so the import can recreate all dependencies without additional requests. */
|
|
1546
1554
|
configs: z.array(configSchema).describe("Ordered list of config file objects that the agent depends on. Included in full so the import can recreate all dependencies without additional requests."),
|
|
1547
1555
|
/** The agent template definition as a structured map. Pass this directly to the import endpoint to recreate the agent. */
|
|
1548
|
-
template: z.record(z.
|
|
1556
|
+
template: z.record(z.custom((value) => value !== undefined)).describe("The agent template definition as a structured map. Pass this directly to the import endpoint to recreate the agent."),
|
|
1549
1557
|
}).describe("A portable export bundle for an agent, containing everything needed to re-deploy it in another workspace or environment.");
|
|
1550
1558
|
/** Runtime validator for {@link AgentHealth}. */
|
|
1551
1559
|
export const agentHealthSchema = z.object({
|
|
1552
1560
|
/** Timestamps for the agent's most recent and next scheduled activity, used to surface last-run and upcoming-run information. */
|
|
1553
|
-
activity: z.record(z.
|
|
1561
|
+
activity: z.record(z.custom((value) => value !== undefined)).describe("Timestamps for the agent's most recent and next scheduled activity, used to surface last-run and upcoming-run information."),
|
|
1554
1562
|
/** The agent this health profile describes. */
|
|
1555
1563
|
agent: agentSchema.describe("The agent this health profile describes."),
|
|
1556
1564
|
/** When the health profile was last computed (ISO 8601). */
|
|
1557
1565
|
checked_at: z.string().describe("When the health profile was last computed (ISO 8601)."),
|
|
1558
1566
|
/** Renderable health check results. Each object includes at minimum `key`, `label`, `status`, and `summary` fields. */
|
|
1559
|
-
checks: z.array(z.record(z.
|
|
1567
|
+
checks: z.array(z.record(z.custom((value) => value !== undefined))).describe("Renderable health check results. Each object includes at minimum `key`, `label`, `status`, and `summary` fields."),
|
|
1560
1568
|
/** Action counts broken down by dependency area and resolution status, used to render progress indicators per category. */
|
|
1561
|
-
counts: z.record(z.
|
|
1569
|
+
counts: z.record(z.custom((value) => value !== undefined)).describe("Action counts broken down by dependency area and resolution status, used to render progress indicators per category."),
|
|
1562
1570
|
/** All actionable items tracked for this agent, including both `"setup"` items (post-install checklist) and `"health"` items (probe-detected issues). Sorted by `(source, sort_order, id)`. Use each item's `params` field to construct deep-links that route the user to the correct resolution flow. */
|
|
1563
1571
|
health_actions: z.array(agentHealthActionSchema).describe("All actionable items tracked for this agent, including both `\"setup\"` items (post-install checklist) and `\"health\"` items (probe-detected issues). Sorted by `(source, sort_order, id)`. Use each item's `params` field to construct deep-links that route the user to the correct resolution flow."),
|
|
1564
1572
|
/** Recent execution metrics for the agent, including run counts and failure counts over a recent time window. */
|
|
1565
|
-
recent: z.record(z.
|
|
1573
|
+
recent: z.record(z.custom((value) => value !== undefined)).describe("Recent execution metrics for the agent, including run counts and failure counts over a recent time window."),
|
|
1566
1574
|
/** Normalized health score from `0` (fully degraded) to `100` (fully healthy), derived from the weight and status of all health actions. */
|
|
1567
1575
|
score: z.number().int().describe("Normalized health score from `0` (fully degraded) to `100` (fully healthy), derived from the weight and status of all health actions."),
|
|
1568
1576
|
/** Overall health status of the agent. One of `"ok"`, `"warning"`, or `"critical"`. */
|
|
@@ -1600,7 +1608,7 @@ export const agentRoutineSchema = z.object({
|
|
|
1600
1608
|
/** Optional description of what this routine does. `null` when not set. */
|
|
1601
1609
|
description: z.string().optional().describe("Optional description of what this routine does. `null` when not set."),
|
|
1602
1610
|
/** Additional configuration controlling how the event trigger is matched or filtered. Shape depends on `event_type`. `null` when not configured. */
|
|
1603
|
-
event_config: z.record(z.
|
|
1611
|
+
event_config: z.record(z.custom((value) => value !== undefined)).optional().describe("Additional configuration controlling how the event trigger is matched or filtered. Shape depends on `event_type`. `null` when not configured."),
|
|
1604
1612
|
/** Platform event type that triggers this routine, e.g. `"agentroutine.invoked"`. `null` for schedule-only routines. */
|
|
1605
1613
|
event_type: z.string().optional().describe("Platform event type that triggers this routine, e.g. `\"agentroutine.invoked\"`. `null` for schedule-only routines."),
|
|
1606
1614
|
/** Execution strategy for this routine. One of `"workflow_graph"`, `"script"`, `"preset"`, or `"chain"`. */
|
|
@@ -1614,7 +1622,7 @@ export const agentRoutineSchema = z.object({
|
|
|
1614
1622
|
/** Visibility and explicit recipient selection for messages emitted by this routine. */
|
|
1615
1623
|
message_policy: messagePolicySchema.optional().describe("Visibility and explicit recipient selection for messages emitted by this routine."),
|
|
1616
1624
|
/** Arbitrary key-value metadata attached to this routine. `null` when not set. */
|
|
1617
|
-
metadata: z.record(z.
|
|
1625
|
+
metadata: z.record(z.custom((value) => value !== undefined)).optional().describe("Arbitrary key-value metadata attached to this routine. `null` when not set."),
|
|
1618
1626
|
/** Human-readable name for the routine. */
|
|
1619
1627
|
name: z.string().optional().describe("Human-readable name for the routine."),
|
|
1620
1628
|
/** Resolved preset configuration when `handler_type` is `"preset"`. `null` for other handler types. */
|
|
@@ -1628,7 +1636,7 @@ export const agentRoutineSchema = z.object({
|
|
|
1628
1636
|
/** Lifecycle status of the routine. One of `"draft"`, `"active"`, or `"paused"`. Only `"active"` routines respond to triggers. */
|
|
1629
1637
|
status: z.string().optional().describe("Lifecycle status of the routine. One of `\"draft\"`, `\"active\"`, or `\"paused\"`. Only `\"active\"` routines respond to triggers."),
|
|
1630
1638
|
/** Ordered list of chain steps (present when handler_type is "chain"). Each step is a plain map with handler_type, optional body fields (preset_name / preset_config / script / config), and step-local plumbing (name, inputs, output_key, on_error). */
|
|
1631
|
-
steps: z.array(z.record(z.
|
|
1639
|
+
steps: z.array(z.record(z.custom((value) => value !== undefined))).optional().describe("Ordered list of chain steps (present when handler_type is \"chain\"). Each step is a plain map with handler_type, optional body fields (preset_name / preset_config / script / config), and step-local plumbing (name, inputs, output_key, on_error)."),
|
|
1632
1640
|
/** Execution context in which runs are created. One of `"event"` (background job) or `"chat_session"` (interactive session). Defaults to `"event"`. */
|
|
1633
1641
|
trigger_context: z.string().optional().describe("Execution context in which runs are created. One of `\"event\"` (background job) or `\"chat_session\"` (interactive session). Defaults to `\"event\"`."),
|
|
1634
1642
|
/** When this routine was last updated (ISO 8601). */
|
|
@@ -1677,19 +1685,19 @@ export const agentRoutineRunSchema = z.object({
|
|
|
1677
1685
|
/** Routine run ID (`arr_...`). */
|
|
1678
1686
|
id: z.string().describe("Routine run ID (`arr_...`)."),
|
|
1679
1687
|
/** Arbitrary key-value metadata attached to this run. Empty object when no metadata was set. */
|
|
1680
|
-
metadata: z.record(z.
|
|
1688
|
+
metadata: z.record(z.custom((value) => value !== undefined)).optional().describe("Arbitrary key-value metadata attached to this run. Empty object when no metadata was set."),
|
|
1681
1689
|
/** Invoke-time map of symbolic participant references to agent IDs. `null` when no participants were supplied. */
|
|
1682
|
-
participants: z.record(z.
|
|
1690
|
+
participants: z.record(z.custom((value) => value !== undefined)).optional().describe("Invoke-time map of symbolic participant references to agent IDs. `null` when no participants were supplied."),
|
|
1683
1691
|
/** Input payload delivered to the routine when this run was triggered. Empty object when no payload was provided. */
|
|
1684
|
-
payload: z.record(z.
|
|
1692
|
+
payload: z.record(z.custom((value) => value !== undefined)).optional().describe("Input payload delivered to the routine when this run was triggered. Empty object when no payload was provided."),
|
|
1685
1693
|
/** Output produced by the routine after execution. `null` while the run has not yet completed. */
|
|
1686
|
-
result: z.record(z.
|
|
1694
|
+
result: z.record(z.custom((value) => value !== undefined)).optional().describe("Output produced by the routine after execution. `null` while the run has not yet completed."),
|
|
1687
1695
|
/** ID of the parent routine that produced this run (`arn_...`). */
|
|
1688
1696
|
routine: z.string().optional().describe("ID of the parent routine that produced this run (`arn_...`)."),
|
|
1689
1697
|
/** Current execution status. One of `"pending"`, `"running"`, `"completed"`, `"failed"`, `"skipped"`, or `"cancelled"`. */
|
|
1690
1698
|
status: z.string().optional().describe("Current execution status. One of `\"pending\"`, `\"running\"`, `\"completed\"`, `\"failed\"`, `\"skipped\"`, or `\"cancelled\"`."),
|
|
1691
1699
|
/** Validated structured output extracted from `result` when the routine uses an AgentMessageSchema. `null` if the routine does not use a schema or the run has not completed. */
|
|
1692
|
-
structured_response: z.record(z.
|
|
1700
|
+
structured_response: z.record(z.custom((value) => value !== undefined)).optional().describe("Validated structured output extracted from `result` when the routine uses an AgentMessageSchema. `null` if the routine does not use a schema or the run has not completed."),
|
|
1693
1701
|
/** When this run was last updated (ISO 8601). */
|
|
1694
1702
|
updated_at: z.string().optional().describe("When this run was last updated (ISO 8601)."),
|
|
1695
1703
|
/** Background worker status. `null` when no worker job is associated with this run. */
|
|
@@ -1723,7 +1731,7 @@ export const agentScheduleSchema = z.object({
|
|
|
1723
1731
|
/** Maximum number of times a recurring schedule may fire before automatically transitioning to `"completed"`. `null` means no limit. */
|
|
1724
1732
|
max_runs: z.number().int().optional().describe("Maximum number of times a recurring schedule may fire before automatically transitioning to `\"completed\"`. `null` means no limit."),
|
|
1725
1733
|
/** Arbitrary key-value pairs attached to the schedule by the agent. Not interpreted by the platform. */
|
|
1726
|
-
metadata: z.record(z.
|
|
1734
|
+
metadata: z.record(z.custom((value) => value !== undefined)).optional().describe("Arbitrary key-value pairs attached to the schedule by the agent. Not interpreted by the platform."),
|
|
1727
1735
|
/** UTC datetime of the next planned execution. `null` if the schedule has completed, been cancelled, or has not yet been computed. */
|
|
1728
1736
|
next_run_at: z.string().optional().describe("UTC datetime of the next planned execution. `null` if the schedule has completed, been cancelled, or has not yet been computed."),
|
|
1729
1737
|
/** Total number of times this schedule has fired. */
|
|
@@ -1754,7 +1762,7 @@ export const agentSessionSchema = z.object({
|
|
|
1754
1762
|
/** Session ID (`ase_...`). */
|
|
1755
1763
|
id: z.string().describe("Session ID (`ase_...`)."),
|
|
1756
1764
|
/** Ordered list of messages delivered to the session's inbox while it was in the `"waiting"` state. Each entry includes `id`, `role`, `content`, `sender_id`, `sender_type`, `sent_at`, and `metadata`. */
|
|
1757
|
-
inbox: z.array(z.record(z.
|
|
1765
|
+
inbox: z.array(z.record(z.custom((value) => value !== undefined))).optional().describe("Ordered list of messages delivered to the session's inbox while it was in the `\"waiting\"` state. Each entry includes `id`, `role`, `content`, `sender_id`, `sender_type`, `sent_at`, and `metadata`."),
|
|
1758
1766
|
/** The task the agent is instructed to perform in this session. */
|
|
1759
1767
|
instructions: z.string().optional().describe("The task the agent is instructed to perform in this session."),
|
|
1760
1768
|
/** `true` if this session was created by the platform internally (e.g. by a schedule or health action) rather than by a user or API caller. */
|
|
@@ -1766,11 +1774,11 @@ export const agentSessionSchema = z.object({
|
|
|
1766
1774
|
/** Maximum number of agent turns (LLM calls) allowed before the session is forcibly terminated. Defaults to `100`. */
|
|
1767
1775
|
max_turns: z.number().int().optional().describe("Maximum number of agent turns (LLM calls) allowed before the session is forcibly terminated. Defaults to `100`."),
|
|
1768
1776
|
/** Arbitrary key-value pairs attached to the session. Not interpreted by the platform. */
|
|
1769
|
-
metadata: z.record(z.
|
|
1777
|
+
metadata: z.record(z.custom((value) => value !== undefined)).optional().describe("Arbitrary key-value pairs attached to the session. Not interpreted by the platform."),
|
|
1770
1778
|
/** Optional human-readable label for the session. `null` when not set. */
|
|
1771
1779
|
name: z.string().optional().describe("Optional human-readable label for the session. `null` when not set."),
|
|
1772
1780
|
/** Structured output produced by the session on successful completion. Shape is agent-defined. `null` while the session is still running or if it failed. */
|
|
1773
|
-
result: z.record(z.
|
|
1781
|
+
result: z.record(z.custom((value) => value !== undefined)).optional().describe("Structured output produced by the session on successful completion. Shape is agent-defined. `null` while the session is still running or if it failed."),
|
|
1774
1782
|
/** When the session began executing. `null` if still `"pending"`. */
|
|
1775
1783
|
started_at: z.string().optional().describe("When the session began executing. `null` if still `\"pending\"`."),
|
|
1776
1784
|
/** Current execution status. One of `"pending"` (queued, not yet started), `"running"` (actively executing), `"waiting"` (paused for an inbox message or external event), `"completed"` (finished successfully), `"failed"` (terminated with an error), or `"cancelled"` (manually stopped). */
|
|
@@ -1800,7 +1808,7 @@ export const agentSkillSchema = z.object({
|
|
|
1800
1808
|
/** ID of the agent template config from which this skill was last provisioned or updated (`cfg_...`). `null` if the skill was not provisioned from a template. */
|
|
1801
1809
|
last_applied_template_config: z.string().optional().describe("ID of the agent template config from which this skill was last provisioned or updated (`cfg_...`). `null` if the skill was not provisioned from a template."),
|
|
1802
1810
|
/** Arbitrary key-value pairs attached to the skill. Not interpreted by the platform. */
|
|
1803
|
-
metadata: z.record(z.
|
|
1811
|
+
metadata: z.record(z.custom((value) => value !== undefined)).optional().describe("Arbitrary key-value pairs attached to the skill. Not interpreted by the platform."),
|
|
1804
1812
|
/** Whether the skill is currently in use. `"active"` means the agent will use this skill during sessions. `"inactive"` means it is disabled but not deleted. */
|
|
1805
1813
|
status: z.string().optional().describe("Whether the skill is currently in use. `\"active\"` means the agent will use this skill during sessions. `\"inactive\"` means it is disabled but not deleted."),
|
|
1806
1814
|
/** When the skill was last modified (ISO 8601). */
|
|
@@ -1820,7 +1828,7 @@ export const agentToolSchema = z.object({
|
|
|
1820
1828
|
/** `true` when the tool executes asynchronously and returns a task handle rather than an immediate result. */
|
|
1821
1829
|
async: z.boolean().optional().describe("`true` when the tool executes asynchronously and returns a task handle rather than an immediate result."),
|
|
1822
1830
|
/** Provider-specific configuration for the built-in tool. Present only when `kind` is `"builtin"`. Shape varies by `builtin_tool_key`. */
|
|
1823
|
-
builtin_tool_config: z.record(z.
|
|
1831
|
+
builtin_tool_config: z.record(z.custom((value) => value !== undefined)).optional().describe("Provider-specific configuration for the built-in tool. Present only when `kind` is `\"builtin\"`. Shape varies by `builtin_tool_key`."),
|
|
1824
1832
|
/** Registry key identifying the built-in tool implementation. Present only when `kind` is `"builtin"`. */
|
|
1825
1833
|
builtin_tool_key: z.string().optional().describe("Registry key identifying the built-in tool implementation. Present only when `kind` is `\"builtin\"`."),
|
|
1826
1834
|
/** ID of the config record (`cfg_...`) containing this tool's full configuration. `null` for inline-only tools. */
|
|
@@ -1842,13 +1850,13 @@ export const agentToolSchema = z.object({
|
|
|
1842
1850
|
/** Stable, user-defined identifier for this tool within the agent. Unique per agent. */
|
|
1843
1851
|
lookup_key: z.string().optional().describe("Stable, user-defined identifier for this tool within the agent. Unique per agent."),
|
|
1844
1852
|
/** Arbitrary key-value metadata attached to the tool. Not interpreted by the platform. */
|
|
1845
|
-
metadata: z.record(z.
|
|
1853
|
+
metadata: z.record(z.custom((value) => value !== undefined)).optional().describe("Arbitrary key-value metadata attached to the tool. Not interpreted by the platform."),
|
|
1846
1854
|
/** Human-readable name of the tool as exposed to the LLM. Resolved from the built-in registry for `kind: "builtin"` tools. */
|
|
1847
1855
|
name: z.string().optional().describe("Human-readable name of the tool as exposed to the LLM. Resolved from the built-in registry for `kind: \"builtin\"` tools."),
|
|
1848
1856
|
/** Per-instance namespace prepended to LLM-facing tool names for built-in tools that support multiple instances per agent. `null` when not applicable. */
|
|
1849
1857
|
name_prefix: z.string().optional().describe("Per-instance namespace prepended to LLM-facing tool names for built-in tools that support multiple instances per agent. `null` when not applicable."),
|
|
1850
1858
|
/** JSON Schema object describing the tool's input parameters as presented to the LLM. */
|
|
1851
|
-
parameters: z.record(z.
|
|
1859
|
+
parameters: z.record(z.custom((value) => value !== undefined)).optional().describe("JSON Schema object describing the tool's input parameters as presented to the LLM."),
|
|
1852
1860
|
/** ID of the config record (`cfg_...`) storing the tool's parameter schema. `null` when parameters are defined inline. */
|
|
1853
1861
|
parameters_config: z.string().optional().describe("ID of the config record (`cfg_...`) storing the tool's parameter schema. `null` when parameters are defined inline."),
|
|
1854
1862
|
/** Current status of the tool. One of `"active"` or `"disabled"`. */
|
|
@@ -1864,15 +1872,15 @@ export const agentToolListResponseSchema = z.object({
|
|
|
1864
1872
|
/** Runtime validator for {@link AgentUpgradeFieldChange}. */
|
|
1865
1873
|
export const agentUpgradeFieldChangeSchema = z.object({
|
|
1866
1874
|
/** Value that was set by the last-applied template version (pinned baseline). Populated only on `agent_base` field changes. `null` when no baseline is available (legacy agent or deleted version). */
|
|
1867
|
-
baseline: z.
|
|
1875
|
+
baseline: z.custom((value) => value !== undefined).optional().describe("Value that was set by the last-applied template version (pinned baseline). Populated only on `agent_base` field changes. `null` when no baseline is available (legacy agent or deleted version)."),
|
|
1868
1876
|
/** Name of the field that will change, e.g. `"name"` or `"identity"`. */
|
|
1869
1877
|
field: z.string().describe("Name of the field that will change, e.g. `\"name\"` or `\"identity\"`."),
|
|
1870
1878
|
/** `true` when the agent's current value differs from `baseline`, indicating a local edit that this upgrade will overwrite. `false` when the current value matches the baseline. `null` when `baseline` is unavailable. Populated only on `agent_base` field changes. */
|
|
1871
1879
|
locally_edited: z.boolean().optional().describe("`true` when the agent's current value differs from `baseline`, indicating a local edit that this upgrade will overwrite. `false` when the current value matches the baseline. `null` when `baseline` is unavailable. Populated only on `agent_base` field changes."),
|
|
1872
1880
|
/** Incoming value the field will be set to after the upgrade (string, number, boolean, or `null`). */
|
|
1873
|
-
new: z.
|
|
1881
|
+
new: z.custom((value) => value !== undefined).optional().describe("Incoming value the field will be set to after the upgrade (string, number, boolean, or `null`)."),
|
|
1874
1882
|
/** Current value of the field before the upgrade (string, number, boolean, or `null`). */
|
|
1875
|
-
old: z.
|
|
1883
|
+
old: z.custom((value) => value !== undefined).optional().describe("Current value of the field before the upgrade (string, number, boolean, or `null`)."),
|
|
1876
1884
|
}).describe("One field-level diff entry within an agent upgrade change, describing how a single field will change. `baseline` and `locally_edited` are populated only for `agent_base` entries; child resource entries (tools, routines, skills, computers) carry only `field`, `old`, and `new`.");
|
|
1877
1885
|
/** Runtime validator for {@link AgentUpgradeChange}. */
|
|
1878
1886
|
export const agentUpgradeChangeSchema = z.object({
|
|
@@ -1891,7 +1899,7 @@ export const agentUpgradeChangeSchema = z.object({
|
|
|
1891
1899
|
/** Summary of the parent AgentTemplate config (`cfg_...`) being applied in this upgrade. */
|
|
1892
1900
|
parent_template_config: upgradeTemplateSummarySchema.describe("Summary of the parent AgentTemplate config (`cfg_...`) being applied in this upgrade."),
|
|
1893
1901
|
/** Resource-type-specific identity details. Tools: `tool_type`, `builtin_tool_key`, `name_prefix`, `handler_type`, `instruction`. Routines: `handler_type`, `preset_name`, `event_type`, `schedule`, `trigger_context`. Skills: `instruction`. Computers: `region`. Only populated keys are present; `null` when nothing is known. */
|
|
1894
|
-
resource: z.record(z.
|
|
1902
|
+
resource: z.record(z.custom((value) => value !== undefined)).optional().describe("Resource-type-specific identity details. Tools: `tool_type`, `builtin_tool_key`, `name_prefix`, `handler_type`, `instruction`. Routines: `handler_type`, `preset_name`, `event_type`, `schedule`, `trigger_context`. Skills: `instruction`. Computers: `region`. Only populated keys are present; `null` when nothing is known."),
|
|
1895
1903
|
/** Type of the child resource being changed. One of `"agent"`, `"tool"`, `"routine"`, `"skill"`, or `"computer"`. */
|
|
1896
1904
|
resource_type: z.string().describe("Type of the child resource being changed. One of `\"agent\"`, `\"tool\"`, `\"routine\"`, `\"skill\"`, or `\"computer\"`."),
|
|
1897
1905
|
/** Summary of the specific child template config (`cfg_...`) that defines this resource. `null` when no source template is resolvable. */
|
|
@@ -1949,7 +1957,7 @@ export const solutionCategorySummarySchema = z.object({
|
|
|
1949
1957
|
/** Lookup key of the underlying config record. `null` when not set. */
|
|
1950
1958
|
lookup_key: z.string().optional().describe("Lookup key of the underlying config record. `null` when not set."),
|
|
1951
1959
|
/** Arbitrary key-value metadata attached to this category by the publisher. */
|
|
1952
|
-
metadata: z.record(z.
|
|
1960
|
+
metadata: z.record(z.custom((value) => value !== undefined)).optional().describe("Arbitrary key-value metadata attached to this category by the publisher."),
|
|
1953
1961
|
/** Display name shown to users. `null` when not configured. */
|
|
1954
1962
|
name: z.string().optional().describe("Display name shown to users. `null` when not configured."),
|
|
1955
1963
|
/** Organization ID (`org_...`) that owns this category. `null` for system-scoped categories. */
|
|
@@ -2123,7 +2131,7 @@ export const solutionInstanceSchema = z.object({
|
|
|
2123
2131
|
/** Human-readable display name of the materialized agent. `null` when no agent is visible. */
|
|
2124
2132
|
agent_name: z.string().nullable().optional().describe("Human-readable display name of the materialized agent. `null` when no agent is visible."),
|
|
2125
2133
|
/** Opaque tagged reference to the deployment target. Consumers interpret its kind. */
|
|
2126
|
-
attachment_ref: z.record(z.
|
|
2134
|
+
attachment_ref: z.record(z.custom((value) => value !== undefined)).nullable().optional().describe("Opaque tagged reference to the deployment target. Consumers interpret its kind."),
|
|
2127
2135
|
/** When this instance was stamped. */
|
|
2128
2136
|
created_at: z.string().describe("When this instance was stamped."),
|
|
2129
2137
|
/** Stable vendor-defined key for the customer. */
|
|
@@ -2188,7 +2196,7 @@ export const solutionTagSummarySchema = z.object({
|
|
|
2188
2196
|
/** Human-readable stable identifier for this tag config, used for lookups and imports. `null` if not assigned. */
|
|
2189
2197
|
lookup_key: z.string().optional().describe("Human-readable stable identifier for this tag config, used for lookups and imports. `null` if not assigned."),
|
|
2190
2198
|
/** Arbitrary key-value metadata attached to this tag. Empty object `{}` when no metadata is present. */
|
|
2191
|
-
metadata: z.record(z.
|
|
2199
|
+
metadata: z.record(z.custom((value) => value !== undefined)).optional().describe("Arbitrary key-value metadata attached to this tag. Empty object `{}` when no metadata is present."),
|
|
2192
2200
|
/** Human-readable display name for the tag. `null` if not yet set. */
|
|
2193
2201
|
name: z.string().optional().describe("Human-readable display name for the tag. `null` if not yet set."),
|
|
2194
2202
|
/** ID of the organization that owns this tag (`org_...`). `null` for system-scoped tags. */
|