@archastro/sdk 0.18.0 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/dist/auth.d.ts +42 -18
  2. package/dist/auth.d.ts.map +1 -1
  3. package/dist/auth.js +53 -19
  4. package/dist/auth.js.map +1 -1
  5. package/dist/channels/api_chat_channel.d.ts +11 -1
  6. package/dist/channels/api_chat_channel.d.ts.map +1 -1
  7. package/dist/channels/api_chat_channel.js +14 -2
  8. package/dist/channels/api_chat_channel.js.map +1 -1
  9. package/dist/client.d.ts +1 -1
  10. package/dist/client.d.ts.map +1 -1
  11. package/dist/client.js +3 -3
  12. package/dist/client.js.map +1 -1
  13. package/dist/effective-access.d.ts +1 -1
  14. package/dist/effective-access.d.ts.map +1 -1
  15. package/dist/effective-access.js +2 -5
  16. package/dist/effective-access.js.map +1 -1
  17. package/dist/types/ai.d.ts +310 -0
  18. package/dist/types/ai.d.ts.map +1 -1
  19. package/dist/types/ai.js +51 -1
  20. package/dist/types/ai.js.map +1 -1
  21. package/dist/types/artifacts.d.ts +14 -2
  22. package/dist/types/artifacts.d.ts.map +1 -1
  23. package/dist/types/artifacts.js +5 -1
  24. package/dist/types/artifacts.js.map +1 -1
  25. package/dist/types/chat.d.ts +271 -168
  26. package/dist/types/chat.d.ts.map +1 -1
  27. package/dist/types/chat.js +10 -3
  28. package/dist/types/chat.js.map +1 -1
  29. package/dist/types/common.d.ts +361 -128
  30. package/dist/types/common.d.ts.map +1 -1
  31. package/dist/types/common.js +39 -20
  32. package/dist/types/common.js.map +1 -1
  33. package/dist/types/config.d.ts +2 -2
  34. package/dist/types/events.d.ts +32 -32
  35. package/dist/types/extractions.d.ts +12 -12
  36. package/dist/types/tasks.d.ts +34 -8
  37. package/dist/types/tasks.d.ts.map +1 -1
  38. package/dist/types/tasks.js +12 -3
  39. package/dist/types/tasks.js.map +1 -1
  40. package/dist/types/teams.d.ts +30 -10
  41. package/dist/types/teams.d.ts.map +1 -1
  42. package/dist/types/teams.js +8 -1
  43. package/dist/types/teams.js.map +1 -1
  44. package/dist/types/threads.d.ts +32 -20
  45. package/dist/types/threads.d.ts.map +1 -1
  46. package/dist/types/threads.js +5 -5
  47. package/dist/types/threads.js.map +1 -1
  48. package/dist/v1/resources/agents.d.ts +9 -3
  49. package/dist/v1/resources/agents.d.ts.map +1 -1
  50. package/dist/v1/resources/agents.js +7 -2
  51. package/dist/v1/resources/agents.js.map +1 -1
  52. package/dist/v1/resources/ai.d.ts +92 -3
  53. package/dist/v1/resources/ai.d.ts.map +1 -1
  54. package/dist/v1/resources/ai.js +54 -1
  55. package/dist/v1/resources/ai.js.map +1 -1
  56. package/dist/v1/resources/artifacts.d.ts +53 -0
  57. package/dist/v1/resources/artifacts.d.ts.map +1 -1
  58. package/dist/v1/resources/artifacts.js +35 -1
  59. package/dist/v1/resources/artifacts.js.map +1 -1
  60. package/dist/v1/resources/custom_objects.d.ts +5 -0
  61. package/dist/v1/resources/custom_objects.d.ts.map +1 -1
  62. package/dist/v1/resources/custom_objects.js +5 -1
  63. package/dist/v1/resources/custom_objects.js.map +1 -1
  64. package/dist/v1/resources/files.d.ts +7 -0
  65. package/dist/v1/resources/files.d.ts.map +1 -1
  66. package/dist/v1/resources/files.js +8 -1
  67. package/dist/v1/resources/files.js.map +1 -1
  68. package/dist/v1/resources/index.d.ts +1 -1
  69. package/dist/v1/resources/index.d.ts.map +1 -1
  70. package/dist/v1/resources/index.js +2 -2
  71. package/dist/v1/resources/index.js.map +1 -1
  72. package/dist/v1/resources/knowledge_sources.d.ts +41 -0
  73. package/dist/v1/resources/knowledge_sources.d.ts.map +1 -1
  74. package/dist/v1/resources/knowledge_sources.js +31 -1
  75. package/dist/v1/resources/knowledge_sources.js.map +1 -1
  76. package/dist/v1/resources/orgs.d.ts +537 -0
  77. package/dist/v1/resources/orgs.d.ts.map +1 -1
  78. package/dist/v1/resources/orgs.js +100 -1
  79. package/dist/v1/resources/orgs.js.map +1 -1
  80. package/dist/v1/resources/sandboxes.d.ts +3 -2
  81. package/dist/v1/resources/sandboxes.d.ts.map +1 -1
  82. package/dist/v1/resources/sandboxes.js +4 -3
  83. package/dist/v1/resources/sandboxes.js.map +1 -1
  84. package/dist/v1/resources/scripts.d.ts +6 -2
  85. package/dist/v1/resources/scripts.d.ts.map +1 -1
  86. package/dist/v1/resources/scripts.js +5 -3
  87. package/dist/v1/resources/scripts.js.map +1 -1
  88. package/dist/v1/resources/tasks.d.ts +58 -3
  89. package/dist/v1/resources/tasks.d.ts.map +1 -1
  90. package/dist/v1/resources/tasks.js +61 -2
  91. package/dist/v1/resources/tasks.js.map +1 -1
  92. package/dist/v1/resources/teams.d.ts +56 -14
  93. package/dist/v1/resources/teams.d.ts.map +1 -1
  94. package/dist/v1/resources/teams.js +62 -13
  95. package/dist/v1/resources/teams.js.map +1 -1
  96. package/dist/v1/resources/threads.d.ts +19 -6
  97. package/dist/v1/resources/threads.d.ts.map +1 -1
  98. package/dist/v1/resources/threads.js +21 -8
  99. package/dist/v1/resources/threads.js.map +1 -1
  100. package/dist/v1/resources/users.d.ts +15 -4
  101. package/dist/v1/resources/users.d.ts.map +1 -1
  102. package/dist/v1/resources/users.js +13 -3
  103. package/dist/v1/resources/users.js.map +1 -1
  104. package/dist/v1.d.ts +1 -1
  105. package/dist/v1.d.ts.map +1 -1
  106. package/dist/v1.js +3 -3
  107. package/dist/v1.js.map +1 -1
  108. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) 2026 ArchAstro Inc. Licensed under the MIT License.
2
2
  // This file is auto-generated by @archastro/sdk-generator. Do not edit.
3
- // Content hash: a02baea2c1d9
3
+ // Content hash: afbd6dd19860
4
4
  import { z } from "zod";
5
5
  import { automationParticipantSlotSchema, automationPrefillsSchema } from "./automations.js";
6
6
  import { configSchema } from "./config.js";
@@ -163,6 +163,15 @@ export const workerStatusSchema = z.object({
163
163
  /** Current execution state of the worker. One of `"queued"`, `"executing"`, `"retrying"`, `"completed"`, `"discarded"`, or `"cancelled"`. */
164
164
  status: z.string().describe("Current execution state of the worker. One of `\"queued\"`, `\"executing\"`, `\"retrying\"`, `\"completed\"`, `\"discarded\"`, or `\"cancelled\"`."),
165
165
  }).describe("Execution state of the background worker processing a routine run. Reflects the current job status and retry progress.");
166
+ /** Runtime validator for {@link Setup}. */
167
+ export const setupSchema = z.object({
168
+ /** Recommended next step for MCP setup. */
169
+ next_action: z.string().describe("Recommended next step for MCP setup."),
170
+ /** MCP protocol health is not checked by this assessment. */
171
+ protocol_status: z.literal("not_checked").describe("MCP protocol health is not checked by this assessment."),
172
+ /** Reason for the current MCP setup state. */
173
+ reason: z.string().describe("Reason for the current MCP setup state."),
174
+ }).describe("Current MCP setup assessment, not a historical downgrade reason or upstream protocol probe.");
166
175
  /** Runtime validator for {@link MediaVariant}. */
167
176
  export const mediaVariantSchema = z.object({
168
177
  /** MIME type of this variant's file (e.g., `"image/jpeg"`, `"video/mp4"`). `null` if the file is not loaded. */
@@ -208,16 +217,18 @@ export const attachmentSchema = z.object({
208
217
  image_url: z.string().nullable().optional().describe("URL of the preview image extracted from the scraped page. Present on `scraped_link` type only. `null` otherwise."),
209
218
  /** Width in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise. */
210
219
  image_width: z.number().int().nullable().optional().describe("Width in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise."),
220
+ /** For `structured_data` type, what the data is about as set by the sender (for example `"pr:14963"`), copied from the record so it can be read without `object`. Not unique. `null` when unset and on other types. */
221
+ key: z.string().nullable().optional().describe("For `structured_data` type, what the data is about as set by the sender (for example `\"pr:14963\"`), copied from the record so it can be read without `object`. Not unique. `null` when unset and on other types."),
211
222
  /** The media category, e.g. `"video"` or `"audio"`. Present on `media` type only; omitted otherwise. */
212
223
  media_type: z.string().optional().describe("The media category, e.g. `\"video\"` or `\"audio\"`. Present on `media` type only; omitted otherwise."),
213
224
  /** Display name of the media item. Present on `media` type only. `null` otherwise. */
214
225
  name: z.string().nullable().optional().describe("Display name of the media item. Present on `media` type only. `null` otherwise."),
215
- /** The full embedded object payload. For `task` type, contains the task record. For `action` type, contains the action definition. For `chart` type, contains the chart with its inline `spec`. Omitted on other types. */
216
- object: z.record(z.custom((value) => value !== undefined)).optional().describe("The full embedded object payload. For `task` type, contains the task record. For `action` type, contains the action definition. For `chart` type, contains the chart with its inline `spec`. Omitted on other types."),
226
+ /** The full embedded object payload. For `task` type, contains the task record. For `action` type, contains the action definition. For `chart` type, contains the chart with its inline `spec`. For `structured_data` type, contains the inline `data` and the `schema_url` or `schema_config` naming its JSON Schema. Omitted on other types. */
227
+ object: z.record(z.custom((value) => value !== undefined)).optional().describe("The full embedded object payload. For `task` type, contains the task record. For `action` type, contains the action definition. For `chart` type, contains the chart with its inline `spec`. For `structured_data` type, contains the inline `data` and the `schema_url` or `schema_config` naming its JSON Schema. Omitted on other types."),
217
228
  /** Display title. The page title for `scraped_link`, the artifact name for `artifact`, and the task title for `task` types. `null` on other types. */
218
229
  title: z.string().nullable().optional().describe("Display title. The page title for `scraped_link`, the artifact name for `artifact`, and the task title for `task` types. `null` on other types."),
219
- /** The attachment type. One of `"file"`, `"scraped_link"`, `"artifact"`, `"task"`, `"media"`, `"action"`, or `"chart"`. Determines which additional fields are present. */
220
- type: z.string().describe("The attachment type. One of `\"file\"`, `\"scraped_link\"`, `\"artifact\"`, `\"task\"`, `\"media\"`, `\"action\"`, or `\"chart\"`. Determines which additional fields are present."),
230
+ /** The attachment type. One of `"file"`, `"scraped_link"`, `"artifact"`, `"task"`, `"media"`, `"action"`, `"chart"`, or `"structured_data"`. Determines which additional fields are present. */
231
+ type: z.string().describe("The attachment type. One of `\"file\"`, `\"scraped_link\"`, `\"artifact\"`, `\"task\"`, `\"media\"`, `\"action\"`, `\"chart\"`, or `\"structured_data\"`. Determines which additional fields are present."),
221
232
  /** URL to access the resource. A signed download URL for `file` and `artifact` types; the original URL for `scraped_link`; a media playback URL for `media`. `null` on `task` and `action` types. */
222
233
  url: z.string().nullable().optional().describe("URL to access the resource. A signed download URL for `file` and `artifact` types; the original URL for `scraped_link`; a media playback URL for `media`. `null` on `task` and `action` types."),
223
234
  /** Array of available encoding variants for the media item (e.g. different resolutions). Present on `media` type only; omitted otherwise. */
@@ -229,6 +240,8 @@ export const attachmentSchema = z.object({
229
240
  }).describe("A rich attachment associated with a message, such as a file, scraped link, artifact, task, media item, or inline action.");
230
241
  /** Runtime validator for {@link AuthTokens}. */
231
242
  export const authTokensSchema = z.object({
243
+ /** `true` when this request created the account (the same moment the platform records the signup), `false` for a returning sign-in or a token refresh. Registration always returns `true`; password login and refresh always return `false`. */
244
+ account_created: z.boolean().describe("`true` when this request created the account (the same moment the platform records the signup), `false` for a returning sign-in or a token refresh. Registration always returns `true`; password login and refresh always return `false`."),
232
245
  /** Number of seconds until `token` expires. After this period, use `refresh_token` to obtain a new access token. */
233
246
  expires_in: z.number().int().describe("Number of seconds until `token` expires. After this period, use `refresh_token` to obtain a new access token."),
234
247
  /** 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. */
@@ -394,13 +407,6 @@ export const okSchema = z.object({
394
407
  content: z.string(),
395
408
  status: z.literal("ok"),
396
409
  }).describe("A successful local-tool outcome.");
397
- /** Runtime validator for {@link Error}. */
398
- export const errorSchema = z.object({
399
- call_id: z.string(),
400
- code: z.string(),
401
- message: z.string(),
402
- status: z.literal("error"),
403
- }).describe("A failed local-tool outcome.");
404
410
  /** Runtime validator for {@link Command}. */
405
411
  export const commandSchema = z.object({
406
412
  /** Human-readable description of what the command does, shown alongside the name in the workflow builder. */
@@ -518,12 +524,23 @@ export const createdPrivateServiceEnrollmentSchema = z.object({
518
524
  id: z.string(),
519
525
  private_service: z.string(),
520
526
  }).describe("Creation-only private service enrollment response. The raw token is shown once and is omitted from every read schema.");
527
+ /** Runtime validator for {@link EffectiveAccessBillingTrial}. */
528
+ export const effectiveAccessBillingTrialSchema = z.object({
529
+ /** Effective trial end: the earlier of its accepted boundary and enrollment end. */
530
+ ends_at: z.string().describe("Effective trial end: the earlier of its accepted boundary and enrollment end."),
531
+ /** Whether a provider webhook has confirmed a stored payment method. */
532
+ payment_method_stored: z.boolean().describe("Whether a provider webhook has confirmed a stored payment method."),
533
+ /** Catalog plan whose trial is active. */
534
+ plan: z.string().describe("Catalog plan whose trial is active."),
535
+ }).describe("Privacy-safe current trial state for one Viewer-derived billing principal.");
521
536
  /** Runtime validator for {@link EffectiveAccessBillingPrincipal}. */
522
537
  export const effectiveAccessBillingPrincipalSchema = z.object({
523
538
  /** Whether the authenticated user may administer this principal's billing account. */
524
539
  administrator: z.boolean().describe("Whether the authenticated user may administer this principal's billing account."),
525
540
  principal_type: z.enum(["user", "org"]),
526
- }).describe("Billing administration authority for one Viewer-derived principal kind.");
541
+ /** Currently active trials for this Viewer-derived principal. Contains no billing-account or provider identifiers. */
542
+ trials: z.array(effectiveAccessBillingTrialSchema).describe("Currently active trials for this Viewer-derived principal. Contains no billing-account or provider identifiers."),
543
+ }).describe("Billing authority and relevant active trials for one Viewer-derived principal kind.");
527
544
  /** Runtime validator for {@link EffectiveAccessEntitlement}. */
528
545
  export const effectiveAccessEntitlementSchema = z.object({
529
546
  /** Whether any eligible source grants the key. */
@@ -539,11 +556,11 @@ export const effectiveAccessEntitlementSchema = z.object({
539
556
  }).describe("A billing-derived effective entitlement for the authenticated user.");
540
557
  /** Runtime validator for {@link EffectiveAccess}. */
541
558
  export const effectiveAccessSchema = z.object({
542
- /** Administration authority for the personal and current-organization principals. */
543
- billing: z.array(effectiveAccessBillingPrincipalSchema).describe("Administration authority for the personal and current-organization principals."),
559
+ /** Administration authority and requested-entitlement-relevant trials for the personal and current-organization principals. */
560
+ billing: z.array(effectiveAccessBillingPrincipalSchema).describe("Administration authority and requested-entitlement-relevant trials for the personal and current-organization principals."),
544
561
  /** Requested catalog entitlements in request order. */
545
562
  entitlements: z.array(effectiveAccessEntitlementSchema).describe("Requested catalog entitlements in request order."),
546
- }).describe("Live effective access and billing authority for the authenticated user.");
563
+ }).describe("Live effective access, billing authority, and relevant trials for the authenticated user.");
547
564
  /** Runtime validator for {@link CurrentUser}. */
548
565
  export const currentUserSchema = z.object({
549
566
  /** Short handle or alias of the user. */
@@ -1394,8 +1411,8 @@ export const solutionSummarySchema = z.object({
1394
1411
  events: z.record(z.custom((value) => value !== undefined)).optional().describe("Custom analytics events declared in the Solution body's `events:` manifest — a map of event key (snake_case) to its definition (`label`, optional `description`, optional typed `fields`). Dashboards use the `label` as the event's display name. Present as an empty object when the body declares none."),
1395
1412
  /** Solution config ID (`cfg_...`). */
1396
1413
  id: z.string().describe("Solution config ID (`cfg_...`)."),
1397
- /** Absolute URL of the Solution's cover image — the bundled asset the body's `image:` field names. A stable, non-expiring capability URL (like `org_logo.url`), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. `null` when the Solution has no cover image, and always `null` for org-scoped rows — the permanent URL is minted for system-scope (catalog) Solutions only. */
1398
- image_url: z.string().nullable().optional().describe("Absolute URL of the Solution's cover image — the bundled asset the body's `image:` field names. A stable, non-expiring capability URL (like `org_logo.url`), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. `null` when the Solution has no cover image, and always `null` for org-scoped rows — the permanent URL is minted for system-scope (catalog) Solutions only."),
1414
+ /** Absolute URL of the Solution's cover image — the bundled asset the body's `image:` field names. A stable, non-expiring capability URL (like `org_logo.url`), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. `null` when the Solution has no cover image. Org-only rows remain `null`; when a list entry merges an org copy with its system counterpart, it may reuse the system row's public cover URL. Permanent URLs are never minted for private org assets. */
1415
+ image_url: z.string().nullable().optional().describe("Absolute URL of the Solution's cover image — the bundled asset the body's `image:` field names. A stable, non-expiring capability URL (like `org_logo.url`), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. `null` when the Solution has no cover image. Org-only rows remain `null`; when a list entry merges an org copy with its system counterpart, it may reuse the system row's public cover URL. Permanent URLs are never minted for private org assets."),
1399
1416
  /** Config IDs (`cfg_...`) of this Solution's installations in the viewer's organization. The array is empty when the Solution is visible only from the system catalog. */
1400
1417
  installed_config_ids: z.array(z.string()).describe("Config IDs (`cfg_...`) of this Solution's installations in the viewer's organization. The array is empty when the Solution is visible only from the system catalog."),
1401
1418
  /** Resource type. Always `"Solution"`. */
@@ -1907,8 +1924,10 @@ export const agentToolSchema = z.object({
1907
1924
  parameters: z.record(z.custom((value) => value !== undefined)).optional().describe("JSON Schema object describing the tool's input parameters as presented to the LLM."),
1908
1925
  /** ID of the config record (`cfg_...`) storing the tool's parameter schema. `null` when parameters are defined inline. */
1909
1926
  parameters_config: z.string().optional().describe("ID of the config record (`cfg_...`) storing the tool's parameter schema. `null` when parameters are defined inline."),
1910
- /** Current status of the tool. One of `"active"` or `"disabled"`. */
1911
- status: z.string().optional().describe("Current status of the tool. One of `\"active\"` or `\"disabled\"`."),
1927
+ /** Current MCP setup assessment, not a historical downgrade reason or upstream protocol probe. */
1928
+ setup: setupSchema.nullable().optional().describe("Current MCP setup assessment, not a historical downgrade reason or upstream protocol probe."),
1929
+ /** Current status of the tool. One of `"active"` or `"draft"`. */
1930
+ status: z.string().optional().describe("Current status of the tool. One of `\"active\"` or `\"draft\"`."),
1912
1931
  /** When the tool was last modified (ISO 8601). */
1913
1932
  updated_at: z.string().optional().describe("When the tool was last modified (ISO 8601)."),
1914
1933
  }).describe("A tool attached to an agent, defining a capability the agent can invoke during a conversation or task run.");