@archastro/sdk 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +86 -0
- package/dist/auth.d.ts +143 -0
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +187 -1
- package/dist/auth.js.map +1 -1
- package/dist/client.d.ts +26 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +27 -1
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/types/ai.d.ts +150 -12
- package/dist/types/ai.d.ts.map +1 -1
- package/dist/types/ai.js +71 -41
- package/dist/types/ai.js.map +1 -1
- package/dist/types/artifacts.d.ts +81 -24
- package/dist/types/artifacts.d.ts.map +1 -1
- package/dist/types/artifacts.js +39 -21
- package/dist/types/artifacts.js.map +1 -1
- package/dist/types/automations.d.ts +41 -9
- package/dist/types/automations.d.ts.map +1 -1
- package/dist/types/automations.js +25 -17
- package/dist/types/automations.js.map +1 -1
- package/dist/types/chat.d.ts +21418 -0
- package/dist/types/chat.d.ts.map +1 -0
- package/dist/types/chat.js +70 -0
- package/dist/types/chat.js.map +1 -0
- package/dist/types/common.d.ts +16970 -2136
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/common.js +1695 -332
- package/dist/types/common.js.map +1 -1
- package/dist/types/config.d.ts +239 -31
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js +86 -34
- package/dist/types/config.js.map +1 -1
- package/dist/types/image.d.ts +27 -4
- package/dist/types/image.d.ts.map +1 -1
- package/dist/types/image.js +17 -10
- package/dist/types/image.js.map +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +3 -2
- package/dist/types/index.js.map +1 -1
- package/dist/types/invites.d.ts +20 -11
- package/dist/types/invites.d.ts.map +1 -1
- package/dist/types/invites.js +9 -12
- package/dist/types/invites.js.map +1 -1
- package/dist/types/notifications.d.ts +163 -0
- package/dist/types/notifications.d.ts.map +1 -0
- package/dist/types/notifications.js +44 -0
- package/dist/types/notifications.js.map +1 -0
- package/dist/types/teams.d.ts +1628 -231
- package/dist/types/teams.d.ts.map +1 -1
- package/dist/types/teams.js +76 -45
- package/dist/types/teams.js.map +1 -1
- package/dist/types/threads.d.ts +997 -243
- package/dist/types/threads.d.ts.map +1 -1
- package/dist/types/threads.js +84 -51
- package/dist/types/threads.js.map +1 -1
- package/dist/types/users.d.ts +98 -18
- package/dist/types/users.d.ts.map +1 -1
- package/dist/types/users.js +43 -18
- package/dist/types/users.js.map +1 -1
- package/dist/v1/resources/activity_feed.d.ts +89 -0
- package/dist/v1/resources/activity_feed.d.ts.map +1 -1
- package/dist/v1/resources/activity_feed.js +56 -2
- package/dist/v1/resources/activity_feed.js.map +1 -1
- package/dist/v1/resources/agent_computers.d.ts +48 -2
- package/dist/v1/resources/agent_computers.d.ts.map +1 -1
- package/dist/v1/resources/agent_computers.js +48 -1
- package/dist/v1/resources/agent_computers.js.map +1 -1
- package/dist/v1/resources/agent_env_vars.d.ts +50 -0
- package/dist/v1/resources/agent_env_vars.d.ts.map +1 -0
- package/dist/v1/resources/agent_env_vars.js +56 -0
- package/dist/v1/resources/agent_env_vars.js.map +1 -0
- package/dist/v1/resources/agent_health_actions.d.ts +43 -0
- package/dist/v1/resources/agent_health_actions.d.ts.map +1 -0
- package/dist/v1/resources/agent_health_actions.js +50 -0
- package/dist/v1/resources/agent_health_actions.js.map +1 -0
- package/dist/v1/resources/agent_installations.d.ts +100 -0
- package/dist/v1/resources/agent_installations.d.ts.map +1 -1
- package/dist/v1/resources/agent_installations.js +106 -2
- package/dist/v1/resources/agent_installations.js.map +1 -1
- package/dist/v1/resources/agent_routine_runs.d.ts +33 -0
- package/dist/v1/resources/agent_routine_runs.d.ts.map +1 -0
- package/dist/v1/resources/agent_routine_runs.js +48 -0
- package/dist/v1/resources/agent_routine_runs.js.map +1 -0
- package/dist/v1/resources/agent_routines.d.ts +148 -2
- package/dist/v1/resources/agent_routines.d.ts.map +1 -1
- package/dist/v1/resources/agent_routines.js +168 -3
- package/dist/v1/resources/agent_routines.js.map +1 -1
- package/dist/v1/resources/agent_sessions.d.ts +118 -1
- package/dist/v1/resources/agent_sessions.d.ts.map +1 -1
- package/dist/v1/resources/agent_sessions.js +134 -2
- package/dist/v1/resources/agent_sessions.js.map +1 -1
- package/dist/v1/resources/agent_skills.d.ts +83 -1
- package/dist/v1/resources/agent_skills.d.ts.map +1 -1
- package/dist/v1/resources/agent_skills.js +87 -2
- package/dist/v1/resources/agent_skills.js.map +1 -1
- package/dist/v1/resources/agent_tools.d.ts +109 -2
- package/dist/v1/resources/agent_tools.d.ts.map +1 -1
- package/dist/v1/resources/agent_tools.js +114 -2
- package/dist/v1/resources/agent_tools.js.map +1 -1
- package/dist/v1/resources/agents.d.ts +517 -9
- package/dist/v1/resources/agents.d.ts.map +1 -1
- package/dist/v1/resources/agents.js +515 -12
- package/dist/v1/resources/agents.js.map +1 -1
- package/dist/v1/resources/ai.d.ts +93 -0
- package/dist/v1/resources/ai.d.ts.map +1 -1
- package/dist/v1/resources/ai.js +89 -1
- package/dist/v1/resources/ai.js.map +1 -1
- package/dist/v1/resources/artifacts.d.ts +73 -0
- package/dist/v1/resources/artifacts.d.ts.map +1 -1
- package/dist/v1/resources/artifacts.js +74 -2
- package/dist/v1/resources/artifacts.js.map +1 -1
- package/dist/v1/resources/automation_runs.d.ts +8 -4
- package/dist/v1/resources/automation_runs.d.ts.map +1 -1
- package/dist/v1/resources/automation_runs.js +9 -5
- package/dist/v1/resources/automation_runs.js.map +1 -1
- package/dist/v1/resources/automations.d.ts +20 -0
- package/dist/v1/resources/automations.d.ts.map +1 -1
- package/dist/v1/resources/automations.js +21 -1
- package/dist/v1/resources/automations.js.map +1 -1
- package/dist/v1/resources/bug_reports.d.ts +29 -0
- package/dist/v1/resources/bug_reports.d.ts.map +1 -0
- package/dist/v1/resources/bug_reports.js +29 -0
- package/dist/v1/resources/bug_reports.js.map +1 -0
- package/dist/v1/resources/config.d.ts +429 -4
- package/dist/v1/resources/config.d.ts.map +1 -1
- package/dist/v1/resources/config.js +493 -9
- package/dist/v1/resources/config.js.map +1 -1
- package/dist/v1/resources/custom_objects.d.ts +117 -2
- package/dist/v1/resources/custom_objects.d.ts.map +1 -1
- package/dist/v1/resources/custom_objects.js +132 -3
- package/dist/v1/resources/custom_objects.js.map +1 -1
- package/dist/v1/resources/files.d.ts +62 -0
- package/dist/v1/resources/files.d.ts.map +1 -0
- package/dist/v1/resources/files.js +58 -0
- package/dist/v1/resources/files.js.map +1 -0
- package/dist/v1/resources/index.d.ts +13 -0
- package/dist/v1/resources/index.d.ts.map +1 -1
- package/dist/v1/resources/index.js +14 -1
- package/dist/v1/resources/index.js.map +1 -1
- package/dist/v1/resources/installation_sources.d.ts +12 -0
- package/dist/v1/resources/installation_sources.d.ts.map +1 -1
- package/dist/v1/resources/installation_sources.js +13 -1
- package/dist/v1/resources/installation_sources.js.map +1 -1
- package/dist/v1/resources/invites.d.ts +15 -0
- package/dist/v1/resources/invites.d.ts.map +1 -1
- package/dist/v1/resources/invites.js +16 -1
- package/dist/v1/resources/invites.js.map +1 -1
- package/dist/v1/resources/knowledge_documents.d.ts +104 -0
- package/dist/v1/resources/knowledge_documents.d.ts.map +1 -0
- package/dist/v1/resources/knowledge_documents.js +112 -0
- package/dist/v1/resources/knowledge_documents.js.map +1 -0
- package/dist/v1/resources/knowledge_sources.d.ts +190 -0
- package/dist/v1/resources/knowledge_sources.d.ts.map +1 -0
- package/dist/v1/resources/knowledge_sources.js +176 -0
- package/dist/v1/resources/knowledge_sources.js.map +1 -0
- package/dist/v1/resources/kv.d.ts +73 -0
- package/dist/v1/resources/kv.d.ts.map +1 -1
- package/dist/v1/resources/kv.js +96 -3
- package/dist/v1/resources/kv.js.map +1 -1
- package/dist/v1/resources/notification_preferences.d.ts +61 -0
- package/dist/v1/resources/notification_preferences.d.ts.map +1 -0
- package/dist/v1/resources/notification_preferences.js +65 -0
- package/dist/v1/resources/notification_preferences.js.map +1 -0
- package/dist/v1/resources/notifications.d.ts +133 -0
- package/dist/v1/resources/notifications.d.ts.map +1 -0
- package/dist/v1/resources/notifications.js +136 -0
- package/dist/v1/resources/notifications.js.map +1 -0
- package/dist/v1/resources/orgs.d.ts +18 -0
- package/dist/v1/resources/orgs.d.ts.map +1 -1
- package/dist/v1/resources/orgs.js +30 -2
- package/dist/v1/resources/orgs.js.map +1 -1
- package/dist/v1/resources/slack_channel_bindings.d.ts +101 -0
- package/dist/v1/resources/slack_channel_bindings.d.ts.map +1 -0
- package/dist/v1/resources/slack_channel_bindings.js +114 -0
- package/dist/v1/resources/slack_channel_bindings.js.map +1 -0
- package/dist/v1/resources/solution_categories.d.ts +36 -0
- package/dist/v1/resources/solution_categories.d.ts.map +1 -0
- package/dist/v1/resources/solution_categories.js +55 -0
- package/dist/v1/resources/solution_categories.js.map +1 -0
- package/dist/v1/resources/solution_tags.d.ts +37 -0
- package/dist/v1/resources/solution_tags.d.ts.map +1 -0
- package/dist/v1/resources/solution_tags.js +54 -0
- package/dist/v1/resources/solution_tags.js.map +1 -0
- package/dist/v1/resources/solutions.d.ts +309 -0
- package/dist/v1/resources/solutions.d.ts.map +1 -0
- package/dist/v1/resources/solutions.js +214 -0
- package/dist/v1/resources/solutions.js.map +1 -0
- package/dist/v1/resources/team_memberships.d.ts +31 -0
- package/dist/v1/resources/team_memberships.d.ts.map +1 -1
- package/dist/v1/resources/team_memberships.js +49 -2
- package/dist/v1/resources/team_memberships.js.map +1 -1
- package/dist/v1/resources/teams.d.ts +458 -49
- package/dist/v1/resources/teams.d.ts.map +1 -1
- package/dist/v1/resources/teams.js +319 -27
- package/dist/v1/resources/teams.js.map +1 -1
- package/dist/v1/resources/thread_messages.d.ts +70 -0
- package/dist/v1/resources/thread_messages.d.ts.map +1 -1
- package/dist/v1/resources/thread_messages.js +85 -2
- package/dist/v1/resources/thread_messages.js.map +1 -1
- package/dist/v1/resources/threads.d.ts +201 -0
- package/dist/v1/resources/threads.d.ts.map +1 -1
- package/dist/v1/resources/threads.js +220 -4
- package/dist/v1/resources/threads.js.map +1 -1
- package/dist/v1/resources/users.d.ts +213 -39
- package/dist/v1/resources/users.d.ts.map +1 -1
- package/dist/v1/resources/users.js +121 -16
- package/dist/v1/resources/users.js.map +1 -1
- package/dist/v1.d.ts +26 -0
- package/dist/v1.d.ts.map +1 -1
- package/dist/v1.js +40 -1
- package/dist/v1.js.map +1 -1
- package/package.json +3 -1
- package/dist/types/agents.d.ts +0 -2084
- package/dist/types/agents.d.ts.map +0 -1
- package/dist/types/agents.js +0 -203
- package/dist/types/agents.js.map +0 -1
package/dist/types/common.js
CHANGED
|
@@ -1,369 +1,1732 @@
|
|
|
1
1
|
// Copyright (c) 2026 ArchAstro Inc. All Rights Reserved.
|
|
2
2
|
// This file is auto-generated by @archastro/sdk-generator. Do not edit.
|
|
3
|
-
// Content hash:
|
|
3
|
+
// Content hash: 0024f11212a3
|
|
4
4
|
import { z } from "zod";
|
|
5
|
+
import { configSchema } from "./config.js";
|
|
5
6
|
import { imageSourceSchema } from "./image.js";
|
|
6
7
|
import { userSchema } from "./users.js";
|
|
7
|
-
/**
|
|
8
|
+
/** Runtime validator for {@link AclGrant}. */
|
|
8
9
|
export const aclGrantSchema = z.object({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
/**
|
|
10
|
+
/** Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry. */
|
|
11
|
+
actions: z.array(z.string()).describe("Array of action strings the principal is permitted to perform, e.g. `[\"read\", \"write\"]`. Must contain at least one entry."),
|
|
12
|
+
/** The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`. */
|
|
13
|
+
principal: z.string().optional().describe("The identifier of the principal. A string ID for `\"user\"`, `\"team\"`, `\"org\"`, and `\"agent\"` types; one of `\"admin\"`, `\"member\"`, or `\"viewer\"` for `\"org_role\"`; omit entirely when `principal_type` is `\"everyone\"`."),
|
|
14
|
+
/** The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`. */
|
|
15
|
+
principal_type: z.string().describe("The kind of principal receiving the grant. One of `\"user\"`, `\"team\"`, `\"org\"`, `\"org_role\"`, `\"agent\"`, or `\"everyone\"`."),
|
|
16
|
+
}).describe("A single access-control grant that pairs a principal with the set of actions it is allowed to perform.");
|
|
17
|
+
/** Runtime validator for {@link AclRemoveTarget}. */
|
|
14
18
|
export const aclRemoveTargetSchema = z.object({
|
|
15
|
-
principal
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
**Replace mode** — send `grants` to replace all entries:
|
|
23
|
-
|
|
24
|
-
{"grants": [{"principal_type": "user", "principal": "...", "actions": ["read"]}]}
|
|
25
|
-
|
|
26
|
-
Use `{"grants": []}` to clear all entries.
|
|
27
|
-
|
|
28
|
-
**Patch mode** — send `add` and/or `remove`:
|
|
29
|
-
|
|
30
|
-
{"add": [...grants...], "remove": [{"principal_type": "user", "principal": "..."}]}
|
|
31
|
-
|
|
32
|
-
Cannot mix `grants` with `add`/`remove`.
|
|
33
|
-
*/
|
|
19
|
+
/** The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`. */
|
|
20
|
+
principal: z.string().optional().describe("The identifier of the principal to remove. A string ID for `\"user\"`, `\"team\"`, `\"org\"`, and `\"agent\"` types; one of `\"admin\"`, `\"member\"`, or `\"viewer\"` for `\"org_role\"`. Omit when `principal_type` is `\"everyone\"`."),
|
|
21
|
+
/** The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`. */
|
|
22
|
+
principal_type: z.string().describe("The kind of principal to remove. One of `\"user\"`, `\"team\"`, `\"org\"`, `\"org_role\"`, `\"agent\"`, or `\"everyone\"`."),
|
|
23
|
+
}).describe("Identifies a principal to be removed from an access-control list.");
|
|
24
|
+
/** Runtime validator for {@link Acl}. */
|
|
34
25
|
export const aclSchema = z.object({
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
26
|
+
/** Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`. */
|
|
27
|
+
add: z.array(aclGrantSchema).optional().describe("Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`."),
|
|
28
|
+
/** Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`. */
|
|
29
|
+
grants: z.array(aclGrantSchema).optional().describe("Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`."),
|
|
30
|
+
/** Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`. */
|
|
31
|
+
remove: z.array(aclRemoveTargetSchema).optional().describe("Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`."),
|
|
32
|
+
}).describe("An access-control list payload that supports either full replacement or targeted patch operations on a resource's grants.");
|
|
33
|
+
/** Runtime validator for {@link ActivityFeedEntry}. */
|
|
34
|
+
export const activityFeedEntrySchema = z.object({
|
|
35
|
+
/** 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. */
|
|
36
|
+
agent: z.union([z.string(), z.object({ acl: z.object({ add: z.array(z.object({ actions: z.array(z.string()), principal: z.string().optional(), principal_type: z.string() })).optional(), grants: z.array(z.object({ actions: z.array(z.string()), principal: z.string().optional(), principal_type: z.string() })).optional(), remove: z.array(z.object({ principal: z.string().optional(), principal_type: z.string() })).optional() }).optional(), app: z.string().optional(), created_at: z.string().optional(), default_model: z.string().optional(), email: z.string().optional(), id: z.string(), identity: z.string().optional(), last_applied_template_config: z.string().optional(), lookup_key: z.string().optional(), metadata: z.record(z.unknown()).optional(), name: z.string().optional(), org: z.string().optional(), org_name: z.string().optional(), originator: z.string().optional(), phone_number: z.string().optional(), sandbox: z.string().optional(), source_solution: z.object({ solution: z.object({ category_keys: z.array(z.string()).optional(), created_at: z.string().optional(), description: z.string().optional(), id: z.string(), kind: z.string(), latest_solution: z.string().optional(), latest_version: z.string().optional(), lookup_key: z.string().optional(), metadata: z.record(z.unknown()).optional(), name: z.string().optional(), org: z.string().optional(), org_logo: z.object({ file: z.string().optional(), height: z.number().int().optional(), media: z.string().optional(), mime_type: z.string().optional(), refresh_url: z.string().optional(), url: z.string().optional(), width: z.number().int().optional() }).optional(), org_name: z.string().optional(), org_slug: z.string().optional(), owners: z.array(z.string()), readme_url: z.string().optional(), solution_id: z.string().optional(), solution_version: z.string().optional(), tag_keys: z.array(z.string()).optional(), template_kind: z.string().optional(), templates: z.array(z.object({ description: z.string().optional(), display_name: z.string().optional(), id: z.string().optional(), kind: z.string(), lookup_key: z.string().optional(), name: z.string().optional(), readme_url: z.string().optional(), virtual_path: z.string().optional() })), updated_at: z.string().optional(), upgrade_available: z.boolean(), virtual_path: z.string().optional() }), template: z.object({ created_at: z.string().optional(), description: z.string().optional(), display_name: z.string().optional(), id: z.string(), kind: z.string(), lookup_key: z.string().optional(), name: z.string().optional(), updated_at: z.string().optional(), virtual_path: z.string().optional() }) }).optional(), team: z.string().optional(), updated_at: z.string().optional(), user: z.string().optional() })]).optional().describe("The agent that produced this event. Returns an agent ID (`agi_...`) by default, or an expanded agent object when the association is loaded. `null` if no agent is associated."),
|
|
37
|
+
/** ID of the application that produced this entry (`dap_...`). `null` if not scoped to an app. */
|
|
38
|
+
app: z.string().optional().describe("ID of the application that produced this entry (`dap_...`). `null` if not scoped to an app."),
|
|
39
|
+
/** 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. */
|
|
40
|
+
attachments: z.array(z.record(z.unknown())).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."),
|
|
41
|
+
/** ID of the automation run that produced this entry (`atr_...`). `null` if not produced by an automation run. */
|
|
42
|
+
automation_run: z.string().optional().describe("ID of the automation run that produced this entry (`atr_...`). `null` if not produced by an automation run."),
|
|
43
|
+
/** A longer explanation of the event rendered as Markdown. `null` if no additional content is available. */
|
|
44
|
+
content: z.string().optional().describe("A longer explanation of the event rendered as Markdown. `null` if no additional content is available."),
|
|
45
|
+
/** An opaque string used to group related entries together. Entries sharing the same `correlation_id` belong to a single logical operation. `null` if not correlated. */
|
|
46
|
+
correlation_id: z.string().optional().describe("An opaque string used to group related entries together. Entries sharing the same `correlation_id` belong to a single logical operation. `null` if not correlated."),
|
|
47
|
+
/** When this activity feed entry was created (ISO 8601). */
|
|
48
|
+
created_at: z.string().optional().describe("When this activity feed entry was created (ISO 8601)."),
|
|
49
|
+
/** Activity feed entry ID (`afe_...`). */
|
|
50
|
+
id: z.string().describe("Activity feed entry ID (`afe_...`)."),
|
|
51
|
+
/** The type of event this entry represents, e.g. `"agent_step"` or `"tool_call"`. Determines how `title`, `content`, and `attachments` should be interpreted. */
|
|
52
|
+
kind: z.string().optional().describe("The type of event this entry represents, e.g. `\"agent_step\"` or `\"tool_call\"`. Determines how `title`, `content`, and `attachments` should be interpreted."),
|
|
53
|
+
/** Severity level of the event. One of `"info"`, `"warning"`, or `"error"`. `null` if no severity is set. */
|
|
54
|
+
level: z.string().optional().describe("Severity level of the event. One of `\"info\"`, `\"warning\"`, or `\"error\"`. `null` if no severity is set."),
|
|
55
|
+
/** Arbitrary key-value metadata stored on this entry. Returns an empty object when no metadata is set. */
|
|
56
|
+
metadata: z.record(z.unknown()).optional().describe("Arbitrary key-value metadata stored on this entry. Returns an empty object when no metadata is set."),
|
|
57
|
+
/** ID of the organization this entry belongs to (`org_...`). `null` if not org-scoped. */
|
|
58
|
+
org: z.string().optional().describe("ID of the organization this entry belongs to (`org_...`). `null` if not org-scoped."),
|
|
59
|
+
/** ID of the agent routine run that produced this entry (`arr_...`). `null` if not produced by a routine run. */
|
|
60
|
+
routine_run: z.string().optional().describe("ID of the agent routine run that produced this entry (`arr_...`). `null` if not produced by a routine run."),
|
|
61
|
+
/** Identifier of the sandbox environment this entry was generated in. `null` in production contexts. */
|
|
62
|
+
sandbox: z.string().optional().describe("Identifier of the sandbox environment this entry was generated in. `null` in production contexts."),
|
|
63
|
+
/** ID of the agent session record this entry belongs to (`ase_...`). `null` if not part of an agent session. */
|
|
64
|
+
session_record: z.string().optional().describe("ID of the agent session record this entry belongs to (`ase_...`). `null` if not part of an agent session."),
|
|
65
|
+
/** ID of the team this entry is associated with (`tem_...`). `null` if not team-scoped. */
|
|
66
|
+
team: z.string().optional().describe("ID of the team this entry is associated with (`tem_...`). `null` if not team-scoped."),
|
|
67
|
+
/** ID of the thread this entry is associated with (`thr_...`). `null` if not linked to a thread. */
|
|
68
|
+
thread: z.string().optional().describe("ID of the thread this entry is associated with (`thr_...`). `null` if not linked to a thread."),
|
|
69
|
+
/** A one-line human-readable summary of the event. `null` if the entry has no title. */
|
|
70
|
+
title: z.string().optional().describe("A one-line human-readable summary of the event. `null` if the entry has no title."),
|
|
71
|
+
/** When this activity feed entry was last modified (ISO 8601). */
|
|
72
|
+
updated_at: z.string().optional().describe("When this activity feed entry was last modified (ISO 8601)."),
|
|
73
|
+
/** 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. */
|
|
74
|
+
user: z.union([z.string(), z.object({ alias: z.string().optional(), app: z.string().optional(), app_name: z.string().optional(), email: z.string().optional(), id: z.string(), is_system_user: z.boolean().optional(), metadata: z.record(z.unknown()).optional(), name: z.string().optional(), org: z.string().optional(), org_name: z.string().optional(), org_role: z.string().optional(), sandbox: z.string().optional(), sandbox_name: z.string().optional() })]).optional().describe("The user who triggered this event. Returns a user ID (`usr_...`) by default, or an expanded user object when the association is loaded. `null` if no user is associated."),
|
|
75
|
+
}).describe("A single event record in an activity feed, capturing what happened, who caused it, and which resources were involved.");
|
|
76
|
+
/** Runtime validator for {@link ActivityFeedEntryListResponse}. */
|
|
77
|
+
export const activityFeedEntryListResponseSchema = z.object({
|
|
78
|
+
/** Opaque cursor to pass as `after` to retrieve the next page of entries. `null` when this is the last page. */
|
|
79
|
+
after_cursor: z.string().optional().describe("Opaque cursor to pass as `after` to retrieve the next page of entries. `null` when this is the last page."),
|
|
80
|
+
/** Opaque cursor to pass as `before` to retrieve the previous page of entries. `null` when this is the first page. */
|
|
81
|
+
before_cursor: z.string().optional().describe("Opaque cursor to pass as `before` to retrieve the previous page of entries. `null` when this is the first page."),
|
|
82
|
+
/** Array of activity feed entry objects for the current page, ordered by time descending. */
|
|
83
|
+
entries: z.array(activityFeedEntrySchema).describe("Array of activity feed entry objects for the current page, ordered by time descending."),
|
|
84
|
+
/** Whether additional entries exist beyond the current page. When `true`, use `after_cursor` to fetch the next page. */
|
|
85
|
+
has_more: z.boolean().describe("Whether additional entries exist beyond the current page. When `true`, use `after_cursor` to fetch the next page."),
|
|
86
|
+
}).describe("A paginated list of activity feed entries returned by a feed query, with cursors for navigating backward and forward through results.");
|
|
87
|
+
/** Runtime validator for {@link Actor}. */
|
|
44
88
|
export const actorSchema = z.object({
|
|
45
|
-
alias
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
*/
|
|
89
|
+
/** Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured. */
|
|
90
|
+
alias: z.string().optional().describe("Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured."),
|
|
91
|
+
/** Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents. */
|
|
92
|
+
id: z.string().optional().describe("Composite actor identifier. Format is `\"user-<usr_...>\"` for human users or `\"agent-<agi_...>\"` for agents."),
|
|
93
|
+
/** Display name of the actor shown in the UI. `null` if no name is set. */
|
|
94
|
+
name: z.string().optional().describe("Display name of the actor shown in the UI. `null` if no name is set."),
|
|
95
|
+
/** Profile picture for the actor. `null` if the actor has no profile picture. */
|
|
96
|
+
profile_picture: imageSourceSchema.optional().describe("Profile picture for the actor. `null` if the actor has no profile picture."),
|
|
97
|
+
}).describe("The entity that authored a message, either a human user or an agent.");
|
|
98
|
+
/** Runtime validator for {@link UpgradeTemplateSummary}. */
|
|
99
|
+
export const upgradeTemplateSummarySchema = z.object({
|
|
100
|
+
/** When this template config was created (ISO 8601). */
|
|
101
|
+
created_at: z.string().optional().describe("When this template config was created (ISO 8601)."),
|
|
102
|
+
/** Description of the template from the config body. `null` if the current version has no `description` field. */
|
|
103
|
+
description: z.string().optional().describe("Description of the template from the config body. `null` if the current version has no `description` field."),
|
|
104
|
+
/** Human-readable display name from the config body. `null` if the current version has no `display_name` field. */
|
|
105
|
+
display_name: z.string().optional().describe("Human-readable display name from the config body. `null` if the current version has no `display_name` field."),
|
|
106
|
+
/** Template config ID (`cfg_...`). */
|
|
107
|
+
id: z.string().describe("Template config ID (`cfg_...`)."),
|
|
108
|
+
/** Config kind identifier for this template (e.g. `"agent_tool_template"`). */
|
|
109
|
+
kind: z.string().describe("Config kind identifier for this template (e.g. `\"agent_tool_template\"`)."),
|
|
110
|
+
/** Stable lookup key assigned to this template config. `null` if no lookup key is set. */
|
|
111
|
+
lookup_key: z.string().optional().describe("Stable lookup key assigned to this template config. `null` if no lookup key is set."),
|
|
112
|
+
/** Template name as stored in the config body. `null` if the current version has no `name` field. */
|
|
113
|
+
name: z.string().optional().describe("Template name as stored in the config body. `null` if the current version has no `name` field."),
|
|
114
|
+
/** When this template config was last modified (ISO 8601). */
|
|
115
|
+
updated_at: z.string().optional().describe("When this template config was last modified (ISO 8601)."),
|
|
116
|
+
/** Virtual filesystem path for this template config. `null` if not set. */
|
|
117
|
+
virtual_path: z.string().optional().describe("Virtual filesystem path for this template config. `null` if not set."),
|
|
118
|
+
}).describe("Compact summary of an AgentTemplate config referenced by an agent upgrade or source-solution response.");
|
|
119
|
+
/** Runtime validator for {@link InstalledConfigEntry}. */
|
|
120
|
+
export const installedConfigEntrySchema = z.object({
|
|
121
|
+
/** ID of the persisted config record (`cfg_...`). */
|
|
122
|
+
id: z.string().describe("ID of the persisted config record (`cfg_...`)."),
|
|
123
|
+
/** Caller-supplied correlation key echoed back from the request. For top-level configs this is the original `lookup_key` (before any suffix is applied). For skill file children it is the composite `"<skill_lookup_key>:<relative_path>"` string, since file rows have no lookup_key of their own. */
|
|
124
|
+
key: z.string().describe("Caller-supplied correlation key echoed back from the request. For top-level configs this is the original `lookup_key` (before any suffix is applied). For skill file children it is the composite `\"<skill_lookup_key>:<relative_path>\"` string, since file rows have no lookup_key of their own."),
|
|
125
|
+
/** Type of config that was created. One of `"Skill"`, `"File"`, `"Script"`, `"AgentTemplate"`, or `"Config"`. */
|
|
126
|
+
kind: z.string().describe("Type of config that was created. One of `\"Skill\"`, `\"File\"`, `\"Script\"`, `\"AgentTemplate\"`, or `\"Config\"`."),
|
|
127
|
+
/** Stored `lookup_key` for this config after any suffix has been applied. `null` for `File` children inside a skill bundle, which are keyed by `(parent_id, relative_path)` rather than by `lookup_key`. */
|
|
128
|
+
lookup_key: z.string().optional().describe("Stored `lookup_key` for this config after any suffix has been applied. `null` for `File` children inside a skill bundle, which are keyed by `(parent_id, relative_path)` rather than by `lookup_key`."),
|
|
129
|
+
}).describe("A slim summary of a single config record created during an agent install transaction. Returned as an entry in `AgentCreateResponse.installed_configs`.");
|
|
130
|
+
/** Runtime validator for {@link LLMConfig}. */
|
|
55
131
|
export const lLMConfigSchema = z.object({
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
Mirrors `ArchAstro.Agents.Routines.PresetConfig`. Used wherever a request
|
|
61
|
-
or response carries a preset config — routine-level and chain-step-level.
|
|
62
|
-
|
|
63
|
-
Server-side validation (length/format rules on `instructions`, enum checks
|
|
64
|
-
on `session_mode`/`session_scope`, model lookup against
|
|
65
|
-
`ChatCompletion.models/0`) is authoritative. This schema defines the
|
|
66
|
-
request shape and typed response shape so OpenAPI consumers see real
|
|
67
|
-
types instead of an opaque object.
|
|
68
|
-
*/
|
|
132
|
+
/** Model identifier to use for this routine or step, e.g. `"claude-sonnet-4-5"`. When omitted, the agent's default model is used. */
|
|
133
|
+
model: z.string().optional().describe("Model identifier to use for this routine or step, e.g. `\"claude-sonnet-4-5\"`. When omitted, the agent's default model is used."),
|
|
134
|
+
}).describe("LLM invocation settings for a routine or chain step. When present, overrides the agent-level model selection.");
|
|
135
|
+
/** Runtime validator for {@link PresetConfig}. */
|
|
69
136
|
export const presetConfigSchema = z.object({
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
/**
|
|
137
|
+
/** Custom task or behavior instructions for the preset (max 10,000 chars). */
|
|
138
|
+
instructions: z.string().optional().describe("Custom task or behavior instructions for the preset (max 10,000 chars)."),
|
|
139
|
+
/** LLM invocation settings (e.g. a `model` override for this routine/step). */
|
|
140
|
+
llm: lLMConfigSchema.optional().describe("LLM invocation settings (e.g. a `model` override for this routine/step)."),
|
|
141
|
+
/** Session mode: `stateless` (default, new session per trigger) or `session` (find-or-create a persistent session scoped by `session_scope`). */
|
|
142
|
+
session_mode: z.string().optional().describe("Session mode: `stateless` (default, new session per trigger) or `session` (find-or-create a persistent session scoped by `session_scope`)."),
|
|
143
|
+
/** When `session_mode` is `session`, controls session scoping: `per_user` (default), `per_key`, `per_org`, or `global`. */
|
|
144
|
+
session_scope: z.string().optional().describe("When `session_mode` is `session`, controls session scoping: `per_user` (default), `per_key`, `per_org`, or `global`."),
|
|
145
|
+
/** IDs of structured message templates that constrain the agent's responses to predefined structured formats. */
|
|
146
|
+
structured_message_template_ids: z.array(z.string()).optional().describe("IDs of structured message templates that constrain the agent's responses to predefined structured formats."),
|
|
147
|
+
}).describe("Configuration for a preset routine handler. Controls the agent's behavior, session persistence, and model selection for a given routine or chain step.");
|
|
148
|
+
/** Runtime validator for {@link WorkerStatus}. */
|
|
77
149
|
export const workerStatusSchema = z.object({
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
/**
|
|
150
|
+
/** Number of times the worker has been attempted so far. `0` means the job has been enqueued but not yet started. */
|
|
151
|
+
attempt: z.number().int().describe("Number of times the worker has been attempted so far. `0` means the job has been enqueued but not yet started."),
|
|
152
|
+
/** Maximum number of attempts the worker is allowed before the job is marked `"discarded"`. */
|
|
153
|
+
max_attempts: z.number().int().describe("Maximum number of attempts the worker is allowed before the job is marked `\"discarded\"`."),
|
|
154
|
+
/** Current execution state of the worker. One of `"queued"`, `"executing"`, `"retrying"`, `"completed"`, `"discarded"`, or `"cancelled"`. */
|
|
155
|
+
status: z.string().describe("Current execution state of the worker. One of `\"queued\"`, `\"executing\"`, `\"retrying\"`, `\"completed\"`, `\"discarded\"`, or `\"cancelled\"`."),
|
|
156
|
+
}).describe("Execution state of the background worker processing a routine run. Reflects the current job status and retry progress.");
|
|
157
|
+
/** Runtime validator for {@link MediaVariant}. */
|
|
83
158
|
export const mediaVariantSchema = z.object({
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
159
|
+
/** MIME type of this variant's file (e.g., `"image/jpeg"`, `"video/mp4"`). `null` if the file is not loaded. */
|
|
160
|
+
content_type: z.string().optional().describe("MIME type of this variant's file (e.g., `\"image/jpeg\"`, `\"video/mp4\"`). `null` if the file is not loaded."),
|
|
161
|
+
/** When this variant was created (ISO 8601). */
|
|
162
|
+
created_at: z.string().optional().describe("When this variant was created (ISO 8601)."),
|
|
163
|
+
/** ID of the underlying storage file that backs this variant (`fil_...`). */
|
|
164
|
+
file: z.string().optional().describe("ID of the underlying storage file that backs this variant (`fil_...`)."),
|
|
165
|
+
/** Original filename of the uploaded file for this variant. `null` if the file is not loaded. */
|
|
166
|
+
filename: z.string().optional().describe("Original filename of the uploaded file for this variant. `null` if the file is not loaded."),
|
|
167
|
+
/** Height of this variant in pixels. `null` if not recorded. */
|
|
168
|
+
height: z.number().int().optional().describe("Height of this variant in pixels. `null` if not recorded."),
|
|
169
|
+
/** Media variant ID (`mvr_...`). */
|
|
170
|
+
id: z.string().describe("Media variant ID (`mvr_...`)."),
|
|
171
|
+
/** Resolved image delivery metadata for this variant, including dimensions and CDN URL. `null` for non-image content types. */
|
|
172
|
+
image_source: imageSourceSchema.optional().describe("Resolved image delivery metadata for this variant, including dimensions and CDN URL. `null` for non-image content types."),
|
|
173
|
+
/** When this variant was last updated (ISO 8601). */
|
|
174
|
+
updated_at: z.string().optional().describe("When this variant was last updated (ISO 8601)."),
|
|
175
|
+
/** Signed download URL for this variant, resolved at request time. `null` if the file is unavailable. */
|
|
176
|
+
url: z.string().optional().describe("Signed download URL for this variant, resolved at request time. `null` if the file is unavailable."),
|
|
177
|
+
/** Identifier for this variant's processing tier. Common values include `"original"` (the unmodified upload) and `"thumbnail"` (a resized preview). */
|
|
178
|
+
variant_key: z.string().optional().describe("Identifier for this variant's processing tier. Common values include `\"original\"` (the unmodified upload) and `\"thumbnail\"` (a resized preview)."),
|
|
179
|
+
/** Width of this variant in pixels. `null` if not recorded. */
|
|
180
|
+
width: z.number().int().optional().describe("Width of this variant in pixels. `null` if not recorded."),
|
|
181
|
+
}).describe("A processed variant of a media item, such as the original upload or a resized thumbnail, including a signed download URL resolved at request time.");
|
|
182
|
+
/** Runtime validator for {@link Attachment}. */
|
|
102
183
|
export const attachmentSchema = z.object({
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
184
|
+
/** MIME type of the attached file, e.g. `"image/png"` or `"application/pdf"`. Present on `file`, `artifact`, and `media` types. `null` otherwise. */
|
|
185
|
+
content_type: z.string().optional().describe("MIME type of the attached file, e.g. `\"image/png\"` or `\"application/pdf\"`. Present on `file`, `artifact`, and `media` types. `null` otherwise."),
|
|
186
|
+
/** Short description. The page meta-description for `scraped_link`, the artifact description for `artifact`, and the task description for `task` types. `null` on other types. */
|
|
187
|
+
description: z.string().optional().describe("Short description. The page meta-description for `scraped_link`, the artifact description for `artifact`, and the task description for `task` types. `null` on other types."),
|
|
188
|
+
/** Original filename of the attached file, e.g. `"report.pdf"`. Present on `file`, `artifact`, and `media` types. `null` otherwise. */
|
|
189
|
+
filename: z.string().optional().describe("Original filename of the attached file, e.g. `\"report.pdf\"`. Present on `file`, `artifact`, and `media` types. `null` otherwise."),
|
|
190
|
+
/** Height in pixels of the media item. Present on `media` type only. `null` otherwise. */
|
|
191
|
+
height: z.number().int().optional().describe("Height in pixels of the media item. Present on `media` type only. `null` otherwise."),
|
|
192
|
+
/** Unique identifier for this attachment within the message. */
|
|
193
|
+
id: z.string().describe("Unique identifier for this attachment within the message."),
|
|
194
|
+
/** Height in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise. */
|
|
195
|
+
image_height: z.number().int().optional().describe("Height in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise."),
|
|
196
|
+
/** Image source metadata for inline rendering. Present on `file`, `scraped_link`, `artifact`, and `media` types when the content is an image. `null` otherwise. */
|
|
197
|
+
image_source: imageSourceSchema.optional().describe("Image source metadata for inline rendering. Present on `file`, `scraped_link`, `artifact`, and `media` types when the content is an image. `null` otherwise."),
|
|
198
|
+
/** URL of the preview image extracted from the scraped page. Present on `scraped_link` type only. `null` otherwise. */
|
|
199
|
+
image_url: z.string().optional().describe("URL of the preview image extracted from the scraped page. Present on `scraped_link` type only. `null` otherwise."),
|
|
200
|
+
/** Width in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise. */
|
|
201
|
+
image_width: z.number().int().optional().describe("Width in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise."),
|
|
202
|
+
/** The media category, e.g. `"video"` or `"audio"`. Present on `media` type only. `null` otherwise. */
|
|
203
|
+
media_type: z.string().optional().describe("The media category, e.g. `\"video\"` or `\"audio\"`. Present on `media` type only. `null` otherwise."),
|
|
204
|
+
/** Display name of the media item. Present on `media` type only. `null` otherwise. */
|
|
205
|
+
name: z.string().optional().describe("Display name of the media item. Present on `media` type only. `null` otherwise."),
|
|
206
|
+
/** The full embedded object payload. For `task` type, contains the task record. For `action` type, contains the action definition. `null` on other types. */
|
|
207
|
+
object: z.record(z.unknown()).optional().describe("The full embedded object payload. For `task` type, contains the task record. For `action` type, contains the action definition. `null` on other types."),
|
|
208
|
+
/** Display title. The page title for `scraped_link`, the artifact name for `artifact`, and the task title for `task` types. `null` on other types. */
|
|
209
|
+
title: z.string().optional().describe("Display title. The page title for `scraped_link`, the artifact name for `artifact`, and the task title for `task` types. `null` on other types."),
|
|
210
|
+
/** The attachment type. One of `"file"`, `"scraped_link"`, `"artifact"`, `"task"`, `"media"`, or `"action"`. Determines which additional fields are present. */
|
|
211
|
+
type: z.string().describe("The attachment type. One of `\"file\"`, `\"scraped_link\"`, `\"artifact\"`, `\"task\"`, `\"media\"`, or `\"action\"`. Determines which additional fields are present."),
|
|
212
|
+
/** URL to access the resource. A signed download URL for `file` and `artifact` types; the original URL for `scraped_link`; a media playback URL for `media`. `null` on `task` and `action` types. */
|
|
213
|
+
url: z.string().optional().describe("URL to access the resource. A signed download URL for `file` and `artifact` types; the original URL for `scraped_link`; a media playback URL for `media`. `null` on `task` and `action` types."),
|
|
214
|
+
/** Array of available encoding variants for the media item (e.g. different resolutions). Present on `media` type only. `null` otherwise. */
|
|
215
|
+
variants: z.array(mediaVariantSchema).optional().describe("Array of available encoding variants for the media item (e.g. different resolutions). Present on `media` type only. `null` otherwise."),
|
|
216
|
+
/** Version number of the attached artifact at the time of attachment. Present on `artifact` type only. `null` otherwise. */
|
|
217
|
+
version: z.number().int().optional().describe("Version number of the attached artifact at the time of attachment. Present on `artifact` type only. `null` otherwise."),
|
|
218
|
+
/** Width in pixels of the media item. Present on `media` type only. `null` otherwise. */
|
|
219
|
+
width: z.number().int().optional().describe("Width in pixels of the media item. Present on `media` type only. `null` otherwise."),
|
|
220
|
+
}).describe("A rich attachment associated with a message, such as a file, scraped link, artifact, task, media item, or inline action.");
|
|
221
|
+
/** Runtime validator for {@link AuthTokens}. */
|
|
123
222
|
export const authTokensSchema = z.object({
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
223
|
+
/** Number of seconds until `token` expires. After this period, use `refresh_token` to obtain a new access token. */
|
|
224
|
+
expires_in: z.number().int().describe("Number of seconds until `token` expires. After this period, use `refresh_token` to obtain a new access token."),
|
|
225
|
+
/** 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. */
|
|
226
|
+
metadata: z.record(z.unknown()).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."),
|
|
227
|
+
/** Long-lived opaque refresh token. Use this to obtain a new access token when `token` expires. */
|
|
228
|
+
refresh_token: z.string().describe("Long-lived opaque refresh token. Use this to obtain a new access token when `token` expires."),
|
|
229
|
+
/** Short-lived JWT access token. Include this value in the `Authorization: Bearer <token>` header for all authenticated API requests. */
|
|
230
|
+
token: z.string().describe("Short-lived JWT access token. Include this value in the `Authorization: Bearer <token>` header for all authenticated API requests."),
|
|
231
|
+
/** Token scheme. Always `"Bearer"`. */
|
|
232
|
+
token_type: z.string().describe("Token scheme. Always `\"Bearer\"`."),
|
|
233
|
+
/** The user who authenticated. Contains the user's profile and account details. */
|
|
234
|
+
user: userSchema.describe("The user who authenticated. Contains the user's profile and account details."),
|
|
235
|
+
}).describe("Credential bundle returned after a successful authentication exchange. Contains the access token, refresh token, and the authenticated user.");
|
|
236
|
+
/** Runtime validator for {@link BugReport}. */
|
|
237
|
+
export const bugReportSchema = z.object({
|
|
238
|
+
/** App ID (`dap_...`) of the developer app through which the report was submitted. */
|
|
239
|
+
app: z.string().optional().describe("App ID (`dap_...`) of the developer app through which the report was submitted."),
|
|
240
|
+
/** The client application that submitted this report. One of `"agent_network_web"`, `"cli"`, or `"developer_portal"`. */
|
|
241
|
+
client: z.string().describe("The client application that submitted this report. One of `\"agent_network_web\"`, `\"cli\"`, or `\"developer_portal\"`."),
|
|
242
|
+
/** Version string of the submitting client at the time of submission, e.g. `"1.4.2"`. */
|
|
243
|
+
client_version: z.string().describe("Version string of the submitting client at the time of submission, e.g. `\"1.4.2\"`."),
|
|
244
|
+
/** 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. */
|
|
245
|
+
context: z.record(z.unknown()).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."),
|
|
246
|
+
/** When the bug report was submitted (ISO 8601). */
|
|
247
|
+
created_at: z.string().optional().describe("When the bug report was submitted (ISO 8601)."),
|
|
248
|
+
/** Freeform text describing the issue or feedback, as entered by the user. Up to 10,000 characters. */
|
|
249
|
+
description: z.string().describe("Freeform text describing the issue or feedback, as entered by the user. Up to 10,000 characters."),
|
|
250
|
+
/** Bug report ID (`bgr_...`). */
|
|
251
|
+
id: z.string().describe("Bug report ID (`bgr_...`)."),
|
|
252
|
+
/** Organization ID (`org_...`) scoping this report. `null` when the user's account is not part of an organization. */
|
|
253
|
+
org: z.string().optional().describe("Organization ID (`org_...`) scoping this report. `null` when the user's account is not part of an organization."),
|
|
254
|
+
/** Sandbox ID (`dsb_...`) active at submission time. `null` when the report was not submitted from a sandbox context. */
|
|
255
|
+
sandbox: z.string().optional().describe("Sandbox ID (`dsb_...`) active at submission time. `null` when the report was not submitted from a sandbox context."),
|
|
256
|
+
/** Team ID (`tem_...`) of the team the submitting user belonged to at submission time. `null` when the user had no active team. */
|
|
257
|
+
team: z.string().optional().describe("Team ID (`tem_...`) of the team the submitting user belonged to at submission time. `null` when the user had no active team."),
|
|
258
|
+
/** When the bug report record was last modified (ISO 8601). */
|
|
259
|
+
updated_at: z.string().optional().describe("When the bug report record was last modified (ISO 8601)."),
|
|
260
|
+
}).describe("A bug report or freeform feedback submission from any ArchAstro client. Bug reports are write-only for the submitting user and are not returned by any public list or show endpoint.");
|
|
261
|
+
/** Runtime validator for {@link BuiltinTool}. */
|
|
132
262
|
export const builtinToolSchema = z.object({
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
263
|
+
/** Human-readable explanation of what the tool does. Surfaced to the agent as part of tool selection context. `null` when no description has been defined. */
|
|
264
|
+
description: z.string().optional().describe("Human-readable explanation of what the tool does. Surfaced to the agent as part of tool selection context. `null` when no description has been defined."),
|
|
265
|
+
/** Machine-readable name of the tool as it is registered with the agent runtime, e.g. `"web_search"` or `"github_create_issue"`. */
|
|
266
|
+
name: z.string().describe("Machine-readable name of the tool as it is registered with the agent runtime, e.g. `\"web_search\"` or `\"github_create_issue\"`."),
|
|
267
|
+
}).describe("A single callable tool within a builtin tool catalog entry. Represents one discrete function an agent can invoke.");
|
|
268
|
+
/** Runtime validator for {@link BuiltinToolCatalogEntry}. */
|
|
137
269
|
export const builtinToolCatalogEntrySchema = z.object({
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
/**
|
|
270
|
+
/** 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. */
|
|
271
|
+
config_schema: z.record(z.unknown()).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."),
|
|
272
|
+
/** Short prose description of what this tool category does. Suitable for display in setup UIs. `null` when no description has been defined. */
|
|
273
|
+
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."),
|
|
274
|
+
/** Additional guidance surfaced to the agent at runtime when this tool category is enabled. `null` when no custom instruction is set. */
|
|
275
|
+
instruction: z.string().optional().describe("Additional guidance surfaced to the agent at runtime when this tool category is enabled. `null` when no custom instruction is set."),
|
|
276
|
+
/** Unique slug identifying this tool category, e.g. `"web_search"` or `"github"`. */
|
|
277
|
+
key: z.string().describe("Unique slug identifying this tool category, e.g. `\"web_search\"` or `\"github\"`."),
|
|
278
|
+
/** Human-readable display name for the tool category, e.g. `"Web Search"`. `null` when no label has been assigned. */
|
|
279
|
+
label: z.string().optional().describe("Human-readable display name for the tool category, e.g. `\"Web Search\"`. `null` when no label has been assigned."),
|
|
280
|
+
/** Controls whether multiple instances of this tool category may be enabled simultaneously. `"namespaced"` — multiple instances allowed; each must carry a `name_prefix` to distinguish them. `"passthrough"` — multiple instances allowed without a `name_prefix`; names are derived from the underlying source. `null` — single-instance only. */
|
|
281
|
+
multi_instance_mode: z.string().optional().describe("Controls whether multiple instances of this tool category may be enabled simultaneously. `\"namespaced\"` — multiple instances allowed; each must carry a `name_prefix` to distinguish them. `\"passthrough\"` — multiple instances allowed without a `name_prefix`; names are derived from the underlying source. `null` — single-instance only."),
|
|
282
|
+
/** List of integration provider slugs that can back this tool category, e.g. `["github", "gitlab"]`. Empty when the tool is provider-agnostic. */
|
|
283
|
+
providers: z.array(z.string()).optional().describe("List of integration provider slugs that can back this tool category, e.g. `[\"github\", \"gitlab\"]`. Empty when the tool is provider-agnostic."),
|
|
284
|
+
/** Whether enabling this tool category requires the user to connect a third-party integration. `true` means at least one active integration of the appropriate type must exist before the tool can be used. */
|
|
285
|
+
requires_integration: z.boolean().optional().describe("Whether enabling this tool category requires the user to connect a third-party integration. `true` means at least one active integration of the appropriate type must exist before the tool can be used."),
|
|
286
|
+
/** Internal type identifier used by the platform server when registering these tools. `null` for client-side-only tool categories. */
|
|
287
|
+
server_tool_type: z.string().optional().describe("Internal type identifier used by the platform server when registering these tools. `null` for client-side-only tool categories."),
|
|
288
|
+
/** Array of individual tool definitions included in this category. Each entry describes a single callable tool with its own name and description. */
|
|
289
|
+
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."),
|
|
290
|
+
}).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.");
|
|
291
|
+
/** Runtime validator for {@link ChannelAck}. */
|
|
292
|
+
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\": {}}`.");
|
|
293
|
+
/** Runtime validator for {@link MessageReaction}. */
|
|
294
|
+
export const messageReactionSchema = z.object({
|
|
295
|
+
/** Type-specific reaction data. For `"emoji_reaction"` reactions, contains an `emoji` key with the Unicode emoji string (e.g., `"👍"`). */
|
|
296
|
+
payload: z.record(z.unknown()).optional().describe("Type-specific reaction data. For `\"emoji_reaction\"` reactions, contains an `emoji` key with the Unicode emoji string (e.g., `\"👍\"`)."),
|
|
297
|
+
/** Reaction type identifier. Currently always `"emoji_reaction"` for emoji-based reactions. */
|
|
298
|
+
type: z.string().describe("Reaction type identifier. Currently always `\"emoji_reaction\"` for emoji-based reactions."),
|
|
299
|
+
/** Public ID of the user who added the reaction (`usr_...`). */
|
|
300
|
+
user: z.string().optional().describe("Public ID of the user who added the reaction (`usr_...`)."),
|
|
301
|
+
}).describe("A compact reaction record embedded in a message's `reactions` array, representing a single user's reaction to a message.");
|
|
302
|
+
/** Runtime validator for {@link Message}. */
|
|
303
|
+
export const messageSchema = z.object({
|
|
304
|
+
/** Resolved actor descriptors for the message sender, combining identity and display metadata. Always contains exactly one entry. */
|
|
305
|
+
actors: z.array(actorSchema).optional().describe("Resolved actor descriptors for the message sender, combining identity and display metadata. Always contains exactly one entry."),
|
|
306
|
+
/** ID of the agent user that sent this message (`agi_...`). `null` for messages sent by human users. */
|
|
307
|
+
agent: z.string().optional().describe("ID of the agent user that sent this message (`agi_...`). `null` for messages sent by human users."),
|
|
308
|
+
/** Files, links, tasks, media, artifacts, and actions attached to this message. Empty array if there are no attachments. */
|
|
309
|
+
attachments: z.array(attachmentSchema).optional().describe("Files, links, tasks, media, artifacts, and actions attached to this message. Empty array if there are no attachments."),
|
|
310
|
+
/** ID of the thread that was branched from this message (`thr_...`). `null` if this message has not spawned a branch thread. */
|
|
311
|
+
branched_thread: z.string().optional().describe("ID of the thread that was branched from this message (`thr_...`). `null` if this message has not spawned a branch thread."),
|
|
312
|
+
/** Text content of the message. `null` for messages that contain only attachments. */
|
|
313
|
+
content: z.string().optional().describe("Text content of the message. `null` for messages that contain only attachments."),
|
|
314
|
+
/** When the message was posted (ISO 8601). */
|
|
315
|
+
created_at: z.string().optional().describe("When the message was posted (ISO 8601)."),
|
|
316
|
+
/** Whether this message has at least one reply. Only present when explicitly requested or computed by the server. */
|
|
317
|
+
has_replies: z.boolean().optional().describe("Whether this message has at least one reply. Only present when explicitly requested or computed by the server."),
|
|
318
|
+
/** Message ID (`msg_...`). */
|
|
319
|
+
id: z.string().describe("Message ID (`msg_...`)."),
|
|
320
|
+
/** Client-supplied idempotency key used to deduplicate message sends. `null` if the sender did not provide one. */
|
|
321
|
+
idempotency_key: z.string().optional().describe("Client-supplied idempotency key used to deduplicate message sends. `null` if the sender did not provide one."),
|
|
322
|
+
/** Identifier of the legacy chat agent that sent this message, if applicable. `null` for messages sent by users or modern agent users. */
|
|
323
|
+
legacy_agent: z.string().optional().describe("Identifier of the legacy chat agent that sent this message, if applicable. `null` for messages sent by users or modern agent users."),
|
|
324
|
+
/** Arbitrary key-value metadata attached to the message. Always present; defaults to an empty object when no metadata has been set. */
|
|
325
|
+
metadata: z.record(z.unknown()).optional().describe("Arbitrary key-value metadata attached to the message. Always present; defaults to an empty object when no metadata has been set."),
|
|
326
|
+
/** ID of the organization that owns this message (`org_...`). */
|
|
327
|
+
org: z.string().optional().describe("ID of the organization that owns this message (`org_...`)."),
|
|
328
|
+
/** Emoji and other reactions added to this message by users. Empty array if no reactions have been added or the association is not preloaded. */
|
|
329
|
+
reactions: z.array(messageReactionSchema).optional().describe("Emoji and other reactions added to this message by users. Empty array if no reactions have been added or the association is not preloaded."),
|
|
330
|
+
/** 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. */
|
|
331
|
+
rendering_mode: z.string().optional().describe("Display hint for how the message should be rendered. One of `\"reply\"`, `\"direct\"`, or `\"inline\"`. `null` for user-authored messages, which are always rendered as standard replies."),
|
|
332
|
+
/** Inline array of reply messages, each serialized as a full message object. Only present when the server has preloaded replies for this message. */
|
|
333
|
+
replies: z.array(z.record(z.unknown())).optional().describe("Inline array of reply messages, each serialized as a full message object. Only present when the server has preloaded replies for this message."),
|
|
334
|
+
/** Opaque pagination cursor to fetch replies posted after the current page. Only present when inline replies are included in the response. */
|
|
335
|
+
replies_after_cursor: z.string().optional().describe("Opaque pagination cursor to fetch replies posted after the current page. Only present when inline replies are included in the response."),
|
|
336
|
+
/** Opaque pagination cursor to fetch replies posted before the current page. Only present when inline replies are included in the response. */
|
|
337
|
+
replies_before_cursor: z.string().optional().describe("Opaque pagination cursor to fetch replies posted before the current page. Only present when inline replies are included in the response."),
|
|
338
|
+
/** Total number of direct replies to this message. Only present when explicitly requested or computed by the server. */
|
|
339
|
+
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."),
|
|
340
|
+
/** 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. */
|
|
341
|
+
reply_to: z.record(z.unknown()).optional().describe("The parent message this message is a reply to, expanded as a full message object when loaded. `null` if this is a top-level message or the association is not preloaded."),
|
|
342
|
+
/** ID of the developer sandbox this message belongs to (`dsb_...`). `null` for non-sandbox messages. */
|
|
343
|
+
sandbox: z.string().optional().describe("ID of the developer sandbox this message belongs to (`dsb_...`). `null` for non-sandbox messages."),
|
|
344
|
+
/** ID of the team this message is scoped to (`tem_...`). `null` if the message is not team-scoped. */
|
|
345
|
+
team: z.string().optional().describe("ID of the team this message is scoped to (`tem_...`). `null` if the message is not team-scoped."),
|
|
346
|
+
/** ID of the thread this message belongs to (`thr_...`). `null` for messages not yet associated with a thread. */
|
|
347
|
+
thread: z.string().optional().describe("ID of the thread this message belongs to (`thr_...`). `null` for messages not yet associated with a thread."),
|
|
348
|
+
/** 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. */
|
|
349
|
+
user: z.string().optional().describe("The human user who sent this message. Returns a public ID string (`usr_...`) when the association is not preloaded, or an expanded user object when it is. `null` for messages sent by agents."),
|
|
350
|
+
}).describe("A chat message posted in a thread, including its content, author, attachments, reactions, and optional reply metadata.");
|
|
351
|
+
/** Runtime validator for {@link ComputerExecResult}. */
|
|
149
352
|
export const computerExecResultSchema = z.object({
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
353
|
+
/** 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. */
|
|
354
|
+
exit_code: z.number().int().optional().describe("The UNIX exit code returned by the process. `0` indicates success; any non-zero value indicates an error. `null` if the process did not terminate normally."),
|
|
355
|
+
/** The combined stdout and stderr output produced by the command. `null` if the command produced no output. */
|
|
356
|
+
output: z.string().optional().describe("The combined stdout and stderr output produced by the command. `null` if the command produced no output."),
|
|
357
|
+
}).describe("The result of executing a shell command on an agent's computer environment. Contains the captured output and the process exit code.");
|
|
358
|
+
/** Runtime validator for {@link ContextDocument}. */
|
|
359
|
+
export const contextDocumentSchema = z.object({
|
|
360
|
+
/** ID of the agent that owns this document (`agi_...`). `null` if owned by a user or team. */
|
|
361
|
+
agent: z.string().optional().describe("ID of the agent that owns this document (`agi_...`). `null` if owned by a user or team."),
|
|
362
|
+
/** When the document was created (ISO 8601). */
|
|
363
|
+
created_at: z.string().optional().describe("When the document was created (ISO 8601)."),
|
|
364
|
+
/** ID of the backing storage file (`fil_...`) when the document is file-backed. `null` for inline documents. */
|
|
365
|
+
file: z.string().optional().describe("ID of the backing storage file (`fil_...`) when the document is file-backed. `null` for inline documents."),
|
|
366
|
+
/** Context document ID (`cdo_...`). */
|
|
367
|
+
id: z.string().describe("Context document ID (`cdo_...`)."),
|
|
368
|
+
/** Arbitrary key-value metadata attached to the document. Shape varies by source type. */
|
|
369
|
+
metadata: z.record(z.unknown()).optional().describe("Arbitrary key-value metadata attached to the document. Shape varies by source type."),
|
|
370
|
+
/** ID of the context source this document belongs to (`cso_...`). */
|
|
371
|
+
source: z.string().optional().describe("ID of the context source this document belongs to (`cso_...`)."),
|
|
372
|
+
/** ID of the team that owns this document (`tem_...`). `null` if owned by a user or agent. */
|
|
373
|
+
team: z.string().optional().describe("ID of the team that owns this document (`tem_...`). `null` if owned by a user or agent."),
|
|
374
|
+
/** Human-readable display title of the document. `null` if no title has been set. */
|
|
375
|
+
title: z.string().optional().describe("Human-readable display title of the document. `null` if no title has been set."),
|
|
376
|
+
/** Total number of lines in the document's text content. `0` if the document has no content. */
|
|
377
|
+
total_lines: z.number().int().optional().describe("Total number of lines in the document's text content. `0` if the document has no content."),
|
|
378
|
+
/** Total byte size of the document's text content. `0` if the document has no content. */
|
|
379
|
+
total_size: z.number().int().optional().describe("Total byte size of the document's text content. `0` if the document has no content."),
|
|
380
|
+
/** When the document was last modified (ISO 8601). */
|
|
381
|
+
updated_at: z.string().optional().describe("When the document was last modified (ISO 8601)."),
|
|
382
|
+
/** ID of the user that owns this document (`usr_...`). `null` if owned by a team or agent. */
|
|
383
|
+
user: z.string().optional().describe("ID of the user that owns this document (`usr_...`). `null` if owned by a team or agent."),
|
|
384
|
+
}).describe("A context document stored within a context source. Carries metadata and size information only; retrieve the full text content via the `/content` endpoint.");
|
|
385
|
+
/** Runtime validator for {@link ContextDocumentContent}. */
|
|
386
|
+
export const contextDocumentContentSchema = z.object({
|
|
387
|
+
/** Text of the document. Contains the full content when no `offset`/`limit` was requested, or only the requested slice otherwise. */
|
|
388
|
+
content: z.string().describe("Text of the document. Contains the full content when no `offset`/`limit` was requested, or only the requested slice otherwise."),
|
|
389
|
+
/** Zero-based exclusive index of the last byte in `content` (i.e. the slice covers bytes `start_byte..end_byte-1`). Populated only when `unit` is `"bytes"`; `null` otherwise. */
|
|
390
|
+
end_byte: z.number().int().optional().describe("Zero-based exclusive index of the last byte in `content` (i.e. the slice covers bytes `start_byte..end_byte-1`). Populated only when `unit` is `\"bytes\"`; `null` otherwise."),
|
|
391
|
+
/** 1-indexed line number of the last line included in `content` (i.e. the slice covers lines `start_line` through `end_line` inclusive). Populated only when `unit` is `"lines"`; `null` otherwise. */
|
|
392
|
+
end_line: z.number().int().optional().describe("1-indexed line number of the last line included in `content` (i.e. the slice covers lines `start_line` through `end_line` inclusive). Populated only when `unit` is `\"lines\"`; `null` otherwise."),
|
|
393
|
+
/** Context document ID (`cdo_...`). */
|
|
394
|
+
id: z.string().describe("Context document ID (`cdo_...`)."),
|
|
395
|
+
/** The `limit` value echoed from the request. `null` when no limit was requested. */
|
|
396
|
+
limit: z.number().int().optional().describe("The `limit` value echoed from the request. `null` when no limit was requested."),
|
|
397
|
+
/** Arbitrary key-value metadata attached to the document, such as source URL or author. `null` if no metadata was recorded. */
|
|
398
|
+
metadata: z.record(z.unknown()).optional().describe("Arbitrary key-value metadata attached to the document, such as source URL or author. `null` if no metadata was recorded."),
|
|
399
|
+
/** The `offset` value echoed from the request. `null` when no offset was requested. */
|
|
400
|
+
offset: z.number().int().optional().describe("The `offset` value echoed from the request. `null` when no offset was requested."),
|
|
401
|
+
/** Zero-based index of the first byte included in `content`. Populated only when `unit` is `"bytes"`; `null` otherwise. */
|
|
402
|
+
start_byte: z.number().int().optional().describe("Zero-based index of the first byte included in `content`. Populated only when `unit` is `\"bytes\"`; `null` otherwise."),
|
|
403
|
+
/** 1-indexed line number of the first line included in `content`. Populated only when `unit` is `"lines"`; `null` otherwise. */
|
|
404
|
+
start_line: z.number().int().optional().describe("1-indexed line number of the first line included in `content`. Populated only when `unit` is `\"lines\"`; `null` otherwise."),
|
|
405
|
+
/** Human-readable display title of the document. `null` if the document has no title set. */
|
|
406
|
+
title: z.string().optional().describe("Human-readable display title of the document. `null` if the document has no title set."),
|
|
407
|
+
/** Total number of lines in the document's full content, regardless of any slice. */
|
|
408
|
+
total_lines: z.number().int().describe("Total number of lines in the document's full content, regardless of any slice."),
|
|
409
|
+
/** Total byte size of the document's full content, regardless of any slice. */
|
|
410
|
+
total_size: z.number().int().describe("Total byte size of the document's full content, regardless of any slice."),
|
|
411
|
+
/** Slice unit used when `offset` and `limit` were provided. One of `"lines"` (default) or `"bytes"`. `null` when no slice was requested. */
|
|
412
|
+
unit: z.string().optional().describe("Slice unit used when `offset` and `limit` were provided. One of `\"lines\"` (default) or `\"bytes\"`. `null` when no slice was requested."),
|
|
413
|
+
}).describe("The text content of a context document, optionally sliced by line or byte range. Includes totals and slice boundary fields for the requested unit.");
|
|
414
|
+
/** Runtime validator for {@link ContextIngestion}. */
|
|
415
|
+
export const contextIngestionSchema = z.object({
|
|
416
|
+
/** ID of the agent that initiated this ingestion (`agi_...`). `null` if initiated by a user. */
|
|
417
|
+
agent: z.string().optional().describe("ID of the agent that initiated this ingestion (`agi_...`). `null` if initiated by a user."),
|
|
418
|
+
/** When the ingestion job finished, either successfully or with a failure. `null` if still in progress. */
|
|
419
|
+
completed_at: z.string().optional().describe("When the ingestion job finished, either successfully or with a failure. `null` if still in progress."),
|
|
420
|
+
/** When the ingestion was submitted (ISO 8601). */
|
|
421
|
+
created_at: z.string().optional().describe("When the ingestion was submitted (ISO 8601)."),
|
|
422
|
+
/** Structured error details when the ingestion has `status: "failed"`. `null` for any other status. */
|
|
423
|
+
error: z.record(z.unknown()).optional().describe("Structured error details when the ingestion has `status: \"failed\"`. `null` for any other status."),
|
|
424
|
+
/** Context ingestion ID (`cig_...`). */
|
|
425
|
+
id: z.string().describe("Context ingestion ID (`cig_...`)."),
|
|
426
|
+
/** Arbitrary key-value metadata associated with this ingestion run. Shape is caller-defined. */
|
|
427
|
+
metadata: z.record(z.unknown()).optional().describe("Arbitrary key-value metadata associated with this ingestion run. Shape is caller-defined."),
|
|
428
|
+
/** ID of the context source being ingested (`cso_...`). `null` if the source has been deleted. */
|
|
429
|
+
source: z.string().optional().describe("ID of the context source being ingested (`cso_...`). `null` if the source has been deleted."),
|
|
430
|
+
/** When the ingestion job began processing. `null` if the job is still pending. */
|
|
431
|
+
started_at: z.string().optional().describe("When the ingestion job began processing. `null` if the job is still pending."),
|
|
432
|
+
/** Current processing status. One of `"pending"`, `"running"`, `"awaiting_callback"`, `"succeeded"`, or `"failed"`. */
|
|
433
|
+
status: z.string().describe("Current processing status. One of `\"pending\"`, `\"running\"`, `\"awaiting_callback\"`, `\"succeeded\"`, or `\"failed\"`."),
|
|
434
|
+
/** ID of the team that owns this ingestion (`tem_...`). `null` if owned by a user or agent. */
|
|
435
|
+
team: z.string().optional().describe("ID of the team that owns this ingestion (`tem_...`). `null` if owned by a user or agent."),
|
|
436
|
+
/** When the ingestion record was last updated (ISO 8601). */
|
|
437
|
+
updated_at: z.string().optional().describe("When the ingestion record was last updated (ISO 8601)."),
|
|
438
|
+
/** ID of the user that initiated this ingestion (`usr_...`). `null` if initiated by an agent. */
|
|
439
|
+
user: z.string().optional().describe("ID of the user that initiated this ingestion (`usr_...`). `null` if initiated by an agent."),
|
|
440
|
+
}).describe("A context ingestion job that processes a context source and populates its documents. Tracks status and timing from submission through completion or failure.");
|
|
441
|
+
/** Runtime validator for {@link CustomObject}. */
|
|
154
442
|
export const customObjectSchema = z.object({
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
/**
|
|
443
|
+
/** When the custom object was created (ISO 8601). */
|
|
444
|
+
created_at: z.string().optional().describe("When the custom object was created (ISO 8601)."),
|
|
445
|
+
/** Map of field names to their current values as defined by the object's schema type. */
|
|
446
|
+
fields: z.record(z.unknown()).optional().describe("Map of field names to their current values as defined by the object's schema type."),
|
|
447
|
+
/** Unique identifier for the custom object (`cobj_...`). */
|
|
448
|
+
id: z.string().describe("Unique identifier for the custom object (`cobj_...`)."),
|
|
449
|
+
/** ID of the organization this object belongs to (`org_...`). */
|
|
450
|
+
org: z.string().optional().describe("ID of the organization this object belongs to (`org_...`)."),
|
|
451
|
+
/** An optional stable key used to identify this object by a caller-controlled string rather than its generated ID. `null` if not set. */
|
|
452
|
+
row_key: z.string().optional().describe("An optional stable key used to identify this object by a caller-controlled string rather than its generated ID. `null` if not set."),
|
|
453
|
+
/** ID of the sandbox environment this object is scoped to (`dsb_...`). `null` for production objects. */
|
|
454
|
+
sandbox: z.string().optional().describe("ID of the sandbox environment this object is scoped to (`dsb_...`). `null` for production objects."),
|
|
455
|
+
/** The lookup key of the schema type that defines this object's field structure. `null` if the schema type has not been set. */
|
|
456
|
+
schema_type: z.string().optional().describe("The lookup key of the schema type that defines this object's field structure. `null` if the schema type has not been set."),
|
|
457
|
+
/** ID of the team that owns this object (`tem_...`). `null` if the object is not team-scoped. */
|
|
458
|
+
team: z.string().optional().describe("ID of the team that owns this object (`tem_...`). `null` if the object is not team-scoped."),
|
|
459
|
+
/** When the custom object was last modified (ISO 8601). `null` if the object has never been updated after creation. */
|
|
460
|
+
updated_at: z.string().optional().describe("When the custom object was last modified (ISO 8601). `null` if the object has never been updated after creation."),
|
|
461
|
+
/** ID of the user that owns this object (`usr_...`). `null` if the object is not user-scoped. */
|
|
462
|
+
user: z.string().optional().describe("ID of the user that owns this object (`usr_...`). `null` if the object is not user-scoped."),
|
|
463
|
+
/** Optimistic concurrency version of the object. Increments with each successful update; pass this value in write operations to detect conflicting changes. */
|
|
464
|
+
version: z.number().int().optional().describe("Optimistic concurrency version of the object. Increments with each successful update; pass this value in write operations to detect conflicting changes."),
|
|
465
|
+
}).describe("A custom object belonging to an organization. Custom objects store arbitrary structured data defined by a schema type and are scoped to an org, team, or user.");
|
|
466
|
+
/** Runtime validator for {@link CustomObjectListResponse}. */
|
|
467
|
+
export const customObjectListResponseSchema = z.object({
|
|
468
|
+
/** Array of custom objects for the current page. */
|
|
469
|
+
data: z.array(customObjectSchema).describe("Array of custom objects for the current page."),
|
|
470
|
+
/** `true` if a subsequent page of results exists; `false` if this is the last page. */
|
|
471
|
+
has_next: z.boolean().describe("`true` if a subsequent page of results exists; `false` if this is the last page."),
|
|
472
|
+
/** `true` if a preceding page of results exists; `false` if this is the first page. */
|
|
473
|
+
has_prev: z.boolean().describe("`true` if a preceding page of results exists; `false` if this is the first page."),
|
|
474
|
+
/** The current page number (1-indexed). */
|
|
475
|
+
page: z.number().int().describe("The current page number (1-indexed)."),
|
|
476
|
+
/** Maximum number of results returned per page. */
|
|
477
|
+
page_size: z.number().int().describe("Maximum number of results returned per page."),
|
|
478
|
+
/** Total number of custom objects matching the query across all pages. */
|
|
479
|
+
total_entries: z.number().int().describe("Total number of custom objects matching the query across all pages."),
|
|
480
|
+
/** Total number of pages available for the current query. */
|
|
481
|
+
total_pages: z.number().int().describe("Total number of pages available for the current query."),
|
|
482
|
+
}).describe("A paginated page of custom objects returned by a list operation. Use the pagination fields to navigate through result sets.");
|
|
483
|
+
/** Runtime validator for {@link CustomObjectUpdateFieldsResponse}. */
|
|
484
|
+
export const customObjectUpdateFieldsResponseSchema = z.object({
|
|
485
|
+
/** Map of field names to their new values as applied during the update. Only the fields that were included in the update request are present. */
|
|
486
|
+
fields: z.record(z.unknown()).describe("Map of field names to their new values as applied during the update. Only the fields that were included in the update request are present."),
|
|
487
|
+
/** ID of the custom object that was updated (`cobj_...`). */
|
|
488
|
+
id: z.string().describe("ID of the custom object that was updated (`cobj_...`)."),
|
|
489
|
+
}).describe("Response returned after updating one or more fields on a custom object. Confirms the object that was modified and the field values that were applied.");
|
|
490
|
+
/** Runtime validator for {@link DeviceAuthorizationResponse}. */
|
|
168
491
|
export const deviceAuthorizationResponseSchema = z.object({
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
492
|
+
/** Opaque code identifying this device authorization session. Pass this value when polling the token endpoint; do not display it to the user. */
|
|
493
|
+
device_code: z.string().describe("Opaque code identifying this device authorization session. Pass this value when polling the token endpoint; do not display it to the user."),
|
|
494
|
+
/** Number of seconds until the `device_code` and `user_code` expire. After expiry the user must restart the authorization flow. */
|
|
495
|
+
expires_in: z.number().int().describe("Number of seconds until the `device_code` and `user_code` expire. After expiry the user must restart the authorization flow."),
|
|
496
|
+
/** Minimum number of seconds to wait between polling attempts on the token endpoint. Polling more frequently will result in a `slow_down` error. */
|
|
497
|
+
interval: z.number().int().describe("Minimum number of seconds to wait between polling attempts on the token endpoint. Polling more frequently will result in a `slow_down` error."),
|
|
498
|
+
/** Short alphanumeric code the user must enter at `verification_uri` to authorize the device. */
|
|
499
|
+
user_code: z.string().describe("Short alphanumeric code the user must enter at `verification_uri` to authorize the device."),
|
|
500
|
+
/** URL the user visits to enter the `user_code` and approve the authorization request. */
|
|
501
|
+
verification_uri: z.string().describe("URL the user visits to enter the `user_code` and approve the authorization request."),
|
|
502
|
+
/** Full verification URL with the `user_code` pre-filled as a query parameter. Display this as a QR code or deep link to reduce manual entry. */
|
|
503
|
+
verification_uri_complete: z.string().describe("Full verification URL with the `user_code` pre-filled as a query parameter. Display this as a QR code or deep link to reduce manual entry."),
|
|
504
|
+
}).describe("The initial response from an OAuth 2.0 Device Authorization Grant request, containing the codes and URIs needed to complete device authentication.");
|
|
505
|
+
/** Runtime validator for {@link DeviceAuthorizationStatusResponse}. */
|
|
177
506
|
export const deviceAuthorizationStatusResponseSchema = z.object({
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
507
|
+
/** Outcome of the device authorization request. One of `"approved"` (the user granted access) or `"denied"` (the user rejected or cancelled the request). */
|
|
508
|
+
status: z.string().describe("Outcome of the device authorization request. One of `\"approved\"` (the user granted access) or `\"denied\"` (the user rejected or cancelled the request)."),
|
|
509
|
+
}).describe("The result of a completed OAuth 2.0 Device Authorization flow, indicating whether the user approved or denied the device's access request.");
|
|
510
|
+
/** Runtime validator for {@link AgentHealthAction}. */
|
|
511
|
+
export const agentHealthActionSchema = z.object({
|
|
512
|
+
/** ID of the agent this action is scoped to (`agt_...`). `null` for org-level actions. */
|
|
513
|
+
agent: z.string().optional().describe("ID of the agent this action is scoped to (`agt_...`). `null` for org-level actions."),
|
|
514
|
+
/** ID of the application this action is associated with (`app_...`). `null` when not app-scoped. */
|
|
515
|
+
app: z.string().optional().describe("ID of the application this action is associated with (`app_...`). `null` when not app-scoped."),
|
|
516
|
+
/** When this health action was first created (ISO 8601). */
|
|
517
|
+
created_at: z.string().optional().describe("When this health action was first created (ISO 8601)."),
|
|
518
|
+
/** IDs of other health actions that must reach `"completed"` status before this action can be started. Empty array when there are no dependencies. */
|
|
519
|
+
depends_on: z.array(z.string()).optional().describe("IDs of other health actions that must reach `\"completed\"` status before this action can be started. Empty array when there are no dependencies."),
|
|
520
|
+
/** Longer Markdown-formatted explanation of what the action requires and why. `null` if not provided. */
|
|
521
|
+
description: z.string().optional().describe("Longer Markdown-formatted explanation of what the action requires and why. `null` if not provided."),
|
|
522
|
+
/** Health action ID (`aha_...`). */
|
|
523
|
+
id: z.string().describe("Health action ID (`aha_...`)."),
|
|
524
|
+
/** Category of action to take. One of `"env_var"` (set a secret), `"install"` (complete an agent installation, e.g. a GitHub App), `"custom"` (agent-defined step), or `"integration"` (authorize an OAuth-backed MCP server integration). */
|
|
525
|
+
kind: z.string().describe("Category of action to take. One of `\"env_var\"` (set a secret), `\"install\"` (complete an agent installation, e.g. a GitHub App), `\"custom\"` (agent-defined step), or `\"integration\"` (authorize an OAuth-backed MCP server integration)."),
|
|
526
|
+
/** When the verifier last ran for this action (ISO 8601). `null` until the verifier has been invoked at least once. */
|
|
527
|
+
last_verified_at: z.string().optional().describe("When the verifier last ran for this action (ISO 8601). `null` until the verifier has been invoked at least once."),
|
|
528
|
+
/** Human-readable output from the most recent verifier run. `null` if the verifier has not run yet. */
|
|
529
|
+
last_verifier_message: z.string().optional().describe("Human-readable output from the most recent verifier run. `null` if the verifier has not run yet."),
|
|
530
|
+
/** ID of the organization this action is associated with (`org_...`). `null` when not org-scoped. */
|
|
531
|
+
org: z.string().optional().describe("ID of the organization this action is associated with (`org_...`). `null` when not org-scoped."),
|
|
532
|
+
/** 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` and `integration_id` for OAuth handoff. Empty object `{}` when no additional parameters are needed. */
|
|
533
|
+
params: z.record(z.unknown()).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` and `integration_id` for OAuth handoff. Empty object `{}` when no additional parameters are needed."),
|
|
534
|
+
/** `true` if this action must be completed before the agent is considered fully operational and counts toward the blocking checklist progress bar. */
|
|
535
|
+
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."),
|
|
536
|
+
/** Display order within the same `source` group. Lower values appear first. */
|
|
537
|
+
sort_order: z.number().int().describe("Display order within the same `source` group. Lower values appear first."),
|
|
538
|
+
/** Lifecycle stage that produced this action. One of `"setup"` (post-install checklist item) or `"health"` (probe-detected issue). */
|
|
539
|
+
source: z.string().describe("Lifecycle stage that produced this action. One of `\"setup\"` (post-install checklist item) or `\"health\"` (probe-detected issue)."),
|
|
540
|
+
/** Current resolution state. One of `"pending"` (not yet completed), `"completed"` (resolved), `"skipped"` (dismissed by the user), or `"degraded"` (completed but the verifier is reporting a warning). */
|
|
541
|
+
status: z.string().describe("Current resolution state. One of `\"pending\"` (not yet completed), `\"completed\"` (resolved), `\"skipped\"` (dismissed by the user), or `\"degraded\"` (completed but the verifier is reporting a warning)."),
|
|
542
|
+
/** Short display label for this action, intended for use as a checklist item heading. */
|
|
543
|
+
title: z.string().describe("Short display label for this action, intended for use as a checklist item heading."),
|
|
544
|
+
/** When this health action was last modified (ISO 8601). */
|
|
545
|
+
updated_at: z.string().optional().describe("When this health action was last modified (ISO 8601)."),
|
|
546
|
+
/** 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. */
|
|
547
|
+
verify_config: z.record(z.unknown()).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."),
|
|
548
|
+
}).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.");
|
|
549
|
+
/** Runtime validator for {@link HealthActionListResponse}. */
|
|
550
|
+
export const healthActionListResponseSchema = z.object({
|
|
551
|
+
/** Array of agent health action objects representing setup checklist items and probe-detected issues. */
|
|
552
|
+
data: z.array(agentHealthActionSchema).describe("Array of agent health action objects representing setup checklist items and probe-detected issues."),
|
|
553
|
+
}).describe("List response containing agent health actions for a given agent or organization.");
|
|
554
|
+
/** Runtime validator for {@link Installation}. */
|
|
181
555
|
export const installationSchema = z.object({
|
|
182
|
-
agent
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
/**
|
|
556
|
+
/** ID of the agent that owns this installation (`agi_...`). `null` if the installation has no agent owner. */
|
|
557
|
+
agent: z.string().optional().describe("ID of the agent that owns this installation (`agi_...`). `null` if the installation has no agent owner."),
|
|
558
|
+
/** Kind-specific configuration object for this installation. Shape depends on the `kind` value. `null` if the kind requires no configuration. */
|
|
559
|
+
config: z.record(z.unknown()).optional().describe("Kind-specific configuration object for this installation. Shape depends on the `kind` value. `null` if the kind requires no configuration."),
|
|
560
|
+
/** When the installation was created (ISO 8601). */
|
|
561
|
+
created_at: z.string().optional().describe("When the installation was created (ISO 8601)."),
|
|
562
|
+
/** Installation ID (`cin_...`). */
|
|
563
|
+
id: z.string().describe("Installation ID (`cin_...`)."),
|
|
564
|
+
/** Slug identifying the type of external service this installation connects to, e.g. `"enablement/github_app"` or `"integration/gmail"`. `null` if not set. */
|
|
565
|
+
kind: z.string().optional().describe("Slug identifying the type of external service this installation connects to, e.g. `\"enablement/github_app\"` or `\"integration/gmail\"`. `null` if not set."),
|
|
566
|
+
/** Caller-assigned stable identifier for this installation, used to reference it in knowledge search `source_refs`. `null` if no lookup key was provided at creation time. */
|
|
567
|
+
lookup_key: z.string().optional().describe("Caller-assigned stable identifier for this installation, used to reference it in knowledge search `source_refs`. `null` if no lookup key was provided at creation time."),
|
|
568
|
+
/** ID of the shared org- or app-level integration bound to this installation (`int_...`). `null` if no integration has been bound. */
|
|
569
|
+
shared_integration: z.string().optional().describe("ID of the shared org- or app-level integration bound to this installation (`int_...`). `null` if no integration has been bound."),
|
|
570
|
+
/** 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. */
|
|
571
|
+
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."),
|
|
572
|
+
/** Provider-supplied status detail for this installation, set during activation or event processing. `null` if no status has been reported. */
|
|
573
|
+
status_payload: z.record(z.unknown()).optional().describe("Provider-supplied status detail for this installation, set during activation or event processing. `null` if no status has been reported."),
|
|
574
|
+
/** When the installation record was last updated (ISO 8601). */
|
|
575
|
+
updated_at: z.string().optional().describe("When the installation record was last updated (ISO 8601)."),
|
|
576
|
+
}).describe("An installation representing a connection between an agent and an external service or enablement channel. Tracks configuration, lifecycle state, and any bound integration.");
|
|
577
|
+
/** Runtime validator for {@link InstallationKind}. */
|
|
193
578
|
export const installationKindSchema = z.object({
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
kind
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
579
|
+
/** When `true`, sources can be attached to installations of this kind to supply additional context to the agent. */
|
|
580
|
+
accepts_sources: z.boolean().optional().describe("When `true`, sources can be attached to installations of this kind to supply additional context to the agent."),
|
|
581
|
+
/** Grouping category for UI display purposes, e.g. `"enablement"` or `"integration"`. `null` if uncategorized. */
|
|
582
|
+
category: z.string().optional().describe("Grouping category for UI display purposes, e.g. `\"enablement\"` or `\"integration\"`. `null` if uncategorized."),
|
|
583
|
+
/** 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. */
|
|
584
|
+
config_schema: z.record(z.unknown()).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."),
|
|
585
|
+
/** Short prose description of what this kind connects to and how it is used. `null` if no description is defined. */
|
|
586
|
+
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."),
|
|
587
|
+
/** 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. */
|
|
588
|
+
kind: z.string().describe("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."),
|
|
589
|
+
/** Human-readable display name for this kind, e.g. `"GitHub App"`. `null` if the kind has no label defined. */
|
|
590
|
+
label: z.string().optional().describe("Human-readable display name for this kind, e.g. `\"GitHub App\"`. `null` if the kind has no label defined."),
|
|
591
|
+
/** Identifier of the external provider this kind connects to, e.g. `"github"` or `"slack"`. `null` for kinds with no specific provider. */
|
|
592
|
+
provider: z.string().optional().describe("Identifier of the external provider this kind connects to, e.g. `\"github\"` or `\"slack\"`. `null` for kinds with no specific provider."),
|
|
593
|
+
/** When `true`, this kind requires an integration to be provided (either inline or via `shared_integration`) before the installation can be activated. */
|
|
594
|
+
requires_integration: z.boolean().optional().describe("When `true`, this kind requires an integration to be provided (either inline or via `shared_integration`) before the installation can be activated."),
|
|
595
|
+
}).describe("A supported installation kind describing a category of external service or enablement channel an agent can be connected to.");
|
|
596
|
+
/** Runtime validator for {@link InstallationKindListResponse}. */
|
|
204
597
|
export const installationKindListResponseSchema = z.object({
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
598
|
+
/** Array of installation kind objects describing the available integration types and their configuration requirements. */
|
|
599
|
+
data: z.array(installationKindSchema).describe("Array of installation kind objects describing the available integration types and their configuration requirements."),
|
|
600
|
+
}).describe("List response containing all available installation kinds that can be used when configuring an agent installation.");
|
|
601
|
+
/** Runtime validator for {@link InstallationListResponse}. */
|
|
208
602
|
export const installationListResponseSchema = z.object({
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
603
|
+
/** Array of installation objects returned for the current page. */
|
|
604
|
+
data: z.array(installationSchema).describe("Array of installation objects returned for the current page."),
|
|
605
|
+
}).describe("Paginated list response containing installation objects for an agent.");
|
|
606
|
+
/** Runtime validator for {@link InstallationSource}. */
|
|
212
607
|
export const installationSourceSchema = z.object({
|
|
213
|
-
agent
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
/**
|
|
608
|
+
/** ID of the agent that owns this source (`agi_...`). `null` if the source is not agent-owned. */
|
|
609
|
+
agent: z.string().optional().describe("ID of the agent that owns this source (`agi_...`). `null` if the source is not agent-owned."),
|
|
610
|
+
/** ID of the installation this source belongs to (`cin_...`). `null` if the source is not attached to an installation. */
|
|
611
|
+
context_installation: z.string().optional().describe("ID of the installation this source belongs to (`cin_...`). `null` if the source is not attached to an installation."),
|
|
612
|
+
/** When the source was created (ISO 8601). */
|
|
613
|
+
created_at: z.string().optional().describe("When the source was created (ISO 8601)."),
|
|
614
|
+
/** Source ID (`cso_...`). */
|
|
615
|
+
id: z.string().describe("Source ID (`cso_...`)."),
|
|
616
|
+
/** Arbitrary key-value metadata associated with this source. Shape is caller-defined. `null` if no metadata was set. */
|
|
617
|
+
metadata: z.record(z.unknown()).optional().describe("Arbitrary key-value metadata associated with this source. Shape is caller-defined. `null` if no metadata was set."),
|
|
618
|
+
/** ID of the parent source (`cso_...`) when this source was derived from another source. `null` for top-level sources. */
|
|
619
|
+
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."),
|
|
620
|
+
/** Type-specific payload provided when the source was created. The shape depends on the `type` value. `null` if no payload was supplied. */
|
|
621
|
+
payload: z.record(z.unknown()).optional().describe("Type-specific payload provided when the source was created. The shape depends on the `type` value. `null` if no payload was supplied."),
|
|
622
|
+
/** 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. */
|
|
623
|
+
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."),
|
|
624
|
+
/** ID of the team associated with this source (`tem_...`). `null` if the source has no team association. */
|
|
625
|
+
team: z.string().optional().describe("ID of the team associated with this source (`tem_...`). `null` if the source has no team association."),
|
|
626
|
+
/** ID of the conversation thread linked to this source (`thr_...`). `null` if the source is not thread-scoped. */
|
|
627
|
+
thread: z.string().optional().describe("ID of the conversation thread linked to this source (`thr_...`). `null` if the source is not thread-scoped."),
|
|
628
|
+
/** Slug identifying the kind of content this source provides, e.g. `"file/document"` or `"web/link"`. `null` if the type is not set. */
|
|
629
|
+
type: z.string().optional().describe("Slug identifying the kind of content this source provides, e.g. `\"file/document\"` or `\"web/link\"`. `null` if the type is not set."),
|
|
630
|
+
/** When the source record was last updated (ISO 8601). */
|
|
631
|
+
updated_at: z.string().optional().describe("When the source record was last updated (ISO 8601)."),
|
|
632
|
+
/** ID of the user associated with this source (`usr_...`). `null` if the source has no user association. */
|
|
633
|
+
user: z.string().optional().describe("ID of the user associated with this source (`usr_...`). `null` if the source has no user association."),
|
|
634
|
+
}).describe("A source attached to an installation that supplies content for the agent's context. Sources are processed asynchronously after creation.");
|
|
635
|
+
/** Runtime validator for {@link InstallationSourceListResponse}. */
|
|
228
636
|
export const installationSourceListResponseSchema = z.object({
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
Maps exactly to render_entry/1 output in ApiStorageController.
|
|
234
|
-
*/
|
|
637
|
+
/** Array of installation source objects returned for the current page. */
|
|
638
|
+
data: z.array(installationSourceSchema).describe("Array of installation source objects returned for the current page."),
|
|
639
|
+
}).describe("Paginated list response containing installation source objects attached to an installation.");
|
|
640
|
+
/** Runtime validator for {@link KeyValueStorageEntry}. */
|
|
235
641
|
export const keyValueStorageEntrySchema = z.object({
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
the
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
*/
|
|
642
|
+
/** When this storage entry was first created (ISO 8601). `null` if not yet persisted. */
|
|
643
|
+
created_at: z.string().optional().describe("When this storage entry was first created (ISO 8601). `null` if not yet persisted."),
|
|
644
|
+
/** The string key used to store and look up this entry. */
|
|
645
|
+
key: z.string().describe("The string key used to store and look up this entry."),
|
|
646
|
+
/** When this storage entry was last updated (ISO 8601). `null` if not yet persisted. */
|
|
647
|
+
updated_at: z.string().optional().describe("When this storage entry was last updated (ISO 8601). `null` if not yet persisted."),
|
|
648
|
+
/** ID of the user who owns this storage entry (`usr_...`). */
|
|
649
|
+
user: z.string().describe("ID of the user who owns this storage entry (`usr_...`)."),
|
|
650
|
+
/** The string value stored under `key` for this user. */
|
|
651
|
+
value: z.string().describe("The string value stored under `key` for this user."),
|
|
652
|
+
}).describe("A single key-value storage entry belonging to a user. Represents one key/value pair written to a user's isolated storage namespace within an app.");
|
|
653
|
+
/** Runtime validator for {@link KeyValueStorageEntryWithUser}. */
|
|
249
654
|
export const keyValueStorageEntryWithUserSchema = z.object({
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
/**
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
*/
|
|
655
|
+
/** When this storage entry was first created (ISO 8601). */
|
|
656
|
+
created_at: z.string().describe("When this storage entry was first created (ISO 8601)."),
|
|
657
|
+
/** The string key used to store and look up this entry. */
|
|
658
|
+
key: z.string().describe("The string key used to store and look up this entry."),
|
|
659
|
+
/** When this storage entry was last updated (ISO 8601). */
|
|
660
|
+
updated_at: z.string().describe("When this storage entry was last updated (ISO 8601)."),
|
|
661
|
+
/** ID of the user who owns this storage entry (`usr_...`). */
|
|
662
|
+
user: z.string().describe("ID of the user who owns this storage entry (`usr_...`)."),
|
|
663
|
+
/** Email address of the owning user. `null` for end-user (user-JWT) callers; populated for developer and server-to-server callers. */
|
|
664
|
+
user_email: z.string().optional().describe("Email address of the owning user. `null` for end-user (user-JWT) callers; populated for developer and server-to-server callers."),
|
|
665
|
+
/** Display name of the owning user. `null` for end-user (user-JWT) callers; populated for developer and server-to-server callers. */
|
|
666
|
+
user_name: z.string().optional().describe("Display name of the owning user. `null` for end-user (user-JWT) callers; populated for developer and server-to-server callers."),
|
|
667
|
+
/** The string value stored under `key` for this user. */
|
|
668
|
+
value: z.string().describe("The string value stored under `key` for this user."),
|
|
669
|
+
}).describe("A key-value storage entry enriched with owner information. Developer and server-to-server callers receive `user_email` and `user_name` populated; end-user (user-JWT) callers receive those fields as `null`.");
|
|
670
|
+
/** Runtime validator for {@link KeyValueStorageEntryPage}. */
|
|
263
671
|
export const keyValueStorageEntryPageSchema = z.object({
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
/**
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
the
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
/**
|
|
672
|
+
/** Array of key-value storage entries for the current page. */
|
|
673
|
+
data: z.array(keyValueStorageEntryWithUserSchema).describe("Array of key-value storage entries for the current page."),
|
|
674
|
+
/** Whether a subsequent page exists. `false` when the current page is the last page. Present only for developer and server-to-server callers. */
|
|
675
|
+
has_next: z.boolean().optional().describe("Whether a subsequent page exists. `false` when the current page is the last page. Present only for developer and server-to-server callers."),
|
|
676
|
+
/** Whether a preceding page exists. `false` when the current page is the first page. Present only for developer and server-to-server callers. */
|
|
677
|
+
has_prev: z.boolean().optional().describe("Whether a preceding page exists. `false` when the current page is the first page. Present only for developer and server-to-server callers."),
|
|
678
|
+
/** Current page number (1-indexed). Present only for developer and server-to-server callers. */
|
|
679
|
+
page: z.number().int().optional().describe("Current page number (1-indexed). Present only for developer and server-to-server callers."),
|
|
680
|
+
/** Maximum number of results returned per page. Present only for developer and server-to-server callers. */
|
|
681
|
+
page_size: z.number().int().optional().describe("Maximum number of results returned per page. Present only for developer and server-to-server callers."),
|
|
682
|
+
/** Total number of storage entries matching the applied filters across all pages. Present only for developer and server-to-server callers. */
|
|
683
|
+
total_entries: z.number().int().optional().describe("Total number of storage entries matching the applied filters across all pages. Present only for developer and server-to-server callers."),
|
|
684
|
+
/** Total number of pages available given the current `page_size`. Present only for developer and server-to-server callers. */
|
|
685
|
+
total_pages: z.number().int().optional().describe("Total number of pages available given the current `page_size`. Present only for developer and server-to-server callers."),
|
|
686
|
+
}).describe("Paginated response envelope for the dual-mode key-value storage list endpoint. End-user (user-JWT) callers receive only `data`; developer and server-to-server callers also receive pagination metadata fields.");
|
|
687
|
+
/** Runtime validator for {@link KnowledgeSource}. */
|
|
688
|
+
export const knowledgeSourceSchema = z.object({
|
|
689
|
+
/** ID of the agent that owns this source (`agt_...`). `null` if owned by a human user or team. */
|
|
690
|
+
agent: z.string().optional().describe("ID of the agent that owns this source (`agt_...`). `null` if owned by a human user or team."),
|
|
691
|
+
/** ID of the context installation that provisioned this source (`cin_...`). `null` when the source was created directly rather than through an installation. */
|
|
692
|
+
context_installation: z.string().optional().describe("ID of the context installation that provisioned this source (`cin_...`). `null` when the source was created directly rather than through an installation."),
|
|
693
|
+
/** When this knowledge source was created (ISO 8601). */
|
|
694
|
+
created_at: z.string().optional().describe("When this knowledge source was created (ISO 8601)."),
|
|
695
|
+
/** Knowledge source ID (`cso_...`). */
|
|
696
|
+
id: z.string().describe("Knowledge source ID (`cso_...`)."),
|
|
697
|
+
/** Arbitrary key-value metadata attached to this source. Useful for storing caller-defined labels or references. */
|
|
698
|
+
metadata: z.record(z.unknown()).optional().describe("Arbitrary key-value metadata attached to this source. Useful for storing caller-defined labels or references."),
|
|
699
|
+
/** ID of the organization this source belongs to (`org_...`). `null` if not scoped to an org. */
|
|
700
|
+
org: z.string().optional().describe("ID of the organization this source belongs to (`org_...`). `null` if not scoped to an org."),
|
|
701
|
+
/** ID of the parent knowledge source (`cso_...`) when this source was derived from another. `null` for top-level sources. */
|
|
702
|
+
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."),
|
|
703
|
+
/** Type-specific configuration object. The keys depend on the source `type`; see the create endpoint for the expected shape per type. */
|
|
704
|
+
payload: z.record(z.unknown()).optional().describe("Type-specific configuration object. The keys depend on the source `type`; see the create endpoint for the expected shape per type."),
|
|
705
|
+
/** ID of the developer sandbox this source is scoped to (`sbx_...`). `null` outside sandbox contexts. */
|
|
706
|
+
sandbox: z.string().optional().describe("ID of the developer sandbox this source is scoped to (`sbx_...`). `null` outside sandbox contexts."),
|
|
707
|
+
/** Current lifecycle state of the source. One of `"active"` (ingestion running normally) or `"paused"` (ingestion suspended). */
|
|
708
|
+
state: z.string().describe("Current lifecycle state of the source. One of `\"active\"` (ingestion running normally) or `\"paused\"` (ingestion suspended)."),
|
|
709
|
+
/** ID of the team that owns this source (`tea_...`). `null` if owned by a user, agent, or org. */
|
|
710
|
+
team: z.string().optional().describe("ID of the team that owns this source (`tea_...`). `null` if owned by a user, agent, or org."),
|
|
711
|
+
/** ID of the chat thread this source is associated with (`thr_...`). `null` when not thread-scoped. */
|
|
712
|
+
thread: z.string().optional().describe("ID of the chat thread this source is associated with (`thr_...`). `null` when not thread-scoped."),
|
|
713
|
+
/** Source type identifier (e.g. `"gmail"`, `"github_activity"`). Determines the shape of `payload` and the ingestion behavior. */
|
|
714
|
+
type: z.string().describe("Source type identifier (e.g. `\"gmail\"`, `\"github_activity\"`). Determines the shape of `payload` and the ingestion behavior."),
|
|
715
|
+
/** When this knowledge source was last modified (ISO 8601). */
|
|
716
|
+
updated_at: z.string().optional().describe("When this knowledge source was last modified (ISO 8601)."),
|
|
717
|
+
/** ID of the user that owns this source (`usr_...`). `null` if owned by a team, agent, or org. */
|
|
718
|
+
user: z.string().optional().describe("ID of the user that owns this source (`usr_...`). `null` if owned by a team, agent, or org."),
|
|
719
|
+
}).describe("A knowledge source that ingests content into the knowledge base. Sources connect to external systems (e.g. Gmail, GitHub) and continuously or on-demand index items for search.");
|
|
720
|
+
/** Runtime validator for {@link KnowledgeSourceKind}. */
|
|
721
|
+
export const knowledgeSourceKindSchema = z.object({
|
|
722
|
+
/** Short description of what this source kind ingests and how it is used. */
|
|
723
|
+
description: z.string().optional().describe("Short description of what this source kind ingests and how it is used."),
|
|
724
|
+
/** Human-readable display name for this source kind, suitable for showing in a UI. */
|
|
725
|
+
label: z.string().optional().describe("Human-readable display name for this source kind, suitable for showing in a UI."),
|
|
726
|
+
/** Machine-readable type identifier for this source kind (e.g. `"gmail"`, `"github_activity"`). Pass this value as `type` when creating a knowledge source. */
|
|
727
|
+
type: z.string().describe("Machine-readable type identifier for this source kind (e.g. `\"gmail\"`, `\"github_activity\"`). Pass this value as `type` when creating a knowledge source."),
|
|
728
|
+
}).describe("Describes a single knowledge source kind that can be created through the public API. Use the `type` value when creating a new knowledge source.");
|
|
729
|
+
/** Runtime validator for {@link KnowledgeSourceKindListResponse}. */
|
|
730
|
+
export const knowledgeSourceKindListResponseSchema = z.object({
|
|
731
|
+
/** Array of knowledge source kind objects describing each creatable source type. */
|
|
732
|
+
data: z.array(knowledgeSourceKindSchema).describe("Array of knowledge source kind objects describing each creatable source type."),
|
|
733
|
+
}).describe("List response containing the knowledge source kinds available for creation via the API.");
|
|
734
|
+
/** Runtime validator for {@link OAuthTokenResponse}. */
|
|
310
735
|
export const oAuthTokenResponseSchema = z.object({
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
736
|
+
/** Bearer token used to authenticate API requests. Include this value in the `Authorization: Bearer <token>` header. */
|
|
737
|
+
access_token: z.string().describe("Bearer token used to authenticate API requests. Include this value in the `Authorization: Bearer <token>` header."),
|
|
738
|
+
/** Number of seconds until the access token expires. */
|
|
739
|
+
expires_in: z.number().int().describe("Number of seconds until the access token expires."),
|
|
740
|
+
/** Token that can be exchanged for a new access token once the current one expires. `null` if the grant type does not issue refresh tokens. */
|
|
741
|
+
refresh_token: z.string().optional().describe("Token that can be exchanged for a new access token once the current one expires. `null` if the grant type does not issue refresh tokens."),
|
|
742
|
+
/** Space-separated list of scopes granted to the access token. `null` if scope was not included in the grant request. */
|
|
743
|
+
scope: z.string().optional().describe("Space-separated list of scopes granted to the access token. `null` if scope was not included in the grant request."),
|
|
744
|
+
/** Token type. Always `"Bearer"`. */
|
|
745
|
+
token_type: z.string().describe("Token type. Always `\"Bearer\"`."),
|
|
746
|
+
/** The authenticated user associated with this token. `null` when the token is not tied to a specific user (e.g. client-credentials grants). */
|
|
747
|
+
user: userSchema.optional().describe("The authenticated user associated with this token. `null` when the token is not tied to a specific user (e.g. client-credentials grants)."),
|
|
748
|
+
}).describe("A successful OAuth 2.0 token response. Issued by the token endpoint after a completed authorization or device-flow grant.");
|
|
749
|
+
/** Runtime validator for {@link PaginatedReplies}. */
|
|
323
750
|
export const paginatedRepliesSchema = z.object({
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
|
|
332
|
-
*/
|
|
751
|
+
/** Opaque cursor to pass as the pagination cursor to retrieve the page of replies that follow this one. `null` when no further pages exist. */
|
|
752
|
+
after_cursor: z.string().optional().describe("Opaque cursor to pass as the pagination cursor to retrieve the page of replies that follow this one. `null` when no further pages exist."),
|
|
753
|
+
/** Opaque cursor to pass as the pagination cursor to retrieve the page of replies that precede this one. `null` when no earlier pages exist. */
|
|
754
|
+
before_cursor: z.string().optional().describe("Opaque cursor to pass as the pagination cursor to retrieve the page of replies that precede this one. `null` when no earlier pages exist."),
|
|
755
|
+
/** Whether additional reply pages exist beyond the current page. */
|
|
756
|
+
has_more: z.boolean().optional().describe("Whether additional reply pages exist beyond the current page."),
|
|
757
|
+
/** Array of reply message objects for the current page. */
|
|
758
|
+
replies: z.array(messageSchema).describe("Array of reply message objects for the current page."),
|
|
759
|
+
/** Total number of replies in the thread across all pages. */
|
|
760
|
+
total_count: z.number().int().optional().describe("Total number of replies in the thread across all pages."),
|
|
761
|
+
}).describe("A paginated list of reply messages for a thread. The reply array is returned directly, not nested inside a `data` wrapper.");
|
|
762
|
+
/** Runtime validator for {@link RoutinePreset}. */
|
|
333
763
|
export const routinePresetSchema = z.object({
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
|
|
764
|
+
/** Event types that routines using this preset may be triggered by. `["*"]` means the preset accepts any event type. Routines assigned to this preset will be rejected at creation time if their trigger event is not in this list. */
|
|
765
|
+
applicable_events: z.array(z.string()).describe("Event types that routines using this preset may be triggered by. `[\"*\"]` means the preset accepts any event type. Routines assigned to this preset will be rejected at creation time if their trigger event is not in this list."),
|
|
766
|
+
/** Whether routines using this preset can be composed as a step inside a chain routine. Presets with sessionable or asynchronous execution models are not chainable. */
|
|
767
|
+
chainable: z.boolean().describe("Whether routines using this preset can be composed as a step inside a chain routine. Presets with sessionable or asynchronous execution models are not chainable."),
|
|
768
|
+
/** Human-readable description of what the preset does and when to use it. */
|
|
769
|
+
description: z.string().describe("Human-readable description of what the preset does and when to use it."),
|
|
770
|
+
/** Human-readable display name for the preset, suitable for use in UIs. */
|
|
771
|
+
label: z.string().describe("Human-readable display name for the preset, suitable for use in UIs."),
|
|
772
|
+
/** Stable machine identifier for the preset, e.g. `"do_task"`. Used when assigning a preset to a routine. */
|
|
773
|
+
name: z.string().describe("Stable machine identifier for the preset, e.g. `\"do_task\"`. Used when assigning a preset to a routine."),
|
|
774
|
+
/** Whether routines using this preset maintain a persistent conversation session across invocations. Sessionable presets do not expose instruction or session-mode configuration on individual routines. */
|
|
775
|
+
sessionable: z.boolean().describe("Whether routines using this preset maintain a persistent conversation session across invocations. Sessionable presets do not expose instruction or session-mode configuration on individual routines."),
|
|
776
|
+
/** 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. */
|
|
777
|
+
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."),
|
|
778
|
+
}).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.");
|
|
779
|
+
/** Runtime validator for {@link SlackChannelBinding}. */
|
|
780
|
+
export const slackChannelBindingSchema = z.object({
|
|
781
|
+
/** IDs of the agents attached to this binding. Empty array when no agents are assigned. */
|
|
782
|
+
agents: z.array(z.string()).optional().describe("IDs of the agents attached to this binding. Empty array when no agents are assigned."),
|
|
783
|
+
/** Slack channel ID (e.g. `C01234ABCDE`) that this binding targets. */
|
|
784
|
+
channel: z.string().optional().describe("Slack channel ID (e.g. `C01234ABCDE`) that this binding targets."),
|
|
785
|
+
/** Human-readable label identifying the customer, derived from the binding's embedded config. `null` when not set. */
|
|
786
|
+
customer_label: z.string().optional().describe("Human-readable label identifying the customer, derived from the binding's embedded config. `null` when not set."),
|
|
787
|
+
/** Unique identifier for this Slack channel binding. */
|
|
788
|
+
id: z.string().describe("Unique identifier for this Slack channel binding."),
|
|
789
|
+
/** ID of the Slack integration that owns this binding. */
|
|
790
|
+
integration: z.string().optional().describe("ID of the Slack integration that owns this binding."),
|
|
791
|
+
/** Cached value of Slack's `is_ext_shared` flag for this channel. May be stale relative to Slack's current state. */
|
|
792
|
+
is_ext_shared_cached: z.boolean().optional().describe("Cached value of Slack's `is_ext_shared` flag for this channel. May be stale relative to Slack's current state."),
|
|
793
|
+
/** ID of the ArchAstro team this channel is bound to. */
|
|
794
|
+
team: z.string().optional().describe("ID of the ArchAstro team this channel is bound to."),
|
|
795
|
+
}).describe("A binding that connects a Slack channel to an ArchAstro team and one or more agents, enabling those agents to receive and respond to messages in that channel.");
|
|
796
|
+
/** Runtime validator for {@link SlackChannelBindingListResponse}. */
|
|
797
|
+
export const slackChannelBindingListResponseSchema = z.object({
|
|
798
|
+
/** Array of Slack channel binding objects for the current page. */
|
|
799
|
+
data: z.array(slackChannelBindingSchema).describe("Array of Slack channel binding objects for the current page."),
|
|
800
|
+
/** Current page number (1-indexed). */
|
|
801
|
+
page: z.number().int().describe("Current page number (1-indexed)."),
|
|
802
|
+
/** Maximum number of bindings returned per page. */
|
|
803
|
+
per_page: z.number().int().describe("Maximum number of bindings returned per page."),
|
|
804
|
+
/** Total number of Slack channel bindings matching the query across all pages. */
|
|
805
|
+
total_count: z.number().int().describe("Total number of Slack channel bindings matching the query across all pages."),
|
|
806
|
+
/** Total number of pages available at the current `per_page` size. */
|
|
807
|
+
total_pages: z.number().int().describe("Total number of pages available at the current `per_page` size."),
|
|
808
|
+
}).describe("Paginated list of Slack channel bindings for the requested integration or team. Use the `page` and `per_page` fields to navigate pages of results.");
|
|
809
|
+
/** Runtime validator for {@link StorageFile}. */
|
|
810
|
+
export const storageFileSchema = z.object({
|
|
811
|
+
/** MIME type of the file, e.g. `"image/png"` or `"application/pdf"`. */
|
|
812
|
+
content_type: z.string().optional().describe("MIME type of the file, e.g. `\"image/png\"` or `\"application/pdf\"`."),
|
|
813
|
+
/** When the file was uploaded (ISO 8601). */
|
|
814
|
+
created_at: z.string().optional().describe("When the file was uploaded (ISO 8601)."),
|
|
815
|
+
/** Original filename as provided at upload time. */
|
|
816
|
+
filename: z.string().optional().describe("Original filename as provided at upload time."),
|
|
817
|
+
/** File ID (`fil_...`). */
|
|
818
|
+
id: z.string().describe("File ID (`fil_...`)."),
|
|
819
|
+
/** Image display metadata. Present only when `content_type` is an image type; `null` otherwise. */
|
|
820
|
+
image_source: imageSourceSchema.optional().describe("Image display metadata. Present only when `content_type` is an image type; `null` otherwise."),
|
|
821
|
+
/** ID of the organization that owns this file (`org_...`). */
|
|
822
|
+
org: z.string().optional().describe("ID of the organization that owns this file (`org_...`)."),
|
|
823
|
+
/** ID of the sandbox this file is scoped to (`sbx_...`). `null` for files not associated with a sandbox. */
|
|
824
|
+
sandbox: z.string().optional().describe("ID of the sandbox this file is scoped to (`sbx_...`). `null` for files not associated with a sandbox."),
|
|
825
|
+
/** Size of the file in bytes. */
|
|
826
|
+
size: z.number().int().optional().describe("Size of the file in bytes."),
|
|
827
|
+
/** When the file record was last modified (ISO 8601). */
|
|
828
|
+
updated_at: z.string().optional().describe("When the file record was last modified (ISO 8601)."),
|
|
829
|
+
/** Short-lived signed URL for downloading the file. `null` if a URL could not be generated. */
|
|
830
|
+
url: z.string().optional().describe("Short-lived signed URL for downloading the file. `null` if a URL could not be generated."),
|
|
831
|
+
}).describe("A file stored in the platform's object storage, with metadata and a signed URL for downloading its contents.");
|
|
832
|
+
/** Runtime validator for {@link ValidationResult}. */
|
|
344
833
|
export const validationResultSchema = z.object({
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
/**
|
|
834
|
+
/** List of human-readable error messages describing why validation failed. Empty or absent when `valid` is `true`. */
|
|
835
|
+
errors: z.array(z.string()).optional().describe("List of human-readable error messages describing why validation failed. Empty or absent when `valid` is `true`."),
|
|
836
|
+
/** `true` if the configuration passed all validation checks, `false` if one or more errors were found. */
|
|
837
|
+
valid: z.boolean().describe("`true` if the configuration passed all validation checks, `false` if one or more errors were found."),
|
|
838
|
+
/** List of human-readable warning messages emitted during validation. Warnings do not cause `valid` to be `false` but indicate potentially problematic configuration. */
|
|
839
|
+
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."),
|
|
840
|
+
}).describe("The result of a configuration validation check, indicating whether the config is valid and listing any errors or warnings.");
|
|
841
|
+
/** Runtime validator for {@link WorkingMemoryEntry}. */
|
|
350
842
|
export const workingMemoryEntrySchema = z.object({
|
|
351
|
-
agent
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
/**
|
|
843
|
+
/** ID of the agent that owns this memory entry (`agt_...`). */
|
|
844
|
+
agent: z.string().optional().describe("ID of the agent that owns this memory entry (`agt_...`)."),
|
|
845
|
+
/** When this memory entry was first written (ISO 8601). */
|
|
846
|
+
created_at: z.string().optional().describe("When this memory entry was first written (ISO 8601)."),
|
|
847
|
+
/** When this entry will be automatically deleted. `null` if the entry does not expire. */
|
|
848
|
+
expires_at: z.string().optional().describe("When this entry will be automatically deleted. `null` if the entry does not expire."),
|
|
849
|
+
/** Working memory entry ID (`amm_...`). */
|
|
850
|
+
id: z.string().describe("Working memory entry ID (`amm_...`)."),
|
|
851
|
+
/** The string key used to look up this memory entry within the agent's memory namespace. */
|
|
852
|
+
key: z.string().optional().describe("The string key used to look up this memory entry within the agent's memory namespace."),
|
|
853
|
+
/** When this memory entry was last modified (ISO 8601). */
|
|
854
|
+
updated_at: z.string().optional().describe("When this memory entry was last modified (ISO 8601)."),
|
|
855
|
+
/** The string value stored under `key`. May be any serialized content the agent wrote. */
|
|
856
|
+
value: z.string().optional().describe("The string value stored under `key`. May be any serialized content the agent wrote."),
|
|
857
|
+
}).describe("A key-value memory record stored for an agent, optionally scoped to a user. Memory entries persist across invocations and may carry an expiration time.");
|
|
858
|
+
/** Runtime validator for {@link WorkingMemoryEntryListResponse}. */
|
|
360
859
|
export const workingMemoryEntryListResponseSchema = z.object({
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
860
|
+
/** Array of working memory entry objects for the current page. */
|
|
861
|
+
data: z.array(workingMemoryEntrySchema).describe("Array of working memory entry objects for the current page."),
|
|
862
|
+
/** `true` if a subsequent page exists and can be fetched by incrementing the page number. */
|
|
863
|
+
has_next: z.boolean().optional().describe("`true` if a subsequent page exists and can be fetched by incrementing the page number."),
|
|
864
|
+
/** `true` if a previous page exists and can be fetched by decrementing the page number. */
|
|
865
|
+
has_prev: z.boolean().optional().describe("`true` if a previous page exists and can be fetched by decrementing the page number."),
|
|
866
|
+
/** The current page number, starting at `1`. */
|
|
867
|
+
page: z.number().int().optional().describe("The current page number, starting at `1`."),
|
|
868
|
+
/** Maximum number of entries returned per page. */
|
|
869
|
+
page_size: z.number().int().optional().describe("Maximum number of entries returned per page."),
|
|
870
|
+
/** Total number of working memory entries matching the query across all pages. */
|
|
871
|
+
total_entries: z.number().int().optional().describe("Total number of working memory entries matching the query across all pages."),
|
|
872
|
+
/** Total number of pages given the current `page_size`. */
|
|
873
|
+
total_pages: z.number().int().optional().describe("Total number of pages given the current `page_size`."),
|
|
874
|
+
}).describe("Paginated list of working memory entries stored for an agent. Includes page metadata to support sequential page traversal.");
|
|
875
|
+
/** Runtime validator for {@link SolutionTemplateSummary}. */
|
|
876
|
+
export const solutionTemplateSummarySchema = z.object({
|
|
877
|
+
/** Short prose blurb from the template body's `description:` field. `null` when the body doesn't set one. Used as the card subhead in the Library carousel. */
|
|
878
|
+
description: z.string().optional().describe("Short prose blurb from the template body's `description:` field. `null` when the body doesn't set one. Used as the card subhead in the Library carousel."),
|
|
879
|
+
/** Human-facing label from the template body's `display_name:` field. `null` when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized `name`. */
|
|
880
|
+
display_name: z.string().optional().describe("Human-facing label from the template body's `display_name:` field. `null` when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized `name`."),
|
|
881
|
+
/** Template config ID (`cfg_...`). `null` for inline-only templates. */
|
|
882
|
+
id: z.string().optional().describe("Template config ID (`cfg_...`). `null` for inline-only templates."),
|
|
883
|
+
/** Template config kind, or `SolutionTemplateRef` / `SolutionTemplatePath` when unresolved. */
|
|
884
|
+
kind: z.string().describe("Template config kind, or `SolutionTemplateRef` / `SolutionTemplatePath` when unresolved."),
|
|
885
|
+
/** Lookup key stamped on the template config at import time. `null` when no lookup key was assigned. */
|
|
886
|
+
lookup_key: z.string().optional().describe("Lookup key stamped on the template config at import time. `null` when no lookup key was assigned."),
|
|
887
|
+
/** Canonical name from the template body. For `AgentTemplate` this doubles as the human-facing label; for `AgentToolTemplate` it's the LLM-facing tool function identifier (snake_case); for `AgentRoutineTemplate` it's the routine identifier (kebab-case). Clients rendering carousels should prefer `display_name` and fall back to humanizing `name`. */
|
|
888
|
+
name: z.string().optional().describe("Canonical name from the template body. For `AgentTemplate` this doubles as the human-facing label; for `AgentToolTemplate` it's the LLM-facing tool function identifier (snake_case); for `AgentRoutineTemplate` it's the routine identifier (kebab-case). Clients rendering carousels should prefer `display_name` and fall back to humanizing `name`."),
|
|
889
|
+
/** Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. `null` when the Solution body's `templates[].readme_path` is unset for this entry. Token expires in 1 hour — refresh via `GET /api/v1/solutions/:solution`. */
|
|
890
|
+
readme_url: z.string().optional().describe("Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. `null` when the Solution body's `templates[].readme_path` is unset for this entry. Token expires in 1 hour — refresh via `GET /api/v1/solutions/:solution`."),
|
|
891
|
+
/** Stable virtual path assigned to the template config. `null` when no virtual path was set. */
|
|
892
|
+
virtual_path: z.string().optional().describe("Stable virtual path assigned to the template config. `null` when no virtual path was set."),
|
|
893
|
+
}).describe("Identity and display metadata for a single template bundled by a Solution, used to represent each wrapped or sibling template at template granularity.");
|
|
894
|
+
/** Runtime validator for {@link SolutionSummary}. */
|
|
895
|
+
export const solutionSummarySchema = z.object({
|
|
896
|
+
/** Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none. */
|
|
897
|
+
category_keys: z.array(z.string()).optional().describe("Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none."),
|
|
898
|
+
/** When the Solution config was first imported (ISO 8601). */
|
|
899
|
+
created_at: z.string().optional().describe("When the Solution config was first imported (ISO 8601)."),
|
|
900
|
+
/** 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. */
|
|
901
|
+
description: z.string().optional().describe("Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. `null` when the Solution body does not set one."),
|
|
902
|
+
/** Solution config ID (`cfg_...`). */
|
|
903
|
+
id: z.string().describe("Solution config ID (`cfg_...`)."),
|
|
904
|
+
/** Resource type. Always `"Solution"`. */
|
|
905
|
+
kind: z.string().describe("Resource type. Always `\"Solution\"`."),
|
|
906
|
+
/** When `upgrade_available` is `true`, the system-scope Solution config ID (`cfg_...`) that should be used as the upgrade source. `null` otherwise. */
|
|
907
|
+
latest_solution: z.string().optional().describe("When `upgrade_available` is `true`, the system-scope Solution config ID (`cfg_...`) that should be used as the upgrade source. `null` otherwise."),
|
|
908
|
+
/** When `upgrade_available` is `true`, the higher system-scope `solution_version` available to upgrade to. `null` otherwise. */
|
|
909
|
+
latest_version: z.string().optional().describe("When `upgrade_available` is `true`, the higher system-scope `solution_version` available to upgrade to. `null` otherwise."),
|
|
910
|
+
/** The lookup key stored on the Solution config, if one was assigned during import. `null` when no lookup key was set. */
|
|
911
|
+
lookup_key: z.string().optional().describe("The lookup key stored on the Solution config, if one was assigned during import. `null` when no lookup key was set."),
|
|
912
|
+
/** 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. */
|
|
913
|
+
metadata: z.record(z.unknown()).optional().describe("Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none."),
|
|
914
|
+
/** Human-facing display name declared in the Solution body. `null` when the Solution body does not set one. */
|
|
915
|
+
name: z.string().optional().describe("Human-facing display name declared in the Solution body. `null` when the Solution body does not set one."),
|
|
916
|
+
/** Organization ID (`org_...`) that owns this Solution config, when the Solution is scoped to a specific org. `null` for system-scope (app-level) Solutions. */
|
|
917
|
+
org: z.string().optional().describe("Organization ID (`org_...`) that owns this Solution config, when the Solution is scoped to a specific org. `null` for system-scope (app-level) Solutions."),
|
|
918
|
+
/** Canonical image-source object for the resolved `org`'s logo, used as the principal category section glyph. Carries the signed `url` plus a `refresh_url`. `null` when `org_slug` is `null` or the org has no logo. */
|
|
919
|
+
org_logo: imageSourceSchema.optional().describe("Canonical image-source object for the resolved `org`'s logo, used as the principal category section glyph. Carries the signed `url` plus a `refresh_url`. `null` when `org_slug` is `null` or the org has no logo."),
|
|
920
|
+
/** Display name of the resolved `org`. Pairs with `org_slug` as the principal catalog category's label. `null` when `org_slug` is `null`. */
|
|
921
|
+
org_name: z.string().optional().describe("Display name of the resolved `org`. Pairs with `org_slug` as the principal catalog category's label. `null` when `org_slug` is `null`."),
|
|
922
|
+
/** Resolved slug of the Solution body's `org` (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key — clients group the Solution under this org ahead of `category_keys`. `null` when the body has no `org` or it doesn't resolve. */
|
|
923
|
+
org_slug: z.string().optional().describe("Resolved slug of the Solution body's `org` (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key — clients group the Solution under this org ahead of `category_keys`. `null` when the body has no `org` or it doesn't resolve."),
|
|
924
|
+
/** Owner scopes this Solution appears under. Members: `"system"` (app-level system scope) and/or `"org"` (viewer's org scope). */
|
|
925
|
+
owners: z.array(z.string()).describe("Owner scopes this Solution appears under. Members: `\"system\"` (app-level system scope) and/or `\"org\"` (viewer's org scope)."),
|
|
926
|
+
/** Relative path to the public README endpoint with a signed token already embedded. `null` when the Solution has no README. Token expires in 1 hour — refresh via `GET /api/v1/solutions/:solution`. */
|
|
927
|
+
readme_url: z.string().optional().describe("Relative path to the public README endpoint with a signed token already embedded. `null` when the Solution has no README. Token expires in 1 hour — refresh via `GET /api/v1/solutions/:solution`."),
|
|
928
|
+
/** Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. `null` when the body omits it. */
|
|
929
|
+
solution_id: z.string().optional().describe("Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. `null` when the body omits it."),
|
|
930
|
+
/** Semver string declared in the Solution body (e.g. `"1.2.0"`). `null` when the body does not declare a version. */
|
|
931
|
+
solution_version: z.string().optional().describe("Semver string declared in the Solution body (e.g. `\"1.2.0\"`). `null` when the body does not declare a version."),
|
|
932
|
+
/** Freeform tag keys declared in the Solution body. An empty array when the body declares none. */
|
|
933
|
+
tag_keys: z.array(z.string()).optional().describe("Freeform tag keys declared in the Solution body. An empty array when the body declares none."),
|
|
934
|
+
/** Wrapped template kind — `"AgentTemplate"`, `"AutomationTemplate"`, `"AgentRoutineTemplate"`, `"AgentToolTemplate"`, `"AgentComputerTemplate"`, or `"SolutionTemplateRef"` for ref-mode bundles. */
|
|
935
|
+
template_kind: z.string().optional().describe("Wrapped template kind — `\"AgentTemplate\"`, `\"AutomationTemplate\"`, `\"AgentRoutineTemplate\"`, `\"AgentToolTemplate\"`, `\"AgentComputerTemplate\"`, or `\"SolutionTemplateRef\"` for ref-mode bundles."),
|
|
936
|
+
/** Template configs bundled by this Solution, in declaration order — the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references. */
|
|
937
|
+
templates: z.array(solutionTemplateSummarySchema).describe("Template configs bundled by this Solution, in declaration order — the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references."),
|
|
938
|
+
/** When the Solution config was last modified (ISO 8601). */
|
|
939
|
+
updated_at: z.string().optional().describe("When the Solution config was last modified (ISO 8601)."),
|
|
940
|
+
/** `true` when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher `solution_version`. Always `false` for system-only rows. */
|
|
941
|
+
upgrade_available: z.boolean().describe("`true` when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher `solution_version`. Always `false` for system-only rows."),
|
|
942
|
+
/** The stable virtual path assigned to this Solution config, used as the deduplication key when the same Solution appears under multiple owner scopes. `null` when unset. */
|
|
943
|
+
virtual_path: z.string().optional().describe("The stable virtual path assigned to this Solution config, used as the deduplication key when the same Solution appears under multiple owner scopes. `null` when unset."),
|
|
944
|
+
}).describe("A catalog entry for an imported Solution, including its display metadata, bundled templates, owner scopes, and any available upgrade information.");
|
|
945
|
+
/** Runtime validator for {@link AgentSourceSolution}. */
|
|
946
|
+
export const agentSourceSolutionSchema = z.object({
|
|
947
|
+
/** Summary of the parent Solution, including `upgrade_available`, `latest_version`, and `latest_solution` when a newer system-scoped version is available for the agent's org-scoped Solution. */
|
|
948
|
+
solution: solutionSummarySchema.describe("Summary of the parent Solution, including `upgrade_available`, `latest_version`, and `latest_solution` when a newer system-scoped version is available for the agent's org-scoped Solution."),
|
|
949
|
+
/** Summary of the AgentTemplate config (`cfg_...`) the agent was last provisioned or updated from. */
|
|
950
|
+
template: upgradeTemplateSummarySchema.describe("Summary of the AgentTemplate config (`cfg_...`) the agent was last provisioned or updated from."),
|
|
951
|
+
}).describe("Summary of the Solution and AgentTemplate that an agent was last provisioned from. Returned on single-agent responses; `null` for hand-built agents and agents whose tracked template or parent Solution has been deleted.");
|
|
952
|
+
/** Runtime validator for {@link Agent}. */
|
|
953
|
+
export const agentSchema = z.object({
|
|
954
|
+
/** Access control list for the agent. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions`. `null` when no ACL restrictions are applied and the agent is accessible to all members of its scope. */
|
|
955
|
+
acl: aclSchema.optional().describe("Access control list for the agent. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions`. `null` when no ACL restrictions are applied and the agent is accessible to all members of its scope."),
|
|
956
|
+
/** ID of the application that owns this agent (`dap_...`). */
|
|
957
|
+
app: z.string().optional().describe("ID of the application that owns this agent (`dap_...`)."),
|
|
958
|
+
/** When the agent was created (ISO 8601). */
|
|
959
|
+
created_at: z.string().optional().describe("When the agent was created (ISO 8601)."),
|
|
960
|
+
/** Default LLM model identifier used by this agent when no model is specified at runtime (e.g. `"claude-3-7-sonnet-latest"`). */
|
|
961
|
+
default_model: z.string().optional().describe("Default LLM model identifier used by this agent when no model is specified at runtime (e.g. `\"claude-3-7-sonnet-latest\"`)."),
|
|
962
|
+
/** Email address provisioned for this agent. `null` if email delivery is not configured. */
|
|
963
|
+
email: z.string().optional().describe("Email address provisioned for this agent. `null` if email delivery is not configured."),
|
|
964
|
+
/** Agent ID (`agi_...`). */
|
|
965
|
+
id: z.string().describe("Agent ID (`agi_...`)."),
|
|
966
|
+
/** System-level identity prompt that shapes the agent's persona and behavior. */
|
|
967
|
+
identity: z.string().optional().describe("System-level identity prompt that shapes the agent's persona and behavior."),
|
|
968
|
+
/** ID of the AgentTemplate config (`cfg_...`) this agent was last provisioned or updated from. `null` for manually created agents. */
|
|
969
|
+
last_applied_template_config: z.string().optional().describe("ID of the AgentTemplate config (`cfg_...`) this agent was last provisioned or updated from. `null` for manually created agents."),
|
|
970
|
+
/** Stable, user-defined identifier for this agent within the application. Unique per app. */
|
|
971
|
+
lookup_key: z.string().optional().describe("Stable, user-defined identifier for this agent within the application. Unique per app."),
|
|
972
|
+
/** Arbitrary key-value metadata attached to the agent. Not interpreted by the platform. */
|
|
973
|
+
metadata: z.record(z.unknown()).optional().describe("Arbitrary key-value metadata attached to the agent. Not interpreted by the platform."),
|
|
974
|
+
/** Human-readable display name for the agent. `null` if not set. */
|
|
975
|
+
name: z.string().optional().describe("Human-readable display name for the agent. `null` if not set."),
|
|
976
|
+
/** ID of the organization this agent belongs to (`org_...`). `null` if the agent is not org-scoped. */
|
|
977
|
+
org: z.string().optional().describe("ID of the organization this agent belongs to (`org_...`). `null` if the agent is not org-scoped."),
|
|
978
|
+
/** Display name of the organization this agent belongs to. `null` when the agent is not org-scoped or when the org association was not preloaded. */
|
|
979
|
+
org_name: z.string().optional().describe("Display name of the organization this agent belongs to. `null` when the agent is not org-scoped or when the org association was not preloaded."),
|
|
980
|
+
/** Free-form label identifying the source or author that created this agent (e.g. a username or pipeline name). */
|
|
981
|
+
originator: z.string().optional().describe("Free-form label identifying the source or author that created this agent (e.g. a username or pipeline name)."),
|
|
982
|
+
/** Phone number provisioned for this agent. `null` if SMS is not configured. */
|
|
983
|
+
phone_number: z.string().optional().describe("Phone number provisioned for this agent. `null` if SMS is not configured."),
|
|
984
|
+
/** ID of the sandbox environment this agent is scoped to (`dsb_...`). `null` in production deployments. */
|
|
985
|
+
sandbox: z.string().optional().describe("ID of the sandbox environment this agent is scoped to (`dsb_...`). `null` in production deployments."),
|
|
986
|
+
/** Source Solution and AgentTemplate summary for agents provisioned from a Solution. Includes `upgrade_available`, `latest_version`, and `latest_solution` so you can render an upgrade badge without a separate dry-run call. `null` for hand-built agents and agents whose tracked template or parent Solution has been deleted. Populated only on single-agent GET responses, never on list endpoints. */
|
|
987
|
+
source_solution: agentSourceSolutionSchema.optional().describe("Source Solution and AgentTemplate summary for agents provisioned from a Solution. Includes `upgrade_available`, `latest_version`, and `latest_solution` so you can render an upgrade badge without a separate dry-run call. `null` for hand-built agents and agents whose tracked template or parent Solution has been deleted. Populated only on single-agent GET responses, never on list endpoints."),
|
|
988
|
+
/** ID of the team that owns this agent (`tem_...`). `null` if the agent is not team-scoped. */
|
|
989
|
+
team: z.string().optional().describe("ID of the team that owns this agent (`tem_...`). `null` if the agent is not team-scoped."),
|
|
990
|
+
/** When the agent was last modified (ISO 8601). */
|
|
991
|
+
updated_at: z.string().optional().describe("When the agent was last modified (ISO 8601)."),
|
|
992
|
+
/** ID of the user that owns this agent (`usr_...`). `null` if the agent is not user-scoped. */
|
|
993
|
+
user: z.string().optional().describe("ID of the user that owns this agent (`usr_...`). `null` if the agent is not user-scoped."),
|
|
994
|
+
}).describe("An AI agent that can be configured with tools, routines, and skills, and invoked to handle conversations or tasks.");
|
|
995
|
+
/** Runtime validator for {@link AgentComputer}. */
|
|
996
|
+
export const agentComputerSchema = z.object({
|
|
997
|
+
/** ID of the agent that owns this computer (`agi_...`). `null` if the computer is not yet assigned to an agent. */
|
|
998
|
+
agent: z.string().optional().describe("ID of the agent that owns this computer (`agi_...`). `null` if the computer is not yet assigned to an agent."),
|
|
999
|
+
/** ID of the app this computer belongs to (`dap_...`). */
|
|
1000
|
+
app: z.string().optional().describe("ID of the app this computer belongs to (`dap_...`)."),
|
|
1001
|
+
/** Provider-specific configuration key-value pairs for the computer. Structure depends on the underlying compute provider. */
|
|
1002
|
+
config: z.record(z.unknown()).optional().describe("Provider-specific configuration key-value pairs for the computer. Structure depends on the underlying compute provider."),
|
|
1003
|
+
/** When the computer was created (ISO 8601). */
|
|
1004
|
+
created_at: z.string().optional().describe("When the computer was created (ISO 8601)."),
|
|
1005
|
+
/** Human-readable error description when `status` is `"error"`. `null` otherwise. */
|
|
1006
|
+
error_message: z.string().optional().describe("Human-readable error description when `status` is `\"error\"`. `null` otherwise."),
|
|
1007
|
+
/** Computer ID (`cmp_...`). */
|
|
1008
|
+
id: z.string().describe("Computer ID (`cmp_...`)."),
|
|
1009
|
+
/** When the computer last reported activity or received a command. `null` if the computer has never been active. */
|
|
1010
|
+
last_active_at: z.string().optional().describe("When the computer last reported activity or received a command. `null` if the computer has never been active."),
|
|
1011
|
+
/** Unique, stable identifier you assign to this computer within its app. `null` if not set. */
|
|
1012
|
+
lookup_key: z.string().optional().describe("Unique, stable identifier you assign to this computer within its app. `null` if not set."),
|
|
1013
|
+
/** Arbitrary key-value metadata you attached to the computer. `null` if none was provided. */
|
|
1014
|
+
metadata: z.record(z.unknown()).optional().describe("Arbitrary key-value metadata you attached to the computer. `null` if none was provided."),
|
|
1015
|
+
/** Human-readable display name for the computer. `null` if not set. */
|
|
1016
|
+
name: z.string().optional().describe("Human-readable display name for the computer. `null` if not set."),
|
|
1017
|
+
/** Cloud region where the computer is hosted, e.g. `"us-east-1"`. `null` if not yet assigned. */
|
|
1018
|
+
region: z.string().optional().describe("Cloud region where the computer is hosted, e.g. `\"us-east-1\"`. `null` if not yet assigned."),
|
|
1019
|
+
/** URL of the live screenshot sprite used to render a real-time preview of the computer's screen. `null` when no sprite is available. */
|
|
1020
|
+
sprite_url: z.string().optional().describe("URL of the live screenshot sprite used to render a real-time preview of the computer's screen. `null` when no sprite is available."),
|
|
1021
|
+
/** Current lifecycle state of the computer. Common values include `"provisioning"`, `"ready"`, `"error"`, and `"terminated"`. */
|
|
1022
|
+
status: z.string().optional().describe("Current lifecycle state of the computer. Common values include `\"provisioning\"`, `\"ready\"`, `\"error\"`, and `\"terminated\"`."),
|
|
1023
|
+
/** When the computer record was last modified (ISO 8601). */
|
|
1024
|
+
updated_at: z.string().optional().describe("When the computer record was last modified (ISO 8601)."),
|
|
1025
|
+
}).describe("A cloud computer resource provisioned for an agent to use for browser and desktop automation tasks.");
|
|
1026
|
+
/** Runtime validator for {@link AgentComputerListResponse}. */
|
|
1027
|
+
export const agentComputerListResponseSchema = z.object({
|
|
1028
|
+
/** Array of agent computer objects matching the query. */
|
|
1029
|
+
data: z.array(agentComputerSchema).describe("Array of agent computer objects matching the query."),
|
|
1030
|
+
}).describe("A list of agent computers returned by a list query.");
|
|
1031
|
+
/** Runtime validator for {@link AgentCreateResponse}. */
|
|
1032
|
+
export const agentCreateResponseSchema = z.object({
|
|
1033
|
+
/** Access control list governing who can interact with this agent. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions`. `null` when no ACL restrictions are applied. */
|
|
1034
|
+
acl: aclSchema.optional().describe("Access control list governing who can interact with this agent. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions`. `null` when no ACL restrictions are applied."),
|
|
1035
|
+
/** ID of the app this agent belongs to (`dap_...`). */
|
|
1036
|
+
app: z.string().optional().describe("ID of the app this agent belongs to (`dap_...`)."),
|
|
1037
|
+
/** When the agent was created (ISO 8601). */
|
|
1038
|
+
created_at: z.string().optional().describe("When the agent was created (ISO 8601)."),
|
|
1039
|
+
/** Default AI model the agent uses when no model is specified at runtime, e.g. `"claude-3-5-sonnet-20241022"`. `null` if not configured. */
|
|
1040
|
+
default_model: z.string().optional().describe("Default AI model the agent uses when no model is specified at runtime, e.g. `\"claude-3-5-sonnet-20241022\"`. `null` if not configured."),
|
|
1041
|
+
/** Email address assigned to this agent for inbound email handling. `null` if not configured. */
|
|
1042
|
+
email: z.string().optional().describe("Email address assigned to this agent for inbound email handling. `null` if not configured."),
|
|
1043
|
+
/** Agent ID (`agi_...`). */
|
|
1044
|
+
id: z.string().describe("Agent ID (`agi_...`)."),
|
|
1045
|
+
/** System prompt or persona description that shapes the agent's behavior. `null` if not set. */
|
|
1046
|
+
identity: z.string().optional().describe("System prompt or persona description that shapes the agent's behavior. `null` if not set."),
|
|
1047
|
+
/** List of config records created as part of this request's `template_bundle` install. One entry per persisted config, sorted by `key`. Omitted entirely when the request did not include a `template_bundle`. */
|
|
1048
|
+
installed_configs: z.array(installedConfigEntrySchema).optional().describe("List of config records created as part of this request's `template_bundle` install. One entry per persisted config, sorted by `key`. Omitted entirely when the request did not include a `template_bundle`."),
|
|
1049
|
+
/** Unique, stable identifier for the agent within its app. `null` if not set. */
|
|
1050
|
+
lookup_key: z.string().optional().describe("Unique, stable identifier for the agent within its app. `null` if not set."),
|
|
1051
|
+
/** Arbitrary key-value metadata attached to the agent. `null` if none was provided. */
|
|
1052
|
+
metadata: z.record(z.unknown()).optional().describe("Arbitrary key-value metadata attached to the agent. `null` if none was provided."),
|
|
1053
|
+
/** Human-readable display name for the agent. `null` if not set. */
|
|
1054
|
+
name: z.string().optional().describe("Human-readable display name for the agent. `null` if not set."),
|
|
1055
|
+
/** ID of the organization this agent belongs to (`org_...`). `null` for agents outside an org. */
|
|
1056
|
+
org: z.string().optional().describe("ID of the organization this agent belongs to (`org_...`). `null` for agents outside an org."),
|
|
1057
|
+
/** Free-form label identifying the source or author of the agent, e.g. a username or service name. `null` if not set. */
|
|
1058
|
+
originator: z.string().optional().describe("Free-form label identifying the source or author of the agent, e.g. a username or service name. `null` if not set."),
|
|
1059
|
+
/** Phone number assigned to this agent for inbound SMS or voice handling. `null` if not configured. */
|
|
1060
|
+
phone_number: z.string().optional().describe("Phone number assigned to this agent for inbound SMS or voice handling. `null` if not configured."),
|
|
1061
|
+
/** ID of the sandbox environment this agent is scoped to (`sbx_...`). `null` for agents not scoped to a sandbox. */
|
|
1062
|
+
sandbox: z.string().optional().describe("ID of the sandbox environment this agent is scoped to (`sbx_...`). `null` for agents not scoped to a sandbox."),
|
|
1063
|
+
/** ID of the team that owns this agent (`tea_...`). `null` if owned by a user rather than a team. */
|
|
1064
|
+
team: z.string().optional().describe("ID of the team that owns this agent (`tea_...`). `null` if owned by a user rather than a team."),
|
|
1065
|
+
/** When the agent record was last modified (ISO 8601). */
|
|
1066
|
+
updated_at: z.string().optional().describe("When the agent record was last modified (ISO 8601)."),
|
|
1067
|
+
/** ID of the user that owns this agent (`usr_...`). `null` if owned by a team. */
|
|
1068
|
+
user: z.string().optional().describe("ID of the user that owns this agent (`usr_...`). `null` if owned by a team."),
|
|
1069
|
+
}).describe("The response returned by `POST /api/v1/agents`. Contains all agent fields plus an optional `installed_configs` array when a `template_bundle` was supplied in the request.");
|
|
1070
|
+
/** Runtime validator for {@link AgentEnvVarMasked}. */
|
|
1071
|
+
export const agentEnvVarMaskedSchema = z.object({
|
|
1072
|
+
/** ID of the agent this environment variable belongs to (`agt_...`). */
|
|
1073
|
+
agent: z.string().describe("ID of the agent this environment variable belongs to (`agt_...`)."),
|
|
1074
|
+
/** When the environment variable was created (ISO 8601). */
|
|
1075
|
+
created_at: z.string().optional().describe("When the environment variable was created (ISO 8601)."),
|
|
1076
|
+
/** Optional human-readable note describing the purpose of this variable. `null` if not set. */
|
|
1077
|
+
description: z.string().optional().describe("Optional human-readable note describing the purpose of this variable. `null` if not set."),
|
|
1078
|
+
/** Environment variable ID (`anv_...`). */
|
|
1079
|
+
id: z.string().describe("Environment variable ID (`anv_...`)."),
|
|
1080
|
+
/** Name of the environment variable as it appears in the agent's runtime. */
|
|
1081
|
+
key: z.string().describe("Name of the environment variable as it appears in the agent's runtime."),
|
|
1082
|
+
/** Redacted representation of the secret value. The last four characters are preserved; all preceding characters are replaced with `****`. Returns `****` when the value is absent or four characters or fewer. */
|
|
1083
|
+
masked_value: z.string().describe("Redacted representation of the secret value. The last four characters are preserved; all preceding characters are replaced with `****`. Returns `****` when the value is absent or four characters or fewer."),
|
|
1084
|
+
/** When the environment variable was last updated (ISO 8601). */
|
|
1085
|
+
updated_at: z.string().optional().describe("When the environment variable was last updated (ISO 8601)."),
|
|
1086
|
+
}).describe("An agent environment variable with its secret value masked for safe display in list and show responses.");
|
|
1087
|
+
/** Runtime validator for {@link AgentEnvVarMaskedList}. */
|
|
1088
|
+
export const agentEnvVarMaskedListSchema = z.object({
|
|
1089
|
+
/** Array of masked environment variable objects for the agent. */
|
|
1090
|
+
data: z.array(agentEnvVarMaskedSchema).describe("Array of masked environment variable objects for the agent."),
|
|
1091
|
+
}).describe("Flat list of masked environment variables belonging to an agent.");
|
|
1092
|
+
/** Runtime validator for {@link AgentExport}. */
|
|
1093
|
+
export const agentExportSchema = z.object({
|
|
1094
|
+
/** Ordered list of config file objects that the agent depends on. Included in full so the import can recreate all dependencies without additional requests. */
|
|
1095
|
+
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."),
|
|
1096
|
+
/** The agent template definition as a structured map. Pass this directly to the import endpoint to recreate the agent. */
|
|
1097
|
+
template: z.record(z.unknown()).describe("The agent template definition as a structured map. Pass this directly to the import endpoint to recreate the agent."),
|
|
1098
|
+
}).describe("A portable export bundle for an agent, containing everything needed to re-deploy it in another workspace or environment.");
|
|
1099
|
+
/** Runtime validator for {@link AgentHealth}. */
|
|
1100
|
+
export const agentHealthSchema = z.object({
|
|
1101
|
+
/** Timestamps for the agent's most recent and next scheduled activity, used to surface last-run and upcoming-run information. */
|
|
1102
|
+
activity: z.record(z.unknown()).describe("Timestamps for the agent's most recent and next scheduled activity, used to surface last-run and upcoming-run information."),
|
|
1103
|
+
/** The agent this health profile describes. */
|
|
1104
|
+
agent: agentSchema.describe("The agent this health profile describes."),
|
|
1105
|
+
/** When the health profile was last computed (ISO 8601). */
|
|
1106
|
+
checked_at: z.string().describe("When the health profile was last computed (ISO 8601)."),
|
|
1107
|
+
/** Renderable health check results. Each object includes at minimum `key`, `label`, `status`, and `summary` fields. */
|
|
1108
|
+
checks: z.array(z.record(z.unknown())).describe("Renderable health check results. Each object includes at minimum `key`, `label`, `status`, and `summary` fields."),
|
|
1109
|
+
/** Action counts broken down by dependency area and resolution status, used to render progress indicators per category. */
|
|
1110
|
+
counts: z.record(z.unknown()).describe("Action counts broken down by dependency area and resolution status, used to render progress indicators per category."),
|
|
1111
|
+
/** 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. */
|
|
1112
|
+
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."),
|
|
1113
|
+
/** Recent execution metrics for the agent, including run counts and failure counts over a recent time window. */
|
|
1114
|
+
recent: z.record(z.unknown()).describe("Recent execution metrics for the agent, including run counts and failure counts over a recent time window."),
|
|
1115
|
+
/** Normalized health score from `0` (fully degraded) to `100` (fully healthy), derived from the weight and status of all health actions. */
|
|
1116
|
+
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."),
|
|
1117
|
+
/** Overall health status of the agent. One of `"ok"`, `"warning"`, or `"critical"`. */
|
|
1118
|
+
status: z.string().describe("Overall health status of the agent. One of `\"ok\"`, `\"warning\"`, or `\"critical\"`."),
|
|
1119
|
+
}).describe("Aggregate health profile for an agent, summarizing its current operational status, score, and the full list of setup and health actions.");
|
|
1120
|
+
/** Runtime validator for {@link AgentListResponse}. */
|
|
1121
|
+
export const agentListResponseSchema = z.object({
|
|
1122
|
+
/** Array of agent objects for the current page. */
|
|
1123
|
+
data: z.array(agentSchema).describe("Array of agent objects for the current page."),
|
|
1124
|
+
/** `true` when a subsequent page of results exists. */
|
|
1125
|
+
has_next: z.boolean().optional().describe("`true` when a subsequent page of results exists."),
|
|
1126
|
+
/** `true` when a previous page of results exists. */
|
|
1127
|
+
has_prev: z.boolean().optional().describe("`true` when a previous page of results exists."),
|
|
1128
|
+
/** Current page number, starting at 1. */
|
|
1129
|
+
page: z.number().int().optional().describe("Current page number, starting at 1."),
|
|
1130
|
+
/** Maximum number of agents returned per page. */
|
|
1131
|
+
page_size: z.number().int().optional().describe("Maximum number of agents returned per page."),
|
|
1132
|
+
/** Total number of agents matching the query across all pages. */
|
|
1133
|
+
total_entries: z.number().int().optional().describe("Total number of agents matching the query across all pages."),
|
|
1134
|
+
/** Total number of pages available given the current `page_size`. */
|
|
1135
|
+
total_pages: z.number().int().optional().describe("Total number of pages available given the current `page_size`."),
|
|
1136
|
+
}).describe("Paginated list of agent objects. Use the pagination fields to traverse multiple pages of results.");
|
|
1137
|
+
/** Runtime validator for {@link AgentRoutine}. */
|
|
1138
|
+
export const agentRoutineSchema = z.object({
|
|
1139
|
+
/** Access control list for the routine. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions`. `null` when no ACL restrictions are applied and the routine is accessible to all members of its scope. */
|
|
1140
|
+
acl: aclSchema.optional().describe("Access control list for the routine. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions`. `null` when no ACL restrictions are applied and the routine is accessible to all members of its scope."),
|
|
1141
|
+
/** ID of the agent that owns this routine (`agi_...`). */
|
|
1142
|
+
agent: z.string().optional().describe("ID of the agent that owns this routine (`agi_...`)."),
|
|
1143
|
+
/** Application that scopes this routine (`dap_...`). */
|
|
1144
|
+
app: z.string().optional().describe("Application that scopes this routine (`dap_...`)."),
|
|
1145
|
+
/** ID of the Config record that backs this routine's configuration (`cfg_...`). `null` when the routine is not config-backed. */
|
|
1146
|
+
config: z.string().optional().describe("ID of the Config record that backs this routine's configuration (`cfg_...`). `null` when the routine is not config-backed."),
|
|
1147
|
+
/** When this routine was created (ISO 8601). */
|
|
1148
|
+
created_at: z.string().optional().describe("When this routine was created (ISO 8601)."),
|
|
1149
|
+
/** Optional description of what this routine does. `null` when not set. */
|
|
1150
|
+
description: z.string().optional().describe("Optional description of what this routine does. `null` when not set."),
|
|
1151
|
+
/** Additional configuration controlling how the event trigger is matched or filtered. Shape depends on `event_type`. `null` when not configured. */
|
|
1152
|
+
event_config: z.record(z.unknown()).optional().describe("Additional configuration controlling how the event trigger is matched or filtered. Shape depends on `event_type`. `null` when not configured."),
|
|
1153
|
+
/** Platform event type that triggers this routine, e.g. `"agentroutine.invoked"`. `null` for schedule-only routines. */
|
|
1154
|
+
event_type: z.string().optional().describe("Platform event type that triggers this routine, e.g. `\"agentroutine.invoked\"`. `null` for schedule-only routines."),
|
|
1155
|
+
/** Execution strategy for this routine. One of `"workflow_graph"`, `"script"`, `"preset"`, or `"chain"`. */
|
|
1156
|
+
handler_type: z.string().optional().describe("Execution strategy for this routine. One of `\"workflow_graph\"`, `\"script\"`, `\"preset\"`, or `\"chain\"`."),
|
|
1157
|
+
/** Routine ID (`arn_...`). */
|
|
1158
|
+
id: z.string().describe("Routine ID (`arn_...`)."),
|
|
1159
|
+
/** ID of the AgentRoutineTemplate Config this routine was last provisioned or updated from (`cfg_...`). `null` for hand-built routines. */
|
|
1160
|
+
last_applied_template_config: z.string().optional().describe("ID of the AgentRoutineTemplate Config this routine was last provisioned or updated from (`cfg_...`). `null` for hand-built routines."),
|
|
1161
|
+
/** Unique human-readable key used to look up this routine without knowing its ID. `null` when not set. */
|
|
1162
|
+
lookup_key: z.string().optional().describe("Unique human-readable key used to look up this routine without knowing its ID. `null` when not set."),
|
|
1163
|
+
/** Arbitrary key-value metadata attached to this routine. `null` when not set. */
|
|
1164
|
+
metadata: z.record(z.unknown()).optional().describe("Arbitrary key-value metadata attached to this routine. `null` when not set."),
|
|
1165
|
+
/** Human-readable name for the routine. */
|
|
1166
|
+
name: z.string().optional().describe("Human-readable name for the routine."),
|
|
1167
|
+
/** Resolved preset configuration when `handler_type` is `"preset"`. `null` for other handler types. */
|
|
1168
|
+
preset_config: presetConfigSchema.optional().describe("Resolved preset configuration when `handler_type` is `\"preset\"`. `null` for other handler types."),
|
|
1169
|
+
/** Name of the preset invoked when `handler_type` is `"preset"`. `null` for other handler types. */
|
|
1170
|
+
preset_name: z.string().optional().describe("Name of the preset invoked when `handler_type` is `\"preset\"`. `null` for other handler types."),
|
|
1171
|
+
/** Cron expression controlling when the routine fires on a schedule. `null` for event-only routines. */
|
|
1172
|
+
schedule: z.string().optional().describe("Cron expression controlling when the routine fires on a schedule. `null` for event-only routines."),
|
|
1173
|
+
/** Inline script body executed when `handler_type` is `"script"`. `null` for other handler types. */
|
|
1174
|
+
script: z.string().optional().describe("Inline script body executed when `handler_type` is `\"script\"`. `null` for other handler types."),
|
|
1175
|
+
/** Lifecycle status of the routine. One of `"draft"`, `"active"`, or `"paused"`. Only `"active"` routines respond to triggers. */
|
|
1176
|
+
status: z.string().optional().describe("Lifecycle status of the routine. One of `\"draft\"`, `\"active\"`, or `\"paused\"`. Only `\"active\"` routines respond to triggers."),
|
|
1177
|
+
/** 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). */
|
|
1178
|
+
steps: z.array(z.record(z.unknown())).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)."),
|
|
1179
|
+
/** Execution context in which runs are created. One of `"event"` (background job) or `"chat_session"` (interactive session). Defaults to `"event"`. */
|
|
1180
|
+
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\"`."),
|
|
1181
|
+
/** When this routine was last updated (ISO 8601). */
|
|
1182
|
+
updated_at: z.string().optional().describe("When this routine was last updated (ISO 8601)."),
|
|
1183
|
+
}).describe("An agent routine defines a reusable handler — script, preset, or chain — that runs in response to events or on a schedule.");
|
|
1184
|
+
/** Runtime validator for {@link AgentRoutineListResponse}. */
|
|
1185
|
+
export const agentRoutineListResponseSchema = z.object({
|
|
1186
|
+
/** Array of agent routine objects. */
|
|
1187
|
+
data: z.array(agentRoutineSchema).describe("Array of agent routine objects."),
|
|
1188
|
+
}).describe("List of agent routine objects belonging to a given agent.");
|
|
1189
|
+
/** Runtime validator for {@link AgentRoutineRun}. */
|
|
1190
|
+
export const agentRoutineRunSchema = z.object({
|
|
1191
|
+
/** Access control list for the run. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions`. `null` when no ACL restrictions are applied and the run is accessible to all members of its scope. */
|
|
1192
|
+
acl: aclSchema.optional().describe("Access control list for the run. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions`. `null` when no ACL restrictions are applied and the run is accessible to all members of its scope."),
|
|
1193
|
+
/** ID of the agent that owns the parent routine (`agi_...`). */
|
|
1194
|
+
agent: z.string().optional().describe("ID of the agent that owns the parent routine (`agi_...`)."),
|
|
1195
|
+
/** Application that scopes this run (`dap_...`). */
|
|
1196
|
+
app: z.string().optional().describe("Application that scopes this run (`dap_...`)."),
|
|
1197
|
+
/** When this run was created (ISO 8601). */
|
|
1198
|
+
created_at: z.string().optional().describe("When this run was created (ISO 8601)."),
|
|
1199
|
+
/** Total wall-clock time the run took to execute, in milliseconds. `null` while the run is still in progress. */
|
|
1200
|
+
duration_ms: z.number().int().optional().describe("Total wall-clock time the run took to execute, in milliseconds. `null` while the run is still in progress."),
|
|
1201
|
+
/** Identifier of the platform event that triggered this run. `null` for manually invoked runs. */
|
|
1202
|
+
event_id: z.string().optional().describe("Identifier of the platform event that triggered this run. `null` for manually invoked runs."),
|
|
1203
|
+
/** Routine run ID (`arr_...`). */
|
|
1204
|
+
id: z.string().describe("Routine run ID (`arr_...`)."),
|
|
1205
|
+
/** Arbitrary key-value metadata attached to this run. Empty object when no metadata was set. */
|
|
1206
|
+
metadata: z.record(z.unknown()).optional().describe("Arbitrary key-value metadata attached to this run. Empty object when no metadata was set."),
|
|
1207
|
+
/** Input payload delivered to the routine when this run was triggered. Empty object when no payload was provided. */
|
|
1208
|
+
payload: z.record(z.unknown()).optional().describe("Input payload delivered to the routine when this run was triggered. Empty object when no payload was provided."),
|
|
1209
|
+
/** Output produced by the routine after execution. `null` while the run has not yet completed. */
|
|
1210
|
+
result: z.record(z.unknown()).optional().describe("Output produced by the routine after execution. `null` while the run has not yet completed."),
|
|
1211
|
+
/** ID of the parent routine that produced this run (`arn_...`). */
|
|
1212
|
+
routine: z.string().optional().describe("ID of the parent routine that produced this run (`arn_...`)."),
|
|
1213
|
+
/** Current execution status. One of `"pending"`, `"running"`, `"completed"`, `"failed"`, `"skipped"`, or `"cancelled"`. */
|
|
1214
|
+
status: z.string().optional().describe("Current execution status. One of `\"pending\"`, `\"running\"`, `\"completed\"`, `\"failed\"`, `\"skipped\"`, or `\"cancelled\"`."),
|
|
1215
|
+
/** 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. */
|
|
1216
|
+
structured_response: z.record(z.unknown()).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."),
|
|
1217
|
+
/** When this run was last updated (ISO 8601). */
|
|
1218
|
+
updated_at: z.string().optional().describe("When this run was last updated (ISO 8601)."),
|
|
1219
|
+
/** Background worker status. `null` when no worker job is associated with this run. */
|
|
1220
|
+
worker: workerStatusSchema.optional().describe("Background worker status. `null` when no worker job is associated with this run."),
|
|
1221
|
+
}).describe("A single execution of an agent routine, capturing its status, inputs, outputs, and timing.");
|
|
1222
|
+
/** Runtime validator for {@link AgentRoutineRunListResponse}. */
|
|
1223
|
+
export const agentRoutineRunListResponseSchema = z.object({
|
|
1224
|
+
/** Opaque cursor to pass as the after-cursor parameter to fetch the next page of runs. `null` when no later results exist. */
|
|
1225
|
+
after_cursor: z.string().optional().describe("Opaque cursor to pass as the after-cursor parameter to fetch the next page of runs. `null` when no later results exist."),
|
|
1226
|
+
/** Opaque cursor to pass as the before-cursor parameter to fetch the page of runs that precede this one. `null` when no earlier results exist. */
|
|
1227
|
+
before_cursor: z.string().optional().describe("Opaque cursor to pass as the before-cursor parameter to fetch the page of runs that precede this one. `null` when no earlier results exist."),
|
|
1228
|
+
/** Array of agent routine run objects for the current page. */
|
|
1229
|
+
data: z.array(agentRoutineRunSchema).describe("Array of agent routine run objects for the current page."),
|
|
1230
|
+
}).describe("Cursor-paginated list of agent routine run objects, ordered by creation time descending.");
|
|
1231
|
+
/** Runtime validator for {@link AgentSchedule}. */
|
|
1232
|
+
export const agentScheduleSchema = z.object({
|
|
1233
|
+
/** ID of the agent that owns this schedule (`agi_...`). */
|
|
1234
|
+
agent: z.string().optional().describe("ID of the agent that owns this schedule (`agi_...`)."),
|
|
1235
|
+
/** ID of the application the schedule belongs to (`dap_...`). */
|
|
1236
|
+
app: z.string().optional().describe("ID of the application the schedule belongs to (`dap_...`)."),
|
|
1237
|
+
/** When the schedule was created (ISO 8601). */
|
|
1238
|
+
created_at: z.string().optional().describe("When the schedule was created (ISO 8601)."),
|
|
1239
|
+
/** Standard cron expression defining the recurrence pattern (e.g. `"0 9 * * 1"`). Present only when `schedule_type` is `"recurring"`. `null` for one-time schedules. */
|
|
1240
|
+
cron_expression: z.string().optional().describe("Standard cron expression defining the recurrence pattern (e.g. `\"0 9 * * 1\"`). Present only when `schedule_type` is `\"recurring\"`. `null` for one-time schedules."),
|
|
1241
|
+
/** Schedule ID (`asc_...`). */
|
|
1242
|
+
id: z.string().describe("Schedule ID (`asc_...`)."),
|
|
1243
|
+
/** The task description the agent will execute when this schedule fires. */
|
|
1244
|
+
instructions: z.string().optional().describe("The task description the agent will execute when this schedule fires."),
|
|
1245
|
+
/** UTC datetime of the most recent successful execution. `null` if the schedule has never run. */
|
|
1246
|
+
last_run_at: z.string().optional().describe("UTC datetime of the most recent successful execution. `null` if the schedule has never run."),
|
|
1247
|
+
/** Maximum number of times a recurring schedule may fire before automatically transitioning to `"completed"`. `null` means no limit. */
|
|
1248
|
+
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."),
|
|
1249
|
+
/** Arbitrary key-value pairs attached to the schedule by the agent. Not interpreted by the platform. */
|
|
1250
|
+
metadata: z.record(z.unknown()).optional().describe("Arbitrary key-value pairs attached to the schedule by the agent. Not interpreted by the platform."),
|
|
1251
|
+
/** UTC datetime of the next planned execution. `null` if the schedule has completed, been cancelled, or has not yet been computed. */
|
|
1252
|
+
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."),
|
|
1253
|
+
/** Total number of times this schedule has fired. */
|
|
1254
|
+
run_count: z.number().int().optional().describe("Total number of times this schedule has fired."),
|
|
1255
|
+
/** Determines how the schedule repeats. `"once"` fires a single time at `scheduled_at` then transitions to `"completed"`. `"recurring"` fires on the `cron_expression` and reschedules automatically. */
|
|
1256
|
+
schedule_type: z.string().optional().describe("Determines how the schedule repeats. `\"once\"` fires a single time at `scheduled_at` then transitions to `\"completed\"`. `\"recurring\"` fires on the `cron_expression` and reschedules automatically."),
|
|
1257
|
+
/** The exact UTC datetime at which a one-time schedule fires. Present only when `schedule_type` is `"once"`. `null` for recurring schedules. */
|
|
1258
|
+
scheduled_at: z.string().optional().describe("The exact UTC datetime at which a one-time schedule fires. Present only when `schedule_type` is `\"once\"`. `null` for recurring schedules."),
|
|
1259
|
+
/** Current lifecycle status of the schedule. One of `"active"` (will fire as planned), `"paused"` (temporarily suspended), `"completed"` (has run its last execution), `"cancelled"` (manually stopped), or `"expired"` (past its valid window). */
|
|
1260
|
+
status: z.string().optional().describe("Current lifecycle status of the schedule. One of `\"active\"` (will fire as planned), `\"paused\"` (temporarily suspended), `\"completed\"` (has run its last execution), `\"cancelled\"` (manually stopped), or `\"expired\"` (past its valid window)."),
|
|
1261
|
+
/** Thread ID (`thr_...`) this schedule is bound to. When set, the scheduled task is delivered into the thread rather than creating a new session. `null` for session-based schedules. */
|
|
1262
|
+
thread: z.string().optional().describe("Thread ID (`thr_...`) this schedule is bound to. When set, the scheduled task is delivered into the thread rather than creating a new session. `null` for session-based schedules."),
|
|
1263
|
+
/** IANA timezone name used to interpret the cron expression or `scheduled_at` (e.g. `"America/New_York"`). Defaults to `"Etc/UTC"`. */
|
|
1264
|
+
timezone: z.string().optional().describe("IANA timezone name used to interpret the cron expression or `scheduled_at` (e.g. `\"America/New_York\"`). Defaults to `\"Etc/UTC\"`."),
|
|
1265
|
+
/** When the schedule was last modified (ISO 8601). */
|
|
1266
|
+
updated_at: z.string().optional().describe("When the schedule was last modified (ISO 8601)."),
|
|
1267
|
+
}).describe("A scheduled task created by an agent. Supports one-time and recurring (cron-based) execution patterns.");
|
|
1268
|
+
/** Runtime validator for {@link AgentSession}. */
|
|
1269
|
+
export const agentSessionSchema = z.object({
|
|
1270
|
+
/** ID of the agent that owns this session (`agi_...`). */
|
|
1271
|
+
agent: z.string().optional().describe("ID of the agent that owns this session (`agi_...`)."),
|
|
1272
|
+
/** When the session reached a terminal state (`"completed"`, `"failed"`, or `"cancelled"`). `null` if still in progress. */
|
|
1273
|
+
completed_at: z.string().optional().describe("When the session reached a terminal state (`\"completed\"`, `\"failed\"`, or `\"cancelled\"`). `null` if still in progress."),
|
|
1274
|
+
/** When the session was created (ISO 8601). */
|
|
1275
|
+
created_at: z.string().optional().describe("When the session was created (ISO 8601)."),
|
|
1276
|
+
/** Human-readable error message describing why the session failed. `null` unless `status` is `"failed"`. */
|
|
1277
|
+
error: z.string().optional().describe("Human-readable error message describing why the session failed. `null` unless `status` is `\"failed\"`."),
|
|
1278
|
+
/** Session ID (`ase_...`). */
|
|
1279
|
+
id: z.string().describe("Session ID (`ase_...`)."),
|
|
1280
|
+
/** 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`. */
|
|
1281
|
+
inbox: z.array(z.record(z.unknown())).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`."),
|
|
1282
|
+
/** The task the agent is instructed to perform in this session. */
|
|
1283
|
+
instructions: z.string().optional().describe("The task the agent is instructed to perform in this session."),
|
|
1284
|
+
/** `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. */
|
|
1285
|
+
is_system_session: z.boolean().optional().describe("`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."),
|
|
1286
|
+
/** Maximum number of tool calls the agent may make within a single turn. Defaults to `25`. */
|
|
1287
|
+
max_runs_per_turn: z.number().int().optional().describe("Maximum number of tool calls the agent may make within a single turn. Defaults to `25`."),
|
|
1288
|
+
/** Maximum number of tokens the session may consume across all turns before being terminated. Defaults to `20000`. */
|
|
1289
|
+
max_tokens: z.number().int().optional().describe("Maximum number of tokens the session may consume across all turns before being terminated. Defaults to `20000`."),
|
|
1290
|
+
/** Maximum number of agent turns (LLM calls) allowed before the session is forcibly terminated. Defaults to `100`. */
|
|
1291
|
+
max_turns: z.number().int().optional().describe("Maximum number of agent turns (LLM calls) allowed before the session is forcibly terminated. Defaults to `100`."),
|
|
1292
|
+
/** Arbitrary key-value pairs attached to the session. Not interpreted by the platform. */
|
|
1293
|
+
metadata: z.record(z.unknown()).optional().describe("Arbitrary key-value pairs attached to the session. Not interpreted by the platform."),
|
|
1294
|
+
/** Optional human-readable label for the session. `null` when not set. */
|
|
1295
|
+
name: z.string().optional().describe("Optional human-readable label for the session. `null` when not set."),
|
|
1296
|
+
/** Structured output produced by the session on successful completion. Shape is agent-defined. `null` while the session is still running or if it failed. */
|
|
1297
|
+
result: z.record(z.unknown()).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."),
|
|
1298
|
+
/** When the session began executing. `null` if still `"pending"`. */
|
|
1299
|
+
started_at: z.string().optional().describe("When the session began executing. `null` if still `\"pending\"`."),
|
|
1300
|
+
/** 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). */
|
|
1301
|
+
status: z.string().optional().describe("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)."),
|
|
1302
|
+
/** ID of the trajectory that records the full message history for this session (`trj_...`). `null` until the session has started. */
|
|
1303
|
+
trajectory: z.string().optional().describe("ID of the trajectory that records the full message history for this session (`trj_...`). `null` until the session has started."),
|
|
1304
|
+
}).describe("A durable agent session record representing a single AI task execution. Tracks status, trajectory, result, and any inbox messages delivered to the session.");
|
|
1305
|
+
/** Runtime validator for {@link AgentSessionListResponse}. */
|
|
1306
|
+
export const agentSessionListResponseSchema = z.object({
|
|
1307
|
+
/** Array of agent session objects for the current page. */
|
|
1308
|
+
data: z.array(agentSessionSchema).describe("Array of agent session objects for the current page."),
|
|
1309
|
+
}).describe("Paginated list response containing an array of agent session objects.");
|
|
1310
|
+
/** Runtime validator for {@link AgentSkill}. */
|
|
1311
|
+
export const agentSkillSchema = z.object({
|
|
1312
|
+
/** ID of the agent this skill is attached to (`agi_...`). */
|
|
1313
|
+
agent: z.string().optional().describe("ID of the agent this skill is attached to (`agi_...`)."),
|
|
1314
|
+
/** ID of the application this skill belongs to (`dap_...`). */
|
|
1315
|
+
app: z.string().optional().describe("ID of the application this skill belongs to (`dap_...`)."),
|
|
1316
|
+
/** ID of the root skill config record that defines this skill's behavior (`cfg_...`). */
|
|
1317
|
+
config: z.string().optional().describe("ID of the root skill config record that defines this skill's behavior (`cfg_...`)."),
|
|
1318
|
+
/** When the skill was added to the agent (ISO 8601). */
|
|
1319
|
+
created_at: z.string().optional().describe("When the skill was added to the agent (ISO 8601)."),
|
|
1320
|
+
/** Skill ID (`ask_...`). */
|
|
1321
|
+
id: z.string().describe("Skill ID (`ask_...`)."),
|
|
1322
|
+
/** Optional instruction text that overrides the default skill instructions for this specific agent. `null` when no override is set. */
|
|
1323
|
+
instruction: z.string().optional().describe("Optional instruction text that overrides the default skill instructions for this specific agent. `null` when no override is set."),
|
|
1324
|
+
/** 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. */
|
|
1325
|
+
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."),
|
|
1326
|
+
/** Arbitrary key-value pairs attached to the skill. Not interpreted by the platform. */
|
|
1327
|
+
metadata: z.record(z.unknown()).optional().describe("Arbitrary key-value pairs attached to the skill. Not interpreted by the platform."),
|
|
1328
|
+
/** 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. */
|
|
1329
|
+
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."),
|
|
1330
|
+
/** When the skill was last modified (ISO 8601). */
|
|
1331
|
+
updated_at: z.string().optional().describe("When the skill was last modified (ISO 8601)."),
|
|
1332
|
+
}).describe("A skill enabled on an agent, linking the agent to a skill configuration. Controls which capabilities the agent has access to.");
|
|
1333
|
+
/** Runtime validator for {@link AgentSkillList}. */
|
|
1334
|
+
export const agentSkillListSchema = z.object({
|
|
1335
|
+
/** Array of agent skill objects for the current page. */
|
|
1336
|
+
data: z.array(agentSkillSchema).describe("Array of agent skill objects for the current page."),
|
|
1337
|
+
}).describe("Paginated list response containing an array of agent skill objects.");
|
|
1338
|
+
/** Runtime validator for {@link AgentTool}. */
|
|
1339
|
+
export const agentToolSchema = z.object({
|
|
1340
|
+
/** ID of the agent this tool belongs to (`agi_...`). */
|
|
1341
|
+
agent: z.string().optional().describe("ID of the agent this tool belongs to (`agi_...`)."),
|
|
1342
|
+
/** ID of the application that owns this tool (`dap_...`). */
|
|
1343
|
+
app: z.string().optional().describe("ID of the application that owns this tool (`dap_...`)."),
|
|
1344
|
+
/** `true` when the tool executes asynchronously and returns a task handle rather than an immediate result. */
|
|
1345
|
+
async: z.boolean().optional().describe("`true` when the tool executes asynchronously and returns a task handle rather than an immediate result."),
|
|
1346
|
+
/** Provider-specific configuration for the built-in tool. Present only when `kind` is `"builtin"`. Shape varies by `builtin_tool_key`. */
|
|
1347
|
+
builtin_tool_config: z.record(z.unknown()).optional().describe("Provider-specific configuration for the built-in tool. Present only when `kind` is `\"builtin\"`. Shape varies by `builtin_tool_key`."),
|
|
1348
|
+
/** Registry key identifying the built-in tool implementation. Present only when `kind` is `"builtin"`. */
|
|
1349
|
+
builtin_tool_key: z.string().optional().describe("Registry key identifying the built-in tool implementation. Present only when `kind` is `\"builtin\"`."),
|
|
1350
|
+
/** ID of the config record (`cfg_...`) containing this tool's full configuration. `null` for inline-only tools. */
|
|
1351
|
+
config: z.string().optional().describe("ID of the config record (`cfg_...`) containing this tool's full configuration. `null` for inline-only tools."),
|
|
1352
|
+
/** When the tool was created (ISO 8601). */
|
|
1353
|
+
created_at: z.string().optional().describe("When the tool was created (ISO 8601)."),
|
|
1354
|
+
/** Description of what the tool does, passed to the LLM as part of the tool definition. Resolved from the built-in registry for `kind: "builtin"` tools. */
|
|
1355
|
+
description: z.string().optional().describe("Description of what the tool does, passed to the LLM as part of the tool definition. Resolved from the built-in registry for `kind: \"builtin\"` tools."),
|
|
1356
|
+
/** Execution handler type. One of `"http"`, `"script"`, or `"builtin"`. */
|
|
1357
|
+
handler_type: z.string().optional().describe("Execution handler type. One of `\"http\"`, `\"script\"`, or `\"builtin\"`."),
|
|
1358
|
+
/** Tool ID (`atl_...`). */
|
|
1359
|
+
id: z.string().describe("Tool ID (`atl_...`)."),
|
|
1360
|
+
/** Optional system-level instruction appended to the agent prompt when this tool is active. */
|
|
1361
|
+
instruction: z.string().optional().describe("Optional system-level instruction appended to the agent prompt when this tool is active."),
|
|
1362
|
+
/** Tool kind. One of `"builtin"`, `"custom"`, or `"mcp"`. */
|
|
1363
|
+
kind: z.string().optional().describe("Tool kind. One of `\"builtin\"`, `\"custom\"`, or `\"mcp\"`."),
|
|
1364
|
+
/** ID of the AgentToolTemplate config (`cfg_...`) this tool was last provisioned or updated from. `null` for manually created tools. */
|
|
1365
|
+
last_applied_template_config: z.string().optional().describe("ID of the AgentToolTemplate config (`cfg_...`) this tool was last provisioned or updated from. `null` for manually created tools."),
|
|
1366
|
+
/** Stable, user-defined identifier for this tool within the agent. Unique per agent. */
|
|
1367
|
+
lookup_key: z.string().optional().describe("Stable, user-defined identifier for this tool within the agent. Unique per agent."),
|
|
1368
|
+
/** Arbitrary key-value metadata attached to the tool. Not interpreted by the platform. */
|
|
1369
|
+
metadata: z.record(z.unknown()).optional().describe("Arbitrary key-value metadata attached to the tool. Not interpreted by the platform."),
|
|
1370
|
+
/** Human-readable name of the tool as exposed to the LLM. Resolved from the built-in registry for `kind: "builtin"` tools. */
|
|
1371
|
+
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."),
|
|
1372
|
+
/** Per-instance namespace prepended to LLM-facing tool names for built-in tools that support multiple instances per agent. `null` when not applicable. */
|
|
1373
|
+
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."),
|
|
1374
|
+
/** JSON Schema object describing the tool's input parameters as presented to the LLM. */
|
|
1375
|
+
parameters: z.record(z.unknown()).optional().describe("JSON Schema object describing the tool's input parameters as presented to the LLM."),
|
|
1376
|
+
/** ID of the config record (`cfg_...`) storing the tool's parameter schema. `null` when parameters are defined inline. */
|
|
1377
|
+
parameters_config: z.string().optional().describe("ID of the config record (`cfg_...`) storing the tool's parameter schema. `null` when parameters are defined inline."),
|
|
1378
|
+
/** Current status of the tool. One of `"active"` or `"disabled"`. */
|
|
1379
|
+
status: z.string().optional().describe("Current status of the tool. One of `\"active\"` or `\"disabled\"`."),
|
|
1380
|
+
/** When the tool was last modified (ISO 8601). */
|
|
1381
|
+
updated_at: z.string().optional().describe("When the tool was last modified (ISO 8601)."),
|
|
1382
|
+
}).describe("A tool attached to an agent, defining a capability the agent can invoke during a conversation or task run.");
|
|
1383
|
+
/** Runtime validator for {@link AgentToolListResponse}. */
|
|
1384
|
+
export const agentToolListResponseSchema = z.object({
|
|
1385
|
+
/** Array of agent tool objects returned for the current request. */
|
|
1386
|
+
data: z.array(agentToolSchema).describe("Array of agent tool objects returned for the current request."),
|
|
1387
|
+
}).describe("Paginated list response containing the tools attached to an agent.");
|
|
1388
|
+
/** Runtime validator for {@link AgentUpgradeFieldChange}. */
|
|
1389
|
+
export const agentUpgradeFieldChangeSchema = z.object({
|
|
1390
|
+
/** 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). */
|
|
1391
|
+
baseline: z.unknown().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)."),
|
|
1392
|
+
/** Name of the field that will change, e.g. `"name"` or `"identity"`. */
|
|
1393
|
+
field: z.string().describe("Name of the field that will change, e.g. `\"name\"` or `\"identity\"`."),
|
|
1394
|
+
/** `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. */
|
|
1395
|
+
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."),
|
|
1396
|
+
/** Incoming value the field will be set to after the upgrade (string, number, boolean, or `null`). */
|
|
1397
|
+
new: z.unknown().optional().describe("Incoming value the field will be set to after the upgrade (string, number, boolean, or `null`)."),
|
|
1398
|
+
/** Current value of the field before the upgrade (string, number, boolean, or `null`). */
|
|
1399
|
+
old: z.unknown().optional().describe("Current value of the field before the upgrade (string, number, boolean, or `null`)."),
|
|
1400
|
+
}).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`.");
|
|
1401
|
+
/** Runtime validator for {@link AgentUpgradeChange}. */
|
|
1402
|
+
export const agentUpgradeChangeSchema = z.object({
|
|
1403
|
+
/** The operation that will be performed. One of `"add"`, `"update"`, `"remove"`, or `"noop"`. */
|
|
1404
|
+
action: z.string().describe("The operation that will be performed. One of `\"add\"`, `\"update\"`, `\"remove\"`, or `\"noop\"`."),
|
|
1405
|
+
/** Description of the child resource this change touches, when one is set. `null` when no description is available. */
|
|
1406
|
+
description: z.string().optional().describe("Description of the child resource this change touches, when one is set. `null` when no description is available."),
|
|
1407
|
+
/** Field-level diff entries for this change. Populated only when `action` is `"update"`; empty or absent for `add`, `remove`, and `noop` entries. */
|
|
1408
|
+
field_changes: z.array(agentUpgradeFieldChangeSchema).optional().describe("Field-level diff entries for this change. Populated only when `action` is `\"update\"`; empty or absent for `add`, `remove`, and `noop` entries."),
|
|
1409
|
+
/** Public ID of the existing resource being updated or removed (e.g. `atl_...`, `arn_...`). `null` for `add` entries. */
|
|
1410
|
+
id: z.string().optional().describe("Public ID of the existing resource being updated or removed (e.g. `atl_...`, `arn_...`). `null` for `add` entries."),
|
|
1411
|
+
/** Lookup key of the resource derived from its source template. `null` when the template has no lookup key. */
|
|
1412
|
+
key: z.string().optional().describe("Lookup key of the resource derived from its source template. `null` when the template has no lookup key."),
|
|
1413
|
+
/** Human-facing name of the child resource this change touches (tool/routine/skill/computer name, or builtin tool key for unnamed builtin tools). Falls back to the source template's name. `null` for the synthetic `agent_base` entry. */
|
|
1414
|
+
name: z.string().optional().describe("Human-facing name of the child resource this change touches (tool/routine/skill/computer name, or builtin tool key for unnamed builtin tools). Falls back to the source template's name. `null` for the synthetic `agent_base` entry."),
|
|
1415
|
+
/** Summary of the parent AgentTemplate config (`cfg_...`) being applied in this upgrade. */
|
|
1416
|
+
parent_template_config: upgradeTemplateSummarySchema.describe("Summary of the parent AgentTemplate config (`cfg_...`) being applied in this upgrade."),
|
|
1417
|
+
/** 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. */
|
|
1418
|
+
resource: z.record(z.unknown()).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."),
|
|
1419
|
+
/** Type of the child resource being changed. One of `"agent"`, `"tool"`, `"routine"`, `"skill"`, or `"computer"`. */
|
|
1420
|
+
resource_type: z.string().describe("Type of the child resource being changed. One of `\"agent\"`, `\"tool\"`, `\"routine\"`, `\"skill\"`, or `\"computer\"`."),
|
|
1421
|
+
/** Summary of the specific child template config (`cfg_...`) that defines this resource. `null` when no source template is resolvable. */
|
|
1422
|
+
source_template_config: upgradeTemplateSummarySchema.optional().describe("Summary of the specific child template config (`cfg_...`) that defines this resource. `null` when no source template is resolvable."),
|
|
1423
|
+
}).describe("One child-resource change produced by an agent upgrade, describing the action to be taken on a single resource.");
|
|
1424
|
+
/** Runtime validator for {@link AgentUpgradeSummary}. */
|
|
1425
|
+
export const agentUpgradeSummarySchema = z.object({
|
|
1426
|
+
/** Number of child resources that will be created by this upgrade. */
|
|
1427
|
+
adds: z.number().int().describe("Number of child resources that will be created by this upgrade."),
|
|
1428
|
+
/** Number of child resources with no changes in this upgrade. */
|
|
1429
|
+
noops: z.number().int().describe("Number of child resources with no changes in this upgrade."),
|
|
1430
|
+
/** Number of child resources that will be removed by this upgrade. */
|
|
1431
|
+
removes: z.number().int().describe("Number of child resources that will be removed by this upgrade."),
|
|
1432
|
+
/** Number of child resources that will be updated by this upgrade. */
|
|
1433
|
+
updates: z.number().int().describe("Number of child resources that will be updated by this upgrade."),
|
|
1434
|
+
}).describe("Aggregate counts of each change type produced by an agent upgrade diff.");
|
|
1435
|
+
/** Runtime validator for {@link AgentUpgradeResult}. */
|
|
1436
|
+
export const agentUpgradeResultSchema = z.object({
|
|
1437
|
+
/** Ordered list of per-resource changes that will be (or were) applied by this upgrade. */
|
|
1438
|
+
changes: z.array(agentUpgradeChangeSchema).describe("Ordered list of per-resource changes that will be (or were) applied by this upgrade."),
|
|
1439
|
+
/** `true` when the request was a dry run and no changes were persisted to the agent. */
|
|
1440
|
+
dry_run: z.boolean().describe("`true` when the request was a dry run and no changes were persisted to the agent."),
|
|
1441
|
+
/** Upgrade mode that was used. One of `"full"` (apply all changes) or `"review"` (require fingerprint confirmation). */
|
|
1442
|
+
mode: z.string().describe("Upgrade mode that was used. One of `\"full\"` (apply all changes) or `\"review\"` (require fingerprint confirmation)."),
|
|
1443
|
+
/** Opaque fingerprint of the computed diff. Pass this value back as `review_fingerprint` to confirm and apply a `"review"` mode upgrade. */
|
|
1444
|
+
review_fingerprint: z.string().optional().describe("Opaque fingerprint of the computed diff. Pass this value back as `review_fingerprint` to confirm and apply a `\"review\"` mode upgrade."),
|
|
1445
|
+
/** Outcome of the upgrade. `"ready"` for a dry-run (no changes applied); `"upgraded"` when the upgrade was committed. */
|
|
1446
|
+
status: z.string().describe("Outcome of the upgrade. `\"ready\"` for a dry-run (no changes applied); `\"upgraded\"` when the upgrade was committed."),
|
|
1447
|
+
/** Aggregate counts of adds, updates, removes, and noops across all child resources. */
|
|
1448
|
+
summary: agentUpgradeSummarySchema.describe("Aggregate counts of adds, updates, removes, and noops across all child resources."),
|
|
1449
|
+
}).describe("The computed diff and outcome of an agent upgrade operation, including the full list of per-resource changes.");
|
|
1450
|
+
/** Runtime validator for {@link AgentUpgradeResponse}. */
|
|
1451
|
+
export const agentUpgradeResponseSchema = z.object({
|
|
1452
|
+
/** The agent after the upgrade has been applied. `null` for dry-run requests where no changes were persisted. */
|
|
1453
|
+
agent: agentSchema.optional().describe("The agent after the upgrade has been applied. `null` for dry-run requests where no changes were persisted."),
|
|
1454
|
+
/** Summary of the parent Solution the agent was upgraded from. */
|
|
1455
|
+
solution: solutionSummarySchema.describe("Summary of the parent Solution the agent was upgraded from."),
|
|
1456
|
+
/** Summary of the AgentTemplate config (`cfg_...`) that was selected for this upgrade. */
|
|
1457
|
+
template: upgradeTemplateSummarySchema.describe("Summary of the AgentTemplate config (`cfg_...`) that was selected for this upgrade."),
|
|
1458
|
+
/** Full upgrade diff including status, mode, dry-run flag, summary counts, and per-resource change list. */
|
|
1459
|
+
upgrade_result: agentUpgradeResultSchema.describe("Full upgrade diff including status, mode, dry-run flag, summary counts, and per-resource change list."),
|
|
1460
|
+
}).describe("Response returned by the agent upgrade endpoint, combining the updated agent, its source Solution and template, and the full upgrade diff.");
|
|
1461
|
+
/** Runtime validator for {@link SolutionCategorySummary}. */
|
|
1462
|
+
export const solutionCategorySummarySchema = z.object({
|
|
1463
|
+
/** When this category was first created (ISO 8601). `null` for system-built-in categories. */
|
|
1464
|
+
created_at: z.string().optional().describe("When this category was first created (ISO 8601). `null` for system-built-in categories."),
|
|
1465
|
+
/** Short prose description of what solutions in this category do. `null` when not configured. */
|
|
1466
|
+
description: z.string().optional().describe("Short prose description of what solutions in this category do. `null` when not configured."),
|
|
1467
|
+
/** Solution category config ID (`cfg_...`). */
|
|
1468
|
+
id: z.string().describe("Solution category config ID (`cfg_...`)."),
|
|
1469
|
+
/** Stable, human-readable key for this category, referenced by solutions via `category_keys`. */
|
|
1470
|
+
key: z.string().describe("Stable, human-readable key for this category, referenced by solutions via `category_keys`."),
|
|
1471
|
+
/** Resource type identifier. Always `"SolutionCategory"`. */
|
|
1472
|
+
kind: z.string().describe("Resource type identifier. Always `\"SolutionCategory\"`."),
|
|
1473
|
+
/** Lookup key of the underlying config record. `null` when not set. */
|
|
1474
|
+
lookup_key: z.string().optional().describe("Lookup key of the underlying config record. `null` when not set."),
|
|
1475
|
+
/** Arbitrary key-value metadata attached to this category by the publisher. */
|
|
1476
|
+
metadata: z.record(z.unknown()).optional().describe("Arbitrary key-value metadata attached to this category by the publisher."),
|
|
1477
|
+
/** Display name shown to users. `null` when not configured. */
|
|
1478
|
+
name: z.string().optional().describe("Display name shown to users. `null` when not configured."),
|
|
1479
|
+
/** Organization ID (`org_...`) that owns this category. `null` for system-scoped categories. */
|
|
1480
|
+
org: z.string().optional().describe("Organization ID (`org_...`) that owns this category. `null` for system-scoped categories."),
|
|
1481
|
+
/** Scopes under which this category is visible. Possible values are `"system"` (available to all apps) and `"org"` (scoped to the viewer's organization). */
|
|
1482
|
+
owners: z.array(z.string()).describe("Scopes under which this category is visible. Possible values are `\"system\"` (available to all apps) and `\"org\"` (scoped to the viewer's organization)."),
|
|
1483
|
+
/** Key of the parent `SolutionCategory`, enabling a hierarchy. `null` for top-level categories. */
|
|
1484
|
+
parent_key: z.string().optional().describe("Key of the parent `SolutionCategory`, enabling a hierarchy. `null` for top-level categories."),
|
|
1485
|
+
/** Numeric hint for ordering categories in a list. Lower values sort first. `null` when not configured. */
|
|
1486
|
+
sort_order: z.number().int().optional().describe("Numeric hint for ordering categories in a list. Lower values sort first. `null` when not configured."),
|
|
1487
|
+
/** When this category was last modified (ISO 8601). `null` for system-built-in categories. */
|
|
1488
|
+
updated_at: z.string().optional().describe("When this category was last modified (ISO 8601). `null` for system-built-in categories."),
|
|
1489
|
+
/** Virtual path of the underlying config record. `null` when not set. */
|
|
1490
|
+
virtual_path: z.string().optional().describe("Virtual path of the underlying config record. `null` when not set."),
|
|
1491
|
+
}).describe("A solution category that organizes solutions in the catalog, identified by a stable key and optionally nested under a parent category.");
|
|
1492
|
+
/** Runtime validator for {@link SolutionCategoryListResponse}. */
|
|
1493
|
+
export const solutionCategoryListResponseSchema = z.object({
|
|
1494
|
+
/** Array of solution category summary objects for the current page. */
|
|
1495
|
+
data: z.array(solutionCategorySummarySchema).describe("Array of solution category summary objects for the current page."),
|
|
1496
|
+
/** `true` when a subsequent page of results exists. */
|
|
1497
|
+
has_next: z.boolean().describe("`true` when a subsequent page of results exists."),
|
|
1498
|
+
/** `true` when a previous page of results exists. */
|
|
1499
|
+
has_prev: z.boolean().describe("`true` when a previous page of results exists."),
|
|
1500
|
+
/** Current page number (1-indexed). */
|
|
1501
|
+
page: z.number().int().describe("Current page number (1-indexed)."),
|
|
1502
|
+
/** Maximum number of entries returned per page. */
|
|
1503
|
+
page_size: z.number().int().describe("Maximum number of entries returned per page."),
|
|
1504
|
+
/** Total number of distinct solution categories across all pages. */
|
|
1505
|
+
total_entries: z.number().int().describe("Total number of distinct solution categories across all pages."),
|
|
1506
|
+
/** Total number of pages available at the current `page_size`. */
|
|
1507
|
+
total_pages: z.number().int().describe("Total number of pages available at the current `page_size`."),
|
|
1508
|
+
}).describe("Paginated list of solution category summaries. Use `page` and `page_size` to navigate pages of results.");
|
|
1509
|
+
/** Runtime validator for {@link SolutionDependentAgent}. */
|
|
1510
|
+
export const solutionDependentAgentSchema = z.object({
|
|
1511
|
+
/** Agent ID (`agi_...`). */
|
|
1512
|
+
id: z.string().describe("Agent ID (`agi_...`)."),
|
|
1513
|
+
/** Human-readable display name of the agent. `null` when no name has been set. */
|
|
1514
|
+
name: z.string().optional().describe("Human-readable display name of the agent. `null` when no name has been set."),
|
|
1515
|
+
}).describe("A brief representation of an agent that references at least one config bundled by a Solution, included in the dependents preview response.");
|
|
1516
|
+
/** Runtime validator for {@link SolutionDependentsResponse}. */
|
|
1517
|
+
export const solutionDependentsResponseSchema = z.object({
|
|
1518
|
+
/** Total number of distinct agents that reference at least one config bundled by this Solution. Use this count in the confirmation message; `dependent_agents` may be a shorter sample. */
|
|
1519
|
+
dependent_agent_count: z.number().int().describe("Total number of distinct agents that reference at least one config bundled by this Solution. Use this count in the confirmation message; `dependent_agents` may be a shorter sample."),
|
|
1520
|
+
/** A representative sample of the dependent agents, suitable for displaying in a warning list. May contain fewer entries than `dependent_agent_count` when there are many dependents. */
|
|
1521
|
+
dependent_agents: z.array(solutionDependentAgentSchema).describe("A representative sample of the dependent agents, suitable for displaying in a warning list. May contain fewer entries than `dependent_agent_count` when there are many dependents."),
|
|
1522
|
+
/** Number of bundled configs that would be detached and preserved rather than deleted, because at least one live agent still references them. */
|
|
1523
|
+
preserved_config_count: z.number().int().describe("Number of bundled configs that would be detached and preserved rather than deleted, because at least one live agent still references them."),
|
|
1524
|
+
}).describe("A preview of the agents and configs that would be affected by deleting a Solution, returned before any deletion occurs so the caller can display a confirmation warning.");
|
|
1525
|
+
/** Runtime validator for {@link SolutionDiffReference}. */
|
|
1526
|
+
export const solutionDiffReferenceSchema = z.object({
|
|
1527
|
+
/** ID of the referencing config (`cfg_...`). */
|
|
1528
|
+
id: z.string().describe("ID of the referencing config (`cfg_...`)."),
|
|
1529
|
+
/** Object type of the referencing config, e.g. `"Automation"` or `"Template"`. */
|
|
1530
|
+
kind: z.string().describe("Object type of the referencing config, e.g. `\"Automation\"` or `\"Template\"`."),
|
|
1531
|
+
/** Human-readable stable identifier of the referencing config. `null` if not assigned. */
|
|
1532
|
+
lookup_key: z.string().optional().describe("Human-readable stable identifier of the referencing config. `null` if not assigned."),
|
|
1533
|
+
/** Explanation of how the referencing config depends on the orphaned entry. */
|
|
1534
|
+
reason: z.string().describe("Explanation of how the referencing config depends on the orphaned entry."),
|
|
1535
|
+
}).describe("A reference from another config to an orphaned entry in a solution upgrade diff, explaining why the orphan cannot be safely removed.");
|
|
1536
|
+
/** Runtime validator for {@link SolutionDiffEntry}. */
|
|
1537
|
+
export const solutionDiffEntrySchema = z.object({
|
|
1538
|
+
/** Planned action for this entry. One of `"add"` (new config), `"update"` (existing config changes), `"noop"` (no change needed), `"orphan"` (config no longer in the solution), or `"delete"` (config to be removed). */
|
|
1539
|
+
action: z.string().describe("Planned action for this entry. One of `\"add\"` (new config), `\"update\"` (existing config changes), `\"noop\"` (no change needed), `\"orphan\"` (config no longer in the solution), or `\"delete\"` (config to be removed)."),
|
|
1540
|
+
/** `true` if the config content differs between the existing and incoming solution versions. */
|
|
1541
|
+
content_changed: z.boolean().describe("`true` if the config content differs between the existing and incoming solution versions."),
|
|
1542
|
+
/** Config ID (`cfg_...`) if this entry corresponds to an existing config record. `null` for new additions. */
|
|
1543
|
+
id: z.string().optional().describe("Config ID (`cfg_...`) if this entry corresponds to an existing config record. `null` for new additions."),
|
|
1544
|
+
/** Stable string key identifying this config entry within the solution. */
|
|
1545
|
+
key: z.string().describe("Stable string key identifying this config entry within the solution."),
|
|
1546
|
+
/** Config object type, e.g. `"Automation"` or `"Template"`. `null` if not yet known. */
|
|
1547
|
+
kind: z.string().optional().describe("Config object type, e.g. `\"Automation\"` or `\"Template\"`. `null` if not yet known."),
|
|
1548
|
+
/** Human-readable stable identifier for this config. `null` if not assigned. */
|
|
1549
|
+
lookup_key: z.string().optional().describe("Human-readable stable identifier for this config. `null` if not assigned."),
|
|
1550
|
+
/** `true` if the MIME type of the config changed between versions. */
|
|
1551
|
+
mime_type_changed: z.boolean().describe("`true` if the MIME type of the config changed between versions."),
|
|
1552
|
+
/** List of other configs that reference this entry. Populated for orphaned configs that cannot be safely removed. Empty array when there are no references. */
|
|
1553
|
+
referenced_by: z.array(solutionDiffReferenceSchema).optional().describe("List of other configs that reference this entry. Populated for orphaned configs that cannot be safely removed. Empty array when there are no references."),
|
|
1554
|
+
/** `true` if the relative path of the config within the solution changed between versions. */
|
|
1555
|
+
relative_path_changed: z.boolean().describe("`true` if the relative path of the config within the solution changed between versions."),
|
|
1556
|
+
/** Role of this config within the solution. Indicates whether it is a primary config or a dependency. */
|
|
1557
|
+
role: z.string().describe("Role of this config within the solution. Indicates whether it is a primary config or a dependency."),
|
|
1558
|
+
/** Hierarchical path of this config in the config tree. `null` if not assigned. */
|
|
1559
|
+
virtual_path: z.string().optional().describe("Hierarchical path of this config in the config tree. `null` if not assigned."),
|
|
1560
|
+
}).describe("A single config entry in a solution upgrade diff, describing what action will be taken on a specific config key.");
|
|
1561
|
+
/** Runtime validator for {@link SolutionDiffSummary}. */
|
|
1562
|
+
export const solutionDiffSummarySchema = z.object({
|
|
1563
|
+
/** Number of config entries that will be newly created by this upgrade. */
|
|
1564
|
+
adds: z.number().int().describe("Number of config entries that will be newly created by this upgrade."),
|
|
1565
|
+
/** Number of config entries that will be deleted as part of the upgrade. */
|
|
1566
|
+
deletes: z.number().int().describe("Number of config entries that will be deleted as part of the upgrade."),
|
|
1567
|
+
/** Number of config entries that are already up to date and require no changes. */
|
|
1568
|
+
noops: z.number().int().describe("Number of config entries that are already up to date and require no changes."),
|
|
1569
|
+
/** Number of config entries present in the existing solution that are absent from the incoming version and have no external references blocking removal. */
|
|
1570
|
+
orphans: z.number().int().describe("Number of config entries present in the existing solution that are absent from the incoming version and have no external references blocking removal."),
|
|
1571
|
+
/** Number of orphaned config entries that cannot be removed because other configs still reference them. */
|
|
1572
|
+
referenced_orphans: z.number().int().describe("Number of orphaned config entries that cannot be removed because other configs still reference them."),
|
|
1573
|
+
/** Number of config entries that exist and will be updated with new content. */
|
|
1574
|
+
updates: z.number().int().describe("Number of config entries that exist and will be updated with new content."),
|
|
1575
|
+
}).describe("Aggregate counts of each action type across all entries in a solution upgrade diff.");
|
|
1576
|
+
/** Runtime validator for {@link SolutionImportResult}. */
|
|
1577
|
+
export const solutionImportResultSchema = z.object({
|
|
1578
|
+
/** Machine-readable conflict code present when `status` is `"conflict"`, identifying the specific conflict reason. `null` when `status` is `"ready"`. */
|
|
1579
|
+
code: z.string().optional().describe("Machine-readable conflict code present when `status` is `\"conflict\"`, identifying the specific conflict reason. `null` when `status` is `\"ready\"`."),
|
|
1580
|
+
/** Whether this result was produced by a dry-run check. `true` when the import was validated without persisting any changes. */
|
|
1581
|
+
dry_run: z.boolean().describe("Whether this result was produced by a dry-run check. `true` when the import was validated without persisting any changes."),
|
|
1582
|
+
/** Semver string of the Solution version already present in the library. `null` when no prior version exists. */
|
|
1583
|
+
existing_solution_version: z.string().optional().describe("Semver string of the Solution version already present in the library. `null` when no prior version exists."),
|
|
1584
|
+
/** Semver string of the Solution version in the bundle being imported. `null` when the bundle does not declare a version. */
|
|
1585
|
+
incoming_solution_version: z.string().optional().describe("Semver string of the Solution version in the bundle being imported. `null` when the bundle does not declare a version."),
|
|
1586
|
+
/** Human-readable description of the import status or conflict reason, suitable for display in a confirmation dialog. `null` when no detail is available. */
|
|
1587
|
+
message: z.string().optional().describe("Human-readable description of the import status or conflict reason, suitable for display in a confirmation dialog. `null` when no detail is available."),
|
|
1588
|
+
/** Outcome of the import check. `"ready"` means the import can proceed as a normal create or update. `"conflict"` means a version conflict was detected and the upgrade flow must be used instead. */
|
|
1589
|
+
status: z.string().describe("Outcome of the import check. `\"ready\"` means the import can proceed as a normal create or update. `\"conflict\"` means a version conflict was detected and the upgrade flow must be used instead."),
|
|
1590
|
+
/** Whether the caller must invoke the dedicated upgrade flow to complete the import. Mirrors `status == "conflict"` as a convenience boolean. */
|
|
1591
|
+
upgrade_required: z.boolean().describe("Whether the caller must invoke the dedicated upgrade flow to complete the import. Mirrors `status == \"conflict\"` as a convenience boolean."),
|
|
1592
|
+
}).describe("The machine-readable outcome of a Solution import attempt, indicating whether the import succeeded or requires an upgrade flow to resolve a version conflict.");
|
|
1593
|
+
/** Runtime validator for {@link SolutionImportResponse}. */
|
|
1594
|
+
export const solutionImportResponseSchema = z.object({
|
|
1595
|
+
/** When the Solution config record was first created (ISO 8601). */
|
|
1596
|
+
created_at: z.string().optional().describe("When the Solution config record was first created (ISO 8601)."),
|
|
1597
|
+
/** Solution config ID (`cfg_...`). */
|
|
1598
|
+
id: z.string().describe("Solution config ID (`cfg_...`)."),
|
|
1599
|
+
/** Structured outcome of the import, including status, conflict details, and version information. */
|
|
1600
|
+
import_result: solutionImportResultSchema.describe("Structured outcome of the import, including status, conflict details, and version information."),
|
|
1601
|
+
/** Deprecated legacy field. One entry per persisted config in the import (including the Solution itself), defaulting to an empty array. Callers should prefer `solution` plus follow-up APIs instead. `key` echoes the caller-supplied input identifier (original lookup_key for top-level configs; `<skill_lookup_key>:<relative_path>` for skill / solution-file children). Order is stable: sorted by `key`. */
|
|
1602
|
+
installed_configs: z.array(installedConfigEntrySchema).optional().describe("Deprecated legacy field. One entry per persisted config in the import (including the Solution itself), defaulting to an empty array. Callers should prefer `solution` plus follow-up APIs instead. `key` echoes the caller-supplied input identifier (original lookup_key for top-level configs; `<skill_lookup_key>:<relative_path>` for skill / solution-file children). Order is stable: sorted by `key`."),
|
|
1603
|
+
/** Resource type. Always `"Solution"`. */
|
|
1604
|
+
kind: z.string().describe("Resource type. Always `\"Solution\"`."),
|
|
1605
|
+
/** The `lookup_key` stored on the Solution config after the import's suffix normalization. `null` when the Solution was not given a lookup key. */
|
|
1606
|
+
lookup_key: z.string().optional().describe("The `lookup_key` stored on the Solution config after the import's suffix normalization. `null` when the Solution was not given a lookup key."),
|
|
1607
|
+
/** Full summary of the imported Solution, in the same shape as the individual Solution retrieval endpoint. */
|
|
1608
|
+
solution: solutionSummarySchema.describe("Full summary of the imported Solution, in the same shape as the individual Solution retrieval endpoint."),
|
|
1609
|
+
/** When the Solution config record was last modified (ISO 8601). */
|
|
1610
|
+
updated_at: z.string().optional().describe("When the Solution config record was last modified (ISO 8601)."),
|
|
1611
|
+
/** The `virtual_path` stored on the Solution config, used as the stable dedupe key across owner scopes. `null` when no virtual path was assigned. */
|
|
1612
|
+
virtual_path: z.string().optional().describe("The `virtual_path` stored on the Solution config, used as the stable dedupe key across owner scopes. `null` when no virtual path was assigned."),
|
|
1613
|
+
}).describe("The result of importing a Solution bundle into the library, including the Solution config record, a structured import result, and the list of all configs persisted during the transaction.");
|
|
1614
|
+
/** Runtime validator for {@link SolutionInstallResponse}. */
|
|
1615
|
+
export const solutionInstallResponseSchema = z.object({
|
|
1616
|
+
/** Public ID of the provisioned resource. The prefix reflects the resource kind: `agi_...` for Agent, `aut_...` for Automation, `art_...` for AgentRoutine, `att_...` for AgentTool, `ask_...` for AgentSkill, `cmp_...` for AgentComputer. */
|
|
1617
|
+
id: z.string().describe("Public ID of the provisioned resource. The prefix reflects the resource kind: `agi_...` for Agent, `aut_...` for Automation, `art_...` for AgentRoutine, `att_...` for AgentTool, `ask_...` for AgentSkill, `cmp_...` for AgentComputer."),
|
|
1618
|
+
/** Type of the provisioned resource. One of `"Agent"`, `"Automation"`, `"AgentRoutine"`, `"AgentTool"`, `"AgentSkill"`, or `"AgentComputer"`. */
|
|
1619
|
+
kind: z.string().describe("Type of the provisioned resource. One of `\"Agent\"`, `\"Automation\"`, `\"AgentRoutine\"`, `\"AgentTool\"`, `\"AgentSkill\"`, or `\"AgentComputer\"`."),
|
|
1620
|
+
/** The `lookup_key` stamped on the provisioned resource. `null` for `AgentSkill`, which is a join record and does not carry a lookup key. */
|
|
1621
|
+
lookup_key: z.string().optional().describe("The `lookup_key` stamped on the provisioned resource. `null` for `AgentSkill`, which is a join record and does not carry a lookup key."),
|
|
1622
|
+
/** Solution config ID (`cfg_...`) that was used as the source for this install. */
|
|
1623
|
+
solution: z.string().describe("Solution config ID (`cfg_...`) that was used as the source for this install."),
|
|
1624
|
+
}).describe("The runtime resource provisioned by installing a Solution, along with a reference back to the source Solution config.");
|
|
1625
|
+
/** Runtime validator for {@link SolutionListResponse}. */
|
|
1626
|
+
export const solutionListResponseSchema = z.object({
|
|
1627
|
+
/** Array of Solution summary objects for the current page, in the order returned by the query. */
|
|
1628
|
+
data: z.array(solutionSummarySchema).describe("Array of Solution summary objects for the current page, in the order returned by the query."),
|
|
1629
|
+
/** `true` when a subsequent page exists; `false` when this is the last page. */
|
|
1630
|
+
has_next: z.boolean().describe("`true` when a subsequent page exists; `false` when this is the last page."),
|
|
1631
|
+
/** `true` when a preceding page exists; `false` when this is the first page. */
|
|
1632
|
+
has_prev: z.boolean().describe("`true` when a preceding page exists; `false` when this is the first page."),
|
|
1633
|
+
/** 1-based index of the current page. */
|
|
1634
|
+
page: z.number().int().describe("1-based index of the current page."),
|
|
1635
|
+
/** Maximum number of results included per page. */
|
|
1636
|
+
page_size: z.number().int().describe("Maximum number of results included per page."),
|
|
1637
|
+
/** Total number of Solutions matching the query after deduplication by `solution_id` across owner scopes. */
|
|
1638
|
+
total_entries: z.number().int().describe("Total number of Solutions matching the query after deduplication by `solution_id` across owner scopes."),
|
|
1639
|
+
/** Total number of pages available at the current `page_size`. */
|
|
1640
|
+
total_pages: z.number().int().describe("Total number of pages available at the current `page_size`."),
|
|
1641
|
+
}).describe("A paginated collection of Solution summaries, with page metadata for navigating the result set.");
|
|
1642
|
+
/** Runtime validator for {@link SolutionTagSummary}. */
|
|
1643
|
+
export const solutionTagSummarySchema = z.object({
|
|
1644
|
+
/** When the solution tag was first created (ISO 8601). `null` if unavailable. */
|
|
1645
|
+
created_at: z.string().optional().describe("When the solution tag was first created (ISO 8601). `null` if unavailable."),
|
|
1646
|
+
/** Short prose explanation of what the tag represents. `null` if not provided. */
|
|
1647
|
+
description: z.string().optional().describe("Short prose explanation of what the tag represents. `null` if not provided."),
|
|
1648
|
+
/** Solution tag config ID (`cfg_...`). */
|
|
1649
|
+
id: z.string().describe("Solution tag config ID (`cfg_...`)."),
|
|
1650
|
+
/** Stable string key for this tag, referenced by `Solution.tag_keys` to associate solutions with this tag. */
|
|
1651
|
+
key: z.string().describe("Stable string key for this tag, referenced by `Solution.tag_keys` to associate solutions with this tag."),
|
|
1652
|
+
/** Object type discriminator. Always `"SolutionTag"`. */
|
|
1653
|
+
kind: z.string().describe("Object type discriminator. Always `\"SolutionTag\"`."),
|
|
1654
|
+
/** Human-readable stable identifier for this tag config, used for lookups and imports. `null` if not assigned. */
|
|
1655
|
+
lookup_key: z.string().optional().describe("Human-readable stable identifier for this tag config, used for lookups and imports. `null` if not assigned."),
|
|
1656
|
+
/** Arbitrary key-value metadata attached to this tag. Empty object `{}` when no metadata is present. */
|
|
1657
|
+
metadata: z.record(z.unknown()).optional().describe("Arbitrary key-value metadata attached to this tag. Empty object `{}` when no metadata is present."),
|
|
1658
|
+
/** Human-readable display name for the tag. `null` if not yet set. */
|
|
1659
|
+
name: z.string().optional().describe("Human-readable display name for the tag. `null` if not yet set."),
|
|
1660
|
+
/** ID of the organization that owns this tag (`org_...`). `null` for system-scoped tags. */
|
|
1661
|
+
org: z.string().optional().describe("ID of the organization that owns this tag (`org_...`). `null` for system-scoped tags."),
|
|
1662
|
+
/** Scopes under which this tag is visible to the caller. One or both of `"system"` (platform-level tag available to all orgs) and `"org"` (tag scoped to the viewer's org). */
|
|
1663
|
+
owners: z.array(z.string()).describe("Scopes under which this tag is visible to the caller. One or both of `\"system\"` (platform-level tag available to all orgs) and `\"org\"` (tag scoped to the viewer's org)."),
|
|
1664
|
+
/** Optional integer hint for ordering tags in UI lists. Lower values sort first. `null` if not set. */
|
|
1665
|
+
sort_order: z.number().int().optional().describe("Optional integer hint for ordering tags in UI lists. Lower values sort first. `null` if not set."),
|
|
1666
|
+
/** When the solution tag was last modified (ISO 8601). `null` if unavailable. */
|
|
1667
|
+
updated_at: z.string().optional().describe("When the solution tag was last modified (ISO 8601). `null` if unavailable."),
|
|
1668
|
+
/** Hierarchical path used to organize this tag in the config tree. `null` if not assigned. */
|
|
1669
|
+
virtual_path: z.string().optional().describe("Hierarchical path used to organize this tag in the config tree. `null` if not assigned."),
|
|
1670
|
+
}).describe("A single solution tag definition, representing a named classification label that can be applied to solutions.");
|
|
1671
|
+
/** Runtime validator for {@link SolutionTagListResponse}. */
|
|
1672
|
+
export const solutionTagListResponseSchema = z.object({
|
|
1673
|
+
/** Array of solution tag objects for the current page. */
|
|
1674
|
+
data: z.array(solutionTagSummarySchema).describe("Array of solution tag objects for the current page."),
|
|
1675
|
+
/** `true` if a subsequent page exists; `false` when this is the last page. */
|
|
1676
|
+
has_next: z.boolean().describe("`true` if a subsequent page exists; `false` when this is the last page."),
|
|
1677
|
+
/** `true` if a preceding page exists; `false` when this is the first page. */
|
|
1678
|
+
has_prev: z.boolean().describe("`true` if a preceding page exists; `false` when this is the first page."),
|
|
1679
|
+
/** Current page number (1-indexed). */
|
|
1680
|
+
page: z.number().int().describe("Current page number (1-indexed)."),
|
|
1681
|
+
/** Maximum number of results returned per page. */
|
|
1682
|
+
page_size: z.number().int().describe("Maximum number of results returned per page."),
|
|
1683
|
+
/** Total number of distinct solution tags across all pages, after deduplication by key. */
|
|
1684
|
+
total_entries: z.number().int().describe("Total number of distinct solution tags across all pages, after deduplication by key."),
|
|
1685
|
+
/** Total number of pages available at the current `page_size`. */
|
|
1686
|
+
total_pages: z.number().int().describe("Total number of pages available at the current `page_size`."),
|
|
1687
|
+
}).describe("Paginated list of solution tag summaries returned by the list solution tags endpoint.");
|
|
1688
|
+
/** Runtime validator for {@link SolutionUpgradeResult}. */
|
|
1689
|
+
export const solutionUpgradeResultSchema = z.object({
|
|
1690
|
+
/** Ordered list of individual config change entries representing every add, update, noop, orphan, and delete in the diff. */
|
|
1691
|
+
changes: z.array(solutionDiffEntrySchema).describe("Ordered list of individual config change entries representing every add, update, noop, orphan, and delete in the diff."),
|
|
1692
|
+
/** Machine-readable conflict code when `status` is `"conflict"`, e.g. `"review_required"`. `null` when there is no conflict. */
|
|
1693
|
+
code: z.string().optional().describe("Machine-readable conflict code when `status` is `\"conflict\"`, e.g. `\"review_required\"`. `null` when there is no conflict."),
|
|
1694
|
+
/** `true` when the upgrade was computed without writing any changes; `false` when changes were committed. */
|
|
1695
|
+
dry_run: z.boolean().describe("`true` when the upgrade was computed without writing any changes; `false` when changes were committed."),
|
|
1696
|
+
/** Version string of the currently installed solution, as declared in its manifest. `null` if no prior version is installed. */
|
|
1697
|
+
existing_solution_version: z.string().optional().describe("Version string of the currently installed solution, as declared in its manifest. `null` if no prior version is installed."),
|
|
1698
|
+
/** Version string of the incoming solution to be installed, as declared in its manifest. `null` if the incoming manifest omits a version. */
|
|
1699
|
+
incoming_solution_version: z.string().optional().describe("Version string of the incoming solution to be installed, as declared in its manifest. `null` if the incoming manifest omits a version."),
|
|
1700
|
+
/** Human-readable description of the conflict or error. `null` when there is no conflict. */
|
|
1701
|
+
message: z.string().optional().describe("Human-readable description of the conflict or error. `null` when there is no conflict."),
|
|
1702
|
+
/** Opaque fingerprint that uniquely identifies this diff. Pass this value as `review_fingerprint` on a subsequent non-dry-run upgrade call to confirm you have reviewed the diff. `null` if not applicable. */
|
|
1703
|
+
review_fingerprint: z.string().optional().describe("Opaque fingerprint that uniquely identifies this diff. Pass this value as `review_fingerprint` on a subsequent non-dry-run upgrade call to confirm you have reviewed the diff. `null` if not applicable."),
|
|
1704
|
+
/** Overall result of the upgrade. `"ready"` means the upgrade can proceed; `"conflict"` means a blocking issue was detected and the upgrade was not applied. */
|
|
1705
|
+
status: z.string().describe("Overall result of the upgrade. `\"ready\"` means the upgrade can proceed; `\"conflict\"` means a blocking issue was detected and the upgrade was not applied."),
|
|
1706
|
+
/** Aggregate counts of each action type across all diff entries. */
|
|
1707
|
+
summary: solutionDiffSummarySchema.describe("Aggregate counts of each action type across all diff entries."),
|
|
1708
|
+
/** Describes the nature of the version transition. One of `"upgrade"`, `"downgrade"`, `"same"`, or `"unknown"`. */
|
|
1709
|
+
version_change: z.string().describe("Describes the nature of the version transition. One of `\"upgrade\"`, `\"downgrade\"`, `\"same\"`, or `\"unknown\"`."),
|
|
1710
|
+
}).describe("The outcome of a solution upgrade operation, including the computed diff and conflict status.");
|
|
1711
|
+
/** Runtime validator for {@link SolutionUpgradeResponse}. */
|
|
1712
|
+
export const solutionUpgradeResponseSchema = z.object({
|
|
1713
|
+
/** When the solution config record was first created (ISO 8601). `null` if unavailable. */
|
|
1714
|
+
created_at: z.string().optional().describe("When the solution config record was first created (ISO 8601). `null` if unavailable."),
|
|
1715
|
+
/** Config ID of the solution record (`cfg_...`). */
|
|
1716
|
+
id: z.string().describe("Config ID of the solution record (`cfg_...`)."),
|
|
1717
|
+
/** List of config entries that were installed or updated as part of this upgrade. Empty when `dry_run` is `true` or when no configs changed. */
|
|
1718
|
+
installed_configs: z.array(installedConfigEntrySchema).optional().describe("List of config entries that were installed or updated as part of this upgrade. Empty when `dry_run` is `true` or when no configs changed."),
|
|
1719
|
+
/** Object type discriminator. Always `"Solution"`. */
|
|
1720
|
+
kind: z.string().describe("Object type discriminator. Always `\"Solution\"`."),
|
|
1721
|
+
/** Human-readable stable identifier for this solution config. `null` if not assigned. */
|
|
1722
|
+
lookup_key: z.string().optional().describe("Human-readable stable identifier for this solution config. `null` if not assigned."),
|
|
1723
|
+
/** Summary of the solution being upgraded, including its name, manifest metadata, and tag keys. */
|
|
1724
|
+
solution: solutionSummarySchema.describe("Summary of the solution being upgraded, including its name, manifest metadata, and tag keys."),
|
|
1725
|
+
/** When the solution config record was last modified (ISO 8601). `null` if unavailable. */
|
|
1726
|
+
updated_at: z.string().optional().describe("When the solution config record was last modified (ISO 8601). `null` if unavailable."),
|
|
1727
|
+
/** Detailed result of the upgrade operation, including the computed diff and any conflict information. */
|
|
1728
|
+
upgrade_result: solutionUpgradeResultSchema.describe("Detailed result of the upgrade operation, including the computed diff and any conflict information."),
|
|
1729
|
+
/** Hierarchical path of the solution in the config tree. `null` if not assigned. */
|
|
1730
|
+
virtual_path: z.string().optional().describe("Hierarchical path of the solution in the config tree. `null` if not assigned."),
|
|
1731
|
+
}).describe("Response returned by the solution upgrade endpoint, containing the solution record, the full upgrade diff, and the resulting installed configs.");
|
|
369
1732
|
//# sourceMappingURL=common.js.map
|