ralph-research 0.1.2 → 0.1.4

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 (138) hide show
  1. package/README.md +132 -101
  2. package/dist/adapters/fs/json-file-research-project-defaults-store.d.ts +8 -0
  3. package/dist/adapters/fs/json-file-research-project-defaults-store.js +30 -0
  4. package/dist/adapters/fs/json-file-research-project-defaults-store.js.map +1 -0
  5. package/dist/adapters/fs/json-file-research-session-repository.d.ts +24 -0
  6. package/dist/adapters/fs/json-file-research-session-repository.js +199 -0
  7. package/dist/adapters/fs/json-file-research-session-repository.js.map +1 -0
  8. package/dist/adapters/fs/lockfile.js +142 -57
  9. package/dist/adapters/fs/lockfile.js.map +1 -1
  10. package/dist/adapters/fs/manifest-loader.js +8 -1
  11. package/dist/adapters/fs/manifest-loader.js.map +1 -1
  12. package/dist/adapters/proposer/codex-cli-proposer.d.ts +16 -0
  13. package/dist/adapters/proposer/codex-cli-proposer.js +106 -0
  14. package/dist/adapters/proposer/codex-cli-proposer.js.map +1 -0
  15. package/dist/adapters/proposer/codex-cli-session-driver.d.ts +64 -0
  16. package/dist/adapters/proposer/codex-cli-session-driver.js +182 -0
  17. package/dist/adapters/proposer/codex-cli-session-driver.js.map +1 -0
  18. package/dist/adapters/proposer/codex-cli-session-manager.d.ts +79 -0
  19. package/dist/adapters/proposer/codex-cli-session-manager.js +248 -0
  20. package/dist/adapters/proposer/codex-cli-session-manager.js.map +1 -0
  21. package/dist/adapters/proposer/codex-cli-session-outcome-extractor.d.ts +3 -0
  22. package/dist/adapters/proposer/codex-cli-session-outcome-extractor.js +94 -0
  23. package/dist/adapters/proposer/codex-cli-session-outcome-extractor.js.map +1 -0
  24. package/dist/adapters/proposer/proposer-factory.d.ts +22 -0
  25. package/dist/adapters/proposer/proposer-factory.js +19 -0
  26. package/dist/adapters/proposer/proposer-factory.js.map +1 -0
  27. package/dist/app/services/codex-cli-session-lifecycle-service.d.ts +116 -0
  28. package/dist/app/services/codex-cli-session-lifecycle-service.js +186 -0
  29. package/dist/app/services/codex-cli-session-lifecycle-service.js.map +1 -0
  30. package/dist/app/services/manual-decision-service.js +20 -9
  31. package/dist/app/services/manual-decision-service.js.map +1 -1
  32. package/dist/app/services/project-state-service.js +5 -3
  33. package/dist/app/services/project-state-service.js.map +1 -1
  34. package/dist/app/services/research-project-defaults-service.d.ts +18 -0
  35. package/dist/app/services/research-project-defaults-service.js +175 -0
  36. package/dist/app/services/research-project-defaults-service.js.map +1 -0
  37. package/dist/app/services/research-session-draft-service.d.ts +121 -0
  38. package/dist/app/services/research-session-draft-service.js +846 -0
  39. package/dist/app/services/research-session-draft-service.js.map +1 -0
  40. package/dist/app/services/research-session-entry-flow-summary-mapper.d.ts +12 -0
  41. package/dist/app/services/research-session-entry-flow-summary-mapper.js +33 -0
  42. package/dist/app/services/research-session-entry-flow-summary-mapper.js.map +1 -0
  43. package/dist/app/services/research-session-interactive-service.d.ts +35 -0
  44. package/dist/app/services/research-session-interactive-service.js +295 -0
  45. package/dist/app/services/research-session-interactive-service.js.map +1 -0
  46. package/dist/app/services/research-session-launch-service.d.ts +46 -0
  47. package/dist/app/services/research-session-launch-service.js +389 -0
  48. package/dist/app/services/research-session-launch-service.js.map +1 -0
  49. package/dist/app/services/research-session-orchestrator-service.d.ts +140 -0
  50. package/dist/app/services/research-session-orchestrator-service.js +614 -0
  51. package/dist/app/services/research-session-orchestrator-service.js.map +1 -0
  52. package/dist/app/services/research-session-recovery-service.d.ts +30 -0
  53. package/dist/app/services/research-session-recovery-service.js +110 -0
  54. package/dist/app/services/research-session-recovery-service.js.map +1 -0
  55. package/dist/app/services/research-session-wizard-controller.d.ts +51 -0
  56. package/dist/app/services/research-session-wizard-controller.js +220 -0
  57. package/dist/app/services/research-session-wizard-controller.js.map +1 -0
  58. package/dist/app/services/run-cycle-service.d.ts +2 -0
  59. package/dist/app/services/run-cycle-service.js +8 -6
  60. package/dist/app/services/run-cycle-service.js.map +1 -1
  61. package/dist/app/services/run-loop-service.js +11 -3
  62. package/dist/app/services/run-loop-service.js.map +1 -1
  63. package/dist/cli/commands/inspect.js +2 -0
  64. package/dist/cli/commands/inspect.js.map +1 -1
  65. package/dist/cli/commands/launch.d.ts +16 -0
  66. package/dist/cli/commands/launch.js +68 -0
  67. package/dist/cli/commands/launch.js.map +1 -0
  68. package/dist/cli/commands/proposer-display.d.ts +2 -0
  69. package/dist/cli/commands/proposer-display.js +18 -0
  70. package/dist/cli/commands/proposer-display.js.map +1 -0
  71. package/dist/cli/commands/resume.d.ts +14 -0
  72. package/dist/cli/commands/resume.js +134 -0
  73. package/dist/cli/commands/resume.js.map +1 -0
  74. package/dist/cli/commands/run.d.ts +2 -2
  75. package/dist/cli/commands/run.js +15 -4
  76. package/dist/cli/commands/run.js.map +1 -1
  77. package/dist/cli/commands/status.js +4 -0
  78. package/dist/cli/commands/status.js.map +1 -1
  79. package/dist/cli/main.js +2 -29
  80. package/dist/cli/main.js.map +1 -1
  81. package/dist/cli/program.d.ts +15 -0
  82. package/dist/cli/program.js +54 -0
  83. package/dist/cli/program.js.map +1 -0
  84. package/dist/cli/tui/research-session-shell.d.ts +22 -0
  85. package/dist/cli/tui/research-session-shell.js +719 -0
  86. package/dist/cli/tui/research-session-shell.js.map +1 -0
  87. package/dist/core/engine/cycle-runner.d.ts +4 -0
  88. package/dist/core/engine/cycle-runner.js +15 -9
  89. package/dist/core/engine/cycle-runner.js.map +1 -1
  90. package/dist/core/manifest/admission.d.ts +1 -0
  91. package/dist/core/manifest/admission.js +50 -0
  92. package/dist/core/manifest/admission.js.map +1 -1
  93. package/dist/core/manifest/defaults.d.ts +21 -0
  94. package/dist/core/manifest/defaults.js +21 -0
  95. package/dist/core/manifest/defaults.js.map +1 -1
  96. package/dist/core/manifest/schema.d.ts +170 -0
  97. package/dist/core/manifest/schema.js +21 -1
  98. package/dist/core/manifest/schema.js.map +1 -1
  99. package/dist/core/model/codex-cli-cycle-session.d.ts +4 -0
  100. package/dist/core/model/codex-cli-cycle-session.js +2 -0
  101. package/dist/core/model/codex-cli-cycle-session.js.map +1 -0
  102. package/dist/core/model/codex-cli-session-lifecycle.d.ts +131 -0
  103. package/dist/core/model/codex-cli-session-lifecycle.js +237 -0
  104. package/dist/core/model/codex-cli-session-lifecycle.js.map +1 -0
  105. package/dist/core/model/codex-cli-session-outcome.d.ts +121 -0
  106. package/dist/core/model/codex-cli-session-outcome.js +70 -0
  107. package/dist/core/model/codex-cli-session-outcome.js.map +1 -0
  108. package/dist/core/model/research-project-defaults.d.ts +48 -0
  109. package/dist/core/model/research-project-defaults.js +46 -0
  110. package/dist/core/model/research-project-defaults.js.map +1 -0
  111. package/dist/core/model/research-session.d.ts +1143 -0
  112. package/dist/core/model/research-session.js +689 -0
  113. package/dist/core/model/research-session.js.map +1 -0
  114. package/dist/core/model/run-record.d.ts +56 -6
  115. package/dist/core/model/run-record.js +28 -0
  116. package/dist/core/model/run-record.js.map +1 -1
  117. package/dist/core/ports/research-project-defaults-store.d.ts +5 -0
  118. package/dist/core/ports/research-project-defaults-store.js +2 -0
  119. package/dist/core/ports/research-project-defaults-store.js.map +1 -0
  120. package/dist/core/ports/research-session-repository.d.ts +25 -0
  121. package/dist/core/ports/research-session-repository.js +2 -0
  122. package/dist/core/ports/research-session-repository.js.map +1 -0
  123. package/dist/core/state/frontier-materializer.d.ts +2 -0
  124. package/dist/core/state/frontier-materializer.js +11 -2
  125. package/dist/core/state/frontier-materializer.js.map +1 -1
  126. package/dist/core/state/research-session-recovery-classifier.d.ts +24 -0
  127. package/dist/core/state/research-session-recovery-classifier.js +236 -0
  128. package/dist/core/state/research-session-recovery-classifier.js.map +1 -0
  129. package/dist/core/state/research-session-resume-candidate.d.ts +8 -0
  130. package/dist/core/state/research-session-resume-candidate.js +62 -0
  131. package/dist/core/state/research-session-resume-candidate.js.map +1 -0
  132. package/dist/core/state/research-session-state-machine.d.ts +62 -0
  133. package/dist/core/state/research-session-state-machine.js +443 -0
  134. package/dist/core/state/research-session-state-machine.js.map +1 -0
  135. package/dist/mcp/server.d.ts +4 -0
  136. package/dist/mcp/server.js +192 -1
  137. package/dist/mcp/server.js.map +1 -1
  138. package/package.json +1 -1
@@ -0,0 +1,1143 @@
1
+ import { z } from "zod";
2
+ export declare const researchSessionStatusSchema: z.ZodEnum<{
3
+ running: "running";
4
+ draft: "draft";
5
+ awaiting_resume: "awaiting_resume";
6
+ halted: "halted";
7
+ goal_achieved: "goal_achieved";
8
+ failed: "failed";
9
+ }>;
10
+ export declare const RESUMABLE_RESEARCH_SESSION_STATUSES: readonly ["running", "awaiting_resume", "halted"];
11
+ export declare const researchSessionAgentSchema: z.ZodObject<{
12
+ type: z.ZodLiteral<"codex_cli">;
13
+ command: z.ZodDefault<z.ZodString>;
14
+ model: z.ZodOptional<z.ZodString>;
15
+ approvalPolicy: z.ZodDefault<z.ZodEnum<{
16
+ never: "never";
17
+ "on-failure": "on-failure";
18
+ "on-request": "on-request";
19
+ untrusted: "untrusted";
20
+ }>>;
21
+ sandboxMode: z.ZodDefault<z.ZodEnum<{
22
+ "workspace-write": "workspace-write";
23
+ "read-only": "read-only";
24
+ "danger-full-access": "danger-full-access";
25
+ }>>;
26
+ ttySession: z.ZodDefault<z.ZodObject<{
27
+ startupTimeoutSec: z.ZodDefault<z.ZodNumber>;
28
+ turnTimeoutSec: z.ZodDefault<z.ZodNumber>;
29
+ }, z.core.$strip>>;
30
+ }, z.core.$strip>;
31
+ export declare const researchSessionWorkspaceSchema: z.ZodObject<{
32
+ strategy: z.ZodLiteral<"git_worktree">;
33
+ baseRef: z.ZodOptional<z.ZodString>;
34
+ currentRef: z.ZodOptional<z.ZodString>;
35
+ currentPath: z.ZodOptional<z.ZodString>;
36
+ promoted: z.ZodDefault<z.ZodBoolean>;
37
+ promotedAt: z.ZodOptional<z.ZodString>;
38
+ promotedRunId: z.ZodOptional<z.ZodString>;
39
+ promotedDecisionId: z.ZodOptional<z.ZodString>;
40
+ promotedCommitSha: z.ZodOptional<z.ZodString>;
41
+ }, z.core.$strip>;
42
+ export declare const researchSessionContextSchema: z.ZodObject<{
43
+ trackableGlobs: z.ZodDefault<z.ZodArray<z.ZodString>>;
44
+ webSearch: z.ZodDefault<z.ZodBoolean>;
45
+ shellCommandAllowlistAdditions: z.ZodDefault<z.ZodArray<z.ZodString>>;
46
+ shellCommandAllowlistRemovals: z.ZodDefault<z.ZodArray<z.ZodString>>;
47
+ }, z.core.$strip>;
48
+ export declare const researchSessionStopPolicySchema: z.ZodObject<{
49
+ repeatedFailures: z.ZodDefault<z.ZodNumber>;
50
+ noMeaningfulProgress: z.ZodDefault<z.ZodNumber>;
51
+ insufficientEvidence: z.ZodDefault<z.ZodNumber>;
52
+ }, z.core.$strip>;
53
+ export declare const researchSessionGoalStepDraftSchema: z.ZodObject<{
54
+ goal: z.ZodOptional<z.ZodString>;
55
+ agentCommand: z.ZodOptional<z.ZodString>;
56
+ repeatedFailures: z.ZodOptional<z.ZodString>;
57
+ noMeaningfulProgress: z.ZodOptional<z.ZodString>;
58
+ insufficientEvidence: z.ZodOptional<z.ZodString>;
59
+ }, z.core.$strip>;
60
+ export declare const researchSessionAgentStepDraftSchema: z.ZodObject<{
61
+ command: z.ZodOptional<z.ZodString>;
62
+ model: z.ZodOptional<z.ZodString>;
63
+ approvalPolicy: z.ZodOptional<z.ZodString>;
64
+ sandboxMode: z.ZodOptional<z.ZodString>;
65
+ startupTimeoutSec: z.ZodOptional<z.ZodString>;
66
+ turnTimeoutSec: z.ZodOptional<z.ZodString>;
67
+ }, z.core.$strip>;
68
+ export declare const researchSessionWorkspaceStepDraftSchema: z.ZodObject<{
69
+ workingDirectory: z.ZodOptional<z.ZodString>;
70
+ baseRef: z.ZodOptional<z.ZodString>;
71
+ allowedGlobs: z.ZodOptional<z.ZodString>;
72
+ }, z.core.$strip>;
73
+ export declare const researchSessionContextStepDraftSchema: z.ZodObject<{
74
+ trackableGlobs: z.ZodOptional<z.ZodString>;
75
+ webSearch: z.ZodOptional<z.ZodString>;
76
+ shellCommandAllowlistAdditions: z.ZodOptional<z.ZodString>;
77
+ shellCommandAllowlistRemovals: z.ZodOptional<z.ZodString>;
78
+ }, z.core.$strip>;
79
+ export declare const researchSessionPermissionsFlowStateSchema: z.ZodObject<{
80
+ workingDirectory: z.ZodOptional<z.ZodString>;
81
+ webSearch: z.ZodOptional<z.ZodString>;
82
+ shellCommandAllowlistAdditions: z.ZodOptional<z.ZodString>;
83
+ shellCommandAllowlistRemovals: z.ZodOptional<z.ZodString>;
84
+ approvalPolicy: z.ZodOptional<z.ZodString>;
85
+ sandboxMode: z.ZodOptional<z.ZodString>;
86
+ }, z.core.$strip>;
87
+ export declare const researchSessionStopRulesFlowStateSchema: z.ZodObject<{
88
+ repeatedFailures: z.ZodOptional<z.ZodString>;
89
+ noMeaningfulProgress: z.ZodOptional<z.ZodString>;
90
+ insufficientEvidence: z.ZodOptional<z.ZodString>;
91
+ }, z.core.$strip>;
92
+ export declare const researchSessionOutputsFlowStateSchema: z.ZodObject<{
93
+ goal: z.ZodOptional<z.ZodString>;
94
+ trackableGlobs: z.ZodOptional<z.ZodString>;
95
+ baseRef: z.ZodOptional<z.ZodString>;
96
+ agentCommand: z.ZodOptional<z.ZodString>;
97
+ model: z.ZodOptional<z.ZodString>;
98
+ startupTimeoutSec: z.ZodOptional<z.ZodString>;
99
+ turnTimeoutSec: z.ZodOptional<z.ZodString>;
100
+ }, z.core.$strip>;
101
+ export declare const researchSessionReviewSummaryFieldSchema: z.ZodObject<{
102
+ label: z.ZodString;
103
+ value: z.ZodString;
104
+ }, z.core.$strip>;
105
+ export declare const researchSessionReviewSectionFlowStateSchema: z.ZodObject<{
106
+ index: z.ZodString;
107
+ label: z.ZodString;
108
+ step: z.ZodEnum<{
109
+ outputs: "outputs";
110
+ permissions: "permissions";
111
+ stopRules: "stopRules";
112
+ }>;
113
+ fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
114
+ label: z.ZodString;
115
+ value: z.ZodString;
116
+ }, z.core.$strip>>>;
117
+ }, z.core.$strip>;
118
+ export declare const researchSessionReviewFlowStateSchema: z.ZodObject<{
119
+ sections: z.ZodDefault<z.ZodArray<z.ZodObject<{
120
+ index: z.ZodString;
121
+ label: z.ZodString;
122
+ step: z.ZodEnum<{
123
+ outputs: "outputs";
124
+ permissions: "permissions";
125
+ stopRules: "stopRules";
126
+ }>;
127
+ fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
128
+ label: z.ZodString;
129
+ value: z.ZodString;
130
+ }, z.core.$strip>>>;
131
+ }, z.core.$strip>>>;
132
+ }, z.core.$strip>;
133
+ export declare const researchSessionFlowStateSchema: z.ZodObject<{
134
+ permissions: z.ZodOptional<z.ZodObject<{
135
+ workingDirectory: z.ZodOptional<z.ZodString>;
136
+ webSearch: z.ZodOptional<z.ZodString>;
137
+ shellCommandAllowlistAdditions: z.ZodOptional<z.ZodString>;
138
+ shellCommandAllowlistRemovals: z.ZodOptional<z.ZodString>;
139
+ approvalPolicy: z.ZodOptional<z.ZodString>;
140
+ sandboxMode: z.ZodOptional<z.ZodString>;
141
+ }, z.core.$strip>>;
142
+ stopRules: z.ZodOptional<z.ZodObject<{
143
+ repeatedFailures: z.ZodOptional<z.ZodString>;
144
+ noMeaningfulProgress: z.ZodOptional<z.ZodString>;
145
+ insufficientEvidence: z.ZodOptional<z.ZodString>;
146
+ }, z.core.$strip>>;
147
+ outputs: z.ZodOptional<z.ZodObject<{
148
+ goal: z.ZodOptional<z.ZodString>;
149
+ trackableGlobs: z.ZodOptional<z.ZodString>;
150
+ baseRef: z.ZodOptional<z.ZodString>;
151
+ agentCommand: z.ZodOptional<z.ZodString>;
152
+ model: z.ZodOptional<z.ZodString>;
153
+ startupTimeoutSec: z.ZodOptional<z.ZodString>;
154
+ turnTimeoutSec: z.ZodOptional<z.ZodString>;
155
+ }, z.core.$strip>>;
156
+ review: z.ZodOptional<z.ZodObject<{
157
+ sections: z.ZodDefault<z.ZodArray<z.ZodObject<{
158
+ index: z.ZodString;
159
+ label: z.ZodString;
160
+ step: z.ZodEnum<{
161
+ outputs: "outputs";
162
+ permissions: "permissions";
163
+ stopRules: "stopRules";
164
+ }>;
165
+ fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
166
+ label: z.ZodString;
167
+ value: z.ZodString;
168
+ }, z.core.$strip>>>;
169
+ }, z.core.$strip>>>;
170
+ }, z.core.$strip>>;
171
+ }, z.core.$strip>;
172
+ export declare const researchSessionDraftStepSchema: z.ZodEnum<{
173
+ outputs: "outputs";
174
+ permissions: "permissions";
175
+ stopRules: "stopRules";
176
+ review: "review";
177
+ }>;
178
+ export declare const researchSessionDraftStateSchema: z.ZodObject<{
179
+ currentStep: z.ZodDefault<z.ZodEnum<{
180
+ outputs: "outputs";
181
+ permissions: "permissions";
182
+ stopRules: "stopRules";
183
+ review: "review";
184
+ }>>;
185
+ completedSteps: z.ZodDefault<z.ZodArray<z.ZodEnum<{
186
+ outputs: "outputs";
187
+ permissions: "permissions";
188
+ stopRules: "stopRules";
189
+ review: "review";
190
+ }>>>;
191
+ returnToReview: z.ZodDefault<z.ZodBoolean>;
192
+ reviewConfirmed: z.ZodDefault<z.ZodBoolean>;
193
+ flowState: z.ZodOptional<z.ZodObject<{
194
+ permissions: z.ZodOptional<z.ZodObject<{
195
+ workingDirectory: z.ZodOptional<z.ZodString>;
196
+ webSearch: z.ZodOptional<z.ZodString>;
197
+ shellCommandAllowlistAdditions: z.ZodOptional<z.ZodString>;
198
+ shellCommandAllowlistRemovals: z.ZodOptional<z.ZodString>;
199
+ approvalPolicy: z.ZodOptional<z.ZodString>;
200
+ sandboxMode: z.ZodOptional<z.ZodString>;
201
+ }, z.core.$strip>>;
202
+ stopRules: z.ZodOptional<z.ZodObject<{
203
+ repeatedFailures: z.ZodOptional<z.ZodString>;
204
+ noMeaningfulProgress: z.ZodOptional<z.ZodString>;
205
+ insufficientEvidence: z.ZodOptional<z.ZodString>;
206
+ }, z.core.$strip>>;
207
+ outputs: z.ZodOptional<z.ZodObject<{
208
+ goal: z.ZodOptional<z.ZodString>;
209
+ trackableGlobs: z.ZodOptional<z.ZodString>;
210
+ baseRef: z.ZodOptional<z.ZodString>;
211
+ agentCommand: z.ZodOptional<z.ZodString>;
212
+ model: z.ZodOptional<z.ZodString>;
213
+ startupTimeoutSec: z.ZodOptional<z.ZodString>;
214
+ turnTimeoutSec: z.ZodOptional<z.ZodString>;
215
+ }, z.core.$strip>>;
216
+ review: z.ZodOptional<z.ZodObject<{
217
+ sections: z.ZodDefault<z.ZodArray<z.ZodObject<{
218
+ index: z.ZodString;
219
+ label: z.ZodString;
220
+ step: z.ZodEnum<{
221
+ outputs: "outputs";
222
+ permissions: "permissions";
223
+ stopRules: "stopRules";
224
+ }>;
225
+ fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
226
+ label: z.ZodString;
227
+ value: z.ZodString;
228
+ }, z.core.$strip>>>;
229
+ }, z.core.$strip>>>;
230
+ }, z.core.$strip>>;
231
+ }, z.core.$strip>>;
232
+ goalStep: z.ZodOptional<z.ZodObject<{
233
+ goal: z.ZodOptional<z.ZodString>;
234
+ agentCommand: z.ZodOptional<z.ZodString>;
235
+ repeatedFailures: z.ZodOptional<z.ZodString>;
236
+ noMeaningfulProgress: z.ZodOptional<z.ZodString>;
237
+ insufficientEvidence: z.ZodOptional<z.ZodString>;
238
+ }, z.core.$strip>>;
239
+ contextStep: z.ZodOptional<z.ZodObject<{
240
+ trackableGlobs: z.ZodOptional<z.ZodString>;
241
+ webSearch: z.ZodOptional<z.ZodString>;
242
+ shellCommandAllowlistAdditions: z.ZodOptional<z.ZodString>;
243
+ shellCommandAllowlistRemovals: z.ZodOptional<z.ZodString>;
244
+ }, z.core.$strip>>;
245
+ workspaceStep: z.ZodOptional<z.ZodObject<{
246
+ workingDirectory: z.ZodOptional<z.ZodString>;
247
+ baseRef: z.ZodOptional<z.ZodString>;
248
+ allowedGlobs: z.ZodOptional<z.ZodString>;
249
+ }, z.core.$strip>>;
250
+ agentStep: z.ZodOptional<z.ZodObject<{
251
+ command: z.ZodOptional<z.ZodString>;
252
+ model: z.ZodOptional<z.ZodString>;
253
+ approvalPolicy: z.ZodOptional<z.ZodString>;
254
+ sandboxMode: z.ZodOptional<z.ZodString>;
255
+ startupTimeoutSec: z.ZodOptional<z.ZodString>;
256
+ turnTimeoutSec: z.ZodOptional<z.ZodString>;
257
+ }, z.core.$strip>>;
258
+ }, z.core.$strip>;
259
+ export declare const researchSessionCycleOutcomeSchema: z.ZodEnum<{
260
+ accepted: "accepted";
261
+ rejected: "rejected";
262
+ needs_human: "needs_human";
263
+ failed: "failed";
264
+ }>;
265
+ export declare const researchSessionProgressSignalSchema: z.ZodObject<{
266
+ cycle: z.ZodNumber;
267
+ outcome: z.ZodEnum<{
268
+ accepted: "accepted";
269
+ rejected: "rejected";
270
+ needs_human: "needs_human";
271
+ failed: "failed";
272
+ }>;
273
+ changedFileCount: z.ZodDefault<z.ZodNumber>;
274
+ diffLineCount: z.ZodDefault<z.ZodNumber>;
275
+ repeatedDiff: z.ZodDefault<z.ZodBoolean>;
276
+ verificationDelta: z.ZodOptional<z.ZodNumber>;
277
+ newArtifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
278
+ meaningfulProgress: z.ZodBoolean;
279
+ insufficientEvidence: z.ZodDefault<z.ZodBoolean>;
280
+ agentTieBreakerUsed: z.ZodDefault<z.ZodBoolean>;
281
+ agentSummary: z.ZodOptional<z.ZodString>;
282
+ reasons: z.ZodDefault<z.ZodArray<z.ZodString>>;
283
+ }, z.core.$strip>;
284
+ export declare const researchSessionProgressSchema: z.ZodObject<{
285
+ completedCycles: z.ZodDefault<z.ZodNumber>;
286
+ nextCycle: z.ZodDefault<z.ZodNumber>;
287
+ latestRunId: z.ZodOptional<z.ZodString>;
288
+ latestDecisionId: z.ZodOptional<z.ZodString>;
289
+ latestFrontierIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
290
+ repeatedFailureStreak: z.ZodDefault<z.ZodNumber>;
291
+ noMeaningfulProgressStreak: z.ZodDefault<z.ZodNumber>;
292
+ insufficientEvidenceStreak: z.ZodDefault<z.ZodNumber>;
293
+ lastMeaningfulProgressCycle: z.ZodOptional<z.ZodNumber>;
294
+ lastCheckpointAt: z.ZodOptional<z.ZodString>;
295
+ lastSignals: z.ZodOptional<z.ZodObject<{
296
+ cycle: z.ZodNumber;
297
+ outcome: z.ZodEnum<{
298
+ accepted: "accepted";
299
+ rejected: "rejected";
300
+ needs_human: "needs_human";
301
+ failed: "failed";
302
+ }>;
303
+ changedFileCount: z.ZodDefault<z.ZodNumber>;
304
+ diffLineCount: z.ZodDefault<z.ZodNumber>;
305
+ repeatedDiff: z.ZodDefault<z.ZodBoolean>;
306
+ verificationDelta: z.ZodOptional<z.ZodNumber>;
307
+ newArtifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
308
+ meaningfulProgress: z.ZodBoolean;
309
+ insufficientEvidence: z.ZodDefault<z.ZodBoolean>;
310
+ agentTieBreakerUsed: z.ZodDefault<z.ZodBoolean>;
311
+ agentSummary: z.ZodOptional<z.ZodString>;
312
+ reasons: z.ZodDefault<z.ZodArray<z.ZodString>>;
313
+ }, z.core.$strip>>;
314
+ }, z.core.$strip>;
315
+ export declare const researchSessionStopConditionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
316
+ type: z.ZodLiteral<"none">;
317
+ }, z.core.$strip>, z.ZodObject<{
318
+ type: z.ZodLiteral<"goal_achieved">;
319
+ summary: z.ZodString;
320
+ achievedAtCycle: z.ZodNumber;
321
+ }, z.core.$strip>, z.ZodObject<{
322
+ type: z.ZodLiteral<"repeated_failures">;
323
+ count: z.ZodNumber;
324
+ threshold: z.ZodNumber;
325
+ }, z.core.$strip>, z.ZodObject<{
326
+ type: z.ZodLiteral<"no_meaningful_progress">;
327
+ count: z.ZodNumber;
328
+ threshold: z.ZodNumber;
329
+ }, z.core.$strip>, z.ZodObject<{
330
+ type: z.ZodLiteral<"insufficient_evidence">;
331
+ count: z.ZodNumber;
332
+ threshold: z.ZodNumber;
333
+ }, z.core.$strip>, z.ZodObject<{
334
+ type: z.ZodLiteral<"operator_stop">;
335
+ note: z.ZodOptional<z.ZodString>;
336
+ }, z.core.$strip>, z.ZodObject<{
337
+ type: z.ZodLiteral<"unrecoverable_error">;
338
+ message: z.ZodString;
339
+ stack: z.ZodOptional<z.ZodString>;
340
+ }, z.core.$strip>], "type">;
341
+ export declare const researchSessionResumeSchema: z.ZodObject<{
342
+ resumable: z.ZodDefault<z.ZodBoolean>;
343
+ checkpointType: z.ZodLiteral<"completed_cycle_boundary">;
344
+ resumeFromCycle: z.ZodNumber;
345
+ requiresUserConfirmation: z.ZodDefault<z.ZodBoolean>;
346
+ checkpointRunId: z.ZodOptional<z.ZodString>;
347
+ checkpointDecisionId: z.ZodOptional<z.ZodString>;
348
+ interruptionDetectedAt: z.ZodOptional<z.ZodString>;
349
+ interruptedDuringCycle: z.ZodOptional<z.ZodNumber>;
350
+ note: z.ZodOptional<z.ZodString>;
351
+ }, z.core.$strip>;
352
+ export declare const researchSessionTuiSelectedCandidateDecisionSchema: z.ZodEnum<{
353
+ resume: "resume";
354
+ new_session: "new_session";
355
+ }>;
356
+ export declare const researchSessionTuiSelectedCandidateConfirmationSchema: z.ZodObject<{
357
+ required: z.ZodLiteral<true>;
358
+ decision: z.ZodOptional<z.ZodEnum<{
359
+ resume: "resume";
360
+ new_session: "new_session";
361
+ }>>;
362
+ }, z.core.$strip>;
363
+ export declare const researchSessionRecoveryClassificationSchema: z.ZodEnum<{
364
+ resumable: "resumable";
365
+ inspect_only: "inspect_only";
366
+ non_recoverable: "non_recoverable";
367
+ }>;
368
+ export declare const researchSessionRuntimeStateSchema: z.ZodEnum<{
369
+ active: "active";
370
+ stale: "stale";
371
+ exited: "exited";
372
+ missing: "missing";
373
+ }>;
374
+ export declare const researchSessionTuiSelectedCandidateCheckpointSchema: z.ZodObject<{
375
+ completedCycles: z.ZodNumber;
376
+ latestRunId: z.ZodOptional<z.ZodString>;
377
+ latestDecisionId: z.ZodOptional<z.ZodString>;
378
+ lastCheckpointAt: z.ZodOptional<z.ZodString>;
379
+ stopCondition: z.ZodString;
380
+ }, z.core.$strip>;
381
+ export declare const researchSessionTuiSelectedCandidateLatestCycleSchema: z.ZodObject<{
382
+ outcome: z.ZodEnum<{
383
+ accepted: "accepted";
384
+ rejected: "rejected";
385
+ needs_human: "needs_human";
386
+ failed: "failed";
387
+ }>;
388
+ meaningfulProgress: z.ZodBoolean;
389
+ insufficientEvidence: z.ZodBoolean;
390
+ changedFileCount: z.ZodNumber;
391
+ diffLineCount: z.ZodNumber;
392
+ newArtifactCount: z.ZodNumber;
393
+ agentSummary: z.ZodOptional<z.ZodString>;
394
+ }, z.core.$strip>;
395
+ export declare const researchSessionTuiSelectedCandidateRecoverySchema: z.ZodObject<{
396
+ classification: z.ZodEnum<{
397
+ resumable: "resumable";
398
+ inspect_only: "inspect_only";
399
+ non_recoverable: "non_recoverable";
400
+ }>;
401
+ resumeAllowed: z.ZodBoolean;
402
+ reason: z.ZodString;
403
+ runtimeState: z.ZodEnum<{
404
+ active: "active";
405
+ stale: "stale";
406
+ exited: "exited";
407
+ missing: "missing";
408
+ }>;
409
+ codexPhase: z.ZodOptional<z.ZodEnum<{
410
+ starting: "starting";
411
+ running: "running";
412
+ clean_exit: "clean_exit";
413
+ signaled: "signaled";
414
+ non_zero_exit: "non_zero_exit";
415
+ startup_error: "startup_error";
416
+ runtime_error: "runtime_error";
417
+ }>>;
418
+ }, z.core.$strip>;
419
+ export declare const researchSessionTuiSelectedCandidateSummarySchema: z.ZodObject<{
420
+ sessionId: z.ZodString;
421
+ status: z.ZodEnum<{
422
+ running: "running";
423
+ awaiting_resume: "awaiting_resume";
424
+ halted: "halted";
425
+ }>;
426
+ goal: z.ZodString;
427
+ updatedAt: z.ZodString;
428
+ resumeFromCycle: z.ZodNumber;
429
+ checkpoint: z.ZodObject<{
430
+ completedCycles: z.ZodNumber;
431
+ latestRunId: z.ZodOptional<z.ZodString>;
432
+ latestDecisionId: z.ZodOptional<z.ZodString>;
433
+ lastCheckpointAt: z.ZodOptional<z.ZodString>;
434
+ stopCondition: z.ZodString;
435
+ }, z.core.$strip>;
436
+ latestCycle: z.ZodOptional<z.ZodObject<{
437
+ outcome: z.ZodEnum<{
438
+ accepted: "accepted";
439
+ rejected: "rejected";
440
+ needs_human: "needs_human";
441
+ failed: "failed";
442
+ }>;
443
+ meaningfulProgress: z.ZodBoolean;
444
+ insufficientEvidence: z.ZodBoolean;
445
+ changedFileCount: z.ZodNumber;
446
+ diffLineCount: z.ZodNumber;
447
+ newArtifactCount: z.ZodNumber;
448
+ agentSummary: z.ZodOptional<z.ZodString>;
449
+ }, z.core.$strip>>;
450
+ recovery: z.ZodOptional<z.ZodObject<{
451
+ classification: z.ZodEnum<{
452
+ resumable: "resumable";
453
+ inspect_only: "inspect_only";
454
+ non_recoverable: "non_recoverable";
455
+ }>;
456
+ resumeAllowed: z.ZodBoolean;
457
+ reason: z.ZodString;
458
+ runtimeState: z.ZodEnum<{
459
+ active: "active";
460
+ stale: "stale";
461
+ exited: "exited";
462
+ missing: "missing";
463
+ }>;
464
+ codexPhase: z.ZodOptional<z.ZodEnum<{
465
+ starting: "starting";
466
+ running: "running";
467
+ clean_exit: "clean_exit";
468
+ signaled: "signaled";
469
+ non_zero_exit: "non_zero_exit";
470
+ startup_error: "startup_error";
471
+ runtime_error: "runtime_error";
472
+ }>>;
473
+ }, z.core.$strip>>;
474
+ userConfirmation: z.ZodObject<{
475
+ required: z.ZodLiteral<true>;
476
+ decision: z.ZodOptional<z.ZodEnum<{
477
+ resume: "resume";
478
+ new_session: "new_session";
479
+ }>>;
480
+ }, z.core.$strip>;
481
+ }, z.core.$strip>;
482
+ export declare const researchSessionMetadataSchema: z.ZodObject<{
483
+ sessionId: z.ZodString;
484
+ goal: z.ZodString;
485
+ workingDirectory: z.ZodString;
486
+ status: z.ZodEnum<{
487
+ running: "running";
488
+ draft: "draft";
489
+ awaiting_resume: "awaiting_resume";
490
+ halted: "halted";
491
+ goal_achieved: "goal_achieved";
492
+ failed: "failed";
493
+ }>;
494
+ createdAt: z.ZodString;
495
+ updatedAt: z.ZodString;
496
+ completedCycles: z.ZodNumber;
497
+ lastCheckpointAt: z.ZodOptional<z.ZodString>;
498
+ resumeFromCycle: z.ZodNumber;
499
+ }, z.core.$strip>;
500
+ export declare const researchSessionSubmittedSnapshotSchema: z.ZodObject<{
501
+ sessionId: z.ZodString;
502
+ goal: z.ZodString;
503
+ workingDirectory: z.ZodString;
504
+ status: z.ZodEnum<{
505
+ running: "running";
506
+ draft: "draft";
507
+ awaiting_resume: "awaiting_resume";
508
+ halted: "halted";
509
+ goal_achieved: "goal_achieved";
510
+ failed: "failed";
511
+ }>;
512
+ agent: z.ZodObject<{
513
+ type: z.ZodLiteral<"codex_cli">;
514
+ command: z.ZodDefault<z.ZodString>;
515
+ model: z.ZodOptional<z.ZodString>;
516
+ approvalPolicy: z.ZodDefault<z.ZodEnum<{
517
+ never: "never";
518
+ "on-failure": "on-failure";
519
+ "on-request": "on-request";
520
+ untrusted: "untrusted";
521
+ }>>;
522
+ sandboxMode: z.ZodDefault<z.ZodEnum<{
523
+ "workspace-write": "workspace-write";
524
+ "read-only": "read-only";
525
+ "danger-full-access": "danger-full-access";
526
+ }>>;
527
+ ttySession: z.ZodDefault<z.ZodObject<{
528
+ startupTimeoutSec: z.ZodDefault<z.ZodNumber>;
529
+ turnTimeoutSec: z.ZodDefault<z.ZodNumber>;
530
+ }, z.core.$strip>>;
531
+ }, z.core.$strip>;
532
+ context: z.ZodObject<{
533
+ trackableGlobs: z.ZodDefault<z.ZodArray<z.ZodString>>;
534
+ webSearch: z.ZodDefault<z.ZodBoolean>;
535
+ shellCommandAllowlistAdditions: z.ZodDefault<z.ZodArray<z.ZodString>>;
536
+ shellCommandAllowlistRemovals: z.ZodDefault<z.ZodArray<z.ZodString>>;
537
+ }, z.core.$strip>;
538
+ workspace: z.ZodObject<{
539
+ strategy: z.ZodLiteral<"git_worktree">;
540
+ baseRef: z.ZodOptional<z.ZodString>;
541
+ currentRef: z.ZodOptional<z.ZodString>;
542
+ currentPath: z.ZodOptional<z.ZodString>;
543
+ promoted: z.ZodDefault<z.ZodBoolean>;
544
+ promotedAt: z.ZodOptional<z.ZodString>;
545
+ promotedRunId: z.ZodOptional<z.ZodString>;
546
+ promotedDecisionId: z.ZodOptional<z.ZodString>;
547
+ promotedCommitSha: z.ZodOptional<z.ZodString>;
548
+ }, z.core.$strip>;
549
+ stopPolicy: z.ZodObject<{
550
+ repeatedFailures: z.ZodDefault<z.ZodNumber>;
551
+ noMeaningfulProgress: z.ZodDefault<z.ZodNumber>;
552
+ insufficientEvidence: z.ZodDefault<z.ZodNumber>;
553
+ }, z.core.$strip>;
554
+ progress: z.ZodObject<{
555
+ completedCycles: z.ZodDefault<z.ZodNumber>;
556
+ nextCycle: z.ZodDefault<z.ZodNumber>;
557
+ latestRunId: z.ZodOptional<z.ZodString>;
558
+ latestDecisionId: z.ZodOptional<z.ZodString>;
559
+ latestFrontierIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
560
+ repeatedFailureStreak: z.ZodDefault<z.ZodNumber>;
561
+ noMeaningfulProgressStreak: z.ZodDefault<z.ZodNumber>;
562
+ insufficientEvidenceStreak: z.ZodDefault<z.ZodNumber>;
563
+ lastMeaningfulProgressCycle: z.ZodOptional<z.ZodNumber>;
564
+ lastCheckpointAt: z.ZodOptional<z.ZodString>;
565
+ lastSignals: z.ZodOptional<z.ZodObject<{
566
+ cycle: z.ZodNumber;
567
+ outcome: z.ZodEnum<{
568
+ accepted: "accepted";
569
+ rejected: "rejected";
570
+ needs_human: "needs_human";
571
+ failed: "failed";
572
+ }>;
573
+ changedFileCount: z.ZodDefault<z.ZodNumber>;
574
+ diffLineCount: z.ZodDefault<z.ZodNumber>;
575
+ repeatedDiff: z.ZodDefault<z.ZodBoolean>;
576
+ verificationDelta: z.ZodOptional<z.ZodNumber>;
577
+ newArtifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
578
+ meaningfulProgress: z.ZodBoolean;
579
+ insufficientEvidence: z.ZodDefault<z.ZodBoolean>;
580
+ agentTieBreakerUsed: z.ZodDefault<z.ZodBoolean>;
581
+ agentSummary: z.ZodOptional<z.ZodString>;
582
+ reasons: z.ZodDefault<z.ZodArray<z.ZodString>>;
583
+ }, z.core.$strip>>;
584
+ }, z.core.$strip>;
585
+ stopCondition: z.ZodDiscriminatedUnion<[z.ZodObject<{
586
+ type: z.ZodLiteral<"none">;
587
+ }, z.core.$strip>, z.ZodObject<{
588
+ type: z.ZodLiteral<"goal_achieved">;
589
+ summary: z.ZodString;
590
+ achievedAtCycle: z.ZodNumber;
591
+ }, z.core.$strip>, z.ZodObject<{
592
+ type: z.ZodLiteral<"repeated_failures">;
593
+ count: z.ZodNumber;
594
+ threshold: z.ZodNumber;
595
+ }, z.core.$strip>, z.ZodObject<{
596
+ type: z.ZodLiteral<"no_meaningful_progress">;
597
+ count: z.ZodNumber;
598
+ threshold: z.ZodNumber;
599
+ }, z.core.$strip>, z.ZodObject<{
600
+ type: z.ZodLiteral<"insufficient_evidence">;
601
+ count: z.ZodNumber;
602
+ threshold: z.ZodNumber;
603
+ }, z.core.$strip>, z.ZodObject<{
604
+ type: z.ZodLiteral<"operator_stop">;
605
+ note: z.ZodOptional<z.ZodString>;
606
+ }, z.core.$strip>, z.ZodObject<{
607
+ type: z.ZodLiteral<"unrecoverable_error">;
608
+ message: z.ZodString;
609
+ stack: z.ZodOptional<z.ZodString>;
610
+ }, z.core.$strip>], "type">;
611
+ resume: z.ZodObject<{
612
+ resumable: z.ZodDefault<z.ZodBoolean>;
613
+ checkpointType: z.ZodLiteral<"completed_cycle_boundary">;
614
+ resumeFromCycle: z.ZodNumber;
615
+ requiresUserConfirmation: z.ZodDefault<z.ZodBoolean>;
616
+ checkpointRunId: z.ZodOptional<z.ZodString>;
617
+ checkpointDecisionId: z.ZodOptional<z.ZodString>;
618
+ interruptionDetectedAt: z.ZodOptional<z.ZodString>;
619
+ interruptedDuringCycle: z.ZodOptional<z.ZodNumber>;
620
+ note: z.ZodOptional<z.ZodString>;
621
+ }, z.core.$strip>;
622
+ draftState: z.ZodOptional<z.ZodObject<{
623
+ currentStep: z.ZodDefault<z.ZodEnum<{
624
+ outputs: "outputs";
625
+ permissions: "permissions";
626
+ stopRules: "stopRules";
627
+ review: "review";
628
+ }>>;
629
+ completedSteps: z.ZodDefault<z.ZodArray<z.ZodEnum<{
630
+ outputs: "outputs";
631
+ permissions: "permissions";
632
+ stopRules: "stopRules";
633
+ review: "review";
634
+ }>>>;
635
+ returnToReview: z.ZodDefault<z.ZodBoolean>;
636
+ reviewConfirmed: z.ZodDefault<z.ZodBoolean>;
637
+ flowState: z.ZodOptional<z.ZodObject<{
638
+ permissions: z.ZodOptional<z.ZodObject<{
639
+ workingDirectory: z.ZodOptional<z.ZodString>;
640
+ webSearch: z.ZodOptional<z.ZodString>;
641
+ shellCommandAllowlistAdditions: z.ZodOptional<z.ZodString>;
642
+ shellCommandAllowlistRemovals: z.ZodOptional<z.ZodString>;
643
+ approvalPolicy: z.ZodOptional<z.ZodString>;
644
+ sandboxMode: z.ZodOptional<z.ZodString>;
645
+ }, z.core.$strip>>;
646
+ stopRules: z.ZodOptional<z.ZodObject<{
647
+ repeatedFailures: z.ZodOptional<z.ZodString>;
648
+ noMeaningfulProgress: z.ZodOptional<z.ZodString>;
649
+ insufficientEvidence: z.ZodOptional<z.ZodString>;
650
+ }, z.core.$strip>>;
651
+ outputs: z.ZodOptional<z.ZodObject<{
652
+ goal: z.ZodOptional<z.ZodString>;
653
+ trackableGlobs: z.ZodOptional<z.ZodString>;
654
+ baseRef: z.ZodOptional<z.ZodString>;
655
+ agentCommand: z.ZodOptional<z.ZodString>;
656
+ model: z.ZodOptional<z.ZodString>;
657
+ startupTimeoutSec: z.ZodOptional<z.ZodString>;
658
+ turnTimeoutSec: z.ZodOptional<z.ZodString>;
659
+ }, z.core.$strip>>;
660
+ review: z.ZodOptional<z.ZodObject<{
661
+ sections: z.ZodDefault<z.ZodArray<z.ZodObject<{
662
+ index: z.ZodString;
663
+ label: z.ZodString;
664
+ step: z.ZodEnum<{
665
+ outputs: "outputs";
666
+ permissions: "permissions";
667
+ stopRules: "stopRules";
668
+ }>;
669
+ fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
670
+ label: z.ZodString;
671
+ value: z.ZodString;
672
+ }, z.core.$strip>>>;
673
+ }, z.core.$strip>>>;
674
+ }, z.core.$strip>>;
675
+ }, z.core.$strip>>;
676
+ goalStep: z.ZodOptional<z.ZodObject<{
677
+ goal: z.ZodOptional<z.ZodString>;
678
+ agentCommand: z.ZodOptional<z.ZodString>;
679
+ repeatedFailures: z.ZodOptional<z.ZodString>;
680
+ noMeaningfulProgress: z.ZodOptional<z.ZodString>;
681
+ insufficientEvidence: z.ZodOptional<z.ZodString>;
682
+ }, z.core.$strip>>;
683
+ contextStep: z.ZodOptional<z.ZodObject<{
684
+ trackableGlobs: z.ZodOptional<z.ZodString>;
685
+ webSearch: z.ZodOptional<z.ZodString>;
686
+ shellCommandAllowlistAdditions: z.ZodOptional<z.ZodString>;
687
+ shellCommandAllowlistRemovals: z.ZodOptional<z.ZodString>;
688
+ }, z.core.$strip>>;
689
+ workspaceStep: z.ZodOptional<z.ZodObject<{
690
+ workingDirectory: z.ZodOptional<z.ZodString>;
691
+ baseRef: z.ZodOptional<z.ZodString>;
692
+ allowedGlobs: z.ZodOptional<z.ZodString>;
693
+ }, z.core.$strip>>;
694
+ agentStep: z.ZodOptional<z.ZodObject<{
695
+ command: z.ZodOptional<z.ZodString>;
696
+ model: z.ZodOptional<z.ZodString>;
697
+ approvalPolicy: z.ZodOptional<z.ZodString>;
698
+ sandboxMode: z.ZodOptional<z.ZodString>;
699
+ startupTimeoutSec: z.ZodOptional<z.ZodString>;
700
+ turnTimeoutSec: z.ZodOptional<z.ZodString>;
701
+ }, z.core.$strip>>;
702
+ }, z.core.$strip>>;
703
+ createdAt: z.ZodString;
704
+ updatedAt: z.ZodString;
705
+ endedAt: z.ZodOptional<z.ZodString>;
706
+ }, z.core.$strip>;
707
+ export declare const researchSessionRecordSchema: z.ZodObject<{
708
+ sessionId: z.ZodString;
709
+ goal: z.ZodString;
710
+ workingDirectory: z.ZodString;
711
+ status: z.ZodEnum<{
712
+ running: "running";
713
+ draft: "draft";
714
+ awaiting_resume: "awaiting_resume";
715
+ halted: "halted";
716
+ goal_achieved: "goal_achieved";
717
+ failed: "failed";
718
+ }>;
719
+ agent: z.ZodDefault<z.ZodObject<{
720
+ type: z.ZodLiteral<"codex_cli">;
721
+ command: z.ZodDefault<z.ZodString>;
722
+ model: z.ZodOptional<z.ZodString>;
723
+ approvalPolicy: z.ZodDefault<z.ZodEnum<{
724
+ never: "never";
725
+ "on-failure": "on-failure";
726
+ "on-request": "on-request";
727
+ untrusted: "untrusted";
728
+ }>>;
729
+ sandboxMode: z.ZodDefault<z.ZodEnum<{
730
+ "workspace-write": "workspace-write";
731
+ "read-only": "read-only";
732
+ "danger-full-access": "danger-full-access";
733
+ }>>;
734
+ ttySession: z.ZodDefault<z.ZodObject<{
735
+ startupTimeoutSec: z.ZodDefault<z.ZodNumber>;
736
+ turnTimeoutSec: z.ZodDefault<z.ZodNumber>;
737
+ }, z.core.$strip>>;
738
+ }, z.core.$strip>>;
739
+ context: z.ZodDefault<z.ZodObject<{
740
+ trackableGlobs: z.ZodDefault<z.ZodArray<z.ZodString>>;
741
+ webSearch: z.ZodDefault<z.ZodBoolean>;
742
+ shellCommandAllowlistAdditions: z.ZodDefault<z.ZodArray<z.ZodString>>;
743
+ shellCommandAllowlistRemovals: z.ZodDefault<z.ZodArray<z.ZodString>>;
744
+ }, z.core.$strip>>;
745
+ workspace: z.ZodDefault<z.ZodObject<{
746
+ strategy: z.ZodLiteral<"git_worktree">;
747
+ baseRef: z.ZodOptional<z.ZodString>;
748
+ currentRef: z.ZodOptional<z.ZodString>;
749
+ currentPath: z.ZodOptional<z.ZodString>;
750
+ promoted: z.ZodDefault<z.ZodBoolean>;
751
+ promotedAt: z.ZodOptional<z.ZodString>;
752
+ promotedRunId: z.ZodOptional<z.ZodString>;
753
+ promotedDecisionId: z.ZodOptional<z.ZodString>;
754
+ promotedCommitSha: z.ZodOptional<z.ZodString>;
755
+ }, z.core.$strip>>;
756
+ stopPolicy: z.ZodDefault<z.ZodObject<{
757
+ repeatedFailures: z.ZodDefault<z.ZodNumber>;
758
+ noMeaningfulProgress: z.ZodDefault<z.ZodNumber>;
759
+ insufficientEvidence: z.ZodDefault<z.ZodNumber>;
760
+ }, z.core.$strip>>;
761
+ progress: z.ZodDefault<z.ZodObject<{
762
+ completedCycles: z.ZodDefault<z.ZodNumber>;
763
+ nextCycle: z.ZodDefault<z.ZodNumber>;
764
+ latestRunId: z.ZodOptional<z.ZodString>;
765
+ latestDecisionId: z.ZodOptional<z.ZodString>;
766
+ latestFrontierIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
767
+ repeatedFailureStreak: z.ZodDefault<z.ZodNumber>;
768
+ noMeaningfulProgressStreak: z.ZodDefault<z.ZodNumber>;
769
+ insufficientEvidenceStreak: z.ZodDefault<z.ZodNumber>;
770
+ lastMeaningfulProgressCycle: z.ZodOptional<z.ZodNumber>;
771
+ lastCheckpointAt: z.ZodOptional<z.ZodString>;
772
+ lastSignals: z.ZodOptional<z.ZodObject<{
773
+ cycle: z.ZodNumber;
774
+ outcome: z.ZodEnum<{
775
+ accepted: "accepted";
776
+ rejected: "rejected";
777
+ needs_human: "needs_human";
778
+ failed: "failed";
779
+ }>;
780
+ changedFileCount: z.ZodDefault<z.ZodNumber>;
781
+ diffLineCount: z.ZodDefault<z.ZodNumber>;
782
+ repeatedDiff: z.ZodDefault<z.ZodBoolean>;
783
+ verificationDelta: z.ZodOptional<z.ZodNumber>;
784
+ newArtifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
785
+ meaningfulProgress: z.ZodBoolean;
786
+ insufficientEvidence: z.ZodDefault<z.ZodBoolean>;
787
+ agentTieBreakerUsed: z.ZodDefault<z.ZodBoolean>;
788
+ agentSummary: z.ZodOptional<z.ZodString>;
789
+ reasons: z.ZodDefault<z.ZodArray<z.ZodString>>;
790
+ }, z.core.$strip>>;
791
+ }, z.core.$strip>>;
792
+ stopCondition: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
793
+ type: z.ZodLiteral<"none">;
794
+ }, z.core.$strip>, z.ZodObject<{
795
+ type: z.ZodLiteral<"goal_achieved">;
796
+ summary: z.ZodString;
797
+ achievedAtCycle: z.ZodNumber;
798
+ }, z.core.$strip>, z.ZodObject<{
799
+ type: z.ZodLiteral<"repeated_failures">;
800
+ count: z.ZodNumber;
801
+ threshold: z.ZodNumber;
802
+ }, z.core.$strip>, z.ZodObject<{
803
+ type: z.ZodLiteral<"no_meaningful_progress">;
804
+ count: z.ZodNumber;
805
+ threshold: z.ZodNumber;
806
+ }, z.core.$strip>, z.ZodObject<{
807
+ type: z.ZodLiteral<"insufficient_evidence">;
808
+ count: z.ZodNumber;
809
+ threshold: z.ZodNumber;
810
+ }, z.core.$strip>, z.ZodObject<{
811
+ type: z.ZodLiteral<"operator_stop">;
812
+ note: z.ZodOptional<z.ZodString>;
813
+ }, z.core.$strip>, z.ZodObject<{
814
+ type: z.ZodLiteral<"unrecoverable_error">;
815
+ message: z.ZodString;
816
+ stack: z.ZodOptional<z.ZodString>;
817
+ }, z.core.$strip>], "type">>;
818
+ resume: z.ZodDefault<z.ZodObject<{
819
+ resumable: z.ZodDefault<z.ZodBoolean>;
820
+ checkpointType: z.ZodLiteral<"completed_cycle_boundary">;
821
+ resumeFromCycle: z.ZodNumber;
822
+ requiresUserConfirmation: z.ZodDefault<z.ZodBoolean>;
823
+ checkpointRunId: z.ZodOptional<z.ZodString>;
824
+ checkpointDecisionId: z.ZodOptional<z.ZodString>;
825
+ interruptionDetectedAt: z.ZodOptional<z.ZodString>;
826
+ interruptedDuringCycle: z.ZodOptional<z.ZodNumber>;
827
+ note: z.ZodOptional<z.ZodString>;
828
+ }, z.core.$strip>>;
829
+ submittedSnapshot: z.ZodOptional<z.ZodObject<{
830
+ sessionId: z.ZodString;
831
+ goal: z.ZodString;
832
+ workingDirectory: z.ZodString;
833
+ status: z.ZodEnum<{
834
+ running: "running";
835
+ draft: "draft";
836
+ awaiting_resume: "awaiting_resume";
837
+ halted: "halted";
838
+ goal_achieved: "goal_achieved";
839
+ failed: "failed";
840
+ }>;
841
+ agent: z.ZodObject<{
842
+ type: z.ZodLiteral<"codex_cli">;
843
+ command: z.ZodDefault<z.ZodString>;
844
+ model: z.ZodOptional<z.ZodString>;
845
+ approvalPolicy: z.ZodDefault<z.ZodEnum<{
846
+ never: "never";
847
+ "on-failure": "on-failure";
848
+ "on-request": "on-request";
849
+ untrusted: "untrusted";
850
+ }>>;
851
+ sandboxMode: z.ZodDefault<z.ZodEnum<{
852
+ "workspace-write": "workspace-write";
853
+ "read-only": "read-only";
854
+ "danger-full-access": "danger-full-access";
855
+ }>>;
856
+ ttySession: z.ZodDefault<z.ZodObject<{
857
+ startupTimeoutSec: z.ZodDefault<z.ZodNumber>;
858
+ turnTimeoutSec: z.ZodDefault<z.ZodNumber>;
859
+ }, z.core.$strip>>;
860
+ }, z.core.$strip>;
861
+ context: z.ZodObject<{
862
+ trackableGlobs: z.ZodDefault<z.ZodArray<z.ZodString>>;
863
+ webSearch: z.ZodDefault<z.ZodBoolean>;
864
+ shellCommandAllowlistAdditions: z.ZodDefault<z.ZodArray<z.ZodString>>;
865
+ shellCommandAllowlistRemovals: z.ZodDefault<z.ZodArray<z.ZodString>>;
866
+ }, z.core.$strip>;
867
+ workspace: z.ZodObject<{
868
+ strategy: z.ZodLiteral<"git_worktree">;
869
+ baseRef: z.ZodOptional<z.ZodString>;
870
+ currentRef: z.ZodOptional<z.ZodString>;
871
+ currentPath: z.ZodOptional<z.ZodString>;
872
+ promoted: z.ZodDefault<z.ZodBoolean>;
873
+ promotedAt: z.ZodOptional<z.ZodString>;
874
+ promotedRunId: z.ZodOptional<z.ZodString>;
875
+ promotedDecisionId: z.ZodOptional<z.ZodString>;
876
+ promotedCommitSha: z.ZodOptional<z.ZodString>;
877
+ }, z.core.$strip>;
878
+ stopPolicy: z.ZodObject<{
879
+ repeatedFailures: z.ZodDefault<z.ZodNumber>;
880
+ noMeaningfulProgress: z.ZodDefault<z.ZodNumber>;
881
+ insufficientEvidence: z.ZodDefault<z.ZodNumber>;
882
+ }, z.core.$strip>;
883
+ progress: z.ZodObject<{
884
+ completedCycles: z.ZodDefault<z.ZodNumber>;
885
+ nextCycle: z.ZodDefault<z.ZodNumber>;
886
+ latestRunId: z.ZodOptional<z.ZodString>;
887
+ latestDecisionId: z.ZodOptional<z.ZodString>;
888
+ latestFrontierIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
889
+ repeatedFailureStreak: z.ZodDefault<z.ZodNumber>;
890
+ noMeaningfulProgressStreak: z.ZodDefault<z.ZodNumber>;
891
+ insufficientEvidenceStreak: z.ZodDefault<z.ZodNumber>;
892
+ lastMeaningfulProgressCycle: z.ZodOptional<z.ZodNumber>;
893
+ lastCheckpointAt: z.ZodOptional<z.ZodString>;
894
+ lastSignals: z.ZodOptional<z.ZodObject<{
895
+ cycle: z.ZodNumber;
896
+ outcome: z.ZodEnum<{
897
+ accepted: "accepted";
898
+ rejected: "rejected";
899
+ needs_human: "needs_human";
900
+ failed: "failed";
901
+ }>;
902
+ changedFileCount: z.ZodDefault<z.ZodNumber>;
903
+ diffLineCount: z.ZodDefault<z.ZodNumber>;
904
+ repeatedDiff: z.ZodDefault<z.ZodBoolean>;
905
+ verificationDelta: z.ZodOptional<z.ZodNumber>;
906
+ newArtifacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
907
+ meaningfulProgress: z.ZodBoolean;
908
+ insufficientEvidence: z.ZodDefault<z.ZodBoolean>;
909
+ agentTieBreakerUsed: z.ZodDefault<z.ZodBoolean>;
910
+ agentSummary: z.ZodOptional<z.ZodString>;
911
+ reasons: z.ZodDefault<z.ZodArray<z.ZodString>>;
912
+ }, z.core.$strip>>;
913
+ }, z.core.$strip>;
914
+ stopCondition: z.ZodDiscriminatedUnion<[z.ZodObject<{
915
+ type: z.ZodLiteral<"none">;
916
+ }, z.core.$strip>, z.ZodObject<{
917
+ type: z.ZodLiteral<"goal_achieved">;
918
+ summary: z.ZodString;
919
+ achievedAtCycle: z.ZodNumber;
920
+ }, z.core.$strip>, z.ZodObject<{
921
+ type: z.ZodLiteral<"repeated_failures">;
922
+ count: z.ZodNumber;
923
+ threshold: z.ZodNumber;
924
+ }, z.core.$strip>, z.ZodObject<{
925
+ type: z.ZodLiteral<"no_meaningful_progress">;
926
+ count: z.ZodNumber;
927
+ threshold: z.ZodNumber;
928
+ }, z.core.$strip>, z.ZodObject<{
929
+ type: z.ZodLiteral<"insufficient_evidence">;
930
+ count: z.ZodNumber;
931
+ threshold: z.ZodNumber;
932
+ }, z.core.$strip>, z.ZodObject<{
933
+ type: z.ZodLiteral<"operator_stop">;
934
+ note: z.ZodOptional<z.ZodString>;
935
+ }, z.core.$strip>, z.ZodObject<{
936
+ type: z.ZodLiteral<"unrecoverable_error">;
937
+ message: z.ZodString;
938
+ stack: z.ZodOptional<z.ZodString>;
939
+ }, z.core.$strip>], "type">;
940
+ resume: z.ZodObject<{
941
+ resumable: z.ZodDefault<z.ZodBoolean>;
942
+ checkpointType: z.ZodLiteral<"completed_cycle_boundary">;
943
+ resumeFromCycle: z.ZodNumber;
944
+ requiresUserConfirmation: z.ZodDefault<z.ZodBoolean>;
945
+ checkpointRunId: z.ZodOptional<z.ZodString>;
946
+ checkpointDecisionId: z.ZodOptional<z.ZodString>;
947
+ interruptionDetectedAt: z.ZodOptional<z.ZodString>;
948
+ interruptedDuringCycle: z.ZodOptional<z.ZodNumber>;
949
+ note: z.ZodOptional<z.ZodString>;
950
+ }, z.core.$strip>;
951
+ draftState: z.ZodOptional<z.ZodObject<{
952
+ currentStep: z.ZodDefault<z.ZodEnum<{
953
+ outputs: "outputs";
954
+ permissions: "permissions";
955
+ stopRules: "stopRules";
956
+ review: "review";
957
+ }>>;
958
+ completedSteps: z.ZodDefault<z.ZodArray<z.ZodEnum<{
959
+ outputs: "outputs";
960
+ permissions: "permissions";
961
+ stopRules: "stopRules";
962
+ review: "review";
963
+ }>>>;
964
+ returnToReview: z.ZodDefault<z.ZodBoolean>;
965
+ reviewConfirmed: z.ZodDefault<z.ZodBoolean>;
966
+ flowState: z.ZodOptional<z.ZodObject<{
967
+ permissions: z.ZodOptional<z.ZodObject<{
968
+ workingDirectory: z.ZodOptional<z.ZodString>;
969
+ webSearch: z.ZodOptional<z.ZodString>;
970
+ shellCommandAllowlistAdditions: z.ZodOptional<z.ZodString>;
971
+ shellCommandAllowlistRemovals: z.ZodOptional<z.ZodString>;
972
+ approvalPolicy: z.ZodOptional<z.ZodString>;
973
+ sandboxMode: z.ZodOptional<z.ZodString>;
974
+ }, z.core.$strip>>;
975
+ stopRules: z.ZodOptional<z.ZodObject<{
976
+ repeatedFailures: z.ZodOptional<z.ZodString>;
977
+ noMeaningfulProgress: z.ZodOptional<z.ZodString>;
978
+ insufficientEvidence: z.ZodOptional<z.ZodString>;
979
+ }, z.core.$strip>>;
980
+ outputs: z.ZodOptional<z.ZodObject<{
981
+ goal: z.ZodOptional<z.ZodString>;
982
+ trackableGlobs: z.ZodOptional<z.ZodString>;
983
+ baseRef: z.ZodOptional<z.ZodString>;
984
+ agentCommand: z.ZodOptional<z.ZodString>;
985
+ model: z.ZodOptional<z.ZodString>;
986
+ startupTimeoutSec: z.ZodOptional<z.ZodString>;
987
+ turnTimeoutSec: z.ZodOptional<z.ZodString>;
988
+ }, z.core.$strip>>;
989
+ review: z.ZodOptional<z.ZodObject<{
990
+ sections: z.ZodDefault<z.ZodArray<z.ZodObject<{
991
+ index: z.ZodString;
992
+ label: z.ZodString;
993
+ step: z.ZodEnum<{
994
+ outputs: "outputs";
995
+ permissions: "permissions";
996
+ stopRules: "stopRules";
997
+ }>;
998
+ fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
999
+ label: z.ZodString;
1000
+ value: z.ZodString;
1001
+ }, z.core.$strip>>>;
1002
+ }, z.core.$strip>>>;
1003
+ }, z.core.$strip>>;
1004
+ }, z.core.$strip>>;
1005
+ goalStep: z.ZodOptional<z.ZodObject<{
1006
+ goal: z.ZodOptional<z.ZodString>;
1007
+ agentCommand: z.ZodOptional<z.ZodString>;
1008
+ repeatedFailures: z.ZodOptional<z.ZodString>;
1009
+ noMeaningfulProgress: z.ZodOptional<z.ZodString>;
1010
+ insufficientEvidence: z.ZodOptional<z.ZodString>;
1011
+ }, z.core.$strip>>;
1012
+ contextStep: z.ZodOptional<z.ZodObject<{
1013
+ trackableGlobs: z.ZodOptional<z.ZodString>;
1014
+ webSearch: z.ZodOptional<z.ZodString>;
1015
+ shellCommandAllowlistAdditions: z.ZodOptional<z.ZodString>;
1016
+ shellCommandAllowlistRemovals: z.ZodOptional<z.ZodString>;
1017
+ }, z.core.$strip>>;
1018
+ workspaceStep: z.ZodOptional<z.ZodObject<{
1019
+ workingDirectory: z.ZodOptional<z.ZodString>;
1020
+ baseRef: z.ZodOptional<z.ZodString>;
1021
+ allowedGlobs: z.ZodOptional<z.ZodString>;
1022
+ }, z.core.$strip>>;
1023
+ agentStep: z.ZodOptional<z.ZodObject<{
1024
+ command: z.ZodOptional<z.ZodString>;
1025
+ model: z.ZodOptional<z.ZodString>;
1026
+ approvalPolicy: z.ZodOptional<z.ZodString>;
1027
+ sandboxMode: z.ZodOptional<z.ZodString>;
1028
+ startupTimeoutSec: z.ZodOptional<z.ZodString>;
1029
+ turnTimeoutSec: z.ZodOptional<z.ZodString>;
1030
+ }, z.core.$strip>>;
1031
+ }, z.core.$strip>>;
1032
+ createdAt: z.ZodString;
1033
+ updatedAt: z.ZodString;
1034
+ endedAt: z.ZodOptional<z.ZodString>;
1035
+ }, z.core.$strip>>;
1036
+ draftState: z.ZodOptional<z.ZodObject<{
1037
+ currentStep: z.ZodDefault<z.ZodEnum<{
1038
+ outputs: "outputs";
1039
+ permissions: "permissions";
1040
+ stopRules: "stopRules";
1041
+ review: "review";
1042
+ }>>;
1043
+ completedSteps: z.ZodDefault<z.ZodArray<z.ZodEnum<{
1044
+ outputs: "outputs";
1045
+ permissions: "permissions";
1046
+ stopRules: "stopRules";
1047
+ review: "review";
1048
+ }>>>;
1049
+ returnToReview: z.ZodDefault<z.ZodBoolean>;
1050
+ reviewConfirmed: z.ZodDefault<z.ZodBoolean>;
1051
+ flowState: z.ZodOptional<z.ZodObject<{
1052
+ permissions: z.ZodOptional<z.ZodObject<{
1053
+ workingDirectory: z.ZodOptional<z.ZodString>;
1054
+ webSearch: z.ZodOptional<z.ZodString>;
1055
+ shellCommandAllowlistAdditions: z.ZodOptional<z.ZodString>;
1056
+ shellCommandAllowlistRemovals: z.ZodOptional<z.ZodString>;
1057
+ approvalPolicy: z.ZodOptional<z.ZodString>;
1058
+ sandboxMode: z.ZodOptional<z.ZodString>;
1059
+ }, z.core.$strip>>;
1060
+ stopRules: z.ZodOptional<z.ZodObject<{
1061
+ repeatedFailures: z.ZodOptional<z.ZodString>;
1062
+ noMeaningfulProgress: z.ZodOptional<z.ZodString>;
1063
+ insufficientEvidence: z.ZodOptional<z.ZodString>;
1064
+ }, z.core.$strip>>;
1065
+ outputs: z.ZodOptional<z.ZodObject<{
1066
+ goal: z.ZodOptional<z.ZodString>;
1067
+ trackableGlobs: z.ZodOptional<z.ZodString>;
1068
+ baseRef: z.ZodOptional<z.ZodString>;
1069
+ agentCommand: z.ZodOptional<z.ZodString>;
1070
+ model: z.ZodOptional<z.ZodString>;
1071
+ startupTimeoutSec: z.ZodOptional<z.ZodString>;
1072
+ turnTimeoutSec: z.ZodOptional<z.ZodString>;
1073
+ }, z.core.$strip>>;
1074
+ review: z.ZodOptional<z.ZodObject<{
1075
+ sections: z.ZodDefault<z.ZodArray<z.ZodObject<{
1076
+ index: z.ZodString;
1077
+ label: z.ZodString;
1078
+ step: z.ZodEnum<{
1079
+ outputs: "outputs";
1080
+ permissions: "permissions";
1081
+ stopRules: "stopRules";
1082
+ }>;
1083
+ fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
1084
+ label: z.ZodString;
1085
+ value: z.ZodString;
1086
+ }, z.core.$strip>>>;
1087
+ }, z.core.$strip>>>;
1088
+ }, z.core.$strip>>;
1089
+ }, z.core.$strip>>;
1090
+ goalStep: z.ZodOptional<z.ZodObject<{
1091
+ goal: z.ZodOptional<z.ZodString>;
1092
+ agentCommand: z.ZodOptional<z.ZodString>;
1093
+ repeatedFailures: z.ZodOptional<z.ZodString>;
1094
+ noMeaningfulProgress: z.ZodOptional<z.ZodString>;
1095
+ insufficientEvidence: z.ZodOptional<z.ZodString>;
1096
+ }, z.core.$strip>>;
1097
+ contextStep: z.ZodOptional<z.ZodObject<{
1098
+ trackableGlobs: z.ZodOptional<z.ZodString>;
1099
+ webSearch: z.ZodOptional<z.ZodString>;
1100
+ shellCommandAllowlistAdditions: z.ZodOptional<z.ZodString>;
1101
+ shellCommandAllowlistRemovals: z.ZodOptional<z.ZodString>;
1102
+ }, z.core.$strip>>;
1103
+ workspaceStep: z.ZodOptional<z.ZodObject<{
1104
+ workingDirectory: z.ZodOptional<z.ZodString>;
1105
+ baseRef: z.ZodOptional<z.ZodString>;
1106
+ allowedGlobs: z.ZodOptional<z.ZodString>;
1107
+ }, z.core.$strip>>;
1108
+ agentStep: z.ZodOptional<z.ZodObject<{
1109
+ command: z.ZodOptional<z.ZodString>;
1110
+ model: z.ZodOptional<z.ZodString>;
1111
+ approvalPolicy: z.ZodOptional<z.ZodString>;
1112
+ sandboxMode: z.ZodOptional<z.ZodString>;
1113
+ startupTimeoutSec: z.ZodOptional<z.ZodString>;
1114
+ turnTimeoutSec: z.ZodOptional<z.ZodString>;
1115
+ }, z.core.$strip>>;
1116
+ }, z.core.$strip>>;
1117
+ evidenceBundlePath: z.ZodOptional<z.ZodString>;
1118
+ createdAt: z.ZodString;
1119
+ updatedAt: z.ZodString;
1120
+ endedAt: z.ZodOptional<z.ZodString>;
1121
+ }, z.core.$strip>;
1122
+ export type ResearchSessionRecord = z.infer<typeof researchSessionRecordSchema>;
1123
+ export type ResearchSessionAgent = z.infer<typeof researchSessionAgentSchema>;
1124
+ export type ResearchSessionStatus = z.infer<typeof researchSessionStatusSchema>;
1125
+ export type ResumableResearchSessionStatus = (typeof RESUMABLE_RESEARCH_SESSION_STATUSES)[number];
1126
+ export type ResearchSessionWorkspace = z.infer<typeof researchSessionWorkspaceSchema>;
1127
+ export type ResearchSessionStopPolicy = z.infer<typeof researchSessionStopPolicySchema>;
1128
+ export type ResearchSessionCycleOutcome = z.infer<typeof researchSessionCycleOutcomeSchema>;
1129
+ export type ResearchSessionProgress = z.infer<typeof researchSessionProgressSchema>;
1130
+ export type ResearchSessionProgressSignal = z.infer<typeof researchSessionProgressSignalSchema>;
1131
+ export type ResearchSessionStopCondition = z.infer<typeof researchSessionStopConditionSchema>;
1132
+ export type ResearchSessionResume = z.infer<typeof researchSessionResumeSchema>;
1133
+ export type ResearchSessionTuiSelectedCandidateDecision = z.infer<typeof researchSessionTuiSelectedCandidateDecisionSchema>;
1134
+ export type ResearchSessionTuiSelectedCandidateConfirmation = z.infer<typeof researchSessionTuiSelectedCandidateConfirmationSchema>;
1135
+ export type ResearchSessionTuiSelectedCandidateSummary = z.infer<typeof researchSessionTuiSelectedCandidateSummarySchema>;
1136
+ export type ResearchSessionMetadata = z.infer<typeof researchSessionMetadataSchema>;
1137
+ export interface BuildResearchSessionTuiSelectedCandidateSummaryOptions {
1138
+ recovery?: ResearchSessionTuiSelectedCandidateSummary["recovery"];
1139
+ }
1140
+ export declare function isResumableResearchSessionStatus(status: ResearchSessionStatus): status is ResumableResearchSessionStatus;
1141
+ export declare function buildResearchSessionTuiSelectedCandidateSummary(session: ResearchSessionRecord, options?: BuildResearchSessionTuiSelectedCandidateSummaryOptions): ResearchSessionTuiSelectedCandidateSummary;
1142
+ export declare function buildResearchSessionMetadata(session: Pick<ResearchSessionRecord, "sessionId" | "goal" | "workingDirectory" | "status" | "createdAt" | "updatedAt" | "progress" | "resume">): ResearchSessionMetadata;
1143
+ export declare function parsePersistedResearchSessionMetadata(value: unknown): ResearchSessionMetadata;