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

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 (146) hide show
  1. package/dist/.makaio-build.json +2 -2
  2. package/dist/adapter-Lx6K7yQS.mjs +1 -0
  3. package/dist/adapter-subsystem/index.mjs +1 -1
  4. package/dist/adapters/config/index.d.mts +1 -1
  5. package/dist/adapters/index.d.mts +219 -40
  6. package/dist/adapters/index.mjs +6 -6
  7. package/dist/adapters/node.d.mts +1 -1
  8. package/dist/adapters/node.mjs +1 -1
  9. package/dist/{base-orchestrator-BNysGvaM.d.mts → base-orchestrator-ODRyDBzu.d.mts} +9 -1
  10. package/dist/bus/index.mjs +1 -1
  11. package/dist/client-n0OJiTt1.mjs +1 -0
  12. package/dist/contracts/adapter/index.d.mts +2 -2
  13. package/dist/contracts/adapter/index.mjs +1 -1
  14. package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
  15. package/dist/contracts/adapter/schemas/session-lineage.mjs +1 -1
  16. package/dist/contracts/artifact/index.d.mts +1 -1
  17. package/dist/contracts/client/index.d.mts +2 -2
  18. package/dist/contracts/client/index.mjs +1 -1
  19. package/dist/contracts/config/index.d.mts +6 -6
  20. package/dist/contracts/extension/index.d.mts +3 -3
  21. package/dist/contracts/facet/index.d.mts +1 -1
  22. package/dist/contracts/harness/index.d.mts +1 -1
  23. package/dist/contracts/index.d.mts +372 -194
  24. package/dist/contracts/index.mjs +1 -1
  25. package/dist/contracts/materialization/index.d.mts +2 -2
  26. package/dist/contracts/provider/index.d.mts +1 -1
  27. package/dist/contracts/session/index.d.mts +3 -3
  28. package/dist/contracts/session/index.mjs +1 -1
  29. package/dist/contracts/shared/index.d.mts +1 -1
  30. package/dist/contracts/variant/index.d.mts +1 -1
  31. package/dist/contracts/workflow/index.d.mts +2 -2
  32. package/dist/{definition-b9jyJqPD.d.mts → definition-DpkfJi8v.d.mts} +1 -1
  33. package/dist/drizzle/0023_m_mr9gc37m.sql +1 -0
  34. package/dist/drizzle/meta/_journal.json +7 -0
  35. package/dist/handlers-B74FvKlA.mjs +57 -0
  36. package/dist/hooks/index.d.mts +19 -2
  37. package/dist/{identity-BarL3JYI.mjs → identity-DC3Pk0ps.mjs} +1 -1
  38. package/dist/{index-4eP9DRL_.d.mts → index-B3fjN5HX.d.mts} +7 -7
  39. package/dist/{index-3X0368CL.d.mts → index-B5Uczo3R.d.mts} +24 -24
  40. package/dist/{index-C6Ys8pxt.d.mts → index-BIZeIA5k.d.mts} +6 -6
  41. package/dist/{index-BYfSAJRC.d.mts → index-BvTd61i5.d.mts} +151 -29
  42. package/dist/{index-B5w-0Gg9.d.mts → index-BvjLe_w9.d.mts} +12 -12
  43. package/dist/{index-DQYj8-53.d.mts → index-C8k2f_E0.d.mts} +1 -1
  44. package/dist/{index-DEzdNQum.d.mts → index-CYHWOXUm.d.mts} +1 -1
  45. package/dist/{index-3J0HZlPH.d.mts → index-CwHP8Jxs.d.mts} +145 -12
  46. package/dist/{index-D6aAzr32.d.mts → index-Cyi7y_aG.d.mts} +20 -20
  47. package/dist/{index-BKZhnb2B.d.mts → index-D7Fu3375.d.mts} +404 -24
  48. package/dist/{index-31vR1sxk.d.mts → index-DFK3tpEY.d.mts} +70 -10
  49. package/dist/{index-DV4nRk0h.d.mts → index-DS6kxiFl.d.mts} +15 -15
  50. package/dist/{index-O08Q2ikz.d.mts → index-DTBQOCar.d.mts} +8 -8
  51. package/dist/{index-DvHYpi-J.d.mts → index-DmJ-OpTD.d.mts} +917 -68
  52. package/dist/{index-C5C1tk9f.d.mts → index-Dtb2cVJz.d.mts} +47 -47
  53. package/dist/{index-CaerrEDH.d.mts → index-NkNbYFud.d.mts} +1 -1
  54. package/dist/{index-D9-vOJvZ.d.mts → index-h5go5Dtd.d.mts} +1 -1
  55. package/dist/kernel/extension/index.d.mts +1 -1
  56. package/dist/kernel/index.d.mts +2 -2
  57. package/dist/kernel/observability/index.d.mts +1 -1
  58. package/dist/{namespace-D8P8Sxce2.d.mts → namespace-6sIu5nBI2.d.mts} +2 -2
  59. package/dist/{namespace-CfvtDD_U.d.mts → namespace-BLER-Qom.d.mts} +2 -2
  60. package/dist/{namespace-B3ol3pc-.d.mts → namespace-BigVYQyx.d.mts} +12 -0
  61. package/dist/{namespace-j7vFsmYL.d.mts → namespace-C74bbsdZ.d.mts} +2 -2
  62. package/dist/{namespace-B4cV_pk3.d.mts → namespace-CGxFYDlK.d.mts} +32 -32
  63. package/dist/{namespace-DhDY0juT.d.mts → namespace-D4Uf5Mw_.d.mts} +366 -18
  64. package/dist/{namespace-DmqoDDRD.d.mts → namespace-DRXQyBe0.d.mts} +46 -2
  65. package/dist/{namespace-Bm77p82L.d.mts → namespace-JFzrlNs4.d.mts} +24 -24
  66. package/dist/{package-MmQvNJ3u.d.mts → package-B6mEMD8r.d.mts} +5 -0
  67. package/dist/{package-BmRhhi-3.mjs → package-BQn_RTo7.mjs} +1 -1
  68. package/dist/package.json +1 -1
  69. package/dist/{schema-DLNBajAV.d.mts → schema-B9goOieO.d.mts} +27 -0
  70. package/dist/{schemas-DuuVuhHX2.d.mts → schemas-9S9Y9PHT2.d.mts} +5 -5
  71. package/dist/{schemas-CoFCV42v.d.mts → schemas-B_t6oOK-.d.mts} +2 -2
  72. package/dist/{schemas-lnE9YoG7.d.mts → schemas-CW6YsPT4.d.mts} +3 -3
  73. package/dist/schemas-CkOigLAT.mjs +1 -0
  74. package/dist/{schemas-BemsLc_V.d.mts → schemas-CurUbHy4.d.mts} +4 -4
  75. package/dist/{schemas-DMMWmWjq.d.mts → schemas-DXeGCbJ9.d.mts} +1 -1
  76. package/dist/{schemas-DWfo0wp4.d.mts → schemas-DnmbwE_V.d.mts} +7 -7
  77. package/dist/{schemas-DmGRSeIq.d.mts → schemas-t6h9oSct.d.mts} +28 -1
  78. package/dist/services/adapter-runtime/index.d.mts +4 -4
  79. package/dist/services/adapter-runtime/index.mjs +1 -1
  80. package/dist/services/adapter-runtime/namespace.d.mts +1 -1
  81. package/dist/services/adapter-runtime/schemas.d.mts +2 -2
  82. package/dist/services/adapter-runtime/schemas.mjs +1 -1
  83. package/dist/services/adapter-subsystem/index.d.mts +2 -2
  84. package/dist/services/adapter-subsystem/namespace.d.mts +1 -1
  85. package/dist/services/agent-runtime/index.d.mts +2 -2
  86. package/dist/services/agent-runtime/namespace.d.mts +1 -1
  87. package/dist/services/agent-runtime/schemas.d.mts +1 -1
  88. package/dist/services/context-rules/index.d.mts +3 -3
  89. package/dist/services/filesystem/namespace.d.mts +6 -6
  90. package/dist/services/filesystem/schemas.d.mts +3 -3
  91. package/dist/services/git/namespace.d.mts +2 -2
  92. package/dist/services/git/schemas.d.mts +1 -1
  93. package/dist/services/harness/index.d.mts +3 -3
  94. package/dist/services/index.d.mts +55 -48
  95. package/dist/services/index.mjs +1 -1
  96. package/dist/services/log-import/browser.d.mts +1 -1
  97. package/dist/services/log-import/index.d.mts +14 -1
  98. package/dist/services/log-import/index.mjs +2 -2
  99. package/dist/services/preferences/index.d.mts +2 -2
  100. package/dist/services/preferences/schemas.d.mts +1 -1
  101. package/dist/services/preferences/storage-namespace.d.mts +2 -2
  102. package/dist/services/session/handlers/index.d.mts +1 -1
  103. package/dist/services/session/handlers/index.mjs +1 -1
  104. package/dist/services/session/index.d.mts +7 -7
  105. package/dist/services/session/index.mjs +1 -1
  106. package/dist/services/session/messages/namespace.d.mts +1 -1
  107. package/dist/services/session/session-events/namespace.d.mts +1 -1
  108. package/dist/services/session/storage/namespace.d.mts +1 -1
  109. package/dist/services/session/storage/schema.d.mts +1 -1
  110. package/dist/services/session/storage/schema.mjs +1 -1
  111. package/dist/services/session/testing/index.mjs +3 -2
  112. package/dist/services/session-editor/index.d.mts +1 -1
  113. package/dist/services/settings/namespace.d.mts +5 -5
  114. package/dist/services/subagent-template/index.d.mts +2 -2
  115. package/dist/services/subagent-template/namespace.d.mts +1 -1
  116. package/dist/services/subagent-template/schemas.d.mts +1 -1
  117. package/dist/services/tool-approval/index.mjs +1 -1
  118. package/dist/services/tools/index.mjs +1 -1
  119. package/dist/services/tray-menu/index.d.mts +2 -2
  120. package/dist/services/tray-menu/namespace.d.mts +1 -1
  121. package/dist/services/tray-menu/schemas.d.mts +1 -1
  122. package/dist/session-CZUrp7gC.mjs +69 -0
  123. package/dist/session-Dp7z5N1d.mjs +1 -0
  124. package/dist/{session-lineage-DR-9DU-U.d.mts → session-lineage-C1M7-O3C.d.mts} +3 -3
  125. package/dist/{storage-namespace-Di1A3DMm.d.mts → storage-namespace-BvRF22by.d.mts} +10 -10
  126. package/dist/{tool-approval-service-MU_DmJsf.mjs → tool-approval-service-BIbUSuqg.mjs} +1 -1
  127. package/dist/{tools-BrNm-een.mjs → tools-Yz8XyiwA.mjs} +1 -1
  128. package/dist/{transition-Dq41YCkc.d.mts → transition-DYorNHZu.d.mts} +1 -1
  129. package/dist/{types-C76EP81O.d.mts → types-9XCB1aPK.d.mts} +442 -30
  130. package/dist/{types-BMS6yfLS.d.mts → types-BNW5n6qm.d.mts} +1 -1
  131. package/dist/{types-BMlzmWp6.d.mts → types-BWduCvRU.d.mts} +11 -0
  132. package/dist/{types-Cse8s_cD.d.mts → types-N_BOtTqt.d.mts} +29 -18
  133. package/dist/ui-kernel/index.d.mts +4 -4
  134. package/dist/ui-kernel/pages/namespace.d.mts +4 -4
  135. package/dist/ui-kernel/pages/schemas.d.mts +1 -1
  136. package/dist/workflow-engine/index.d.mts +44 -44
  137. package/dist/workflow-engine/index.mjs +1 -1
  138. package/dist/workflow-engine/package.d.mts +1 -1
  139. package/dist/workflow-engine/package.mjs +1 -1
  140. package/package.json +1 -1
  141. package/dist/adapter-BRxCc72E.mjs +0 -1
  142. package/dist/client-BgUjVbXX.mjs +0 -1
  143. package/dist/handlers-v47Gbsr1.mjs +0 -57
  144. package/dist/schemas-ftgVeWIG.mjs +0 -1
  145. package/dist/session-CKWfn3oc.mjs +0 -1
  146. package/dist/session-DCbJwYEU.mjs +0 -69
@@ -1,5 +1,5 @@
1
1
  import { i as JsonValue$1 } from "./json-value-DtIkQN7g.mjs";
2
- import { s as MessageBlock$1 } from "./index-CaerrEDH.mjs";
2
+ import { s as MessageBlock$1 } from "./index-NkNbYFud.mjs";
3
3
  import * as _$zod from "zod";
4
4
  import { z } from "zod";
5
5
  import * as _$_makaio_core0 from "@makaio/framework/core";
@@ -57,6 +57,7 @@ declare const SessionCreateBaseSchema: z.ZodObject<{
57
57
  metadata: z.ZodOptional<z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>>;
58
58
  spawningToolCallId: z.ZodOptional<z.ZodString>;
59
59
  originWindowId: z.ZodOptional<z.ZodString>;
60
+ machineId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
60
61
  }, z.core.$strip>;
61
62
  /** Parsed type for {@link SessionCreateBaseSchema}. */
62
63
  type SessionCreateBase = z.infer<typeof SessionCreateBaseSchema>;
@@ -240,6 +241,7 @@ declare const MakaioSessionSchema: z.ZodObject<{
240
241
  tracking: "tracking";
241
242
  }>>;
242
243
  isSidechain: z.ZodOptional<z.ZodBoolean>;
244
+ machineId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
243
245
  }, z.core.$strip>;
244
246
  /**
245
247
  * Preview data for session list display.
@@ -367,6 +369,7 @@ declare const SessionWithPreviewSchema: z.ZodObject<{
367
369
  tracking: "tracking";
368
370
  }>>;
369
371
  isSidechain: z.ZodOptional<z.ZodBoolean>;
372
+ machineId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
370
373
  preview: z.ZodOptional<z.ZodObject<{
371
374
  messageCount: z.ZodNumber;
372
375
  firstUserMessage: z.ZodNullable<z.ZodString>;
@@ -568,6 +571,7 @@ declare const SessionSnapshotSchema: z.ZodObject<{
568
571
  tracking: "tracking";
569
572
  }>>;
570
573
  isSidechain: z.ZodOptional<z.ZodBoolean>;
574
+ machineId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
571
575
  }, z.core.$strip>>;
572
576
  agents: z.ZodArray<z.ZodObject<{
573
577
  agentId: z.ZodString;
@@ -675,8 +679,8 @@ declare const SessionSnapshotSchema: z.ZodObject<{
675
679
  editOf: z.ZodOptional<z.ZodString>;
676
680
  origin: z.ZodOptional<z.ZodEnum<{
677
681
  text: "text";
678
- voice: "voice";
679
682
  compact: "compact";
683
+ voice: "voice";
680
684
  }>>;
681
685
  }, z.core.$strip>>;
682
686
  turns: z.ZodArray<z.ZodObject<{
@@ -719,7 +723,7 @@ declare const SessionSnapshotSchema: z.ZodObject<{
719
723
  type: z.ZodLiteral<"agent.added">;
720
724
  payload: z.ZodObject<{
721
725
  sessionId: z.ZodString;
722
- adapterSessionId: z.ZodString;
726
+ adapterSessionId: z.ZodOptional<z.ZodString>;
723
727
  agentId: z.ZodString;
724
728
  adapterId: z.ZodString;
725
729
  adapterName: z.ZodString;
@@ -870,8 +874,8 @@ declare const SessionSnapshotSchema: z.ZodObject<{
870
874
  }>>;
871
875
  origin: z.ZodOptional<z.ZodEnum<{
872
876
  text: "text";
873
- voice: "voice";
874
877
  compact: "compact";
878
+ voice: "voice";
875
879
  }>>;
876
880
  }, z.core.$strip>;
877
881
  }, z.core.$strip>, z.ZodObject<{
@@ -1023,6 +1027,47 @@ declare const SessionSnapshotSchema: z.ZodObject<{
1023
1027
  tokensAfter: z.ZodOptional<z.ZodNumber>;
1024
1028
  compressedMessageIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1025
1029
  }, z.core.$strip>;
1030
+ }, z.core.$strip>, z.ZodObject<{
1031
+ sessionId: z.ZodString;
1032
+ eventId: z.ZodString;
1033
+ timestamp: z.ZodNumber;
1034
+ type: z.ZodLiteral<"locality.degraded">;
1035
+ payload: z.ZodDiscriminatedUnion<[z.ZodObject<{
1036
+ intent: z.ZodEnum<{
1037
+ fork: "fork";
1038
+ resume: "resume";
1039
+ }>;
1040
+ verdictKind: z.ZodLiteral<"degrade">;
1041
+ reason: z.ZodEnum<{
1042
+ "adapter-unsupported": "adapter-unsupported";
1043
+ "adapter-mismatch": "adapter-mismatch";
1044
+ "no-adapter-session": "no-adapter-session";
1045
+ "missing-machine-id": "missing-machine-id";
1046
+ "machine-mismatch": "machine-mismatch";
1047
+ "cwd-mismatch": "cwd-mismatch";
1048
+ "transforms-present": "transforms-present";
1049
+ "compression-present": "compression-present";
1050
+ "connector-swap": "connector-swap";
1051
+ "mid-history-unsupported": "mid-history-unsupported";
1052
+ "hybrid-imported-orchestrated": "hybrid-imported-orchestrated";
1053
+ "native-attempt-failed": "native-attempt-failed";
1054
+ "agent-already-started": "agent-already-started";
1055
+ "fork-point-unresolvable": "fork-point-unresolvable";
1056
+ }>;
1057
+ agentId: z.ZodOptional<z.ZodString>;
1058
+ adapterId: z.ZodOptional<z.ZodString>;
1059
+ turnId: z.ZodOptional<z.ZodString>;
1060
+ }, z.core.$strip>, z.ZodObject<{
1061
+ intent: z.ZodEnum<{
1062
+ fork: "fork";
1063
+ resume: "resume";
1064
+ }>;
1065
+ verdictKind: z.ZodLiteral<"foreign">;
1066
+ foreignMachineId: z.ZodString;
1067
+ agentId: z.ZodOptional<z.ZodString>;
1068
+ adapterId: z.ZodOptional<z.ZodString>;
1069
+ turnId: z.ZodOptional<z.ZodString>;
1070
+ }, z.core.$strip>], "verdictKind">;
1026
1071
  }, z.core.$strip>], "type">, z.ZodObject<{
1027
1072
  sessionId: z.ZodString;
1028
1073
  eventId: z.ZodString;
@@ -1174,8 +1219,8 @@ declare const SessionMessageRoleSchema: z.ZodEnum<{
1174
1219
  type SessionMessageRole = z.infer<typeof SessionMessageRoleSchema>;
1175
1220
  declare const SessionMessageOriginSchema: z.ZodEnum<{
1176
1221
  text: "text";
1177
- voice: "voice";
1178
1222
  compact: "compact";
1223
+ voice: "voice";
1179
1224
  }>;
1180
1225
  type SessionMessageOrigin$1 = z.infer<typeof SessionMessageOriginSchema>;
1181
1226
  /**
@@ -1266,8 +1311,8 @@ declare const SessionMessageSchema$1: z.ZodObject<{
1266
1311
  editOf: z.ZodOptional<z.ZodString>;
1267
1312
  origin: z.ZodOptional<z.ZodEnum<{
1268
1313
  text: "text";
1269
- voice: "voice";
1270
1314
  compact: "compact";
1315
+ voice: "voice";
1271
1316
  }>>;
1272
1317
  }, z.core.$strip>;
1273
1318
  type SessionMessage$1 = z.infer<typeof SessionMessageSchema$1>;
@@ -2035,6 +2080,36 @@ declare const OrchestratorSchemas: {
2035
2080
  fullPrefix: "fullPrefix";
2036
2081
  }>>;
2037
2082
  turnContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>;
2083
+ nativeLocality: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2084
+ kind: z.ZodLiteral<"native">;
2085
+ }, z.core.$strip>, z.ZodObject<{
2086
+ kind: z.ZodLiteral<"degrade">;
2087
+ reason: z.ZodEnum<{
2088
+ "adapter-unsupported": "adapter-unsupported";
2089
+ "adapter-mismatch": "adapter-mismatch";
2090
+ "no-adapter-session": "no-adapter-session";
2091
+ "missing-machine-id": "missing-machine-id";
2092
+ "machine-mismatch": "machine-mismatch";
2093
+ "cwd-mismatch": "cwd-mismatch";
2094
+ "transforms-present": "transforms-present";
2095
+ "compression-present": "compression-present";
2096
+ "connector-swap": "connector-swap";
2097
+ "mid-history-unsupported": "mid-history-unsupported";
2098
+ "hybrid-imported-orchestrated": "hybrid-imported-orchestrated";
2099
+ "native-attempt-failed": "native-attempt-failed";
2100
+ "agent-already-started": "agent-already-started";
2101
+ "fork-point-unresolvable": "fork-point-unresolvable";
2102
+ }>;
2103
+ }, z.core.$strip>, z.ZodObject<{
2104
+ kind: z.ZodLiteral<"foreign">;
2105
+ machineId: z.ZodString;
2106
+ }, z.core.$strip>], "kind">>;
2107
+ nativeFork: z.ZodOptional<z.ZodObject<{
2108
+ sourceSessionId: z.ZodString;
2109
+ sourceAdapterSessionId: z.ZodString;
2110
+ forkPointMessageId: z.ZodOptional<z.ZodString>;
2111
+ targetWorkingDirectory: z.ZodOptional<z.ZodString>;
2112
+ }, z.core.$strip>>;
2038
2113
  }, z.core.$strip>>;
2039
2114
  responseSchema: z.ZodOptional<z.ZodObject<{
2040
2115
  schema: z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>;
@@ -2051,8 +2126,8 @@ declare const OrchestratorSchemas: {
2051
2126
  skipConnectorSwapWarning: z.ZodOptional<z.ZodBoolean>;
2052
2127
  origin: z.ZodOptional<z.ZodEnum<{
2053
2128
  text: "text";
2054
- voice: "voice";
2055
2129
  compact: "compact";
2130
+ voice: "voice";
2056
2131
  }>>;
2057
2132
  }, z.core.$strip>;
2058
2133
  response: z.ZodObject<{
@@ -2329,7 +2404,7 @@ declare const OrchestratorSchemas: {
2329
2404
  }, z.core.$strip>;
2330
2405
  response: z.ZodObject<{
2331
2406
  agentId: z.ZodString;
2332
- adapterSessionId: z.ZodString;
2407
+ adapterSessionId: z.ZodOptional<z.ZodString>;
2333
2408
  role: z.ZodEnum<{
2334
2409
  lead: "lead";
2335
2410
  member: "member";
@@ -2595,7 +2670,7 @@ declare const OrchestratorSchemas: {
2595
2670
  }, z.core.$strip>;
2596
2671
  response: z.ZodObject<{
2597
2672
  agentId: z.ZodString;
2598
- adapterSessionId: z.ZodString;
2673
+ adapterSessionId: z.ZodOptional<z.ZodString>;
2599
2674
  role: z.ZodEnum<{
2600
2675
  lead: "lead";
2601
2676
  member: "member";
@@ -2869,8 +2944,8 @@ declare const OrchestratorSchemas: {
2869
2944
  }>>;
2870
2945
  origin: z.ZodOptional<z.ZodEnum<{
2871
2946
  text: "text";
2872
- voice: "voice";
2873
2947
  compact: "compact";
2948
+ voice: "voice";
2874
2949
  }>>;
2875
2950
  }, z.core.$strip>;
2876
2951
  /**
@@ -2982,6 +3057,79 @@ type SendMessageResponse = z.infer<typeof OrchestratorSchemas.sendMessage.respon
2982
3057
  type TurnStarted = z.infer<(typeof OrchestratorSchemas)['turn.started']>;
2983
3058
  type TurnCompleted = z.infer<(typeof OrchestratorSchemas)['turn.completed']>;
2984
3059
  //#endregion
3060
+ //#region core/contracts/src/session/native-locality.d.ts
3061
+ /**
3062
+ * Closed set of reasons a session cannot be resumed or forked natively
3063
+ * on the current machine.
3064
+ */
3065
+ declare const NativeLocalityReasonSchema: z.ZodEnum<{
3066
+ "adapter-unsupported": "adapter-unsupported";
3067
+ "adapter-mismatch": "adapter-mismatch";
3068
+ "no-adapter-session": "no-adapter-session";
3069
+ "missing-machine-id": "missing-machine-id";
3070
+ "machine-mismatch": "machine-mismatch";
3071
+ "cwd-mismatch": "cwd-mismatch";
3072
+ "transforms-present": "transforms-present";
3073
+ "compression-present": "compression-present";
3074
+ "connector-swap": "connector-swap";
3075
+ "mid-history-unsupported": "mid-history-unsupported";
3076
+ "hybrid-imported-orchestrated": "hybrid-imported-orchestrated";
3077
+ "native-attempt-failed": "native-attempt-failed";
3078
+ "agent-already-started": "agent-already-started";
3079
+ "fork-point-unresolvable": "fork-point-unresolvable";
3080
+ }>;
3081
+ type NativeLocalityReason = z.infer<typeof NativeLocalityReasonSchema>;
3082
+ /**
3083
+ * Verdict produced by the locality evaluator for a given session.
3084
+ *
3085
+ * - `native`: The session is owned by this machine and can be resumed or
3086
+ * forked natively without any history injection.
3087
+ * - `degrade`: The session is local but a structural constraint (e.g. active
3088
+ * transforms, compression, connector swap) prevents native operation.
3089
+ * The adapter must fall back to fresh mode.
3090
+ * - `foreign`: The session's provider-native store lives on another machine.
3091
+ * Native operation is not possible without cross-machine coordination.
3092
+ */
3093
+ declare const NativeLocalityVerdictSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3094
+ kind: z.ZodLiteral<"native">;
3095
+ }, z.core.$strip>, z.ZodObject<{
3096
+ kind: z.ZodLiteral<"degrade">;
3097
+ reason: z.ZodEnum<{
3098
+ "adapter-unsupported": "adapter-unsupported";
3099
+ "adapter-mismatch": "adapter-mismatch";
3100
+ "no-adapter-session": "no-adapter-session";
3101
+ "missing-machine-id": "missing-machine-id";
3102
+ "machine-mismatch": "machine-mismatch";
3103
+ "cwd-mismatch": "cwd-mismatch";
3104
+ "transforms-present": "transforms-present";
3105
+ "compression-present": "compression-present";
3106
+ "connector-swap": "connector-swap";
3107
+ "mid-history-unsupported": "mid-history-unsupported";
3108
+ "hybrid-imported-orchestrated": "hybrid-imported-orchestrated";
3109
+ "native-attempt-failed": "native-attempt-failed";
3110
+ "agent-already-started": "agent-already-started";
3111
+ "fork-point-unresolvable": "fork-point-unresolvable";
3112
+ }>;
3113
+ }, z.core.$strip>, z.ZodObject<{
3114
+ kind: z.ZodLiteral<"foreign">;
3115
+ machineId: z.ZodString;
3116
+ }, z.core.$strip>], "kind">;
3117
+ type NativeLocalityVerdict$1 = z.infer<typeof NativeLocalityVerdictSchema>;
3118
+ /**
3119
+ * Directive passed from the session orchestrator to the adapter when a
3120
+ * provider-native fork is requested.
3121
+ *
3122
+ * The adapter uses these fields to invoke the provider's branching API
3123
+ * rather than replaying history into a fresh session.
3124
+ */
3125
+ declare const NativeForkDirectiveSchema: z.ZodObject<{
3126
+ sourceSessionId: z.ZodString;
3127
+ sourceAdapterSessionId: z.ZodString;
3128
+ forkPointMessageId: z.ZodOptional<z.ZodString>;
3129
+ targetWorkingDirectory: z.ZodOptional<z.ZodString>;
3130
+ }, z.core.$strip>;
3131
+ type NativeForkDirective$1 = z.infer<typeof NativeForkDirectiveSchema>;
3132
+ //#endregion
2985
3133
  //#region core/contracts/src/session/schemas/event.d.ts
2986
3134
  /**
2987
3135
  * Common envelope fields present on every persisted session event.
@@ -2993,7 +3141,7 @@ declare const SessionEventEnvelopeSchema: z.ZodObject<{
2993
3141
  eventId: z.ZodString;
2994
3142
  timestamp: z.ZodNumber;
2995
3143
  }, z.core.$strip>;
2996
- declare const SESSION_EVENT_TYPES: readonly ["message", "agent.added", "turn.started", "turn.completed", "user_message.sent", "user_message.acknowledged", "user_message.completed", "branch.created", "branch.merged", "squash"];
3144
+ declare const SESSION_EVENT_TYPES: readonly ["message", "agent.added", "turn.started", "turn.completed", "user_message.sent", "user_message.acknowledged", "user_message.completed", "branch.created", "branch.merged", "squash", "locality.degraded"];
2997
3145
  /**
2998
3146
  * Session event schema for storage and observability.
2999
3147
  *
@@ -3008,7 +3156,7 @@ declare const MakaioSessionEventSchema: z.ZodUnion<readonly [z.ZodDiscriminatedU
3008
3156
  type: z.ZodLiteral<"agent.added">;
3009
3157
  payload: z.ZodObject<{
3010
3158
  sessionId: z.ZodString;
3011
- adapterSessionId: z.ZodString;
3159
+ adapterSessionId: z.ZodOptional<z.ZodString>;
3012
3160
  agentId: z.ZodString;
3013
3161
  adapterId: z.ZodString;
3014
3162
  adapterName: z.ZodString;
@@ -3159,8 +3307,8 @@ declare const MakaioSessionEventSchema: z.ZodUnion<readonly [z.ZodDiscriminatedU
3159
3307
  }>>;
3160
3308
  origin: z.ZodOptional<z.ZodEnum<{
3161
3309
  text: "text";
3162
- voice: "voice";
3163
3310
  compact: "compact";
3311
+ voice: "voice";
3164
3312
  }>>;
3165
3313
  }, z.core.$strip>;
3166
3314
  }, z.core.$strip>, z.ZodObject<{
@@ -3312,6 +3460,47 @@ declare const MakaioSessionEventSchema: z.ZodUnion<readonly [z.ZodDiscriminatedU
3312
3460
  tokensAfter: z.ZodOptional<z.ZodNumber>;
3313
3461
  compressedMessageIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
3314
3462
  }, z.core.$strip>;
3463
+ }, z.core.$strip>, z.ZodObject<{
3464
+ sessionId: z.ZodString;
3465
+ eventId: z.ZodString;
3466
+ timestamp: z.ZodNumber;
3467
+ type: z.ZodLiteral<"locality.degraded">;
3468
+ payload: z.ZodDiscriminatedUnion<[z.ZodObject<{
3469
+ intent: z.ZodEnum<{
3470
+ fork: "fork";
3471
+ resume: "resume";
3472
+ }>;
3473
+ verdictKind: z.ZodLiteral<"degrade">;
3474
+ reason: z.ZodEnum<{
3475
+ "adapter-unsupported": "adapter-unsupported";
3476
+ "adapter-mismatch": "adapter-mismatch";
3477
+ "no-adapter-session": "no-adapter-session";
3478
+ "missing-machine-id": "missing-machine-id";
3479
+ "machine-mismatch": "machine-mismatch";
3480
+ "cwd-mismatch": "cwd-mismatch";
3481
+ "transforms-present": "transforms-present";
3482
+ "compression-present": "compression-present";
3483
+ "connector-swap": "connector-swap";
3484
+ "mid-history-unsupported": "mid-history-unsupported";
3485
+ "hybrid-imported-orchestrated": "hybrid-imported-orchestrated";
3486
+ "native-attempt-failed": "native-attempt-failed";
3487
+ "agent-already-started": "agent-already-started";
3488
+ "fork-point-unresolvable": "fork-point-unresolvable";
3489
+ }>;
3490
+ agentId: z.ZodOptional<z.ZodString>;
3491
+ adapterId: z.ZodOptional<z.ZodString>;
3492
+ turnId: z.ZodOptional<z.ZodString>;
3493
+ }, z.core.$strip>, z.ZodObject<{
3494
+ intent: z.ZodEnum<{
3495
+ fork: "fork";
3496
+ resume: "resume";
3497
+ }>;
3498
+ verdictKind: z.ZodLiteral<"foreign">;
3499
+ foreignMachineId: z.ZodString;
3500
+ agentId: z.ZodOptional<z.ZodString>;
3501
+ adapterId: z.ZodOptional<z.ZodString>;
3502
+ turnId: z.ZodOptional<z.ZodString>;
3503
+ }, z.core.$strip>], "verdictKind">;
3315
3504
  }, z.core.$strip>], "type">, z.ZodObject<{
3316
3505
  sessionId: z.ZodString;
3317
3506
  eventId: z.ZodString;
@@ -3362,8 +3551,8 @@ interface SessionEventTypeMap {
3362
3551
  * Agent added to session (correlation link).
3363
3552
  */
3364
3553
  'agent.added': {
3365
- sessionId: string;
3366
- adapterSessionId: string;
3554
+ sessionId: string; /** adapter's sessionId (generated by SDK / API); `undefined` for unconfirmed idle fork starts */
3555
+ adapterSessionId?: string;
3367
3556
  agentId: string;
3368
3557
  adapterId: string;
3369
3558
  adapterName: string;
@@ -3435,6 +3624,28 @@ interface SessionEventTypeMap {
3435
3624
  tokensAfter?: number;
3436
3625
  compressedMessageIds?: string[];
3437
3626
  };
3627
+ /**
3628
+ * Native locality degradation event.
3629
+ *
3630
+ * Discriminated union on `verdictKind`: `degrade` carries `reason`,
3631
+ * `foreign` carries `foreignMachineId`. This makes illegal cross-field
3632
+ * combinations unrepresentable at compile time.
3633
+ */
3634
+ 'locality.degraded': {
3635
+ /** Whether the degradation occurred during a resume (attach) or fork. */intent: 'resume' | 'fork'; /** Structural constraint preventing native operation. */
3636
+ verdictKind: 'degrade'; /** Why native operation was degraded. */
3637
+ reason: z.infer<typeof NativeLocalityReasonSchema>; /** Agent ID involved, when cheaply available. */
3638
+ agentId?: string; /** Adapter instance ID, when cheaply available. */
3639
+ adapterId?: string; /** Turn ID when available (attach-time degrades have no turn yet). */
3640
+ turnId?: string;
3641
+ } | {
3642
+ /** Whether the degradation occurred during a resume (attach) or fork. */intent: 'resume' | 'fork'; /** Session's provider-native store lives on another machine. */
3643
+ verdictKind: 'foreign'; /** Machine ID that owns the provider-native session store. */
3644
+ foreignMachineId: string; /** Agent ID involved, when cheaply available. */
3645
+ agentId?: string; /** Adapter instance ID, when cheaply available. */
3646
+ adapterId?: string; /** Turn ID when available (attach-time degrades have no turn yet). */
3647
+ turnId?: string;
3648
+ };
3438
3649
  /**
3439
3650
  * Emitted on the parent session when a Claude Code compaction boundary is
3440
3651
  * imported. Uses the plugin event path — not a core event type.
@@ -4313,6 +4524,36 @@ declare const SessionSchemas: {
4313
4524
  fullPrefix: "fullPrefix";
4314
4525
  }>>;
4315
4526
  turnContext: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodType<_$_makaio_contracts0.JsonValue, unknown, _$zod_v4_core0.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>;
4527
+ nativeLocality: _$zod.ZodOptional<_$zod.ZodDiscriminatedUnion<[_$zod.ZodObject<{
4528
+ kind: _$zod.ZodLiteral<"native">;
4529
+ }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
4530
+ kind: _$zod.ZodLiteral<"degrade">;
4531
+ reason: _$zod.ZodEnum<{
4532
+ "adapter-unsupported": "adapter-unsupported";
4533
+ "adapter-mismatch": "adapter-mismatch";
4534
+ "no-adapter-session": "no-adapter-session";
4535
+ "missing-machine-id": "missing-machine-id";
4536
+ "machine-mismatch": "machine-mismatch";
4537
+ "cwd-mismatch": "cwd-mismatch";
4538
+ "transforms-present": "transforms-present";
4539
+ "compression-present": "compression-present";
4540
+ "connector-swap": "connector-swap";
4541
+ "mid-history-unsupported": "mid-history-unsupported";
4542
+ "hybrid-imported-orchestrated": "hybrid-imported-orchestrated";
4543
+ "native-attempt-failed": "native-attempt-failed";
4544
+ "agent-already-started": "agent-already-started";
4545
+ "fork-point-unresolvable": "fork-point-unresolvable";
4546
+ }>;
4547
+ }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
4548
+ kind: _$zod.ZodLiteral<"foreign">;
4549
+ machineId: _$zod.ZodString;
4550
+ }, _$zod_v4_core0.$strip>], "kind">>;
4551
+ nativeFork: _$zod.ZodOptional<_$zod.ZodObject<{
4552
+ sourceSessionId: _$zod.ZodString;
4553
+ sourceAdapterSessionId: _$zod.ZodString;
4554
+ forkPointMessageId: _$zod.ZodOptional<_$zod.ZodString>;
4555
+ targetWorkingDirectory: _$zod.ZodOptional<_$zod.ZodString>;
4556
+ }, _$zod_v4_core0.$strip>>;
4316
4557
  }, _$zod_v4_core0.$strip>>;
4317
4558
  responseSchema: _$zod.ZodOptional<_$zod.ZodObject<{
4318
4559
  schema: _$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>>>;
@@ -4329,8 +4570,8 @@ declare const SessionSchemas: {
4329
4570
  skipConnectorSwapWarning: _$zod.ZodOptional<_$zod.ZodBoolean>;
4330
4571
  origin: _$zod.ZodOptional<_$zod.ZodEnum<{
4331
4572
  text: "text";
4332
- voice: "voice";
4333
4573
  compact: "compact";
4574
+ voice: "voice";
4334
4575
  }>>;
4335
4576
  }, _$zod_v4_core0.$strip>;
4336
4577
  response: _$zod.ZodObject<{
@@ -4574,7 +4815,7 @@ declare const SessionSchemas: {
4574
4815
  }, _$zod_v4_core0.$strip>;
4575
4816
  response: _$zod.ZodObject<{
4576
4817
  agentId: _$zod.ZodString;
4577
- adapterSessionId: _$zod.ZodString;
4818
+ adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
4578
4819
  role: _$zod.ZodEnum<{
4579
4820
  lead: "lead";
4580
4821
  member: "member";
@@ -4832,7 +5073,7 @@ declare const SessionSchemas: {
4832
5073
  }, _$zod_v4_core0.$strip>;
4833
5074
  response: _$zod.ZodObject<{
4834
5075
  agentId: _$zod.ZodString;
4835
- adapterSessionId: _$zod.ZodString;
5076
+ adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
4836
5077
  role: _$zod.ZodEnum<{
4837
5078
  lead: "lead";
4838
5079
  member: "member";
@@ -5066,8 +5307,8 @@ declare const SessionSchemas: {
5066
5307
  }>>;
5067
5308
  origin: _$zod.ZodOptional<_$zod.ZodEnum<{
5068
5309
  text: "text";
5069
- voice: "voice";
5070
5310
  compact: "compact";
5311
+ voice: "voice";
5071
5312
  }>>;
5072
5313
  }, _$zod_v4_core0.$strip>;
5073
5314
  'user_message.acknowledged': _$zod.ZodObject<{
@@ -5445,6 +5686,7 @@ declare const SessionSchemas: {
5445
5686
  tracking: "tracking";
5446
5687
  }>>;
5447
5688
  isSidechain: _$zod.ZodOptional<_$zod.ZodBoolean>;
5689
+ machineId: _$zod.ZodOptional<_$zod.ZodNullable<_$zod.ZodString>>;
5448
5690
  }, _$zod_v4_core0.$strip>>;
5449
5691
  agents: _$zod.ZodArray<_$zod.ZodObject<{
5450
5692
  agentId: _$zod.ZodString;
@@ -5552,8 +5794,8 @@ declare const SessionSchemas: {
5552
5794
  editOf: _$zod.ZodOptional<_$zod.ZodString>;
5553
5795
  origin: _$zod.ZodOptional<_$zod.ZodEnum<{
5554
5796
  text: "text";
5555
- voice: "voice";
5556
5797
  compact: "compact";
5798
+ voice: "voice";
5557
5799
  }>>;
5558
5800
  }, _$zod_v4_core0.$strip>>;
5559
5801
  turns: _$zod.ZodArray<_$zod.ZodObject<{
@@ -5596,7 +5838,7 @@ declare const SessionSchemas: {
5596
5838
  type: _$zod.ZodLiteral<"agent.added">;
5597
5839
  payload: _$zod.ZodObject<{
5598
5840
  sessionId: _$zod.ZodString;
5599
- adapterSessionId: _$zod.ZodString;
5841
+ adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
5600
5842
  agentId: _$zod.ZodString;
5601
5843
  adapterId: _$zod.ZodString;
5602
5844
  adapterName: _$zod.ZodString;
@@ -5747,8 +5989,8 @@ declare const SessionSchemas: {
5747
5989
  }>>;
5748
5990
  origin: _$zod.ZodOptional<_$zod.ZodEnum<{
5749
5991
  text: "text";
5750
- voice: "voice";
5751
5992
  compact: "compact";
5993
+ voice: "voice";
5752
5994
  }>>;
5753
5995
  }, _$zod_v4_core0.$strip>;
5754
5996
  }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
@@ -5900,6 +6142,47 @@ declare const SessionSchemas: {
5900
6142
  tokensAfter: _$zod.ZodOptional<_$zod.ZodNumber>;
5901
6143
  compressedMessageIds: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
5902
6144
  }, _$zod_v4_core0.$strip>;
6145
+ }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
6146
+ sessionId: _$zod.ZodString;
6147
+ eventId: _$zod.ZodString;
6148
+ timestamp: _$zod.ZodNumber;
6149
+ type: _$zod.ZodLiteral<"locality.degraded">;
6150
+ payload: _$zod.ZodDiscriminatedUnion<[_$zod.ZodObject<{
6151
+ intent: _$zod.ZodEnum<{
6152
+ fork: "fork";
6153
+ resume: "resume";
6154
+ }>;
6155
+ verdictKind: _$zod.ZodLiteral<"degrade">;
6156
+ reason: _$zod.ZodEnum<{
6157
+ "adapter-unsupported": "adapter-unsupported";
6158
+ "adapter-mismatch": "adapter-mismatch";
6159
+ "no-adapter-session": "no-adapter-session";
6160
+ "missing-machine-id": "missing-machine-id";
6161
+ "machine-mismatch": "machine-mismatch";
6162
+ "cwd-mismatch": "cwd-mismatch";
6163
+ "transforms-present": "transforms-present";
6164
+ "compression-present": "compression-present";
6165
+ "connector-swap": "connector-swap";
6166
+ "mid-history-unsupported": "mid-history-unsupported";
6167
+ "hybrid-imported-orchestrated": "hybrid-imported-orchestrated";
6168
+ "native-attempt-failed": "native-attempt-failed";
6169
+ "agent-already-started": "agent-already-started";
6170
+ "fork-point-unresolvable": "fork-point-unresolvable";
6171
+ }>;
6172
+ agentId: _$zod.ZodOptional<_$zod.ZodString>;
6173
+ adapterId: _$zod.ZodOptional<_$zod.ZodString>;
6174
+ turnId: _$zod.ZodOptional<_$zod.ZodString>;
6175
+ }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
6176
+ intent: _$zod.ZodEnum<{
6177
+ fork: "fork";
6178
+ resume: "resume";
6179
+ }>;
6180
+ verdictKind: _$zod.ZodLiteral<"foreign">;
6181
+ foreignMachineId: _$zod.ZodString;
6182
+ agentId: _$zod.ZodOptional<_$zod.ZodString>;
6183
+ adapterId: _$zod.ZodOptional<_$zod.ZodString>;
6184
+ turnId: _$zod.ZodOptional<_$zod.ZodString>;
6185
+ }, _$zod_v4_core0.$strip>], "verdictKind">;
5903
6186
  }, _$zod_v4_core0.$strip>], "type">, _$zod.ZodObject<{
5904
6187
  sessionId: _$zod.ZodString;
5905
6188
  eventId: _$zod.ZodString;
@@ -6036,6 +6319,7 @@ declare const SessionSchemas: {
6036
6319
  tracking: "tracking";
6037
6320
  }>>;
6038
6321
  isSidechain: _$zod.ZodOptional<_$zod.ZodBoolean>;
6322
+ machineId: _$zod.ZodOptional<_$zod.ZodNullable<_$zod.ZodString>>;
6039
6323
  }, _$zod_v4_core0.$strip>>;
6040
6324
  agents: _$zod.ZodArray<_$zod.ZodObject<{
6041
6325
  agentId: _$zod.ZodString;
@@ -6143,8 +6427,8 @@ declare const SessionSchemas: {
6143
6427
  editOf: _$zod.ZodOptional<_$zod.ZodString>;
6144
6428
  origin: _$zod.ZodOptional<_$zod.ZodEnum<{
6145
6429
  text: "text";
6146
- voice: "voice";
6147
6430
  compact: "compact";
6431
+ voice: "voice";
6148
6432
  }>>;
6149
6433
  }, _$zod_v4_core0.$strip>>;
6150
6434
  turns: _$zod.ZodArray<_$zod.ZodObject<{
@@ -6187,7 +6471,7 @@ declare const SessionSchemas: {
6187
6471
  type: _$zod.ZodLiteral<"agent.added">;
6188
6472
  payload: _$zod.ZodObject<{
6189
6473
  sessionId: _$zod.ZodString;
6190
- adapterSessionId: _$zod.ZodString;
6474
+ adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
6191
6475
  agentId: _$zod.ZodString;
6192
6476
  adapterId: _$zod.ZodString;
6193
6477
  adapterName: _$zod.ZodString;
@@ -6338,8 +6622,8 @@ declare const SessionSchemas: {
6338
6622
  }>>;
6339
6623
  origin: _$zod.ZodOptional<_$zod.ZodEnum<{
6340
6624
  text: "text";
6341
- voice: "voice";
6342
6625
  compact: "compact";
6626
+ voice: "voice";
6343
6627
  }>>;
6344
6628
  }, _$zod_v4_core0.$strip>;
6345
6629
  }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
@@ -6491,6 +6775,47 @@ declare const SessionSchemas: {
6491
6775
  tokensAfter: _$zod.ZodOptional<_$zod.ZodNumber>;
6492
6776
  compressedMessageIds: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
6493
6777
  }, _$zod_v4_core0.$strip>;
6778
+ }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
6779
+ sessionId: _$zod.ZodString;
6780
+ eventId: _$zod.ZodString;
6781
+ timestamp: _$zod.ZodNumber;
6782
+ type: _$zod.ZodLiteral<"locality.degraded">;
6783
+ payload: _$zod.ZodDiscriminatedUnion<[_$zod.ZodObject<{
6784
+ intent: _$zod.ZodEnum<{
6785
+ fork: "fork";
6786
+ resume: "resume";
6787
+ }>;
6788
+ verdictKind: _$zod.ZodLiteral<"degrade">;
6789
+ reason: _$zod.ZodEnum<{
6790
+ "adapter-unsupported": "adapter-unsupported";
6791
+ "adapter-mismatch": "adapter-mismatch";
6792
+ "no-adapter-session": "no-adapter-session";
6793
+ "missing-machine-id": "missing-machine-id";
6794
+ "machine-mismatch": "machine-mismatch";
6795
+ "cwd-mismatch": "cwd-mismatch";
6796
+ "transforms-present": "transforms-present";
6797
+ "compression-present": "compression-present";
6798
+ "connector-swap": "connector-swap";
6799
+ "mid-history-unsupported": "mid-history-unsupported";
6800
+ "hybrid-imported-orchestrated": "hybrid-imported-orchestrated";
6801
+ "native-attempt-failed": "native-attempt-failed";
6802
+ "agent-already-started": "agent-already-started";
6803
+ "fork-point-unresolvable": "fork-point-unresolvable";
6804
+ }>;
6805
+ agentId: _$zod.ZodOptional<_$zod.ZodString>;
6806
+ adapterId: _$zod.ZodOptional<_$zod.ZodString>;
6807
+ turnId: _$zod.ZodOptional<_$zod.ZodString>;
6808
+ }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
6809
+ intent: _$zod.ZodEnum<{
6810
+ fork: "fork";
6811
+ resume: "resume";
6812
+ }>;
6813
+ verdictKind: _$zod.ZodLiteral<"foreign">;
6814
+ foreignMachineId: _$zod.ZodString;
6815
+ agentId: _$zod.ZodOptional<_$zod.ZodString>;
6816
+ adapterId: _$zod.ZodOptional<_$zod.ZodString>;
6817
+ turnId: _$zod.ZodOptional<_$zod.ZodString>;
6818
+ }, _$zod_v4_core0.$strip>], "verdictKind">;
6494
6819
  }, _$zod_v4_core0.$strip>], "type">, _$zod.ZodObject<{
6495
6820
  sessionId: _$zod.ZodString;
6496
6821
  eventId: _$zod.ZodString;
@@ -6525,7 +6850,7 @@ declare const SessionSchemas: {
6525
6850
  };
6526
6851
  'agent.added': _$zod.ZodObject<{
6527
6852
  sessionId: _$zod.ZodString;
6528
- adapterSessionId: _$zod.ZodString;
6853
+ adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
6529
6854
  agentId: _$zod.ZodString;
6530
6855
  adapterId: _$zod.ZodString;
6531
6856
  adapterName: _$zod.ZodString;
@@ -6580,6 +6905,46 @@ declare const SessionSchemas: {
6580
6905
  previousModel: _$zod.ZodOptional<_$zod.ZodString>;
6581
6906
  newModel: _$zod.ZodOptional<_$zod.ZodString>;
6582
6907
  }, _$zod_v4_core0.$strip>;
6908
+ 'locality.degraded': _$zod.ZodIntersection<_$zod.ZodObject<{
6909
+ sessionId: _$zod.ZodString;
6910
+ eventId: _$zod.ZodString;
6911
+ timestamp: _$zod.ZodNumber;
6912
+ }, _$zod_v4_core0.$strip>, _$zod.ZodDiscriminatedUnion<[_$zod.ZodObject<{
6913
+ intent: _$zod.ZodEnum<{
6914
+ fork: "fork";
6915
+ resume: "resume";
6916
+ }>;
6917
+ verdictKind: _$zod.ZodLiteral<"degrade">;
6918
+ reason: _$zod.ZodEnum<{
6919
+ "adapter-unsupported": "adapter-unsupported";
6920
+ "adapter-mismatch": "adapter-mismatch";
6921
+ "no-adapter-session": "no-adapter-session";
6922
+ "missing-machine-id": "missing-machine-id";
6923
+ "machine-mismatch": "machine-mismatch";
6924
+ "cwd-mismatch": "cwd-mismatch";
6925
+ "transforms-present": "transforms-present";
6926
+ "compression-present": "compression-present";
6927
+ "connector-swap": "connector-swap";
6928
+ "mid-history-unsupported": "mid-history-unsupported";
6929
+ "hybrid-imported-orchestrated": "hybrid-imported-orchestrated";
6930
+ "native-attempt-failed": "native-attempt-failed";
6931
+ "agent-already-started": "agent-already-started";
6932
+ "fork-point-unresolvable": "fork-point-unresolvable";
6933
+ }>;
6934
+ agentId: _$zod.ZodOptional<_$zod.ZodString>;
6935
+ adapterId: _$zod.ZodOptional<_$zod.ZodString>;
6936
+ turnId: _$zod.ZodOptional<_$zod.ZodString>;
6937
+ }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
6938
+ intent: _$zod.ZodEnum<{
6939
+ fork: "fork";
6940
+ resume: "resume";
6941
+ }>;
6942
+ verdictKind: _$zod.ZodLiteral<"foreign">;
6943
+ foreignMachineId: _$zod.ZodString;
6944
+ agentId: _$zod.ZodOptional<_$zod.ZodString>;
6945
+ adapterId: _$zod.ZodOptional<_$zod.ZodString>;
6946
+ turnId: _$zod.ZodOptional<_$zod.ZodString>;
6947
+ }, _$zod_v4_core0.$strip>], "verdictKind">>;
6583
6948
  getContextWindowState: {
6584
6949
  request: _$zod.ZodObject<{
6585
6950
  sessionId: _$zod.ZodString;
@@ -6590,8 +6955,8 @@ declare const SessionSchemas: {
6590
6955
  maxTokens: _$zod.ZodNumber;
6591
6956
  percentage: _$zod.ZodNumber;
6592
6957
  level: _$zod.ZodEnum<{
6593
- ok: "ok";
6594
6958
  warn: "warn";
6959
+ ok: "ok";
6595
6960
  critical: "critical";
6596
6961
  }>;
6597
6962
  lastUpdatedAt: _$zod.ZodNumber;
@@ -6618,7 +6983,7 @@ declare const SessionSchemas: {
6618
6983
  type: _$zod.ZodLiteral<"agent.added">;
6619
6984
  payload: _$zod.ZodObject<{
6620
6985
  sessionId: _$zod.ZodString;
6621
- adapterSessionId: _$zod.ZodString;
6986
+ adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
6622
6987
  agentId: _$zod.ZodString;
6623
6988
  adapterId: _$zod.ZodString;
6624
6989
  adapterName: _$zod.ZodString;
@@ -6769,8 +7134,8 @@ declare const SessionSchemas: {
6769
7134
  }>>;
6770
7135
  origin: _$zod.ZodOptional<_$zod.ZodEnum<{
6771
7136
  text: "text";
6772
- voice: "voice";
6773
7137
  compact: "compact";
7138
+ voice: "voice";
6774
7139
  }>>;
6775
7140
  }, _$zod_v4_core0.$strip>;
6776
7141
  }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
@@ -6922,6 +7287,47 @@ declare const SessionSchemas: {
6922
7287
  tokensAfter: _$zod.ZodOptional<_$zod.ZodNumber>;
6923
7288
  compressedMessageIds: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
6924
7289
  }, _$zod_v4_core0.$strip>;
7290
+ }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
7291
+ sessionId: _$zod.ZodString;
7292
+ eventId: _$zod.ZodString;
7293
+ timestamp: _$zod.ZodNumber;
7294
+ type: _$zod.ZodLiteral<"locality.degraded">;
7295
+ payload: _$zod.ZodDiscriminatedUnion<[_$zod.ZodObject<{
7296
+ intent: _$zod.ZodEnum<{
7297
+ fork: "fork";
7298
+ resume: "resume";
7299
+ }>;
7300
+ verdictKind: _$zod.ZodLiteral<"degrade">;
7301
+ reason: _$zod.ZodEnum<{
7302
+ "adapter-unsupported": "adapter-unsupported";
7303
+ "adapter-mismatch": "adapter-mismatch";
7304
+ "no-adapter-session": "no-adapter-session";
7305
+ "missing-machine-id": "missing-machine-id";
7306
+ "machine-mismatch": "machine-mismatch";
7307
+ "cwd-mismatch": "cwd-mismatch";
7308
+ "transforms-present": "transforms-present";
7309
+ "compression-present": "compression-present";
7310
+ "connector-swap": "connector-swap";
7311
+ "mid-history-unsupported": "mid-history-unsupported";
7312
+ "hybrid-imported-orchestrated": "hybrid-imported-orchestrated";
7313
+ "native-attempt-failed": "native-attempt-failed";
7314
+ "agent-already-started": "agent-already-started";
7315
+ "fork-point-unresolvable": "fork-point-unresolvable";
7316
+ }>;
7317
+ agentId: _$zod.ZodOptional<_$zod.ZodString>;
7318
+ adapterId: _$zod.ZodOptional<_$zod.ZodString>;
7319
+ turnId: _$zod.ZodOptional<_$zod.ZodString>;
7320
+ }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
7321
+ intent: _$zod.ZodEnum<{
7322
+ fork: "fork";
7323
+ resume: "resume";
7324
+ }>;
7325
+ verdictKind: _$zod.ZodLiteral<"foreign">;
7326
+ foreignMachineId: _$zod.ZodString;
7327
+ agentId: _$zod.ZodOptional<_$zod.ZodString>;
7328
+ adapterId: _$zod.ZodOptional<_$zod.ZodString>;
7329
+ turnId: _$zod.ZodOptional<_$zod.ZodString>;
7330
+ }, _$zod_v4_core0.$strip>], "verdictKind">;
6925
7331
  }, _$zod_v4_core0.$strip>], "type">, _$zod.ZodObject<{
6926
7332
  sessionId: _$zod.ZodString;
6927
7333
  eventId: _$zod.ZodString;
@@ -7059,6 +7465,7 @@ declare const SessionSchemas: {
7059
7465
  tracking: "tracking";
7060
7466
  }>>;
7061
7467
  isSidechain: _$zod.ZodOptional<_$zod.ZodBoolean>;
7468
+ machineId: _$zod.ZodOptional<_$zod.ZodNullable<_$zod.ZodString>>;
7062
7469
  preview: _$zod.ZodOptional<_$zod.ZodObject<{
7063
7470
  messageCount: _$zod.ZodNumber;
7064
7471
  firstUserMessage: _$zod.ZodNullable<_$zod.ZodString>;
@@ -7196,6 +7603,7 @@ declare const SessionSchemas: {
7196
7603
  tracking: "tracking";
7197
7604
  }>>;
7198
7605
  isSidechain: _$zod.ZodOptional<_$zod.ZodBoolean>;
7606
+ machineId: _$zod.ZodOptional<_$zod.ZodNullable<_$zod.ZodString>>;
7199
7607
  preview: _$zod.ZodOptional<_$zod.ZodObject<{
7200
7608
  messageCount: _$zod.ZodNumber;
7201
7609
  firstUserMessage: _$zod.ZodNullable<_$zod.ZodString>;
@@ -7324,6 +7732,7 @@ declare const SessionSchemas: {
7324
7732
  tracking: "tracking";
7325
7733
  }>>;
7326
7734
  isSidechain: _$zod.ZodOptional<_$zod.ZodBoolean>;
7735
+ machineId: _$zod.ZodOptional<_$zod.ZodNullable<_$zod.ZodString>>;
7327
7736
  }, _$zod_v4_core0.$strip>>;
7328
7737
  }, _$zod_v4_core0.$strip>;
7329
7738
  };
@@ -7371,6 +7780,7 @@ declare const SessionSchemas: {
7371
7780
  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>>>>;
7372
7781
  spawningToolCallId: _$zod.ZodOptional<_$zod.ZodString>;
7373
7782
  originWindowId: _$zod.ZodOptional<_$zod.ZodString>;
7783
+ machineId: _$zod.ZodOptional<_$zod.ZodNullable<_$zod.ZodString>>;
7374
7784
  }, _$zod_v4_core0.$strip>;
7375
7785
  response: _$zod.ZodObject<{
7376
7786
  sessionId: _$zod.ZodString;
@@ -7395,6 +7805,7 @@ declare const SessionSchemas: {
7395
7805
  restartAgents: {
7396
7806
  request: _$zod.ZodObject<{
7397
7807
  sessionId: _$zod.ZodString;
7808
+ machineId: _$zod.ZodOptional<_$zod.ZodString>;
7398
7809
  }, _$zod_v4_core0.$strip>;
7399
7810
  response: _$zod.ZodObject<{
7400
7811
  sessionId: _$zod.ZodString;
@@ -7564,6 +7975,7 @@ declare const SessionSchemas: {
7564
7975
  tracking: "tracking";
7565
7976
  }>>;
7566
7977
  isSidechain: _$zod.ZodOptional<_$zod.ZodBoolean>;
7978
+ machineId: _$zod.ZodOptional<_$zod.ZodNullable<_$zod.ZodString>>;
7567
7979
  }, _$zod_v4_core0.$strip>>;
7568
7980
  }, _$zod_v4_core0.$strip>;
7569
7981
  };
@@ -7680,4 +8092,4 @@ type KnownSessionEvent = { [K in RuntimeKnownSessionEventType]: SessionEventBase
7680
8092
  */
7681
8093
  declare function isKnownSessionEvent(event: MakaioSessionEvent$1): event is KnownSessionEvent;
7682
8094
  //#endregion
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 };
8095
+ export { TurnStatus as $, NativeLocalityVerdictSchema as A, MessageRoutingStatusSchema as B, SessionEventTypeMap as C, SessionRecordMetadataSchema$1 as Ct, NativeLocalityReason as D, MakaioSessionAgentSchema$1 as Dt, NativeForkDirectiveSchema as E, AgentStatusSchema$1 as Et, TurnIngestionMarkerSchema$1 as F, SessionMessageOriginSchema as G, SessionMessageBlock$1 as H, TurnStarted as I, SessionMessageSchema$1 as J, SessionMessageRole as K, MessageRouting as L, SendMessageResponse as M, TurnCompleted as N, NativeLocalityReasonSchema as O, SessionCreateBase as Ot, TurnIngestionMarker$1 as P, TurnSchema$1 as Q, MessageRoutingSchema$1 as R, SessionEventType$1 as S, SessionRecordMetadata as St, NativeForkDirective$1 as T, AgentStatus as Tt, SessionMessageBlockSchema as U, SessionMessage$1 as V, SessionMessageOrigin$1 as W, TurnInitiator$2 as X, Turn$1 as Y, TurnInitiatorSchema$1 as Z, ForkChildInfo as _, SnapshotPreviewData as _t, SessionPreviewData as a, AgentRole as at, SESSION_EVENT_TYPES as b, MakaioSessionSchema as bt, SessionSchemas as c, BranchKindSchema as ct, SegmentPolicy as d, SNAPSHOT_VERSION as dt, TurnStatusSchema$1 as et, SegmentPolicySchema as f, SessionSnapshot as ft, SessionUpdatedEventSchema as g, SnapshotImportConflictErrorData as gt, SessionUpdatedEvent as h, SnapshotExportOptionsSchema as ht, MakaioSessionEvent$1 as i, UsageMetricsSchema as it, SendMessageRequest as j, NativeLocalityVerdict$1 as k, SessionCreateBaseSchema as kt, ForkTransforms$1 as l, ImportStatus as lt, SessionCreatedEventSchema as m, SnapshotExportOptions as mt, KnownSessionEvent as n, TurnUsageSchema$1 as nt, SessionWithPreview as o, AgentRoleSchema as ot, SessionCreated as p, SessionSnapshotSchema as pt, SessionMessageRoleSchema as q, MakaioSessionAgent$1 as r, UsageMetrics as rt, isKnownSessionEvent as s, BranchKind$1 as st, IMakaioSession$1 as t, TurnUsage$1 as tt, ForkTransformsSchema$1 as u, ImportStatusSchema as ut, ForkChildInfoSchema as v, safeValidateSnapshot as vt, SessionEventTypeSchema as w, SessionWithPreviewSchema as wt, SessionEventPayload as x, SessionPreviewDataSchema as xt, MakaioSessionEventSchema as y, validateSnapshot as yt, MessageRoutingStatus as z };