@miosa/sdk 2.0.1 → 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 +57 -0
- package/dist/index.d.ts +277 -1
- package/dist/index.js +607 -299
- package/dist/index.js.map +1 -1
- package/package.json +15 -14
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
|
}
|
|
@@ -1524,8 +1588,190 @@ var ApiKeys = class {
|
|
|
1524
1588
|
}
|
|
1525
1589
|
};
|
|
1526
1590
|
|
|
1591
|
+
// src/resources/app-documents.ts
|
|
1592
|
+
function unwrap9(payload) {
|
|
1593
|
+
return payload && typeof payload === "object" && "data" in payload ? payload.data : payload;
|
|
1594
|
+
}
|
|
1595
|
+
var AppDocuments = class {
|
|
1596
|
+
constructor(http) {
|
|
1597
|
+
this.http = http;
|
|
1598
|
+
}
|
|
1599
|
+
http;
|
|
1600
|
+
async list(workspaceId2) {
|
|
1601
|
+
const payload = await this.http.get(
|
|
1602
|
+
"/builder/apps",
|
|
1603
|
+
{ workspace_id: workspaceId2 }
|
|
1604
|
+
);
|
|
1605
|
+
return payload.data;
|
|
1606
|
+
}
|
|
1607
|
+
async get(id) {
|
|
1608
|
+
return unwrap9(
|
|
1609
|
+
await this.http.get(
|
|
1610
|
+
`/builder/apps/${id}`
|
|
1611
|
+
)
|
|
1612
|
+
);
|
|
1613
|
+
}
|
|
1614
|
+
async create(params) {
|
|
1615
|
+
const { workspaceId: workspaceId2, ...body5 } = params;
|
|
1616
|
+
return unwrap9(
|
|
1617
|
+
await this.http.post(
|
|
1618
|
+
"/builder/apps",
|
|
1619
|
+
{ ...body5, workspace_id: workspaceId2 }
|
|
1620
|
+
)
|
|
1621
|
+
);
|
|
1622
|
+
}
|
|
1623
|
+
async update(id, params) {
|
|
1624
|
+
return unwrap9(
|
|
1625
|
+
await this.http.patch(`/builder/apps/${id}`, params)
|
|
1626
|
+
);
|
|
1627
|
+
}
|
|
1628
|
+
async archive(id) {
|
|
1629
|
+
await this.http.delete(`/builder/apps/${id}`);
|
|
1630
|
+
}
|
|
1631
|
+
async diagnostics(id) {
|
|
1632
|
+
return unwrap9(
|
|
1633
|
+
await this.http.get(`/builder/apps/${id}/diagnostics`)
|
|
1634
|
+
);
|
|
1635
|
+
}
|
|
1636
|
+
async stageCandidate(id) {
|
|
1637
|
+
return unwrap9(
|
|
1638
|
+
await this.http.post(`/builder/apps/${id}/candidates`, {})
|
|
1639
|
+
);
|
|
1640
|
+
}
|
|
1641
|
+
async approveExactVersion(id, releaseId, reason) {
|
|
1642
|
+
return unwrap9(
|
|
1643
|
+
await this.http.post(`/builder/apps/${id}/approvals`, {
|
|
1644
|
+
reason,
|
|
1645
|
+
release_id: releaseId
|
|
1646
|
+
})
|
|
1647
|
+
);
|
|
1648
|
+
}
|
|
1649
|
+
async publishExactRelease(id) {
|
|
1650
|
+
const payload = await this.http.post(`/builder/apps/${id}/publish`, {});
|
|
1651
|
+
return unwrap9(payload).app;
|
|
1652
|
+
}
|
|
1653
|
+
async listData(id, collection) {
|
|
1654
|
+
const payload = await this.http.get(
|
|
1655
|
+
`/builder/apps/${encodeURIComponent(id)}/data/${encodeURIComponent(collection)}`
|
|
1656
|
+
);
|
|
1657
|
+
return payload.data;
|
|
1658
|
+
}
|
|
1659
|
+
async getData(id, collection, key) {
|
|
1660
|
+
return unwrap9(
|
|
1661
|
+
await this.http.get(
|
|
1662
|
+
`/builder/apps/${encodeURIComponent(id)}/data/${encodeURIComponent(collection)}/${encodeURIComponent(key)}`
|
|
1663
|
+
)
|
|
1664
|
+
);
|
|
1665
|
+
}
|
|
1666
|
+
async putData(id, collection, key, value, expectedVersion) {
|
|
1667
|
+
return unwrap9(
|
|
1668
|
+
await this.http.put(
|
|
1669
|
+
`/builder/apps/${encodeURIComponent(id)}/data/${encodeURIComponent(collection)}/${encodeURIComponent(key)}`,
|
|
1670
|
+
{ value, expected_version: expectedVersion }
|
|
1671
|
+
)
|
|
1672
|
+
);
|
|
1673
|
+
}
|
|
1674
|
+
async deleteData(id, collection, key, expectedVersion) {
|
|
1675
|
+
const suffix = expectedVersion === void 0 ? "" : `?expected_version=${encodeURIComponent(String(expectedVersion))}`;
|
|
1676
|
+
await this.http.delete(
|
|
1677
|
+
`/builder/apps/${encodeURIComponent(id)}/data/${encodeURIComponent(collection)}/${encodeURIComponent(key)}${suffix}`
|
|
1678
|
+
);
|
|
1679
|
+
}
|
|
1680
|
+
async authorizeAction(id, input) {
|
|
1681
|
+
return this.http.request(
|
|
1682
|
+
`/actions/apps/${encodeURIComponent(id)}/authorize`,
|
|
1683
|
+
{
|
|
1684
|
+
method: "POST",
|
|
1685
|
+
headers: {
|
|
1686
|
+
"x-miosa-app-callback-token": input.callbackToken
|
|
1687
|
+
},
|
|
1688
|
+
body: {
|
|
1689
|
+
release_id: input.releaseId,
|
|
1690
|
+
capability: input.capability,
|
|
1691
|
+
request_fingerprint: input.requestFingerprint,
|
|
1692
|
+
params_fingerprint: input.paramsFingerprint,
|
|
1693
|
+
connector_id: input.connectorId
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
);
|
|
1697
|
+
}
|
|
1698
|
+
async mintRuntimeToken(id) {
|
|
1699
|
+
return unwrap9(
|
|
1700
|
+
await this.http.post(
|
|
1701
|
+
`/builder/apps/${encodeURIComponent(id)}/runtime-token`,
|
|
1702
|
+
{}
|
|
1703
|
+
)
|
|
1704
|
+
);
|
|
1705
|
+
}
|
|
1706
|
+
async resolveBinding(id, bindingId, receiptId, callbackToken) {
|
|
1707
|
+
return unwrap9(
|
|
1708
|
+
await this.http.request(
|
|
1709
|
+
`/builder/apps/${encodeURIComponent(id)}/runtime/bindings/${encodeURIComponent(bindingId)}?receipt_id=${encodeURIComponent(receiptId)}`,
|
|
1710
|
+
{
|
|
1711
|
+
method: "GET",
|
|
1712
|
+
headers: {
|
|
1713
|
+
"x-miosa-app-callback-token": callbackToken
|
|
1714
|
+
}
|
|
1715
|
+
}
|
|
1716
|
+
)
|
|
1717
|
+
);
|
|
1718
|
+
}
|
|
1719
|
+
async listAutomationRuns(id) {
|
|
1720
|
+
const payload = await this.http.get(
|
|
1721
|
+
`/builder/apps/${encodeURIComponent(id)}/automation-runs`
|
|
1722
|
+
);
|
|
1723
|
+
return payload.data;
|
|
1724
|
+
}
|
|
1725
|
+
async startAutomationRun(id, automationId, trigger = {}) {
|
|
1726
|
+
return unwrap9(
|
|
1727
|
+
await this.http.post(
|
|
1728
|
+
`/builder/apps/${encodeURIComponent(id)}/automations/${encodeURIComponent(automationId)}/runs`,
|
|
1729
|
+
{ trigger }
|
|
1730
|
+
)
|
|
1731
|
+
);
|
|
1732
|
+
}
|
|
1733
|
+
async claimAutomationStep(id, runId) {
|
|
1734
|
+
return unwrap9(
|
|
1735
|
+
await this.http.post(
|
|
1736
|
+
`/builder/apps/${encodeURIComponent(id)}/automation-runs/${encodeURIComponent(runId)}/claim`,
|
|
1737
|
+
{}
|
|
1738
|
+
)
|
|
1739
|
+
);
|
|
1740
|
+
}
|
|
1741
|
+
async completeAutomationStep(id, runId, cursor, idempotencyKey11, output = null) {
|
|
1742
|
+
return unwrap9(
|
|
1743
|
+
await this.http.post(
|
|
1744
|
+
`/builder/apps/${encodeURIComponent(id)}/automation-runs/${encodeURIComponent(runId)}/complete`,
|
|
1745
|
+
{
|
|
1746
|
+
cursor,
|
|
1747
|
+
idempotency_key: idempotencyKey11,
|
|
1748
|
+
output
|
|
1749
|
+
}
|
|
1750
|
+
)
|
|
1751
|
+
);
|
|
1752
|
+
}
|
|
1753
|
+
async failAutomationStep(id, runId, cursor, idempotencyKey11, reason) {
|
|
1754
|
+
return unwrap9(
|
|
1755
|
+
await this.http.post(
|
|
1756
|
+
`/builder/apps/${encodeURIComponent(id)}/automation-runs/${encodeURIComponent(runId)}/fail`,
|
|
1757
|
+
{
|
|
1758
|
+
cursor,
|
|
1759
|
+
idempotency_key: idempotencyKey11,
|
|
1760
|
+
reason
|
|
1761
|
+
}
|
|
1762
|
+
)
|
|
1763
|
+
);
|
|
1764
|
+
}
|
|
1765
|
+
async revokeApproval(id, approvalId) {
|
|
1766
|
+
await this.http.post(
|
|
1767
|
+
`/builder/apps/${id}/approvals/${approvalId}/revoke`,
|
|
1768
|
+
{}
|
|
1769
|
+
);
|
|
1770
|
+
}
|
|
1771
|
+
};
|
|
1772
|
+
|
|
1527
1773
|
// src/resources/audit-log.ts
|
|
1528
|
-
function
|
|
1774
|
+
function unwrap10(payload) {
|
|
1529
1775
|
if (payload && typeof payload === "object") {
|
|
1530
1776
|
const p = payload;
|
|
1531
1777
|
for (const k of ["data", "audit_log", "events", "items"]) {
|
|
@@ -1548,14 +1794,14 @@ var AuditLog = class {
|
|
|
1548
1794
|
async list(params = {}) {
|
|
1549
1795
|
const query3 = stripUndefined7(params);
|
|
1550
1796
|
const data = await this.http.get("/audit-log", query3);
|
|
1551
|
-
const result =
|
|
1797
|
+
const result = unwrap10(data);
|
|
1552
1798
|
if (Array.isArray(result)) return result;
|
|
1553
1799
|
return [];
|
|
1554
1800
|
}
|
|
1555
1801
|
};
|
|
1556
1802
|
|
|
1557
1803
|
// src/resources/benchmarks.ts
|
|
1558
|
-
function
|
|
1804
|
+
function unwrap11(data) {
|
|
1559
1805
|
if (data && typeof data === "object") {
|
|
1560
1806
|
const d = data;
|
|
1561
1807
|
for (const k of ["data", "benchmarks", "samples", "items"]) {
|
|
@@ -1587,7 +1833,7 @@ var Benchmarks = class {
|
|
|
1587
1833
|
return unwrapList(data);
|
|
1588
1834
|
}
|
|
1589
1835
|
async get(benchmarkId) {
|
|
1590
|
-
return
|
|
1836
|
+
return unwrap11(
|
|
1591
1837
|
await this.http.get(`/admin/benchmarks/${benchmarkId}`)
|
|
1592
1838
|
);
|
|
1593
1839
|
}
|
|
@@ -1596,10 +1842,10 @@ var Benchmarks = class {
|
|
|
1596
1842
|
const body5 = Object.fromEntries(
|
|
1597
1843
|
Object.entries(params).filter(([, v]) => v !== void 0)
|
|
1598
1844
|
);
|
|
1599
|
-
return
|
|
1845
|
+
return unwrap11(await this.http.post("/admin/benchmarks", body5));
|
|
1600
1846
|
}
|
|
1601
1847
|
async cancel(benchmarkId) {
|
|
1602
|
-
return
|
|
1848
|
+
return unwrap11(
|
|
1603
1849
|
await this.http.post(`/admin/benchmarks/${benchmarkId}/cancel`)
|
|
1604
1850
|
);
|
|
1605
1851
|
}
|
|
@@ -1619,14 +1865,14 @@ var Benchmarks = class {
|
|
|
1619
1865
|
const body5 = Object.fromEntries(
|
|
1620
1866
|
Object.entries(params).filter(([, v]) => v !== void 0)
|
|
1621
1867
|
);
|
|
1622
|
-
return
|
|
1868
|
+
return unwrap11(
|
|
1623
1869
|
await this.http.post("/admin/benchmarks/compare", body5)
|
|
1624
1870
|
);
|
|
1625
1871
|
}
|
|
1626
1872
|
};
|
|
1627
1873
|
|
|
1628
1874
|
// src/resources/builder-sessions.ts
|
|
1629
|
-
function
|
|
1875
|
+
function unwrap12(data) {
|
|
1630
1876
|
if (data && typeof data === "object") {
|
|
1631
1877
|
const d = data;
|
|
1632
1878
|
for (const k of ["data", "sessions", "items"]) {
|
|
@@ -1663,7 +1909,7 @@ var BuilderSessions = class {
|
|
|
1663
1909
|
return all.find((s) => s.id === sessionId) ?? {};
|
|
1664
1910
|
}
|
|
1665
1911
|
async updateTitle(sessionId, title) {
|
|
1666
|
-
return
|
|
1912
|
+
return unwrap12(
|
|
1667
1913
|
await this.http.patch(`/builder/sessions/${sessionId}/title`, {
|
|
1668
1914
|
title
|
|
1669
1915
|
})
|
|
@@ -1675,7 +1921,7 @@ var BuilderSessions = class {
|
|
|
1675
1921
|
};
|
|
1676
1922
|
|
|
1677
1923
|
// src/resources/channels.ts
|
|
1678
|
-
function
|
|
1924
|
+
function unwrap13(payload) {
|
|
1679
1925
|
if (payload && typeof payload === "object") {
|
|
1680
1926
|
const p = payload;
|
|
1681
1927
|
for (const k of ["data", "channels", "notifications", "items"]) {
|
|
@@ -1703,26 +1949,26 @@ var Channels = class {
|
|
|
1703
1949
|
async list(params = {}) {
|
|
1704
1950
|
const query3 = stripUndefined8(params);
|
|
1705
1951
|
const data = await this.http.get("/channels", query3);
|
|
1706
|
-
const result =
|
|
1952
|
+
const result = unwrap13(data);
|
|
1707
1953
|
if (Array.isArray(result)) return result;
|
|
1708
1954
|
return [];
|
|
1709
1955
|
}
|
|
1710
1956
|
/** Get a single channel. */
|
|
1711
1957
|
async get(channelId) {
|
|
1712
1958
|
const data = await this.http.get(`/channels/${channelId}`);
|
|
1713
|
-
return
|
|
1959
|
+
return unwrap13(data);
|
|
1714
1960
|
}
|
|
1715
1961
|
/** Create a new channel. */
|
|
1716
1962
|
async create(params) {
|
|
1717
1963
|
const body5 = stripUndefObj(params);
|
|
1718
1964
|
const data = await this.http.post("/channels", body5);
|
|
1719
|
-
return
|
|
1965
|
+
return unwrap13(data);
|
|
1720
1966
|
}
|
|
1721
1967
|
/** Update a channel. */
|
|
1722
1968
|
async update(channelId, params) {
|
|
1723
1969
|
const body5 = stripUndefObj(params);
|
|
1724
1970
|
const data = await this.http.patch(`/channels/${channelId}`, body5);
|
|
1725
|
-
return
|
|
1971
|
+
return unwrap13(data);
|
|
1726
1972
|
}
|
|
1727
1973
|
/** Delete a channel. */
|
|
1728
1974
|
async delete(channelId) {
|
|
@@ -1732,30 +1978,30 @@ var Channels = class {
|
|
|
1732
1978
|
/** Get notification preferences across all channels. */
|
|
1733
1979
|
async listNotifications() {
|
|
1734
1980
|
const data = await this.http.get("/channels/notifications");
|
|
1735
|
-
return
|
|
1981
|
+
return unwrap13(data);
|
|
1736
1982
|
}
|
|
1737
1983
|
/** Update notification preferences. */
|
|
1738
1984
|
async updateNotifications(params) {
|
|
1739
1985
|
const body5 = stripUndefObj(params);
|
|
1740
1986
|
const data = await this.http.put("/channels/notifications", body5);
|
|
1741
|
-
return
|
|
1987
|
+
return unwrap13(data);
|
|
1742
1988
|
}
|
|
1743
1989
|
/** Enable a channel. */
|
|
1744
1990
|
async enable(channelId) {
|
|
1745
1991
|
const data = await this.http.post(`/channels/${channelId}/enable`);
|
|
1746
|
-
return
|
|
1992
|
+
return unwrap13(data);
|
|
1747
1993
|
}
|
|
1748
1994
|
/** Disable a channel. */
|
|
1749
1995
|
async disable(channelId) {
|
|
1750
1996
|
const data = await this.http.post(
|
|
1751
1997
|
`/channels/${channelId}/disable`
|
|
1752
1998
|
);
|
|
1753
|
-
return
|
|
1999
|
+
return unwrap13(data);
|
|
1754
2000
|
}
|
|
1755
2001
|
};
|
|
1756
2002
|
|
|
1757
2003
|
// src/resources/cloud.ts
|
|
1758
|
-
function
|
|
2004
|
+
function unwrap14(payload) {
|
|
1759
2005
|
if (payload !== null && typeof payload === "object" && "data" in payload && payload.data !== void 0) {
|
|
1760
2006
|
return payload.data;
|
|
1761
2007
|
}
|
|
@@ -1830,12 +2076,12 @@ var Cloud = class {
|
|
|
1830
2076
|
}
|
|
1831
2077
|
http;
|
|
1832
2078
|
async listAccounts() {
|
|
1833
|
-
return
|
|
2079
|
+
return unwrap14(
|
|
1834
2080
|
await this.http.get("/cloud/accounts")
|
|
1835
2081
|
);
|
|
1836
2082
|
}
|
|
1837
2083
|
async createAccount(params) {
|
|
1838
|
-
return
|
|
2084
|
+
return unwrap14(
|
|
1839
2085
|
await this.http.post(
|
|
1840
2086
|
"/cloud/accounts",
|
|
1841
2087
|
accountBody(params)
|
|
@@ -1843,7 +2089,7 @@ var Cloud = class {
|
|
|
1843
2089
|
);
|
|
1844
2090
|
}
|
|
1845
2091
|
async attachAwsRole(id, params) {
|
|
1846
|
-
return
|
|
2092
|
+
return unwrap14(
|
|
1847
2093
|
await this.http.post(
|
|
1848
2094
|
`/cloud/accounts/${encodeURIComponent(id)}/aws/role`,
|
|
1849
2095
|
stripUndefined9({
|
|
@@ -1854,7 +2100,7 @@ var Cloud = class {
|
|
|
1854
2100
|
);
|
|
1855
2101
|
}
|
|
1856
2102
|
async listRegions(params = {}) {
|
|
1857
|
-
return
|
|
2103
|
+
return unwrap14(
|
|
1858
2104
|
await this.http.get(
|
|
1859
2105
|
"/cloud/regions",
|
|
1860
2106
|
query(params)
|
|
@@ -1862,7 +2108,7 @@ var Cloud = class {
|
|
|
1862
2108
|
);
|
|
1863
2109
|
}
|
|
1864
2110
|
async createRegion(params) {
|
|
1865
|
-
return
|
|
2111
|
+
return unwrap14(
|
|
1866
2112
|
await this.http.post(
|
|
1867
2113
|
"/cloud/regions",
|
|
1868
2114
|
regionBody(params)
|
|
@@ -1870,12 +2116,12 @@ var Cloud = class {
|
|
|
1870
2116
|
);
|
|
1871
2117
|
}
|
|
1872
2118
|
async listPools(params = {}) {
|
|
1873
|
-
return
|
|
2119
|
+
return unwrap14(
|
|
1874
2120
|
await this.http.get("/cloud/pools", query(params))
|
|
1875
2121
|
);
|
|
1876
2122
|
}
|
|
1877
2123
|
async createPool(params) {
|
|
1878
|
-
return
|
|
2124
|
+
return unwrap14(
|
|
1879
2125
|
await this.http.post(
|
|
1880
2126
|
"/cloud/pools",
|
|
1881
2127
|
poolBody(params)
|
|
@@ -1883,7 +2129,7 @@ var Cloud = class {
|
|
|
1883
2129
|
);
|
|
1884
2130
|
}
|
|
1885
2131
|
async listPreflights(params = {}) {
|
|
1886
|
-
return
|
|
2132
|
+
return unwrap14(
|
|
1887
2133
|
await this.http.get(
|
|
1888
2134
|
"/cloud/preflights",
|
|
1889
2135
|
query(params)
|
|
@@ -1891,7 +2137,7 @@ var Cloud = class {
|
|
|
1891
2137
|
);
|
|
1892
2138
|
}
|
|
1893
2139
|
async recordPreflight(params) {
|
|
1894
|
-
return
|
|
2140
|
+
return unwrap14(
|
|
1895
2141
|
await this.http.post(
|
|
1896
2142
|
"/cloud/preflights",
|
|
1897
2143
|
preflightBody(params)
|
|
@@ -1901,7 +2147,7 @@ var Cloud = class {
|
|
|
1901
2147
|
};
|
|
1902
2148
|
|
|
1903
2149
|
// src/resources/command-center.ts
|
|
1904
|
-
function
|
|
2150
|
+
function unwrap15(data) {
|
|
1905
2151
|
if (data && typeof data === "object") {
|
|
1906
2152
|
const d = data;
|
|
1907
2153
|
for (const k of [
|
|
@@ -1935,7 +2181,7 @@ var CommandCenter = class {
|
|
|
1935
2181
|
http;
|
|
1936
2182
|
/** Top-level snapshot (GET /command-center). */
|
|
1937
2183
|
async overview() {
|
|
1938
|
-
return
|
|
2184
|
+
return unwrap15(await this.http.get("/command-center"));
|
|
1939
2185
|
}
|
|
1940
2186
|
async agents() {
|
|
1941
2187
|
return unwrapList3(await this.http.get("/command-center/agents"));
|
|
@@ -1946,13 +2192,13 @@ var CommandCenter = class {
|
|
|
1946
2192
|
);
|
|
1947
2193
|
}
|
|
1948
2194
|
async metrics() {
|
|
1949
|
-
return
|
|
2195
|
+
return unwrap15(await this.http.get("/command-center/metrics"));
|
|
1950
2196
|
}
|
|
1951
2197
|
async presets() {
|
|
1952
2198
|
return unwrapList3(await this.http.get("/command-center/presets"));
|
|
1953
2199
|
}
|
|
1954
2200
|
async tiers() {
|
|
1955
|
-
return
|
|
2201
|
+
return unwrap15(await this.http.get("/command-center/tiers"));
|
|
1956
2202
|
}
|
|
1957
2203
|
/** Stream live command-center events via SSE. */
|
|
1958
2204
|
events() {
|
|
@@ -1961,7 +2207,7 @@ var CommandCenter = class {
|
|
|
1961
2207
|
};
|
|
1962
2208
|
|
|
1963
2209
|
// src/resources/community.ts
|
|
1964
|
-
function
|
|
2210
|
+
function unwrap16(data) {
|
|
1965
2211
|
if (data && typeof data === "object") {
|
|
1966
2212
|
const d = data;
|
|
1967
2213
|
for (const k of ["data", "templates", "agents", "items"]) {
|
|
@@ -1993,7 +2239,7 @@ var Community = class {
|
|
|
1993
2239
|
return unwrapList4(await this.http.get("/community/agents", query3));
|
|
1994
2240
|
}
|
|
1995
2241
|
async getAgent(agentId) {
|
|
1996
|
-
return
|
|
2242
|
+
return unwrap16(await this.http.get(`/community/agents/${agentId}`));
|
|
1997
2243
|
}
|
|
1998
2244
|
// ── Templates ─────────────────────────────────────────────────────────
|
|
1999
2245
|
async listTemplates(filters = {}) {
|
|
@@ -2005,7 +2251,7 @@ var Community = class {
|
|
|
2005
2251
|
);
|
|
2006
2252
|
}
|
|
2007
2253
|
async getTemplate(templateId) {
|
|
2008
|
-
return
|
|
2254
|
+
return unwrap16(
|
|
2009
2255
|
await this.http.get(`/community/templates/${templateId}`)
|
|
2010
2256
|
);
|
|
2011
2257
|
}
|
|
@@ -2014,7 +2260,7 @@ var Community = class {
|
|
|
2014
2260
|
const body5 = Object.fromEntries(
|
|
2015
2261
|
Object.entries(opts).filter(([, v]) => v !== void 0)
|
|
2016
2262
|
);
|
|
2017
|
-
return
|
|
2263
|
+
return unwrap16(
|
|
2018
2264
|
await this.http.post(
|
|
2019
2265
|
`/community/templates/${templateId}/install`,
|
|
2020
2266
|
body5
|
|
@@ -2029,7 +2275,7 @@ var Community = class {
|
|
|
2029
2275
|
Object.entries(opts).filter(([, v]) => v !== void 0)
|
|
2030
2276
|
)
|
|
2031
2277
|
};
|
|
2032
|
-
return
|
|
2278
|
+
return unwrap16(
|
|
2033
2279
|
await this.http.post(
|
|
2034
2280
|
`/community/templates/${templateId}/rate`,
|
|
2035
2281
|
body5
|
|
@@ -2039,7 +2285,7 @@ var Community = class {
|
|
|
2039
2285
|
};
|
|
2040
2286
|
|
|
2041
2287
|
// src/resources/completions.ts
|
|
2042
|
-
function
|
|
2288
|
+
function unwrap17(data) {
|
|
2043
2289
|
if (data && typeof data === "object") {
|
|
2044
2290
|
const d = data;
|
|
2045
2291
|
if (Array.isArray(d.choices)) return d;
|
|
@@ -2065,7 +2311,7 @@ var Completions = class {
|
|
|
2065
2311
|
{ method: "POST", body: body5 }
|
|
2066
2312
|
);
|
|
2067
2313
|
}
|
|
2068
|
-
return this.http.post("/intelligence/completions", body5).then(
|
|
2314
|
+
return this.http.post("/intelligence/completions", body5).then(unwrap17);
|
|
2069
2315
|
}
|
|
2070
2316
|
chat(params) {
|
|
2071
2317
|
const body5 = buildBody(params);
|
|
@@ -2075,7 +2321,7 @@ var Completions = class {
|
|
|
2075
2321
|
{ method: "POST", body: body5 }
|
|
2076
2322
|
);
|
|
2077
2323
|
}
|
|
2078
|
-
return this.http.post("/intelligence/chat/completions", body5).then(
|
|
2324
|
+
return this.http.post("/intelligence/chat/completions", body5).then(unwrap17);
|
|
2079
2325
|
}
|
|
2080
2326
|
};
|
|
2081
2327
|
|
|
@@ -2198,7 +2444,7 @@ var Checkpoints = class {
|
|
|
2198
2444
|
};
|
|
2199
2445
|
|
|
2200
2446
|
// src/resources/computer-auto-stop.ts
|
|
2201
|
-
function
|
|
2447
|
+
function unwrap18(data) {
|
|
2202
2448
|
if (data && typeof data === "object") {
|
|
2203
2449
|
const d = data;
|
|
2204
2450
|
if ("data" in d && Object.keys(d).length <= 2) {
|
|
@@ -2216,13 +2462,13 @@ var ComputerAutoStop = class {
|
|
|
2216
2462
|
computerId;
|
|
2217
2463
|
/** Return the current auto-stop configuration. */
|
|
2218
2464
|
async get() {
|
|
2219
|
-
return
|
|
2465
|
+
return unwrap18(
|
|
2220
2466
|
await this.http.get(`/computers/${this.computerId}/auto-stop`)
|
|
2221
2467
|
);
|
|
2222
2468
|
}
|
|
2223
2469
|
/** Set the idle timeout in seconds (0 disables auto-stop). */
|
|
2224
2470
|
async update(seconds) {
|
|
2225
|
-
return
|
|
2471
|
+
return unwrap18(
|
|
2226
2472
|
await this.http.patch(
|
|
2227
2473
|
`/computers/${this.computerId}/auto-stop`,
|
|
2228
2474
|
{ seconds }
|
|
@@ -2232,7 +2478,7 @@ var ComputerAutoStop = class {
|
|
|
2232
2478
|
};
|
|
2233
2479
|
|
|
2234
2480
|
// src/resources/computer-env.ts
|
|
2235
|
-
function
|
|
2481
|
+
function unwrap19(data) {
|
|
2236
2482
|
if (data && typeof data === "object") {
|
|
2237
2483
|
const d = data;
|
|
2238
2484
|
if ("data" in d && Object.keys(d).length <= 2) {
|
|
@@ -2267,11 +2513,11 @@ var ComputerEnv = class {
|
|
|
2267
2513
|
}
|
|
2268
2514
|
/** Create a new env var. Use update() to change an existing one. */
|
|
2269
2515
|
async set(name, value) {
|
|
2270
|
-
return
|
|
2516
|
+
return unwrap19(await this.http.post(this.base(), { name, value }));
|
|
2271
2517
|
}
|
|
2272
2518
|
/** Patch the value of an existing env var by name. */
|
|
2273
2519
|
async update(name, value) {
|
|
2274
|
-
return
|
|
2520
|
+
return unwrap19(
|
|
2275
2521
|
await this.http.patch(`${this.base()}/${name}`, { value })
|
|
2276
2522
|
);
|
|
2277
2523
|
}
|
|
@@ -2288,7 +2534,7 @@ var ComputerEnv = class {
|
|
|
2288
2534
|
};
|
|
2289
2535
|
|
|
2290
2536
|
// src/resources/computer-logs.ts
|
|
2291
|
-
function
|
|
2537
|
+
function unwrap20(data) {
|
|
2292
2538
|
if (data && typeof data === "object") {
|
|
2293
2539
|
const d = data;
|
|
2294
2540
|
if ("data" in d && Object.keys(d).length <= 2) {
|
|
@@ -2309,7 +2555,7 @@ var ComputerLogs = class {
|
|
|
2309
2555
|
const query3 = Object.fromEntries(
|
|
2310
2556
|
Object.entries(params).filter(([, v]) => v !== void 0)
|
|
2311
2557
|
);
|
|
2312
|
-
return
|
|
2558
|
+
return unwrap20(
|
|
2313
2559
|
await this.http.get(`/computers/${this.computerId}/logs`, query3)
|
|
2314
2560
|
);
|
|
2315
2561
|
}
|
|
@@ -2322,7 +2568,7 @@ var ComputerLogs = class {
|
|
|
2322
2568
|
};
|
|
2323
2569
|
|
|
2324
2570
|
// src/resources/computer-osa.ts
|
|
2325
|
-
function
|
|
2571
|
+
function unwrap21(data) {
|
|
2326
2572
|
if (data && typeof data === "object") {
|
|
2327
2573
|
const d = data;
|
|
2328
2574
|
if ("data" in d && Object.keys(d).length <= 2) {
|
|
@@ -2346,7 +2592,7 @@ var ComputerOsa = class {
|
|
|
2346
2592
|
Object.entries(params).filter(([, v]) => v !== void 0)
|
|
2347
2593
|
)
|
|
2348
2594
|
};
|
|
2349
|
-
return
|
|
2595
|
+
return unwrap21(
|
|
2350
2596
|
await this.http.post(
|
|
2351
2597
|
`/computers/${this.computerId}/osa/task`,
|
|
2352
2598
|
body5
|
|
@@ -2355,13 +2601,13 @@ var ComputerOsa = class {
|
|
|
2355
2601
|
}
|
|
2356
2602
|
/** Cancel the currently-running OSA task, if any. */
|
|
2357
2603
|
async cancelTask() {
|
|
2358
|
-
return
|
|
2604
|
+
return unwrap21(
|
|
2359
2605
|
await this.http.delete(`/computers/${this.computerId}/osa/task`)
|
|
2360
2606
|
);
|
|
2361
2607
|
}
|
|
2362
2608
|
/** Return OSA's current task / configuration / health snapshot. */
|
|
2363
2609
|
async status() {
|
|
2364
|
-
return
|
|
2610
|
+
return unwrap21(
|
|
2365
2611
|
await this.http.get(`/computers/${this.computerId}/osa/status`)
|
|
2366
2612
|
);
|
|
2367
2613
|
}
|
|
@@ -2370,7 +2616,7 @@ var ComputerOsa = class {
|
|
|
2370
2616
|
const body5 = Object.fromEntries(
|
|
2371
2617
|
Object.entries(config).filter(([, v]) => v !== void 0)
|
|
2372
2618
|
);
|
|
2373
|
-
return
|
|
2619
|
+
return unwrap21(
|
|
2374
2620
|
await this.http.post(
|
|
2375
2621
|
`/computers/${this.computerId}/osa/configure`,
|
|
2376
2622
|
body5
|
|
@@ -2380,7 +2626,7 @@ var ComputerOsa = class {
|
|
|
2380
2626
|
};
|
|
2381
2627
|
|
|
2382
2628
|
// src/resources/computer-ports.ts
|
|
2383
|
-
function
|
|
2629
|
+
function unwrap22(data) {
|
|
2384
2630
|
if (data && typeof data === "object") {
|
|
2385
2631
|
const d = data;
|
|
2386
2632
|
if ("data" in d && Object.keys(d).length <= 2) {
|
|
@@ -2425,14 +2671,14 @@ var ComputerPorts = class {
|
|
|
2425
2671
|
Object.entries(opts).filter(([, v]) => v !== void 0)
|
|
2426
2672
|
)
|
|
2427
2673
|
};
|
|
2428
|
-
return
|
|
2674
|
+
return unwrap22(await this.http.post(this.base(), body5));
|
|
2429
2675
|
}
|
|
2430
2676
|
/** Patch visibility / auth options for port. */
|
|
2431
2677
|
async update(port, opts) {
|
|
2432
2678
|
const body5 = Object.fromEntries(
|
|
2433
2679
|
Object.entries(opts).filter(([, v]) => v !== void 0)
|
|
2434
2680
|
);
|
|
2435
|
-
return
|
|
2681
|
+
return unwrap22(
|
|
2436
2682
|
await this.http.patch(`${this.base()}/${port}`, body5)
|
|
2437
2683
|
);
|
|
2438
2684
|
}
|
|
@@ -2459,7 +2705,7 @@ var ComputerTerminal = class {
|
|
|
2459
2705
|
`/computers/${this.computerId}/terminal`,
|
|
2460
2706
|
body5
|
|
2461
2707
|
);
|
|
2462
|
-
return
|
|
2708
|
+
return unwrap23(raw);
|
|
2463
2709
|
}
|
|
2464
2710
|
/** Resize an existing PTY session. */
|
|
2465
2711
|
async resize(sessionId, cols, rows) {
|
|
@@ -2467,10 +2713,10 @@ var ComputerTerminal = class {
|
|
|
2467
2713
|
`/computers/${this.computerId}/pty/${sessionId}/resize`,
|
|
2468
2714
|
{ cols, rows }
|
|
2469
2715
|
);
|
|
2470
|
-
return
|
|
2716
|
+
return unwrap23(raw);
|
|
2471
2717
|
}
|
|
2472
2718
|
};
|
|
2473
|
-
function
|
|
2719
|
+
function unwrap23(data) {
|
|
2474
2720
|
if (data && typeof data === "object") {
|
|
2475
2721
|
const d = data;
|
|
2476
2722
|
if ("data" in d && Object.keys(d).length <= 2) {
|
|
@@ -2481,7 +2727,7 @@ function unwrap21(data) {
|
|
|
2481
2727
|
}
|
|
2482
2728
|
|
|
2483
2729
|
// src/resources/computer-volumes.ts
|
|
2484
|
-
function
|
|
2730
|
+
function unwrap24(data) {
|
|
2485
2731
|
if (data && typeof data === "object") {
|
|
2486
2732
|
const d = data;
|
|
2487
2733
|
if ("data" in d && Object.keys(d).length <= 2) {
|
|
@@ -2515,7 +2761,7 @@ var ComputerVolumes = class {
|
|
|
2515
2761
|
}
|
|
2516
2762
|
/** Attach volumeId at mountPath inside the VM. */
|
|
2517
2763
|
async attach(volumeId, mountPath) {
|
|
2518
|
-
return
|
|
2764
|
+
return unwrap24(
|
|
2519
2765
|
await this.http.post(this.base(), {
|
|
2520
2766
|
volume_id: volumeId,
|
|
2521
2767
|
mount_path: mountPath
|
|
@@ -2529,7 +2775,7 @@ var ComputerVolumes = class {
|
|
|
2529
2775
|
};
|
|
2530
2776
|
|
|
2531
2777
|
// src/resources/connectors.ts
|
|
2532
|
-
function
|
|
2778
|
+
function unwrap25(payload) {
|
|
2533
2779
|
if (payload && typeof payload === "object") {
|
|
2534
2780
|
const p = payload;
|
|
2535
2781
|
for (const key of ["data", "binding"]) {
|
|
@@ -2740,7 +2986,7 @@ var Connectors = class {
|
|
|
2740
2986
|
const data = await this.http.get(
|
|
2741
2987
|
`/connect/connectors/${connectorPath(connector)}`
|
|
2742
2988
|
);
|
|
2743
|
-
return
|
|
2989
|
+
return unwrap25(data);
|
|
2744
2990
|
}
|
|
2745
2991
|
show(connector) {
|
|
2746
2992
|
return this.get(connector);
|
|
@@ -2751,7 +2997,7 @@ var Connectors = class {
|
|
|
2751
2997
|
"/connect/connectors",
|
|
2752
2998
|
bodyFromCreateParams(provider, params)
|
|
2753
2999
|
);
|
|
2754
|
-
return
|
|
3000
|
+
return unwrap25(data);
|
|
2755
3001
|
}
|
|
2756
3002
|
/** Request a runtime provider token for a connector. */
|
|
2757
3003
|
async getToken(connector, params = {}) {
|
|
@@ -2759,7 +3005,7 @@ var Connectors = class {
|
|
|
2759
3005
|
`/connect/token/${connectorPath(connector)}`,
|
|
2760
3006
|
tokenBody(params)
|
|
2761
3007
|
);
|
|
2762
|
-
return
|
|
3008
|
+
return unwrap25(data);
|
|
2763
3009
|
}
|
|
2764
3010
|
token(connector, params = {}) {
|
|
2765
3011
|
return this.getToken(connector, params);
|
|
@@ -2781,7 +3027,7 @@ var Connectors = class {
|
|
|
2781
3027
|
...externalAttributionParams(params)
|
|
2782
3028
|
})
|
|
2783
3029
|
);
|
|
2784
|
-
return
|
|
3030
|
+
return unwrap25(data);
|
|
2785
3031
|
}
|
|
2786
3032
|
/** List connector installations/grants. */
|
|
2787
3033
|
async installations(params = {}) {
|
|
@@ -2821,7 +3067,7 @@ var Connectors = class {
|
|
|
2821
3067
|
"/connect/defaults/materialize",
|
|
2822
3068
|
materializeDefaultsBody(params)
|
|
2823
3069
|
);
|
|
2824
|
-
return
|
|
3070
|
+
return unwrap25(data);
|
|
2825
3071
|
}
|
|
2826
3072
|
/** Create an inherited connector default for future runtime resources. */
|
|
2827
3073
|
async createDefault(params) {
|
|
@@ -2829,7 +3075,7 @@ var Connectors = class {
|
|
|
2829
3075
|
"/connect/defaults",
|
|
2830
3076
|
defaultBody(params)
|
|
2831
3077
|
);
|
|
2832
|
-
return
|
|
3078
|
+
return unwrap25(data);
|
|
2833
3079
|
}
|
|
2834
3080
|
/** Delete an inherited connector default. */
|
|
2835
3081
|
async deleteDefault(id) {
|
|
@@ -2849,7 +3095,7 @@ var Connectors = class {
|
|
|
2849
3095
|
"/connect/triggers",
|
|
2850
3096
|
triggerBody(params)
|
|
2851
3097
|
);
|
|
2852
|
-
return
|
|
3098
|
+
return unwrap25(data);
|
|
2853
3099
|
}
|
|
2854
3100
|
/** List inbound provider trigger delivery attempts. */
|
|
2855
3101
|
async triggerDeliveries(params = {}) {
|
|
@@ -2876,7 +3122,7 @@ var Connectors = class {
|
|
|
2876
3122
|
"/connect/project-links",
|
|
2877
3123
|
projectLinkBody(params)
|
|
2878
3124
|
);
|
|
2879
|
-
return
|
|
3125
|
+
return unwrap25(data);
|
|
2880
3126
|
}
|
|
2881
3127
|
/** Delete a project connector link. */
|
|
2882
3128
|
async deleteProjectLink(id) {
|
|
@@ -2912,7 +3158,7 @@ var RuntimeConnectors = class {
|
|
|
2912
3158
|
...externalAttributionParams(params)
|
|
2913
3159
|
})
|
|
2914
3160
|
);
|
|
2915
|
-
return
|
|
3161
|
+
return unwrap25(data);
|
|
2916
3162
|
}
|
|
2917
3163
|
/** Detach a connector binding by binding id or connector UID. */
|
|
2918
3164
|
async detach(bindingOrConnector) {
|
|
@@ -2921,7 +3167,7 @@ var RuntimeConnectors = class {
|
|
|
2921
3167
|
/** Sync or materialize connector placeholder env vars for this runtime resource. */
|
|
2922
3168
|
async sync() {
|
|
2923
3169
|
const data = await this.http.post(`${this.basePath}/sync`, {});
|
|
2924
|
-
return
|
|
3170
|
+
return unwrap25(data);
|
|
2925
3171
|
}
|
|
2926
3172
|
/** Verify a required connector is attached before agent work begins. */
|
|
2927
3173
|
async preflight(params = {}) {
|
|
@@ -2929,7 +3175,7 @@ var RuntimeConnectors = class {
|
|
|
2929
3175
|
`${this.basePath}/preflight`,
|
|
2930
3176
|
stripUndefined10(params)
|
|
2931
3177
|
);
|
|
2932
|
-
return
|
|
3178
|
+
return unwrap25(data);
|
|
2933
3179
|
}
|
|
2934
3180
|
};
|
|
2935
3181
|
var SandboxConnectors = class extends RuntimeConnectors {
|
|
@@ -3132,7 +3378,7 @@ var Desktop = class {
|
|
|
3132
3378
|
};
|
|
3133
3379
|
|
|
3134
3380
|
// src/resources/egressAudit.ts
|
|
3135
|
-
function
|
|
3381
|
+
function unwrap26(payload) {
|
|
3136
3382
|
if (payload && typeof payload === "object") {
|
|
3137
3383
|
const p = payload;
|
|
3138
3384
|
for (const k of ["data", "event", "items"]) {
|
|
@@ -3198,7 +3444,7 @@ var EgressAudit = class {
|
|
|
3198
3444
|
const data = await this.http.get(
|
|
3199
3445
|
`/egress/audit/${id}`
|
|
3200
3446
|
);
|
|
3201
|
-
return
|
|
3447
|
+
return unwrap26(data);
|
|
3202
3448
|
}
|
|
3203
3449
|
/**
|
|
3204
3450
|
* Long-poll the audit endpoint and yield new events as they appear.
|
|
@@ -3274,7 +3520,7 @@ var ComputerAudit = class extends SandboxAudit {
|
|
|
3274
3520
|
};
|
|
3275
3521
|
|
|
3276
3522
|
// src/resources/egressNetwork.ts
|
|
3277
|
-
function
|
|
3523
|
+
function unwrap27(payload) {
|
|
3278
3524
|
if (payload && typeof payload === "object") {
|
|
3279
3525
|
const p = payload;
|
|
3280
3526
|
for (const k of ["data", "policy", "rule", "items"]) {
|
|
@@ -3333,7 +3579,7 @@ var EgressNetwork = class {
|
|
|
3333
3579
|
"/egress/allowlist",
|
|
3334
3580
|
ruleBody(host, params, "allow")
|
|
3335
3581
|
);
|
|
3336
|
-
return
|
|
3582
|
+
return unwrap27(data);
|
|
3337
3583
|
}
|
|
3338
3584
|
/** Add a `deny` rule for `host` to the allowlist. */
|
|
3339
3585
|
async deny(host, params = {}) {
|
|
@@ -3341,7 +3587,7 @@ var EgressNetwork = class {
|
|
|
3341
3587
|
"/egress/allowlist",
|
|
3342
3588
|
ruleBody(host, params, "deny")
|
|
3343
3589
|
);
|
|
3344
|
-
return
|
|
3590
|
+
return unwrap27(data);
|
|
3345
3591
|
}
|
|
3346
3592
|
/** List allowlist rules. */
|
|
3347
3593
|
async rules(params = {}) {
|
|
@@ -3385,7 +3631,7 @@ var EgressNetwork = class {
|
|
|
3385
3631
|
"/egress/policies",
|
|
3386
3632
|
body5
|
|
3387
3633
|
);
|
|
3388
|
-
return
|
|
3634
|
+
return unwrap27(data);
|
|
3389
3635
|
}
|
|
3390
3636
|
/** Update an egress policy by id. */
|
|
3391
3637
|
async updatePolicy(policyId, params) {
|
|
@@ -3399,7 +3645,7 @@ var EgressNetwork = class {
|
|
|
3399
3645
|
`/egress/policies/${policyId}`,
|
|
3400
3646
|
body5
|
|
3401
3647
|
);
|
|
3402
|
-
return
|
|
3648
|
+
return unwrap27(data);
|
|
3403
3649
|
}
|
|
3404
3650
|
// ── mode helpers ──────────────────────────────────────────────────────────
|
|
3405
3651
|
/** Set the policy to `mode="enforce"` — denied egress is blocked. */
|
|
@@ -3426,7 +3672,7 @@ var EgressNetwork = class {
|
|
|
3426
3672
|
"/egress/policies",
|
|
3427
3673
|
body5
|
|
3428
3674
|
);
|
|
3429
|
-
return
|
|
3675
|
+
return unwrap27(data);
|
|
3430
3676
|
}
|
|
3431
3677
|
// ── suggestions ───────────────────────────────────────────────────────────
|
|
3432
3678
|
/** AI-generated allowlist suggestions from recent denied egress. */
|
|
@@ -3517,7 +3763,7 @@ var ComputerNetwork = class extends SandboxNetwork {
|
|
|
3517
3763
|
};
|
|
3518
3764
|
|
|
3519
3765
|
// src/resources/egressSecrets.ts
|
|
3520
|
-
function
|
|
3766
|
+
function unwrap28(payload) {
|
|
3521
3767
|
if (payload && typeof payload === "object") {
|
|
3522
3768
|
const p = payload;
|
|
3523
3769
|
for (const k of ["data", "secret", "binding", "items"]) {
|
|
@@ -3653,7 +3899,7 @@ var OAuthFlow = class {
|
|
|
3653
3899
|
const data = await this.http.get("/egress/oauth/status", {
|
|
3654
3900
|
state: this.state
|
|
3655
3901
|
});
|
|
3656
|
-
const payload =
|
|
3902
|
+
const payload = unwrap28(data) ?? {};
|
|
3657
3903
|
const status = payload.status;
|
|
3658
3904
|
if (status === "completed" || status === "ready" || status === "succeeded") {
|
|
3659
3905
|
return payload;
|
|
@@ -3685,7 +3931,7 @@ var EgressSecrets = class {
|
|
|
3685
3931
|
"/egress/secrets",
|
|
3686
3932
|
setBody(params)
|
|
3687
3933
|
);
|
|
3688
|
-
return
|
|
3934
|
+
return unwrap28(data);
|
|
3689
3935
|
}
|
|
3690
3936
|
/** List secrets. */
|
|
3691
3937
|
async list(params = {}) {
|
|
@@ -3700,7 +3946,7 @@ var EgressSecrets = class {
|
|
|
3700
3946
|
const data = await this.http.get(
|
|
3701
3947
|
`/egress/secrets/${id}`
|
|
3702
3948
|
);
|
|
3703
|
-
return
|
|
3949
|
+
return unwrap28(data);
|
|
3704
3950
|
}
|
|
3705
3951
|
/** Rotate the secret's value. */
|
|
3706
3952
|
async rotate(id, params) {
|
|
@@ -3709,7 +3955,7 @@ var EgressSecrets = class {
|
|
|
3709
3955
|
`/egress/secrets/${id}`,
|
|
3710
3956
|
body5
|
|
3711
3957
|
);
|
|
3712
|
-
return
|
|
3958
|
+
return unwrap28(data);
|
|
3713
3959
|
}
|
|
3714
3960
|
/** Delete a secret. */
|
|
3715
3961
|
async delete(id) {
|
|
@@ -3722,7 +3968,7 @@ var EgressSecrets = class {
|
|
|
3722
3968
|
"/egress/bindings",
|
|
3723
3969
|
bindingBody(params)
|
|
3724
3970
|
);
|
|
3725
|
-
return
|
|
3971
|
+
return unwrap28(data);
|
|
3726
3972
|
}
|
|
3727
3973
|
/** List secret bindings. */
|
|
3728
3974
|
async listBindings(params = {}) {
|
|
@@ -3755,7 +4001,7 @@ var EgressSecrets = class {
|
|
|
3755
4001
|
"/egress/oauth/start",
|
|
3756
4002
|
oauthBody(params)
|
|
3757
4003
|
);
|
|
3758
|
-
const payload =
|
|
4004
|
+
const payload = unwrap28(data) ?? {};
|
|
3759
4005
|
return new OAuthFlow(this.http, payload, params.provider);
|
|
3760
4006
|
}
|
|
3761
4007
|
};
|
|
@@ -4919,7 +5165,7 @@ var Credits = class {
|
|
|
4919
5165
|
return this.http.get("/credits/usage");
|
|
4920
5166
|
}
|
|
4921
5167
|
};
|
|
4922
|
-
function
|
|
5168
|
+
function unwrap29(payload) {
|
|
4923
5169
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
4924
5170
|
return payload.data;
|
|
4925
5171
|
}
|
|
@@ -4955,7 +5201,7 @@ var CronJobs = class {
|
|
|
4955
5201
|
}
|
|
4956
5202
|
async get(jobId) {
|
|
4957
5203
|
const data = await this.http.get(`/cron-jobs/${jobId}`);
|
|
4958
|
-
return
|
|
5204
|
+
return unwrap29(data);
|
|
4959
5205
|
}
|
|
4960
5206
|
async create(params) {
|
|
4961
5207
|
const { idempotencyKey: ikey, ...rest } = params;
|
|
@@ -4965,12 +5211,12 @@ var CronJobs = class {
|
|
|
4965
5211
|
body: body5,
|
|
4966
5212
|
headers: { "Idempotency-Key": idempotencyKey2(ikey) }
|
|
4967
5213
|
});
|
|
4968
|
-
return
|
|
5214
|
+
return unwrap29(data);
|
|
4969
5215
|
}
|
|
4970
5216
|
async update(jobId, params) {
|
|
4971
5217
|
const body5 = stripUndefined14(params);
|
|
4972
5218
|
const data = await this.http.patch(`/cron-jobs/${jobId}`, body5);
|
|
4973
|
-
return
|
|
5219
|
+
return unwrap29(data);
|
|
4974
5220
|
}
|
|
4975
5221
|
async delete(jobId) {
|
|
4976
5222
|
await this.http.delete(`/cron-jobs/${jobId}`);
|
|
@@ -4978,11 +5224,11 @@ var CronJobs = class {
|
|
|
4978
5224
|
// ── Control ────────────────────────────────────────────────────────────────
|
|
4979
5225
|
async pause(jobId) {
|
|
4980
5226
|
const data = await this.http.post(`/cron-jobs/${jobId}/pause`);
|
|
4981
|
-
return
|
|
5227
|
+
return unwrap29(data);
|
|
4982
5228
|
}
|
|
4983
5229
|
async resume(jobId) {
|
|
4984
5230
|
const data = await this.http.post(`/cron-jobs/${jobId}/resume`);
|
|
4985
|
-
return
|
|
5231
|
+
return unwrap29(data);
|
|
4986
5232
|
}
|
|
4987
5233
|
async runNow(jobId, opts = {}) {
|
|
4988
5234
|
const data = await this.http.request(
|
|
@@ -4992,7 +5238,7 @@ var CronJobs = class {
|
|
|
4992
5238
|
headers: { "Idempotency-Key": idempotencyKey2(opts.idempotencyKey) }
|
|
4993
5239
|
}
|
|
4994
5240
|
);
|
|
4995
|
-
return
|
|
5241
|
+
return unwrap29(data);
|
|
4996
5242
|
}
|
|
4997
5243
|
// ── Execution history ──────────────────────────────────────────────────────
|
|
4998
5244
|
async listExecutions(jobId) {
|
|
@@ -5007,12 +5253,12 @@ var CronJobs = class {
|
|
|
5007
5253
|
const data = await this.http.get(
|
|
5008
5254
|
`/cron-jobs/${jobId}/executions/${executionId}`
|
|
5009
5255
|
);
|
|
5010
|
-
return
|
|
5256
|
+
return unwrap29(data);
|
|
5011
5257
|
}
|
|
5012
5258
|
};
|
|
5013
5259
|
|
|
5014
5260
|
// src/resources/dashboard.ts
|
|
5015
|
-
function
|
|
5261
|
+
function unwrap30(payload) {
|
|
5016
5262
|
if (payload && typeof payload === "object") {
|
|
5017
5263
|
const p = payload;
|
|
5018
5264
|
for (const k of ["data", "dashboard", "overview", "items"]) {
|
|
@@ -5029,15 +5275,15 @@ var Dashboard = class {
|
|
|
5029
5275
|
/** Aggregated user dashboard payload. */
|
|
5030
5276
|
async summary() {
|
|
5031
5277
|
const data = await this.http.get("/dashboard");
|
|
5032
|
-
return
|
|
5278
|
+
return unwrap30(data);
|
|
5033
5279
|
}
|
|
5034
5280
|
/** Status / health overview (public endpoint). */
|
|
5035
5281
|
async overview() {
|
|
5036
5282
|
const data = await this.http.get("/overview");
|
|
5037
|
-
return
|
|
5283
|
+
return unwrap30(data);
|
|
5038
5284
|
}
|
|
5039
5285
|
};
|
|
5040
|
-
function
|
|
5286
|
+
function unwrap31(payload) {
|
|
5041
5287
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
5042
5288
|
return payload.data;
|
|
5043
5289
|
}
|
|
@@ -5073,7 +5319,7 @@ var Databases = class {
|
|
|
5073
5319
|
}
|
|
5074
5320
|
async get(databaseId) {
|
|
5075
5321
|
const data = await this.http.get(`/databases/${databaseId}`);
|
|
5076
|
-
return
|
|
5322
|
+
return unwrap31(data);
|
|
5077
5323
|
}
|
|
5078
5324
|
async create(params) {
|
|
5079
5325
|
const {
|
|
@@ -5097,7 +5343,7 @@ var Databases = class {
|
|
|
5097
5343
|
)
|
|
5098
5344
|
}
|
|
5099
5345
|
});
|
|
5100
|
-
return
|
|
5346
|
+
return unwrap31(data);
|
|
5101
5347
|
}
|
|
5102
5348
|
async delete(databaseId) {
|
|
5103
5349
|
await this.http.delete(`/databases/${databaseId}`);
|
|
@@ -5107,24 +5353,24 @@ var Databases = class {
|
|
|
5107
5353
|
const data = await this.http.post(
|
|
5108
5354
|
`/databases/${databaseId}/start`
|
|
5109
5355
|
);
|
|
5110
|
-
return
|
|
5356
|
+
return unwrap31(data);
|
|
5111
5357
|
}
|
|
5112
5358
|
async stop(databaseId) {
|
|
5113
5359
|
const data = await this.http.post(`/databases/${databaseId}/stop`);
|
|
5114
|
-
return
|
|
5360
|
+
return unwrap31(data);
|
|
5115
5361
|
}
|
|
5116
5362
|
async restart(databaseId) {
|
|
5117
5363
|
const data = await this.http.post(
|
|
5118
5364
|
`/databases/${databaseId}/restart`
|
|
5119
5365
|
);
|
|
5120
|
-
return
|
|
5366
|
+
return unwrap31(data);
|
|
5121
5367
|
}
|
|
5122
5368
|
// ── Credentials + logs ────────────────────────────────────────────────────
|
|
5123
5369
|
async credentials(databaseId) {
|
|
5124
5370
|
const data = await this.http.get(
|
|
5125
5371
|
`/databases/${databaseId}/credentials`
|
|
5126
5372
|
);
|
|
5127
|
-
return
|
|
5373
|
+
return unwrap31(data);
|
|
5128
5374
|
}
|
|
5129
5375
|
async logs(databaseId, params = {}) {
|
|
5130
5376
|
const query3 = stripUndefined15({
|
|
@@ -5154,7 +5400,7 @@ function attributionBody(p) {
|
|
|
5154
5400
|
function idempotencyKey4(key) {
|
|
5155
5401
|
return key ?? randomUUID();
|
|
5156
5402
|
}
|
|
5157
|
-
function
|
|
5403
|
+
function unwrap32(payload) {
|
|
5158
5404
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
5159
5405
|
return payload.data;
|
|
5160
5406
|
}
|
|
@@ -5263,7 +5509,7 @@ var DeploymentVersions = class {
|
|
|
5263
5509
|
const data = await this.http.get(
|
|
5264
5510
|
`/deployments/${this.deploymentId}/versions/${versionId}`
|
|
5265
5511
|
);
|
|
5266
|
-
return
|
|
5512
|
+
return unwrap32(data);
|
|
5267
5513
|
}
|
|
5268
5514
|
async promote(versionId, opts = {}) {
|
|
5269
5515
|
const body5 = stripUndefined16({ environment: opts.environment });
|
|
@@ -5275,14 +5521,14 @@ var DeploymentVersions = class {
|
|
|
5275
5521
|
headers: { "Idempotency-Key": idempotencyKey4(opts.idempotencyKey) }
|
|
5276
5522
|
}
|
|
5277
5523
|
);
|
|
5278
|
-
return
|
|
5524
|
+
return unwrap32(data);
|
|
5279
5525
|
}
|
|
5280
5526
|
async prepareMigrationBackup(versionId) {
|
|
5281
5527
|
const data = await this.http.request(
|
|
5282
5528
|
`/deployments/${this.deploymentId}/versions/${versionId}/migration-backup`,
|
|
5283
5529
|
{ method: "POST", body: {} }
|
|
5284
5530
|
);
|
|
5285
|
-
return
|
|
5531
|
+
return unwrap32(data);
|
|
5286
5532
|
}
|
|
5287
5533
|
};
|
|
5288
5534
|
var DeploymentReleases = class {
|
|
@@ -5302,7 +5548,7 @@ var DeploymentReleases = class {
|
|
|
5302
5548
|
const data = await this.http.get(
|
|
5303
5549
|
`/deployments/${this.deploymentId}/releases/${releaseId}`
|
|
5304
5550
|
);
|
|
5305
|
-
return
|
|
5551
|
+
return unwrap32(data);
|
|
5306
5552
|
}
|
|
5307
5553
|
async promote(releaseId, idempotencyKey11) {
|
|
5308
5554
|
const key = idempotencyKey11 ?? `promote:${this.deploymentId}:${releaseId}`;
|
|
@@ -5314,7 +5560,7 @@ var DeploymentReleases = class {
|
|
|
5314
5560
|
headers: { "Idempotency-Key": key }
|
|
5315
5561
|
}
|
|
5316
5562
|
);
|
|
5317
|
-
return
|
|
5563
|
+
return unwrap32(data);
|
|
5318
5564
|
}
|
|
5319
5565
|
};
|
|
5320
5566
|
var DeploymentRuntimeInstances = class {
|
|
@@ -5334,14 +5580,14 @@ var DeploymentRuntimeInstances = class {
|
|
|
5334
5580
|
const data = await this.http.get(
|
|
5335
5581
|
`/deployments/${this.deploymentId}/runtime-instances/${instanceId}`
|
|
5336
5582
|
);
|
|
5337
|
-
return
|
|
5583
|
+
return unwrap32(data);
|
|
5338
5584
|
}
|
|
5339
5585
|
async logs(instanceId, lines = 100) {
|
|
5340
5586
|
const data = await this.http.get(
|
|
5341
5587
|
`/deployments/${this.deploymentId}/runtime-instances/${instanceId}/logs`,
|
|
5342
5588
|
{ lines }
|
|
5343
5589
|
);
|
|
5344
|
-
const unwrapped =
|
|
5590
|
+
const unwrapped = unwrap32(data);
|
|
5345
5591
|
const result = { logs: String(unwrapped.logs ?? "") };
|
|
5346
5592
|
if (typeof unwrapped.runtime_instance_id === "string") {
|
|
5347
5593
|
result.runtime_instance_id = unwrapped.runtime_instance_id;
|
|
@@ -5376,7 +5622,7 @@ var DeploymentDomains = class {
|
|
|
5376
5622
|
headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
|
|
5377
5623
|
}
|
|
5378
5624
|
);
|
|
5379
|
-
return
|
|
5625
|
+
return unwrap32(data);
|
|
5380
5626
|
}
|
|
5381
5627
|
async list(filters = {}) {
|
|
5382
5628
|
const data = await this.http.get(
|
|
@@ -5389,7 +5635,7 @@ var DeploymentDomains = class {
|
|
|
5389
5635
|
const data = await this.http.post(
|
|
5390
5636
|
`/deployments/${this.deploymentId}/domains/${domainId}/verify`
|
|
5391
5637
|
);
|
|
5392
|
-
return
|
|
5638
|
+
return unwrap32(data);
|
|
5393
5639
|
}
|
|
5394
5640
|
async delete(domainId) {
|
|
5395
5641
|
await this.http.delete(
|
|
@@ -5419,7 +5665,7 @@ var Deployments = class {
|
|
|
5419
5665
|
}
|
|
5420
5666
|
async get(deploymentId) {
|
|
5421
5667
|
const data = await this.http.get(`/deployments/${deploymentId}`);
|
|
5422
|
-
return
|
|
5668
|
+
return unwrap32(data);
|
|
5423
5669
|
}
|
|
5424
5670
|
async create(params) {
|
|
5425
5671
|
const body5 = stripUndefined16({
|
|
@@ -5438,7 +5684,7 @@ var Deployments = class {
|
|
|
5438
5684
|
body: body5,
|
|
5439
5685
|
headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
|
|
5440
5686
|
});
|
|
5441
|
-
return
|
|
5687
|
+
return unwrap32(data);
|
|
5442
5688
|
}
|
|
5443
5689
|
/**
|
|
5444
5690
|
* Create a deployment that runs on the workspace's dedicated App Engine
|
|
@@ -5482,7 +5728,7 @@ var Deployments = class {
|
|
|
5482
5728
|
const rawHost = await this.http.get(
|
|
5483
5729
|
`/docker-deploy/hosts/${hostId}`
|
|
5484
5730
|
);
|
|
5485
|
-
host =
|
|
5731
|
+
host = unwrap32(
|
|
5486
5732
|
rawHost
|
|
5487
5733
|
);
|
|
5488
5734
|
addDoctorCheck(
|
|
@@ -5633,7 +5879,7 @@ var Deployments = class {
|
|
|
5633
5879
|
const rawHost = await this.http.get(
|
|
5634
5880
|
`/docker-deploy/hosts/${hostId}`
|
|
5635
5881
|
);
|
|
5636
|
-
const host =
|
|
5882
|
+
const host = unwrap32(
|
|
5637
5883
|
rawHost
|
|
5638
5884
|
);
|
|
5639
5885
|
addProofCheck(
|
|
@@ -5740,7 +5986,7 @@ var Deployments = class {
|
|
|
5740
5986
|
`/deployments/${deploymentId}`,
|
|
5741
5987
|
body5
|
|
5742
5988
|
);
|
|
5743
|
-
return
|
|
5989
|
+
return unwrap32(data);
|
|
5744
5990
|
}
|
|
5745
5991
|
async delete(deploymentId) {
|
|
5746
5992
|
await this.http.delete(`/deployments/${deploymentId}`);
|
|
@@ -5760,7 +6006,7 @@ var Deployments = class {
|
|
|
5760
6006
|
headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
|
|
5761
6007
|
}
|
|
5762
6008
|
);
|
|
5763
|
-
return
|
|
6009
|
+
return unwrap32(data);
|
|
5764
6010
|
}
|
|
5765
6011
|
/**
|
|
5766
6012
|
* Backward-compatible bridge: POST /sandboxes/:id/deploy. Works today;
|
|
@@ -5785,7 +6031,7 @@ var Deployments = class {
|
|
|
5785
6031
|
headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
|
|
5786
6032
|
}
|
|
5787
6033
|
);
|
|
5788
|
-
return
|
|
6034
|
+
return unwrap32(data);
|
|
5789
6035
|
}
|
|
5790
6036
|
async rollback(deploymentId, params = {}) {
|
|
5791
6037
|
const body5 = stripUndefined16({
|
|
@@ -5799,7 +6045,7 @@ var Deployments = class {
|
|
|
5799
6045
|
headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
|
|
5800
6046
|
}
|
|
5801
6047
|
);
|
|
5802
|
-
return
|
|
6048
|
+
return unwrap32(data);
|
|
5803
6049
|
}
|
|
5804
6050
|
async listBuilds(deploymentId) {
|
|
5805
6051
|
const data = await this.http.get(
|
|
@@ -5811,7 +6057,7 @@ var Deployments = class {
|
|
|
5811
6057
|
const data = await this.http.get(
|
|
5812
6058
|
`/deployments/${deploymentId}/builds/${buildId}`
|
|
5813
6059
|
);
|
|
5814
|
-
return
|
|
6060
|
+
return unwrap32(data);
|
|
5815
6061
|
}
|
|
5816
6062
|
async listEnv(deploymentId) {
|
|
5817
6063
|
const data = await this.http.get(
|
|
@@ -5857,7 +6103,7 @@ var RUNTIME_BINARIES = {
|
|
|
5857
6103
|
pi: ["pi"],
|
|
5858
6104
|
custom: []
|
|
5859
6105
|
};
|
|
5860
|
-
function
|
|
6106
|
+
function unwrap33(payload, keys = ["data"]) {
|
|
5861
6107
|
if (payload && typeof payload === "object") {
|
|
5862
6108
|
const p = payload;
|
|
5863
6109
|
for (const key of keys) {
|
|
@@ -5916,7 +6162,7 @@ var Devices = class {
|
|
|
5916
6162
|
/** Show one unified device by id. */
|
|
5917
6163
|
async get(id) {
|
|
5918
6164
|
const data = await this.http.get(`/devices/${devicePath(id)}`);
|
|
5919
|
-
return
|
|
6165
|
+
return unwrap33(data);
|
|
5920
6166
|
}
|
|
5921
6167
|
show(id) {
|
|
5922
6168
|
return this.get(id);
|
|
@@ -5926,7 +6172,7 @@ var Devices = class {
|
|
|
5926
6172
|
const data = await this.http.get(
|
|
5927
6173
|
`/devices/${devicePath(id)}/capabilities`
|
|
5928
6174
|
);
|
|
5929
|
-
return
|
|
6175
|
+
return unwrap33(data);
|
|
5930
6176
|
}
|
|
5931
6177
|
/** Execute a command inside the device. */
|
|
5932
6178
|
async exec(id, params) {
|
|
@@ -5939,7 +6185,7 @@ var Devices = class {
|
|
|
5939
6185
|
env: params.env
|
|
5940
6186
|
})
|
|
5941
6187
|
);
|
|
5942
|
-
return
|
|
6188
|
+
return unwrap33(data);
|
|
5943
6189
|
}
|
|
5944
6190
|
/** List files inside the device filesystem. */
|
|
5945
6191
|
async listFiles(id, params = {}) {
|
|
@@ -5955,7 +6201,7 @@ var Devices = class {
|
|
|
5955
6201
|
`/devices/${devicePath(id)}/files/read`,
|
|
5956
6202
|
queryFromFileParams(params)
|
|
5957
6203
|
);
|
|
5958
|
-
return
|
|
6204
|
+
return unwrap33(data);
|
|
5959
6205
|
}
|
|
5960
6206
|
/** Write a text or base64 payload into the device filesystem. */
|
|
5961
6207
|
async writeFile(id, params) {
|
|
@@ -5967,7 +6213,7 @@ var Devices = class {
|
|
|
5967
6213
|
content_base64: pickFirst5(params.contentBase64, params.content_base64)
|
|
5968
6214
|
})
|
|
5969
6215
|
);
|
|
5970
|
-
return
|
|
6216
|
+
return unwrap33(data);
|
|
5971
6217
|
}
|
|
5972
6218
|
/** Expose a device port through MIOSA routing. */
|
|
5973
6219
|
async expose(id, params) {
|
|
@@ -5975,44 +6221,44 @@ var Devices = class {
|
|
|
5975
6221
|
`/devices/${devicePath(id)}/expose`,
|
|
5976
6222
|
{ port: params.port }
|
|
5977
6223
|
);
|
|
5978
|
-
return
|
|
6224
|
+
return unwrap33(data);
|
|
5979
6225
|
}
|
|
5980
6226
|
/** Return browser/desktop connection details for a computer-backed device. */
|
|
5981
6227
|
async browser(id) {
|
|
5982
6228
|
const data = await this.http.get(`/devices/${devicePath(id)}/browser`);
|
|
5983
|
-
return
|
|
6229
|
+
return unwrap33(data);
|
|
5984
6230
|
}
|
|
5985
6231
|
async pause(id) {
|
|
5986
6232
|
const data = await this.http.post(
|
|
5987
6233
|
`/devices/${devicePath(id)}/pause`,
|
|
5988
6234
|
{}
|
|
5989
6235
|
);
|
|
5990
|
-
return
|
|
6236
|
+
return unwrap33(data);
|
|
5991
6237
|
}
|
|
5992
6238
|
async stop(id) {
|
|
5993
6239
|
const data = await this.http.post(
|
|
5994
6240
|
`/devices/${devicePath(id)}/stop`,
|
|
5995
6241
|
{}
|
|
5996
6242
|
);
|
|
5997
|
-
return
|
|
6243
|
+
return unwrap33(data);
|
|
5998
6244
|
}
|
|
5999
6245
|
async resume(id) {
|
|
6000
6246
|
const data = await this.http.post(
|
|
6001
6247
|
`/devices/${devicePath(id)}/resume`,
|
|
6002
6248
|
{}
|
|
6003
6249
|
);
|
|
6004
|
-
return
|
|
6250
|
+
return unwrap33(data);
|
|
6005
6251
|
}
|
|
6006
6252
|
async extend(id, params) {
|
|
6007
6253
|
const data = await this.http.post(
|
|
6008
6254
|
`/devices/${devicePath(id)}/extend`,
|
|
6009
6255
|
{ timeout_sec: pickFirst5(params.timeoutSec, params.timeout_sec) }
|
|
6010
6256
|
);
|
|
6011
|
-
return
|
|
6257
|
+
return unwrap33(data);
|
|
6012
6258
|
}
|
|
6013
6259
|
async destroy(id) {
|
|
6014
6260
|
const data = await this.http.delete(`/devices/${devicePath(id)}`);
|
|
6015
|
-
return
|
|
6261
|
+
return unwrap33(data);
|
|
6016
6262
|
}
|
|
6017
6263
|
/**
|
|
6018
6264
|
* Write a MIOSA runtime bootstrap manifest and optionally install/probe
|
|
@@ -6182,7 +6428,7 @@ var DockerDeploy = class {
|
|
|
6182
6428
|
};
|
|
6183
6429
|
|
|
6184
6430
|
// src/resources/email.ts
|
|
6185
|
-
function
|
|
6431
|
+
function unwrap34(data) {
|
|
6186
6432
|
if (data && typeof data === "object") {
|
|
6187
6433
|
const d = data;
|
|
6188
6434
|
for (const k of [
|
|
@@ -6234,12 +6480,12 @@ var EmailCampaigns = class {
|
|
|
6234
6480
|
);
|
|
6235
6481
|
}
|
|
6236
6482
|
async create(attrs) {
|
|
6237
|
-
return
|
|
6483
|
+
return unwrap34(
|
|
6238
6484
|
await this.http.post("/admin/email-campaigns", strip(attrs))
|
|
6239
6485
|
);
|
|
6240
6486
|
}
|
|
6241
6487
|
async recipientCount(filters = {}) {
|
|
6242
|
-
return
|
|
6488
|
+
return unwrap34(
|
|
6243
6489
|
await this.http.get(
|
|
6244
6490
|
"/admin/email-campaigns/recipient-count",
|
|
6245
6491
|
filters
|
|
@@ -6247,7 +6493,7 @@ var EmailCampaigns = class {
|
|
|
6247
6493
|
);
|
|
6248
6494
|
}
|
|
6249
6495
|
async send(campaignId, opts = {}) {
|
|
6250
|
-
return
|
|
6496
|
+
return unwrap34(
|
|
6251
6497
|
await this.http.post(
|
|
6252
6498
|
`/admin/email-campaigns/${campaignId}/send`,
|
|
6253
6499
|
strip(opts)
|
|
@@ -6255,7 +6501,7 @@ var EmailCampaigns = class {
|
|
|
6255
6501
|
);
|
|
6256
6502
|
}
|
|
6257
6503
|
async cancel(campaignId) {
|
|
6258
|
-
return
|
|
6504
|
+
return unwrap34(
|
|
6259
6505
|
await this.http.post(
|
|
6260
6506
|
`/admin/email-campaigns/${campaignId}/cancel`
|
|
6261
6507
|
)
|
|
@@ -6281,7 +6527,7 @@ var EmailTemplates = class {
|
|
|
6281
6527
|
);
|
|
6282
6528
|
}
|
|
6283
6529
|
async create(key, attrs = {}) {
|
|
6284
|
-
return
|
|
6530
|
+
return unwrap34(
|
|
6285
6531
|
await this.http.post("/admin/email-templates", {
|
|
6286
6532
|
key,
|
|
6287
6533
|
...strip(attrs)
|
|
@@ -6289,7 +6535,7 @@ var EmailTemplates = class {
|
|
|
6289
6535
|
);
|
|
6290
6536
|
}
|
|
6291
6537
|
async update(key, attrs) {
|
|
6292
|
-
return
|
|
6538
|
+
return unwrap34(
|
|
6293
6539
|
await this.http.put(
|
|
6294
6540
|
`/admin/email-templates/${key}`,
|
|
6295
6541
|
strip(attrs)
|
|
@@ -6297,7 +6543,7 @@ var EmailTemplates = class {
|
|
|
6297
6543
|
);
|
|
6298
6544
|
}
|
|
6299
6545
|
async reset(key) {
|
|
6300
|
-
return
|
|
6546
|
+
return unwrap34(
|
|
6301
6547
|
await this.http.post(`/admin/email-templates/${key}/reset`)
|
|
6302
6548
|
);
|
|
6303
6549
|
}
|
|
@@ -6313,17 +6559,17 @@ var EmailInbox = class {
|
|
|
6313
6559
|
);
|
|
6314
6560
|
}
|
|
6315
6561
|
async send(attrs) {
|
|
6316
|
-
return
|
|
6562
|
+
return unwrap34(
|
|
6317
6563
|
await this.http.post("/admin/email-inbox/send", strip(attrs))
|
|
6318
6564
|
);
|
|
6319
6565
|
}
|
|
6320
6566
|
async markRead(messageId) {
|
|
6321
|
-
return
|
|
6567
|
+
return unwrap34(
|
|
6322
6568
|
await this.http.post(`/admin/email-inbox/${messageId}/read`)
|
|
6323
6569
|
);
|
|
6324
6570
|
}
|
|
6325
6571
|
async archive(messageId) {
|
|
6326
|
-
return
|
|
6572
|
+
return unwrap34(
|
|
6327
6573
|
await this.http.post(`/admin/email-inbox/${messageId}/archive`)
|
|
6328
6574
|
);
|
|
6329
6575
|
}
|
|
@@ -6363,7 +6609,7 @@ var Embeddings = class {
|
|
|
6363
6609
|
};
|
|
6364
6610
|
|
|
6365
6611
|
// src/resources/external-keys.ts
|
|
6366
|
-
function
|
|
6612
|
+
function unwrap35(payload) {
|
|
6367
6613
|
if (payload && typeof payload === "object") {
|
|
6368
6614
|
const p = payload;
|
|
6369
6615
|
for (const k of ["data", "external_keys", "items"]) {
|
|
@@ -6385,7 +6631,7 @@ var ExternalKeys = class {
|
|
|
6385
6631
|
/** List configured external keys. */
|
|
6386
6632
|
async list() {
|
|
6387
6633
|
const data = await this.http.get("/external-keys");
|
|
6388
|
-
const result =
|
|
6634
|
+
const result = unwrap35(data);
|
|
6389
6635
|
if (Array.isArray(result)) return result;
|
|
6390
6636
|
return [];
|
|
6391
6637
|
}
|
|
@@ -6393,14 +6639,14 @@ var ExternalKeys = class {
|
|
|
6393
6639
|
async create(params) {
|
|
6394
6640
|
const body5 = stripUndefined18(params);
|
|
6395
6641
|
const data = await this.http.post("/external-keys", body5);
|
|
6396
|
-
return
|
|
6642
|
+
return unwrap35(data);
|
|
6397
6643
|
}
|
|
6398
6644
|
/** Resolve (preview) the stored key for a provider. */
|
|
6399
6645
|
async resolve(provider) {
|
|
6400
6646
|
const data = await this.http.get(
|
|
6401
6647
|
`/external-keys/${provider}/resolve`
|
|
6402
6648
|
);
|
|
6403
|
-
return
|
|
6649
|
+
return unwrap35(data);
|
|
6404
6650
|
}
|
|
6405
6651
|
/**
|
|
6406
6652
|
* Delete the stored key for a provider.
|
|
@@ -6410,7 +6656,7 @@ var ExternalKeys = class {
|
|
|
6410
6656
|
await this.http.delete(`/external-keys/${provider}`);
|
|
6411
6657
|
}
|
|
6412
6658
|
};
|
|
6413
|
-
function
|
|
6659
|
+
function unwrap36(payload) {
|
|
6414
6660
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
6415
6661
|
return payload.data;
|
|
6416
6662
|
}
|
|
@@ -6463,13 +6709,13 @@ var FlatCustomDomains = class {
|
|
|
6463
6709
|
body: body5,
|
|
6464
6710
|
headers: { "Idempotency-Key": idempotencyKey5(ikey) }
|
|
6465
6711
|
});
|
|
6466
|
-
return
|
|
6712
|
+
return unwrap36(data);
|
|
6467
6713
|
}
|
|
6468
6714
|
async delete(domainId) {
|
|
6469
6715
|
await this.http.delete(`/custom-domains/${domainId}`);
|
|
6470
6716
|
}
|
|
6471
6717
|
};
|
|
6472
|
-
function
|
|
6718
|
+
function unwrap37(payload) {
|
|
6473
6719
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
6474
6720
|
return payload.data;
|
|
6475
6721
|
}
|
|
@@ -6505,7 +6751,7 @@ var Functions = class {
|
|
|
6505
6751
|
}
|
|
6506
6752
|
async get(functionId) {
|
|
6507
6753
|
const data = await this.http.get(`/functions/${functionId}`);
|
|
6508
|
-
return
|
|
6754
|
+
return unwrap37(data);
|
|
6509
6755
|
}
|
|
6510
6756
|
async create(params) {
|
|
6511
6757
|
const { idempotencyKey: ikey, memoryMb, timeoutSec, ...rest } = params;
|
|
@@ -6519,7 +6765,7 @@ var Functions = class {
|
|
|
6519
6765
|
body: body5,
|
|
6520
6766
|
headers: { "Idempotency-Key": idempotencyKey6(ikey) }
|
|
6521
6767
|
});
|
|
6522
|
-
return
|
|
6768
|
+
return unwrap37(data);
|
|
6523
6769
|
}
|
|
6524
6770
|
async update(functionId, params) {
|
|
6525
6771
|
const { memoryMb, timeoutSec, ...rest } = params;
|
|
@@ -6532,7 +6778,7 @@ var Functions = class {
|
|
|
6532
6778
|
`/functions/${functionId}`,
|
|
6533
6779
|
body5
|
|
6534
6780
|
);
|
|
6535
|
-
return
|
|
6781
|
+
return unwrap37(data);
|
|
6536
6782
|
}
|
|
6537
6783
|
async delete(functionId) {
|
|
6538
6784
|
await this.http.delete(`/functions/${functionId}`);
|
|
@@ -6553,7 +6799,7 @@ var Functions = class {
|
|
|
6553
6799
|
return data ?? {};
|
|
6554
6800
|
}
|
|
6555
6801
|
};
|
|
6556
|
-
function
|
|
6802
|
+
function unwrap38(payload) {
|
|
6557
6803
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
6558
6804
|
return payload.data;
|
|
6559
6805
|
}
|
|
@@ -6589,7 +6835,7 @@ var HealthChecks = class {
|
|
|
6589
6835
|
}
|
|
6590
6836
|
async get(checkId) {
|
|
6591
6837
|
const data = await this.http.get(`/health-checks/${checkId}`);
|
|
6592
|
-
return
|
|
6838
|
+
return unwrap38(data);
|
|
6593
6839
|
}
|
|
6594
6840
|
async create(params) {
|
|
6595
6841
|
const {
|
|
@@ -6610,7 +6856,7 @@ var HealthChecks = class {
|
|
|
6610
6856
|
body: body5,
|
|
6611
6857
|
headers: { "Idempotency-Key": idempotencyKey7(ikey) }
|
|
6612
6858
|
});
|
|
6613
|
-
return
|
|
6859
|
+
return unwrap38(data);
|
|
6614
6860
|
}
|
|
6615
6861
|
async update(checkId, params) {
|
|
6616
6862
|
const { intervalSec, timeoutSec, expectedStatus, ...rest } = params;
|
|
@@ -6624,7 +6870,7 @@ var HealthChecks = class {
|
|
|
6624
6870
|
`/health-checks/${checkId}`,
|
|
6625
6871
|
body5
|
|
6626
6872
|
);
|
|
6627
|
-
return
|
|
6873
|
+
return unwrap38(data);
|
|
6628
6874
|
}
|
|
6629
6875
|
async delete(checkId) {
|
|
6630
6876
|
await this.http.delete(`/health-checks/${checkId}`);
|
|
@@ -6632,7 +6878,7 @@ var HealthChecks = class {
|
|
|
6632
6878
|
};
|
|
6633
6879
|
|
|
6634
6880
|
// src/resources/integrations.ts
|
|
6635
|
-
function
|
|
6881
|
+
function unwrap39(payload) {
|
|
6636
6882
|
if (payload && typeof payload === "object") {
|
|
6637
6883
|
const p = payload;
|
|
6638
6884
|
for (const k of ["data", "integrations", "catalog", "items"]) {
|
|
@@ -6642,7 +6888,7 @@ function unwrap37(payload) {
|
|
|
6642
6888
|
return payload;
|
|
6643
6889
|
}
|
|
6644
6890
|
function listItems8(payload) {
|
|
6645
|
-
const result =
|
|
6891
|
+
const result = unwrap39(payload);
|
|
6646
6892
|
if (Array.isArray(result)) return result;
|
|
6647
6893
|
return [];
|
|
6648
6894
|
}
|
|
@@ -6671,14 +6917,14 @@ var Integrations = class {
|
|
|
6671
6917
|
const data = await this.http.get(
|
|
6672
6918
|
`/integrations/${provider}/start`
|
|
6673
6919
|
);
|
|
6674
|
-
return
|
|
6920
|
+
return unwrap39(data);
|
|
6675
6921
|
}
|
|
6676
6922
|
/** Force-refresh the access token for a provider. */
|
|
6677
6923
|
async refresh(provider) {
|
|
6678
6924
|
const data = await this.http.post(
|
|
6679
6925
|
`/integrations/${provider}/refresh`
|
|
6680
6926
|
);
|
|
6681
|
-
return
|
|
6927
|
+
return unwrap39(data);
|
|
6682
6928
|
}
|
|
6683
6929
|
/** Disconnect (revoke) an integration. */
|
|
6684
6930
|
async disconnect(provider) {
|
|
@@ -6703,7 +6949,7 @@ var Integrations = class {
|
|
|
6703
6949
|
"/integrations/slack/send-test",
|
|
6704
6950
|
body5
|
|
6705
6951
|
);
|
|
6706
|
-
return
|
|
6952
|
+
return unwrap39(data);
|
|
6707
6953
|
}
|
|
6708
6954
|
/** Send a test message to the connected Discord channel. */
|
|
6709
6955
|
async discordSendTest(params = {}) {
|
|
@@ -6712,13 +6958,13 @@ var Integrations = class {
|
|
|
6712
6958
|
"/integrations/discord/send-test",
|
|
6713
6959
|
body5
|
|
6714
6960
|
);
|
|
6715
|
-
return
|
|
6961
|
+
return unwrap39(data);
|
|
6716
6962
|
}
|
|
6717
6963
|
// ── Linear dedicated controller ────────────────────────────────────────────
|
|
6718
6964
|
/** Begin Linear OAuth — Linear has provider-specific error shapes. */
|
|
6719
6965
|
async linearStart() {
|
|
6720
6966
|
const data = await this.http.get("/integrations/linear/start");
|
|
6721
|
-
return
|
|
6967
|
+
return unwrap39(data);
|
|
6722
6968
|
}
|
|
6723
6969
|
/** Create a Linear issue via the connected workspace. */
|
|
6724
6970
|
async linearCreateIssue(params = {}) {
|
|
@@ -6727,12 +6973,12 @@ var Integrations = class {
|
|
|
6727
6973
|
"/integrations/linear/create-issue",
|
|
6728
6974
|
body5
|
|
6729
6975
|
);
|
|
6730
|
-
return
|
|
6976
|
+
return unwrap39(data);
|
|
6731
6977
|
}
|
|
6732
6978
|
};
|
|
6733
6979
|
|
|
6734
6980
|
// src/resources/mcp.ts
|
|
6735
|
-
function
|
|
6981
|
+
function unwrap40(payload) {
|
|
6736
6982
|
if (payload && typeof payload === "object") {
|
|
6737
6983
|
const p = payload;
|
|
6738
6984
|
for (const k of ["data", "mcp", "result", "items"]) {
|
|
@@ -6758,7 +7004,7 @@ var Mcp = class {
|
|
|
6758
7004
|
"/mcp",
|
|
6759
7005
|
Object.keys(body5).length > 0 ? body5 : void 0
|
|
6760
7006
|
);
|
|
6761
|
-
return
|
|
7007
|
+
return unwrap40(data);
|
|
6762
7008
|
}
|
|
6763
7009
|
/**
|
|
6764
7010
|
* Open the MCP listen channel (GET).
|
|
@@ -6768,7 +7014,7 @@ var Mcp = class {
|
|
|
6768
7014
|
*/
|
|
6769
7015
|
async listen() {
|
|
6770
7016
|
const data = await this.http.get("/mcp");
|
|
6771
|
-
return
|
|
7017
|
+
return unwrap40(data);
|
|
6772
7018
|
}
|
|
6773
7019
|
/** Close (terminate) the MCP session. */
|
|
6774
7020
|
async close() {
|
|
@@ -6777,7 +7023,7 @@ var Mcp = class {
|
|
|
6777
7023
|
};
|
|
6778
7024
|
|
|
6779
7025
|
// src/resources/models.ts
|
|
6780
|
-
function
|
|
7026
|
+
function unwrap41(data) {
|
|
6781
7027
|
if (Array.isArray(data)) return data;
|
|
6782
7028
|
if (data && typeof data === "object") {
|
|
6783
7029
|
const d = data;
|
|
@@ -6798,7 +7044,7 @@ var Models = class {
|
|
|
6798
7044
|
Object.entries(filters).filter(([, v]) => v !== void 0)
|
|
6799
7045
|
);
|
|
6800
7046
|
const data = await this.http.get("/intelligence/models", query3);
|
|
6801
|
-
return
|
|
7047
|
+
return unwrap41(data);
|
|
6802
7048
|
}
|
|
6803
7049
|
/**
|
|
6804
7050
|
* Get a single model by id.
|
|
@@ -7454,7 +7700,7 @@ function requestBody(params) {
|
|
|
7454
7700
|
config: authConfig(params)
|
|
7455
7701
|
});
|
|
7456
7702
|
}
|
|
7457
|
-
function
|
|
7703
|
+
function unwrap42(payload) {
|
|
7458
7704
|
if (payload && typeof payload === "object") {
|
|
7459
7705
|
const p = payload;
|
|
7460
7706
|
for (const k of ["data", "project_auth", "config", "items"]) {
|
|
@@ -7479,13 +7725,13 @@ var ProjectAuth = class {
|
|
|
7479
7725
|
"/project-auth/status",
|
|
7480
7726
|
resourcePayload(params)
|
|
7481
7727
|
);
|
|
7482
|
-
return
|
|
7728
|
+
return unwrap42(data);
|
|
7483
7729
|
}
|
|
7484
7730
|
/** Enable project auth. */
|
|
7485
7731
|
async enable(params) {
|
|
7486
7732
|
const body5 = requestBody(params);
|
|
7487
7733
|
const data = await this.http.post("/project-auth/enable", body5);
|
|
7488
|
-
return
|
|
7734
|
+
return unwrap42(data);
|
|
7489
7735
|
}
|
|
7490
7736
|
/** Disable project auth. */
|
|
7491
7737
|
async disable(params) {
|
|
@@ -7493,18 +7739,18 @@ var ProjectAuth = class {
|
|
|
7493
7739
|
"/project-auth/disable",
|
|
7494
7740
|
resourcePayload(params)
|
|
7495
7741
|
);
|
|
7496
|
-
return
|
|
7742
|
+
return unwrap42(data);
|
|
7497
7743
|
}
|
|
7498
7744
|
/** Update project-auth configuration. */
|
|
7499
7745
|
async update(params) {
|
|
7500
7746
|
const body5 = requestBody(params);
|
|
7501
7747
|
const data = await this.http.patch("/project-auth/config", body5);
|
|
7502
|
-
return
|
|
7748
|
+
return unwrap42(data);
|
|
7503
7749
|
}
|
|
7504
7750
|
};
|
|
7505
7751
|
|
|
7506
7752
|
// src/resources/project-integrations.ts
|
|
7507
|
-
function
|
|
7753
|
+
function unwrap43(payload) {
|
|
7508
7754
|
if (payload && typeof payload === "object") {
|
|
7509
7755
|
const p = payload;
|
|
7510
7756
|
for (const k of ["data", "project_integrations", "catalog", "items"]) {
|
|
@@ -7514,7 +7760,7 @@ function unwrap41(payload) {
|
|
|
7514
7760
|
return payload;
|
|
7515
7761
|
}
|
|
7516
7762
|
function listItems9(payload) {
|
|
7517
|
-
const result =
|
|
7763
|
+
const result = unwrap43(payload);
|
|
7518
7764
|
if (Array.isArray(result)) return result;
|
|
7519
7765
|
return [];
|
|
7520
7766
|
}
|
|
@@ -7549,13 +7795,13 @@ var ProjectIntegrations = class {
|
|
|
7549
7795
|
const data = await this.http.get(
|
|
7550
7796
|
`/project-integrations/${integrationId}`
|
|
7551
7797
|
);
|
|
7552
|
-
return
|
|
7798
|
+
return unwrap43(data);
|
|
7553
7799
|
}
|
|
7554
7800
|
/** Create a project integration. */
|
|
7555
7801
|
async create(params) {
|
|
7556
7802
|
const body5 = stripUndefObj2(params);
|
|
7557
7803
|
const data = await this.http.post("/project-integrations", body5);
|
|
7558
|
-
return
|
|
7804
|
+
return unwrap43(data);
|
|
7559
7805
|
}
|
|
7560
7806
|
/** Update a project integration. */
|
|
7561
7807
|
async update(integrationId, params) {
|
|
@@ -7564,7 +7810,7 @@ var ProjectIntegrations = class {
|
|
|
7564
7810
|
`/project-integrations/${integrationId}`,
|
|
7565
7811
|
body5
|
|
7566
7812
|
);
|
|
7567
|
-
return
|
|
7813
|
+
return unwrap43(data);
|
|
7568
7814
|
}
|
|
7569
7815
|
/** Delete a project integration. */
|
|
7570
7816
|
async delete(integrationId) {
|
|
@@ -7573,7 +7819,7 @@ var ProjectIntegrations = class {
|
|
|
7573
7819
|
};
|
|
7574
7820
|
|
|
7575
7821
|
// src/resources/provider-defaults.ts
|
|
7576
|
-
function
|
|
7822
|
+
function unwrap44(data) {
|
|
7577
7823
|
if (data && typeof data === "object") {
|
|
7578
7824
|
const d = data;
|
|
7579
7825
|
for (const k of ["data", "defaults", "provider_defaults", "config"]) {
|
|
@@ -7589,7 +7835,7 @@ var ProviderDefaults = class {
|
|
|
7589
7835
|
http;
|
|
7590
7836
|
/** Get the current fleet-wide provider defaults. */
|
|
7591
7837
|
async list() {
|
|
7592
|
-
return
|
|
7838
|
+
return unwrap44(await this.http.get("/admin/provider-defaults"));
|
|
7593
7839
|
}
|
|
7594
7840
|
/** Return the defaults entry for a single provider, or {} if missing. */
|
|
7595
7841
|
async get(provider) {
|
|
@@ -7605,13 +7851,13 @@ var ProviderDefaults = class {
|
|
|
7605
7851
|
const body5 = Object.fromEntries(
|
|
7606
7852
|
Object.entries(opts).filter(([, v]) => v !== void 0)
|
|
7607
7853
|
);
|
|
7608
|
-
return
|
|
7854
|
+
return unwrap44(
|
|
7609
7855
|
await this.http.put("/admin/provider-defaults", body5)
|
|
7610
7856
|
);
|
|
7611
7857
|
}
|
|
7612
7858
|
// ── Per-tenant overrides ────────────────────────────────────────────────
|
|
7613
7859
|
async getTenant(tenantId) {
|
|
7614
|
-
return
|
|
7860
|
+
return unwrap44(
|
|
7615
7861
|
await this.http.get(
|
|
7616
7862
|
`/admin/tenants/${tenantId}/provider-config`
|
|
7617
7863
|
)
|
|
@@ -7621,7 +7867,7 @@ var ProviderDefaults = class {
|
|
|
7621
7867
|
const body5 = Object.fromEntries(
|
|
7622
7868
|
Object.entries(opts).filter(([, v]) => v !== void 0)
|
|
7623
7869
|
);
|
|
7624
|
-
return
|
|
7870
|
+
return unwrap44(
|
|
7625
7871
|
await this.http.put(
|
|
7626
7872
|
`/admin/tenants/${tenantId}/provider-config`,
|
|
7627
7873
|
body5
|
|
@@ -7634,7 +7880,7 @@ var ProviderDefaults = class {
|
|
|
7634
7880
|
};
|
|
7635
7881
|
|
|
7636
7882
|
// src/resources/regions.ts
|
|
7637
|
-
function
|
|
7883
|
+
function unwrap45(payload) {
|
|
7638
7884
|
if (payload && typeof payload === "object") {
|
|
7639
7885
|
const p = payload;
|
|
7640
7886
|
for (const k of [
|
|
@@ -7651,7 +7897,7 @@ function unwrap43(payload) {
|
|
|
7651
7897
|
return payload;
|
|
7652
7898
|
}
|
|
7653
7899
|
function listItems10(payload) {
|
|
7654
|
-
const result =
|
|
7900
|
+
const result = unwrap45(payload);
|
|
7655
7901
|
if (Array.isArray(result)) return result;
|
|
7656
7902
|
return [];
|
|
7657
7903
|
}
|
|
@@ -7668,7 +7914,7 @@ var Regions = class {
|
|
|
7668
7914
|
/** Get canonical compute catalog, including product templates and readiness. */
|
|
7669
7915
|
async catalog() {
|
|
7670
7916
|
const data = await this.http.get("/compute/catalog");
|
|
7671
|
-
return
|
|
7917
|
+
return unwrap45(data);
|
|
7672
7918
|
}
|
|
7673
7919
|
/** List available compute sizes. */
|
|
7674
7920
|
async listSizes() {
|
|
@@ -7678,7 +7924,7 @@ var Regions = class {
|
|
|
7678
7924
|
/** Get static compute pricing data. */
|
|
7679
7925
|
async pricing() {
|
|
7680
7926
|
const data = await this.http.get("/compute/pricing");
|
|
7681
|
-
return
|
|
7927
|
+
return unwrap45(data);
|
|
7682
7928
|
}
|
|
7683
7929
|
/** List community computer templates. */
|
|
7684
7930
|
async listTemplates() {
|
|
@@ -7690,12 +7936,12 @@ var Regions = class {
|
|
|
7690
7936
|
const data = await this.http.get(
|
|
7691
7937
|
`/compute/templates/${templateId}`
|
|
7692
7938
|
);
|
|
7693
|
-
return
|
|
7939
|
+
return unwrap45(data);
|
|
7694
7940
|
}
|
|
7695
7941
|
};
|
|
7696
7942
|
|
|
7697
7943
|
// src/resources/runtime-env.ts
|
|
7698
|
-
function
|
|
7944
|
+
function unwrap46(payload) {
|
|
7699
7945
|
if (payload !== null && typeof payload === "object" && "data" in payload && payload.data !== void 0) {
|
|
7700
7946
|
return payload.data;
|
|
7701
7947
|
}
|
|
@@ -7748,11 +7994,11 @@ var RuntimeEnv = class {
|
|
|
7748
7994
|
"/runtime-env",
|
|
7749
7995
|
query2(params)
|
|
7750
7996
|
);
|
|
7751
|
-
return
|
|
7997
|
+
return unwrap46(response).map(normalize2);
|
|
7752
7998
|
}
|
|
7753
7999
|
async get(id) {
|
|
7754
8000
|
return normalize2(
|
|
7755
|
-
|
|
8001
|
+
unwrap46(
|
|
7756
8002
|
await this.http.get(
|
|
7757
8003
|
`/runtime-env/${encodeURIComponent(id)}`
|
|
7758
8004
|
)
|
|
@@ -7761,7 +8007,7 @@ var RuntimeEnv = class {
|
|
|
7761
8007
|
}
|
|
7762
8008
|
async set(params) {
|
|
7763
8009
|
return normalize2(
|
|
7764
|
-
|
|
8010
|
+
unwrap46(
|
|
7765
8011
|
await this.http.post(
|
|
7766
8012
|
"/runtime-env",
|
|
7767
8013
|
body4(params)
|
|
@@ -7775,7 +8021,7 @@ var RuntimeEnv = class {
|
|
|
7775
8021
|
};
|
|
7776
8022
|
|
|
7777
8023
|
// src/resources/runtime-capabilities.ts
|
|
7778
|
-
function
|
|
8024
|
+
function unwrap47(payload) {
|
|
7779
8025
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
7780
8026
|
return payload.data;
|
|
7781
8027
|
}
|
|
@@ -7787,7 +8033,7 @@ var RuntimeCapabilitiesResource = class {
|
|
|
7787
8033
|
}
|
|
7788
8034
|
http;
|
|
7789
8035
|
async get() {
|
|
7790
|
-
return
|
|
8036
|
+
return unwrap47(
|
|
7791
8037
|
await this.http.get("/runtime-capabilities")
|
|
7792
8038
|
);
|
|
7793
8039
|
}
|
|
@@ -7817,7 +8063,7 @@ var AGENT_WORKSPACE_KEEP_LAST_SNAPSHOTS = 1;
|
|
|
7817
8063
|
function isLegacyForkParams(opts) {
|
|
7818
8064
|
return "name" in opts || "metadata" in opts;
|
|
7819
8065
|
}
|
|
7820
|
-
function
|
|
8066
|
+
function unwrap48(payload) {
|
|
7821
8067
|
if (payload !== null && typeof payload === "object" && "data" in payload && payload.data !== void 0) {
|
|
7822
8068
|
return payload.data;
|
|
7823
8069
|
}
|
|
@@ -7920,6 +8166,12 @@ function createBody(params = {}) {
|
|
|
7920
8166
|
slug: params.slug,
|
|
7921
8167
|
agent_runtime_profile_id: params.agentRuntimeProfileId ?? params.agent_runtime_profile_id ?? params.agentProfileId ?? params.agent_profile_id,
|
|
7922
8168
|
skip_agent_runtime_profile: params.skipRuntimeProfile ?? params.skip_agent_runtime_profile,
|
|
8169
|
+
workspace_id: params.workspaceId ?? params.workspace_id,
|
|
8170
|
+
workspace_slug: params.workspaceSlug ?? params.workspace_slug,
|
|
8171
|
+
workspace_name: params.workspaceName ?? params.workspace_name,
|
|
8172
|
+
project_id: params.projectId ?? params.project_id,
|
|
8173
|
+
project_slug: params.projectSlug ?? params.project_slug,
|
|
8174
|
+
project_name: params.projectName ?? params.project_name,
|
|
7923
8175
|
external_workspace_id: params.externalWorkspaceId ?? params.external_workspace_id,
|
|
7924
8176
|
external_user_id: params.externalUserId ?? params.external_user_id,
|
|
7925
8177
|
external_project_id: params.externalProjectId ?? params.external_project_id
|
|
@@ -8078,7 +8330,7 @@ var SandboxTerminal = class {
|
|
|
8078
8330
|
const body5 = Object.fromEntries(
|
|
8079
8331
|
Object.entries(params).filter(([, v]) => v !== void 0)
|
|
8080
8332
|
);
|
|
8081
|
-
const response =
|
|
8333
|
+
const response = unwrap48(
|
|
8082
8334
|
await this.sandbox.http.post(`/sandboxes/${this.sandbox.id}/terminal`, body5)
|
|
8083
8335
|
);
|
|
8084
8336
|
return response;
|
|
@@ -8136,7 +8388,7 @@ var SandboxPreviews = class {
|
|
|
8136
8388
|
Object.entries(opts).filter(([, v]) => v !== void 0)
|
|
8137
8389
|
)
|
|
8138
8390
|
};
|
|
8139
|
-
return
|
|
8391
|
+
return unwrap48(
|
|
8140
8392
|
await this.http.post(
|
|
8141
8393
|
`/sandboxes/${this.sandbox.id}/previews`,
|
|
8142
8394
|
body5
|
|
@@ -8144,7 +8396,7 @@ var SandboxPreviews = class {
|
|
|
8144
8396
|
);
|
|
8145
8397
|
}
|
|
8146
8398
|
async get(previewId) {
|
|
8147
|
-
return
|
|
8399
|
+
return unwrap48(
|
|
8148
8400
|
await this.http.get(
|
|
8149
8401
|
`/sandboxes/${this.sandbox.id}/previews/${previewId}`
|
|
8150
8402
|
)
|
|
@@ -8157,7 +8409,7 @@ var SandboxPreviews = class {
|
|
|
8157
8409
|
}
|
|
8158
8410
|
/** Mint a share token for previewId. */
|
|
8159
8411
|
async share(previewId, opts = {}) {
|
|
8160
|
-
return
|
|
8412
|
+
return unwrap48(
|
|
8161
8413
|
await this.http.post(
|
|
8162
8414
|
`/sandboxes/${this.sandbox.id}/previews/${previewId}/share`,
|
|
8163
8415
|
{ ttl_seconds: opts.ttl_seconds ?? opts.expires_in_sec ?? 3600 }
|
|
@@ -8226,7 +8478,7 @@ var SandboxTags = class {
|
|
|
8226
8478
|
sandbox;
|
|
8227
8479
|
/** Replace the full tag list with tags. */
|
|
8228
8480
|
async set(tags) {
|
|
8229
|
-
return
|
|
8481
|
+
return unwrap48(
|
|
8230
8482
|
await this.sandbox.http.patch(`/sandboxes/${this.sandbox.id}/tags`, { tags })
|
|
8231
8483
|
);
|
|
8232
8484
|
}
|
|
@@ -8300,7 +8552,7 @@ var Sandbox = class _Sandbox {
|
|
|
8300
8552
|
return this.data.template_id ?? this.data.image_id ?? "";
|
|
8301
8553
|
}
|
|
8302
8554
|
async refresh() {
|
|
8303
|
-
this.data =
|
|
8555
|
+
this.data = unwrap48(
|
|
8304
8556
|
await this.http.get(`/sandboxes/${this.id}`)
|
|
8305
8557
|
);
|
|
8306
8558
|
return this;
|
|
@@ -8342,7 +8594,7 @@ var Sandbox = class _Sandbox {
|
|
|
8342
8594
|
}
|
|
8343
8595
|
async runExec(command, options) {
|
|
8344
8596
|
this.assertRunning("exec");
|
|
8345
|
-
const response =
|
|
8597
|
+
const response = unwrap48(
|
|
8346
8598
|
await this.http.post(
|
|
8347
8599
|
`/sandboxes/${this.id}/exec`,
|
|
8348
8600
|
execBody(command, options)
|
|
@@ -8387,7 +8639,7 @@ var Sandbox = class _Sandbox {
|
|
|
8387
8639
|
}
|
|
8388
8640
|
async createExport(params) {
|
|
8389
8641
|
const body5 = typeof params === "string" ? { path: params } : Array.isArray(params) ? { paths: params } : params;
|
|
8390
|
-
const response =
|
|
8642
|
+
const response = unwrap48(
|
|
8391
8643
|
await this.http.post(
|
|
8392
8644
|
`/sandboxes/${this.id}/exports`,
|
|
8393
8645
|
body5
|
|
@@ -8412,7 +8664,7 @@ var Sandbox = class _Sandbox {
|
|
|
8412
8664
|
}
|
|
8413
8665
|
async listFiles(path = "/workspace") {
|
|
8414
8666
|
this.assertRunning("files.list");
|
|
8415
|
-
const response =
|
|
8667
|
+
const response = unwrap48(
|
|
8416
8668
|
await this.http.get(
|
|
8417
8669
|
`/sandboxes/${this.id}/files`,
|
|
8418
8670
|
{ path }
|
|
@@ -8422,7 +8674,7 @@ var Sandbox = class _Sandbox {
|
|
|
8422
8674
|
}
|
|
8423
8675
|
async statFile(path) {
|
|
8424
8676
|
this.assertRunning("files.stat");
|
|
8425
|
-
return
|
|
8677
|
+
return unwrap48(
|
|
8426
8678
|
await this.http.post(
|
|
8427
8679
|
`/sandboxes/${this.id}/files/stat`,
|
|
8428
8680
|
{ path }
|
|
@@ -8442,7 +8694,7 @@ var Sandbox = class _Sandbox {
|
|
|
8442
8694
|
}
|
|
8443
8695
|
async exposeInfo(port) {
|
|
8444
8696
|
this.assertRunning("expose");
|
|
8445
|
-
const response =
|
|
8697
|
+
const response = unwrap48(
|
|
8446
8698
|
await this.http.post(
|
|
8447
8699
|
`/sandboxes/${this.id}/expose`,
|
|
8448
8700
|
port === void 0 ? {} : { port }
|
|
@@ -8452,7 +8704,7 @@ var Sandbox = class _Sandbox {
|
|
|
8452
8704
|
}
|
|
8453
8705
|
async startTemplate(options = {}) {
|
|
8454
8706
|
this.assertRunning("startTemplate");
|
|
8455
|
-
return
|
|
8707
|
+
return unwrap48(
|
|
8456
8708
|
await this.http.post(
|
|
8457
8709
|
`/sandboxes/${this.id}/template/start`,
|
|
8458
8710
|
options
|
|
@@ -8460,7 +8712,7 @@ var Sandbox = class _Sandbox {
|
|
|
8460
8712
|
);
|
|
8461
8713
|
}
|
|
8462
8714
|
async getArtifacts() {
|
|
8463
|
-
return
|
|
8715
|
+
return unwrap48(
|
|
8464
8716
|
await this.http.get(
|
|
8465
8717
|
`/sandboxes/${this.id}/artifacts`
|
|
8466
8718
|
)
|
|
@@ -8471,7 +8723,7 @@ var Sandbox = class _Sandbox {
|
|
|
8471
8723
|
`/sandboxes/${this.id}/logs`,
|
|
8472
8724
|
{ lines }
|
|
8473
8725
|
);
|
|
8474
|
-
return
|
|
8726
|
+
return unwrap48(response);
|
|
8475
8727
|
}
|
|
8476
8728
|
streamLogs() {
|
|
8477
8729
|
return this.http.stream(
|
|
@@ -8479,7 +8731,7 @@ var Sandbox = class _Sandbox {
|
|
|
8479
8731
|
);
|
|
8480
8732
|
}
|
|
8481
8733
|
async metrics(window2 = "1h") {
|
|
8482
|
-
return
|
|
8734
|
+
return unwrap48(
|
|
8483
8735
|
await this.http.get(
|
|
8484
8736
|
`/sandboxes/${this.id}/metrics`,
|
|
8485
8737
|
{ window: window2 }
|
|
@@ -8491,7 +8743,7 @@ var Sandbox = class _Sandbox {
|
|
|
8491
8743
|
}
|
|
8492
8744
|
async createSnapshot(comment) {
|
|
8493
8745
|
this.assertRunning("snapshots.create");
|
|
8494
|
-
return
|
|
8746
|
+
return unwrap48(
|
|
8495
8747
|
await this.http.post(
|
|
8496
8748
|
`/sandboxes/${this.id}/snapshots`,
|
|
8497
8749
|
comment ? { comment } : {}
|
|
@@ -8499,14 +8751,14 @@ var Sandbox = class _Sandbox {
|
|
|
8499
8751
|
);
|
|
8500
8752
|
}
|
|
8501
8753
|
async listSnapshots() {
|
|
8502
|
-
return
|
|
8754
|
+
return unwrap48(
|
|
8503
8755
|
await this.http.get(
|
|
8504
8756
|
`/sandboxes/${this.id}/snapshots`
|
|
8505
8757
|
)
|
|
8506
8758
|
);
|
|
8507
8759
|
}
|
|
8508
8760
|
async restoreSnapshot(snapshotId) {
|
|
8509
|
-
const data =
|
|
8761
|
+
const data = unwrap48(
|
|
8510
8762
|
await this.http.post(
|
|
8511
8763
|
`/sandboxes/${this.id}/restore/${snapshotId}`,
|
|
8512
8764
|
{}
|
|
@@ -8523,11 +8775,12 @@ var Sandbox = class _Sandbox {
|
|
|
8523
8775
|
}
|
|
8524
8776
|
this.assertRunning("fork");
|
|
8525
8777
|
const body5 = stripUndefined26({
|
|
8778
|
+
snapshot_id: opts.snapshotId ?? opts.snapshot_id,
|
|
8526
8779
|
timeout_sec: opts.timeoutSec ?? opts.timeout_sec,
|
|
8527
8780
|
template_id: opts.templateId ?? opts.template_id
|
|
8528
8781
|
});
|
|
8529
8782
|
const idempotencyKey11 = opts.idempotencyKey ?? opts.idempotency_key;
|
|
8530
|
-
const data =
|
|
8783
|
+
const data = unwrap48(
|
|
8531
8784
|
await this.http.request(
|
|
8532
8785
|
`/sandboxes/${this.id}/fork`,
|
|
8533
8786
|
{
|
|
@@ -8543,13 +8796,14 @@ var Sandbox = class _Sandbox {
|
|
|
8543
8796
|
async forkLegacy(opts = {}) {
|
|
8544
8797
|
this.assertRunning("fork");
|
|
8545
8798
|
const body5 = stripUndefined26({
|
|
8799
|
+
snapshot_id: opts.snapshotId ?? opts.snapshot_id,
|
|
8546
8800
|
timeout_sec: opts.timeoutSec ?? opts.timeout_sec,
|
|
8547
8801
|
template_id: opts.templateId ?? opts.template_id,
|
|
8548
8802
|
name: opts.name,
|
|
8549
8803
|
metadata: opts.metadata
|
|
8550
8804
|
});
|
|
8551
8805
|
const idempotencyKey11 = opts.idempotencyKey ?? opts.idempotency_key;
|
|
8552
|
-
const data =
|
|
8806
|
+
const data = unwrap48(
|
|
8553
8807
|
await this.http.request(
|
|
8554
8808
|
`/sandboxes/${this.id}/fork`,
|
|
8555
8809
|
{
|
|
@@ -8585,7 +8839,7 @@ var Sandbox = class _Sandbox {
|
|
|
8585
8839
|
timeout_sec: params.timeout_sec ?? params.timeoutSec,
|
|
8586
8840
|
idle_timeout_sec: params.idle_timeout_sec ?? params.idleTimeoutSec
|
|
8587
8841
|
});
|
|
8588
|
-
const data =
|
|
8842
|
+
const data = unwrap48(
|
|
8589
8843
|
await this.http.patch(
|
|
8590
8844
|
`/sandboxes/${this.id}`,
|
|
8591
8845
|
body5
|
|
@@ -8595,7 +8849,7 @@ var Sandbox = class _Sandbox {
|
|
|
8595
8849
|
return this;
|
|
8596
8850
|
}
|
|
8597
8851
|
async extend(timeoutSec) {
|
|
8598
|
-
const data =
|
|
8852
|
+
const data = unwrap48(
|
|
8599
8853
|
await this.http.post(
|
|
8600
8854
|
`/sandboxes/${this.id}/extend`,
|
|
8601
8855
|
timeoutSec === void 0 ? {} : { timeout_sec: timeoutSec }
|
|
@@ -8605,7 +8859,7 @@ var Sandbox = class _Sandbox {
|
|
|
8605
8859
|
return this;
|
|
8606
8860
|
}
|
|
8607
8861
|
async usage() {
|
|
8608
|
-
return
|
|
8862
|
+
return unwrap48(
|
|
8609
8863
|
await this.http.get(
|
|
8610
8864
|
`/sandboxes/${this.id}/usage`
|
|
8611
8865
|
)
|
|
@@ -8625,7 +8879,7 @@ var Sandbox = class _Sandbox {
|
|
|
8625
8879
|
return raw;
|
|
8626
8880
|
}
|
|
8627
8881
|
async pause() {
|
|
8628
|
-
const data =
|
|
8882
|
+
const data = unwrap48(
|
|
8629
8883
|
await this.http.post(
|
|
8630
8884
|
`/sandboxes/${this.id}/pause`,
|
|
8631
8885
|
{}
|
|
@@ -8646,7 +8900,7 @@ var Sandbox = class _Sandbox {
|
|
|
8646
8900
|
`/sandboxes/${this.id}/resume`,
|
|
8647
8901
|
{}
|
|
8648
8902
|
);
|
|
8649
|
-
const data =
|
|
8903
|
+
const data = unwrap48(response);
|
|
8650
8904
|
this.data = { ...this.data, ...data };
|
|
8651
8905
|
return this;
|
|
8652
8906
|
}
|
|
@@ -8677,7 +8931,7 @@ var Sandbox = class _Sandbox {
|
|
|
8677
8931
|
if (idempotencyKey11) {
|
|
8678
8932
|
requestOptions.headers = { "Idempotency-Key": idempotencyKey11 };
|
|
8679
8933
|
}
|
|
8680
|
-
return
|
|
8934
|
+
return unwrap48(
|
|
8681
8935
|
await this.http.request(
|
|
8682
8936
|
`/sandboxes/${this.id}/deploy`,
|
|
8683
8937
|
requestOptions
|
|
@@ -8687,9 +8941,57 @@ var Sandbox = class _Sandbox {
|
|
|
8687
8941
|
async deployDocker(params = {}) {
|
|
8688
8942
|
return this.deploy({ ...params, deploymentType: "docker_deploy" });
|
|
8689
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
|
+
}
|
|
8690
8992
|
/** Check readiness of the sandbox (GET /sandboxes/:id/readiness). */
|
|
8691
8993
|
async readiness() {
|
|
8692
|
-
return
|
|
8994
|
+
return unwrap48(
|
|
8693
8995
|
await this.http.get(
|
|
8694
8996
|
`/sandboxes/${this.id}/readiness`
|
|
8695
8997
|
)
|
|
@@ -8857,7 +9159,7 @@ var Sandboxes = class {
|
|
|
8857
9159
|
if (idempotencyKey11) {
|
|
8858
9160
|
requestOptions.headers = { "Idempotency-Key": idempotencyKey11 };
|
|
8859
9161
|
}
|
|
8860
|
-
const data =
|
|
9162
|
+
const data = unwrap48(
|
|
8861
9163
|
await this.http.request(
|
|
8862
9164
|
"/sandboxes",
|
|
8863
9165
|
requestOptions
|
|
@@ -8876,7 +9178,7 @@ var Sandboxes = class {
|
|
|
8876
9178
|
return listItems11(data).map((item) => new Sandbox(this.http, item));
|
|
8877
9179
|
}
|
|
8878
9180
|
async get(id) {
|
|
8879
|
-
const data =
|
|
9181
|
+
const data = unwrap48(
|
|
8880
9182
|
await this.http.get(`/sandboxes/${id}`)
|
|
8881
9183
|
);
|
|
8882
9184
|
return new Sandbox(this.http, data);
|
|
@@ -8904,7 +9206,7 @@ var Sandboxes = class {
|
|
|
8904
9206
|
return this.get(id);
|
|
8905
9207
|
}
|
|
8906
9208
|
async getByName(name) {
|
|
8907
|
-
const data =
|
|
9209
|
+
const data = unwrap48(
|
|
8908
9210
|
await this.http.get(
|
|
8909
9211
|
`/sandboxes/by-name/${encodeURIComponent(name)}`
|
|
8910
9212
|
)
|
|
@@ -8951,7 +9253,7 @@ var Sandboxes = class {
|
|
|
8951
9253
|
);
|
|
8952
9254
|
}
|
|
8953
9255
|
async validateBuildSpec(buildSpec) {
|
|
8954
|
-
return
|
|
9256
|
+
return unwrap48(
|
|
8955
9257
|
await this.http.post(
|
|
8956
9258
|
"/sandbox-templates/validate",
|
|
8957
9259
|
{
|
|
@@ -8971,7 +9273,7 @@ var Sandboxes = class {
|
|
|
8971
9273
|
metadata: params.metadata
|
|
8972
9274
|
})
|
|
8973
9275
|
);
|
|
8974
|
-
return
|
|
9276
|
+
return unwrap48(response);
|
|
8975
9277
|
}
|
|
8976
9278
|
async createTemplateBuild(templateId, params = {}) {
|
|
8977
9279
|
const response = await this.http.post(
|
|
@@ -8981,19 +9283,19 @@ var Sandboxes = class {
|
|
|
8981
9283
|
metadata: params.metadata
|
|
8982
9284
|
})
|
|
8983
9285
|
);
|
|
8984
|
-
return
|
|
9286
|
+
return unwrap48(response);
|
|
8985
9287
|
}
|
|
8986
9288
|
async listTemplateBuilds(templateId) {
|
|
8987
9289
|
const response = await this.http.get(
|
|
8988
9290
|
`/sandbox-templates/${templateId}/builds`
|
|
8989
9291
|
);
|
|
8990
|
-
return
|
|
9292
|
+
return unwrap48(response);
|
|
8991
9293
|
}
|
|
8992
9294
|
async getTemplateBuild(buildId) {
|
|
8993
9295
|
const response = await this.http.get(
|
|
8994
9296
|
`/sandbox-template-builds/${buildId}`
|
|
8995
9297
|
);
|
|
8996
|
-
return
|
|
9298
|
+
return unwrap48(response);
|
|
8997
9299
|
}
|
|
8998
9300
|
};
|
|
8999
9301
|
function toBase642(bytes) {
|
|
@@ -9025,7 +9327,7 @@ function previewInfoFromResponse(response) {
|
|
|
9025
9327
|
)
|
|
9026
9328
|
};
|
|
9027
9329
|
}
|
|
9028
|
-
function
|
|
9330
|
+
function unwrap49(payload) {
|
|
9029
9331
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
9030
9332
|
return payload.data;
|
|
9031
9333
|
}
|
|
@@ -9068,7 +9370,7 @@ var SandboxTemplates = class {
|
|
|
9068
9370
|
const data = await this.http.get(
|
|
9069
9371
|
`/sandbox-templates/${templateId}`
|
|
9070
9372
|
);
|
|
9071
|
-
return
|
|
9373
|
+
return unwrap49(data);
|
|
9072
9374
|
}
|
|
9073
9375
|
async create(params) {
|
|
9074
9376
|
const {
|
|
@@ -9088,7 +9390,7 @@ var SandboxTemplates = class {
|
|
|
9088
9390
|
body: body5,
|
|
9089
9391
|
headers: { "Idempotency-Key": idempotencyKey8(ikey) }
|
|
9090
9392
|
});
|
|
9091
|
-
return
|
|
9393
|
+
return unwrap49(data);
|
|
9092
9394
|
}
|
|
9093
9395
|
async buildSpecSchema() {
|
|
9094
9396
|
const data = await this.http.get("/sandbox-templates/build-spec");
|
|
@@ -9121,12 +9423,12 @@ var SandboxTemplates = class {
|
|
|
9121
9423
|
headers: { "Idempotency-Key": idempotencyKey8(ikey) }
|
|
9122
9424
|
}
|
|
9123
9425
|
);
|
|
9124
|
-
return
|
|
9426
|
+
return unwrap49(data);
|
|
9125
9427
|
}
|
|
9126
9428
|
};
|
|
9127
9429
|
|
|
9128
9430
|
// src/resources/settings.ts
|
|
9129
|
-
function
|
|
9431
|
+
function unwrap50(payload) {
|
|
9130
9432
|
if (payload && typeof payload === "object") {
|
|
9131
9433
|
const p = payload;
|
|
9132
9434
|
for (const k of [
|
|
@@ -9142,7 +9444,7 @@ function unwrap48(payload) {
|
|
|
9142
9444
|
return payload;
|
|
9143
9445
|
}
|
|
9144
9446
|
function listItems13(payload) {
|
|
9145
|
-
const result =
|
|
9447
|
+
const result = unwrap50(payload);
|
|
9146
9448
|
if (Array.isArray(result)) return result;
|
|
9147
9449
|
return [];
|
|
9148
9450
|
}
|
|
@@ -9159,46 +9461,46 @@ var Settings = class {
|
|
|
9159
9461
|
/** Get the current tenant settings. */
|
|
9160
9462
|
async get() {
|
|
9161
9463
|
const data = await this.http.get("/settings");
|
|
9162
|
-
return
|
|
9464
|
+
return unwrap50(data);
|
|
9163
9465
|
}
|
|
9164
9466
|
/** Update tenant settings. */
|
|
9165
9467
|
async update(params) {
|
|
9166
9468
|
const body5 = stripUndefined28(params);
|
|
9167
9469
|
const data = await this.http.put("/settings", body5);
|
|
9168
|
-
return
|
|
9470
|
+
return unwrap50(data);
|
|
9169
9471
|
}
|
|
9170
9472
|
// ── Branding ──────────────────────────────────────────────────────────────
|
|
9171
9473
|
/** Get tenant branding (logo, colors, custom wordmark). */
|
|
9172
9474
|
async getBranding() {
|
|
9173
9475
|
const data = await this.http.get("/settings/branding");
|
|
9174
|
-
return
|
|
9476
|
+
return unwrap50(data);
|
|
9175
9477
|
}
|
|
9176
9478
|
/** Update tenant branding. */
|
|
9177
9479
|
async updateBranding(params) {
|
|
9178
9480
|
const body5 = stripUndefined28(params);
|
|
9179
9481
|
const data = await this.http.put("/settings/branding", body5);
|
|
9180
|
-
return
|
|
9482
|
+
return unwrap50(data);
|
|
9181
9483
|
}
|
|
9182
9484
|
// ── Read-only reference data ───────────────────────────────────────────────
|
|
9183
9485
|
/** Get tenant-scoped compute pricing. */
|
|
9184
9486
|
async computePricing() {
|
|
9185
9487
|
const data = await this.http.get("/settings/compute-pricing");
|
|
9186
|
-
return
|
|
9488
|
+
return unwrap50(data);
|
|
9187
9489
|
}
|
|
9188
9490
|
/** Get tenant-scoped GPU pricing. */
|
|
9189
9491
|
async gpuPricing() {
|
|
9190
9492
|
const data = await this.http.get("/settings/gpu-pricing");
|
|
9191
|
-
return
|
|
9493
|
+
return unwrap50(data);
|
|
9192
9494
|
}
|
|
9193
9495
|
/** List models available to this tenant. */
|
|
9194
9496
|
async availableModels() {
|
|
9195
9497
|
const data = await this.http.get("/settings/available-models");
|
|
9196
|
-
return
|
|
9498
|
+
return unwrap50(data);
|
|
9197
9499
|
}
|
|
9198
9500
|
/** List regions enabled for this tenant. */
|
|
9199
9501
|
async regions() {
|
|
9200
9502
|
const data = await this.http.get("/settings/regions");
|
|
9201
|
-
return
|
|
9503
|
+
return unwrap50(data);
|
|
9202
9504
|
}
|
|
9203
9505
|
// ── BYOK provider keys ────────────────────────────────────────────────────
|
|
9204
9506
|
/** List tenant-level BYOK provider keys (Anthropic, OpenAI, etc.). */
|
|
@@ -9213,7 +9515,7 @@ var Settings = class {
|
|
|
9213
9515
|
`/settings/provider-keys/${provider}`,
|
|
9214
9516
|
body5
|
|
9215
9517
|
);
|
|
9216
|
-
return
|
|
9518
|
+
return unwrap50(data);
|
|
9217
9519
|
}
|
|
9218
9520
|
/** Delete a BYOK provider key. */
|
|
9219
9521
|
async deleteProviderKey(provider) {
|
|
@@ -9222,7 +9524,7 @@ var Settings = class {
|
|
|
9222
9524
|
};
|
|
9223
9525
|
|
|
9224
9526
|
// src/resources/snapshots-standalone.ts
|
|
9225
|
-
function
|
|
9527
|
+
function unwrap51(data) {
|
|
9226
9528
|
if (data && typeof data === "object") {
|
|
9227
9529
|
const d = data;
|
|
9228
9530
|
for (const k of ["data", "snapshots", "items"]) {
|
|
@@ -9253,14 +9555,14 @@ var SnapshotsStandalone = class {
|
|
|
9253
9555
|
return unwrapList14(await this.http.get("/admin/snapshots", query3));
|
|
9254
9556
|
}
|
|
9255
9557
|
async get(snapshotId) {
|
|
9256
|
-
return
|
|
9558
|
+
return unwrap51(
|
|
9257
9559
|
await this.http.get(`/admin/snapshots/${snapshotId}`)
|
|
9258
9560
|
);
|
|
9259
9561
|
}
|
|
9260
9562
|
};
|
|
9261
9563
|
|
|
9262
9564
|
// src/resources/storage.ts
|
|
9263
|
-
function
|
|
9565
|
+
function unwrap52(payload) {
|
|
9264
9566
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
9265
9567
|
return payload.data;
|
|
9266
9568
|
}
|
|
@@ -9299,11 +9601,11 @@ var Storage = class {
|
|
|
9299
9601
|
...rest
|
|
9300
9602
|
});
|
|
9301
9603
|
const data = await this.http.post("/storage/buckets", body5);
|
|
9302
|
-
return
|
|
9604
|
+
return unwrap52(data);
|
|
9303
9605
|
}
|
|
9304
9606
|
async getBucket(bucketId) {
|
|
9305
9607
|
const data = await this.http.get(`/storage/buckets/${bucketId}`);
|
|
9306
|
-
return
|
|
9608
|
+
return unwrap52(data);
|
|
9307
9609
|
}
|
|
9308
9610
|
async deleteBucket(bucketId) {
|
|
9309
9611
|
await this.http.delete(`/storage/buckets/${bucketId}`);
|
|
@@ -9353,7 +9655,7 @@ var Storage = class {
|
|
|
9353
9655
|
`/storage/buckets/${bucketId}/presign`,
|
|
9354
9656
|
body5
|
|
9355
9657
|
);
|
|
9356
|
-
return
|
|
9658
|
+
return unwrap52(data);
|
|
9357
9659
|
}
|
|
9358
9660
|
};
|
|
9359
9661
|
|
|
@@ -9493,7 +9795,7 @@ var Organizations = class {
|
|
|
9493
9795
|
};
|
|
9494
9796
|
|
|
9495
9797
|
// src/resources/tenant.ts
|
|
9496
|
-
function
|
|
9798
|
+
function unwrap53(payload) {
|
|
9497
9799
|
if (payload && typeof payload === "object") {
|
|
9498
9800
|
const p = payload;
|
|
9499
9801
|
for (const k of ["data", "tenant", "branding", "items"]) {
|
|
@@ -9515,14 +9817,14 @@ var PreviewDomain = class {
|
|
|
9515
9817
|
/** Get the tenant's white-label preview domain settings. */
|
|
9516
9818
|
async get() {
|
|
9517
9819
|
const data = await this.http.get("/tenant/preview-domain");
|
|
9518
|
-
return
|
|
9820
|
+
return unwrap53(data);
|
|
9519
9821
|
}
|
|
9520
9822
|
/** Set the tenant's white-label preview domain. */
|
|
9521
9823
|
async set(domain) {
|
|
9522
9824
|
const data = await this.http.put("/tenant/preview-domain", {
|
|
9523
9825
|
preview_domain: domain
|
|
9524
9826
|
});
|
|
9525
|
-
return
|
|
9827
|
+
return unwrap53(data);
|
|
9526
9828
|
}
|
|
9527
9829
|
/** Re-run DNS verification for the configured preview domain. */
|
|
9528
9830
|
async verify() {
|
|
@@ -9530,7 +9832,7 @@ var PreviewDomain = class {
|
|
|
9530
9832
|
"/tenant/preview-domain/verify",
|
|
9531
9833
|
{}
|
|
9532
9834
|
);
|
|
9533
|
-
return
|
|
9835
|
+
return unwrap53(data);
|
|
9534
9836
|
}
|
|
9535
9837
|
/** Remove the tenant's custom preview domain. */
|
|
9536
9838
|
async delete() {
|
|
@@ -9545,14 +9847,14 @@ var Branding = class {
|
|
|
9545
9847
|
/** Get tenant branding used by white-label hosted surfaces. */
|
|
9546
9848
|
async get() {
|
|
9547
9849
|
const data = await this.http.get("/tenant/branding");
|
|
9548
|
-
return
|
|
9850
|
+
return unwrap53(data);
|
|
9549
9851
|
}
|
|
9550
9852
|
/** Update tenant branding used by white-label hosted surfaces. */
|
|
9551
9853
|
async set(params) {
|
|
9552
9854
|
const data = await this.http.put("/tenant/branding", {
|
|
9553
9855
|
branding: stripUndefined30(params)
|
|
9554
9856
|
});
|
|
9555
|
-
return
|
|
9857
|
+
return unwrap53(data);
|
|
9556
9858
|
}
|
|
9557
9859
|
/** Reset tenant branding to platform defaults. */
|
|
9558
9860
|
async delete() {
|
|
@@ -9574,7 +9876,7 @@ var Tenant = class {
|
|
|
9574
9876
|
/** Get the current tenant's plan, limits, and live usage counters. */
|
|
9575
9877
|
async current() {
|
|
9576
9878
|
const data = await this.http.get("/tenant/plan");
|
|
9577
|
-
return
|
|
9879
|
+
return unwrap53(data);
|
|
9578
9880
|
}
|
|
9579
9881
|
/** Convenience alias for `tenant.branding.get()`. */
|
|
9580
9882
|
async getBranding() {
|
|
@@ -9635,7 +9937,7 @@ var Templates = class {
|
|
|
9635
9937
|
};
|
|
9636
9938
|
|
|
9637
9939
|
// src/resources/usage.ts
|
|
9638
|
-
function
|
|
9940
|
+
function unwrap54(payload) {
|
|
9639
9941
|
if (payload && typeof payload === "object") {
|
|
9640
9942
|
const p = payload;
|
|
9641
9943
|
for (const k of ["data", "usage", "sessions", "summary", "items"]) {
|
|
@@ -9657,13 +9959,13 @@ var Usage = class {
|
|
|
9657
9959
|
/** Get the current period usage summary. */
|
|
9658
9960
|
async current() {
|
|
9659
9961
|
const data = await this.http.get("/usage/summary");
|
|
9660
|
-
return
|
|
9962
|
+
return unwrap54(data);
|
|
9661
9963
|
}
|
|
9662
9964
|
/** List per-session metering events. */
|
|
9663
9965
|
async sessions(params = {}) {
|
|
9664
9966
|
const query3 = stripUndefined31(params);
|
|
9665
9967
|
const data = await this.http.get("/usage/sessions", query3);
|
|
9666
|
-
const result =
|
|
9968
|
+
const result = unwrap54(data);
|
|
9667
9969
|
if (Array.isArray(result)) return result;
|
|
9668
9970
|
return [];
|
|
9669
9971
|
}
|
|
@@ -9671,10 +9973,10 @@ var Usage = class {
|
|
|
9671
9973
|
async report(params = {}) {
|
|
9672
9974
|
const query3 = stripUndefined31(params);
|
|
9673
9975
|
const data = await this.http.get("/usage/summary", query3);
|
|
9674
|
-
return
|
|
9976
|
+
return unwrap54(data);
|
|
9675
9977
|
}
|
|
9676
9978
|
};
|
|
9677
|
-
function
|
|
9979
|
+
function unwrap55(payload) {
|
|
9678
9980
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
9679
9981
|
return payload.data;
|
|
9680
9982
|
}
|
|
@@ -9710,7 +10012,7 @@ var Volumes = class {
|
|
|
9710
10012
|
}
|
|
9711
10013
|
async get(volumeId) {
|
|
9712
10014
|
const data = await this.http.get(`/volumes/${volumeId}`);
|
|
9713
|
-
return
|
|
10015
|
+
return unwrap55(data);
|
|
9714
10016
|
}
|
|
9715
10017
|
async create(params) {
|
|
9716
10018
|
const { idempotencyKey: ikey, sizeGb, ...rest } = params;
|
|
@@ -9723,7 +10025,7 @@ var Volumes = class {
|
|
|
9723
10025
|
body: body5,
|
|
9724
10026
|
headers: { "Idempotency-Key": idempotencyKey9(ikey) }
|
|
9725
10027
|
});
|
|
9726
|
-
return
|
|
10028
|
+
return unwrap55(data);
|
|
9727
10029
|
}
|
|
9728
10030
|
async delete(volumeId) {
|
|
9729
10031
|
await this.http.delete(`/volumes/${volumeId}`);
|
|
@@ -9754,7 +10056,7 @@ var Volumes = class {
|
|
|
9754
10056
|
`/computers/${computerId}/volumes`,
|
|
9755
10057
|
body5
|
|
9756
10058
|
);
|
|
9757
|
-
return
|
|
10059
|
+
return unwrap55(data);
|
|
9758
10060
|
}
|
|
9759
10061
|
async detach(computerId, attachmentId) {
|
|
9760
10062
|
await this.http.delete(
|
|
@@ -9762,7 +10064,7 @@ var Volumes = class {
|
|
|
9762
10064
|
);
|
|
9763
10065
|
}
|
|
9764
10066
|
};
|
|
9765
|
-
function
|
|
10067
|
+
function unwrap56(payload) {
|
|
9766
10068
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
9767
10069
|
return payload.data;
|
|
9768
10070
|
}
|
|
@@ -9829,7 +10131,7 @@ var Webhooks = class {
|
|
|
9829
10131
|
}
|
|
9830
10132
|
async get(webhookId) {
|
|
9831
10133
|
const data = await this.http.get(`/webhooks/${webhookId}`);
|
|
9832
|
-
return
|
|
10134
|
+
return unwrap56(data);
|
|
9833
10135
|
}
|
|
9834
10136
|
async create(params) {
|
|
9835
10137
|
const { idempotencyKey: ikey, ...rest } = params;
|
|
@@ -9839,12 +10141,12 @@ var Webhooks = class {
|
|
|
9839
10141
|
body: body5,
|
|
9840
10142
|
headers: { "Idempotency-Key": idempotencyKey10(ikey) }
|
|
9841
10143
|
});
|
|
9842
|
-
return
|
|
10144
|
+
return unwrap56(data);
|
|
9843
10145
|
}
|
|
9844
10146
|
async update(webhookId, params) {
|
|
9845
10147
|
const body5 = stripUndefined33(params);
|
|
9846
10148
|
const data = await this.http.patch(`/webhooks/${webhookId}`, body5);
|
|
9847
|
-
return
|
|
10149
|
+
return unwrap56(data);
|
|
9848
10150
|
}
|
|
9849
10151
|
async delete(webhookId) {
|
|
9850
10152
|
await this.http.delete(`/webhooks/${webhookId}`);
|
|
@@ -9857,7 +10159,7 @@ var Webhooks = class {
|
|
|
9857
10159
|
headers: { "Idempotency-Key": idempotencyKey10(opts.idempotencyKey) }
|
|
9858
10160
|
}
|
|
9859
10161
|
);
|
|
9860
|
-
return
|
|
10162
|
+
return unwrap56(data);
|
|
9861
10163
|
}
|
|
9862
10164
|
async deliveries(webhookId) {
|
|
9863
10165
|
const data = await this.http.get(
|
|
@@ -10064,6 +10366,8 @@ var Miosa = class {
|
|
|
10064
10366
|
projectIntegrations;
|
|
10065
10367
|
/** Built-in auth for generated apps inside sandboxes/deployments. */
|
|
10066
10368
|
projectAuth;
|
|
10369
|
+
/** Durable generated App Documents, exact-version reviews, and publication bindings. */
|
|
10370
|
+
appDocuments;
|
|
10067
10371
|
/** BYOK encrypted per-user provider keys. */
|
|
10068
10372
|
externalKeys;
|
|
10069
10373
|
/** Model Context Protocol — JSON-RPC dispatch + streaming channel. */
|
|
@@ -10078,6 +10382,8 @@ var Miosa = class {
|
|
|
10078
10382
|
agentRunGroups;
|
|
10079
10383
|
/** Agent runtime profiles — tenant/workspace defaults for sandbox/computer agents. */
|
|
10080
10384
|
agentRuntimeProfiles;
|
|
10385
|
+
/** Persisted workspace Agent definitions and immutable versions. */
|
|
10386
|
+
agents;
|
|
10081
10387
|
/** MIOSA Connect — provider connectors and runtime tokens. */
|
|
10082
10388
|
connectors;
|
|
10083
10389
|
/** Inherited runtime env — tenant/workspace/project defaults for agent runtimes. */
|
|
@@ -10195,6 +10501,7 @@ var Miosa = class {
|
|
|
10195
10501
|
this.integrations = new Integrations(this.http);
|
|
10196
10502
|
this.projectIntegrations = new ProjectIntegrations(this.http);
|
|
10197
10503
|
this.projectAuth = new ProjectAuth(this.http);
|
|
10504
|
+
this.appDocuments = new AppDocuments(this.http);
|
|
10198
10505
|
this.externalKeys = new ExternalKeys(this.http);
|
|
10199
10506
|
this.mcp = new Mcp(this.http);
|
|
10200
10507
|
this.runs = new Runs(this.http);
|
|
@@ -10202,6 +10509,7 @@ var Miosa = class {
|
|
|
10202
10509
|
this.agentRuns = new AgentRuns(this.http);
|
|
10203
10510
|
this.agentRunGroups = new AgentRunGroups(this.http);
|
|
10204
10511
|
this.agentRuntimeProfiles = new AgentRuntimeProfiles(this.http);
|
|
10512
|
+
this.agents = new AgentDefinitions(this.http);
|
|
10205
10513
|
this.connectors = new Connectors(this.http);
|
|
10206
10514
|
this.runtimeEnv = new RuntimeEnv(this.http);
|
|
10207
10515
|
this.runtimeCapabilities = new RuntimeCapabilitiesResource(this.http);
|
|
@@ -10728,6 +11036,6 @@ var AppAuth = class {
|
|
|
10728
11036
|
}
|
|
10729
11037
|
};
|
|
10730
11038
|
|
|
10731
|
-
export { AGENT_BUILD_KIND_SPECS, Admin, AgentRuntimeProfiles, Analytics, ApiKeys, AppAuth, 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 };
|
|
10732
11040
|
//# sourceMappingURL=index.js.map
|
|
10733
11041
|
//# sourceMappingURL=index.js.map
|