@idapt/browser-app-sdk 0.2.0 → 0.3.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.
@@ -189,7 +189,8 @@ declare const computerResponseSchema: z.ZodObject<{
189
189
  full: "full";
190
190
  minimal: "minimal";
191
191
  }>>>;
192
- workspace_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
192
+ owner: z.ZodString;
193
+ billing_account: z.ZodNullable<z.ZodString>;
193
194
  state: z.ZodNullable<z.ZodEnum<{
194
195
  unprovisioned: "unprovisioned";
195
196
  provisioning: "provisioning";
@@ -202,9 +203,15 @@ declare const computerResponseSchema: z.ZodObject<{
202
203
  terminating: "terminating";
203
204
  terminated: "terminated";
204
205
  }>>;
206
+ online: z.ZodBoolean;
207
+ last_heartbeat_at: z.ZodNullable<z.ZodNumber>;
205
208
  archived_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
206
209
  created_at: z.ZodString;
207
210
  updated_at: z.ZodString;
211
+ exposures: z.ZodArray<z.ZodObject<{
212
+ workspace: z.ZodString;
213
+ capabilities: z.ZodArray<z.ZodString>;
214
+ }, z.core.$strip>>;
208
215
  }, z.core.$strip>;
209
216
  type ComputerResponse = z.infer<typeof computerResponseSchema>;
210
217
  declare const computerUserResponseSchema: z.ZodObject<{
@@ -261,6 +268,7 @@ declare const agentResponseSchema: z.ZodObject<{
261
268
  compaction_trigger_value: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
262
269
  source_template_resource_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
263
270
  memory_folder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
271
+ memory_resource_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
264
272
  default_model_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
265
273
  default_reasoning_effort: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
266
274
  default_auto_cost_level: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -326,7 +334,7 @@ declare const workspaceMemberResponseSchema: z.ZodObject<{
326
334
  created_at: z.ZodString;
327
335
  }, z.core.$strip>;
328
336
  type WorkspaceMemberResponse = z.infer<typeof workspaceMemberResponseSchema>;
329
- declare const triggerResponseSchema: z.ZodObject<{
337
+ declare const automationResponseSchema: z.ZodObject<{
330
338
  id: z.ZodString;
331
339
  name: z.ZodString;
332
340
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -351,20 +359,19 @@ declare const triggerResponseSchema: z.ZodObject<{
351
359
  compaction_preset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
352
360
  pasted_texts: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodUnknown>>>;
353
361
  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>>;
362
+ function_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
363
+ method: z.ZodOptional<z.ZodNullable<z.ZodString>>;
364
+ path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
365
+ body: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
359
366
  next_run_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
360
367
  last_fired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
361
368
  archived_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
362
369
  created_at: z.ZodString;
363
370
  updated_at: z.ZodString;
364
371
  }, 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<{
372
+ type AutomationResponse = z.infer<typeof automationResponseSchema>;
373
+ /** Automation + its one-time plaintext webhook secret (create / rotate-secret). */
374
+ declare const automationWithSecretResponseSchema: z.ZodObject<{
368
375
  id: z.ZodString;
369
376
  name: z.ZodString;
370
377
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -389,11 +396,10 @@ declare const triggerWithSecretResponseSchema: z.ZodObject<{
389
396
  compaction_preset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
390
397
  pasted_texts: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodUnknown>>>;
391
398
  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>>;
399
+ function_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
400
+ method: z.ZodOptional<z.ZodNullable<z.ZodString>>;
401
+ path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
402
+ body: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
397
403
  next_run_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
398
404
  last_fired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
399
405
  archived_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -401,18 +407,19 @@ declare const triggerWithSecretResponseSchema: z.ZodObject<{
401
407
  updated_at: z.ZodString;
402
408
  secret: z.ZodString;
403
409
  }, z.core.$strip>;
404
- type TriggerWithSecretResponse = z.infer<typeof triggerWithSecretResponseSchema>;
405
- declare const triggerRunResponseSchema: z.ZodObject<{
410
+ type AutomationWithSecretResponse = z.infer<typeof automationWithSecretResponseSchema>;
411
+ declare const automationRunResponseSchema: z.ZodObject<{
406
412
  id: z.ZodString;
407
- trigger_id: z.ZodString;
413
+ automation_id: z.ZodNullable<z.ZodString>;
414
+ automation_name: z.ZodString;
408
415
  success: z.ZodBoolean;
409
416
  error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
410
417
  chat_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
411
418
  execution_run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
412
419
  fired_at: z.ZodString;
413
420
  }, z.core.$strip>;
414
- type TriggerRunResponse = z.infer<typeof triggerRunResponseSchema>;
415
- declare const triggerCostStatsResponseSchema: z.ZodObject<{
421
+ type AutomationRunResponse = z.infer<typeof automationRunResponseSchema>;
422
+ declare const automationCostStatsResponseSchema: z.ZodObject<{
416
423
  runs_with_cost: z.ZodNumber;
417
424
  total_cost_usd: z.ZodNumber;
418
425
  today_cost_usd: z.ZodNumber;
@@ -421,7 +428,7 @@ declare const triggerCostStatsResponseSchema: z.ZodObject<{
421
428
  last7d_cost_usd: z.ZodNumber;
422
429
  first_fired_at: z.ZodNullable<z.ZodString>;
423
430
  }, z.core.$strip>;
424
- type TriggerCostStatsResponse = z.infer<typeof triggerCostStatsResponseSchema>;
431
+ type AutomationCostStatsResponse = z.infer<typeof automationCostStatsResponseSchema>;
425
432
  declare const notificationResponseSchema: z.ZodObject<{
426
433
  id: z.ZodString;
427
434
  type: z.ZodString;
@@ -920,41 +927,42 @@ interface FunctionInvokeResult {
920
927
  body: unknown;
921
928
  headers?: Record<string, string>;
922
929
  }
923
- type TriggerType = "webhook" | "schedule" | "manual" | string;
924
- type TriggerActionType = "run_code" | "run_chat" | string;
930
+ type TriggerType = "cron" | "webhook";
931
+ type AutomationActionType = "agent-run" | "function-invoke" | "computer-run";
925
932
  /**
926
- * A trigger resource. This is a flat object — every scheduling field
933
+ * An automation resource. This is a flat object — every scheduling field
927
934
  * and every action field lives directly on the row, with no nested
928
935
  * `trigger_config` / `action_config` objects.
929
936
  *
930
- * `agent_id`, `file_id` and `working_dir_folder_id` are resourceIds.
937
+ * `agent_id` and `function_id` are resourceIds.
931
938
  */
932
- /** A trigger resource (flat). Sourced from the crud v1 contract. */
933
- type Trigger = TriggerResponse;
939
+ /** An automation resource (flat). Sourced from the crud v1 contract. */
940
+ type Automation = AutomationResponse;
934
941
  /**
935
- * A trigger plus its one-time webhook `secret`. Returned by
936
- * `POST /v1/triggers` (webhook creation) and `POST /v1/triggers/:id/rotate-secret`.
942
+ * An automation plus its one-time webhook `secret`. Returned by
943
+ * `POST /v1/automations` (webhook creation) and `POST /v1/automations/:id/rotate-secret`.
937
944
  * The plaintext `secret` is only ever echoed on these two responses.
938
945
  */
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;
946
+ /** Automation + one-time webhook secret. Sourced from the crud v1 contract. */
947
+ type AutomationWithSecret = AutomationWithSecretResponse;
948
+ /** An automation run record. Sourced from the crud v1 contract. */
949
+ type AutomationRun = AutomationRunResponse;
950
+ /** Automation cost aggregates. Sourced from the crud v1 contract. */
951
+ type AutomationCostStats = AutomationCostStatsResponse;
945
952
  /**
946
- * Create-trigger request body — flat, mirrors the `Trigger` shape. The
953
+ * Create-automation request body — flat, mirrors the `Automation` shape. The
947
954
  * 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
955
+ * automation needs `cron_expression`; an `agent-run` action needs
956
+ * `prompt_template` and `agent_id`; a `function-invoke` action needs
957
+ * `function_id`). The server
950
958
  * validates the combination.
951
959
  */
952
- interface CreateTriggerInput {
960
+ interface CreateAutomationInput {
953
961
  name: string;
954
962
  description?: string;
955
963
  enabled?: boolean;
956
964
  trigger_type: TriggerType;
957
- action_type: TriggerActionType;
965
+ action_type: AutomationActionType;
958
966
  cron_expression?: string;
959
967
  cron_timezone?: string;
960
968
  agent_id?: string;
@@ -972,14 +980,13 @@ interface CreateTriggerInput {
972
980
  compaction_preset?: string;
973
981
  pasted_texts?: unknown[];
974
982
  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>;
983
+ function_id?: string;
984
+ method?: string;
985
+ path?: string;
986
+ body?: unknown;
987
+ }
988
+ /** Update-automation request body — every create field plus `agent_id` is patchable. */
989
+ type UpdateAutomationInput = Partial<CreateAutomationInput>;
983
990
  /**
984
991
  * Modality bucket a model belongs to. Every model row across `/v1/models`,
985
992
  * `/v1/audio/models`, `/v1/images/models` and `/v1/videos/models` carries
@@ -1853,4 +1860,4 @@ declare class DataFolder {
1853
1860
  private rebuildNameCache;
1854
1861
  }
1855
1862
 
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 };
1863
+ export { type ExecutionRun as $, type AiGatewayProvider as A, type BlobObject as B, type CallOptions as C, type DataStore as D, type ChatStopResult as E, type File as F, type ClientMeta as G, type HttpContext as H, type Computer as I, type ComputerEnvVar as J, type ComputerExecResult as K, type ComputerLoggingLevel as L, type ComputerPort as M, type ComputerServerInfo as N, type OperationHandle as O, type ComputerState as P, type ComputerType as Q, type ComputerUser as R, type CreateAutomationInput as S, type DataCreateFolderInput as T, DataFolder as U, type VideoModel as V, type WriteOptions as W, type DataUploadInput as X, type DatastoreEntry as Y, type EscalateRequest as Z, type ExecutionBackend as _, type AiGatewayUsageRow as a, type TableRecord as a$, type ExecutionRunStatus as a0, type FileList as a1, type FunctionDeployment as a2, type FunctionInvokeResult as a3, type FunctionResource as a4, type FunctionRun as a5, type HttpRequest as a6, type ImageGenerationResult as a7, type ImageModel as a8, type ImageModelPricing as a9, type ProviderEndpointVisibility as aA, type QueryInput as aB, RemoteBundleReader as aC, type RepromptResult as aD, type RunCostMetrics as aE, type RuntimeMode as aF, type SearchResult as aG, type Secret as aH, type SecretWithValue as aI, type SendMessageResult as aJ, type Settings as aK, type SftpEntry as aL, type Share as aM, type ShareDeletedResult as aN, type SharePermission as aO, type ShareResourceType as aP, type SharedWithMeItem as aQ, type SingleEnvelope as aR, type SpeechResult as aS, type SpeechStreamEvent as aT, type StoreInstallResult as aU, type StoreItem as aV, type StoreItemType as aW, type StoredCredential as aX, type Subscription as aY, type SubscriptionPlan as aZ, type TableCollection as a_, type LLMModel as aa, type LLMModelCapabilities as ab, type LLMModelPricing as ac, type ListEnvelope as ad, type ManagedProviderPreset as ae, type Message as af, type MessageCostEntry as ag, type MessageCosts as ah, type ModelBase as ai, type ModelModality as aj, type Notification as ak, type NotificationConfig as al, type NotificationPreference as am, type NotificationSenderKind as an, type Pagination as ao, type Permission as ap, type ProviderEndpoint as aq, type ProviderEndpointConnectionType as ar, type ProviderEndpointKind as as, type ProviderEndpointModality as at, type ProviderEndpointModelMapping as au, type ProviderEndpointProtocol as av, type ProviderEndpointProviderKey as aw, type ProviderEndpointRuntime as ax, type ProviderEndpointTestResult as ay, type ProviderEndpointTransport as az, type VideoModelSearchResult as b, type TmuxWindow 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 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 Automation as r, type AutomationActionType as s, type AutomationCostStats as t, type AutomationRun as u, type AutomationWithSecret as v, type BundleReader as w, type Chat as x, type ChatCost as y, type ChatCostByCallType as z };