@maiaos/protocol 0.1.0-canary.55 → 0.1.0-canary.57

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 (172) hide show
  1. package/README.md +5 -4
  2. package/dist/agent/definition.d.ts +2 -2
  3. package/dist/agent/worker-operation.d.ts +12 -0
  4. package/dist/agent/worker-operation.d.ts.map +1 -1
  5. package/dist/approval/contract.d.ts +11 -0
  6. package/dist/approval/contract.d.ts.map +1 -1
  7. package/dist/approval/contract.js +2 -1
  8. package/dist/approval/contract.js.map +1 -1
  9. package/dist/approval/effect-schema.d.ts +1 -1
  10. package/dist/approval/effect-schema.d.ts.map +1 -1
  11. package/dist/approval/effect-schema.js +1 -1
  12. package/dist/approval/effect-schema.js.map +1 -1
  13. package/dist/approval/index.d.ts +1 -1
  14. package/dist/approval/index.d.ts.map +1 -1
  15. package/dist/approval/index.js +1 -1
  16. package/dist/approval/index.js.map +1 -1
  17. package/dist/approval/request-effect-schema.d.ts +21 -0
  18. package/dist/approval/request-effect-schema.d.ts.map +1 -1
  19. package/dist/approval/request-effect-schema.js +17 -2
  20. package/dist/approval/request-effect-schema.js.map +1 -1
  21. package/dist/configuration/configuration.d.ts +2 -0
  22. package/dist/configuration/configuration.d.ts.map +1 -1
  23. package/dist/configuration/configuration.js +11 -3
  24. package/dist/configuration/configuration.js.map +1 -1
  25. package/dist/configuration/index.d.ts +1 -1
  26. package/dist/configuration/index.d.ts.map +1 -1
  27. package/dist/configuration/index.js +1 -1
  28. package/dist/configuration/index.js.map +1 -1
  29. package/dist/coordinator-tool/index.d.ts +1 -1
  30. package/dist/coordinator-tool/index.d.ts.map +1 -1
  31. package/dist/coordinator-tool/index.js +1 -1
  32. package/dist/coordinator-tool/index.js.map +1 -1
  33. package/dist/coordinator-tool/input-schema.d.ts +0 -7
  34. package/dist/coordinator-tool/input-schema.d.ts.map +1 -1
  35. package/dist/coordinator-tool/input-schema.js +0 -38
  36. package/dist/coordinator-tool/input-schema.js.map +1 -1
  37. package/dist/coordinator-tool/registry.d.ts +5 -0
  38. package/dist/coordinator-tool/registry.d.ts.map +1 -1
  39. package/dist/coordinator-tool/registry.js +9 -1
  40. package/dist/coordinator-tool/registry.js.map +1 -1
  41. package/dist/discovery/contract.d.ts +40 -0
  42. package/dist/discovery/contract.d.ts.map +1 -1
  43. package/dist/discovery/contract.js +3 -1
  44. package/dist/discovery/contract.js.map +1 -1
  45. package/dist/discovery/effect-schema.d.ts +105 -0
  46. package/dist/discovery/effect-schema.d.ts.map +1 -1
  47. package/dist/discovery/effect-schema.js +52 -1
  48. package/dist/discovery/effect-schema.js.map +1 -1
  49. package/dist/discovery/feature.d.ts +1 -1
  50. package/dist/discovery/feature.d.ts.map +1 -1
  51. package/dist/discovery/feature.js +1 -1
  52. package/dist/discovery/feature.js.map +1 -1
  53. package/dist/discovery/index.d.ts +1 -1
  54. package/dist/discovery/index.d.ts.map +1 -1
  55. package/dist/discovery/index.js +1 -1
  56. package/dist/discovery/index.js.map +1 -1
  57. package/dist/event/effect-schema.d.ts +1 -1
  58. package/dist/event/effect-schema.d.ts.map +1 -1
  59. package/dist/event/effect-schema.js +1 -1
  60. package/dist/event/effect-schema.js.map +1 -1
  61. package/dist/event/index.d.ts +1 -1
  62. package/dist/event/index.d.ts.map +1 -1
  63. package/dist/event/index.js +1 -1
  64. package/dist/event/index.js.map +1 -1
  65. package/dist/event/lifecycle/effect-schema.d.ts +20 -0
  66. package/dist/event/lifecycle/effect-schema.d.ts.map +1 -0
  67. package/dist/event/lifecycle/effect-schema.js +23 -0
  68. package/dist/event/lifecycle/effect-schema.js.map +1 -0
  69. package/dist/event/lifecycle/index.d.ts +2 -0
  70. package/dist/event/lifecycle/index.d.ts.map +1 -0
  71. package/dist/event/lifecycle/index.js +2 -0
  72. package/dist/event/lifecycle/index.js.map +1 -0
  73. package/dist/event/lifecycle/schema.d.ts +14 -0
  74. package/dist/event/lifecycle/schema.d.ts.map +1 -0
  75. package/dist/event/lifecycle/schema.js +6 -0
  76. package/dist/event/lifecycle/schema.js.map +1 -0
  77. package/dist/event/registry.d.ts.map +1 -1
  78. package/dist/event/registry.js +45 -2
  79. package/dist/event/registry.js.map +1 -1
  80. package/dist/event/session-activity-effect-schema.d.ts +22 -0
  81. package/dist/event/session-activity-effect-schema.d.ts.map +1 -1
  82. package/dist/event/session-activity-effect-schema.js +35 -0
  83. package/dist/event/session-activity-effect-schema.js.map +1 -1
  84. package/dist/event/session-activity.d.ts +14 -0
  85. package/dist/event/session-activity.d.ts.map +1 -1
  86. package/dist/event/session-activity.js +9 -1
  87. package/dist/event/session-activity.js.map +1 -1
  88. package/dist/feature/registry.d.ts +3 -1
  89. package/dist/feature/registry.d.ts.map +1 -1
  90. package/dist/feature/registry.js +2 -0
  91. package/dist/feature/registry.js.map +1 -1
  92. package/dist/index.d.ts +7 -6
  93. package/dist/index.d.ts.map +1 -1
  94. package/dist/index.js +7 -6
  95. package/dist/index.js.map +1 -1
  96. package/dist/local-node/contract.d.ts +5 -4
  97. package/dist/local-node/contract.d.ts.map +1 -1
  98. package/dist/local-node/contract.js.map +1 -1
  99. package/dist/local-node/effect-schema.d.ts +189 -7
  100. package/dist/local-node/effect-schema.d.ts.map +1 -1
  101. package/dist/local-node/effect-schema.js +3 -0
  102. package/dist/local-node/effect-schema.js.map +1 -1
  103. package/dist/local-node/node-api/methods.d.ts +7 -3
  104. package/dist/local-node/node-api/methods.d.ts.map +1 -1
  105. package/dist/local-node/node-api/methods.js +8 -0
  106. package/dist/local-node/node-api/methods.js.map +1 -1
  107. package/dist/local-node/receipt-list.d.ts +1 -1
  108. package/dist/local-node/receipt-list.d.ts.map +1 -1
  109. package/dist/local-node/receipt-list.js +1 -0
  110. package/dist/local-node/receipt-list.js.map +1 -1
  111. package/dist/presentation/contract.d.ts +17 -0
  112. package/dist/presentation/contract.d.ts.map +1 -1
  113. package/dist/presentation/effect-schema.d.ts +15 -0
  114. package/dist/presentation/effect-schema.d.ts.map +1 -1
  115. package/dist/presentation/session-list-effect-schema.d.ts +15 -0
  116. package/dist/presentation/session-list-effect-schema.d.ts.map +1 -1
  117. package/dist/release/version.d.ts +2 -2
  118. package/dist/release/version.d.ts.map +1 -1
  119. package/dist/release/version.js +2 -2
  120. package/dist/release/version.js.map +1 -1
  121. package/dist/remote-node/bridge-effect-schema.js +2 -2
  122. package/dist/runtime-schema/effect-json-schema.d.ts +9 -0
  123. package/dist/runtime-schema/effect-json-schema.d.ts.map +1 -0
  124. package/dist/runtime-schema/effect-json-schema.js +41 -0
  125. package/dist/runtime-schema/effect-json-schema.js.map +1 -0
  126. package/dist/runtime-schema/effect-schema.d.ts +1 -0
  127. package/dist/runtime-schema/effect-schema.d.ts.map +1 -1
  128. package/dist/runtime-schema/effect-schema.js +1 -0
  129. package/dist/runtime-schema/effect-schema.js.map +1 -1
  130. package/dist/session/agent-permission-contract.d.ts +5 -5
  131. package/dist/session/agent-permission-effect-schema.d.ts +9 -9
  132. package/dist/session/contract.d.ts +117 -0
  133. package/dist/session/contract.d.ts.map +1 -1
  134. package/dist/session/effect-schema.d.ts +482 -0
  135. package/dist/session/effect-schema.d.ts.map +1 -1
  136. package/dist/session/effect-schema.js +48 -10
  137. package/dist/session/effect-schema.js.map +1 -1
  138. package/dist/session/index.d.ts +1 -1
  139. package/dist/session/index.d.ts.map +1 -1
  140. package/dist/session/index.js +1 -1
  141. package/dist/session/index.js.map +1 -1
  142. package/dist/session/policy.d.ts +14 -0
  143. package/dist/session/policy.d.ts.map +1 -1
  144. package/dist/session/policy.js +14 -0
  145. package/dist/session/policy.js.map +1 -1
  146. package/dist/session/stop-resume-contract.d.ts +24 -0
  147. package/dist/session/stop-resume-contract.d.ts.map +1 -1
  148. package/dist/session/worktree-effect-schema.d.ts +11 -0
  149. package/dist/session/worktree-effect-schema.d.ts.map +1 -1
  150. package/dist/session/worktree-effect-schema.js +17 -1
  151. package/dist/session/worktree-effect-schema.js.map +1 -1
  152. package/dist/webhooks/contract.d.ts +342 -0
  153. package/dist/webhooks/contract.d.ts.map +1 -0
  154. package/dist/webhooks/contract.js +25 -0
  155. package/dist/webhooks/contract.js.map +1 -0
  156. package/dist/webhooks/effect-schema.d.ts +536 -0
  157. package/dist/webhooks/effect-schema.d.ts.map +1 -0
  158. package/dist/webhooks/effect-schema.js +177 -0
  159. package/dist/webhooks/effect-schema.js.map +1 -0
  160. package/dist/webhooks/feature.d.ts +105 -0
  161. package/dist/webhooks/feature.d.ts.map +1 -0
  162. package/dist/webhooks/feature.js +103 -0
  163. package/dist/webhooks/feature.js.map +1 -0
  164. package/dist/webhooks/hook-effect-schema.d.ts +38 -0
  165. package/dist/webhooks/hook-effect-schema.d.ts.map +1 -0
  166. package/dist/webhooks/hook-effect-schema.js +64 -0
  167. package/dist/webhooks/hook-effect-schema.js.map +1 -0
  168. package/dist/webhooks/index.d.ts +3 -0
  169. package/dist/webhooks/index.d.ts.map +1 -0
  170. package/dist/webhooks/index.js +3 -0
  171. package/dist/webhooks/index.js.map +1 -0
  172. package/package.json +1 -1
@@ -64,7 +64,29 @@ export declare const sessionEffectSchema: Schema.Struct<{
64
64
  readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
65
65
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
66
66
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
67
+ /**
68
+ * The prompt a `question` or `approval` Session waits on, with its text and
69
+ * options. `session.list` and `session.show` return it while `status` is
70
+ * one of the two and never otherwise: a `question` names a question
71
+ * prompt, an `approval` any other kind. A reader who may not read the
72
+ * approval (a Session principal listing its Project) gets the status without
73
+ * it.
74
+ */
75
+ readonly prompt: Schema.optional<Schema.Struct<{
76
+ readonly approvalId: Schema.String;
77
+ readonly expiresAt: Schema.String;
78
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
79
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
80
+ readonly label: Schema.String;
81
+ readonly optionId: Schema.String;
82
+ }>>>;
83
+ readonly summary: Schema.optional<Schema.String>;
84
+ }>>;
67
85
  readonly schemaVersion: Schema.Literal<4>;
86
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
87
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
88
+ /** What the Session is doing; present on `session.list` and `session.show`. */
89
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
68
90
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
69
91
  readonly title: Schema.optional<Schema.String>;
70
92
  /** A coding Session's own worktree; a reading Session has none. */
@@ -365,8 +387,14 @@ export declare const sessionSpawnParametersEffectSchema: Schema.Struct<{
365
387
  export declare const sessionListParametersEffectSchema: Schema.Struct<{
366
388
  readonly afterCursor: Schema.optional<Schema.String>;
367
389
  readonly attention: Schema.optional<Schema.Boolean>;
390
+ /** With `settled`: how long a Session is idle before it counts as settled; the Node's default is one day. */
391
+ readonly idleForSeconds: Schema.optional<Schema.Int>;
392
+ /** Sessions that carry these labels, each with the given value. */
393
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
368
394
  readonly limit: Schema.optional<Schema.Int>;
369
395
  readonly projectId: Schema.optional<Schema.String>;
396
+ /** Keeps non-archived Sessions that stopped, failed or sat idle for `idleForSeconds`. */
397
+ readonly settled: Schema.optional<Schema.Literal<true>>;
370
398
  readonly states: Schema.optional<Schema.$Array<Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>>>;
371
399
  }>;
372
400
  export declare const sessionShowParametersEffectSchema: Schema.Struct<{
@@ -662,7 +690,29 @@ export declare const sessionCreateResultEffectSchema: Schema.Struct<{
662
690
  readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
663
691
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
664
692
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
693
+ /**
694
+ * The prompt a `question` or `approval` Session waits on, with its text and
695
+ * options. `session.list` and `session.show` return it while `status` is
696
+ * one of the two and never otherwise: a `question` names a question
697
+ * prompt, an `approval` any other kind. A reader who may not read the
698
+ * approval (a Session principal listing its Project) gets the status without
699
+ * it.
700
+ */
701
+ readonly prompt: Schema.optional<Schema.Struct<{
702
+ readonly approvalId: Schema.String;
703
+ readonly expiresAt: Schema.String;
704
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
705
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
706
+ readonly label: Schema.String;
707
+ readonly optionId: Schema.String;
708
+ }>>>;
709
+ readonly summary: Schema.optional<Schema.String>;
710
+ }>>;
665
711
  readonly schemaVersion: Schema.Literal<4>;
712
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
713
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
714
+ /** What the Session is doing; present on `session.list` and `session.show`. */
715
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
666
716
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
667
717
  readonly title: Schema.optional<Schema.String>;
668
718
  /** A coding Session's own worktree; a reading Session has none. */
@@ -741,7 +791,29 @@ export declare const sessionSpawnResultEffectSchema: Schema.Struct<{
741
791
  readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
742
792
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
743
793
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
794
+ /**
795
+ * The prompt a `question` or `approval` Session waits on, with its text and
796
+ * options. `session.list` and `session.show` return it while `status` is
797
+ * one of the two and never otherwise: a `question` names a question
798
+ * prompt, an `approval` any other kind. A reader who may not read the
799
+ * approval (a Session principal listing its Project) gets the status without
800
+ * it.
801
+ */
802
+ readonly prompt: Schema.optional<Schema.Struct<{
803
+ readonly approvalId: Schema.String;
804
+ readonly expiresAt: Schema.String;
805
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
806
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
807
+ readonly label: Schema.String;
808
+ readonly optionId: Schema.String;
809
+ }>>>;
810
+ readonly summary: Schema.optional<Schema.String>;
811
+ }>>;
744
812
  readonly schemaVersion: Schema.Literal<4>;
813
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
814
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
815
+ /** What the Session is doing; present on `session.list` and `session.show`. */
816
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
745
817
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
746
818
  readonly title: Schema.optional<Schema.String>;
747
819
  /** A coding Session's own worktree; a reading Session has none. */
@@ -804,7 +876,29 @@ export declare const sessionListResultEffectSchema: Schema.Struct<{
804
876
  readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
805
877
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
806
878
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
879
+ /**
880
+ * The prompt a `question` or `approval` Session waits on, with its text and
881
+ * options. `session.list` and `session.show` return it while `status` is
882
+ * one of the two and never otherwise: a `question` names a question
883
+ * prompt, an `approval` any other kind. A reader who may not read the
884
+ * approval (a Session principal listing its Project) gets the status without
885
+ * it.
886
+ */
887
+ readonly prompt: Schema.optional<Schema.Struct<{
888
+ readonly approvalId: Schema.String;
889
+ readonly expiresAt: Schema.String;
890
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
891
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
892
+ readonly label: Schema.String;
893
+ readonly optionId: Schema.String;
894
+ }>>>;
895
+ readonly summary: Schema.optional<Schema.String>;
896
+ }>>;
807
897
  readonly schemaVersion: Schema.Literal<4>;
898
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
899
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
900
+ /** What the Session is doing; present on `session.list` and `session.show`. */
901
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
808
902
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
809
903
  readonly title: Schema.optional<Schema.String>;
810
904
  /** A coding Session's own worktree; a reading Session has none. */
@@ -866,7 +960,29 @@ export declare const sessionShowResultEffectSchema: Schema.Struct<{
866
960
  readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
867
961
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
868
962
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
963
+ /**
964
+ * The prompt a `question` or `approval` Session waits on, with its text and
965
+ * options. `session.list` and `session.show` return it while `status` is
966
+ * one of the two and never otherwise: a `question` names a question
967
+ * prompt, an `approval` any other kind. A reader who may not read the
968
+ * approval (a Session principal listing its Project) gets the status without
969
+ * it.
970
+ */
971
+ readonly prompt: Schema.optional<Schema.Struct<{
972
+ readonly approvalId: Schema.String;
973
+ readonly expiresAt: Schema.String;
974
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
975
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
976
+ readonly label: Schema.String;
977
+ readonly optionId: Schema.String;
978
+ }>>>;
979
+ readonly summary: Schema.optional<Schema.String>;
980
+ }>>;
869
981
  readonly schemaVersion: Schema.Literal<4>;
982
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
983
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
984
+ /** What the Session is doing; present on `session.list` and `session.show`. */
985
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
870
986
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
871
987
  readonly title: Schema.optional<Schema.String>;
872
988
  /** A coding Session's own worktree; a reading Session has none. */
@@ -928,7 +1044,29 @@ export declare const sessionWaitResultEffectSchema: Schema.Struct<{
928
1044
  readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
929
1045
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
930
1046
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
1047
+ /**
1048
+ * The prompt a `question` or `approval` Session waits on, with its text and
1049
+ * options. `session.list` and `session.show` return it while `status` is
1050
+ * one of the two and never otherwise: a `question` names a question
1051
+ * prompt, an `approval` any other kind. A reader who may not read the
1052
+ * approval (a Session principal listing its Project) gets the status without
1053
+ * it.
1054
+ */
1055
+ readonly prompt: Schema.optional<Schema.Struct<{
1056
+ readonly approvalId: Schema.String;
1057
+ readonly expiresAt: Schema.String;
1058
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
1059
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
1060
+ readonly label: Schema.String;
1061
+ readonly optionId: Schema.String;
1062
+ }>>>;
1063
+ readonly summary: Schema.optional<Schema.String>;
1064
+ }>>;
931
1065
  readonly schemaVersion: Schema.Literal<4>;
1066
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
1067
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
1068
+ /** What the Session is doing; present on `session.list` and `session.show`. */
1069
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
932
1070
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
933
1071
  readonly title: Schema.optional<Schema.String>;
934
1072
  /** A coding Session's own worktree; a reading Session has none. */
@@ -1236,7 +1374,29 @@ export declare const sessionStartResultEffectSchema: Schema.Struct<{
1236
1374
  readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
1237
1375
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
1238
1376
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
1377
+ /**
1378
+ * The prompt a `question` or `approval` Session waits on, with its text and
1379
+ * options. `session.list` and `session.show` return it while `status` is
1380
+ * one of the two and never otherwise: a `question` names a question
1381
+ * prompt, an `approval` any other kind. A reader who may not read the
1382
+ * approval (a Session principal listing its Project) gets the status without
1383
+ * it.
1384
+ */
1385
+ readonly prompt: Schema.optional<Schema.Struct<{
1386
+ readonly approvalId: Schema.String;
1387
+ readonly expiresAt: Schema.String;
1388
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
1389
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
1390
+ readonly label: Schema.String;
1391
+ readonly optionId: Schema.String;
1392
+ }>>>;
1393
+ readonly summary: Schema.optional<Schema.String>;
1394
+ }>>;
1239
1395
  readonly schemaVersion: Schema.Literal<4>;
1396
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
1397
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
1398
+ /** What the Session is doing; present on `session.list` and `session.show`. */
1399
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
1240
1400
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
1241
1401
  readonly title: Schema.optional<Schema.String>;
1242
1402
  /** A coding Session's own worktree; a reading Session has none. */
@@ -1313,7 +1473,29 @@ export declare const sessionStopResultEffectSchema: Schema.Struct<{
1313
1473
  readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
1314
1474
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
1315
1475
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
1476
+ /**
1477
+ * The prompt a `question` or `approval` Session waits on, with its text and
1478
+ * options. `session.list` and `session.show` return it while `status` is
1479
+ * one of the two and never otherwise: a `question` names a question
1480
+ * prompt, an `approval` any other kind. A reader who may not read the
1481
+ * approval (a Session principal listing its Project) gets the status without
1482
+ * it.
1483
+ */
1484
+ readonly prompt: Schema.optional<Schema.Struct<{
1485
+ readonly approvalId: Schema.String;
1486
+ readonly expiresAt: Schema.String;
1487
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
1488
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
1489
+ readonly label: Schema.String;
1490
+ readonly optionId: Schema.String;
1491
+ }>>>;
1492
+ readonly summary: Schema.optional<Schema.String>;
1493
+ }>>;
1316
1494
  readonly schemaVersion: Schema.Literal<4>;
1495
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
1496
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
1497
+ /** What the Session is doing; present on `session.list` and `session.show`. */
1498
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
1317
1499
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
1318
1500
  readonly title: Schema.optional<Schema.String>;
1319
1501
  /** A coding Session's own worktree; a reading Session has none. */
@@ -1390,7 +1572,29 @@ export declare const sessionResumeResultEffectSchema: Schema.Struct<{
1390
1572
  readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
1391
1573
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
1392
1574
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
1575
+ /**
1576
+ * The prompt a `question` or `approval` Session waits on, with its text and
1577
+ * options. `session.list` and `session.show` return it while `status` is
1578
+ * one of the two and never otherwise: a `question` names a question
1579
+ * prompt, an `approval` any other kind. A reader who may not read the
1580
+ * approval (a Session principal listing its Project) gets the status without
1581
+ * it.
1582
+ */
1583
+ readonly prompt: Schema.optional<Schema.Struct<{
1584
+ readonly approvalId: Schema.String;
1585
+ readonly expiresAt: Schema.String;
1586
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
1587
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
1588
+ readonly label: Schema.String;
1589
+ readonly optionId: Schema.String;
1590
+ }>>>;
1591
+ readonly summary: Schema.optional<Schema.String>;
1592
+ }>>;
1393
1593
  readonly schemaVersion: Schema.Literal<4>;
1594
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
1595
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
1596
+ /** What the Session is doing; present on `session.list` and `session.show`. */
1597
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
1394
1598
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
1395
1599
  readonly title: Schema.optional<Schema.String>;
1396
1600
  /** A coding Session's own worktree; a reading Session has none. */
@@ -1467,7 +1671,29 @@ export declare const sessionRenameResultEffectSchema: Schema.Struct<{
1467
1671
  readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
1468
1672
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
1469
1673
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
1674
+ /**
1675
+ * The prompt a `question` or `approval` Session waits on, with its text and
1676
+ * options. `session.list` and `session.show` return it while `status` is
1677
+ * one of the two and never otherwise: a `question` names a question
1678
+ * prompt, an `approval` any other kind. A reader who may not read the
1679
+ * approval (a Session principal listing its Project) gets the status without
1680
+ * it.
1681
+ */
1682
+ readonly prompt: Schema.optional<Schema.Struct<{
1683
+ readonly approvalId: Schema.String;
1684
+ readonly expiresAt: Schema.String;
1685
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
1686
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
1687
+ readonly label: Schema.String;
1688
+ readonly optionId: Schema.String;
1689
+ }>>>;
1690
+ readonly summary: Schema.optional<Schema.String>;
1691
+ }>>;
1470
1692
  readonly schemaVersion: Schema.Literal<4>;
1693
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
1694
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
1695
+ /** What the Session is doing; present on `session.list` and `session.show`. */
1696
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
1471
1697
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
1472
1698
  readonly title: Schema.optional<Schema.String>;
1473
1699
  /** A coding Session's own worktree; a reading Session has none. */
@@ -1555,7 +1781,29 @@ export declare const sessionArchiveResultEffectSchema: Schema.Struct<{
1555
1781
  readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
1556
1782
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
1557
1783
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
1784
+ /**
1785
+ * The prompt a `question` or `approval` Session waits on, with its text and
1786
+ * options. `session.list` and `session.show` return it while `status` is
1787
+ * one of the two and never otherwise: a `question` names a question
1788
+ * prompt, an `approval` any other kind. A reader who may not read the
1789
+ * approval (a Session principal listing its Project) gets the status without
1790
+ * it.
1791
+ */
1792
+ readonly prompt: Schema.optional<Schema.Struct<{
1793
+ readonly approvalId: Schema.String;
1794
+ readonly expiresAt: Schema.String;
1795
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
1796
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
1797
+ readonly label: Schema.String;
1798
+ readonly optionId: Schema.String;
1799
+ }>>>;
1800
+ readonly summary: Schema.optional<Schema.String>;
1801
+ }>>;
1558
1802
  readonly schemaVersion: Schema.Literal<4>;
1803
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
1804
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
1805
+ /** What the Session is doing; present on `session.list` and `session.show`. */
1806
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
1559
1807
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
1560
1808
  readonly title: Schema.optional<Schema.String>;
1561
1809
  /** A coding Session's own worktree; a reading Session has none. */
@@ -1571,6 +1819,9 @@ export declare const sessionArchiveResultEffectSchema: Schema.Struct<{
1571
1819
  readonly state: Schema.Literals<readonly ["active", "archived", "removed"]>;
1572
1820
  }>>;
1573
1821
  }>;
1822
+ /** The caller's summary and transcript path, as the archive recorded them. */
1823
+ readonly summary: Schema.optional<Schema.String>;
1824
+ readonly transcriptPath: Schema.optional<Schema.String>;
1574
1825
  }>;
1575
1826
  export declare const sessionRequestPayloadEffectSchema: Schema.Union<readonly [Schema.Struct<{
1576
1827
  readonly method: Schema.Literal<"session.create">;
@@ -1604,8 +1855,14 @@ export declare const sessionRequestPayloadEffectSchema: Schema.Union<readonly [S
1604
1855
  readonly parameters: Schema.Struct<{
1605
1856
  readonly afterCursor: Schema.optional<Schema.String>;
1606
1857
  readonly attention: Schema.optional<Schema.Boolean>;
1858
+ /** With `settled`: how long a Session is idle before it counts as settled; the Node's default is one day. */
1859
+ readonly idleForSeconds: Schema.optional<Schema.Int>;
1860
+ /** Sessions that carry these labels, each with the given value. */
1861
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
1607
1862
  readonly limit: Schema.optional<Schema.Int>;
1608
1863
  readonly projectId: Schema.optional<Schema.String>;
1864
+ /** Keeps non-archived Sessions that stopped, failed or sat idle for `idleForSeconds`. */
1865
+ readonly settled: Schema.optional<Schema.Literal<true>>;
1609
1866
  readonly states: Schema.optional<Schema.$Array<Schema.Literals<readonly ["idle", "starting", "running", "waiting-approval", "interrupted", "recovering", "stopping", "stopped", "failed"]>>>;
1610
1867
  }>;
1611
1868
  }>, Schema.Struct<{
@@ -1703,6 +1960,8 @@ export declare const sessionRequestPayloadEffectSchema: Schema.Union<readonly [S
1703
1960
  readonly commandId: Schema.String;
1704
1961
  readonly expectedRevision: Schema.String;
1705
1962
  readonly sessionId: Schema.String;
1963
+ readonly summary: Schema.optional<Schema.String>;
1964
+ readonly transcriptPath: Schema.optional<Schema.String>;
1706
1965
  }>;
1707
1966
  }>, Schema.Struct<{
1708
1967
  readonly method: Schema.Literal<"session.rename">;
@@ -1773,7 +2032,29 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1773
2032
  readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
1774
2033
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
1775
2034
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
2035
+ /**
2036
+ * The prompt a `question` or `approval` Session waits on, with its text and
2037
+ * options. `session.list` and `session.show` return it while `status` is
2038
+ * one of the two and never otherwise: a `question` names a question
2039
+ * prompt, an `approval` any other kind. A reader who may not read the
2040
+ * approval (a Session principal listing its Project) gets the status without
2041
+ * it.
2042
+ */
2043
+ readonly prompt: Schema.optional<Schema.Struct<{
2044
+ readonly approvalId: Schema.String;
2045
+ readonly expiresAt: Schema.String;
2046
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
2047
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
2048
+ readonly label: Schema.String;
2049
+ readonly optionId: Schema.String;
2050
+ }>>>;
2051
+ readonly summary: Schema.optional<Schema.String>;
2052
+ }>>;
1776
2053
  readonly schemaVersion: Schema.Literal<4>;
2054
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
2055
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
2056
+ /** What the Session is doing; present on `session.list` and `session.show`. */
2057
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
1777
2058
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
1778
2059
  readonly title: Schema.optional<Schema.String>;
1779
2060
  /** A coding Session's own worktree; a reading Session has none. */
@@ -1914,7 +2195,29 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
1914
2195
  readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
1915
2196
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
1916
2197
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
2198
+ /**
2199
+ * The prompt a `question` or `approval` Session waits on, with its text and
2200
+ * options. `session.list` and `session.show` return it while `status` is
2201
+ * one of the two and never otherwise: a `question` names a question
2202
+ * prompt, an `approval` any other kind. A reader who may not read the
2203
+ * approval (a Session principal listing its Project) gets the status without
2204
+ * it.
2205
+ */
2206
+ readonly prompt: Schema.optional<Schema.Struct<{
2207
+ readonly approvalId: Schema.String;
2208
+ readonly expiresAt: Schema.String;
2209
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
2210
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
2211
+ readonly label: Schema.String;
2212
+ readonly optionId: Schema.String;
2213
+ }>>>;
2214
+ readonly summary: Schema.optional<Schema.String>;
2215
+ }>>;
1917
2216
  readonly schemaVersion: Schema.Literal<4>;
2217
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
2218
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
2219
+ /** What the Session is doing; present on `session.list` and `session.show`. */
2220
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
1918
2221
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
1919
2222
  readonly title: Schema.optional<Schema.String>;
1920
2223
  /** A coding Session's own worktree; a reading Session has none. */
@@ -2041,7 +2344,29 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2041
2344
  readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
2042
2345
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
2043
2346
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
2347
+ /**
2348
+ * The prompt a `question` or `approval` Session waits on, with its text and
2349
+ * options. `session.list` and `session.show` return it while `status` is
2350
+ * one of the two and never otherwise: a `question` names a question
2351
+ * prompt, an `approval` any other kind. A reader who may not read the
2352
+ * approval (a Session principal listing its Project) gets the status without
2353
+ * it.
2354
+ */
2355
+ readonly prompt: Schema.optional<Schema.Struct<{
2356
+ readonly approvalId: Schema.String;
2357
+ readonly expiresAt: Schema.String;
2358
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
2359
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
2360
+ readonly label: Schema.String;
2361
+ readonly optionId: Schema.String;
2362
+ }>>>;
2363
+ readonly summary: Schema.optional<Schema.String>;
2364
+ }>>;
2044
2365
  readonly schemaVersion: Schema.Literal<4>;
2366
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
2367
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
2368
+ /** What the Session is doing; present on `session.list` and `session.show`. */
2369
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
2045
2370
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
2046
2371
  readonly title: Schema.optional<Schema.String>;
2047
2372
  /** A coding Session's own worktree; a reading Session has none. */
@@ -2101,7 +2426,29 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2101
2426
  readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
2102
2427
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
2103
2428
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
2429
+ /**
2430
+ * The prompt a `question` or `approval` Session waits on, with its text and
2431
+ * options. `session.list` and `session.show` return it while `status` is
2432
+ * one of the two and never otherwise: a `question` names a question
2433
+ * prompt, an `approval` any other kind. A reader who may not read the
2434
+ * approval (a Session principal listing its Project) gets the status without
2435
+ * it.
2436
+ */
2437
+ readonly prompt: Schema.optional<Schema.Struct<{
2438
+ readonly approvalId: Schema.String;
2439
+ readonly expiresAt: Schema.String;
2440
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
2441
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
2442
+ readonly label: Schema.String;
2443
+ readonly optionId: Schema.String;
2444
+ }>>>;
2445
+ readonly summary: Schema.optional<Schema.String>;
2446
+ }>>;
2104
2447
  readonly schemaVersion: Schema.Literal<4>;
2448
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
2449
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
2450
+ /** What the Session is doing; present on `session.list` and `session.show`. */
2451
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
2105
2452
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
2106
2453
  readonly title: Schema.optional<Schema.String>;
2107
2454
  /** A coding Session's own worktree; a reading Session has none. */
@@ -2179,7 +2526,29 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2179
2526
  readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
2180
2527
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
2181
2528
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
2529
+ /**
2530
+ * The prompt a `question` or `approval` Session waits on, with its text and
2531
+ * options. `session.list` and `session.show` return it while `status` is
2532
+ * one of the two and never otherwise: a `question` names a question
2533
+ * prompt, an `approval` any other kind. A reader who may not read the
2534
+ * approval (a Session principal listing its Project) gets the status without
2535
+ * it.
2536
+ */
2537
+ readonly prompt: Schema.optional<Schema.Struct<{
2538
+ readonly approvalId: Schema.String;
2539
+ readonly expiresAt: Schema.String;
2540
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
2541
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
2542
+ readonly label: Schema.String;
2543
+ readonly optionId: Schema.String;
2544
+ }>>>;
2545
+ readonly summary: Schema.optional<Schema.String>;
2546
+ }>>;
2182
2547
  readonly schemaVersion: Schema.Literal<4>;
2548
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
2549
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
2550
+ /** What the Session is doing; present on `session.list` and `session.show`. */
2551
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
2183
2552
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
2184
2553
  readonly title: Schema.optional<Schema.String>;
2185
2554
  /** A coding Session's own worktree; a reading Session has none. */
@@ -2485,7 +2854,29 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2485
2854
  readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
2486
2855
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
2487
2856
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
2857
+ /**
2858
+ * The prompt a `question` or `approval` Session waits on, with its text and
2859
+ * options. `session.list` and `session.show` return it while `status` is
2860
+ * one of the two and never otherwise: a `question` names a question
2861
+ * prompt, an `approval` any other kind. A reader who may not read the
2862
+ * approval (a Session principal listing its Project) gets the status without
2863
+ * it.
2864
+ */
2865
+ readonly prompt: Schema.optional<Schema.Struct<{
2866
+ readonly approvalId: Schema.String;
2867
+ readonly expiresAt: Schema.String;
2868
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
2869
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
2870
+ readonly label: Schema.String;
2871
+ readonly optionId: Schema.String;
2872
+ }>>>;
2873
+ readonly summary: Schema.optional<Schema.String>;
2874
+ }>>;
2488
2875
  readonly schemaVersion: Schema.Literal<4>;
2876
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
2877
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
2878
+ /** What the Session is doing; present on `session.list` and `session.show`. */
2879
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
2489
2880
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
2490
2881
  readonly title: Schema.optional<Schema.String>;
2491
2882
  /** A coding Session's own worktree; a reading Session has none. */
@@ -2561,7 +2952,29 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2561
2952
  readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
2562
2953
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
2563
2954
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
2955
+ /**
2956
+ * The prompt a `question` or `approval` Session waits on, with its text and
2957
+ * options. `session.list` and `session.show` return it while `status` is
2958
+ * one of the two and never otherwise: a `question` names a question
2959
+ * prompt, an `approval` any other kind. A reader who may not read the
2960
+ * approval (a Session principal listing its Project) gets the status without
2961
+ * it.
2962
+ */
2963
+ readonly prompt: Schema.optional<Schema.Struct<{
2964
+ readonly approvalId: Schema.String;
2965
+ readonly expiresAt: Schema.String;
2966
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
2967
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
2968
+ readonly label: Schema.String;
2969
+ readonly optionId: Schema.String;
2970
+ }>>>;
2971
+ readonly summary: Schema.optional<Schema.String>;
2972
+ }>>;
2564
2973
  readonly schemaVersion: Schema.Literal<4>;
2974
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
2975
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
2976
+ /** What the Session is doing; present on `session.list` and `session.show`. */
2977
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
2565
2978
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
2566
2979
  readonly title: Schema.optional<Schema.String>;
2567
2980
  /** A coding Session's own worktree; a reading Session has none. */
@@ -2637,7 +3050,29 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2637
3050
  readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
2638
3051
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
2639
3052
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
3053
+ /**
3054
+ * The prompt a `question` or `approval` Session waits on, with its text and
3055
+ * options. `session.list` and `session.show` return it while `status` is
3056
+ * one of the two and never otherwise: a `question` names a question
3057
+ * prompt, an `approval` any other kind. A reader who may not read the
3058
+ * approval (a Session principal listing its Project) gets the status without
3059
+ * it.
3060
+ */
3061
+ readonly prompt: Schema.optional<Schema.Struct<{
3062
+ readonly approvalId: Schema.String;
3063
+ readonly expiresAt: Schema.String;
3064
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
3065
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
3066
+ readonly label: Schema.String;
3067
+ readonly optionId: Schema.String;
3068
+ }>>>;
3069
+ readonly summary: Schema.optional<Schema.String>;
3070
+ }>>;
2640
3071
  readonly schemaVersion: Schema.Literal<4>;
3072
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
3073
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
3074
+ /** What the Session is doing; present on `session.list` and `session.show`. */
3075
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
2641
3076
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
2642
3077
  readonly title: Schema.optional<Schema.String>;
2643
3078
  /** A coding Session's own worktree; a reading Session has none. */
@@ -2736,7 +3171,29 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2736
3171
  readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
2737
3172
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
2738
3173
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
3174
+ /**
3175
+ * The prompt a `question` or `approval` Session waits on, with its text and
3176
+ * options. `session.list` and `session.show` return it while `status` is
3177
+ * one of the two and never otherwise: a `question` names a question
3178
+ * prompt, an `approval` any other kind. A reader who may not read the
3179
+ * approval (a Session principal listing its Project) gets the status without
3180
+ * it.
3181
+ */
3182
+ readonly prompt: Schema.optional<Schema.Struct<{
3183
+ readonly approvalId: Schema.String;
3184
+ readonly expiresAt: Schema.String;
3185
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
3186
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
3187
+ readonly label: Schema.String;
3188
+ readonly optionId: Schema.String;
3189
+ }>>>;
3190
+ readonly summary: Schema.optional<Schema.String>;
3191
+ }>>;
2739
3192
  readonly schemaVersion: Schema.Literal<4>;
3193
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
3194
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
3195
+ /** What the Session is doing; present on `session.list` and `session.show`. */
3196
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
2740
3197
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
2741
3198
  readonly title: Schema.optional<Schema.String>;
2742
3199
  /** A coding Session's own worktree; a reading Session has none. */
@@ -2752,6 +3209,9 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2752
3209
  readonly state: Schema.Literals<readonly ["active", "archived", "removed"]>;
2753
3210
  }>>;
2754
3211
  }>;
3212
+ /** The caller's summary and transcript path, as the archive recorded them. */
3213
+ readonly summary: Schema.optional<Schema.String>;
3214
+ readonly transcriptPath: Schema.optional<Schema.String>;
2755
3215
  }>, Schema.Struct<{
2756
3216
  readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
2757
3217
  readonly method: Schema.Literal<"session.rename">;
@@ -2812,7 +3272,29 @@ export declare const sessionSuccessResultEffectSchema: Schema.Union<readonly [Sc
2812
3272
  readonly latestTurnState: Schema.optional<Schema.Literals<readonly ["queued", "dispatching", "running", "completed", "failed", "outcome-unknown", "interrupted"]>>;
2813
3273
  /** The permission mode a host-authority Session passes to its vendor CLI, fixed at creation; none is the vendor default. */
2814
3274
  readonly permission: Schema.optional<Schema.Literals<readonly ["default", "acceptEdits", "plan", "dontAsk", "bypassPermissions", "untrusted", "on-request", "never"]>>;
3275
+ /**
3276
+ * The prompt a `question` or `approval` Session waits on, with its text and
3277
+ * options. `session.list` and `session.show` return it while `status` is
3278
+ * one of the two and never otherwise: a `question` names a question
3279
+ * prompt, an `approval` any other kind. A reader who may not read the
3280
+ * approval (a Session principal listing its Project) gets the status without
3281
+ * it.
3282
+ */
3283
+ readonly prompt: Schema.optional<Schema.Struct<{
3284
+ readonly approvalId: Schema.String;
3285
+ readonly expiresAt: Schema.String;
3286
+ readonly kind: Schema.Literals<readonly ["command", "file_change", "question", "tool"]>;
3287
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
3288
+ readonly label: Schema.String;
3289
+ readonly optionId: Schema.String;
3290
+ }>>>;
3291
+ readonly summary: Schema.optional<Schema.String>;
3292
+ }>>;
2815
3293
  readonly schemaVersion: Schema.Literal<4>;
3294
+ /** Why `session.list` with `settled` returned this Session: `stopped` or `failed` by state, `idle` after its idle time. */
3295
+ readonly settledReason: Schema.optional<Schema.Literals<readonly ["failed", "idle", "stopped"]>>;
3296
+ /** What the Session is doing; present on `session.list` and `session.show`. */
3297
+ readonly status: Schema.optional<Schema.Literals<readonly ["starting", "working", "idle", "question", "approval", "error", "done", "ended", "unknown"]>>;
2816
3298
  /** Set at creation or by a rename; otherwise the first line of the first turn. */
2817
3299
  readonly title: Schema.optional<Schema.String>;
2818
3300
  /** A coding Session's own worktree; a reading Session has none. */