@miosa/sdk 2.0.3 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/dist/index.d.ts +72 -1
- package/dist/index.js +432 -315
- package/dist/index.js.map +1 -1
- package/package.json +13 -12
package/dist/index.js
CHANGED
|
@@ -168,7 +168,7 @@ var TokenRefreshFailedError = class extends MiosaError {
|
|
|
168
168
|
};
|
|
169
169
|
|
|
170
170
|
// src/version.ts
|
|
171
|
-
var SDK_VERSION = "2.0.
|
|
171
|
+
var SDK_VERSION = "2.0.5";
|
|
172
172
|
var SDK_USER_AGENT = `@miosa/sdk/${SDK_VERSION}`;
|
|
173
173
|
|
|
174
174
|
// src/http.ts
|
|
@@ -1258,8 +1258,69 @@ var AgentRuntimeProfiles = class {
|
|
|
1258
1258
|
}
|
|
1259
1259
|
};
|
|
1260
1260
|
|
|
1261
|
-
// src/resources/
|
|
1261
|
+
// src/resources/agent-definitions.ts
|
|
1262
1262
|
function unwrap5(payload) {
|
|
1263
|
+
if (payload !== null && typeof payload === "object" && "data" in payload && payload.data !== void 0) {
|
|
1264
|
+
return payload.data;
|
|
1265
|
+
}
|
|
1266
|
+
return payload;
|
|
1267
|
+
}
|
|
1268
|
+
var AgentDefinitions = class {
|
|
1269
|
+
constructor(http) {
|
|
1270
|
+
this.http = http;
|
|
1271
|
+
}
|
|
1272
|
+
http;
|
|
1273
|
+
async list(params = {}) {
|
|
1274
|
+
return unwrap5(
|
|
1275
|
+
await this.http.get("/agents", {
|
|
1276
|
+
workspace_id: params.workspaceId ?? params.workspace_id,
|
|
1277
|
+
project_id: params.projectId ?? params.project_id,
|
|
1278
|
+
status: params.status
|
|
1279
|
+
})
|
|
1280
|
+
);
|
|
1281
|
+
}
|
|
1282
|
+
async get(id) {
|
|
1283
|
+
return unwrap5(
|
|
1284
|
+
await this.http.get(
|
|
1285
|
+
`/agents/${encodeURIComponent(id)}`
|
|
1286
|
+
)
|
|
1287
|
+
);
|
|
1288
|
+
}
|
|
1289
|
+
async create(params) {
|
|
1290
|
+
return unwrap5(
|
|
1291
|
+
await this.http.post(
|
|
1292
|
+
"/agents",
|
|
1293
|
+
{
|
|
1294
|
+
workspace_id: params.workspaceId ?? params.workspace_id,
|
|
1295
|
+
project_id: params.projectId ?? params.project_id,
|
|
1296
|
+
name: params.name,
|
|
1297
|
+
description: params.description,
|
|
1298
|
+
metadata: params.metadata,
|
|
1299
|
+
configuration: params.configuration
|
|
1300
|
+
}
|
|
1301
|
+
)
|
|
1302
|
+
);
|
|
1303
|
+
}
|
|
1304
|
+
async update(id, params) {
|
|
1305
|
+
return unwrap5(
|
|
1306
|
+
await this.http.patch(`/agents/${encodeURIComponent(id)}`, params)
|
|
1307
|
+
);
|
|
1308
|
+
}
|
|
1309
|
+
async publish(id, configuration) {
|
|
1310
|
+
return unwrap5(
|
|
1311
|
+
await this.http.post(
|
|
1312
|
+
`/agents/${encodeURIComponent(id)}/versions`,
|
|
1313
|
+
{ configuration }
|
|
1314
|
+
)
|
|
1315
|
+
);
|
|
1316
|
+
}
|
|
1317
|
+
async archive(id) {
|
|
1318
|
+
await this.http.delete(`/agents/${encodeURIComponent(id)}`);
|
|
1319
|
+
}
|
|
1320
|
+
};
|
|
1321
|
+
|
|
1322
|
+
// src/resources/runs.ts
|
|
1323
|
+
function unwrap6(payload) {
|
|
1263
1324
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
1264
1325
|
return payload.data;
|
|
1265
1326
|
}
|
|
@@ -1298,24 +1359,24 @@ var Runs = class {
|
|
|
1298
1359
|
status: params.status
|
|
1299
1360
|
})
|
|
1300
1361
|
);
|
|
1301
|
-
const data =
|
|
1362
|
+
const data = unwrap6(
|
|
1302
1363
|
response
|
|
1303
1364
|
);
|
|
1304
1365
|
if (Array.isArray(data)) return data;
|
|
1305
1366
|
return data.runs ?? data.items ?? [];
|
|
1306
1367
|
}
|
|
1307
1368
|
async get(id) {
|
|
1308
|
-
return
|
|
1369
|
+
return unwrap6(
|
|
1309
1370
|
await this.http.get(`/runs/${encodeURIComponent(id)}`)
|
|
1310
1371
|
);
|
|
1311
1372
|
}
|
|
1312
1373
|
async outputs(id) {
|
|
1313
|
-
return
|
|
1374
|
+
return unwrap6(
|
|
1314
1375
|
await this.http.get(`/runs/${encodeURIComponent(id)}/outputs`)
|
|
1315
1376
|
);
|
|
1316
1377
|
}
|
|
1317
1378
|
async files(id) {
|
|
1318
|
-
const data =
|
|
1379
|
+
const data = unwrap6(
|
|
1319
1380
|
await this.http.get(`/runs/${encodeURIComponent(id)}/files`)
|
|
1320
1381
|
);
|
|
1321
1382
|
if (Array.isArray(data)) return data;
|
|
@@ -1330,33 +1391,33 @@ var Runs = class {
|
|
|
1330
1391
|
);
|
|
1331
1392
|
}
|
|
1332
1393
|
async messages(id) {
|
|
1333
|
-
const data =
|
|
1394
|
+
const data = unwrap6(
|
|
1334
1395
|
await this.http.get(`/runs/${encodeURIComponent(id)}/messages`)
|
|
1335
1396
|
);
|
|
1336
1397
|
if (Array.isArray(data)) return data;
|
|
1337
1398
|
return data.messages ?? data.items ?? [];
|
|
1338
1399
|
}
|
|
1339
1400
|
async commandOutput(id) {
|
|
1340
|
-
return
|
|
1401
|
+
return unwrap6(
|
|
1341
1402
|
await this.http.get(`/runs/${encodeURIComponent(id)}/command-output`)
|
|
1342
1403
|
);
|
|
1343
1404
|
}
|
|
1344
1405
|
async activity(id) {
|
|
1345
|
-
const data =
|
|
1406
|
+
const data = unwrap6(
|
|
1346
1407
|
await this.http.get(`/runs/${encodeURIComponent(id)}/activity`)
|
|
1347
1408
|
);
|
|
1348
1409
|
if (Array.isArray(data)) return data;
|
|
1349
1410
|
return data.activity ?? data.items ?? [];
|
|
1350
1411
|
}
|
|
1351
1412
|
async previews(id) {
|
|
1352
|
-
const data =
|
|
1413
|
+
const data = unwrap6(
|
|
1353
1414
|
await this.http.get(`/runs/${encodeURIComponent(id)}/previews`)
|
|
1354
1415
|
);
|
|
1355
1416
|
if (Array.isArray(data)) return data;
|
|
1356
1417
|
return data.previews ?? data.items ?? [];
|
|
1357
1418
|
}
|
|
1358
1419
|
async diagnostics(id) {
|
|
1359
|
-
const data =
|
|
1420
|
+
const data = unwrap6(await this.http.get(`/runs/${encodeURIComponent(id)}/diagnostics`));
|
|
1360
1421
|
if (Array.isArray(data)) return data;
|
|
1361
1422
|
return data.diagnostics ?? data.items ?? [];
|
|
1362
1423
|
}
|
|
@@ -1403,6 +1464,9 @@ var Runs = class {
|
|
|
1403
1464
|
env: params.env,
|
|
1404
1465
|
agent_runtime_profile_id: params.agentRuntimeProfileId,
|
|
1405
1466
|
agent_profile_id: params.agentProfileId,
|
|
1467
|
+
agent_definition_id: params.agentDefinitionId,
|
|
1468
|
+
agent_version_id: params.agentVersionId,
|
|
1469
|
+
configuration_receipt: params.configurationReceipt,
|
|
1406
1470
|
run_group_id: params.runGroupId,
|
|
1407
1471
|
parent_run_id: params.parentRunId,
|
|
1408
1472
|
orchestration_role: params.orchestrationRole,
|
|
@@ -1416,10 +1480,10 @@ var Runs = class {
|
|
|
1416
1480
|
capability_requirements: params.capabilityRequirements,
|
|
1417
1481
|
metadata: params.metadata
|
|
1418
1482
|
});
|
|
1419
|
-
return
|
|
1483
|
+
return unwrap6(await this.http.post("/runs", body5));
|
|
1420
1484
|
}
|
|
1421
1485
|
async cancel(id) {
|
|
1422
|
-
return
|
|
1486
|
+
return unwrap6(
|
|
1423
1487
|
await this.http.post(
|
|
1424
1488
|
`/runs/${encodeURIComponent(id)}/cancel`,
|
|
1425
1489
|
{}
|
|
@@ -1429,7 +1493,7 @@ var Runs = class {
|
|
|
1429
1493
|
};
|
|
1430
1494
|
|
|
1431
1495
|
// src/resources/analytics.ts
|
|
1432
|
-
function
|
|
1496
|
+
function unwrap7(payload) {
|
|
1433
1497
|
if (payload && typeof payload === "object") {
|
|
1434
1498
|
const p = payload;
|
|
1435
1499
|
for (const k of ["data", "analytics", "series", "items"]) {
|
|
@@ -1452,16 +1516,16 @@ var Analytics = class {
|
|
|
1452
1516
|
async overview(filters = {}) {
|
|
1453
1517
|
const query3 = stripUndefined5(filters);
|
|
1454
1518
|
const data = await this.http.get("/analytics/overview", query3);
|
|
1455
|
-
return
|
|
1519
|
+
return unwrap7(data);
|
|
1456
1520
|
}
|
|
1457
1521
|
/** Get a timeseries for a metric over a period. */
|
|
1458
1522
|
async timeseries(params = {}) {
|
|
1459
1523
|
const query3 = stripUndefined5(params);
|
|
1460
1524
|
const data = await this.http.get("/analytics/timeseries", query3);
|
|
1461
|
-
return
|
|
1525
|
+
return unwrap7(data);
|
|
1462
1526
|
}
|
|
1463
1527
|
};
|
|
1464
|
-
function
|
|
1528
|
+
function unwrap8(payload) {
|
|
1465
1529
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
1466
1530
|
return payload.data;
|
|
1467
1531
|
}
|
|
@@ -1506,7 +1570,7 @@ var ApiKeys = class {
|
|
|
1506
1570
|
body: body5,
|
|
1507
1571
|
headers: { "Idempotency-Key": idempotencyKey(ikey) }
|
|
1508
1572
|
});
|
|
1509
|
-
return
|
|
1573
|
+
return unwrap8(data);
|
|
1510
1574
|
}
|
|
1511
1575
|
/** POST /api/v1/api-keys/scoped — L2 delegation token bound to one external user. */
|
|
1512
1576
|
async createScoped(params) {
|
|
@@ -1515,7 +1579,7 @@ var ApiKeys = class {
|
|
|
1515
1579
|
scopes: params.scopes,
|
|
1516
1580
|
expires_at: params.expiresAt
|
|
1517
1581
|
});
|
|
1518
|
-
return
|
|
1582
|
+
return unwrap8(
|
|
1519
1583
|
await this.http.post("/api-keys/scoped", body5)
|
|
1520
1584
|
);
|
|
1521
1585
|
}
|
|
@@ -1525,7 +1589,7 @@ var ApiKeys = class {
|
|
|
1525
1589
|
};
|
|
1526
1590
|
|
|
1527
1591
|
// src/resources/app-documents.ts
|
|
1528
|
-
function
|
|
1592
|
+
function unwrap9(payload) {
|
|
1529
1593
|
return payload && typeof payload === "object" && "data" in payload ? payload.data : payload;
|
|
1530
1594
|
}
|
|
1531
1595
|
var AppDocuments = class {
|
|
@@ -1541,7 +1605,7 @@ var AppDocuments = class {
|
|
|
1541
1605
|
return payload.data;
|
|
1542
1606
|
}
|
|
1543
1607
|
async get(id) {
|
|
1544
|
-
return
|
|
1608
|
+
return unwrap9(
|
|
1545
1609
|
await this.http.get(
|
|
1546
1610
|
`/builder/apps/${id}`
|
|
1547
1611
|
)
|
|
@@ -1549,7 +1613,7 @@ var AppDocuments = class {
|
|
|
1549
1613
|
}
|
|
1550
1614
|
async create(params) {
|
|
1551
1615
|
const { workspaceId: workspaceId2, ...body5 } = params;
|
|
1552
|
-
return
|
|
1616
|
+
return unwrap9(
|
|
1553
1617
|
await this.http.post(
|
|
1554
1618
|
"/builder/apps",
|
|
1555
1619
|
{ ...body5, workspace_id: workspaceId2 }
|
|
@@ -1557,7 +1621,7 @@ var AppDocuments = class {
|
|
|
1557
1621
|
);
|
|
1558
1622
|
}
|
|
1559
1623
|
async update(id, params) {
|
|
1560
|
-
return
|
|
1624
|
+
return unwrap9(
|
|
1561
1625
|
await this.http.patch(`/builder/apps/${id}`, params)
|
|
1562
1626
|
);
|
|
1563
1627
|
}
|
|
@@ -1565,17 +1629,17 @@ var AppDocuments = class {
|
|
|
1565
1629
|
await this.http.delete(`/builder/apps/${id}`);
|
|
1566
1630
|
}
|
|
1567
1631
|
async diagnostics(id) {
|
|
1568
|
-
return
|
|
1632
|
+
return unwrap9(
|
|
1569
1633
|
await this.http.get(`/builder/apps/${id}/diagnostics`)
|
|
1570
1634
|
);
|
|
1571
1635
|
}
|
|
1572
1636
|
async stageCandidate(id) {
|
|
1573
|
-
return
|
|
1637
|
+
return unwrap9(
|
|
1574
1638
|
await this.http.post(`/builder/apps/${id}/candidates`, {})
|
|
1575
1639
|
);
|
|
1576
1640
|
}
|
|
1577
1641
|
async approveExactVersion(id, releaseId, reason) {
|
|
1578
|
-
return
|
|
1642
|
+
return unwrap9(
|
|
1579
1643
|
await this.http.post(`/builder/apps/${id}/approvals`, {
|
|
1580
1644
|
reason,
|
|
1581
1645
|
release_id: releaseId
|
|
@@ -1584,7 +1648,7 @@ var AppDocuments = class {
|
|
|
1584
1648
|
}
|
|
1585
1649
|
async publishExactRelease(id) {
|
|
1586
1650
|
const payload = await this.http.post(`/builder/apps/${id}/publish`, {});
|
|
1587
|
-
return
|
|
1651
|
+
return unwrap9(payload).app;
|
|
1588
1652
|
}
|
|
1589
1653
|
async listData(id, collection) {
|
|
1590
1654
|
const payload = await this.http.get(
|
|
@@ -1593,14 +1657,14 @@ var AppDocuments = class {
|
|
|
1593
1657
|
return payload.data;
|
|
1594
1658
|
}
|
|
1595
1659
|
async getData(id, collection, key) {
|
|
1596
|
-
return
|
|
1660
|
+
return unwrap9(
|
|
1597
1661
|
await this.http.get(
|
|
1598
1662
|
`/builder/apps/${encodeURIComponent(id)}/data/${encodeURIComponent(collection)}/${encodeURIComponent(key)}`
|
|
1599
1663
|
)
|
|
1600
1664
|
);
|
|
1601
1665
|
}
|
|
1602
1666
|
async putData(id, collection, key, value, expectedVersion) {
|
|
1603
|
-
return
|
|
1667
|
+
return unwrap9(
|
|
1604
1668
|
await this.http.put(
|
|
1605
1669
|
`/builder/apps/${encodeURIComponent(id)}/data/${encodeURIComponent(collection)}/${encodeURIComponent(key)}`,
|
|
1606
1670
|
{ value, expected_version: expectedVersion }
|
|
@@ -1632,7 +1696,7 @@ var AppDocuments = class {
|
|
|
1632
1696
|
);
|
|
1633
1697
|
}
|
|
1634
1698
|
async mintRuntimeToken(id) {
|
|
1635
|
-
return
|
|
1699
|
+
return unwrap9(
|
|
1636
1700
|
await this.http.post(
|
|
1637
1701
|
`/builder/apps/${encodeURIComponent(id)}/runtime-token`,
|
|
1638
1702
|
{}
|
|
@@ -1640,7 +1704,7 @@ var AppDocuments = class {
|
|
|
1640
1704
|
);
|
|
1641
1705
|
}
|
|
1642
1706
|
async resolveBinding(id, bindingId, receiptId, callbackToken) {
|
|
1643
|
-
return
|
|
1707
|
+
return unwrap9(
|
|
1644
1708
|
await this.http.request(
|
|
1645
1709
|
`/builder/apps/${encodeURIComponent(id)}/runtime/bindings/${encodeURIComponent(bindingId)}?receipt_id=${encodeURIComponent(receiptId)}`,
|
|
1646
1710
|
{
|
|
@@ -1659,7 +1723,7 @@ var AppDocuments = class {
|
|
|
1659
1723
|
return payload.data;
|
|
1660
1724
|
}
|
|
1661
1725
|
async startAutomationRun(id, automationId, trigger = {}) {
|
|
1662
|
-
return
|
|
1726
|
+
return unwrap9(
|
|
1663
1727
|
await this.http.post(
|
|
1664
1728
|
`/builder/apps/${encodeURIComponent(id)}/automations/${encodeURIComponent(automationId)}/runs`,
|
|
1665
1729
|
{ trigger }
|
|
@@ -1667,7 +1731,7 @@ var AppDocuments = class {
|
|
|
1667
1731
|
);
|
|
1668
1732
|
}
|
|
1669
1733
|
async claimAutomationStep(id, runId) {
|
|
1670
|
-
return
|
|
1734
|
+
return unwrap9(
|
|
1671
1735
|
await this.http.post(
|
|
1672
1736
|
`/builder/apps/${encodeURIComponent(id)}/automation-runs/${encodeURIComponent(runId)}/claim`,
|
|
1673
1737
|
{}
|
|
@@ -1675,7 +1739,7 @@ var AppDocuments = class {
|
|
|
1675
1739
|
);
|
|
1676
1740
|
}
|
|
1677
1741
|
async completeAutomationStep(id, runId, cursor, idempotencyKey11, output = null) {
|
|
1678
|
-
return
|
|
1742
|
+
return unwrap9(
|
|
1679
1743
|
await this.http.post(
|
|
1680
1744
|
`/builder/apps/${encodeURIComponent(id)}/automation-runs/${encodeURIComponent(runId)}/complete`,
|
|
1681
1745
|
{
|
|
@@ -1687,7 +1751,7 @@ var AppDocuments = class {
|
|
|
1687
1751
|
);
|
|
1688
1752
|
}
|
|
1689
1753
|
async failAutomationStep(id, runId, cursor, idempotencyKey11, reason) {
|
|
1690
|
-
return
|
|
1754
|
+
return unwrap9(
|
|
1691
1755
|
await this.http.post(
|
|
1692
1756
|
`/builder/apps/${encodeURIComponent(id)}/automation-runs/${encodeURIComponent(runId)}/fail`,
|
|
1693
1757
|
{
|
|
@@ -1707,7 +1771,7 @@ var AppDocuments = class {
|
|
|
1707
1771
|
};
|
|
1708
1772
|
|
|
1709
1773
|
// src/resources/audit-log.ts
|
|
1710
|
-
function
|
|
1774
|
+
function unwrap10(payload) {
|
|
1711
1775
|
if (payload && typeof payload === "object") {
|
|
1712
1776
|
const p = payload;
|
|
1713
1777
|
for (const k of ["data", "audit_log", "events", "items"]) {
|
|
@@ -1730,14 +1794,14 @@ var AuditLog = class {
|
|
|
1730
1794
|
async list(params = {}) {
|
|
1731
1795
|
const query3 = stripUndefined7(params);
|
|
1732
1796
|
const data = await this.http.get("/audit-log", query3);
|
|
1733
|
-
const result =
|
|
1797
|
+
const result = unwrap10(data);
|
|
1734
1798
|
if (Array.isArray(result)) return result;
|
|
1735
1799
|
return [];
|
|
1736
1800
|
}
|
|
1737
1801
|
};
|
|
1738
1802
|
|
|
1739
1803
|
// src/resources/benchmarks.ts
|
|
1740
|
-
function
|
|
1804
|
+
function unwrap11(data) {
|
|
1741
1805
|
if (data && typeof data === "object") {
|
|
1742
1806
|
const d = data;
|
|
1743
1807
|
for (const k of ["data", "benchmarks", "samples", "items"]) {
|
|
@@ -1769,7 +1833,7 @@ var Benchmarks = class {
|
|
|
1769
1833
|
return unwrapList(data);
|
|
1770
1834
|
}
|
|
1771
1835
|
async get(benchmarkId) {
|
|
1772
|
-
return
|
|
1836
|
+
return unwrap11(
|
|
1773
1837
|
await this.http.get(`/admin/benchmarks/${benchmarkId}`)
|
|
1774
1838
|
);
|
|
1775
1839
|
}
|
|
@@ -1778,10 +1842,10 @@ var Benchmarks = class {
|
|
|
1778
1842
|
const body5 = Object.fromEntries(
|
|
1779
1843
|
Object.entries(params).filter(([, v]) => v !== void 0)
|
|
1780
1844
|
);
|
|
1781
|
-
return
|
|
1845
|
+
return unwrap11(await this.http.post("/admin/benchmarks", body5));
|
|
1782
1846
|
}
|
|
1783
1847
|
async cancel(benchmarkId) {
|
|
1784
|
-
return
|
|
1848
|
+
return unwrap11(
|
|
1785
1849
|
await this.http.post(`/admin/benchmarks/${benchmarkId}/cancel`)
|
|
1786
1850
|
);
|
|
1787
1851
|
}
|
|
@@ -1801,14 +1865,14 @@ var Benchmarks = class {
|
|
|
1801
1865
|
const body5 = Object.fromEntries(
|
|
1802
1866
|
Object.entries(params).filter(([, v]) => v !== void 0)
|
|
1803
1867
|
);
|
|
1804
|
-
return
|
|
1868
|
+
return unwrap11(
|
|
1805
1869
|
await this.http.post("/admin/benchmarks/compare", body5)
|
|
1806
1870
|
);
|
|
1807
1871
|
}
|
|
1808
1872
|
};
|
|
1809
1873
|
|
|
1810
1874
|
// src/resources/builder-sessions.ts
|
|
1811
|
-
function
|
|
1875
|
+
function unwrap12(data) {
|
|
1812
1876
|
if (data && typeof data === "object") {
|
|
1813
1877
|
const d = data;
|
|
1814
1878
|
for (const k of ["data", "sessions", "items"]) {
|
|
@@ -1845,7 +1909,7 @@ var BuilderSessions = class {
|
|
|
1845
1909
|
return all.find((s) => s.id === sessionId) ?? {};
|
|
1846
1910
|
}
|
|
1847
1911
|
async updateTitle(sessionId, title) {
|
|
1848
|
-
return
|
|
1912
|
+
return unwrap12(
|
|
1849
1913
|
await this.http.patch(`/builder/sessions/${sessionId}/title`, {
|
|
1850
1914
|
title
|
|
1851
1915
|
})
|
|
@@ -1857,7 +1921,7 @@ var BuilderSessions = class {
|
|
|
1857
1921
|
};
|
|
1858
1922
|
|
|
1859
1923
|
// src/resources/channels.ts
|
|
1860
|
-
function
|
|
1924
|
+
function unwrap13(payload) {
|
|
1861
1925
|
if (payload && typeof payload === "object") {
|
|
1862
1926
|
const p = payload;
|
|
1863
1927
|
for (const k of ["data", "channels", "notifications", "items"]) {
|
|
@@ -1885,26 +1949,26 @@ var Channels = class {
|
|
|
1885
1949
|
async list(params = {}) {
|
|
1886
1950
|
const query3 = stripUndefined8(params);
|
|
1887
1951
|
const data = await this.http.get("/channels", query3);
|
|
1888
|
-
const result =
|
|
1952
|
+
const result = unwrap13(data);
|
|
1889
1953
|
if (Array.isArray(result)) return result;
|
|
1890
1954
|
return [];
|
|
1891
1955
|
}
|
|
1892
1956
|
/** Get a single channel. */
|
|
1893
1957
|
async get(channelId) {
|
|
1894
1958
|
const data = await this.http.get(`/channels/${channelId}`);
|
|
1895
|
-
return
|
|
1959
|
+
return unwrap13(data);
|
|
1896
1960
|
}
|
|
1897
1961
|
/** Create a new channel. */
|
|
1898
1962
|
async create(params) {
|
|
1899
1963
|
const body5 = stripUndefObj(params);
|
|
1900
1964
|
const data = await this.http.post("/channels", body5);
|
|
1901
|
-
return
|
|
1965
|
+
return unwrap13(data);
|
|
1902
1966
|
}
|
|
1903
1967
|
/** Update a channel. */
|
|
1904
1968
|
async update(channelId, params) {
|
|
1905
1969
|
const body5 = stripUndefObj(params);
|
|
1906
1970
|
const data = await this.http.patch(`/channels/${channelId}`, body5);
|
|
1907
|
-
return
|
|
1971
|
+
return unwrap13(data);
|
|
1908
1972
|
}
|
|
1909
1973
|
/** Delete a channel. */
|
|
1910
1974
|
async delete(channelId) {
|
|
@@ -1914,30 +1978,30 @@ var Channels = class {
|
|
|
1914
1978
|
/** Get notification preferences across all channels. */
|
|
1915
1979
|
async listNotifications() {
|
|
1916
1980
|
const data = await this.http.get("/channels/notifications");
|
|
1917
|
-
return
|
|
1981
|
+
return unwrap13(data);
|
|
1918
1982
|
}
|
|
1919
1983
|
/** Update notification preferences. */
|
|
1920
1984
|
async updateNotifications(params) {
|
|
1921
1985
|
const body5 = stripUndefObj(params);
|
|
1922
1986
|
const data = await this.http.put("/channels/notifications", body5);
|
|
1923
|
-
return
|
|
1987
|
+
return unwrap13(data);
|
|
1924
1988
|
}
|
|
1925
1989
|
/** Enable a channel. */
|
|
1926
1990
|
async enable(channelId) {
|
|
1927
1991
|
const data = await this.http.post(`/channels/${channelId}/enable`);
|
|
1928
|
-
return
|
|
1992
|
+
return unwrap13(data);
|
|
1929
1993
|
}
|
|
1930
1994
|
/** Disable a channel. */
|
|
1931
1995
|
async disable(channelId) {
|
|
1932
1996
|
const data = await this.http.post(
|
|
1933
1997
|
`/channels/${channelId}/disable`
|
|
1934
1998
|
);
|
|
1935
|
-
return
|
|
1999
|
+
return unwrap13(data);
|
|
1936
2000
|
}
|
|
1937
2001
|
};
|
|
1938
2002
|
|
|
1939
2003
|
// src/resources/cloud.ts
|
|
1940
|
-
function
|
|
2004
|
+
function unwrap14(payload) {
|
|
1941
2005
|
if (payload !== null && typeof payload === "object" && "data" in payload && payload.data !== void 0) {
|
|
1942
2006
|
return payload.data;
|
|
1943
2007
|
}
|
|
@@ -2012,12 +2076,12 @@ var Cloud = class {
|
|
|
2012
2076
|
}
|
|
2013
2077
|
http;
|
|
2014
2078
|
async listAccounts() {
|
|
2015
|
-
return
|
|
2079
|
+
return unwrap14(
|
|
2016
2080
|
await this.http.get("/cloud/accounts")
|
|
2017
2081
|
);
|
|
2018
2082
|
}
|
|
2019
2083
|
async createAccount(params) {
|
|
2020
|
-
return
|
|
2084
|
+
return unwrap14(
|
|
2021
2085
|
await this.http.post(
|
|
2022
2086
|
"/cloud/accounts",
|
|
2023
2087
|
accountBody(params)
|
|
@@ -2025,7 +2089,7 @@ var Cloud = class {
|
|
|
2025
2089
|
);
|
|
2026
2090
|
}
|
|
2027
2091
|
async attachAwsRole(id, params) {
|
|
2028
|
-
return
|
|
2092
|
+
return unwrap14(
|
|
2029
2093
|
await this.http.post(
|
|
2030
2094
|
`/cloud/accounts/${encodeURIComponent(id)}/aws/role`,
|
|
2031
2095
|
stripUndefined9({
|
|
@@ -2036,7 +2100,7 @@ var Cloud = class {
|
|
|
2036
2100
|
);
|
|
2037
2101
|
}
|
|
2038
2102
|
async listRegions(params = {}) {
|
|
2039
|
-
return
|
|
2103
|
+
return unwrap14(
|
|
2040
2104
|
await this.http.get(
|
|
2041
2105
|
"/cloud/regions",
|
|
2042
2106
|
query(params)
|
|
@@ -2044,7 +2108,7 @@ var Cloud = class {
|
|
|
2044
2108
|
);
|
|
2045
2109
|
}
|
|
2046
2110
|
async createRegion(params) {
|
|
2047
|
-
return
|
|
2111
|
+
return unwrap14(
|
|
2048
2112
|
await this.http.post(
|
|
2049
2113
|
"/cloud/regions",
|
|
2050
2114
|
regionBody(params)
|
|
@@ -2052,12 +2116,12 @@ var Cloud = class {
|
|
|
2052
2116
|
);
|
|
2053
2117
|
}
|
|
2054
2118
|
async listPools(params = {}) {
|
|
2055
|
-
return
|
|
2119
|
+
return unwrap14(
|
|
2056
2120
|
await this.http.get("/cloud/pools", query(params))
|
|
2057
2121
|
);
|
|
2058
2122
|
}
|
|
2059
2123
|
async createPool(params) {
|
|
2060
|
-
return
|
|
2124
|
+
return unwrap14(
|
|
2061
2125
|
await this.http.post(
|
|
2062
2126
|
"/cloud/pools",
|
|
2063
2127
|
poolBody(params)
|
|
@@ -2065,7 +2129,7 @@ var Cloud = class {
|
|
|
2065
2129
|
);
|
|
2066
2130
|
}
|
|
2067
2131
|
async listPreflights(params = {}) {
|
|
2068
|
-
return
|
|
2132
|
+
return unwrap14(
|
|
2069
2133
|
await this.http.get(
|
|
2070
2134
|
"/cloud/preflights",
|
|
2071
2135
|
query(params)
|
|
@@ -2073,7 +2137,7 @@ var Cloud = class {
|
|
|
2073
2137
|
);
|
|
2074
2138
|
}
|
|
2075
2139
|
async recordPreflight(params) {
|
|
2076
|
-
return
|
|
2140
|
+
return unwrap14(
|
|
2077
2141
|
await this.http.post(
|
|
2078
2142
|
"/cloud/preflights",
|
|
2079
2143
|
preflightBody(params)
|
|
@@ -2083,7 +2147,7 @@ var Cloud = class {
|
|
|
2083
2147
|
};
|
|
2084
2148
|
|
|
2085
2149
|
// src/resources/command-center.ts
|
|
2086
|
-
function
|
|
2150
|
+
function unwrap15(data) {
|
|
2087
2151
|
if (data && typeof data === "object") {
|
|
2088
2152
|
const d = data;
|
|
2089
2153
|
for (const k of [
|
|
@@ -2117,7 +2181,7 @@ var CommandCenter = class {
|
|
|
2117
2181
|
http;
|
|
2118
2182
|
/** Top-level snapshot (GET /command-center). */
|
|
2119
2183
|
async overview() {
|
|
2120
|
-
return
|
|
2184
|
+
return unwrap15(await this.http.get("/command-center"));
|
|
2121
2185
|
}
|
|
2122
2186
|
async agents() {
|
|
2123
2187
|
return unwrapList3(await this.http.get("/command-center/agents"));
|
|
@@ -2128,13 +2192,13 @@ var CommandCenter = class {
|
|
|
2128
2192
|
);
|
|
2129
2193
|
}
|
|
2130
2194
|
async metrics() {
|
|
2131
|
-
return
|
|
2195
|
+
return unwrap15(await this.http.get("/command-center/metrics"));
|
|
2132
2196
|
}
|
|
2133
2197
|
async presets() {
|
|
2134
2198
|
return unwrapList3(await this.http.get("/command-center/presets"));
|
|
2135
2199
|
}
|
|
2136
2200
|
async tiers() {
|
|
2137
|
-
return
|
|
2201
|
+
return unwrap15(await this.http.get("/command-center/tiers"));
|
|
2138
2202
|
}
|
|
2139
2203
|
/** Stream live command-center events via SSE. */
|
|
2140
2204
|
events() {
|
|
@@ -2143,7 +2207,7 @@ var CommandCenter = class {
|
|
|
2143
2207
|
};
|
|
2144
2208
|
|
|
2145
2209
|
// src/resources/community.ts
|
|
2146
|
-
function
|
|
2210
|
+
function unwrap16(data) {
|
|
2147
2211
|
if (data && typeof data === "object") {
|
|
2148
2212
|
const d = data;
|
|
2149
2213
|
for (const k of ["data", "templates", "agents", "items"]) {
|
|
@@ -2175,7 +2239,7 @@ var Community = class {
|
|
|
2175
2239
|
return unwrapList4(await this.http.get("/community/agents", query3));
|
|
2176
2240
|
}
|
|
2177
2241
|
async getAgent(agentId) {
|
|
2178
|
-
return
|
|
2242
|
+
return unwrap16(await this.http.get(`/community/agents/${agentId}`));
|
|
2179
2243
|
}
|
|
2180
2244
|
// ── Templates ─────────────────────────────────────────────────────────
|
|
2181
2245
|
async listTemplates(filters = {}) {
|
|
@@ -2187,7 +2251,7 @@ var Community = class {
|
|
|
2187
2251
|
);
|
|
2188
2252
|
}
|
|
2189
2253
|
async getTemplate(templateId) {
|
|
2190
|
-
return
|
|
2254
|
+
return unwrap16(
|
|
2191
2255
|
await this.http.get(`/community/templates/${templateId}`)
|
|
2192
2256
|
);
|
|
2193
2257
|
}
|
|
@@ -2196,7 +2260,7 @@ var Community = class {
|
|
|
2196
2260
|
const body5 = Object.fromEntries(
|
|
2197
2261
|
Object.entries(opts).filter(([, v]) => v !== void 0)
|
|
2198
2262
|
);
|
|
2199
|
-
return
|
|
2263
|
+
return unwrap16(
|
|
2200
2264
|
await this.http.post(
|
|
2201
2265
|
`/community/templates/${templateId}/install`,
|
|
2202
2266
|
body5
|
|
@@ -2211,7 +2275,7 @@ var Community = class {
|
|
|
2211
2275
|
Object.entries(opts).filter(([, v]) => v !== void 0)
|
|
2212
2276
|
)
|
|
2213
2277
|
};
|
|
2214
|
-
return
|
|
2278
|
+
return unwrap16(
|
|
2215
2279
|
await this.http.post(
|
|
2216
2280
|
`/community/templates/${templateId}/rate`,
|
|
2217
2281
|
body5
|
|
@@ -2221,7 +2285,7 @@ var Community = class {
|
|
|
2221
2285
|
};
|
|
2222
2286
|
|
|
2223
2287
|
// src/resources/completions.ts
|
|
2224
|
-
function
|
|
2288
|
+
function unwrap17(data) {
|
|
2225
2289
|
if (data && typeof data === "object") {
|
|
2226
2290
|
const d = data;
|
|
2227
2291
|
if (Array.isArray(d.choices)) return d;
|
|
@@ -2247,7 +2311,7 @@ var Completions = class {
|
|
|
2247
2311
|
{ method: "POST", body: body5 }
|
|
2248
2312
|
);
|
|
2249
2313
|
}
|
|
2250
|
-
return this.http.post("/intelligence/completions", body5).then(
|
|
2314
|
+
return this.http.post("/intelligence/completions", body5).then(unwrap17);
|
|
2251
2315
|
}
|
|
2252
2316
|
chat(params) {
|
|
2253
2317
|
const body5 = buildBody(params);
|
|
@@ -2257,7 +2321,7 @@ var Completions = class {
|
|
|
2257
2321
|
{ method: "POST", body: body5 }
|
|
2258
2322
|
);
|
|
2259
2323
|
}
|
|
2260
|
-
return this.http.post("/intelligence/chat/completions", body5).then(
|
|
2324
|
+
return this.http.post("/intelligence/chat/completions", body5).then(unwrap17);
|
|
2261
2325
|
}
|
|
2262
2326
|
};
|
|
2263
2327
|
|
|
@@ -2380,7 +2444,7 @@ var Checkpoints = class {
|
|
|
2380
2444
|
};
|
|
2381
2445
|
|
|
2382
2446
|
// src/resources/computer-auto-stop.ts
|
|
2383
|
-
function
|
|
2447
|
+
function unwrap18(data) {
|
|
2384
2448
|
if (data && typeof data === "object") {
|
|
2385
2449
|
const d = data;
|
|
2386
2450
|
if ("data" in d && Object.keys(d).length <= 2) {
|
|
@@ -2398,13 +2462,13 @@ var ComputerAutoStop = class {
|
|
|
2398
2462
|
computerId;
|
|
2399
2463
|
/** Return the current auto-stop configuration. */
|
|
2400
2464
|
async get() {
|
|
2401
|
-
return
|
|
2465
|
+
return unwrap18(
|
|
2402
2466
|
await this.http.get(`/computers/${this.computerId}/auto-stop`)
|
|
2403
2467
|
);
|
|
2404
2468
|
}
|
|
2405
2469
|
/** Set the idle timeout in seconds (0 disables auto-stop). */
|
|
2406
2470
|
async update(seconds) {
|
|
2407
|
-
return
|
|
2471
|
+
return unwrap18(
|
|
2408
2472
|
await this.http.patch(
|
|
2409
2473
|
`/computers/${this.computerId}/auto-stop`,
|
|
2410
2474
|
{ seconds }
|
|
@@ -2414,7 +2478,7 @@ var ComputerAutoStop = class {
|
|
|
2414
2478
|
};
|
|
2415
2479
|
|
|
2416
2480
|
// src/resources/computer-env.ts
|
|
2417
|
-
function
|
|
2481
|
+
function unwrap19(data) {
|
|
2418
2482
|
if (data && typeof data === "object") {
|
|
2419
2483
|
const d = data;
|
|
2420
2484
|
if ("data" in d && Object.keys(d).length <= 2) {
|
|
@@ -2449,11 +2513,11 @@ var ComputerEnv = class {
|
|
|
2449
2513
|
}
|
|
2450
2514
|
/** Create a new env var. Use update() to change an existing one. */
|
|
2451
2515
|
async set(name, value) {
|
|
2452
|
-
return
|
|
2516
|
+
return unwrap19(await this.http.post(this.base(), { name, value }));
|
|
2453
2517
|
}
|
|
2454
2518
|
/** Patch the value of an existing env var by name. */
|
|
2455
2519
|
async update(name, value) {
|
|
2456
|
-
return
|
|
2520
|
+
return unwrap19(
|
|
2457
2521
|
await this.http.patch(`${this.base()}/${name}`, { value })
|
|
2458
2522
|
);
|
|
2459
2523
|
}
|
|
@@ -2470,7 +2534,7 @@ var ComputerEnv = class {
|
|
|
2470
2534
|
};
|
|
2471
2535
|
|
|
2472
2536
|
// src/resources/computer-logs.ts
|
|
2473
|
-
function
|
|
2537
|
+
function unwrap20(data) {
|
|
2474
2538
|
if (data && typeof data === "object") {
|
|
2475
2539
|
const d = data;
|
|
2476
2540
|
if ("data" in d && Object.keys(d).length <= 2) {
|
|
@@ -2491,7 +2555,7 @@ var ComputerLogs = class {
|
|
|
2491
2555
|
const query3 = Object.fromEntries(
|
|
2492
2556
|
Object.entries(params).filter(([, v]) => v !== void 0)
|
|
2493
2557
|
);
|
|
2494
|
-
return
|
|
2558
|
+
return unwrap20(
|
|
2495
2559
|
await this.http.get(`/computers/${this.computerId}/logs`, query3)
|
|
2496
2560
|
);
|
|
2497
2561
|
}
|
|
@@ -2504,7 +2568,7 @@ var ComputerLogs = class {
|
|
|
2504
2568
|
};
|
|
2505
2569
|
|
|
2506
2570
|
// src/resources/computer-osa.ts
|
|
2507
|
-
function
|
|
2571
|
+
function unwrap21(data) {
|
|
2508
2572
|
if (data && typeof data === "object") {
|
|
2509
2573
|
const d = data;
|
|
2510
2574
|
if ("data" in d && Object.keys(d).length <= 2) {
|
|
@@ -2528,7 +2592,7 @@ var ComputerOsa = class {
|
|
|
2528
2592
|
Object.entries(params).filter(([, v]) => v !== void 0)
|
|
2529
2593
|
)
|
|
2530
2594
|
};
|
|
2531
|
-
return
|
|
2595
|
+
return unwrap21(
|
|
2532
2596
|
await this.http.post(
|
|
2533
2597
|
`/computers/${this.computerId}/osa/task`,
|
|
2534
2598
|
body5
|
|
@@ -2537,13 +2601,13 @@ var ComputerOsa = class {
|
|
|
2537
2601
|
}
|
|
2538
2602
|
/** Cancel the currently-running OSA task, if any. */
|
|
2539
2603
|
async cancelTask() {
|
|
2540
|
-
return
|
|
2604
|
+
return unwrap21(
|
|
2541
2605
|
await this.http.delete(`/computers/${this.computerId}/osa/task`)
|
|
2542
2606
|
);
|
|
2543
2607
|
}
|
|
2544
2608
|
/** Return OSA's current task / configuration / health snapshot. */
|
|
2545
2609
|
async status() {
|
|
2546
|
-
return
|
|
2610
|
+
return unwrap21(
|
|
2547
2611
|
await this.http.get(`/computers/${this.computerId}/osa/status`)
|
|
2548
2612
|
);
|
|
2549
2613
|
}
|
|
@@ -2552,7 +2616,7 @@ var ComputerOsa = class {
|
|
|
2552
2616
|
const body5 = Object.fromEntries(
|
|
2553
2617
|
Object.entries(config).filter(([, v]) => v !== void 0)
|
|
2554
2618
|
);
|
|
2555
|
-
return
|
|
2619
|
+
return unwrap21(
|
|
2556
2620
|
await this.http.post(
|
|
2557
2621
|
`/computers/${this.computerId}/osa/configure`,
|
|
2558
2622
|
body5
|
|
@@ -2562,7 +2626,7 @@ var ComputerOsa = class {
|
|
|
2562
2626
|
};
|
|
2563
2627
|
|
|
2564
2628
|
// src/resources/computer-ports.ts
|
|
2565
|
-
function
|
|
2629
|
+
function unwrap22(data) {
|
|
2566
2630
|
if (data && typeof data === "object") {
|
|
2567
2631
|
const d = data;
|
|
2568
2632
|
if ("data" in d && Object.keys(d).length <= 2) {
|
|
@@ -2607,14 +2671,14 @@ var ComputerPorts = class {
|
|
|
2607
2671
|
Object.entries(opts).filter(([, v]) => v !== void 0)
|
|
2608
2672
|
)
|
|
2609
2673
|
};
|
|
2610
|
-
return
|
|
2674
|
+
return unwrap22(await this.http.post(this.base(), body5));
|
|
2611
2675
|
}
|
|
2612
2676
|
/** Patch visibility / auth options for port. */
|
|
2613
2677
|
async update(port, opts) {
|
|
2614
2678
|
const body5 = Object.fromEntries(
|
|
2615
2679
|
Object.entries(opts).filter(([, v]) => v !== void 0)
|
|
2616
2680
|
);
|
|
2617
|
-
return
|
|
2681
|
+
return unwrap22(
|
|
2618
2682
|
await this.http.patch(`${this.base()}/${port}`, body5)
|
|
2619
2683
|
);
|
|
2620
2684
|
}
|
|
@@ -2641,7 +2705,7 @@ var ComputerTerminal = class {
|
|
|
2641
2705
|
`/computers/${this.computerId}/terminal`,
|
|
2642
2706
|
body5
|
|
2643
2707
|
);
|
|
2644
|
-
return
|
|
2708
|
+
return unwrap23(raw);
|
|
2645
2709
|
}
|
|
2646
2710
|
/** Resize an existing PTY session. */
|
|
2647
2711
|
async resize(sessionId, cols, rows) {
|
|
@@ -2649,10 +2713,10 @@ var ComputerTerminal = class {
|
|
|
2649
2713
|
`/computers/${this.computerId}/pty/${sessionId}/resize`,
|
|
2650
2714
|
{ cols, rows }
|
|
2651
2715
|
);
|
|
2652
|
-
return
|
|
2716
|
+
return unwrap23(raw);
|
|
2653
2717
|
}
|
|
2654
2718
|
};
|
|
2655
|
-
function
|
|
2719
|
+
function unwrap23(data) {
|
|
2656
2720
|
if (data && typeof data === "object") {
|
|
2657
2721
|
const d = data;
|
|
2658
2722
|
if ("data" in d && Object.keys(d).length <= 2) {
|
|
@@ -2663,7 +2727,7 @@ function unwrap22(data) {
|
|
|
2663
2727
|
}
|
|
2664
2728
|
|
|
2665
2729
|
// src/resources/computer-volumes.ts
|
|
2666
|
-
function
|
|
2730
|
+
function unwrap24(data) {
|
|
2667
2731
|
if (data && typeof data === "object") {
|
|
2668
2732
|
const d = data;
|
|
2669
2733
|
if ("data" in d && Object.keys(d).length <= 2) {
|
|
@@ -2697,7 +2761,7 @@ var ComputerVolumes = class {
|
|
|
2697
2761
|
}
|
|
2698
2762
|
/** Attach volumeId at mountPath inside the VM. */
|
|
2699
2763
|
async attach(volumeId, mountPath) {
|
|
2700
|
-
return
|
|
2764
|
+
return unwrap24(
|
|
2701
2765
|
await this.http.post(this.base(), {
|
|
2702
2766
|
volume_id: volumeId,
|
|
2703
2767
|
mount_path: mountPath
|
|
@@ -2711,7 +2775,7 @@ var ComputerVolumes = class {
|
|
|
2711
2775
|
};
|
|
2712
2776
|
|
|
2713
2777
|
// src/resources/connectors.ts
|
|
2714
|
-
function
|
|
2778
|
+
function unwrap25(payload) {
|
|
2715
2779
|
if (payload && typeof payload === "object") {
|
|
2716
2780
|
const p = payload;
|
|
2717
2781
|
for (const key of ["data", "binding"]) {
|
|
@@ -2922,7 +2986,7 @@ var Connectors = class {
|
|
|
2922
2986
|
const data = await this.http.get(
|
|
2923
2987
|
`/connect/connectors/${connectorPath(connector)}`
|
|
2924
2988
|
);
|
|
2925
|
-
return
|
|
2989
|
+
return unwrap25(data);
|
|
2926
2990
|
}
|
|
2927
2991
|
show(connector) {
|
|
2928
2992
|
return this.get(connector);
|
|
@@ -2933,7 +2997,7 @@ var Connectors = class {
|
|
|
2933
2997
|
"/connect/connectors",
|
|
2934
2998
|
bodyFromCreateParams(provider, params)
|
|
2935
2999
|
);
|
|
2936
|
-
return
|
|
3000
|
+
return unwrap25(data);
|
|
2937
3001
|
}
|
|
2938
3002
|
/** Request a runtime provider token for a connector. */
|
|
2939
3003
|
async getToken(connector, params = {}) {
|
|
@@ -2941,7 +3005,7 @@ var Connectors = class {
|
|
|
2941
3005
|
`/connect/token/${connectorPath(connector)}`,
|
|
2942
3006
|
tokenBody(params)
|
|
2943
3007
|
);
|
|
2944
|
-
return
|
|
3008
|
+
return unwrap25(data);
|
|
2945
3009
|
}
|
|
2946
3010
|
token(connector, params = {}) {
|
|
2947
3011
|
return this.getToken(connector, params);
|
|
@@ -2963,7 +3027,7 @@ var Connectors = class {
|
|
|
2963
3027
|
...externalAttributionParams(params)
|
|
2964
3028
|
})
|
|
2965
3029
|
);
|
|
2966
|
-
return
|
|
3030
|
+
return unwrap25(data);
|
|
2967
3031
|
}
|
|
2968
3032
|
/** List connector installations/grants. */
|
|
2969
3033
|
async installations(params = {}) {
|
|
@@ -3003,7 +3067,7 @@ var Connectors = class {
|
|
|
3003
3067
|
"/connect/defaults/materialize",
|
|
3004
3068
|
materializeDefaultsBody(params)
|
|
3005
3069
|
);
|
|
3006
|
-
return
|
|
3070
|
+
return unwrap25(data);
|
|
3007
3071
|
}
|
|
3008
3072
|
/** Create an inherited connector default for future runtime resources. */
|
|
3009
3073
|
async createDefault(params) {
|
|
@@ -3011,7 +3075,7 @@ var Connectors = class {
|
|
|
3011
3075
|
"/connect/defaults",
|
|
3012
3076
|
defaultBody(params)
|
|
3013
3077
|
);
|
|
3014
|
-
return
|
|
3078
|
+
return unwrap25(data);
|
|
3015
3079
|
}
|
|
3016
3080
|
/** Delete an inherited connector default. */
|
|
3017
3081
|
async deleteDefault(id) {
|
|
@@ -3031,7 +3095,7 @@ var Connectors = class {
|
|
|
3031
3095
|
"/connect/triggers",
|
|
3032
3096
|
triggerBody(params)
|
|
3033
3097
|
);
|
|
3034
|
-
return
|
|
3098
|
+
return unwrap25(data);
|
|
3035
3099
|
}
|
|
3036
3100
|
/** List inbound provider trigger delivery attempts. */
|
|
3037
3101
|
async triggerDeliveries(params = {}) {
|
|
@@ -3058,7 +3122,7 @@ var Connectors = class {
|
|
|
3058
3122
|
"/connect/project-links",
|
|
3059
3123
|
projectLinkBody(params)
|
|
3060
3124
|
);
|
|
3061
|
-
return
|
|
3125
|
+
return unwrap25(data);
|
|
3062
3126
|
}
|
|
3063
3127
|
/** Delete a project connector link. */
|
|
3064
3128
|
async deleteProjectLink(id) {
|
|
@@ -3094,7 +3158,7 @@ var RuntimeConnectors = class {
|
|
|
3094
3158
|
...externalAttributionParams(params)
|
|
3095
3159
|
})
|
|
3096
3160
|
);
|
|
3097
|
-
return
|
|
3161
|
+
return unwrap25(data);
|
|
3098
3162
|
}
|
|
3099
3163
|
/** Detach a connector binding by binding id or connector UID. */
|
|
3100
3164
|
async detach(bindingOrConnector) {
|
|
@@ -3103,7 +3167,7 @@ var RuntimeConnectors = class {
|
|
|
3103
3167
|
/** Sync or materialize connector placeholder env vars for this runtime resource. */
|
|
3104
3168
|
async sync() {
|
|
3105
3169
|
const data = await this.http.post(`${this.basePath}/sync`, {});
|
|
3106
|
-
return
|
|
3170
|
+
return unwrap25(data);
|
|
3107
3171
|
}
|
|
3108
3172
|
/** Verify a required connector is attached before agent work begins. */
|
|
3109
3173
|
async preflight(params = {}) {
|
|
@@ -3111,7 +3175,7 @@ var RuntimeConnectors = class {
|
|
|
3111
3175
|
`${this.basePath}/preflight`,
|
|
3112
3176
|
stripUndefined10(params)
|
|
3113
3177
|
);
|
|
3114
|
-
return
|
|
3178
|
+
return unwrap25(data);
|
|
3115
3179
|
}
|
|
3116
3180
|
};
|
|
3117
3181
|
var SandboxConnectors = class extends RuntimeConnectors {
|
|
@@ -3314,7 +3378,7 @@ var Desktop = class {
|
|
|
3314
3378
|
};
|
|
3315
3379
|
|
|
3316
3380
|
// src/resources/egressAudit.ts
|
|
3317
|
-
function
|
|
3381
|
+
function unwrap26(payload) {
|
|
3318
3382
|
if (payload && typeof payload === "object") {
|
|
3319
3383
|
const p = payload;
|
|
3320
3384
|
for (const k of ["data", "event", "items"]) {
|
|
@@ -3380,7 +3444,7 @@ var EgressAudit = class {
|
|
|
3380
3444
|
const data = await this.http.get(
|
|
3381
3445
|
`/egress/audit/${id}`
|
|
3382
3446
|
);
|
|
3383
|
-
return
|
|
3447
|
+
return unwrap26(data);
|
|
3384
3448
|
}
|
|
3385
3449
|
/**
|
|
3386
3450
|
* Long-poll the audit endpoint and yield new events as they appear.
|
|
@@ -3456,7 +3520,7 @@ var ComputerAudit = class extends SandboxAudit {
|
|
|
3456
3520
|
};
|
|
3457
3521
|
|
|
3458
3522
|
// src/resources/egressNetwork.ts
|
|
3459
|
-
function
|
|
3523
|
+
function unwrap27(payload) {
|
|
3460
3524
|
if (payload && typeof payload === "object") {
|
|
3461
3525
|
const p = payload;
|
|
3462
3526
|
for (const k of ["data", "policy", "rule", "items"]) {
|
|
@@ -3515,7 +3579,7 @@ var EgressNetwork = class {
|
|
|
3515
3579
|
"/egress/allowlist",
|
|
3516
3580
|
ruleBody(host, params, "allow")
|
|
3517
3581
|
);
|
|
3518
|
-
return
|
|
3582
|
+
return unwrap27(data);
|
|
3519
3583
|
}
|
|
3520
3584
|
/** Add a `deny` rule for `host` to the allowlist. */
|
|
3521
3585
|
async deny(host, params = {}) {
|
|
@@ -3523,7 +3587,7 @@ var EgressNetwork = class {
|
|
|
3523
3587
|
"/egress/allowlist",
|
|
3524
3588
|
ruleBody(host, params, "deny")
|
|
3525
3589
|
);
|
|
3526
|
-
return
|
|
3590
|
+
return unwrap27(data);
|
|
3527
3591
|
}
|
|
3528
3592
|
/** List allowlist rules. */
|
|
3529
3593
|
async rules(params = {}) {
|
|
@@ -3567,7 +3631,7 @@ var EgressNetwork = class {
|
|
|
3567
3631
|
"/egress/policies",
|
|
3568
3632
|
body5
|
|
3569
3633
|
);
|
|
3570
|
-
return
|
|
3634
|
+
return unwrap27(data);
|
|
3571
3635
|
}
|
|
3572
3636
|
/** Update an egress policy by id. */
|
|
3573
3637
|
async updatePolicy(policyId, params) {
|
|
@@ -3581,7 +3645,7 @@ var EgressNetwork = class {
|
|
|
3581
3645
|
`/egress/policies/${policyId}`,
|
|
3582
3646
|
body5
|
|
3583
3647
|
);
|
|
3584
|
-
return
|
|
3648
|
+
return unwrap27(data);
|
|
3585
3649
|
}
|
|
3586
3650
|
// ── mode helpers ──────────────────────────────────────────────────────────
|
|
3587
3651
|
/** Set the policy to `mode="enforce"` — denied egress is blocked. */
|
|
@@ -3608,7 +3672,7 @@ var EgressNetwork = class {
|
|
|
3608
3672
|
"/egress/policies",
|
|
3609
3673
|
body5
|
|
3610
3674
|
);
|
|
3611
|
-
return
|
|
3675
|
+
return unwrap27(data);
|
|
3612
3676
|
}
|
|
3613
3677
|
// ── suggestions ───────────────────────────────────────────────────────────
|
|
3614
3678
|
/** AI-generated allowlist suggestions from recent denied egress. */
|
|
@@ -3699,7 +3763,7 @@ var ComputerNetwork = class extends SandboxNetwork {
|
|
|
3699
3763
|
};
|
|
3700
3764
|
|
|
3701
3765
|
// src/resources/egressSecrets.ts
|
|
3702
|
-
function
|
|
3766
|
+
function unwrap28(payload) {
|
|
3703
3767
|
if (payload && typeof payload === "object") {
|
|
3704
3768
|
const p = payload;
|
|
3705
3769
|
for (const k of ["data", "secret", "binding", "items"]) {
|
|
@@ -3835,7 +3899,7 @@ var OAuthFlow = class {
|
|
|
3835
3899
|
const data = await this.http.get("/egress/oauth/status", {
|
|
3836
3900
|
state: this.state
|
|
3837
3901
|
});
|
|
3838
|
-
const payload =
|
|
3902
|
+
const payload = unwrap28(data) ?? {};
|
|
3839
3903
|
const status = payload.status;
|
|
3840
3904
|
if (status === "completed" || status === "ready" || status === "succeeded") {
|
|
3841
3905
|
return payload;
|
|
@@ -3867,7 +3931,7 @@ var EgressSecrets = class {
|
|
|
3867
3931
|
"/egress/secrets",
|
|
3868
3932
|
setBody(params)
|
|
3869
3933
|
);
|
|
3870
|
-
return
|
|
3934
|
+
return unwrap28(data);
|
|
3871
3935
|
}
|
|
3872
3936
|
/** List secrets. */
|
|
3873
3937
|
async list(params = {}) {
|
|
@@ -3882,7 +3946,7 @@ var EgressSecrets = class {
|
|
|
3882
3946
|
const data = await this.http.get(
|
|
3883
3947
|
`/egress/secrets/${id}`
|
|
3884
3948
|
);
|
|
3885
|
-
return
|
|
3949
|
+
return unwrap28(data);
|
|
3886
3950
|
}
|
|
3887
3951
|
/** Rotate the secret's value. */
|
|
3888
3952
|
async rotate(id, params) {
|
|
@@ -3891,7 +3955,7 @@ var EgressSecrets = class {
|
|
|
3891
3955
|
`/egress/secrets/${id}`,
|
|
3892
3956
|
body5
|
|
3893
3957
|
);
|
|
3894
|
-
return
|
|
3958
|
+
return unwrap28(data);
|
|
3895
3959
|
}
|
|
3896
3960
|
/** Delete a secret. */
|
|
3897
3961
|
async delete(id) {
|
|
@@ -3904,7 +3968,7 @@ var EgressSecrets = class {
|
|
|
3904
3968
|
"/egress/bindings",
|
|
3905
3969
|
bindingBody(params)
|
|
3906
3970
|
);
|
|
3907
|
-
return
|
|
3971
|
+
return unwrap28(data);
|
|
3908
3972
|
}
|
|
3909
3973
|
/** List secret bindings. */
|
|
3910
3974
|
async listBindings(params = {}) {
|
|
@@ -3937,7 +4001,7 @@ var EgressSecrets = class {
|
|
|
3937
4001
|
"/egress/oauth/start",
|
|
3938
4002
|
oauthBody(params)
|
|
3939
4003
|
);
|
|
3940
|
-
const payload =
|
|
4004
|
+
const payload = unwrap28(data) ?? {};
|
|
3941
4005
|
return new OAuthFlow(this.http, payload, params.provider);
|
|
3942
4006
|
}
|
|
3943
4007
|
};
|
|
@@ -5101,7 +5165,7 @@ var Credits = class {
|
|
|
5101
5165
|
return this.http.get("/credits/usage");
|
|
5102
5166
|
}
|
|
5103
5167
|
};
|
|
5104
|
-
function
|
|
5168
|
+
function unwrap29(payload) {
|
|
5105
5169
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
5106
5170
|
return payload.data;
|
|
5107
5171
|
}
|
|
@@ -5137,7 +5201,7 @@ var CronJobs = class {
|
|
|
5137
5201
|
}
|
|
5138
5202
|
async get(jobId) {
|
|
5139
5203
|
const data = await this.http.get(`/cron-jobs/${jobId}`);
|
|
5140
|
-
return
|
|
5204
|
+
return unwrap29(data);
|
|
5141
5205
|
}
|
|
5142
5206
|
async create(params) {
|
|
5143
5207
|
const { idempotencyKey: ikey, ...rest } = params;
|
|
@@ -5147,12 +5211,12 @@ var CronJobs = class {
|
|
|
5147
5211
|
body: body5,
|
|
5148
5212
|
headers: { "Idempotency-Key": idempotencyKey2(ikey) }
|
|
5149
5213
|
});
|
|
5150
|
-
return
|
|
5214
|
+
return unwrap29(data);
|
|
5151
5215
|
}
|
|
5152
5216
|
async update(jobId, params) {
|
|
5153
5217
|
const body5 = stripUndefined14(params);
|
|
5154
5218
|
const data = await this.http.patch(`/cron-jobs/${jobId}`, body5);
|
|
5155
|
-
return
|
|
5219
|
+
return unwrap29(data);
|
|
5156
5220
|
}
|
|
5157
5221
|
async delete(jobId) {
|
|
5158
5222
|
await this.http.delete(`/cron-jobs/${jobId}`);
|
|
@@ -5160,11 +5224,11 @@ var CronJobs = class {
|
|
|
5160
5224
|
// ── Control ────────────────────────────────────────────────────────────────
|
|
5161
5225
|
async pause(jobId) {
|
|
5162
5226
|
const data = await this.http.post(`/cron-jobs/${jobId}/pause`);
|
|
5163
|
-
return
|
|
5227
|
+
return unwrap29(data);
|
|
5164
5228
|
}
|
|
5165
5229
|
async resume(jobId) {
|
|
5166
5230
|
const data = await this.http.post(`/cron-jobs/${jobId}/resume`);
|
|
5167
|
-
return
|
|
5231
|
+
return unwrap29(data);
|
|
5168
5232
|
}
|
|
5169
5233
|
async runNow(jobId, opts = {}) {
|
|
5170
5234
|
const data = await this.http.request(
|
|
@@ -5174,7 +5238,7 @@ var CronJobs = class {
|
|
|
5174
5238
|
headers: { "Idempotency-Key": idempotencyKey2(opts.idempotencyKey) }
|
|
5175
5239
|
}
|
|
5176
5240
|
);
|
|
5177
|
-
return
|
|
5241
|
+
return unwrap29(data);
|
|
5178
5242
|
}
|
|
5179
5243
|
// ── Execution history ──────────────────────────────────────────────────────
|
|
5180
5244
|
async listExecutions(jobId) {
|
|
@@ -5189,12 +5253,12 @@ var CronJobs = class {
|
|
|
5189
5253
|
const data = await this.http.get(
|
|
5190
5254
|
`/cron-jobs/${jobId}/executions/${executionId}`
|
|
5191
5255
|
);
|
|
5192
|
-
return
|
|
5256
|
+
return unwrap29(data);
|
|
5193
5257
|
}
|
|
5194
5258
|
};
|
|
5195
5259
|
|
|
5196
5260
|
// src/resources/dashboard.ts
|
|
5197
|
-
function
|
|
5261
|
+
function unwrap30(payload) {
|
|
5198
5262
|
if (payload && typeof payload === "object") {
|
|
5199
5263
|
const p = payload;
|
|
5200
5264
|
for (const k of ["data", "dashboard", "overview", "items"]) {
|
|
@@ -5211,15 +5275,15 @@ var Dashboard = class {
|
|
|
5211
5275
|
/** Aggregated user dashboard payload. */
|
|
5212
5276
|
async summary() {
|
|
5213
5277
|
const data = await this.http.get("/dashboard");
|
|
5214
|
-
return
|
|
5278
|
+
return unwrap30(data);
|
|
5215
5279
|
}
|
|
5216
5280
|
/** Status / health overview (public endpoint). */
|
|
5217
5281
|
async overview() {
|
|
5218
5282
|
const data = await this.http.get("/overview");
|
|
5219
|
-
return
|
|
5283
|
+
return unwrap30(data);
|
|
5220
5284
|
}
|
|
5221
5285
|
};
|
|
5222
|
-
function
|
|
5286
|
+
function unwrap31(payload) {
|
|
5223
5287
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
5224
5288
|
return payload.data;
|
|
5225
5289
|
}
|
|
@@ -5255,7 +5319,7 @@ var Databases = class {
|
|
|
5255
5319
|
}
|
|
5256
5320
|
async get(databaseId) {
|
|
5257
5321
|
const data = await this.http.get(`/databases/${databaseId}`);
|
|
5258
|
-
return
|
|
5322
|
+
return unwrap31(data);
|
|
5259
5323
|
}
|
|
5260
5324
|
async create(params) {
|
|
5261
5325
|
const {
|
|
@@ -5279,7 +5343,7 @@ var Databases = class {
|
|
|
5279
5343
|
)
|
|
5280
5344
|
}
|
|
5281
5345
|
});
|
|
5282
|
-
return
|
|
5346
|
+
return unwrap31(data);
|
|
5283
5347
|
}
|
|
5284
5348
|
async delete(databaseId) {
|
|
5285
5349
|
await this.http.delete(`/databases/${databaseId}`);
|
|
@@ -5289,24 +5353,24 @@ var Databases = class {
|
|
|
5289
5353
|
const data = await this.http.post(
|
|
5290
5354
|
`/databases/${databaseId}/start`
|
|
5291
5355
|
);
|
|
5292
|
-
return
|
|
5356
|
+
return unwrap31(data);
|
|
5293
5357
|
}
|
|
5294
5358
|
async stop(databaseId) {
|
|
5295
5359
|
const data = await this.http.post(`/databases/${databaseId}/stop`);
|
|
5296
|
-
return
|
|
5360
|
+
return unwrap31(data);
|
|
5297
5361
|
}
|
|
5298
5362
|
async restart(databaseId) {
|
|
5299
5363
|
const data = await this.http.post(
|
|
5300
5364
|
`/databases/${databaseId}/restart`
|
|
5301
5365
|
);
|
|
5302
|
-
return
|
|
5366
|
+
return unwrap31(data);
|
|
5303
5367
|
}
|
|
5304
5368
|
// ── Credentials + logs ────────────────────────────────────────────────────
|
|
5305
5369
|
async credentials(databaseId) {
|
|
5306
5370
|
const data = await this.http.get(
|
|
5307
5371
|
`/databases/${databaseId}/credentials`
|
|
5308
5372
|
);
|
|
5309
|
-
return
|
|
5373
|
+
return unwrap31(data);
|
|
5310
5374
|
}
|
|
5311
5375
|
async logs(databaseId, params = {}) {
|
|
5312
5376
|
const query3 = stripUndefined15({
|
|
@@ -5336,7 +5400,7 @@ function attributionBody(p) {
|
|
|
5336
5400
|
function idempotencyKey4(key) {
|
|
5337
5401
|
return key ?? randomUUID();
|
|
5338
5402
|
}
|
|
5339
|
-
function
|
|
5403
|
+
function unwrap32(payload) {
|
|
5340
5404
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
5341
5405
|
return payload.data;
|
|
5342
5406
|
}
|
|
@@ -5445,7 +5509,7 @@ var DeploymentVersions = class {
|
|
|
5445
5509
|
const data = await this.http.get(
|
|
5446
5510
|
`/deployments/${this.deploymentId}/versions/${versionId}`
|
|
5447
5511
|
);
|
|
5448
|
-
return
|
|
5512
|
+
return unwrap32(data);
|
|
5449
5513
|
}
|
|
5450
5514
|
async promote(versionId, opts = {}) {
|
|
5451
5515
|
const body5 = stripUndefined16({ environment: opts.environment });
|
|
@@ -5457,14 +5521,14 @@ var DeploymentVersions = class {
|
|
|
5457
5521
|
headers: { "Idempotency-Key": idempotencyKey4(opts.idempotencyKey) }
|
|
5458
5522
|
}
|
|
5459
5523
|
);
|
|
5460
|
-
return
|
|
5524
|
+
return unwrap32(data);
|
|
5461
5525
|
}
|
|
5462
5526
|
async prepareMigrationBackup(versionId) {
|
|
5463
5527
|
const data = await this.http.request(
|
|
5464
5528
|
`/deployments/${this.deploymentId}/versions/${versionId}/migration-backup`,
|
|
5465
5529
|
{ method: "POST", body: {} }
|
|
5466
5530
|
);
|
|
5467
|
-
return
|
|
5531
|
+
return unwrap32(data);
|
|
5468
5532
|
}
|
|
5469
5533
|
};
|
|
5470
5534
|
var DeploymentReleases = class {
|
|
@@ -5484,7 +5548,7 @@ var DeploymentReleases = class {
|
|
|
5484
5548
|
const data = await this.http.get(
|
|
5485
5549
|
`/deployments/${this.deploymentId}/releases/${releaseId}`
|
|
5486
5550
|
);
|
|
5487
|
-
return
|
|
5551
|
+
return unwrap32(data);
|
|
5488
5552
|
}
|
|
5489
5553
|
async promote(releaseId, idempotencyKey11) {
|
|
5490
5554
|
const key = idempotencyKey11 ?? `promote:${this.deploymentId}:${releaseId}`;
|
|
@@ -5496,7 +5560,7 @@ var DeploymentReleases = class {
|
|
|
5496
5560
|
headers: { "Idempotency-Key": key }
|
|
5497
5561
|
}
|
|
5498
5562
|
);
|
|
5499
|
-
return
|
|
5563
|
+
return unwrap32(data);
|
|
5500
5564
|
}
|
|
5501
5565
|
};
|
|
5502
5566
|
var DeploymentRuntimeInstances = class {
|
|
@@ -5516,14 +5580,14 @@ var DeploymentRuntimeInstances = class {
|
|
|
5516
5580
|
const data = await this.http.get(
|
|
5517
5581
|
`/deployments/${this.deploymentId}/runtime-instances/${instanceId}`
|
|
5518
5582
|
);
|
|
5519
|
-
return
|
|
5583
|
+
return unwrap32(data);
|
|
5520
5584
|
}
|
|
5521
5585
|
async logs(instanceId, lines = 100) {
|
|
5522
5586
|
const data = await this.http.get(
|
|
5523
5587
|
`/deployments/${this.deploymentId}/runtime-instances/${instanceId}/logs`,
|
|
5524
5588
|
{ lines }
|
|
5525
5589
|
);
|
|
5526
|
-
const unwrapped =
|
|
5590
|
+
const unwrapped = unwrap32(data);
|
|
5527
5591
|
const result = { logs: String(unwrapped.logs ?? "") };
|
|
5528
5592
|
if (typeof unwrapped.runtime_instance_id === "string") {
|
|
5529
5593
|
result.runtime_instance_id = unwrapped.runtime_instance_id;
|
|
@@ -5558,7 +5622,7 @@ var DeploymentDomains = class {
|
|
|
5558
5622
|
headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
|
|
5559
5623
|
}
|
|
5560
5624
|
);
|
|
5561
|
-
return
|
|
5625
|
+
return unwrap32(data);
|
|
5562
5626
|
}
|
|
5563
5627
|
async list(filters = {}) {
|
|
5564
5628
|
const data = await this.http.get(
|
|
@@ -5571,7 +5635,7 @@ var DeploymentDomains = class {
|
|
|
5571
5635
|
const data = await this.http.post(
|
|
5572
5636
|
`/deployments/${this.deploymentId}/domains/${domainId}/verify`
|
|
5573
5637
|
);
|
|
5574
|
-
return
|
|
5638
|
+
return unwrap32(data);
|
|
5575
5639
|
}
|
|
5576
5640
|
async delete(domainId) {
|
|
5577
5641
|
await this.http.delete(
|
|
@@ -5601,7 +5665,7 @@ var Deployments = class {
|
|
|
5601
5665
|
}
|
|
5602
5666
|
async get(deploymentId) {
|
|
5603
5667
|
const data = await this.http.get(`/deployments/${deploymentId}`);
|
|
5604
|
-
return
|
|
5668
|
+
return unwrap32(data);
|
|
5605
5669
|
}
|
|
5606
5670
|
async create(params) {
|
|
5607
5671
|
const body5 = stripUndefined16({
|
|
@@ -5620,7 +5684,7 @@ var Deployments = class {
|
|
|
5620
5684
|
body: body5,
|
|
5621
5685
|
headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
|
|
5622
5686
|
});
|
|
5623
|
-
return
|
|
5687
|
+
return unwrap32(data);
|
|
5624
5688
|
}
|
|
5625
5689
|
/**
|
|
5626
5690
|
* Create a deployment that runs on the workspace's dedicated App Engine
|
|
@@ -5664,7 +5728,7 @@ var Deployments = class {
|
|
|
5664
5728
|
const rawHost = await this.http.get(
|
|
5665
5729
|
`/docker-deploy/hosts/${hostId}`
|
|
5666
5730
|
);
|
|
5667
|
-
host =
|
|
5731
|
+
host = unwrap32(
|
|
5668
5732
|
rawHost
|
|
5669
5733
|
);
|
|
5670
5734
|
addDoctorCheck(
|
|
@@ -5815,7 +5879,7 @@ var Deployments = class {
|
|
|
5815
5879
|
const rawHost = await this.http.get(
|
|
5816
5880
|
`/docker-deploy/hosts/${hostId}`
|
|
5817
5881
|
);
|
|
5818
|
-
const host =
|
|
5882
|
+
const host = unwrap32(
|
|
5819
5883
|
rawHost
|
|
5820
5884
|
);
|
|
5821
5885
|
addProofCheck(
|
|
@@ -5922,7 +5986,7 @@ var Deployments = class {
|
|
|
5922
5986
|
`/deployments/${deploymentId}`,
|
|
5923
5987
|
body5
|
|
5924
5988
|
);
|
|
5925
|
-
return
|
|
5989
|
+
return unwrap32(data);
|
|
5926
5990
|
}
|
|
5927
5991
|
async delete(deploymentId) {
|
|
5928
5992
|
await this.http.delete(`/deployments/${deploymentId}`);
|
|
@@ -5942,7 +6006,7 @@ var Deployments = class {
|
|
|
5942
6006
|
headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
|
|
5943
6007
|
}
|
|
5944
6008
|
);
|
|
5945
|
-
return
|
|
6009
|
+
return unwrap32(data);
|
|
5946
6010
|
}
|
|
5947
6011
|
/**
|
|
5948
6012
|
* Backward-compatible bridge: POST /sandboxes/:id/deploy. Works today;
|
|
@@ -5967,7 +6031,7 @@ var Deployments = class {
|
|
|
5967
6031
|
headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
|
|
5968
6032
|
}
|
|
5969
6033
|
);
|
|
5970
|
-
return
|
|
6034
|
+
return unwrap32(data);
|
|
5971
6035
|
}
|
|
5972
6036
|
async rollback(deploymentId, params = {}) {
|
|
5973
6037
|
const body5 = stripUndefined16({
|
|
@@ -5981,7 +6045,7 @@ var Deployments = class {
|
|
|
5981
6045
|
headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
|
|
5982
6046
|
}
|
|
5983
6047
|
);
|
|
5984
|
-
return
|
|
6048
|
+
return unwrap32(data);
|
|
5985
6049
|
}
|
|
5986
6050
|
async listBuilds(deploymentId) {
|
|
5987
6051
|
const data = await this.http.get(
|
|
@@ -5993,7 +6057,7 @@ var Deployments = class {
|
|
|
5993
6057
|
const data = await this.http.get(
|
|
5994
6058
|
`/deployments/${deploymentId}/builds/${buildId}`
|
|
5995
6059
|
);
|
|
5996
|
-
return
|
|
6060
|
+
return unwrap32(data);
|
|
5997
6061
|
}
|
|
5998
6062
|
async listEnv(deploymentId) {
|
|
5999
6063
|
const data = await this.http.get(
|
|
@@ -6039,7 +6103,7 @@ var RUNTIME_BINARIES = {
|
|
|
6039
6103
|
pi: ["pi"],
|
|
6040
6104
|
custom: []
|
|
6041
6105
|
};
|
|
6042
|
-
function
|
|
6106
|
+
function unwrap33(payload, keys = ["data"]) {
|
|
6043
6107
|
if (payload && typeof payload === "object") {
|
|
6044
6108
|
const p = payload;
|
|
6045
6109
|
for (const key of keys) {
|
|
@@ -6098,7 +6162,7 @@ var Devices = class {
|
|
|
6098
6162
|
/** Show one unified device by id. */
|
|
6099
6163
|
async get(id) {
|
|
6100
6164
|
const data = await this.http.get(`/devices/${devicePath(id)}`);
|
|
6101
|
-
return
|
|
6165
|
+
return unwrap33(data);
|
|
6102
6166
|
}
|
|
6103
6167
|
show(id) {
|
|
6104
6168
|
return this.get(id);
|
|
@@ -6108,7 +6172,7 @@ var Devices = class {
|
|
|
6108
6172
|
const data = await this.http.get(
|
|
6109
6173
|
`/devices/${devicePath(id)}/capabilities`
|
|
6110
6174
|
);
|
|
6111
|
-
return
|
|
6175
|
+
return unwrap33(data);
|
|
6112
6176
|
}
|
|
6113
6177
|
/** Execute a command inside the device. */
|
|
6114
6178
|
async exec(id, params) {
|
|
@@ -6121,7 +6185,7 @@ var Devices = class {
|
|
|
6121
6185
|
env: params.env
|
|
6122
6186
|
})
|
|
6123
6187
|
);
|
|
6124
|
-
return
|
|
6188
|
+
return unwrap33(data);
|
|
6125
6189
|
}
|
|
6126
6190
|
/** List files inside the device filesystem. */
|
|
6127
6191
|
async listFiles(id, params = {}) {
|
|
@@ -6137,7 +6201,7 @@ var Devices = class {
|
|
|
6137
6201
|
`/devices/${devicePath(id)}/files/read`,
|
|
6138
6202
|
queryFromFileParams(params)
|
|
6139
6203
|
);
|
|
6140
|
-
return
|
|
6204
|
+
return unwrap33(data);
|
|
6141
6205
|
}
|
|
6142
6206
|
/** Write a text or base64 payload into the device filesystem. */
|
|
6143
6207
|
async writeFile(id, params) {
|
|
@@ -6149,7 +6213,7 @@ var Devices = class {
|
|
|
6149
6213
|
content_base64: pickFirst5(params.contentBase64, params.content_base64)
|
|
6150
6214
|
})
|
|
6151
6215
|
);
|
|
6152
|
-
return
|
|
6216
|
+
return unwrap33(data);
|
|
6153
6217
|
}
|
|
6154
6218
|
/** Expose a device port through MIOSA routing. */
|
|
6155
6219
|
async expose(id, params) {
|
|
@@ -6157,44 +6221,44 @@ var Devices = class {
|
|
|
6157
6221
|
`/devices/${devicePath(id)}/expose`,
|
|
6158
6222
|
{ port: params.port }
|
|
6159
6223
|
);
|
|
6160
|
-
return
|
|
6224
|
+
return unwrap33(data);
|
|
6161
6225
|
}
|
|
6162
6226
|
/** Return browser/desktop connection details for a computer-backed device. */
|
|
6163
6227
|
async browser(id) {
|
|
6164
6228
|
const data = await this.http.get(`/devices/${devicePath(id)}/browser`);
|
|
6165
|
-
return
|
|
6229
|
+
return unwrap33(data);
|
|
6166
6230
|
}
|
|
6167
6231
|
async pause(id) {
|
|
6168
6232
|
const data = await this.http.post(
|
|
6169
6233
|
`/devices/${devicePath(id)}/pause`,
|
|
6170
6234
|
{}
|
|
6171
6235
|
);
|
|
6172
|
-
return
|
|
6236
|
+
return unwrap33(data);
|
|
6173
6237
|
}
|
|
6174
6238
|
async stop(id) {
|
|
6175
6239
|
const data = await this.http.post(
|
|
6176
6240
|
`/devices/${devicePath(id)}/stop`,
|
|
6177
6241
|
{}
|
|
6178
6242
|
);
|
|
6179
|
-
return
|
|
6243
|
+
return unwrap33(data);
|
|
6180
6244
|
}
|
|
6181
6245
|
async resume(id) {
|
|
6182
6246
|
const data = await this.http.post(
|
|
6183
6247
|
`/devices/${devicePath(id)}/resume`,
|
|
6184
6248
|
{}
|
|
6185
6249
|
);
|
|
6186
|
-
return
|
|
6250
|
+
return unwrap33(data);
|
|
6187
6251
|
}
|
|
6188
6252
|
async extend(id, params) {
|
|
6189
6253
|
const data = await this.http.post(
|
|
6190
6254
|
`/devices/${devicePath(id)}/extend`,
|
|
6191
6255
|
{ timeout_sec: pickFirst5(params.timeoutSec, params.timeout_sec) }
|
|
6192
6256
|
);
|
|
6193
|
-
return
|
|
6257
|
+
return unwrap33(data);
|
|
6194
6258
|
}
|
|
6195
6259
|
async destroy(id) {
|
|
6196
6260
|
const data = await this.http.delete(`/devices/${devicePath(id)}`);
|
|
6197
|
-
return
|
|
6261
|
+
return unwrap33(data);
|
|
6198
6262
|
}
|
|
6199
6263
|
/**
|
|
6200
6264
|
* Write a MIOSA runtime bootstrap manifest and optionally install/probe
|
|
@@ -6364,7 +6428,7 @@ var DockerDeploy = class {
|
|
|
6364
6428
|
};
|
|
6365
6429
|
|
|
6366
6430
|
// src/resources/email.ts
|
|
6367
|
-
function
|
|
6431
|
+
function unwrap34(data) {
|
|
6368
6432
|
if (data && typeof data === "object") {
|
|
6369
6433
|
const d = data;
|
|
6370
6434
|
for (const k of [
|
|
@@ -6416,12 +6480,12 @@ var EmailCampaigns = class {
|
|
|
6416
6480
|
);
|
|
6417
6481
|
}
|
|
6418
6482
|
async create(attrs) {
|
|
6419
|
-
return
|
|
6483
|
+
return unwrap34(
|
|
6420
6484
|
await this.http.post("/admin/email-campaigns", strip(attrs))
|
|
6421
6485
|
);
|
|
6422
6486
|
}
|
|
6423
6487
|
async recipientCount(filters = {}) {
|
|
6424
|
-
return
|
|
6488
|
+
return unwrap34(
|
|
6425
6489
|
await this.http.get(
|
|
6426
6490
|
"/admin/email-campaigns/recipient-count",
|
|
6427
6491
|
filters
|
|
@@ -6429,7 +6493,7 @@ var EmailCampaigns = class {
|
|
|
6429
6493
|
);
|
|
6430
6494
|
}
|
|
6431
6495
|
async send(campaignId, opts = {}) {
|
|
6432
|
-
return
|
|
6496
|
+
return unwrap34(
|
|
6433
6497
|
await this.http.post(
|
|
6434
6498
|
`/admin/email-campaigns/${campaignId}/send`,
|
|
6435
6499
|
strip(opts)
|
|
@@ -6437,7 +6501,7 @@ var EmailCampaigns = class {
|
|
|
6437
6501
|
);
|
|
6438
6502
|
}
|
|
6439
6503
|
async cancel(campaignId) {
|
|
6440
|
-
return
|
|
6504
|
+
return unwrap34(
|
|
6441
6505
|
await this.http.post(
|
|
6442
6506
|
`/admin/email-campaigns/${campaignId}/cancel`
|
|
6443
6507
|
)
|
|
@@ -6463,7 +6527,7 @@ var EmailTemplates = class {
|
|
|
6463
6527
|
);
|
|
6464
6528
|
}
|
|
6465
6529
|
async create(key, attrs = {}) {
|
|
6466
|
-
return
|
|
6530
|
+
return unwrap34(
|
|
6467
6531
|
await this.http.post("/admin/email-templates", {
|
|
6468
6532
|
key,
|
|
6469
6533
|
...strip(attrs)
|
|
@@ -6471,7 +6535,7 @@ var EmailTemplates = class {
|
|
|
6471
6535
|
);
|
|
6472
6536
|
}
|
|
6473
6537
|
async update(key, attrs) {
|
|
6474
|
-
return
|
|
6538
|
+
return unwrap34(
|
|
6475
6539
|
await this.http.put(
|
|
6476
6540
|
`/admin/email-templates/${key}`,
|
|
6477
6541
|
strip(attrs)
|
|
@@ -6479,7 +6543,7 @@ var EmailTemplates = class {
|
|
|
6479
6543
|
);
|
|
6480
6544
|
}
|
|
6481
6545
|
async reset(key) {
|
|
6482
|
-
return
|
|
6546
|
+
return unwrap34(
|
|
6483
6547
|
await this.http.post(`/admin/email-templates/${key}/reset`)
|
|
6484
6548
|
);
|
|
6485
6549
|
}
|
|
@@ -6495,17 +6559,17 @@ var EmailInbox = class {
|
|
|
6495
6559
|
);
|
|
6496
6560
|
}
|
|
6497
6561
|
async send(attrs) {
|
|
6498
|
-
return
|
|
6562
|
+
return unwrap34(
|
|
6499
6563
|
await this.http.post("/admin/email-inbox/send", strip(attrs))
|
|
6500
6564
|
);
|
|
6501
6565
|
}
|
|
6502
6566
|
async markRead(messageId) {
|
|
6503
|
-
return
|
|
6567
|
+
return unwrap34(
|
|
6504
6568
|
await this.http.post(`/admin/email-inbox/${messageId}/read`)
|
|
6505
6569
|
);
|
|
6506
6570
|
}
|
|
6507
6571
|
async archive(messageId) {
|
|
6508
|
-
return
|
|
6572
|
+
return unwrap34(
|
|
6509
6573
|
await this.http.post(`/admin/email-inbox/${messageId}/archive`)
|
|
6510
6574
|
);
|
|
6511
6575
|
}
|
|
@@ -6545,7 +6609,7 @@ var Embeddings = class {
|
|
|
6545
6609
|
};
|
|
6546
6610
|
|
|
6547
6611
|
// src/resources/external-keys.ts
|
|
6548
|
-
function
|
|
6612
|
+
function unwrap35(payload) {
|
|
6549
6613
|
if (payload && typeof payload === "object") {
|
|
6550
6614
|
const p = payload;
|
|
6551
6615
|
for (const k of ["data", "external_keys", "items"]) {
|
|
@@ -6567,7 +6631,7 @@ var ExternalKeys = class {
|
|
|
6567
6631
|
/** List configured external keys. */
|
|
6568
6632
|
async list() {
|
|
6569
6633
|
const data = await this.http.get("/external-keys");
|
|
6570
|
-
const result =
|
|
6634
|
+
const result = unwrap35(data);
|
|
6571
6635
|
if (Array.isArray(result)) return result;
|
|
6572
6636
|
return [];
|
|
6573
6637
|
}
|
|
@@ -6575,14 +6639,14 @@ var ExternalKeys = class {
|
|
|
6575
6639
|
async create(params) {
|
|
6576
6640
|
const body5 = stripUndefined18(params);
|
|
6577
6641
|
const data = await this.http.post("/external-keys", body5);
|
|
6578
|
-
return
|
|
6642
|
+
return unwrap35(data);
|
|
6579
6643
|
}
|
|
6580
6644
|
/** Resolve (preview) the stored key for a provider. */
|
|
6581
6645
|
async resolve(provider) {
|
|
6582
6646
|
const data = await this.http.get(
|
|
6583
6647
|
`/external-keys/${provider}/resolve`
|
|
6584
6648
|
);
|
|
6585
|
-
return
|
|
6649
|
+
return unwrap35(data);
|
|
6586
6650
|
}
|
|
6587
6651
|
/**
|
|
6588
6652
|
* Delete the stored key for a provider.
|
|
@@ -6592,7 +6656,7 @@ var ExternalKeys = class {
|
|
|
6592
6656
|
await this.http.delete(`/external-keys/${provider}`);
|
|
6593
6657
|
}
|
|
6594
6658
|
};
|
|
6595
|
-
function
|
|
6659
|
+
function unwrap36(payload) {
|
|
6596
6660
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
6597
6661
|
return payload.data;
|
|
6598
6662
|
}
|
|
@@ -6645,13 +6709,13 @@ var FlatCustomDomains = class {
|
|
|
6645
6709
|
body: body5,
|
|
6646
6710
|
headers: { "Idempotency-Key": idempotencyKey5(ikey) }
|
|
6647
6711
|
});
|
|
6648
|
-
return
|
|
6712
|
+
return unwrap36(data);
|
|
6649
6713
|
}
|
|
6650
6714
|
async delete(domainId) {
|
|
6651
6715
|
await this.http.delete(`/custom-domains/${domainId}`);
|
|
6652
6716
|
}
|
|
6653
6717
|
};
|
|
6654
|
-
function
|
|
6718
|
+
function unwrap37(payload) {
|
|
6655
6719
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
6656
6720
|
return payload.data;
|
|
6657
6721
|
}
|
|
@@ -6687,7 +6751,7 @@ var Functions = class {
|
|
|
6687
6751
|
}
|
|
6688
6752
|
async get(functionId) {
|
|
6689
6753
|
const data = await this.http.get(`/functions/${functionId}`);
|
|
6690
|
-
return
|
|
6754
|
+
return unwrap37(data);
|
|
6691
6755
|
}
|
|
6692
6756
|
async create(params) {
|
|
6693
6757
|
const { idempotencyKey: ikey, memoryMb, timeoutSec, ...rest } = params;
|
|
@@ -6701,7 +6765,7 @@ var Functions = class {
|
|
|
6701
6765
|
body: body5,
|
|
6702
6766
|
headers: { "Idempotency-Key": idempotencyKey6(ikey) }
|
|
6703
6767
|
});
|
|
6704
|
-
return
|
|
6768
|
+
return unwrap37(data);
|
|
6705
6769
|
}
|
|
6706
6770
|
async update(functionId, params) {
|
|
6707
6771
|
const { memoryMb, timeoutSec, ...rest } = params;
|
|
@@ -6714,7 +6778,7 @@ var Functions = class {
|
|
|
6714
6778
|
`/functions/${functionId}`,
|
|
6715
6779
|
body5
|
|
6716
6780
|
);
|
|
6717
|
-
return
|
|
6781
|
+
return unwrap37(data);
|
|
6718
6782
|
}
|
|
6719
6783
|
async delete(functionId) {
|
|
6720
6784
|
await this.http.delete(`/functions/${functionId}`);
|
|
@@ -6735,7 +6799,7 @@ var Functions = class {
|
|
|
6735
6799
|
return data ?? {};
|
|
6736
6800
|
}
|
|
6737
6801
|
};
|
|
6738
|
-
function
|
|
6802
|
+
function unwrap38(payload) {
|
|
6739
6803
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
6740
6804
|
return payload.data;
|
|
6741
6805
|
}
|
|
@@ -6771,7 +6835,7 @@ var HealthChecks = class {
|
|
|
6771
6835
|
}
|
|
6772
6836
|
async get(checkId) {
|
|
6773
6837
|
const data = await this.http.get(`/health-checks/${checkId}`);
|
|
6774
|
-
return
|
|
6838
|
+
return unwrap38(data);
|
|
6775
6839
|
}
|
|
6776
6840
|
async create(params) {
|
|
6777
6841
|
const {
|
|
@@ -6792,7 +6856,7 @@ var HealthChecks = class {
|
|
|
6792
6856
|
body: body5,
|
|
6793
6857
|
headers: { "Idempotency-Key": idempotencyKey7(ikey) }
|
|
6794
6858
|
});
|
|
6795
|
-
return
|
|
6859
|
+
return unwrap38(data);
|
|
6796
6860
|
}
|
|
6797
6861
|
async update(checkId, params) {
|
|
6798
6862
|
const { intervalSec, timeoutSec, expectedStatus, ...rest } = params;
|
|
@@ -6806,7 +6870,7 @@ var HealthChecks = class {
|
|
|
6806
6870
|
`/health-checks/${checkId}`,
|
|
6807
6871
|
body5
|
|
6808
6872
|
);
|
|
6809
|
-
return
|
|
6873
|
+
return unwrap38(data);
|
|
6810
6874
|
}
|
|
6811
6875
|
async delete(checkId) {
|
|
6812
6876
|
await this.http.delete(`/health-checks/${checkId}`);
|
|
@@ -6814,7 +6878,7 @@ var HealthChecks = class {
|
|
|
6814
6878
|
};
|
|
6815
6879
|
|
|
6816
6880
|
// src/resources/integrations.ts
|
|
6817
|
-
function
|
|
6881
|
+
function unwrap39(payload) {
|
|
6818
6882
|
if (payload && typeof payload === "object") {
|
|
6819
6883
|
const p = payload;
|
|
6820
6884
|
for (const k of ["data", "integrations", "catalog", "items"]) {
|
|
@@ -6824,7 +6888,7 @@ function unwrap38(payload) {
|
|
|
6824
6888
|
return payload;
|
|
6825
6889
|
}
|
|
6826
6890
|
function listItems8(payload) {
|
|
6827
|
-
const result =
|
|
6891
|
+
const result = unwrap39(payload);
|
|
6828
6892
|
if (Array.isArray(result)) return result;
|
|
6829
6893
|
return [];
|
|
6830
6894
|
}
|
|
@@ -6853,14 +6917,14 @@ var Integrations = class {
|
|
|
6853
6917
|
const data = await this.http.get(
|
|
6854
6918
|
`/integrations/${provider}/start`
|
|
6855
6919
|
);
|
|
6856
|
-
return
|
|
6920
|
+
return unwrap39(data);
|
|
6857
6921
|
}
|
|
6858
6922
|
/** Force-refresh the access token for a provider. */
|
|
6859
6923
|
async refresh(provider) {
|
|
6860
6924
|
const data = await this.http.post(
|
|
6861
6925
|
`/integrations/${provider}/refresh`
|
|
6862
6926
|
);
|
|
6863
|
-
return
|
|
6927
|
+
return unwrap39(data);
|
|
6864
6928
|
}
|
|
6865
6929
|
/** Disconnect (revoke) an integration. */
|
|
6866
6930
|
async disconnect(provider) {
|
|
@@ -6885,7 +6949,7 @@ var Integrations = class {
|
|
|
6885
6949
|
"/integrations/slack/send-test",
|
|
6886
6950
|
body5
|
|
6887
6951
|
);
|
|
6888
|
-
return
|
|
6952
|
+
return unwrap39(data);
|
|
6889
6953
|
}
|
|
6890
6954
|
/** Send a test message to the connected Discord channel. */
|
|
6891
6955
|
async discordSendTest(params = {}) {
|
|
@@ -6894,13 +6958,13 @@ var Integrations = class {
|
|
|
6894
6958
|
"/integrations/discord/send-test",
|
|
6895
6959
|
body5
|
|
6896
6960
|
);
|
|
6897
|
-
return
|
|
6961
|
+
return unwrap39(data);
|
|
6898
6962
|
}
|
|
6899
6963
|
// ── Linear dedicated controller ────────────────────────────────────────────
|
|
6900
6964
|
/** Begin Linear OAuth — Linear has provider-specific error shapes. */
|
|
6901
6965
|
async linearStart() {
|
|
6902
6966
|
const data = await this.http.get("/integrations/linear/start");
|
|
6903
|
-
return
|
|
6967
|
+
return unwrap39(data);
|
|
6904
6968
|
}
|
|
6905
6969
|
/** Create a Linear issue via the connected workspace. */
|
|
6906
6970
|
async linearCreateIssue(params = {}) {
|
|
@@ -6909,12 +6973,12 @@ var Integrations = class {
|
|
|
6909
6973
|
"/integrations/linear/create-issue",
|
|
6910
6974
|
body5
|
|
6911
6975
|
);
|
|
6912
|
-
return
|
|
6976
|
+
return unwrap39(data);
|
|
6913
6977
|
}
|
|
6914
6978
|
};
|
|
6915
6979
|
|
|
6916
6980
|
// src/resources/mcp.ts
|
|
6917
|
-
function
|
|
6981
|
+
function unwrap40(payload) {
|
|
6918
6982
|
if (payload && typeof payload === "object") {
|
|
6919
6983
|
const p = payload;
|
|
6920
6984
|
for (const k of ["data", "mcp", "result", "items"]) {
|
|
@@ -6940,7 +7004,7 @@ var Mcp = class {
|
|
|
6940
7004
|
"/mcp",
|
|
6941
7005
|
Object.keys(body5).length > 0 ? body5 : void 0
|
|
6942
7006
|
);
|
|
6943
|
-
return
|
|
7007
|
+
return unwrap40(data);
|
|
6944
7008
|
}
|
|
6945
7009
|
/**
|
|
6946
7010
|
* Open the MCP listen channel (GET).
|
|
@@ -6950,7 +7014,7 @@ var Mcp = class {
|
|
|
6950
7014
|
*/
|
|
6951
7015
|
async listen() {
|
|
6952
7016
|
const data = await this.http.get("/mcp");
|
|
6953
|
-
return
|
|
7017
|
+
return unwrap40(data);
|
|
6954
7018
|
}
|
|
6955
7019
|
/** Close (terminate) the MCP session. */
|
|
6956
7020
|
async close() {
|
|
@@ -6959,7 +7023,7 @@ var Mcp = class {
|
|
|
6959
7023
|
};
|
|
6960
7024
|
|
|
6961
7025
|
// src/resources/models.ts
|
|
6962
|
-
function
|
|
7026
|
+
function unwrap41(data) {
|
|
6963
7027
|
if (Array.isArray(data)) return data;
|
|
6964
7028
|
if (data && typeof data === "object") {
|
|
6965
7029
|
const d = data;
|
|
@@ -6980,7 +7044,7 @@ var Models = class {
|
|
|
6980
7044
|
Object.entries(filters).filter(([, v]) => v !== void 0)
|
|
6981
7045
|
);
|
|
6982
7046
|
const data = await this.http.get("/intelligence/models", query3);
|
|
6983
|
-
return
|
|
7047
|
+
return unwrap41(data);
|
|
6984
7048
|
}
|
|
6985
7049
|
/**
|
|
6986
7050
|
* Get a single model by id.
|
|
@@ -7636,7 +7700,7 @@ function requestBody(params) {
|
|
|
7636
7700
|
config: authConfig(params)
|
|
7637
7701
|
});
|
|
7638
7702
|
}
|
|
7639
|
-
function
|
|
7703
|
+
function unwrap42(payload) {
|
|
7640
7704
|
if (payload && typeof payload === "object") {
|
|
7641
7705
|
const p = payload;
|
|
7642
7706
|
for (const k of ["data", "project_auth", "config", "items"]) {
|
|
@@ -7661,13 +7725,13 @@ var ProjectAuth = class {
|
|
|
7661
7725
|
"/project-auth/status",
|
|
7662
7726
|
resourcePayload(params)
|
|
7663
7727
|
);
|
|
7664
|
-
return
|
|
7728
|
+
return unwrap42(data);
|
|
7665
7729
|
}
|
|
7666
7730
|
/** Enable project auth. */
|
|
7667
7731
|
async enable(params) {
|
|
7668
7732
|
const body5 = requestBody(params);
|
|
7669
7733
|
const data = await this.http.post("/project-auth/enable", body5);
|
|
7670
|
-
return
|
|
7734
|
+
return unwrap42(data);
|
|
7671
7735
|
}
|
|
7672
7736
|
/** Disable project auth. */
|
|
7673
7737
|
async disable(params) {
|
|
@@ -7675,18 +7739,18 @@ var ProjectAuth = class {
|
|
|
7675
7739
|
"/project-auth/disable",
|
|
7676
7740
|
resourcePayload(params)
|
|
7677
7741
|
);
|
|
7678
|
-
return
|
|
7742
|
+
return unwrap42(data);
|
|
7679
7743
|
}
|
|
7680
7744
|
/** Update project-auth configuration. */
|
|
7681
7745
|
async update(params) {
|
|
7682
7746
|
const body5 = requestBody(params);
|
|
7683
7747
|
const data = await this.http.patch("/project-auth/config", body5);
|
|
7684
|
-
return
|
|
7748
|
+
return unwrap42(data);
|
|
7685
7749
|
}
|
|
7686
7750
|
};
|
|
7687
7751
|
|
|
7688
7752
|
// src/resources/project-integrations.ts
|
|
7689
|
-
function
|
|
7753
|
+
function unwrap43(payload) {
|
|
7690
7754
|
if (payload && typeof payload === "object") {
|
|
7691
7755
|
const p = payload;
|
|
7692
7756
|
for (const k of ["data", "project_integrations", "catalog", "items"]) {
|
|
@@ -7696,7 +7760,7 @@ function unwrap42(payload) {
|
|
|
7696
7760
|
return payload;
|
|
7697
7761
|
}
|
|
7698
7762
|
function listItems9(payload) {
|
|
7699
|
-
const result =
|
|
7763
|
+
const result = unwrap43(payload);
|
|
7700
7764
|
if (Array.isArray(result)) return result;
|
|
7701
7765
|
return [];
|
|
7702
7766
|
}
|
|
@@ -7731,13 +7795,13 @@ var ProjectIntegrations = class {
|
|
|
7731
7795
|
const data = await this.http.get(
|
|
7732
7796
|
`/project-integrations/${integrationId}`
|
|
7733
7797
|
);
|
|
7734
|
-
return
|
|
7798
|
+
return unwrap43(data);
|
|
7735
7799
|
}
|
|
7736
7800
|
/** Create a project integration. */
|
|
7737
7801
|
async create(params) {
|
|
7738
7802
|
const body5 = stripUndefObj2(params);
|
|
7739
7803
|
const data = await this.http.post("/project-integrations", body5);
|
|
7740
|
-
return
|
|
7804
|
+
return unwrap43(data);
|
|
7741
7805
|
}
|
|
7742
7806
|
/** Update a project integration. */
|
|
7743
7807
|
async update(integrationId, params) {
|
|
@@ -7746,7 +7810,7 @@ var ProjectIntegrations = class {
|
|
|
7746
7810
|
`/project-integrations/${integrationId}`,
|
|
7747
7811
|
body5
|
|
7748
7812
|
);
|
|
7749
|
-
return
|
|
7813
|
+
return unwrap43(data);
|
|
7750
7814
|
}
|
|
7751
7815
|
/** Delete a project integration. */
|
|
7752
7816
|
async delete(integrationId) {
|
|
@@ -7755,7 +7819,7 @@ var ProjectIntegrations = class {
|
|
|
7755
7819
|
};
|
|
7756
7820
|
|
|
7757
7821
|
// src/resources/provider-defaults.ts
|
|
7758
|
-
function
|
|
7822
|
+
function unwrap44(data) {
|
|
7759
7823
|
if (data && typeof data === "object") {
|
|
7760
7824
|
const d = data;
|
|
7761
7825
|
for (const k of ["data", "defaults", "provider_defaults", "config"]) {
|
|
@@ -7771,7 +7835,7 @@ var ProviderDefaults = class {
|
|
|
7771
7835
|
http;
|
|
7772
7836
|
/** Get the current fleet-wide provider defaults. */
|
|
7773
7837
|
async list() {
|
|
7774
|
-
return
|
|
7838
|
+
return unwrap44(await this.http.get("/admin/provider-defaults"));
|
|
7775
7839
|
}
|
|
7776
7840
|
/** Return the defaults entry for a single provider, or {} if missing. */
|
|
7777
7841
|
async get(provider) {
|
|
@@ -7787,13 +7851,13 @@ var ProviderDefaults = class {
|
|
|
7787
7851
|
const body5 = Object.fromEntries(
|
|
7788
7852
|
Object.entries(opts).filter(([, v]) => v !== void 0)
|
|
7789
7853
|
);
|
|
7790
|
-
return
|
|
7854
|
+
return unwrap44(
|
|
7791
7855
|
await this.http.put("/admin/provider-defaults", body5)
|
|
7792
7856
|
);
|
|
7793
7857
|
}
|
|
7794
7858
|
// ── Per-tenant overrides ────────────────────────────────────────────────
|
|
7795
7859
|
async getTenant(tenantId) {
|
|
7796
|
-
return
|
|
7860
|
+
return unwrap44(
|
|
7797
7861
|
await this.http.get(
|
|
7798
7862
|
`/admin/tenants/${tenantId}/provider-config`
|
|
7799
7863
|
)
|
|
@@ -7803,7 +7867,7 @@ var ProviderDefaults = class {
|
|
|
7803
7867
|
const body5 = Object.fromEntries(
|
|
7804
7868
|
Object.entries(opts).filter(([, v]) => v !== void 0)
|
|
7805
7869
|
);
|
|
7806
|
-
return
|
|
7870
|
+
return unwrap44(
|
|
7807
7871
|
await this.http.put(
|
|
7808
7872
|
`/admin/tenants/${tenantId}/provider-config`,
|
|
7809
7873
|
body5
|
|
@@ -7816,7 +7880,7 @@ var ProviderDefaults = class {
|
|
|
7816
7880
|
};
|
|
7817
7881
|
|
|
7818
7882
|
// src/resources/regions.ts
|
|
7819
|
-
function
|
|
7883
|
+
function unwrap45(payload) {
|
|
7820
7884
|
if (payload && typeof payload === "object") {
|
|
7821
7885
|
const p = payload;
|
|
7822
7886
|
for (const k of [
|
|
@@ -7833,7 +7897,7 @@ function unwrap44(payload) {
|
|
|
7833
7897
|
return payload;
|
|
7834
7898
|
}
|
|
7835
7899
|
function listItems10(payload) {
|
|
7836
|
-
const result =
|
|
7900
|
+
const result = unwrap45(payload);
|
|
7837
7901
|
if (Array.isArray(result)) return result;
|
|
7838
7902
|
return [];
|
|
7839
7903
|
}
|
|
@@ -7850,7 +7914,7 @@ var Regions = class {
|
|
|
7850
7914
|
/** Get canonical compute catalog, including product templates and readiness. */
|
|
7851
7915
|
async catalog() {
|
|
7852
7916
|
const data = await this.http.get("/compute/catalog");
|
|
7853
|
-
return
|
|
7917
|
+
return unwrap45(data);
|
|
7854
7918
|
}
|
|
7855
7919
|
/** List available compute sizes. */
|
|
7856
7920
|
async listSizes() {
|
|
@@ -7860,7 +7924,7 @@ var Regions = class {
|
|
|
7860
7924
|
/** Get static compute pricing data. */
|
|
7861
7925
|
async pricing() {
|
|
7862
7926
|
const data = await this.http.get("/compute/pricing");
|
|
7863
|
-
return
|
|
7927
|
+
return unwrap45(data);
|
|
7864
7928
|
}
|
|
7865
7929
|
/** List community computer templates. */
|
|
7866
7930
|
async listTemplates() {
|
|
@@ -7872,12 +7936,12 @@ var Regions = class {
|
|
|
7872
7936
|
const data = await this.http.get(
|
|
7873
7937
|
`/compute/templates/${templateId}`
|
|
7874
7938
|
);
|
|
7875
|
-
return
|
|
7939
|
+
return unwrap45(data);
|
|
7876
7940
|
}
|
|
7877
7941
|
};
|
|
7878
7942
|
|
|
7879
7943
|
// src/resources/runtime-env.ts
|
|
7880
|
-
function
|
|
7944
|
+
function unwrap46(payload) {
|
|
7881
7945
|
if (payload !== null && typeof payload === "object" && "data" in payload && payload.data !== void 0) {
|
|
7882
7946
|
return payload.data;
|
|
7883
7947
|
}
|
|
@@ -7930,11 +7994,11 @@ var RuntimeEnv = class {
|
|
|
7930
7994
|
"/runtime-env",
|
|
7931
7995
|
query2(params)
|
|
7932
7996
|
);
|
|
7933
|
-
return
|
|
7997
|
+
return unwrap46(response).map(normalize2);
|
|
7934
7998
|
}
|
|
7935
7999
|
async get(id) {
|
|
7936
8000
|
return normalize2(
|
|
7937
|
-
|
|
8001
|
+
unwrap46(
|
|
7938
8002
|
await this.http.get(
|
|
7939
8003
|
`/runtime-env/${encodeURIComponent(id)}`
|
|
7940
8004
|
)
|
|
@@ -7943,7 +8007,7 @@ var RuntimeEnv = class {
|
|
|
7943
8007
|
}
|
|
7944
8008
|
async set(params) {
|
|
7945
8009
|
return normalize2(
|
|
7946
|
-
|
|
8010
|
+
unwrap46(
|
|
7947
8011
|
await this.http.post(
|
|
7948
8012
|
"/runtime-env",
|
|
7949
8013
|
body4(params)
|
|
@@ -7957,7 +8021,7 @@ var RuntimeEnv = class {
|
|
|
7957
8021
|
};
|
|
7958
8022
|
|
|
7959
8023
|
// src/resources/runtime-capabilities.ts
|
|
7960
|
-
function
|
|
8024
|
+
function unwrap47(payload) {
|
|
7961
8025
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
7962
8026
|
return payload.data;
|
|
7963
8027
|
}
|
|
@@ -7969,7 +8033,7 @@ var RuntimeCapabilitiesResource = class {
|
|
|
7969
8033
|
}
|
|
7970
8034
|
http;
|
|
7971
8035
|
async get() {
|
|
7972
|
-
return
|
|
8036
|
+
return unwrap47(
|
|
7973
8037
|
await this.http.get("/runtime-capabilities")
|
|
7974
8038
|
);
|
|
7975
8039
|
}
|
|
@@ -7999,7 +8063,7 @@ var AGENT_WORKSPACE_KEEP_LAST_SNAPSHOTS = 1;
|
|
|
7999
8063
|
function isLegacyForkParams(opts) {
|
|
8000
8064
|
return "name" in opts || "metadata" in opts;
|
|
8001
8065
|
}
|
|
8002
|
-
function
|
|
8066
|
+
function unwrap48(payload) {
|
|
8003
8067
|
if (payload !== null && typeof payload === "object" && "data" in payload && payload.data !== void 0) {
|
|
8004
8068
|
return payload.data;
|
|
8005
8069
|
}
|
|
@@ -8266,7 +8330,7 @@ var SandboxTerminal = class {
|
|
|
8266
8330
|
const body5 = Object.fromEntries(
|
|
8267
8331
|
Object.entries(params).filter(([, v]) => v !== void 0)
|
|
8268
8332
|
);
|
|
8269
|
-
const response =
|
|
8333
|
+
const response = unwrap48(
|
|
8270
8334
|
await this.sandbox.http.post(`/sandboxes/${this.sandbox.id}/terminal`, body5)
|
|
8271
8335
|
);
|
|
8272
8336
|
return response;
|
|
@@ -8324,7 +8388,7 @@ var SandboxPreviews = class {
|
|
|
8324
8388
|
Object.entries(opts).filter(([, v]) => v !== void 0)
|
|
8325
8389
|
)
|
|
8326
8390
|
};
|
|
8327
|
-
return
|
|
8391
|
+
return unwrap48(
|
|
8328
8392
|
await this.http.post(
|
|
8329
8393
|
`/sandboxes/${this.sandbox.id}/previews`,
|
|
8330
8394
|
body5
|
|
@@ -8332,7 +8396,7 @@ var SandboxPreviews = class {
|
|
|
8332
8396
|
);
|
|
8333
8397
|
}
|
|
8334
8398
|
async get(previewId) {
|
|
8335
|
-
return
|
|
8399
|
+
return unwrap48(
|
|
8336
8400
|
await this.http.get(
|
|
8337
8401
|
`/sandboxes/${this.sandbox.id}/previews/${previewId}`
|
|
8338
8402
|
)
|
|
@@ -8345,7 +8409,7 @@ var SandboxPreviews = class {
|
|
|
8345
8409
|
}
|
|
8346
8410
|
/** Mint a share token for previewId. */
|
|
8347
8411
|
async share(previewId, opts = {}) {
|
|
8348
|
-
return
|
|
8412
|
+
return unwrap48(
|
|
8349
8413
|
await this.http.post(
|
|
8350
8414
|
`/sandboxes/${this.sandbox.id}/previews/${previewId}/share`,
|
|
8351
8415
|
{ ttl_seconds: opts.ttl_seconds ?? opts.expires_in_sec ?? 3600 }
|
|
@@ -8414,7 +8478,7 @@ var SandboxTags = class {
|
|
|
8414
8478
|
sandbox;
|
|
8415
8479
|
/** Replace the full tag list with tags. */
|
|
8416
8480
|
async set(tags) {
|
|
8417
|
-
return
|
|
8481
|
+
return unwrap48(
|
|
8418
8482
|
await this.sandbox.http.patch(`/sandboxes/${this.sandbox.id}/tags`, { tags })
|
|
8419
8483
|
);
|
|
8420
8484
|
}
|
|
@@ -8488,7 +8552,7 @@ var Sandbox = class _Sandbox {
|
|
|
8488
8552
|
return this.data.template_id ?? this.data.image_id ?? "";
|
|
8489
8553
|
}
|
|
8490
8554
|
async refresh() {
|
|
8491
|
-
this.data =
|
|
8555
|
+
this.data = unwrap48(
|
|
8492
8556
|
await this.http.get(`/sandboxes/${this.id}`)
|
|
8493
8557
|
);
|
|
8494
8558
|
return this;
|
|
@@ -8530,7 +8594,7 @@ var Sandbox = class _Sandbox {
|
|
|
8530
8594
|
}
|
|
8531
8595
|
async runExec(command, options) {
|
|
8532
8596
|
this.assertRunning("exec");
|
|
8533
|
-
const response =
|
|
8597
|
+
const response = unwrap48(
|
|
8534
8598
|
await this.http.post(
|
|
8535
8599
|
`/sandboxes/${this.id}/exec`,
|
|
8536
8600
|
execBody(command, options)
|
|
@@ -8575,7 +8639,7 @@ var Sandbox = class _Sandbox {
|
|
|
8575
8639
|
}
|
|
8576
8640
|
async createExport(params) {
|
|
8577
8641
|
const body5 = typeof params === "string" ? { path: params } : Array.isArray(params) ? { paths: params } : params;
|
|
8578
|
-
const response =
|
|
8642
|
+
const response = unwrap48(
|
|
8579
8643
|
await this.http.post(
|
|
8580
8644
|
`/sandboxes/${this.id}/exports`,
|
|
8581
8645
|
body5
|
|
@@ -8600,7 +8664,7 @@ var Sandbox = class _Sandbox {
|
|
|
8600
8664
|
}
|
|
8601
8665
|
async listFiles(path = "/workspace") {
|
|
8602
8666
|
this.assertRunning("files.list");
|
|
8603
|
-
const response =
|
|
8667
|
+
const response = unwrap48(
|
|
8604
8668
|
await this.http.get(
|
|
8605
8669
|
`/sandboxes/${this.id}/files`,
|
|
8606
8670
|
{ path }
|
|
@@ -8610,7 +8674,7 @@ var Sandbox = class _Sandbox {
|
|
|
8610
8674
|
}
|
|
8611
8675
|
async statFile(path) {
|
|
8612
8676
|
this.assertRunning("files.stat");
|
|
8613
|
-
return
|
|
8677
|
+
return unwrap48(
|
|
8614
8678
|
await this.http.post(
|
|
8615
8679
|
`/sandboxes/${this.id}/files/stat`,
|
|
8616
8680
|
{ path }
|
|
@@ -8630,7 +8694,7 @@ var Sandbox = class _Sandbox {
|
|
|
8630
8694
|
}
|
|
8631
8695
|
async exposeInfo(port) {
|
|
8632
8696
|
this.assertRunning("expose");
|
|
8633
|
-
const response =
|
|
8697
|
+
const response = unwrap48(
|
|
8634
8698
|
await this.http.post(
|
|
8635
8699
|
`/sandboxes/${this.id}/expose`,
|
|
8636
8700
|
port === void 0 ? {} : { port }
|
|
@@ -8640,7 +8704,7 @@ var Sandbox = class _Sandbox {
|
|
|
8640
8704
|
}
|
|
8641
8705
|
async startTemplate(options = {}) {
|
|
8642
8706
|
this.assertRunning("startTemplate");
|
|
8643
|
-
return
|
|
8707
|
+
return unwrap48(
|
|
8644
8708
|
await this.http.post(
|
|
8645
8709
|
`/sandboxes/${this.id}/template/start`,
|
|
8646
8710
|
options
|
|
@@ -8648,7 +8712,7 @@ var Sandbox = class _Sandbox {
|
|
|
8648
8712
|
);
|
|
8649
8713
|
}
|
|
8650
8714
|
async getArtifacts() {
|
|
8651
|
-
return
|
|
8715
|
+
return unwrap48(
|
|
8652
8716
|
await this.http.get(
|
|
8653
8717
|
`/sandboxes/${this.id}/artifacts`
|
|
8654
8718
|
)
|
|
@@ -8659,7 +8723,7 @@ var Sandbox = class _Sandbox {
|
|
|
8659
8723
|
`/sandboxes/${this.id}/logs`,
|
|
8660
8724
|
{ lines }
|
|
8661
8725
|
);
|
|
8662
|
-
return
|
|
8726
|
+
return unwrap48(response);
|
|
8663
8727
|
}
|
|
8664
8728
|
streamLogs() {
|
|
8665
8729
|
return this.http.stream(
|
|
@@ -8667,7 +8731,7 @@ var Sandbox = class _Sandbox {
|
|
|
8667
8731
|
);
|
|
8668
8732
|
}
|
|
8669
8733
|
async metrics(window2 = "1h") {
|
|
8670
|
-
return
|
|
8734
|
+
return unwrap48(
|
|
8671
8735
|
await this.http.get(
|
|
8672
8736
|
`/sandboxes/${this.id}/metrics`,
|
|
8673
8737
|
{ window: window2 }
|
|
@@ -8679,7 +8743,7 @@ var Sandbox = class _Sandbox {
|
|
|
8679
8743
|
}
|
|
8680
8744
|
async createSnapshot(comment) {
|
|
8681
8745
|
this.assertRunning("snapshots.create");
|
|
8682
|
-
return
|
|
8746
|
+
return unwrap48(
|
|
8683
8747
|
await this.http.post(
|
|
8684
8748
|
`/sandboxes/${this.id}/snapshots`,
|
|
8685
8749
|
comment ? { comment } : {}
|
|
@@ -8687,14 +8751,14 @@ var Sandbox = class _Sandbox {
|
|
|
8687
8751
|
);
|
|
8688
8752
|
}
|
|
8689
8753
|
async listSnapshots() {
|
|
8690
|
-
return
|
|
8754
|
+
return unwrap48(
|
|
8691
8755
|
await this.http.get(
|
|
8692
8756
|
`/sandboxes/${this.id}/snapshots`
|
|
8693
8757
|
)
|
|
8694
8758
|
);
|
|
8695
8759
|
}
|
|
8696
8760
|
async restoreSnapshot(snapshotId) {
|
|
8697
|
-
const data =
|
|
8761
|
+
const data = unwrap48(
|
|
8698
8762
|
await this.http.post(
|
|
8699
8763
|
`/sandboxes/${this.id}/restore/${snapshotId}`,
|
|
8700
8764
|
{}
|
|
@@ -8711,11 +8775,12 @@ var Sandbox = class _Sandbox {
|
|
|
8711
8775
|
}
|
|
8712
8776
|
this.assertRunning("fork");
|
|
8713
8777
|
const body5 = stripUndefined26({
|
|
8778
|
+
snapshot_id: opts.snapshotId ?? opts.snapshot_id,
|
|
8714
8779
|
timeout_sec: opts.timeoutSec ?? opts.timeout_sec,
|
|
8715
8780
|
template_id: opts.templateId ?? opts.template_id
|
|
8716
8781
|
});
|
|
8717
8782
|
const idempotencyKey11 = opts.idempotencyKey ?? opts.idempotency_key;
|
|
8718
|
-
const data =
|
|
8783
|
+
const data = unwrap48(
|
|
8719
8784
|
await this.http.request(
|
|
8720
8785
|
`/sandboxes/${this.id}/fork`,
|
|
8721
8786
|
{
|
|
@@ -8731,13 +8796,14 @@ var Sandbox = class _Sandbox {
|
|
|
8731
8796
|
async forkLegacy(opts = {}) {
|
|
8732
8797
|
this.assertRunning("fork");
|
|
8733
8798
|
const body5 = stripUndefined26({
|
|
8799
|
+
snapshot_id: opts.snapshotId ?? opts.snapshot_id,
|
|
8734
8800
|
timeout_sec: opts.timeoutSec ?? opts.timeout_sec,
|
|
8735
8801
|
template_id: opts.templateId ?? opts.template_id,
|
|
8736
8802
|
name: opts.name,
|
|
8737
8803
|
metadata: opts.metadata
|
|
8738
8804
|
});
|
|
8739
8805
|
const idempotencyKey11 = opts.idempotencyKey ?? opts.idempotency_key;
|
|
8740
|
-
const data =
|
|
8806
|
+
const data = unwrap48(
|
|
8741
8807
|
await this.http.request(
|
|
8742
8808
|
`/sandboxes/${this.id}/fork`,
|
|
8743
8809
|
{
|
|
@@ -8773,7 +8839,7 @@ var Sandbox = class _Sandbox {
|
|
|
8773
8839
|
timeout_sec: params.timeout_sec ?? params.timeoutSec,
|
|
8774
8840
|
idle_timeout_sec: params.idle_timeout_sec ?? params.idleTimeoutSec
|
|
8775
8841
|
});
|
|
8776
|
-
const data =
|
|
8842
|
+
const data = unwrap48(
|
|
8777
8843
|
await this.http.patch(
|
|
8778
8844
|
`/sandboxes/${this.id}`,
|
|
8779
8845
|
body5
|
|
@@ -8783,7 +8849,7 @@ var Sandbox = class _Sandbox {
|
|
|
8783
8849
|
return this;
|
|
8784
8850
|
}
|
|
8785
8851
|
async extend(timeoutSec) {
|
|
8786
|
-
const data =
|
|
8852
|
+
const data = unwrap48(
|
|
8787
8853
|
await this.http.post(
|
|
8788
8854
|
`/sandboxes/${this.id}/extend`,
|
|
8789
8855
|
timeoutSec === void 0 ? {} : { timeout_sec: timeoutSec }
|
|
@@ -8793,7 +8859,7 @@ var Sandbox = class _Sandbox {
|
|
|
8793
8859
|
return this;
|
|
8794
8860
|
}
|
|
8795
8861
|
async usage() {
|
|
8796
|
-
return
|
|
8862
|
+
return unwrap48(
|
|
8797
8863
|
await this.http.get(
|
|
8798
8864
|
`/sandboxes/${this.id}/usage`
|
|
8799
8865
|
)
|
|
@@ -8813,7 +8879,7 @@ var Sandbox = class _Sandbox {
|
|
|
8813
8879
|
return raw;
|
|
8814
8880
|
}
|
|
8815
8881
|
async pause() {
|
|
8816
|
-
const data =
|
|
8882
|
+
const data = unwrap48(
|
|
8817
8883
|
await this.http.post(
|
|
8818
8884
|
`/sandboxes/${this.id}/pause`,
|
|
8819
8885
|
{}
|
|
@@ -8834,7 +8900,7 @@ var Sandbox = class _Sandbox {
|
|
|
8834
8900
|
`/sandboxes/${this.id}/resume`,
|
|
8835
8901
|
{}
|
|
8836
8902
|
);
|
|
8837
|
-
const data =
|
|
8903
|
+
const data = unwrap48(response);
|
|
8838
8904
|
this.data = { ...this.data, ...data };
|
|
8839
8905
|
return this;
|
|
8840
8906
|
}
|
|
@@ -8865,7 +8931,7 @@ var Sandbox = class _Sandbox {
|
|
|
8865
8931
|
if (idempotencyKey11) {
|
|
8866
8932
|
requestOptions.headers = { "Idempotency-Key": idempotencyKey11 };
|
|
8867
8933
|
}
|
|
8868
|
-
return
|
|
8934
|
+
return unwrap48(
|
|
8869
8935
|
await this.http.request(
|
|
8870
8936
|
`/sandboxes/${this.id}/deploy`,
|
|
8871
8937
|
requestOptions
|
|
@@ -8875,9 +8941,57 @@ var Sandbox = class _Sandbox {
|
|
|
8875
8941
|
async deployDocker(params = {}) {
|
|
8876
8942
|
return this.deploy({ ...params, deploymentType: "docker_deploy" });
|
|
8877
8943
|
}
|
|
8944
|
+
/** Deploy an immutable snapshot without modifying the editable sandbox. */
|
|
8945
|
+
async deploySnapshot(snapshotId, params = {}, options = {}) {
|
|
8946
|
+
const release = await this.forkLegacy({
|
|
8947
|
+
snapshotId,
|
|
8948
|
+
name: `release-${snapshotId.slice(0, 12)}`,
|
|
8949
|
+
metadata: { release_source_sandbox_id: this.id, snapshot_id: snapshotId },
|
|
8950
|
+
...options.forkIdempotencyKey ? { idempotencyKey: options.forkIdempotencyKey } : {}
|
|
8951
|
+
});
|
|
8952
|
+
const cleanupRequested = options.cleanup !== false;
|
|
8953
|
+
const destroyRelease = async () => {
|
|
8954
|
+
if (!cleanupRequested) return void 0;
|
|
8955
|
+
try {
|
|
8956
|
+
await release.destroy();
|
|
8957
|
+
return void 0;
|
|
8958
|
+
} catch (error) {
|
|
8959
|
+
return error instanceof Error ? error.message : String(error);
|
|
8960
|
+
}
|
|
8961
|
+
};
|
|
8962
|
+
let result;
|
|
8963
|
+
try {
|
|
8964
|
+
result = await release.deploy(params) ?? {};
|
|
8965
|
+
} catch (error) {
|
|
8966
|
+
const failedCleanup = await destroyRelease();
|
|
8967
|
+
if (cleanupRequested && failedCleanup === void 0) throw error;
|
|
8968
|
+
const leak = {
|
|
8969
|
+
release_sandbox_id: release.id
|
|
8970
|
+
};
|
|
8971
|
+
if (failedCleanup !== void 0) {
|
|
8972
|
+
leak.release_cleanup_error = failedCleanup;
|
|
8973
|
+
}
|
|
8974
|
+
if (typeof error === "object" && error !== null) {
|
|
8975
|
+
throw Object.assign(error, leak);
|
|
8976
|
+
}
|
|
8977
|
+
throw Object.assign(
|
|
8978
|
+
new Error(`Snapshot deployment failed: ${String(error)}`, {
|
|
8979
|
+
cause: error
|
|
8980
|
+
}),
|
|
8981
|
+
leak
|
|
8982
|
+
);
|
|
8983
|
+
}
|
|
8984
|
+
const cleanupErrorMessage = await destroyRelease();
|
|
8985
|
+
result.source_snapshot_id = snapshotId;
|
|
8986
|
+
result.release_sandbox_id = release.id;
|
|
8987
|
+
if (cleanupErrorMessage !== void 0) {
|
|
8988
|
+
result.release_cleanup_error = cleanupErrorMessage;
|
|
8989
|
+
}
|
|
8990
|
+
return result;
|
|
8991
|
+
}
|
|
8878
8992
|
/** Check readiness of the sandbox (GET /sandboxes/:id/readiness). */
|
|
8879
8993
|
async readiness() {
|
|
8880
|
-
return
|
|
8994
|
+
return unwrap48(
|
|
8881
8995
|
await this.http.get(
|
|
8882
8996
|
`/sandboxes/${this.id}/readiness`
|
|
8883
8997
|
)
|
|
@@ -9045,7 +9159,7 @@ var Sandboxes = class {
|
|
|
9045
9159
|
if (idempotencyKey11) {
|
|
9046
9160
|
requestOptions.headers = { "Idempotency-Key": idempotencyKey11 };
|
|
9047
9161
|
}
|
|
9048
|
-
const data =
|
|
9162
|
+
const data = unwrap48(
|
|
9049
9163
|
await this.http.request(
|
|
9050
9164
|
"/sandboxes",
|
|
9051
9165
|
requestOptions
|
|
@@ -9064,7 +9178,7 @@ var Sandboxes = class {
|
|
|
9064
9178
|
return listItems11(data).map((item) => new Sandbox(this.http, item));
|
|
9065
9179
|
}
|
|
9066
9180
|
async get(id) {
|
|
9067
|
-
const data =
|
|
9181
|
+
const data = unwrap48(
|
|
9068
9182
|
await this.http.get(`/sandboxes/${id}`)
|
|
9069
9183
|
);
|
|
9070
9184
|
return new Sandbox(this.http, data);
|
|
@@ -9092,7 +9206,7 @@ var Sandboxes = class {
|
|
|
9092
9206
|
return this.get(id);
|
|
9093
9207
|
}
|
|
9094
9208
|
async getByName(name) {
|
|
9095
|
-
const data =
|
|
9209
|
+
const data = unwrap48(
|
|
9096
9210
|
await this.http.get(
|
|
9097
9211
|
`/sandboxes/by-name/${encodeURIComponent(name)}`
|
|
9098
9212
|
)
|
|
@@ -9139,7 +9253,7 @@ var Sandboxes = class {
|
|
|
9139
9253
|
);
|
|
9140
9254
|
}
|
|
9141
9255
|
async validateBuildSpec(buildSpec) {
|
|
9142
|
-
return
|
|
9256
|
+
return unwrap48(
|
|
9143
9257
|
await this.http.post(
|
|
9144
9258
|
"/sandbox-templates/validate",
|
|
9145
9259
|
{
|
|
@@ -9159,7 +9273,7 @@ var Sandboxes = class {
|
|
|
9159
9273
|
metadata: params.metadata
|
|
9160
9274
|
})
|
|
9161
9275
|
);
|
|
9162
|
-
return
|
|
9276
|
+
return unwrap48(response);
|
|
9163
9277
|
}
|
|
9164
9278
|
async createTemplateBuild(templateId, params = {}) {
|
|
9165
9279
|
const response = await this.http.post(
|
|
@@ -9169,19 +9283,19 @@ var Sandboxes = class {
|
|
|
9169
9283
|
metadata: params.metadata
|
|
9170
9284
|
})
|
|
9171
9285
|
);
|
|
9172
|
-
return
|
|
9286
|
+
return unwrap48(response);
|
|
9173
9287
|
}
|
|
9174
9288
|
async listTemplateBuilds(templateId) {
|
|
9175
9289
|
const response = await this.http.get(
|
|
9176
9290
|
`/sandbox-templates/${templateId}/builds`
|
|
9177
9291
|
);
|
|
9178
|
-
return
|
|
9292
|
+
return unwrap48(response);
|
|
9179
9293
|
}
|
|
9180
9294
|
async getTemplateBuild(buildId) {
|
|
9181
9295
|
const response = await this.http.get(
|
|
9182
9296
|
`/sandbox-template-builds/${buildId}`
|
|
9183
9297
|
);
|
|
9184
|
-
return
|
|
9298
|
+
return unwrap48(response);
|
|
9185
9299
|
}
|
|
9186
9300
|
};
|
|
9187
9301
|
function toBase642(bytes) {
|
|
@@ -9213,7 +9327,7 @@ function previewInfoFromResponse(response) {
|
|
|
9213
9327
|
)
|
|
9214
9328
|
};
|
|
9215
9329
|
}
|
|
9216
|
-
function
|
|
9330
|
+
function unwrap49(payload) {
|
|
9217
9331
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
9218
9332
|
return payload.data;
|
|
9219
9333
|
}
|
|
@@ -9256,7 +9370,7 @@ var SandboxTemplates = class {
|
|
|
9256
9370
|
const data = await this.http.get(
|
|
9257
9371
|
`/sandbox-templates/${templateId}`
|
|
9258
9372
|
);
|
|
9259
|
-
return
|
|
9373
|
+
return unwrap49(data);
|
|
9260
9374
|
}
|
|
9261
9375
|
async create(params) {
|
|
9262
9376
|
const {
|
|
@@ -9276,7 +9390,7 @@ var SandboxTemplates = class {
|
|
|
9276
9390
|
body: body5,
|
|
9277
9391
|
headers: { "Idempotency-Key": idempotencyKey8(ikey) }
|
|
9278
9392
|
});
|
|
9279
|
-
return
|
|
9393
|
+
return unwrap49(data);
|
|
9280
9394
|
}
|
|
9281
9395
|
async buildSpecSchema() {
|
|
9282
9396
|
const data = await this.http.get("/sandbox-templates/build-spec");
|
|
@@ -9309,12 +9423,12 @@ var SandboxTemplates = class {
|
|
|
9309
9423
|
headers: { "Idempotency-Key": idempotencyKey8(ikey) }
|
|
9310
9424
|
}
|
|
9311
9425
|
);
|
|
9312
|
-
return
|
|
9426
|
+
return unwrap49(data);
|
|
9313
9427
|
}
|
|
9314
9428
|
};
|
|
9315
9429
|
|
|
9316
9430
|
// src/resources/settings.ts
|
|
9317
|
-
function
|
|
9431
|
+
function unwrap50(payload) {
|
|
9318
9432
|
if (payload && typeof payload === "object") {
|
|
9319
9433
|
const p = payload;
|
|
9320
9434
|
for (const k of [
|
|
@@ -9330,7 +9444,7 @@ function unwrap49(payload) {
|
|
|
9330
9444
|
return payload;
|
|
9331
9445
|
}
|
|
9332
9446
|
function listItems13(payload) {
|
|
9333
|
-
const result =
|
|
9447
|
+
const result = unwrap50(payload);
|
|
9334
9448
|
if (Array.isArray(result)) return result;
|
|
9335
9449
|
return [];
|
|
9336
9450
|
}
|
|
@@ -9347,46 +9461,46 @@ var Settings = class {
|
|
|
9347
9461
|
/** Get the current tenant settings. */
|
|
9348
9462
|
async get() {
|
|
9349
9463
|
const data = await this.http.get("/settings");
|
|
9350
|
-
return
|
|
9464
|
+
return unwrap50(data);
|
|
9351
9465
|
}
|
|
9352
9466
|
/** Update tenant settings. */
|
|
9353
9467
|
async update(params) {
|
|
9354
9468
|
const body5 = stripUndefined28(params);
|
|
9355
9469
|
const data = await this.http.put("/settings", body5);
|
|
9356
|
-
return
|
|
9470
|
+
return unwrap50(data);
|
|
9357
9471
|
}
|
|
9358
9472
|
// ── Branding ──────────────────────────────────────────────────────────────
|
|
9359
9473
|
/** Get tenant branding (logo, colors, custom wordmark). */
|
|
9360
9474
|
async getBranding() {
|
|
9361
9475
|
const data = await this.http.get("/settings/branding");
|
|
9362
|
-
return
|
|
9476
|
+
return unwrap50(data);
|
|
9363
9477
|
}
|
|
9364
9478
|
/** Update tenant branding. */
|
|
9365
9479
|
async updateBranding(params) {
|
|
9366
9480
|
const body5 = stripUndefined28(params);
|
|
9367
9481
|
const data = await this.http.put("/settings/branding", body5);
|
|
9368
|
-
return
|
|
9482
|
+
return unwrap50(data);
|
|
9369
9483
|
}
|
|
9370
9484
|
// ── Read-only reference data ───────────────────────────────────────────────
|
|
9371
9485
|
/** Get tenant-scoped compute pricing. */
|
|
9372
9486
|
async computePricing() {
|
|
9373
9487
|
const data = await this.http.get("/settings/compute-pricing");
|
|
9374
|
-
return
|
|
9488
|
+
return unwrap50(data);
|
|
9375
9489
|
}
|
|
9376
9490
|
/** Get tenant-scoped GPU pricing. */
|
|
9377
9491
|
async gpuPricing() {
|
|
9378
9492
|
const data = await this.http.get("/settings/gpu-pricing");
|
|
9379
|
-
return
|
|
9493
|
+
return unwrap50(data);
|
|
9380
9494
|
}
|
|
9381
9495
|
/** List models available to this tenant. */
|
|
9382
9496
|
async availableModels() {
|
|
9383
9497
|
const data = await this.http.get("/settings/available-models");
|
|
9384
|
-
return
|
|
9498
|
+
return unwrap50(data);
|
|
9385
9499
|
}
|
|
9386
9500
|
/** List regions enabled for this tenant. */
|
|
9387
9501
|
async regions() {
|
|
9388
9502
|
const data = await this.http.get("/settings/regions");
|
|
9389
|
-
return
|
|
9503
|
+
return unwrap50(data);
|
|
9390
9504
|
}
|
|
9391
9505
|
// ── BYOK provider keys ────────────────────────────────────────────────────
|
|
9392
9506
|
/** List tenant-level BYOK provider keys (Anthropic, OpenAI, etc.). */
|
|
@@ -9401,7 +9515,7 @@ var Settings = class {
|
|
|
9401
9515
|
`/settings/provider-keys/${provider}`,
|
|
9402
9516
|
body5
|
|
9403
9517
|
);
|
|
9404
|
-
return
|
|
9518
|
+
return unwrap50(data);
|
|
9405
9519
|
}
|
|
9406
9520
|
/** Delete a BYOK provider key. */
|
|
9407
9521
|
async deleteProviderKey(provider) {
|
|
@@ -9410,7 +9524,7 @@ var Settings = class {
|
|
|
9410
9524
|
};
|
|
9411
9525
|
|
|
9412
9526
|
// src/resources/snapshots-standalone.ts
|
|
9413
|
-
function
|
|
9527
|
+
function unwrap51(data) {
|
|
9414
9528
|
if (data && typeof data === "object") {
|
|
9415
9529
|
const d = data;
|
|
9416
9530
|
for (const k of ["data", "snapshots", "items"]) {
|
|
@@ -9441,14 +9555,14 @@ var SnapshotsStandalone = class {
|
|
|
9441
9555
|
return unwrapList14(await this.http.get("/admin/snapshots", query3));
|
|
9442
9556
|
}
|
|
9443
9557
|
async get(snapshotId) {
|
|
9444
|
-
return
|
|
9558
|
+
return unwrap51(
|
|
9445
9559
|
await this.http.get(`/admin/snapshots/${snapshotId}`)
|
|
9446
9560
|
);
|
|
9447
9561
|
}
|
|
9448
9562
|
};
|
|
9449
9563
|
|
|
9450
9564
|
// src/resources/storage.ts
|
|
9451
|
-
function
|
|
9565
|
+
function unwrap52(payload) {
|
|
9452
9566
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
9453
9567
|
return payload.data;
|
|
9454
9568
|
}
|
|
@@ -9487,11 +9601,11 @@ var Storage = class {
|
|
|
9487
9601
|
...rest
|
|
9488
9602
|
});
|
|
9489
9603
|
const data = await this.http.post("/storage/buckets", body5);
|
|
9490
|
-
return
|
|
9604
|
+
return unwrap52(data);
|
|
9491
9605
|
}
|
|
9492
9606
|
async getBucket(bucketId) {
|
|
9493
9607
|
const data = await this.http.get(`/storage/buckets/${bucketId}`);
|
|
9494
|
-
return
|
|
9608
|
+
return unwrap52(data);
|
|
9495
9609
|
}
|
|
9496
9610
|
async deleteBucket(bucketId) {
|
|
9497
9611
|
await this.http.delete(`/storage/buckets/${bucketId}`);
|
|
@@ -9541,7 +9655,7 @@ var Storage = class {
|
|
|
9541
9655
|
`/storage/buckets/${bucketId}/presign`,
|
|
9542
9656
|
body5
|
|
9543
9657
|
);
|
|
9544
|
-
return
|
|
9658
|
+
return unwrap52(data);
|
|
9545
9659
|
}
|
|
9546
9660
|
};
|
|
9547
9661
|
|
|
@@ -9681,7 +9795,7 @@ var Organizations = class {
|
|
|
9681
9795
|
};
|
|
9682
9796
|
|
|
9683
9797
|
// src/resources/tenant.ts
|
|
9684
|
-
function
|
|
9798
|
+
function unwrap53(payload) {
|
|
9685
9799
|
if (payload && typeof payload === "object") {
|
|
9686
9800
|
const p = payload;
|
|
9687
9801
|
for (const k of ["data", "tenant", "branding", "items"]) {
|
|
@@ -9703,14 +9817,14 @@ var PreviewDomain = class {
|
|
|
9703
9817
|
/** Get the tenant's white-label preview domain settings. */
|
|
9704
9818
|
async get() {
|
|
9705
9819
|
const data = await this.http.get("/tenant/preview-domain");
|
|
9706
|
-
return
|
|
9820
|
+
return unwrap53(data);
|
|
9707
9821
|
}
|
|
9708
9822
|
/** Set the tenant's white-label preview domain. */
|
|
9709
9823
|
async set(domain) {
|
|
9710
9824
|
const data = await this.http.put("/tenant/preview-domain", {
|
|
9711
9825
|
preview_domain: domain
|
|
9712
9826
|
});
|
|
9713
|
-
return
|
|
9827
|
+
return unwrap53(data);
|
|
9714
9828
|
}
|
|
9715
9829
|
/** Re-run DNS verification for the configured preview domain. */
|
|
9716
9830
|
async verify() {
|
|
@@ -9718,7 +9832,7 @@ var PreviewDomain = class {
|
|
|
9718
9832
|
"/tenant/preview-domain/verify",
|
|
9719
9833
|
{}
|
|
9720
9834
|
);
|
|
9721
|
-
return
|
|
9835
|
+
return unwrap53(data);
|
|
9722
9836
|
}
|
|
9723
9837
|
/** Remove the tenant's custom preview domain. */
|
|
9724
9838
|
async delete() {
|
|
@@ -9733,14 +9847,14 @@ var Branding = class {
|
|
|
9733
9847
|
/** Get tenant branding used by white-label hosted surfaces. */
|
|
9734
9848
|
async get() {
|
|
9735
9849
|
const data = await this.http.get("/tenant/branding");
|
|
9736
|
-
return
|
|
9850
|
+
return unwrap53(data);
|
|
9737
9851
|
}
|
|
9738
9852
|
/** Update tenant branding used by white-label hosted surfaces. */
|
|
9739
9853
|
async set(params) {
|
|
9740
9854
|
const data = await this.http.put("/tenant/branding", {
|
|
9741
9855
|
branding: stripUndefined30(params)
|
|
9742
9856
|
});
|
|
9743
|
-
return
|
|
9857
|
+
return unwrap53(data);
|
|
9744
9858
|
}
|
|
9745
9859
|
/** Reset tenant branding to platform defaults. */
|
|
9746
9860
|
async delete() {
|
|
@@ -9762,7 +9876,7 @@ var Tenant = class {
|
|
|
9762
9876
|
/** Get the current tenant's plan, limits, and live usage counters. */
|
|
9763
9877
|
async current() {
|
|
9764
9878
|
const data = await this.http.get("/tenant/plan");
|
|
9765
|
-
return
|
|
9879
|
+
return unwrap53(data);
|
|
9766
9880
|
}
|
|
9767
9881
|
/** Convenience alias for `tenant.branding.get()`. */
|
|
9768
9882
|
async getBranding() {
|
|
@@ -9823,7 +9937,7 @@ var Templates = class {
|
|
|
9823
9937
|
};
|
|
9824
9938
|
|
|
9825
9939
|
// src/resources/usage.ts
|
|
9826
|
-
function
|
|
9940
|
+
function unwrap54(payload) {
|
|
9827
9941
|
if (payload && typeof payload === "object") {
|
|
9828
9942
|
const p = payload;
|
|
9829
9943
|
for (const k of ["data", "usage", "sessions", "summary", "items"]) {
|
|
@@ -9845,13 +9959,13 @@ var Usage = class {
|
|
|
9845
9959
|
/** Get the current period usage summary. */
|
|
9846
9960
|
async current() {
|
|
9847
9961
|
const data = await this.http.get("/usage/summary");
|
|
9848
|
-
return
|
|
9962
|
+
return unwrap54(data);
|
|
9849
9963
|
}
|
|
9850
9964
|
/** List per-session metering events. */
|
|
9851
9965
|
async sessions(params = {}) {
|
|
9852
9966
|
const query3 = stripUndefined31(params);
|
|
9853
9967
|
const data = await this.http.get("/usage/sessions", query3);
|
|
9854
|
-
const result =
|
|
9968
|
+
const result = unwrap54(data);
|
|
9855
9969
|
if (Array.isArray(result)) return result;
|
|
9856
9970
|
return [];
|
|
9857
9971
|
}
|
|
@@ -9859,10 +9973,10 @@ var Usage = class {
|
|
|
9859
9973
|
async report(params = {}) {
|
|
9860
9974
|
const query3 = stripUndefined31(params);
|
|
9861
9975
|
const data = await this.http.get("/usage/summary", query3);
|
|
9862
|
-
return
|
|
9976
|
+
return unwrap54(data);
|
|
9863
9977
|
}
|
|
9864
9978
|
};
|
|
9865
|
-
function
|
|
9979
|
+
function unwrap55(payload) {
|
|
9866
9980
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
9867
9981
|
return payload.data;
|
|
9868
9982
|
}
|
|
@@ -9898,7 +10012,7 @@ var Volumes = class {
|
|
|
9898
10012
|
}
|
|
9899
10013
|
async get(volumeId) {
|
|
9900
10014
|
const data = await this.http.get(`/volumes/${volumeId}`);
|
|
9901
|
-
return
|
|
10015
|
+
return unwrap55(data);
|
|
9902
10016
|
}
|
|
9903
10017
|
async create(params) {
|
|
9904
10018
|
const { idempotencyKey: ikey, sizeGb, ...rest } = params;
|
|
@@ -9911,7 +10025,7 @@ var Volumes = class {
|
|
|
9911
10025
|
body: body5,
|
|
9912
10026
|
headers: { "Idempotency-Key": idempotencyKey9(ikey) }
|
|
9913
10027
|
});
|
|
9914
|
-
return
|
|
10028
|
+
return unwrap55(data);
|
|
9915
10029
|
}
|
|
9916
10030
|
async delete(volumeId) {
|
|
9917
10031
|
await this.http.delete(`/volumes/${volumeId}`);
|
|
@@ -9942,7 +10056,7 @@ var Volumes = class {
|
|
|
9942
10056
|
`/computers/${computerId}/volumes`,
|
|
9943
10057
|
body5
|
|
9944
10058
|
);
|
|
9945
|
-
return
|
|
10059
|
+
return unwrap55(data);
|
|
9946
10060
|
}
|
|
9947
10061
|
async detach(computerId, attachmentId) {
|
|
9948
10062
|
await this.http.delete(
|
|
@@ -9950,7 +10064,7 @@ var Volumes = class {
|
|
|
9950
10064
|
);
|
|
9951
10065
|
}
|
|
9952
10066
|
};
|
|
9953
|
-
function
|
|
10067
|
+
function unwrap56(payload) {
|
|
9954
10068
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
9955
10069
|
return payload.data;
|
|
9956
10070
|
}
|
|
@@ -10017,7 +10131,7 @@ var Webhooks = class {
|
|
|
10017
10131
|
}
|
|
10018
10132
|
async get(webhookId) {
|
|
10019
10133
|
const data = await this.http.get(`/webhooks/${webhookId}`);
|
|
10020
|
-
return
|
|
10134
|
+
return unwrap56(data);
|
|
10021
10135
|
}
|
|
10022
10136
|
async create(params) {
|
|
10023
10137
|
const { idempotencyKey: ikey, ...rest } = params;
|
|
@@ -10027,12 +10141,12 @@ var Webhooks = class {
|
|
|
10027
10141
|
body: body5,
|
|
10028
10142
|
headers: { "Idempotency-Key": idempotencyKey10(ikey) }
|
|
10029
10143
|
});
|
|
10030
|
-
return
|
|
10144
|
+
return unwrap56(data);
|
|
10031
10145
|
}
|
|
10032
10146
|
async update(webhookId, params) {
|
|
10033
10147
|
const body5 = stripUndefined33(params);
|
|
10034
10148
|
const data = await this.http.patch(`/webhooks/${webhookId}`, body5);
|
|
10035
|
-
return
|
|
10149
|
+
return unwrap56(data);
|
|
10036
10150
|
}
|
|
10037
10151
|
async delete(webhookId) {
|
|
10038
10152
|
await this.http.delete(`/webhooks/${webhookId}`);
|
|
@@ -10045,7 +10159,7 @@ var Webhooks = class {
|
|
|
10045
10159
|
headers: { "Idempotency-Key": idempotencyKey10(opts.idempotencyKey) }
|
|
10046
10160
|
}
|
|
10047
10161
|
);
|
|
10048
|
-
return
|
|
10162
|
+
return unwrap56(data);
|
|
10049
10163
|
}
|
|
10050
10164
|
async deliveries(webhookId) {
|
|
10051
10165
|
const data = await this.http.get(
|
|
@@ -10268,6 +10382,8 @@ var Miosa = class {
|
|
|
10268
10382
|
agentRunGroups;
|
|
10269
10383
|
/** Agent runtime profiles — tenant/workspace defaults for sandbox/computer agents. */
|
|
10270
10384
|
agentRuntimeProfiles;
|
|
10385
|
+
/** Persisted workspace Agent definitions and immutable versions. */
|
|
10386
|
+
agents;
|
|
10271
10387
|
/** MIOSA Connect — provider connectors and runtime tokens. */
|
|
10272
10388
|
connectors;
|
|
10273
10389
|
/** Inherited runtime env — tenant/workspace/project defaults for agent runtimes. */
|
|
@@ -10393,6 +10509,7 @@ var Miosa = class {
|
|
|
10393
10509
|
this.agentRuns = new AgentRuns(this.http);
|
|
10394
10510
|
this.agentRunGroups = new AgentRunGroups(this.http);
|
|
10395
10511
|
this.agentRuntimeProfiles = new AgentRuntimeProfiles(this.http);
|
|
10512
|
+
this.agents = new AgentDefinitions(this.http);
|
|
10396
10513
|
this.connectors = new Connectors(this.http);
|
|
10397
10514
|
this.runtimeEnv = new RuntimeEnv(this.http);
|
|
10398
10515
|
this.runtimeCapabilities = new RuntimeCapabilitiesResource(this.http);
|
|
@@ -10919,6 +11036,6 @@ var AppAuth = class {
|
|
|
10919
11036
|
}
|
|
10920
11037
|
};
|
|
10921
11038
|
|
|
10922
|
-
export { AGENT_BUILD_KIND_SPECS, Admin, AgentRuntimeProfiles, Analytics, ApiKeys, AppAuth, AppDocuments, AuditLog, AuthError, Benchmarks, BuilderSessions, Channels, Checkpoints, Cloud, CommandCenter, Community, Completions, Computer, ComputerAudit, ComputerAutoStop, ComputerConnectors, ComputerEnv, ComputerInbox, ComputerLogs, ComputerNetwork, ComputerOsa, ComputerPorts, ComputerSecrets, ComputerTerminal, ComputerVolumes, Computers, Connectors, Credits, CronJobs, DEFAULT_AGENT_BUILD_OUTPUT_ROOT, DEFAULT_AGENT_BUILD_PACKET_VERSION, Dashboard, Databases, DeploymentConnectors, DeploymentDomains, DeploymentReleases, DeploymentRuntimeInstances, DeploymentVersions, Deployments, Desktop, Devices, DockerDeploy, EgressAudit, EgressHostNotAllowedError, EgressNetwork, EgressSecrets, Email, EmailCampaigns, EmailInbox, EmailTemplates, Embeddings, Exec, ExternalKeys, Files, FlatCustomDomains, Functions, HealthChecks, InstallationRequiredError, InsufficientCreditsError, Integrations, ManagedProviderBindingOnlyError, Mcp, Miosa, MiosaError, Models, NetworkError, NetworkPolicy, NotFoundError, OAuthFlow, OpenComputers, OrgInvites, OrganizationMembers, Organizations, ProjectAuth, ProjectIntegrations, ProjectNotLinkedError, ProviderDefaults, RateLimitError, Regions, RunGroups, Runs, RuntimeCapabilitiesResource, RuntimeEnv, SANDBOX_TEMPLATE, Sandbox, SandboxAudit, SandboxCommands, SandboxConnectors, SandboxEnv, SandboxEvents, SandboxFiles, SandboxNetwork, SandboxPreview, SandboxPreviews, SandboxSecrets, SandboxTags, SandboxTemplates, SandboxTerminal, Sandboxes, ScopeNotAllowedError, ScopedFs, Settings, SnapshotsStandalone, Storage, SubjectNotAllowedError, Templates, Tenant, TimeoutError, TokenRefreshFailedError, Usage, UserAuthorizationRequiredError, ValidationError, Volumes, Webhooks, WorkspaceInvites, WorkspaceMembers, createAgentBuildExecutionPacket, createAgentBuildExpectedOutputs, createAgentBuildPrompt, createBuildRunParams, getAgentBuildKindSpec, resolveAgentBuildKind, verifySignature };
|
|
11039
|
+
export { AGENT_BUILD_KIND_SPECS, Admin, AgentDefinitions, AgentRuntimeProfiles, Analytics, ApiKeys, AppAuth, AppDocuments, AuditLog, AuthError, Benchmarks, BuilderSessions, Channels, Checkpoints, Cloud, CommandCenter, Community, Completions, Computer, ComputerAudit, ComputerAutoStop, ComputerConnectors, ComputerEnv, ComputerInbox, ComputerLogs, ComputerNetwork, ComputerOsa, ComputerPorts, ComputerSecrets, ComputerTerminal, ComputerVolumes, Computers, Connectors, Credits, CronJobs, DEFAULT_AGENT_BUILD_OUTPUT_ROOT, DEFAULT_AGENT_BUILD_PACKET_VERSION, Dashboard, Databases, DeploymentConnectors, DeploymentDomains, DeploymentReleases, DeploymentRuntimeInstances, DeploymentVersions, Deployments, Desktop, Devices, DockerDeploy, EgressAudit, EgressHostNotAllowedError, EgressNetwork, EgressSecrets, Email, EmailCampaigns, EmailInbox, EmailTemplates, Embeddings, Exec, ExternalKeys, Files, FlatCustomDomains, Functions, HealthChecks, InstallationRequiredError, InsufficientCreditsError, Integrations, ManagedProviderBindingOnlyError, Mcp, Miosa, MiosaError, Models, NetworkError, NetworkPolicy, NotFoundError, OAuthFlow, OpenComputers, OrgInvites, OrganizationMembers, Organizations, ProjectAuth, ProjectIntegrations, ProjectNotLinkedError, ProviderDefaults, RateLimitError, Regions, RunGroups, Runs, RuntimeCapabilitiesResource, RuntimeEnv, SANDBOX_TEMPLATE, Sandbox, SandboxAudit, SandboxCommands, SandboxConnectors, SandboxEnv, SandboxEvents, SandboxFiles, SandboxNetwork, SandboxPreview, SandboxPreviews, SandboxSecrets, SandboxTags, SandboxTemplates, SandboxTerminal, Sandboxes, ScopeNotAllowedError, ScopedFs, Settings, SnapshotsStandalone, Storage, SubjectNotAllowedError, Templates, Tenant, TimeoutError, TokenRefreshFailedError, Usage, UserAuthorizationRequiredError, ValidationError, Volumes, Webhooks, WorkspaceInvites, WorkspaceMembers, createAgentBuildExecutionPacket, createAgentBuildExpectedOutputs, createAgentBuildPrompt, createBuildRunParams, getAgentBuildKindSpec, resolveAgentBuildKind, verifySignature };
|
|
10923
11040
|
//# sourceMappingURL=index.js.map
|
|
10924
11041
|
//# sourceMappingURL=index.js.map
|