@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.
@@ -338,15 +338,6 @@ async function moveFile(ctx, id, parentId, opts = {}) {
338
338
  });
339
339
  return res.data;
340
340
  }
341
- async function runFile(ctx, id, input = {}, opts = {}) {
342
- const res = await request(ctx, {
343
- method: "POST",
344
- path: `/api/v1/drive/files/${id}/run`,
345
- body: input,
346
- signal: opts.signal
347
- });
348
- return res.data;
349
- }
350
341
 
351
342
  // ../sdk/src/api/agents.ts
352
343
  var AgentsApi = class {
@@ -475,6 +466,22 @@ var AiGatewayApi = class {
475
466
  });
476
467
  return res.data;
477
468
  }
469
+ /** Preview the provider route order for a model without spending tokens. */
470
+ async routePreview(input) {
471
+ const { signal, modelId, workspaceId, promptTokens, requiredCapabilities } = input;
472
+ const res = await request(this.ctx, {
473
+ method: "POST",
474
+ path: "/api/v1/ai-gateway/routing-preview",
475
+ body: {
476
+ model_id: modelId,
477
+ ...workspaceId ? { workspace_id: workspaceId } : {},
478
+ ...promptTokens !== void 0 ? { prompt_tokens: promptTokens } : {},
479
+ ...requiredCapabilities ? { required_capabilities: requiredCapabilities } : {}
480
+ },
481
+ signal
482
+ });
483
+ return res.data;
484
+ }
478
485
  };
479
486
 
480
487
  // ../sdk/src/api/api-keys.ts
@@ -543,251 +550,168 @@ var AudioApi = class {
543
550
  constructor(ctx) {
544
551
  this.ctx = ctx;
545
552
  }
546
- /** Text-to-speech. Responds HTTP 201 with the written file ref under `data`. */
547
- async speak(input, opts = {}) {
553
+ /** List the available TTS / transcription models. */
554
+ async listModels(opts = {}) {
548
555
  const res = await request(this.ctx, {
549
- method: "POST",
550
- path: "/api/v1/audio/speech",
551
- body: input,
556
+ method: "GET",
557
+ path: "/api/v1/audio/models",
552
558
  signal: opts.signal
553
559
  });
554
560
  return res.data;
555
561
  }
556
- async transcribe(input, opts = {}) {
557
- const form = new FormData();
558
- const filename = input.filename ?? (input.file instanceof File ? input.file.name : "audio");
559
- form.set("file", input.file, filename);
560
- if (input.model) form.set("model", input.model);
561
- if (input.language) form.set("language", input.language);
562
+ /** List the TTS voice catalog (filter by language / gender). */
563
+ async listVoices(input = {}, opts = {}) {
562
564
  const res = await request(this.ctx, {
563
- method: "POST",
564
- path: "/api/v1/audio/transcriptions",
565
- bodyRaw: form,
565
+ method: "GET",
566
+ path: "/api/v1/audio/voices",
567
+ query: input,
566
568
  signal: opts.signal
567
569
  });
568
570
  return res.data;
569
571
  }
570
- async *streamSpeech(input, opts = {}) {
571
- const res = await requestRaw(this.ctx, {
572
- method: "POST",
573
- path: "/api/v1/audio/speech/stream",
574
- body: input,
575
- signal: opts.signal,
576
- expectJson: false
577
- });
578
- yield* parseSpeechStream(res, opts.signal);
579
- }
580
- async *streamTranscribe(input, opts = {}) {
581
- const form = new FormData();
582
- const filename = input.filename ?? (input.file instanceof File ? input.file.name : "audio");
583
- form.set("file", input.file, filename);
584
- if (input.model) form.set("model", input.model);
585
- if (input.language) form.set("language", input.language);
586
- const res = await requestRaw(this.ctx, {
587
- method: "POST",
588
- path: "/api/v1/audio/transcriptions/stream",
589
- bodyRaw: form,
590
- signal: opts.signal,
591
- expectJson: false
592
- });
593
- yield* parseTranscriptionStream(res, opts.signal);
594
- }
595
572
  };
596
- async function* parseSpeechStream(response, signal) {
597
- for await (const frame of parseSse(response, signal)) {
598
- const payload = safeJson(frame.data);
599
- if (frame.event === "chunk") {
600
- const audio = payload?.audio;
601
- if (typeof audio === "string") yield { type: "chunk", audio };
602
- } else if (frame.event === "done") {
603
- const event = { type: "done" };
604
- const totalBytes = numberOrUndefined(payload?.totalBytes);
605
- const durationMs = numberOrUndefined(payload?.durationMs);
606
- const charCount = numberOrUndefined(payload?.charCount);
607
- if (totalBytes !== void 0) event.total_bytes = totalBytes;
608
- if (durationMs !== void 0) event.duration_ms = durationMs;
609
- if (charCount !== void 0) event.char_count = charCount;
610
- if (typeof payload?.cached === "boolean") event.cached = payload.cached;
611
- yield event;
612
- } else if (frame.event === "error") {
613
- yield errorEvent(payload);
614
- }
615
- }
616
- }
617
- async function* parseTranscriptionStream(response, signal) {
618
- for await (const frame of parseSse(response, signal)) {
619
- const payload = safeJson(frame.data);
620
- if (frame.event === "partial") {
621
- const text = payload?.text;
622
- if (typeof text === "string") yield { type: "partial", text };
623
- } else if (frame.event === "final") {
624
- const text = payload?.text;
625
- if (typeof text === "string") yield { type: "final", text };
626
- } else if (frame.event === "error") {
627
- yield errorEvent(payload);
628
- }
629
- }
630
- }
631
- async function* parseSse(response, signal) {
632
- if (!response.body) return;
633
- const reader = response.body.getReader();
634
- const decoder = new TextDecoder();
635
- let buffer = "";
636
- try {
637
- while (true) {
638
- if (signal?.aborted) return;
639
- const { done, value } = await reader.read();
640
- if (done) break;
641
- buffer += decoder.decode(value, { stream: true }).replace(/\r\n/g, "\n");
642
- while (true) {
643
- const boundary = buffer.indexOf("\n\n");
644
- if (boundary === -1) break;
645
- const block = buffer.slice(0, boundary);
646
- buffer = buffer.slice(boundary + 2);
647
- const parsed = parseSseBlock(block);
648
- if (parsed) yield parsed;
649
- }
650
- }
651
- } finally {
652
- try {
653
- reader.releaseLock();
654
- } catch {
655
- }
656
- }
657
- }
658
- function parseSseBlock(block) {
659
- let event = "message";
660
- let data = "";
661
- for (const line of block.split("\n")) {
662
- if (!line) continue;
663
- if (line.startsWith("event: ")) event = line.slice(7).trim();
664
- else if (line.startsWith("event:")) event = line.slice(6).trim();
665
- else if (line.startsWith("data: ")) data += line.slice(6);
666
- else if (line.startsWith("data:")) data += line.slice(5);
667
- }
668
- if (!data && event === "message") return null;
669
- return { event, data };
670
- }
671
- function safeJson(raw) {
672
- try {
673
- return JSON.parse(raw);
674
- } catch {
675
- return null;
676
- }
677
- }
678
- function numberOrUndefined(value) {
679
- return typeof value === "number" && Number.isFinite(value) ? value : void 0;
680
- }
681
- function errorEvent(payload) {
682
- const event = {
683
- type: "error"
684
- };
685
- const status = numberOrUndefined(payload?.status);
686
- const retryAfter = numberOrUndefined(payload?.retryAfter);
687
- if (status !== void 0) event.status = status;
688
- if (retryAfter !== void 0) event.retry_after = retryAfter;
689
- return event;
690
- }
691
573
 
692
- // ../sdk/src/api/blobs.ts
693
- var enc = encodeURIComponent;
694
- var BlobsApi = class {
574
+ // ../sdk/src/api/automations.ts
575
+ var AutomationsApi = class {
695
576
  constructor(ctx) {
696
577
  this.ctx = ctx;
697
578
  }
698
- /** List objects in a namespace (prefix-filterable). */
699
- async list(namespace, opts = {}) {
700
- const q = new URLSearchParams();
701
- if (opts.prefix) q.set("prefix", opts.prefix);
702
- if (opts.cursor) q.set("cursor", opts.cursor);
703
- if (opts.limit) q.set("limit", String(opts.limit));
704
- const qs = q.toString() ? `?${q.toString()}` : "";
579
+ // ---------------------------------------------------------------------------
580
+ // CRUD
581
+ // ---------------------------------------------------------------------------
582
+ async list(query = {}, opts = {}) {
705
583
  const res = await request(this.ctx, {
706
584
  method: "GET",
707
- path: `/api/v1/blobs/${enc(namespace)}${qs}`,
585
+ path: "/api/v1/automations",
586
+ query,
708
587
  signal: opts.signal
709
588
  });
710
589
  return res.data;
711
590
  }
712
591
  /**
713
- * Upload (upsert) an object's bytes. Returns its metadata.
592
+ * Create an automation. `workspace_id` is passed in the request BODY
593
+ * alongside the flat automation definition — it is not a query param. The request
594
+ * body is flat: every scheduling field (`cron_expression`, …) and agent-run
595
+ * action field (`agent_id`, `prompt_template`, …) sits at the top level —
596
+ * there are no nested `trigger_config` / `action_config` objects.
714
597
  *
715
- * Sent as `multipart/form-data` (the bytes ride a `file` part, with an
716
- * optional `content_type` field) the same upload convention as
717
- * `client.files.upload`, so it flows through the one multipart transport and
718
- * is reachable identically via `client.call("blobs put", …)`. The SDK leaves
719
- * `Content-Type` unset so the runtime picks the multipart boundary.
598
+ * For a webhook automation the response additionally carries a one-time
599
+ * plaintext `secret` (use `AutomationWithSecret`); other automation types
600
+ * resolve to a plain `Automation`.
720
601
  */
721
- async put(namespace, key, content, contentType, opts = {}) {
722
- const ct = contentType ?? (content instanceof Blob && content.type ? content.type : "application/octet-stream");
723
- const blob = content instanceof Blob ? content : new Blob([content], { type: ct });
724
- const form = new FormData();
725
- form.set("file", blob, key);
726
- form.set("content_type", ct);
602
+ async create(workspaceId, input, opts = {}) {
727
603
  const res = await request(this.ctx, {
728
604
  method: "POST",
729
- path: `/api/v1/blobs/${enc(namespace)}/${enc(key)}`,
730
- // No explicit Content-Type the runtime sets the multipart boundary.
731
- bodyRaw: form,
605
+ path: "/api/v1/automations",
606
+ body: { workspace_id: workspaceId, ...input },
732
607
  signal: opts.signal
733
608
  });
734
609
  return res.data;
735
610
  }
736
- /**
737
- * Download an object's raw bytes (preserving its stored Content-Type).
738
- *
739
- * `GET /blobs/:ns/:key` returns JSON metadata + a signed URL by default (the
740
- * agent/CLI form); `?download=true` is the raw-bytes escape hatch this facade
741
- * uses. For the JSON reference instead, call `client.call("blobs get", …)`.
742
- */
743
- async get(namespace, key, opts = {}) {
744
- const res = await requestRaw(this.ctx, {
611
+ async get(id, opts = {}) {
612
+ const res = await request(this.ctx, {
745
613
  method: "GET",
746
- path: `/api/v1/blobs/${enc(namespace)}/${enc(key)}?download=true`,
747
- signal: opts.signal,
748
- expectJson: false
614
+ path: `/api/v1/automations/${id}`,
615
+ signal: opts.signal
749
616
  });
750
- const blob = await res.blob();
751
- return {
752
- blob,
753
- contentType: res.headers.get("content-type") ?? "application/octet-stream"
754
- };
617
+ return res.data;
755
618
  }
756
- /** Read an object's metadata (no bytes). */
757
- async head(namespace, key, opts = {}) {
619
+ async update(id, input, opts = {}) {
758
620
  const res = await request(this.ctx, {
759
- method: "GET",
760
- path: `/api/v1/blobs/${enc(namespace)}/${enc(key)}/meta`,
621
+ method: "PATCH",
622
+ path: `/api/v1/automations/${id}`,
623
+ body: input,
761
624
  signal: opts.signal
762
625
  });
763
626
  return res.data;
764
627
  }
765
- /** Delete an object (idempotent). */
766
- async delete(namespace, key, opts = {}) {
628
+ async delete(id, opts = {}) {
767
629
  return request(this.ctx, {
768
630
  method: "DELETE",
769
- path: `/api/v1/blobs/${enc(namespace)}/${enc(key)}`,
631
+ path: `/api/v1/automations/${id}`,
632
+ signal: opts.signal
633
+ });
634
+ }
635
+ async archive(id, opts = {}) {
636
+ const res = await request(this.ctx, {
637
+ method: "POST",
638
+ path: `/api/v1/automations/${id}/archive`,
639
+ signal: opts.signal
640
+ });
641
+ return res.data;
642
+ }
643
+ async unarchive(id, opts = {}) {
644
+ const res = await request(this.ctx, {
645
+ method: "POST",
646
+ path: `/api/v1/automations/${id}/unarchive`,
647
+ signal: opts.signal
648
+ });
649
+ return res.data;
650
+ }
651
+ // ---------------------------------------------------------------------------
652
+ // Fire + rotate-secret + runs
653
+ // ---------------------------------------------------------------------------
654
+ /**
655
+ * Fire an automation via its webhook secret. This endpoint does NOT use the
656
+ * client's `ap_` key — the bearer is the automation's secret — so we build a
657
+ * one-off HttpContext for it rather than mutating the shared one.
658
+ *
659
+ * Responds HTTP 202. The response identifies the fired automation via `id`
660
+ * only.
661
+ */
662
+ async fire(id, input, opts = {}) {
663
+ const localCtx = {
664
+ apiUrl: this.ctx.apiUrl,
665
+ key: input.secret,
666
+ fetch: this.ctx.fetch
667
+ };
668
+ const res = await request(localCtx, {
669
+ method: "POST",
670
+ path: `/api/v1/automations/${id}/fire`,
671
+ body: input.body ?? {},
770
672
  signal: opts.signal
771
673
  });
674
+ return res.data;
772
675
  }
773
- /** Mint a time-limited direct-download URL for an object. */
774
- async createSignedUrl(namespace, key, expiresIn, opts = {}) {
676
+ /**
677
+ * Rotate the webhook secret. Returns the automation with a fresh one-time
678
+ * plaintext `secret` populated (`AutomationWithSecret`). The old secret
679
+ * immediately stops working.
680
+ */
681
+ async rotateSecret(id, opts = {}) {
775
682
  const res = await request(this.ctx, {
776
683
  method: "POST",
777
- path: `/api/v1/blobs/${enc(namespace)}/${enc(key)}/signed-url`,
778
- body: { expires_in: expiresIn },
684
+ path: `/api/v1/automations/${id}/rotate-secret`,
685
+ signal: opts.signal
686
+ });
687
+ return res.data;
688
+ }
689
+ /** Recent fires + their success/error outcome. */
690
+ async listRuns(id, query = {}, opts = {}) {
691
+ const res = await request(this.ctx, {
692
+ method: "GET",
693
+ path: `/api/v1/automations/${id}/runs`,
694
+ query,
695
+ signal: opts.signal
696
+ });
697
+ return res.data;
698
+ }
699
+ async getCostStats(id, opts = {}) {
700
+ const res = await request(this.ctx, {
701
+ method: "GET",
702
+ path: `/api/v1/automations/${id}/cost-stats`,
779
703
  signal: opts.signal
780
704
  });
781
705
  return res.data;
782
706
  }
783
- /** List the blob namespaces in the workspace. */
784
- async listNamespaces(opts = {}) {
707
+ async getCostStatsMap(query = {}, opts = {}) {
785
708
  const res = await request(this.ctx, {
786
709
  method: "GET",
787
- path: "/api/v1/blobs",
710
+ path: "/api/v1/automations/cost-stats",
711
+ query,
788
712
  signal: opts.signal
789
713
  });
790
- return res.data.map((n) => n.namespace);
714
+ return res.data.by_id;
791
715
  }
792
716
  };
793
717
 
@@ -853,7 +777,7 @@ function buildRequest(binding, path, rest, signal) {
853
777
  return base;
854
778
  }
855
779
  }
856
- async function* parseSse2(response, signal) {
780
+ async function* parseSse(response, signal) {
857
781
  if (!response.body) return;
858
782
  const reader = response.body.getReader();
859
783
  const decoder = new TextDecoder();
@@ -869,7 +793,7 @@ async function* parseSse2(response, signal) {
869
793
  if (boundary === -1) break;
870
794
  const block = buffer.slice(0, boundary);
871
795
  buffer = buffer.slice(boundary + 2);
872
- const frame = parseSseBlock2(block);
796
+ const frame = parseSseBlock(block);
873
797
  if (frame) yield frame;
874
798
  }
875
799
  }
@@ -880,7 +804,7 @@ async function* parseSse2(response, signal) {
880
804
  }
881
805
  }
882
806
  }
883
- function parseSseBlock2(block) {
807
+ function parseSseBlock(block) {
884
808
  let event = "message";
885
809
  let data = "";
886
810
  for (const line of block.split("\n")) {
@@ -924,7 +848,7 @@ async function executeCommand(binding, args = {}, ctx, opts = {}) {
924
848
  if (binding.responseKind === "binary") {
925
849
  if (isSseBinding(binding) && !opts.bufferBinary) {
926
850
  const res = await requestRaw(ctx, { ...req, expectJson: false });
927
- return parseSse2(res, opts.signal);
851
+ return parseSse(res, opts.signal);
928
852
  }
929
853
  return await request(ctx, { ...req, expectBlob: true });
930
854
  }
@@ -1098,6 +1022,15 @@ var COMMAND_BINDINGS = {
1098
1022
  "responseKind": "list",
1099
1023
  "async": false
1100
1024
  },
1025
+ "ai-gateway route-preview": {
1026
+ "command": "ai-gateway route-preview",
1027
+ "method": "POST",
1028
+ "path": "/ai-gateway/routing-preview",
1029
+ "pathParams": [],
1030
+ "argLocation": "body",
1031
+ "responseKind": "single",
1032
+ "async": false
1033
+ },
1101
1034
  "ai-gateway usage": {
1102
1035
  "command": "ai-gateway usage",
1103
1036
  "method": "GET",
@@ -1185,48 +1118,6 @@ var COMMAND_BINDINGS = {
1185
1118
  "responseKind": "single",
1186
1119
  "async": false
1187
1120
  },
1188
- "audio speak": {
1189
- "command": "audio speak",
1190
- "method": "POST",
1191
- "path": "/audio/speech",
1192
- "pathParams": [],
1193
- "argLocation": "body",
1194
- "responseKind": "created",
1195
- "async": true
1196
- },
1197
- "audio speak-stream": {
1198
- "command": "audio speak-stream",
1199
- "method": "POST",
1200
- "path": "/audio/speech/stream",
1201
- "pathParams": [],
1202
- "argLocation": "body",
1203
- "responseKind": "binary",
1204
- "async": false,
1205
- "binaryContentTypes": [
1206
- "text/event-stream"
1207
- ]
1208
- },
1209
- "audio transcribe": {
1210
- "command": "audio transcribe",
1211
- "method": "POST",
1212
- "path": "/audio/transcriptions",
1213
- "pathParams": [],
1214
- "argLocation": "multipart",
1215
- "responseKind": "single",
1216
- "async": true
1217
- },
1218
- "audio transcribe-stream": {
1219
- "command": "audio transcribe-stream",
1220
- "method": "POST",
1221
- "path": "/audio/transcriptions/stream",
1222
- "pathParams": [],
1223
- "argLocation": "multipart",
1224
- "responseKind": "binary",
1225
- "async": false,
1226
- "binaryContentTypes": [
1227
- "text/event-stream"
1228
- ]
1229
- },
1230
1121
  "audio voices": {
1231
1122
  "command": "audio voices",
1232
1123
  "method": "GET",
@@ -1236,89 +1127,179 @@ var COMMAND_BINDINGS = {
1236
1127
  "responseKind": "list",
1237
1128
  "async": false
1238
1129
  },
1239
- "blobs delete": {
1240
- "command": "blobs delete",
1241
- "method": "DELETE",
1242
- "path": "/blobs/:namespace/:key",
1130
+ "automation archive": {
1131
+ "command": "automation archive",
1132
+ "method": "POST",
1133
+ "path": "/automations/:id/archive",
1243
1134
  "pathParams": [
1244
- "namespace",
1245
- "key"
1135
+ "id"
1246
1136
  ],
1247
1137
  "argLocation": "body",
1248
- "responseKind": "deleted",
1138
+ "responseKind": "single",
1249
1139
  "async": false
1250
1140
  },
1251
- "blobs get": {
1252
- "command": "blobs get",
1141
+ "automation cancel-run": {
1142
+ "command": "automation cancel-run",
1143
+ "method": "POST",
1144
+ "path": "/automations/:id/runs/:runId/cancel",
1145
+ "pathParams": [
1146
+ "id",
1147
+ "runId"
1148
+ ],
1149
+ "argLocation": "body",
1150
+ "responseKind": "single",
1151
+ "async": true
1152
+ },
1153
+ "automation cost-stats": {
1154
+ "command": "automation cost-stats",
1253
1155
  "method": "GET",
1254
- "path": "/blobs/:namespace/:key",
1156
+ "path": "/automations/:id/cost-stats",
1255
1157
  "pathParams": [
1256
- "namespace",
1257
- "key"
1158
+ "id"
1258
1159
  ],
1259
1160
  "argLocation": "query",
1260
1161
  "responseKind": "single",
1261
1162
  "async": false
1262
1163
  },
1263
- "blobs head": {
1264
- "command": "blobs head",
1164
+ "automation cost-stats-all": {
1165
+ "command": "automation cost-stats-all",
1265
1166
  "method": "GET",
1266
- "path": "/blobs/:namespace/:key/meta",
1267
- "pathParams": [
1268
- "namespace",
1269
- "key"
1270
- ],
1167
+ "path": "/automations/cost-stats",
1168
+ "pathParams": [],
1271
1169
  "argLocation": "query",
1272
1170
  "responseKind": "single",
1273
1171
  "async": false
1274
1172
  },
1275
- "blobs list": {
1276
- "command": "blobs list",
1173
+ "automation create": {
1174
+ "command": "automation create",
1175
+ "method": "POST",
1176
+ "path": "/automations",
1177
+ "pathParams": [],
1178
+ "argLocation": "body",
1179
+ "responseKind": "created",
1180
+ "async": false
1181
+ },
1182
+ "automation delete": {
1183
+ "command": "automation delete",
1184
+ "method": "DELETE",
1185
+ "path": "/automations/:id",
1186
+ "pathParams": [
1187
+ "id"
1188
+ ],
1189
+ "argLocation": "body",
1190
+ "responseKind": "deleted",
1191
+ "async": false
1192
+ },
1193
+ "automation fire": {
1194
+ "command": "automation fire",
1195
+ "method": "POST",
1196
+ "path": "/automations/:id/fire",
1197
+ "pathParams": [
1198
+ "id"
1199
+ ],
1200
+ "argLocation": "body",
1201
+ "responseKind": "created",
1202
+ "async": true
1203
+ },
1204
+ "automation get": {
1205
+ "command": "automation get",
1277
1206
  "method": "GET",
1278
- "path": "/blobs/:namespace",
1207
+ "path": "/automations/:id",
1279
1208
  "pathParams": [
1280
- "namespace"
1209
+ "id"
1281
1210
  ],
1282
1211
  "argLocation": "query",
1283
- "responseKind": "list",
1212
+ "responseKind": "single",
1284
1213
  "async": false
1285
1214
  },
1286
- "blobs namespaces": {
1287
- "command": "blobs namespaces",
1215
+ "automation list": {
1216
+ "command": "automation list",
1288
1217
  "method": "GET",
1289
- "path": "/blobs",
1218
+ "path": "/automations",
1290
1219
  "pathParams": [],
1291
1220
  "argLocation": "query",
1292
1221
  "responseKind": "list",
1293
1222
  "async": false
1294
1223
  },
1295
- "blobs put": {
1296
- "command": "blobs put",
1224
+ "automation retry-run": {
1225
+ "command": "automation retry-run",
1297
1226
  "method": "POST",
1298
- "path": "/blobs/:namespace/:key",
1227
+ "path": "/automations/:id/runs/:runId/retry",
1299
1228
  "pathParams": [
1300
- "namespace",
1301
- "key"
1229
+ "id",
1230
+ "runId"
1302
1231
  ],
1303
- "argLocation": "multipart",
1232
+ "argLocation": "body",
1304
1233
  "responseKind": "single",
1305
- "async": false
1234
+ "async": true
1306
1235
  },
1307
- "blobs signed-url": {
1308
- "command": "blobs signed-url",
1236
+ "automation rotate-secret": {
1237
+ "command": "automation rotate-secret",
1309
1238
  "method": "POST",
1310
- "path": "/blobs/:namespace/:key/signed-url",
1239
+ "path": "/automations/:id/rotate-secret",
1311
1240
  "pathParams": [
1312
- "namespace",
1313
- "key"
1241
+ "id"
1314
1242
  ],
1315
1243
  "argLocation": "body",
1316
1244
  "responseKind": "single",
1317
1245
  "async": false
1318
1246
  },
1319
- "browser-app create": {
1320
- "command": "browser-app create",
1321
- "method": "POST",
1247
+ "automation runs": {
1248
+ "command": "automation runs",
1249
+ "method": "GET",
1250
+ "path": "/automations/:id/runs",
1251
+ "pathParams": [
1252
+ "id"
1253
+ ],
1254
+ "argLocation": "query",
1255
+ "responseKind": "list",
1256
+ "async": false
1257
+ },
1258
+ "automation runs-all": {
1259
+ "command": "automation runs-all",
1260
+ "method": "GET",
1261
+ "path": "/automations/runs",
1262
+ "pathParams": [],
1263
+ "argLocation": "query",
1264
+ "responseKind": "list",
1265
+ "async": false
1266
+ },
1267
+ "automation test-fire": {
1268
+ "command": "automation test-fire",
1269
+ "method": "POST",
1270
+ "path": "/automations/:id/test-fire",
1271
+ "pathParams": [
1272
+ "id"
1273
+ ],
1274
+ "argLocation": "body",
1275
+ "responseKind": "single",
1276
+ "async": true
1277
+ },
1278
+ "automation unarchive": {
1279
+ "command": "automation unarchive",
1280
+ "method": "POST",
1281
+ "path": "/automations/:id/unarchive",
1282
+ "pathParams": [
1283
+ "id"
1284
+ ],
1285
+ "argLocation": "body",
1286
+ "responseKind": "single",
1287
+ "async": false
1288
+ },
1289
+ "automation update": {
1290
+ "command": "automation update",
1291
+ "method": "PATCH",
1292
+ "path": "/automations/:id",
1293
+ "pathParams": [
1294
+ "id"
1295
+ ],
1296
+ "argLocation": "body",
1297
+ "responseKind": "single",
1298
+ "async": false
1299
+ },
1300
+ "browser-app create": {
1301
+ "command": "browser-app create",
1302
+ "method": "POST",
1322
1303
  "path": "/browser-apps",
1323
1304
  "pathParams": [],
1324
1305
  "argLocation": "body",
@@ -1700,6 +1681,17 @@ var COMMAND_BINDINGS = {
1700
1681
  "responseKind": "single",
1701
1682
  "async": false
1702
1683
  },
1684
+ "computer add-exposure": {
1685
+ "command": "computer add-exposure",
1686
+ "method": "POST",
1687
+ "path": "/computers/:id/expose",
1688
+ "pathParams": [
1689
+ "id"
1690
+ ],
1691
+ "argLocation": "body",
1692
+ "responseKind": "created",
1693
+ "async": false
1694
+ },
1703
1695
  "computer add-local-model": {
1704
1696
  "command": "computer add-local-model",
1705
1697
  "method": "POST",
@@ -1760,12 +1752,12 @@ var COMMAND_BINDINGS = {
1760
1752
  },
1761
1753
  "computer app-external": {
1762
1754
  "command": "computer app-external",
1763
- "method": "POST",
1755
+ "method": "GET",
1764
1756
  "path": "/computers/:id/apps/external",
1765
1757
  "pathParams": [
1766
1758
  "id"
1767
1759
  ],
1768
- "argLocation": "body",
1760
+ "argLocation": "query",
1769
1761
  "responseKind": "single",
1770
1762
  "async": false
1771
1763
  },
@@ -1990,7 +1982,7 @@ var COMMAND_BINDINGS = {
1990
1982
  "computer download": {
1991
1983
  "command": "computer download",
1992
1984
  "method": "GET",
1993
- "path": "/computers/:id/sftp/download",
1985
+ "path": "/computers/:id/fs/download",
1994
1986
  "pathParams": [
1995
1987
  "id"
1996
1988
  ],
@@ -2005,7 +1997,7 @@ var COMMAND_BINDINGS = {
2005
1997
  "computer download-to-drive": {
2006
1998
  "command": "computer download-to-drive",
2007
1999
  "method": "POST",
2008
- "path": "/computers/:id/sftp/download",
2000
+ "path": "/computers/:id/fs/download",
2009
2001
  "pathParams": [
2010
2002
  "id"
2011
2003
  ],
@@ -2044,6 +2036,17 @@ var COMMAND_BINDINGS = {
2044
2036
  "responseKind": "single",
2045
2037
  "async": false
2046
2038
  },
2039
+ "computer fs": {
2040
+ "command": "computer fs",
2041
+ "method": "POST",
2042
+ "path": "/computers/:id/fs",
2043
+ "pathParams": [
2044
+ "id"
2045
+ ],
2046
+ "argLocation": "body",
2047
+ "responseKind": "single",
2048
+ "async": false
2049
+ },
2047
2050
  "computer get": {
2048
2051
  "command": "computer get",
2049
2052
  "method": "GET",
@@ -2078,28 +2081,6 @@ var COMMAND_BINDINGS = {
2078
2081
  "responseKind": "single",
2079
2082
  "async": false
2080
2083
  },
2081
- "computer link": {
2082
- "command": "computer link",
2083
- "method": "POST",
2084
- "path": "/computers/:id/workspace-links",
2085
- "pathParams": [
2086
- "id"
2087
- ],
2088
- "argLocation": "body",
2089
- "responseKind": "created",
2090
- "async": false
2091
- },
2092
- "computer links": {
2093
- "command": "computer links",
2094
- "method": "GET",
2095
- "path": "/computers/:id/workspace-links",
2096
- "pathParams": [
2097
- "id"
2098
- ],
2099
- "argLocation": "query",
2100
- "responseKind": "single",
2101
- "async": false
2102
- },
2103
2084
  "computer list": {
2104
2085
  "command": "computer list",
2105
2086
  "method": "GET",
@@ -2162,6 +2143,18 @@ var COMMAND_BINDINGS = {
2162
2143
  "responseKind": "single",
2163
2144
  "async": false
2164
2145
  },
2146
+ "computer remove-exposure": {
2147
+ "command": "computer remove-exposure",
2148
+ "method": "DELETE",
2149
+ "path": "/computers/:id/expose/:workspace_id",
2150
+ "pathParams": [
2151
+ "id",
2152
+ "workspace_id"
2153
+ ],
2154
+ "argLocation": "body",
2155
+ "responseKind": "single",
2156
+ "async": false
2157
+ },
2165
2158
  "computer remove-local-model": {
2166
2159
  "command": "computer remove-local-model",
2167
2160
  "method": "DELETE",
@@ -2174,6 +2167,15 @@ var COMMAND_BINDINGS = {
2174
2167
  "responseKind": "single",
2175
2168
  "async": false
2176
2169
  },
2170
+ "computer run": {
2171
+ "command": "computer run",
2172
+ "method": "POST",
2173
+ "path": "/computers/run",
2174
+ "pathParams": [],
2175
+ "argLocation": "body",
2176
+ "responseKind": "single",
2177
+ "async": true
2178
+ },
2177
2179
  "computer set-ports": {
2178
2180
  "command": "computer set-ports",
2179
2181
  "method": "PATCH",
@@ -2197,10 +2199,10 @@ var COMMAND_BINDINGS = {
2197
2199
  "responseKind": "created",
2198
2200
  "async": false
2199
2201
  },
2200
- "computer sftp": {
2201
- "command": "computer sftp",
2202
+ "computer start": {
2203
+ "command": "computer start",
2202
2204
  "method": "POST",
2203
- "path": "/computers/:id/sftp",
2205
+ "path": "/computers/:id/start",
2204
2206
  "pathParams": [
2205
2207
  "id"
2206
2208
  ],
@@ -2208,10 +2210,10 @@ var COMMAND_BINDINGS = {
2208
2210
  "responseKind": "single",
2209
2211
  "async": false
2210
2212
  },
2211
- "computer start": {
2212
- "command": "computer start",
2213
+ "computer stop": {
2214
+ "command": "computer stop",
2213
2215
  "method": "POST",
2214
- "path": "/computers/:id/start",
2216
+ "path": "/computers/:id/stop",
2215
2217
  "pathParams": [
2216
2218
  "id"
2217
2219
  ],
@@ -2219,10 +2221,10 @@ var COMMAND_BINDINGS = {
2219
2221
  "responseKind": "single",
2220
2222
  "async": false
2221
2223
  },
2222
- "computer stop": {
2223
- "command": "computer stop",
2224
+ "computer terminal": {
2225
+ "command": "computer terminal",
2224
2226
  "method": "POST",
2225
- "path": "/computers/:id/stop",
2227
+ "path": "/computers/:id/terminal",
2226
2228
  "pathParams": [
2227
2229
  "id"
2228
2230
  ],
@@ -2241,10 +2243,10 @@ var COMMAND_BINDINGS = {
2241
2243
  "responseKind": "single",
2242
2244
  "async": false
2243
2245
  },
2244
- "computer tmux": {
2245
- "command": "computer tmux",
2246
+ "computer transfer": {
2247
+ "command": "computer transfer",
2246
2248
  "method": "POST",
2247
- "path": "/computers/:id/tmux",
2249
+ "path": "/computers/:id/transfer",
2248
2250
  "pathParams": [
2249
2251
  "id"
2250
2252
  ],
@@ -2285,24 +2287,24 @@ var COMMAND_BINDINGS = {
2285
2287
  "responseKind": "single",
2286
2288
  "async": false
2287
2289
  },
2288
- "computer unlink": {
2289
- "command": "computer unlink",
2290
- "method": "DELETE",
2291
- "path": "/computers/:id/workspace-links/:workspace_id",
2290
+ "computer update": {
2291
+ "command": "computer update",
2292
+ "method": "PATCH",
2293
+ "path": "/computers/:id",
2292
2294
  "pathParams": [
2293
- "id",
2294
- "workspace_id"
2295
+ "id"
2295
2296
  ],
2296
2297
  "argLocation": "body",
2297
2298
  "responseKind": "single",
2298
2299
  "async": false
2299
2300
  },
2300
- "computer update": {
2301
- "command": "computer update",
2301
+ "computer update-exposure": {
2302
+ "command": "computer update-exposure",
2302
2303
  "method": "PATCH",
2303
- "path": "/computers/:id",
2304
+ "path": "/computers/:id/expose/:workspace_id",
2304
2305
  "pathParams": [
2305
- "id"
2306
+ "id",
2307
+ "workspace_id"
2306
2308
  ],
2307
2309
  "argLocation": "body",
2308
2310
  "responseKind": "single",
@@ -2323,7 +2325,7 @@ var COMMAND_BINDINGS = {
2323
2325
  "computer upload": {
2324
2326
  "command": "computer upload",
2325
2327
  "method": "POST",
2326
- "path": "/computers/:id/sftp/upload",
2328
+ "path": "/computers/:id/fs/upload",
2327
2329
  "pathParams": [
2328
2330
  "id"
2329
2331
  ],
@@ -2402,80 +2404,52 @@ var COMMAND_BINDINGS = {
2402
2404
  "responseKind": "list",
2403
2405
  "async": false
2404
2406
  },
2405
- "datastore batch": {
2406
- "command": "datastore batch",
2407
+ "custom-models create": {
2408
+ "command": "custom-models create",
2407
2409
  "method": "POST",
2408
- "path": "/datastore/:namespace",
2409
- "pathParams": [
2410
- "namespace"
2411
- ],
2410
+ "path": "/custom-models",
2411
+ "pathParams": [],
2412
2412
  "argLocation": "body",
2413
- "responseKind": "single",
2413
+ "responseKind": "created",
2414
2414
  "async": false
2415
2415
  },
2416
- "datastore delete": {
2417
- "command": "datastore delete",
2416
+ "custom-models delete": {
2417
+ "command": "custom-models delete",
2418
2418
  "method": "DELETE",
2419
- "path": "/datastore/:namespace/:key",
2419
+ "path": "/custom-models/:id",
2420
2420
  "pathParams": [
2421
- "namespace",
2422
- "key"
2421
+ "id"
2423
2422
  ],
2424
2423
  "argLocation": "body",
2425
2424
  "responseKind": "deleted",
2426
2425
  "async": false
2427
2426
  },
2428
- "datastore get": {
2429
- "command": "datastore get",
2427
+ "custom-models get": {
2428
+ "command": "custom-models get",
2430
2429
  "method": "GET",
2431
- "path": "/datastore/:namespace/:key",
2430
+ "path": "/custom-models/:id",
2432
2431
  "pathParams": [
2433
- "namespace",
2434
- "key"
2432
+ "id"
2435
2433
  ],
2436
2434
  "argLocation": "query",
2437
2435
  "responseKind": "single",
2438
2436
  "async": false
2439
2437
  },
2440
- "datastore increment": {
2441
- "command": "datastore increment",
2442
- "method": "POST",
2443
- "path": "/datastore/:namespace/:key/increment",
2444
- "pathParams": [
2445
- "namespace",
2446
- "key"
2447
- ],
2448
- "argLocation": "body",
2449
- "responseKind": "single",
2450
- "async": false
2451
- },
2452
- "datastore list": {
2453
- "command": "datastore list",
2454
- "method": "GET",
2455
- "path": "/datastore/:namespace",
2456
- "pathParams": [
2457
- "namespace"
2458
- ],
2459
- "argLocation": "query",
2460
- "responseKind": "list",
2461
- "async": false
2462
- },
2463
- "datastore namespaces": {
2464
- "command": "datastore namespaces",
2438
+ "custom-models list": {
2439
+ "command": "custom-models list",
2465
2440
  "method": "GET",
2466
- "path": "/datastore",
2441
+ "path": "/custom-models",
2467
2442
  "pathParams": [],
2468
2443
  "argLocation": "query",
2469
2444
  "responseKind": "list",
2470
2445
  "async": false
2471
2446
  },
2472
- "datastore set": {
2473
- "command": "datastore set",
2474
- "method": "POST",
2475
- "path": "/datastore/:namespace/:key",
2447
+ "custom-models update": {
2448
+ "command": "custom-models update",
2449
+ "method": "PATCH",
2450
+ "path": "/custom-models/:id",
2476
2451
  "pathParams": [
2477
- "namespace",
2478
- "key"
2452
+ "id"
2479
2453
  ],
2480
2454
  "argLocation": "body",
2481
2455
  "responseKind": "single",
@@ -2608,17 +2582,6 @@ var COMMAND_BINDINGS = {
2608
2582
  "responseKind": "single",
2609
2583
  "async": false
2610
2584
  },
2611
- "drive run": {
2612
- "command": "drive run",
2613
- "method": "POST",
2614
- "path": "/drive/files/:id/run",
2615
- "pathParams": [
2616
- "id"
2617
- ],
2618
- "argLocation": "body",
2619
- "responseKind": "created",
2620
- "async": true
2621
- },
2622
2585
  "drive update": {
2623
2586
  "command": "drive update",
2624
2587
  "method": "PATCH",
@@ -2639,141 +2602,6 @@ var COMMAND_BINDINGS = {
2639
2602
  "responseKind": "created",
2640
2603
  "async": false
2641
2604
  },
2642
- "functions create": {
2643
- "command": "functions create",
2644
- "method": "POST",
2645
- "path": "/functions",
2646
- "pathParams": [],
2647
- "argLocation": "body",
2648
- "responseKind": "created",
2649
- "async": false
2650
- },
2651
- "functions delete": {
2652
- "command": "functions delete",
2653
- "method": "DELETE",
2654
- "path": "/functions/:id",
2655
- "pathParams": [
2656
- "id"
2657
- ],
2658
- "argLocation": "query",
2659
- "responseKind": "deleted",
2660
- "async": false
2661
- },
2662
- "functions deploy": {
2663
- "command": "functions deploy",
2664
- "method": "POST",
2665
- "path": "/functions/:id/deploy",
2666
- "pathParams": [
2667
- "id"
2668
- ],
2669
- "argLocation": "body",
2670
- "responseKind": "created",
2671
- "async": false
2672
- },
2673
- "functions deployments": {
2674
- "command": "functions deployments",
2675
- "method": "GET",
2676
- "path": "/functions/:id/deployments",
2677
- "pathParams": [
2678
- "id"
2679
- ],
2680
- "argLocation": "query",
2681
- "responseKind": "list",
2682
- "async": false
2683
- },
2684
- "functions get": {
2685
- "command": "functions get",
2686
- "method": "GET",
2687
- "path": "/functions/:id",
2688
- "pathParams": [
2689
- "id"
2690
- ],
2691
- "argLocation": "query",
2692
- "responseKind": "single",
2693
- "async": false
2694
- },
2695
- "functions invoke": {
2696
- "command": "functions invoke",
2697
- "method": "POST",
2698
- "path": "/functions/:id/invoke",
2699
- "pathParams": [
2700
- "id"
2701
- ],
2702
- "argLocation": "body",
2703
- "responseKind": "single",
2704
- "async": false
2705
- },
2706
- "functions list": {
2707
- "command": "functions list",
2708
- "method": "GET",
2709
- "path": "/functions",
2710
- "pathParams": [],
2711
- "argLocation": "query",
2712
- "responseKind": "list",
2713
- "async": false
2714
- },
2715
- "functions promote": {
2716
- "command": "functions promote",
2717
- "method": "POST",
2718
- "path": "/functions/:id/promote",
2719
- "pathParams": [
2720
- "id"
2721
- ],
2722
- "argLocation": "body",
2723
- "responseKind": "single",
2724
- "async": false
2725
- },
2726
- "functions run": {
2727
- "command": "functions run",
2728
- "method": "POST",
2729
- "path": "/functions/runs",
2730
- "pathParams": [],
2731
- "argLocation": "body",
2732
- "responseKind": "created",
2733
- "async": true
2734
- },
2735
- "functions run-get": {
2736
- "command": "functions run-get",
2737
- "method": "GET",
2738
- "path": "/functions/runs/:id",
2739
- "pathParams": [
2740
- "id"
2741
- ],
2742
- "argLocation": "query",
2743
- "responseKind": "single",
2744
- "async": false
2745
- },
2746
- "functions run-interrupt": {
2747
- "command": "functions run-interrupt",
2748
- "method": "POST",
2749
- "path": "/functions/runs/:id/interrupt",
2750
- "pathParams": [
2751
- "id"
2752
- ],
2753
- "argLocation": "body",
2754
- "responseKind": "single",
2755
- "async": false
2756
- },
2757
- "functions run-list": {
2758
- "command": "functions run-list",
2759
- "method": "GET",
2760
- "path": "/functions/runs",
2761
- "pathParams": [],
2762
- "argLocation": "query",
2763
- "responseKind": "list",
2764
- "async": false
2765
- },
2766
- "functions update": {
2767
- "command": "functions update",
2768
- "method": "PATCH",
2769
- "path": "/functions/:id",
2770
- "pathParams": [
2771
- "id"
2772
- ],
2773
- "argLocation": "body",
2774
- "responseKind": "single",
2775
- "async": false
2776
- },
2777
2605
  "guide get": {
2778
2606
  "command": "guide get",
2779
2607
  "method": "GET",
@@ -2876,92 +2704,112 @@ var COMMAND_BINDINGS = {
2876
2704
  "responseKind": "single",
2877
2705
  "async": false
2878
2706
  },
2879
- "hub install": {
2880
- "command": "hub install",
2881
- "method": "POST",
2882
- "path": "/hub/:resourceId/install",
2883
- "pathParams": [
2884
- "resourceId"
2885
- ],
2886
- "argLocation": "body",
2887
- "responseKind": "created",
2888
- "async": false
2889
- },
2890
- "hub search": {
2891
- "command": "hub search",
2707
+ "image models": {
2708
+ "command": "image models",
2892
2709
  "method": "GET",
2893
- "path": "/hub/search",
2710
+ "path": "/images/models",
2894
2711
  "pathParams": [],
2895
2712
  "argLocation": "query",
2896
2713
  "responseKind": "list",
2897
2714
  "async": false
2898
2715
  },
2899
- "hub submissions": {
2900
- "command": "hub submissions",
2716
+ "image search": {
2717
+ "command": "image search",
2901
2718
  "method": "GET",
2902
- "path": "/hub/submissions/mine",
2719
+ "path": "/images/models/search",
2903
2720
  "pathParams": [],
2904
2721
  "argLocation": "query",
2905
- "responseKind": "list",
2722
+ "responseKind": "single",
2906
2723
  "async": false
2907
2724
  },
2908
- "hub submit": {
2909
- "command": "hub submit",
2725
+ "inference image": {
2726
+ "command": "inference image",
2910
2727
  "method": "POST",
2911
- "path": "/hub/submissions",
2728
+ "path": "/inference/images",
2912
2729
  "pathParams": [],
2913
2730
  "argLocation": "body",
2914
- "responseKind": "created",
2915
- "async": false
2731
+ "responseKind": "single",
2732
+ "async": true,
2733
+ "pollHint": {
2734
+ "intervalMs": 1e3,
2735
+ "maxAttempts": 120
2736
+ }
2916
2737
  },
2917
- "hub update": {
2918
- "command": "hub update",
2738
+ "inference speech": {
2739
+ "command": "inference speech",
2919
2740
  "method": "POST",
2920
- "path": "/hub/:resourceId/update",
2921
- "pathParams": [
2922
- "resourceId"
2923
- ],
2741
+ "path": "/inference/speech",
2742
+ "pathParams": [],
2924
2743
  "argLocation": "body",
2925
2744
  "responseKind": "single",
2926
- "async": false
2745
+ "async": true,
2746
+ "pollHint": {
2747
+ "intervalMs": 1e3,
2748
+ "maxAttempts": 120
2749
+ }
2927
2750
  },
2928
- "hub update-check": {
2929
- "command": "hub update-check",
2751
+ "inference speech-stream": {
2752
+ "command": "inference speech-stream",
2930
2753
  "method": "POST",
2931
- "path": "/hub/:resourceId/update-check",
2932
- "pathParams": [
2933
- "resourceId"
2934
- ],
2754
+ "path": "/inference/speech/stream",
2755
+ "pathParams": [],
2756
+ "argLocation": "body",
2757
+ "responseKind": "binary",
2758
+ "async": false,
2759
+ "binaryContentTypes": [
2760
+ "text/event-stream"
2761
+ ]
2762
+ },
2763
+ "inference text": {
2764
+ "command": "inference text",
2765
+ "method": "POST",
2766
+ "path": "/inference/text",
2767
+ "pathParams": [],
2935
2768
  "argLocation": "body",
2936
2769
  "responseKind": "single",
2937
- "async": false
2770
+ "async": true,
2771
+ "pollHint": {
2772
+ "intervalMs": 1e3,
2773
+ "maxAttempts": 120
2774
+ }
2938
2775
  },
2939
- "image generate": {
2940
- "command": "image generate",
2776
+ "inference text-stream": {
2777
+ "command": "inference text-stream",
2941
2778
  "method": "POST",
2942
- "path": "/images/generations",
2779
+ "path": "/inference/text/stream",
2943
2780
  "pathParams": [],
2944
2781
  "argLocation": "body",
2945
- "responseKind": "created",
2946
- "async": true
2782
+ "responseKind": "binary",
2783
+ "async": false,
2784
+ "binaryContentTypes": [
2785
+ "text/event-stream"
2786
+ ]
2947
2787
  },
2948
- "image models": {
2949
- "command": "image models",
2950
- "method": "GET",
2951
- "path": "/images/models",
2788
+ "inference transcribe": {
2789
+ "command": "inference transcribe",
2790
+ "method": "POST",
2791
+ "path": "/inference/transcriptions",
2952
2792
  "pathParams": [],
2953
- "argLocation": "query",
2954
- "responseKind": "list",
2955
- "async": false
2793
+ "argLocation": "multipart",
2794
+ "responseKind": "single",
2795
+ "async": true,
2796
+ "pollHint": {
2797
+ "intervalMs": 1e3,
2798
+ "maxAttempts": 120
2799
+ }
2956
2800
  },
2957
- "image search": {
2958
- "command": "image search",
2959
- "method": "GET",
2960
- "path": "/images/models/search",
2801
+ "inference video": {
2802
+ "command": "inference video",
2803
+ "method": "POST",
2804
+ "path": "/inference/videos",
2961
2805
  "pathParams": [],
2962
- "argLocation": "query",
2806
+ "argLocation": "body",
2963
2807
  "responseKind": "single",
2964
- "async": false
2808
+ "async": true,
2809
+ "pollHint": {
2810
+ "intervalMs": 5e3,
2811
+ "maxAttempts": 240
2812
+ }
2965
2813
  },
2966
2814
  "me get": {
2967
2815
  "command": "me get",
@@ -3530,6 +3378,17 @@ var COMMAND_BINDINGS = {
3530
3378
  "responseKind": "list",
3531
3379
  "async": false
3532
3380
  },
3381
+ "operation await": {
3382
+ "command": "operation await",
3383
+ "method": "GET",
3384
+ "path": "/operations/:id/await",
3385
+ "pathParams": [
3386
+ "id"
3387
+ ],
3388
+ "argLocation": "query",
3389
+ "responseKind": "single",
3390
+ "async": false
3391
+ },
3533
3392
  "operation cancel": {
3534
3393
  "command": "operation cancel",
3535
3394
  "method": "POST",
@@ -3541,6 +3400,21 @@ var COMMAND_BINDINGS = {
3541
3400
  "responseKind": "single",
3542
3401
  "async": false
3543
3402
  },
3403
+ "operation content": {
3404
+ "command": "operation content",
3405
+ "method": "GET",
3406
+ "path": "/operations/:id/content",
3407
+ "pathParams": [
3408
+ "id"
3409
+ ],
3410
+ "argLocation": "query",
3411
+ "responseKind": "binary",
3412
+ "async": false,
3413
+ "binaryContentTypes": [
3414
+ "application/octet-stream",
3415
+ "text/plain"
3416
+ ]
3417
+ },
3544
3418
  "operation get": {
3545
3419
  "command": "operation get",
3546
3420
  "method": "GET",
@@ -3666,112 +3540,6 @@ var COMMAND_BINDINGS = {
3666
3540
  "text/event-stream"
3667
3541
  ]
3668
3542
  },
3669
- "repos branches": {
3670
- "command": "repos branches",
3671
- "method": "GET",
3672
- "path": "/repos/:id/branches",
3673
- "pathParams": [
3674
- "id"
3675
- ],
3676
- "argLocation": "query",
3677
- "responseKind": "list",
3678
- "async": false
3679
- },
3680
- "repos clone-url": {
3681
- "command": "repos clone-url",
3682
- "method": "GET",
3683
- "path": "/repos/:id/clone-url",
3684
- "pathParams": [
3685
- "id"
3686
- ],
3687
- "argLocation": "query",
3688
- "responseKind": "single",
3689
- "async": false
3690
- },
3691
- "repos commit": {
3692
- "command": "repos commit",
3693
- "method": "POST",
3694
- "path": "/repos/:id/commits",
3695
- "pathParams": [
3696
- "id"
3697
- ],
3698
- "argLocation": "body",
3699
- "responseKind": "single",
3700
- "async": false
3701
- },
3702
- "repos commits": {
3703
- "command": "repos commits",
3704
- "method": "GET",
3705
- "path": "/repos/:id/commits",
3706
- "pathParams": [
3707
- "id"
3708
- ],
3709
- "argLocation": "query",
3710
- "responseKind": "list",
3711
- "async": false
3712
- },
3713
- "repos create": {
3714
- "command": "repos create",
3715
- "method": "POST",
3716
- "path": "/repos",
3717
- "pathParams": [],
3718
- "argLocation": "body",
3719
- "responseKind": "created",
3720
- "async": false
3721
- },
3722
- "repos delete": {
3723
- "command": "repos delete",
3724
- "method": "DELETE",
3725
- "path": "/repos/:id",
3726
- "pathParams": [
3727
- "id"
3728
- ],
3729
- "argLocation": "body",
3730
- "responseKind": "deleted",
3731
- "async": false
3732
- },
3733
- "repos get": {
3734
- "command": "repos get",
3735
- "method": "GET",
3736
- "path": "/repos/:id",
3737
- "pathParams": [
3738
- "id"
3739
- ],
3740
- "argLocation": "query",
3741
- "responseKind": "single",
3742
- "async": false
3743
- },
3744
- "repos list": {
3745
- "command": "repos list",
3746
- "method": "GET",
3747
- "path": "/repos",
3748
- "pathParams": [],
3749
- "argLocation": "query",
3750
- "responseKind": "list",
3751
- "async": false
3752
- },
3753
- "repos read-file": {
3754
- "command": "repos read-file",
3755
- "method": "GET",
3756
- "path": "/repos/:id/file",
3757
- "pathParams": [
3758
- "id"
3759
- ],
3760
- "argLocation": "query",
3761
- "responseKind": "single",
3762
- "async": false
3763
- },
3764
- "repos set-visibility": {
3765
- "command": "repos set-visibility",
3766
- "method": "PATCH",
3767
- "path": "/repos/:id/visibility",
3768
- "pathParams": [
3769
- "id"
3770
- ],
3771
- "argLocation": "body",
3772
- "responseKind": "single",
3773
- "async": false
3774
- },
3775
3543
  "search query": {
3776
3544
  "command": "search query",
3777
3545
  "method": "GET",
@@ -3906,21 +3674,30 @@ var COMMAND_BINDINGS = {
3906
3674
  "responseKind": "list",
3907
3675
  "async": false
3908
3676
  },
3909
- "skill apply-update": {
3910
- "command": "skill apply-update",
3911
- "method": "POST",
3912
- "path": "/skills/:id/apply-update",
3677
+ "subscription get": {
3678
+ "command": "subscription get",
3679
+ "method": "GET",
3680
+ "path": "/subscription",
3681
+ "pathParams": [],
3682
+ "argLocation": "query",
3683
+ "responseKind": "single",
3684
+ "async": false
3685
+ },
3686
+ "tasks ancestors": {
3687
+ "command": "tasks ancestors",
3688
+ "method": "GET",
3689
+ "path": "/tasks/tasks/:id/ancestors",
3913
3690
  "pathParams": [
3914
3691
  "id"
3915
3692
  ],
3916
- "argLocation": "body",
3917
- "responseKind": "single",
3693
+ "argLocation": "query",
3694
+ "responseKind": "list",
3918
3695
  "async": false
3919
3696
  },
3920
- "skill attach": {
3921
- "command": "skill attach",
3697
+ "tasks assign": {
3698
+ "command": "tasks assign",
3922
3699
  "method": "POST",
3923
- "path": "/skills/:id/attach",
3700
+ "path": "/tasks/tasks/:id/assign",
3924
3701
  "pathParams": [
3925
3702
  "id"
3926
3703
  ],
@@ -3928,85 +3705,78 @@ var COMMAND_BINDINGS = {
3928
3705
  "responseKind": "single",
3929
3706
  "async": false
3930
3707
  },
3931
- "skill body": {
3932
- "command": "skill body",
3933
- "method": "GET",
3934
- "path": "/skills/:id/body",
3708
+ "tasks comment": {
3709
+ "command": "tasks comment",
3710
+ "method": "POST",
3711
+ "path": "/tasks/tasks/:id/comments",
3935
3712
  "pathParams": [
3936
3713
  "id"
3937
3714
  ],
3938
- "argLocation": "query",
3939
- "responseKind": "single",
3940
- "async": false
3941
- },
3942
- "skill create": {
3943
- "command": "skill create",
3944
- "method": "POST",
3945
- "path": "/skills",
3946
- "pathParams": [],
3947
3715
  "argLocation": "body",
3948
3716
  "responseKind": "created",
3949
3717
  "async": false
3950
3718
  },
3951
- "skill delete": {
3952
- "command": "skill delete",
3719
+ "tasks comment-delete": {
3720
+ "command": "tasks comment-delete",
3953
3721
  "method": "DELETE",
3954
- "path": "/skills/:id",
3722
+ "path": "/tasks/tasks/:id/comments/:commentId",
3955
3723
  "pathParams": [
3956
- "id"
3724
+ "id",
3725
+ "commentId"
3957
3726
  ],
3958
3727
  "argLocation": "body",
3959
3728
  "responseKind": "deleted",
3960
3729
  "async": false
3961
3730
  },
3962
- "skill detach": {
3963
- "command": "skill detach",
3964
- "method": "DELETE",
3965
- "path": "/skills/:id/attach",
3731
+ "tasks comment-list": {
3732
+ "command": "tasks comment-list",
3733
+ "method": "GET",
3734
+ "path": "/tasks/tasks/:id/comments",
3966
3735
  "pathParams": [
3967
3736
  "id"
3968
3737
  ],
3969
3738
  "argLocation": "query",
3970
- "responseKind": "deleted",
3739
+ "responseKind": "list",
3971
3740
  "async": false
3972
3741
  },
3973
- "skill file-delete": {
3974
- "command": "skill file-delete",
3975
- "method": "DELETE",
3976
- "path": "/skills/:id/file",
3742
+ "tasks comment-update": {
3743
+ "command": "tasks comment-update",
3744
+ "method": "PATCH",
3745
+ "path": "/tasks/tasks/:id/comments/:commentId",
3977
3746
  "pathParams": [
3978
- "id"
3747
+ "id",
3748
+ "commentId"
3979
3749
  ],
3980
- "argLocation": "query",
3981
- "responseKind": "deleted",
3750
+ "argLocation": "body",
3751
+ "responseKind": "single",
3982
3752
  "async": false
3983
3753
  },
3984
- "skill file-list": {
3985
- "command": "skill file-list",
3986
- "method": "GET",
3987
- "path": "/skills/:id/files",
3754
+ "tasks create": {
3755
+ "command": "tasks create",
3756
+ "method": "POST",
3757
+ "path": "/tasks/lists/:id/tasks",
3988
3758
  "pathParams": [
3989
3759
  "id"
3990
3760
  ],
3991
- "argLocation": "query",
3992
- "responseKind": "list",
3761
+ "argLocation": "body",
3762
+ "responseKind": "created",
3993
3763
  "async": false
3994
3764
  },
3995
- "skill file-read": {
3996
- "command": "skill file-read",
3997
- "method": "GET",
3998
- "path": "/skills/:id/file",
3765
+ "tasks delete": {
3766
+ "command": "tasks delete",
3767
+ "method": "DELETE",
3768
+ "path": "/tasks/tasks/:id",
3999
3769
  "pathParams": [
4000
3770
  "id"
4001
3771
  ],
4002
- "argLocation": "query",
4003
- "responseKind": "single",
3772
+ "argLocation": "body",
3773
+ "responseKind": "deleted",
4004
3774
  "async": false
4005
3775
  },
4006
- "skill file-write": {
4007
- "command": "skill file-write",
3776
+ "tasks depend": {
3777
+ "command": "tasks depend",
4008
3778
  "method": "POST",
4009
- "path": "/skills/:id/files",
3779
+ "path": "/tasks/tasks/:id/dependencies",
4010
3780
  "pathParams": [
4011
3781
  "id"
4012
3782
  ],
@@ -4014,359 +3784,25 @@ var COMMAND_BINDINGS = {
4014
3784
  "responseKind": "single",
4015
3785
  "async": false
4016
3786
  },
4017
- "skill fork": {
4018
- "command": "skill fork",
4019
- "method": "POST",
4020
- "path": "/skills/:id/fork",
3787
+ "tasks dependencies": {
3788
+ "command": "tasks dependencies",
3789
+ "method": "GET",
3790
+ "path": "/tasks/tasks/:id/dependencies",
4021
3791
  "pathParams": [
4022
3792
  "id"
4023
3793
  ],
4024
- "argLocation": "body",
4025
- "responseKind": "created",
3794
+ "argLocation": "query",
3795
+ "responseKind": "single",
4026
3796
  "async": false
4027
3797
  },
4028
- "skill get": {
4029
- "command": "skill get",
4030
- "method": "GET",
4031
- "path": "/skills/:id",
3798
+ "tasks duplicate": {
3799
+ "command": "tasks duplicate",
3800
+ "method": "POST",
3801
+ "path": "/tasks/tasks/:id/duplicate",
4032
3802
  "pathParams": [
4033
3803
  "id"
4034
3804
  ],
4035
- "argLocation": "query",
4036
- "responseKind": "single",
4037
- "async": false
4038
- },
4039
- "skill install": {
4040
- "command": "skill install",
4041
- "method": "POST",
4042
- "path": "/skills/install",
4043
- "pathParams": [],
4044
- "argLocation": "body",
4045
- "responseKind": "created",
4046
- "async": false
4047
- },
4048
- "skill list": {
4049
- "command": "skill list",
4050
- "method": "GET",
4051
- "path": "/skills",
4052
- "pathParams": [],
4053
- "argLocation": "query",
4054
- "responseKind": "list",
4055
- "async": false
4056
- },
4057
- "skill publish": {
4058
- "command": "skill publish",
4059
- "method": "POST",
4060
- "path": "/skills/:id/publish",
4061
- "pathParams": [
4062
- "id"
4063
- ],
4064
- "argLocation": "body",
4065
- "responseKind": "single",
4066
- "async": false
4067
- },
4068
- "skill render": {
4069
- "command": "skill render",
4070
- "method": "POST",
4071
- "path": "/skills/:id/render",
4072
- "pathParams": [
4073
- "id"
4074
- ],
4075
- "argLocation": "body",
4076
- "responseKind": "single",
4077
- "async": false
4078
- },
4079
- "skill search": {
4080
- "command": "skill search",
4081
- "method": "GET",
4082
- "path": "/skills/search",
4083
- "pathParams": [],
4084
- "argLocation": "query",
4085
- "responseKind": "list",
4086
- "async": false
4087
- },
4088
- "skill update": {
4089
- "command": "skill update",
4090
- "method": "PATCH",
4091
- "path": "/skills/:id",
4092
- "pathParams": [
4093
- "id"
4094
- ],
4095
- "argLocation": "body",
4096
- "responseKind": "single",
4097
- "async": false
4098
- },
4099
- "skill update-check": {
4100
- "command": "skill update-check",
4101
- "method": "GET",
4102
- "path": "/skills/:id/update-check",
4103
- "pathParams": [
4104
- "id"
4105
- ],
4106
- "argLocation": "query",
4107
- "responseKind": "single",
4108
- "async": false
4109
- },
4110
- "subscription get": {
4111
- "command": "subscription get",
4112
- "method": "GET",
4113
- "path": "/subscription",
4114
- "pathParams": [],
4115
- "argLocation": "query",
4116
- "responseKind": "single",
4117
- "async": false
4118
- },
4119
- "table create": {
4120
- "command": "table create",
4121
- "method": "POST",
4122
- "path": "/tables",
4123
- "pathParams": [],
4124
- "argLocation": "body",
4125
- "responseKind": "created",
4126
- "async": false
4127
- },
4128
- "table create-record": {
4129
- "command": "table create-record",
4130
- "method": "POST",
4131
- "path": "/tables/:id/records",
4132
- "pathParams": [
4133
- "id"
4134
- ],
4135
- "argLocation": "body",
4136
- "responseKind": "created",
4137
- "async": false
4138
- },
4139
- "table delete": {
4140
- "command": "table delete",
4141
- "method": "DELETE",
4142
- "path": "/tables/:id",
4143
- "pathParams": [
4144
- "id"
4145
- ],
4146
- "argLocation": "body",
4147
- "responseKind": "deleted",
4148
- "async": false
4149
- },
4150
- "table delete-record": {
4151
- "command": "table delete-record",
4152
- "method": "DELETE",
4153
- "path": "/tables/:id/records/:recordId",
4154
- "pathParams": [
4155
- "id",
4156
- "recordId"
4157
- ],
4158
- "argLocation": "body",
4159
- "responseKind": "deleted",
4160
- "async": false
4161
- },
4162
- "table export": {
4163
- "command": "table export",
4164
- "method": "GET",
4165
- "path": "/tables/:id/export",
4166
- "pathParams": [
4167
- "id"
4168
- ],
4169
- "argLocation": "query",
4170
- "responseKind": "binary",
4171
- "async": false
4172
- },
4173
- "table get": {
4174
- "command": "table get",
4175
- "method": "GET",
4176
- "path": "/tables/:id",
4177
- "pathParams": [
4178
- "id"
4179
- ],
4180
- "argLocation": "query",
4181
- "responseKind": "single",
4182
- "async": false
4183
- },
4184
- "table get-record": {
4185
- "command": "table get-record",
4186
- "method": "GET",
4187
- "path": "/tables/:id/records/:recordId",
4188
- "pathParams": [
4189
- "id",
4190
- "recordId"
4191
- ],
4192
- "argLocation": "query",
4193
- "responseKind": "single",
4194
- "async": false
4195
- },
4196
- "table import": {
4197
- "command": "table import",
4198
- "method": "POST",
4199
- "path": "/tables/:id/import",
4200
- "pathParams": [
4201
- "id"
4202
- ],
4203
- "argLocation": "body",
4204
- "responseKind": "single",
4205
- "async": false
4206
- },
4207
- "table list": {
4208
- "command": "table list",
4209
- "method": "GET",
4210
- "path": "/tables",
4211
- "pathParams": [],
4212
- "argLocation": "query",
4213
- "responseKind": "list",
4214
- "async": false
4215
- },
4216
- "table query": {
4217
- "command": "table query",
4218
- "method": "POST",
4219
- "path": "/tables/:id/query",
4220
- "pathParams": [
4221
- "id"
4222
- ],
4223
- "argLocation": "body",
4224
- "responseKind": "list",
4225
- "async": false
4226
- },
4227
- "table update": {
4228
- "command": "table update",
4229
- "method": "PATCH",
4230
- "path": "/tables/:id",
4231
- "pathParams": [
4232
- "id"
4233
- ],
4234
- "argLocation": "body",
4235
- "responseKind": "single",
4236
- "async": false
4237
- },
4238
- "table update-record": {
4239
- "command": "table update-record",
4240
- "method": "PATCH",
4241
- "path": "/tables/:id/records/:recordId",
4242
- "pathParams": [
4243
- "id",
4244
- "recordId"
4245
- ],
4246
- "argLocation": "body",
4247
- "responseKind": "single",
4248
- "async": false
4249
- },
4250
- "tasks ancestors": {
4251
- "command": "tasks ancestors",
4252
- "method": "GET",
4253
- "path": "/tasks/tasks/:id/ancestors",
4254
- "pathParams": [
4255
- "id"
4256
- ],
4257
- "argLocation": "query",
4258
- "responseKind": "list",
4259
- "async": false
4260
- },
4261
- "tasks assign": {
4262
- "command": "tasks assign",
4263
- "method": "POST",
4264
- "path": "/tasks/tasks/:id/assign",
4265
- "pathParams": [
4266
- "id"
4267
- ],
4268
- "argLocation": "body",
4269
- "responseKind": "single",
4270
- "async": false
4271
- },
4272
- "tasks comment": {
4273
- "command": "tasks comment",
4274
- "method": "POST",
4275
- "path": "/tasks/tasks/:id/comments",
4276
- "pathParams": [
4277
- "id"
4278
- ],
4279
- "argLocation": "body",
4280
- "responseKind": "created",
4281
- "async": false
4282
- },
4283
- "tasks comment-delete": {
4284
- "command": "tasks comment-delete",
4285
- "method": "DELETE",
4286
- "path": "/tasks/tasks/:id/comments/:commentId",
4287
- "pathParams": [
4288
- "id",
4289
- "commentId"
4290
- ],
4291
- "argLocation": "body",
4292
- "responseKind": "deleted",
4293
- "async": false
4294
- },
4295
- "tasks comment-list": {
4296
- "command": "tasks comment-list",
4297
- "method": "GET",
4298
- "path": "/tasks/tasks/:id/comments",
4299
- "pathParams": [
4300
- "id"
4301
- ],
4302
- "argLocation": "query",
4303
- "responseKind": "list",
4304
- "async": false
4305
- },
4306
- "tasks comment-update": {
4307
- "command": "tasks comment-update",
4308
- "method": "PATCH",
4309
- "path": "/tasks/tasks/:id/comments/:commentId",
4310
- "pathParams": [
4311
- "id",
4312
- "commentId"
4313
- ],
4314
- "argLocation": "body",
4315
- "responseKind": "single",
4316
- "async": false
4317
- },
4318
- "tasks create": {
4319
- "command": "tasks create",
4320
- "method": "POST",
4321
- "path": "/tasks/lists/:id/tasks",
4322
- "pathParams": [
4323
- "id"
4324
- ],
4325
- "argLocation": "body",
4326
- "responseKind": "created",
4327
- "async": false
4328
- },
4329
- "tasks delete": {
4330
- "command": "tasks delete",
4331
- "method": "DELETE",
4332
- "path": "/tasks/tasks/:id",
4333
- "pathParams": [
4334
- "id"
4335
- ],
4336
- "argLocation": "body",
4337
- "responseKind": "deleted",
4338
- "async": false
4339
- },
4340
- "tasks depend": {
4341
- "command": "tasks depend",
4342
- "method": "POST",
4343
- "path": "/tasks/tasks/:id/dependencies",
4344
- "pathParams": [
4345
- "id"
4346
- ],
4347
- "argLocation": "body",
4348
- "responseKind": "single",
4349
- "async": false
4350
- },
4351
- "tasks dependencies": {
4352
- "command": "tasks dependencies",
4353
- "method": "GET",
4354
- "path": "/tasks/tasks/:id/dependencies",
4355
- "pathParams": [
4356
- "id"
4357
- ],
4358
- "argLocation": "query",
4359
- "responseKind": "single",
4360
- "async": false
4361
- },
4362
- "tasks duplicate": {
4363
- "command": "tasks duplicate",
4364
- "method": "POST",
4365
- "path": "/tasks/tasks/:id/duplicate",
4366
- "pathParams": [
4367
- "id"
4368
- ],
4369
- "argLocation": "body",
3805
+ "argLocation": "body",
4370
3806
  "responseKind": "single",
4371
3807
  "async": false
4372
3808
  },
@@ -4544,156 +3980,6 @@ var COMMAND_BINDINGS = {
4544
3980
  "responseKind": "single",
4545
3981
  "async": false
4546
3982
  },
4547
- "trigger archive": {
4548
- "command": "trigger archive",
4549
- "method": "POST",
4550
- "path": "/triggers/:id/archive",
4551
- "pathParams": [
4552
- "id"
4553
- ],
4554
- "argLocation": "body",
4555
- "responseKind": "single",
4556
- "async": false
4557
- },
4558
- "trigger cost-stats": {
4559
- "command": "trigger cost-stats",
4560
- "method": "GET",
4561
- "path": "/triggers/:id/cost-stats",
4562
- "pathParams": [
4563
- "id"
4564
- ],
4565
- "argLocation": "query",
4566
- "responseKind": "single",
4567
- "async": false
4568
- },
4569
- "trigger cost-stats-all": {
4570
- "command": "trigger cost-stats-all",
4571
- "method": "GET",
4572
- "path": "/triggers/cost-stats",
4573
- "pathParams": [],
4574
- "argLocation": "query",
4575
- "responseKind": "single",
4576
- "async": false
4577
- },
4578
- "trigger create": {
4579
- "command": "trigger create",
4580
- "method": "POST",
4581
- "path": "/triggers",
4582
- "pathParams": [],
4583
- "argLocation": "body",
4584
- "responseKind": "created",
4585
- "async": false
4586
- },
4587
- "trigger delete": {
4588
- "command": "trigger delete",
4589
- "method": "DELETE",
4590
- "path": "/triggers/:id",
4591
- "pathParams": [
4592
- "id"
4593
- ],
4594
- "argLocation": "body",
4595
- "responseKind": "deleted",
4596
- "async": false
4597
- },
4598
- "trigger fire": {
4599
- "command": "trigger fire",
4600
- "method": "POST",
4601
- "path": "/triggers/:id/fire",
4602
- "pathParams": [
4603
- "id"
4604
- ],
4605
- "argLocation": "body",
4606
- "responseKind": "created",
4607
- "async": true
4608
- },
4609
- "trigger get": {
4610
- "command": "trigger get",
4611
- "method": "GET",
4612
- "path": "/triggers/:id",
4613
- "pathParams": [
4614
- "id"
4615
- ],
4616
- "argLocation": "query",
4617
- "responseKind": "single",
4618
- "async": false
4619
- },
4620
- "trigger list": {
4621
- "command": "trigger list",
4622
- "method": "GET",
4623
- "path": "/triggers",
4624
- "pathParams": [],
4625
- "argLocation": "query",
4626
- "responseKind": "list",
4627
- "async": false
4628
- },
4629
- "trigger rotate-secret": {
4630
- "command": "trigger rotate-secret",
4631
- "method": "POST",
4632
- "path": "/triggers/:id/rotate-secret",
4633
- "pathParams": [
4634
- "id"
4635
- ],
4636
- "argLocation": "body",
4637
- "responseKind": "single",
4638
- "async": false
4639
- },
4640
- "trigger runs": {
4641
- "command": "trigger runs",
4642
- "method": "GET",
4643
- "path": "/triggers/:id/runs",
4644
- "pathParams": [
4645
- "id"
4646
- ],
4647
- "argLocation": "query",
4648
- "responseKind": "list",
4649
- "async": false
4650
- },
4651
- "trigger test-fire": {
4652
- "command": "trigger test-fire",
4653
- "method": "POST",
4654
- "path": "/triggers/:id/test-fire",
4655
- "pathParams": [
4656
- "id"
4657
- ],
4658
- "argLocation": "body",
4659
- "responseKind": "single",
4660
- "async": true
4661
- },
4662
- "trigger unarchive": {
4663
- "command": "trigger unarchive",
4664
- "method": "POST",
4665
- "path": "/triggers/:id/unarchive",
4666
- "pathParams": [
4667
- "id"
4668
- ],
4669
- "argLocation": "body",
4670
- "responseKind": "single",
4671
- "async": false
4672
- },
4673
- "trigger update": {
4674
- "command": "trigger update",
4675
- "method": "PATCH",
4676
- "path": "/triggers/:id",
4677
- "pathParams": [
4678
- "id"
4679
- ],
4680
- "argLocation": "body",
4681
- "responseKind": "single",
4682
- "async": false
4683
- },
4684
- "video generate": {
4685
- "command": "video generate",
4686
- "method": "POST",
4687
- "path": "/videos/generations",
4688
- "pathParams": [],
4689
- "argLocation": "body",
4690
- "responseKind": "single",
4691
- "async": true,
4692
- "pollHint": {
4693
- "intervalMs": 5e3,
4694
- "maxAttempts": 240
4695
- }
4696
- },
4697
3983
  "video models": {
4698
3984
  "command": "video models",
4699
3985
  "method": "GET",
@@ -5237,7 +4523,7 @@ var ComputersApi = class {
5237
4523
  return res.data;
5238
4524
  }
5239
4525
  // ---------------------------------------------------------------------------
5240
- // Exec & tmux
4526
+ // Exec & terminals
5241
4527
  // ---------------------------------------------------------------------------
5242
4528
  async exec(id, input, opts = {}) {
5243
4529
  const res = await request(this.ctx, {
@@ -5249,56 +4535,57 @@ var ComputersApi = class {
5249
4535
  return res.data;
5250
4536
  }
5251
4537
  /**
5252
- * tmux dispatcher. Each `op` returns a different shape — see the route
5253
- * docs for the per-op payload. Common case: `op: "run"` starts a window,
4538
+ * Persistent-terminal dispatcher. Each `op` returns a different shape — see
4539
+ * the route docs for the per-op payload. Common case: `op: "run"` runs a
4540
+ * command to completion in a named window (state persists across runs),
5254
4541
  * `op: "capture"` reads its output.
5255
4542
  */
5256
- async tmux(id, input, opts = {}) {
4543
+ async terminal(id, input, opts = {}) {
5257
4544
  const res = await request(
5258
4545
  this.ctx,
5259
4546
  {
5260
4547
  method: "POST",
5261
- path: `/api/v1/computers/${id}/tmux`,
4548
+ path: `/api/v1/computers/${id}/terminal`,
5262
4549
  body: input,
5263
4550
  signal: opts.signal
5264
4551
  }
5265
4552
  );
5266
4553
  return res.data;
5267
4554
  }
5268
- /** Convenience over `tmux({ op: "list" })`. */
5269
- async listTmuxWindows(id, opts = {}) {
5270
- const result = await this.tmux(id, { op: "list" }, opts);
4555
+ /** Convenience over `terminal({ op: "list" })`. */
4556
+ async listTerminals(id, opts = {}) {
4557
+ const result = await this.terminal(id, { op: "list" }, opts);
5271
4558
  return result.windows ?? [];
5272
4559
  }
5273
4560
  // ---------------------------------------------------------------------------
5274
- // SFTP
4561
+ // FS
5275
4562
  // ---------------------------------------------------------------------------
5276
4563
  /**
5277
- * Unified SFTP dispatcher. Returns op-shaped payload. For streaming
5278
- * uploads/downloads use `sftpUpload` / `sftpDownload`.
4564
+ * Unified FS dispatcher. Returns op-shaped payload. For streaming
4565
+ * uploads/downloads use `fsUpload` / `fsDownload`.
5279
4566
  */
5280
- async sftp(id, input, opts = {}) {
4567
+ async fs(id, input, opts = {}) {
5281
4568
  const res = await request(
5282
4569
  this.ctx,
5283
4570
  {
5284
4571
  method: "POST",
5285
- path: `/api/v1/computers/${id}/sftp`,
4572
+ path: `/api/v1/computers/${id}/fs`,
5286
4573
  body: input,
5287
4574
  signal: opts.signal
5288
4575
  }
5289
4576
  );
5290
4577
  return res.data;
5291
4578
  }
5292
- /** Convenience: `sftp({op:"list"})` returning the entries array directly. */
5293
- async sftpList(id, path, opts = {}) {
5294
- const result = await this.sftp(id, { op: "list", path }, opts);
4579
+ /** Convenience: `fs({op:"list"})` returning the entries array directly. */
4580
+ async fsList(id, path, opts = {}) {
4581
+ const result = await this.fs(id, { op: "list", path }, opts);
5295
4582
  return result;
5296
4583
  }
5297
4584
  /**
5298
4585
  * Multipart upload of a file/folder member. Falls back to single-file mode
5299
4586
  * when `relative_path` is omitted.
5300
4587
  */
5301
- async sftpUpload(id, input, opts = {}) {
4588
+ async fsUpload(id, input, opts = {}) {
5302
4589
  const form = new FormData();
5303
4590
  form.append("file", input.file);
5304
4591
  form.append("path", input.path);
@@ -5308,7 +4595,7 @@ var ComputersApi = class {
5308
4595
  this.ctx,
5309
4596
  {
5310
4597
  method: "POST",
5311
- path: `/api/v1/computers/${id}/sftp/upload`,
4598
+ path: `/api/v1/computers/${id}/fs/upload`,
5312
4599
  bodyRaw: form,
5313
4600
  signal: opts.signal
5314
4601
  }
@@ -5319,10 +4606,10 @@ var ComputersApi = class {
5319
4606
  * Stream a remote file (or a folder as `tar.gz`) as a `Blob`. The server
5320
4607
  * sends the real MIME type on `Content-Type`.
5321
4608
  */
5322
- async sftpDownload(id, remotePath, opts = {}) {
4609
+ async fsDownload(id, remotePath, opts = {}) {
5323
4610
  return request(this.ctx, {
5324
4611
  method: "GET",
5325
- path: `/api/v1/computers/${id}/sftp/download`,
4612
+ path: `/api/v1/computers/${id}/fs/download`,
5326
4613
  query: { path: remotePath },
5327
4614
  expectBlob: true,
5328
4615
  signal: opts.signal
@@ -5476,65 +4763,91 @@ var ComputersApi = class {
5476
4763
  signal: opts.signal
5477
4764
  }
5478
4765
  );
5479
- return res.data;
4766
+ return res.data;
4767
+ }
4768
+ async checkUserEnvSync(id, username, opts = {}) {
4769
+ const res = await request(
4770
+ this.ctx,
4771
+ {
4772
+ method: "GET",
4773
+ path: `/api/v1/computers/${id}/users/${username}/env/sync`,
4774
+ signal: opts.signal
4775
+ }
4776
+ );
4777
+ return res.data;
4778
+ }
4779
+ // ---------------------------------------------------------------------------
4780
+ // Workspace exposures (expose an actor-owned machine into a workspace) +
4781
+ // ownership transfer
4782
+ // ---------------------------------------------------------------------------
4783
+ /**
4784
+ * Expose an actor-owned machine INTO a workspace (Layer 2) with a
4785
+ * per-capability grant, so that workspace's members can use it. Requires
4786
+ * machine-admin and membership of the target workspace. Rejects a duplicate
4787
+ * exposure. (CLI verb: `computer add-exposure` — the bare `expose`/`unexpose`
4788
+ * verbs are the tunnel port commands.)
4789
+ */
4790
+ async expose(id, input, opts = {}) {
4791
+ const res = await request(
4792
+ this.ctx,
4793
+ {
4794
+ method: "POST",
4795
+ path: `/api/v1/computers/${id}/expose`,
4796
+ body: input,
4797
+ signal: opts.signal
4798
+ }
4799
+ );
4800
+ return res.data.exposure;
4801
+ }
4802
+ /**
4803
+ * Replace the capability grant on an existing exposure. `workspaceId` is the
4804
+ * exposed workspace's `ws_…` resourceId. Requires machine-admin.
4805
+ * (CLI verb: `computer update-exposure`.)
4806
+ */
4807
+ async updateExposure(id, workspaceId, capabilities, opts = {}) {
4808
+ const res = await request(
4809
+ this.ctx,
4810
+ {
4811
+ method: "PATCH",
4812
+ path: `/api/v1/computers/${id}/expose/${workspaceId}`,
4813
+ body: { capabilities },
4814
+ signal: opts.signal
4815
+ }
4816
+ );
4817
+ return res.data.exposure;
5480
4818
  }
5481
- async checkUserEnvSync(id, username, opts = {}) {
4819
+ /**
4820
+ * Stop exposing a machine into a workspace. `workspaceId` is the exposed
4821
+ * workspace's `ws_…` resourceId. Allowed for machine-admin OR an admin of the
4822
+ * exposed workspace. Idempotent. (CLI verb: `computer remove-exposure`.)
4823
+ */
4824
+ async unexpose(id, workspaceId, opts = {}) {
5482
4825
  const res = await request(
5483
4826
  this.ctx,
5484
4827
  {
5485
- method: "GET",
5486
- path: `/api/v1/computers/${id}/users/${username}/env/sync`,
4828
+ method: "DELETE",
4829
+ path: `/api/v1/computers/${id}/expose/${workspaceId}`,
5487
4830
  signal: opts.signal
5488
4831
  }
5489
4832
  );
5490
4833
  return res.data;
5491
4834
  }
5492
- // ---------------------------------------------------------------------------
5493
- // Workspace links (share LOCAL INFERENCE into other workspaces)
5494
- // ---------------------------------------------------------------------------
5495
- /**
5496
- * List the workspaces a computer's LOCAL INFERENCE is shared into. The home
5497
- * workspace is never listed (it already has full access). The route returns
5498
- * the links under a `links` key (not a standard list envelope).
5499
- */
5500
- async listWorkspaceLinks(id, opts = {}) {
5501
- const res = await request(this.ctx, {
5502
- method: "GET",
5503
- path: `/api/v1/computers/${id}/workspace-links`,
5504
- signal: opts.signal
5505
- });
5506
- return res.data.links;
5507
- }
5508
4835
  /**
5509
- * Share a computer's LOCAL INFERENCE into another workspace (never shell /
5510
- * files / tunnels). `workspaceId` is the target workspace's `ws_…`
5511
- * resourceId or slug. Requires EDIT on the computer's home workspace and
5512
- * membership of the target. Rejects the home workspace and duplicates.
4836
+ * Transfer an actor-owned machine to a new owner (self, or an org the caller
4837
+ * administers). `owner` is the target profile's resourceId; existing workspace
4838
+ * exposures are kept. Requires machine-admin. (CLI verb: `computer transfer`.)
5513
4839
  */
5514
- async linkWorkspace(id, workspaceId, opts = {}) {
4840
+ async transfer(id, owner, opts = {}) {
5515
4841
  const res = await request(
5516
4842
  this.ctx,
5517
4843
  {
5518
4844
  method: "POST",
5519
- path: `/api/v1/computers/${id}/workspace-links`,
5520
- body: { workspace_id: workspaceId },
4845
+ path: `/api/v1/computers/${id}/transfer`,
4846
+ body: { owner },
5521
4847
  signal: opts.signal
5522
4848
  }
5523
4849
  );
5524
- return res.data.link;
5525
- }
5526
- /**
5527
- * Stop sharing a computer's local inference into a workspace. `workspaceId`
5528
- * is the target workspace's `ws_…` resourceId. Idempotent — unlinking a
5529
- * non-existent link still succeeds.
5530
- */
5531
- async unlinkWorkspace(id, workspaceId, opts = {}) {
5532
- const res = await request(this.ctx, {
5533
- method: "DELETE",
5534
- path: `/api/v1/computers/${id}/workspace-links/${workspaceId}`,
5535
- signal: opts.signal
5536
- });
5537
- return res.data;
4850
+ return res.data.computer;
5538
4851
  }
5539
4852
  // ---------------------------------------------------------------------------
5540
4853
  // Pair-token redemption (daemon bootstrap)
@@ -5542,7 +4855,7 @@ var ComputersApi = class {
5542
4855
  /**
5543
4856
  * Redeem a one-time pair token for a long-lived computer identity. The
5544
4857
  * token itself is the auth — we swap the bearer for the token on this
5545
- * call only (same pattern as `triggers.fire`).
4858
+ * call only (same pattern as `automations.fire`).
5546
4859
  *
5547
4860
  * Used by `idapt up --token` to bootstrap a daemon. The request body is
5548
4861
  * snake_case; the response is wrapped in the standard `{data:{…}}`
@@ -5564,117 +4877,6 @@ var ComputersApi = class {
5564
4877
  }
5565
4878
  };
5566
4879
 
5567
- // ../sdk/src/api/datastore.ts
5568
- var enc2 = encodeURIComponent;
5569
- var DatastoreApi = class {
5570
- constructor(ctx) {
5571
- this.ctx = ctx;
5572
- }
5573
- /** List keys in a namespace (prefix-filterable). */
5574
- async list(namespace, opts = {}) {
5575
- const q = new URLSearchParams();
5576
- if (opts.prefix) q.set("prefix", opts.prefix);
5577
- if (opts.cursor) q.set("cursor", opts.cursor);
5578
- if (opts.limit) q.set("limit", String(opts.limit));
5579
- const qs = q.toString() ? `?${q.toString()}` : "";
5580
- const res = await request(this.ctx, {
5581
- method: "GET",
5582
- path: `/api/v1/datastore/${enc2(namespace)}${qs}`,
5583
- signal: opts.signal
5584
- });
5585
- return res.data;
5586
- }
5587
- /** Read a KV entry. */
5588
- async get(namespace, key, opts = {}) {
5589
- const res = await request(this.ctx, {
5590
- method: "GET",
5591
- path: `/api/v1/datastore/${enc2(namespace)}/${enc2(key)}`,
5592
- signal: opts.signal
5593
- });
5594
- return res.data;
5595
- }
5596
- /** Upsert a KV entry (optionally with a TTL). */
5597
- async set(namespace, key, value, opts = {}) {
5598
- const res = await request(this.ctx, {
5599
- method: "POST",
5600
- path: `/api/v1/datastore/${enc2(namespace)}/${enc2(key)}`,
5601
- body: { value, ttl_seconds: opts.ttlSeconds },
5602
- signal: opts.signal
5603
- });
5604
- return res.data;
5605
- }
5606
- /** Delete a KV entry (idempotent). */
5607
- async delete(namespace, key, opts = {}) {
5608
- return request(this.ctx, {
5609
- method: "DELETE",
5610
- path: `/api/v1/datastore/${enc2(namespace)}/${enc2(key)}`,
5611
- signal: opts.signal
5612
- });
5613
- }
5614
- /** Atomically add `by` (default 1) to a numeric counter. */
5615
- async increment(namespace, key, by = 1, opts = {}) {
5616
- const res = await request(
5617
- this.ctx,
5618
- {
5619
- method: "POST",
5620
- path: `/api/v1/datastore/${enc2(namespace)}/${enc2(key)}/increment`,
5621
- body: { by },
5622
- signal: opts.signal
5623
- }
5624
- );
5625
- return res.data;
5626
- }
5627
- /** List the namespaces in the workspace. */
5628
- async listNamespaces(opts = {}) {
5629
- const res = await request(this.ctx, {
5630
- method: "GET",
5631
- path: "/api/v1/datastore",
5632
- signal: opts.signal
5633
- });
5634
- return res.data.map((n) => n.namespace);
5635
- }
5636
- /** Read several keys at once. */
5637
- async batchGet(namespace, keys, opts = {}) {
5638
- const res = await request(
5639
- this.ctx,
5640
- {
5641
- method: "POST",
5642
- path: `/api/v1/datastore/${enc2(namespace)}`,
5643
- body: { op: "get", keys },
5644
- signal: opts.signal
5645
- }
5646
- );
5647
- return res.data.entries ?? [];
5648
- }
5649
- /** Upsert several entries at once. */
5650
- async batchSet(namespace, entries, opts = {}) {
5651
- const res = await request(this.ctx, {
5652
- method: "POST",
5653
- path: `/api/v1/datastore/${enc2(namespace)}`,
5654
- body: {
5655
- op: "set",
5656
- entries: entries.map((e) => ({
5657
- key: e.key,
5658
- value: e.value,
5659
- ttl_seconds: e.ttlSeconds
5660
- }))
5661
- },
5662
- signal: opts.signal
5663
- });
5664
- return res.data.count ?? 0;
5665
- }
5666
- /** Delete several keys at once; returns the count removed. */
5667
- async batchDelete(namespace, keys, opts = {}) {
5668
- const res = await request(this.ctx, {
5669
- method: "POST",
5670
- path: `/api/v1/datastore/${enc2(namespace)}`,
5671
- body: { op: "delete", keys },
5672
- signal: opts.signal
5673
- });
5674
- return res.data.count ?? 0;
5675
- }
5676
- };
5677
-
5678
4880
  // ../sdk/src/api/docs.ts
5679
4881
  var DocsApi = class {
5680
4882
  constructor(ctx) {
@@ -5742,7 +4944,7 @@ var FilesApi = class {
5742
4944
  return permanentDeleteFile(this.ctx, id, opts);
5743
4945
  }
5744
4946
  // ---------------------------------------------------------------------------
5745
- // Folder / move / run
4947
+ // Folder / move
5746
4948
  // ---------------------------------------------------------------------------
5747
4949
  /**
5748
4950
  * Idempotent create-or-get a folder. Returns the existing folder (with
@@ -5754,163 +4956,6 @@ var FilesApi = class {
5754
4956
  move(id, parentId, opts = {}) {
5755
4957
  return moveFile(this.ctx, id, parentId, opts);
5756
4958
  }
5757
- /**
5758
- * Execute a code file (js/ts/py/sh) in a sandboxed Lambda. Returns the
5759
- * full `ExecutionRun` record (status, stdout/stderr, exit code, timestamps).
5760
- */
5761
- run(id, input = {}, opts = {}) {
5762
- return runFile(this.ctx, id, input, opts);
5763
- }
5764
- };
5765
-
5766
- // ../sdk/src/api/functions.ts
5767
- var enc3 = encodeURIComponent;
5768
- var FunctionRunsApi = class {
5769
- constructor(ctx) {
5770
- this.ctx = ctx;
5771
- }
5772
- /** List one-off function runs (cursor-paginated). */
5773
- async list(query = {}, opts = {}) {
5774
- const res = await request(this.ctx, {
5775
- method: "GET",
5776
- path: "/api/v1/functions/runs",
5777
- query,
5778
- signal: opts.signal
5779
- });
5780
- return res.data;
5781
- }
5782
- /** Get a single one-off run by id. */
5783
- async get(id, opts = {}) {
5784
- const res = await request(this.ctx, {
5785
- method: "GET",
5786
- path: `/api/v1/functions/runs/${enc3(id)}`,
5787
- signal: opts.signal
5788
- });
5789
- return res.data;
5790
- }
5791
- /**
5792
- * Interrupt a running run. Only computer-backed runs can be interrupted;
5793
- * Lambda-backed runs return 409 (`ConflictError`).
5794
- */
5795
- async interrupt(id, opts = {}) {
5796
- const res = await request(this.ctx, {
5797
- method: "POST",
5798
- path: `/api/v1/functions/runs/${enc3(id)}/interrupt`,
5799
- body: {},
5800
- signal: opts.signal
5801
- });
5802
- return res.data;
5803
- }
5804
- };
5805
- var FunctionsApi = class {
5806
- constructor(ctx) {
5807
- this.ctx = ctx;
5808
- this.runs = new FunctionRunsApi(ctx);
5809
- }
5810
- /**
5811
- * Run a script ONCE in the sandbox. Pass EITHER inline `script` (+ optional
5812
- * `language`) OR an existing Drive `file_id`. Returns the full `FunctionRun`
5813
- * row — `id`, `status`, `stdout`, `stderr`, `exit_code`, the run timestamps,
5814
- * and any `output_files` the script wrote under `/tmp/output/`.
5815
- */
5816
- async run(input, opts = {}) {
5817
- const res = await request(this.ctx, {
5818
- method: "POST",
5819
- path: "/api/v1/functions/runs",
5820
- body: input,
5821
- signal: opts.signal
5822
- });
5823
- return res.data;
5824
- }
5825
- /** List deployed functions in the workspace. */
5826
- async list(query = {}, opts = {}) {
5827
- const res = await request(this.ctx, {
5828
- method: "GET",
5829
- path: "/api/v1/functions",
5830
- query,
5831
- signal: opts.signal
5832
- });
5833
- return res.data;
5834
- }
5835
- /** Get a deployed function by its resourceId. */
5836
- async get(id, opts = {}) {
5837
- const res = await request(this.ctx, {
5838
- method: "GET",
5839
- path: `/api/v1/functions/${enc3(id)}`,
5840
- signal: opts.signal
5841
- });
5842
- return res.data;
5843
- }
5844
- /** Create a deployed function (config only — `deploy` adds a bundle). */
5845
- async create(input, opts = {}) {
5846
- const res = await request(this.ctx, {
5847
- method: "POST",
5848
- path: "/api/v1/functions",
5849
- body: input,
5850
- signal: opts.signal
5851
- });
5852
- return res.data;
5853
- }
5854
- /** Update a deployed function's config. */
5855
- async update(id, patch, opts = {}) {
5856
- const res = await request(this.ctx, {
5857
- method: "PATCH",
5858
- path: `/api/v1/functions/${enc3(id)}`,
5859
- body: patch,
5860
- signal: opts.signal
5861
- });
5862
- return res.data;
5863
- }
5864
- /** Delete a deployed function + all its deployments. */
5865
- async delete(id, opts = {}) {
5866
- return request(this.ctx, {
5867
- method: "DELETE",
5868
- path: `/api/v1/functions/${enc3(id)}`,
5869
- signal: opts.signal
5870
- });
5871
- }
5872
- /**
5873
- * Deploy a new bundle (inline base64 files). Promotes the new deployment to
5874
- * live immediately unless `promote: false`. Returns the new deployment.
5875
- */
5876
- async deploy(id, input, opts = {}) {
5877
- const res = await request(this.ctx, {
5878
- method: "POST",
5879
- path: `/api/v1/functions/${enc3(id)}/deploy`,
5880
- body: input,
5881
- signal: opts.signal
5882
- });
5883
- return res.data;
5884
- }
5885
- /** List a function's deployments (newest-first). */
5886
- async deployments(id, opts = {}) {
5887
- const res = await request(this.ctx, {
5888
- method: "GET",
5889
- path: `/api/v1/functions/${enc3(id)}/deployments`,
5890
- signal: opts.signal
5891
- });
5892
- return res.data;
5893
- }
5894
- /** Promote (or roll back to) a deployment — flips the active one. */
5895
- async promote(id, input, opts = {}) {
5896
- const res = await request(this.ctx, {
5897
- method: "POST",
5898
- path: `/api/v1/functions/${enc3(id)}/promote`,
5899
- body: input,
5900
- signal: opts.signal
5901
- });
5902
- return res.data;
5903
- }
5904
- /** Invoke a deployed function synchronously; returns its response. */
5905
- async invoke(id, input = {}, opts = {}) {
5906
- const res = await request(this.ctx, {
5907
- method: "POST",
5908
- path: `/api/v1/functions/${enc3(id)}/invoke`,
5909
- body: input,
5910
- signal: opts.signal
5911
- });
5912
- return res.data;
5913
- }
5914
4959
  };
5915
4960
 
5916
4961
  // ../sdk/src/api/guide.ts
@@ -5937,6 +4982,7 @@ var ImagesApi = class {
5937
4982
  constructor(ctx) {
5938
4983
  this.ctx = ctx;
5939
4984
  }
4985
+ /** List the available image-generation models. */
5940
4986
  async listModels(opts = {}) {
5941
4987
  const res = await request(this.ctx, {
5942
4988
  method: "GET",
@@ -5945,16 +4991,51 @@ var ImagesApi = class {
5945
4991
  });
5946
4992
  return res.data;
5947
4993
  }
5948
- /** Generate an image. Responds HTTP 201 with the written file ref under `data`. */
5949
- async generate(input, opts = {}) {
5950
- const res = await request(this.ctx, {
5951
- method: "POST",
5952
- path: "/api/v1/images/generations",
5953
- body: input,
5954
- signal: opts.signal
5955
- });
5956
- return res.data;
4994
+ };
4995
+
4996
+ // ../sdk/src/api/inference.ts
4997
+ var InferenceApi = class {
4998
+ constructor(ctx) {
4999
+ this.ctx = ctx;
5000
+ }
5001
+ /** One-shot LLM completion (message-based). */
5002
+ text(input, opts = {}) {
5003
+ return executeCommand(
5004
+ COMMAND_BINDINGS["inference text"],
5005
+ input,
5006
+ this.ctx,
5007
+ opts
5008
+ );
5009
+ }
5010
+ /** Generate an image from a prompt. */
5011
+ image(input, opts = {}) {
5012
+ return executeCommand(
5013
+ COMMAND_BINDINGS["inference image"],
5014
+ input,
5015
+ this.ctx,
5016
+ opts
5017
+ );
5018
+ }
5019
+ /** Generate a video (ALWAYS async — polls to completion unless `wait:false`). */
5020
+ video(input, opts = {}) {
5021
+ return executeCommand(
5022
+ COMMAND_BINDINGS["inference video"],
5023
+ input,
5024
+ this.ctx,
5025
+ opts
5026
+ );
5027
+ }
5028
+ /** Synthesize speech from text (TTS). */
5029
+ speech(input, opts = {}) {
5030
+ return executeCommand(
5031
+ COMMAND_BINDINGS["inference speech"],
5032
+ input,
5033
+ this.ctx,
5034
+ opts
5035
+ );
5957
5036
  }
5037
+ // `inference transcribe` is multipart (audio file upload) — use
5038
+ // `client.call("inference transcribe", …)` with a File/Blob body.
5958
5039
  };
5959
5040
 
5960
5041
  // ../sdk/src/api/models.ts
@@ -6137,20 +5218,54 @@ var NotificationsApi = class {
6137
5218
  );
6138
5219
  return res.data;
6139
5220
  }
6140
- /**
6141
- * Bulk-update preferences. Each entry sets one (type, subtype?, channel)
6142
- * row. Empty `updates[]` → 422. Returns the full flat preference array.
6143
- */
6144
- async updatePreferences(updates, opts = {}) {
6145
- const res = await request(
6146
- this.ctx,
6147
- {
6148
- method: "PATCH",
6149
- path: "/api/v1/notifications/preferences",
6150
- body: { updates },
6151
- signal: opts.signal
6152
- }
6153
- );
5221
+ /**
5222
+ * Bulk-update preferences. Each entry sets one (type, subtype?, channel)
5223
+ * row. Empty `updates[]` → 422. Returns the full flat preference array.
5224
+ */
5225
+ async updatePreferences(updates, opts = {}) {
5226
+ const res = await request(
5227
+ this.ctx,
5228
+ {
5229
+ method: "PATCH",
5230
+ path: "/api/v1/notifications/preferences",
5231
+ body: { updates },
5232
+ signal: opts.signal
5233
+ }
5234
+ );
5235
+ return res.data;
5236
+ }
5237
+ };
5238
+
5239
+ // ../sdk/src/api/operations.ts
5240
+ var OperationsApi = class {
5241
+ constructor(ctx) {
5242
+ this.ctx = ctx;
5243
+ }
5244
+ /** Fetch one operation by its handle id (`inf_…` / execution-run id). */
5245
+ async get(id, opts = {}) {
5246
+ const res = await request(this.ctx, {
5247
+ method: "GET",
5248
+ path: `/api/v1/operations/${encodeURIComponent(id)}`,
5249
+ signal: opts.signal
5250
+ });
5251
+ return res.data;
5252
+ }
5253
+ /** List the caller's recent operations, newest first (keyset-paginated). */
5254
+ async list(input = {}, opts = {}) {
5255
+ return request(this.ctx, {
5256
+ method: "GET",
5257
+ path: "/api/v1/operations",
5258
+ query: input,
5259
+ signal: opts.signal
5260
+ });
5261
+ }
5262
+ /** Request cancellation (idempotent — a terminal op is returned as-is). */
5263
+ async cancel(id, opts = {}) {
5264
+ const res = await request(this.ctx, {
5265
+ method: "POST",
5266
+ path: `/api/v1/operations/${encodeURIComponent(id)}/cancel`,
5267
+ signal: opts.signal
5268
+ });
6154
5269
  return res.data;
6155
5270
  }
6156
5271
  };
@@ -6215,7 +5330,7 @@ var ProviderEndpointsApi = class {
6215
5330
  };
6216
5331
 
6217
5332
  // ../sdk/src/api/realtime.ts
6218
- var enc4 = encodeURIComponent;
5333
+ var enc = encodeURIComponent;
6219
5334
  var RECONNECT_MIN_MS = 1e3;
6220
5335
  var RECONNECT_MAX_MS = 3e4;
6221
5336
  var RealtimeApi = class {
@@ -6226,7 +5341,7 @@ var RealtimeApi = class {
6226
5341
  async broadcast(channel, message, opts = {}) {
6227
5342
  const res = await request(this.ctx, {
6228
5343
  method: "POST",
6229
- path: `/api/v1/realtime/${enc4(channel)}/broadcast`,
5344
+ path: `/api/v1/realtime/${enc(channel)}/broadcast`,
6230
5345
  body: { message },
6231
5346
  signal: opts.signal
6232
5347
  });
@@ -6236,7 +5351,7 @@ var RealtimeApi = class {
6236
5351
  async heartbeat(channel, opts = {}) {
6237
5352
  const res = await request(this.ctx, {
6238
5353
  method: "POST",
6239
- path: `/api/v1/realtime/${enc4(channel)}/presence`,
5354
+ path: `/api/v1/realtime/${enc(channel)}/presence`,
6240
5355
  body: { meta: opts.meta, ttl_seconds: opts.ttlSeconds },
6241
5356
  signal: opts.signal
6242
5357
  });
@@ -6246,7 +5361,7 @@ var RealtimeApi = class {
6246
5361
  async presence(channel, opts = {}) {
6247
5362
  const res = await request(this.ctx, {
6248
5363
  method: "GET",
6249
- path: `/api/v1/realtime/${enc4(channel)}/presence`,
5364
+ path: `/api/v1/realtime/${enc(channel)}/presence`,
6250
5365
  signal: opts.signal
6251
5366
  });
6252
5367
  return res.data;
@@ -6340,7 +5455,7 @@ async function* parseSseStream(response, signal) {
6340
5455
  if (boundary === -1) break;
6341
5456
  const block = buffer.slice(0, boundary);
6342
5457
  buffer = buffer.slice(boundary + 2);
6343
- const parsed = parseSseBlock3(block);
5458
+ const parsed = parseSseBlock2(block);
6344
5459
  if (parsed) yield parsed;
6345
5460
  }
6346
5461
  }
@@ -6351,7 +5466,7 @@ async function* parseSseStream(response, signal) {
6351
5466
  }
6352
5467
  }
6353
5468
  }
6354
- function parseSseBlock3(block) {
5469
+ function parseSseBlock2(block) {
6355
5470
  let id;
6356
5471
  let data = "";
6357
5472
  let isHeartbeat = false;
@@ -6601,42 +5716,6 @@ var SharingApi = class {
6601
5716
  }
6602
5717
  };
6603
5718
 
6604
- // ../sdk/src/api/store.ts
6605
- var StoreApi = class {
6606
- constructor(ctx) {
6607
- this.ctx = ctx;
6608
- }
6609
- /**
6610
- * Search the hub. Open envelope — items are heterogeneous (skills carry
6611
- * version/license, agents carry icons/prompts, computer templates carry
6612
- * sizing) so we surface them as `StoreItem` with an open index signature.
6613
- */
6614
- async search(query = {}, opts = {}) {
6615
- const res = await request(this.ctx, {
6616
- method: "GET",
6617
- path: "/api/v1/store/search",
6618
- query,
6619
- signal: opts.signal
6620
- });
6621
- return res.data;
6622
- }
6623
- /**
6624
- * Install a hub item into one of the caller's workspaces. Returns whatever
6625
- * the per-template installer produces (folder ids, agent ids, ...) —
6626
- * `StoreInstallResult` carries the common fields and leaves the rest
6627
- * open.
6628
- */
6629
- async install(resourceId, input, opts = {}) {
6630
- const res = await request(this.ctx, {
6631
- method: "POST",
6632
- path: `/api/v1/store/${resourceId}/install`,
6633
- body: input,
6634
- signal: opts.signal
6635
- });
6636
- return res.data;
6637
- }
6638
- };
6639
-
6640
5719
  // ../sdk/src/api/subscription.ts
6641
5720
  var SubscriptionApi = class {
6642
5721
  constructor(ctx) {
@@ -6652,271 +5731,6 @@ var SubscriptionApi = class {
6652
5731
  }
6653
5732
  };
6654
5733
 
6655
- // ../sdk/src/api/tables.ts
6656
- var enc5 = encodeURIComponent;
6657
- var TablesApi = class {
6658
- constructor(ctx) {
6659
- this.ctx = ctx;
6660
- }
6661
- async list(opts = {}) {
6662
- const q = new URLSearchParams();
6663
- if (opts.workspaceId) q.set("workspace_id", opts.workspaceId);
6664
- if (opts.cursor) q.set("cursor", opts.cursor);
6665
- if (opts.limit) q.set("limit", String(opts.limit));
6666
- const qs = q.toString() ? `?${q.toString()}` : "";
6667
- const res = await request(this.ctx, {
6668
- method: "GET",
6669
- path: `/api/v1/tables${qs}`,
6670
- signal: opts.signal
6671
- });
6672
- return res.data;
6673
- }
6674
- async get(id, opts = {}) {
6675
- const res = await request(this.ctx, {
6676
- method: "GET",
6677
- path: `/api/v1/tables/${enc5(id)}`,
6678
- signal: opts.signal
6679
- });
6680
- return res.data;
6681
- }
6682
- async create(input, opts = {}) {
6683
- const res = await request(this.ctx, {
6684
- method: "POST",
6685
- path: "/api/v1/tables",
6686
- body: input,
6687
- signal: opts.signal
6688
- });
6689
- return res.data;
6690
- }
6691
- async update(id, input, opts = {}) {
6692
- const res = await request(this.ctx, {
6693
- method: "PATCH",
6694
- path: `/api/v1/tables/${enc5(id)}`,
6695
- body: input,
6696
- signal: opts.signal
6697
- });
6698
- return res.data;
6699
- }
6700
- async delete(id, opts = {}) {
6701
- return request(this.ctx, {
6702
- method: "DELETE",
6703
- path: `/api/v1/tables/${enc5(id)}`,
6704
- signal: opts.signal
6705
- });
6706
- }
6707
- /** Query a collection's records with the filter/sort/paginate DSL. */
6708
- async query(id, query = {}, opts = {}) {
6709
- const res = await request(this.ctx, {
6710
- method: "POST",
6711
- path: `/api/v1/tables/${enc5(id)}/query`,
6712
- body: query,
6713
- signal: opts.signal
6714
- });
6715
- return res.data;
6716
- }
6717
- async createRecord(id, values, opts = {}) {
6718
- const res = await request(this.ctx, {
6719
- method: "POST",
6720
- path: `/api/v1/tables/${enc5(id)}/records`,
6721
- body: { values },
6722
- signal: opts.signal
6723
- });
6724
- return res.data;
6725
- }
6726
- async getRecord(id, recordId, opts = {}) {
6727
- const res = await request(this.ctx, {
6728
- method: "GET",
6729
- path: `/api/v1/tables/${enc5(id)}/records/${enc5(recordId)}`,
6730
- signal: opts.signal
6731
- });
6732
- return res.data;
6733
- }
6734
- async updateRecord(id, recordId, values, opts = {}) {
6735
- const res = await request(this.ctx, {
6736
- method: "PATCH",
6737
- path: `/api/v1/tables/${enc5(id)}/records/${enc5(recordId)}`,
6738
- body: { values },
6739
- signal: opts.signal
6740
- });
6741
- return res.data;
6742
- }
6743
- async deleteRecord(id, recordId, opts = {}) {
6744
- return request(this.ctx, {
6745
- method: "DELETE",
6746
- path: `/api/v1/tables/${enc5(id)}/records/${enc5(recordId)}`,
6747
- signal: opts.signal
6748
- });
6749
- }
6750
- /** Export a collection's records as a CSV string (header row = field keys). */
6751
- async exportCsv(id, opts = {}) {
6752
- const res = await requestRaw(this.ctx, {
6753
- method: "GET",
6754
- path: `/api/v1/tables/${enc5(id)}/export`,
6755
- signal: opts.signal,
6756
- expectJson: false
6757
- });
6758
- return res.text();
6759
- }
6760
- /** Import records into a collection from a CSV string. Returns the count. */
6761
- async importCsv(id, csv, opts = {}) {
6762
- const res = await request(this.ctx, {
6763
- method: "POST",
6764
- path: `/api/v1/tables/${enc5(id)}/import`,
6765
- body: { csv },
6766
- signal: opts.signal
6767
- });
6768
- return res.data;
6769
- }
6770
- };
6771
-
6772
- // ../sdk/src/api/triggers.ts
6773
- var TriggersApi = class {
6774
- constructor(ctx) {
6775
- this.ctx = ctx;
6776
- }
6777
- // ---------------------------------------------------------------------------
6778
- // CRUD
6779
- // ---------------------------------------------------------------------------
6780
- async list(query = {}, opts = {}) {
6781
- const res = await request(this.ctx, {
6782
- method: "GET",
6783
- path: "/api/v1/triggers",
6784
- query,
6785
- signal: opts.signal
6786
- });
6787
- return res.data;
6788
- }
6789
- /**
6790
- * Create a trigger. `workspace_id` is passed in the request BODY (alongside
6791
- * the flat trigger definition) — it is not a query param. The request
6792
- * body is flat: every scheduling field (`cron_expression`, …) and every
6793
- * action field (`agent_id`, `prompt_template`, `file_id`, …) sits at the
6794
- * top level — there are no nested `trigger_config` / `action_config`
6795
- * objects any more.
6796
- *
6797
- * For a `webhook` trigger the response additionally carries a one-time
6798
- * plaintext `secret` (use `TriggerWithSecret`); other trigger types
6799
- * resolve to a plain `Trigger`.
6800
- */
6801
- async create(workspaceId, input, opts = {}) {
6802
- const res = await request(
6803
- this.ctx,
6804
- {
6805
- method: "POST",
6806
- path: "/api/v1/triggers",
6807
- body: { workspace_id: workspaceId, ...input },
6808
- signal: opts.signal
6809
- }
6810
- );
6811
- return res.data;
6812
- }
6813
- async get(id, opts = {}) {
6814
- const res = await request(this.ctx, {
6815
- method: "GET",
6816
- path: `/api/v1/triggers/${id}`,
6817
- signal: opts.signal
6818
- });
6819
- return res.data;
6820
- }
6821
- async update(id, input, opts = {}) {
6822
- const res = await request(this.ctx, {
6823
- method: "PATCH",
6824
- path: `/api/v1/triggers/${id}`,
6825
- body: input,
6826
- signal: opts.signal
6827
- });
6828
- return res.data;
6829
- }
6830
- async delete(id, opts = {}) {
6831
- return request(this.ctx, {
6832
- method: "DELETE",
6833
- path: `/api/v1/triggers/${id}`,
6834
- signal: opts.signal
6835
- });
6836
- }
6837
- async archive(id, opts = {}) {
6838
- const res = await request(this.ctx, {
6839
- method: "POST",
6840
- path: `/api/v1/triggers/${id}/archive`,
6841
- signal: opts.signal
6842
- });
6843
- return res.data;
6844
- }
6845
- async unarchive(id, opts = {}) {
6846
- const res = await request(this.ctx, {
6847
- method: "POST",
6848
- path: `/api/v1/triggers/${id}/unarchive`,
6849
- signal: opts.signal
6850
- });
6851
- return res.data;
6852
- }
6853
- // ---------------------------------------------------------------------------
6854
- // Fire + rotate-secret + runs
6855
- // ---------------------------------------------------------------------------
6856
- /**
6857
- * Fire a trigger via its webhook secret. This endpoint does NOT use the
6858
- * client's `ap_` key — the bearer is the trigger's secret — so we build a
6859
- * one-off HttpContext for it rather than mutating the shared one.
6860
- *
6861
- * Responds HTTP 202. The response identifies the fired trigger via `id`
6862
- * only.
6863
- */
6864
- async fire(id, input, opts = {}) {
6865
- const localCtx = {
6866
- apiUrl: this.ctx.apiUrl,
6867
- key: input.secret,
6868
- fetch: this.ctx.fetch
6869
- };
6870
- const res = await request(localCtx, {
6871
- method: "POST",
6872
- path: `/api/v1/triggers/${id}/fire`,
6873
- body: input.body ?? {},
6874
- signal: opts.signal
6875
- });
6876
- return res.data;
6877
- }
6878
- /**
6879
- * Rotate the webhook secret. Returns the trigger with a fresh one-time
6880
- * plaintext `secret` populated (`TriggerWithSecret`). The old secret
6881
- * immediately stops working.
6882
- */
6883
- async rotateSecret(id, opts = {}) {
6884
- const res = await request(this.ctx, {
6885
- method: "POST",
6886
- path: `/api/v1/triggers/${id}/rotate-secret`,
6887
- signal: opts.signal
6888
- });
6889
- return res.data;
6890
- }
6891
- /** Recent fires + their success/error outcome. */
6892
- async listRuns(id, query = {}, opts = {}) {
6893
- const res = await request(this.ctx, {
6894
- method: "GET",
6895
- path: `/api/v1/triggers/${id}/runs`,
6896
- query,
6897
- signal: opts.signal
6898
- });
6899
- return res.data;
6900
- }
6901
- async getCostStats(id, opts = {}) {
6902
- const res = await request(this.ctx, {
6903
- method: "GET",
6904
- path: `/api/v1/triggers/${id}/cost-stats`,
6905
- signal: opts.signal
6906
- });
6907
- return res.data;
6908
- }
6909
- async getCostStatsMap(query = {}, opts = {}) {
6910
- const res = await request(this.ctx, {
6911
- method: "GET",
6912
- path: "/api/v1/triggers/cost-stats",
6913
- query,
6914
- signal: opts.signal
6915
- });
6916
- return res.data.by_id;
6917
- }
6918
- };
6919
-
6920
5734
  // ../sdk/src/api/user.ts
6921
5735
  var UserApi = class {
6922
5736
  constructor(ctx) {
@@ -6960,11 +5774,11 @@ var UserApi = class {
6960
5774
  };
6961
5775
 
6962
5776
  // ../sdk/src/api/videos.ts
6963
- var GENERATE_BINDING = COMMAND_BINDINGS["video generate"];
6964
5777
  var VideosApi = class {
6965
5778
  constructor(ctx) {
6966
5779
  this.ctx = ctx;
6967
5780
  }
5781
+ /** List the available video-generation models. */
6968
5782
  async listModels(opts = {}) {
6969
5783
  const res = await request(this.ctx, {
6970
5784
  method: "GET",
@@ -6973,6 +5787,7 @@ var VideosApi = class {
6973
5787
  });
6974
5788
  return res.data;
6975
5789
  }
5790
+ /** Search the video-model registry (filtered + paginated envelope). */
6976
5791
  async searchModels(input = {}, opts = {}) {
6977
5792
  const res = await request(
6978
5793
  this.ctx,
@@ -6985,27 +5800,6 @@ var VideosApi = class {
6985
5800
  );
6986
5801
  return res.data;
6987
5802
  }
6988
- async generate(input, opts = {}) {
6989
- const res = await request(this.ctx, {
6990
- method: "POST",
6991
- path: "/api/v1/videos/generations",
6992
- body: input,
6993
- signal: opts.signal
6994
- });
6995
- const handle = res.data;
6996
- if (opts.wait === false) return handle;
6997
- const pollOpts = {
6998
- signal: opts.signal,
6999
- pollIntervalMs: opts.pollIntervalMs,
7000
- maxPollAttempts: opts.maxPollAttempts
7001
- };
7002
- return await awaitOperation(
7003
- GENERATE_BINDING,
7004
- handle.id,
7005
- this.ctx,
7006
- pollOpts
7007
- );
7008
- }
7009
5803
  };
7010
5804
 
7011
5805
  // ../sdk/src/api/web.ts
@@ -7170,8 +5964,12 @@ var WorkspacesApi = class {
7170
5964
  }
7171
5965
  };
7172
5966
 
5967
+ // ../sdk/src/api-version.ts
5968
+ var IDAPT_API_VERSION = "2026-07-12";
5969
+ var IDAPT_API_VERSION_HEADER = "x-idapt-version";
5970
+
7173
5971
  // ../sdk/src/version.ts
7174
- var VERSION = "0.2.0" ;
5972
+ var VERSION = "0.4.0" ;
7175
5973
 
7176
5974
  // src/api/app.ts
7177
5975
  var RemoteBundleReader = class {
@@ -7633,6 +6431,6 @@ function isDataStore(x) {
7633
6431
  return typeof x.write === "function" && typeof x.upload === "function" && typeof x.getMetadata === "function";
7634
6432
  }
7635
6433
 
7636
- export { AgentsApi, AiGatewayApi, ApiKeysApi, AppFolder, AudioApi, AuthError, BlobsApi, COMMAND_BINDINGS, ChatsApi, ComputersApi, ConflictError, DataFolder, DatastoreApi, DocsApi, FilesApi, FunctionsApi, GuideApi, IdaptError, ImagesApi, InvalidRequestError, ModelsApi, NetworkError, NotFoundError, NotificationsApi, PermissionError, ProviderEndpointsApi, RateLimitError, RealtimeApi, RemoteBundleReader, RemoteDataStore, SearchApi, SecretsApi, ServerError, ServiceUnavailableError, SettingsApi, SharingApi, StoreApi, SubscriptionApi, TablesApi, TriggersApi, UserApi, VERSION, VideosApi, WebSearchApi, WorkspacesApi, awaitOperation, buildUrl, errorFromStatus, executeCommand, getFileBlob, getFileText, listFiles, request, requestRaw };
7637
- //# sourceMappingURL=chunk-KHPTFRT3.js.map
7638
- //# sourceMappingURL=chunk-KHPTFRT3.js.map
6434
+ export { AgentsApi, AiGatewayApi, ApiKeysApi, AppFolder, AudioApi, AuthError, AutomationsApi, COMMAND_BINDINGS, ChatsApi, ComputersApi, ConflictError, DataFolder, DocsApi, FilesApi, GuideApi, IDAPT_API_VERSION, IDAPT_API_VERSION_HEADER, IdaptError, ImagesApi, InferenceApi, InvalidRequestError, ModelsApi, NetworkError, NotFoundError, NotificationsApi, OperationsApi, PermissionError, ProviderEndpointsApi, RateLimitError, RealtimeApi, RemoteBundleReader, RemoteDataStore, SearchApi, SecretsApi, ServerError, ServiceUnavailableError, SettingsApi, SharingApi, SubscriptionApi, UserApi, VERSION, VideosApi, WebSearchApi, WorkspacesApi, awaitOperation, buildUrl, errorFromStatus, executeCommand, getFileBlob, getFileText, listFiles, request, requestRaw };
6435
+ //# sourceMappingURL=chunk-5GAGDUWY.js.map
6436
+ //# sourceMappingURL=chunk-5GAGDUWY.js.map