@maiaos/protocol 0.1.0-canary.81 → 0.1.0-canary.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/definition.d.ts +2 -2
- package/dist/agent/worker-operation.d.ts +1 -0
- package/dist/agent/worker-operation.d.ts.map +1 -1
- package/dist/discovery/contract.d.ts +1 -0
- package/dist/discovery/contract.d.ts.map +1 -1
- package/dist/discovery/effect-schema.d.ts +2 -0
- package/dist/discovery/effect-schema.d.ts.map +1 -1
- package/dist/event/registry.d.ts.map +1 -1
- package/dist/event/registry.js +3 -0
- package/dist/event/registry.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/local-node/contract.d.ts +3 -3
- package/dist/local-node/contract.d.ts.map +1 -1
- package/dist/local-node/contract.js.map +1 -1
- package/dist/local-node/effect-schema.d.ts +53 -13
- package/dist/local-node/effect-schema.d.ts.map +1 -1
- package/dist/local-node/node-api/methods.d.ts +2 -2
- package/dist/local-node/node-api/methods.d.ts.map +1 -1
- package/dist/local-node/node-api/methods.js +2 -0
- package/dist/local-node/node-api/methods.js.map +1 -1
- package/dist/local-node/receipt-list.d.ts +1 -1
- package/dist/local-node/receipt-list.d.ts.map +1 -1
- package/dist/local-node/receipt-list.js +2 -0
- package/dist/local-node/receipt-list.js.map +1 -1
- package/dist/pairing/effect-schema.d.ts +1 -1
- package/dist/pairing/effect-schema.js +1 -1
- package/dist/pairing/effect-schema.js.map +1 -1
- package/dist/presentation/contract.d.ts +1 -0
- package/dist/presentation/contract.d.ts.map +1 -1
- package/dist/presentation/effect-schema.d.ts +1 -0
- package/dist/presentation/effect-schema.d.ts.map +1 -1
- package/dist/presentation/session-list-effect-schema.d.ts +1 -0
- package/dist/presentation/session-list-effect-schema.d.ts.map +1 -1
- package/dist/principal/effect-schema.d.ts +1 -1
- package/dist/principal/effect-schema.js +1 -1
- package/dist/principal/effect-schema.js.map +1 -1
- package/dist/reach/effect-schema.d.ts +3 -2
- package/dist/reach/effect-schema.d.ts.map +1 -1
- package/dist/reach/effect-schema.js +2 -1
- package/dist/reach/effect-schema.js.map +1 -1
- package/dist/session/agent-permission-contract.d.ts +5 -5
- package/dist/session/agent-permission-effect-schema.d.ts +9 -9
- package/dist/session/contract.d.ts +12 -0
- package/dist/session/contract.d.ts.map +1 -1
- package/dist/session/effect-schema.d.ts +164 -0
- package/dist/session/effect-schema.d.ts.map +1 -1
- package/dist/session/effect-schema.js +13 -0
- package/dist/session/effect-schema.js.map +1 -1
- package/dist/session/feature.d.ts +67 -2
- package/dist/session/feature.d.ts.map +1 -1
- package/dist/session/feature.js +63 -2
- package/dist/session/feature.js.map +1 -1
- package/dist/session/stop-resume-contract.d.ts +2 -0
- package/dist/session/stop-resume-contract.d.ts.map +1 -1
- package/dist/session/worktree-effect-schema.d.ts +2 -1
- package/dist/session/worktree-effect-schema.d.ts.map +1 -1
- package/dist/session/worktree-effect-schema.js +2 -1
- package/dist/session/worktree-effect-schema.js.map +1 -1
- package/dist/session-stream/contract.d.ts +43 -3
- package/dist/session-stream/contract.d.ts.map +1 -1
- package/dist/session-stream/contract.js +1 -1
- package/dist/session-stream/contract.js.map +1 -1
- package/dist/session-stream/effect-schema.d.ts +47 -2
- package/dist/session-stream/effect-schema.d.ts.map +1 -1
- package/dist/session-stream/effect-schema.js +27 -1
- package/dist/session-stream/effect-schema.js.map +1 -1
- package/dist/session-stream/index.d.ts +1 -1
- package/dist/session-stream/index.d.ts.map +1 -1
- package/dist/session-stream/index.js +1 -1
- package/dist/session-stream/index.js.map +1 -1
- package/dist/session-stream/policy.d.ts +9 -1
- package/dist/session-stream/policy.d.ts.map +1 -1
- package/dist/session-stream/policy.js +9 -0
- package/dist/session-stream/policy.js.map +1 -1
- package/dist/turn/contract.d.ts +93 -1038
- package/dist/turn/contract.d.ts.map +1 -1
- package/dist/turn/contract.js +12 -5
- package/dist/turn/contract.js.map +1 -1
- package/dist/turn/effect-schema.d.ts +969 -126
- package/dist/turn/effect-schema.d.ts.map +1 -1
- package/dist/turn/effect-schema.js +88 -6
- package/dist/turn/effect-schema.js.map +1 -1
- package/dist/turn/index.d.ts +1 -1
- package/dist/turn/index.d.ts.map +1 -1
- package/dist/turn/index.js +1 -1
- package/dist/turn/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -209,6 +209,14 @@ export declare const turnInterruptParametersEffectSchema: Schema.Struct<{
|
|
|
209
209
|
readonly expectedRevision: Schema.String;
|
|
210
210
|
readonly turnId: Schema.String;
|
|
211
211
|
}>;
|
|
212
|
+
/**
|
|
213
|
+
* When a message reaches its Session. `queue` waits behind the running turn
|
|
214
|
+
* and the turns already queued. `now` goes to the running turn: its executor
|
|
215
|
+
* takes the text into that turn where it can steer, and otherwise the Node
|
|
216
|
+
* interrupts the turn and runs the message next, ahead of the queue. With no
|
|
217
|
+
* turn running, both start the message at once.
|
|
218
|
+
*/
|
|
219
|
+
export declare const turnDeliveryModeEffectSchema: Schema.Literals<readonly ["queue", "now"]>;
|
|
212
220
|
export declare const turnSendParametersEffectSchema: Schema.Struct<{
|
|
213
221
|
/** Files for the turn, within the limits `turn.attachment.policy` reports. */
|
|
214
222
|
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
@@ -216,7 +224,10 @@ export declare const turnSendParametersEffectSchema: Schema.Struct<{
|
|
|
216
224
|
readonly mediaType: Schema.String;
|
|
217
225
|
readonly name: Schema.String;
|
|
218
226
|
}>>>;
|
|
227
|
+
/** With `delivery: "now"` it holds at most 118 characters. */
|
|
219
228
|
readonly commandId: Schema.String;
|
|
229
|
+
/** Absent means `queue`. */
|
|
230
|
+
readonly delivery: Schema.optional<Schema.Literals<readonly ["queue", "now"]>>;
|
|
220
231
|
readonly expectedRevision: Schema.String;
|
|
221
232
|
readonly input: Schema.Struct<{
|
|
222
233
|
readonly text: Schema.String;
|
|
@@ -439,9 +450,18 @@ export declare const turnInterruptResultEffectSchema: Schema.Struct<{
|
|
|
439
450
|
readonly state: Schema.Literal<"interrupted">;
|
|
440
451
|
}>]>;
|
|
441
452
|
}>;
|
|
453
|
+
/**
|
|
454
|
+
* `delivery` says whether the command was new or a replay. `path` and
|
|
455
|
+
* `sourceTurnId` are present when the message reached a running turn with
|
|
456
|
+
* `delivery: "now"`, and `sourceTurnId` names that turn. On `native` it took
|
|
457
|
+
* the text and `turn` is that same turn, since no new turn exists. On
|
|
458
|
+
* `interrupt-restart` the Node interrupted it and `turn` is the new turn,
|
|
459
|
+
* first in the queue. Without `path`, `turn` is the new queued turn.
|
|
460
|
+
*/
|
|
442
461
|
export declare const turnSendResultEffectSchema: Schema.Struct<{
|
|
443
462
|
readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
|
|
444
463
|
readonly method: Schema.Literal<"turn.send">;
|
|
464
|
+
readonly path: Schema.optional<Schema.Literals<readonly ["interrupt-restart", "native"]>>;
|
|
445
465
|
readonly receipt: Schema.Struct<{
|
|
446
466
|
readonly actorId: Schema.String;
|
|
447
467
|
readonly aggregateRevision: Schema.String;
|
|
@@ -459,6 +479,7 @@ export declare const turnSendResultEffectSchema: Schema.Struct<{
|
|
|
459
479
|
}>;
|
|
460
480
|
readonly updatedAt: Schema.String;
|
|
461
481
|
}>;
|
|
482
|
+
readonly sourceTurnId: Schema.optional<Schema.String>;
|
|
462
483
|
readonly turn: Schema.Union<readonly [Schema.Struct<{
|
|
463
484
|
/** The files sent with the turn; absent when it carried none. */
|
|
464
485
|
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
@@ -1402,124 +1423,29 @@ export declare const turnCancelResultEffectSchema: Schema.Struct<{
|
|
|
1402
1423
|
readonly state: Schema.Literal<"interrupted">;
|
|
1403
1424
|
}>]>;
|
|
1404
1425
|
}>;
|
|
1405
|
-
export declare const
|
|
1406
|
-
readonly
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
readonly activeTurn: Schema.optional<Schema.Struct<{
|
|
1411
|
-
readonly id: Schema.String;
|
|
1412
|
-
readonly revision: Schema.String;
|
|
1413
|
-
readonly state: Schema.Literals<readonly ["dispatching", "running"]>;
|
|
1414
|
-
}>>;
|
|
1415
|
-
readonly method: Schema.Literal<"turn.queue.list">;
|
|
1416
|
-
/** Queued turns in dispatch order; `turn.show` returns a turn's full input. */
|
|
1417
|
-
readonly queue: Schema.$Array<Schema.Struct<{
|
|
1418
|
-
readonly createdAt: Schema.String;
|
|
1419
|
-
readonly id: Schema.String;
|
|
1420
|
-
readonly inputPreview: Schema.String;
|
|
1421
|
-
readonly position: Schema.Int;
|
|
1422
|
-
readonly revision: Schema.String;
|
|
1423
|
-
}>>;
|
|
1424
|
-
readonly sessionId: Schema.String;
|
|
1426
|
+
export declare const turnQueuePromoteParametersEffectSchema: Schema.Struct<{
|
|
1427
|
+
readonly commandId: Schema.String;
|
|
1428
|
+
/** The queued turn's own revision, as `turn.queue.list` shows it. */
|
|
1429
|
+
readonly expectedRevision: Schema.String;
|
|
1430
|
+
readonly turnId: Schema.String;
|
|
1425
1431
|
}>;
|
|
1426
|
-
export declare const
|
|
1427
|
-
readonly method: Schema.Literal<"turn.attachment.policy">;
|
|
1428
|
-
readonly parameters: Schema.Struct<{
|
|
1429
|
-
readonly sessionId: Schema.String;
|
|
1430
|
-
}>;
|
|
1431
|
-
}>, Schema.Struct<{
|
|
1432
|
-
readonly method: Schema.Literal<"turn.cancel">;
|
|
1433
|
-
readonly parameters: Schema.Struct<{
|
|
1434
|
-
readonly commandId: Schema.String;
|
|
1435
|
-
/** The queued turn's own revision, as `turn.queue.list` shows it. */
|
|
1436
|
-
readonly expectedRevision: Schema.String;
|
|
1437
|
-
readonly turnId: Schema.String;
|
|
1438
|
-
}>;
|
|
1439
|
-
}>, Schema.Struct<{
|
|
1440
|
-
readonly method: Schema.Literal<"turn.queue.list">;
|
|
1441
|
-
readonly parameters: Schema.Struct<{
|
|
1442
|
-
readonly sessionId: Schema.String;
|
|
1443
|
-
}>;
|
|
1444
|
-
}>, Schema.Struct<{
|
|
1445
|
-
readonly method: Schema.Literal<"turn.interrupt">;
|
|
1446
|
-
readonly parameters: Schema.Struct<{
|
|
1447
|
-
readonly commandId: Schema.String;
|
|
1448
|
-
readonly expectedRevision: Schema.String;
|
|
1449
|
-
readonly turnId: Schema.String;
|
|
1450
|
-
}>;
|
|
1451
|
-
}>, Schema.Struct<{
|
|
1452
|
-
readonly method: Schema.Literal<"turn.send">;
|
|
1453
|
-
readonly parameters: Schema.Struct<{
|
|
1454
|
-
/** Files for the turn, within the limits `turn.attachment.policy` reports. */
|
|
1455
|
-
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
1456
|
-
readonly data: Schema.String;
|
|
1457
|
-
readonly mediaType: Schema.String;
|
|
1458
|
-
readonly name: Schema.String;
|
|
1459
|
-
}>>>;
|
|
1460
|
-
readonly commandId: Schema.String;
|
|
1461
|
-
readonly expectedRevision: Schema.String;
|
|
1462
|
-
readonly input: Schema.Struct<{
|
|
1463
|
-
readonly text: Schema.String;
|
|
1464
|
-
readonly type: Schema.Literal<"text">;
|
|
1465
|
-
}>;
|
|
1466
|
-
readonly sessionId: Schema.String;
|
|
1467
|
-
}>;
|
|
1468
|
-
}>, Schema.Struct<{
|
|
1469
|
-
readonly method: Schema.Literal<"turn.show">;
|
|
1470
|
-
readonly parameters: Schema.Struct<{
|
|
1471
|
-
readonly turnId: Schema.String;
|
|
1472
|
-
}>;
|
|
1473
|
-
}>, Schema.Struct<{
|
|
1474
|
-
readonly method: Schema.Literal<"turn.steer.confirm">;
|
|
1475
|
-
readonly parameters: Schema.Struct<{
|
|
1476
|
-
commandId: Schema.String;
|
|
1477
|
-
expectedRevision: Schema.String;
|
|
1478
|
-
input: Schema.Struct<{
|
|
1479
|
-
readonly text: Schema.String;
|
|
1480
|
-
readonly type: Schema.Literal<"text">;
|
|
1481
|
-
}>;
|
|
1482
|
-
inputDigest: Schema.String;
|
|
1483
|
-
proof: Schema.String;
|
|
1484
|
-
turnId: Schema.String;
|
|
1485
|
-
validUntil: Schema.String;
|
|
1486
|
-
}>;
|
|
1487
|
-
}>, Schema.Struct<{
|
|
1488
|
-
readonly method: Schema.Literal<"turn.steer.preview">;
|
|
1489
|
-
readonly parameters: Schema.Struct<{
|
|
1490
|
-
readonly commandId: Schema.String;
|
|
1491
|
-
readonly expectedRevision: Schema.String;
|
|
1492
|
-
readonly input: Schema.Struct<{
|
|
1493
|
-
readonly text: Schema.String;
|
|
1494
|
-
readonly type: Schema.Literal<"text">;
|
|
1495
|
-
}>;
|
|
1496
|
-
readonly turnId: Schema.String;
|
|
1497
|
-
}>;
|
|
1498
|
-
}>, Schema.Struct<{
|
|
1499
|
-
readonly method: Schema.Literal<"turn.wait">;
|
|
1500
|
-
readonly parameters: Schema.Struct<{
|
|
1501
|
-
readonly mode: Schema.Literals<readonly ["all", "any"]>;
|
|
1502
|
-
readonly turnIds: Schema.$Array<Schema.String>;
|
|
1503
|
-
readonly waitMilliseconds: Schema.Int;
|
|
1504
|
-
}>;
|
|
1505
|
-
}>]>;
|
|
1506
|
-
export declare const turnSuccessResultEffectSchema: Schema.Union<readonly [Schema.Struct<{
|
|
1507
|
-
readonly accepted: Schema.Boolean;
|
|
1508
|
-
readonly maxBytes: Schema.Int;
|
|
1509
|
-
readonly mediaTypes: Schema.$Array<Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>>;
|
|
1510
|
-
readonly method: Schema.Literal<"turn.attachment.policy">;
|
|
1511
|
-
readonly sessionId: Schema.String;
|
|
1512
|
-
}>, Schema.Struct<{
|
|
1432
|
+
export declare const turnQueuePromoteResultEffectSchema: Schema.Struct<{
|
|
1513
1433
|
readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
|
|
1514
|
-
readonly method: Schema.Literal<"turn.
|
|
1434
|
+
readonly method: Schema.Literal<"turn.queue.promote">;
|
|
1515
1435
|
/**
|
|
1516
|
-
* `
|
|
1517
|
-
*
|
|
1518
|
-
*
|
|
1519
|
-
*
|
|
1520
|
-
* same one.
|
|
1436
|
+
* `promoted`: the turn sat in the queue and now goes as `delivery: "now"`
|
|
1437
|
+
* does. `already_dispatched`: the turn left the queue first (dispatching,
|
|
1438
|
+
* running or past it), so the promote changed nothing. Both carry a
|
|
1439
|
+
* receipt, and a replay returns the same one.
|
|
1521
1440
|
*/
|
|
1522
|
-
readonly outcome: Schema.Literals<readonly ["
|
|
1441
|
+
readonly outcome: Schema.Literals<readonly ["promoted", "already_dispatched"]>;
|
|
1442
|
+
/**
|
|
1443
|
+
* `interrupt-restart` when a turn was running, which `sourceTurnId`
|
|
1444
|
+
* names: the Node interrupted it and this turn runs next. A promote never
|
|
1445
|
+
* steers, so its text runs once, as this turn. Both are absent when none
|
|
1446
|
+
* was running, and the turn then starts first.
|
|
1447
|
+
*/
|
|
1448
|
+
readonly path: Schema.optional<Schema.Literal<"interrupt-restart">>;
|
|
1523
1449
|
readonly receipt: Schema.Struct<{
|
|
1524
1450
|
readonly actorId: Schema.String;
|
|
1525
1451
|
readonly aggregateRevision: Schema.String;
|
|
@@ -1537,6 +1463,8 @@ export declare const turnSuccessResultEffectSchema: Schema.Union<readonly [Schem
|
|
|
1537
1463
|
}>;
|
|
1538
1464
|
readonly updatedAt: Schema.String;
|
|
1539
1465
|
}>;
|
|
1466
|
+
readonly sourceTurnId: Schema.optional<Schema.String>;
|
|
1467
|
+
/** The turn the promote named, as it stands now. */
|
|
1540
1468
|
readonly turn: Schema.Union<readonly [Schema.Struct<{
|
|
1541
1469
|
/** The files sent with the turn; absent when it carried none. */
|
|
1542
1470
|
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
@@ -1703,23 +1631,936 @@ export declare const turnSuccessResultEffectSchema: Schema.Union<readonly [Schem
|
|
|
1703
1631
|
readonly updatedAt: Schema.String;
|
|
1704
1632
|
readonly state: Schema.Literal<"interrupted">;
|
|
1705
1633
|
}>]>;
|
|
1706
|
-
}
|
|
1707
|
-
|
|
1708
|
-
readonly
|
|
1634
|
+
}>;
|
|
1635
|
+
export declare const turnQueueEditParametersEffectSchema: Schema.Struct<{
|
|
1636
|
+
readonly commandId: Schema.String;
|
|
1637
|
+
/** The queued turn's own revision, as `turn.queue.list` shows it. */
|
|
1638
|
+
readonly expectedRevision: Schema.String;
|
|
1639
|
+
/** The text that replaces the queued turn's; its files and its place in the queue stay. */
|
|
1640
|
+
readonly input: Schema.Struct<{
|
|
1641
|
+
readonly text: Schema.String;
|
|
1642
|
+
readonly type: Schema.Literal<"text">;
|
|
1643
|
+
}>;
|
|
1644
|
+
readonly turnId: Schema.String;
|
|
1645
|
+
}>;
|
|
1646
|
+
/** `turn` is the queued turn with its new text and revision. The Node refuses a turn that left the queue with `turn_not_queued`. */
|
|
1647
|
+
export declare const turnQueueEditResultEffectSchema: Schema.Struct<{
|
|
1648
|
+
readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
|
|
1649
|
+
readonly method: Schema.Literal<"turn.queue.edit">;
|
|
1650
|
+
readonly receipt: Schema.Struct<{
|
|
1651
|
+
readonly actorId: Schema.String;
|
|
1652
|
+
readonly aggregateRevision: Schema.String;
|
|
1653
|
+
readonly commandId: Schema.String;
|
|
1654
|
+
readonly createdAt: Schema.String;
|
|
1655
|
+
readonly eventCursor: Schema.String;
|
|
1656
|
+
readonly method: Schema.String;
|
|
1657
|
+
readonly proposedBy: Schema.optional<Schema.String>;
|
|
1658
|
+
readonly receiptId: Schema.String;
|
|
1659
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
1660
|
+
readonly state: Schema.Literal<"succeeded">;
|
|
1661
|
+
readonly target: Schema.Struct<{
|
|
1662
|
+
readonly id: Schema.String;
|
|
1663
|
+
readonly type: Schema.String;
|
|
1664
|
+
}>;
|
|
1665
|
+
readonly updatedAt: Schema.String;
|
|
1666
|
+
}>;
|
|
1667
|
+
readonly turn: Schema.Union<readonly [Schema.Struct<{
|
|
1668
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
1669
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
1670
|
+
readonly byteLength: Schema.Int;
|
|
1671
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
1672
|
+
readonly name: Schema.String;
|
|
1673
|
+
readonly sha256: Schema.String;
|
|
1674
|
+
}>>>;
|
|
1675
|
+
readonly createdAt: Schema.String;
|
|
1709
1676
|
readonly id: Schema.String;
|
|
1677
|
+
readonly input: Schema.Struct<{
|
|
1678
|
+
readonly text: Schema.String;
|
|
1679
|
+
readonly type: Schema.Literal<"text">;
|
|
1680
|
+
}>;
|
|
1710
1681
|
readonly revision: Schema.String;
|
|
1711
|
-
readonly
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1682
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
1683
|
+
readonly sessionId: Schema.String;
|
|
1684
|
+
readonly sessionRevision: Schema.String;
|
|
1685
|
+
readonly updatedAt: Schema.String;
|
|
1686
|
+
readonly state: Schema.Literal<"queued">;
|
|
1687
|
+
}>, Schema.Struct<{
|
|
1688
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
1689
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
1690
|
+
readonly byteLength: Schema.Int;
|
|
1691
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
1692
|
+
readonly name: Schema.String;
|
|
1693
|
+
readonly sha256: Schema.String;
|
|
1694
|
+
}>>>;
|
|
1716
1695
|
readonly createdAt: Schema.String;
|
|
1717
1696
|
readonly id: Schema.String;
|
|
1718
|
-
readonly
|
|
1719
|
-
|
|
1697
|
+
readonly input: Schema.Struct<{
|
|
1698
|
+
readonly text: Schema.String;
|
|
1699
|
+
readonly type: Schema.Literal<"text">;
|
|
1700
|
+
}>;
|
|
1720
1701
|
readonly revision: Schema.String;
|
|
1721
|
-
|
|
1722
|
-
|
|
1702
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
1703
|
+
readonly sessionId: Schema.String;
|
|
1704
|
+
readonly sessionRevision: Schema.String;
|
|
1705
|
+
readonly updatedAt: Schema.String;
|
|
1706
|
+
readonly state: Schema.Literal<"dispatching">;
|
|
1707
|
+
}>, Schema.Struct<{
|
|
1708
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
1709
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
1710
|
+
readonly byteLength: Schema.Int;
|
|
1711
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
1712
|
+
readonly name: Schema.String;
|
|
1713
|
+
readonly sha256: Schema.String;
|
|
1714
|
+
}>>>;
|
|
1715
|
+
readonly createdAt: Schema.String;
|
|
1716
|
+
readonly id: Schema.String;
|
|
1717
|
+
readonly input: Schema.Struct<{
|
|
1718
|
+
readonly text: Schema.String;
|
|
1719
|
+
readonly type: Schema.Literal<"text">;
|
|
1720
|
+
}>;
|
|
1721
|
+
readonly revision: Schema.String;
|
|
1722
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
1723
|
+
readonly sessionId: Schema.String;
|
|
1724
|
+
readonly sessionRevision: Schema.String;
|
|
1725
|
+
readonly updatedAt: Schema.String;
|
|
1726
|
+
readonly state: Schema.Literal<"running">;
|
|
1727
|
+
}>, Schema.Struct<{
|
|
1728
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
1729
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
1730
|
+
readonly byteLength: Schema.Int;
|
|
1731
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
1732
|
+
readonly name: Schema.String;
|
|
1733
|
+
readonly sha256: Schema.String;
|
|
1734
|
+
}>>>;
|
|
1735
|
+
readonly createdAt: Schema.String;
|
|
1736
|
+
readonly id: Schema.String;
|
|
1737
|
+
readonly input: Schema.Struct<{
|
|
1738
|
+
readonly text: Schema.String;
|
|
1739
|
+
readonly type: Schema.Literal<"text">;
|
|
1740
|
+
}>;
|
|
1741
|
+
readonly revision: Schema.String;
|
|
1742
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
1743
|
+
readonly sessionId: Schema.String;
|
|
1744
|
+
readonly sessionRevision: Schema.String;
|
|
1745
|
+
readonly updatedAt: Schema.String;
|
|
1746
|
+
readonly responseText: Schema.String;
|
|
1747
|
+
readonly state: Schema.Literal<"completed">;
|
|
1748
|
+
readonly tokenUsage: Schema.optional<Schema.Struct<{
|
|
1749
|
+
readonly cachedInputTokens: Schema.Int;
|
|
1750
|
+
/** The input tokens of the turn's last model call: the context in use. */
|
|
1751
|
+
readonly contextTokens: Schema.optional<Schema.Int>;
|
|
1752
|
+
/** The model's context window in tokens, reported with `contextTokens` or not at all. */
|
|
1753
|
+
readonly contextWindow: Schema.optional<Schema.Int>;
|
|
1754
|
+
readonly inputTokens: Schema.Int;
|
|
1755
|
+
/** Model calls the runtime reported for the turn; absent when it reported none. */
|
|
1756
|
+
readonly modelCallCount: Schema.optional<Schema.Int>;
|
|
1757
|
+
readonly outputTokens: Schema.Int;
|
|
1758
|
+
readonly reasoningOutputTokens: Schema.Int;
|
|
1759
|
+
readonly totalTokens: Schema.Int;
|
|
1760
|
+
}>>;
|
|
1761
|
+
}>, Schema.Struct<{
|
|
1762
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
1763
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
1764
|
+
readonly byteLength: Schema.Int;
|
|
1765
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
1766
|
+
readonly name: Schema.String;
|
|
1767
|
+
readonly sha256: Schema.String;
|
|
1768
|
+
}>>>;
|
|
1769
|
+
readonly createdAt: Schema.String;
|
|
1770
|
+
readonly id: Schema.String;
|
|
1771
|
+
readonly input: Schema.Struct<{
|
|
1772
|
+
readonly text: Schema.String;
|
|
1773
|
+
readonly type: Schema.Literal<"text">;
|
|
1774
|
+
}>;
|
|
1775
|
+
readonly revision: Schema.String;
|
|
1776
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
1777
|
+
readonly sessionId: Schema.String;
|
|
1778
|
+
readonly sessionRevision: Schema.String;
|
|
1779
|
+
readonly updatedAt: Schema.String;
|
|
1780
|
+
/** What the runtime reported, when it said why the turn failed. */
|
|
1781
|
+
readonly failure: Schema.optional<Schema.Struct<{
|
|
1782
|
+
readonly code: Schema.String;
|
|
1783
|
+
readonly message: Schema.String;
|
|
1784
|
+
}>>;
|
|
1785
|
+
readonly failureReason: Schema.Literals<readonly ["approval_required", "repository_changed", "runtime_failed", "turn_rejected"]>;
|
|
1786
|
+
readonly state: Schema.Literal<"failed">;
|
|
1787
|
+
}>, Schema.Struct<{
|
|
1788
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
1789
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
1790
|
+
readonly byteLength: Schema.Int;
|
|
1791
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
1792
|
+
readonly name: Schema.String;
|
|
1793
|
+
readonly sha256: Schema.String;
|
|
1794
|
+
}>>>;
|
|
1795
|
+
readonly createdAt: Schema.String;
|
|
1796
|
+
readonly id: Schema.String;
|
|
1797
|
+
readonly input: Schema.Struct<{
|
|
1798
|
+
readonly text: Schema.String;
|
|
1799
|
+
readonly type: Schema.Literal<"text">;
|
|
1800
|
+
}>;
|
|
1801
|
+
readonly revision: Schema.String;
|
|
1802
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
1803
|
+
readonly sessionId: Schema.String;
|
|
1804
|
+
readonly sessionRevision: Schema.String;
|
|
1805
|
+
readonly updatedAt: Schema.String;
|
|
1806
|
+
readonly failure: Schema.optional<Schema.Struct<{
|
|
1807
|
+
readonly code: Schema.String;
|
|
1808
|
+
readonly message: Schema.String;
|
|
1809
|
+
}>>;
|
|
1810
|
+
readonly failureReason: Schema.Literals<readonly ["output_limit_exceeded", "protocol_invalid", "runtime_exited", "turn_deadline_exceeded"]>;
|
|
1811
|
+
readonly state: Schema.Literal<"outcome-unknown">;
|
|
1812
|
+
}>, Schema.Struct<{
|
|
1813
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
1814
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
1815
|
+
readonly byteLength: Schema.Int;
|
|
1816
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
1817
|
+
readonly name: Schema.String;
|
|
1818
|
+
readonly sha256: Schema.String;
|
|
1819
|
+
}>>>;
|
|
1820
|
+
readonly createdAt: Schema.String;
|
|
1821
|
+
readonly id: Schema.String;
|
|
1822
|
+
readonly input: Schema.Struct<{
|
|
1823
|
+
readonly text: Schema.String;
|
|
1824
|
+
readonly type: Schema.Literal<"text">;
|
|
1825
|
+
}>;
|
|
1826
|
+
readonly revision: Schema.String;
|
|
1827
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
1828
|
+
readonly sessionId: Schema.String;
|
|
1829
|
+
readonly sessionRevision: Schema.String;
|
|
1830
|
+
readonly updatedAt: Schema.String;
|
|
1831
|
+
readonly state: Schema.Literal<"interrupted">;
|
|
1832
|
+
}>]>;
|
|
1833
|
+
}>;
|
|
1834
|
+
export declare const turnQueueListParametersEffectSchema: Schema.Struct<{
|
|
1835
|
+
readonly sessionId: Schema.String;
|
|
1836
|
+
}>;
|
|
1837
|
+
export declare const turnQueueListResultEffectSchema: Schema.Struct<{
|
|
1838
|
+
/** The turn now dispatching or running; absent when none is. */
|
|
1839
|
+
readonly activeTurn: Schema.optional<Schema.Struct<{
|
|
1840
|
+
readonly id: Schema.String;
|
|
1841
|
+
readonly revision: Schema.String;
|
|
1842
|
+
readonly state: Schema.Literals<readonly ["dispatching", "running"]>;
|
|
1843
|
+
}>>;
|
|
1844
|
+
readonly method: Schema.Literal<"turn.queue.list">;
|
|
1845
|
+
/** Queued turns in dispatch order; `turn.show` returns a turn's full input. */
|
|
1846
|
+
readonly queue: Schema.$Array<Schema.Struct<{
|
|
1847
|
+
readonly createdAt: Schema.String;
|
|
1848
|
+
readonly id: Schema.String;
|
|
1849
|
+
readonly inputPreview: Schema.String;
|
|
1850
|
+
readonly position: Schema.Int;
|
|
1851
|
+
readonly revision: Schema.String;
|
|
1852
|
+
}>>;
|
|
1853
|
+
readonly sessionId: Schema.String;
|
|
1854
|
+
}>;
|
|
1855
|
+
export declare const turnRequestPayloadEffectSchema: Schema.Union<readonly [Schema.Struct<{
|
|
1856
|
+
readonly method: Schema.Literal<"turn.attachment.policy">;
|
|
1857
|
+
readonly parameters: Schema.Struct<{
|
|
1858
|
+
readonly sessionId: Schema.String;
|
|
1859
|
+
}>;
|
|
1860
|
+
}>, Schema.Struct<{
|
|
1861
|
+
readonly method: Schema.Literal<"turn.cancel">;
|
|
1862
|
+
readonly parameters: Schema.Struct<{
|
|
1863
|
+
readonly commandId: Schema.String;
|
|
1864
|
+
/** The queued turn's own revision, as `turn.queue.list` shows it. */
|
|
1865
|
+
readonly expectedRevision: Schema.String;
|
|
1866
|
+
readonly turnId: Schema.String;
|
|
1867
|
+
}>;
|
|
1868
|
+
}>, Schema.Struct<{
|
|
1869
|
+
readonly method: Schema.Literal<"turn.queue.edit">;
|
|
1870
|
+
readonly parameters: Schema.Struct<{
|
|
1871
|
+
readonly commandId: Schema.String;
|
|
1872
|
+
/** The queued turn's own revision, as `turn.queue.list` shows it. */
|
|
1873
|
+
readonly expectedRevision: Schema.String;
|
|
1874
|
+
/** The text that replaces the queued turn's; its files and its place in the queue stay. */
|
|
1875
|
+
readonly input: Schema.Struct<{
|
|
1876
|
+
readonly text: Schema.String;
|
|
1877
|
+
readonly type: Schema.Literal<"text">;
|
|
1878
|
+
}>;
|
|
1879
|
+
readonly turnId: Schema.String;
|
|
1880
|
+
}>;
|
|
1881
|
+
}>, Schema.Struct<{
|
|
1882
|
+
readonly method: Schema.Literal<"turn.queue.list">;
|
|
1883
|
+
readonly parameters: Schema.Struct<{
|
|
1884
|
+
readonly sessionId: Schema.String;
|
|
1885
|
+
}>;
|
|
1886
|
+
}>, Schema.Struct<{
|
|
1887
|
+
readonly method: Schema.Literal<"turn.queue.promote">;
|
|
1888
|
+
readonly parameters: Schema.Struct<{
|
|
1889
|
+
readonly commandId: Schema.String;
|
|
1890
|
+
/** The queued turn's own revision, as `turn.queue.list` shows it. */
|
|
1891
|
+
readonly expectedRevision: Schema.String;
|
|
1892
|
+
readonly turnId: Schema.String;
|
|
1893
|
+
}>;
|
|
1894
|
+
}>, Schema.Struct<{
|
|
1895
|
+
readonly method: Schema.Literal<"turn.interrupt">;
|
|
1896
|
+
readonly parameters: Schema.Struct<{
|
|
1897
|
+
readonly commandId: Schema.String;
|
|
1898
|
+
readonly expectedRevision: Schema.String;
|
|
1899
|
+
readonly turnId: Schema.String;
|
|
1900
|
+
}>;
|
|
1901
|
+
}>, Schema.Struct<{
|
|
1902
|
+
readonly method: Schema.Literal<"turn.send">;
|
|
1903
|
+
readonly parameters: Schema.Struct<{
|
|
1904
|
+
/** Files for the turn, within the limits `turn.attachment.policy` reports. */
|
|
1905
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
1906
|
+
readonly data: Schema.String;
|
|
1907
|
+
readonly mediaType: Schema.String;
|
|
1908
|
+
readonly name: Schema.String;
|
|
1909
|
+
}>>>;
|
|
1910
|
+
/** With `delivery: "now"` it holds at most 118 characters. */
|
|
1911
|
+
readonly commandId: Schema.String;
|
|
1912
|
+
/** Absent means `queue`. */
|
|
1913
|
+
readonly delivery: Schema.optional<Schema.Literals<readonly ["queue", "now"]>>;
|
|
1914
|
+
readonly expectedRevision: Schema.String;
|
|
1915
|
+
readonly input: Schema.Struct<{
|
|
1916
|
+
readonly text: Schema.String;
|
|
1917
|
+
readonly type: Schema.Literal<"text">;
|
|
1918
|
+
}>;
|
|
1919
|
+
readonly sessionId: Schema.String;
|
|
1920
|
+
}>;
|
|
1921
|
+
}>, Schema.Struct<{
|
|
1922
|
+
readonly method: Schema.Literal<"turn.show">;
|
|
1923
|
+
readonly parameters: Schema.Struct<{
|
|
1924
|
+
readonly turnId: Schema.String;
|
|
1925
|
+
}>;
|
|
1926
|
+
}>, Schema.Struct<{
|
|
1927
|
+
readonly method: Schema.Literal<"turn.steer.confirm">;
|
|
1928
|
+
readonly parameters: Schema.Struct<{
|
|
1929
|
+
commandId: Schema.String;
|
|
1930
|
+
expectedRevision: Schema.String;
|
|
1931
|
+
input: Schema.Struct<{
|
|
1932
|
+
readonly text: Schema.String;
|
|
1933
|
+
readonly type: Schema.Literal<"text">;
|
|
1934
|
+
}>;
|
|
1935
|
+
inputDigest: Schema.String;
|
|
1936
|
+
proof: Schema.String;
|
|
1937
|
+
turnId: Schema.String;
|
|
1938
|
+
validUntil: Schema.String;
|
|
1939
|
+
}>;
|
|
1940
|
+
}>, Schema.Struct<{
|
|
1941
|
+
readonly method: Schema.Literal<"turn.steer.preview">;
|
|
1942
|
+
readonly parameters: Schema.Struct<{
|
|
1943
|
+
readonly commandId: Schema.String;
|
|
1944
|
+
readonly expectedRevision: Schema.String;
|
|
1945
|
+
readonly input: Schema.Struct<{
|
|
1946
|
+
readonly text: Schema.String;
|
|
1947
|
+
readonly type: Schema.Literal<"text">;
|
|
1948
|
+
}>;
|
|
1949
|
+
readonly turnId: Schema.String;
|
|
1950
|
+
}>;
|
|
1951
|
+
}>, Schema.Struct<{
|
|
1952
|
+
readonly method: Schema.Literal<"turn.wait">;
|
|
1953
|
+
readonly parameters: Schema.Struct<{
|
|
1954
|
+
readonly mode: Schema.Literals<readonly ["all", "any"]>;
|
|
1955
|
+
readonly turnIds: Schema.$Array<Schema.String>;
|
|
1956
|
+
readonly waitMilliseconds: Schema.Int;
|
|
1957
|
+
}>;
|
|
1958
|
+
}>]>;
|
|
1959
|
+
export declare const turnSuccessResultEffectSchema: Schema.Union<readonly [Schema.Struct<{
|
|
1960
|
+
readonly accepted: Schema.Boolean;
|
|
1961
|
+
readonly maxBytes: Schema.Int;
|
|
1962
|
+
readonly mediaTypes: Schema.$Array<Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>>;
|
|
1963
|
+
readonly method: Schema.Literal<"turn.attachment.policy">;
|
|
1964
|
+
readonly sessionId: Schema.String;
|
|
1965
|
+
}>, Schema.Struct<{
|
|
1966
|
+
readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
|
|
1967
|
+
readonly method: Schema.Literal<"turn.cancel">;
|
|
1968
|
+
/**
|
|
1969
|
+
* `cancelled`: the turn sat in the queue and now ends failed as
|
|
1970
|
+
* `turn_rejected`. `already_dispatched`: the turn left the queue first
|
|
1971
|
+
* (dispatching, running or past it), so the cancel changed nothing and `turn`
|
|
1972
|
+
* shows where the turn stands. Both carry a receipt, and a replay returns the
|
|
1973
|
+
* same one.
|
|
1974
|
+
*/
|
|
1975
|
+
readonly outcome: Schema.Literals<readonly ["cancelled", "already_dispatched"]>;
|
|
1976
|
+
readonly receipt: Schema.Struct<{
|
|
1977
|
+
readonly actorId: Schema.String;
|
|
1978
|
+
readonly aggregateRevision: Schema.String;
|
|
1979
|
+
readonly commandId: Schema.String;
|
|
1980
|
+
readonly createdAt: Schema.String;
|
|
1981
|
+
readonly eventCursor: Schema.String;
|
|
1982
|
+
readonly method: Schema.String;
|
|
1983
|
+
readonly proposedBy: Schema.optional<Schema.String>;
|
|
1984
|
+
readonly receiptId: Schema.String;
|
|
1985
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
1986
|
+
readonly state: Schema.Literal<"succeeded">;
|
|
1987
|
+
readonly target: Schema.Struct<{
|
|
1988
|
+
readonly id: Schema.String;
|
|
1989
|
+
readonly type: Schema.String;
|
|
1990
|
+
}>;
|
|
1991
|
+
readonly updatedAt: Schema.String;
|
|
1992
|
+
}>;
|
|
1993
|
+
readonly turn: Schema.Union<readonly [Schema.Struct<{
|
|
1994
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
1995
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
1996
|
+
readonly byteLength: Schema.Int;
|
|
1997
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
1998
|
+
readonly name: Schema.String;
|
|
1999
|
+
readonly sha256: Schema.String;
|
|
2000
|
+
}>>>;
|
|
2001
|
+
readonly createdAt: Schema.String;
|
|
2002
|
+
readonly id: Schema.String;
|
|
2003
|
+
readonly input: Schema.Struct<{
|
|
2004
|
+
readonly text: Schema.String;
|
|
2005
|
+
readonly type: Schema.Literal<"text">;
|
|
2006
|
+
}>;
|
|
2007
|
+
readonly revision: Schema.String;
|
|
2008
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
2009
|
+
readonly sessionId: Schema.String;
|
|
2010
|
+
readonly sessionRevision: Schema.String;
|
|
2011
|
+
readonly updatedAt: Schema.String;
|
|
2012
|
+
readonly state: Schema.Literal<"queued">;
|
|
2013
|
+
}>, Schema.Struct<{
|
|
2014
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
2015
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
2016
|
+
readonly byteLength: Schema.Int;
|
|
2017
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
2018
|
+
readonly name: Schema.String;
|
|
2019
|
+
readonly sha256: Schema.String;
|
|
2020
|
+
}>>>;
|
|
2021
|
+
readonly createdAt: Schema.String;
|
|
2022
|
+
readonly id: Schema.String;
|
|
2023
|
+
readonly input: Schema.Struct<{
|
|
2024
|
+
readonly text: Schema.String;
|
|
2025
|
+
readonly type: Schema.Literal<"text">;
|
|
2026
|
+
}>;
|
|
2027
|
+
readonly revision: Schema.String;
|
|
2028
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
2029
|
+
readonly sessionId: Schema.String;
|
|
2030
|
+
readonly sessionRevision: Schema.String;
|
|
2031
|
+
readonly updatedAt: Schema.String;
|
|
2032
|
+
readonly state: Schema.Literal<"dispatching">;
|
|
2033
|
+
}>, Schema.Struct<{
|
|
2034
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
2035
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
2036
|
+
readonly byteLength: Schema.Int;
|
|
2037
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
2038
|
+
readonly name: Schema.String;
|
|
2039
|
+
readonly sha256: Schema.String;
|
|
2040
|
+
}>>>;
|
|
2041
|
+
readonly createdAt: Schema.String;
|
|
2042
|
+
readonly id: Schema.String;
|
|
2043
|
+
readonly input: Schema.Struct<{
|
|
2044
|
+
readonly text: Schema.String;
|
|
2045
|
+
readonly type: Schema.Literal<"text">;
|
|
2046
|
+
}>;
|
|
2047
|
+
readonly revision: Schema.String;
|
|
2048
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
2049
|
+
readonly sessionId: Schema.String;
|
|
2050
|
+
readonly sessionRevision: Schema.String;
|
|
2051
|
+
readonly updatedAt: Schema.String;
|
|
2052
|
+
readonly state: Schema.Literal<"running">;
|
|
2053
|
+
}>, Schema.Struct<{
|
|
2054
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
2055
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
2056
|
+
readonly byteLength: Schema.Int;
|
|
2057
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
2058
|
+
readonly name: Schema.String;
|
|
2059
|
+
readonly sha256: Schema.String;
|
|
2060
|
+
}>>>;
|
|
2061
|
+
readonly createdAt: Schema.String;
|
|
2062
|
+
readonly id: Schema.String;
|
|
2063
|
+
readonly input: Schema.Struct<{
|
|
2064
|
+
readonly text: Schema.String;
|
|
2065
|
+
readonly type: Schema.Literal<"text">;
|
|
2066
|
+
}>;
|
|
2067
|
+
readonly revision: Schema.String;
|
|
2068
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
2069
|
+
readonly sessionId: Schema.String;
|
|
2070
|
+
readonly sessionRevision: Schema.String;
|
|
2071
|
+
readonly updatedAt: Schema.String;
|
|
2072
|
+
readonly responseText: Schema.String;
|
|
2073
|
+
readonly state: Schema.Literal<"completed">;
|
|
2074
|
+
readonly tokenUsage: Schema.optional<Schema.Struct<{
|
|
2075
|
+
readonly cachedInputTokens: Schema.Int;
|
|
2076
|
+
/** The input tokens of the turn's last model call: the context in use. */
|
|
2077
|
+
readonly contextTokens: Schema.optional<Schema.Int>;
|
|
2078
|
+
/** The model's context window in tokens, reported with `contextTokens` or not at all. */
|
|
2079
|
+
readonly contextWindow: Schema.optional<Schema.Int>;
|
|
2080
|
+
readonly inputTokens: Schema.Int;
|
|
2081
|
+
/** Model calls the runtime reported for the turn; absent when it reported none. */
|
|
2082
|
+
readonly modelCallCount: Schema.optional<Schema.Int>;
|
|
2083
|
+
readonly outputTokens: Schema.Int;
|
|
2084
|
+
readonly reasoningOutputTokens: Schema.Int;
|
|
2085
|
+
readonly totalTokens: Schema.Int;
|
|
2086
|
+
}>>;
|
|
2087
|
+
}>, Schema.Struct<{
|
|
2088
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
2089
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
2090
|
+
readonly byteLength: Schema.Int;
|
|
2091
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
2092
|
+
readonly name: Schema.String;
|
|
2093
|
+
readonly sha256: Schema.String;
|
|
2094
|
+
}>>>;
|
|
2095
|
+
readonly createdAt: Schema.String;
|
|
2096
|
+
readonly id: Schema.String;
|
|
2097
|
+
readonly input: Schema.Struct<{
|
|
2098
|
+
readonly text: Schema.String;
|
|
2099
|
+
readonly type: Schema.Literal<"text">;
|
|
2100
|
+
}>;
|
|
2101
|
+
readonly revision: Schema.String;
|
|
2102
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
2103
|
+
readonly sessionId: Schema.String;
|
|
2104
|
+
readonly sessionRevision: Schema.String;
|
|
2105
|
+
readonly updatedAt: Schema.String;
|
|
2106
|
+
/** What the runtime reported, when it said why the turn failed. */
|
|
2107
|
+
readonly failure: Schema.optional<Schema.Struct<{
|
|
2108
|
+
readonly code: Schema.String;
|
|
2109
|
+
readonly message: Schema.String;
|
|
2110
|
+
}>>;
|
|
2111
|
+
readonly failureReason: Schema.Literals<readonly ["approval_required", "repository_changed", "runtime_failed", "turn_rejected"]>;
|
|
2112
|
+
readonly state: Schema.Literal<"failed">;
|
|
2113
|
+
}>, Schema.Struct<{
|
|
2114
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
2115
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
2116
|
+
readonly byteLength: Schema.Int;
|
|
2117
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
2118
|
+
readonly name: Schema.String;
|
|
2119
|
+
readonly sha256: Schema.String;
|
|
2120
|
+
}>>>;
|
|
2121
|
+
readonly createdAt: Schema.String;
|
|
2122
|
+
readonly id: Schema.String;
|
|
2123
|
+
readonly input: Schema.Struct<{
|
|
2124
|
+
readonly text: Schema.String;
|
|
2125
|
+
readonly type: Schema.Literal<"text">;
|
|
2126
|
+
}>;
|
|
2127
|
+
readonly revision: Schema.String;
|
|
2128
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
2129
|
+
readonly sessionId: Schema.String;
|
|
2130
|
+
readonly sessionRevision: Schema.String;
|
|
2131
|
+
readonly updatedAt: Schema.String;
|
|
2132
|
+
readonly failure: Schema.optional<Schema.Struct<{
|
|
2133
|
+
readonly code: Schema.String;
|
|
2134
|
+
readonly message: Schema.String;
|
|
2135
|
+
}>>;
|
|
2136
|
+
readonly failureReason: Schema.Literals<readonly ["output_limit_exceeded", "protocol_invalid", "runtime_exited", "turn_deadline_exceeded"]>;
|
|
2137
|
+
readonly state: Schema.Literal<"outcome-unknown">;
|
|
2138
|
+
}>, Schema.Struct<{
|
|
2139
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
2140
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
2141
|
+
readonly byteLength: Schema.Int;
|
|
2142
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
2143
|
+
readonly name: Schema.String;
|
|
2144
|
+
readonly sha256: Schema.String;
|
|
2145
|
+
}>>>;
|
|
2146
|
+
readonly createdAt: Schema.String;
|
|
2147
|
+
readonly id: Schema.String;
|
|
2148
|
+
readonly input: Schema.Struct<{
|
|
2149
|
+
readonly text: Schema.String;
|
|
2150
|
+
readonly type: Schema.Literal<"text">;
|
|
2151
|
+
}>;
|
|
2152
|
+
readonly revision: Schema.String;
|
|
2153
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
2154
|
+
readonly sessionId: Schema.String;
|
|
2155
|
+
readonly sessionRevision: Schema.String;
|
|
2156
|
+
readonly updatedAt: Schema.String;
|
|
2157
|
+
readonly state: Schema.Literal<"interrupted">;
|
|
2158
|
+
}>]>;
|
|
2159
|
+
}>, Schema.Struct<{
|
|
2160
|
+
readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
|
|
2161
|
+
readonly method: Schema.Literal<"turn.queue.edit">;
|
|
2162
|
+
readonly receipt: Schema.Struct<{
|
|
2163
|
+
readonly actorId: Schema.String;
|
|
2164
|
+
readonly aggregateRevision: Schema.String;
|
|
2165
|
+
readonly commandId: Schema.String;
|
|
2166
|
+
readonly createdAt: Schema.String;
|
|
2167
|
+
readonly eventCursor: Schema.String;
|
|
2168
|
+
readonly method: Schema.String;
|
|
2169
|
+
readonly proposedBy: Schema.optional<Schema.String>;
|
|
2170
|
+
readonly receiptId: Schema.String;
|
|
2171
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
2172
|
+
readonly state: Schema.Literal<"succeeded">;
|
|
2173
|
+
readonly target: Schema.Struct<{
|
|
2174
|
+
readonly id: Schema.String;
|
|
2175
|
+
readonly type: Schema.String;
|
|
2176
|
+
}>;
|
|
2177
|
+
readonly updatedAt: Schema.String;
|
|
2178
|
+
}>;
|
|
2179
|
+
readonly turn: Schema.Union<readonly [Schema.Struct<{
|
|
2180
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
2181
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
2182
|
+
readonly byteLength: Schema.Int;
|
|
2183
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
2184
|
+
readonly name: Schema.String;
|
|
2185
|
+
readonly sha256: Schema.String;
|
|
2186
|
+
}>>>;
|
|
2187
|
+
readonly createdAt: Schema.String;
|
|
2188
|
+
readonly id: Schema.String;
|
|
2189
|
+
readonly input: Schema.Struct<{
|
|
2190
|
+
readonly text: Schema.String;
|
|
2191
|
+
readonly type: Schema.Literal<"text">;
|
|
2192
|
+
}>;
|
|
2193
|
+
readonly revision: Schema.String;
|
|
2194
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
2195
|
+
readonly sessionId: Schema.String;
|
|
2196
|
+
readonly sessionRevision: Schema.String;
|
|
2197
|
+
readonly updatedAt: Schema.String;
|
|
2198
|
+
readonly state: Schema.Literal<"queued">;
|
|
2199
|
+
}>, Schema.Struct<{
|
|
2200
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
2201
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
2202
|
+
readonly byteLength: Schema.Int;
|
|
2203
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
2204
|
+
readonly name: Schema.String;
|
|
2205
|
+
readonly sha256: Schema.String;
|
|
2206
|
+
}>>>;
|
|
2207
|
+
readonly createdAt: Schema.String;
|
|
2208
|
+
readonly id: Schema.String;
|
|
2209
|
+
readonly input: Schema.Struct<{
|
|
2210
|
+
readonly text: Schema.String;
|
|
2211
|
+
readonly type: Schema.Literal<"text">;
|
|
2212
|
+
}>;
|
|
2213
|
+
readonly revision: Schema.String;
|
|
2214
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
2215
|
+
readonly sessionId: Schema.String;
|
|
2216
|
+
readonly sessionRevision: Schema.String;
|
|
2217
|
+
readonly updatedAt: Schema.String;
|
|
2218
|
+
readonly state: Schema.Literal<"dispatching">;
|
|
2219
|
+
}>, Schema.Struct<{
|
|
2220
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
2221
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
2222
|
+
readonly byteLength: Schema.Int;
|
|
2223
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
2224
|
+
readonly name: Schema.String;
|
|
2225
|
+
readonly sha256: Schema.String;
|
|
2226
|
+
}>>>;
|
|
2227
|
+
readonly createdAt: Schema.String;
|
|
2228
|
+
readonly id: Schema.String;
|
|
2229
|
+
readonly input: Schema.Struct<{
|
|
2230
|
+
readonly text: Schema.String;
|
|
2231
|
+
readonly type: Schema.Literal<"text">;
|
|
2232
|
+
}>;
|
|
2233
|
+
readonly revision: Schema.String;
|
|
2234
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
2235
|
+
readonly sessionId: Schema.String;
|
|
2236
|
+
readonly sessionRevision: Schema.String;
|
|
2237
|
+
readonly updatedAt: Schema.String;
|
|
2238
|
+
readonly state: Schema.Literal<"running">;
|
|
2239
|
+
}>, Schema.Struct<{
|
|
2240
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
2241
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
2242
|
+
readonly byteLength: Schema.Int;
|
|
2243
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
2244
|
+
readonly name: Schema.String;
|
|
2245
|
+
readonly sha256: Schema.String;
|
|
2246
|
+
}>>>;
|
|
2247
|
+
readonly createdAt: Schema.String;
|
|
2248
|
+
readonly id: Schema.String;
|
|
2249
|
+
readonly input: Schema.Struct<{
|
|
2250
|
+
readonly text: Schema.String;
|
|
2251
|
+
readonly type: Schema.Literal<"text">;
|
|
2252
|
+
}>;
|
|
2253
|
+
readonly revision: Schema.String;
|
|
2254
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
2255
|
+
readonly sessionId: Schema.String;
|
|
2256
|
+
readonly sessionRevision: Schema.String;
|
|
2257
|
+
readonly updatedAt: Schema.String;
|
|
2258
|
+
readonly responseText: Schema.String;
|
|
2259
|
+
readonly state: Schema.Literal<"completed">;
|
|
2260
|
+
readonly tokenUsage: Schema.optional<Schema.Struct<{
|
|
2261
|
+
readonly cachedInputTokens: Schema.Int;
|
|
2262
|
+
/** The input tokens of the turn's last model call: the context in use. */
|
|
2263
|
+
readonly contextTokens: Schema.optional<Schema.Int>;
|
|
2264
|
+
/** The model's context window in tokens, reported with `contextTokens` or not at all. */
|
|
2265
|
+
readonly contextWindow: Schema.optional<Schema.Int>;
|
|
2266
|
+
readonly inputTokens: Schema.Int;
|
|
2267
|
+
/** Model calls the runtime reported for the turn; absent when it reported none. */
|
|
2268
|
+
readonly modelCallCount: Schema.optional<Schema.Int>;
|
|
2269
|
+
readonly outputTokens: Schema.Int;
|
|
2270
|
+
readonly reasoningOutputTokens: Schema.Int;
|
|
2271
|
+
readonly totalTokens: Schema.Int;
|
|
2272
|
+
}>>;
|
|
2273
|
+
}>, Schema.Struct<{
|
|
2274
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
2275
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
2276
|
+
readonly byteLength: Schema.Int;
|
|
2277
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
2278
|
+
readonly name: Schema.String;
|
|
2279
|
+
readonly sha256: Schema.String;
|
|
2280
|
+
}>>>;
|
|
2281
|
+
readonly createdAt: Schema.String;
|
|
2282
|
+
readonly id: Schema.String;
|
|
2283
|
+
readonly input: Schema.Struct<{
|
|
2284
|
+
readonly text: Schema.String;
|
|
2285
|
+
readonly type: Schema.Literal<"text">;
|
|
2286
|
+
}>;
|
|
2287
|
+
readonly revision: Schema.String;
|
|
2288
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
2289
|
+
readonly sessionId: Schema.String;
|
|
2290
|
+
readonly sessionRevision: Schema.String;
|
|
2291
|
+
readonly updatedAt: Schema.String;
|
|
2292
|
+
/** What the runtime reported, when it said why the turn failed. */
|
|
2293
|
+
readonly failure: Schema.optional<Schema.Struct<{
|
|
2294
|
+
readonly code: Schema.String;
|
|
2295
|
+
readonly message: Schema.String;
|
|
2296
|
+
}>>;
|
|
2297
|
+
readonly failureReason: Schema.Literals<readonly ["approval_required", "repository_changed", "runtime_failed", "turn_rejected"]>;
|
|
2298
|
+
readonly state: Schema.Literal<"failed">;
|
|
2299
|
+
}>, Schema.Struct<{
|
|
2300
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
2301
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
2302
|
+
readonly byteLength: Schema.Int;
|
|
2303
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
2304
|
+
readonly name: Schema.String;
|
|
2305
|
+
readonly sha256: Schema.String;
|
|
2306
|
+
}>>>;
|
|
2307
|
+
readonly createdAt: Schema.String;
|
|
2308
|
+
readonly id: Schema.String;
|
|
2309
|
+
readonly input: Schema.Struct<{
|
|
2310
|
+
readonly text: Schema.String;
|
|
2311
|
+
readonly type: Schema.Literal<"text">;
|
|
2312
|
+
}>;
|
|
2313
|
+
readonly revision: Schema.String;
|
|
2314
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
2315
|
+
readonly sessionId: Schema.String;
|
|
2316
|
+
readonly sessionRevision: Schema.String;
|
|
2317
|
+
readonly updatedAt: Schema.String;
|
|
2318
|
+
readonly failure: Schema.optional<Schema.Struct<{
|
|
2319
|
+
readonly code: Schema.String;
|
|
2320
|
+
readonly message: Schema.String;
|
|
2321
|
+
}>>;
|
|
2322
|
+
readonly failureReason: Schema.Literals<readonly ["output_limit_exceeded", "protocol_invalid", "runtime_exited", "turn_deadline_exceeded"]>;
|
|
2323
|
+
readonly state: Schema.Literal<"outcome-unknown">;
|
|
2324
|
+
}>, Schema.Struct<{
|
|
2325
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
2326
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
2327
|
+
readonly byteLength: Schema.Int;
|
|
2328
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
2329
|
+
readonly name: Schema.String;
|
|
2330
|
+
readonly sha256: Schema.String;
|
|
2331
|
+
}>>>;
|
|
2332
|
+
readonly createdAt: Schema.String;
|
|
2333
|
+
readonly id: Schema.String;
|
|
2334
|
+
readonly input: Schema.Struct<{
|
|
2335
|
+
readonly text: Schema.String;
|
|
2336
|
+
readonly type: Schema.Literal<"text">;
|
|
2337
|
+
}>;
|
|
2338
|
+
readonly revision: Schema.String;
|
|
2339
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
2340
|
+
readonly sessionId: Schema.String;
|
|
2341
|
+
readonly sessionRevision: Schema.String;
|
|
2342
|
+
readonly updatedAt: Schema.String;
|
|
2343
|
+
readonly state: Schema.Literal<"interrupted">;
|
|
2344
|
+
}>]>;
|
|
2345
|
+
}>, Schema.Struct<{
|
|
2346
|
+
/** The turn now dispatching or running; absent when none is. */
|
|
2347
|
+
readonly activeTurn: Schema.optional<Schema.Struct<{
|
|
2348
|
+
readonly id: Schema.String;
|
|
2349
|
+
readonly revision: Schema.String;
|
|
2350
|
+
readonly state: Schema.Literals<readonly ["dispatching", "running"]>;
|
|
2351
|
+
}>>;
|
|
2352
|
+
readonly method: Schema.Literal<"turn.queue.list">;
|
|
2353
|
+
/** Queued turns in dispatch order; `turn.show` returns a turn's full input. */
|
|
2354
|
+
readonly queue: Schema.$Array<Schema.Struct<{
|
|
2355
|
+
readonly createdAt: Schema.String;
|
|
2356
|
+
readonly id: Schema.String;
|
|
2357
|
+
readonly inputPreview: Schema.String;
|
|
2358
|
+
readonly position: Schema.Int;
|
|
2359
|
+
readonly revision: Schema.String;
|
|
2360
|
+
}>>;
|
|
2361
|
+
readonly sessionId: Schema.String;
|
|
2362
|
+
}>, Schema.Struct<{
|
|
2363
|
+
readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
|
|
2364
|
+
readonly method: Schema.Literal<"turn.queue.promote">;
|
|
2365
|
+
/**
|
|
2366
|
+
* `promoted`: the turn sat in the queue and now goes as `delivery: "now"`
|
|
2367
|
+
* does. `already_dispatched`: the turn left the queue first (dispatching,
|
|
2368
|
+
* running or past it), so the promote changed nothing. Both carry a
|
|
2369
|
+
* receipt, and a replay returns the same one.
|
|
2370
|
+
*/
|
|
2371
|
+
readonly outcome: Schema.Literals<readonly ["promoted", "already_dispatched"]>;
|
|
2372
|
+
/**
|
|
2373
|
+
* `interrupt-restart` when a turn was running, which `sourceTurnId`
|
|
2374
|
+
* names: the Node interrupted it and this turn runs next. A promote never
|
|
2375
|
+
* steers, so its text runs once, as this turn. Both are absent when none
|
|
2376
|
+
* was running, and the turn then starts first.
|
|
2377
|
+
*/
|
|
2378
|
+
readonly path: Schema.optional<Schema.Literal<"interrupt-restart">>;
|
|
2379
|
+
readonly receipt: Schema.Struct<{
|
|
2380
|
+
readonly actorId: Schema.String;
|
|
2381
|
+
readonly aggregateRevision: Schema.String;
|
|
2382
|
+
readonly commandId: Schema.String;
|
|
2383
|
+
readonly createdAt: Schema.String;
|
|
2384
|
+
readonly eventCursor: Schema.String;
|
|
2385
|
+
readonly method: Schema.String;
|
|
2386
|
+
readonly proposedBy: Schema.optional<Schema.String>;
|
|
2387
|
+
readonly receiptId: Schema.String;
|
|
2388
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
2389
|
+
readonly state: Schema.Literal<"succeeded">;
|
|
2390
|
+
readonly target: Schema.Struct<{
|
|
2391
|
+
readonly id: Schema.String;
|
|
2392
|
+
readonly type: Schema.String;
|
|
2393
|
+
}>;
|
|
2394
|
+
readonly updatedAt: Schema.String;
|
|
2395
|
+
}>;
|
|
2396
|
+
readonly sourceTurnId: Schema.optional<Schema.String>;
|
|
2397
|
+
/** The turn the promote named, as it stands now. */
|
|
2398
|
+
readonly turn: Schema.Union<readonly [Schema.Struct<{
|
|
2399
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
2400
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
2401
|
+
readonly byteLength: Schema.Int;
|
|
2402
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
2403
|
+
readonly name: Schema.String;
|
|
2404
|
+
readonly sha256: Schema.String;
|
|
2405
|
+
}>>>;
|
|
2406
|
+
readonly createdAt: Schema.String;
|
|
2407
|
+
readonly id: Schema.String;
|
|
2408
|
+
readonly input: Schema.Struct<{
|
|
2409
|
+
readonly text: Schema.String;
|
|
2410
|
+
readonly type: Schema.Literal<"text">;
|
|
2411
|
+
}>;
|
|
2412
|
+
readonly revision: Schema.String;
|
|
2413
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
2414
|
+
readonly sessionId: Schema.String;
|
|
2415
|
+
readonly sessionRevision: Schema.String;
|
|
2416
|
+
readonly updatedAt: Schema.String;
|
|
2417
|
+
readonly state: Schema.Literal<"queued">;
|
|
2418
|
+
}>, Schema.Struct<{
|
|
2419
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
2420
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
2421
|
+
readonly byteLength: Schema.Int;
|
|
2422
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
2423
|
+
readonly name: Schema.String;
|
|
2424
|
+
readonly sha256: Schema.String;
|
|
2425
|
+
}>>>;
|
|
2426
|
+
readonly createdAt: Schema.String;
|
|
2427
|
+
readonly id: Schema.String;
|
|
2428
|
+
readonly input: Schema.Struct<{
|
|
2429
|
+
readonly text: Schema.String;
|
|
2430
|
+
readonly type: Schema.Literal<"text">;
|
|
2431
|
+
}>;
|
|
2432
|
+
readonly revision: Schema.String;
|
|
2433
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
2434
|
+
readonly sessionId: Schema.String;
|
|
2435
|
+
readonly sessionRevision: Schema.String;
|
|
2436
|
+
readonly updatedAt: Schema.String;
|
|
2437
|
+
readonly state: Schema.Literal<"dispatching">;
|
|
2438
|
+
}>, Schema.Struct<{
|
|
2439
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
2440
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
2441
|
+
readonly byteLength: Schema.Int;
|
|
2442
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
2443
|
+
readonly name: Schema.String;
|
|
2444
|
+
readonly sha256: Schema.String;
|
|
2445
|
+
}>>>;
|
|
2446
|
+
readonly createdAt: Schema.String;
|
|
2447
|
+
readonly id: Schema.String;
|
|
2448
|
+
readonly input: Schema.Struct<{
|
|
2449
|
+
readonly text: Schema.String;
|
|
2450
|
+
readonly type: Schema.Literal<"text">;
|
|
2451
|
+
}>;
|
|
2452
|
+
readonly revision: Schema.String;
|
|
2453
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
2454
|
+
readonly sessionId: Schema.String;
|
|
2455
|
+
readonly sessionRevision: Schema.String;
|
|
2456
|
+
readonly updatedAt: Schema.String;
|
|
2457
|
+
readonly state: Schema.Literal<"running">;
|
|
2458
|
+
}>, Schema.Struct<{
|
|
2459
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
2460
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
2461
|
+
readonly byteLength: Schema.Int;
|
|
2462
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
2463
|
+
readonly name: Schema.String;
|
|
2464
|
+
readonly sha256: Schema.String;
|
|
2465
|
+
}>>>;
|
|
2466
|
+
readonly createdAt: Schema.String;
|
|
2467
|
+
readonly id: Schema.String;
|
|
2468
|
+
readonly input: Schema.Struct<{
|
|
2469
|
+
readonly text: Schema.String;
|
|
2470
|
+
readonly type: Schema.Literal<"text">;
|
|
2471
|
+
}>;
|
|
2472
|
+
readonly revision: Schema.String;
|
|
2473
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
2474
|
+
readonly sessionId: Schema.String;
|
|
2475
|
+
readonly sessionRevision: Schema.String;
|
|
2476
|
+
readonly updatedAt: Schema.String;
|
|
2477
|
+
readonly responseText: Schema.String;
|
|
2478
|
+
readonly state: Schema.Literal<"completed">;
|
|
2479
|
+
readonly tokenUsage: Schema.optional<Schema.Struct<{
|
|
2480
|
+
readonly cachedInputTokens: Schema.Int;
|
|
2481
|
+
/** The input tokens of the turn's last model call: the context in use. */
|
|
2482
|
+
readonly contextTokens: Schema.optional<Schema.Int>;
|
|
2483
|
+
/** The model's context window in tokens, reported with `contextTokens` or not at all. */
|
|
2484
|
+
readonly contextWindow: Schema.optional<Schema.Int>;
|
|
2485
|
+
readonly inputTokens: Schema.Int;
|
|
2486
|
+
/** Model calls the runtime reported for the turn; absent when it reported none. */
|
|
2487
|
+
readonly modelCallCount: Schema.optional<Schema.Int>;
|
|
2488
|
+
readonly outputTokens: Schema.Int;
|
|
2489
|
+
readonly reasoningOutputTokens: Schema.Int;
|
|
2490
|
+
readonly totalTokens: Schema.Int;
|
|
2491
|
+
}>>;
|
|
2492
|
+
}>, Schema.Struct<{
|
|
2493
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
2494
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
2495
|
+
readonly byteLength: Schema.Int;
|
|
2496
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
2497
|
+
readonly name: Schema.String;
|
|
2498
|
+
readonly sha256: Schema.String;
|
|
2499
|
+
}>>>;
|
|
2500
|
+
readonly createdAt: Schema.String;
|
|
2501
|
+
readonly id: Schema.String;
|
|
2502
|
+
readonly input: Schema.Struct<{
|
|
2503
|
+
readonly text: Schema.String;
|
|
2504
|
+
readonly type: Schema.Literal<"text">;
|
|
2505
|
+
}>;
|
|
2506
|
+
readonly revision: Schema.String;
|
|
2507
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
2508
|
+
readonly sessionId: Schema.String;
|
|
2509
|
+
readonly sessionRevision: Schema.String;
|
|
2510
|
+
readonly updatedAt: Schema.String;
|
|
2511
|
+
/** What the runtime reported, when it said why the turn failed. */
|
|
2512
|
+
readonly failure: Schema.optional<Schema.Struct<{
|
|
2513
|
+
readonly code: Schema.String;
|
|
2514
|
+
readonly message: Schema.String;
|
|
2515
|
+
}>>;
|
|
2516
|
+
readonly failureReason: Schema.Literals<readonly ["approval_required", "repository_changed", "runtime_failed", "turn_rejected"]>;
|
|
2517
|
+
readonly state: Schema.Literal<"failed">;
|
|
2518
|
+
}>, Schema.Struct<{
|
|
2519
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
2520
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
2521
|
+
readonly byteLength: Schema.Int;
|
|
2522
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
2523
|
+
readonly name: Schema.String;
|
|
2524
|
+
readonly sha256: Schema.String;
|
|
2525
|
+
}>>>;
|
|
2526
|
+
readonly createdAt: Schema.String;
|
|
2527
|
+
readonly id: Schema.String;
|
|
2528
|
+
readonly input: Schema.Struct<{
|
|
2529
|
+
readonly text: Schema.String;
|
|
2530
|
+
readonly type: Schema.Literal<"text">;
|
|
2531
|
+
}>;
|
|
2532
|
+
readonly revision: Schema.String;
|
|
2533
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
2534
|
+
readonly sessionId: Schema.String;
|
|
2535
|
+
readonly sessionRevision: Schema.String;
|
|
2536
|
+
readonly updatedAt: Schema.String;
|
|
2537
|
+
readonly failure: Schema.optional<Schema.Struct<{
|
|
2538
|
+
readonly code: Schema.String;
|
|
2539
|
+
readonly message: Schema.String;
|
|
2540
|
+
}>>;
|
|
2541
|
+
readonly failureReason: Schema.Literals<readonly ["output_limit_exceeded", "protocol_invalid", "runtime_exited", "turn_deadline_exceeded"]>;
|
|
2542
|
+
readonly state: Schema.Literal<"outcome-unknown">;
|
|
2543
|
+
}>, Schema.Struct<{
|
|
2544
|
+
/** The files sent with the turn; absent when it carried none. */
|
|
2545
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
2546
|
+
readonly byteLength: Schema.Int;
|
|
2547
|
+
readonly mediaType: Schema.Literals<readonly ["image/gif", "image/jpeg", "image/png", "image/webp"]>;
|
|
2548
|
+
readonly name: Schema.String;
|
|
2549
|
+
readonly sha256: Schema.String;
|
|
2550
|
+
}>>>;
|
|
2551
|
+
readonly createdAt: Schema.String;
|
|
2552
|
+
readonly id: Schema.String;
|
|
2553
|
+
readonly input: Schema.Struct<{
|
|
2554
|
+
readonly text: Schema.String;
|
|
2555
|
+
readonly type: Schema.Literal<"text">;
|
|
2556
|
+
}>;
|
|
2557
|
+
readonly revision: Schema.String;
|
|
2558
|
+
readonly schemaVersion: Schema.Literal<1>;
|
|
2559
|
+
readonly sessionId: Schema.String;
|
|
2560
|
+
readonly sessionRevision: Schema.String;
|
|
2561
|
+
readonly updatedAt: Schema.String;
|
|
2562
|
+
readonly state: Schema.Literal<"interrupted">;
|
|
2563
|
+
}>]>;
|
|
1723
2564
|
}>, Schema.Struct<{
|
|
1724
2565
|
readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
|
|
1725
2566
|
readonly method: Schema.Literal<"turn.interrupt">;
|
|
@@ -1909,6 +2750,7 @@ export declare const turnSuccessResultEffectSchema: Schema.Union<readonly [Schem
|
|
|
1909
2750
|
}>, Schema.Struct<{
|
|
1910
2751
|
readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
|
|
1911
2752
|
readonly method: Schema.Literal<"turn.send">;
|
|
2753
|
+
readonly path: Schema.optional<Schema.Literals<readonly ["interrupt-restart", "native"]>>;
|
|
1912
2754
|
readonly receipt: Schema.Struct<{
|
|
1913
2755
|
readonly actorId: Schema.String;
|
|
1914
2756
|
readonly aggregateRevision: Schema.String;
|
|
@@ -1926,6 +2768,7 @@ export declare const turnSuccessResultEffectSchema: Schema.Union<readonly [Schem
|
|
|
1926
2768
|
}>;
|
|
1927
2769
|
readonly updatedAt: Schema.String;
|
|
1928
2770
|
}>;
|
|
2771
|
+
readonly sourceTurnId: Schema.optional<Schema.String>;
|
|
1929
2772
|
readonly turn: Schema.Union<readonly [Schema.Struct<{
|
|
1930
2773
|
/** The files sent with the turn; absent when it carried none. */
|
|
1931
2774
|
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|