@agent-os-sdk/client 0.9.22 → 0.9.24

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": [
@@ -1290,6 +1419,76 @@
1290
1419
  "description": "Service Unavailable"
1291
1420
  }
1292
1421
  }
1422
+ },
1423
+ "post": {
1424
+ "tags": [
1425
+ "Agents"
1426
+ ],
1427
+ "parameters": [
1428
+ {
1429
+ "name": "id",
1430
+ "in": "path",
1431
+ "required": true,
1432
+ "schema": {
1433
+ "type": "string",
1434
+ "format": "uuid"
1435
+ }
1436
+ }
1437
+ ],
1438
+ "requestBody": {
1439
+ "content": {
1440
+ "application/json": {
1441
+ "schema": {
1442
+ "$ref": "#/components/schemas/PublishPreviewRequest"
1443
+ }
1444
+ },
1445
+ "text/json": {
1446
+ "schema": {
1447
+ "$ref": "#/components/schemas/PublishPreviewRequest"
1448
+ }
1449
+ },
1450
+ "application/*+json": {
1451
+ "schema": {
1452
+ "$ref": "#/components/schemas/PublishPreviewRequest"
1453
+ }
1454
+ }
1455
+ }
1456
+ },
1457
+ "responses": {
1458
+ "200": {
1459
+ "description": "OK",
1460
+ "content": {
1461
+ "application/json": {
1462
+ "schema": {
1463
+ "$ref": "#/components/schemas/PublishPreviewResponse"
1464
+ }
1465
+ }
1466
+ }
1467
+ },
1468
+ "404": {
1469
+ "description": "Not Found",
1470
+ "content": {
1471
+ "application/json": {
1472
+ "schema": {
1473
+ "$ref": "#/components/schemas/ProblemDetails"
1474
+ }
1475
+ }
1476
+ }
1477
+ },
1478
+ "400": {
1479
+ "description": "Bad Request",
1480
+ "content": {
1481
+ "application/json": {
1482
+ "schema": {
1483
+ "$ref": "#/components/schemas/ProblemDetails"
1484
+ }
1485
+ }
1486
+ }
1487
+ },
1488
+ "503": {
1489
+ "description": "Service Unavailable"
1490
+ }
1491
+ }
1293
1492
  }
1294
1493
  },
1295
1494
  "/v1/api/agents/{id}/draft/ir": {
@@ -10348,6 +10547,141 @@
10348
10547
  },
10349
10548
  "additionalProperties": false
10350
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
+ },
10351
10685
  "ApiHint": {
10352
10686
  "type": "object",
10353
10687
  "properties": {
@@ -13203,6 +13537,54 @@
13203
13537
  },
13204
13538
  "additionalProperties": false
13205
13539
  },
13540
+ "PublishPreviewDraftDiff": {
13541
+ "type": "object",
13542
+ "properties": {
13543
+ "added_node_ids": {
13544
+ "type": "array",
13545
+ "items": {
13546
+ "type": "string"
13547
+ },
13548
+ "nullable": true
13549
+ },
13550
+ "removed_node_ids": {
13551
+ "type": "array",
13552
+ "items": {
13553
+ "type": "string"
13554
+ },
13555
+ "nullable": true
13556
+ },
13557
+ "modified_node_ids": {
13558
+ "type": "array",
13559
+ "items": {
13560
+ "type": "string"
13561
+ },
13562
+ "nullable": true
13563
+ },
13564
+ "added_capability_refs": {
13565
+ "type": "array",
13566
+ "items": {
13567
+ "type": "string"
13568
+ },
13569
+ "nullable": true
13570
+ },
13571
+ "removed_capability_refs": {
13572
+ "type": "array",
13573
+ "items": {
13574
+ "type": "string"
13575
+ },
13576
+ "nullable": true
13577
+ },
13578
+ "binding_keys_impacted": {
13579
+ "type": "array",
13580
+ "items": {
13581
+ "type": "string"
13582
+ },
13583
+ "nullable": true
13584
+ }
13585
+ },
13586
+ "additionalProperties": false
13587
+ },
13206
13588
  "PublishPreviewIssue": {
13207
13589
  "type": "object",
13208
13590
  "properties": {
@@ -13233,6 +13615,15 @@
13233
13615
  },
13234
13616
  "additionalProperties": false
13235
13617
  },
13618
+ "PublishPreviewRequest": {
13619
+ "type": "object",
13620
+ "properties": {
13621
+ "ir_json": {
13622
+ "nullable": true
13623
+ }
13624
+ },
13625
+ "additionalProperties": false
13626
+ },
13236
13627
  "PublishPreviewResponse": {
13237
13628
  "type": "object",
13238
13629
  "properties": {
@@ -13264,6 +13655,9 @@
13264
13655
  },
13265
13656
  "nullable": true
13266
13657
  },
13658
+ "draft_diff": {
13659
+ "$ref": "#/components/schemas/PublishPreviewDraftDiff"
13660
+ },
13267
13661
  "blockers": {
13268
13662
  "type": "array",
13269
13663
  "items": {
@@ -13466,6 +13860,20 @@
13466
13860
  },
13467
13861
  "additionalProperties": false
13468
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
+ },
13469
13877
  "RollbackImprovementCaseRequest": {
13470
13878
  "type": "object",
13471
13879
  "properties": {
@@ -84,6 +84,15 @@ export interface PublishPreviewBindingItem {
84
84
  credential_type_refs: string[];
85
85
  }
86
86
 
87
+ export interface PublishPreviewDraftDiff {
88
+ added_node_ids: string[];
89
+ removed_node_ids: string[];
90
+ modified_node_ids: string[];
91
+ added_capability_refs: string[];
92
+ removed_capability_refs: string[];
93
+ binding_keys_impacted: string[];
94
+ }
95
+
87
96
  export interface PublishPreviewResponse {
88
97
  agent_id: string;
89
98
  draft_ir_revision: string;
@@ -91,10 +100,54 @@ export interface PublishPreviewResponse {
91
100
  validation_result: PublishPreviewValidationResult;
92
101
  capabilities: PublishPreviewCapabilityItem[];
93
102
  bindings: PublishPreviewBindingItem[];
103
+ draft_diff: PublishPreviewDraftDiff;
94
104
  blockers: PublishPreviewIssue[];
95
105
  warnings: PublishPreviewIssue[];
96
106
  }
97
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
+
98
151
  export interface AgentDraftIrResponse {
99
152
  id: string;
100
153
  name: string;
@@ -350,7 +403,18 @@ export class AgentsModule {
350
403
  });
351
404
  }
352
405
 
353
- async getPublishPreview(agentId: string): Promise<APIResponse<PublishPreviewResponse>> {
406
+ async getPublishPreview(
407
+ agentId: string,
408
+ irJson?: Record<string, unknown>
409
+ ): Promise<APIResponse<PublishPreviewResponse>> {
410
+ if (irJson) {
411
+ return this.client.POST<PublishPreviewResponse>("/v1/api/agents/{id}/publish-preview", {
412
+ params: { path: { id: agentId } },
413
+ body: { ir_json: irJson } as any,
414
+ headers: this.headers(),
415
+ });
416
+ }
417
+
354
418
  return this.client.GET<PublishPreviewResponse>("/v1/api/agents/{id}/publish-preview", {
355
419
  params: { path: { id: agentId } },
356
420
  headers: this.headers(),
@@ -439,6 +503,24 @@ export class AgentsModule {
439
503
  });
440
504
  }
441
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
+
442
524
  // ======================== Bundles ========================
443
525
 
444
526
  /**