@idapt/browser-app-sdk 0.2.0 → 0.4.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.
@@ -160,19 +160,6 @@ declare const sharedWithMeItemResponseSchema: z.ZodObject<{
160
160
  }, z.core.$strip>;
161
161
  type SharedWithMeItemResponse = z.infer<typeof sharedWithMeItemResponseSchema>;
162
162
 
163
- declare const blobObjectResponseSchema: z.ZodObject<{
164
- namespace: z.ZodString;
165
- key: z.ZodString;
166
- content_type: z.ZodString;
167
- size: z.ZodNumber;
168
- etag: z.ZodOptional<z.ZodNullable<z.ZodString>>;
169
- sha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
170
- public: z.ZodBoolean;
171
- resource_id: z.ZodString;
172
- updated_at: z.ZodString;
173
- }, z.core.$strip>;
174
- type BlobObjectResponse = z.infer<typeof blobObjectResponseSchema>;
175
-
176
163
  declare const computerResponseSchema: z.ZodObject<{
177
164
  id: z.ZodString;
178
165
  name: z.ZodString;
@@ -189,7 +176,8 @@ declare const computerResponseSchema: z.ZodObject<{
189
176
  full: "full";
190
177
  minimal: "minimal";
191
178
  }>>>;
192
- workspace_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
179
+ owner: z.ZodString;
180
+ billing_account: z.ZodNullable<z.ZodString>;
193
181
  state: z.ZodNullable<z.ZodEnum<{
194
182
  unprovisioned: "unprovisioned";
195
183
  provisioning: "provisioning";
@@ -202,9 +190,17 @@ declare const computerResponseSchema: z.ZodObject<{
202
190
  terminating: "terminating";
203
191
  terminated: "terminated";
204
192
  }>>;
193
+ online: z.ZodBoolean;
194
+ last_heartbeat_at: z.ZodNullable<z.ZodNumber>;
195
+ can_exec: z.ZodNullable<z.ZodBoolean>;
196
+ can_run_as_root: z.ZodBoolean;
205
197
  archived_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
206
198
  created_at: z.ZodString;
207
199
  updated_at: z.ZodString;
200
+ exposures: z.ZodArray<z.ZodObject<{
201
+ workspace: z.ZodString;
202
+ capabilities: z.ZodArray<z.ZodString>;
203
+ }, z.core.$strip>>;
208
204
  }, z.core.$strip>;
209
205
  type ComputerResponse = z.infer<typeof computerResponseSchema>;
210
206
  declare const computerUserResponseSchema: z.ZodObject<{
@@ -261,10 +257,10 @@ declare const agentResponseSchema: z.ZodObject<{
261
257
  compaction_trigger_value: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
262
258
  source_template_resource_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
263
259
  memory_folder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
260
+ memory_resource_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
264
261
  default_model_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
265
262
  default_reasoning_effort: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
266
263
  default_auto_cost_level: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
267
- default_cost_budget_limit_usd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
268
264
  is_trashed: z.ZodOptional<z.ZodBoolean>;
269
265
  trashed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
270
266
  archived_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -326,7 +322,7 @@ declare const workspaceMemberResponseSchema: z.ZodObject<{
326
322
  created_at: z.ZodString;
327
323
  }, z.core.$strip>;
328
324
  type WorkspaceMemberResponse = z.infer<typeof workspaceMemberResponseSchema>;
329
- declare const triggerResponseSchema: z.ZodObject<{
325
+ declare const automationResponseSchema: z.ZodObject<{
330
326
  id: z.ZodString;
331
327
  name: z.ZodString;
332
328
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -342,7 +338,6 @@ declare const triggerResponseSchema: z.ZodObject<{
342
338
  model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
343
339
  reasoning_level: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
344
340
  auto_cost_level: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
345
- cost_budget_limit_usd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
346
341
  web_search_enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
347
342
  memory_enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
348
343
  subagent_enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
@@ -351,20 +346,15 @@ declare const triggerResponseSchema: z.ZodObject<{
351
346
  compaction_preset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
352
347
  pasted_texts: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodUnknown>>>;
353
348
  active_skills: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
354
- file_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
355
- runtime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
356
- timeout_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
357
- env: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
358
- working_dir_folder_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
359
349
  next_run_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
360
350
  last_fired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
361
351
  archived_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
362
352
  created_at: z.ZodString;
363
353
  updated_at: z.ZodString;
364
354
  }, z.core.$strip>;
365
- type TriggerResponse = z.infer<typeof triggerResponseSchema>;
366
- /** Trigger + its one-time plaintext webhook secret (create / rotate-secret). */
367
- declare const triggerWithSecretResponseSchema: z.ZodObject<{
355
+ type AutomationResponse = z.infer<typeof automationResponseSchema>;
356
+ /** Automation + its one-time plaintext webhook secret (create / rotate-secret). */
357
+ declare const automationWithSecretResponseSchema: z.ZodObject<{
368
358
  id: z.ZodString;
369
359
  name: z.ZodString;
370
360
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -380,7 +370,6 @@ declare const triggerWithSecretResponseSchema: z.ZodObject<{
380
370
  model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
381
371
  reasoning_level: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
382
372
  auto_cost_level: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
383
- cost_budget_limit_usd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
384
373
  web_search_enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
385
374
  memory_enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
386
375
  subagent_enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
@@ -389,11 +378,6 @@ declare const triggerWithSecretResponseSchema: z.ZodObject<{
389
378
  compaction_preset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
390
379
  pasted_texts: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodUnknown>>>;
391
380
  active_skills: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
392
- file_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
393
- runtime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
394
- timeout_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
395
- env: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
396
- working_dir_folder_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
397
381
  next_run_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
398
382
  last_fired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
399
383
  archived_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -401,18 +385,43 @@ declare const triggerWithSecretResponseSchema: z.ZodObject<{
401
385
  updated_at: z.ZodString;
402
386
  secret: z.ZodString;
403
387
  }, z.core.$strip>;
404
- type TriggerWithSecretResponse = z.infer<typeof triggerWithSecretResponseSchema>;
405
- declare const triggerRunResponseSchema: z.ZodObject<{
388
+ type AutomationWithSecretResponse = z.infer<typeof automationWithSecretResponseSchema>;
389
+ declare const automationRunResponseSchema: z.ZodObject<{
406
390
  id: z.ZodString;
407
- trigger_id: z.ZodString;
408
- success: z.ZodBoolean;
409
- error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
391
+ automation_id: z.ZodNullable<z.ZodString>;
392
+ automation_name: z.ZodString;
393
+ origin: z.ZodEnum<{
394
+ cron: "cron";
395
+ webhook: "webhook";
396
+ test: "test";
397
+ manual: "manual";
398
+ }>;
399
+ status: z.ZodEnum<{
400
+ running: "running";
401
+ skipped: "skipped";
402
+ queued: "queued";
403
+ dispatching: "dispatching";
404
+ cancelling: "cancelling";
405
+ retry_wait: "retry_wait";
406
+ blocked: "blocked";
407
+ completed: "completed";
408
+ failed: "failed";
409
+ cancelled: "cancelled";
410
+ dead_lettered: "dead_lettered";
411
+ }>;
412
+ scheduled_for: z.ZodOptional<z.ZodNullable<z.ZodString>>;
413
+ attempt_count: z.ZodNumber;
414
+ missed_slot_count: z.ZodNumber;
415
+ available_at: z.ZodString;
416
+ started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
417
+ completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
418
+ created_at: z.ZodString;
419
+ error_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
420
+ error_message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
410
421
  chat_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
411
- execution_run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
412
- fired_at: z.ZodString;
413
422
  }, z.core.$strip>;
414
- type TriggerRunResponse = z.infer<typeof triggerRunResponseSchema>;
415
- declare const triggerCostStatsResponseSchema: z.ZodObject<{
423
+ type AutomationRunResponse = z.infer<typeof automationRunResponseSchema>;
424
+ declare const automationCostStatsResponseSchema: z.ZodObject<{
416
425
  runs_with_cost: z.ZodNumber;
417
426
  total_cost_usd: z.ZodNumber;
418
427
  today_cost_usd: z.ZodNumber;
@@ -421,7 +430,7 @@ declare const triggerCostStatsResponseSchema: z.ZodObject<{
421
430
  last7d_cost_usd: z.ZodNumber;
422
431
  first_fired_at: z.ZodNullable<z.ZodString>;
423
432
  }, z.core.$strip>;
424
- type TriggerCostStatsResponse = z.infer<typeof triggerCostStatsResponseSchema>;
433
+ type AutomationCostStatsResponse = z.infer<typeof automationCostStatsResponseSchema>;
425
434
  declare const notificationResponseSchema: z.ZodObject<{
426
435
  id: z.ZodString;
427
436
  type: z.ZodString;
@@ -483,16 +492,6 @@ declare const shareResponseSchema: z.ZodObject<{
483
492
  }, z.core.$strip>;
484
493
  type ShareResponse = z.infer<typeof shareResponseSchema>;
485
494
 
486
- declare const datastoreEntryResponseSchema: z.ZodObject<{
487
- namespace: z.ZodString;
488
- key: z.ZodString;
489
- value: z.ZodNullable<z.ZodUnknown>;
490
- size: z.ZodNumber;
491
- expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
492
- updated_at: z.ZodString;
493
- }, z.core.$strip>;
494
- type DatastoreEntryResponse = z.infer<typeof datastoreEntryResponseSchema>;
495
-
496
495
  /**
497
496
  * A file resource (`transformFile` → snake_case). `id` is the resourceId.
498
497
  * Nullable-and-optional (`.nullish()`) where the SDK marks the field optional,
@@ -524,33 +523,6 @@ declare const fileUploadResponseSchema: z.ZodObject<{
524
523
  }, z.core.$strip>;
525
524
  type FileUploadResponse = z.infer<typeof fileUploadResponseSchema>;
526
525
 
527
- /** `execution_run` record — `transformExecutionRun` output, snake_case. */
528
- declare const functionRunResponseSchema: z.ZodObject<{
529
- id: z.ZodString;
530
- backend: z.ZodString;
531
- mode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
532
- status: z.ZodString;
533
- workspace_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
534
- file_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
535
- file_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
536
- runtime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
537
- exit_code: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
538
- stdout: z.ZodOptional<z.ZodNullable<z.ZodString>>;
539
- stderr: z.ZodOptional<z.ZodNullable<z.ZodString>>;
540
- duration_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
541
- timed_out: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
542
- timeout_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
543
- trigger_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
544
- error_message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
545
- created_at: z.ZodString;
546
- started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
547
- completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
548
- output_files: z.ZodOptional<z.ZodArray<z.ZodObject<{
549
- file_id: z.ZodString;
550
- path: z.ZodString;
551
- }, z.core.$strip>>>;
552
- }, z.core.$strip>;
553
- type FunctionRunResponse = z.infer<typeof functionRunResponseSchema>;
554
526
  declare const functionResponseSchema: z.ZodObject<{
555
527
  id: z.ZodString;
556
528
  name: z.ZodString;
@@ -620,6 +592,7 @@ declare const apiKeyResponseSchema: z.ZodObject<{
620
592
  name: z.ZodString;
621
593
  prefix: z.ZodOptional<z.ZodNullable<z.ZodString>>;
622
594
  key_preview: z.ZodOptional<z.ZodNullable<z.ZodString>>;
595
+ api_version: z.ZodString;
623
596
  permissions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
624
597
  resource: z.ZodString;
625
598
  scope: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -667,35 +640,6 @@ declare const secretWithValueResponseSchema: z.ZodObject<{
667
640
  }, z.core.$strip>;
668
641
  type SecretWithValueResponse = z.infer<typeof secretWithValueResponseSchema>;
669
642
 
670
- declare const tableCollectionResponseSchema: z.ZodObject<{
671
- id: z.ZodString;
672
- name: z.ZodString;
673
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
674
- icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
675
- schema: z.ZodOptional<z.ZodNullable<z.ZodObject<{
676
- fields: z.ZodArray<z.ZodObject<{
677
- key: z.ZodString;
678
- name: z.ZodString;
679
- type: z.ZodString;
680
- options: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
681
- required: z.ZodOptional<z.ZodBoolean>;
682
- default: z.ZodOptional<z.ZodUnknown>;
683
- }, z.core.$strip>>;
684
- }, z.core.$strip>>>;
685
- workspace_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
686
- created_at: z.ZodString;
687
- updated_at: z.ZodString;
688
- }, z.core.$strip>;
689
- type TableCollectionResponse = z.infer<typeof tableCollectionResponseSchema>;
690
- declare const tableRecordResponseSchema: z.ZodObject<{
691
- id: z.ZodString;
692
- collection_id: z.ZodString;
693
- values: z.ZodRecord<z.ZodString, z.ZodUnknown>;
694
- created_at: z.ZodString;
695
- updated_at: z.ZodString;
696
- }, z.core.$strip>;
697
- type TableRecordResponse = z.infer<typeof tableRecordResponseSchema>;
698
-
699
643
  /**
700
644
  * Public type surface for @idapt/sdk.
701
645
  *
@@ -824,9 +768,11 @@ interface ChatCost {
824
768
  total_output_tokens: number;
825
769
  total_cached_tokens: number;
826
770
  by_call_type?: Record<string, ChatCostByCallType> | null;
827
- cost_budget_limit_usd?: number | null;
828
- cost_budget_mode?: string | null;
829
- cost_budget_spent_usd?: number | null;
771
+ credit_spend_limit_usd?: number | null;
772
+ credit_spend_used_usd: number;
773
+ credit_spend_remaining_usd?: number | null;
774
+ credit_spend_reset_at?: number | null;
775
+ credit_spend_limit_applicable: boolean;
830
776
  }
831
777
  interface MessageCostEntry {
832
778
  cost_usd: number;
@@ -850,7 +796,7 @@ interface MessageCosts {
850
796
  by_run: Record<string, RunCostMetrics>;
851
797
  }
852
798
  interface ChatStopResult extends Chat {
853
- run_active: boolean;
799
+ has_active_run: boolean;
854
800
  }
855
801
  /** Lifecycle state of an agent run row (`GET /chats/:id/runs`). */
856
802
  type AgentRunState = "generating" | "streaming" | "completed" | "failed" | "stopped" | "paused";
@@ -884,22 +830,6 @@ type SendMessageResult = {
884
830
  pending_token: string;
885
831
  chat_id: string;
886
832
  };
887
- /**
888
- * Lifecycle status of a one-off function run. `interrupted` lands when a run is
889
- * cancelled via `POST /functions/runs/:id/interrupt`.
890
- */
891
- type ExecutionRunStatus = "pending" | "running" | "completed" | "failed" | "timed_out" | "interrupted";
892
- /** Where a function run executes — sandboxed Lambda or a paired computer. */
893
- type ExecutionBackend = "computer" | "lambda";
894
- /**
895
- * A one-off function-run row. Returned by `POST /functions/runs`,
896
- * `POST /files/:id/run`, `GET /functions/runs` and `GET /functions/runs/:id` —
897
- * the one-off run lane always yields this single shape (there is no separate
898
- * stripped run-summary type).
899
- */
900
- type ExecutionRun = FunctionRunResponse;
901
- /** Alias for the one-off run row — the `client.functions.run*` result shape. */
902
- type FunctionRun = ExecutionRun;
903
833
  /**
904
834
  * A deployed function — a named, versioned, HTTP-invokable unit served on
905
835
  * `fn.idapt.host`. Returned by `GET/POST /functions`, `GET/PATCH /functions/:id`
@@ -920,41 +850,40 @@ interface FunctionInvokeResult {
920
850
  body: unknown;
921
851
  headers?: Record<string, string>;
922
852
  }
923
- type TriggerType = "webhook" | "schedule" | "manual" | string;
924
- type TriggerActionType = "run_code" | "run_chat" | string;
853
+ type TriggerType = "cron" | "webhook";
854
+ type AutomationActionType = "agent-run";
925
855
  /**
926
- * A trigger resource. This is a flat object — every scheduling field
856
+ * An automation resource. This is a flat object — every scheduling field
927
857
  * and every action field lives directly on the row, with no nested
928
858
  * `trigger_config` / `action_config` objects.
929
859
  *
930
- * `agent_id`, `file_id` and `working_dir_folder_id` are resourceIds.
860
+ * `agent_id` is a resourceId.
931
861
  */
932
- /** A trigger resource (flat). Sourced from the crud v1 contract. */
933
- type Trigger = TriggerResponse;
862
+ /** An automation resource (flat). Sourced from the crud v1 contract. */
863
+ type Automation = AutomationResponse;
934
864
  /**
935
- * A trigger plus its one-time webhook `secret`. Returned by
936
- * `POST /v1/triggers` (webhook creation) and `POST /v1/triggers/:id/rotate-secret`.
865
+ * An automation plus its one-time webhook `secret`. Returned by
866
+ * `POST /v1/automations` (webhook creation) and `POST /v1/automations/:id/rotate-secret`.
937
867
  * The plaintext `secret` is only ever echoed on these two responses.
938
868
  */
939
- /** Trigger + one-time webhook secret. Sourced from the crud v1 contract. */
940
- type TriggerWithSecret = TriggerWithSecretResponse;
941
- /** A trigger run record. Sourced from the crud v1 contract. */
942
- type TriggerRun = TriggerRunResponse;
943
- /** Trigger cost aggregates. Sourced from the crud v1 contract. */
944
- type TriggerCostStats = TriggerCostStatsResponse;
869
+ /** Automation + one-time webhook secret. Sourced from the crud v1 contract. */
870
+ type AutomationWithSecret = AutomationWithSecretResponse;
871
+ /** An automation run record. Sourced from the crud v1 contract. */
872
+ type AutomationRun = AutomationRunResponse;
873
+ /** Automation cost aggregates. Sourced from the crud v1 contract. */
874
+ type AutomationCostStats = AutomationCostStatsResponse;
945
875
  /**
946
- * Create-trigger request body — flat, mirrors the `Trigger` shape. The
876
+ * Create-automation request body — flat, mirrors the `Automation` shape. The
947
877
  * required fields depend on `trigger_type` / `action_type` (a schedule
948
- * trigger needs `cron_expression`; a `run_code` action needs `file_id`;
949
- * a `run_chat` action needs `prompt_template` or `agent_id`). The server
950
- * validates the combination.
878
+ * automation needs `cron_expression`; an `agent-run` action needs
879
+ * `prompt_template` and `agent_id`). The server validates the combination.
951
880
  */
952
- interface CreateTriggerInput {
881
+ interface CreateAutomationInput {
953
882
  name: string;
954
883
  description?: string;
955
884
  enabled?: boolean;
956
885
  trigger_type: TriggerType;
957
- action_type: TriggerActionType;
886
+ action_type: AutomationActionType;
958
887
  cron_expression?: string;
959
888
  cron_timezone?: string;
960
889
  agent_id?: string;
@@ -963,7 +892,6 @@ interface CreateTriggerInput {
963
892
  model?: string;
964
893
  reasoning_level?: number;
965
894
  auto_cost_level?: number;
966
- cost_budget_limit_usd?: number;
967
895
  web_search_enabled?: boolean;
968
896
  memory_enabled?: boolean;
969
897
  subagent_enabled?: boolean;
@@ -972,14 +900,9 @@ interface CreateTriggerInput {
972
900
  compaction_preset?: string;
973
901
  pasted_texts?: unknown[];
974
902
  active_skills?: string[];
975
- file_id?: string;
976
- runtime?: string;
977
- timeout_seconds?: number;
978
- env?: Record<string, string>;
979
- working_dir_folder_id?: string;
980
- }
981
- /** Update-trigger request body — every create field plus `agent_id` is patchable. */
982
- type UpdateTriggerInput = Partial<CreateTriggerInput>;
903
+ }
904
+ /** Update-automation request body — every create field plus `agent_id` is patchable. */
905
+ type UpdateAutomationInput = Partial<CreateAutomationInput>;
983
906
  /**
984
907
  * Modality bucket a model belongs to. Every model row across `/v1/models`,
985
908
  * `/v1/audio/models`, `/v1/images/models` and `/v1/videos/models` carries
@@ -1011,11 +934,42 @@ interface LLMModelCapabilities {
1011
934
  max_output_tokens: number;
1012
935
  image_input: boolean;
1013
936
  }
937
+ type LLMModelArchitectureType = "dense" | "moe" | "hybrid";
938
+ interface LLMModelArchitecture {
939
+ type: LLMModelArchitectureType | null;
940
+ parameter_count_b: number | null;
941
+ active_parameter_count_b: number | null;
942
+ }
943
+ interface LLMModelLocalInferenceVariant {
944
+ tag: string;
945
+ quantization: string | null;
946
+ download_size_gb: number;
947
+ recommended_ram_gb: number;
948
+ default: boolean;
949
+ }
950
+ interface LLMModelLocalInference {
951
+ runtimes: {
952
+ ollama: {
953
+ base_id: string;
954
+ variants: LLMModelLocalInferenceVariant[];
955
+ };
956
+ };
957
+ summary: {
958
+ runtime_ids: ["ollama"];
959
+ default_variant_tag: string;
960
+ min_download_size_gb: number;
961
+ max_download_size_gb: number;
962
+ min_recommended_ram_gb: number;
963
+ max_recommended_ram_gb: number;
964
+ };
965
+ }
1014
966
  /** A chat/LLM model from `GET /v1/models` (`modality: "chat"`). */
1015
967
  interface LLMModel extends ModelBase {
1016
968
  modality: "chat";
1017
969
  pricing: LLMModelPricing | null;
1018
970
  capabilities: LLMModelCapabilities;
971
+ architecture: LLMModelArchitecture;
972
+ local_inference: LLMModelLocalInference | null;
1019
973
  }
1020
974
  type ProviderEndpointKind = "openai" | "anthropic" | "openai_compatible";
1021
975
  type ProviderEndpointProviderKey = "openai" | "anthropic" | "openrouter" | "gemini" | "xai" | "deepseek" | "replicate" | "minimax" | "custom_openai_compatible" | "ollama";
@@ -1030,6 +984,10 @@ interface ProviderEndpointModelMapping {
1030
984
  model_id: string;
1031
985
  /** Upstream API model id sent to the provider. */
1032
986
  api_model_id: string;
987
+ /** Explicit serving context window for this endpoint/model pair. */
988
+ context_length?: number;
989
+ /** Explicit maximum completion tokens for this endpoint/model pair. */
990
+ max_completion_tokens?: number;
1033
991
  }
1034
992
  /**
1035
993
  * A saved BYOK or daemon-local provider endpoint. Provider secrets are
@@ -1091,6 +1049,49 @@ interface AiGatewayUsageRow {
1091
1049
  output_tokens: number;
1092
1050
  calls: number;
1093
1051
  }
1052
+ interface AiGatewayRoutePreviewCapabilities {
1053
+ tool_use?: boolean;
1054
+ reasoning?: boolean;
1055
+ vision?: boolean;
1056
+ audio_input?: boolean;
1057
+ streaming?: boolean;
1058
+ }
1059
+ interface AiGatewayRoutePreviewOption {
1060
+ model_id: string;
1061
+ connector_id: string;
1062
+ provider_slug?: string;
1063
+ provider_name: string;
1064
+ endpoint_slug?: string;
1065
+ endpoint_name?: string;
1066
+ endpoint_key?: string;
1067
+ billing_source?: string;
1068
+ provider_connection_id?: string | null;
1069
+ local_computer_id?: string | null;
1070
+ context_length?: number | null;
1071
+ max_completion_tokens?: number | null;
1072
+ is_direct: boolean;
1073
+ status: string | null;
1074
+ sticky: boolean;
1075
+ }
1076
+ interface AiGatewayRoutePreviewSkippedOption extends AiGatewayRoutePreviewOption {
1077
+ reason: "window_too_small" | "not_in_sticky_route";
1078
+ }
1079
+ interface AiGatewayRoutePreview {
1080
+ model_id: string;
1081
+ prompt_tokens: number;
1082
+ minimum_output_tokens: number;
1083
+ minimum_window_tokens: number;
1084
+ ordered: AiGatewayRoutePreviewOption[];
1085
+ primary: AiGatewayRoutePreviewOption | null;
1086
+ skipped: AiGatewayRoutePreviewSkippedOption[];
1087
+ diagnostics?: {
1088
+ reason: string;
1089
+ providers_serving_model: string[];
1090
+ required_capabilities?: AiGatewayRoutePreviewCapabilities;
1091
+ allowed_provider_slugs?: string[];
1092
+ };
1093
+ sticky_endpoint_key: string | null;
1094
+ }
1094
1095
  /** Image-model pricing block — flat per-image price (post-markup). */
1095
1096
  interface ImageModelPricing {
1096
1097
  per_image: number;
@@ -1341,15 +1342,21 @@ interface ComputerServerInfo {
1341
1342
  uptime_seconds: number;
1342
1343
  }
1343
1344
  /**
1344
- * One re-attachable tmux window on the `idapt` session. A tmux window
1345
- * has no `pid` — it is not a single process.
1345
+ * One persistent terminal (a named tmux window on the per-user `idapt-<user>`
1346
+ * session), with live state for the Terminals panel. A terminal has no `pid` —
1347
+ * it is not a single process.
1346
1348
  */
1347
- interface TmuxWindow {
1349
+ interface TerminalWindow {
1348
1350
  name: string;
1349
1351
  active: boolean;
1350
- }
1351
- /** SFTP listing entry as returned by `op: "list"`. */
1352
- interface SftpEntry {
1352
+ pane_count?: number;
1353
+ last_activity_ms?: number | null;
1354
+ running?: boolean | null;
1355
+ attached?: boolean | null;
1356
+ owner?: string | null;
1357
+ }
1358
+ /** FS listing entry as returned by `op: "list"`. */
1359
+ interface FsEntry {
1353
1360
  name: string;
1354
1361
  type: "file" | "dir" | "symlink" | string;
1355
1362
  size?: number | null;
@@ -1380,14 +1387,6 @@ type NotificationPreference = NotificationPreferenceResponse;
1380
1387
  type Secret = SecretResponse;
1381
1388
  /** A secret plus its decrypted value — only returned by `reveal`. */
1382
1389
  type SecretWithValue = SecretWithValueResponse;
1383
- /** Datastore (KV) entry. */
1384
- type DatastoreEntry = DatastoreEntryResponse;
1385
- /** Blobs (object storage) object metadata. */
1386
- type BlobObject = BlobObjectResponse;
1387
- /** Idapt Tables — a collection (schema + metadata). */
1388
- type TableCollection = TableCollectionResponse;
1389
- /** Idapt Tables — a record (JSON document). */
1390
- type TableRecord = TableRecordResponse;
1391
1390
  /**
1392
1391
  * A workspace invitation. The v1 contract keys invitations by `invitee_slug`
1393
1392
  * — there is no standalone `id` field on the wire. `DELETE` takes the slug
@@ -1464,7 +1463,7 @@ type StoreItemType = "skill" | "agent" | "computer" | "computer-template" | "wor
1464
1463
  /** A hub/store item. Sourced from the hub v1 contract. */
1465
1464
  type StoreItem = StoreItemResponse;
1466
1465
  /**
1467
- * Returned by `POST /v1/store/:id/install`. Open shape per template type.
1466
+ * Returned by `POST /v1/hub/:id/install`. Open shape per template type.
1468
1467
  * `id` is always present (the installed resource's resourceId).
1469
1468
  */
1470
1469
  interface StoreInstallResult {
@@ -1853,4 +1852,4 @@ declare class DataFolder {
1853
1852
  private rebuildNameCache;
1854
1853
  }
1855
1854
 
1856
- export { type FunctionResource as $, type AiGatewayProvider as A, type BlobObject as B, type CallOptions as C, type DataStore as D, type ComputerLoggingLevel as E, type File as F, type ComputerPort as G, type HttpContext as H, type ComputerServerInfo as I, type ComputerState as J, type ComputerType as K, type ComputerUser as L, type CreateTriggerInput as M, type DataCreateFolderInput as N, type OperationHandle as O, DataFolder as P, type DataUploadInput as Q, type DatastoreEntry as R, type EscalateRequest as S, type ExecutionBackend as T, type ExecutionRun as U, type VideoModel as V, type WriteOptions as W, type ExecutionRunStatus as X, type FileList as Y, type FunctionDeployment as Z, type FunctionInvokeResult as _, type AiGatewayUsageRow as a, type TriggerActionType as a$, type FunctionRun as a0, type HttpRequest as a1, type ImageGenerationResult as a2, type ImageModel as a3, type ImageModelPricing as a4, type LLMModel as a5, type LLMModelCapabilities as a6, type LLMModelPricing as a7, type ListEnvelope as a8, type ManagedProviderPreset as a9, type RuntimeMode as aA, type SearchResult as aB, type Secret as aC, type SecretWithValue as aD, type SendMessageResult as aE, type Settings as aF, type SftpEntry as aG, type Share as aH, type ShareDeletedResult as aI, type SharePermission as aJ, type ShareResourceType as aK, type SharedWithMeItem as aL, type SingleEnvelope as aM, type SpeechResult as aN, type SpeechStreamEvent as aO, type StoreInstallResult as aP, type StoreItem as aQ, type StoreItemType as aR, type StoredCredential as aS, type Subscription as aT, type SubscriptionPlan as aU, type TableCollection as aV, type TableRecord as aW, type TmuxWindow as aX, type TranscriptionResult as aY, type TranscriptionStreamEvent as aZ, type Trigger as a_, type Message as aa, type MessageCostEntry as ab, type MessageCosts as ac, type ModelBase as ad, type ModelModality as ae, type Notification as af, type NotificationConfig as ag, type NotificationPreference as ah, type NotificationSenderKind as ai, type Pagination as aj, type Permission as ak, type ProviderEndpoint as al, type ProviderEndpointConnectionType as am, type ProviderEndpointKind as an, type ProviderEndpointModality as ao, type ProviderEndpointModelMapping as ap, type ProviderEndpointProtocol as aq, type ProviderEndpointProviderKey as ar, type ProviderEndpointRuntime as as, type ProviderEndpointTestResult as at, type ProviderEndpointTransport as au, type ProviderEndpointVisibility as av, type QueryInput as aw, RemoteBundleReader as ax, type RepromptResult as ay, type RunCostMetrics as az, type VideoModelSearchResult as b, type TriggerCostStats as b0, type TriggerRun as b1, type TriggerType as b2, type TriggerWithSecret as b3, type TtsVoice as b4, type TtsVoiceGender as b5, type UpdateTriggerInput as b6, type UsageRecord as b7, type UsageSummary as b8, type User as b9, type VideoModelCapabilities as ba, type VideoModelPricing as bb, type VideoModelRate as bc, type VideoModelSearchItem as bd, type WebSearchHit as be, type WebSearchResponse as bf, type Workspace as bg, type WorkspaceInvitation as bh, type WorkspaceMember as bi, type WorkspaceMemberRole as bj, buildUrl as bk, request as bl, requestRaw as bm, type VideoGenerationResult as c, type DeletedResponse as d, type DataStoreUploadInput as e, type FileUploadResult as f, type DataStoreCreateFolderInput as g, type ConnectOptions as h, type Agent as i, type AgentRun as j, type AgentRunState as k, type ApiKey as l, AppFolder as m, type AudioModel as n, type AudioModelCapabilities as o, type AudioModelPricing as p, type AuthMode as q, type BundleReader as r, type Chat as s, type ChatCost as t, type ChatCostByCallType as u, type ChatStopResult as v, type ClientMeta as w, type Computer as x, type ComputerEnvVar as y, type ComputerExecResult as z };
1855
+ export { type DataCreateFolderInput as $, type AiGatewayProvider as A, type BundleReader as B, type CallOptions as C, type DataStore as D, type Chat as E, type File as F, type ChatCost as G, type HttpContext as H, type ImageGenerationResult as I, type ChatCostByCallType as J, type ChatStopResult as K, type ListEnvelope as L, type ClientMeta as M, type Computer as N, type OperationHandle as O, type ComputerEnvVar as P, type ComputerExecResult as Q, type ComputerLoggingLevel as R, type SpeechResult as S, type ComputerPort as T, type ComputerServerInfo as U, type VideoGenerationResult as V, type WriteOptions as W, type ComputerState as X, type ComputerType as Y, type ComputerUser as Z, type CreateAutomationInput as _, type AiGatewayUsageRow as a, type SubscriptionPlan as a$, DataFolder as a0, type DataUploadInput as a1, type EscalateRequest as a2, type FileList as a3, type FsEntry as a4, type FunctionDeployment as a5, type FunctionInvokeResult as a6, type FunctionResource as a7, type HttpRequest as a8, type ImageModel as a9, type ProviderEndpointProviderKey as aA, type ProviderEndpointRuntime as aB, type ProviderEndpointTestResult as aC, type ProviderEndpointTransport as aD, type ProviderEndpointVisibility as aE, type QueryInput as aF, RemoteBundleReader as aG, type RepromptResult as aH, type RunCostMetrics as aI, type RuntimeMode as aJ, type SearchResult as aK, type Secret as aL, type SecretWithValue as aM, type SendMessageResult as aN, type Settings as aO, type Share as aP, type ShareDeletedResult as aQ, type SharePermission as aR, type ShareResourceType as aS, type SharedWithMeItem as aT, type SingleEnvelope as aU, type SpeechStreamEvent as aV, type StoreInstallResult as aW, type StoreItem as aX, type StoreItemType as aY, type StoredCredential as aZ, type Subscription as a_, type ImageModelPricing as aa, type LLMModel as ab, type LLMModelArchitecture as ac, type LLMModelArchitectureType as ad, type LLMModelCapabilities as ae, type LLMModelLocalInference as af, type LLMModelLocalInferenceVariant as ag, type LLMModelPricing as ah, type ManagedProviderPreset as ai, type Message as aj, type MessageCostEntry as ak, type MessageCosts as al, type ModelBase as am, type ModelModality as an, type Notification as ao, type NotificationConfig as ap, type NotificationPreference as aq, type NotificationSenderKind as ar, type Pagination as as, type Permission as at, type ProviderEndpoint as au, type ProviderEndpointConnectionType as av, type ProviderEndpointKind as aw, type ProviderEndpointModality as ax, type ProviderEndpointModelMapping as ay, type ProviderEndpointProtocol as az, type AiGatewayRoutePreviewCapabilities as b, type TerminalWindow as b0, type TranscriptionResult as b1, type TranscriptionStreamEvent as b2, type TriggerType as b3, type TtsVoice as b4, type TtsVoiceGender as b5, type UpdateAutomationInput as b6, type UsageRecord as b7, type UsageSummary as b8, type User as b9, type VideoModelCapabilities as ba, type VideoModelPricing as bb, type VideoModelRate as bc, type VideoModelSearchItem as bd, type WebSearchHit as be, type WebSearchResponse as bf, type Workspace as bg, type WorkspaceInvitation as bh, type WorkspaceMember as bi, type WorkspaceMemberRole as bj, buildUrl as bk, request as bl, requestRaw as bm, type AiGatewayRoutePreview as c, type VideoModel as d, type VideoModelSearchResult as e, type DeletedResponse as f, type DataStoreUploadInput as g, type FileUploadResult as h, type DataStoreCreateFolderInput as i, type ConnectOptions as j, type Agent as k, type AgentRun as l, type AgentRunState as m, type AiGatewayRoutePreviewOption as n, type AiGatewayRoutePreviewSkippedOption as o, type ApiKey as p, AppFolder as q, type AudioModel as r, type AudioModelCapabilities as s, type AudioModelPricing as t, type AuthMode as u, type Automation as v, type AutomationActionType as w, type AutomationCostStats as x, type AutomationRun as y, type AutomationWithSecret as z };