@ellipsis-dev/sdk 0.14.0 → 0.15.1

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.
@@ -79,12 +79,6 @@
79
79
  ],
80
80
  "default": null
81
81
  },
82
- "llm": {
83
- "$ref": "#/$defs/AgentConfigLlm",
84
- "default": {
85
- "proxy": null
86
- }
87
- },
88
82
  "mcp_servers": {
89
83
  "default": [],
90
84
  "items": {
@@ -167,7 +161,6 @@
167
161
  "ellipsis",
168
162
  "environment",
169
163
  "input",
170
- "llm",
171
164
  "mcp_servers",
172
165
  "output",
173
166
  "permissions",
@@ -831,29 +824,6 @@
831
824
  "title": "AgentConfigInput",
832
825
  "type": "object"
833
826
  },
834
- "AgentConfigLlm": {
835
- "additionalProperties": false,
836
- "description": "Where this agent's completions go.\n\nDefaults to Ellipsis's own LLM proxy (our Anthropic/Bedrock account, or the\naccount-wide BYO provider if one is enabled). Setting `proxy` to the id of a\nproxy registered on the models settings page routes THIS agent's\ncompletions through that gateway instead.\n\nOpt-in per agent by design: registering a proxy does not silently move any\nexisting agent's traffic. The id is account-scoped, so naming another\naccount's id is a terminal config error, not a route.",
837
- "properties": {
838
- "proxy": {
839
- "anyOf": [
840
- {
841
- "type": "string"
842
- },
843
- {
844
- "type": "null"
845
- }
846
- ],
847
- "default": null,
848
- "title": "Proxy"
849
- }
850
- },
851
- "required": [
852
- "proxy"
853
- ],
854
- "title": "AgentConfigLlm",
855
- "type": "object"
856
- },
857
827
  "AgentConfigMcpServer": {
858
828
  "additionalProperties": false,
859
829
  "description": "One built-in MCP server this agent opts into by name (`linear`/`slack`).\nThis is a name reference over the connected built-in set, NOT a custom-server\ndefinition \u2014 there is no command/url/headers shape (that was the old,\nremoved field, and Ellipsis does not support bring-your-own MCP servers).\nIt only matters when the named integration is set to `opt_in` inclusion; an\nintegration in the default `all_sessions` mode is added regardless.",
@@ -1263,8 +1233,8 @@
1263
1233
  "title": "BudgetSource",
1264
1234
  "type": "string"
1265
1235
  },
1266
- "DeltaFrame": {
1267
- "description": "Fire-and-forget partial assistant output for the current response.\nCarries no sequence number and is never resumable; superseded by the\ncommitted record.",
1236
+ "ClaudeSessionRecord": {
1237
+ "description": "A native transcript record of a Claude session (source=claude_code).",
1268
1238
  "properties": {
1269
1239
  "agent_turn_id": {
1270
1240
  "anyOf": [
@@ -1276,14 +1246,29 @@
1276
1246
  }
1277
1247
  ],
1278
1248
  "default": null,
1279
- "description": "Identifier of the turn the delta belongs to, if known.",
1249
+ "description": "Identifier of the turn the record belongs to, if any.",
1280
1250
  "title": "Agent Turn Id"
1281
1251
  },
1282
- "kind": {
1283
- "description": "What the partial text is. Known values: text ('thinking' reserved). Open vocabulary: ignore deltas with unknown kinds.",
1252
+ "cost": {
1253
+ "anyOf": [
1254
+ {
1255
+ "type": "integer"
1256
+ },
1257
+ {
1258
+ "type": "null"
1259
+ }
1260
+ ],
1261
+ "default": null,
1262
+ "description": "Cost attributed to this record, if any.",
1263
+ "title": "Cost"
1264
+ },
1265
+ "created_at": {
1266
+ "description": "When the record was created.",
1267
+ "format": "date-time",
1268
+ "title": "Created At",
1284
1269
  "type": "string"
1285
1270
  },
1286
- "output_tokens": {
1271
+ "duration": {
1287
1272
  "anyOf": [
1288
1273
  {
1289
1274
  "type": "integer"
@@ -1293,10 +1278,20 @@
1293
1278
  }
1294
1279
  ],
1295
1280
  "default": null,
1296
- "description": "Output tokens generated so far for the current response.",
1297
- "title": "Output Tokens"
1281
+ "description": "Duration attributed to this record, if any.",
1282
+ "title": "Duration"
1298
1283
  },
1299
- "text": {
1284
+ "feed_seq": {
1285
+ "description": "The record's position in the session's ordered feed \u2014 the resume cursor for the stream and the records endpoints.",
1286
+ "title": "Feed Seq",
1287
+ "type": "integer"
1288
+ },
1289
+ "id": {
1290
+ "description": "Unique identifier of the record.",
1291
+ "title": "Id",
1292
+ "type": "string"
1293
+ },
1294
+ "model": {
1300
1295
  "anyOf": [
1301
1296
  {
1302
1297
  "type": "string"
@@ -1306,61 +1301,91 @@
1306
1301
  }
1307
1302
  ],
1308
1303
  "default": null,
1309
- "description": "The partial output text.",
1310
- "title": "Text"
1304
+ "description": "The model that produced this record, if any.",
1305
+ "title": "Model"
1311
1306
  },
1312
- "type": {
1313
- "const": "delta",
1314
- "default": "delta",
1315
- "title": "Type",
1307
+ "payload": {
1308
+ "description": "One Claude session record, discriminated by `kind`.",
1309
+ "discriminator": {
1310
+ "mapping": {
1311
+ "assistant": "#/$defs/SdkAssistantRecord",
1312
+ "rate_limit": "#/$defs/SdkRateLimitRecord",
1313
+ "result": "#/$defs/SdkResultRecord",
1314
+ "system": "#/$defs/SdkSystemRecord",
1315
+ "user": "#/$defs/SdkUserRecord"
1316
+ },
1317
+ "propertyName": "kind"
1318
+ },
1319
+ "oneOf": [
1320
+ {
1321
+ "$ref": "#/$defs/SdkAssistantRecord"
1322
+ },
1323
+ {
1324
+ "$ref": "#/$defs/SdkUserRecord"
1325
+ },
1326
+ {
1327
+ "$ref": "#/$defs/SdkSystemRecord"
1328
+ },
1329
+ {
1330
+ "$ref": "#/$defs/SdkResultRecord"
1331
+ },
1332
+ {
1333
+ "$ref": "#/$defs/SdkRateLimitRecord"
1334
+ }
1335
+ ],
1336
+ "title": "Payload"
1337
+ },
1338
+ "record_format": {
1339
+ "const": "claude_sdk@1",
1340
+ "default": "claude_sdk@1",
1341
+ "title": "Record Format",
1316
1342
  "type": "string"
1317
- }
1318
- },
1319
- "required": [
1320
- "agent_turn_id",
1321
- "kind",
1322
- "output_tokens",
1323
- "text",
1324
- "type"
1325
- ],
1326
- "title": "DeltaFrame",
1327
- "type": "object"
1328
- },
1329
- "DoneFrame": {
1330
- "description": "Terminal marker: the conversation is over, after the final session\nframe carried the end state. Followed by a normal close (1000).",
1331
- "properties": {
1332
- "type": {
1333
- "const": "done",
1334
- "default": "done",
1335
- "title": "Type",
1343
+ },
1344
+ "record_type": {
1345
+ "description": "The record's type within its format.",
1346
+ "title": "Record Type",
1336
1347
  "type": "string"
1337
- }
1338
- },
1339
- "required": [
1340
- "type"
1341
- ],
1342
- "title": "DoneFrame",
1343
- "type": "object"
1344
- },
1345
- "EffortLevel": {
1346
- "enum": [
1347
- "low",
1348
- "medium",
1349
- "high",
1350
- "xhigh",
1351
- "max"
1352
- ],
1353
- "title": "EffortLevel",
1354
- "type": "string"
1355
- },
1356
- "EllipsisGrant": {
1357
- "additionalProperties": false,
1358
- "description": "One grant entry: a level, optionally narrowed to instances whose\nnatural key (a file's name, a memory's path, a secret's name, a config's\nname, a session's id) matches any of the `match` globs.",
1359
- "properties": {
1360
- "level": {
1361
- "$ref": "#/$defs/Level"
1362
1348
  },
1363
- "match": {
1349
+ "session_id": {
1350
+ "description": "Identifier of the session the record belongs to.",
1351
+ "title": "Session Id",
1352
+ "type": "string"
1353
+ },
1354
+ "session_message_id": {
1355
+ "anyOf": [
1356
+ {
1357
+ "type": "string"
1358
+ },
1359
+ {
1360
+ "type": "null"
1361
+ }
1362
+ ],
1363
+ "default": null,
1364
+ "description": "Correlates a user-echo record back to the session message it echoes, so clients can retire queued messages by id.",
1365
+ "title": "Session Message Id"
1366
+ },
1367
+ "source": {
1368
+ "description": "Who wrote the record. Open vocabulary: ignore records with unknown sources.",
1369
+ "type": "string"
1370
+ },
1371
+ "stream_seq": {
1372
+ "description": "The record's position within its execution's stream.",
1373
+ "title": "Stream Seq",
1374
+ "type": "integer"
1375
+ },
1376
+ "tokens_info": {
1377
+ "anyOf": [
1378
+ {
1379
+ "$ref": "#/$defs/TokensInfo"
1380
+ },
1381
+ {
1382
+ "type": "null"
1383
+ }
1384
+ ],
1385
+ "default": null,
1386
+ "description": "Token usage reported for this record, if any."
1387
+ },
1388
+ "tools": {
1364
1389
  "anyOf": [
1365
1390
  {
1366
1391
  "items": {
@@ -1373,520 +1398,2585 @@
1373
1398
  }
1374
1399
  ],
1375
1400
  "default": null,
1376
- "title": "Match"
1401
+ "description": "Names of the tools used in this record, if any.",
1402
+ "title": "Tools"
1377
1403
  }
1378
1404
  },
1379
1405
  "required": [
1380
- "level",
1381
- "match"
1406
+ "agent_turn_id",
1407
+ "cost",
1408
+ "created_at",
1409
+ "duration",
1410
+ "feed_seq",
1411
+ "id",
1412
+ "model",
1413
+ "payload",
1414
+ "record_format",
1415
+ "record_type",
1416
+ "session_id",
1417
+ "session_message_id",
1418
+ "source",
1419
+ "stream_seq",
1420
+ "tokens_info",
1421
+ "tools"
1382
1422
  ],
1383
- "title": "EllipsisGrant",
1423
+ "title": "ClaudeSessionRecord",
1384
1424
  "type": "object"
1385
1425
  },
1386
- "ErrorFrame": {
1387
- "description": "Terminal error marker, sent before the server closes with code 1011.",
1426
+ "CodexAgentMessageItem": {
1427
+ "additionalProperties": true,
1428
+ "description": "The agent said something to the user \u2014 Codex's assistant-text item.",
1388
1429
  "properties": {
1389
- "message": {
1390
- "description": "A human-readable error message.",
1391
- "title": "Message",
1430
+ "id": {
1431
+ "anyOf": [
1432
+ {
1433
+ "type": "string"
1434
+ },
1435
+ {
1436
+ "type": "null"
1437
+ }
1438
+ ],
1439
+ "default": null,
1440
+ "title": "Id"
1441
+ },
1442
+ "text": {
1443
+ "default": "",
1444
+ "title": "Text",
1392
1445
  "type": "string"
1393
1446
  },
1394
1447
  "type": {
1395
- "const": "error",
1396
- "default": "error",
1448
+ "const": "agent_message",
1449
+ "default": "agent_message",
1397
1450
  "title": "Type",
1398
1451
  "type": "string"
1399
1452
  }
1400
1453
  },
1401
1454
  "required": [
1402
- "message",
1455
+ "id",
1456
+ "text",
1403
1457
  "type"
1404
1458
  ],
1405
- "title": "ErrorFrame",
1459
+ "title": "CodexAgentMessageItem",
1406
1460
  "type": "object"
1407
1461
  },
1408
- "GithubAccountFilter": {
1409
- "anyOf": [
1410
- {
1411
- "additionalProperties": false,
1412
- "description": "One include-minus-exclude set of GitHub accounts: an account matches iff\nit is in `include` (`true` = all, a list = exactly those, `false`/`[]` =\nnone) AND not in `exclude`. A bare bool or list is shorthand for `include`,\nso `users: true` and `users: [priya-shah]` both parse.",
1413
- "properties": {
1414
- "exclude": {
1415
- "default": [],
1416
- "items": {
1417
- "type": "string"
1418
- },
1419
- "title": "Exclude",
1420
- "type": "array"
1462
+ "CodexCommandExecutionItem": {
1463
+ "additionalProperties": true,
1464
+ "properties": {
1465
+ "aggregated_output": {
1466
+ "anyOf": [
1467
+ {
1468
+ "type": "string"
1421
1469
  },
1422
- "include": {
1423
- "anyOf": [
1424
- {
1425
- "items": {
1426
- "type": "string"
1427
- },
1428
- "type": "array"
1429
- },
1430
- {
1431
- "type": "boolean"
1432
- }
1433
- ],
1434
- "default": true,
1435
- "title": "Include"
1470
+ {
1471
+ "type": "null"
1436
1472
  }
1437
- },
1438
- "title": "GithubAccountFilter",
1439
- "type": "object"
1473
+ ],
1474
+ "default": null,
1475
+ "title": "Aggregated Output"
1440
1476
  },
1441
- {
1442
- "type": "boolean"
1477
+ "command": {
1478
+ "default": "",
1479
+ "title": "Command",
1480
+ "type": "string"
1443
1481
  },
1444
- {
1445
- "items": {
1446
- "type": "string"
1447
- },
1448
- "type": "array"
1482
+ "exit_code": {
1483
+ "anyOf": [
1484
+ {
1485
+ "type": "integer"
1486
+ },
1487
+ {
1488
+ "type": "null"
1489
+ }
1490
+ ],
1491
+ "default": null,
1492
+ "title": "Exit Code"
1493
+ },
1494
+ "id": {
1495
+ "anyOf": [
1496
+ {
1497
+ "type": "string"
1498
+ },
1499
+ {
1500
+ "type": "null"
1501
+ }
1502
+ ],
1503
+ "default": null,
1504
+ "title": "Id"
1505
+ },
1506
+ "status": {
1507
+ "anyOf": [
1508
+ {
1509
+ "type": "string"
1510
+ },
1511
+ {
1512
+ "type": "null"
1513
+ }
1514
+ ],
1515
+ "default": null,
1516
+ "title": "Status"
1517
+ },
1518
+ "type": {
1519
+ "const": "command_execution",
1520
+ "default": "command_execution",
1521
+ "title": "Type",
1522
+ "type": "string"
1449
1523
  }
1450
- ]
1524
+ },
1525
+ "required": [
1526
+ "aggregated_output",
1527
+ "command",
1528
+ "exit_code",
1529
+ "id",
1530
+ "status",
1531
+ "type"
1532
+ ],
1533
+ "title": "CodexCommandExecutionItem",
1534
+ "type": "object"
1451
1535
  },
1452
- "GithubAccountSelector": {
1453
- "additionalProperties": false,
1454
- "description": "A selector of GitHub accounts \u2014 the `for:` audience gate on react\nsurfaces and code review pipelines, classified on the stable entity author\n(the pusher for `push`, the PR author for a review). `users` selects human\naccounts, `bots` selects bot accounts; each is a `GithubAccountFilter`\n(include minus exclude, with bare bool/list shorthand).",
1536
+ "CodexErrorEvent": {
1537
+ "additionalProperties": true,
1455
1538
  "properties": {
1456
- "bots": {
1457
- "$ref": "#/$defs/GithubAccountFilter"
1539
+ "message": {
1540
+ "anyOf": [
1541
+ {
1542
+ "type": "string"
1543
+ },
1544
+ {
1545
+ "type": "null"
1546
+ }
1547
+ ],
1548
+ "default": null,
1549
+ "title": "Message"
1458
1550
  },
1459
- "users": {
1460
- "$ref": "#/$defs/GithubAccountFilter"
1551
+ "type": {
1552
+ "const": "error",
1553
+ "default": "error",
1554
+ "title": "Type",
1555
+ "type": "string"
1461
1556
  }
1462
1557
  },
1463
1558
  "required": [
1464
- "bots",
1465
- "users"
1559
+ "message",
1560
+ "type"
1466
1561
  ],
1467
- "title": "GithubAccountSelector",
1562
+ "title": "CodexErrorEvent",
1468
1563
  "type": "object"
1469
1564
  },
1470
- "GithubAccountSnippet": {
1471
- "description": "Sometimes the GitHub API returns a user of github (can include bots)\nusing this snippet instead of the full GithubAccount model. One example,\nis when the API returns a pull request.\n\nThis is the least amount of info we need to represent a GitHub account.",
1565
+ "CodexErrorItem": {
1566
+ "additionalProperties": true,
1472
1567
  "properties": {
1473
- "avatar_url": {
1474
- "title": "Avatar Url",
1475
- "type": "string"
1476
- },
1477
1568
  "id": {
1478
- "title": "Id",
1479
- "type": "integer"
1569
+ "anyOf": [
1570
+ {
1571
+ "type": "string"
1572
+ },
1573
+ {
1574
+ "type": "null"
1575
+ }
1576
+ ],
1577
+ "default": null,
1578
+ "title": "Id"
1480
1579
  },
1481
- "login": {
1482
- "title": "Login",
1483
- "type": "string"
1580
+ "message": {
1581
+ "anyOf": [
1582
+ {
1583
+ "type": "string"
1584
+ },
1585
+ {
1586
+ "type": "null"
1587
+ }
1588
+ ],
1589
+ "default": null,
1590
+ "title": "Message"
1484
1591
  },
1485
1592
  "type": {
1486
- "$ref": "#/$defs/GithubAccountType"
1593
+ "const": "error",
1594
+ "default": "error",
1595
+ "title": "Type",
1596
+ "type": "string"
1487
1597
  }
1488
1598
  },
1489
1599
  "required": [
1490
- "avatar_url",
1491
1600
  "id",
1492
- "login",
1601
+ "message",
1493
1602
  "type"
1494
1603
  ],
1495
- "title": "GithubAccountSnippet",
1604
+ "title": "CodexErrorItem",
1496
1605
  "type": "object"
1497
1606
  },
1498
- "GithubAccountType": {
1499
- "enum": [
1500
- "User",
1501
- "Organization",
1502
- "Bot",
1503
- "Mannequin"
1607
+ "CodexFileChangeItem": {
1608
+ "additionalProperties": true,
1609
+ "properties": {
1610
+ "changes": {
1611
+ "anyOf": [
1612
+ {
1613
+ "items": {
1614
+ "additionalProperties": true,
1615
+ "type": "object"
1616
+ },
1617
+ "type": "array"
1618
+ },
1619
+ {
1620
+ "type": "null"
1621
+ }
1622
+ ],
1623
+ "default": null,
1624
+ "title": "Changes"
1625
+ },
1626
+ "id": {
1627
+ "anyOf": [
1628
+ {
1629
+ "type": "string"
1630
+ },
1631
+ {
1632
+ "type": "null"
1633
+ }
1634
+ ],
1635
+ "default": null,
1636
+ "title": "Id"
1637
+ },
1638
+ "status": {
1639
+ "anyOf": [
1640
+ {
1641
+ "type": "string"
1642
+ },
1643
+ {
1644
+ "type": "null"
1645
+ }
1646
+ ],
1647
+ "default": null,
1648
+ "title": "Status"
1649
+ },
1650
+ "type": {
1651
+ "const": "file_change",
1652
+ "default": "file_change",
1653
+ "title": "Type",
1654
+ "type": "string"
1655
+ }
1656
+ },
1657
+ "required": [
1658
+ "changes",
1659
+ "id",
1660
+ "status",
1661
+ "type"
1504
1662
  ],
1505
- "title": "GithubAccountType",
1506
- "type": "string"
1663
+ "title": "CodexFileChangeItem",
1664
+ "type": "object"
1507
1665
  },
1508
- "Harness": {
1509
- "enum": [
1510
- "claude_code",
1511
- "codex"
1666
+ "CodexItemCompletedEvent": {
1667
+ "additionalProperties": true,
1668
+ "properties": {
1669
+ "item": {
1670
+ "anyOf": [
1671
+ {
1672
+ "$ref": "#/$defs/CodexAgentMessageItem"
1673
+ },
1674
+ {
1675
+ "$ref": "#/$defs/CodexReasoningItem"
1676
+ },
1677
+ {
1678
+ "$ref": "#/$defs/CodexCommandExecutionItem"
1679
+ },
1680
+ {
1681
+ "$ref": "#/$defs/CodexFileChangeItem"
1682
+ },
1683
+ {
1684
+ "$ref": "#/$defs/CodexMcpToolCallItem"
1685
+ },
1686
+ {
1687
+ "$ref": "#/$defs/CodexWebSearchItem"
1688
+ },
1689
+ {
1690
+ "$ref": "#/$defs/CodexTodoListItem"
1691
+ },
1692
+ {
1693
+ "$ref": "#/$defs/CodexErrorItem"
1694
+ },
1695
+ {
1696
+ "$ref": "#/$defs/CodexUnknownItem"
1697
+ }
1698
+ ],
1699
+ "title": "Item"
1700
+ },
1701
+ "type": {
1702
+ "const": "item.completed",
1703
+ "default": "item.completed",
1704
+ "title": "Type",
1705
+ "type": "string"
1706
+ }
1707
+ },
1708
+ "required": [
1709
+ "item",
1710
+ "type"
1512
1711
  ],
1513
- "title": "Harness",
1514
- "type": "string"
1712
+ "title": "CodexItemCompletedEvent",
1713
+ "type": "object"
1515
1714
  },
1516
- "HeartbeatFrame": {
1517
- "description": "A keepalive sent after a period of idleness; doubles as the dead-socket\nprobe. Clients should treat roughly twice the heartbeat interval of\nsilence as a dead connection.",
1715
+ "CodexItemStartedEvent": {
1716
+ "additionalProperties": true,
1518
1717
  "properties": {
1519
- "ts": {
1520
- "description": "Server time when the heartbeat was sent.",
1521
- "format": "date-time",
1522
- "title": "Ts",
1523
- "type": "string"
1718
+ "item": {
1719
+ "anyOf": [
1720
+ {
1721
+ "$ref": "#/$defs/CodexAgentMessageItem"
1722
+ },
1723
+ {
1724
+ "$ref": "#/$defs/CodexReasoningItem"
1725
+ },
1726
+ {
1727
+ "$ref": "#/$defs/CodexCommandExecutionItem"
1728
+ },
1729
+ {
1730
+ "$ref": "#/$defs/CodexFileChangeItem"
1731
+ },
1732
+ {
1733
+ "$ref": "#/$defs/CodexMcpToolCallItem"
1734
+ },
1735
+ {
1736
+ "$ref": "#/$defs/CodexWebSearchItem"
1737
+ },
1738
+ {
1739
+ "$ref": "#/$defs/CodexTodoListItem"
1740
+ },
1741
+ {
1742
+ "$ref": "#/$defs/CodexErrorItem"
1743
+ },
1744
+ {
1745
+ "$ref": "#/$defs/CodexUnknownItem"
1746
+ }
1747
+ ],
1748
+ "title": "Item"
1524
1749
  },
1525
1750
  "type": {
1526
- "const": "heartbeat",
1527
- "default": "heartbeat",
1751
+ "const": "item.started",
1752
+ "default": "item.started",
1528
1753
  "title": "Type",
1529
1754
  "type": "string"
1530
1755
  }
1531
1756
  },
1532
1757
  "required": [
1533
- "ts",
1758
+ "item",
1534
1759
  "type"
1535
1760
  ],
1536
- "title": "HeartbeatFrame",
1761
+ "title": "CodexItemStartedEvent",
1537
1762
  "type": "object"
1538
1763
  },
1539
- "IssueAction": {
1540
- "enum": [
1541
- "opened",
1542
- "closed",
1543
- "commented"
1544
- ],
1764
+ "CodexItemUpdatedEvent": {
1765
+ "additionalProperties": true,
1766
+ "properties": {
1767
+ "item": {
1768
+ "anyOf": [
1769
+ {
1770
+ "$ref": "#/$defs/CodexAgentMessageItem"
1771
+ },
1772
+ {
1773
+ "$ref": "#/$defs/CodexReasoningItem"
1774
+ },
1775
+ {
1776
+ "$ref": "#/$defs/CodexCommandExecutionItem"
1777
+ },
1778
+ {
1779
+ "$ref": "#/$defs/CodexFileChangeItem"
1780
+ },
1781
+ {
1782
+ "$ref": "#/$defs/CodexMcpToolCallItem"
1783
+ },
1784
+ {
1785
+ "$ref": "#/$defs/CodexWebSearchItem"
1786
+ },
1787
+ {
1788
+ "$ref": "#/$defs/CodexTodoListItem"
1789
+ },
1790
+ {
1791
+ "$ref": "#/$defs/CodexErrorItem"
1792
+ },
1793
+ {
1794
+ "$ref": "#/$defs/CodexUnknownItem"
1795
+ }
1796
+ ],
1797
+ "title": "Item"
1798
+ },
1799
+ "type": {
1800
+ "const": "item.updated",
1801
+ "default": "item.updated",
1802
+ "title": "Type",
1803
+ "type": "string"
1804
+ }
1805
+ },
1806
+ "required": [
1807
+ "item",
1808
+ "type"
1809
+ ],
1810
+ "title": "CodexItemUpdatedEvent",
1811
+ "type": "object"
1812
+ },
1813
+ "CodexMcpToolCallItem": {
1814
+ "additionalProperties": true,
1815
+ "properties": {
1816
+ "id": {
1817
+ "anyOf": [
1818
+ {
1819
+ "type": "string"
1820
+ },
1821
+ {
1822
+ "type": "null"
1823
+ }
1824
+ ],
1825
+ "default": null,
1826
+ "title": "Id"
1827
+ },
1828
+ "server": {
1829
+ "anyOf": [
1830
+ {
1831
+ "type": "string"
1832
+ },
1833
+ {
1834
+ "type": "null"
1835
+ }
1836
+ ],
1837
+ "default": null,
1838
+ "title": "Server"
1839
+ },
1840
+ "status": {
1841
+ "anyOf": [
1842
+ {
1843
+ "type": "string"
1844
+ },
1845
+ {
1846
+ "type": "null"
1847
+ }
1848
+ ],
1849
+ "default": null,
1850
+ "title": "Status"
1851
+ },
1852
+ "tool": {
1853
+ "anyOf": [
1854
+ {
1855
+ "type": "string"
1856
+ },
1857
+ {
1858
+ "type": "null"
1859
+ }
1860
+ ],
1861
+ "default": null,
1862
+ "title": "Tool"
1863
+ },
1864
+ "type": {
1865
+ "const": "mcp_tool_call",
1866
+ "default": "mcp_tool_call",
1867
+ "title": "Type",
1868
+ "type": "string"
1869
+ }
1870
+ },
1871
+ "required": [
1872
+ "id",
1873
+ "server",
1874
+ "status",
1875
+ "tool",
1876
+ "type"
1877
+ ],
1878
+ "title": "CodexMcpToolCallItem",
1879
+ "type": "object"
1880
+ },
1881
+ "CodexReasoningItem": {
1882
+ "additionalProperties": true,
1883
+ "properties": {
1884
+ "id": {
1885
+ "anyOf": [
1886
+ {
1887
+ "type": "string"
1888
+ },
1889
+ {
1890
+ "type": "null"
1891
+ }
1892
+ ],
1893
+ "default": null,
1894
+ "title": "Id"
1895
+ },
1896
+ "summary": {
1897
+ "anyOf": [
1898
+ {
1899
+ "type": "string"
1900
+ },
1901
+ {
1902
+ "type": "null"
1903
+ }
1904
+ ],
1905
+ "default": null,
1906
+ "title": "Summary"
1907
+ },
1908
+ "text": {
1909
+ "anyOf": [
1910
+ {
1911
+ "type": "string"
1912
+ },
1913
+ {
1914
+ "type": "null"
1915
+ }
1916
+ ],
1917
+ "default": null,
1918
+ "title": "Text"
1919
+ },
1920
+ "type": {
1921
+ "const": "reasoning",
1922
+ "default": "reasoning",
1923
+ "title": "Type",
1924
+ "type": "string"
1925
+ }
1926
+ },
1927
+ "required": [
1928
+ "id",
1929
+ "summary",
1930
+ "text",
1931
+ "type"
1932
+ ],
1933
+ "title": "CodexReasoningItem",
1934
+ "type": "object"
1935
+ },
1936
+ "CodexSessionRecord": {
1937
+ "description": "A native transcript record of a Codex session (source=codex).",
1938
+ "properties": {
1939
+ "agent_turn_id": {
1940
+ "anyOf": [
1941
+ {
1942
+ "type": "string"
1943
+ },
1944
+ {
1945
+ "type": "null"
1946
+ }
1947
+ ],
1948
+ "default": null,
1949
+ "description": "Identifier of the turn the record belongs to, if any.",
1950
+ "title": "Agent Turn Id"
1951
+ },
1952
+ "cost": {
1953
+ "anyOf": [
1954
+ {
1955
+ "type": "integer"
1956
+ },
1957
+ {
1958
+ "type": "null"
1959
+ }
1960
+ ],
1961
+ "default": null,
1962
+ "description": "Cost attributed to this record, if any.",
1963
+ "title": "Cost"
1964
+ },
1965
+ "created_at": {
1966
+ "description": "When the record was created.",
1967
+ "format": "date-time",
1968
+ "title": "Created At",
1969
+ "type": "string"
1970
+ },
1971
+ "duration": {
1972
+ "anyOf": [
1973
+ {
1974
+ "type": "integer"
1975
+ },
1976
+ {
1977
+ "type": "null"
1978
+ }
1979
+ ],
1980
+ "default": null,
1981
+ "description": "Duration attributed to this record, if any.",
1982
+ "title": "Duration"
1983
+ },
1984
+ "feed_seq": {
1985
+ "description": "The record's position in the session's ordered feed \u2014 the resume cursor for the stream and the records endpoints.",
1986
+ "title": "Feed Seq",
1987
+ "type": "integer"
1988
+ },
1989
+ "id": {
1990
+ "description": "Unique identifier of the record.",
1991
+ "title": "Id",
1992
+ "type": "string"
1993
+ },
1994
+ "model": {
1995
+ "anyOf": [
1996
+ {
1997
+ "type": "string"
1998
+ },
1999
+ {
2000
+ "type": "null"
2001
+ }
2002
+ ],
2003
+ "default": null,
2004
+ "description": "The model that produced this record, if any.",
2005
+ "title": "Model"
2006
+ },
2007
+ "payload": {
2008
+ "anyOf": [
2009
+ {
2010
+ "$ref": "#/$defs/CodexThreadStartedEvent"
2011
+ },
2012
+ {
2013
+ "$ref": "#/$defs/CodexTurnStartedEvent"
2014
+ },
2015
+ {
2016
+ "$ref": "#/$defs/CodexTurnCompletedEvent"
2017
+ },
2018
+ {
2019
+ "$ref": "#/$defs/CodexTurnFailedEvent"
2020
+ },
2021
+ {
2022
+ "$ref": "#/$defs/CodexErrorEvent"
2023
+ },
2024
+ {
2025
+ "$ref": "#/$defs/CodexItemStartedEvent"
2026
+ },
2027
+ {
2028
+ "$ref": "#/$defs/CodexItemUpdatedEvent"
2029
+ },
2030
+ {
2031
+ "$ref": "#/$defs/CodexItemCompletedEvent"
2032
+ },
2033
+ {
2034
+ "$ref": "#/$defs/CodexUnknownEvent"
2035
+ }
2036
+ ],
2037
+ "description": "One Codex `exec --json` ThreadEvent, verbatim, discriminated by `type`.",
2038
+ "title": "Payload"
2039
+ },
2040
+ "record_format": {
2041
+ "const": "codex_jsonl@1",
2042
+ "default": "codex_jsonl@1",
2043
+ "title": "Record Format",
2044
+ "type": "string"
2045
+ },
2046
+ "record_type": {
2047
+ "description": "The record's type within its format.",
2048
+ "title": "Record Type",
2049
+ "type": "string"
2050
+ },
2051
+ "session_id": {
2052
+ "description": "Identifier of the session the record belongs to.",
2053
+ "title": "Session Id",
2054
+ "type": "string"
2055
+ },
2056
+ "session_message_id": {
2057
+ "anyOf": [
2058
+ {
2059
+ "type": "string"
2060
+ },
2061
+ {
2062
+ "type": "null"
2063
+ }
2064
+ ],
2065
+ "default": null,
2066
+ "description": "Correlates a user-echo record back to the session message it echoes, so clients can retire queued messages by id.",
2067
+ "title": "Session Message Id"
2068
+ },
2069
+ "source": {
2070
+ "description": "Who wrote the record. Open vocabulary: ignore records with unknown sources.",
2071
+ "type": "string"
2072
+ },
2073
+ "stream_seq": {
2074
+ "description": "The record's position within its execution's stream.",
2075
+ "title": "Stream Seq",
2076
+ "type": "integer"
2077
+ },
2078
+ "tokens_info": {
2079
+ "anyOf": [
2080
+ {
2081
+ "$ref": "#/$defs/TokensInfo"
2082
+ },
2083
+ {
2084
+ "type": "null"
2085
+ }
2086
+ ],
2087
+ "default": null,
2088
+ "description": "Token usage reported for this record, if any."
2089
+ },
2090
+ "tools": {
2091
+ "anyOf": [
2092
+ {
2093
+ "items": {
2094
+ "type": "string"
2095
+ },
2096
+ "type": "array"
2097
+ },
2098
+ {
2099
+ "type": "null"
2100
+ }
2101
+ ],
2102
+ "default": null,
2103
+ "description": "Names of the tools used in this record, if any.",
2104
+ "title": "Tools"
2105
+ }
2106
+ },
2107
+ "required": [
2108
+ "agent_turn_id",
2109
+ "cost",
2110
+ "created_at",
2111
+ "duration",
2112
+ "feed_seq",
2113
+ "id",
2114
+ "model",
2115
+ "payload",
2116
+ "record_format",
2117
+ "record_type",
2118
+ "session_id",
2119
+ "session_message_id",
2120
+ "source",
2121
+ "stream_seq",
2122
+ "tokens_info",
2123
+ "tools"
2124
+ ],
2125
+ "title": "CodexSessionRecord",
2126
+ "type": "object"
2127
+ },
2128
+ "CodexThreadStartedEvent": {
2129
+ "additionalProperties": true,
2130
+ "properties": {
2131
+ "thread_id": {
2132
+ "anyOf": [
2133
+ {
2134
+ "type": "string"
2135
+ },
2136
+ {
2137
+ "type": "null"
2138
+ }
2139
+ ],
2140
+ "default": null,
2141
+ "title": "Thread Id"
2142
+ },
2143
+ "type": {
2144
+ "const": "thread.started",
2145
+ "default": "thread.started",
2146
+ "title": "Type",
2147
+ "type": "string"
2148
+ }
2149
+ },
2150
+ "required": [
2151
+ "thread_id",
2152
+ "type"
2153
+ ],
2154
+ "title": "CodexThreadStartedEvent",
2155
+ "type": "object"
2156
+ },
2157
+ "CodexTodoListItem": {
2158
+ "additionalProperties": true,
2159
+ "properties": {
2160
+ "id": {
2161
+ "anyOf": [
2162
+ {
2163
+ "type": "string"
2164
+ },
2165
+ {
2166
+ "type": "null"
2167
+ }
2168
+ ],
2169
+ "default": null,
2170
+ "title": "Id"
2171
+ },
2172
+ "items": {
2173
+ "anyOf": [
2174
+ {
2175
+ "items": {
2176
+ "additionalProperties": true,
2177
+ "type": "object"
2178
+ },
2179
+ "type": "array"
2180
+ },
2181
+ {
2182
+ "type": "null"
2183
+ }
2184
+ ],
2185
+ "default": null,
2186
+ "title": "Items"
2187
+ },
2188
+ "type": {
2189
+ "const": "todo_list",
2190
+ "default": "todo_list",
2191
+ "title": "Type",
2192
+ "type": "string"
2193
+ }
2194
+ },
2195
+ "required": [
2196
+ "id",
2197
+ "items",
2198
+ "type"
2199
+ ],
2200
+ "title": "CodexTodoListItem",
2201
+ "type": "object"
2202
+ },
2203
+ "CodexTurnCompletedEvent": {
2204
+ "additionalProperties": true,
2205
+ "properties": {
2206
+ "type": {
2207
+ "const": "turn.completed",
2208
+ "default": "turn.completed",
2209
+ "title": "Type",
2210
+ "type": "string"
2211
+ },
2212
+ "usage": {
2213
+ "anyOf": [
2214
+ {
2215
+ "$ref": "#/$defs/CodexUsage"
2216
+ },
2217
+ {
2218
+ "type": "null"
2219
+ }
2220
+ ],
2221
+ "default": null
2222
+ }
2223
+ },
2224
+ "required": [
2225
+ "type",
2226
+ "usage"
2227
+ ],
2228
+ "title": "CodexTurnCompletedEvent",
2229
+ "type": "object"
2230
+ },
2231
+ "CodexTurnFailedEvent": {
2232
+ "additionalProperties": true,
2233
+ "properties": {
2234
+ "error": {
2235
+ "anyOf": [
2236
+ {
2237
+ "additionalProperties": true,
2238
+ "type": "object"
2239
+ },
2240
+ {
2241
+ "type": "null"
2242
+ }
2243
+ ],
2244
+ "default": null,
2245
+ "title": "Error"
2246
+ },
2247
+ "type": {
2248
+ "const": "turn.failed",
2249
+ "default": "turn.failed",
2250
+ "title": "Type",
2251
+ "type": "string"
2252
+ }
2253
+ },
2254
+ "required": [
2255
+ "error",
2256
+ "type"
2257
+ ],
2258
+ "title": "CodexTurnFailedEvent",
2259
+ "type": "object"
2260
+ },
2261
+ "CodexTurnStartedEvent": {
2262
+ "additionalProperties": true,
2263
+ "properties": {
2264
+ "type": {
2265
+ "const": "turn.started",
2266
+ "default": "turn.started",
2267
+ "title": "Type",
2268
+ "type": "string"
2269
+ }
2270
+ },
2271
+ "required": [
2272
+ "type"
2273
+ ],
2274
+ "title": "CodexTurnStartedEvent",
2275
+ "type": "object"
2276
+ },
2277
+ "CodexUnknownEvent": {
2278
+ "additionalProperties": true,
2279
+ "description": "Catch-all for event types this schema does not know yet \u2014 including the\nmalformed-line records the stream parser keeps verbatim.",
2280
+ "properties": {
2281
+ "type": {
2282
+ "anyOf": [
2283
+ {
2284
+ "type": "string"
2285
+ },
2286
+ {
2287
+ "type": "null"
2288
+ }
2289
+ ],
2290
+ "default": null,
2291
+ "title": "Type"
2292
+ }
2293
+ },
2294
+ "required": [
2295
+ "type"
2296
+ ],
2297
+ "title": "CodexUnknownEvent",
2298
+ "type": "object"
2299
+ },
2300
+ "CodexUnknownItem": {
2301
+ "additionalProperties": true,
2302
+ "description": "Catch-all for item types this schema does not know yet.",
2303
+ "properties": {
2304
+ "id": {
2305
+ "anyOf": [
2306
+ {
2307
+ "type": "string"
2308
+ },
2309
+ {
2310
+ "type": "null"
2311
+ }
2312
+ ],
2313
+ "default": null,
2314
+ "title": "Id"
2315
+ },
2316
+ "type": {
2317
+ "title": "Type",
2318
+ "type": "string"
2319
+ }
2320
+ },
2321
+ "required": [
2322
+ "id",
2323
+ "type"
2324
+ ],
2325
+ "title": "CodexUnknownItem",
2326
+ "type": "object"
2327
+ },
2328
+ "CodexUsage": {
2329
+ "description": "The `usage` object on a `turn.completed` event \u2014 one turn's token counts.\n\nNote the field names differ from BOTH the Responses API and chat completions:\nCodex reports `cached_input_tokens` / `cache_write_input_tokens` where the\nResponses API says `input_tokens_details.cached_tokens`. These counts are for\ndisplay/records only \u2014 billing cost comes from the proxy's own ledger, which\nprices the provider's usage, so a drift here can never mis-bill.",
2330
+ "properties": {
2331
+ "cache_write_input_tokens": {
2332
+ "default": 0,
2333
+ "title": "Cache Write Input Tokens",
2334
+ "type": "integer"
2335
+ },
2336
+ "cached_input_tokens": {
2337
+ "default": 0,
2338
+ "title": "Cached Input Tokens",
2339
+ "type": "integer"
2340
+ },
2341
+ "input_tokens": {
2342
+ "default": 0,
2343
+ "title": "Input Tokens",
2344
+ "type": "integer"
2345
+ },
2346
+ "output_tokens": {
2347
+ "default": 0,
2348
+ "title": "Output Tokens",
2349
+ "type": "integer"
2350
+ },
2351
+ "reasoning_output_tokens": {
2352
+ "default": 0,
2353
+ "title": "Reasoning Output Tokens",
2354
+ "type": "integer"
2355
+ }
2356
+ },
2357
+ "required": [
2358
+ "cache_write_input_tokens",
2359
+ "cached_input_tokens",
2360
+ "input_tokens",
2361
+ "output_tokens",
2362
+ "reasoning_output_tokens"
2363
+ ],
2364
+ "title": "CodexUsage",
2365
+ "type": "object"
2366
+ },
2367
+ "CodexWebSearchItem": {
2368
+ "additionalProperties": true,
2369
+ "properties": {
2370
+ "id": {
2371
+ "anyOf": [
2372
+ {
2373
+ "type": "string"
2374
+ },
2375
+ {
2376
+ "type": "null"
2377
+ }
2378
+ ],
2379
+ "default": null,
2380
+ "title": "Id"
2381
+ },
2382
+ "query": {
2383
+ "anyOf": [
2384
+ {
2385
+ "type": "string"
2386
+ },
2387
+ {
2388
+ "type": "null"
2389
+ }
2390
+ ],
2391
+ "default": null,
2392
+ "title": "Query"
2393
+ },
2394
+ "type": {
2395
+ "const": "web_search",
2396
+ "default": "web_search",
2397
+ "title": "Type",
2398
+ "type": "string"
2399
+ }
2400
+ },
2401
+ "required": [
2402
+ "id",
2403
+ "query",
2404
+ "type"
2405
+ ],
2406
+ "title": "CodexWebSearchItem",
2407
+ "type": "object"
2408
+ },
2409
+ "DeltaFrame": {
2410
+ "description": "Fire-and-forget partial assistant output for the current response.\nCarries no sequence number and is never resumable; superseded by the\ncommitted record.",
2411
+ "properties": {
2412
+ "agent_turn_id": {
2413
+ "anyOf": [
2414
+ {
2415
+ "type": "string"
2416
+ },
2417
+ {
2418
+ "type": "null"
2419
+ }
2420
+ ],
2421
+ "default": null,
2422
+ "description": "Identifier of the turn the delta belongs to, if known.",
2423
+ "title": "Agent Turn Id"
2424
+ },
2425
+ "kind": {
2426
+ "description": "What the partial text is. Known values: text ('thinking' reserved). Open vocabulary: ignore deltas with unknown kinds.",
2427
+ "type": "string"
2428
+ },
2429
+ "output_tokens": {
2430
+ "anyOf": [
2431
+ {
2432
+ "type": "integer"
2433
+ },
2434
+ {
2435
+ "type": "null"
2436
+ }
2437
+ ],
2438
+ "default": null,
2439
+ "description": "Output tokens generated so far for the current response.",
2440
+ "title": "Output Tokens"
2441
+ },
2442
+ "text": {
2443
+ "anyOf": [
2444
+ {
2445
+ "type": "string"
2446
+ },
2447
+ {
2448
+ "type": "null"
2449
+ }
2450
+ ],
2451
+ "default": null,
2452
+ "description": "The partial output text.",
2453
+ "title": "Text"
2454
+ },
2455
+ "type": {
2456
+ "const": "delta",
2457
+ "default": "delta",
2458
+ "title": "Type",
2459
+ "type": "string"
2460
+ }
2461
+ },
2462
+ "required": [
2463
+ "agent_turn_id",
2464
+ "kind",
2465
+ "output_tokens",
2466
+ "text",
2467
+ "type"
2468
+ ],
2469
+ "title": "DeltaFrame",
2470
+ "type": "object"
2471
+ },
2472
+ "DoneFrame": {
2473
+ "description": "Terminal marker: the conversation is over, after the final session\nframe carried the end state. Followed by a normal close (1000).",
2474
+ "properties": {
2475
+ "type": {
2476
+ "const": "done",
2477
+ "default": "done",
2478
+ "title": "Type",
2479
+ "type": "string"
2480
+ }
2481
+ },
2482
+ "required": [
2483
+ "type"
2484
+ ],
2485
+ "title": "DoneFrame",
2486
+ "type": "object"
2487
+ },
2488
+ "EffortLevel": {
2489
+ "enum": [
2490
+ "low",
2491
+ "medium",
2492
+ "high",
2493
+ "xhigh",
2494
+ "max"
2495
+ ],
2496
+ "title": "EffortLevel",
2497
+ "type": "string"
2498
+ },
2499
+ "EllipsisGrant": {
2500
+ "additionalProperties": false,
2501
+ "description": "One grant entry: a level, optionally narrowed to instances whose\nnatural key (a file's name, a memory's path, a secret's name, a config's\nname, a session's id) matches any of the `match` globs.",
2502
+ "properties": {
2503
+ "level": {
2504
+ "$ref": "#/$defs/Level"
2505
+ },
2506
+ "match": {
2507
+ "anyOf": [
2508
+ {
2509
+ "items": {
2510
+ "type": "string"
2511
+ },
2512
+ "type": "array"
2513
+ },
2514
+ {
2515
+ "type": "null"
2516
+ }
2517
+ ],
2518
+ "default": null,
2519
+ "title": "Match"
2520
+ }
2521
+ },
2522
+ "required": [
2523
+ "level",
2524
+ "match"
2525
+ ],
2526
+ "title": "EllipsisGrant",
2527
+ "type": "object"
2528
+ },
2529
+ "ErrorFrame": {
2530
+ "description": "Terminal error marker, sent before the server closes with code 1011.",
2531
+ "properties": {
2532
+ "message": {
2533
+ "description": "A human-readable error message.",
2534
+ "title": "Message",
2535
+ "type": "string"
2536
+ },
2537
+ "type": {
2538
+ "const": "error",
2539
+ "default": "error",
2540
+ "title": "Type",
2541
+ "type": "string"
2542
+ }
2543
+ },
2544
+ "required": [
2545
+ "message",
2546
+ "type"
2547
+ ],
2548
+ "title": "ErrorFrame",
2549
+ "type": "object"
2550
+ },
2551
+ "GithubAccountFilter": {
2552
+ "anyOf": [
2553
+ {
2554
+ "additionalProperties": false,
2555
+ "description": "One include-minus-exclude set of GitHub accounts: an account matches iff\nit is in `include` (`true` = all, a list = exactly those, `false`/`[]` =\nnone) AND not in `exclude`. A bare bool or list is shorthand for `include`,\nso `users: true` and `users: [priya-shah]` both parse.",
2556
+ "properties": {
2557
+ "exclude": {
2558
+ "default": [],
2559
+ "items": {
2560
+ "type": "string"
2561
+ },
2562
+ "title": "Exclude",
2563
+ "type": "array"
2564
+ },
2565
+ "include": {
2566
+ "anyOf": [
2567
+ {
2568
+ "items": {
2569
+ "type": "string"
2570
+ },
2571
+ "type": "array"
2572
+ },
2573
+ {
2574
+ "type": "boolean"
2575
+ }
2576
+ ],
2577
+ "default": true,
2578
+ "title": "Include"
2579
+ }
2580
+ },
2581
+ "title": "GithubAccountFilter",
2582
+ "type": "object"
2583
+ },
2584
+ {
2585
+ "type": "boolean"
2586
+ },
2587
+ {
2588
+ "items": {
2589
+ "type": "string"
2590
+ },
2591
+ "type": "array"
2592
+ }
2593
+ ]
2594
+ },
2595
+ "GithubAccountSelector": {
2596
+ "additionalProperties": false,
2597
+ "description": "A selector of GitHub accounts \u2014 the `for:` audience gate on react\nsurfaces and code review pipelines, classified on the stable entity author\n(the pusher for `push`, the PR author for a review). `users` selects human\naccounts, `bots` selects bot accounts; each is a `GithubAccountFilter`\n(include minus exclude, with bare bool/list shorthand).",
2598
+ "properties": {
2599
+ "bots": {
2600
+ "$ref": "#/$defs/GithubAccountFilter"
2601
+ },
2602
+ "users": {
2603
+ "$ref": "#/$defs/GithubAccountFilter"
2604
+ }
2605
+ },
2606
+ "required": [
2607
+ "bots",
2608
+ "users"
2609
+ ],
2610
+ "title": "GithubAccountSelector",
2611
+ "type": "object"
2612
+ },
2613
+ "GithubAccountSnippet": {
2614
+ "description": "Sometimes the GitHub API returns a user of github (can include bots)\nusing this snippet instead of the full GithubAccount model. One example,\nis when the API returns a pull request.\n\nThis is the least amount of info we need to represent a GitHub account.",
2615
+ "properties": {
2616
+ "avatar_url": {
2617
+ "title": "Avatar Url",
2618
+ "type": "string"
2619
+ },
2620
+ "id": {
2621
+ "title": "Id",
2622
+ "type": "integer"
2623
+ },
2624
+ "login": {
2625
+ "title": "Login",
2626
+ "type": "string"
2627
+ },
2628
+ "type": {
2629
+ "$ref": "#/$defs/GithubAccountType"
2630
+ }
2631
+ },
2632
+ "required": [
2633
+ "avatar_url",
2634
+ "id",
2635
+ "login",
2636
+ "type"
2637
+ ],
2638
+ "title": "GithubAccountSnippet",
2639
+ "type": "object"
2640
+ },
2641
+ "GithubAccountType": {
2642
+ "enum": [
2643
+ "User",
2644
+ "Organization",
2645
+ "Bot",
2646
+ "Mannequin"
2647
+ ],
2648
+ "title": "GithubAccountType",
2649
+ "type": "string"
2650
+ },
2651
+ "Harness": {
2652
+ "enum": [
2653
+ "claude_code",
2654
+ "codex"
2655
+ ],
2656
+ "title": "Harness",
2657
+ "type": "string"
2658
+ },
2659
+ "HeartbeatFrame": {
2660
+ "description": "A keepalive sent after a period of idleness; doubles as the dead-socket\nprobe. Clients should treat roughly twice the heartbeat interval of\nsilence as a dead connection.",
2661
+ "properties": {
2662
+ "ts": {
2663
+ "description": "Server time when the heartbeat was sent.",
2664
+ "format": "date-time",
2665
+ "title": "Ts",
2666
+ "type": "string"
2667
+ },
2668
+ "type": {
2669
+ "const": "heartbeat",
2670
+ "default": "heartbeat",
2671
+ "title": "Type",
2672
+ "type": "string"
2673
+ }
2674
+ },
2675
+ "required": [
2676
+ "ts",
2677
+ "type"
2678
+ ],
2679
+ "title": "HeartbeatFrame",
2680
+ "type": "object"
2681
+ },
2682
+ "IssueAction": {
2683
+ "enum": [
2684
+ "opened",
2685
+ "closed",
2686
+ "commented"
2687
+ ],
1545
2688
  "title": "IssueAction",
1546
2689
  "type": "string"
1547
2690
  },
1548
- "Level": {
1549
- "description": "What may be done to a resource. Strictly ordered: a grant at one level\nincludes every level below it (write-only would be a phantom capability \u2014\nno real client can create what it cannot read back).",
1550
- "enum": [
1551
- "read",
1552
- "write",
1553
- "delete"
2691
+ "Level": {
2692
+ "description": "What may be done to a resource. Strictly ordered: a grant at one level\nincludes every level below it (write-only would be a phantom capability \u2014\nno real client can create what it cannot read back).",
2693
+ "enum": [
2694
+ "read",
2695
+ "write",
2696
+ "delete"
2697
+ ],
2698
+ "title": "Level",
2699
+ "type": "string"
2700
+ },
2701
+ "LifecycleSessionRecord": {
2702
+ "description": "A controller-emitted platform notification (source=lifecycle). The\npayload shape is keyed by `record_type` \u2014 see lifecycle.schema.json.",
2703
+ "properties": {
2704
+ "agent_turn_id": {
2705
+ "anyOf": [
2706
+ {
2707
+ "type": "string"
2708
+ },
2709
+ {
2710
+ "type": "null"
2711
+ }
2712
+ ],
2713
+ "default": null,
2714
+ "description": "Identifier of the turn the record belongs to, if any.",
2715
+ "title": "Agent Turn Id"
2716
+ },
2717
+ "cost": {
2718
+ "anyOf": [
2719
+ {
2720
+ "type": "integer"
2721
+ },
2722
+ {
2723
+ "type": "null"
2724
+ }
2725
+ ],
2726
+ "default": null,
2727
+ "description": "Cost attributed to this record, if any.",
2728
+ "title": "Cost"
2729
+ },
2730
+ "created_at": {
2731
+ "description": "When the record was created.",
2732
+ "format": "date-time",
2733
+ "title": "Created At",
2734
+ "type": "string"
2735
+ },
2736
+ "duration": {
2737
+ "anyOf": [
2738
+ {
2739
+ "type": "integer"
2740
+ },
2741
+ {
2742
+ "type": "null"
2743
+ }
2744
+ ],
2745
+ "default": null,
2746
+ "description": "Duration attributed to this record, if any.",
2747
+ "title": "Duration"
2748
+ },
2749
+ "feed_seq": {
2750
+ "description": "The record's position in the session's ordered feed \u2014 the resume cursor for the stream and the records endpoints.",
2751
+ "title": "Feed Seq",
2752
+ "type": "integer"
2753
+ },
2754
+ "id": {
2755
+ "description": "Unique identifier of the record.",
2756
+ "title": "Id",
2757
+ "type": "string"
2758
+ },
2759
+ "model": {
2760
+ "anyOf": [
2761
+ {
2762
+ "type": "string"
2763
+ },
2764
+ {
2765
+ "type": "null"
2766
+ }
2767
+ ],
2768
+ "default": null,
2769
+ "description": "The model that produced this record, if any.",
2770
+ "title": "Model"
2771
+ },
2772
+ "payload": {
2773
+ "additionalProperties": true,
2774
+ "description": "The lifecycle payload; its shape is keyed by record_type.",
2775
+ "title": "Payload",
2776
+ "type": "object"
2777
+ },
2778
+ "record_format": {
2779
+ "const": "ellipsis_lifecycle@1",
2780
+ "default": "ellipsis_lifecycle@1",
2781
+ "title": "Record Format",
2782
+ "type": "string"
2783
+ },
2784
+ "record_type": {
2785
+ "description": "The record's type within its format.",
2786
+ "title": "Record Type",
2787
+ "type": "string"
2788
+ },
2789
+ "session_id": {
2790
+ "description": "Identifier of the session the record belongs to.",
2791
+ "title": "Session Id",
2792
+ "type": "string"
2793
+ },
2794
+ "session_message_id": {
2795
+ "anyOf": [
2796
+ {
2797
+ "type": "string"
2798
+ },
2799
+ {
2800
+ "type": "null"
2801
+ }
2802
+ ],
2803
+ "default": null,
2804
+ "description": "Correlates a user-echo record back to the session message it echoes, so clients can retire queued messages by id.",
2805
+ "title": "Session Message Id"
2806
+ },
2807
+ "source": {
2808
+ "description": "Who wrote the record. Open vocabulary: ignore records with unknown sources.",
2809
+ "type": "string"
2810
+ },
2811
+ "stream_seq": {
2812
+ "description": "The record's position within its execution's stream.",
2813
+ "title": "Stream Seq",
2814
+ "type": "integer"
2815
+ },
2816
+ "tokens_info": {
2817
+ "anyOf": [
2818
+ {
2819
+ "$ref": "#/$defs/TokensInfo"
2820
+ },
2821
+ {
2822
+ "type": "null"
2823
+ }
2824
+ ],
2825
+ "default": null,
2826
+ "description": "Token usage reported for this record, if any."
2827
+ },
2828
+ "tools": {
2829
+ "anyOf": [
2830
+ {
2831
+ "items": {
2832
+ "type": "string"
2833
+ },
2834
+ "type": "array"
2835
+ },
2836
+ {
2837
+ "type": "null"
2838
+ }
2839
+ ],
2840
+ "default": null,
2841
+ "description": "Names of the tools used in this record, if any.",
2842
+ "title": "Tools"
2843
+ }
2844
+ },
2845
+ "required": [
2846
+ "agent_turn_id",
2847
+ "cost",
2848
+ "created_at",
2849
+ "duration",
2850
+ "feed_seq",
2851
+ "id",
2852
+ "model",
2853
+ "payload",
2854
+ "record_format",
2855
+ "record_type",
2856
+ "session_id",
2857
+ "session_message_id",
2858
+ "source",
2859
+ "stream_seq",
2860
+ "tokens_info",
2861
+ "tools"
2862
+ ],
2863
+ "title": "LifecycleSessionRecord",
2864
+ "type": "object"
2865
+ },
2866
+ "LinearIssueAction": {
2867
+ "enum": [
2868
+ "opened"
2869
+ ],
2870
+ "title": "LinearIssueAction",
2871
+ "type": "string"
2872
+ },
2873
+ "ParentKind": {
2874
+ "description": "How a session relates to its predecessor (parent_agent_session_id) \u2014\nthe ONE \"preceded-by\" chain for every predecessor relationship. Routing\nreads this when the distinction matters.\n\nCONTINUATION \u2014 a follow-up in the same conversation surface (e.g. a Slack\nthread reply spawning a fresh session on the same thread).\nRESUME \u2014 a conversation re-hosted on a new box after its sandbox was torn\ndown (interactive platform; later phase).",
2875
+ "enum": [
2876
+ "continuation",
2877
+ "resume"
2878
+ ],
2879
+ "title": "ParentKind",
2880
+ "type": "string"
2881
+ },
2882
+ "PromptBlockedReason": {
2883
+ "description": "Why direct prompting is refused. Absent when prompting is allowed.",
2884
+ "enum": [
2885
+ "mention_surface",
2886
+ "ephemeral_trigger",
2887
+ "non_interactive",
2888
+ "harness_single_turn",
2889
+ "closed"
2890
+ ],
2891
+ "title": "PromptBlockedReason",
2892
+ "type": "string"
2893
+ },
2894
+ "PullRequestAction": {
2895
+ "enum": [
2896
+ "opened",
2897
+ "pushed",
2898
+ "merged",
2899
+ "closed",
2900
+ "review_submitted",
2901
+ "commented"
2902
+ ],
2903
+ "title": "PullRequestAction",
2904
+ "type": "string"
2905
+ },
2906
+ "ReactIssue": {
2907
+ "additionalProperties": false,
2908
+ "properties": {
2909
+ "for": {
2910
+ "$ref": "#/$defs/GithubAccountSelector"
2911
+ },
2912
+ "labels": {
2913
+ "default": [],
2914
+ "items": {
2915
+ "type": "string"
2916
+ },
2917
+ "title": "Labels",
2918
+ "type": "array"
2919
+ },
2920
+ "on": {
2921
+ "items": {
2922
+ "$ref": "#/$defs/IssueAction"
2923
+ },
2924
+ "title": "On",
2925
+ "type": "array"
2926
+ },
2927
+ "repositories": {
2928
+ "$ref": "#/$defs/RepositoryFilter"
2929
+ }
2930
+ },
2931
+ "required": [
2932
+ "for",
2933
+ "labels",
2934
+ "on",
2935
+ "repositories"
2936
+ ],
2937
+ "title": "ReactIssue",
2938
+ "type": "object"
2939
+ },
2940
+ "ReactLinearIssue": {
2941
+ "additionalProperties": false,
2942
+ "properties": {
2943
+ "for": {
2944
+ "$ref": "#/$defs/GithubAccountSelector"
2945
+ },
2946
+ "on": {
2947
+ "default": [
2948
+ "opened"
2949
+ ],
2950
+ "items": {
2951
+ "$ref": "#/$defs/LinearIssueAction"
2952
+ },
2953
+ "title": "On",
2954
+ "type": "array"
2955
+ }
2956
+ },
2957
+ "required": [
2958
+ "for",
2959
+ "on"
2960
+ ],
2961
+ "title": "ReactLinearIssue",
2962
+ "type": "object"
2963
+ },
2964
+ "ReactPullRequest": {
2965
+ "additionalProperties": false,
2966
+ "properties": {
2967
+ "base": {
2968
+ "default": [],
2969
+ "items": {
2970
+ "type": "string"
2971
+ },
2972
+ "title": "Base",
2973
+ "type": "array"
2974
+ },
2975
+ "draft": {
2976
+ "anyOf": [
2977
+ {
2978
+ "type": "boolean"
2979
+ },
2980
+ {
2981
+ "type": "null"
2982
+ }
2983
+ ],
2984
+ "default": null,
2985
+ "title": "Draft"
2986
+ },
2987
+ "for": {
2988
+ "$ref": "#/$defs/GithubAccountSelector"
2989
+ },
2990
+ "head": {
2991
+ "default": [],
2992
+ "items": {
2993
+ "type": "string"
2994
+ },
2995
+ "title": "Head",
2996
+ "type": "array"
2997
+ },
2998
+ "labels": {
2999
+ "default": [],
3000
+ "items": {
3001
+ "type": "string"
3002
+ },
3003
+ "title": "Labels",
3004
+ "type": "array"
3005
+ },
3006
+ "on": {
3007
+ "items": {
3008
+ "$ref": "#/$defs/PullRequestAction"
3009
+ },
3010
+ "title": "On",
3011
+ "type": "array"
3012
+ },
3013
+ "paths": {
3014
+ "default": [],
3015
+ "items": {
3016
+ "type": "string"
3017
+ },
3018
+ "title": "Paths",
3019
+ "type": "array"
3020
+ },
3021
+ "repositories": {
3022
+ "$ref": "#/$defs/RepositoryFilter"
3023
+ }
3024
+ },
3025
+ "required": [
3026
+ "base",
3027
+ "draft",
3028
+ "for",
3029
+ "head",
3030
+ "labels",
3031
+ "on",
3032
+ "paths",
3033
+ "repositories"
3034
+ ],
3035
+ "title": "ReactPullRequest",
3036
+ "type": "object"
3037
+ },
3038
+ "ReactPush": {
3039
+ "additionalProperties": false,
3040
+ "properties": {
3041
+ "branch": {
3042
+ "default": [],
3043
+ "items": {
3044
+ "type": "string"
3045
+ },
3046
+ "title": "Branch",
3047
+ "type": "array"
3048
+ },
3049
+ "for": {
3050
+ "$ref": "#/$defs/GithubAccountSelector"
3051
+ },
3052
+ "paths": {
3053
+ "default": [],
3054
+ "items": {
3055
+ "type": "string"
3056
+ },
3057
+ "title": "Paths",
3058
+ "type": "array"
3059
+ },
3060
+ "repositories": {
3061
+ "$ref": "#/$defs/RepositoryFilter"
3062
+ }
3063
+ },
3064
+ "required": [
3065
+ "branch",
3066
+ "for",
3067
+ "paths",
3068
+ "repositories"
3069
+ ],
3070
+ "title": "ReactPush",
3071
+ "type": "object"
3072
+ },
3073
+ "ReactSentry": {
3074
+ "additionalProperties": false,
3075
+ "properties": {
3076
+ "on": {
3077
+ "items": {
3078
+ "$ref": "#/$defs/SentryAction"
3079
+ },
3080
+ "title": "On",
3081
+ "type": "array"
3082
+ },
3083
+ "projects": {
3084
+ "default": [],
3085
+ "items": {
3086
+ "type": "string"
3087
+ },
3088
+ "title": "Projects",
3089
+ "type": "array"
3090
+ }
3091
+ },
3092
+ "required": [
3093
+ "on",
3094
+ "projects"
3095
+ ],
3096
+ "title": "ReactSentry",
3097
+ "type": "object"
3098
+ },
3099
+ "ReactSlackChannel": {
3100
+ "additionalProperties": false,
3101
+ "properties": {},
3102
+ "title": "ReactSlackChannel",
3103
+ "type": "object"
3104
+ },
3105
+ "RecordsAppendFrame": {
3106
+ "description": "Cursored append-only delivery of session records, ordered by feed_seq,\nfrom all sources. Every record in the frame advances the resume cursor \u2014\nincluding ones a client renders as nothing.",
3107
+ "properties": {
3108
+ "records": {
3109
+ "description": "New session records, ordered by feed_seq.",
3110
+ "items": {
3111
+ "description": "One session record, discriminated by record_format. The format token versions the payload shape: a payload change ships as a new token, never as a silently-widened schema.",
3112
+ "discriminator": {
3113
+ "mapping": {
3114
+ "claude_sdk@1": "#/$defs/ClaudeSessionRecord",
3115
+ "codex_jsonl@1": "#/$defs/CodexSessionRecord",
3116
+ "ellipsis_lifecycle@1": "#/$defs/LifecycleSessionRecord"
3117
+ },
3118
+ "propertyName": "record_format"
3119
+ },
3120
+ "oneOf": [
3121
+ {
3122
+ "$ref": "#/$defs/ClaudeSessionRecord"
3123
+ },
3124
+ {
3125
+ "$ref": "#/$defs/CodexSessionRecord"
3126
+ },
3127
+ {
3128
+ "$ref": "#/$defs/LifecycleSessionRecord"
3129
+ }
3130
+ ]
3131
+ },
3132
+ "title": "Records",
3133
+ "type": "array"
3134
+ },
3135
+ "type": {
3136
+ "const": "records_append",
3137
+ "default": "records_append",
3138
+ "title": "Type",
3139
+ "type": "string"
3140
+ }
3141
+ },
3142
+ "required": [
3143
+ "records",
3144
+ "type"
1554
3145
  ],
1555
- "title": "Level",
1556
- "type": "string"
3146
+ "title": "RecordsAppendFrame",
3147
+ "type": "object"
1557
3148
  },
1558
- "LinearIssueAction": {
3149
+ "RepositoryFilter": {
3150
+ "anyOf": [
3151
+ {
3152
+ "additionalProperties": false,
3153
+ "description": "The watch scope of a trigger, by repository name (owner defaults to the\naccount). Include minus exclude: `include: []` (the default) covers every\nrepository of the installation, so `exclude`-only means \"all except these\"\nand keeps covering repositories added to the org later. A bare list is\nshorthand for `include`.",
3154
+ "properties": {
3155
+ "exclude": {
3156
+ "default": [],
3157
+ "items": {
3158
+ "type": "string"
3159
+ },
3160
+ "title": "Exclude",
3161
+ "type": "array"
3162
+ },
3163
+ "include": {
3164
+ "default": [],
3165
+ "items": {
3166
+ "type": "string"
3167
+ },
3168
+ "title": "Include",
3169
+ "type": "array"
3170
+ }
3171
+ },
3172
+ "title": "RepositoryFilter",
3173
+ "type": "object"
3174
+ },
3175
+ {
3176
+ "items": {
3177
+ "type": "string"
3178
+ },
3179
+ "type": "array"
3180
+ }
3181
+ ]
3182
+ },
3183
+ "Resource": {
3184
+ "description": "Everything a credential can be granted access to, one value per /v1\nresource family. `TOKENS` is reserved for the future token-management\nroutes; nothing maps to it yet.",
1559
3185
  "enum": [
1560
- "opened"
3186
+ "account",
3187
+ "alerts",
3188
+ "sessions",
3189
+ "files",
3190
+ "memories",
3191
+ "reviews",
3192
+ "configs",
3193
+ "defaults",
3194
+ "secrets",
3195
+ "templates",
3196
+ "integrations",
3197
+ "tokens"
1561
3198
  ],
1562
- "title": "LinearIssueAction",
3199
+ "title": "Resource",
1563
3200
  "type": "string"
1564
3201
  },
1565
- "ParentKind": {
1566
- "description": "How a session relates to its predecessor (parent_agent_session_id) \u2014\nthe ONE \"preceded-by\" chain for every predecessor relationship. Routing\nreads this when the distinction matters.\n\nCONTINUATION \u2014 a follow-up in the same conversation surface (e.g. a Slack\nthread reply spawning a fresh session on the same thread).\nRESUME \u2014 a conversation re-hosted on a new box after its sandbox was torn\ndown (interactive platform; later phase).",
3202
+ "RunStatus": {
3203
+ "description": "What the current (or most recent) execution is doing (backs `run`).",
1567
3204
  "enum": [
1568
- "continuation",
1569
- "resume"
3205
+ "scheduled",
3206
+ "starting",
3207
+ "working",
3208
+ "waiting",
3209
+ "done",
3210
+ "failed",
3211
+ "stopped",
3212
+ "cancelled",
3213
+ "retrying"
1570
3214
  ],
1571
- "title": "ParentKind",
3215
+ "title": "RunStatus",
1572
3216
  "type": "string"
1573
3217
  },
1574
- "PromptBlockedReason": {
1575
- "description": "Why direct prompting is refused. Absent when prompting is allowed.",
1576
- "enum": [
1577
- "mention_surface",
1578
- "ephemeral_trigger",
1579
- "non_interactive",
1580
- "harness_single_turn",
1581
- "closed"
3218
+ "SdkAssistantRecord": {
3219
+ "properties": {
3220
+ "cache_creation": {
3221
+ "anyOf": [
3222
+ {
3223
+ "$ref": "#/$defs/SdkCacheCreation"
3224
+ },
3225
+ {
3226
+ "type": "null"
3227
+ }
3228
+ ],
3229
+ "default": null
3230
+ },
3231
+ "content": {
3232
+ "default": [],
3233
+ "items": {
3234
+ "discriminator": {
3235
+ "mapping": {
3236
+ "server_tool_result": "#/$defs/SdkServerToolResultBlock",
3237
+ "server_tool_use": "#/$defs/SdkServerToolUseBlock",
3238
+ "text": "#/$defs/SdkTextBlock",
3239
+ "thinking": "#/$defs/SdkThinkingBlock",
3240
+ "tool_result": "#/$defs/SdkToolResultBlock",
3241
+ "tool_use": "#/$defs/SdkToolUseBlock"
3242
+ },
3243
+ "propertyName": "type"
3244
+ },
3245
+ "oneOf": [
3246
+ {
3247
+ "$ref": "#/$defs/SdkTextBlock"
3248
+ },
3249
+ {
3250
+ "$ref": "#/$defs/SdkThinkingBlock"
3251
+ },
3252
+ {
3253
+ "$ref": "#/$defs/SdkToolUseBlock"
3254
+ },
3255
+ {
3256
+ "$ref": "#/$defs/SdkToolResultBlock"
3257
+ },
3258
+ {
3259
+ "$ref": "#/$defs/SdkServerToolUseBlock"
3260
+ },
3261
+ {
3262
+ "$ref": "#/$defs/SdkServerToolResultBlock"
3263
+ }
3264
+ ]
3265
+ },
3266
+ "title": "Content",
3267
+ "type": "array"
3268
+ },
3269
+ "error": {
3270
+ "anyOf": [
3271
+ {
3272
+ "type": "string"
3273
+ },
3274
+ {
3275
+ "type": "null"
3276
+ }
3277
+ ],
3278
+ "default": null,
3279
+ "title": "Error"
3280
+ },
3281
+ "kind": {
3282
+ "const": "assistant",
3283
+ "default": "assistant",
3284
+ "title": "Kind",
3285
+ "type": "string"
3286
+ },
3287
+ "message_id": {
3288
+ "anyOf": [
3289
+ {
3290
+ "type": "string"
3291
+ },
3292
+ {
3293
+ "type": "null"
3294
+ }
3295
+ ],
3296
+ "default": null,
3297
+ "title": "Message Id"
3298
+ },
3299
+ "model": {
3300
+ "title": "Model",
3301
+ "type": "string"
3302
+ },
3303
+ "parent_tool_use_id": {
3304
+ "anyOf": [
3305
+ {
3306
+ "type": "string"
3307
+ },
3308
+ {
3309
+ "type": "null"
3310
+ }
3311
+ ],
3312
+ "default": null,
3313
+ "title": "Parent Tool Use Id"
3314
+ },
3315
+ "session_id": {
3316
+ "anyOf": [
3317
+ {
3318
+ "type": "string"
3319
+ },
3320
+ {
3321
+ "type": "null"
3322
+ }
3323
+ ],
3324
+ "default": null,
3325
+ "title": "Session Id"
3326
+ },
3327
+ "stop_reason": {
3328
+ "anyOf": [
3329
+ {
3330
+ "type": "string"
3331
+ },
3332
+ {
3333
+ "type": "null"
3334
+ }
3335
+ ],
3336
+ "default": null,
3337
+ "title": "Stop Reason"
3338
+ },
3339
+ "usage": {
3340
+ "anyOf": [
3341
+ {
3342
+ "$ref": "#/$defs/TokensInfo"
3343
+ },
3344
+ {
3345
+ "type": "null"
3346
+ }
3347
+ ],
3348
+ "default": null
3349
+ },
3350
+ "uuid": {
3351
+ "anyOf": [
3352
+ {
3353
+ "type": "string"
3354
+ },
3355
+ {
3356
+ "type": "null"
3357
+ }
3358
+ ],
3359
+ "default": null,
3360
+ "title": "Uuid"
3361
+ }
3362
+ },
3363
+ "required": [
3364
+ "cache_creation",
3365
+ "content",
3366
+ "error",
3367
+ "kind",
3368
+ "message_id",
3369
+ "model",
3370
+ "parent_tool_use_id",
3371
+ "session_id",
3372
+ "stop_reason",
3373
+ "usage",
3374
+ "uuid"
1582
3375
  ],
1583
- "title": "PromptBlockedReason",
1584
- "type": "string"
3376
+ "title": "SdkAssistantRecord",
3377
+ "type": "object"
1585
3378
  },
1586
- "PullRequestAction": {
1587
- "enum": [
1588
- "opened",
1589
- "pushed",
1590
- "merged",
1591
- "closed",
1592
- "review_submitted",
1593
- "commented"
3379
+ "SdkCacheCreation": {
3380
+ "additionalProperties": false,
3381
+ "description": "The cache-write breakdown by TTL. Load-bearing for billing, not\ninformational: the 5m and 1h lanes have different rate-card prices\n(`normalized_usage_from_anthropic`), so collapsing them into one\n`cache_creation_input_tokens` total silently misprices every session with 1h\ncaching on.",
3382
+ "properties": {
3383
+ "ephemeral_1h_input_tokens": {
3384
+ "default": 0,
3385
+ "title": "Ephemeral 1H Input Tokens",
3386
+ "type": "integer"
3387
+ },
3388
+ "ephemeral_5m_input_tokens": {
3389
+ "default": 0,
3390
+ "title": "Ephemeral 5M Input Tokens",
3391
+ "type": "integer"
3392
+ }
3393
+ },
3394
+ "required": [
3395
+ "ephemeral_1h_input_tokens",
3396
+ "ephemeral_5m_input_tokens"
1594
3397
  ],
1595
- "title": "PullRequestAction",
1596
- "type": "string"
3398
+ "title": "SdkCacheCreation",
3399
+ "type": "object"
1597
3400
  },
1598
- "ReactIssue": {
1599
- "additionalProperties": false,
3401
+ "SdkRateLimitRecord": {
1600
3402
  "properties": {
1601
- "for": {
1602
- "$ref": "#/$defs/GithubAccountSelector"
3403
+ "kind": {
3404
+ "const": "rate_limit",
3405
+ "default": "rate_limit",
3406
+ "title": "Kind",
3407
+ "type": "string"
1603
3408
  },
1604
- "labels": {
1605
- "default": [],
1606
- "items": {
1607
- "type": "string"
1608
- },
1609
- "title": "Labels",
1610
- "type": "array"
3409
+ "rate_limit_type": {
3410
+ "anyOf": [
3411
+ {
3412
+ "type": "string"
3413
+ },
3414
+ {
3415
+ "type": "null"
3416
+ }
3417
+ ],
3418
+ "default": null,
3419
+ "title": "Rate Limit Type"
1611
3420
  },
1612
- "on": {
1613
- "items": {
1614
- "$ref": "#/$defs/IssueAction"
1615
- },
1616
- "title": "On",
1617
- "type": "array"
3421
+ "resets_at": {
3422
+ "anyOf": [
3423
+ {
3424
+ "type": "integer"
3425
+ },
3426
+ {
3427
+ "type": "null"
3428
+ }
3429
+ ],
3430
+ "default": null,
3431
+ "title": "Resets At"
1618
3432
  },
1619
- "repositories": {
1620
- "$ref": "#/$defs/RepositoryFilter"
3433
+ "session_id": {
3434
+ "anyOf": [
3435
+ {
3436
+ "type": "string"
3437
+ },
3438
+ {
3439
+ "type": "null"
3440
+ }
3441
+ ],
3442
+ "default": null,
3443
+ "title": "Session Id"
3444
+ },
3445
+ "status": {
3446
+ "title": "Status",
3447
+ "type": "string"
3448
+ },
3449
+ "utilization": {
3450
+ "anyOf": [
3451
+ {
3452
+ "type": "number"
3453
+ },
3454
+ {
3455
+ "type": "null"
3456
+ }
3457
+ ],
3458
+ "default": null,
3459
+ "title": "Utilization"
3460
+ },
3461
+ "uuid": {
3462
+ "anyOf": [
3463
+ {
3464
+ "type": "string"
3465
+ },
3466
+ {
3467
+ "type": "null"
3468
+ }
3469
+ ],
3470
+ "default": null,
3471
+ "title": "Uuid"
1621
3472
  }
1622
3473
  },
1623
3474
  "required": [
1624
- "for",
1625
- "labels",
1626
- "on",
1627
- "repositories"
3475
+ "kind",
3476
+ "rate_limit_type",
3477
+ "resets_at",
3478
+ "session_id",
3479
+ "status",
3480
+ "utilization",
3481
+ "uuid"
1628
3482
  ],
1629
- "title": "ReactIssue",
3483
+ "title": "SdkRateLimitRecord",
1630
3484
  "type": "object"
1631
3485
  },
1632
- "ReactLinearIssue": {
1633
- "additionalProperties": false,
3486
+ "SdkResultRecord": {
3487
+ "description": "One turn's terminal record: the SDK's `ResultMessage`. `usage` and\n`cost_usd` here are the turn totals the worker prices from.",
1634
3488
  "properties": {
1635
- "for": {
1636
- "$ref": "#/$defs/GithubAccountSelector"
3489
+ "api_error_status": {
3490
+ "anyOf": [
3491
+ {
3492
+ "type": "integer"
3493
+ },
3494
+ {
3495
+ "type": "null"
3496
+ }
3497
+ ],
3498
+ "default": null,
3499
+ "title": "Api Error Status"
1637
3500
  },
1638
- "on": {
1639
- "default": [
1640
- "opened"
3501
+ "cost_usd": {
3502
+ "anyOf": [
3503
+ {
3504
+ "type": "number"
3505
+ },
3506
+ {
3507
+ "type": "null"
3508
+ }
1641
3509
  ],
1642
- "items": {
1643
- "$ref": "#/$defs/LinearIssueAction"
1644
- },
1645
- "title": "On",
1646
- "type": "array"
3510
+ "default": null,
3511
+ "title": "Cost Usd"
3512
+ },
3513
+ "duration_api_ms": {
3514
+ "title": "Duration Api Ms",
3515
+ "type": "integer"
3516
+ },
3517
+ "duration_ms": {
3518
+ "title": "Duration Ms",
3519
+ "type": "integer"
3520
+ },
3521
+ "errors": {
3522
+ "anyOf": [
3523
+ {
3524
+ "items": {
3525
+ "type": "string"
3526
+ },
3527
+ "type": "array"
3528
+ },
3529
+ {
3530
+ "type": "null"
3531
+ }
3532
+ ],
3533
+ "default": null,
3534
+ "title": "Errors"
3535
+ },
3536
+ "is_error": {
3537
+ "title": "Is Error",
3538
+ "type": "boolean"
3539
+ },
3540
+ "kind": {
3541
+ "const": "result",
3542
+ "default": "result",
3543
+ "title": "Kind",
3544
+ "type": "string"
3545
+ },
3546
+ "model_usage": {
3547
+ "anyOf": [
3548
+ {
3549
+ "additionalProperties": true,
3550
+ "type": "object"
3551
+ },
3552
+ {
3553
+ "type": "null"
3554
+ }
3555
+ ],
3556
+ "default": null,
3557
+ "title": "Model Usage"
3558
+ },
3559
+ "num_turns": {
3560
+ "title": "Num Turns",
3561
+ "type": "integer"
3562
+ },
3563
+ "result": {
3564
+ "anyOf": [
3565
+ {
3566
+ "type": "string"
3567
+ },
3568
+ {
3569
+ "type": "null"
3570
+ }
3571
+ ],
3572
+ "default": null,
3573
+ "title": "Result"
3574
+ },
3575
+ "session_id": {
3576
+ "anyOf": [
3577
+ {
3578
+ "type": "string"
3579
+ },
3580
+ {
3581
+ "type": "null"
3582
+ }
3583
+ ],
3584
+ "default": null,
3585
+ "title": "Session Id"
3586
+ },
3587
+ "stop_reason": {
3588
+ "anyOf": [
3589
+ {
3590
+ "type": "string"
3591
+ },
3592
+ {
3593
+ "type": "null"
3594
+ }
3595
+ ],
3596
+ "default": null,
3597
+ "title": "Stop Reason"
3598
+ },
3599
+ "structured_output": {
3600
+ "default": null,
3601
+ "title": "Structured Output"
3602
+ },
3603
+ "subtype": {
3604
+ "title": "Subtype",
3605
+ "type": "string"
3606
+ },
3607
+ "usage": {
3608
+ "anyOf": [
3609
+ {
3610
+ "$ref": "#/$defs/TokensInfo"
3611
+ },
3612
+ {
3613
+ "type": "null"
3614
+ }
3615
+ ],
3616
+ "default": null
3617
+ },
3618
+ "uuid": {
3619
+ "anyOf": [
3620
+ {
3621
+ "type": "string"
3622
+ },
3623
+ {
3624
+ "type": "null"
3625
+ }
3626
+ ],
3627
+ "default": null,
3628
+ "title": "Uuid"
1647
3629
  }
1648
3630
  },
1649
3631
  "required": [
1650
- "for",
1651
- "on"
3632
+ "api_error_status",
3633
+ "cost_usd",
3634
+ "duration_api_ms",
3635
+ "duration_ms",
3636
+ "errors",
3637
+ "is_error",
3638
+ "kind",
3639
+ "model_usage",
3640
+ "num_turns",
3641
+ "result",
3642
+ "session_id",
3643
+ "stop_reason",
3644
+ "structured_output",
3645
+ "subtype",
3646
+ "usage",
3647
+ "uuid"
3648
+ ],
3649
+ "title": "SdkResultRecord",
3650
+ "type": "object"
3651
+ },
3652
+ "SdkServerToolResultBlock": {
3653
+ "properties": {
3654
+ "content": {
3655
+ "additionalProperties": true,
3656
+ "default": {},
3657
+ "title": "Content",
3658
+ "type": "object"
3659
+ },
3660
+ "tool_use_id": {
3661
+ "title": "Tool Use Id",
3662
+ "type": "string"
3663
+ },
3664
+ "type": {
3665
+ "const": "server_tool_result",
3666
+ "default": "server_tool_result",
3667
+ "title": "Type",
3668
+ "type": "string"
3669
+ }
3670
+ },
3671
+ "required": [
3672
+ "content",
3673
+ "tool_use_id",
3674
+ "type"
3675
+ ],
3676
+ "title": "SdkServerToolResultBlock",
3677
+ "type": "object"
3678
+ },
3679
+ "SdkServerToolUseBlock": {
3680
+ "properties": {
3681
+ "id": {
3682
+ "title": "Id",
3683
+ "type": "string"
3684
+ },
3685
+ "input": {
3686
+ "additionalProperties": true,
3687
+ "default": {},
3688
+ "title": "Input",
3689
+ "type": "object"
3690
+ },
3691
+ "name": {
3692
+ "title": "Name",
3693
+ "type": "string"
3694
+ },
3695
+ "type": {
3696
+ "const": "server_tool_use",
3697
+ "default": "server_tool_use",
3698
+ "title": "Type",
3699
+ "type": "string"
3700
+ }
3701
+ },
3702
+ "required": [
3703
+ "id",
3704
+ "input",
3705
+ "name",
3706
+ "type"
1652
3707
  ],
1653
- "title": "ReactLinearIssue",
3708
+ "title": "SdkServerToolUseBlock",
1654
3709
  "type": "object"
1655
3710
  },
1656
- "ReactPullRequest": {
1657
- "additionalProperties": false,
3711
+ "SdkSystemRecord": {
3712
+ "description": "Everything the CLI reports out-of-band: init, compact_boundary, task\nlifecycle, hook events, api_error. `data` is the raw payload \u2014 this is the\none open shape in the schema, because the CLI's system subtypes are an\nopen set we do not want to fail a session over.",
1658
3713
  "properties": {
1659
- "base": {
1660
- "default": [],
1661
- "items": {
1662
- "type": "string"
1663
- },
1664
- "title": "Base",
1665
- "type": "array"
3714
+ "data": {
3715
+ "additionalProperties": true,
3716
+ "default": {},
3717
+ "title": "Data",
3718
+ "type": "object"
1666
3719
  },
1667
- "draft": {
3720
+ "kind": {
3721
+ "const": "system",
3722
+ "default": "system",
3723
+ "title": "Kind",
3724
+ "type": "string"
3725
+ },
3726
+ "session_id": {
1668
3727
  "anyOf": [
1669
3728
  {
1670
- "type": "boolean"
3729
+ "type": "string"
1671
3730
  },
1672
3731
  {
1673
3732
  "type": "null"
1674
3733
  }
1675
3734
  ],
1676
3735
  "default": null,
1677
- "title": "Draft"
1678
- },
1679
- "for": {
1680
- "$ref": "#/$defs/GithubAccountSelector"
1681
- },
1682
- "head": {
1683
- "default": [],
1684
- "items": {
1685
- "type": "string"
1686
- },
1687
- "title": "Head",
1688
- "type": "array"
1689
- },
1690
- "labels": {
1691
- "default": [],
1692
- "items": {
1693
- "type": "string"
1694
- },
1695
- "title": "Labels",
1696
- "type": "array"
1697
- },
1698
- "on": {
1699
- "items": {
1700
- "$ref": "#/$defs/PullRequestAction"
1701
- },
1702
- "title": "On",
1703
- "type": "array"
3736
+ "title": "Session Id"
1704
3737
  },
1705
- "paths": {
1706
- "default": [],
1707
- "items": {
1708
- "type": "string"
1709
- },
1710
- "title": "Paths",
1711
- "type": "array"
3738
+ "subtype": {
3739
+ "title": "Subtype",
3740
+ "type": "string"
1712
3741
  },
1713
- "repositories": {
1714
- "$ref": "#/$defs/RepositoryFilter"
3742
+ "uuid": {
3743
+ "anyOf": [
3744
+ {
3745
+ "type": "string"
3746
+ },
3747
+ {
3748
+ "type": "null"
3749
+ }
3750
+ ],
3751
+ "default": null,
3752
+ "title": "Uuid"
1715
3753
  }
1716
3754
  },
1717
3755
  "required": [
1718
- "base",
1719
- "draft",
1720
- "for",
1721
- "head",
1722
- "labels",
1723
- "on",
1724
- "paths",
1725
- "repositories"
3756
+ "data",
3757
+ "kind",
3758
+ "session_id",
3759
+ "subtype",
3760
+ "uuid"
1726
3761
  ],
1727
- "title": "ReactPullRequest",
3762
+ "title": "SdkSystemRecord",
1728
3763
  "type": "object"
1729
3764
  },
1730
- "ReactPush": {
1731
- "additionalProperties": false,
3765
+ "SdkTextBlock": {
1732
3766
  "properties": {
1733
- "branch": {
1734
- "default": [],
1735
- "items": {
1736
- "type": "string"
1737
- },
1738
- "title": "Branch",
1739
- "type": "array"
1740
- },
1741
- "for": {
1742
- "$ref": "#/$defs/GithubAccountSelector"
1743
- },
1744
- "paths": {
1745
- "default": [],
1746
- "items": {
1747
- "type": "string"
1748
- },
1749
- "title": "Paths",
1750
- "type": "array"
3767
+ "text": {
3768
+ "title": "Text",
3769
+ "type": "string"
1751
3770
  },
1752
- "repositories": {
1753
- "$ref": "#/$defs/RepositoryFilter"
3771
+ "type": {
3772
+ "const": "text",
3773
+ "default": "text",
3774
+ "title": "Type",
3775
+ "type": "string"
1754
3776
  }
1755
3777
  },
1756
3778
  "required": [
1757
- "branch",
1758
- "for",
1759
- "paths",
1760
- "repositories"
3779
+ "text",
3780
+ "type"
1761
3781
  ],
1762
- "title": "ReactPush",
3782
+ "title": "SdkTextBlock",
1763
3783
  "type": "object"
1764
3784
  },
1765
- "ReactSentry": {
1766
- "additionalProperties": false,
3785
+ "SdkThinkingBlock": {
1767
3786
  "properties": {
1768
- "on": {
1769
- "items": {
1770
- "$ref": "#/$defs/SentryAction"
1771
- },
1772
- "title": "On",
1773
- "type": "array"
3787
+ "signature": {
3788
+ "title": "Signature",
3789
+ "type": "string"
1774
3790
  },
1775
- "projects": {
1776
- "default": [],
1777
- "items": {
1778
- "type": "string"
1779
- },
1780
- "title": "Projects",
1781
- "type": "array"
3791
+ "thinking": {
3792
+ "title": "Thinking",
3793
+ "type": "string"
3794
+ },
3795
+ "type": {
3796
+ "const": "thinking",
3797
+ "default": "thinking",
3798
+ "title": "Type",
3799
+ "type": "string"
1782
3800
  }
1783
3801
  },
1784
3802
  "required": [
1785
- "on",
1786
- "projects"
3803
+ "signature",
3804
+ "thinking",
3805
+ "type"
1787
3806
  ],
1788
- "title": "ReactSentry",
3807
+ "title": "SdkThinkingBlock",
1789
3808
  "type": "object"
1790
3809
  },
1791
- "ReactSlackChannel": {
1792
- "additionalProperties": false,
1793
- "properties": {},
1794
- "title": "ReactSlackChannel",
3810
+ "SdkToolResultBlock": {
3811
+ "properties": {
3812
+ "content": {
3813
+ "anyOf": [
3814
+ {
3815
+ "type": "string"
3816
+ },
3817
+ {
3818
+ "items": {
3819
+ "additionalProperties": true,
3820
+ "type": "object"
3821
+ },
3822
+ "type": "array"
3823
+ },
3824
+ {
3825
+ "type": "null"
3826
+ }
3827
+ ],
3828
+ "default": null,
3829
+ "title": "Content"
3830
+ },
3831
+ "is_error": {
3832
+ "anyOf": [
3833
+ {
3834
+ "type": "boolean"
3835
+ },
3836
+ {
3837
+ "type": "null"
3838
+ }
3839
+ ],
3840
+ "default": null,
3841
+ "title": "Is Error"
3842
+ },
3843
+ "tool_use_id": {
3844
+ "title": "Tool Use Id",
3845
+ "type": "string"
3846
+ },
3847
+ "type": {
3848
+ "const": "tool_result",
3849
+ "default": "tool_result",
3850
+ "title": "Type",
3851
+ "type": "string"
3852
+ }
3853
+ },
3854
+ "required": [
3855
+ "content",
3856
+ "is_error",
3857
+ "tool_use_id",
3858
+ "type"
3859
+ ],
3860
+ "title": "SdkToolResultBlock",
1795
3861
  "type": "object"
1796
3862
  },
1797
- "RecordsAppendFrame": {
1798
- "description": "Cursored append-only delivery of session records, ordered by feed_seq,\nfrom all sources. Every record in the frame advances the resume cursor \u2014\nincluding ones a client renders as nothing.",
3863
+ "SdkToolUseBlock": {
1799
3864
  "properties": {
1800
- "records": {
1801
- "description": "New session records, ordered by feed_seq.",
1802
- "items": {
1803
- "$ref": "#/$defs/SessionRecord"
1804
- },
1805
- "title": "Records",
1806
- "type": "array"
3865
+ "id": {
3866
+ "title": "Id",
3867
+ "type": "string"
3868
+ },
3869
+ "input": {
3870
+ "additionalProperties": true,
3871
+ "default": {},
3872
+ "title": "Input",
3873
+ "type": "object"
3874
+ },
3875
+ "name": {
3876
+ "title": "Name",
3877
+ "type": "string"
1807
3878
  },
1808
3879
  "type": {
1809
- "const": "records_append",
1810
- "default": "records_append",
3880
+ "const": "tool_use",
3881
+ "default": "tool_use",
1811
3882
  "title": "Type",
1812
3883
  "type": "string"
1813
3884
  }
1814
3885
  },
1815
3886
  "required": [
1816
- "records",
3887
+ "id",
3888
+ "input",
3889
+ "name",
1817
3890
  "type"
1818
3891
  ],
1819
- "title": "RecordsAppendFrame",
3892
+ "title": "SdkToolUseBlock",
1820
3893
  "type": "object"
1821
3894
  },
1822
- "RepositoryFilter": {
1823
- "anyOf": [
1824
- {
1825
- "additionalProperties": false,
1826
- "description": "The watch scope of a trigger, by repository name (owner defaults to the\naccount). Include minus exclude: `include: []` (the default) covers every\nrepository of the installation, so `exclude`-only means \"all except these\"\nand keeps covering repositories added to the org later. A bare list is\nshorthand for `include`.",
1827
- "properties": {
1828
- "exclude": {
1829
- "default": [],
1830
- "items": {
1831
- "type": "string"
1832
- },
1833
- "title": "Exclude",
1834
- "type": "array"
3895
+ "SdkUserRecord": {
3896
+ "properties": {
3897
+ "content": {
3898
+ "anyOf": [
3899
+ {
3900
+ "type": "string"
1835
3901
  },
1836
- "include": {
1837
- "default": [],
3902
+ {
1838
3903
  "items": {
1839
- "type": "string"
3904
+ "discriminator": {
3905
+ "mapping": {
3906
+ "server_tool_result": "#/$defs/SdkServerToolResultBlock",
3907
+ "server_tool_use": "#/$defs/SdkServerToolUseBlock",
3908
+ "text": "#/$defs/SdkTextBlock",
3909
+ "thinking": "#/$defs/SdkThinkingBlock",
3910
+ "tool_result": "#/$defs/SdkToolResultBlock",
3911
+ "tool_use": "#/$defs/SdkToolUseBlock"
3912
+ },
3913
+ "propertyName": "type"
3914
+ },
3915
+ "oneOf": [
3916
+ {
3917
+ "$ref": "#/$defs/SdkTextBlock"
3918
+ },
3919
+ {
3920
+ "$ref": "#/$defs/SdkThinkingBlock"
3921
+ },
3922
+ {
3923
+ "$ref": "#/$defs/SdkToolUseBlock"
3924
+ },
3925
+ {
3926
+ "$ref": "#/$defs/SdkToolResultBlock"
3927
+ },
3928
+ {
3929
+ "$ref": "#/$defs/SdkServerToolUseBlock"
3930
+ },
3931
+ {
3932
+ "$ref": "#/$defs/SdkServerToolResultBlock"
3933
+ }
3934
+ ]
1840
3935
  },
1841
- "title": "Include",
1842
3936
  "type": "array"
1843
3937
  }
1844
- },
1845
- "title": "RepositoryFilter",
1846
- "type": "object"
3938
+ ],
3939
+ "title": "Content"
3940
+ },
3941
+ "kind": {
3942
+ "const": "user",
3943
+ "default": "user",
3944
+ "title": "Kind",
3945
+ "type": "string"
3946
+ },
3947
+ "parent_tool_use_id": {
3948
+ "anyOf": [
3949
+ {
3950
+ "type": "string"
3951
+ },
3952
+ {
3953
+ "type": "null"
3954
+ }
3955
+ ],
3956
+ "default": null,
3957
+ "title": "Parent Tool Use Id"
1847
3958
  },
1848
- {
1849
- "items": {
1850
- "type": "string"
1851
- },
1852
- "type": "array"
3959
+ "uuid": {
3960
+ "anyOf": [
3961
+ {
3962
+ "type": "string"
3963
+ },
3964
+ {
3965
+ "type": "null"
3966
+ }
3967
+ ],
3968
+ "default": null,
3969
+ "title": "Uuid"
1853
3970
  }
1854
- ]
1855
- },
1856
- "Resource": {
1857
- "description": "Everything a credential can be granted access to, one value per /v1\nresource family. `TOKENS` is reserved for the future token-management\nroutes; nothing maps to it yet.",
1858
- "enum": [
1859
- "account",
1860
- "alerts",
1861
- "sessions",
1862
- "files",
1863
- "memories",
1864
- "reviews",
1865
- "configs",
1866
- "defaults",
1867
- "secrets",
1868
- "templates",
1869
- "integrations",
1870
- "tokens"
1871
- ],
1872
- "title": "Resource",
1873
- "type": "string"
1874
- },
1875
- "RunStatus": {
1876
- "description": "What the current (or most recent) execution is doing (backs `run`).",
1877
- "enum": [
1878
- "scheduled",
1879
- "starting",
1880
- "working",
1881
- "waiting",
1882
- "done",
1883
- "failed",
1884
- "stopped",
1885
- "cancelled",
1886
- "retrying"
3971
+ },
3972
+ "required": [
3973
+ "content",
3974
+ "kind",
3975
+ "parent_tool_use_id",
3976
+ "uuid"
1887
3977
  ],
1888
- "title": "RunStatus",
1889
- "type": "string"
3978
+ "title": "SdkUserRecord",
3979
+ "type": "object"
1890
3980
  },
1891
3981
  "SentryAction": {
1892
3982
  "enum": [
@@ -1992,6 +4082,18 @@
1992
4082
  "title": "Metadata",
1993
4083
  "type": "object"
1994
4084
  },
4085
+ "output_diff": {
4086
+ "anyOf": [
4087
+ {
4088
+ "$ref": "#/$defs/SessionDiff"
4089
+ },
4090
+ {
4091
+ "type": "null"
4092
+ }
4093
+ ],
4094
+ "default": null,
4095
+ "description": "Per-file line counts for the uncommitted changes in the session's workspace. Work the session committed is not included here \u2014 see output_prs. Null if no diff was ever captured."
4096
+ },
1995
4097
  "output_prs": {
1996
4098
  "anyOf": [
1997
4099
  {
@@ -2114,6 +4216,7 @@
2114
4216
  "last_activity_at",
2115
4217
  "last_message_at",
2116
4218
  "metadata",
4219
+ "output_diff",
2117
4220
  "output_prs",
2118
4221
  "parent",
2119
4222
  "prompt",
@@ -2294,6 +4397,57 @@
2294
4397
  "title": "SessionCost",
2295
4398
  "type": "object"
2296
4399
  },
4400
+ "SessionDiff": {
4401
+ "description": "The counts half of a session's working-tree diff, small enough to ride on\nagent_sessions and be returned by every session read. The patch text lives\nin `agent_session_diffs` and is fetched on demand.\n\nScope is UNCOMMITTED work only (`git diff HEAD`), so this answers \"is there\nunlanded work in this sandbox?\" \u2014 a session that committed and pushed shows\nno files here and its created PR instead.",
4402
+ "properties": {
4403
+ "files": {
4404
+ "items": {
4405
+ "$ref": "#/$defs/SessionDiffFile"
4406
+ },
4407
+ "title": "Files",
4408
+ "type": "array"
4409
+ }
4410
+ },
4411
+ "required": [
4412
+ "files"
4413
+ ],
4414
+ "title": "SessionDiff",
4415
+ "type": "object"
4416
+ },
4417
+ "SessionDiffFile": {
4418
+ "description": "One file's uncommitted change in a session's sandbox, as `git diff HEAD`\n--numstat reports it (with intent-to-add so new files count).",
4419
+ "properties": {
4420
+ "additions": {
4421
+ "title": "Additions",
4422
+ "type": "integer"
4423
+ },
4424
+ "deletions": {
4425
+ "title": "Deletions",
4426
+ "type": "integer"
4427
+ },
4428
+ "path": {
4429
+ "title": "Path",
4430
+ "type": "string"
4431
+ },
4432
+ "repo": {
4433
+ "title": "Repo",
4434
+ "type": "string"
4435
+ },
4436
+ "status": {
4437
+ "title": "Status",
4438
+ "type": "string"
4439
+ }
4440
+ },
4441
+ "required": [
4442
+ "additions",
4443
+ "deletions",
4444
+ "path",
4445
+ "repo",
4446
+ "status"
4447
+ ],
4448
+ "title": "SessionDiffFile",
4449
+ "type": "object"
4450
+ },
2297
4451
  "SessionExitStatus": {
2298
4452
  "description": "Why a terminal agent session ended \u2014 a finer-grained reason than `status`.\n\n`status` (SessionStatus) is the lifecycle state: COMPLETED / ERROR /\nCANCELLED. `exit_status` explains *why* a run reached that terminal state, so\nthe UI and metrics can tell a budget cutoff apart from a crashed tool call or\na deliberate cancellation. It is None until the run reaches a terminal state.",
2299
4453
  "enum": [
@@ -2629,170 +4783,6 @@
2629
4783
  "title": "SessionPrompting",
2630
4784
  "type": "object"
2631
4785
  },
2632
- "SessionRecord": {
2633
- "description": "One entry of a session's log: a stable envelope around the harness's\nnative payload. Internal-only columns are deliberately absent so internal\nmodel evolution stays free.",
2634
- "properties": {
2635
- "agent_turn_id": {
2636
- "anyOf": [
2637
- {
2638
- "type": "string"
2639
- },
2640
- {
2641
- "type": "null"
2642
- }
2643
- ],
2644
- "default": null,
2645
- "description": "Identifier of the turn the record belongs to, if any.",
2646
- "title": "Agent Turn Id"
2647
- },
2648
- "cost": {
2649
- "anyOf": [
2650
- {
2651
- "type": "integer"
2652
- },
2653
- {
2654
- "type": "null"
2655
- }
2656
- ],
2657
- "default": null,
2658
- "description": "Cost attributed to this record, if any.",
2659
- "title": "Cost"
2660
- },
2661
- "created_at": {
2662
- "description": "When the record was created.",
2663
- "format": "date-time",
2664
- "title": "Created At",
2665
- "type": "string"
2666
- },
2667
- "duration": {
2668
- "anyOf": [
2669
- {
2670
- "type": "integer"
2671
- },
2672
- {
2673
- "type": "null"
2674
- }
2675
- ],
2676
- "default": null,
2677
- "description": "Duration attributed to this record, if any.",
2678
- "title": "Duration"
2679
- },
2680
- "feed_seq": {
2681
- "description": "The record's position in the session's ordered feed \u2014 the resume cursor for the stream and the records endpoints.",
2682
- "title": "Feed Seq",
2683
- "type": "integer"
2684
- },
2685
- "id": {
2686
- "description": "Unique identifier of the record.",
2687
- "title": "Id",
2688
- "type": "string"
2689
- },
2690
- "model": {
2691
- "anyOf": [
2692
- {
2693
- "type": "string"
2694
- },
2695
- {
2696
- "type": "null"
2697
- }
2698
- ],
2699
- "default": null,
2700
- "description": "The model that produced this record, if any.",
2701
- "title": "Model"
2702
- },
2703
- "payload": {
2704
- "additionalProperties": true,
2705
- "description": "The harness's native line, verbatim. Consumers parse it at their own risk, versioned via record_format.",
2706
- "title": "Payload",
2707
- "type": "object"
2708
- },
2709
- "record_format": {
2710
- "description": "Versions the payload shape, e.g. claude_stream_json@2.0 or ellipsis_lifecycle@1.",
2711
- "title": "Record Format",
2712
- "type": "string"
2713
- },
2714
- "record_type": {
2715
- "description": "The record's type within its format.",
2716
- "title": "Record Type",
2717
- "type": "string"
2718
- },
2719
- "session_id": {
2720
- "description": "Identifier of the session the record belongs to.",
2721
- "title": "Session Id",
2722
- "type": "string"
2723
- },
2724
- "session_message_id": {
2725
- "anyOf": [
2726
- {
2727
- "type": "string"
2728
- },
2729
- {
2730
- "type": "null"
2731
- }
2732
- ],
2733
- "default": null,
2734
- "description": "Correlates a user-echo record back to the session message it echoes, so clients can retire queued messages by id.",
2735
- "title": "Session Message Id"
2736
- },
2737
- "source": {
2738
- "description": "Who wrote the record. Known values: claude_code (a native harness transcript record) | lifecycle (a platform notification). Open vocabulary: ignore records with unknown sources.",
2739
- "type": "string"
2740
- },
2741
- "stream_seq": {
2742
- "description": "The record's position within its execution's stream.",
2743
- "title": "Stream Seq",
2744
- "type": "integer"
2745
- },
2746
- "tokens_info": {
2747
- "anyOf": [
2748
- {
2749
- "$ref": "#/$defs/TokensInfo"
2750
- },
2751
- {
2752
- "type": "null"
2753
- }
2754
- ],
2755
- "default": null,
2756
- "description": "Token usage reported for this record, if any."
2757
- },
2758
- "tools": {
2759
- "anyOf": [
2760
- {
2761
- "items": {
2762
- "type": "string"
2763
- },
2764
- "type": "array"
2765
- },
2766
- {
2767
- "type": "null"
2768
- }
2769
- ],
2770
- "default": null,
2771
- "description": "Names of the tools used in this record, if any.",
2772
- "title": "Tools"
2773
- }
2774
- },
2775
- "required": [
2776
- "agent_turn_id",
2777
- "cost",
2778
- "created_at",
2779
- "duration",
2780
- "feed_seq",
2781
- "id",
2782
- "model",
2783
- "payload",
2784
- "record_format",
2785
- "record_type",
2786
- "session_id",
2787
- "session_message_id",
2788
- "source",
2789
- "stream_seq",
2790
- "tokens_info",
2791
- "tools"
2792
- ],
2793
- "title": "SessionRecord",
2794
- "type": "object"
2795
- },
2796
4786
  "SessionSource": {
2797
4787
  "enum": [
2798
4788
  "react",