@archastro/sdk 0.5.0 → 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 +21185 -39
- package/dist/types/chat.d.ts.map +1 -1
- package/dist/types/chat.js +64 -8
- package/dist/types/chat.js.map +1 -1
- 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 +4 -2
- 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/members.d.ts +0 -99
- package/dist/types/members.d.ts.map +0 -1
- package/dist/types/members.js +0 -36
- package/dist/types/members.js.map +0 -1
- package/dist/types/orgs.d.ts +0 -193
- package/dist/types/orgs.d.ts.map +0 -1
- package/dist/types/orgs.js +0 -69
- package/dist/types/orgs.js.map +0 -1
- package/dist/types/reactions.d.ts +0 -29
- package/dist/types/reactions.d.ts.map +0 -1
- package/dist/types/reactions.js +0 -15
- package/dist/types/reactions.js.map +0 -1
- package/dist/types/schedules.d.ts +0 -32
- package/dist/types/schedules.d.ts.map +0 -1
- package/dist/types/schedules.js +0 -16
- package/dist/types/schedules.js.map +0 -1
- package/dist/types/system.d.ts +0 -23
- package/dist/types/system.d.ts.map +0 -1
- package/dist/types/system.js +0 -13
- package/dist/types/system.js.map +0 -1
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,wEAAwE;AACxE,6BAA6B;AAE7B,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO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.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { V1 } from "./v1.js";
|
|
|
3
3
|
export * from "./v1/resources/index.js";
|
|
4
4
|
export { PlatformClient, type PlatformClientConfig } from "./client.js";
|
|
5
5
|
export { AuthClient, type AuthTokens } from "./auth.js";
|
|
6
|
-
export { ApiChatChannel } from "./channels/api_chat_channel.js";
|
|
7
6
|
export { ApiActivityFeedChannel } from "./channels/api_activity_feed_channel.js";
|
|
7
|
+
export { ApiChatChannel } from "./channels/api_chat_channel.js";
|
|
8
8
|
export { ApiObjectChannel } from "./channels/api_object_channel.js";
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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: f77578a2151b
|
|
4
4
|
export * from "./types/index.js";
|
|
5
5
|
export { V1 } from "./v1.js";
|
|
6
6
|
export * from "./v1/resources/index.js";
|
|
7
7
|
export { PlatformClient } from "./client.js";
|
|
8
8
|
export { AuthClient } from "./auth.js";
|
|
9
|
-
export { ApiChatChannel } from "./channels/api_chat_channel.js";
|
|
10
9
|
export { ApiActivityFeedChannel } from "./channels/api_activity_feed_channel.js";
|
|
10
|
+
export { ApiChatChannel } from "./channels/api_chat_channel.js";
|
|
11
11
|
export { ApiObjectChannel } from "./channels/api_object_channel.js";
|
|
12
12
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,wEAAwE;AACxE,6BAA6B;AAE7B,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,cAAc,EAA6B,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,UAAU,EAAmB,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,wEAAwE;AACxE,6BAA6B;AAE7B,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,cAAc,EAA6B,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,UAAU,EAAmB,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC"}
|
package/dist/types/ai.d.ts
CHANGED
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
/**
|
|
2
|
+
/** A tool (function) call emitted by the assistant within an AI message. Mirrors the OpenAI tool-call object format. */
|
|
3
|
+
export interface AIToolCall {
|
|
4
|
+
/** Arguments the model wants to pass to the tool, as a key-value map. Deserialize and validate these against the tool's input schema before executing. */
|
|
5
|
+
arguments: Record<string, unknown>;
|
|
6
|
+
/** Unique identifier for this tool call, assigned by the model. Use this value as `id` when submitting the corresponding tool result. */
|
|
7
|
+
id: string;
|
|
8
|
+
/** Name of the tool or function the model wants to invoke, e.g. `"web_search"` or `"run_code"`. */
|
|
9
|
+
name: string;
|
|
10
|
+
/** Opaque signature representing the model's internal reasoning that led to this tool call. `null` when the provider does not expose chain-of-thought data. */
|
|
11
|
+
thought_signature?: string | undefined;
|
|
12
|
+
}
|
|
13
|
+
/** Runtime validator for {@link AIToolCall}. */
|
|
3
14
|
export declare const aIToolCallSchema: z.ZodObject<{
|
|
15
|
+
/** Arguments the model wants to pass to the tool, as a key-value map. Deserialize and validate these against the tool's input schema before executing. */
|
|
4
16
|
arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
17
|
+
/** Unique identifier for this tool call, assigned by the model. Use this value as `id` when submitting the corresponding tool result. */
|
|
5
18
|
id: z.ZodString;
|
|
19
|
+
/** Name of the tool or function the model wants to invoke, e.g. `"web_search"` or `"run_code"`. */
|
|
6
20
|
name: z.ZodString;
|
|
21
|
+
/** Opaque signature representing the model's internal reasoning that led to this tool call. `null` when the provider does not expose chain-of-thought data. */
|
|
7
22
|
thought_signature: z.ZodOptional<z.ZodString>;
|
|
8
23
|
}, "strip", z.ZodTypeAny, {
|
|
9
24
|
id: string;
|
|
@@ -16,12 +31,26 @@ export declare const aIToolCallSchema: z.ZodObject<{
|
|
|
16
31
|
arguments: Record<string, unknown>;
|
|
17
32
|
thought_signature?: string | undefined;
|
|
18
33
|
}>;
|
|
19
|
-
|
|
20
|
-
|
|
34
|
+
/** The result of executing a tool call, submitted back to the model as a tool-role message. Mirrors the OpenAI tool-result object format. */
|
|
35
|
+
export interface AIToolResult {
|
|
36
|
+
/** Plain-text output produced by the tool execution. `null` when the result is expressed entirely through `resolution`. */
|
|
37
|
+
content?: string | undefined;
|
|
38
|
+
/** ID of the tool call this result satisfies. Must match the `id` from the corresponding `AIToolCall`. */
|
|
39
|
+
id: string;
|
|
40
|
+
/** Name of the tool or function that was executed, e.g. `"web_search"`. Must match the `name` from the corresponding `AIToolCall`. */
|
|
41
|
+
name: string;
|
|
42
|
+
/** Structured result data from the tool execution. Shape varies by tool. `null` when the result is expressed as plain text in `content`. */
|
|
43
|
+
resolution?: unknown | undefined;
|
|
44
|
+
}
|
|
45
|
+
/** Runtime validator for {@link AIToolResult}. */
|
|
21
46
|
export declare const aIToolResultSchema: z.ZodObject<{
|
|
47
|
+
/** Plain-text output produced by the tool execution. `null` when the result is expressed entirely through `resolution`. */
|
|
22
48
|
content: z.ZodOptional<z.ZodString>;
|
|
49
|
+
/** ID of the tool call this result satisfies. Must match the `id` from the corresponding `AIToolCall`. */
|
|
23
50
|
id: z.ZodString;
|
|
51
|
+
/** Name of the tool or function that was executed, e.g. `"web_search"`. Must match the `name` from the corresponding `AIToolCall`. */
|
|
24
52
|
name: z.ZodString;
|
|
53
|
+
/** Structured result data from the tool execution. Shape varies by tool. `null` when the result is expressed as plain text in `content`. */
|
|
25
54
|
resolution: z.ZodOptional<z.ZodUnknown>;
|
|
26
55
|
}, "strip", z.ZodTypeAny, {
|
|
27
56
|
id: string;
|
|
@@ -34,18 +63,44 @@ export declare const aIToolResultSchema: z.ZodObject<{
|
|
|
34
63
|
content?: string | undefined;
|
|
35
64
|
resolution?: unknown;
|
|
36
65
|
}>;
|
|
37
|
-
|
|
38
|
-
|
|
66
|
+
/** A single message in an AI conversation, following the OpenAI-compatible chat format. Used in both request inputs and completion responses. */
|
|
67
|
+
export interface AIMessage {
|
|
68
|
+
/** Plain-text content of the message. Present for `system`, `user`, and `assistant` messages. `null` when the message body is expressed through `content_parts` or `tool_calls`. */
|
|
69
|
+
content?: string | undefined;
|
|
70
|
+
/** Multimodal content parts for the message, used when the body includes images or mixed media. Each part is a map with a `type` key (`"text"`, `"image_url"`, or `"image_data"`). `null` when `content` is set. */
|
|
71
|
+
content_parts?: Record<string, unknown>[] | undefined;
|
|
72
|
+
/** Opaque token that can be passed on a subsequent request to resume this conversation from the current state. `null` when the provider does not support conversation resumption. */
|
|
73
|
+
resume_token?: string | undefined;
|
|
74
|
+
/** The speaker role for this message. One of `"system"`, `"user"`, `"assistant"`, or `"tool"`. */
|
|
75
|
+
role: string;
|
|
76
|
+
/** Parsed structured data returned by the model when a JSON schema or structured-output mode was requested. Shape varies by the schema supplied at call time. `null` when structured output was not requested. */
|
|
77
|
+
structured_output?: unknown | undefined;
|
|
78
|
+
/** Tool calls requested by the model in an `assistant` message. Present only on assistant messages that invoke one or more tools. `null` on all other message roles. */
|
|
79
|
+
tool_calls?: AIToolCall[] | undefined;
|
|
80
|
+
/** Tool execution results provided in a `tool` message. Each entry corresponds to a prior tool call by its `id`. `null` on all other message roles. */
|
|
81
|
+
tool_results?: AIToolResult[] | undefined;
|
|
82
|
+
}
|
|
83
|
+
/** Runtime validator for {@link AIMessage}. */
|
|
39
84
|
export declare const aIMessageSchema: z.ZodObject<{
|
|
85
|
+
/** Plain-text content of the message. Present for `system`, `user`, and `assistant` messages. `null` when the message body is expressed through `content_parts` or `tool_calls`. */
|
|
40
86
|
content: z.ZodOptional<z.ZodString>;
|
|
87
|
+
/** Multimodal content parts for the message, used when the body includes images or mixed media. Each part is a map with a `type` key (`"text"`, `"image_url"`, or `"image_data"`). `null` when `content` is set. */
|
|
41
88
|
content_parts: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
|
|
89
|
+
/** Opaque token that can be passed on a subsequent request to resume this conversation from the current state. `null` when the provider does not support conversation resumption. */
|
|
42
90
|
resume_token: z.ZodOptional<z.ZodString>;
|
|
91
|
+
/** The speaker role for this message. One of `"system"`, `"user"`, `"assistant"`, or `"tool"`. */
|
|
43
92
|
role: z.ZodString;
|
|
93
|
+
/** Parsed structured data returned by the model when a JSON schema or structured-output mode was requested. Shape varies by the schema supplied at call time. `null` when structured output was not requested. */
|
|
44
94
|
structured_output: z.ZodOptional<z.ZodUnknown>;
|
|
95
|
+
/** Tool calls requested by the model in an `assistant` message. Present only on assistant messages that invoke one or more tools. `null` on all other message roles. */
|
|
45
96
|
tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
97
|
+
/** Arguments the model wants to pass to the tool, as a key-value map. Deserialize and validate these against the tool's input schema before executing. */
|
|
46
98
|
arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
99
|
+
/** Unique identifier for this tool call, assigned by the model. Use this value as `id` when submitting the corresponding tool result. */
|
|
47
100
|
id: z.ZodString;
|
|
101
|
+
/** Name of the tool or function the model wants to invoke, e.g. `"web_search"` or `"run_code"`. */
|
|
48
102
|
name: z.ZodString;
|
|
103
|
+
/** Opaque signature representing the model's internal reasoning that led to this tool call. `null` when the provider does not expose chain-of-thought data. */
|
|
49
104
|
thought_signature: z.ZodOptional<z.ZodString>;
|
|
50
105
|
}, "strip", z.ZodTypeAny, {
|
|
51
106
|
id: string;
|
|
@@ -58,10 +113,15 @@ export declare const aIMessageSchema: z.ZodObject<{
|
|
|
58
113
|
arguments: Record<string, unknown>;
|
|
59
114
|
thought_signature?: string | undefined;
|
|
60
115
|
}>, "many">>;
|
|
116
|
+
/** Tool execution results provided in a `tool` message. Each entry corresponds to a prior tool call by its `id`. `null` on all other message roles. */
|
|
61
117
|
tool_results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
118
|
+
/** Plain-text output produced by the tool execution. `null` when the result is expressed entirely through `resolution`. */
|
|
62
119
|
content: z.ZodOptional<z.ZodString>;
|
|
120
|
+
/** ID of the tool call this result satisfies. Must match the `id` from the corresponding `AIToolCall`. */
|
|
63
121
|
id: z.ZodString;
|
|
122
|
+
/** Name of the tool or function that was executed, e.g. `"web_search"`. Must match the `name` from the corresponding `AIToolCall`. */
|
|
64
123
|
name: z.ZodString;
|
|
124
|
+
/** Structured result data from the tool execution. Shape varies by tool. `null` when the result is expressed as plain text in `content`. */
|
|
65
125
|
resolution: z.ZodOptional<z.ZodUnknown>;
|
|
66
126
|
}, "strip", z.ZodTypeAny, {
|
|
67
127
|
id: string;
|
|
@@ -111,20 +171,42 @@ export declare const aIMessageSchema: z.ZodObject<{
|
|
|
111
171
|
resolution?: unknown;
|
|
112
172
|
}[] | undefined;
|
|
113
173
|
}>;
|
|
114
|
-
|
|
115
|
-
|
|
174
|
+
/** The result of an AI chat completion request. Returned by chat completion endpoints after the model finishes generating. */
|
|
175
|
+
export interface AICompletionResult {
|
|
176
|
+
/** The reason the model stopped generating. Common values include `"stop"` (natural end), `"length"` (token limit reached), and `"tool_calls"` (the model invoked a tool). */
|
|
177
|
+
finish_reason: string;
|
|
178
|
+
/** The final assistant message produced by the completion. */
|
|
179
|
+
message: AIMessage;
|
|
180
|
+
/** The complete message history for the conversation, including all user, assistant, and tool messages in order. */
|
|
181
|
+
messages: AIMessage[];
|
|
182
|
+
/** Token consumption breakdown keyed by model ID. Each value is a map with `"input_tokens"` and `"output_tokens"` counts. `null` when usage data is unavailable. */
|
|
183
|
+
token_usage?: Record<string, unknown> | undefined;
|
|
184
|
+
}
|
|
185
|
+
/** Runtime validator for {@link AICompletionResult}. */
|
|
116
186
|
export declare const aICompletionResultSchema: z.ZodObject<{
|
|
187
|
+
/** The reason the model stopped generating. Common values include `"stop"` (natural end), `"length"` (token limit reached), and `"tool_calls"` (the model invoked a tool). */
|
|
117
188
|
finish_reason: z.ZodString;
|
|
189
|
+
/** The final assistant message produced by the completion. */
|
|
118
190
|
message: z.ZodObject<{
|
|
191
|
+
/** Plain-text content of the message. Present for `system`, `user`, and `assistant` messages. `null` when the message body is expressed through `content_parts` or `tool_calls`. */
|
|
119
192
|
content: z.ZodOptional<z.ZodString>;
|
|
193
|
+
/** Multimodal content parts for the message, used when the body includes images or mixed media. Each part is a map with a `type` key (`"text"`, `"image_url"`, or `"image_data"`). `null` when `content` is set. */
|
|
120
194
|
content_parts: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
|
|
195
|
+
/** Opaque token that can be passed on a subsequent request to resume this conversation from the current state. `null` when the provider does not support conversation resumption. */
|
|
121
196
|
resume_token: z.ZodOptional<z.ZodString>;
|
|
197
|
+
/** The speaker role for this message. One of `"system"`, `"user"`, `"assistant"`, or `"tool"`. */
|
|
122
198
|
role: z.ZodString;
|
|
199
|
+
/** Parsed structured data returned by the model when a JSON schema or structured-output mode was requested. Shape varies by the schema supplied at call time. `null` when structured output was not requested. */
|
|
123
200
|
structured_output: z.ZodOptional<z.ZodUnknown>;
|
|
201
|
+
/** Tool calls requested by the model in an `assistant` message. Present only on assistant messages that invoke one or more tools. `null` on all other message roles. */
|
|
124
202
|
tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
203
|
+
/** Arguments the model wants to pass to the tool, as a key-value map. Deserialize and validate these against the tool's input schema before executing. */
|
|
125
204
|
arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
205
|
+
/** Unique identifier for this tool call, assigned by the model. Use this value as `id` when submitting the corresponding tool result. */
|
|
126
206
|
id: z.ZodString;
|
|
207
|
+
/** Name of the tool or function the model wants to invoke, e.g. `"web_search"` or `"run_code"`. */
|
|
127
208
|
name: z.ZodString;
|
|
209
|
+
/** Opaque signature representing the model's internal reasoning that led to this tool call. `null` when the provider does not expose chain-of-thought data. */
|
|
128
210
|
thought_signature: z.ZodOptional<z.ZodString>;
|
|
129
211
|
}, "strip", z.ZodTypeAny, {
|
|
130
212
|
id: string;
|
|
@@ -137,10 +219,15 @@ export declare const aICompletionResultSchema: z.ZodObject<{
|
|
|
137
219
|
arguments: Record<string, unknown>;
|
|
138
220
|
thought_signature?: string | undefined;
|
|
139
221
|
}>, "many">>;
|
|
222
|
+
/** Tool execution results provided in a `tool` message. Each entry corresponds to a prior tool call by its `id`. `null` on all other message roles. */
|
|
140
223
|
tool_results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
224
|
+
/** Plain-text output produced by the tool execution. `null` when the result is expressed entirely through `resolution`. */
|
|
141
225
|
content: z.ZodOptional<z.ZodString>;
|
|
226
|
+
/** ID of the tool call this result satisfies. Must match the `id` from the corresponding `AIToolCall`. */
|
|
142
227
|
id: z.ZodString;
|
|
228
|
+
/** Name of the tool or function that was executed, e.g. `"web_search"`. Must match the `name` from the corresponding `AIToolCall`. */
|
|
143
229
|
name: z.ZodString;
|
|
230
|
+
/** Structured result data from the tool execution. Shape varies by tool. `null` when the result is expressed as plain text in `content`. */
|
|
144
231
|
resolution: z.ZodOptional<z.ZodUnknown>;
|
|
145
232
|
}, "strip", z.ZodTypeAny, {
|
|
146
233
|
id: string;
|
|
@@ -190,16 +277,27 @@ export declare const aICompletionResultSchema: z.ZodObject<{
|
|
|
190
277
|
resolution?: unknown;
|
|
191
278
|
}[] | undefined;
|
|
192
279
|
}>;
|
|
280
|
+
/** The complete message history for the conversation, including all user, assistant, and tool messages in order. */
|
|
193
281
|
messages: z.ZodArray<z.ZodObject<{
|
|
282
|
+
/** Plain-text content of the message. Present for `system`, `user`, and `assistant` messages. `null` when the message body is expressed through `content_parts` or `tool_calls`. */
|
|
194
283
|
content: z.ZodOptional<z.ZodString>;
|
|
284
|
+
/** Multimodal content parts for the message, used when the body includes images or mixed media. Each part is a map with a `type` key (`"text"`, `"image_url"`, or `"image_data"`). `null` when `content` is set. */
|
|
195
285
|
content_parts: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
|
|
286
|
+
/** Opaque token that can be passed on a subsequent request to resume this conversation from the current state. `null` when the provider does not support conversation resumption. */
|
|
196
287
|
resume_token: z.ZodOptional<z.ZodString>;
|
|
288
|
+
/** The speaker role for this message. One of `"system"`, `"user"`, `"assistant"`, or `"tool"`. */
|
|
197
289
|
role: z.ZodString;
|
|
290
|
+
/** Parsed structured data returned by the model when a JSON schema or structured-output mode was requested. Shape varies by the schema supplied at call time. `null` when structured output was not requested. */
|
|
198
291
|
structured_output: z.ZodOptional<z.ZodUnknown>;
|
|
292
|
+
/** Tool calls requested by the model in an `assistant` message. Present only on assistant messages that invoke one or more tools. `null` on all other message roles. */
|
|
199
293
|
tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
294
|
+
/** Arguments the model wants to pass to the tool, as a key-value map. Deserialize and validate these against the tool's input schema before executing. */
|
|
200
295
|
arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
296
|
+
/** Unique identifier for this tool call, assigned by the model. Use this value as `id` when submitting the corresponding tool result. */
|
|
201
297
|
id: z.ZodString;
|
|
298
|
+
/** Name of the tool or function the model wants to invoke, e.g. `"web_search"` or `"run_code"`. */
|
|
202
299
|
name: z.ZodString;
|
|
300
|
+
/** Opaque signature representing the model's internal reasoning that led to this tool call. `null` when the provider does not expose chain-of-thought data. */
|
|
203
301
|
thought_signature: z.ZodOptional<z.ZodString>;
|
|
204
302
|
}, "strip", z.ZodTypeAny, {
|
|
205
303
|
id: string;
|
|
@@ -212,10 +310,15 @@ export declare const aICompletionResultSchema: z.ZodObject<{
|
|
|
212
310
|
arguments: Record<string, unknown>;
|
|
213
311
|
thought_signature?: string | undefined;
|
|
214
312
|
}>, "many">>;
|
|
313
|
+
/** Tool execution results provided in a `tool` message. Each entry corresponds to a prior tool call by its `id`. `null` on all other message roles. */
|
|
215
314
|
tool_results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
315
|
+
/** Plain-text output produced by the tool execution. `null` when the result is expressed entirely through `resolution`. */
|
|
216
316
|
content: z.ZodOptional<z.ZodString>;
|
|
317
|
+
/** ID of the tool call this result satisfies. Must match the `id` from the corresponding `AIToolCall`. */
|
|
217
318
|
id: z.ZodString;
|
|
319
|
+
/** Name of the tool or function that was executed, e.g. `"web_search"`. Must match the `name` from the corresponding `AIToolCall`. */
|
|
218
320
|
name: z.ZodString;
|
|
321
|
+
/** Structured result data from the tool execution. Shape varies by tool. `null` when the result is expressed as plain text in `content`. */
|
|
219
322
|
resolution: z.ZodOptional<z.ZodUnknown>;
|
|
220
323
|
}, "strip", z.ZodTypeAny, {
|
|
221
324
|
id: string;
|
|
@@ -265,6 +368,7 @@ export declare const aICompletionResultSchema: z.ZodObject<{
|
|
|
265
368
|
resolution?: unknown;
|
|
266
369
|
}[] | undefined;
|
|
267
370
|
}>, "many">;
|
|
371
|
+
/** Token consumption breakdown keyed by model ID. Each value is a map with `"input_tokens"` and `"output_tokens"` counts. `null` when usage data is unavailable. */
|
|
268
372
|
token_usage: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
269
373
|
}, "strip", z.ZodTypeAny, {
|
|
270
374
|
message: {
|
|
@@ -349,44 +453,78 @@ export declare const aICompletionResultSchema: z.ZodObject<{
|
|
|
349
453
|
}[];
|
|
350
454
|
token_usage?: Record<string, unknown> | undefined;
|
|
351
455
|
}>;
|
|
352
|
-
|
|
353
|
-
|
|
456
|
+
/** The result returned by an AI image generation or editing operation. Contains the generated image (as inline data or a URL) along with dimension, size, and usage metadata. */
|
|
457
|
+
export interface AIImageResult {
|
|
458
|
+
/** Aspect ratio of the generated image, e.g. `"16:9"` or `"1:1"`. `null` when not reported by the provider. */
|
|
459
|
+
aspect_ratio?: string | undefined;
|
|
460
|
+
/** Height of the generated image in pixels. `null` when the provider does not report dimensions. */
|
|
461
|
+
height?: number | undefined;
|
|
462
|
+
/** The generated image encoded as a base64 string. Present when the provider returns inline image data. `null` when `image_url` is set instead. */
|
|
463
|
+
image_data?: string | undefined;
|
|
464
|
+
/** Resolution tier label for the image, e.g. `"1K"` or `"2K"`. `null` when the provider does not include a tier label. */
|
|
465
|
+
image_size?: string | undefined;
|
|
466
|
+
/** MIME type of the generated image, e.g. `"image/png"` or `"image/jpeg"`. `null` when the provider does not report a content type. */
|
|
467
|
+
image_type?: string | undefined;
|
|
468
|
+
/** Temporary URL pointing to the generated image hosted by the provider. Present when the provider returns a URL rather than inline data. `null` when `image_data` is set instead. */
|
|
469
|
+
image_url?: string | undefined;
|
|
470
|
+
/** Identifier of the model that produced the image, e.g. `"dall-e-3"` or `"imagen-3"`. */
|
|
471
|
+
model: string;
|
|
472
|
+
/** The prompt as rewritten by the provider before generation. Some providers (e.g. DALL-E 3) automatically expand or safety-check the original prompt. `null` when the provider does not revise prompts. */
|
|
473
|
+
revised_prompt?: string | undefined;
|
|
474
|
+
/** Canonical size string as returned by the provider, e.g. `"1024x1024"`. `null` when not reported. */
|
|
475
|
+
size?: string | undefined;
|
|
476
|
+
/** Provider-reported token and compute usage for the request. Structure varies by provider. `null` when usage data is unavailable. */
|
|
477
|
+
usage?: Record<string, unknown> | undefined;
|
|
478
|
+
/** Width of the generated image in pixels. `null` when the provider does not report dimensions. */
|
|
479
|
+
width?: number | undefined;
|
|
480
|
+
}
|
|
481
|
+
/** Runtime validator for {@link AIImageResult}. */
|
|
354
482
|
export declare const aIImageResultSchema: z.ZodObject<{
|
|
483
|
+
/** Aspect ratio of the generated image, e.g. `"16:9"` or `"1:1"`. `null` when not reported by the provider. */
|
|
355
484
|
aspect_ratio: z.ZodOptional<z.ZodString>;
|
|
485
|
+
/** Height of the generated image in pixels. `null` when the provider does not report dimensions. */
|
|
356
486
|
height: z.ZodOptional<z.ZodNumber>;
|
|
487
|
+
/** The generated image encoded as a base64 string. Present when the provider returns inline image data. `null` when `image_url` is set instead. */
|
|
357
488
|
image_data: z.ZodOptional<z.ZodString>;
|
|
489
|
+
/** Resolution tier label for the image, e.g. `"1K"` or `"2K"`. `null` when the provider does not include a tier label. */
|
|
358
490
|
image_size: z.ZodOptional<z.ZodString>;
|
|
491
|
+
/** MIME type of the generated image, e.g. `"image/png"` or `"image/jpeg"`. `null` when the provider does not report a content type. */
|
|
359
492
|
image_type: z.ZodOptional<z.ZodString>;
|
|
493
|
+
/** Temporary URL pointing to the generated image hosted by the provider. Present when the provider returns a URL rather than inline data. `null` when `image_data` is set instead. */
|
|
360
494
|
image_url: z.ZodOptional<z.ZodString>;
|
|
495
|
+
/** Identifier of the model that produced the image, e.g. `"dall-e-3"` or `"imagen-3"`. */
|
|
361
496
|
model: z.ZodString;
|
|
497
|
+
/** The prompt as rewritten by the provider before generation. Some providers (e.g. DALL-E 3) automatically expand or safety-check the original prompt. `null` when the provider does not revise prompts. */
|
|
362
498
|
revised_prompt: z.ZodOptional<z.ZodString>;
|
|
499
|
+
/** Canonical size string as returned by the provider, e.g. `"1024x1024"`. `null` when not reported. */
|
|
363
500
|
size: z.ZodOptional<z.ZodString>;
|
|
501
|
+
/** Provider-reported token and compute usage for the request. Structure varies by provider. `null` when usage data is unavailable. */
|
|
364
502
|
usage: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
503
|
+
/** Width of the generated image in pixels. `null` when the provider does not report dimensions. */
|
|
365
504
|
width: z.ZodOptional<z.ZodNumber>;
|
|
366
505
|
}, "strip", z.ZodTypeAny, {
|
|
367
506
|
model: string;
|
|
368
507
|
height?: number | undefined;
|
|
369
508
|
width?: number | undefined;
|
|
370
509
|
image_url?: string | undefined;
|
|
510
|
+
size?: string | undefined;
|
|
371
511
|
aspect_ratio?: string | undefined;
|
|
372
512
|
image_data?: string | undefined;
|
|
373
513
|
image_size?: string | undefined;
|
|
374
514
|
image_type?: string | undefined;
|
|
375
515
|
revised_prompt?: string | undefined;
|
|
376
|
-
size?: string | undefined;
|
|
377
516
|
usage?: Record<string, unknown> | undefined;
|
|
378
517
|
}, {
|
|
379
518
|
model: string;
|
|
380
519
|
height?: number | undefined;
|
|
381
520
|
width?: number | undefined;
|
|
382
521
|
image_url?: string | undefined;
|
|
522
|
+
size?: string | undefined;
|
|
383
523
|
aspect_ratio?: string | undefined;
|
|
384
524
|
image_data?: string | undefined;
|
|
385
525
|
image_size?: string | undefined;
|
|
386
526
|
image_type?: string | undefined;
|
|
387
527
|
revised_prompt?: string | undefined;
|
|
388
|
-
size?: string | undefined;
|
|
389
528
|
usage?: Record<string, unknown> | undefined;
|
|
390
529
|
}>;
|
|
391
|
-
export type AIImageResult = z.infer<typeof aIImageResultSchema>;
|
|
392
530
|
//# sourceMappingURL=ai.d.ts.map
|
package/dist/types/ai.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../src/types/ai.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,
|
|
1
|
+
{"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../src/types/ai.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,wHAAwH;AACxH,MAAM,WAAW,UAAU;IACzB,0JAA0J;IAC1J,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,yIAAyI;IACzI,EAAE,EAAE,MAAM,CAAC;IACX,mGAAmG;IACnG,IAAI,EAAE,MAAM,CAAC;IACb,+JAA+J;IAC/J,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACxC;AAED,gDAAgD;AAChD,eAAO,MAAM,gBAAgB;IAC3B,0JAA0J;;IAE1J,yIAAyI;;IAEzI,mGAAmG;;IAEnG,+JAA+J;;;;;;;;;;;;EAED,CAAC;AAEjK,6IAA6I;AAC7I,MAAM,WAAW,YAAY;IAC3B,2HAA2H;IAC3H,OAAO,C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AM,GAAG,SAAS,CAAC;IAClC,oGAAoG;IACpG,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,mJAAmJ;IACnJ,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,0HAA0H;IAC1H,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,uIAAuI;IACvI,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,sLAAsL;IACtL,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,0FAA0F;IAC1F,KAAK,EAAE,MAAM,CAAC;IACd,4MAA4M;IAC5M,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,uGAAuG;IACvG,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,sIAAsI;IACtI,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IAC5C,mGAAmG;IACnG,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AAED,mDAAmD;AACnD,eAAO,MAAM,mBAAmB;IAC9B,+GAA+G;;IAE/G,oGAAoG;;IAEpG,mJAAmJ;;IAEnJ,0HAA0H;;IAE1H,uIAAuI;;IAEvI,sLAAsL;;IAEtL,0FAA0F;;IAE1F,4MAA4M;;IAE5M,uGAAuG;;IAEvG,sIAAsI;;IAEtI,mGAAmG;;;;;;;;;;;;;;;;;;;;;;;;;;EAEuH,CAAC"}
|
package/dist/types/ai.js
CHANGED
|
@@ -1,50 +1,80 @@
|
|
|
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: c6432ec19ed4
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
/**
|
|
5
|
+
/** Runtime validator for {@link AIToolCall}. */
|
|
6
6
|
export const aIToolCallSchema = z.object({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
/** Arguments the model wants to pass to the tool, as a key-value map. Deserialize and validate these against the tool's input schema before executing. */
|
|
8
|
+
arguments: z.record(z.unknown()).describe("Arguments the model wants to pass to the tool, as a key-value map. Deserialize and validate these against the tool's input schema before executing."),
|
|
9
|
+
/** Unique identifier for this tool call, assigned by the model. Use this value as `id` when submitting the corresponding tool result. */
|
|
10
|
+
id: z.string().describe("Unique identifier for this tool call, assigned by the model. Use this value as `id` when submitting the corresponding tool result."),
|
|
11
|
+
/** Name of the tool or function the model wants to invoke, e.g. `"web_search"` or `"run_code"`. */
|
|
12
|
+
name: z.string().describe("Name of the tool or function the model wants to invoke, e.g. `\"web_search\"` or `\"run_code\"`."),
|
|
13
|
+
/** Opaque signature representing the model's internal reasoning that led to this tool call. `null` when the provider does not expose chain-of-thought data. */
|
|
14
|
+
thought_signature: z.string().optional().describe("Opaque signature representing the model's internal reasoning that led to this tool call. `null` when the provider does not expose chain-of-thought data."),
|
|
15
|
+
}).describe("A tool (function) call emitted by the assistant within an AI message. Mirrors the OpenAI tool-call object format.");
|
|
16
|
+
/** Runtime validator for {@link AIToolResult}. */
|
|
13
17
|
export const aIToolResultSchema = z.object({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
/** Plain-text output produced by the tool execution. `null` when the result is expressed entirely through `resolution`. */
|
|
19
|
+
content: z.string().optional().describe("Plain-text output produced by the tool execution. `null` when the result is expressed entirely through `resolution`."),
|
|
20
|
+
/** ID of the tool call this result satisfies. Must match the `id` from the corresponding `AIToolCall`. */
|
|
21
|
+
id: z.string().describe("ID of the tool call this result satisfies. Must match the `id` from the corresponding `AIToolCall`."),
|
|
22
|
+
/** Name of the tool or function that was executed, e.g. `"web_search"`. Must match the `name` from the corresponding `AIToolCall`. */
|
|
23
|
+
name: z.string().describe("Name of the tool or function that was executed, e.g. `\"web_search\"`. Must match the `name` from the corresponding `AIToolCall`."),
|
|
24
|
+
/** Structured result data from the tool execution. Shape varies by tool. `null` when the result is expressed as plain text in `content`. */
|
|
25
|
+
resolution: z.unknown().optional().describe("Structured result data from the tool execution. Shape varies by tool. `null` when the result is expressed as plain text in `content`."),
|
|
26
|
+
}).describe("The result of executing a tool call, submitted back to the model as a tool-role message. Mirrors the OpenAI tool-result object format.");
|
|
27
|
+
/** Runtime validator for {@link AIMessage}. */
|
|
20
28
|
export const aIMessageSchema = z.object({
|
|
21
|
-
content
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
/**
|
|
29
|
+
/** Plain-text content of the message. Present for `system`, `user`, and `assistant` messages. `null` when the message body is expressed through `content_parts` or `tool_calls`. */
|
|
30
|
+
content: z.string().optional().describe("Plain-text content of the message. Present for `system`, `user`, and `assistant` messages. `null` when the message body is expressed through `content_parts` or `tool_calls`."),
|
|
31
|
+
/** Multimodal content parts for the message, used when the body includes images or mixed media. Each part is a map with a `type` key (`"text"`, `"image_url"`, or `"image_data"`). `null` when `content` is set. */
|
|
32
|
+
content_parts: z.array(z.record(z.unknown())).optional().describe("Multimodal content parts for the message, used when the body includes images or mixed media. Each part is a map with a `type` key (`\"text\"`, `\"image_url\"`, or `\"image_data\"`). `null` when `content` is set."),
|
|
33
|
+
/** Opaque token that can be passed on a subsequent request to resume this conversation from the current state. `null` when the provider does not support conversation resumption. */
|
|
34
|
+
resume_token: z.string().optional().describe("Opaque token that can be passed on a subsequent request to resume this conversation from the current state. `null` when the provider does not support conversation resumption."),
|
|
35
|
+
/** The speaker role for this message. One of `"system"`, `"user"`, `"assistant"`, or `"tool"`. */
|
|
36
|
+
role: z.string().describe("The speaker role for this message. One of `\"system\"`, `\"user\"`, `\"assistant\"`, or `\"tool\"`."),
|
|
37
|
+
/** Parsed structured data returned by the model when a JSON schema or structured-output mode was requested. Shape varies by the schema supplied at call time. `null` when structured output was not requested. */
|
|
38
|
+
structured_output: z.unknown().optional().describe("Parsed structured data returned by the model when a JSON schema or structured-output mode was requested. Shape varies by the schema supplied at call time. `null` when structured output was not requested."),
|
|
39
|
+
/** Tool calls requested by the model in an `assistant` message. Present only on assistant messages that invoke one or more tools. `null` on all other message roles. */
|
|
40
|
+
tool_calls: z.array(aIToolCallSchema).optional().describe("Tool calls requested by the model in an `assistant` message. Present only on assistant messages that invoke one or more tools. `null` on all other message roles."),
|
|
41
|
+
/** Tool execution results provided in a `tool` message. Each entry corresponds to a prior tool call by its `id`. `null` on all other message roles. */
|
|
42
|
+
tool_results: z.array(aIToolResultSchema).optional().describe("Tool execution results provided in a `tool` message. Each entry corresponds to a prior tool call by its `id`. `null` on all other message roles."),
|
|
43
|
+
}).describe("A single message in an AI conversation, following the OpenAI-compatible chat format. Used in both request inputs and completion responses.");
|
|
44
|
+
/** Runtime validator for {@link AICompletionResult}. */
|
|
30
45
|
export const aICompletionResultSchema = z.object({
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
46
|
+
/** The reason the model stopped generating. Common values include `"stop"` (natural end), `"length"` (token limit reached), and `"tool_calls"` (the model invoked a tool). */
|
|
47
|
+
finish_reason: z.string().describe("The reason the model stopped generating. Common values include `\"stop\"` (natural end), `\"length\"` (token limit reached), and `\"tool_calls\"` (the model invoked a tool)."),
|
|
48
|
+
/** The final assistant message produced by the completion. */
|
|
49
|
+
message: aIMessageSchema.describe("The final assistant message produced by the completion."),
|
|
50
|
+
/** The complete message history for the conversation, including all user, assistant, and tool messages in order. */
|
|
51
|
+
messages: z.array(aIMessageSchema).describe("The complete message history for the conversation, including all user, assistant, and tool messages in order."),
|
|
52
|
+
/** Token consumption breakdown keyed by model ID. Each value is a map with `"input_tokens"` and `"output_tokens"` counts. `null` when usage data is unavailable. */
|
|
53
|
+
token_usage: z.record(z.unknown()).optional().describe("Token consumption breakdown keyed by model ID. Each value is a map with `\"input_tokens\"` and `\"output_tokens\"` counts. `null` when usage data is unavailable."),
|
|
54
|
+
}).describe("The result of an AI chat completion request. Returned by chat completion endpoints after the model finishes generating.");
|
|
55
|
+
/** Runtime validator for {@link AIImageResult}. */
|
|
37
56
|
export const aIImageResultSchema = z.object({
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
57
|
+
/** Aspect ratio of the generated image, e.g. `"16:9"` or `"1:1"`. `null` when not reported by the provider. */
|
|
58
|
+
aspect_ratio: z.string().optional().describe("Aspect ratio of the generated image, e.g. `\"16:9\"` or `\"1:1\"`. `null` when not reported by the provider."),
|
|
59
|
+
/** Height of the generated image in pixels. `null` when the provider does not report dimensions. */
|
|
60
|
+
height: z.number().int().optional().describe("Height of the generated image in pixels. `null` when the provider does not report dimensions."),
|
|
61
|
+
/** The generated image encoded as a base64 string. Present when the provider returns inline image data. `null` when `image_url` is set instead. */
|
|
62
|
+
image_data: z.string().optional().describe("The generated image encoded as a base64 string. Present when the provider returns inline image data. `null` when `image_url` is set instead."),
|
|
63
|
+
/** Resolution tier label for the image, e.g. `"1K"` or `"2K"`. `null` when the provider does not include a tier label. */
|
|
64
|
+
image_size: z.string().optional().describe("Resolution tier label for the image, e.g. `\"1K\"` or `\"2K\"`. `null` when the provider does not include a tier label."),
|
|
65
|
+
/** MIME type of the generated image, e.g. `"image/png"` or `"image/jpeg"`. `null` when the provider does not report a content type. */
|
|
66
|
+
image_type: z.string().optional().describe("MIME type of the generated image, e.g. `\"image/png\"` or `\"image/jpeg\"`. `null` when the provider does not report a content type."),
|
|
67
|
+
/** Temporary URL pointing to the generated image hosted by the provider. Present when the provider returns a URL rather than inline data. `null` when `image_data` is set instead. */
|
|
68
|
+
image_url: z.string().optional().describe("Temporary URL pointing to the generated image hosted by the provider. Present when the provider returns a URL rather than inline data. `null` when `image_data` is set instead."),
|
|
69
|
+
/** Identifier of the model that produced the image, e.g. `"dall-e-3"` or `"imagen-3"`. */
|
|
70
|
+
model: z.string().describe("Identifier of the model that produced the image, e.g. `\"dall-e-3\"` or `\"imagen-3\"`."),
|
|
71
|
+
/** The prompt as rewritten by the provider before generation. Some providers (e.g. DALL-E 3) automatically expand or safety-check the original prompt. `null` when the provider does not revise prompts. */
|
|
72
|
+
revised_prompt: z.string().optional().describe("The prompt as rewritten by the provider before generation. Some providers (e.g. DALL-E 3) automatically expand or safety-check the original prompt. `null` when the provider does not revise prompts."),
|
|
73
|
+
/** Canonical size string as returned by the provider, e.g. `"1024x1024"`. `null` when not reported. */
|
|
74
|
+
size: z.string().optional().describe("Canonical size string as returned by the provider, e.g. `\"1024x1024\"`. `null` when not reported."),
|
|
75
|
+
/** Provider-reported token and compute usage for the request. Structure varies by provider. `null` when usage data is unavailable. */
|
|
76
|
+
usage: z.record(z.unknown()).optional().describe("Provider-reported token and compute usage for the request. Structure varies by provider. `null` when usage data is unavailable."),
|
|
77
|
+
/** Width of the generated image in pixels. `null` when the provider does not report dimensions. */
|
|
78
|
+
width: z.number().int().optional().describe("Width of the generated image in pixels. `null` when the provider does not report dimensions."),
|
|
79
|
+
}).describe("The result returned by an AI image generation or editing operation. Contains the generated image (as inline data or a URL) along with dimension, size, and usage metadata.");
|
|
50
80
|
//# sourceMappingURL=ai.js.map
|
package/dist/types/ai.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai.js","sourceRoot":"","sources":["../../src/types/ai.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,wEAAwE;AACxE,6BAA6B;AAE7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"ai.js","sourceRoot":"","sources":["../../src/types/ai.ts"],"names":[],"mappings":"AAAA,yDAA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