@maiaos/protocol 0.1.0-canary.4 → 0.1.0-canary.40

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 (182) hide show
  1. package/dist/agent/definition.d.ts +2 -2
  2. package/dist/agent/worker-operation.d.ts +2 -0
  3. package/dist/agent/worker-operation.d.ts.map +1 -1
  4. package/dist/agents/contract.d.ts +25 -0
  5. package/dist/agents/contract.d.ts.map +1 -1
  6. package/dist/agents/contract.js +3 -1
  7. package/dist/agents/contract.js.map +1 -1
  8. package/dist/agents/effect-schema.d.ts +45 -0
  9. package/dist/agents/effect-schema.d.ts.map +1 -1
  10. package/dist/agents/effect-schema.js +38 -0
  11. package/dist/agents/effect-schema.js.map +1 -1
  12. package/dist/agents/feature.d.ts +25 -0
  13. package/dist/agents/feature.d.ts.map +1 -1
  14. package/dist/agents/feature.js +23 -0
  15. package/dist/agents/feature.js.map +1 -1
  16. package/dist/agents/index.d.ts +1 -1
  17. package/dist/agents/index.d.ts.map +1 -1
  18. package/dist/agents/index.js +1 -1
  19. package/dist/agents/index.js.map +1 -1
  20. package/dist/approval/contract.d.ts +4 -0
  21. package/dist/approval/contract.d.ts.map +1 -1
  22. package/dist/approval/feature.d.ts +6 -2
  23. package/dist/approval/feature.d.ts.map +1 -1
  24. package/dist/approval/feature.js +6 -2
  25. package/dist/approval/feature.js.map +1 -1
  26. package/dist/approval/request-effect-schema.d.ts +2 -0
  27. package/dist/approval/request-effect-schema.d.ts.map +1 -1
  28. package/dist/approval/request-effect-schema.js +2 -0
  29. package/dist/approval/request-effect-schema.js.map +1 -1
  30. package/dist/approval/result-effect-schema.d.ts +6 -0
  31. package/dist/approval/result-effect-schema.d.ts.map +1 -1
  32. package/dist/command-receipt/contract.d.ts +1 -0
  33. package/dist/command-receipt/contract.d.ts.map +1 -1
  34. package/dist/command-receipt/effect-schema.d.ts +2 -0
  35. package/dist/command-receipt/effect-schema.d.ts.map +1 -1
  36. package/dist/command-receipt/effect-schema.js +2 -0
  37. package/dist/command-receipt/effect-schema.js.map +1 -1
  38. package/dist/connection/request-effect-schema.d.ts +1 -1
  39. package/dist/connection/request-effect-schema.js +1 -1
  40. package/dist/coordinator-tool/registry.d.ts.map +1 -1
  41. package/dist/coordinator-tool/registry.js +14 -1
  42. package/dist/coordinator-tool/registry.js.map +1 -1
  43. package/dist/discovery/contract.d.ts +2 -0
  44. package/dist/discovery/contract.d.ts.map +1 -1
  45. package/dist/discovery/effect-schema.d.ts +4 -0
  46. package/dist/discovery/effect-schema.d.ts.map +1 -1
  47. package/dist/event/contract.d.ts +82 -0
  48. package/dist/event/contract.d.ts.map +1 -0
  49. package/dist/event/contract.js +13 -0
  50. package/dist/event/contract.js.map +1 -0
  51. package/dist/event/effect-schema.d.ts +3 -0
  52. package/dist/event/effect-schema.d.ts.map +1 -0
  53. package/dist/event/effect-schema.js +3 -0
  54. package/dist/event/effect-schema.js.map +1 -0
  55. package/dist/event/envelope-effect-schema.d.ts +37 -0
  56. package/dist/event/envelope-effect-schema.d.ts.map +1 -0
  57. package/dist/event/envelope-effect-schema.js +113 -0
  58. package/dist/event/envelope-effect-schema.js.map +1 -0
  59. package/dist/event/feature.d.ts +30 -0
  60. package/dist/event/feature.d.ts.map +1 -0
  61. package/dist/event/feature.js +34 -0
  62. package/dist/event/feature.js.map +1 -0
  63. package/dist/event/format.d.ts +14 -0
  64. package/dist/event/format.d.ts.map +1 -0
  65. package/dist/event/format.js +14 -0
  66. package/dist/event/format.js.map +1 -0
  67. package/dist/event/index.d.ts +6 -0
  68. package/dist/event/index.d.ts.map +1 -0
  69. package/dist/event/index.js +6 -0
  70. package/dist/event/index.js.map +1 -0
  71. package/dist/event/read-effect-schema.d.ts +105 -0
  72. package/dist/event/read-effect-schema.d.ts.map +1 -0
  73. package/dist/event/read-effect-schema.js +64 -0
  74. package/dist/event/read-effect-schema.js.map +1 -0
  75. package/dist/event/registry.d.ts +20 -0
  76. package/dist/event/registry.d.ts.map +1 -0
  77. package/dist/event/registry.js +207 -0
  78. package/dist/event/registry.js.map +1 -0
  79. package/dist/event/session-activity-effect-schema.d.ts +14 -0
  80. package/dist/event/session-activity-effect-schema.d.ts.map +1 -0
  81. package/dist/event/session-activity-effect-schema.js +21 -0
  82. package/dist/event/session-activity-effect-schema.js.map +1 -0
  83. package/dist/event/session-activity.d.ts +16 -0
  84. package/dist/event/session-activity.d.ts.map +1 -0
  85. package/dist/event/session-activity.js +11 -0
  86. package/dist/event/session-activity.js.map +1 -0
  87. package/dist/event-stream/contract.d.ts +120 -0
  88. package/dist/event-stream/contract.d.ts.map +1 -0
  89. package/dist/event-stream/contract.js +5 -0
  90. package/dist/event-stream/contract.js.map +1 -0
  91. package/dist/event-stream/effect-schema.d.ts +117 -0
  92. package/dist/event-stream/effect-schema.d.ts.map +1 -0
  93. package/dist/event-stream/effect-schema.js +90 -0
  94. package/dist/event-stream/effect-schema.js.map +1 -0
  95. package/dist/event-stream/index.d.ts +2 -0
  96. package/dist/event-stream/index.d.ts.map +1 -0
  97. package/dist/event-stream/index.js +2 -0
  98. package/dist/event-stream/index.js.map +1 -0
  99. package/dist/feature/registry.d.ts +2 -0
  100. package/dist/feature/registry.d.ts.map +1 -1
  101. package/dist/feature/registry.js +2 -0
  102. package/dist/feature/registry.js.map +1 -1
  103. package/dist/index.d.ts +5 -3
  104. package/dist/index.d.ts.map +1 -1
  105. package/dist/index.js +5 -3
  106. package/dist/index.js.map +1 -1
  107. package/dist/local-node/contract.d.ts +19 -7
  108. package/dist/local-node/contract.d.ts.map +1 -1
  109. package/dist/local-node/contract.js.map +1 -1
  110. package/dist/local-node/effect-schema.d.ts +85 -7
  111. package/dist/local-node/effect-schema.d.ts.map +1 -1
  112. package/dist/local-node/effect-schema.js +32 -6
  113. package/dist/local-node/effect-schema.js.map +1 -1
  114. package/dist/local-node/node-api/methods.d.ts +7 -4
  115. package/dist/local-node/node-api/methods.d.ts.map +1 -1
  116. package/dist/local-node/node-api/methods.js +7 -0
  117. package/dist/local-node/node-api/methods.js.map +1 -1
  118. package/dist/presentation/contract.d.ts +2 -0
  119. package/dist/presentation/contract.d.ts.map +1 -1
  120. package/dist/presentation/effect-schema.d.ts +2 -0
  121. package/dist/presentation/effect-schema.d.ts.map +1 -1
  122. package/dist/presentation/session-list-effect-schema.d.ts +2 -0
  123. package/dist/presentation/session-list-effect-schema.d.ts.map +1 -1
  124. package/dist/session/agent-permission-contract.d.ts +5 -5
  125. package/dist/session/agent-permission-effect-schema.d.ts +9 -9
  126. package/dist/session/contract.d.ts +80 -1
  127. package/dist/session/contract.d.ts.map +1 -1
  128. package/dist/session/contract.js +3 -1
  129. package/dist/session/contract.js.map +1 -1
  130. package/dist/session/effect-schema.d.ts +319 -4
  131. package/dist/session/effect-schema.d.ts.map +1 -1
  132. package/dist/session/effect-schema.js +75 -7
  133. package/dist/session/effect-schema.js.map +1 -1
  134. package/dist/session/feature.d.ts +25 -0
  135. package/dist/session/feature.d.ts.map +1 -1
  136. package/dist/session/feature.js +23 -0
  137. package/dist/session/feature.js.map +1 -1
  138. package/dist/session/index.d.ts +2 -2
  139. package/dist/session/index.d.ts.map +1 -1
  140. package/dist/session/index.js +2 -2
  141. package/dist/session/index.js.map +1 -1
  142. package/dist/session/policy.d.ts +25 -0
  143. package/dist/session/policy.d.ts.map +1 -1
  144. package/dist/session/policy.js +31 -0
  145. package/dist/session/policy.js.map +1 -1
  146. package/dist/session/stop-resume-contract.d.ts +4 -0
  147. package/dist/session/stop-resume-contract.d.ts.map +1 -1
  148. package/dist/session/worktree-effect-schema.d.ts +7 -0
  149. package/dist/session/worktree-effect-schema.d.ts.map +1 -1
  150. package/dist/session/worktree-effect-schema.js +14 -1
  151. package/dist/session/worktree-effect-schema.js.map +1 -1
  152. package/dist/session-guard/contract.d.ts +30 -1
  153. package/dist/session-guard/contract.d.ts.map +1 -1
  154. package/dist/session-guard/contract.js +10 -2
  155. package/dist/session-guard/contract.js.map +1 -1
  156. package/dist/session-guard/index.d.ts +1 -1
  157. package/dist/session-guard/index.d.ts.map +1 -1
  158. package/dist/session-guard/index.js +1 -1
  159. package/dist/session-guard/index.js.map +1 -1
  160. package/dist/session-guard/request-effect-schema.d.ts +33 -0
  161. package/dist/session-guard/request-effect-schema.d.ts.map +1 -1
  162. package/dist/session-guard/request-effect-schema.js +22 -0
  163. package/dist/session-guard/request-effect-schema.js.map +1 -1
  164. package/dist/session-guard/result-effect-schema.d.ts +26 -0
  165. package/dist/session-guard/result-effect-schema.d.ts.map +1 -1
  166. package/dist/session-guard/result-effect-schema.js +3 -1
  167. package/dist/session-guard/result-effect-schema.js.map +1 -1
  168. package/dist/terminal/contract.d.ts +1 -0
  169. package/dist/terminal/contract.d.ts.map +1 -1
  170. package/dist/terminal/effect-schema.d.ts +4 -0
  171. package/dist/terminal/effect-schema.d.ts.map +1 -1
  172. package/dist/terminal/effect-schema.js +2 -0
  173. package/dist/terminal/effect-schema.js.map +1 -1
  174. package/dist/voice/contract.d.ts +6 -6
  175. package/dist/voice/effect-schema.d.ts +9 -9
  176. package/dist/voice/effect-schema.d.ts.map +1 -1
  177. package/dist/voice/effect-schema.js +3 -1
  178. package/dist/voice/effect-schema.js.map +1 -1
  179. package/dist/voice/feature.d.ts +2 -2
  180. package/dist/voice/orchestrator-system-prompt.d.ts +2 -2
  181. package/dist/voice/orchestrator-system-prompt.js +2 -2
  182. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import * as Schema from "effect/Schema";
2
- import { SESSION_EFFORT_LEVELS } from "./policy.js";
2
+ import { SESSION_EFFORT_LEVELS, SESSION_PERMISSION_MODES } from "./policy.js";
3
3
  /**
4
4
  * A person-readable Session name: one line of 1 to 80 characters without
5
5
  * surrounding spaces. Titles need not be unique; a reference to one fails
@@ -13,6 +13,9 @@ export declare const sessionExecutorKindEffectSchema: Schema.Literals<readonly [
13
13
  export declare const agentIdentifierEffectSchema: Schema.String;
14
14
  export declare const sessionEffortEffectSchema: Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>;
15
15
  export declare const supportsEffort: (kind: keyof typeof SESSION_EFFORT_LEVELS, effort: string) => boolean;
16
+ /** A permission mode either vendor CLI documents; the Node checks it against the Session's executor kind. */
17
+ export declare const sessionPermissionEffectSchema: Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-failure", "on-request", "never"]>;
18
+ export declare const supportsPermission: (kind: keyof typeof SESSION_PERMISSION_MODES, permission: string) => boolean;
16
19
  export declare const sessionEffectSchema: Schema.Struct<{
17
20
  readonly createdAt: Schema.String;
18
21
  readonly id: Schema.String;
@@ -27,6 +30,12 @@ export declare const sessionEffectSchema: Schema.Struct<{
27
30
  readonly key: Schema.String;
28
31
  readonly version: Schema.String;
29
32
  }>>;
33
+ /**
34
+ * `none` for a host-authority Session: the vendor harness runs as the
35
+ * Node's user with no Maia sandbox ([D-198](../../../../docs/decisions.md#d-198)).
36
+ * A sandboxed Session carries none.
37
+ */
38
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
30
39
  readonly executor: Schema.optional<Schema.Struct<{
31
40
  readonly connectionId: Schema.String;
32
41
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
@@ -38,6 +47,8 @@ export declare const sessionEffectSchema: Schema.Struct<{
38
47
  readonly code: Schema.String;
39
48
  readonly message: Schema.String;
40
49
  }>>;
50
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
51
+ readonly latestTurnId: Schema.optional<Schema.String>;
41
52
  readonly schemaVersion: Schema.Literal<4>;
42
53
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
43
54
  readonly title: Schema.optional<Schema.String>;
@@ -69,6 +80,12 @@ export declare const sessionEventEffectSchema: Schema.Union<readonly [Schema.Str
69
80
  readonly key: Schema.String;
70
81
  readonly version: Schema.String;
71
82
  }>>;
83
+ /** The actor that opted a host-authority Session out of the sandbox. */
84
+ readonly authorizedBy: Schema.optional<Schema.String>;
85
+ /** `none` when the Session runs with host authority. */
86
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
87
+ /** Where a host-authority Session starts, as the caller asked. */
88
+ readonly cwd: Schema.optional<Schema.String>;
72
89
  /** The account the Session binds to, named or picked by the Node. */
73
90
  readonly executor: Schema.optional<Schema.Struct<{
74
91
  readonly connectionId: Schema.String;
@@ -76,6 +93,8 @@ export declare const sessionEventEffectSchema: Schema.Union<readonly [Schema.Str
76
93
  readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
77
94
  readonly model: Schema.optional<Schema.String>;
78
95
  }>>;
96
+ /** The permission mode a host-authority Session passes to its vendor CLI. */
97
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-failure", "on-request", "never"]>>;
79
98
  readonly projectId: Schema.String;
80
99
  readonly workspaceId: Schema.String;
81
100
  readonly workspaceRevision: Schema.String;
@@ -276,9 +295,13 @@ export declare const sessionEventEffectSchema: Schema.Union<readonly [Schema.Str
276
295
  * both `connectionId` and `executor`, and optionally the `model`. An Agent
277
296
  * (`agentId`) supplies the harness, Connection, model and effort itself, so it
278
297
  * excludes every one of them. `role` (default `worker`) bounds what the
279
- * Session's own credential reaches. A vendor executor Session with `worktree`
280
- * is a coding Session: it gets its own worktree from the base ref of the
281
- * Workspace's repository and may write inside it.
298
+ * Session's own credential reaches. `hostAuthority` opts one executor Session
299
+ * out of the Maia sandbox ([D-198](../../../../docs/decisions.md#d-198)): it
300
+ * runs in an existing `cwd` as the Node's user, takes no worktree, Agent or
301
+ * role, and passes `permission` to its vendor CLI unchanged. A vendor
302
+ * executor Session with `worktree` is a coding Session: it gets its own
303
+ * worktree from the base ref of the Workspace's repository and may write
304
+ * inside it.
282
305
  */
283
306
  export declare const sessionCreateParametersEffectSchema: Schema.Struct<{
284
307
  readonly commandId: Schema.String;
@@ -286,6 +309,8 @@ export declare const sessionCreateParametersEffectSchema: Schema.Struct<{
286
309
  readonly workspaceId: Schema.String;
287
310
  readonly agentId: Schema.optional<Schema.String>;
288
311
  readonly connectionId: Schema.optional<Schema.String>;
312
+ /** Where the Session starts; the Node checks it against the Workspace root. */
313
+ readonly cwd: Schema.optional<Schema.String>;
289
314
  readonly definitionRef: Schema.optional<Schema.Struct<{
290
315
  readonly contentDigest: Schema.String;
291
316
  readonly key: Schema.String;
@@ -293,7 +318,9 @@ export declare const sessionCreateParametersEffectSchema: Schema.Struct<{
293
318
  }>>;
294
319
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
295
320
  readonly executor: Schema.optional<Schema.Literals<readonly ["claude-code", "codex-cli"]>>;
321
+ readonly hostAuthority: Schema.optional<Schema.Literal<true>>;
296
322
  readonly model: Schema.optional<Schema.String>;
323
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-failure", "on-request", "never"]>>;
297
324
  readonly role: Schema.optional<Schema.Literals<readonly ["orchestrator", "worker"]>>;
298
325
  readonly title: Schema.optional<Schema.String>;
299
326
  readonly worktree: Schema.optional<Schema.Struct<{
@@ -329,6 +356,12 @@ export declare const sessionListParametersEffectSchema: Schema.Struct<{
329
356
  export declare const sessionShowParametersEffectSchema: Schema.Struct<{
330
357
  readonly sessionId: Schema.String;
331
358
  }>;
359
+ export declare const sessionWaitParametersEffectSchema: Schema.Struct<{
360
+ readonly sessionId: Schema.String;
361
+ /** The wait ends when the Session is in any of these states. */
362
+ readonly states: Schema.$Array<Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>>;
363
+ readonly waitMilliseconds: Schema.Int;
364
+ }>;
332
365
  export declare const sessionEventsListParametersEffectSchema: Schema.Struct<{
333
366
  readonly afterSessionCursor: Schema.String;
334
367
  readonly limit: Schema.Int;
@@ -584,6 +617,12 @@ export declare const sessionCreateResultEffectSchema: Schema.Struct<{
584
617
  readonly key: Schema.String;
585
618
  readonly version: Schema.String;
586
619
  }>>;
620
+ /**
621
+ * `none` for a host-authority Session: the vendor harness runs as the
622
+ * Node's user with no Maia sandbox ([D-198](../../../../docs/decisions.md#d-198)).
623
+ * A sandboxed Session carries none.
624
+ */
625
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
587
626
  readonly executor: Schema.optional<Schema.Struct<{
588
627
  readonly connectionId: Schema.String;
589
628
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
@@ -595,6 +634,8 @@ export declare const sessionCreateResultEffectSchema: Schema.Struct<{
595
634
  readonly code: Schema.String;
596
635
  readonly message: Schema.String;
597
636
  }>>;
637
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
638
+ readonly latestTurnId: Schema.optional<Schema.String>;
598
639
  readonly schemaVersion: Schema.Literal<4>;
599
640
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
600
641
  readonly title: Schema.optional<Schema.String>;
@@ -647,6 +688,12 @@ export declare const sessionSpawnResultEffectSchema: Schema.Struct<{
647
688
  readonly key: Schema.String;
648
689
  readonly version: Schema.String;
649
690
  }>>;
691
+ /**
692
+ * `none` for a host-authority Session: the vendor harness runs as the
693
+ * Node's user with no Maia sandbox ([D-198](../../../../docs/decisions.md#d-198)).
694
+ * A sandboxed Session carries none.
695
+ */
696
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
650
697
  readonly executor: Schema.optional<Schema.Struct<{
651
698
  readonly connectionId: Schema.String;
652
699
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
@@ -658,6 +705,8 @@ export declare const sessionSpawnResultEffectSchema: Schema.Struct<{
658
705
  readonly code: Schema.String;
659
706
  readonly message: Schema.String;
660
707
  }>>;
708
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
709
+ readonly latestTurnId: Schema.optional<Schema.String>;
661
710
  readonly schemaVersion: Schema.Literal<4>;
662
711
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
663
712
  readonly title: Schema.optional<Schema.String>;
@@ -694,6 +743,12 @@ export declare const sessionListResultEffectSchema: Schema.Struct<{
694
743
  readonly key: Schema.String;
695
744
  readonly version: Schema.String;
696
745
  }>>;
746
+ /**
747
+ * `none` for a host-authority Session: the vendor harness runs as the
748
+ * Node's user with no Maia sandbox ([D-198](../../../../docs/decisions.md#d-198)).
749
+ * A sandboxed Session carries none.
750
+ */
751
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
697
752
  readonly executor: Schema.optional<Schema.Struct<{
698
753
  readonly connectionId: Schema.String;
699
754
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
@@ -705,6 +760,8 @@ export declare const sessionListResultEffectSchema: Schema.Struct<{
705
760
  readonly code: Schema.String;
706
761
  readonly message: Schema.String;
707
762
  }>>;
763
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
764
+ readonly latestTurnId: Schema.optional<Schema.String>;
708
765
  readonly schemaVersion: Schema.Literal<4>;
709
766
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
710
767
  readonly title: Schema.optional<Schema.String>;
@@ -740,6 +797,12 @@ export declare const sessionShowResultEffectSchema: Schema.Struct<{
740
797
  readonly key: Schema.String;
741
798
  readonly version: Schema.String;
742
799
  }>>;
800
+ /**
801
+ * `none` for a host-authority Session: the vendor harness runs as the
802
+ * Node's user with no Maia sandbox ([D-198](../../../../docs/decisions.md#d-198)).
803
+ * A sandboxed Session carries none.
804
+ */
805
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
743
806
  readonly executor: Schema.optional<Schema.Struct<{
744
807
  readonly connectionId: Schema.String;
745
808
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
@@ -751,6 +814,62 @@ export declare const sessionShowResultEffectSchema: Schema.Struct<{
751
814
  readonly code: Schema.String;
752
815
  readonly message: Schema.String;
753
816
  }>>;
817
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
818
+ readonly latestTurnId: Schema.optional<Schema.String>;
819
+ readonly schemaVersion: Schema.Literal<4>;
820
+ /** Set at creation or by a rename; otherwise the first line of the first turn. */
821
+ readonly title: Schema.optional<Schema.String>;
822
+ /** A coding Session's own worktree; a reading Session has none. */
823
+ readonly worktree: Schema.optional<Schema.Struct<{
824
+ readonly baseRef: Schema.String;
825
+ readonly baseRevision: Schema.String;
826
+ readonly branch: Schema.String;
827
+ readonly setup: Schema.Literals<readonly ["none", "pending", "succeeded", "failed"]>;
828
+ readonly skills: Schema.optional<Schema.$Array<Schema.Struct<{
829
+ readonly digest: Schema.String;
830
+ readonly name: Schema.String;
831
+ }>>>;
832
+ readonly state: Schema.Literals<readonly ["active", "archived", "removed"]>;
833
+ }>>;
834
+ }>;
835
+ }>;
836
+ /** `satisfied` is false when the bounded wait ended first; `session` is then its last read. */
837
+ export declare const sessionWaitResultEffectSchema: Schema.Struct<{
838
+ readonly method: Schema.Literal<"session.wait">;
839
+ readonly satisfied: Schema.Boolean;
840
+ readonly session: Schema.Struct<{
841
+ readonly createdAt: Schema.String;
842
+ readonly id: Schema.String;
843
+ readonly projectId: Schema.String;
844
+ readonly revision: Schema.String;
845
+ readonly state: Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>;
846
+ readonly updatedAt: Schema.String;
847
+ readonly workspaceId: Schema.String;
848
+ readonly workspaceRevision: Schema.String;
849
+ readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
850
+ readonly contentDigest: Schema.String;
851
+ readonly key: Schema.String;
852
+ readonly version: Schema.String;
853
+ }>>;
854
+ /**
855
+ * `none` for a host-authority Session: the vendor harness runs as the
856
+ * Node's user with no Maia sandbox ([D-198](../../../../docs/decisions.md#d-198)).
857
+ * A sandboxed Session carries none.
858
+ */
859
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
860
+ readonly executor: Schema.optional<Schema.Struct<{
861
+ readonly connectionId: Schema.String;
862
+ readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
863
+ readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
864
+ readonly model: Schema.optional<Schema.String>;
865
+ }>>;
866
+ /** Why the runtime of a failed Session failed, when Maia knows. */
867
+ readonly failure: Schema.optional<Schema.Struct<{
868
+ readonly code: Schema.String;
869
+ readonly message: Schema.String;
870
+ }>>;
871
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
872
+ readonly latestTurnId: Schema.optional<Schema.String>;
754
873
  readonly schemaVersion: Schema.Literal<4>;
755
874
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
756
875
  readonly title: Schema.optional<Schema.String>;
@@ -785,6 +904,12 @@ export declare const sessionEventsListResultEffectSchema: Schema.Struct<{
785
904
  readonly key: Schema.String;
786
905
  readonly version: Schema.String;
787
906
  }>>;
907
+ /** The actor that opted a host-authority Session out of the sandbox. */
908
+ readonly authorizedBy: Schema.optional<Schema.String>;
909
+ /** `none` when the Session runs with host authority. */
910
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
911
+ /** Where a host-authority Session starts, as the caller asked. */
912
+ readonly cwd: Schema.optional<Schema.String>;
788
913
  /** The account the Session binds to, named or picked by the Node. */
789
914
  readonly executor: Schema.optional<Schema.Struct<{
790
915
  readonly connectionId: Schema.String;
@@ -792,6 +917,8 @@ export declare const sessionEventsListResultEffectSchema: Schema.Struct<{
792
917
  readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
793
918
  readonly model: Schema.optional<Schema.String>;
794
919
  }>>;
920
+ /** The permission mode a host-authority Session passes to its vendor CLI. */
921
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-failure", "on-request", "never"]>>;
795
922
  readonly projectId: Schema.String;
796
923
  readonly workspaceId: Schema.String;
797
924
  readonly workspaceRevision: Schema.String;
@@ -987,6 +1114,8 @@ export declare const sessionEventsListResultEffectSchema: Schema.Struct<{
987
1114
  }>]>]>>;
988
1115
  readonly method: Schema.Literal<"session.events.list">;
989
1116
  readonly nextSessionCursor: Schema.optional<Schema.String>;
1117
+ /** Set when a prune removed events after the caller's cursor: the oldest retained cursor. */
1118
+ readonly oldestRetainedCursor: Schema.optional<Schema.String>;
990
1119
  readonly sessionId: Schema.String;
991
1120
  }>;
992
1121
  export declare const sessionStartResultEffectSchema: Schema.Struct<{
@@ -1022,6 +1151,12 @@ export declare const sessionStartResultEffectSchema: Schema.Struct<{
1022
1151
  readonly key: Schema.String;
1023
1152
  readonly version: Schema.String;
1024
1153
  }>>;
1154
+ /**
1155
+ * `none` for a host-authority Session: the vendor harness runs as the
1156
+ * Node's user with no Maia sandbox ([D-198](../../../../docs/decisions.md#d-198)).
1157
+ * A sandboxed Session carries none.
1158
+ */
1159
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
1025
1160
  readonly executor: Schema.optional<Schema.Struct<{
1026
1161
  readonly connectionId: Schema.String;
1027
1162
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
@@ -1033,6 +1168,8 @@ export declare const sessionStartResultEffectSchema: Schema.Struct<{
1033
1168
  readonly code: Schema.String;
1034
1169
  readonly message: Schema.String;
1035
1170
  }>>;
1171
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
1172
+ readonly latestTurnId: Schema.optional<Schema.String>;
1036
1173
  readonly schemaVersion: Schema.Literal<4>;
1037
1174
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
1038
1175
  readonly title: Schema.optional<Schema.String>;
@@ -1083,6 +1220,12 @@ export declare const sessionStopResultEffectSchema: Schema.Struct<{
1083
1220
  readonly key: Schema.String;
1084
1221
  readonly version: Schema.String;
1085
1222
  }>>;
1223
+ /**
1224
+ * `none` for a host-authority Session: the vendor harness runs as the
1225
+ * Node's user with no Maia sandbox ([D-198](../../../../docs/decisions.md#d-198)).
1226
+ * A sandboxed Session carries none.
1227
+ */
1228
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
1086
1229
  readonly executor: Schema.optional<Schema.Struct<{
1087
1230
  readonly connectionId: Schema.String;
1088
1231
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
@@ -1094,6 +1237,8 @@ export declare const sessionStopResultEffectSchema: Schema.Struct<{
1094
1237
  readonly code: Schema.String;
1095
1238
  readonly message: Schema.String;
1096
1239
  }>>;
1240
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
1241
+ readonly latestTurnId: Schema.optional<Schema.String>;
1097
1242
  readonly schemaVersion: Schema.Literal<4>;
1098
1243
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
1099
1244
  readonly title: Schema.optional<Schema.String>;
@@ -1144,6 +1289,12 @@ export declare const sessionResumeResultEffectSchema: Schema.Struct<{
1144
1289
  readonly key: Schema.String;
1145
1290
  readonly version: Schema.String;
1146
1291
  }>>;
1292
+ /**
1293
+ * `none` for a host-authority Session: the vendor harness runs as the
1294
+ * Node's user with no Maia sandbox ([D-198](../../../../docs/decisions.md#d-198)).
1295
+ * A sandboxed Session carries none.
1296
+ */
1297
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
1147
1298
  readonly executor: Schema.optional<Schema.Struct<{
1148
1299
  readonly connectionId: Schema.String;
1149
1300
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
@@ -1155,6 +1306,8 @@ export declare const sessionResumeResultEffectSchema: Schema.Struct<{
1155
1306
  readonly code: Schema.String;
1156
1307
  readonly message: Schema.String;
1157
1308
  }>>;
1309
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
1310
+ readonly latestTurnId: Schema.optional<Schema.String>;
1158
1311
  readonly schemaVersion: Schema.Literal<4>;
1159
1312
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
1160
1313
  readonly title: Schema.optional<Schema.String>;
@@ -1205,6 +1358,12 @@ export declare const sessionRenameResultEffectSchema: Schema.Struct<{
1205
1358
  readonly key: Schema.String;
1206
1359
  readonly version: Schema.String;
1207
1360
  }>>;
1361
+ /**
1362
+ * `none` for a host-authority Session: the vendor harness runs as the
1363
+ * Node's user with no Maia sandbox ([D-198](../../../../docs/decisions.md#d-198)).
1364
+ * A sandboxed Session carries none.
1365
+ */
1366
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
1208
1367
  readonly executor: Schema.optional<Schema.Struct<{
1209
1368
  readonly connectionId: Schema.String;
1210
1369
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
@@ -1216,6 +1375,8 @@ export declare const sessionRenameResultEffectSchema: Schema.Struct<{
1216
1375
  readonly code: Schema.String;
1217
1376
  readonly message: Schema.String;
1218
1377
  }>>;
1378
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
1379
+ readonly latestTurnId: Schema.optional<Schema.String>;
1219
1380
  readonly schemaVersion: Schema.Literal<4>;
1220
1381
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
1221
1382
  readonly title: Schema.optional<Schema.String>;
@@ -1277,6 +1438,12 @@ export declare const sessionArchiveResultEffectSchema: Schema.Struct<{
1277
1438
  readonly key: Schema.String;
1278
1439
  readonly version: Schema.String;
1279
1440
  }>>;
1441
+ /**
1442
+ * `none` for a host-authority Session: the vendor harness runs as the
1443
+ * Node's user with no Maia sandbox ([D-198](../../../../docs/decisions.md#d-198)).
1444
+ * A sandboxed Session carries none.
1445
+ */
1446
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
1280
1447
  readonly executor: Schema.optional<Schema.Struct<{
1281
1448
  readonly connectionId: Schema.String;
1282
1449
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
@@ -1288,6 +1455,8 @@ export declare const sessionArchiveResultEffectSchema: Schema.Struct<{
1288
1455
  readonly code: Schema.String;
1289
1456
  readonly message: Schema.String;
1290
1457
  }>>;
1458
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
1459
+ readonly latestTurnId: Schema.optional<Schema.String>;
1291
1460
  readonly schemaVersion: Schema.Literal<4>;
1292
1461
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
1293
1462
  readonly title: Schema.optional<Schema.String>;
@@ -1313,6 +1482,8 @@ export declare const sessionRequestPayloadEffectSchema: Schema.Union<readonly [S
1313
1482
  readonly workspaceId: Schema.String;
1314
1483
  readonly agentId: Schema.optional<Schema.String>;
1315
1484
  readonly connectionId: Schema.optional<Schema.String>;
1485
+ /** Where the Session starts; the Node checks it against the Workspace root. */
1486
+ readonly cwd: Schema.optional<Schema.String>;
1316
1487
  readonly definitionRef: Schema.optional<Schema.Struct<{
1317
1488
  readonly contentDigest: Schema.String;
1318
1489
  readonly key: Schema.String;
@@ -1320,7 +1491,9 @@ export declare const sessionRequestPayloadEffectSchema: Schema.Union<readonly [S
1320
1491
  }>>;
1321
1492
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
1322
1493
  readonly executor: Schema.optional<Schema.Literals<readonly ["claude-code", "codex-cli"]>>;
1494
+ readonly hostAuthority: Schema.optional<Schema.Literal<true>>;
1323
1495
  readonly model: Schema.optional<Schema.String>;
1496
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-failure", "on-request", "never"]>>;
1324
1497
  readonly role: Schema.optional<Schema.Literals<readonly ["orchestrator", "worker"]>>;
1325
1498
  readonly title: Schema.optional<Schema.String>;
1326
1499
  readonly worktree: Schema.optional<Schema.Struct<{
@@ -1341,6 +1514,14 @@ export declare const sessionRequestPayloadEffectSchema: Schema.Union<readonly [S
1341
1514
  readonly parameters: Schema.Struct<{
1342
1515
  readonly sessionId: Schema.String;
1343
1516
  }>;
1517
+ }>, Schema.Struct<{
1518
+ readonly method: Schema.Literal<"session.wait">;
1519
+ readonly parameters: Schema.Struct<{
1520
+ readonly sessionId: Schema.String;
1521
+ /** The wait ends when the Session is in any of these states. */
1522
+ readonly states: Schema.$Array<Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>>;
1523
+ readonly waitMilliseconds: Schema.Int;
1524
+ }>;
1344
1525
  }>, Schema.Struct<{
1345
1526
  readonly method: Schema.Literal<"session.spawn">;
1346
1527
  readonly parameters: Schema.Struct<{
@@ -1464,6 +1645,12 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1464
1645
  readonly key: Schema.String;
1465
1646
  readonly version: Schema.String;
1466
1647
  }>>;
1648
+ /**
1649
+ * `none` for a host-authority Session: the vendor harness runs as the
1650
+ * Node's user with no Maia sandbox ([D-198](../../../../docs/decisions.md#d-198)).
1651
+ * A sandboxed Session carries none.
1652
+ */
1653
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
1467
1654
  readonly executor: Schema.optional<Schema.Struct<{
1468
1655
  readonly connectionId: Schema.String;
1469
1656
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
@@ -1475,6 +1662,8 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1475
1662
  readonly code: Schema.String;
1476
1663
  readonly message: Schema.String;
1477
1664
  }>>;
1665
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
1666
+ readonly latestTurnId: Schema.optional<Schema.String>;
1478
1667
  readonly schemaVersion: Schema.Literal<4>;
1479
1668
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
1480
1669
  readonly title: Schema.optional<Schema.String>;
@@ -1589,6 +1778,12 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1589
1778
  readonly key: Schema.String;
1590
1779
  readonly version: Schema.String;
1591
1780
  }>>;
1781
+ /**
1782
+ * `none` for a host-authority Session: the vendor harness runs as the
1783
+ * Node's user with no Maia sandbox ([D-198](../../../../docs/decisions.md#d-198)).
1784
+ * A sandboxed Session carries none.
1785
+ */
1786
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
1592
1787
  readonly executor: Schema.optional<Schema.Struct<{
1593
1788
  readonly connectionId: Schema.String;
1594
1789
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
@@ -1600,6 +1795,8 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1600
1795
  readonly code: Schema.String;
1601
1796
  readonly message: Schema.String;
1602
1797
  }>>;
1798
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
1799
+ readonly latestTurnId: Schema.optional<Schema.String>;
1603
1800
  readonly schemaVersion: Schema.Literal<4>;
1604
1801
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
1605
1802
  readonly title: Schema.optional<Schema.String>;
@@ -1700,6 +1897,64 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1700
1897
  readonly key: Schema.String;
1701
1898
  readonly version: Schema.String;
1702
1899
  }>>;
1900
+ /**
1901
+ * `none` for a host-authority Session: the vendor harness runs as the
1902
+ * Node's user with no Maia sandbox ([D-198](../../../../docs/decisions.md#d-198)).
1903
+ * A sandboxed Session carries none.
1904
+ */
1905
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
1906
+ readonly executor: Schema.optional<Schema.Struct<{
1907
+ readonly connectionId: Schema.String;
1908
+ readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
1909
+ readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
1910
+ readonly model: Schema.optional<Schema.String>;
1911
+ }>>;
1912
+ /** Why the runtime of a failed Session failed, when Maia knows. */
1913
+ readonly failure: Schema.optional<Schema.Struct<{
1914
+ readonly code: Schema.String;
1915
+ readonly message: Schema.String;
1916
+ }>>;
1917
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
1918
+ readonly latestTurnId: Schema.optional<Schema.String>;
1919
+ readonly schemaVersion: Schema.Literal<4>;
1920
+ /** Set at creation or by a rename; otherwise the first line of the first turn. */
1921
+ readonly title: Schema.optional<Schema.String>;
1922
+ /** A coding Session's own worktree; a reading Session has none. */
1923
+ readonly worktree: Schema.optional<Schema.Struct<{
1924
+ readonly baseRef: Schema.String;
1925
+ readonly baseRevision: Schema.String;
1926
+ readonly branch: Schema.String;
1927
+ readonly setup: Schema.Literals<readonly ["none", "pending", "succeeded", "failed"]>;
1928
+ readonly skills: Schema.optional<Schema.$Array<Schema.Struct<{
1929
+ readonly digest: Schema.String;
1930
+ readonly name: Schema.String;
1931
+ }>>>;
1932
+ readonly state: Schema.Literals<readonly ["active", "archived", "removed"]>;
1933
+ }>>;
1934
+ }>;
1935
+ }>, Schema.Struct<{
1936
+ readonly method: Schema.Literal<"session.wait">;
1937
+ readonly satisfied: Schema.Boolean;
1938
+ readonly session: Schema.Struct<{
1939
+ readonly createdAt: Schema.String;
1940
+ readonly id: Schema.String;
1941
+ readonly projectId: Schema.String;
1942
+ readonly revision: Schema.String;
1943
+ readonly state: Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>;
1944
+ readonly updatedAt: Schema.String;
1945
+ readonly workspaceId: Schema.String;
1946
+ readonly workspaceRevision: Schema.String;
1947
+ readonly agentDefinitionRef: Schema.optional<Schema.Struct<{
1948
+ readonly contentDigest: Schema.String;
1949
+ readonly key: Schema.String;
1950
+ readonly version: Schema.String;
1951
+ }>>;
1952
+ /**
1953
+ * `none` for a host-authority Session: the vendor harness runs as the
1954
+ * Node's user with no Maia sandbox ([D-198](../../../../docs/decisions.md#d-198)).
1955
+ * A sandboxed Session carries none.
1956
+ */
1957
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
1703
1958
  readonly executor: Schema.optional<Schema.Struct<{
1704
1959
  readonly connectionId: Schema.String;
1705
1960
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
@@ -1711,6 +1966,8 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1711
1966
  readonly code: Schema.String;
1712
1967
  readonly message: Schema.String;
1713
1968
  }>>;
1969
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
1970
+ readonly latestTurnId: Schema.optional<Schema.String>;
1714
1971
  readonly schemaVersion: Schema.Literal<4>;
1715
1972
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
1716
1973
  readonly title: Schema.optional<Schema.String>;
@@ -1762,6 +2019,12 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1762
2019
  readonly key: Schema.String;
1763
2020
  readonly version: Schema.String;
1764
2021
  }>>;
2022
+ /**
2023
+ * `none` for a host-authority Session: the vendor harness runs as the
2024
+ * Node's user with no Maia sandbox ([D-198](../../../../docs/decisions.md#d-198)).
2025
+ * A sandboxed Session carries none.
2026
+ */
2027
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
1765
2028
  readonly executor: Schema.optional<Schema.Struct<{
1766
2029
  readonly connectionId: Schema.String;
1767
2030
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
@@ -1773,6 +2036,8 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1773
2036
  readonly code: Schema.String;
1774
2037
  readonly message: Schema.String;
1775
2038
  }>>;
2039
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
2040
+ readonly latestTurnId: Schema.optional<Schema.String>;
1776
2041
  readonly schemaVersion: Schema.Literal<4>;
1777
2042
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
1778
2043
  readonly title: Schema.optional<Schema.String>;
@@ -1806,6 +2071,12 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1806
2071
  readonly key: Schema.String;
1807
2072
  readonly version: Schema.String;
1808
2073
  }>>;
2074
+ /** The actor that opted a host-authority Session out of the sandbox. */
2075
+ readonly authorizedBy: Schema.optional<Schema.String>;
2076
+ /** `none` when the Session runs with host authority. */
2077
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
2078
+ /** Where a host-authority Session starts, as the caller asked. */
2079
+ readonly cwd: Schema.optional<Schema.String>;
1809
2080
  /** The account the Session binds to, named or picked by the Node. */
1810
2081
  readonly executor: Schema.optional<Schema.Struct<{
1811
2082
  readonly connectionId: Schema.String;
@@ -1813,6 +2084,8 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1813
2084
  readonly kind: Schema.Literals<readonly ["claude-code", "codex-cli"]>;
1814
2085
  readonly model: Schema.optional<Schema.String>;
1815
2086
  }>>;
2087
+ /** The permission mode a host-authority Session passes to its vendor CLI. */
2088
+ readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-failure", "on-request", "never"]>>;
1816
2089
  readonly projectId: Schema.String;
1817
2090
  readonly workspaceId: Schema.String;
1818
2091
  readonly workspaceRevision: Schema.String;
@@ -2008,6 +2281,8 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2008
2281
  }>]>]>>;
2009
2282
  readonly method: Schema.Literal<"session.events.list">;
2010
2283
  readonly nextSessionCursor: Schema.optional<Schema.String>;
2284
+ /** Set when a prune removed events after the caller's cursor: the oldest retained cursor. */
2285
+ readonly oldestRetainedCursor: Schema.optional<Schema.String>;
2011
2286
  readonly sessionId: Schema.String;
2012
2287
  }>, Schema.Struct<{
2013
2288
  readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
@@ -2042,6 +2317,12 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2042
2317
  readonly key: Schema.String;
2043
2318
  readonly version: Schema.String;
2044
2319
  }>>;
2320
+ /**
2321
+ * `none` for a host-authority Session: the vendor harness runs as the
2322
+ * Node's user with no Maia sandbox ([D-198](../../../../docs/decisions.md#d-198)).
2323
+ * A sandboxed Session carries none.
2324
+ */
2325
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
2045
2326
  readonly executor: Schema.optional<Schema.Struct<{
2046
2327
  readonly connectionId: Schema.String;
2047
2328
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
@@ -2053,6 +2334,8 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2053
2334
  readonly code: Schema.String;
2054
2335
  readonly message: Schema.String;
2055
2336
  }>>;
2337
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
2338
+ readonly latestTurnId: Schema.optional<Schema.String>;
2056
2339
  readonly schemaVersion: Schema.Literal<4>;
2057
2340
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
2058
2341
  readonly title: Schema.optional<Schema.String>;
@@ -2102,6 +2385,12 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2102
2385
  readonly key: Schema.String;
2103
2386
  readonly version: Schema.String;
2104
2387
  }>>;
2388
+ /**
2389
+ * `none` for a host-authority Session: the vendor harness runs as the
2390
+ * Node's user with no Maia sandbox ([D-198](../../../../docs/decisions.md#d-198)).
2391
+ * A sandboxed Session carries none.
2392
+ */
2393
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
2105
2394
  readonly executor: Schema.optional<Schema.Struct<{
2106
2395
  readonly connectionId: Schema.String;
2107
2396
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
@@ -2113,6 +2402,8 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2113
2402
  readonly code: Schema.String;
2114
2403
  readonly message: Schema.String;
2115
2404
  }>>;
2405
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
2406
+ readonly latestTurnId: Schema.optional<Schema.String>;
2116
2407
  readonly schemaVersion: Schema.Literal<4>;
2117
2408
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
2118
2409
  readonly title: Schema.optional<Schema.String>;
@@ -2162,6 +2453,12 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2162
2453
  readonly key: Schema.String;
2163
2454
  readonly version: Schema.String;
2164
2455
  }>>;
2456
+ /**
2457
+ * `none` for a host-authority Session: the vendor harness runs as the
2458
+ * Node's user with no Maia sandbox ([D-198](../../../../docs/decisions.md#d-198)).
2459
+ * A sandboxed Session carries none.
2460
+ */
2461
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
2165
2462
  readonly executor: Schema.optional<Schema.Struct<{
2166
2463
  readonly connectionId: Schema.String;
2167
2464
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
@@ -2173,6 +2470,8 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2173
2470
  readonly code: Schema.String;
2174
2471
  readonly message: Schema.String;
2175
2472
  }>>;
2473
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
2474
+ readonly latestTurnId: Schema.optional<Schema.String>;
2176
2475
  readonly schemaVersion: Schema.Literal<4>;
2177
2476
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
2178
2477
  readonly title: Schema.optional<Schema.String>;
@@ -2245,6 +2544,12 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2245
2544
  readonly key: Schema.String;
2246
2545
  readonly version: Schema.String;
2247
2546
  }>>;
2547
+ /**
2548
+ * `none` for a host-authority Session: the vendor harness runs as the
2549
+ * Node's user with no Maia sandbox ([D-198](../../../../docs/decisions.md#d-198)).
2550
+ * A sandboxed Session carries none.
2551
+ */
2552
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
2248
2553
  readonly executor: Schema.optional<Schema.Struct<{
2249
2554
  readonly connectionId: Schema.String;
2250
2555
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
@@ -2256,6 +2561,8 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2256
2561
  readonly code: Schema.String;
2257
2562
  readonly message: Schema.String;
2258
2563
  }>>;
2564
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
2565
+ readonly latestTurnId: Schema.optional<Schema.String>;
2259
2566
  readonly schemaVersion: Schema.Literal<4>;
2260
2567
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
2261
2568
  readonly title: Schema.optional<Schema.String>;
@@ -2305,6 +2612,12 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2305
2612
  readonly key: Schema.String;
2306
2613
  readonly version: Schema.String;
2307
2614
  }>>;
2615
+ /**
2616
+ * `none` for a host-authority Session: the vendor harness runs as the
2617
+ * Node's user with no Maia sandbox ([D-198](../../../../docs/decisions.md#d-198)).
2618
+ * A sandboxed Session carries none.
2619
+ */
2620
+ readonly containment: Schema.optional<Schema.Literal<"none">>;
2308
2621
  readonly executor: Schema.optional<Schema.Struct<{
2309
2622
  readonly connectionId: Schema.String;
2310
2623
  readonly effort: Schema.optional<Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>>;
@@ -2316,6 +2629,8 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2316
2629
  readonly code: Schema.String;
2317
2630
  readonly message: Schema.String;
2318
2631
  }>>;
2632
+ /** The Session's newest turn that ran (running or settled); a turn that never ran (queued, withdrawn or rejected) never counts; absent until one runs. */
2633
+ readonly latestTurnId: Schema.optional<Schema.String>;
2319
2634
  readonly schemaVersion: Schema.Literal<4>;
2320
2635
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
2321
2636
  readonly title: Schema.optional<Schema.String>;