@amigo-ai/platform-sdk 0.86.0 → 0.88.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 CHANGED
@@ -112,6 +112,22 @@ All workspace-scoped resources also expose `withOptions(options)`.
112
112
  - `getVersion`
113
113
  - `createVersion`
114
114
 
115
+ ### `agentRuns`
116
+
117
+ - `create`
118
+ - `get`
119
+ - `harnessContext`
120
+
121
+ ### `agentDefinitions`
122
+
123
+ - `list`
124
+ - `listAutoPaging`
125
+ - `register`
126
+ - `validate`
127
+ - `get`
128
+ - `getVersion`
129
+ - `archive`
130
+
115
131
  ### `skills`
116
132
 
117
133
  - `create`
package/dist/index.cjs CHANGED
@@ -1353,6 +1353,116 @@ var AgentsResource = class extends WorkspaceScopedResource {
1353
1353
  }
1354
1354
  };
1355
1355
 
1356
+ // src/resources/agent-runs.ts
1357
+ var AgentRunsResource = class extends WorkspaceScopedResource {
1358
+ /**
1359
+ * Launch a framework agent run — a platform run (`service_id` + `framework`)
1360
+ * or a native run (`native`). Non-blocking; returns a running `run_id`, poll
1361
+ * {@link get}.
1362
+ */
1363
+ async create(body) {
1364
+ return extractData(
1365
+ await this.client.POST("/v1/{workspace_id}/agent-runs", {
1366
+ params: { path: { workspace_id: this.workspaceId } },
1367
+ body
1368
+ })
1369
+ );
1370
+ }
1371
+ /** Fetch a run snapshot: status, final text, trajectory, and token usage. */
1372
+ async get(runId) {
1373
+ return extractData(
1374
+ await this.client.GET("/v1/{workspace_id}/agent-runs/{run_id}", {
1375
+ params: { path: { workspace_id: this.workspaceId, run_id: runId } }
1376
+ })
1377
+ );
1378
+ }
1379
+ /**
1380
+ * The CONTEXT edge — the retrievable, framework-neutral session bootstrap a
1381
+ * service hands an agent: identity/instructions, world scope, tool
1382
+ * descriptors, guardrails, the real enforced write-floor, and runtime. This
1383
+ * is the exact context a remote framework would fetch before a run.
1384
+ */
1385
+ async harnessContext(params) {
1386
+ return extractData(
1387
+ await this.client.GET("/v1/{workspace_id}/agent-runs/harness-context", {
1388
+ params: {
1389
+ path: { workspace_id: this.workspaceId },
1390
+ // camelCase args → snake_case wire query (service_id / version_set).
1391
+ query: { service_id: params.serviceId, version_set: params.versionSet }
1392
+ }
1393
+ })
1394
+ );
1395
+ }
1396
+ };
1397
+
1398
+ // src/resources/agent-definitions.ts
1399
+ var AgentDefinitionsResource = class extends WorkspaceScopedResource {
1400
+ async list(params) {
1401
+ return extractData(
1402
+ await this.client.GET("/v1/{workspace_id}/agent-definitions", {
1403
+ params: { path: { workspace_id: this.workspaceId }, query: params }
1404
+ })
1405
+ );
1406
+ }
1407
+ listAutoPaging(params) {
1408
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
1409
+ }
1410
+ /**
1411
+ * Register (idempotent push) a native definition. An identical body re-push
1412
+ * reports `created: false`; a changed body mints a new version.
1413
+ */
1414
+ async register(body) {
1415
+ return extractData(
1416
+ await this.client.POST("/v1/{workspace_id}/agent-definitions", {
1417
+ params: { path: { workspace_id: this.workspaceId } },
1418
+ body
1419
+ })
1420
+ );
1421
+ }
1422
+ /** Dry-run clamp validation — nothing is stored; 422 with the offending paths on failure. */
1423
+ async validate(body) {
1424
+ return extractData(
1425
+ await this.client.POST("/v1/{workspace_id}/agent-definitions/validate", {
1426
+ params: { path: { workspace_id: this.workspaceId } },
1427
+ body
1428
+ })
1429
+ );
1430
+ }
1431
+ async get(definitionId) {
1432
+ return extractData(
1433
+ await this.client.GET("/v1/{workspace_id}/agent-definitions/{definition_id}", {
1434
+ params: {
1435
+ path: { workspace_id: this.workspaceId, definition_id: definitionId }
1436
+ }
1437
+ })
1438
+ );
1439
+ }
1440
+ /** Fetch a specific immutable version, including its clamped body. */
1441
+ async getVersion(definitionId, version) {
1442
+ return extractData(
1443
+ await this.client.GET(
1444
+ "/v1/{workspace_id}/agent-definitions/{definition_id}/versions/{version}",
1445
+ {
1446
+ params: {
1447
+ path: {
1448
+ workspace_id: this.workspaceId,
1449
+ definition_id: definitionId,
1450
+ version
1451
+ }
1452
+ }
1453
+ }
1454
+ )
1455
+ );
1456
+ }
1457
+ async archive(definitionId) {
1458
+ await this.client.DELETE("/v1/{workspace_id}/agent-definitions/{definition_id}", {
1459
+ params: {
1460
+ path: { workspace_id: this.workspaceId, definition_id: definitionId }
1461
+ }
1462
+ });
1463
+ }
1464
+ };
1465
+
1356
1466
  // src/resources/skills.ts
1357
1467
  var SkillsResource = class extends WorkspaceScopedResource {
1358
1468
  /** Create a new skill */
@@ -6176,6 +6286,8 @@ var AmigoClient = class _AmigoClient {
6176
6286
  apiKeys;
6177
6287
  tokens;
6178
6288
  agents;
6289
+ agentRuns;
6290
+ agentDefinitions;
6179
6291
  /** @deprecated Use `actions` instead */
6180
6292
  skills;
6181
6293
  actions;
@@ -6316,6 +6428,8 @@ var AmigoClient = class _AmigoClient {
6316
6428
  mutable.apiKeys = new ApiKeysResource(client, workspaceId2);
6317
6429
  mutable.tokens = new TokensResource(client, workspaceId2);
6318
6430
  mutable.agents = new AgentsResource(client, workspaceId2);
6431
+ mutable.agentRuns = new AgentRunsResource(client, workspaceId2);
6432
+ mutable.agentDefinitions = new AgentDefinitionsResource(client, workspaceId2);
6319
6433
  mutable.skills = new SkillsResource(client, workspaceId2);
6320
6434
  mutable.actions = new ActionsResource(client, workspaceId2);
6321
6435
  mutable.operators = new OperatorsResource(client, workspaceId2);