@makaio/framework 1.0.0-dev-1783282710723 → 1.0.0-dev-1783355411417

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 (144) hide show
  1. package/dist/.makaio-build.json +2 -2
  2. package/dist/adapter-BRxCc72E.mjs +1 -0
  3. package/dist/adapters/index.d.mts +11 -2
  4. package/dist/adapters/index.mjs +1 -1
  5. package/dist/adapters/node.d.mts +1 -1
  6. package/dist/{base-orchestrator-Cw0vpNgB.d.mts → base-orchestrator-BNysGvaM.d.mts} +70 -2
  7. package/dist/bus/index.mjs +1 -1
  8. package/dist/{client-BcfR-LJC.mjs → client-BgUjVbXX.mjs} +1 -1
  9. package/dist/contracts/adapter/index.d.mts +1 -1
  10. package/dist/contracts/adapter/index.mjs +1 -1
  11. package/dist/contracts/artifact/index.d.mts +1 -1
  12. package/dist/contracts/client/index.d.mts +1 -1
  13. package/dist/contracts/client/index.mjs +1 -1
  14. package/dist/contracts/extension/index.d.mts +3 -3
  15. package/dist/contracts/facet/index.d.mts +1 -1
  16. package/dist/contracts/harness/index.d.mts +1 -1
  17. package/dist/contracts/index.d.mts +24 -24
  18. package/dist/contracts/index.mjs +1 -1
  19. package/dist/contracts/materialization/index.d.mts +3 -3
  20. package/dist/contracts/session/index.d.mts +3 -3
  21. package/dist/contracts/session/index.mjs +1 -1
  22. package/dist/contracts/shared/index.d.mts +1 -1
  23. package/dist/contracts/workflow/index.d.mts +2 -2
  24. package/dist/contracts/workflow/index.mjs +1 -1
  25. package/dist/{definition-DFcxkf2i.d.mts → definition-b9jyJqPD.d.mts} +1 -1
  26. package/dist/drizzle/0021_m_mr8e1j84.sql +3 -0
  27. package/dist/drizzle/0022_m_mr8i4ky3.sql +43 -0
  28. package/dist/drizzle/meta/_journal.json +14 -0
  29. package/dist/{handler-2bPhRn0u.mjs → handler-BFNvtv5t.mjs} +1 -1
  30. package/dist/handlers-v47Gbsr1.mjs +57 -0
  31. package/dist/hooks/index.d.mts +8 -0
  32. package/dist/hooks/index.mjs +1 -1
  33. package/dist/{index-CTEsbp9H.d.mts → index-31vR1sxk.d.mts} +31 -13
  34. package/dist/{index-9b2_jXxq.d.mts → index-3J0HZlPH.d.mts} +372 -87
  35. package/dist/{index-Bh6lHiW4.d.mts → index-3X0368CL.d.mts} +16 -16
  36. package/dist/{index-Y2r0Zvcm.d.mts → index-B5w-0Gg9.d.mts} +4 -4
  37. package/dist/{index-DdBRlm7m.d.mts → index-BKZhnb2B.d.mts} +3 -3
  38. package/dist/{index-gAFwNiJT.d.mts → index-BYfSAJRC.d.mts} +64 -0
  39. package/dist/{index-2fK9iSHI.d.mts → index-BwGfdbI0.d.mts} +9 -9
  40. package/dist/{index-DLy-tc0L.d.mts → index-C5C1tk9f.d.mts} +214 -1
  41. package/dist/{index-CL2T6LVv.d.mts → index-C6Ys8pxt.d.mts} +9 -9
  42. package/dist/{index-NkNbYFud.d.mts → index-CaerrEDH.d.mts} +1 -1
  43. package/dist/{index-CfIW5biI.d.mts → index-D7rWAEY0.d.mts} +1 -0
  44. package/dist/{index-CaOWqztb.d.mts → index-DQYj8-53.d.mts} +1 -1
  45. package/dist/{index-Dg-y1mrq.d.mts → index-DV4nRk0h.d.mts} +14 -14
  46. package/dist/{index-GD-i3DW7.d.mts → index-DvHYpi-J.d.mts} +365 -163
  47. package/dist/{index-BMbmoarE.d.mts → index-O08Q2ikz.d.mts} +8 -8
  48. package/dist/kernel/extension/index.d.mts +1 -1
  49. package/dist/kernel/index.d.mts +2 -2
  50. package/dist/kernel/observability/index.d.mts +1 -1
  51. package/dist/{lib-Ba55od_d.mjs → lib-BOmKyjWD.mjs} +1 -1
  52. package/dist/{lib-CM_BUxN8.mjs → lib-DLZYp5z3.mjs} +1 -1
  53. package/dist/{loop-gate-handlers-BLoGCWMQ.mjs → loop-gate-handlers-Bjmat-K3.mjs} +1 -1
  54. package/dist/{namespace-DGAWYjbO.d.mts → namespace-Bm77p82L.d.mts} +5 -5
  55. package/dist/{namespace-LUNf8zo5.d.mts → namespace-D1_9WVCo.d.mts} +157 -0
  56. package/dist/{namespace-BsYKEMd8.d.mts → namespace-DAj_riOn.d.mts} +138 -0
  57. package/dist/{namespace-KMxsPJwm.d.mts → namespace-DhDY0juT.d.mts} +66 -0
  58. package/dist/{namespace-DXW-voCe.d.mts → namespace-DmqoDDRD.d.mts} +158 -22
  59. package/dist/namespace-dFBD2ZmS.mjs +1 -0
  60. package/dist/node/transports/index.mjs +1 -1
  61. package/dist/orchestrator-shared-ChygCvR1.mjs +1 -0
  62. package/dist/{orchestrator-shared-ChOdIgh6.d.mts → orchestrator-shared-DFLb1otg.d.mts} +9 -3
  63. package/dist/package-BmRhhi-3.mjs +1 -0
  64. package/dist/package.json +1 -1
  65. package/dist/runtime-node/index.mjs +1 -1
  66. package/dist/schema-7aKBGB7S.mjs +1 -0
  67. package/dist/{schema-DHlTAy0N.mjs → schema-CHp6I33k.mjs} +1 -1
  68. package/dist/{schema-D1HrnvT7.d.mts → schema-DLNBajAV.d.mts} +23 -1
  69. package/dist/{schemas-DMCGXlKa.d.mts → schemas-DMMWmWjq.d.mts} +3 -3
  70. package/dist/schemas-DZGnr9Tl.mjs +1 -0
  71. package/dist/{schemas-D-9zNyAM2.d.mts → schemas-DuuVuhHX2.d.mts} +2 -2
  72. package/dist/schemas-ftgVeWIG.mjs +1 -0
  73. package/dist/services/context-rules/index.d.mts +6 -6
  74. package/dist/services/filesystem/namespace.d.mts +12 -12
  75. package/dist/services/filesystem/schemas.d.mts +6 -6
  76. package/dist/services/git/namespace.d.mts +4 -4
  77. package/dist/services/git/schemas.d.mts +3 -3
  78. package/dist/services/harness/index.d.mts +1 -1
  79. package/dist/services/harness/index.mjs +1 -1
  80. package/dist/services/index.d.mts +87 -18
  81. package/dist/services/index.mjs +1 -1
  82. package/dist/services/log-import/browser.d.mts +2 -2
  83. package/dist/services/log-import/index.d.mts +73 -6
  84. package/dist/services/log-import/index.mjs +2 -2
  85. package/dist/services/log-import/log-import.d.mts +1 -1
  86. package/dist/services/log-import/log-import.mjs +1 -1
  87. package/dist/services/log-import/namespace.d.mts +54 -0
  88. package/dist/services/log-import/namespace.mjs +1 -1
  89. package/dist/services/log-import/schemas.d.mts +44 -0
  90. package/dist/services/log-import/schemas.mjs +1 -1
  91. package/dist/services/session/handlers/index.d.mts +1 -1
  92. package/dist/services/session/handlers/index.mjs +1 -1
  93. package/dist/services/session/index.d.mts +9 -9
  94. package/dist/services/session/index.mjs +1 -1
  95. package/dist/services/session/messages/namespace.d.mts +1 -1
  96. package/dist/services/session/messages/namespace.mjs +1 -1
  97. package/dist/services/session/orchestrator-testing/index.d.mts +1 -1
  98. package/dist/services/session/orchestrator-testing/index.mjs +1 -1
  99. package/dist/services/session/session-events/namespace.d.mts +1 -1
  100. package/dist/services/session/session-events/namespace.mjs +1 -1
  101. package/dist/services/session/storage/namespace.d.mts +1 -1
  102. package/dist/services/session/storage/schema.d.mts +1 -1
  103. package/dist/services/session/storage/schema.mjs +1 -1
  104. package/dist/services/session/testing/index.mjs +9 -4
  105. package/dist/services/session/testing/orchestrator-shared.d.mts +1 -1
  106. package/dist/services/session/testing/orchestrator-shared.mjs +1 -1
  107. package/dist/services/session/turns/namespace.d.mts +1 -1
  108. package/dist/services/session/turns/namespace.mjs +1 -1
  109. package/dist/services/settings/namespace.d.mts +2 -2
  110. package/dist/services/subagent-template/index.d.mts +1 -1
  111. package/dist/services/subagent-template/schemas.d.mts +1 -1
  112. package/dist/services/tool-approval/index.mjs +1 -1
  113. package/dist/services/tools/index.mjs +1 -1
  114. package/dist/services/turn/index.d.mts +1 -1
  115. package/dist/services/turn/namespace.d.mts +1 -1
  116. package/dist/services/turn/schemas.d.mts +89 -0
  117. package/dist/services/turn/schemas.mjs +1 -1
  118. package/dist/session-CKWfn3oc.mjs +1 -0
  119. package/dist/session-DCbJwYEU.mjs +69 -0
  120. package/dist/storage/drizzle/index.d.mts +1 -1
  121. package/dist/storage/drizzle/index.mjs +1 -1
  122. package/dist/{tool-approval-service-DEQiipxj.mjs → tool-approval-service-MU_DmJsf.mjs} +1 -1
  123. package/dist/tools-BrNm-een.mjs +1 -0
  124. package/dist/{transition-DnXibkhX.d.mts → transition-Dq41YCkc.d.mts} +1 -1
  125. package/dist/{types-BslClRkH.d.mts → types-BMlzmWp6.d.mts} +11 -1
  126. package/dist/{types-Dur8EtpR.d.mts → types-C76EP81O.d.mts} +125 -82
  127. package/dist/ui-components/index.mjs +1 -1
  128. package/dist/{workflow-BqH6ar-D.mjs → workflow-C1z7I5CI.mjs} +1 -1
  129. package/dist/workflow-engine/index.d.mts +1 -1
  130. package/dist/workflow-engine/index.mjs +1 -1
  131. package/dist/workflow-engine/package.mjs +1 -1
  132. package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
  133. package/package.json +1 -1
  134. package/dist/adapter-DaQqmKOJ.mjs +0 -1
  135. package/dist/handlers-BAycjV02.mjs +0 -41
  136. package/dist/namespace-C-piH3w4.mjs +0 -1
  137. package/dist/orchestrator-shared-Cxk3x8Vs.mjs +0 -1
  138. package/dist/package-B1AXe-oz.mjs +0 -1
  139. package/dist/schema-D6WAI8OL.mjs +0 -1
  140. package/dist/schemas-ArqQTC0Q.mjs +0 -1
  141. package/dist/schemas-uID59wR8.mjs +0 -1
  142. package/dist/session-0nWT4st6.mjs +0 -39
  143. package/dist/session-DH-ja8Ka.mjs +0 -1
  144. package/dist/tools-DFOsOboy.mjs +0 -1
@@ -1,5 +1,5 @@
1
1
  import { i as JsonValue$1 } from "./json-value-DtIkQN7g.mjs";
2
- import { s as MessageBlock$1 } from "./index-NkNbYFud.mjs";
2
+ import { s as MessageBlock$1 } from "./index-CaerrEDH.mjs";
3
3
  import * as _$zod from "zod";
4
4
  import { z } from "zod";
5
5
  import * as _$_makaio_core0 from "@makaio/framework/core";
@@ -8,11 +8,11 @@ import * as _$zod_v4_core0 from "zod/v4/core";
8
8
 
9
9
  //#region core/contracts/src/session/schemas/crud.d.ts
10
10
  /**
11
- * Caller-facing fields shared by `session.create` and `session.registerExternal`.
11
+ * Caller-facing fields of `session.create`.
12
12
  *
13
- * Extracted so that both subjects stay in sync changes here are automatically
14
- * reflected in both schemas. Both subjects apply {@link refineSpawningToolCallId}
15
- * over this shape for the `spawningToolCallId` invariant.
13
+ * Kept as a named base shape so subjects that create sessions share one
14
+ * contract; {@link refineSpawningToolCallId} enforces the
15
+ * `spawningToolCallId` invariant over this shape.
16
16
  */
17
17
  declare const SessionCreateBaseSchema: z.ZodObject<{
18
18
  sessionId: z.ZodOptional<z.ZodString>;
@@ -162,8 +162,8 @@ declare const MakaioSessionSchema: z.ZodObject<{
162
162
  lastActivityAt: z.ZodNumber;
163
163
  }, z.core.$strip>>;
164
164
  status: z.ZodEnum<{
165
- discovered: "discovered";
166
165
  closed: "closed";
166
+ discovered: "discovered";
167
167
  active: "active";
168
168
  archived: "archived";
169
169
  }>;
@@ -239,6 +239,7 @@ declare const MakaioSessionSchema: z.ZodObject<{
239
239
  imported: "imported";
240
240
  tracking: "tracking";
241
241
  }>>;
242
+ isSidechain: z.ZodOptional<z.ZodBoolean>;
242
243
  }, z.core.$strip>;
243
244
  /**
244
245
  * Preview data for session list display.
@@ -288,8 +289,8 @@ declare const SessionWithPreviewSchema: z.ZodObject<{
288
289
  lastActivityAt: z.ZodNumber;
289
290
  }, z.core.$strip>>;
290
291
  status: z.ZodEnum<{
291
- discovered: "discovered";
292
292
  closed: "closed";
293
+ discovered: "discovered";
293
294
  active: "active";
294
295
  archived: "archived";
295
296
  }>;
@@ -365,6 +366,7 @@ declare const SessionWithPreviewSchema: z.ZodObject<{
365
366
  imported: "imported";
366
367
  tracking: "tracking";
367
368
  }>>;
369
+ isSidechain: z.ZodOptional<z.ZodBoolean>;
368
370
  preview: z.ZodOptional<z.ZodObject<{
369
371
  messageCount: z.ZodNumber;
370
372
  firstUserMessage: z.ZodNullable<z.ZodString>;
@@ -488,8 +490,8 @@ declare const SessionSnapshotSchema: z.ZodObject<{
488
490
  lastActivityAt: z.ZodNumber;
489
491
  }, z.core.$strip>>;
490
492
  status: z.ZodEnum<{
491
- discovered: "discovered";
492
493
  closed: "closed";
494
+ discovered: "discovered";
493
495
  active: "active";
494
496
  archived: "archived";
495
497
  }>;
@@ -565,6 +567,7 @@ declare const SessionSnapshotSchema: z.ZodObject<{
565
567
  imported: "imported";
566
568
  tracking: "tracking";
567
569
  }>>;
570
+ isSidechain: z.ZodOptional<z.ZodBoolean>;
568
571
  }, z.core.$strip>>;
569
572
  agents: z.ZodArray<z.ZodObject<{
570
573
  agentId: z.ZodString;
@@ -925,6 +928,10 @@ declare const SessionSnapshotSchema: z.ZodObject<{
925
928
  }>;
926
929
  sourceId: z.ZodOptional<z.ZodString>;
927
930
  }, z.core.$strip>>;
931
+ ingestionMarker: z.ZodOptional<z.ZodEnum<{
932
+ live: "live";
933
+ backfill: "backfill";
934
+ }>>;
928
935
  }, z.core.$strip>;
929
936
  }, z.core.$strip>, z.ZodObject<{
930
937
  sessionId: z.ZodString;
@@ -957,6 +964,10 @@ declare const SessionSnapshotSchema: z.ZodObject<{
957
964
  }>;
958
965
  sourceId: z.ZodOptional<z.ZodString>;
959
966
  }, z.core.$strip>>;
967
+ ingestionMarker: z.ZodOptional<z.ZodEnum<{
968
+ live: "live";
969
+ backfill: "backfill";
970
+ }>>;
960
971
  }, z.core.$strip>;
961
972
  }, z.core.$strip>, z.ZodObject<{
962
973
  sessionId: z.ZodString;
@@ -1166,7 +1177,7 @@ declare const SessionMessageOriginSchema: z.ZodEnum<{
1166
1177
  voice: "voice";
1167
1178
  compact: "compact";
1168
1179
  }>;
1169
- type SessionMessageOrigin = z.infer<typeof SessionMessageOriginSchema>;
1180
+ type SessionMessageOrigin$1 = z.infer<typeof SessionMessageOriginSchema>;
1170
1181
  /**
1171
1182
  * A stored message in a session conversation.
1172
1183
  *
@@ -1293,7 +1304,7 @@ declare const TurnUsageSchema$1: z.ZodObject<{
1293
1304
  cost: z.ZodOptional<z.ZodNumber>;
1294
1305
  }, z.core.$strip>>>;
1295
1306
  }, z.core.$strip>;
1296
- type TurnUsage = z.infer<typeof TurnUsageSchema$1>;
1307
+ type TurnUsage$1 = z.infer<typeof TurnUsageSchema$1>;
1297
1308
  /**
1298
1309
  * Identifies the origin of a turn for loop prevention and audit.
1299
1310
  *
@@ -1378,6 +1389,30 @@ type MessageRouting = z.infer<typeof MessageRoutingSchema$1>;
1378
1389
  //#region core/contracts/src/session/schemas/orchestrator.d.ts
1379
1390
  /** Parsed type for {@link TurnInitiatorSchema}. */
1380
1391
  type TurnInitiator$1 = z.infer<typeof TurnInitiatorSchema$1>;
1392
+ /**
1393
+ * How a `session.turn.*` event entered the system.
1394
+ *
1395
+ * - `'live'` — the turn is ingested as it happens: managed orchestration
1396
+ * (session.sendMessage driving the turn) or a hook-triggered import of the
1397
+ * turn that just finished in an observed client.
1398
+ * - `'backfill'` — the turn is replayed from history: watcher discovery of an
1399
+ * existing transcript or an on-demand import of past sessions.
1400
+ *
1401
+ * This is an **emission property, not a session property**. The same observed
1402
+ * session can be live-followed today and backfilled for yesterday, so the
1403
+ * marker describes each individual emission and must never be persisted on the
1404
+ * turns table. Session classification lives on the session row instead
1405
+ * (`source` / `adapterName` / `adapterSessionId`).
1406
+ *
1407
+ * Orthogonal to {@link TurnInitiatorSchema}, which encodes actor provenance
1408
+ * (user | extension | system) of whoever started the turn.
1409
+ */
1410
+ declare const TurnIngestionMarkerSchema$1: z.ZodEnum<{
1411
+ live: "live";
1412
+ backfill: "backfill";
1413
+ }>;
1414
+ /** Parsed type for {@link TurnIngestionMarkerSchema}. */
1415
+ type TurnIngestionMarker$1 = z.infer<typeof TurnIngestionMarkerSchema$1>;
1381
1416
  /**
1382
1417
  * Orchestrator schemas for turn lifecycle and user message routing.
1383
1418
  *
@@ -2590,6 +2625,10 @@ declare const OrchestratorSchemas: {
2590
2625
  }>;
2591
2626
  sourceId: z.ZodOptional<z.ZodString>;
2592
2627
  }, z.core.$strip>>;
2628
+ ingestionMarker: z.ZodOptional<z.ZodEnum<{
2629
+ live: "live";
2630
+ backfill: "backfill";
2631
+ }>>;
2593
2632
  }, z.core.$strip>;
2594
2633
  /**
2595
2634
  * Turn completed.
@@ -2631,6 +2670,10 @@ declare const OrchestratorSchemas: {
2631
2670
  }>;
2632
2671
  sourceId: z.ZodOptional<z.ZodString>;
2633
2672
  }, z.core.$strip>>;
2673
+ ingestionMarker: z.ZodOptional<z.ZodEnum<{
2674
+ live: "live";
2675
+ backfill: "backfill";
2676
+ }>>;
2634
2677
  }, z.core.$strip>;
2635
2678
  /**
2636
2679
  * Await completion of a specific session turn.
@@ -2677,6 +2720,10 @@ declare const OrchestratorSchemas: {
2677
2720
  }>;
2678
2721
  sourceId: z.ZodOptional<z.ZodString>;
2679
2722
  }, z.core.$strip>>;
2723
+ ingestionMarker: z.ZodOptional<z.ZodEnum<{
2724
+ live: "live";
2725
+ backfill: "backfill";
2726
+ }>>;
2680
2727
  }, z.core.$strip>;
2681
2728
  }, z.core.$strip>;
2682
2729
  };
@@ -2932,6 +2979,8 @@ declare const OrchestratorSchemas: {
2932
2979
  };
2933
2980
  type SendMessageRequest = z.infer<typeof OrchestratorSchemas.sendMessage.request>;
2934
2981
  type SendMessageResponse = z.infer<typeof OrchestratorSchemas.sendMessage.response>;
2982
+ type TurnStarted = z.infer<(typeof OrchestratorSchemas)['turn.started']>;
2983
+ type TurnCompleted = z.infer<(typeof OrchestratorSchemas)['turn.completed']>;
2935
2984
  //#endregion
2936
2985
  //#region core/contracts/src/session/schemas/event.d.ts
2937
2986
  /**
@@ -3168,6 +3217,10 @@ declare const MakaioSessionEventSchema: z.ZodUnion<readonly [z.ZodDiscriminatedU
3168
3217
  }>;
3169
3218
  sourceId: z.ZodOptional<z.ZodString>;
3170
3219
  }, z.core.$strip>>;
3220
+ ingestionMarker: z.ZodOptional<z.ZodEnum<{
3221
+ live: "live";
3222
+ backfill: "backfill";
3223
+ }>>;
3171
3224
  }, z.core.$strip>;
3172
3225
  }, z.core.$strip>, z.ZodObject<{
3173
3226
  sessionId: z.ZodString;
@@ -3200,6 +3253,10 @@ declare const MakaioSessionEventSchema: z.ZodUnion<readonly [z.ZodDiscriminatedU
3200
3253
  }>;
3201
3254
  sourceId: z.ZodOptional<z.ZodString>;
3202
3255
  }, z.core.$strip>>;
3256
+ ingestionMarker: z.ZodOptional<z.ZodEnum<{
3257
+ live: "live";
3258
+ backfill: "backfill";
3259
+ }>>;
3203
3260
  }, z.core.$strip>;
3204
3261
  }, z.core.$strip>, z.ZodObject<{
3205
3262
  sessionId: z.ZodString;
@@ -3320,9 +3377,11 @@ interface SessionEventTypeMap {
3320
3377
  'turn.started': {
3321
3378
  sessionId: string;
3322
3379
  turnId: string;
3380
+ turnNumber: number;
3323
3381
  messageId: string;
3324
3382
  agentIds: string[];
3325
3383
  initiator?: TurnInitiator$1;
3384
+ ingestionMarker?: TurnIngestionMarker$1;
3326
3385
  };
3327
3386
  /**
3328
3387
  * Turn completed event.
@@ -3333,8 +3392,9 @@ interface SessionEventTypeMap {
3333
3392
  turnNumber: number;
3334
3393
  success: boolean;
3335
3394
  error?: string;
3336
- usage?: TurnUsage;
3395
+ usage?: TurnUsage$1;
3337
3396
  initiator?: TurnInitiator$1;
3397
+ ingestionMarker?: TurnIngestionMarker$1;
3338
3398
  };
3339
3399
  /**
3340
3400
  * User message sent to session.
@@ -3392,7 +3452,7 @@ interface SessionEventTypeMap {
3392
3452
  * Runtime validation uses {@link SessionEventTypeSchema} (accepts any string).
3393
3453
  * Compile-time typing is derived from {@link SessionEventTypeMap} keys.
3394
3454
  */
3395
- type SessionEventType = keyof SessionEventTypeMap;
3455
+ type SessionEventType$1 = keyof SessionEventTypeMap;
3396
3456
  /**
3397
3457
  * Get the payload type for a specific session event type.
3398
3458
  * @typeParam T - The event type key
@@ -3402,7 +3462,7 @@ type SessionEventType = keyof SessionEventTypeMap;
3402
3462
  * // { messageId: string; turnId: string | null; role: 'user' | 'assistant' }
3403
3463
  * ```
3404
3464
  */
3405
- type SessionEventPayload<T extends SessionEventType> = SessionEventTypeMap[T];
3465
+ type SessionEventPayload<T extends SessionEventType$1> = SessionEventTypeMap[T];
3406
3466
  //#endregion
3407
3467
  //#region core/contracts/src/session/schemas/fork-child-info.d.ts
3408
3468
  /**
@@ -4795,6 +4855,10 @@ declare const SessionSchemas: {
4795
4855
  }>;
4796
4856
  sourceId: _$zod.ZodOptional<_$zod.ZodString>;
4797
4857
  }, _$zod_v4_core0.$strip>>;
4858
+ ingestionMarker: _$zod.ZodOptional<_$zod.ZodEnum<{
4859
+ live: "live";
4860
+ backfill: "backfill";
4861
+ }>>;
4798
4862
  }, _$zod_v4_core0.$strip>;
4799
4863
  'turn.completed': _$zod.ZodObject<{
4800
4864
  sessionId: _$zod.ZodString;
@@ -4822,6 +4886,10 @@ declare const SessionSchemas: {
4822
4886
  }>;
4823
4887
  sourceId: _$zod.ZodOptional<_$zod.ZodString>;
4824
4888
  }, _$zod_v4_core0.$strip>>;
4889
+ ingestionMarker: _$zod.ZodOptional<_$zod.ZodEnum<{
4890
+ live: "live";
4891
+ backfill: "backfill";
4892
+ }>>;
4825
4893
  }, _$zod_v4_core0.$strip>;
4826
4894
  'turn.await': {
4827
4895
  request: _$zod.ZodObject<{
@@ -4856,6 +4924,10 @@ declare const SessionSchemas: {
4856
4924
  }>;
4857
4925
  sourceId: _$zod.ZodOptional<_$zod.ZodString>;
4858
4926
  }, _$zod_v4_core0.$strip>>;
4927
+ ingestionMarker: _$zod.ZodOptional<_$zod.ZodEnum<{
4928
+ live: "live";
4929
+ backfill: "backfill";
4930
+ }>>;
4859
4931
  }, _$zod_v4_core0.$strip>;
4860
4932
  }, _$zod_v4_core0.$strip>;
4861
4933
  };
@@ -5295,8 +5367,8 @@ declare const SessionSchemas: {
5295
5367
  lastActivityAt: _$zod.ZodNumber;
5296
5368
  }, _$zod_v4_core0.$strip>>;
5297
5369
  status: _$zod.ZodEnum<{
5298
- discovered: "discovered";
5299
5370
  closed: "closed";
5371
+ discovered: "discovered";
5300
5372
  active: "active";
5301
5373
  archived: "archived";
5302
5374
  }>;
@@ -5372,6 +5444,7 @@ declare const SessionSchemas: {
5372
5444
  imported: "imported";
5373
5445
  tracking: "tracking";
5374
5446
  }>>;
5447
+ isSidechain: _$zod.ZodOptional<_$zod.ZodBoolean>;
5375
5448
  }, _$zod_v4_core0.$strip>>;
5376
5449
  agents: _$zod.ZodArray<_$zod.ZodObject<{
5377
5450
  agentId: _$zod.ZodString;
@@ -5732,6 +5805,10 @@ declare const SessionSchemas: {
5732
5805
  }>;
5733
5806
  sourceId: _$zod.ZodOptional<_$zod.ZodString>;
5734
5807
  }, _$zod_v4_core0.$strip>>;
5808
+ ingestionMarker: _$zod.ZodOptional<_$zod.ZodEnum<{
5809
+ live: "live";
5810
+ backfill: "backfill";
5811
+ }>>;
5735
5812
  }, _$zod_v4_core0.$strip>;
5736
5813
  }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
5737
5814
  sessionId: _$zod.ZodString;
@@ -5764,6 +5841,10 @@ declare const SessionSchemas: {
5764
5841
  }>;
5765
5842
  sourceId: _$zod.ZodOptional<_$zod.ZodString>;
5766
5843
  }, _$zod_v4_core0.$strip>>;
5844
+ ingestionMarker: _$zod.ZodOptional<_$zod.ZodEnum<{
5845
+ live: "live";
5846
+ backfill: "backfill";
5847
+ }>>;
5767
5848
  }, _$zod_v4_core0.$strip>;
5768
5849
  }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
5769
5850
  sessionId: _$zod.ZodString;
@@ -5877,8 +5958,8 @@ declare const SessionSchemas: {
5877
5958
  lastActivityAt: _$zod.ZodNumber;
5878
5959
  }, _$zod_v4_core0.$strip>>;
5879
5960
  status: _$zod.ZodEnum<{
5880
- discovered: "discovered";
5881
5961
  closed: "closed";
5962
+ discovered: "discovered";
5882
5963
  active: "active";
5883
5964
  archived: "archived";
5884
5965
  }>;
@@ -5954,6 +6035,7 @@ declare const SessionSchemas: {
5954
6035
  imported: "imported";
5955
6036
  tracking: "tracking";
5956
6037
  }>>;
6038
+ isSidechain: _$zod.ZodOptional<_$zod.ZodBoolean>;
5957
6039
  }, _$zod_v4_core0.$strip>>;
5958
6040
  agents: _$zod.ZodArray<_$zod.ZodObject<{
5959
6041
  agentId: _$zod.ZodString;
@@ -6314,6 +6396,10 @@ declare const SessionSchemas: {
6314
6396
  }>;
6315
6397
  sourceId: _$zod.ZodOptional<_$zod.ZodString>;
6316
6398
  }, _$zod_v4_core0.$strip>>;
6399
+ ingestionMarker: _$zod.ZodOptional<_$zod.ZodEnum<{
6400
+ live: "live";
6401
+ backfill: "backfill";
6402
+ }>>;
6317
6403
  }, _$zod_v4_core0.$strip>;
6318
6404
  }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
6319
6405
  sessionId: _$zod.ZodString;
@@ -6346,6 +6432,10 @@ declare const SessionSchemas: {
6346
6432
  }>;
6347
6433
  sourceId: _$zod.ZodOptional<_$zod.ZodString>;
6348
6434
  }, _$zod_v4_core0.$strip>>;
6435
+ ingestionMarker: _$zod.ZodOptional<_$zod.ZodEnum<{
6436
+ live: "live";
6437
+ backfill: "backfill";
6438
+ }>>;
6349
6439
  }, _$zod_v4_core0.$strip>;
6350
6440
  }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
6351
6441
  sessionId: _$zod.ZodString;
@@ -6500,8 +6590,8 @@ declare const SessionSchemas: {
6500
6590
  maxTokens: _$zod.ZodNumber;
6501
6591
  percentage: _$zod.ZodNumber;
6502
6592
  level: _$zod.ZodEnum<{
6503
- warn: "warn";
6504
6593
  ok: "ok";
6594
+ warn: "warn";
6505
6595
  critical: "critical";
6506
6596
  }>;
6507
6597
  lastUpdatedAt: _$zod.ZodNumber;
@@ -6737,6 +6827,10 @@ declare const SessionSchemas: {
6737
6827
  }>;
6738
6828
  sourceId: _$zod.ZodOptional<_$zod.ZodString>;
6739
6829
  }, _$zod_v4_core0.$strip>>;
6830
+ ingestionMarker: _$zod.ZodOptional<_$zod.ZodEnum<{
6831
+ live: "live";
6832
+ backfill: "backfill";
6833
+ }>>;
6740
6834
  }, _$zod_v4_core0.$strip>;
6741
6835
  }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
6742
6836
  sessionId: _$zod.ZodString;
@@ -6769,6 +6863,10 @@ declare const SessionSchemas: {
6769
6863
  }>;
6770
6864
  sourceId: _$zod.ZodOptional<_$zod.ZodString>;
6771
6865
  }, _$zod_v4_core0.$strip>>;
6866
+ ingestionMarker: _$zod.ZodOptional<_$zod.ZodEnum<{
6867
+ live: "live";
6868
+ backfill: "backfill";
6869
+ }>>;
6772
6870
  }, _$zod_v4_core0.$strip>;
6773
6871
  }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
6774
6872
  sessionId: _$zod.ZodString;
@@ -6835,8 +6933,8 @@ declare const SessionSchemas: {
6835
6933
  request: _$zod.ZodObject<{
6836
6934
  status: _$zod.ZodOptional<_$zod.ZodEnum<{
6837
6935
  all: "all";
6838
- discovered: "discovered";
6839
6936
  closed: "closed";
6937
+ discovered: "discovered";
6840
6938
  active: "active";
6841
6939
  archived: "archived";
6842
6940
  }>>;
@@ -6883,8 +6981,8 @@ declare const SessionSchemas: {
6883
6981
  lastActivityAt: _$zod.ZodNumber;
6884
6982
  }, _$zod_v4_core0.$strip>>;
6885
6983
  status: _$zod.ZodEnum<{
6886
- discovered: "discovered";
6887
6984
  closed: "closed";
6985
+ discovered: "discovered";
6888
6986
  active: "active";
6889
6987
  archived: "archived";
6890
6988
  }>;
@@ -6960,6 +7058,7 @@ declare const SessionSchemas: {
6960
7058
  imported: "imported";
6961
7059
  tracking: "tracking";
6962
7060
  }>>;
7061
+ isSidechain: _$zod.ZodOptional<_$zod.ZodBoolean>;
6963
7062
  preview: _$zod.ZodOptional<_$zod.ZodObject<{
6964
7063
  messageCount: _$zod.ZodNumber;
6965
7064
  firstUserMessage: _$zod.ZodNullable<_$zod.ZodString>;
@@ -6974,8 +7073,8 @@ declare const SessionSchemas: {
6974
7073
  limit: _$zod.ZodOptional<_$zod.ZodNumber>;
6975
7074
  status: _$zod.ZodOptional<_$zod.ZodEnum<{
6976
7075
  all: "all";
6977
- discovered: "discovered";
6978
7076
  closed: "closed";
7077
+ discovered: "discovered";
6979
7078
  active: "active";
6980
7079
  archived: "archived";
6981
7080
  }>>;
@@ -7019,8 +7118,8 @@ declare const SessionSchemas: {
7019
7118
  lastActivityAt: _$zod.ZodNumber;
7020
7119
  }, _$zod_v4_core0.$strip>>;
7021
7120
  status: _$zod.ZodEnum<{
7022
- discovered: "discovered";
7023
7121
  closed: "closed";
7122
+ discovered: "discovered";
7024
7123
  active: "active";
7025
7124
  archived: "archived";
7026
7125
  }>;
@@ -7096,6 +7195,7 @@ declare const SessionSchemas: {
7096
7195
  imported: "imported";
7097
7196
  tracking: "tracking";
7098
7197
  }>>;
7198
+ isSidechain: _$zod.ZodOptional<_$zod.ZodBoolean>;
7099
7199
  preview: _$zod.ZodOptional<_$zod.ZodObject<{
7100
7200
  messageCount: _$zod.ZodNumber;
7101
7201
  firstUserMessage: _$zod.ZodNullable<_$zod.ZodString>;
@@ -7146,8 +7246,8 @@ declare const SessionSchemas: {
7146
7246
  lastActivityAt: _$zod.ZodNumber;
7147
7247
  }, _$zod_v4_core0.$strip>>;
7148
7248
  status: _$zod.ZodEnum<{
7149
- discovered: "discovered";
7150
7249
  closed: "closed";
7250
+ discovered: "discovered";
7151
7251
  active: "active";
7152
7252
  archived: "archived";
7153
7253
  }>;
@@ -7223,6 +7323,7 @@ declare const SessionSchemas: {
7223
7323
  imported: "imported";
7224
7324
  tracking: "tracking";
7225
7325
  }>>;
7326
+ isSidechain: _$zod.ZodOptional<_$zod.ZodBoolean>;
7226
7327
  }, _$zod_v4_core0.$strip>>;
7227
7328
  }, _$zod_v4_core0.$strip>;
7228
7329
  };
@@ -7385,8 +7486,8 @@ declare const SessionSchemas: {
7385
7486
  lastActivityAt: _$zod.ZodNumber;
7386
7487
  }, _$zod_v4_core0.$strip>>;
7387
7488
  status: _$zod.ZodEnum<{
7388
- discovered: "discovered";
7389
7489
  closed: "closed";
7490
+ discovered: "discovered";
7390
7491
  active: "active";
7391
7492
  archived: "archived";
7392
7493
  }>;
@@ -7462,6 +7563,7 @@ declare const SessionSchemas: {
7462
7563
  imported: "imported";
7463
7564
  tracking: "tracking";
7464
7565
  }>>;
7566
+ isSidechain: _$zod.ZodOptional<_$zod.ZodBoolean>;
7465
7567
  }, _$zod_v4_core0.$strip>>;
7466
7568
  }, _$zod_v4_core0.$strip>;
7467
7569
  };
@@ -7475,65 +7577,6 @@ declare const SessionSchemas: {
7475
7577
  discovered: _$zod.ZodNumber;
7476
7578
  }, _$zod_v4_core0.$strip>;
7477
7579
  };
7478
- registerExternal: {
7479
- request: _$zod.ZodObject<{
7480
- sessionId: _$zod.ZodOptional<_$zod.ZodString>;
7481
- parentSessionId: _$zod.ZodOptional<_$zod.ZodString>;
7482
- contextInheritance: _$zod.ZodOptional<_$zod.ZodEnum<{
7483
- none: "none";
7484
- "parent-history": "parent-history";
7485
- }>>;
7486
- forkPointMessageId: _$zod.ZodOptional<_$zod.ZodString>;
7487
- branchKind: _$zod.ZodOptional<_$zod.ZodEnum<{
7488
- fork: "fork";
7489
- subagent: "subagent";
7490
- compress: "compress";
7491
- branch: "branch";
7492
- rewrite: "rewrite";
7493
- coordinator: "coordinator";
7494
- aside: "aside";
7495
- }>>;
7496
- forkTransforms: _$zod.ZodOptional<_$zod.ZodObject<{
7497
- removedMessageIds: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
7498
- appliedPipeline: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodObject<{
7499
- actionId: _$zod.ZodString;
7500
- options: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodUnknown>>;
7501
- }, _$zod_v4_core0.$strip>>>;
7502
- segments: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodObject<{
7503
- fromMessageId: _$zod.ZodString;
7504
- toMessageId: _$zod.ZodString;
7505
- policy: _$zod.ZodEnum<{
7506
- verbatim: "verbatim";
7507
- summarize: "summarize";
7508
- exclude: "exclude";
7509
- }>;
7510
- stripReasoning: _$zod.ZodOptional<_$zod.ZodBoolean>;
7511
- stripToolOutputs: _$zod.ZodOptional<_$zod.ZodBoolean>;
7512
- overrides: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodLiteral<"exclude">>>;
7513
- summaryText: _$zod.ZodOptional<_$zod.ZodString>;
7514
- }, _$zod_v4_core0.$strip>>>;
7515
- }, _$zod_v4_core0.$strip>>;
7516
- title: _$zod.ZodOptional<_$zod.ZodString>;
7517
- targetWorkingDirectory: _$zod.ZodOptional<_$zod.ZodString>;
7518
- executionTargetId: _$zod.ZodOptional<_$zod.ZodString>;
7519
- metadata: _$zod.ZodOptional<_$zod.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, _$zod_v4_core0.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>>;
7520
- spawningToolCallId: _$zod.ZodOptional<_$zod.ZodString>;
7521
- originWindowId: _$zod.ZodOptional<_$zod.ZodString>;
7522
- adapterName: _$zod.ZodString;
7523
- adapterSessionId: _$zod.ZodString;
7524
- lastClientIdentityObservation: _$zod.ZodOptional<_$zod.ZodObject<{
7525
- clientId: _$zod.ZodString;
7526
- source: _$zod.ZodString;
7527
- kind: _$zod.ZodString;
7528
- observedAt: _$zod.ZodNumber;
7529
- payload: _$zod.ZodType<Record<string, unknown>, Record<string, unknown>, _$zod_v4_core0.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>;
7530
- }, _$zod_v4_core0.$strip>>;
7531
- }, _$zod_v4_core0.$strip>;
7532
- response: _$zod.ZodObject<{
7533
- sessionId: _$zod.ZodString;
7534
- created: _$zod.ZodBoolean;
7535
- }, _$zod_v4_core0.$strip>;
7536
- };
7537
7580
  };
7538
7581
  //#endregion
7539
7582
  //#region core/contracts/src/session/types.d.ts
@@ -7637,4 +7680,4 @@ type KnownSessionEvent = { [K in RuntimeKnownSessionEventType]: SessionEventBase
7637
7680
  */
7638
7681
  declare function isKnownSessionEvent(event: MakaioSessionEvent$1): event is KnownSessionEvent;
7639
7682
  //#endregion
7640
- export { ImportStatus as $, MessageRoutingStatusSchema as A, TurnInitiator$2 as B, SessionEventTypeMap as C, MessageRouting as D, SendMessageResponse as E, SessionMessageOriginSchema as F, TurnUsage as G, TurnSchema$1 as H, SessionMessageRole as I, UsageMetricsSchema as J, TurnUsageSchema$1 as K, SessionMessageRoleSchema as L, SessionMessageBlock$1 as M, SessionMessageBlockSchema as N, MessageRoutingSchema$1 as O, SessionMessageOrigin as P, BranchKindSchema as Q, SessionMessageSchema$1 as R, SessionEventType as S, SendMessageRequest as T, TurnStatus as U, TurnInitiatorSchema$1 as V, TurnStatusSchema$1 as W, AgentRoleSchema as X, AgentRole as Y, BranchKind$1 as Z, ForkChildInfo as _, MakaioSessionAgentSchema$1 as _t, SessionPreviewData as a, SnapshotExportOptionsSchema as at, SESSION_EVENT_TYPES as b, SessionSchemas as c, safeValidateSnapshot as ct, SegmentPolicy as d, SessionPreviewDataSchema as dt, ImportStatusSchema as et, SegmentPolicySchema as f, SessionRecordMetadata as ft, SessionUpdatedEventSchema as g, AgentStatusSchema$1 as gt, SessionUpdatedEvent as h, AgentStatus as ht, MakaioSessionEvent$1 as i, SnapshotExportOptions as it, SessionMessage$1 as j, MessageRoutingStatus as k, ForkTransforms$1 as l, validateSnapshot as lt, SessionCreatedEventSchema as m, SessionWithPreviewSchema as mt, KnownSessionEvent as n, SessionSnapshot as nt, SessionWithPreview as o, SnapshotImportConflictErrorData as ot, SessionCreated as p, SessionRecordMetadataSchema$1 as pt, UsageMetrics as q, MakaioSessionAgent$1 as r, SessionSnapshotSchema as rt, isKnownSessionEvent as s, SnapshotPreviewData as st, IMakaioSession$1 as t, SNAPSHOT_VERSION as tt, ForkTransformsSchema$1 as u, MakaioSessionSchema as ut, ForkChildInfoSchema as v, SessionCreateBase as vt, SessionEventTypeSchema as w, SessionEventPayload as x, MakaioSessionEventSchema as y, SessionCreateBaseSchema as yt, Turn$1 as z };
7683
+ export { AgentRole as $, TurnStarted as A, SessionMessageRole as B, SessionEventTypeMap as C, SessionCreateBaseSchema as Ct, TurnCompleted as D, SendMessageResponse as E, SessionMessage$1 as F, TurnInitiatorSchema$1 as G, SessionMessageSchema$1 as H, SessionMessageBlock$1 as I, TurnStatusSchema$1 as J, TurnSchema$1 as K, SessionMessageBlockSchema as L, MessageRoutingSchema$1 as M, MessageRoutingStatus as N, TurnIngestionMarker$1 as O, MessageRoutingStatusSchema as P, UsageMetricsSchema as Q, SessionMessageOrigin$1 as R, SessionEventType$1 as S, SessionCreateBase as St, SendMessageRequest as T, Turn$1 as U, SessionMessageRoleSchema as V, TurnInitiator$2 as W, TurnUsageSchema$1 as X, TurnUsage$1 as Y, UsageMetrics as Z, ForkChildInfo as _, SessionRecordMetadataSchema$1 as _t, SessionPreviewData as a, SNAPSHOT_VERSION as at, SESSION_EVENT_TYPES as b, AgentStatusSchema$1 as bt, SessionSchemas as c, SnapshotExportOptions as ct, SegmentPolicy as d, SnapshotPreviewData as dt, AgentRoleSchema as et, SegmentPolicySchema as f, safeValidateSnapshot as ft, SessionUpdatedEventSchema as g, SessionRecordMetadata as gt, SessionUpdatedEvent as h, SessionPreviewDataSchema as ht, MakaioSessionEvent$1 as i, ImportStatusSchema as it, MessageRouting as j, TurnIngestionMarkerSchema$1 as k, ForkTransforms$1 as l, SnapshotExportOptionsSchema as lt, SessionCreatedEventSchema as m, MakaioSessionSchema as mt, KnownSessionEvent as n, BranchKindSchema as nt, SessionWithPreview as o, SessionSnapshot as ot, SessionCreated as p, validateSnapshot as pt, TurnStatus as q, MakaioSessionAgent$1 as r, ImportStatus as rt, isKnownSessionEvent as s, SessionSnapshotSchema as st, IMakaioSession$1 as t, BranchKind$1 as tt, ForkTransformsSchema$1 as u, SnapshotImportConflictErrorData as ut, ForkChildInfoSchema as v, SessionWithPreviewSchema as vt, SessionEventTypeSchema as w, SessionEventPayload as x, MakaioSessionAgentSchema$1 as xt, MakaioSessionEventSchema as y, AgentStatus as yt, SessionMessageOriginSchema as z };