@idapt/browser-app-sdk 0.3.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,151 +550,26 @@ 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
574
  // ../sdk/src/api/automations.ts
693
575
  var AutomationsApi = class {
@@ -709,10 +591,9 @@ var AutomationsApi = class {
709
591
  /**
710
592
  * Create an automation. `workspace_id` is passed in the request BODY
711
593
  * alongside the flat automation definition — it is not a query param. The request
712
- * body is flat: every scheduling field (`cron_expression`, …) and every
713
- * action field (`agent_id`, `prompt_template`, `function_id`, …) sits at the
714
- * top level — there are no nested `trigger_config` / `action_config`
715
- * objects any more.
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.
716
597
  *
717
598
  * For a webhook automation the response additionally carries a one-time
718
599
  * plaintext `secret` (use `AutomationWithSecret`); other automation types
@@ -834,108 +715,6 @@ var AutomationsApi = class {
834
715
  }
835
716
  };
836
717
 
837
- // ../sdk/src/api/blobs.ts
838
- var enc = encodeURIComponent;
839
- var BlobsApi = class {
840
- constructor(ctx) {
841
- this.ctx = ctx;
842
- }
843
- /** List objects in a namespace (prefix-filterable). */
844
- async list(namespace, opts = {}) {
845
- const q = new URLSearchParams();
846
- if (opts.prefix) q.set("prefix", opts.prefix);
847
- if (opts.cursor) q.set("cursor", opts.cursor);
848
- if (opts.limit) q.set("limit", String(opts.limit));
849
- const qs = q.toString() ? `?${q.toString()}` : "";
850
- const res = await request(this.ctx, {
851
- method: "GET",
852
- path: `/api/v1/blobs/${enc(namespace)}${qs}`,
853
- signal: opts.signal
854
- });
855
- return res.data;
856
- }
857
- /**
858
- * Upload (upsert) an object's bytes. Returns its metadata.
859
- *
860
- * Sent as `multipart/form-data` (the bytes ride a `file` part, with an
861
- * optional `content_type` field) — the same upload convention as
862
- * `client.files.upload`, so it flows through the one multipart transport and
863
- * is reachable identically via `client.call("blobs put", …)`. The SDK leaves
864
- * `Content-Type` unset so the runtime picks the multipart boundary.
865
- */
866
- async put(namespace, key, content, contentType, opts = {}) {
867
- const ct = contentType ?? (content instanceof Blob && content.type ? content.type : "application/octet-stream");
868
- const blob = content instanceof Blob ? content : new Blob([content], { type: ct });
869
- const form = new FormData();
870
- form.set("file", blob, key);
871
- form.set("content_type", ct);
872
- const res = await request(this.ctx, {
873
- method: "POST",
874
- path: `/api/v1/blobs/${enc(namespace)}/${enc(key)}`,
875
- // No explicit Content-Type — the runtime sets the multipart boundary.
876
- bodyRaw: form,
877
- signal: opts.signal
878
- });
879
- return res.data;
880
- }
881
- /**
882
- * Download an object's raw bytes (preserving its stored Content-Type).
883
- *
884
- * `GET /blobs/:ns/:key` returns JSON metadata + a signed URL by default (the
885
- * agent/CLI form); `?download=true` is the raw-bytes escape hatch this facade
886
- * uses. For the JSON reference instead, call `client.call("blobs get", …)`.
887
- */
888
- async get(namespace, key, opts = {}) {
889
- const res = await requestRaw(this.ctx, {
890
- method: "GET",
891
- path: `/api/v1/blobs/${enc(namespace)}/${enc(key)}?download=true`,
892
- signal: opts.signal,
893
- expectJson: false
894
- });
895
- const blob = await res.blob();
896
- return {
897
- blob,
898
- contentType: res.headers.get("content-type") ?? "application/octet-stream"
899
- };
900
- }
901
- /** Read an object's metadata (no bytes). */
902
- async head(namespace, key, opts = {}) {
903
- const res = await request(this.ctx, {
904
- method: "GET",
905
- path: `/api/v1/blobs/${enc(namespace)}/${enc(key)}/meta`,
906
- signal: opts.signal
907
- });
908
- return res.data;
909
- }
910
- /** Delete an object (idempotent). */
911
- async delete(namespace, key, opts = {}) {
912
- return request(this.ctx, {
913
- method: "DELETE",
914
- path: `/api/v1/blobs/${enc(namespace)}/${enc(key)}`,
915
- signal: opts.signal
916
- });
917
- }
918
- /** Mint a time-limited direct-download URL for an object. */
919
- async createSignedUrl(namespace, key, expiresIn, opts = {}) {
920
- const res = await request(this.ctx, {
921
- method: "POST",
922
- path: `/api/v1/blobs/${enc(namespace)}/${enc(key)}/signed-url`,
923
- body: { expires_in: expiresIn },
924
- signal: opts.signal
925
- });
926
- return res.data;
927
- }
928
- /** List the blob namespaces in the workspace. */
929
- async listNamespaces(opts = {}) {
930
- const res = await request(this.ctx, {
931
- method: "GET",
932
- path: "/api/v1/blobs",
933
- signal: opts.signal
934
- });
935
- return res.data.map((n) => n.namespace);
936
- }
937
- };
938
-
939
718
  // ../sdk/src/core/execute.ts
940
719
  var TERMINAL = /* @__PURE__ */ new Set(["completed", "failed", "cancelled"]);
941
720
  var defaultSleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
@@ -998,7 +777,7 @@ function buildRequest(binding, path, rest, signal) {
998
777
  return base;
999
778
  }
1000
779
  }
1001
- async function* parseSse2(response, signal) {
780
+ async function* parseSse(response, signal) {
1002
781
  if (!response.body) return;
1003
782
  const reader = response.body.getReader();
1004
783
  const decoder = new TextDecoder();
@@ -1014,7 +793,7 @@ async function* parseSse2(response, signal) {
1014
793
  if (boundary === -1) break;
1015
794
  const block = buffer.slice(0, boundary);
1016
795
  buffer = buffer.slice(boundary + 2);
1017
- const frame = parseSseBlock2(block);
796
+ const frame = parseSseBlock(block);
1018
797
  if (frame) yield frame;
1019
798
  }
1020
799
  }
@@ -1025,7 +804,7 @@ async function* parseSse2(response, signal) {
1025
804
  }
1026
805
  }
1027
806
  }
1028
- function parseSseBlock2(block) {
807
+ function parseSseBlock(block) {
1029
808
  let event = "message";
1030
809
  let data = "";
1031
810
  for (const line of block.split("\n")) {
@@ -1069,7 +848,7 @@ async function executeCommand(binding, args = {}, ctx, opts = {}) {
1069
848
  if (binding.responseKind === "binary") {
1070
849
  if (isSseBinding(binding) && !opts.bufferBinary) {
1071
850
  const res = await requestRaw(ctx, { ...req, expectJson: false });
1072
- return parseSse2(res, opts.signal);
851
+ return parseSse(res, opts.signal);
1073
852
  }
1074
853
  return await request(ctx, { ...req, expectBlob: true });
1075
854
  }
@@ -1243,6 +1022,15 @@ var COMMAND_BINDINGS = {
1243
1022
  "responseKind": "list",
1244
1023
  "async": false
1245
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
+ },
1246
1034
  "ai-gateway usage": {
1247
1035
  "command": "ai-gateway usage",
1248
1036
  "method": "GET",
@@ -1330,48 +1118,6 @@ var COMMAND_BINDINGS = {
1330
1118
  "responseKind": "single",
1331
1119
  "async": false
1332
1120
  },
1333
- "audio speak": {
1334
- "command": "audio speak",
1335
- "method": "POST",
1336
- "path": "/audio/speech",
1337
- "pathParams": [],
1338
- "argLocation": "body",
1339
- "responseKind": "created",
1340
- "async": true
1341
- },
1342
- "audio speak-stream": {
1343
- "command": "audio speak-stream",
1344
- "method": "POST",
1345
- "path": "/audio/speech/stream",
1346
- "pathParams": [],
1347
- "argLocation": "body",
1348
- "responseKind": "binary",
1349
- "async": false,
1350
- "binaryContentTypes": [
1351
- "text/event-stream"
1352
- ]
1353
- },
1354
- "audio transcribe": {
1355
- "command": "audio transcribe",
1356
- "method": "POST",
1357
- "path": "/audio/transcriptions",
1358
- "pathParams": [],
1359
- "argLocation": "multipart",
1360
- "responseKind": "single",
1361
- "async": true
1362
- },
1363
- "audio transcribe-stream": {
1364
- "command": "audio transcribe-stream",
1365
- "method": "POST",
1366
- "path": "/audio/transcriptions/stream",
1367
- "pathParams": [],
1368
- "argLocation": "multipart",
1369
- "responseKind": "binary",
1370
- "async": false,
1371
- "binaryContentTypes": [
1372
- "text/event-stream"
1373
- ]
1374
- },
1375
1121
  "audio voices": {
1376
1122
  "command": "audio voices",
1377
1123
  "method": "GET",
@@ -1392,6 +1138,18 @@ var COMMAND_BINDINGS = {
1392
1138
  "responseKind": "single",
1393
1139
  "async": false
1394
1140
  },
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
+ },
1395
1153
  "automation cost-stats": {
1396
1154
  "command": "automation cost-stats",
1397
1155
  "method": "GET",
@@ -1463,6 +1221,18 @@ var COMMAND_BINDINGS = {
1463
1221
  "responseKind": "list",
1464
1222
  "async": false
1465
1223
  },
1224
+ "automation retry-run": {
1225
+ "command": "automation retry-run",
1226
+ "method": "POST",
1227
+ "path": "/automations/:id/runs/:runId/retry",
1228
+ "pathParams": [
1229
+ "id",
1230
+ "runId"
1231
+ ],
1232
+ "argLocation": "body",
1233
+ "responseKind": "single",
1234
+ "async": true
1235
+ },
1466
1236
  "automation rotate-secret": {
1467
1237
  "command": "automation rotate-secret",
1468
1238
  "method": "POST",
@@ -1485,6 +1255,15 @@ var COMMAND_BINDINGS = {
1485
1255
  "responseKind": "list",
1486
1256
  "async": false
1487
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
+ },
1488
1267
  "automation test-fire": {
1489
1268
  "command": "automation test-fire",
1490
1269
  "method": "POST",
@@ -1518,86 +1297,6 @@ var COMMAND_BINDINGS = {
1518
1297
  "responseKind": "single",
1519
1298
  "async": false
1520
1299
  },
1521
- "blobs delete": {
1522
- "command": "blobs delete",
1523
- "method": "DELETE",
1524
- "path": "/blobs/:namespace/:key",
1525
- "pathParams": [
1526
- "namespace",
1527
- "key"
1528
- ],
1529
- "argLocation": "body",
1530
- "responseKind": "deleted",
1531
- "async": false
1532
- },
1533
- "blobs get": {
1534
- "command": "blobs get",
1535
- "method": "GET",
1536
- "path": "/blobs/:namespace/:key",
1537
- "pathParams": [
1538
- "namespace",
1539
- "key"
1540
- ],
1541
- "argLocation": "query",
1542
- "responseKind": "single",
1543
- "async": false
1544
- },
1545
- "blobs head": {
1546
- "command": "blobs head",
1547
- "method": "GET",
1548
- "path": "/blobs/:namespace/:key/meta",
1549
- "pathParams": [
1550
- "namespace",
1551
- "key"
1552
- ],
1553
- "argLocation": "query",
1554
- "responseKind": "single",
1555
- "async": false
1556
- },
1557
- "blobs list": {
1558
- "command": "blobs list",
1559
- "method": "GET",
1560
- "path": "/blobs/:namespace",
1561
- "pathParams": [
1562
- "namespace"
1563
- ],
1564
- "argLocation": "query",
1565
- "responseKind": "list",
1566
- "async": false
1567
- },
1568
- "blobs namespaces": {
1569
- "command": "blobs namespaces",
1570
- "method": "GET",
1571
- "path": "/blobs",
1572
- "pathParams": [],
1573
- "argLocation": "query",
1574
- "responseKind": "list",
1575
- "async": false
1576
- },
1577
- "blobs put": {
1578
- "command": "blobs put",
1579
- "method": "POST",
1580
- "path": "/blobs/:namespace/:key",
1581
- "pathParams": [
1582
- "namespace",
1583
- "key"
1584
- ],
1585
- "argLocation": "multipart",
1586
- "responseKind": "single",
1587
- "async": false
1588
- },
1589
- "blobs signed-url": {
1590
- "command": "blobs signed-url",
1591
- "method": "POST",
1592
- "path": "/blobs/:namespace/:key/signed-url",
1593
- "pathParams": [
1594
- "namespace",
1595
- "key"
1596
- ],
1597
- "argLocation": "body",
1598
- "responseKind": "single",
1599
- "async": false
1600
- },
1601
1300
  "browser-app create": {
1602
1301
  "command": "browser-app create",
1603
1302
  "method": "POST",
@@ -2053,12 +1752,12 @@ var COMMAND_BINDINGS = {
2053
1752
  },
2054
1753
  "computer app-external": {
2055
1754
  "command": "computer app-external",
2056
- "method": "POST",
1755
+ "method": "GET",
2057
1756
  "path": "/computers/:id/apps/external",
2058
1757
  "pathParams": [
2059
1758
  "id"
2060
1759
  ],
2061
- "argLocation": "body",
1760
+ "argLocation": "query",
2062
1761
  "responseKind": "single",
2063
1762
  "async": false
2064
1763
  },
@@ -2283,7 +1982,7 @@ var COMMAND_BINDINGS = {
2283
1982
  "computer download": {
2284
1983
  "command": "computer download",
2285
1984
  "method": "GET",
2286
- "path": "/computers/:id/sftp/download",
1985
+ "path": "/computers/:id/fs/download",
2287
1986
  "pathParams": [
2288
1987
  "id"
2289
1988
  ],
@@ -2298,7 +1997,7 @@ var COMMAND_BINDINGS = {
2298
1997
  "computer download-to-drive": {
2299
1998
  "command": "computer download-to-drive",
2300
1999
  "method": "POST",
2301
- "path": "/computers/:id/sftp/download",
2000
+ "path": "/computers/:id/fs/download",
2302
2001
  "pathParams": [
2303
2002
  "id"
2304
2003
  ],
@@ -2337,10 +2036,21 @@ var COMMAND_BINDINGS = {
2337
2036
  "responseKind": "single",
2338
2037
  "async": false
2339
2038
  },
2340
- "computer get": {
2341
- "command": "computer get",
2342
- "method": "GET",
2343
- "path": "/computers/:id",
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
+ },
2050
+ "computer get": {
2051
+ "command": "computer get",
2052
+ "method": "GET",
2053
+ "path": "/computers/:id",
2344
2054
  "pathParams": [
2345
2055
  "id"
2346
2056
  ],
@@ -2489,17 +2199,6 @@ var COMMAND_BINDINGS = {
2489
2199
  "responseKind": "created",
2490
2200
  "async": false
2491
2201
  },
2492
- "computer sftp": {
2493
- "command": "computer sftp",
2494
- "method": "POST",
2495
- "path": "/computers/:id/sftp",
2496
- "pathParams": [
2497
- "id"
2498
- ],
2499
- "argLocation": "body",
2500
- "responseKind": "single",
2501
- "async": false
2502
- },
2503
2202
  "computer start": {
2504
2203
  "command": "computer start",
2505
2204
  "method": "POST",
@@ -2522,10 +2221,10 @@ var COMMAND_BINDINGS = {
2522
2221
  "responseKind": "single",
2523
2222
  "async": false
2524
2223
  },
2525
- "computer test-connection": {
2526
- "command": "computer test-connection",
2224
+ "computer terminal": {
2225
+ "command": "computer terminal",
2527
2226
  "method": "POST",
2528
- "path": "/computers/:id/test-connection",
2227
+ "path": "/computers/:id/terminal",
2529
2228
  "pathParams": [
2530
2229
  "id"
2531
2230
  ],
@@ -2533,10 +2232,10 @@ var COMMAND_BINDINGS = {
2533
2232
  "responseKind": "single",
2534
2233
  "async": false
2535
2234
  },
2536
- "computer tmux": {
2537
- "command": "computer tmux",
2235
+ "computer test-connection": {
2236
+ "command": "computer test-connection",
2538
2237
  "method": "POST",
2539
- "path": "/computers/:id/tmux",
2238
+ "path": "/computers/:id/test-connection",
2540
2239
  "pathParams": [
2541
2240
  "id"
2542
2241
  ],
@@ -2626,7 +2325,7 @@ var COMMAND_BINDINGS = {
2626
2325
  "computer upload": {
2627
2326
  "command": "computer upload",
2628
2327
  "method": "POST",
2629
- "path": "/computers/:id/sftp/upload",
2328
+ "path": "/computers/:id/fs/upload",
2630
2329
  "pathParams": [
2631
2330
  "id"
2632
2331
  ],
@@ -2705,80 +2404,52 @@ var COMMAND_BINDINGS = {
2705
2404
  "responseKind": "list",
2706
2405
  "async": false
2707
2406
  },
2708
- "datastore batch": {
2709
- "command": "datastore batch",
2407
+ "custom-models create": {
2408
+ "command": "custom-models create",
2710
2409
  "method": "POST",
2711
- "path": "/datastore/:namespace",
2712
- "pathParams": [
2713
- "namespace"
2714
- ],
2410
+ "path": "/custom-models",
2411
+ "pathParams": [],
2715
2412
  "argLocation": "body",
2716
- "responseKind": "single",
2413
+ "responseKind": "created",
2717
2414
  "async": false
2718
2415
  },
2719
- "datastore delete": {
2720
- "command": "datastore delete",
2416
+ "custom-models delete": {
2417
+ "command": "custom-models delete",
2721
2418
  "method": "DELETE",
2722
- "path": "/datastore/:namespace/:key",
2419
+ "path": "/custom-models/:id",
2723
2420
  "pathParams": [
2724
- "namespace",
2725
- "key"
2421
+ "id"
2726
2422
  ],
2727
2423
  "argLocation": "body",
2728
2424
  "responseKind": "deleted",
2729
2425
  "async": false
2730
2426
  },
2731
- "datastore get": {
2732
- "command": "datastore get",
2427
+ "custom-models get": {
2428
+ "command": "custom-models get",
2733
2429
  "method": "GET",
2734
- "path": "/datastore/:namespace/:key",
2430
+ "path": "/custom-models/:id",
2735
2431
  "pathParams": [
2736
- "namespace",
2737
- "key"
2432
+ "id"
2738
2433
  ],
2739
2434
  "argLocation": "query",
2740
2435
  "responseKind": "single",
2741
2436
  "async": false
2742
2437
  },
2743
- "datastore increment": {
2744
- "command": "datastore increment",
2745
- "method": "POST",
2746
- "path": "/datastore/:namespace/:key/increment",
2747
- "pathParams": [
2748
- "namespace",
2749
- "key"
2750
- ],
2751
- "argLocation": "body",
2752
- "responseKind": "single",
2753
- "async": false
2754
- },
2755
- "datastore list": {
2756
- "command": "datastore list",
2757
- "method": "GET",
2758
- "path": "/datastore/:namespace",
2759
- "pathParams": [
2760
- "namespace"
2761
- ],
2762
- "argLocation": "query",
2763
- "responseKind": "list",
2764
- "async": false
2765
- },
2766
- "datastore namespaces": {
2767
- "command": "datastore namespaces",
2438
+ "custom-models list": {
2439
+ "command": "custom-models list",
2768
2440
  "method": "GET",
2769
- "path": "/datastore",
2441
+ "path": "/custom-models",
2770
2442
  "pathParams": [],
2771
2443
  "argLocation": "query",
2772
2444
  "responseKind": "list",
2773
2445
  "async": false
2774
2446
  },
2775
- "datastore set": {
2776
- "command": "datastore set",
2777
- "method": "POST",
2778
- "path": "/datastore/:namespace/:key",
2447
+ "custom-models update": {
2448
+ "command": "custom-models update",
2449
+ "method": "PATCH",
2450
+ "path": "/custom-models/:id",
2779
2451
  "pathParams": [
2780
- "namespace",
2781
- "key"
2452
+ "id"
2782
2453
  ],
2783
2454
  "argLocation": "body",
2784
2455
  "responseKind": "single",
@@ -2911,17 +2582,6 @@ var COMMAND_BINDINGS = {
2911
2582
  "responseKind": "single",
2912
2583
  "async": false
2913
2584
  },
2914
- "drive run": {
2915
- "command": "drive run",
2916
- "method": "POST",
2917
- "path": "/drive/files/:id/run",
2918
- "pathParams": [
2919
- "id"
2920
- ],
2921
- "argLocation": "body",
2922
- "responseKind": "created",
2923
- "async": true
2924
- },
2925
2585
  "drive update": {
2926
2586
  "command": "drive update",
2927
2587
  "method": "PATCH",
@@ -2942,101 +2602,6 @@ var COMMAND_BINDINGS = {
2942
2602
  "responseKind": "created",
2943
2603
  "async": false
2944
2604
  },
2945
- "functions create": {
2946
- "command": "functions create",
2947
- "method": "POST",
2948
- "path": "/functions",
2949
- "pathParams": [],
2950
- "argLocation": "body",
2951
- "responseKind": "created",
2952
- "async": false
2953
- },
2954
- "functions delete": {
2955
- "command": "functions delete",
2956
- "method": "DELETE",
2957
- "path": "/functions/:id",
2958
- "pathParams": [
2959
- "id"
2960
- ],
2961
- "argLocation": "query",
2962
- "responseKind": "deleted",
2963
- "async": false
2964
- },
2965
- "functions deploy": {
2966
- "command": "functions deploy",
2967
- "method": "POST",
2968
- "path": "/functions/:id/deploy",
2969
- "pathParams": [
2970
- "id"
2971
- ],
2972
- "argLocation": "body",
2973
- "responseKind": "created",
2974
- "async": false
2975
- },
2976
- "functions deployments": {
2977
- "command": "functions deployments",
2978
- "method": "GET",
2979
- "path": "/functions/:id/deployments",
2980
- "pathParams": [
2981
- "id"
2982
- ],
2983
- "argLocation": "query",
2984
- "responseKind": "list",
2985
- "async": false
2986
- },
2987
- "functions get": {
2988
- "command": "functions get",
2989
- "method": "GET",
2990
- "path": "/functions/:id",
2991
- "pathParams": [
2992
- "id"
2993
- ],
2994
- "argLocation": "query",
2995
- "responseKind": "single",
2996
- "async": false
2997
- },
2998
- "functions invoke": {
2999
- "command": "functions invoke",
3000
- "method": "POST",
3001
- "path": "/functions/:id/invoke",
3002
- "pathParams": [
3003
- "id"
3004
- ],
3005
- "argLocation": "body",
3006
- "responseKind": "single",
3007
- "async": false
3008
- },
3009
- "functions list": {
3010
- "command": "functions list",
3011
- "method": "GET",
3012
- "path": "/functions",
3013
- "pathParams": [],
3014
- "argLocation": "query",
3015
- "responseKind": "list",
3016
- "async": false
3017
- },
3018
- "functions promote": {
3019
- "command": "functions promote",
3020
- "method": "POST",
3021
- "path": "/functions/:id/promote",
3022
- "pathParams": [
3023
- "id"
3024
- ],
3025
- "argLocation": "body",
3026
- "responseKind": "single",
3027
- "async": false
3028
- },
3029
- "functions update": {
3030
- "command": "functions update",
3031
- "method": "PATCH",
3032
- "path": "/functions/:id",
3033
- "pathParams": [
3034
- "id"
3035
- ],
3036
- "argLocation": "body",
3037
- "responseKind": "single",
3038
- "async": false
3039
- },
3040
2605
  "guide get": {
3041
2606
  "command": "guide get",
3042
2607
  "method": "GET",
@@ -3139,92 +2704,112 @@ var COMMAND_BINDINGS = {
3139
2704
  "responseKind": "single",
3140
2705
  "async": false
3141
2706
  },
3142
- "hub install": {
3143
- "command": "hub install",
3144
- "method": "POST",
3145
- "path": "/hub/:resourceId/install",
3146
- "pathParams": [
3147
- "resourceId"
3148
- ],
3149
- "argLocation": "body",
3150
- "responseKind": "created",
3151
- "async": false
3152
- },
3153
- "hub search": {
3154
- "command": "hub search",
2707
+ "image models": {
2708
+ "command": "image models",
3155
2709
  "method": "GET",
3156
- "path": "/hub/search",
2710
+ "path": "/images/models",
3157
2711
  "pathParams": [],
3158
2712
  "argLocation": "query",
3159
2713
  "responseKind": "list",
3160
2714
  "async": false
3161
2715
  },
3162
- "hub submissions": {
3163
- "command": "hub submissions",
2716
+ "image search": {
2717
+ "command": "image search",
3164
2718
  "method": "GET",
3165
- "path": "/hub/submissions/mine",
2719
+ "path": "/images/models/search",
3166
2720
  "pathParams": [],
3167
2721
  "argLocation": "query",
3168
- "responseKind": "list",
2722
+ "responseKind": "single",
3169
2723
  "async": false
3170
2724
  },
3171
- "hub submit": {
3172
- "command": "hub submit",
2725
+ "inference image": {
2726
+ "command": "inference image",
3173
2727
  "method": "POST",
3174
- "path": "/hub/submissions",
2728
+ "path": "/inference/images",
3175
2729
  "pathParams": [],
3176
2730
  "argLocation": "body",
3177
- "responseKind": "created",
3178
- "async": false
2731
+ "responseKind": "single",
2732
+ "async": true,
2733
+ "pollHint": {
2734
+ "intervalMs": 1e3,
2735
+ "maxAttempts": 120
2736
+ }
3179
2737
  },
3180
- "hub update": {
3181
- "command": "hub update",
2738
+ "inference speech": {
2739
+ "command": "inference speech",
3182
2740
  "method": "POST",
3183
- "path": "/hub/:resourceId/update",
3184
- "pathParams": [
3185
- "resourceId"
3186
- ],
2741
+ "path": "/inference/speech",
2742
+ "pathParams": [],
3187
2743
  "argLocation": "body",
3188
2744
  "responseKind": "single",
3189
- "async": false
2745
+ "async": true,
2746
+ "pollHint": {
2747
+ "intervalMs": 1e3,
2748
+ "maxAttempts": 120
2749
+ }
3190
2750
  },
3191
- "hub update-check": {
3192
- "command": "hub update-check",
2751
+ "inference speech-stream": {
2752
+ "command": "inference speech-stream",
3193
2753
  "method": "POST",
3194
- "path": "/hub/:resourceId/update-check",
3195
- "pathParams": [
3196
- "resourceId"
3197
- ],
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": [],
3198
2768
  "argLocation": "body",
3199
2769
  "responseKind": "single",
3200
- "async": false
2770
+ "async": true,
2771
+ "pollHint": {
2772
+ "intervalMs": 1e3,
2773
+ "maxAttempts": 120
2774
+ }
3201
2775
  },
3202
- "image generate": {
3203
- "command": "image generate",
2776
+ "inference text-stream": {
2777
+ "command": "inference text-stream",
3204
2778
  "method": "POST",
3205
- "path": "/images/generations",
2779
+ "path": "/inference/text/stream",
3206
2780
  "pathParams": [],
3207
2781
  "argLocation": "body",
3208
- "responseKind": "created",
3209
- "async": true
2782
+ "responseKind": "binary",
2783
+ "async": false,
2784
+ "binaryContentTypes": [
2785
+ "text/event-stream"
2786
+ ]
3210
2787
  },
3211
- "image models": {
3212
- "command": "image models",
3213
- "method": "GET",
3214
- "path": "/images/models",
2788
+ "inference transcribe": {
2789
+ "command": "inference transcribe",
2790
+ "method": "POST",
2791
+ "path": "/inference/transcriptions",
3215
2792
  "pathParams": [],
3216
- "argLocation": "query",
3217
- "responseKind": "list",
3218
- "async": false
2793
+ "argLocation": "multipart",
2794
+ "responseKind": "single",
2795
+ "async": true,
2796
+ "pollHint": {
2797
+ "intervalMs": 1e3,
2798
+ "maxAttempts": 120
2799
+ }
3219
2800
  },
3220
- "image search": {
3221
- "command": "image search",
3222
- "method": "GET",
3223
- "path": "/images/models/search",
2801
+ "inference video": {
2802
+ "command": "inference video",
2803
+ "method": "POST",
2804
+ "path": "/inference/videos",
3224
2805
  "pathParams": [],
3225
- "argLocation": "query",
2806
+ "argLocation": "body",
3226
2807
  "responseKind": "single",
3227
- "async": false
2808
+ "async": true,
2809
+ "pollHint": {
2810
+ "intervalMs": 5e3,
2811
+ "maxAttempts": 240
2812
+ }
3228
2813
  },
3229
2814
  "me get": {
3230
2815
  "command": "me get",
@@ -3793,6 +3378,17 @@ var COMMAND_BINDINGS = {
3793
3378
  "responseKind": "list",
3794
3379
  "async": false
3795
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
+ },
3796
3392
  "operation cancel": {
3797
3393
  "command": "operation cancel",
3798
3394
  "method": "POST",
@@ -3804,6 +3400,21 @@ var COMMAND_BINDINGS = {
3804
3400
  "responseKind": "single",
3805
3401
  "async": false
3806
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
+ },
3807
3418
  "operation get": {
3808
3419
  "command": "operation get",
3809
3420
  "method": "GET",
@@ -3929,150 +3540,44 @@ var COMMAND_BINDINGS = {
3929
3540
  "text/event-stream"
3930
3541
  ]
3931
3542
  },
3932
- "repos branches": {
3933
- "command": "repos branches",
3543
+ "search query": {
3544
+ "command": "search query",
3934
3545
  "method": "GET",
3935
- "path": "/repos/:id/branches",
3936
- "pathParams": [
3937
- "id"
3938
- ],
3546
+ "path": "/search",
3547
+ "pathParams": [],
3939
3548
  "argLocation": "query",
3940
3549
  "responseKind": "list",
3941
3550
  "async": false
3942
3551
  },
3943
- "repos clone-url": {
3944
- "command": "repos clone-url",
3945
- "method": "GET",
3946
- "path": "/repos/:id/clone-url",
3947
- "pathParams": [
3948
- "id"
3949
- ],
3950
- "argLocation": "query",
3951
- "responseKind": "single",
3552
+ "secret create": {
3553
+ "command": "secret create",
3554
+ "method": "POST",
3555
+ "path": "/secrets",
3556
+ "pathParams": [],
3557
+ "argLocation": "body",
3558
+ "responseKind": "created",
3952
3559
  "async": false
3953
3560
  },
3954
- "repos commit": {
3955
- "command": "repos commit",
3956
- "method": "POST",
3957
- "path": "/repos/:id/commits",
3561
+ "secret delete": {
3562
+ "command": "secret delete",
3563
+ "method": "DELETE",
3564
+ "path": "/secrets/:id",
3958
3565
  "pathParams": [
3959
3566
  "id"
3960
3567
  ],
3961
3568
  "argLocation": "body",
3962
- "responseKind": "single",
3569
+ "responseKind": "deleted",
3963
3570
  "async": false
3964
3571
  },
3965
- "repos commits": {
3966
- "command": "repos commits",
3572
+ "secret get": {
3573
+ "command": "secret get",
3967
3574
  "method": "GET",
3968
- "path": "/repos/:id/commits",
3575
+ "path": "/secrets/:id",
3969
3576
  "pathParams": [
3970
3577
  "id"
3971
3578
  ],
3972
3579
  "argLocation": "query",
3973
- "responseKind": "list",
3974
- "async": false
3975
- },
3976
- "repos create": {
3977
- "command": "repos create",
3978
- "method": "POST",
3979
- "path": "/repos",
3980
- "pathParams": [],
3981
- "argLocation": "body",
3982
- "responseKind": "created",
3983
- "async": false
3984
- },
3985
- "repos delete": {
3986
- "command": "repos delete",
3987
- "method": "DELETE",
3988
- "path": "/repos/:id",
3989
- "pathParams": [
3990
- "id"
3991
- ],
3992
- "argLocation": "body",
3993
- "responseKind": "deleted",
3994
- "async": false
3995
- },
3996
- "repos get": {
3997
- "command": "repos get",
3998
- "method": "GET",
3999
- "path": "/repos/:id",
4000
- "pathParams": [
4001
- "id"
4002
- ],
4003
- "argLocation": "query",
4004
- "responseKind": "single",
4005
- "async": false
4006
- },
4007
- "repos list": {
4008
- "command": "repos list",
4009
- "method": "GET",
4010
- "path": "/repos",
4011
- "pathParams": [],
4012
- "argLocation": "query",
4013
- "responseKind": "list",
4014
- "async": false
4015
- },
4016
- "repos read-file": {
4017
- "command": "repos read-file",
4018
- "method": "GET",
4019
- "path": "/repos/:id/file",
4020
- "pathParams": [
4021
- "id"
4022
- ],
4023
- "argLocation": "query",
4024
- "responseKind": "single",
4025
- "async": false
4026
- },
4027
- "repos set-visibility": {
4028
- "command": "repos set-visibility",
4029
- "method": "PATCH",
4030
- "path": "/repos/:id/visibility",
4031
- "pathParams": [
4032
- "id"
4033
- ],
4034
- "argLocation": "body",
4035
- "responseKind": "single",
4036
- "async": false
4037
- },
4038
- "search query": {
4039
- "command": "search query",
4040
- "method": "GET",
4041
- "path": "/search",
4042
- "pathParams": [],
4043
- "argLocation": "query",
4044
- "responseKind": "list",
4045
- "async": false
4046
- },
4047
- "secret create": {
4048
- "command": "secret create",
4049
- "method": "POST",
4050
- "path": "/secrets",
4051
- "pathParams": [],
4052
- "argLocation": "body",
4053
- "responseKind": "created",
4054
- "async": false
4055
- },
4056
- "secret delete": {
4057
- "command": "secret delete",
4058
- "method": "DELETE",
4059
- "path": "/secrets/:id",
4060
- "pathParams": [
4061
- "id"
4062
- ],
4063
- "argLocation": "body",
4064
- "responseKind": "deleted",
4065
- "async": false
4066
- },
4067
- "secret get": {
4068
- "command": "secret get",
4069
- "method": "GET",
4070
- "path": "/secrets/:id",
4071
- "pathParams": [
4072
- "id"
4073
- ],
4074
- "argLocation": "query",
4075
- "responseKind": "single",
3580
+ "responseKind": "single",
4076
3581
  "async": false
4077
3582
  },
4078
3583
  "secret list": {
@@ -4169,207 +3674,6 @@ var COMMAND_BINDINGS = {
4169
3674
  "responseKind": "list",
4170
3675
  "async": false
4171
3676
  },
4172
- "skill apply-update": {
4173
- "command": "skill apply-update",
4174
- "method": "POST",
4175
- "path": "/skills/:id/apply-update",
4176
- "pathParams": [
4177
- "id"
4178
- ],
4179
- "argLocation": "body",
4180
- "responseKind": "single",
4181
- "async": false
4182
- },
4183
- "skill attach": {
4184
- "command": "skill attach",
4185
- "method": "POST",
4186
- "path": "/skills/:id/attach",
4187
- "pathParams": [
4188
- "id"
4189
- ],
4190
- "argLocation": "body",
4191
- "responseKind": "single",
4192
- "async": false
4193
- },
4194
- "skill body": {
4195
- "command": "skill body",
4196
- "method": "GET",
4197
- "path": "/skills/:id/body",
4198
- "pathParams": [
4199
- "id"
4200
- ],
4201
- "argLocation": "query",
4202
- "responseKind": "single",
4203
- "async": false
4204
- },
4205
- "skill create": {
4206
- "command": "skill create",
4207
- "method": "POST",
4208
- "path": "/skills",
4209
- "pathParams": [],
4210
- "argLocation": "body",
4211
- "responseKind": "created",
4212
- "async": false
4213
- },
4214
- "skill delete": {
4215
- "command": "skill delete",
4216
- "method": "DELETE",
4217
- "path": "/skills/:id",
4218
- "pathParams": [
4219
- "id"
4220
- ],
4221
- "argLocation": "body",
4222
- "responseKind": "deleted",
4223
- "async": false
4224
- },
4225
- "skill detach": {
4226
- "command": "skill detach",
4227
- "method": "DELETE",
4228
- "path": "/skills/:id/attach",
4229
- "pathParams": [
4230
- "id"
4231
- ],
4232
- "argLocation": "query",
4233
- "responseKind": "deleted",
4234
- "async": false
4235
- },
4236
- "skill file-delete": {
4237
- "command": "skill file-delete",
4238
- "method": "DELETE",
4239
- "path": "/skills/:id/file",
4240
- "pathParams": [
4241
- "id"
4242
- ],
4243
- "argLocation": "query",
4244
- "responseKind": "deleted",
4245
- "async": false
4246
- },
4247
- "skill file-list": {
4248
- "command": "skill file-list",
4249
- "method": "GET",
4250
- "path": "/skills/:id/files",
4251
- "pathParams": [
4252
- "id"
4253
- ],
4254
- "argLocation": "query",
4255
- "responseKind": "list",
4256
- "async": false
4257
- },
4258
- "skill file-read": {
4259
- "command": "skill file-read",
4260
- "method": "GET",
4261
- "path": "/skills/:id/file",
4262
- "pathParams": [
4263
- "id"
4264
- ],
4265
- "argLocation": "query",
4266
- "responseKind": "single",
4267
- "async": false
4268
- },
4269
- "skill file-write": {
4270
- "command": "skill file-write",
4271
- "method": "POST",
4272
- "path": "/skills/:id/files",
4273
- "pathParams": [
4274
- "id"
4275
- ],
4276
- "argLocation": "body",
4277
- "responseKind": "single",
4278
- "async": false
4279
- },
4280
- "skill fork": {
4281
- "command": "skill fork",
4282
- "method": "POST",
4283
- "path": "/skills/:id/fork",
4284
- "pathParams": [
4285
- "id"
4286
- ],
4287
- "argLocation": "body",
4288
- "responseKind": "created",
4289
- "async": false
4290
- },
4291
- "skill get": {
4292
- "command": "skill get",
4293
- "method": "GET",
4294
- "path": "/skills/:id",
4295
- "pathParams": [
4296
- "id"
4297
- ],
4298
- "argLocation": "query",
4299
- "responseKind": "single",
4300
- "async": false
4301
- },
4302
- "skill install": {
4303
- "command": "skill install",
4304
- "method": "POST",
4305
- "path": "/skills/install",
4306
- "pathParams": [],
4307
- "argLocation": "body",
4308
- "responseKind": "created",
4309
- "async": false
4310
- },
4311
- "skill list": {
4312
- "command": "skill list",
4313
- "method": "GET",
4314
- "path": "/skills",
4315
- "pathParams": [],
4316
- "argLocation": "query",
4317
- "responseKind": "list",
4318
- "async": false
4319
- },
4320
- "skill publish": {
4321
- "command": "skill publish",
4322
- "method": "POST",
4323
- "path": "/skills/:id/publish",
4324
- "pathParams": [
4325
- "id"
4326
- ],
4327
- "argLocation": "body",
4328
- "responseKind": "single",
4329
- "async": false
4330
- },
4331
- "skill render": {
4332
- "command": "skill render",
4333
- "method": "POST",
4334
- "path": "/skills/:id/render",
4335
- "pathParams": [
4336
- "id"
4337
- ],
4338
- "argLocation": "body",
4339
- "responseKind": "single",
4340
- "async": false
4341
- },
4342
- "skill search": {
4343
- "command": "skill search",
4344
- "method": "GET",
4345
- "path": "/skills/search",
4346
- "pathParams": [],
4347
- "argLocation": "query",
4348
- "responseKind": "list",
4349
- "async": false
4350
- },
4351
- "skill update": {
4352
- "command": "skill update",
4353
- "method": "PATCH",
4354
- "path": "/skills/:id",
4355
- "pathParams": [
4356
- "id"
4357
- ],
4358
- "argLocation": "body",
4359
- "responseKind": "single",
4360
- "async": false
4361
- },
4362
- "skill update-check": {
4363
- "command": "skill update-check",
4364
- "method": "GET",
4365
- "path": "/skills/:id/update-check",
4366
- "pathParams": [
4367
- "id"
4368
- ],
4369
- "argLocation": "query",
4370
- "responseKind": "single",
4371
- "async": false
4372
- },
4373
3677
  "subscription get": {
4374
3678
  "command": "subscription get",
4375
3679
  "method": "GET",
@@ -4379,137 +3683,6 @@ var COMMAND_BINDINGS = {
4379
3683
  "responseKind": "single",
4380
3684
  "async": false
4381
3685
  },
4382
- "table create": {
4383
- "command": "table create",
4384
- "method": "POST",
4385
- "path": "/tables",
4386
- "pathParams": [],
4387
- "argLocation": "body",
4388
- "responseKind": "created",
4389
- "async": false
4390
- },
4391
- "table create-record": {
4392
- "command": "table create-record",
4393
- "method": "POST",
4394
- "path": "/tables/:id/records",
4395
- "pathParams": [
4396
- "id"
4397
- ],
4398
- "argLocation": "body",
4399
- "responseKind": "created",
4400
- "async": false
4401
- },
4402
- "table delete": {
4403
- "command": "table delete",
4404
- "method": "DELETE",
4405
- "path": "/tables/:id",
4406
- "pathParams": [
4407
- "id"
4408
- ],
4409
- "argLocation": "body",
4410
- "responseKind": "deleted",
4411
- "async": false
4412
- },
4413
- "table delete-record": {
4414
- "command": "table delete-record",
4415
- "method": "DELETE",
4416
- "path": "/tables/:id/records/:recordId",
4417
- "pathParams": [
4418
- "id",
4419
- "recordId"
4420
- ],
4421
- "argLocation": "body",
4422
- "responseKind": "deleted",
4423
- "async": false
4424
- },
4425
- "table export": {
4426
- "command": "table export",
4427
- "method": "GET",
4428
- "path": "/tables/:id/export",
4429
- "pathParams": [
4430
- "id"
4431
- ],
4432
- "argLocation": "query",
4433
- "responseKind": "binary",
4434
- "async": false
4435
- },
4436
- "table get": {
4437
- "command": "table get",
4438
- "method": "GET",
4439
- "path": "/tables/:id",
4440
- "pathParams": [
4441
- "id"
4442
- ],
4443
- "argLocation": "query",
4444
- "responseKind": "single",
4445
- "async": false
4446
- },
4447
- "table get-record": {
4448
- "command": "table get-record",
4449
- "method": "GET",
4450
- "path": "/tables/:id/records/:recordId",
4451
- "pathParams": [
4452
- "id",
4453
- "recordId"
4454
- ],
4455
- "argLocation": "query",
4456
- "responseKind": "single",
4457
- "async": false
4458
- },
4459
- "table import": {
4460
- "command": "table import",
4461
- "method": "POST",
4462
- "path": "/tables/:id/import",
4463
- "pathParams": [
4464
- "id"
4465
- ],
4466
- "argLocation": "body",
4467
- "responseKind": "single",
4468
- "async": false
4469
- },
4470
- "table list": {
4471
- "command": "table list",
4472
- "method": "GET",
4473
- "path": "/tables",
4474
- "pathParams": [],
4475
- "argLocation": "query",
4476
- "responseKind": "list",
4477
- "async": false
4478
- },
4479
- "table query": {
4480
- "command": "table query",
4481
- "method": "POST",
4482
- "path": "/tables/:id/query",
4483
- "pathParams": [
4484
- "id"
4485
- ],
4486
- "argLocation": "body",
4487
- "responseKind": "list",
4488
- "async": false
4489
- },
4490
- "table update": {
4491
- "command": "table update",
4492
- "method": "PATCH",
4493
- "path": "/tables/:id",
4494
- "pathParams": [
4495
- "id"
4496
- ],
4497
- "argLocation": "body",
4498
- "responseKind": "single",
4499
- "async": false
4500
- },
4501
- "table update-record": {
4502
- "command": "table update-record",
4503
- "method": "PATCH",
4504
- "path": "/tables/:id/records/:recordId",
4505
- "pathParams": [
4506
- "id",
4507
- "recordId"
4508
- ],
4509
- "argLocation": "body",
4510
- "responseKind": "single",
4511
- "async": false
4512
- },
4513
3686
  "tasks ancestors": {
4514
3687
  "command": "tasks ancestors",
4515
3688
  "method": "GET",
@@ -4807,19 +3980,6 @@ var COMMAND_BINDINGS = {
4807
3980
  "responseKind": "single",
4808
3981
  "async": false
4809
3982
  },
4810
- "video generate": {
4811
- "command": "video generate",
4812
- "method": "POST",
4813
- "path": "/videos/generations",
4814
- "pathParams": [],
4815
- "argLocation": "body",
4816
- "responseKind": "single",
4817
- "async": true,
4818
- "pollHint": {
4819
- "intervalMs": 5e3,
4820
- "maxAttempts": 240
4821
- }
4822
- },
4823
3983
  "video models": {
4824
3984
  "command": "video models",
4825
3985
  "method": "GET",
@@ -5363,7 +4523,7 @@ var ComputersApi = class {
5363
4523
  return res.data;
5364
4524
  }
5365
4525
  // ---------------------------------------------------------------------------
5366
- // Exec & tmux
4526
+ // Exec & terminals
5367
4527
  // ---------------------------------------------------------------------------
5368
4528
  async exec(id, input, opts = {}) {
5369
4529
  const res = await request(this.ctx, {
@@ -5375,56 +4535,57 @@ var ComputersApi = class {
5375
4535
  return res.data;
5376
4536
  }
5377
4537
  /**
5378
- * tmux dispatcher. Each `op` returns a different shape — see the route
5379
- * 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),
5380
4541
  * `op: "capture"` reads its output.
5381
4542
  */
5382
- async tmux(id, input, opts = {}) {
4543
+ async terminal(id, input, opts = {}) {
5383
4544
  const res = await request(
5384
4545
  this.ctx,
5385
4546
  {
5386
4547
  method: "POST",
5387
- path: `/api/v1/computers/${id}/tmux`,
4548
+ path: `/api/v1/computers/${id}/terminal`,
5388
4549
  body: input,
5389
4550
  signal: opts.signal
5390
4551
  }
5391
4552
  );
5392
4553
  return res.data;
5393
4554
  }
5394
- /** Convenience over `tmux({ op: "list" })`. */
5395
- async listTmuxWindows(id, opts = {}) {
5396
- 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);
5397
4558
  return result.windows ?? [];
5398
4559
  }
5399
4560
  // ---------------------------------------------------------------------------
5400
- // SFTP
4561
+ // FS
5401
4562
  // ---------------------------------------------------------------------------
5402
4563
  /**
5403
- * Unified SFTP dispatcher. Returns op-shaped payload. For streaming
5404
- * uploads/downloads use `sftpUpload` / `sftpDownload`.
4564
+ * Unified FS dispatcher. Returns op-shaped payload. For streaming
4565
+ * uploads/downloads use `fsUpload` / `fsDownload`.
5405
4566
  */
5406
- async sftp(id, input, opts = {}) {
4567
+ async fs(id, input, opts = {}) {
5407
4568
  const res = await request(
5408
4569
  this.ctx,
5409
4570
  {
5410
4571
  method: "POST",
5411
- path: `/api/v1/computers/${id}/sftp`,
4572
+ path: `/api/v1/computers/${id}/fs`,
5412
4573
  body: input,
5413
4574
  signal: opts.signal
5414
4575
  }
5415
4576
  );
5416
4577
  return res.data;
5417
4578
  }
5418
- /** Convenience: `sftp({op:"list"})` returning the entries array directly. */
5419
- async sftpList(id, path, opts = {}) {
5420
- 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);
5421
4582
  return result;
5422
4583
  }
5423
4584
  /**
5424
4585
  * Multipart upload of a file/folder member. Falls back to single-file mode
5425
4586
  * when `relative_path` is omitted.
5426
4587
  */
5427
- async sftpUpload(id, input, opts = {}) {
4588
+ async fsUpload(id, input, opts = {}) {
5428
4589
  const form = new FormData();
5429
4590
  form.append("file", input.file);
5430
4591
  form.append("path", input.path);
@@ -5434,7 +4595,7 @@ var ComputersApi = class {
5434
4595
  this.ctx,
5435
4596
  {
5436
4597
  method: "POST",
5437
- path: `/api/v1/computers/${id}/sftp/upload`,
4598
+ path: `/api/v1/computers/${id}/fs/upload`,
5438
4599
  bodyRaw: form,
5439
4600
  signal: opts.signal
5440
4601
  }
@@ -5445,10 +4606,10 @@ var ComputersApi = class {
5445
4606
  * Stream a remote file (or a folder as `tar.gz`) as a `Blob`. The server
5446
4607
  * sends the real MIME type on `Content-Type`.
5447
4608
  */
5448
- async sftpDownload(id, remotePath, opts = {}) {
4609
+ async fsDownload(id, remotePath, opts = {}) {
5449
4610
  return request(this.ctx, {
5450
4611
  method: "GET",
5451
- path: `/api/v1/computers/${id}/sftp/download`,
4612
+ path: `/api/v1/computers/${id}/fs/download`,
5452
4613
  query: { path: remotePath },
5453
4614
  expectBlob: true,
5454
4615
  signal: opts.signal
@@ -5716,117 +4877,6 @@ var ComputersApi = class {
5716
4877
  }
5717
4878
  };
5718
4879
 
5719
- // ../sdk/src/api/datastore.ts
5720
- var enc2 = encodeURIComponent;
5721
- var DatastoreApi = class {
5722
- constructor(ctx) {
5723
- this.ctx = ctx;
5724
- }
5725
- /** List keys in a namespace (prefix-filterable). */
5726
- async list(namespace, opts = {}) {
5727
- const q = new URLSearchParams();
5728
- if (opts.prefix) q.set("prefix", opts.prefix);
5729
- if (opts.cursor) q.set("cursor", opts.cursor);
5730
- if (opts.limit) q.set("limit", String(opts.limit));
5731
- const qs = q.toString() ? `?${q.toString()}` : "";
5732
- const res = await request(this.ctx, {
5733
- method: "GET",
5734
- path: `/api/v1/datastore/${enc2(namespace)}${qs}`,
5735
- signal: opts.signal
5736
- });
5737
- return res.data;
5738
- }
5739
- /** Read a KV entry. */
5740
- async get(namespace, key, opts = {}) {
5741
- const res = await request(this.ctx, {
5742
- method: "GET",
5743
- path: `/api/v1/datastore/${enc2(namespace)}/${enc2(key)}`,
5744
- signal: opts.signal
5745
- });
5746
- return res.data;
5747
- }
5748
- /** Upsert a KV entry (optionally with a TTL). */
5749
- async set(namespace, key, value, opts = {}) {
5750
- const res = await request(this.ctx, {
5751
- method: "POST",
5752
- path: `/api/v1/datastore/${enc2(namespace)}/${enc2(key)}`,
5753
- body: { value, ttl_seconds: opts.ttlSeconds },
5754
- signal: opts.signal
5755
- });
5756
- return res.data;
5757
- }
5758
- /** Delete a KV entry (idempotent). */
5759
- async delete(namespace, key, opts = {}) {
5760
- return request(this.ctx, {
5761
- method: "DELETE",
5762
- path: `/api/v1/datastore/${enc2(namespace)}/${enc2(key)}`,
5763
- signal: opts.signal
5764
- });
5765
- }
5766
- /** Atomically add `by` (default 1) to a numeric counter. */
5767
- async increment(namespace, key, by = 1, opts = {}) {
5768
- const res = await request(
5769
- this.ctx,
5770
- {
5771
- method: "POST",
5772
- path: `/api/v1/datastore/${enc2(namespace)}/${enc2(key)}/increment`,
5773
- body: { by },
5774
- signal: opts.signal
5775
- }
5776
- );
5777
- return res.data;
5778
- }
5779
- /** List the namespaces in the workspace. */
5780
- async listNamespaces(opts = {}) {
5781
- const res = await request(this.ctx, {
5782
- method: "GET",
5783
- path: "/api/v1/datastore",
5784
- signal: opts.signal
5785
- });
5786
- return res.data.map((n) => n.namespace);
5787
- }
5788
- /** Read several keys at once. */
5789
- async batchGet(namespace, keys, opts = {}) {
5790
- const res = await request(
5791
- this.ctx,
5792
- {
5793
- method: "POST",
5794
- path: `/api/v1/datastore/${enc2(namespace)}`,
5795
- body: { op: "get", keys },
5796
- signal: opts.signal
5797
- }
5798
- );
5799
- return res.data.entries ?? [];
5800
- }
5801
- /** Upsert several entries at once. */
5802
- async batchSet(namespace, entries, opts = {}) {
5803
- const res = await request(this.ctx, {
5804
- method: "POST",
5805
- path: `/api/v1/datastore/${enc2(namespace)}`,
5806
- body: {
5807
- op: "set",
5808
- entries: entries.map((e) => ({
5809
- key: e.key,
5810
- value: e.value,
5811
- ttl_seconds: e.ttlSeconds
5812
- }))
5813
- },
5814
- signal: opts.signal
5815
- });
5816
- return res.data.count ?? 0;
5817
- }
5818
- /** Delete several keys at once; returns the count removed. */
5819
- async batchDelete(namespace, keys, opts = {}) {
5820
- const res = await request(this.ctx, {
5821
- method: "POST",
5822
- path: `/api/v1/datastore/${enc2(namespace)}`,
5823
- body: { op: "delete", keys },
5824
- signal: opts.signal
5825
- });
5826
- return res.data.count ?? 0;
5827
- }
5828
- };
5829
-
5830
4880
  // ../sdk/src/api/docs.ts
5831
4881
  var DocsApi = class {
5832
4882
  constructor(ctx) {
@@ -5871,197 +4921,40 @@ var FilesApi = class {
5871
4921
  return getFileText(this.ctx, id, opts);
5872
4922
  }
5873
4923
  /**
5874
- * Fetch a file's raw bytes as a Blob. The server sends the real MIME
5875
- * type on `Content-Type`; the returned Blob's `.type` reflects it.
5876
- */
5877
- getBlob(id, opts = {}) {
5878
- return getFileBlob(this.ctx, id, opts);
5879
- }
5880
- /**
5881
- * Patch file metadata or content. Supports `expectedUpdatedAt` for
5882
- * optimistic concurrency — pass it when you know the version you read.
5883
- */
5884
- patch(id, input, opts = {}) {
5885
- return patchFile(this.ctx, id, input, opts);
5886
- }
5887
- delete(id, opts = {}) {
5888
- return deleteFile(this.ctx, id, opts);
5889
- }
5890
- restore(id, opts = {}) {
5891
- return restoreFile(this.ctx, id, opts);
5892
- }
5893
- permanentDelete(id, opts = {}) {
5894
- return permanentDeleteFile(this.ctx, id, opts);
5895
- }
5896
- // ---------------------------------------------------------------------------
5897
- // Folder / move / run
5898
- // ---------------------------------------------------------------------------
5899
- /**
5900
- * Idempotent create-or-get a folder. Returns the existing folder (with
5901
- * `200`) or the new one (`201`) — consumers don't need to distinguish.
5902
- */
5903
- createFolder(input, opts = {}) {
5904
- return createFolder(this.ctx, input, opts);
5905
- }
5906
- move(id, parentId, opts = {}) {
5907
- return moveFile(this.ctx, id, parentId, opts);
5908
- }
5909
- /**
5910
- * Execute a code file (js/ts/py/sh) in a sandboxed Lambda. Returns the
5911
- * full `ExecutionRun` record (status, stdout/stderr, exit code, timestamps).
5912
- */
5913
- run(id, input = {}, opts = {}) {
5914
- return runFile(this.ctx, id, input, opts);
5915
- }
5916
- };
5917
-
5918
- // ../sdk/src/api/functions.ts
5919
- var enc3 = encodeURIComponent;
5920
- var FunctionRunsApi = class {
5921
- constructor(ctx) {
5922
- this.ctx = ctx;
5923
- }
5924
- /** List one-off function runs (cursor-paginated). */
5925
- async list(query = {}, opts = {}) {
5926
- const res = await request(this.ctx, {
5927
- method: "GET",
5928
- path: "/api/v1/functions/runs",
5929
- query,
5930
- signal: opts.signal
5931
- });
5932
- return res.data;
5933
- }
5934
- /** Get a single one-off run by id. */
5935
- async get(id, opts = {}) {
5936
- const res = await request(this.ctx, {
5937
- method: "GET",
5938
- path: `/api/v1/functions/runs/${enc3(id)}`,
5939
- signal: opts.signal
5940
- });
5941
- return res.data;
5942
- }
5943
- /**
5944
- * Interrupt a running run. Only computer-backed runs can be interrupted;
5945
- * Lambda-backed runs return 409 (`ConflictError`).
5946
- */
5947
- async interrupt(id, opts = {}) {
5948
- const res = await request(this.ctx, {
5949
- method: "POST",
5950
- path: `/api/v1/functions/runs/${enc3(id)}/interrupt`,
5951
- body: {},
5952
- signal: opts.signal
5953
- });
5954
- return res.data;
5955
- }
5956
- };
5957
- var FunctionsApi = class {
5958
- constructor(ctx) {
5959
- this.ctx = ctx;
5960
- this.runs = new FunctionRunsApi(ctx);
5961
- }
5962
- /**
5963
- * Run a script ONCE in the sandbox. Pass EITHER inline `script` (+ optional
5964
- * `language`) OR an existing Drive `file_id`. Returns the full `FunctionRun`
5965
- * row — `id`, `status`, `stdout`, `stderr`, `exit_code`, the run timestamps,
5966
- * and any `output_files` the script wrote under `/tmp/output/`.
4924
+ * Fetch a file's raw bytes as a Blob. The server sends the real MIME
4925
+ * type on `Content-Type`; the returned Blob's `.type` reflects it.
5967
4926
  */
5968
- async run(input, opts = {}) {
5969
- const res = await request(this.ctx, {
5970
- method: "POST",
5971
- path: "/api/v1/functions/runs",
5972
- body: input,
5973
- signal: opts.signal
5974
- });
5975
- return res.data;
5976
- }
5977
- /** List deployed functions in the workspace. */
5978
- async list(query = {}, opts = {}) {
5979
- const res = await request(this.ctx, {
5980
- method: "GET",
5981
- path: "/api/v1/functions",
5982
- query,
5983
- signal: opts.signal
5984
- });
5985
- return res.data;
4927
+ getBlob(id, opts = {}) {
4928
+ return getFileBlob(this.ctx, id, opts);
5986
4929
  }
5987
- /** Get a deployed function by its resourceId. */
5988
- async get(id, opts = {}) {
5989
- const res = await request(this.ctx, {
5990
- method: "GET",
5991
- path: `/api/v1/functions/${enc3(id)}`,
5992
- signal: opts.signal
5993
- });
5994
- return res.data;
4930
+ /**
4931
+ * Patch file metadata or content. Supports `expectedUpdatedAt` for
4932
+ * optimistic concurrency pass it when you know the version you read.
4933
+ */
4934
+ patch(id, input, opts = {}) {
4935
+ return patchFile(this.ctx, id, input, opts);
5995
4936
  }
5996
- /** Create a deployed function (config only `deploy` adds a bundle). */
5997
- async create(input, opts = {}) {
5998
- const res = await request(this.ctx, {
5999
- method: "POST",
6000
- path: "/api/v1/functions",
6001
- body: input,
6002
- signal: opts.signal
6003
- });
6004
- return res.data;
4937
+ delete(id, opts = {}) {
4938
+ return deleteFile(this.ctx, id, opts);
6005
4939
  }
6006
- /** Update a deployed function's config. */
6007
- async update(id, patch, opts = {}) {
6008
- const res = await request(this.ctx, {
6009
- method: "PATCH",
6010
- path: `/api/v1/functions/${enc3(id)}`,
6011
- body: patch,
6012
- signal: opts.signal
6013
- });
6014
- return res.data;
4940
+ restore(id, opts = {}) {
4941
+ return restoreFile(this.ctx, id, opts);
6015
4942
  }
6016
- /** Delete a deployed function + all its deployments. */
6017
- async delete(id, opts = {}) {
6018
- return request(this.ctx, {
6019
- method: "DELETE",
6020
- path: `/api/v1/functions/${enc3(id)}`,
6021
- signal: opts.signal
6022
- });
4943
+ permanentDelete(id, opts = {}) {
4944
+ return permanentDeleteFile(this.ctx, id, opts);
6023
4945
  }
4946
+ // ---------------------------------------------------------------------------
4947
+ // Folder / move
4948
+ // ---------------------------------------------------------------------------
6024
4949
  /**
6025
- * Deploy a new bundle (inline base64 files). Promotes the new deployment to
6026
- * live immediately unless `promote: false`. Returns the new deployment.
4950
+ * Idempotent create-or-get a folder. Returns the existing folder (with
4951
+ * `200`) or the new one (`201`) consumers don't need to distinguish.
6027
4952
  */
6028
- async deploy(id, input, opts = {}) {
6029
- const res = await request(this.ctx, {
6030
- method: "POST",
6031
- path: `/api/v1/functions/${enc3(id)}/deploy`,
6032
- body: input,
6033
- signal: opts.signal
6034
- });
6035
- return res.data;
6036
- }
6037
- /** List a function's deployments (newest-first). */
6038
- async deployments(id, opts = {}) {
6039
- const res = await request(this.ctx, {
6040
- method: "GET",
6041
- path: `/api/v1/functions/${enc3(id)}/deployments`,
6042
- signal: opts.signal
6043
- });
6044
- return res.data;
6045
- }
6046
- /** Promote (or roll back to) a deployment — flips the active one. */
6047
- async promote(id, input, opts = {}) {
6048
- const res = await request(this.ctx, {
6049
- method: "POST",
6050
- path: `/api/v1/functions/${enc3(id)}/promote`,
6051
- body: input,
6052
- signal: opts.signal
6053
- });
6054
- return res.data;
4953
+ createFolder(input, opts = {}) {
4954
+ return createFolder(this.ctx, input, opts);
6055
4955
  }
6056
- /** Invoke a deployed function synchronously; returns its response. */
6057
- async invoke(id, input = {}, opts = {}) {
6058
- const res = await request(this.ctx, {
6059
- method: "POST",
6060
- path: `/api/v1/functions/${enc3(id)}/invoke`,
6061
- body: input,
6062
- signal: opts.signal
6063
- });
6064
- return res.data;
4956
+ move(id, parentId, opts = {}) {
4957
+ return moveFile(this.ctx, id, parentId, opts);
6065
4958
  }
6066
4959
  };
6067
4960
 
@@ -6089,6 +4982,7 @@ var ImagesApi = class {
6089
4982
  constructor(ctx) {
6090
4983
  this.ctx = ctx;
6091
4984
  }
4985
+ /** List the available image-generation models. */
6092
4986
  async listModels(opts = {}) {
6093
4987
  const res = await request(this.ctx, {
6094
4988
  method: "GET",
@@ -6097,16 +4991,51 @@ var ImagesApi = class {
6097
4991
  });
6098
4992
  return res.data;
6099
4993
  }
6100
- /** Generate an image. Responds HTTP 201 with the written file ref under `data`. */
6101
- async generate(input, opts = {}) {
6102
- const res = await request(this.ctx, {
6103
- method: "POST",
6104
- path: "/api/v1/images/generations",
6105
- body: input,
6106
- signal: opts.signal
6107
- });
6108
- return res.data;
4994
+ };
4995
+
4996
+ // ../sdk/src/api/inference.ts
4997
+ var InferenceApi = class {
4998
+ constructor(ctx) {
4999
+ this.ctx = ctx;
6109
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
+ );
5036
+ }
5037
+ // `inference transcribe` is multipart (audio file upload) — use
5038
+ // `client.call("inference transcribe", …)` with a File/Blob body.
6110
5039
  };
6111
5040
 
6112
5041
  // ../sdk/src/api/models.ts
@@ -6307,6 +5236,40 @@ var NotificationsApi = class {
6307
5236
  }
6308
5237
  };
6309
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
+ });
5269
+ return res.data;
5270
+ }
5271
+ };
5272
+
6310
5273
  // ../sdk/src/api/provider-endpoints.ts
6311
5274
  var ProviderEndpointsApi = class {
6312
5275
  constructor(ctx) {
@@ -6367,7 +5330,7 @@ var ProviderEndpointsApi = class {
6367
5330
  };
6368
5331
 
6369
5332
  // ../sdk/src/api/realtime.ts
6370
- var enc4 = encodeURIComponent;
5333
+ var enc = encodeURIComponent;
6371
5334
  var RECONNECT_MIN_MS = 1e3;
6372
5335
  var RECONNECT_MAX_MS = 3e4;
6373
5336
  var RealtimeApi = class {
@@ -6378,7 +5341,7 @@ var RealtimeApi = class {
6378
5341
  async broadcast(channel, message, opts = {}) {
6379
5342
  const res = await request(this.ctx, {
6380
5343
  method: "POST",
6381
- path: `/api/v1/realtime/${enc4(channel)}/broadcast`,
5344
+ path: `/api/v1/realtime/${enc(channel)}/broadcast`,
6382
5345
  body: { message },
6383
5346
  signal: opts.signal
6384
5347
  });
@@ -6388,7 +5351,7 @@ var RealtimeApi = class {
6388
5351
  async heartbeat(channel, opts = {}) {
6389
5352
  const res = await request(this.ctx, {
6390
5353
  method: "POST",
6391
- path: `/api/v1/realtime/${enc4(channel)}/presence`,
5354
+ path: `/api/v1/realtime/${enc(channel)}/presence`,
6392
5355
  body: { meta: opts.meta, ttl_seconds: opts.ttlSeconds },
6393
5356
  signal: opts.signal
6394
5357
  });
@@ -6398,7 +5361,7 @@ var RealtimeApi = class {
6398
5361
  async presence(channel, opts = {}) {
6399
5362
  const res = await request(this.ctx, {
6400
5363
  method: "GET",
6401
- path: `/api/v1/realtime/${enc4(channel)}/presence`,
5364
+ path: `/api/v1/realtime/${enc(channel)}/presence`,
6402
5365
  signal: opts.signal
6403
5366
  });
6404
5367
  return res.data;
@@ -6492,7 +5455,7 @@ async function* parseSseStream(response, signal) {
6492
5455
  if (boundary === -1) break;
6493
5456
  const block = buffer.slice(0, boundary);
6494
5457
  buffer = buffer.slice(boundary + 2);
6495
- const parsed = parseSseBlock3(block);
5458
+ const parsed = parseSseBlock2(block);
6496
5459
  if (parsed) yield parsed;
6497
5460
  }
6498
5461
  }
@@ -6503,7 +5466,7 @@ async function* parseSseStream(response, signal) {
6503
5466
  }
6504
5467
  }
6505
5468
  }
6506
- function parseSseBlock3(block) {
5469
+ function parseSseBlock2(block) {
6507
5470
  let id;
6508
5471
  let data = "";
6509
5472
  let isHeartbeat = false;
@@ -6753,42 +5716,6 @@ var SharingApi = class {
6753
5716
  }
6754
5717
  };
6755
5718
 
6756
- // ../sdk/src/api/store.ts
6757
- var StoreApi = class {
6758
- constructor(ctx) {
6759
- this.ctx = ctx;
6760
- }
6761
- /**
6762
- * Search the hub. Open envelope — items are heterogeneous (skills carry
6763
- * version/license, agents carry icons/prompts, computer templates carry
6764
- * sizing) so we surface them as `StoreItem` with an open index signature.
6765
- */
6766
- async search(query = {}, opts = {}) {
6767
- const res = await request(this.ctx, {
6768
- method: "GET",
6769
- path: "/api/v1/store/search",
6770
- query,
6771
- signal: opts.signal
6772
- });
6773
- return res.data;
6774
- }
6775
- /**
6776
- * Install a hub item into one of the caller's workspaces. Returns whatever
6777
- * the per-template installer produces (folder ids, agent ids, ...) —
6778
- * `StoreInstallResult` carries the common fields and leaves the rest
6779
- * open.
6780
- */
6781
- async install(resourceId, input, opts = {}) {
6782
- const res = await request(this.ctx, {
6783
- method: "POST",
6784
- path: `/api/v1/store/${resourceId}/install`,
6785
- body: input,
6786
- signal: opts.signal
6787
- });
6788
- return res.data;
6789
- }
6790
- };
6791
-
6792
5719
  // ../sdk/src/api/subscription.ts
6793
5720
  var SubscriptionApi = class {
6794
5721
  constructor(ctx) {
@@ -6804,123 +5731,6 @@ var SubscriptionApi = class {
6804
5731
  }
6805
5732
  };
6806
5733
 
6807
- // ../sdk/src/api/tables.ts
6808
- var enc5 = encodeURIComponent;
6809
- var TablesApi = class {
6810
- constructor(ctx) {
6811
- this.ctx = ctx;
6812
- }
6813
- async list(opts = {}) {
6814
- const q = new URLSearchParams();
6815
- if (opts.workspaceId) q.set("workspace_id", opts.workspaceId);
6816
- if (opts.cursor) q.set("cursor", opts.cursor);
6817
- if (opts.limit) q.set("limit", String(opts.limit));
6818
- const qs = q.toString() ? `?${q.toString()}` : "";
6819
- const res = await request(this.ctx, {
6820
- method: "GET",
6821
- path: `/api/v1/tables${qs}`,
6822
- signal: opts.signal
6823
- });
6824
- return res.data;
6825
- }
6826
- async get(id, opts = {}) {
6827
- const res = await request(this.ctx, {
6828
- method: "GET",
6829
- path: `/api/v1/tables/${enc5(id)}`,
6830
- signal: opts.signal
6831
- });
6832
- return res.data;
6833
- }
6834
- async create(input, opts = {}) {
6835
- const res = await request(this.ctx, {
6836
- method: "POST",
6837
- path: "/api/v1/tables",
6838
- body: input,
6839
- signal: opts.signal
6840
- });
6841
- return res.data;
6842
- }
6843
- async update(id, input, opts = {}) {
6844
- const res = await request(this.ctx, {
6845
- method: "PATCH",
6846
- path: `/api/v1/tables/${enc5(id)}`,
6847
- body: input,
6848
- signal: opts.signal
6849
- });
6850
- return res.data;
6851
- }
6852
- async delete(id, opts = {}) {
6853
- return request(this.ctx, {
6854
- method: "DELETE",
6855
- path: `/api/v1/tables/${enc5(id)}`,
6856
- signal: opts.signal
6857
- });
6858
- }
6859
- /** Query a collection's records with the filter/sort/paginate DSL. */
6860
- async query(id, query = {}, opts = {}) {
6861
- const res = await request(this.ctx, {
6862
- method: "POST",
6863
- path: `/api/v1/tables/${enc5(id)}/query`,
6864
- body: query,
6865
- signal: opts.signal
6866
- });
6867
- return res.data;
6868
- }
6869
- async createRecord(id, values, opts = {}) {
6870
- const res = await request(this.ctx, {
6871
- method: "POST",
6872
- path: `/api/v1/tables/${enc5(id)}/records`,
6873
- body: { values },
6874
- signal: opts.signal
6875
- });
6876
- return res.data;
6877
- }
6878
- async getRecord(id, recordId, opts = {}) {
6879
- const res = await request(this.ctx, {
6880
- method: "GET",
6881
- path: `/api/v1/tables/${enc5(id)}/records/${enc5(recordId)}`,
6882
- signal: opts.signal
6883
- });
6884
- return res.data;
6885
- }
6886
- async updateRecord(id, recordId, values, opts = {}) {
6887
- const res = await request(this.ctx, {
6888
- method: "PATCH",
6889
- path: `/api/v1/tables/${enc5(id)}/records/${enc5(recordId)}`,
6890
- body: { values },
6891
- signal: opts.signal
6892
- });
6893
- return res.data;
6894
- }
6895
- async deleteRecord(id, recordId, opts = {}) {
6896
- return request(this.ctx, {
6897
- method: "DELETE",
6898
- path: `/api/v1/tables/${enc5(id)}/records/${enc5(recordId)}`,
6899
- signal: opts.signal
6900
- });
6901
- }
6902
- /** Export a collection's records as a CSV string (header row = field keys). */
6903
- async exportCsv(id, opts = {}) {
6904
- const res = await requestRaw(this.ctx, {
6905
- method: "GET",
6906
- path: `/api/v1/tables/${enc5(id)}/export`,
6907
- signal: opts.signal,
6908
- expectJson: false
6909
- });
6910
- return res.text();
6911
- }
6912
- /** Import records into a collection from a CSV string. Returns the count. */
6913
- async importCsv(id, csv, opts = {}) {
6914
- const res = await request(this.ctx, {
6915
- method: "POST",
6916
- path: `/api/v1/tables/${enc5(id)}/import`,
6917
- body: { csv },
6918
- signal: opts.signal
6919
- });
6920
- return res.data;
6921
- }
6922
- };
6923
-
6924
5734
  // ../sdk/src/api/user.ts
6925
5735
  var UserApi = class {
6926
5736
  constructor(ctx) {
@@ -6964,11 +5774,11 @@ var UserApi = class {
6964
5774
  };
6965
5775
 
6966
5776
  // ../sdk/src/api/videos.ts
6967
- var GENERATE_BINDING = COMMAND_BINDINGS["video generate"];
6968
5777
  var VideosApi = class {
6969
5778
  constructor(ctx) {
6970
5779
  this.ctx = ctx;
6971
5780
  }
5781
+ /** List the available video-generation models. */
6972
5782
  async listModels(opts = {}) {
6973
5783
  const res = await request(this.ctx, {
6974
5784
  method: "GET",
@@ -6977,6 +5787,7 @@ var VideosApi = class {
6977
5787
  });
6978
5788
  return res.data;
6979
5789
  }
5790
+ /** Search the video-model registry (filtered + paginated envelope). */
6980
5791
  async searchModels(input = {}, opts = {}) {
6981
5792
  const res = await request(
6982
5793
  this.ctx,
@@ -6989,27 +5800,6 @@ var VideosApi = class {
6989
5800
  );
6990
5801
  return res.data;
6991
5802
  }
6992
- async generate(input, opts = {}) {
6993
- const res = await request(this.ctx, {
6994
- method: "POST",
6995
- path: "/api/v1/videos/generations",
6996
- body: input,
6997
- signal: opts.signal
6998
- });
6999
- const handle = res.data;
7000
- if (opts.wait === false) return handle;
7001
- const pollOpts = {
7002
- signal: opts.signal,
7003
- pollIntervalMs: opts.pollIntervalMs,
7004
- maxPollAttempts: opts.maxPollAttempts
7005
- };
7006
- return await awaitOperation(
7007
- GENERATE_BINDING,
7008
- handle.id,
7009
- this.ctx,
7010
- pollOpts
7011
- );
7012
- }
7013
5803
  };
7014
5804
 
7015
5805
  // ../sdk/src/api/web.ts
@@ -7174,8 +5964,12 @@ var WorkspacesApi = class {
7174
5964
  }
7175
5965
  };
7176
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
+
7177
5971
  // ../sdk/src/version.ts
7178
- var VERSION = "0.3.0" ;
5972
+ var VERSION = "0.4.0" ;
7179
5973
 
7180
5974
  // src/api/app.ts
7181
5975
  var RemoteBundleReader = class {
@@ -7637,6 +6431,6 @@ function isDataStore(x) {
7637
6431
  return typeof x.write === "function" && typeof x.upload === "function" && typeof x.getMetadata === "function";
7638
6432
  }
7639
6433
 
7640
- export { AgentsApi, AiGatewayApi, ApiKeysApi, AppFolder, AudioApi, AuthError, AutomationsApi, 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, UserApi, VERSION, VideosApi, WebSearchApi, WorkspacesApi, awaitOperation, buildUrl, errorFromStatus, executeCommand, getFileBlob, getFileText, listFiles, request, requestRaw };
7641
- //# sourceMappingURL=chunk-KMLUFF4F.js.map
7642
- //# sourceMappingURL=chunk-KMLUFF4F.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