@namzu/sdk 52.1.0 → 52.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +1 -1
  3. package/dist/bridge/a2a/mapper.d.ts.map +1 -1
  4. package/dist/bridge/a2a/mapper.js +3 -0
  5. package/dist/bridge/a2a/mapper.js.map +1 -1
  6. package/dist/bridge/sse/mapper.d.ts.map +1 -1
  7. package/dist/bridge/sse/mapper.js +18 -0
  8. package/dist/bridge/sse/mapper.js.map +1 -1
  9. package/dist/connector/tools/adapter.d.ts +2 -2
  10. package/dist/contracts/a2a.d.ts +92 -92
  11. package/dist/contracts/session/api.d.ts +1 -1
  12. package/dist/contracts/session/api.d.ts.map +1 -1
  13. package/dist/index.d.ts +4 -2
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +2 -1
  16. package/dist/index.js.map +1 -1
  17. package/dist/manager/resident/learning.d.ts +6 -6
  18. package/dist/manager/resident/store.d.ts +4 -4
  19. package/dist/pals/activity/subscription-schema.d.ts +48 -48
  20. package/dist/pals/channels/routing.d.ts +1 -1
  21. package/dist/pals/channels/schema.d.ts +7 -7
  22. package/dist/pals/communication/ingress-schema.d.ts +224 -224
  23. package/dist/pals/communication/schema.d.ts +18 -18
  24. package/dist/peers/protocol.d.ts +36 -36
  25. package/dist/public-runtime.d.ts +2 -1
  26. package/dist/public-runtime.d.ts.map +1 -1
  27. package/dist/public-runtime.js +1 -1
  28. package/dist/public-runtime.js.map +1 -1
  29. package/dist/public-tools.d.ts +3 -1
  30. package/dist/public-tools.d.ts.map +1 -1
  31. package/dist/public-tools.js +7 -1
  32. package/dist/public-tools.js.map +1 -1
  33. package/dist/runtime/jobs/awaited-jobs.d.ts +59 -2
  34. package/dist/runtime/jobs/awaited-jobs.d.ts.map +1 -1
  35. package/dist/runtime/jobs/awaited-jobs.js +108 -5
  36. package/dist/runtime/jobs/awaited-jobs.js.map +1 -1
  37. package/dist/runtime/jobs/monitor-stream.d.ts +96 -0
  38. package/dist/runtime/jobs/monitor-stream.d.ts.map +1 -0
  39. package/dist/runtime/jobs/monitor-stream.js +221 -0
  40. package/dist/runtime/jobs/monitor-stream.js.map +1 -0
  41. package/dist/runtime/jobs/registry.d.ts +96 -0
  42. package/dist/runtime/jobs/registry.d.ts.map +1 -1
  43. package/dist/runtime/jobs/registry.js +203 -20
  44. package/dist/runtime/jobs/registry.js.map +1 -1
  45. package/dist/runtime/query/executor.d.ts +10 -0
  46. package/dist/runtime/query/executor.d.ts.map +1 -1
  47. package/dist/runtime/query/executor.js +7 -0
  48. package/dist/runtime/query/executor.js.map +1 -1
  49. package/dist/runtime/query/index.d.ts +18 -0
  50. package/dist/runtime/query/index.d.ts.map +1 -1
  51. package/dist/runtime/query/index.js +94 -3
  52. package/dist/runtime/query/index.js.map +1 -1
  53. package/dist/runtime/query/iteration/outstanding-work.d.ts +14 -0
  54. package/dist/runtime/query/iteration/outstanding-work.d.ts.map +1 -1
  55. package/dist/runtime/query/iteration/outstanding-work.js +64 -3
  56. package/dist/runtime/query/iteration/outstanding-work.js.map +1 -1
  57. package/dist/runtime/query/iteration/phases/context.d.ts +9 -0
  58. package/dist/runtime/query/iteration/phases/context.d.ts.map +1 -1
  59. package/dist/runtime/query/iteration/phases/context.js.map +1 -1
  60. package/dist/runtime/query/iteration/phases/tool-review.d.ts.map +1 -1
  61. package/dist/runtime/query/iteration/phases/tool-review.js +11 -2
  62. package/dist/runtime/query/iteration/phases/tool-review.js.map +1 -1
  63. package/dist/runtime/query/release-turn.d.ts.map +1 -1
  64. package/dist/runtime/query/release-turn.js +35 -0
  65. package/dist/runtime/query/release-turn.js.map +1 -1
  66. package/dist/runtime/query/steering.d.ts +35 -0
  67. package/dist/runtime/query/steering.d.ts.map +1 -1
  68. package/dist/runtime/query/steering.js +121 -0
  69. package/dist/runtime/query/steering.js.map +1 -1
  70. package/dist/runtime/query/tooling.d.ts +5 -0
  71. package/dist/runtime/query/tooling.d.ts.map +1 -1
  72. package/dist/runtime/query/tooling.js +5 -0
  73. package/dist/runtime/query/tooling.js.map +1 -1
  74. package/dist/runtime/system-events.d.ts +9 -0
  75. package/dist/runtime/system-events.d.ts.map +1 -1
  76. package/dist/runtime/system-events.js +12 -0
  77. package/dist/runtime/system-events.js.map +1 -1
  78. package/dist/tools/builtins/bash.d.ts +3 -0
  79. package/dist/tools/builtins/bash.d.ts.map +1 -1
  80. package/dist/tools/builtins/bash.js +3 -2
  81. package/dist/tools/builtins/bash.js.map +1 -1
  82. package/dist/tools/builtins/browser.d.ts +4 -4
  83. package/dist/tools/builtins/code-analysis.d.ts +49 -0
  84. package/dist/tools/builtins/code-analysis.d.ts.map +1 -0
  85. package/dist/tools/builtins/code-analysis.js +409 -0
  86. package/dist/tools/builtins/code-analysis.js.map +1 -0
  87. package/dist/tools/builtins/computer-use.d.ts +24 -24
  88. package/dist/tools/builtins/index.d.ts +2 -0
  89. package/dist/tools/builtins/index.d.ts.map +1 -1
  90. package/dist/tools/builtins/index.js +2 -0
  91. package/dist/tools/builtins/index.js.map +1 -1
  92. package/dist/tools/builtins/job.d.ts.map +1 -1
  93. package/dist/tools/builtins/job.js +6 -2
  94. package/dist/tools/builtins/job.js.map +1 -1
  95. package/dist/tools/builtins/lsp.d.ts +1 -1
  96. package/dist/tools/builtins/monitor.d.ts +24 -0
  97. package/dist/tools/builtins/monitor.d.ts.map +1 -0
  98. package/dist/tools/builtins/monitor.js +167 -0
  99. package/dist/tools/builtins/monitor.js.map +1 -0
  100. package/dist/tools/builtins/skill.d.ts +2 -2
  101. package/dist/tools/builtins/wait-for-job.d.ts +1 -1
  102. package/dist/turn/reporter.d.ts.map +1 -1
  103. package/dist/turn/reporter.js +8 -0
  104. package/dist/turn/reporter.js.map +1 -1
  105. package/dist/types/code-analysis/index.d.ts +299 -0
  106. package/dist/types/code-analysis/index.d.ts.map +1 -0
  107. package/dist/types/code-analysis/index.js +30 -0
  108. package/dist/types/code-analysis/index.js.map +1 -0
  109. package/dist/types/plugin/index.d.ts +6 -6
  110. package/dist/types/session/events.d.ts +30 -4
  111. package/dist/types/session/events.d.ts.map +1 -1
  112. package/dist/types/session/events.js +6 -1
  113. package/dist/types/session/events.js.map +1 -1
  114. package/dist/types/session/records.d.ts +129 -129
  115. package/dist/types/session/records.d.ts.map +1 -1
  116. package/dist/types/session/records.js +3 -2
  117. package/dist/types/session/records.js.map +1 -1
  118. package/dist/types/tool/index.d.ts +34 -0
  119. package/dist/types/tool/index.d.ts.map +1 -1
  120. package/dist/types/tool/index.js.map +1 -1
  121. package/package.json +2 -2
  122. package/src/bridge/a2a/mapper.ts +3 -0
  123. package/src/bridge/sse/mapper.ts +18 -0
  124. package/src/contracts/session/api.ts +1 -0
  125. package/src/index.ts +23 -0
  126. package/src/public-runtime.ts +28 -0
  127. package/src/public-tools.ts +16 -0
  128. package/src/runtime/jobs/awaited-jobs.ts +127 -5
  129. package/src/runtime/jobs/monitor-stream.ts +269 -0
  130. package/src/runtime/jobs/registry.ts +286 -21
  131. package/src/runtime/query/executor.ts +17 -0
  132. package/src/runtime/query/index.ts +119 -3
  133. package/src/runtime/query/iteration/outstanding-work.ts +64 -3
  134. package/src/runtime/query/iteration/phases/context.ts +9 -0
  135. package/src/runtime/query/iteration/phases/tool-review.ts +21 -9
  136. package/src/runtime/query/release-turn.ts +33 -0
  137. package/src/runtime/query/steering.ts +144 -0
  138. package/src/runtime/query/tooling.ts +10 -0
  139. package/src/runtime/system-events.ts +17 -0
  140. package/src/tools/builtins/bash.ts +3 -2
  141. package/src/tools/builtins/code-analysis.ts +486 -0
  142. package/src/tools/builtins/index.ts +11 -0
  143. package/src/tools/builtins/job.ts +11 -2
  144. package/src/tools/builtins/monitor.ts +206 -0
  145. package/src/turn/reporter.ts +8 -0
  146. package/src/types/code-analysis/index.ts +325 -0
  147. package/src/types/session/events.ts +31 -4
  148. package/src/types/session/records.ts +3 -2
  149. package/src/types/tool/index.ts +33 -1
@@ -378,15 +378,15 @@ export declare const SessionStartedRecordSchema: z.ZodObject<{
378
378
  round?: number | undefined;
379
379
  }>>;
380
380
  }, "strict", z.ZodTypeAny, {
381
+ id: string & import("../ids/brand.js").IdBrand<"RecordId">;
382
+ type: "session_started";
381
383
  agent: {
382
384
  id: string;
383
385
  name: string;
384
386
  type?: string | undefined;
385
387
  };
386
388
  v: 1;
387
- type: "session_started";
388
389
  cwd: string;
389
- id: string & import("../ids/brand.js").IdBrand<"RecordId">;
390
390
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
391
391
  projectId: string & import("../ids/brand.js").IdBrand<"ProjectId">;
392
392
  seq: number;
@@ -437,13 +437,13 @@ export declare const SessionStartedRecordSchema: z.ZodObject<{
437
437
  seq: number;
438
438
  } | null | undefined;
439
439
  }, {
440
+ type: "session_started";
440
441
  agent: {
441
442
  id: string;
442
443
  name: string;
443
444
  type?: string | undefined;
444
445
  };
445
446
  v: 1;
446
- type: "session_started";
447
447
  cwd: string;
448
448
  seq: number;
449
449
  ts: string;
@@ -858,9 +858,9 @@ export declare const SessionUpdatedRecordSchema: z.ZodObject<{
858
858
  }[] | undefined;
859
859
  }>>;
860
860
  }, "strict", z.ZodTypeAny, {
861
- v: 1;
862
- type: "session_updated";
863
861
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
862
+ type: "session_updated";
863
+ v: 1;
864
864
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
865
865
  seq: number;
866
866
  ts: string;
@@ -947,7 +947,7 @@ export declare const SessionUpdatedRecordSchema: z.ZodObject<{
947
947
  offset: number;
948
948
  seq: number;
949
949
  } | null | undefined;
950
- titleSource?: "derived" | "named" | undefined;
950
+ titleSource?: "named" | "derived" | undefined;
951
951
  archived?: boolean | undefined;
952
952
  approvalPolicy?: string | undefined;
953
953
  externalRefs?: {
@@ -963,8 +963,8 @@ export declare const SessionUpdatedRecordSchema: z.ZodObject<{
963
963
  }[] | undefined;
964
964
  } | undefined;
965
965
  }, {
966
- v: 1;
967
966
  type: "session_updated";
967
+ v: 1;
968
968
  seq: number;
969
969
  ts: string;
970
970
  prev: {
@@ -974,8 +974,8 @@ export declare const SessionUpdatedRecordSchema: z.ZodObject<{
974
974
  seq: number;
975
975
  } | null;
976
976
  gen: number;
977
- title?: string | undefined;
978
977
  id?: unknown;
978
+ title?: string | undefined;
979
979
  turnId?: unknown;
980
980
  sessionId?: unknown;
981
981
  harness?: {
@@ -1052,7 +1052,7 @@ export declare const SessionUpdatedRecordSchema: z.ZodObject<{
1052
1052
  offset: number;
1053
1053
  seq: number;
1054
1054
  } | null | undefined;
1055
- titleSource?: "derived" | "named" | undefined;
1055
+ titleSource?: "named" | "derived" | undefined;
1056
1056
  archived?: boolean | undefined;
1057
1057
  approvalPolicy?: string | undefined;
1058
1058
  externalRefs?: {
@@ -1183,9 +1183,9 @@ export declare const TurnStartedRecordSchema: z.ZodObject<{
1183
1183
  rootTurnId?: unknown;
1184
1184
  }>>;
1185
1185
  }, "strict", z.ZodTypeAny, {
1186
- v: 1;
1187
- type: "turn_started";
1188
1186
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
1187
+ type: "turn_started";
1188
+ v: 1;
1189
1189
  turnId: string & import("../ids/brand.js").IdBrand<"TurnId">;
1190
1190
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
1191
1191
  seq: number;
@@ -1230,8 +1230,8 @@ export declare const TurnStartedRecordSchema: z.ZodObject<{
1230
1230
  seq: number;
1231
1231
  } | null | undefined;
1232
1232
  }, {
1233
- v: 1;
1234
1233
  type: "turn_started";
1234
+ v: 1;
1235
1235
  seq: number;
1236
1236
  config: {
1237
1237
  model: string;
@@ -1356,12 +1356,12 @@ export declare const TurnPausedRecordSchema: z.ZodObject<{
1356
1356
  message: z.ZodString;
1357
1357
  hint: z.ZodString;
1358
1358
  }, "strict", z.ZodTypeAny, {
1359
- message: string;
1360
1359
  id: string;
1360
+ message: string;
1361
1361
  hint: string;
1362
1362
  }, {
1363
- message: string;
1364
1363
  id: string;
1364
+ message: string;
1365
1365
  hint: string;
1366
1366
  }>>;
1367
1367
  budget: z.ZodOptional<z.ZodObject<{
@@ -1409,9 +1409,9 @@ export declare const TurnPausedRecordSchema: z.ZodObject<{
1409
1409
  detail?: Record<string, string> | undefined;
1410
1410
  }>>;
1411
1411
  }, "strict", z.ZodTypeAny, {
1412
- v: 1;
1413
- type: "turn_paused";
1414
1412
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
1413
+ type: "turn_paused";
1414
+ v: 1;
1415
1415
  turnId: string & import("../ids/brand.js").IdBrand<"TurnId">;
1416
1416
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
1417
1417
  checkpointId: string & import("../ids/brand.js").IdBrand<"CheckpointId">;
@@ -1452,8 +1452,8 @@ export declare const TurnPausedRecordSchema: z.ZodObject<{
1452
1452
  providerId: z.ZodString;
1453
1453
  }, z.ZodTypeAny, "passthrough"> | undefined;
1454
1454
  explanation?: {
1455
- message: string;
1456
1455
  id: string;
1456
+ message: string;
1457
1457
  hint: string;
1458
1458
  } | undefined;
1459
1459
  prevText?: {
@@ -1463,8 +1463,8 @@ export declare const TurnPausedRecordSchema: z.ZodObject<{
1463
1463
  seq: number;
1464
1464
  } | null | undefined;
1465
1465
  }, {
1466
- v: 1;
1467
1466
  type: "turn_paused";
1467
+ v: 1;
1468
1468
  seq: number;
1469
1469
  reason: string;
1470
1470
  ts: string;
@@ -1475,12 +1475,12 @@ export declare const TurnPausedRecordSchema: z.ZodObject<{
1475
1475
  seq: number;
1476
1476
  } | null;
1477
1477
  gen: number;
1478
+ id?: unknown;
1478
1479
  handoff?: {
1479
1480
  kind: "human-required";
1480
1481
  reason: string;
1481
1482
  detail?: Record<string, string> | undefined;
1482
1483
  } | undefined;
1483
- id?: unknown;
1484
1484
  turnId?: unknown;
1485
1485
  sessionId?: unknown;
1486
1486
  checkpointId?: unknown;
@@ -1506,8 +1506,8 @@ export declare const TurnPausedRecordSchema: z.ZodObject<{
1506
1506
  providerId: z.ZodString;
1507
1507
  }, z.ZodTypeAny, "passthrough"> | undefined;
1508
1508
  explanation?: {
1509
- message: string;
1510
1509
  id: string;
1510
+ message: string;
1511
1511
  hint: string;
1512
1512
  } | undefined;
1513
1513
  prevText?: {
@@ -1566,9 +1566,9 @@ export declare const TurnResumingRecordSchema: z.ZodObject<{
1566
1566
  fromCheckpointId: z.ZodType<CheckpointId, z.ZodTypeDef, unknown>;
1567
1567
  resolvedDecisionId: z.ZodOptional<z.ZodString>;
1568
1568
  }, "strict", z.ZodTypeAny, {
1569
- v: 1;
1570
- type: "turn_resuming";
1571
1569
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
1570
+ type: "turn_resuming";
1571
+ v: 1;
1572
1572
  turnId: string & import("../ids/brand.js").IdBrand<"TurnId">;
1573
1573
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
1574
1574
  seq: number;
@@ -1589,8 +1589,8 @@ export declare const TurnResumingRecordSchema: z.ZodObject<{
1589
1589
  seq: number;
1590
1590
  } | null | undefined;
1591
1591
  }, {
1592
- v: 1;
1593
1592
  type: "turn_resuming";
1593
+ v: 1;
1594
1594
  seq: number;
1595
1595
  ts: string;
1596
1596
  prev: {
@@ -1841,9 +1841,9 @@ export declare const TurnCompletedRecordSchema: z.ZodObject<{
1841
1841
  servingProvider?: string | undefined;
1842
1842
  }>;
1843
1843
  }, "strict", z.ZodTypeAny, {
1844
- v: 1;
1845
- type: "turn_completed";
1846
1844
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
1845
+ type: "turn_completed";
1846
+ v: 1;
1847
1847
  result: string;
1848
1848
  turnId: string & import("../ids/brand.js").IdBrand<"TurnId">;
1849
1849
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
@@ -1914,8 +1914,8 @@ export declare const TurnCompletedRecordSchema: z.ZodObject<{
1914
1914
  bytes: number;
1915
1915
  } | undefined;
1916
1916
  }, {
1917
- v: 1;
1918
1917
  type: "turn_completed";
1918
+ v: 1;
1919
1919
  result: string;
1920
1920
  seq: number;
1921
1921
  settlement: {
@@ -2065,12 +2065,12 @@ export declare const TurnFailedRecordSchema: z.ZodObject<{
2065
2065
  message: z.ZodString;
2066
2066
  hint: z.ZodString;
2067
2067
  }, "strict", z.ZodTypeAny, {
2068
- message: string;
2069
2068
  id: string;
2069
+ message: string;
2070
2070
  hint: string;
2071
2071
  }, {
2072
- message: string;
2073
2072
  id: string;
2073
+ message: string;
2074
2074
  hint: string;
2075
2075
  }>>;
2076
2076
  budget: z.ZodOptional<z.ZodObject<{
@@ -2208,9 +2208,9 @@ export declare const TurnFailedRecordSchema: z.ZodObject<{
2208
2208
  servingProvider?: string | undefined;
2209
2209
  }>;
2210
2210
  }, "strict", z.ZodTypeAny, {
2211
- v: 1;
2212
- type: "turn_failed";
2213
2211
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
2212
+ type: "turn_failed";
2213
+ v: 1;
2214
2214
  error: string;
2215
2215
  turnId: string & import("../ids/brand.js").IdBrand<"TurnId">;
2216
2216
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
@@ -2271,8 +2271,8 @@ export declare const TurnFailedRecordSchema: z.ZodObject<{
2271
2271
  providerId: z.ZodString;
2272
2272
  }, z.ZodTypeAny, "passthrough"> | undefined;
2273
2273
  explanation?: {
2274
- message: string;
2275
2274
  id: string;
2275
+ message: string;
2276
2276
  hint: string;
2277
2277
  } | undefined;
2278
2278
  prevText?: {
@@ -2282,8 +2282,8 @@ export declare const TurnFailedRecordSchema: z.ZodObject<{
2282
2282
  seq: number;
2283
2283
  } | null | undefined;
2284
2284
  }, {
2285
- v: 1;
2286
2285
  type: "turn_failed";
2286
+ v: 1;
2287
2287
  error: string;
2288
2288
  seq: number;
2289
2289
  settlement: {
@@ -2345,8 +2345,8 @@ export declare const TurnFailedRecordSchema: z.ZodObject<{
2345
2345
  providerId: z.ZodString;
2346
2346
  }, z.ZodTypeAny, "passthrough"> | undefined;
2347
2347
  explanation?: {
2348
- message: string;
2349
2348
  id: string;
2349
+ message: string;
2350
2350
  hint: string;
2351
2351
  } | undefined;
2352
2352
  prevText?: {
@@ -2424,9 +2424,9 @@ export declare const MessageRecordSchema: z.ZodObject<{
2424
2424
  bytes: number;
2425
2425
  }>>;
2426
2426
  }, "strict", z.ZodTypeAny, {
2427
- v: 1;
2428
- type: "message";
2429
2427
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
2428
+ type: "message";
2429
+ v: 1;
2430
2430
  content: Message;
2431
2431
  turnId: string & import("../ids/brand.js").IdBrand<"TurnId">;
2432
2432
  messageId: string & import("../ids/brand.js").IdBrand<"MessageId">;
@@ -2455,8 +2455,8 @@ export declare const MessageRecordSchema: z.ZodObject<{
2455
2455
  bytes: number;
2456
2456
  } | undefined;
2457
2457
  }, {
2458
- v: 1;
2459
2458
  type: "message";
2459
+ v: 1;
2460
2460
  content: Message;
2461
2461
  seq: number;
2462
2462
  ts: string;
@@ -2468,8 +2468,8 @@ export declare const MessageRecordSchema: z.ZodObject<{
2468
2468
  } | null;
2469
2469
  gen: number;
2470
2470
  role: "user" | "tool" | "assistant" | "system";
2471
- kind?: "prompt" | "context" | "steering" | "auto-continuation" | undefined;
2472
2471
  id?: unknown;
2472
+ kind?: "prompt" | "context" | "steering" | "auto-continuation" | undefined;
2473
2473
  turnId?: unknown;
2474
2474
  messageId?: unknown;
2475
2475
  sessionId?: unknown;
@@ -2557,9 +2557,9 @@ export declare const MessageReplacedRecordSchema: z.ZodObject<{
2557
2557
  }>>;
2558
2558
  reason: z.ZodEnum<["pin-slot", "guardrail_blocked", "guardrail_rewritten", "review", "outstanding_work", "structured_output", "history-repair"]>;
2559
2559
  }, "strict", z.ZodTypeAny, {
2560
- v: 1;
2561
- type: "message_replaced";
2562
2560
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
2561
+ type: "message_replaced";
2562
+ v: 1;
2563
2563
  content: Message;
2564
2564
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
2565
2565
  seq: number;
@@ -2587,8 +2587,8 @@ export declare const MessageReplacedRecordSchema: z.ZodObject<{
2587
2587
  bytes: number;
2588
2588
  } | undefined;
2589
2589
  }, {
2590
- v: 1;
2591
2590
  type: "message_replaced";
2591
+ v: 1;
2592
2592
  content: Message;
2593
2593
  seq: number;
2594
2594
  reason: "review" | "pin-slot" | "guardrail_blocked" | "guardrail_rewritten" | "outstanding_work" | "structured_output" | "history-repair";
@@ -2673,9 +2673,9 @@ export declare const CheckpointWrittenRecordSchema: z.ZodObject<{
2673
2673
  docSha256: z.ZodString;
2674
2674
  }, "strict", z.ZodTypeAny, {
2675
2675
  path: string;
2676
- v: 1;
2677
- type: "checkpoint_written";
2678
2676
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
2677
+ type: "checkpoint_written";
2678
+ v: 1;
2679
2679
  turnId: string & import("../ids/brand.js").IdBrand<"TurnId">;
2680
2680
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
2681
2681
  checkpointId: string & import("../ids/brand.js").IdBrand<"CheckpointId">;
@@ -2700,8 +2700,8 @@ export declare const CheckpointWrittenRecordSchema: z.ZodObject<{
2700
2700
  } | null | undefined;
2701
2701
  }, {
2702
2702
  path: string;
2703
- v: 1;
2704
2703
  type: "checkpoint_written";
2704
+ v: 1;
2705
2705
  iteration: number;
2706
2706
  throughSeq: number;
2707
2707
  throughSha256: string;
@@ -2779,9 +2779,9 @@ export declare const CheckpointPrunedRecordSchema: z.ZodObject<{
2779
2779
  } & {
2780
2780
  checkpointIds: z.ZodArray<z.ZodType<CheckpointId, z.ZodTypeDef, unknown>, "many">;
2781
2781
  }, "strict", z.ZodTypeAny, {
2782
- v: 1;
2783
- type: "checkpoint_pruned";
2784
2782
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
2783
+ type: "checkpoint_pruned";
2784
+ v: 1;
2785
2785
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
2786
2786
  seq: number;
2787
2787
  ts: string;
@@ -2801,8 +2801,8 @@ export declare const CheckpointPrunedRecordSchema: z.ZodObject<{
2801
2801
  seq: number;
2802
2802
  } | null | undefined;
2803
2803
  }, {
2804
- v: 1;
2805
2804
  type: "checkpoint_pruned";
2805
+ v: 1;
2806
2806
  seq: number;
2807
2807
  ts: string;
2808
2808
  prev: {
@@ -2874,9 +2874,9 @@ export declare const DecisionRequestedRecordSchema: z.ZodObject<{
2874
2874
  request: z.ZodType<HITLDecisionRequest, z.ZodTypeDef, HITLDecisionRequest>;
2875
2875
  deadlineAt: z.ZodOptional<z.ZodString>;
2876
2876
  }, "strict", z.ZodTypeAny, {
2877
- v: 1;
2878
- type: "decision_requested";
2879
2877
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
2878
+ type: "decision_requested";
2879
+ v: 1;
2880
2880
  request: HITLDecisionRequest;
2881
2881
  turnId: string & import("../ids/brand.js").IdBrand<"TurnId">;
2882
2882
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
@@ -2899,8 +2899,8 @@ export declare const DecisionRequestedRecordSchema: z.ZodObject<{
2899
2899
  } | null | undefined;
2900
2900
  deadlineAt?: string | undefined;
2901
2901
  }, {
2902
- v: 1;
2903
2902
  type: "decision_requested";
2903
+ v: 1;
2904
2904
  request: HITLDecisionRequest;
2905
2905
  seq: number;
2906
2906
  ts: string;
@@ -2974,9 +2974,9 @@ export declare const DecisionResolvedRecordSchema: z.ZodObject<{
2974
2974
  decision: z.ZodType<HITLResumeDecision, z.ZodTypeDef, HITLResumeDecision>;
2975
2975
  resolvedBy: z.ZodType<ActorRef, z.ZodTypeDef, ActorRef>;
2976
2976
  }, "strict", z.ZodTypeAny, {
2977
- v: 1;
2978
- type: "decision_resolved";
2979
2977
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
2978
+ type: "decision_resolved";
2979
+ v: 1;
2980
2980
  turnId: string & import("../ids/brand.js").IdBrand<"TurnId">;
2981
2981
  decision: HITLResumeDecision;
2982
2982
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
@@ -2998,8 +2998,8 @@ export declare const DecisionResolvedRecordSchema: z.ZodObject<{
2998
2998
  seq: number;
2999
2999
  } | null | undefined;
3000
3000
  }, {
3001
- v: 1;
3002
3001
  type: "decision_resolved";
3002
+ v: 1;
3003
3003
  decision: HITLResumeDecision;
3004
3004
  seq: number;
3005
3005
  ts: string;
@@ -3070,9 +3070,9 @@ export declare const DecisionExpiredRecordSchema: z.ZodObject<{
3070
3070
  } & {
3071
3071
  decisionId: z.ZodString;
3072
3072
  }, "strict", z.ZodTypeAny, {
3073
- v: 1;
3074
- type: "decision_expired";
3075
3073
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
3074
+ type: "decision_expired";
3075
+ v: 1;
3076
3076
  turnId: string & import("../ids/brand.js").IdBrand<"TurnId">;
3077
3077
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
3078
3078
  seq: number;
@@ -3092,8 +3092,8 @@ export declare const DecisionExpiredRecordSchema: z.ZodObject<{
3092
3092
  seq: number;
3093
3093
  } | null | undefined;
3094
3094
  }, {
3095
- v: 1;
3096
3095
  type: "decision_expired";
3096
+ v: 1;
3097
3097
  seq: number;
3098
3098
  ts: string;
3099
3099
  prev: {
@@ -3194,6 +3194,8 @@ export declare const CompactionRecordSchema: z.ZodObject<{
3194
3194
  tokensBefore: z.ZodNumber;
3195
3195
  tokensAfter: z.ZodNumber;
3196
3196
  }, "strict", z.ZodTypeAny, {
3197
+ id: string & import("../ids/brand.js").IdBrand<"RecordId">;
3198
+ type: "compaction";
3197
3199
  summary: Message[] | {
3198
3200
  path: string;
3199
3201
  sha256: string;
@@ -3201,8 +3203,6 @@ export declare const CompactionRecordSchema: z.ZodObject<{
3201
3203
  bytes: number;
3202
3204
  };
3203
3205
  v: 1;
3204
- type: "compaction";
3205
- id: string & import("../ids/brand.js").IdBrand<"RecordId">;
3206
3206
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
3207
3207
  strategy: string;
3208
3208
  seq: number;
@@ -3229,6 +3229,7 @@ export declare const CompactionRecordSchema: z.ZodObject<{
3229
3229
  } | null | undefined;
3230
3230
  pinned?: MessageId[] | undefined;
3231
3231
  }, {
3232
+ type: "compaction";
3232
3233
  summary: Message[] | {
3233
3234
  path: string;
3234
3235
  sha256: string;
@@ -3236,7 +3237,6 @@ export declare const CompactionRecordSchema: z.ZodObject<{
3236
3237
  bytes: number;
3237
3238
  };
3238
3239
  v: 1;
3239
- type: "compaction";
3240
3240
  strategy: string;
3241
3241
  seq: number;
3242
3242
  tokensBefore: number;
@@ -3331,10 +3331,10 @@ export declare const ChildSessionSpawnedRecordSchema: z.ZodObject<{
3331
3331
  budgetAccountId: z.ZodOptional<z.ZodString>;
3332
3332
  }, "strict", z.ZodTypeAny, {
3333
3333
  path: string;
3334
- v: 1;
3334
+ id: string & import("../ids/brand.js").IdBrand<"RecordId">;
3335
3335
  type: "child_session_spawned";
3336
+ v: 1;
3336
3337
  kind: "agent_spawn" | "user_handoff" | "intervention";
3337
- id: string & import("../ids/brand.js").IdBrand<"RecordId">;
3338
3338
  turnId: string & import("../ids/brand.js").IdBrand<"TurnId">;
3339
3339
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
3340
3340
  seq: number;
@@ -3363,8 +3363,8 @@ export declare const ChildSessionSpawnedRecordSchema: z.ZodObject<{
3363
3363
  } | null | undefined;
3364
3364
  }, {
3365
3365
  path: string;
3366
- v: 1;
3367
3366
  type: "child_session_spawned";
3367
+ v: 1;
3368
3368
  kind: "agent_spawn" | "user_handoff" | "intervention";
3369
3369
  seq: number;
3370
3370
  description: string;
@@ -3448,9 +3448,9 @@ export declare const ChildSessionMessagedRecordSchema: z.ZodObject<{
3448
3448
  childSessionId: z.ZodType<SessionId, z.ZodTypeDef, unknown>;
3449
3449
  messageId: z.ZodType<MessageId, z.ZodTypeDef, unknown>;
3450
3450
  }, "strict", z.ZodTypeAny, {
3451
- v: 1;
3452
- type: "child_session_messaged";
3453
3451
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
3452
+ type: "child_session_messaged";
3453
+ v: 1;
3454
3454
  messageId: string & import("../ids/brand.js").IdBrand<"MessageId">;
3455
3455
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
3456
3456
  seq: number;
@@ -3471,8 +3471,8 @@ export declare const ChildSessionMessagedRecordSchema: z.ZodObject<{
3471
3471
  seq: number;
3472
3472
  } | null | undefined;
3473
3473
  }, {
3474
- v: 1;
3475
3474
  type: "child_session_messaged";
3475
+ v: 1;
3476
3476
  seq: number;
3477
3477
  ts: string;
3478
3478
  prev: {
@@ -3547,9 +3547,9 @@ export declare const ChildSessionIdledRecordSchema: z.ZodObject<{
3547
3547
  } & {
3548
3548
  childSessionId: z.ZodType<SessionId, z.ZodTypeDef, unknown>;
3549
3549
  }, "strict", z.ZodTypeAny, {
3550
- v: 1;
3551
- type: "child_session_idled";
3552
3550
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
3551
+ type: "child_session_idled";
3552
+ v: 1;
3553
3553
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
3554
3554
  seq: number;
3555
3555
  childSessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
@@ -3569,8 +3569,8 @@ export declare const ChildSessionIdledRecordSchema: z.ZodObject<{
3569
3569
  seq: number;
3570
3570
  } | null | undefined;
3571
3571
  }, {
3572
- v: 1;
3573
3572
  type: "child_session_idled";
3573
+ v: 1;
3574
3574
  seq: number;
3575
3575
  ts: string;
3576
3576
  prev: {
@@ -3688,10 +3688,10 @@ export declare const ChildSessionEndedRecordSchema: z.ZodObject<{
3688
3688
  outputCostPer1M?: number | undefined;
3689
3689
  }>;
3690
3690
  }, "strict", z.ZodTypeAny, {
3691
+ id: string & import("../ids/brand.js").IdBrand<"RecordId">;
3692
+ type: "child_session_ended";
3691
3693
  v: 1;
3692
3694
  status: "failed" | "cancelled" | "pending" | "completed" | "running" | "idle";
3693
- type: "child_session_ended";
3694
- id: string & import("../ids/brand.js").IdBrand<"RecordId">;
3695
3695
  usage: {
3696
3696
  promptTokens: number;
3697
3697
  completionTokens: number;
@@ -3728,9 +3728,9 @@ export declare const ChildSessionEndedRecordSchema: z.ZodObject<{
3728
3728
  } | null | undefined;
3729
3729
  resultMessageId?: MessageId | undefined;
3730
3730
  }, {
3731
+ type: "child_session_ended";
3731
3732
  v: 1;
3732
3733
  status: "failed" | "cancelled" | "pending" | "completed" | "running" | "idle";
3733
- type: "child_session_ended";
3734
3734
  usage: {
3735
3735
  promptTokens: number;
3736
3736
  completionTokens: number;
@@ -3860,9 +3860,9 @@ export declare const AuditRecordSchema: z.ZodObject<{
3860
3860
  traceId: z.ZodOptional<z.ZodString>;
3861
3861
  spanId: z.ZodOptional<z.ZodString>;
3862
3862
  }, "strict", z.ZodTypeAny, {
3863
- v: 1;
3864
- type: "audit";
3865
3863
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
3864
+ type: "audit";
3865
+ v: 1;
3866
3866
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
3867
3867
  seq: number;
3868
3868
  action: string;
@@ -3898,8 +3898,8 @@ export declare const AuditRecordSchema: z.ZodObject<{
3898
3898
  persona?: string | undefined;
3899
3899
  resource?: string | undefined;
3900
3900
  }, {
3901
- v: 1;
3902
3901
  type: "audit";
3902
+ v: 1;
3903
3903
  seq: number;
3904
3904
  action: string;
3905
3905
  ts: string;
@@ -3913,8 +3913,8 @@ export declare const AuditRecordSchema: z.ZodObject<{
3913
3913
  auditId: string;
3914
3914
  actor: ActorRef;
3915
3915
  outcome: "failure" | "success" | "refused" | "approved";
3916
- tool?: string | undefined;
3917
3916
  id?: unknown;
3917
+ tool?: string | undefined;
3918
3918
  turnId?: unknown;
3919
3919
  sessionId?: unknown;
3920
3920
  traceId?: string | undefined;
@@ -3986,9 +3986,9 @@ export declare const BudgetBoundRecordSchema: z.ZodObject<{
3986
3986
  rootTurnId: z.ZodType<TurnId, z.ZodTypeDef, unknown>;
3987
3987
  accountId: z.ZodString;
3988
3988
  }, "strict", z.ZodTypeAny, {
3989
- v: 1;
3990
- type: "budget_bound";
3991
3989
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
3990
+ type: "budget_bound";
3991
+ v: 1;
3992
3992
  turnId: string & import("../ids/brand.js").IdBrand<"TurnId">;
3993
3993
  rootSessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
3994
3994
  rootTurnId: string & import("../ids/brand.js").IdBrand<"TurnId">;
@@ -4010,8 +4010,8 @@ export declare const BudgetBoundRecordSchema: z.ZodObject<{
4010
4010
  seq: number;
4011
4011
  } | null | undefined;
4012
4012
  }, {
4013
- v: 1;
4014
4013
  type: "budget_bound";
4014
+ v: 1;
4015
4015
  accountId: string;
4016
4016
  seq: number;
4017
4017
  ts: string;
@@ -4088,9 +4088,9 @@ export declare const LogRepairedRecordSchema: z.ZodObject<{
4088
4088
  truncatedBytes: z.ZodNumber;
4089
4089
  lastGoodSeq: z.ZodNumber;
4090
4090
  }, "strict", z.ZodTypeAny, {
4091
- v: 1;
4092
- type: "log_repaired";
4093
4091
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
4092
+ type: "log_repaired";
4093
+ v: 1;
4094
4094
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
4095
4095
  seq: number;
4096
4096
  ts: string;
@@ -4111,8 +4111,8 @@ export declare const LogRepairedRecordSchema: z.ZodObject<{
4111
4111
  seq: number;
4112
4112
  } | null | undefined;
4113
4113
  }, {
4114
- v: 1;
4115
4114
  type: "log_repaired";
4115
+ v: 1;
4116
4116
  seq: number;
4117
4117
  ts: string;
4118
4118
  prev: {
@@ -4283,15 +4283,15 @@ declare const RECORD_ONLY_SCHEMAS: {
4283
4283
  round?: number | undefined;
4284
4284
  }>>;
4285
4285
  }, "strict", z.ZodTypeAny, {
4286
+ id: string & import("../ids/brand.js").IdBrand<"RecordId">;
4287
+ type: "session_started";
4286
4288
  agent: {
4287
4289
  id: string;
4288
4290
  name: string;
4289
4291
  type?: string | undefined;
4290
4292
  };
4291
4293
  v: 1;
4292
- type: "session_started";
4293
4294
  cwd: string;
4294
- id: string & import("../ids/brand.js").IdBrand<"RecordId">;
4295
4295
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
4296
4296
  projectId: string & import("../ids/brand.js").IdBrand<"ProjectId">;
4297
4297
  seq: number;
@@ -4342,13 +4342,13 @@ declare const RECORD_ONLY_SCHEMAS: {
4342
4342
  seq: number;
4343
4343
  } | null | undefined;
4344
4344
  }, {
4345
+ type: "session_started";
4345
4346
  agent: {
4346
4347
  id: string;
4347
4348
  name: string;
4348
4349
  type?: string | undefined;
4349
4350
  };
4350
4351
  v: 1;
4351
- type: "session_started";
4352
4352
  cwd: string;
4353
4353
  seq: number;
4354
4354
  ts: string;
@@ -4763,9 +4763,9 @@ declare const RECORD_ONLY_SCHEMAS: {
4763
4763
  }[] | undefined;
4764
4764
  }>>;
4765
4765
  }, "strict", z.ZodTypeAny, {
4766
- v: 1;
4767
- type: "session_updated";
4768
4766
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
4767
+ type: "session_updated";
4768
+ v: 1;
4769
4769
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
4770
4770
  seq: number;
4771
4771
  ts: string;
@@ -4852,7 +4852,7 @@ declare const RECORD_ONLY_SCHEMAS: {
4852
4852
  offset: number;
4853
4853
  seq: number;
4854
4854
  } | null | undefined;
4855
- titleSource?: "derived" | "named" | undefined;
4855
+ titleSource?: "named" | "derived" | undefined;
4856
4856
  archived?: boolean | undefined;
4857
4857
  approvalPolicy?: string | undefined;
4858
4858
  externalRefs?: {
@@ -4868,8 +4868,8 @@ declare const RECORD_ONLY_SCHEMAS: {
4868
4868
  }[] | undefined;
4869
4869
  } | undefined;
4870
4870
  }, {
4871
- v: 1;
4872
4871
  type: "session_updated";
4872
+ v: 1;
4873
4873
  seq: number;
4874
4874
  ts: string;
4875
4875
  prev: {
@@ -4879,8 +4879,8 @@ declare const RECORD_ONLY_SCHEMAS: {
4879
4879
  seq: number;
4880
4880
  } | null;
4881
4881
  gen: number;
4882
- title?: string | undefined;
4883
4882
  id?: unknown;
4883
+ title?: string | undefined;
4884
4884
  turnId?: unknown;
4885
4885
  sessionId?: unknown;
4886
4886
  harness?: {
@@ -4957,7 +4957,7 @@ declare const RECORD_ONLY_SCHEMAS: {
4957
4957
  offset: number;
4958
4958
  seq: number;
4959
4959
  } | null | undefined;
4960
- titleSource?: "derived" | "named" | undefined;
4960
+ titleSource?: "named" | "derived" | undefined;
4961
4961
  archived?: boolean | undefined;
4962
4962
  approvalPolicy?: string | undefined;
4963
4963
  externalRefs?: {
@@ -5040,9 +5040,9 @@ declare const RECORD_ONLY_SCHEMAS: {
5040
5040
  bytes: number;
5041
5041
  }>>;
5042
5042
  }, "strict", z.ZodTypeAny, {
5043
- v: 1;
5044
- type: "message";
5045
5043
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
5044
+ type: "message";
5045
+ v: 1;
5046
5046
  content: Message;
5047
5047
  turnId: string & import("../ids/brand.js").IdBrand<"TurnId">;
5048
5048
  messageId: string & import("../ids/brand.js").IdBrand<"MessageId">;
@@ -5071,8 +5071,8 @@ declare const RECORD_ONLY_SCHEMAS: {
5071
5071
  bytes: number;
5072
5072
  } | undefined;
5073
5073
  }, {
5074
- v: 1;
5075
5074
  type: "message";
5075
+ v: 1;
5076
5076
  content: Message;
5077
5077
  seq: number;
5078
5078
  ts: string;
@@ -5084,8 +5084,8 @@ declare const RECORD_ONLY_SCHEMAS: {
5084
5084
  } | null;
5085
5085
  gen: number;
5086
5086
  role: "user" | "tool" | "assistant" | "system";
5087
- kind?: "prompt" | "context" | "steering" | "auto-continuation" | undefined;
5088
5087
  id?: unknown;
5088
+ kind?: "prompt" | "context" | "steering" | "auto-continuation" | undefined;
5089
5089
  turnId?: unknown;
5090
5090
  messageId?: unknown;
5091
5091
  sessionId?: unknown;
@@ -5173,9 +5173,9 @@ declare const RECORD_ONLY_SCHEMAS: {
5173
5173
  }>>;
5174
5174
  reason: z.ZodEnum<["pin-slot", "guardrail_blocked", "guardrail_rewritten", "review", "outstanding_work", "structured_output", "history-repair"]>;
5175
5175
  }, "strict", z.ZodTypeAny, {
5176
- v: 1;
5177
- type: "message_replaced";
5178
5176
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
5177
+ type: "message_replaced";
5178
+ v: 1;
5179
5179
  content: Message;
5180
5180
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
5181
5181
  seq: number;
@@ -5203,8 +5203,8 @@ declare const RECORD_ONLY_SCHEMAS: {
5203
5203
  bytes: number;
5204
5204
  } | undefined;
5205
5205
  }, {
5206
- v: 1;
5207
5206
  type: "message_replaced";
5207
+ v: 1;
5208
5208
  content: Message;
5209
5209
  seq: number;
5210
5210
  reason: "review" | "pin-slot" | "guardrail_blocked" | "guardrail_rewritten" | "outstanding_work" | "structured_output" | "history-repair";
@@ -5288,9 +5288,9 @@ declare const RECORD_ONLY_SCHEMAS: {
5288
5288
  docSha256: z.ZodString;
5289
5289
  }, "strict", z.ZodTypeAny, {
5290
5290
  path: string;
5291
- v: 1;
5292
- type: "checkpoint_written";
5293
5291
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
5292
+ type: "checkpoint_written";
5293
+ v: 1;
5294
5294
  turnId: string & import("../ids/brand.js").IdBrand<"TurnId">;
5295
5295
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
5296
5296
  checkpointId: string & import("../ids/brand.js").IdBrand<"CheckpointId">;
@@ -5315,8 +5315,8 @@ declare const RECORD_ONLY_SCHEMAS: {
5315
5315
  } | null | undefined;
5316
5316
  }, {
5317
5317
  path: string;
5318
- v: 1;
5319
5318
  type: "checkpoint_written";
5319
+ v: 1;
5320
5320
  iteration: number;
5321
5321
  throughSeq: number;
5322
5322
  throughSha256: string;
@@ -5394,9 +5394,9 @@ declare const RECORD_ONLY_SCHEMAS: {
5394
5394
  } & {
5395
5395
  checkpointIds: z.ZodArray<z.ZodType<CheckpointId, z.ZodTypeDef, unknown>, "many">;
5396
5396
  }, "strict", z.ZodTypeAny, {
5397
- v: 1;
5398
- type: "checkpoint_pruned";
5399
5397
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
5398
+ type: "checkpoint_pruned";
5399
+ v: 1;
5400
5400
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
5401
5401
  seq: number;
5402
5402
  ts: string;
@@ -5416,8 +5416,8 @@ declare const RECORD_ONLY_SCHEMAS: {
5416
5416
  seq: number;
5417
5417
  } | null | undefined;
5418
5418
  }, {
5419
- v: 1;
5420
5419
  type: "checkpoint_pruned";
5420
+ v: 1;
5421
5421
  seq: number;
5422
5422
  ts: string;
5423
5423
  prev: {
@@ -5489,9 +5489,9 @@ declare const RECORD_ONLY_SCHEMAS: {
5489
5489
  request: z.ZodType<HITLDecisionRequest, z.ZodTypeDef, HITLDecisionRequest>;
5490
5490
  deadlineAt: z.ZodOptional<z.ZodString>;
5491
5491
  }, "strict", z.ZodTypeAny, {
5492
- v: 1;
5493
- type: "decision_requested";
5494
5492
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
5493
+ type: "decision_requested";
5494
+ v: 1;
5495
5495
  request: HITLDecisionRequest;
5496
5496
  turnId: string & import("../ids/brand.js").IdBrand<"TurnId">;
5497
5497
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
@@ -5514,8 +5514,8 @@ declare const RECORD_ONLY_SCHEMAS: {
5514
5514
  } | null | undefined;
5515
5515
  deadlineAt?: string | undefined;
5516
5516
  }, {
5517
- v: 1;
5518
5517
  type: "decision_requested";
5518
+ v: 1;
5519
5519
  request: HITLDecisionRequest;
5520
5520
  seq: number;
5521
5521
  ts: string;
@@ -5589,9 +5589,9 @@ declare const RECORD_ONLY_SCHEMAS: {
5589
5589
  decision: z.ZodType<HITLResumeDecision, z.ZodTypeDef, HITLResumeDecision>;
5590
5590
  resolvedBy: z.ZodType<ActorRef, z.ZodTypeDef, ActorRef>;
5591
5591
  }, "strict", z.ZodTypeAny, {
5592
- v: 1;
5593
- type: "decision_resolved";
5594
5592
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
5593
+ type: "decision_resolved";
5594
+ v: 1;
5595
5595
  turnId: string & import("../ids/brand.js").IdBrand<"TurnId">;
5596
5596
  decision: HITLResumeDecision;
5597
5597
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
@@ -5613,8 +5613,8 @@ declare const RECORD_ONLY_SCHEMAS: {
5613
5613
  seq: number;
5614
5614
  } | null | undefined;
5615
5615
  }, {
5616
- v: 1;
5617
5616
  type: "decision_resolved";
5617
+ v: 1;
5618
5618
  decision: HITLResumeDecision;
5619
5619
  seq: number;
5620
5620
  ts: string;
@@ -5685,9 +5685,9 @@ declare const RECORD_ONLY_SCHEMAS: {
5685
5685
  } & {
5686
5686
  decisionId: z.ZodString;
5687
5687
  }, "strict", z.ZodTypeAny, {
5688
- v: 1;
5689
- type: "decision_expired";
5690
5688
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
5689
+ type: "decision_expired";
5690
+ v: 1;
5691
5691
  turnId: string & import("../ids/brand.js").IdBrand<"TurnId">;
5692
5692
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
5693
5693
  seq: number;
@@ -5707,8 +5707,8 @@ declare const RECORD_ONLY_SCHEMAS: {
5707
5707
  seq: number;
5708
5708
  } | null | undefined;
5709
5709
  }, {
5710
- v: 1;
5711
5710
  type: "decision_expired";
5711
+ v: 1;
5712
5712
  seq: number;
5713
5713
  ts: string;
5714
5714
  prev: {
@@ -5805,6 +5805,8 @@ declare const RECORD_ONLY_SCHEMAS: {
5805
5805
  tokensBefore: z.ZodNumber;
5806
5806
  tokensAfter: z.ZodNumber;
5807
5807
  }, "strict", z.ZodTypeAny, {
5808
+ id: string & import("../ids/brand.js").IdBrand<"RecordId">;
5809
+ type: "compaction";
5808
5810
  summary: Message[] | {
5809
5811
  path: string;
5810
5812
  sha256: string;
@@ -5812,8 +5814,6 @@ declare const RECORD_ONLY_SCHEMAS: {
5812
5814
  bytes: number;
5813
5815
  };
5814
5816
  v: 1;
5815
- type: "compaction";
5816
- id: string & import("../ids/brand.js").IdBrand<"RecordId">;
5817
5817
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
5818
5818
  strategy: string;
5819
5819
  seq: number;
@@ -5840,6 +5840,7 @@ declare const RECORD_ONLY_SCHEMAS: {
5840
5840
  } | null | undefined;
5841
5841
  pinned?: MessageId[] | undefined;
5842
5842
  }, {
5843
+ type: "compaction";
5843
5844
  summary: Message[] | {
5844
5845
  path: string;
5845
5846
  sha256: string;
@@ -5847,7 +5848,6 @@ declare const RECORD_ONLY_SCHEMAS: {
5847
5848
  bytes: number;
5848
5849
  };
5849
5850
  v: 1;
5850
- type: "compaction";
5851
5851
  strategy: string;
5852
5852
  seq: number;
5853
5853
  tokensBefore: number;
@@ -5972,10 +5972,10 @@ declare const RECORD_ONLY_SCHEMAS: {
5972
5972
  outputCostPer1M?: number | undefined;
5973
5973
  }>;
5974
5974
  }, "strict", z.ZodTypeAny, {
5975
+ id: string & import("../ids/brand.js").IdBrand<"RecordId">;
5976
+ type: "child_session_ended";
5975
5977
  v: 1;
5976
5978
  status: "failed" | "cancelled" | "pending" | "completed" | "running" | "idle";
5977
- type: "child_session_ended";
5978
- id: string & import("../ids/brand.js").IdBrand<"RecordId">;
5979
5979
  usage: {
5980
5980
  promptTokens: number;
5981
5981
  completionTokens: number;
@@ -6012,9 +6012,9 @@ declare const RECORD_ONLY_SCHEMAS: {
6012
6012
  } | null | undefined;
6013
6013
  resultMessageId?: MessageId | undefined;
6014
6014
  }, {
6015
+ type: "child_session_ended";
6015
6016
  v: 1;
6016
6017
  status: "failed" | "cancelled" | "pending" | "completed" | "running" | "idle";
6017
- type: "child_session_ended";
6018
6018
  usage: {
6019
6019
  promptTokens: number;
6020
6020
  completionTokens: number;
@@ -6138,9 +6138,9 @@ declare const RECORD_ONLY_SCHEMAS: {
6138
6138
  traceId: z.ZodOptional<z.ZodString>;
6139
6139
  spanId: z.ZodOptional<z.ZodString>;
6140
6140
  }, "strict", z.ZodTypeAny, {
6141
- v: 1;
6142
- type: "audit";
6143
6141
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
6142
+ type: "audit";
6143
+ v: 1;
6144
6144
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
6145
6145
  seq: number;
6146
6146
  action: string;
@@ -6176,8 +6176,8 @@ declare const RECORD_ONLY_SCHEMAS: {
6176
6176
  persona?: string | undefined;
6177
6177
  resource?: string | undefined;
6178
6178
  }, {
6179
- v: 1;
6180
6179
  type: "audit";
6180
+ v: 1;
6181
6181
  seq: number;
6182
6182
  action: string;
6183
6183
  ts: string;
@@ -6191,8 +6191,8 @@ declare const RECORD_ONLY_SCHEMAS: {
6191
6191
  auditId: string;
6192
6192
  actor: ActorRef;
6193
6193
  outcome: "failure" | "success" | "refused" | "approved";
6194
- tool?: string | undefined;
6195
6194
  id?: unknown;
6195
+ tool?: string | undefined;
6196
6196
  turnId?: unknown;
6197
6197
  sessionId?: unknown;
6198
6198
  traceId?: string | undefined;
@@ -6264,9 +6264,9 @@ declare const RECORD_ONLY_SCHEMAS: {
6264
6264
  rootTurnId: z.ZodType<TurnId, z.ZodTypeDef, unknown>;
6265
6265
  accountId: z.ZodString;
6266
6266
  }, "strict", z.ZodTypeAny, {
6267
- v: 1;
6268
- type: "budget_bound";
6269
6267
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
6268
+ type: "budget_bound";
6269
+ v: 1;
6270
6270
  turnId: string & import("../ids/brand.js").IdBrand<"TurnId">;
6271
6271
  rootSessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
6272
6272
  rootTurnId: string & import("../ids/brand.js").IdBrand<"TurnId">;
@@ -6288,8 +6288,8 @@ declare const RECORD_ONLY_SCHEMAS: {
6288
6288
  seq: number;
6289
6289
  } | null | undefined;
6290
6290
  }, {
6291
- v: 1;
6292
6291
  type: "budget_bound";
6292
+ v: 1;
6293
6293
  accountId: string;
6294
6294
  seq: number;
6295
6295
  ts: string;
@@ -6366,9 +6366,9 @@ declare const RECORD_ONLY_SCHEMAS: {
6366
6366
  truncatedBytes: z.ZodNumber;
6367
6367
  lastGoodSeq: z.ZodNumber;
6368
6368
  }, "strict", z.ZodTypeAny, {
6369
- v: 1;
6370
- type: "log_repaired";
6371
6369
  id: string & import("../ids/brand.js").IdBrand<"RecordId">;
6370
+ type: "log_repaired";
6371
+ v: 1;
6372
6372
  sessionId: string & import("../ids/brand.js").IdBrand<"SessionId">;
6373
6373
  seq: number;
6374
6374
  ts: string;
@@ -6389,8 +6389,8 @@ declare const RECORD_ONLY_SCHEMAS: {
6389
6389
  seq: number;
6390
6390
  } | null | undefined;
6391
6391
  }, {
6392
- v: 1;
6393
6392
  type: "log_repaired";
6393
+ v: 1;
6394
6394
  seq: number;
6395
6395
  ts: string;
6396
6396
  prev: {
@@ -6414,9 +6414,9 @@ declare const RECORD_ONLY_SCHEMAS: {
6414
6414
  }>;
6415
6415
  };
6416
6416
  export type SessionRecordOnlyType = keyof typeof RECORD_ONLY_SCHEMAS;
6417
- /** All 62 live event type literals. */
6417
+ /** All 63 live event type literals. */
6418
6418
  export declare const SESSION_EVENT_TYPES: readonly SessionEventType[];
6419
- /** The 58 event types a session log records. */
6419
+ /** The 58 event types a session log records: all 63 but the five ephemeral ones. */
6420
6420
  export declare const PERSISTED_SESSION_EVENT_TYPES: readonly PersistedSessionEventType[];
6421
6421
  /** Every `type` a session log may hold: the persisted event types and the record-only types. */
6422
6422
  export declare const SESSION_RECORD_TYPES: readonly SessionRecordType[];