@amigo-ai/platform-sdk 0.100.0 → 0.101.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api.md +12 -0
- package/dist/index.cjs +105 -0
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +105 -0
- package/dist/index.mjs.map +3 -3
- package/dist/resources/runs.js +100 -0
- package/dist/resources/runs.js.map +1 -0
- package/dist/types/index.d.cts +2 -0
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/resources/runs.d.ts +163 -0
- package/dist/types/resources/runs.d.ts.map +1 -0
- package/package.json +1 -1
package/api.md
CHANGED
|
@@ -118,6 +118,18 @@ All workspace-scoped resources also expose `withOptions(options)`.
|
|
|
118
118
|
- `get`
|
|
119
119
|
- `harnessContext`
|
|
120
120
|
|
|
121
|
+
### `runs`
|
|
122
|
+
|
|
123
|
+
- `list`
|
|
124
|
+
- `summary`
|
|
125
|
+
- `get`
|
|
126
|
+
- `trajectory`
|
|
127
|
+
- `sendGuidance`
|
|
128
|
+
- `takeOver`
|
|
129
|
+
- `handBack`
|
|
130
|
+
- `switchMode`
|
|
131
|
+
- `accessToken`
|
|
132
|
+
|
|
121
133
|
### `agentDefinitions`
|
|
122
134
|
|
|
123
135
|
- `list`
|
package/dist/index.cjs
CHANGED
|
@@ -1395,6 +1395,109 @@ var AgentRunsResource = class extends WorkspaceScopedResource {
|
|
|
1395
1395
|
}
|
|
1396
1396
|
};
|
|
1397
1397
|
|
|
1398
|
+
// src/resources/runs.ts
|
|
1399
|
+
var RunsResource = class extends WorkspaceScopedResource {
|
|
1400
|
+
/**
|
|
1401
|
+
* Paginated, newest-first list of runs. `kind` / `channel` / `status` are
|
|
1402
|
+
* multi-value OR-filters (repeat within an axis, AND across axes); `status`
|
|
1403
|
+
* accepts the virtual `live` (running + paused). `continuationToken` is the
|
|
1404
|
+
* opaque cursor from a prior page — round-trip it verbatim.
|
|
1405
|
+
*/
|
|
1406
|
+
async list(params) {
|
|
1407
|
+
return extractData(
|
|
1408
|
+
await this.client.GET("/v1/{workspace_id}/runs", {
|
|
1409
|
+
params: {
|
|
1410
|
+
path: { workspace_id: this.workspaceId },
|
|
1411
|
+
query: {
|
|
1412
|
+
limit: params?.limit,
|
|
1413
|
+
continuation_token: params?.continuationToken,
|
|
1414
|
+
kind: params?.kind,
|
|
1415
|
+
channel: params?.channel,
|
|
1416
|
+
status: params?.status,
|
|
1417
|
+
sort_by: params?.sortBy
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
})
|
|
1421
|
+
);
|
|
1422
|
+
}
|
|
1423
|
+
/** Aggregate run counts (total / live / by-status / by-kind). */
|
|
1424
|
+
async summary(params) {
|
|
1425
|
+
return extractData(
|
|
1426
|
+
await this.client.GET("/v1/{workspace_id}/runs/summary", {
|
|
1427
|
+
params: {
|
|
1428
|
+
path: { workspace_id: this.workspaceId },
|
|
1429
|
+
query: { kind: params?.kind, channel: params?.channel }
|
|
1430
|
+
}
|
|
1431
|
+
})
|
|
1432
|
+
);
|
|
1433
|
+
}
|
|
1434
|
+
/** Resolve one run by its channel-neutral `run_id`, at any status. */
|
|
1435
|
+
async get(runId) {
|
|
1436
|
+
return extractData(
|
|
1437
|
+
await this.client.GET("/v1/{workspace_id}/runs/{run_id}", {
|
|
1438
|
+
params: { path: { workspace_id: this.workspaceId, run_id: runId } }
|
|
1439
|
+
})
|
|
1440
|
+
);
|
|
1441
|
+
}
|
|
1442
|
+
/**
|
|
1443
|
+
* The ordered structural steps of a FRAMEWORK run's trajectory (perception /
|
|
1444
|
+
* decision / tool / completion). 409 for conversation runs (they have per-turn
|
|
1445
|
+
* detail via the conversation surface).
|
|
1446
|
+
*/
|
|
1447
|
+
async trajectory(runId) {
|
|
1448
|
+
return extractData(
|
|
1449
|
+
await this.client.GET("/v1/{workspace_id}/runs/{run_id}/trajectory", {
|
|
1450
|
+
params: { path: { workspace_id: this.workspaceId, run_id: runId } }
|
|
1451
|
+
})
|
|
1452
|
+
);
|
|
1453
|
+
}
|
|
1454
|
+
/** Send operator guidance to a LIVE run (the agent folds it into its next turn). */
|
|
1455
|
+
async sendGuidance(runId, body) {
|
|
1456
|
+
return extractData(
|
|
1457
|
+
await this.client.POST("/v1/{workspace_id}/runs/{run_id}/guidance", {
|
|
1458
|
+
params: { path: { workspace_id: this.workspaceId, run_id: runId } },
|
|
1459
|
+
body
|
|
1460
|
+
})
|
|
1461
|
+
);
|
|
1462
|
+
}
|
|
1463
|
+
/** Take a live run over (operator drives). Returns the audio-leg coordinates for voice. */
|
|
1464
|
+
async takeOver(runId, body) {
|
|
1465
|
+
return extractData(
|
|
1466
|
+
await this.client.POST("/v1/{workspace_id}/runs/{run_id}/takeover", {
|
|
1467
|
+
params: { path: { workspace_id: this.workspaceId, run_id: runId } },
|
|
1468
|
+
body
|
|
1469
|
+
})
|
|
1470
|
+
);
|
|
1471
|
+
}
|
|
1472
|
+
/** Hand a taken-over run back to the agent. */
|
|
1473
|
+
async handBack(runId, body) {
|
|
1474
|
+
return extractData(
|
|
1475
|
+
await this.client.POST("/v1/{workspace_id}/runs/{run_id}/handback", {
|
|
1476
|
+
params: { path: { workspace_id: this.workspaceId, run_id: runId } },
|
|
1477
|
+
body
|
|
1478
|
+
})
|
|
1479
|
+
);
|
|
1480
|
+
}
|
|
1481
|
+
/** Switch the operator's mode on a live run (listen ↔ takeover). */
|
|
1482
|
+
async switchMode(runId, body) {
|
|
1483
|
+
return extractData(
|
|
1484
|
+
await this.client.POST("/v1/{workspace_id}/runs/{run_id}/switch-mode", {
|
|
1485
|
+
params: { path: { workspace_id: this.workspaceId, run_id: runId } },
|
|
1486
|
+
body
|
|
1487
|
+
})
|
|
1488
|
+
);
|
|
1489
|
+
}
|
|
1490
|
+
/** Mint a run-scoped browser access token (voice takeover audio leg). */
|
|
1491
|
+
async accessToken(runId, body) {
|
|
1492
|
+
return extractData(
|
|
1493
|
+
await this.client.POST("/v1/{workspace_id}/runs/{run_id}/access-token", {
|
|
1494
|
+
params: { path: { workspace_id: this.workspaceId, run_id: runId } },
|
|
1495
|
+
body
|
|
1496
|
+
})
|
|
1497
|
+
);
|
|
1498
|
+
}
|
|
1499
|
+
};
|
|
1500
|
+
|
|
1398
1501
|
// src/resources/agent-definitions.ts
|
|
1399
1502
|
var AgentDefinitionsResource = class extends WorkspaceScopedResource {
|
|
1400
1503
|
async list(params) {
|
|
@@ -6219,6 +6322,7 @@ var AmigoClient = class _AmigoClient {
|
|
|
6219
6322
|
tokens;
|
|
6220
6323
|
agents;
|
|
6221
6324
|
agentRuns;
|
|
6325
|
+
runs;
|
|
6222
6326
|
agentDefinitions;
|
|
6223
6327
|
/** @deprecated Use `actions` instead */
|
|
6224
6328
|
skills;
|
|
@@ -6360,6 +6464,7 @@ var AmigoClient = class _AmigoClient {
|
|
|
6360
6464
|
mutable.tokens = new TokensResource(client, workspaceId2);
|
|
6361
6465
|
mutable.agents = new AgentsResource(client, workspaceId2);
|
|
6362
6466
|
mutable.agentRuns = new AgentRunsResource(client, workspaceId2);
|
|
6467
|
+
mutable.runs = new RunsResource(client, workspaceId2);
|
|
6363
6468
|
mutable.agentDefinitions = new AgentDefinitionsResource(client, workspaceId2);
|
|
6364
6469
|
mutable.skills = new SkillsResource(client, workspaceId2);
|
|
6365
6470
|
mutable.actions = new ActionsResource(client, workspaceId2);
|