@agent-os-sdk/client 0.9.23 → 0.9.25

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.
@@ -1238,6 +1238,135 @@
1238
1238
  }
1239
1239
  }
1240
1240
  },
1241
+ "/v1/api/agents/{id}/publishes": {
1242
+ "get": {
1243
+ "tags": [
1244
+ "Agents"
1245
+ ],
1246
+ "parameters": [
1247
+ {
1248
+ "name": "id",
1249
+ "in": "path",
1250
+ "required": true,
1251
+ "schema": {
1252
+ "type": "string",
1253
+ "format": "uuid"
1254
+ }
1255
+ }
1256
+ ],
1257
+ "responses": {
1258
+ "200": {
1259
+ "description": "OK",
1260
+ "content": {
1261
+ "application/json": {
1262
+ "schema": {
1263
+ "$ref": "#/components/schemas/AgentPublishHistoryResponse"
1264
+ }
1265
+ }
1266
+ }
1267
+ },
1268
+ "404": {
1269
+ "description": "Not Found",
1270
+ "content": {
1271
+ "application/json": {
1272
+ "schema": {
1273
+ "$ref": "#/components/schemas/ProblemDetails"
1274
+ }
1275
+ }
1276
+ }
1277
+ },
1278
+ "400": {
1279
+ "description": "Bad Request",
1280
+ "content": {
1281
+ "application/json": {
1282
+ "schema": {
1283
+ "$ref": "#/components/schemas/ProblemDetails"
1284
+ }
1285
+ }
1286
+ }
1287
+ }
1288
+ }
1289
+ }
1290
+ },
1291
+ "/v1/api/agents/{id}/rollback": {
1292
+ "post": {
1293
+ "tags": [
1294
+ "Agents"
1295
+ ],
1296
+ "parameters": [
1297
+ {
1298
+ "name": "id",
1299
+ "in": "path",
1300
+ "required": true,
1301
+ "schema": {
1302
+ "type": "string",
1303
+ "format": "uuid"
1304
+ }
1305
+ }
1306
+ ],
1307
+ "requestBody": {
1308
+ "content": {
1309
+ "application/json": {
1310
+ "schema": {
1311
+ "$ref": "#/components/schemas/RollbackAgentRequest"
1312
+ }
1313
+ },
1314
+ "text/json": {
1315
+ "schema": {
1316
+ "$ref": "#/components/schemas/RollbackAgentRequest"
1317
+ }
1318
+ },
1319
+ "application/*+json": {
1320
+ "schema": {
1321
+ "$ref": "#/components/schemas/RollbackAgentRequest"
1322
+ }
1323
+ }
1324
+ }
1325
+ },
1326
+ "responses": {
1327
+ "200": {
1328
+ "description": "OK",
1329
+ "content": {
1330
+ "application/json": {
1331
+ "schema": {
1332
+ "$ref": "#/components/schemas/AgentRollbackResponse"
1333
+ }
1334
+ }
1335
+ }
1336
+ },
1337
+ "404": {
1338
+ "description": "Not Found",
1339
+ "content": {
1340
+ "application/json": {
1341
+ "schema": {
1342
+ "$ref": "#/components/schemas/ProblemDetails"
1343
+ }
1344
+ }
1345
+ }
1346
+ },
1347
+ "400": {
1348
+ "description": "Bad Request",
1349
+ "content": {
1350
+ "application/json": {
1351
+ "schema": {
1352
+ "$ref": "#/components/schemas/ProblemDetails"
1353
+ }
1354
+ }
1355
+ }
1356
+ },
1357
+ "409": {
1358
+ "description": "Conflict",
1359
+ "content": {
1360
+ "application/json": {
1361
+ "schema": {
1362
+ "$ref": "#/components/schemas/ProblemDetails"
1363
+ }
1364
+ }
1365
+ }
1366
+ }
1367
+ }
1368
+ }
1369
+ },
1241
1370
  "/v1/api/agents/{id}/publish-preview": {
1242
1371
  "get": {
1243
1372
  "tags": [
@@ -10418,6 +10547,141 @@
10418
10547
  },
10419
10548
  "additionalProperties": false
10420
10549
  },
10550
+ "AgentPublishHistoryChangeSummary": {
10551
+ "type": "object",
10552
+ "properties": {
10553
+ "added_capability_refs": {
10554
+ "type": "array",
10555
+ "items": {
10556
+ "type": "string"
10557
+ },
10558
+ "nullable": true
10559
+ },
10560
+ "removed_capability_refs": {
10561
+ "type": "array",
10562
+ "items": {
10563
+ "type": "string"
10564
+ },
10565
+ "nullable": true
10566
+ }
10567
+ },
10568
+ "additionalProperties": false
10569
+ },
10570
+ "AgentPublishHistoryItem": {
10571
+ "type": "object",
10572
+ "properties": {
10573
+ "release_id": {
10574
+ "type": "string",
10575
+ "format": "uuid"
10576
+ },
10577
+ "agent_id": {
10578
+ "type": "string",
10579
+ "format": "uuid"
10580
+ },
10581
+ "bundle_id": {
10582
+ "type": "string",
10583
+ "format": "uuid"
10584
+ },
10585
+ "previous_bundle_id": {
10586
+ "type": "string",
10587
+ "format": "uuid",
10588
+ "nullable": true
10589
+ },
10590
+ "graph_version": {
10591
+ "type": "string",
10592
+ "nullable": true
10593
+ },
10594
+ "runtime_package_hash": {
10595
+ "type": "string",
10596
+ "nullable": true
10597
+ },
10598
+ "content_hash": {
10599
+ "type": "string",
10600
+ "nullable": true
10601
+ },
10602
+ "action": {
10603
+ "type": "string",
10604
+ "nullable": true
10605
+ },
10606
+ "activated": {
10607
+ "type": "boolean"
10608
+ },
10609
+ "is_live": {
10610
+ "type": "boolean"
10611
+ },
10612
+ "status": {
10613
+ "type": "string",
10614
+ "nullable": true
10615
+ },
10616
+ "actor": {
10617
+ "type": "string",
10618
+ "nullable": true
10619
+ },
10620
+ "published_at": {
10621
+ "type": "string",
10622
+ "format": "date-time"
10623
+ },
10624
+ "reason": {
10625
+ "type": "string",
10626
+ "nullable": true
10627
+ },
10628
+ "label": {
10629
+ "type": "string",
10630
+ "nullable": true
10631
+ },
10632
+ "summary": {
10633
+ "type": "string",
10634
+ "nullable": true
10635
+ },
10636
+ "change_summary": {
10637
+ "$ref": "#/components/schemas/AgentPublishHistoryChangeSummary"
10638
+ }
10639
+ },
10640
+ "additionalProperties": false
10641
+ },
10642
+ "AgentPublishHistoryResponse": {
10643
+ "type": "object",
10644
+ "properties": {
10645
+ "agent_id": {
10646
+ "type": "string",
10647
+ "format": "uuid"
10648
+ },
10649
+ "live_bundle_id": {
10650
+ "type": "string",
10651
+ "format": "uuid",
10652
+ "nullable": true
10653
+ },
10654
+ "items": {
10655
+ "type": "array",
10656
+ "items": {
10657
+ "$ref": "#/components/schemas/AgentPublishHistoryItem"
10658
+ },
10659
+ "nullable": true
10660
+ },
10661
+ "count": {
10662
+ "type": "integer",
10663
+ "format": "int32"
10664
+ }
10665
+ },
10666
+ "additionalProperties": false
10667
+ },
10668
+ "AgentRollbackResponse": {
10669
+ "type": "object",
10670
+ "properties": {
10671
+ "agent_id": {
10672
+ "type": "string",
10673
+ "format": "uuid"
10674
+ },
10675
+ "live_bundle_id": {
10676
+ "type": "string",
10677
+ "format": "uuid"
10678
+ },
10679
+ "rollback_release": {
10680
+ "$ref": "#/components/schemas/AgentPublishHistoryItem"
10681
+ }
10682
+ },
10683
+ "additionalProperties": false
10684
+ },
10421
10685
  "ApiHint": {
10422
10686
  "type": "object",
10423
10687
  "properties": {
@@ -13596,6 +13860,20 @@
13596
13860
  },
13597
13861
  "additionalProperties": false
13598
13862
  },
13863
+ "RollbackAgentRequest": {
13864
+ "type": "object",
13865
+ "properties": {
13866
+ "target_bundle_id": {
13867
+ "type": "string",
13868
+ "format": "uuid"
13869
+ },
13870
+ "reason": {
13871
+ "type": "string",
13872
+ "nullable": true
13873
+ }
13874
+ },
13875
+ "additionalProperties": false
13876
+ },
13599
13877
  "RollbackImprovementCaseRequest": {
13600
13878
  "type": "object",
13601
13879
  "properties": {
@@ -14497,6 +14775,10 @@
14497
14775
  "type": "string",
14498
14776
  "format": "uuid"
14499
14777
  },
14778
+ "bundle_id": {
14779
+ "type": "string",
14780
+ "format": "uuid"
14781
+ },
14500
14782
  "thread_id": {
14501
14783
  "type": "string",
14502
14784
  "format": "uuid",
@@ -14510,10 +14792,24 @@
14510
14792
  "type": "string",
14511
14793
  "format": "date-time"
14512
14794
  },
14795
+ "started_at": {
14796
+ "type": "string",
14797
+ "format": "date-time",
14798
+ "nullable": true
14799
+ },
14513
14800
  "completed_at": {
14514
14801
  "type": "string",
14515
14802
  "format": "date-time",
14516
14803
  "nullable": true
14804
+ },
14805
+ "attempt_count": {
14806
+ "type": "integer",
14807
+ "format": "int32"
14808
+ },
14809
+ "current_attempt_no": {
14810
+ "type": "integer",
14811
+ "format": "int32",
14812
+ "nullable": true
14517
14813
  }
14518
14814
  },
14519
14815
  "additionalProperties": false
@@ -105,6 +105,49 @@ export interface PublishPreviewResponse {
105
105
  warnings: PublishPreviewIssue[];
106
106
  }
107
107
 
108
+ export interface AgentPublishHistoryChangeSummary {
109
+ added_capability_refs: string[];
110
+ removed_capability_refs: string[];
111
+ }
112
+
113
+ export interface AgentPublishHistoryItem {
114
+ release_id: string;
115
+ agent_id: string;
116
+ bundle_id: string;
117
+ previous_bundle_id?: string | null;
118
+ graph_version?: string | null;
119
+ runtime_package_hash: string;
120
+ content_hash: string;
121
+ action: "publish" | "rollback";
122
+ activated: boolean;
123
+ is_live: boolean;
124
+ status: "live" | "historical";
125
+ actor: string;
126
+ published_at: string;
127
+ reason?: string | null;
128
+ label?: string | null;
129
+ summary: string;
130
+ change_summary: AgentPublishHistoryChangeSummary;
131
+ }
132
+
133
+ export interface AgentPublishHistoryResponse {
134
+ agent_id: string;
135
+ live_bundle_id?: string | null;
136
+ items: AgentPublishHistoryItem[];
137
+ count: number;
138
+ }
139
+
140
+ export interface RollbackAgentRequest {
141
+ target_bundle_id: string;
142
+ reason?: string;
143
+ }
144
+
145
+ export interface AgentRollbackResponse {
146
+ agent_id: string;
147
+ live_bundle_id: string;
148
+ rollback_release: AgentPublishHistoryItem;
149
+ }
150
+
108
151
  export interface AgentDraftIrResponse {
109
152
  id: string;
110
153
  name: string;
@@ -460,6 +503,24 @@ export class AgentsModule {
460
503
  });
461
504
  }
462
505
 
506
+ async listPublishes(agentId: string): Promise<APIResponse<AgentPublishHistoryResponse>> {
507
+ return this.client.GET<AgentPublishHistoryResponse>("/v1/api/agents/{id}/publishes", {
508
+ params: { path: { id: agentId } },
509
+ headers: this.headers(),
510
+ });
511
+ }
512
+
513
+ async rollback(
514
+ agentId: string,
515
+ body: RollbackAgentRequest
516
+ ): Promise<APIResponse<AgentRollbackResponse>> {
517
+ return this.client.POST<AgentRollbackResponse>("/v1/api/agents/{id}/rollback", {
518
+ params: { path: { id: agentId } },
519
+ body,
520
+ headers: this.headers(),
521
+ });
522
+ }
523
+
463
524
  // ======================== Bundles ========================
464
525
 
465
526
  /**
@@ -24,6 +24,7 @@ export interface Run {
24
24
  status: RunStatus;
25
25
  thread_id?: string;
26
26
  agent_id: string;
27
+ bundle_id?: string;
27
28
  agent_version_id?: string;
28
29
  tenant_id: string;
29
30
  workspace_id: string;
@@ -96,6 +97,48 @@ export interface RunInspectionResponse {
96
97
  events: Array<Record<string, unknown>>;
97
98
  }
98
99
 
100
+ export interface RunFailureRetentionItem {
101
+ failure_id: string;
102
+ failure_scope: string;
103
+ run_id: string;
104
+ attempt_id: string;
105
+ attempt_no: number;
106
+ agent_id?: string | null;
107
+ thread_id: string;
108
+ node_execution_id?: string | null;
109
+ operation_id?: string | null;
110
+ capability_ref?: string | null;
111
+ capability_version?: string | null;
112
+ execution_binding?: string | null;
113
+ source_kind: string;
114
+ ancestry_kind: string;
115
+ status: string;
116
+ error_code: string;
117
+ error_category: string;
118
+ is_retryable: boolean;
119
+ error_source: string;
120
+ provider_error_code?: string | null;
121
+ error_summary: string;
122
+ retried_from_node_execution_id?: string | null;
123
+ replayed_from_node_execution_id?: string | null;
124
+ can_retry: boolean;
125
+ retry_from_node_execution_id?: string | null;
126
+ can_replay: boolean;
127
+ replay_from_node_execution_id?: string | null;
128
+ failed_at: string;
129
+ created_at: string;
130
+ }
131
+
132
+ export interface RunFailureRetentionListResponse {
133
+ items: RunFailureRetentionItem[];
134
+ count: number;
135
+ }
136
+
137
+ export interface RunFailureRetentionDetailResponse {
138
+ failure: RunFailureRetentionItem;
139
+ payload?: unknown;
140
+ }
141
+
99
142
  export interface RunObservabilitySummaryResponse {
100
143
  workspace_id: string;
101
144
  agent_id?: string | null;
@@ -187,6 +230,27 @@ export class RunsModule {
187
230
  });
188
231
  }
189
232
 
233
+ async listFailures(params?: {
234
+ agent_id?: string;
235
+ capability_ref?: string;
236
+ error_category?: string;
237
+ retryable?: boolean;
238
+ from?: string;
239
+ to?: string;
240
+ limit?: number;
241
+ offset?: number;
242
+ }): Promise<APIResponse<RunFailureRetentionListResponse>> {
243
+ return this.client.GET<RunFailureRetentionListResponse>("/v1/api/runs/failures", {
244
+ params: { query: params },
245
+ });
246
+ }
247
+
248
+ async getFailure(failureId: string): Promise<APIResponse<RunFailureRetentionDetailResponse>> {
249
+ return this.client.GET<RunFailureRetentionDetailResponse>("/v1/api/runs/failures/{failureId}", {
250
+ params: { path: { failureId } },
251
+ });
252
+ }
253
+
190
254
  /**
191
255
  * List runs with optional filters.
192
256
  */