@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.
- package/dist/{chunk-KHPTFRT3.js → chunk-KMLUFF4F.js} +397 -393
- package/dist/chunk-KMLUFF4F.js.map +1 -0
- package/dist/{chunk-OKOO2JCS.js → chunk-QWNGAONE.js} +4 -4
- package/dist/{chunk-OKOO2JCS.js.map → chunk-QWNGAONE.js.map} +1 -1
- package/dist/{client-CZAWglsD.d.ts → client-CHsdQcgI.d.cts} +131 -109
- package/dist/{client-DjipcztO.d.cts → client-_Jvrbhz2.d.ts} +131 -109
- package/dist/{data-BuXXki1D.d.cts → data-DtOpB63U.d.cts} +56 -49
- package/dist/{data-BuXXki1D.d.ts → data-DtOpB63U.d.ts} +56 -49
- package/dist/index.cjs +396 -392
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/react.cjs +202 -179
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +2 -2
- package/dist/testing.d.cts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-KHPTFRT3.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as HttpContext, C as CallOptions, F as File$1, i as Agent, d as DeletedResponse, l as ApiKey,
|
|
1
|
+
import { H as HttpContext, C as CallOptions, F as File$1, i as Agent, d as DeletedResponse, l as ApiKey, ap as Permission, aS as SpeechResult, b1 as TranscriptionResult, aT as SpeechStreamEvent, b2 as TranscriptionStreamEvent, r as Automation, S as CreateAutomationInput, v as AutomationWithSecret, b6 as UpdateAutomationInput, u as AutomationRun, t as AutomationCostStats, B as BlobObject, x as Chat, y as ChatCost, ah as MessageCosts, E as ChatStopResult, af as Message, aJ as SendMessageResult, k as AgentRunState, j as AgentRun, aD as RepromptResult, I as Computer, N as ComputerServerInfo, K as ComputerExecResult, b0 as TmuxWindow, aL as SftpEntry, M as ComputerPort, R as ComputerUser, ad as ListEnvelope, J as ComputerEnvVar, Y as DatastoreEntry, f as FileUploadResult, W as WriteOptions, $ as ExecutionRun, _ as ExecutionBackend, a0 as ExecutionRunStatus, a5 as FunctionRun, a4 as FunctionResource, a2 as FunctionDeployment, a3 as FunctionInvokeResult, a8 as ImageModel, a7 as ImageGenerationResult, aa as LLMModel, ak as Notification, al as NotificationConfig, am as NotificationPreference, as as ProviderEndpointKind, aw as ProviderEndpointProviderKey, ar as ProviderEndpointConnectionType, az as ProviderEndpointTransport, ax as ProviderEndpointRuntime, av as ProviderEndpointProtocol, aA as ProviderEndpointVisibility, at as ProviderEndpointModality, aq as ProviderEndpoint, ae as ManagedProviderPreset, ay as ProviderEndpointTestResult, aG as SearchResult, aH as Secret, aI as SecretWithValue, aK as Settings, aP as ShareResourceType, aO as SharePermission, aM as Share, aN as ShareDeletedResult, aQ as SharedWithMeItem, aW as StoreItemType, aV as StoreItem, aU as StoreInstallResult, aY as Subscription, a_ as TableCollection, a$ as TableRecord, b9 as User, b8 as UsageSummary, b7 as UsageRecord, bf as WebSearchResponse, bj as WorkspaceMemberRole, bg as Workspace, bi as WorkspaceMember, bh as WorkspaceInvitation, m as AppFolder, U as DataFolder, G as ClientMeta, aF as RuntimeMode, aX as StoredCredential, Z as EscalateRequest } from './data-DtOpB63U.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Stateless low-level file operations against `/api/v1/drive/files/*`.
|
|
@@ -259,6 +259,83 @@ declare class AudioApi {
|
|
|
259
259
|
streamTranscribe(input: TranscribeInput, opts?: CallOptions): AsyncIterable<TranscriptionStreamEvent>;
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
+
/**
|
|
263
|
+
* AutomationsApi — `/api/v1/automations`.
|
|
264
|
+
*
|
|
265
|
+
* Automations fire actions on events (webhook or cron). The `fire` endpoint is
|
|
266
|
+
* unauthenticated — it validates the
|
|
267
|
+
* per-automation webhook secret instead of the bearer token. This SDK handles
|
|
268
|
+
* both modes: regular calls use `this.ctx.key`; `fire` can be called with
|
|
269
|
+
* an explicit secret override.
|
|
270
|
+
*/
|
|
271
|
+
|
|
272
|
+
interface FireAutomationInput {
|
|
273
|
+
/**
|
|
274
|
+
* Webhook secret for this automation. Overrides the client's `ap_` key.
|
|
275
|
+
* Required when calling `fire` outside the creating user's session.
|
|
276
|
+
*/
|
|
277
|
+
secret: string;
|
|
278
|
+
/** Optional context overrides forwarded to the action. */
|
|
279
|
+
body?: Record<string, unknown>;
|
|
280
|
+
}
|
|
281
|
+
interface ListAutomationRunsQuery {
|
|
282
|
+
limit?: number;
|
|
283
|
+
/** Opaque pagination cursor — echo `pagination.next_cursor`. */
|
|
284
|
+
cursor?: string;
|
|
285
|
+
}
|
|
286
|
+
interface ListAutomationsQuery {
|
|
287
|
+
workspace_id?: string;
|
|
288
|
+
include_archived?: boolean;
|
|
289
|
+
archived_only?: boolean;
|
|
290
|
+
}
|
|
291
|
+
interface BulkAutomationCostStatsQuery {
|
|
292
|
+
workspace_id?: string;
|
|
293
|
+
}
|
|
294
|
+
declare class AutomationsApi {
|
|
295
|
+
private readonly ctx;
|
|
296
|
+
constructor(ctx: HttpContext);
|
|
297
|
+
list(query?: ListAutomationsQuery, opts?: CallOptions): Promise<Automation[]>;
|
|
298
|
+
/**
|
|
299
|
+
* Create an automation. `workspace_id` is passed in the request BODY
|
|
300
|
+
* alongside the flat automation definition — it is not a query param. The request
|
|
301
|
+
* body is flat: every scheduling field (`cron_expression`, …) and every
|
|
302
|
+
* action field (`agent_id`, `prompt_template`, `function_id`, …) sits at the
|
|
303
|
+
* top level — there are no nested `trigger_config` / `action_config`
|
|
304
|
+
* objects any more.
|
|
305
|
+
*
|
|
306
|
+
* For a webhook automation the response additionally carries a one-time
|
|
307
|
+
* plaintext `secret` (use `AutomationWithSecret`); other automation types
|
|
308
|
+
* resolve to a plain `Automation`.
|
|
309
|
+
*/
|
|
310
|
+
create(workspaceId: string, input: CreateAutomationInput, opts?: CallOptions): Promise<AutomationWithSecret | Automation>;
|
|
311
|
+
get(id: string, opts?: CallOptions): Promise<Automation>;
|
|
312
|
+
update(id: string, input: UpdateAutomationInput, opts?: CallOptions): Promise<Automation>;
|
|
313
|
+
delete(id: string, opts?: CallOptions): Promise<DeletedResponse>;
|
|
314
|
+
archive(id: string, opts?: CallOptions): Promise<Automation>;
|
|
315
|
+
unarchive(id: string, opts?: CallOptions): Promise<Automation>;
|
|
316
|
+
/**
|
|
317
|
+
* Fire an automation via its webhook secret. This endpoint does NOT use the
|
|
318
|
+
* client's `ap_` key — the bearer is the automation's secret — so we build a
|
|
319
|
+
* one-off HttpContext for it rather than mutating the shared one.
|
|
320
|
+
*
|
|
321
|
+
* Responds HTTP 202. The response identifies the fired automation via `id`
|
|
322
|
+
* only.
|
|
323
|
+
*/
|
|
324
|
+
fire(id: string, input: FireAutomationInput, opts?: CallOptions): Promise<{
|
|
325
|
+
id: string;
|
|
326
|
+
}>;
|
|
327
|
+
/**
|
|
328
|
+
* Rotate the webhook secret. Returns the automation with a fresh one-time
|
|
329
|
+
* plaintext `secret` populated (`AutomationWithSecret`). The old secret
|
|
330
|
+
* immediately stops working.
|
|
331
|
+
*/
|
|
332
|
+
rotateSecret(id: string, opts?: CallOptions): Promise<AutomationWithSecret>;
|
|
333
|
+
/** Recent fires + their success/error outcome. */
|
|
334
|
+
listRuns(id: string, query?: ListAutomationRunsQuery, opts?: CallOptions): Promise<AutomationRun[]>;
|
|
335
|
+
getCostStats(id: string, opts?: CallOptions): Promise<AutomationCostStats>;
|
|
336
|
+
getCostStatsMap(query?: BulkAutomationCostStatsQuery, opts?: CallOptions): Promise<Record<string, AutomationCostStats>>;
|
|
337
|
+
}
|
|
338
|
+
|
|
262
339
|
/**
|
|
263
340
|
* BlobsApi — `/api/v1/blobs` (the object-storage data plane).
|
|
264
341
|
*
|
|
@@ -366,7 +443,7 @@ declare const COMMAND_BINDINGS: Record<string, CommandBinding>;
|
|
|
366
443
|
* {@link COMMAND_BINDINGS}). Used to type `client.call(action, args)` so a
|
|
367
444
|
* known action autocompletes and a typo is caught at compile time.
|
|
368
445
|
*/
|
|
369
|
-
type V1CommandName = "agent archive" | "agent copy-to-workspace" | "agent create" | "agent delete" | "agent get" | "agent list" | "agent move" | "agent permanent-delete" | "agent restore" | "agent unarchive" | "agent update" | "ai-gateway providers" | "ai-gateway usage" | "api-key create" | "api-key delete" | "api-key list" | "api-key rotate" | "api-key update" | "audio models" | "audio search-models" | "audio search-voices" | "audio speak" | "audio speak-stream" | "audio transcribe" | "audio transcribe-stream" | "audio voices" | "blobs delete" | "blobs get" | "blobs head" | "blobs list" | "blobs namespaces" | "blobs put" | "blobs signed-url" | "browser-app create" | "browser-app deploy" | "browser-app deployments" | "browser-app fork" | "browser-app get" | "browser-app list" | "browser-app promote" | "browser-app snapshot" | "chat archive" | "chat copy-to-agent" | "chat copy-to-workspace" | "chat cost" | "chat create" | "chat delete" | "chat export" | "chat fork-to-workspace" | "chat get" | "chat list" | "chat message-costs" | "chat messages" | "chat permanent-delete" | "chat reprompt" | "chat restore" | "chat runs" | "chat send" | "chat stop" | "chat stream" | "chat unarchive" | "chat update" | "ci cancel" | "ci get" | "ci jobs" | "ci list" | "ci run" | "computer activity" | "computer add-local-model" | "computer app-create" | "computer app-delete" | "computer app-exec" | "computer app-expose" | "computer app-external" | "computer app-get" | "computer app-logs" | "computer app-ports" | "computer app-reset" | "computer app-restart" | "computer app-run" | "computer app-runtime" | "computer app-setup-runtime" | "computer app-start" | "computer app-stop" | "computer app-unexpose" | "computer apps" | "computer archive" | "computer compose-up" | "computer create" | "computer create-user" | "computer delete" | "computer delete-user" | "computer delete-user-env" | "computer download" | "computer download-to-drive" | "computer ephemeral" | "computer exec" | "computer expose" | "computer get" | "computer get-user" | "computer hibernate" | "computer
|
|
446
|
+
type V1CommandName = "agent archive" | "agent copy-to-workspace" | "agent create" | "agent delete" | "agent get" | "agent list" | "agent move" | "agent permanent-delete" | "agent restore" | "agent unarchive" | "agent update" | "ai-gateway providers" | "ai-gateway usage" | "api-key create" | "api-key delete" | "api-key list" | "api-key rotate" | "api-key update" | "audio models" | "audio search-models" | "audio search-voices" | "audio speak" | "audio speak-stream" | "audio transcribe" | "audio transcribe-stream" | "audio voices" | "automation archive" | "automation cost-stats" | "automation cost-stats-all" | "automation create" | "automation delete" | "automation fire" | "automation get" | "automation list" | "automation rotate-secret" | "automation runs" | "automation test-fire" | "automation unarchive" | "automation update" | "blobs delete" | "blobs get" | "blobs head" | "blobs list" | "blobs namespaces" | "blobs put" | "blobs signed-url" | "browser-app create" | "browser-app deploy" | "browser-app deployments" | "browser-app fork" | "browser-app get" | "browser-app list" | "browser-app promote" | "browser-app snapshot" | "chat archive" | "chat copy-to-agent" | "chat copy-to-workspace" | "chat cost" | "chat create" | "chat delete" | "chat export" | "chat fork-to-workspace" | "chat get" | "chat list" | "chat message-costs" | "chat messages" | "chat permanent-delete" | "chat reprompt" | "chat restore" | "chat runs" | "chat send" | "chat stop" | "chat stream" | "chat unarchive" | "chat update" | "ci cancel" | "ci get" | "ci jobs" | "ci list" | "ci run" | "computer activity" | "computer add-exposure" | "computer add-local-model" | "computer app-create" | "computer app-delete" | "computer app-exec" | "computer app-expose" | "computer app-external" | "computer app-get" | "computer app-logs" | "computer app-ports" | "computer app-reset" | "computer app-restart" | "computer app-run" | "computer app-runtime" | "computer app-setup-runtime" | "computer app-start" | "computer app-stop" | "computer app-unexpose" | "computer apps" | "computer archive" | "computer compose-up" | "computer create" | "computer create-user" | "computer delete" | "computer delete-user" | "computer delete-user-env" | "computer download" | "computer download-to-drive" | "computer ephemeral" | "computer exec" | "computer expose" | "computer get" | "computer get-user" | "computer hibernate" | "computer list" | "computer local-inference" | "computer local-models" | "computer manage" | "computer pair" | "computer ports" | "computer remove-exposure" | "computer remove-local-model" | "computer run" | "computer set-ports" | "computer set-user-env" | "computer sftp" | "computer start" | "computer stop" | "computer test-connection" | "computer tmux" | "computer transfer" | "computer tunnels" | "computer unarchive" | "computer unexpose" | "computer update" | "computer update-exposure" | "computer update-user" | "computer upload" | "computer user-env" | "computer user-env-setup" | "computer user-env-setup-apply" | "computer user-env-sync" | "computer user-env-sync-repair" | "computer users" | "datastore batch" | "datastore delete" | "datastore get" | "datastore increment" | "datastore list" | "datastore namespaces" | "datastore set" | "drive content-versions" | "drive create-folder" | "drive delete" | "drive get-metadata" | "drive glob" | "drive grep" | "drive list" | "drive move" | "drive permanent-delete" | "drive read" | "drive restore" | "drive restore-version" | "drive run" | "drive update" | "drive upload" | "functions create" | "functions delete" | "functions deploy" | "functions deployments" | "functions get" | "functions invoke" | "functions list" | "functions promote" | "functions update" | "guide get" | "hook create" | "hook delete" | "hook get" | "hook history" | "hook list" | "hook override" | "hook preview" | "hook toggle" | "hook update" | "hub install" | "hub search" | "hub submissions" | "hub submit" | "hub update" | "hub update-check" | "image generate" | "image models" | "image search" | "me get" | "me usage" | "memory box-delete" | "memory box-get" | "memory box-list" | "memory box-update" | "memory delete" | "memory index-read" | "memory index-write" | "memory list" | "memory read" | "memory search" | "memory write" | "models list" | "models search" | "notes box-create" | "notes box-delete" | "notes box-get" | "notes box-list" | "notes box-update" | "notes delete" | "notes folder-create" | "notes folder-delete" | "notes folder-list" | "notes folder-move" | "notes folder-rename" | "notes graph" | "notes import" | "notes index-read" | "notes index-write" | "notes links" | "notes list" | "notes note-move" | "notes note-rename" | "notes purge" | "notes read" | "notes restore" | "notes search" | "notes search-all" | "notes tag-list" | "notes tag-rename" | "notes trash-empty" | "notes trash-list" | "notes tree" | "notes write" | "notification config" | "notification delete" | "notification get" | "notification list" | "notification preferences" | "notification read-all" | "notification send" | "notification update" | "notification update-config" | "notification update-preferences" | "operation cancel" | "operation get" | "operation list" | "provider-endpoint create" | "provider-endpoint delete" | "provider-endpoint list" | "provider-endpoint presets" | "provider-endpoint test" | "provider-endpoint update" | "realtime broadcast" | "realtime presence" | "realtime presence-list" | "realtime subscribe" | "repos branches" | "repos clone-url" | "repos commit" | "repos commits" | "repos create" | "repos delete" | "repos get" | "repos list" | "repos read-file" | "repos set-visibility" | "search query" | "secret create" | "secret delete" | "secret get" | "secret list" | "secret reveal" | "secret update" | "settings get" | "settings update" | "share create" | "share delete" | "share list" | "share update" | "shared-with-me list" | "skill apply-update" | "skill attach" | "skill body" | "skill create" | "skill delete" | "skill detach" | "skill file-delete" | "skill file-list" | "skill file-read" | "skill file-write" | "skill fork" | "skill get" | "skill install" | "skill list" | "skill publish" | "skill render" | "skill search" | "skill update" | "skill update-check" | "subscription get" | "table create" | "table create-record" | "table delete" | "table delete-record" | "table export" | "table get" | "table get-record" | "table import" | "table list" | "table query" | "table update" | "table update-record" | "tasks ancestors" | "tasks assign" | "tasks comment" | "tasks comment-delete" | "tasks comment-list" | "tasks comment-update" | "tasks create" | "tasks delete" | "tasks depend" | "tasks dependencies" | "tasks duplicate" | "tasks events" | "tasks get" | "tasks import" | "tasks label-create" | "tasks label-delete" | "tasks label-list" | "tasks label-update" | "tasks list" | "tasks list-create" | "tasks list-delete" | "tasks list-get" | "tasks list-list" | "tasks list-update" | "tasks unassign" | "tasks undepend" | "tasks update" | "video generate" | "video models" | "video search" | "web fetch" | "web search" | "workspace add-member" | "workspace archive" | "workspace create" | "workspace delete" | "workspace get" | "workspace invitations" | "workspace invite" | "workspace list" | "workspace members" | "workspace remove-member" | "workspace revoke-invitation" | "workspace unarchive" | "workspace update" | "workspace update-member";
|
|
370
447
|
|
|
371
448
|
/**
|
|
372
449
|
* Generic, spec-driven command executor — the SDK twin of the CLI's `runSpec`.
|
|
@@ -657,19 +734,25 @@ declare class ChatsApi {
|
|
|
657
734
|
* - User env vars — listUserEnvVars / createUserEnvVar /
|
|
658
735
|
* deleteUserEnvVar / setupUserEnv /
|
|
659
736
|
* checkUserEnvSetup / syncUserEnv / checkUserEnvSync
|
|
660
|
-
* -
|
|
661
|
-
*
|
|
662
|
-
*
|
|
737
|
+
* - Exposures — expose / updateExposure / unexpose (expose an
|
|
738
|
+
* actor-owned machine into a workspace with a
|
|
739
|
+
* per-capability grant) + transfer (move ownership)
|
|
663
740
|
* - Pair — pair (daemon token bootstrap; bearer-overridden,
|
|
664
741
|
* mirrors the trigger-fire pattern)
|
|
665
742
|
*
|
|
666
|
-
*
|
|
667
|
-
*
|
|
743
|
+
* Authenticated verbs are split by surface: generic computer read/write covers
|
|
744
|
+
* metadata, while lifecycle, exec, files, tunnels, terminal, desktop, local
|
|
745
|
+
* inference, apps, and admin operations require their explicit computer action
|
|
746
|
+
* grants. See `backend/packages/computers/src/internal/computers/Computers.md`
|
|
668
747
|
* for the end-to-end computer model.
|
|
669
748
|
*/
|
|
670
749
|
|
|
671
750
|
interface ListComputersQuery {
|
|
672
|
-
|
|
751
|
+
/**
|
|
752
|
+
* Narrow the list to one organization the actor belongs to (its resourceId).
|
|
753
|
+
* Machines are actor-owned; omit for the actor's own machines + all its orgs'.
|
|
754
|
+
*/
|
|
755
|
+
organization?: string;
|
|
673
756
|
limit?: number;
|
|
674
757
|
/** Opaque pagination cursor — echo `pagination.next_cursor`. */
|
|
675
758
|
cursor?: string;
|
|
@@ -802,20 +885,29 @@ interface PairComputerResult {
|
|
|
802
885
|
domain: string;
|
|
803
886
|
}
|
|
804
887
|
/**
|
|
805
|
-
* One `computer_workspace`
|
|
806
|
-
* workspace
|
|
807
|
-
*
|
|
888
|
+
* One `computer_workspace` EXPOSURE — an actor-owned machine exposed INTO a
|
|
889
|
+
* workspace (Layer 2) with a per-capability grant. `workspace_resource_id` is
|
|
890
|
+
* the target workspace's public `ws_…` id; `capabilities` is the granted
|
|
891
|
+
* capability-slug subset.
|
|
808
892
|
*/
|
|
809
|
-
interface
|
|
893
|
+
interface ComputerExposure {
|
|
810
894
|
id: string;
|
|
811
895
|
computer_id: string;
|
|
812
896
|
workspace_id: string;
|
|
813
897
|
workspace_resource_id: string | null;
|
|
814
|
-
|
|
815
|
-
|
|
898
|
+
capabilities: string[];
|
|
899
|
+
label: string | null;
|
|
900
|
+
created_by_actor_id: string | null;
|
|
816
901
|
created_at: number;
|
|
817
902
|
updated_at: number;
|
|
818
903
|
}
|
|
904
|
+
/** `POST /v1/computers/{id}/expose` body. */
|
|
905
|
+
interface ExposeComputerInput {
|
|
906
|
+
/** Target workspace — public `ws_…` resourceId or slug. */
|
|
907
|
+
workspace_id: string;
|
|
908
|
+
/** Capability-slug subset to grant {local-inference, terminal, files, computer-use, tunnels, apps}. */
|
|
909
|
+
capabilities: string[];
|
|
910
|
+
}
|
|
819
911
|
declare class ComputersApi {
|
|
820
912
|
private readonly ctx;
|
|
821
913
|
constructor(ctx: HttpContext);
|
|
@@ -918,30 +1010,37 @@ declare class ComputersApi {
|
|
|
918
1010
|
syncUserEnv(id: string, username: string, opts?: CallOptions): Promise<Record<string, unknown>>;
|
|
919
1011
|
checkUserEnvSync(id: string, username: string, opts?: CallOptions): Promise<Record<string, unknown>>;
|
|
920
1012
|
/**
|
|
921
|
-
*
|
|
922
|
-
*
|
|
923
|
-
*
|
|
1013
|
+
* Expose an actor-owned machine INTO a workspace (Layer 2) with a
|
|
1014
|
+
* per-capability grant, so that workspace's members can use it. Requires
|
|
1015
|
+
* machine-admin and membership of the target workspace. Rejects a duplicate
|
|
1016
|
+
* exposure. (CLI verb: `computer add-exposure` — the bare `expose`/`unexpose`
|
|
1017
|
+
* verbs are the tunnel port commands.)
|
|
924
1018
|
*/
|
|
925
|
-
|
|
1019
|
+
expose(id: string, input: ExposeComputerInput, opts?: CallOptions): Promise<ComputerExposure>;
|
|
926
1020
|
/**
|
|
927
|
-
*
|
|
928
|
-
*
|
|
929
|
-
*
|
|
930
|
-
* membership of the target. Rejects the home workspace and duplicates.
|
|
1021
|
+
* Replace the capability grant on an existing exposure. `workspaceId` is the
|
|
1022
|
+
* exposed workspace's `ws_…` resourceId. Requires machine-admin.
|
|
1023
|
+
* (CLI verb: `computer update-exposure`.)
|
|
931
1024
|
*/
|
|
932
|
-
|
|
1025
|
+
updateExposure(id: string, workspaceId: string, capabilities: string[], opts?: CallOptions): Promise<ComputerExposure>;
|
|
933
1026
|
/**
|
|
934
|
-
* Stop
|
|
935
|
-
*
|
|
936
|
-
*
|
|
1027
|
+
* Stop exposing a machine into a workspace. `workspaceId` is the exposed
|
|
1028
|
+
* workspace's `ws_…` resourceId. Allowed for machine-admin OR an admin of the
|
|
1029
|
+
* exposed workspace. Idempotent. (CLI verb: `computer remove-exposure`.)
|
|
937
1030
|
*/
|
|
938
|
-
|
|
939
|
-
|
|
1031
|
+
unexpose(id: string, workspaceId: string, opts?: CallOptions): Promise<{
|
|
1032
|
+
unexposed: boolean;
|
|
940
1033
|
}>;
|
|
1034
|
+
/**
|
|
1035
|
+
* Transfer an actor-owned machine to a new owner (self, or an org the caller
|
|
1036
|
+
* administers). `owner` is the target profile's resourceId; existing workspace
|
|
1037
|
+
* exposures are kept. Requires machine-admin. (CLI verb: `computer transfer`.)
|
|
1038
|
+
*/
|
|
1039
|
+
transfer(id: string, owner: string, opts?: CallOptions): Promise<Computer>;
|
|
941
1040
|
/**
|
|
942
1041
|
* Redeem a one-time pair token for a long-lived computer identity. The
|
|
943
1042
|
* token itself is the auth — we swap the bearer for the token on this
|
|
944
|
-
* call only (same pattern as `
|
|
1043
|
+
* call only (same pattern as `automations.fire`).
|
|
945
1044
|
*
|
|
946
1045
|
* Used by `idapt up --token` to bootstrap a daemon. The request body is
|
|
947
1046
|
* snake_case; the response is wrapped in the standard `{data:{…}}`
|
|
@@ -1964,83 +2063,6 @@ declare class TablesApi {
|
|
|
1964
2063
|
}>;
|
|
1965
2064
|
}
|
|
1966
2065
|
|
|
1967
|
-
/**
|
|
1968
|
-
* TriggersApi — `/api/v1/triggers`.
|
|
1969
|
-
*
|
|
1970
|
-
* Triggers fire actions (run code, run chat) on events (webhook, schedule,
|
|
1971
|
-
* manual). The `fire` endpoint is unauthenticated — it validates the
|
|
1972
|
-
* per-trigger webhook secret instead of the bearer token. This SDK handles
|
|
1973
|
-
* both modes: regular calls use `this.ctx.key`; `fire` can be called with
|
|
1974
|
-
* an explicit secret override.
|
|
1975
|
-
*/
|
|
1976
|
-
|
|
1977
|
-
interface FireTriggerInput {
|
|
1978
|
-
/**
|
|
1979
|
-
* Webhook secret for this trigger. Overrides the client's `ap_` key.
|
|
1980
|
-
* Required when calling `fire` outside the creating user's session.
|
|
1981
|
-
*/
|
|
1982
|
-
secret: string;
|
|
1983
|
-
/** Optional context overrides forwarded to the action. */
|
|
1984
|
-
body?: Record<string, unknown>;
|
|
1985
|
-
}
|
|
1986
|
-
interface ListTriggerRunsQuery {
|
|
1987
|
-
limit?: number;
|
|
1988
|
-
/** Opaque pagination cursor — echo `pagination.next_cursor`. */
|
|
1989
|
-
cursor?: string;
|
|
1990
|
-
}
|
|
1991
|
-
interface ListTriggersQuery {
|
|
1992
|
-
workspace_id?: string;
|
|
1993
|
-
include_archived?: boolean;
|
|
1994
|
-
archived_only?: boolean;
|
|
1995
|
-
}
|
|
1996
|
-
interface BulkTriggerCostStatsQuery {
|
|
1997
|
-
workspace_id?: string;
|
|
1998
|
-
}
|
|
1999
|
-
declare class TriggersApi {
|
|
2000
|
-
private readonly ctx;
|
|
2001
|
-
constructor(ctx: HttpContext);
|
|
2002
|
-
list(query?: ListTriggersQuery, opts?: CallOptions): Promise<Trigger[]>;
|
|
2003
|
-
/**
|
|
2004
|
-
* Create a trigger. `workspace_id` is passed in the request BODY (alongside
|
|
2005
|
-
* the flat trigger definition) — it is not a query param. The request
|
|
2006
|
-
* body is flat: every scheduling field (`cron_expression`, …) and every
|
|
2007
|
-
* action field (`agent_id`, `prompt_template`, `file_id`, …) sits at the
|
|
2008
|
-
* top level — there are no nested `trigger_config` / `action_config`
|
|
2009
|
-
* objects any more.
|
|
2010
|
-
*
|
|
2011
|
-
* For a `webhook` trigger the response additionally carries a one-time
|
|
2012
|
-
* plaintext `secret` (use `TriggerWithSecret`); other trigger types
|
|
2013
|
-
* resolve to a plain `Trigger`.
|
|
2014
|
-
*/
|
|
2015
|
-
create(workspaceId: string, input: CreateTriggerInput, opts?: CallOptions): Promise<TriggerWithSecret | Trigger>;
|
|
2016
|
-
get(id: string, opts?: CallOptions): Promise<Trigger>;
|
|
2017
|
-
update(id: string, input: UpdateTriggerInput, opts?: CallOptions): Promise<Trigger>;
|
|
2018
|
-
delete(id: string, opts?: CallOptions): Promise<DeletedResponse>;
|
|
2019
|
-
archive(id: string, opts?: CallOptions): Promise<Trigger>;
|
|
2020
|
-
unarchive(id: string, opts?: CallOptions): Promise<Trigger>;
|
|
2021
|
-
/**
|
|
2022
|
-
* Fire a trigger via its webhook secret. This endpoint does NOT use the
|
|
2023
|
-
* client's `ap_` key — the bearer is the trigger's secret — so we build a
|
|
2024
|
-
* one-off HttpContext for it rather than mutating the shared one.
|
|
2025
|
-
*
|
|
2026
|
-
* Responds HTTP 202. The response identifies the fired trigger via `id`
|
|
2027
|
-
* only.
|
|
2028
|
-
*/
|
|
2029
|
-
fire(id: string, input: FireTriggerInput, opts?: CallOptions): Promise<{
|
|
2030
|
-
id: string;
|
|
2031
|
-
}>;
|
|
2032
|
-
/**
|
|
2033
|
-
* Rotate the webhook secret. Returns the trigger with a fresh one-time
|
|
2034
|
-
* plaintext `secret` populated (`TriggerWithSecret`). The old secret
|
|
2035
|
-
* immediately stops working.
|
|
2036
|
-
*/
|
|
2037
|
-
rotateSecret(id: string, opts?: CallOptions): Promise<TriggerWithSecret>;
|
|
2038
|
-
/** Recent fires + their success/error outcome. */
|
|
2039
|
-
listRuns(id: string, query?: ListTriggerRunsQuery, opts?: CallOptions): Promise<TriggerRun[]>;
|
|
2040
|
-
getCostStats(id: string, opts?: CallOptions): Promise<TriggerCostStats>;
|
|
2041
|
-
getCostStatsMap(query?: BulkTriggerCostStatsQuery, opts?: CallOptions): Promise<Record<string, TriggerCostStats>>;
|
|
2042
|
-
}
|
|
2043
|
-
|
|
2044
2066
|
/**
|
|
2045
2067
|
* UserApi — identity + usage.
|
|
2046
2068
|
*
|
|
@@ -2215,8 +2237,8 @@ declare class IdaptClient {
|
|
|
2215
2237
|
readonly chats: ChatsApi;
|
|
2216
2238
|
/** Workspaces CRUD + members + invitations + fork. */
|
|
2217
2239
|
readonly workspaces: WorkspacesApi;
|
|
2218
|
-
/**
|
|
2219
|
-
readonly
|
|
2240
|
+
/** Automations CRUD + fire, rotate-secret, runs. */
|
|
2241
|
+
readonly automations: AutomationsApi;
|
|
2220
2242
|
/** Computers CRUD + lifecycle + exec/tmux/sftp + ports + users + env + pair. */
|
|
2221
2243
|
readonly computers: ComputersApi;
|
|
2222
2244
|
/** Workspace secrets CRUD. */
|
|
@@ -2327,4 +2349,4 @@ declare class IdaptClient {
|
|
|
2327
2349
|
private navigate;
|
|
2328
2350
|
}
|
|
2329
2351
|
|
|
2330
|
-
export { type
|
|
2352
|
+
export { type ListChatsQuery as $, type AddMemberInput as A, type BlobMeta as B, COMMAND_BINDINGS as C, DatastoreApi as D, type DatastoreSetOptions as E, type DeleteInvitationResult as F, type DeletedResult as G, type DeployFunctionFile as H, IdaptClient as I, type DeployFunctionInput as J, DocsApi as K, type ExecCommandInput as L, type ExecuteCommandOptions as M, FilesApi as N, type FireAutomationInput as O, type FunctionPermissionInput as P, FunctionsApi as Q, type GenerateImageInput as R, GuideApi as S, type GuideContent as T, type IdaptClientDeps as U, ImagesApi as V, type InstallStoreItemInput as W, type InvokeFunctionInput as X, type ListAgentsQuery as Y, type ListApiKeysQuery as Z, type ListAutomationRunsQuery as _, AgentsApi as a, type UpdateProviderEndpointInput as a$, type ListComputersQuery as a0, type ListFilesQuery as a1, type ListFunctionRunsQuery as a2, type ListFunctionsQuery as a3, type ListMessagesQuery as a4, type ListNotificationsQuery as a5, type ListResult as a6, type ListRunsQuery as a7, type ListSharedWithMeQuery as a8, type ListSharesQuery as a9, type SendNotificationInput as aA, type SendNotificationResult as aB, SettingsApi as aC, type SftpInput as aD, type SftpListResult as aE, type SftpOp as aF, type SftpUploadInput as aG, SharingApi as aH, type SpeakInput as aI, type SseEvent as aJ, StoreApi as aK, type SubscribeOptions as aL, SubscriptionApi as aM, type TableQuery as aN, TablesApi as aO, type TmuxInput as aP, type TmuxOp as aQ, type TranscribeInput as aR, type UpdateAgentInput as aS, type UpdateApiKeyInput as aT, type UpdateChatInput as aU, type UpdateCollectionInput as aV, type UpdateComputerInput as aW, type UpdateComputerUserInput as aX, type UpdateFunctionInput as aY, type UpdateMemberInput as aZ, type UpdateNotificationInput as a_, type ListUsageHistoryQuery as aa, ModelsApi as ab, type NotificationAudience as ac, type NotificationPreferenceUpdate as ad, NotificationsApi as ae, type PairComputerInput as af, type PairComputerResult as ag, type PatchFileInput as ah, type PatchPortInput as ai, type PresenceEntry as aj, type PresenceHeartbeatOptions as ak, type ProviderEndpointModelMappingInput as al, ProviderEndpointsApi as am, RealtimeApi as an, type RealtimeEvent as ao, type RemoveShareInput as ap, type RepromptMessageInput as aq, type RotateApiKeyInput as ar, type RotateApiKeyResult as as, type RunFileInput as at, type RunFunctionInput as au, SearchApi as av, type SearchInput as aw, type SearchStoreQuery as ax, SecretsApi as ay, type SendMessageInput as az, ApiKeysApi as b, type UpdateSecretInput as b0, type UpdateSettingsInput as b1, type UpdateShareInput as b2, type UpdateWorkspaceInput as b3, type UploadInput as b4, UserApi as b5, type V1CommandName as b6, WebSearchApi as b7, type WebSearchInput as b8, WorkspacesApi as b9, type WritableMemberRole as ba, awaitOperation as bb, executeCommand as bc, getFileBlob as bd, getFileText as be, listFiles as bf, AudioApi as c, AutomationsApi as d, BlobsApi as e, type BlobsListOptions as f, type ChannelHandle as g, ChatsApi as h, type CommandBinding as i, ComputersApi as j, type CreateAgentInput as k, type CreateApiKeyInput as l, type CreateChatInput as m, type CreateCollectionInput as n, type CreateComputerInput as o, type CreateComputerUserInput as p, type CreateFolderInput as q, type CreateFunctionInput as r, type CreateInvitationInput as s, type CreateInvitationResult as t, type CreateProviderEndpointInput as u, type CreateSecretInput as v, type CreateShareInput as w, type CreateUserEnvVarInput as x, type CreateWorkspaceInput as y, type DatastoreListOptions as z };
|