@roll-agent/runtime 0.26.0 → 1.0.0

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 (89) hide show
  1. package/dist/engine/agent-session.d.ts +14 -5
  2. package/dist/engine/agent-session.js +1 -1
  3. package/dist/engine/cancelled-turn-recovery.d.ts +1 -11
  4. package/dist/engine/capability-manifest.d.ts +3 -3
  5. package/dist/engine/compaction-checkpoint.d.ts +486 -3903
  6. package/dist/engine/compaction-checkpoint.js +1 -1
  7. package/dist/engine/compaction-semantic-state.d.ts +210 -1804
  8. package/dist/engine/conversation-engine.d.ts +26 -42
  9. package/dist/engine/conversation-engine.js +1 -1
  10. package/dist/engine/explicit-skill-context.d.ts +6 -62
  11. package/dist/engine/explicit-skill-context.js +1 -1
  12. package/dist/engine/model-catalog.d.ts +3 -27
  13. package/dist/engine/model-recovery.d.ts +21 -0
  14. package/dist/engine/model-recovery.js +1 -0
  15. package/dist/engine/request-budget.d.ts +9 -50
  16. package/dist/host-contracts/agent-host.d.ts +39 -0
  17. package/dist/host-contracts/agent-host.js +1 -0
  18. package/dist/host-contracts/index.d.ts +7 -0
  19. package/dist/host-contracts/index.js +1 -0
  20. package/dist/host-contracts/runtime-settings.d.ts +68 -0
  21. package/dist/host-contracts/runtime-settings.js +1 -0
  22. package/dist/host-contracts/schedule-tools.d.ts +138 -0
  23. package/dist/host-contracts/schedule-tools.js +1 -0
  24. package/dist/index.d.ts +7 -1
  25. package/dist/index.js +1 -1
  26. package/dist/interaction/user-input-interaction-manager.d.ts +1 -1
  27. package/dist/scheduler/calendar.d.ts +13 -51
  28. package/dist/scheduler/trigger.d.ts +20 -156
  29. package/dist/server/protocol.d.ts +11 -73
  30. package/dist/server/runtime-client-interaction-lifecycle.d.ts +2 -2
  31. package/dist/skills/contracts.d.ts +24 -0
  32. package/dist/skills/contracts.js +1 -0
  33. package/dist/skills/index.d.ts +2 -0
  34. package/dist/skills/index.js +1 -0
  35. package/dist/skills/invocation.d.ts +29 -0
  36. package/dist/skills/invocation.js +1 -0
  37. package/dist/store/semantic-ledger.d.ts +27 -72
  38. package/dist/store/thread-origin.d.ts +8 -100
  39. package/dist/store/thread-store.d.ts +3 -3
  40. package/dist/store/turn-input.d.ts +11 -135
  41. package/dist/store/turn-input.js +1 -1
  42. package/dist/tool-bridge/bash-tool.d.ts +1 -13
  43. package/dist/tool-bridge/build-tools.d.ts +5 -5
  44. package/dist/tool-bridge/build-tools.js +1 -1
  45. package/dist/tool-bridge/file-tools/edit-file-tool.d.ts +2 -24
  46. package/dist/tool-bridge/file-tools/glob-tool.d.ts +1 -7
  47. package/dist/tool-bridge/file-tools/grep-tool.d.ts +1 -15
  48. package/dist/tool-bridge/file-tools/list-dir-tool.d.ts +1 -5
  49. package/dist/tool-bridge/file-tools/read-file-tool.d.ts +1 -9
  50. package/dist/tool-bridge/file-tools/verify-file-tool.d.ts +5 -8
  51. package/dist/tool-bridge/file-tools/write-file-tool.d.ts +1 -7
  52. package/dist/tool-bridge/model-input-schema.d.ts +3 -0
  53. package/dist/tool-bridge/model-input-schema.js +1 -0
  54. package/dist/tool-bridge/naming.d.ts +2 -2
  55. package/dist/tool-bridge/normalize-result.js +1 -1
  56. package/dist/tool-bridge/observation-recall-tool.d.ts +1 -9
  57. package/dist/tool-bridge/schedule-create-input.d.ts +9 -75
  58. package/dist/tool-bridge/schedule-tool.d.ts +1 -1
  59. package/dist/tool-bridge/schedule-tool.js +1 -1
  60. package/dist/tool-bridge/session-exec-tool.d.ts +3 -23
  61. package/dist/tool-bridge/skill-tool.d.ts +2 -8
  62. package/dist/tool-bridge/skill-tool.js +1 -1
  63. package/dist/tool-bridge/tool-approval-continuation.d.ts +1 -1
  64. package/dist/tool-bridge/tool-approval-continuation.js +1 -1
  65. package/dist/tool-bridge/tool-execution-coordinator.d.ts +3 -26
  66. package/dist/tool-bridge/tool-execution-coordinator.js +1 -1
  67. package/dist/tool-bridge/transcript-tool.d.ts +7 -35
  68. package/dist/tool-bridge/user-input-tool.js +1 -1
  69. package/dist/tool-contracts/agent-types.d.ts +32 -0
  70. package/dist/tool-contracts/agent-types.js +1 -0
  71. package/dist/tool-contracts/execution-timeout.d.ts +2 -0
  72. package/dist/tool-contracts/execution-timeout.js +1 -0
  73. package/dist/tool-contracts/index.d.ts +8 -0
  74. package/dist/tool-contracts/index.js +1 -0
  75. package/dist/tool-contracts/issues.d.ts +22 -0
  76. package/dist/tool-contracts/issues.js +1 -0
  77. package/dist/tool-contracts/json-schema-refs.d.ts +19 -0
  78. package/dist/tool-contracts/json-schema-refs.js +1 -0
  79. package/dist/tool-contracts/preflight.d.ts +16 -0
  80. package/dist/tool-contracts/preflight.js +1 -0
  81. package/dist/tool-contracts/resource-hints.d.ts +26 -0
  82. package/dist/tool-contracts/resource-hints.js +1 -0
  83. package/dist/tool-contracts/results.d.ts +7 -0
  84. package/dist/tool-contracts/results.js +1 -0
  85. package/dist/tool-contracts/schema.d.ts +13 -0
  86. package/dist/tool-contracts/schema.js +1 -0
  87. package/dist/types/cancellation.d.ts +6 -10
  88. package/dist/types/events.d.ts +7 -0
  89. package/package.json +18 -7
@@ -18,47 +18,30 @@ export declare const COMPACTION_SESSION_RECOVERABILITY: readonly ["live", "stale
18
18
  export declare const COMPACTION_TOOL_INTEGRITY_STATUSES: readonly ["valid", "sanitized", "invalid"];
19
19
  export declare const COMPACTION_TOOL_ANOMALY_KINDS: readonly ["orphan_result", "dangling_call", "duplicate_call", "duplicate_result", "record_without_call", "record_without_result", "result_without_record"];
20
20
  export declare const TRANSCRIPT_MESSAGE_PROVENANCES: readonly ["native", "legacy_snapshot"];
21
- export declare const compactionCheckpointIdSchema: z.ZodBranded<z.ZodString, "CompactionCheckpointId">;
21
+ export declare const compactionCheckpointIdSchema: z.core.$ZodBranded<z.ZodString, "CompactionCheckpointId", "out">;
22
22
  export type CompactionCheckpointId = z.infer<typeof compactionCheckpointIdSchema>;
23
23
  declare const compactionGoalSchema: z.ZodReadonly<z.ZodObject<{
24
24
  verbatimRequest: z.ZodString;
25
25
  sourceSequence: z.ZodNumber;
26
- status: z.ZodEnum<["active", "interrupted", "unknown"]>;
27
- }, "strict", z.ZodTypeAny, {
28
- status: "unknown" | "active" | "interrupted";
29
- verbatimRequest: string;
30
- sourceSequence: number;
31
- }, {
32
- status: "unknown" | "active" | "interrupted";
33
- verbatimRequest: string;
34
- sourceSequence: number;
35
- }>>;
26
+ status: z.ZodEnum<{
27
+ unknown: "unknown";
28
+ active: "active";
29
+ interrupted: "interrupted";
30
+ }>;
31
+ }, z.core.$strict>>;
36
32
  declare const compactionConstraintSchema: z.ZodReadonly<z.ZodObject<{
37
33
  quote: z.ZodString;
38
34
  sourceSequence: z.ZodNumber;
39
- }, "strict", z.ZodTypeAny, {
40
- sourceSequence: number;
41
- quote: string;
42
- }, {
43
- sourceSequence: number;
44
- quote: string;
45
- }>>;
35
+ }, z.core.$strict>>;
46
36
  declare const compactionResourceSchema: z.ZodReadonly<z.ZodObject<{
47
37
  key: z.ZodString;
48
- mode: z.ZodEnum<["read", "write"]>;
38
+ mode: z.ZodEnum<{
39
+ read: "read";
40
+ write: "write";
41
+ }>;
49
42
  evidenceToolCallId: z.ZodString;
50
43
  evidenceExecutionId: z.ZodString;
51
- }, "strict", z.ZodTypeAny, {
52
- key: string;
53
- mode: "read" | "write";
54
- evidenceToolCallId: string;
55
- evidenceExecutionId: string;
56
- }, {
57
- key: string;
58
- mode: "read" | "write";
59
- evidenceToolCallId: string;
60
- evidenceExecutionId: string;
61
- }>>;
44
+ }, z.core.$strict>>;
62
45
  declare const compactionToolStateSchema: z.ZodReadonly<z.ZodObject<{
63
46
  countsByOutcome: z.ZodReadonly<z.ZodObject<{
64
47
  success: z.ZodNumber;
@@ -67,145 +50,63 @@ declare const compactionToolStateSchema: z.ZodReadonly<z.ZodObject<{
67
50
  invalid_input: z.ZodNumber;
68
51
  cancelled: z.ZodNumber;
69
52
  tool_failed: z.ZodNumber;
70
- }, "strict", z.ZodTypeAny, {
71
- success: number;
72
- cancelled: number;
73
- invalid_input: number;
74
- user_rejected: number;
75
- policy_denied: number;
76
- tool_failed: number;
77
- }, {
78
- success: number;
79
- cancelled: number;
80
- invalid_input: number;
81
- user_rejected: number;
82
- policy_denied: number;
83
- tool_failed: number;
84
- }>>;
53
+ }, z.core.$strict>>;
85
54
  recentRecords: z.ZodArray<z.ZodReadonly<z.ZodObject<{
86
55
  executionId: z.ZodString;
87
56
  sequence: z.ZodNumber;
88
57
  toolCallId: z.ZodString;
89
58
  agentName: z.ZodString;
90
59
  toolName: z.ZodString;
91
- outcome: z.ZodReadonly<z.ZodEffects<z.ZodObject<{
92
- kind: z.ZodEnum<["success", "user_rejected", "policy_denied", "invalid_input", "cancelled", "tool_failed"]>;
60
+ outcome: z.ZodReadonly<z.ZodObject<{
61
+ kind: z.ZodEnum<{
62
+ success: "success";
63
+ user_rejected: "user_rejected";
64
+ policy_denied: "policy_denied";
65
+ invalid_input: "invalid_input";
66
+ cancelled: "cancelled";
67
+ tool_failed: "tool_failed";
68
+ }>;
93
69
  reason: z.ZodOptional<z.ZodString>;
94
- executionState: z.ZodOptional<z.ZodEnum<["not_executed", "outcome_unknown"]>>;
95
- }, "strict", z.ZodTypeAny, {
96
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
97
- reason?: string | undefined;
98
- executionState?: "not_executed" | "outcome_unknown" | undefined;
99
- }, {
100
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
101
- reason?: string | undefined;
102
- executionState?: "not_executed" | "outcome_unknown" | undefined;
103
- }>, {
104
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
105
- reason?: string | undefined;
106
- executionState?: "not_executed" | "outcome_unknown" | undefined;
107
- }, {
108
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
109
- reason?: string | undefined;
110
- executionState?: "not_executed" | "outcome_unknown" | undefined;
111
- }>>;
112
- }, "strict", z.ZodTypeAny, {
113
- toolCallId: string;
114
- toolName: string;
115
- agentName: string;
116
- outcome: Readonly<{
117
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
118
- reason?: string | undefined;
119
- executionState?: "not_executed" | "outcome_unknown" | undefined;
120
- }>;
121
- sequence: number;
122
- executionId: string;
123
- }, {
124
- toolCallId: string;
125
- toolName: string;
126
- agentName: string;
127
- outcome: Readonly<{
128
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
129
- reason?: string | undefined;
130
- executionState?: "not_executed" | "outcome_unknown" | undefined;
131
- }>;
132
- sequence: number;
133
- executionId: string;
134
- }>>, "many">;
135
- integrityStatus: z.ZodEnum<["valid", "sanitized", "invalid"]>;
70
+ executionState: z.ZodOptional<z.ZodEnum<{
71
+ not_executed: "not_executed";
72
+ outcome_unknown: "outcome_unknown";
73
+ }>>;
74
+ }, z.core.$strict>>;
75
+ }, z.core.$strict>>>;
76
+ integrityStatus: z.ZodEnum<{
77
+ invalid: "invalid";
78
+ valid: "valid";
79
+ sanitized: "sanitized";
80
+ }>;
136
81
  anomalies: z.ZodArray<z.ZodReadonly<z.ZodObject<{
137
- kind: z.ZodEnum<["orphan_result", "dangling_call", "duplicate_call", "duplicate_result", "record_without_call", "record_without_result", "result_without_record"]>;
82
+ kind: z.ZodEnum<{
83
+ orphan_result: "orphan_result";
84
+ dangling_call: "dangling_call";
85
+ duplicate_call: "duplicate_call";
86
+ duplicate_result: "duplicate_result";
87
+ record_without_call: "record_without_call";
88
+ record_without_result: "record_without_result";
89
+ result_without_record: "result_without_record";
90
+ }>;
138
91
  toolCallId: z.ZodString;
139
92
  count: z.ZodOptional<z.ZodNumber>;
140
- }, "strict", z.ZodTypeAny, {
141
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
142
- toolCallId: string;
143
- count?: number | undefined;
144
- }, {
145
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
146
- toolCallId: string;
147
- count?: number | undefined;
148
- }>>, "many">;
149
- }, "strict", z.ZodTypeAny, {
150
- countsByOutcome: Readonly<{
151
- success: number;
152
- cancelled: number;
153
- invalid_input: number;
154
- user_rejected: number;
155
- policy_denied: number;
156
- tool_failed: number;
157
- }>;
158
- recentRecords: Readonly<{
159
- toolCallId: string;
160
- toolName: string;
161
- agentName: string;
162
- outcome: Readonly<{
163
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
164
- reason?: string | undefined;
165
- executionState?: "not_executed" | "outcome_unknown" | undefined;
166
- }>;
167
- sequence: number;
168
- executionId: string;
169
- }>[];
170
- integrityStatus: "invalid" | "valid" | "sanitized";
171
- anomalies: Readonly<{
172
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
173
- toolCallId: string;
174
- count?: number | undefined;
175
- }>[];
176
- }, {
177
- countsByOutcome: Readonly<{
178
- success: number;
179
- cancelled: number;
180
- invalid_input: number;
181
- user_rejected: number;
182
- policy_denied: number;
183
- tool_failed: number;
184
- }>;
185
- recentRecords: Readonly<{
186
- toolCallId: string;
187
- toolName: string;
188
- agentName: string;
189
- outcome: Readonly<{
190
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
191
- reason?: string | undefined;
192
- executionState?: "not_executed" | "outcome_unknown" | undefined;
193
- }>;
194
- sequence: number;
195
- executionId: string;
196
- }>[];
197
- integrityStatus: "invalid" | "valid" | "sanitized";
198
- anomalies: Readonly<{
199
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
200
- toolCallId: string;
201
- count?: number | undefined;
202
- }>[];
203
- }>>;
93
+ }, z.core.$strict>>>;
94
+ }, z.core.$strict>>;
204
95
  declare const compactionRunningWorkSchema: z.ZodReadonly<z.ZodObject<{
205
96
  managerInstanceId: z.ZodString;
206
97
  sessionId: z.ZodNumber;
207
- state: z.ZodEnum<["running", "draining", "stopping", "completed", "cleanup-failed"]>;
208
- recoverability: z.ZodEnum<["live", "stale", "unavailable"]>;
98
+ state: z.ZodEnum<{
99
+ completed: "completed";
100
+ running: "running";
101
+ draining: "draining";
102
+ stopping: "stopping";
103
+ "cleanup-failed": "cleanup-failed";
104
+ }>;
105
+ recoverability: z.ZodEnum<{
106
+ unavailable: "unavailable";
107
+ live: "live";
108
+ stale: "stale";
109
+ }>;
209
110
  commandPreview: z.ZodString;
210
111
  workdir: z.ZodString;
211
112
  observedAt: z.ZodString;
@@ -213,217 +114,78 @@ declare const compactionRunningWorkSchema: z.ZodReadonly<z.ZodObject<{
213
114
  exitCode: z.ZodOptional<z.ZodNumber>;
214
115
  terminationCause: z.ZodOptional<z.ZodString>;
215
116
  cleanupError: z.ZodOptional<z.ZodString>;
216
- }, "strict", z.ZodTypeAny, {
217
- sessionId: number;
218
- state: "completed" | "cleanup-failed" | "running" | "draining" | "stopping";
219
- managerInstanceId: string;
220
- workdir: string;
221
- recoverability: "unavailable" | "live" | "stale";
222
- commandPreview: string;
223
- observedAt: string;
224
- exitCode?: number | undefined;
225
- terminationCause?: string | undefined;
226
- wallTimeMs?: number | undefined;
227
- cleanupError?: string | undefined;
228
- }, {
229
- sessionId: number;
230
- state: "completed" | "cleanup-failed" | "running" | "draining" | "stopping";
231
- managerInstanceId: string;
232
- workdir: string;
233
- recoverability: "unavailable" | "live" | "stale";
234
- commandPreview: string;
235
- observedAt: string;
236
- exitCode?: number | undefined;
237
- terminationCause?: string | undefined;
238
- wallTimeMs?: number | undefined;
239
- cleanupError?: string | undefined;
240
- }>>;
117
+ }, z.core.$strict>>;
241
118
  declare const compactionContextSchema: z.ZodReadonly<z.ZodObject<{
242
119
  cwd: z.ZodString;
243
- stableRuleIds: z.ZodArray<z.ZodString, "many">;
120
+ stableRuleIds: z.ZodArray<z.ZodString>;
244
121
  systemPromptSha256: z.ZodOptional<z.ZodString>;
245
122
  skills: z.ZodArray<z.ZodReadonly<z.ZodObject<{
246
123
  name: z.ZodString;
247
- source: z.ZodEnum<["agent", "project", "user", "config"]>;
248
- }, "strict", z.ZodTypeAny, {
249
- name: string;
250
- source: "config" | "user" | "agent" | "project";
251
- }, {
252
- name: string;
253
- source: "config" | "user" | "agent" | "project";
254
- }>>, "many">;
255
- explicitSkillNames: z.ZodArray<z.ZodString, "many">;
256
- }, "strict", z.ZodTypeAny, {
257
- cwd: string;
258
- skills: Readonly<{
259
- name: string;
260
- source: "config" | "user" | "agent" | "project";
261
- }>[];
262
- stableRuleIds: string[];
263
- explicitSkillNames: string[];
264
- systemPromptSha256?: string | undefined;
265
- }, {
266
- cwd: string;
267
- skills: Readonly<{
268
- name: string;
269
- source: "config" | "user" | "agent" | "project";
270
- }>[];
271
- stableRuleIds: string[];
272
- explicitSkillNames: string[];
273
- systemPromptSha256?: string | undefined;
274
- }>>;
275
- export declare const compactionTranscriptRangeSchema: z.ZodEffects<z.ZodObject<{
124
+ source: z.ZodEnum<{
125
+ agent: "agent";
126
+ project: "project";
127
+ user: "user";
128
+ config: "config";
129
+ }>;
130
+ }, z.core.$strict>>>;
131
+ explicitSkillNames: z.ZodArray<z.ZodString>;
132
+ }, z.core.$strict>>;
133
+ export declare const compactionTranscriptRangeSchema: z.ZodObject<{
276
134
  fromSequenceExclusive: z.ZodNumber;
277
135
  throughSequence: z.ZodNumber;
278
- }, "strict", z.ZodTypeAny, {
279
- fromSequenceExclusive: number;
280
- throughSequence: number;
281
- }, {
282
- fromSequenceExclusive: number;
283
- throughSequence: number;
284
- }>, {
285
- fromSequenceExclusive: number;
286
- throughSequence: number;
287
- }, {
288
- fromSequenceExclusive: number;
289
- throughSequence: number;
290
- }>;
136
+ }, z.core.$strict>;
291
137
  declare const compactionTranscriptSchema: z.ZodReadonly<z.ZodObject<{
292
- messages: z.ZodEffects<z.ZodObject<{
138
+ messages: z.ZodObject<{
293
139
  fromSequenceExclusive: z.ZodNumber;
294
140
  throughSequence: z.ZodNumber;
295
- }, "strict", z.ZodTypeAny, {
296
- fromSequenceExclusive: number;
297
- throughSequence: number;
298
- }, {
299
- fromSequenceExclusive: number;
300
- throughSequence: number;
301
- }>, {
302
- fromSequenceExclusive: number;
303
- throughSequence: number;
304
- }, {
305
- fromSequenceExclusive: number;
306
- throughSequence: number;
307
- }>;
308
- toolExecutions: z.ZodEffects<z.ZodObject<{
141
+ }, z.core.$strict>;
142
+ toolExecutions: z.ZodObject<{
309
143
  fromSequenceExclusive: z.ZodNumber;
310
144
  throughSequence: z.ZodNumber;
311
- }, "strict", z.ZodTypeAny, {
312
- fromSequenceExclusive: number;
313
- throughSequence: number;
314
- }, {
315
- fromSequenceExclusive: number;
316
- throughSequence: number;
317
- }>, {
318
- fromSequenceExclusive: number;
319
- throughSequence: number;
320
- }, {
321
- fromSequenceExclusive: number;
322
- throughSequence: number;
145
+ }, z.core.$strict>;
146
+ completeness: z.ZodEnum<{
147
+ complete: "complete";
148
+ legacy_snapshot: "legacy_snapshot";
323
149
  }>;
324
- completeness: z.ZodEnum<["complete", "legacy_snapshot"]>;
325
- }, "strict", z.ZodTypeAny, {
326
- messages: {
327
- fromSequenceExclusive: number;
328
- throughSequence: number;
329
- };
330
- toolExecutions: {
331
- fromSequenceExclusive: number;
332
- throughSequence: number;
333
- };
334
- completeness: "complete" | "legacy_snapshot";
335
- }, {
336
- messages: {
337
- fromSequenceExclusive: number;
338
- throughSequence: number;
339
- };
340
- toolExecutions: {
341
- fromSequenceExclusive: number;
342
- throughSequence: number;
343
- };
344
- completeness: "complete" | "legacy_snapshot";
345
- }>>;
150
+ }, z.core.$strict>>;
346
151
  export declare const compactionSemanticEvidenceWatermarksSchema: z.ZodReadonly<z.ZodObject<{
347
152
  messagesThroughSequence: z.ZodNumber;
348
153
  toolExecutionsThroughSequence: z.ZodNumber;
349
- }, "strict", z.ZodTypeAny, {
350
- messagesThroughSequence: number;
351
- toolExecutionsThroughSequence: number;
352
- }, {
353
- messagesThroughSequence: number;
354
- toolExecutionsThroughSequence: number;
355
- }>>;
356
- declare const compactionSummarySchema: z.ZodReadonly<z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
154
+ }, z.core.$strict>>;
155
+ declare const compactionSummarySchema: z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodObject<{
357
156
  status: z.ZodLiteral<"valid">;
358
157
  digest: z.ZodString;
359
- }, "strict", z.ZodTypeAny, {
360
- status: "valid";
361
- digest: string;
362
- }, {
363
- status: "valid";
364
- digest: string;
365
- }>, z.ZodObject<{
158
+ }, z.core.$strict>, z.ZodObject<{
366
159
  status: z.ZodLiteral<"fallback">;
367
160
  reason: z.ZodString;
368
- lastValidCheckpointId: z.ZodOptional<z.ZodBranded<z.ZodString, "CompactionCheckpointId">>;
369
- }, "strict", z.ZodTypeAny, {
370
- status: "fallback";
371
- reason: string;
372
- lastValidCheckpointId?: (string & z.BRAND<"CompactionCheckpointId">) | undefined;
373
- }, {
374
- status: "fallback";
375
- reason: string;
376
- lastValidCheckpointId?: string | undefined;
377
- }>, z.ZodObject<{
161
+ lastValidCheckpointId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "CompactionCheckpointId", "out">>;
162
+ }, z.core.$strict>, z.ZodObject<{
378
163
  status: z.ZodLiteral<"skipped">;
379
- lastValidCheckpointId: z.ZodOptional<z.ZodBranded<z.ZodString, "CompactionCheckpointId">>;
380
- }, "strict", z.ZodTypeAny, {
381
- status: "skipped";
382
- lastValidCheckpointId?: (string & z.BRAND<"CompactionCheckpointId">) | undefined;
383
- }, {
384
- status: "skipped";
385
- lastValidCheckpointId?: string | undefined;
386
- }>]>>;
164
+ lastValidCheckpointId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "CompactionCheckpointId", "out">>;
165
+ }, z.core.$strict>], "status">>;
387
166
  export declare const compactionCheckpointDraftSchema: z.ZodReadonly<z.ZodObject<{
388
167
  goal: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
389
168
  verbatimRequest: z.ZodString;
390
169
  sourceSequence: z.ZodNumber;
391
- status: z.ZodEnum<["active", "interrupted", "unknown"]>;
392
- }, "strict", z.ZodTypeAny, {
393
- status: "unknown" | "active" | "interrupted";
394
- verbatimRequest: string;
395
- sourceSequence: number;
396
- }, {
397
- status: "unknown" | "active" | "interrupted";
398
- verbatimRequest: string;
399
- sourceSequence: number;
400
- }>>>;
170
+ status: z.ZodEnum<{
171
+ unknown: "unknown";
172
+ active: "active";
173
+ interrupted: "interrupted";
174
+ }>;
175
+ }, z.core.$strict>>>;
401
176
  constraints: z.ZodArray<z.ZodReadonly<z.ZodObject<{
402
177
  quote: z.ZodString;
403
178
  sourceSequence: z.ZodNumber;
404
- }, "strict", z.ZodTypeAny, {
405
- sourceSequence: number;
406
- quote: string;
407
- }, {
408
- sourceSequence: number;
409
- quote: string;
410
- }>>, "many">;
179
+ }, z.core.$strict>>>;
411
180
  resources: z.ZodArray<z.ZodReadonly<z.ZodObject<{
412
181
  key: z.ZodString;
413
- mode: z.ZodEnum<["read", "write"]>;
182
+ mode: z.ZodEnum<{
183
+ read: "read";
184
+ write: "write";
185
+ }>;
414
186
  evidenceToolCallId: z.ZodString;
415
187
  evidenceExecutionId: z.ZodString;
416
- }, "strict", z.ZodTypeAny, {
417
- key: string;
418
- mode: "read" | "write";
419
- evidenceToolCallId: string;
420
- evidenceExecutionId: string;
421
- }, {
422
- key: string;
423
- mode: "read" | "write";
424
- evidenceToolCallId: string;
425
- evidenceExecutionId: string;
426
- }>>, "many">;
188
+ }, z.core.$strict>>>;
427
189
  toolState: z.ZodReadonly<z.ZodObject<{
428
190
  countsByOutcome: z.ZodReadonly<z.ZodObject<{
429
191
  success: z.ZodNumber;
@@ -432,145 +194,63 @@ export declare const compactionCheckpointDraftSchema: z.ZodReadonly<z.ZodObject<
432
194
  invalid_input: z.ZodNumber;
433
195
  cancelled: z.ZodNumber;
434
196
  tool_failed: z.ZodNumber;
435
- }, "strict", z.ZodTypeAny, {
436
- success: number;
437
- cancelled: number;
438
- invalid_input: number;
439
- user_rejected: number;
440
- policy_denied: number;
441
- tool_failed: number;
442
- }, {
443
- success: number;
444
- cancelled: number;
445
- invalid_input: number;
446
- user_rejected: number;
447
- policy_denied: number;
448
- tool_failed: number;
449
- }>>;
197
+ }, z.core.$strict>>;
450
198
  recentRecords: z.ZodArray<z.ZodReadonly<z.ZodObject<{
451
199
  executionId: z.ZodString;
452
200
  sequence: z.ZodNumber;
453
201
  toolCallId: z.ZodString;
454
202
  agentName: z.ZodString;
455
203
  toolName: z.ZodString;
456
- outcome: z.ZodReadonly<z.ZodEffects<z.ZodObject<{
457
- kind: z.ZodEnum<["success", "user_rejected", "policy_denied", "invalid_input", "cancelled", "tool_failed"]>;
204
+ outcome: z.ZodReadonly<z.ZodObject<{
205
+ kind: z.ZodEnum<{
206
+ success: "success";
207
+ user_rejected: "user_rejected";
208
+ policy_denied: "policy_denied";
209
+ invalid_input: "invalid_input";
210
+ cancelled: "cancelled";
211
+ tool_failed: "tool_failed";
212
+ }>;
458
213
  reason: z.ZodOptional<z.ZodString>;
459
- executionState: z.ZodOptional<z.ZodEnum<["not_executed", "outcome_unknown"]>>;
460
- }, "strict", z.ZodTypeAny, {
461
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
462
- reason?: string | undefined;
463
- executionState?: "not_executed" | "outcome_unknown" | undefined;
464
- }, {
465
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
466
- reason?: string | undefined;
467
- executionState?: "not_executed" | "outcome_unknown" | undefined;
468
- }>, {
469
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
470
- reason?: string | undefined;
471
- executionState?: "not_executed" | "outcome_unknown" | undefined;
472
- }, {
473
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
474
- reason?: string | undefined;
475
- executionState?: "not_executed" | "outcome_unknown" | undefined;
476
- }>>;
477
- }, "strict", z.ZodTypeAny, {
478
- toolCallId: string;
479
- toolName: string;
480
- agentName: string;
481
- outcome: Readonly<{
482
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
483
- reason?: string | undefined;
484
- executionState?: "not_executed" | "outcome_unknown" | undefined;
485
- }>;
486
- sequence: number;
487
- executionId: string;
488
- }, {
489
- toolCallId: string;
490
- toolName: string;
491
- agentName: string;
492
- outcome: Readonly<{
493
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
494
- reason?: string | undefined;
495
- executionState?: "not_executed" | "outcome_unknown" | undefined;
496
- }>;
497
- sequence: number;
498
- executionId: string;
499
- }>>, "many">;
500
- integrityStatus: z.ZodEnum<["valid", "sanitized", "invalid"]>;
214
+ executionState: z.ZodOptional<z.ZodEnum<{
215
+ not_executed: "not_executed";
216
+ outcome_unknown: "outcome_unknown";
217
+ }>>;
218
+ }, z.core.$strict>>;
219
+ }, z.core.$strict>>>;
220
+ integrityStatus: z.ZodEnum<{
221
+ invalid: "invalid";
222
+ valid: "valid";
223
+ sanitized: "sanitized";
224
+ }>;
501
225
  anomalies: z.ZodArray<z.ZodReadonly<z.ZodObject<{
502
- kind: z.ZodEnum<["orphan_result", "dangling_call", "duplicate_call", "duplicate_result", "record_without_call", "record_without_result", "result_without_record"]>;
226
+ kind: z.ZodEnum<{
227
+ orphan_result: "orphan_result";
228
+ dangling_call: "dangling_call";
229
+ duplicate_call: "duplicate_call";
230
+ duplicate_result: "duplicate_result";
231
+ record_without_call: "record_without_call";
232
+ record_without_result: "record_without_result";
233
+ result_without_record: "result_without_record";
234
+ }>;
503
235
  toolCallId: z.ZodString;
504
236
  count: z.ZodOptional<z.ZodNumber>;
505
- }, "strict", z.ZodTypeAny, {
506
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
507
- toolCallId: string;
508
- count?: number | undefined;
509
- }, {
510
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
511
- toolCallId: string;
512
- count?: number | undefined;
513
- }>>, "many">;
514
- }, "strict", z.ZodTypeAny, {
515
- countsByOutcome: Readonly<{
516
- success: number;
517
- cancelled: number;
518
- invalid_input: number;
519
- user_rejected: number;
520
- policy_denied: number;
521
- tool_failed: number;
522
- }>;
523
- recentRecords: Readonly<{
524
- toolCallId: string;
525
- toolName: string;
526
- agentName: string;
527
- outcome: Readonly<{
528
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
529
- reason?: string | undefined;
530
- executionState?: "not_executed" | "outcome_unknown" | undefined;
531
- }>;
532
- sequence: number;
533
- executionId: string;
534
- }>[];
535
- integrityStatus: "invalid" | "valid" | "sanitized";
536
- anomalies: Readonly<{
537
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
538
- toolCallId: string;
539
- count?: number | undefined;
540
- }>[];
541
- }, {
542
- countsByOutcome: Readonly<{
543
- success: number;
544
- cancelled: number;
545
- invalid_input: number;
546
- user_rejected: number;
547
- policy_denied: number;
548
- tool_failed: number;
549
- }>;
550
- recentRecords: Readonly<{
551
- toolCallId: string;
552
- toolName: string;
553
- agentName: string;
554
- outcome: Readonly<{
555
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
556
- reason?: string | undefined;
557
- executionState?: "not_executed" | "outcome_unknown" | undefined;
558
- }>;
559
- sequence: number;
560
- executionId: string;
561
- }>[];
562
- integrityStatus: "invalid" | "valid" | "sanitized";
563
- anomalies: Readonly<{
564
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
565
- toolCallId: string;
566
- count?: number | undefined;
567
- }>[];
568
- }>>;
237
+ }, z.core.$strict>>>;
238
+ }, z.core.$strict>>;
569
239
  runningWork: z.ZodArray<z.ZodReadonly<z.ZodObject<{
570
240
  managerInstanceId: z.ZodString;
571
241
  sessionId: z.ZodNumber;
572
- state: z.ZodEnum<["running", "draining", "stopping", "completed", "cleanup-failed"]>;
573
- recoverability: z.ZodEnum<["live", "stale", "unavailable"]>;
242
+ state: z.ZodEnum<{
243
+ completed: "completed";
244
+ running: "running";
245
+ draining: "draining";
246
+ stopping: "stopping";
247
+ "cleanup-failed": "cleanup-failed";
248
+ }>;
249
+ recoverability: z.ZodEnum<{
250
+ unavailable: "unavailable";
251
+ live: "live";
252
+ stale: "stale";
253
+ }>;
574
254
  commandPreview: z.ZodString;
575
255
  workdir: z.ZodString;
576
256
  observedAt: z.ZodString;
@@ -578,353 +258,76 @@ export declare const compactionCheckpointDraftSchema: z.ZodReadonly<z.ZodObject<
578
258
  exitCode: z.ZodOptional<z.ZodNumber>;
579
259
  terminationCause: z.ZodOptional<z.ZodString>;
580
260
  cleanupError: z.ZodOptional<z.ZodString>;
581
- }, "strict", z.ZodTypeAny, {
582
- sessionId: number;
583
- state: "completed" | "cleanup-failed" | "running" | "draining" | "stopping";
584
- managerInstanceId: string;
585
- workdir: string;
586
- recoverability: "unavailable" | "live" | "stale";
587
- commandPreview: string;
588
- observedAt: string;
589
- exitCode?: number | undefined;
590
- terminationCause?: string | undefined;
591
- wallTimeMs?: number | undefined;
592
- cleanupError?: string | undefined;
593
- }, {
594
- sessionId: number;
595
- state: "completed" | "cleanup-failed" | "running" | "draining" | "stopping";
596
- managerInstanceId: string;
597
- workdir: string;
598
- recoverability: "unavailable" | "live" | "stale";
599
- commandPreview: string;
600
- observedAt: string;
601
- exitCode?: number | undefined;
602
- terminationCause?: string | undefined;
603
- wallTimeMs?: number | undefined;
604
- cleanupError?: string | undefined;
605
- }>>, "many">;
261
+ }, z.core.$strict>>>;
606
262
  context: z.ZodReadonly<z.ZodObject<{
607
263
  cwd: z.ZodString;
608
- stableRuleIds: z.ZodArray<z.ZodString, "many">;
264
+ stableRuleIds: z.ZodArray<z.ZodString>;
609
265
  systemPromptSha256: z.ZodOptional<z.ZodString>;
610
266
  skills: z.ZodArray<z.ZodReadonly<z.ZodObject<{
611
267
  name: z.ZodString;
612
- source: z.ZodEnum<["agent", "project", "user", "config"]>;
613
- }, "strict", z.ZodTypeAny, {
614
- name: string;
615
- source: "config" | "user" | "agent" | "project";
616
- }, {
617
- name: string;
618
- source: "config" | "user" | "agent" | "project";
619
- }>>, "many">;
620
- explicitSkillNames: z.ZodArray<z.ZodString, "many">;
621
- }, "strict", z.ZodTypeAny, {
622
- cwd: string;
623
- skills: Readonly<{
624
- name: string;
625
- source: "config" | "user" | "agent" | "project";
626
- }>[];
627
- stableRuleIds: string[];
628
- explicitSkillNames: string[];
629
- systemPromptSha256?: string | undefined;
630
- }, {
631
- cwd: string;
632
- skills: Readonly<{
633
- name: string;
634
- source: "config" | "user" | "agent" | "project";
635
- }>[];
636
- stableRuleIds: string[];
637
- explicitSkillNames: string[];
638
- systemPromptSha256?: string | undefined;
639
- }>>;
640
- summary: z.ZodReadonly<z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
268
+ source: z.ZodEnum<{
269
+ agent: "agent";
270
+ project: "project";
271
+ user: "user";
272
+ config: "config";
273
+ }>;
274
+ }, z.core.$strict>>>;
275
+ explicitSkillNames: z.ZodArray<z.ZodString>;
276
+ }, z.core.$strict>>;
277
+ summary: z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodObject<{
641
278
  status: z.ZodLiteral<"valid">;
642
279
  digest: z.ZodString;
643
- }, "strict", z.ZodTypeAny, {
644
- status: "valid";
645
- digest: string;
646
- }, {
647
- status: "valid";
648
- digest: string;
649
- }>, z.ZodObject<{
280
+ }, z.core.$strict>, z.ZodObject<{
650
281
  status: z.ZodLiteral<"fallback">;
651
282
  reason: z.ZodString;
652
- lastValidCheckpointId: z.ZodOptional<z.ZodBranded<z.ZodString, "CompactionCheckpointId">>;
653
- }, "strict", z.ZodTypeAny, {
654
- status: "fallback";
655
- reason: string;
656
- lastValidCheckpointId?: (string & z.BRAND<"CompactionCheckpointId">) | undefined;
657
- }, {
658
- status: "fallback";
659
- reason: string;
660
- lastValidCheckpointId?: string | undefined;
661
- }>, z.ZodObject<{
283
+ lastValidCheckpointId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "CompactionCheckpointId", "out">>;
284
+ }, z.core.$strict>, z.ZodObject<{
662
285
  status: z.ZodLiteral<"skipped">;
663
- lastValidCheckpointId: z.ZodOptional<z.ZodBranded<z.ZodString, "CompactionCheckpointId">>;
664
- }, "strict", z.ZodTypeAny, {
665
- status: "skipped";
666
- lastValidCheckpointId?: (string & z.BRAND<"CompactionCheckpointId">) | undefined;
667
- }, {
668
- status: "skipped";
669
- lastValidCheckpointId?: string | undefined;
670
- }>]>>;
671
- }, "strict", z.ZodTypeAny, {
672
- context: Readonly<{
673
- cwd: string;
674
- skills: Readonly<{
675
- name: string;
676
- source: "config" | "user" | "agent" | "project";
677
- }>[];
678
- stableRuleIds: string[];
679
- explicitSkillNames: string[];
680
- systemPromptSha256?: string | undefined;
681
- }>;
682
- resources: Readonly<{
683
- key: string;
684
- mode: "read" | "write";
685
- evidenceToolCallId: string;
686
- evidenceExecutionId: string;
687
- }>[];
688
- summary: Readonly<{
689
- status: "valid";
690
- digest: string;
691
- }> | Readonly<{
692
- status: "fallback";
693
- reason: string;
694
- lastValidCheckpointId?: (string & z.BRAND<"CompactionCheckpointId">) | undefined;
695
- }> | Readonly<{
696
- status: "skipped";
697
- lastValidCheckpointId?: (string & z.BRAND<"CompactionCheckpointId">) | undefined;
698
- }>;
699
- constraints: Readonly<{
700
- sourceSequence: number;
701
- quote: string;
702
- }>[];
703
- toolState: Readonly<{
704
- countsByOutcome: Readonly<{
705
- success: number;
706
- cancelled: number;
707
- invalid_input: number;
708
- user_rejected: number;
709
- policy_denied: number;
710
- tool_failed: number;
711
- }>;
712
- recentRecords: Readonly<{
713
- toolCallId: string;
714
- toolName: string;
715
- agentName: string;
716
- outcome: Readonly<{
717
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
718
- reason?: string | undefined;
719
- executionState?: "not_executed" | "outcome_unknown" | undefined;
720
- }>;
721
- sequence: number;
722
- executionId: string;
723
- }>[];
724
- integrityStatus: "invalid" | "valid" | "sanitized";
725
- anomalies: Readonly<{
726
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
727
- toolCallId: string;
728
- count?: number | undefined;
729
- }>[];
730
- }>;
731
- runningWork: Readonly<{
732
- sessionId: number;
733
- state: "completed" | "cleanup-failed" | "running" | "draining" | "stopping";
734
- managerInstanceId: string;
735
- workdir: string;
736
- recoverability: "unavailable" | "live" | "stale";
737
- commandPreview: string;
738
- observedAt: string;
739
- exitCode?: number | undefined;
740
- terminationCause?: string | undefined;
741
- wallTimeMs?: number | undefined;
742
- cleanupError?: string | undefined;
743
- }>[];
744
- goal?: Readonly<{
745
- status: "unknown" | "active" | "interrupted";
746
- verbatimRequest: string;
747
- sourceSequence: number;
748
- }> | undefined;
749
- }, {
750
- context: Readonly<{
751
- cwd: string;
752
- skills: Readonly<{
753
- name: string;
754
- source: "config" | "user" | "agent" | "project";
755
- }>[];
756
- stableRuleIds: string[];
757
- explicitSkillNames: string[];
758
- systemPromptSha256?: string | undefined;
759
- }>;
760
- resources: Readonly<{
761
- key: string;
762
- mode: "read" | "write";
763
- evidenceToolCallId: string;
764
- evidenceExecutionId: string;
765
- }>[];
766
- summary: Readonly<{
767
- status: "valid";
768
- digest: string;
769
- }> | Readonly<{
770
- status: "fallback";
771
- reason: string;
772
- lastValidCheckpointId?: string | undefined;
773
- }> | Readonly<{
774
- status: "skipped";
775
- lastValidCheckpointId?: string | undefined;
776
- }>;
777
- constraints: Readonly<{
778
- sourceSequence: number;
779
- quote: string;
780
- }>[];
781
- toolState: Readonly<{
782
- countsByOutcome: Readonly<{
783
- success: number;
784
- cancelled: number;
785
- invalid_input: number;
786
- user_rejected: number;
787
- policy_denied: number;
788
- tool_failed: number;
789
- }>;
790
- recentRecords: Readonly<{
791
- toolCallId: string;
792
- toolName: string;
793
- agentName: string;
794
- outcome: Readonly<{
795
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
796
- reason?: string | undefined;
797
- executionState?: "not_executed" | "outcome_unknown" | undefined;
798
- }>;
799
- sequence: number;
800
- executionId: string;
801
- }>[];
802
- integrityStatus: "invalid" | "valid" | "sanitized";
803
- anomalies: Readonly<{
804
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
805
- toolCallId: string;
806
- count?: number | undefined;
807
- }>[];
808
- }>;
809
- runningWork: Readonly<{
810
- sessionId: number;
811
- state: "completed" | "cleanup-failed" | "running" | "draining" | "stopping";
812
- managerInstanceId: string;
813
- workdir: string;
814
- recoverability: "unavailable" | "live" | "stale";
815
- commandPreview: string;
816
- observedAt: string;
817
- exitCode?: number | undefined;
818
- terminationCause?: string | undefined;
819
- wallTimeMs?: number | undefined;
820
- cleanupError?: string | undefined;
821
- }>[];
822
- goal?: Readonly<{
823
- status: "unknown" | "active" | "interrupted";
824
- verbatimRequest: string;
825
- sourceSequence: number;
826
- }> | undefined;
827
- }>>;
286
+ lastValidCheckpointId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "CompactionCheckpointId", "out">>;
287
+ }, z.core.$strict>], "status">>;
288
+ }, z.core.$strict>>;
828
289
  export declare const compactionCheckpointV1Schema: z.ZodReadonly<z.ZodObject<{
829
290
  version: z.ZodLiteral<1>;
830
- id: z.ZodBranded<z.ZodString, "CompactionCheckpointId">;
291
+ id: z.core.$ZodBranded<z.ZodString, "CompactionCheckpointId", "out">;
831
292
  generation: z.ZodNumber;
832
- previousCheckpointId: z.ZodOptional<z.ZodBranded<z.ZodString, "CompactionCheckpointId">>;
293
+ previousCheckpointId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "CompactionCheckpointId", "out">>;
833
294
  createdAt: z.ZodString;
834
295
  transcript: z.ZodReadonly<z.ZodObject<{
835
- messages: z.ZodEffects<z.ZodObject<{
296
+ messages: z.ZodObject<{
836
297
  fromSequenceExclusive: z.ZodNumber;
837
298
  throughSequence: z.ZodNumber;
838
- }, "strict", z.ZodTypeAny, {
839
- fromSequenceExclusive: number;
840
- throughSequence: number;
841
- }, {
842
- fromSequenceExclusive: number;
843
- throughSequence: number;
844
- }>, {
845
- fromSequenceExclusive: number;
846
- throughSequence: number;
847
- }, {
848
- fromSequenceExclusive: number;
849
- throughSequence: number;
850
- }>;
851
- toolExecutions: z.ZodEffects<z.ZodObject<{
299
+ }, z.core.$strict>;
300
+ toolExecutions: z.ZodObject<{
852
301
  fromSequenceExclusive: z.ZodNumber;
853
302
  throughSequence: z.ZodNumber;
854
- }, "strict", z.ZodTypeAny, {
855
- fromSequenceExclusive: number;
856
- throughSequence: number;
857
- }, {
858
- fromSequenceExclusive: number;
859
- throughSequence: number;
860
- }>, {
861
- fromSequenceExclusive: number;
862
- throughSequence: number;
863
- }, {
864
- fromSequenceExclusive: number;
865
- throughSequence: number;
303
+ }, z.core.$strict>;
304
+ completeness: z.ZodEnum<{
305
+ complete: "complete";
306
+ legacy_snapshot: "legacy_snapshot";
866
307
  }>;
867
- completeness: z.ZodEnum<["complete", "legacy_snapshot"]>;
868
- }, "strict", z.ZodTypeAny, {
869
- messages: {
870
- fromSequenceExclusive: number;
871
- throughSequence: number;
872
- };
873
- toolExecutions: {
874
- fromSequenceExclusive: number;
875
- throughSequence: number;
876
- };
877
- completeness: "complete" | "legacy_snapshot";
878
- }, {
879
- messages: {
880
- fromSequenceExclusive: number;
881
- throughSequence: number;
882
- };
883
- toolExecutions: {
884
- fromSequenceExclusive: number;
885
- throughSequence: number;
886
- };
887
- completeness: "complete" | "legacy_snapshot";
888
- }>>;
308
+ }, z.core.$strict>>;
889
309
  goal: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
890
310
  verbatimRequest: z.ZodString;
891
311
  sourceSequence: z.ZodNumber;
892
- status: z.ZodEnum<["active", "interrupted", "unknown"]>;
893
- }, "strict", z.ZodTypeAny, {
894
- status: "unknown" | "active" | "interrupted";
895
- verbatimRequest: string;
896
- sourceSequence: number;
897
- }, {
898
- status: "unknown" | "active" | "interrupted";
899
- verbatimRequest: string;
900
- sourceSequence: number;
901
- }>>>;
312
+ status: z.ZodEnum<{
313
+ unknown: "unknown";
314
+ active: "active";
315
+ interrupted: "interrupted";
316
+ }>;
317
+ }, z.core.$strict>>>;
902
318
  constraints: z.ZodArray<z.ZodReadonly<z.ZodObject<{
903
319
  quote: z.ZodString;
904
320
  sourceSequence: z.ZodNumber;
905
- }, "strict", z.ZodTypeAny, {
906
- sourceSequence: number;
907
- quote: string;
908
- }, {
909
- sourceSequence: number;
910
- quote: string;
911
- }>>, "many">;
321
+ }, z.core.$strict>>>;
912
322
  resources: z.ZodArray<z.ZodReadonly<z.ZodObject<{
913
323
  key: z.ZodString;
914
- mode: z.ZodEnum<["read", "write"]>;
324
+ mode: z.ZodEnum<{
325
+ read: "read";
326
+ write: "write";
327
+ }>;
915
328
  evidenceToolCallId: z.ZodString;
916
329
  evidenceExecutionId: z.ZodString;
917
- }, "strict", z.ZodTypeAny, {
918
- key: string;
919
- mode: "read" | "write";
920
- evidenceToolCallId: string;
921
- evidenceExecutionId: string;
922
- }, {
923
- key: string;
924
- mode: "read" | "write";
925
- evidenceToolCallId: string;
926
- evidenceExecutionId: string;
927
- }>>, "many">;
330
+ }, z.core.$strict>>>;
928
331
  toolState: z.ZodReadonly<z.ZodObject<{
929
332
  countsByOutcome: z.ZodReadonly<z.ZodObject<{
930
333
  success: z.ZodNumber;
@@ -933,145 +336,63 @@ export declare const compactionCheckpointV1Schema: z.ZodReadonly<z.ZodObject<{
933
336
  invalid_input: z.ZodNumber;
934
337
  cancelled: z.ZodNumber;
935
338
  tool_failed: z.ZodNumber;
936
- }, "strict", z.ZodTypeAny, {
937
- success: number;
938
- cancelled: number;
939
- invalid_input: number;
940
- user_rejected: number;
941
- policy_denied: number;
942
- tool_failed: number;
943
- }, {
944
- success: number;
945
- cancelled: number;
946
- invalid_input: number;
947
- user_rejected: number;
948
- policy_denied: number;
949
- tool_failed: number;
950
- }>>;
339
+ }, z.core.$strict>>;
951
340
  recentRecords: z.ZodArray<z.ZodReadonly<z.ZodObject<{
952
341
  executionId: z.ZodString;
953
342
  sequence: z.ZodNumber;
954
343
  toolCallId: z.ZodString;
955
344
  agentName: z.ZodString;
956
345
  toolName: z.ZodString;
957
- outcome: z.ZodReadonly<z.ZodEffects<z.ZodObject<{
958
- kind: z.ZodEnum<["success", "user_rejected", "policy_denied", "invalid_input", "cancelled", "tool_failed"]>;
346
+ outcome: z.ZodReadonly<z.ZodObject<{
347
+ kind: z.ZodEnum<{
348
+ success: "success";
349
+ user_rejected: "user_rejected";
350
+ policy_denied: "policy_denied";
351
+ invalid_input: "invalid_input";
352
+ cancelled: "cancelled";
353
+ tool_failed: "tool_failed";
354
+ }>;
959
355
  reason: z.ZodOptional<z.ZodString>;
960
- executionState: z.ZodOptional<z.ZodEnum<["not_executed", "outcome_unknown"]>>;
961
- }, "strict", z.ZodTypeAny, {
962
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
963
- reason?: string | undefined;
964
- executionState?: "not_executed" | "outcome_unknown" | undefined;
965
- }, {
966
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
967
- reason?: string | undefined;
968
- executionState?: "not_executed" | "outcome_unknown" | undefined;
969
- }>, {
970
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
971
- reason?: string | undefined;
972
- executionState?: "not_executed" | "outcome_unknown" | undefined;
973
- }, {
974
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
975
- reason?: string | undefined;
976
- executionState?: "not_executed" | "outcome_unknown" | undefined;
977
- }>>;
978
- }, "strict", z.ZodTypeAny, {
979
- toolCallId: string;
980
- toolName: string;
981
- agentName: string;
982
- outcome: Readonly<{
983
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
984
- reason?: string | undefined;
985
- executionState?: "not_executed" | "outcome_unknown" | undefined;
986
- }>;
987
- sequence: number;
988
- executionId: string;
989
- }, {
990
- toolCallId: string;
991
- toolName: string;
992
- agentName: string;
993
- outcome: Readonly<{
994
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
995
- reason?: string | undefined;
996
- executionState?: "not_executed" | "outcome_unknown" | undefined;
997
- }>;
998
- sequence: number;
999
- executionId: string;
1000
- }>>, "many">;
1001
- integrityStatus: z.ZodEnum<["valid", "sanitized", "invalid"]>;
356
+ executionState: z.ZodOptional<z.ZodEnum<{
357
+ not_executed: "not_executed";
358
+ outcome_unknown: "outcome_unknown";
359
+ }>>;
360
+ }, z.core.$strict>>;
361
+ }, z.core.$strict>>>;
362
+ integrityStatus: z.ZodEnum<{
363
+ invalid: "invalid";
364
+ valid: "valid";
365
+ sanitized: "sanitized";
366
+ }>;
1002
367
  anomalies: z.ZodArray<z.ZodReadonly<z.ZodObject<{
1003
- kind: z.ZodEnum<["orphan_result", "dangling_call", "duplicate_call", "duplicate_result", "record_without_call", "record_without_result", "result_without_record"]>;
368
+ kind: z.ZodEnum<{
369
+ orphan_result: "orphan_result";
370
+ dangling_call: "dangling_call";
371
+ duplicate_call: "duplicate_call";
372
+ duplicate_result: "duplicate_result";
373
+ record_without_call: "record_without_call";
374
+ record_without_result: "record_without_result";
375
+ result_without_record: "result_without_record";
376
+ }>;
1004
377
  toolCallId: z.ZodString;
1005
378
  count: z.ZodOptional<z.ZodNumber>;
1006
- }, "strict", z.ZodTypeAny, {
1007
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
1008
- toolCallId: string;
1009
- count?: number | undefined;
1010
- }, {
1011
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
1012
- toolCallId: string;
1013
- count?: number | undefined;
1014
- }>>, "many">;
1015
- }, "strict", z.ZodTypeAny, {
1016
- countsByOutcome: Readonly<{
1017
- success: number;
1018
- cancelled: number;
1019
- invalid_input: number;
1020
- user_rejected: number;
1021
- policy_denied: number;
1022
- tool_failed: number;
1023
- }>;
1024
- recentRecords: Readonly<{
1025
- toolCallId: string;
1026
- toolName: string;
1027
- agentName: string;
1028
- outcome: Readonly<{
1029
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
1030
- reason?: string | undefined;
1031
- executionState?: "not_executed" | "outcome_unknown" | undefined;
1032
- }>;
1033
- sequence: number;
1034
- executionId: string;
1035
- }>[];
1036
- integrityStatus: "invalid" | "valid" | "sanitized";
1037
- anomalies: Readonly<{
1038
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
1039
- toolCallId: string;
1040
- count?: number | undefined;
1041
- }>[];
1042
- }, {
1043
- countsByOutcome: Readonly<{
1044
- success: number;
1045
- cancelled: number;
1046
- invalid_input: number;
1047
- user_rejected: number;
1048
- policy_denied: number;
1049
- tool_failed: number;
1050
- }>;
1051
- recentRecords: Readonly<{
1052
- toolCallId: string;
1053
- toolName: string;
1054
- agentName: string;
1055
- outcome: Readonly<{
1056
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
1057
- reason?: string | undefined;
1058
- executionState?: "not_executed" | "outcome_unknown" | undefined;
1059
- }>;
1060
- sequence: number;
1061
- executionId: string;
1062
- }>[];
1063
- integrityStatus: "invalid" | "valid" | "sanitized";
1064
- anomalies: Readonly<{
1065
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
1066
- toolCallId: string;
1067
- count?: number | undefined;
1068
- }>[];
1069
- }>>;
379
+ }, z.core.$strict>>>;
380
+ }, z.core.$strict>>;
1070
381
  runningWork: z.ZodArray<z.ZodReadonly<z.ZodObject<{
1071
382
  managerInstanceId: z.ZodString;
1072
383
  sessionId: z.ZodNumber;
1073
- state: z.ZodEnum<["running", "draining", "stopping", "completed", "cleanup-failed"]>;
1074
- recoverability: z.ZodEnum<["live", "stale", "unavailable"]>;
384
+ state: z.ZodEnum<{
385
+ completed: "completed";
386
+ running: "running";
387
+ draining: "draining";
388
+ stopping: "stopping";
389
+ "cleanup-failed": "cleanup-failed";
390
+ }>;
391
+ recoverability: z.ZodEnum<{
392
+ unavailable: "unavailable";
393
+ live: "live";
394
+ stale: "stale";
395
+ }>;
1075
396
  commandPreview: z.ZodString;
1076
397
  workdir: z.ZodString;
1077
398
  observedAt: z.ZodString;
@@ -1079,356 +400,70 @@ export declare const compactionCheckpointV1Schema: z.ZodReadonly<z.ZodObject<{
1079
400
  exitCode: z.ZodOptional<z.ZodNumber>;
1080
401
  terminationCause: z.ZodOptional<z.ZodString>;
1081
402
  cleanupError: z.ZodOptional<z.ZodString>;
1082
- }, "strict", z.ZodTypeAny, {
1083
- sessionId: number;
1084
- state: "completed" | "cleanup-failed" | "running" | "draining" | "stopping";
1085
- managerInstanceId: string;
1086
- workdir: string;
1087
- recoverability: "unavailable" | "live" | "stale";
1088
- commandPreview: string;
1089
- observedAt: string;
1090
- exitCode?: number | undefined;
1091
- terminationCause?: string | undefined;
1092
- wallTimeMs?: number | undefined;
1093
- cleanupError?: string | undefined;
1094
- }, {
1095
- sessionId: number;
1096
- state: "completed" | "cleanup-failed" | "running" | "draining" | "stopping";
1097
- managerInstanceId: string;
1098
- workdir: string;
1099
- recoverability: "unavailable" | "live" | "stale";
1100
- commandPreview: string;
1101
- observedAt: string;
1102
- exitCode?: number | undefined;
1103
- terminationCause?: string | undefined;
1104
- wallTimeMs?: number | undefined;
1105
- cleanupError?: string | undefined;
1106
- }>>, "many">;
403
+ }, z.core.$strict>>>;
1107
404
  context: z.ZodReadonly<z.ZodObject<{
1108
405
  cwd: z.ZodString;
1109
- stableRuleIds: z.ZodArray<z.ZodString, "many">;
406
+ stableRuleIds: z.ZodArray<z.ZodString>;
1110
407
  systemPromptSha256: z.ZodOptional<z.ZodString>;
1111
408
  skills: z.ZodArray<z.ZodReadonly<z.ZodObject<{
1112
409
  name: z.ZodString;
1113
- source: z.ZodEnum<["agent", "project", "user", "config"]>;
1114
- }, "strict", z.ZodTypeAny, {
1115
- name: string;
1116
- source: "config" | "user" | "agent" | "project";
1117
- }, {
1118
- name: string;
1119
- source: "config" | "user" | "agent" | "project";
1120
- }>>, "many">;
1121
- explicitSkillNames: z.ZodArray<z.ZodString, "many">;
1122
- }, "strict", z.ZodTypeAny, {
1123
- cwd: string;
1124
- skills: Readonly<{
1125
- name: string;
1126
- source: "config" | "user" | "agent" | "project";
1127
- }>[];
1128
- stableRuleIds: string[];
1129
- explicitSkillNames: string[];
1130
- systemPromptSha256?: string | undefined;
1131
- }, {
1132
- cwd: string;
1133
- skills: Readonly<{
1134
- name: string;
1135
- source: "config" | "user" | "agent" | "project";
1136
- }>[];
1137
- stableRuleIds: string[];
1138
- explicitSkillNames: string[];
1139
- systemPromptSha256?: string | undefined;
1140
- }>>;
1141
- summary: z.ZodReadonly<z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
410
+ source: z.ZodEnum<{
411
+ agent: "agent";
412
+ project: "project";
413
+ user: "user";
414
+ config: "config";
415
+ }>;
416
+ }, z.core.$strict>>>;
417
+ explicitSkillNames: z.ZodArray<z.ZodString>;
418
+ }, z.core.$strict>>;
419
+ summary: z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodObject<{
1142
420
  status: z.ZodLiteral<"valid">;
1143
421
  digest: z.ZodString;
1144
- }, "strict", z.ZodTypeAny, {
1145
- status: "valid";
1146
- digest: string;
1147
- }, {
1148
- status: "valid";
1149
- digest: string;
1150
- }>, z.ZodObject<{
422
+ }, z.core.$strict>, z.ZodObject<{
1151
423
  status: z.ZodLiteral<"fallback">;
1152
424
  reason: z.ZodString;
1153
- lastValidCheckpointId: z.ZodOptional<z.ZodBranded<z.ZodString, "CompactionCheckpointId">>;
1154
- }, "strict", z.ZodTypeAny, {
1155
- status: "fallback";
1156
- reason: string;
1157
- lastValidCheckpointId?: (string & z.BRAND<"CompactionCheckpointId">) | undefined;
1158
- }, {
1159
- status: "fallback";
1160
- reason: string;
1161
- lastValidCheckpointId?: string | undefined;
1162
- }>, z.ZodObject<{
425
+ lastValidCheckpointId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "CompactionCheckpointId", "out">>;
426
+ }, z.core.$strict>, z.ZodObject<{
1163
427
  status: z.ZodLiteral<"skipped">;
1164
- lastValidCheckpointId: z.ZodOptional<z.ZodBranded<z.ZodString, "CompactionCheckpointId">>;
1165
- }, "strict", z.ZodTypeAny, {
1166
- status: "skipped";
1167
- lastValidCheckpointId?: (string & z.BRAND<"CompactionCheckpointId">) | undefined;
1168
- }, {
1169
- status: "skipped";
1170
- lastValidCheckpointId?: string | undefined;
1171
- }>]>>;
1172
- }, "strict", z.ZodTypeAny, {
1173
- version: 1;
1174
- id: string & z.BRAND<"CompactionCheckpointId">;
1175
- createdAt: string;
1176
- generation: number;
1177
- context: Readonly<{
1178
- cwd: string;
1179
- skills: Readonly<{
1180
- name: string;
1181
- source: "config" | "user" | "agent" | "project";
1182
- }>[];
1183
- stableRuleIds: string[];
1184
- explicitSkillNames: string[];
1185
- systemPromptSha256?: string | undefined;
1186
- }>;
1187
- resources: Readonly<{
1188
- key: string;
1189
- mode: "read" | "write";
1190
- evidenceToolCallId: string;
1191
- evidenceExecutionId: string;
1192
- }>[];
1193
- summary: Readonly<{
1194
- status: "valid";
1195
- digest: string;
1196
- }> | Readonly<{
1197
- status: "fallback";
1198
- reason: string;
1199
- lastValidCheckpointId?: (string & z.BRAND<"CompactionCheckpointId">) | undefined;
1200
- }> | Readonly<{
1201
- status: "skipped";
1202
- lastValidCheckpointId?: (string & z.BRAND<"CompactionCheckpointId">) | undefined;
1203
- }>;
1204
- constraints: Readonly<{
1205
- sourceSequence: number;
1206
- quote: string;
1207
- }>[];
1208
- toolState: Readonly<{
1209
- countsByOutcome: Readonly<{
1210
- success: number;
1211
- cancelled: number;
1212
- invalid_input: number;
1213
- user_rejected: number;
1214
- policy_denied: number;
1215
- tool_failed: number;
1216
- }>;
1217
- recentRecords: Readonly<{
1218
- toolCallId: string;
1219
- toolName: string;
1220
- agentName: string;
1221
- outcome: Readonly<{
1222
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
1223
- reason?: string | undefined;
1224
- executionState?: "not_executed" | "outcome_unknown" | undefined;
1225
- }>;
1226
- sequence: number;
1227
- executionId: string;
1228
- }>[];
1229
- integrityStatus: "invalid" | "valid" | "sanitized";
1230
- anomalies: Readonly<{
1231
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
1232
- toolCallId: string;
1233
- count?: number | undefined;
1234
- }>[];
1235
- }>;
1236
- runningWork: Readonly<{
1237
- sessionId: number;
1238
- state: "completed" | "cleanup-failed" | "running" | "draining" | "stopping";
1239
- managerInstanceId: string;
1240
- workdir: string;
1241
- recoverability: "unavailable" | "live" | "stale";
1242
- commandPreview: string;
1243
- observedAt: string;
1244
- exitCode?: number | undefined;
1245
- terminationCause?: string | undefined;
1246
- wallTimeMs?: number | undefined;
1247
- cleanupError?: string | undefined;
1248
- }>[];
1249
- transcript: Readonly<{
1250
- messages: {
1251
- fromSequenceExclusive: number;
1252
- throughSequence: number;
1253
- };
1254
- toolExecutions: {
1255
- fromSequenceExclusive: number;
1256
- throughSequence: number;
1257
- };
1258
- completeness: "complete" | "legacy_snapshot";
1259
- }>;
1260
- goal?: Readonly<{
1261
- status: "unknown" | "active" | "interrupted";
1262
- verbatimRequest: string;
1263
- sourceSequence: number;
1264
- }> | undefined;
1265
- previousCheckpointId?: (string & z.BRAND<"CompactionCheckpointId">) | undefined;
1266
- }, {
1267
- version: 1;
1268
- id: string;
1269
- createdAt: string;
1270
- generation: number;
1271
- context: Readonly<{
1272
- cwd: string;
1273
- skills: Readonly<{
1274
- name: string;
1275
- source: "config" | "user" | "agent" | "project";
1276
- }>[];
1277
- stableRuleIds: string[];
1278
- explicitSkillNames: string[];
1279
- systemPromptSha256?: string | undefined;
1280
- }>;
1281
- resources: Readonly<{
1282
- key: string;
1283
- mode: "read" | "write";
1284
- evidenceToolCallId: string;
1285
- evidenceExecutionId: string;
1286
- }>[];
1287
- summary: Readonly<{
1288
- status: "valid";
1289
- digest: string;
1290
- }> | Readonly<{
1291
- status: "fallback";
1292
- reason: string;
1293
- lastValidCheckpointId?: string | undefined;
1294
- }> | Readonly<{
1295
- status: "skipped";
1296
- lastValidCheckpointId?: string | undefined;
1297
- }>;
1298
- constraints: Readonly<{
1299
- sourceSequence: number;
1300
- quote: string;
1301
- }>[];
1302
- toolState: Readonly<{
1303
- countsByOutcome: Readonly<{
1304
- success: number;
1305
- cancelled: number;
1306
- invalid_input: number;
1307
- user_rejected: number;
1308
- policy_denied: number;
1309
- tool_failed: number;
1310
- }>;
1311
- recentRecords: Readonly<{
1312
- toolCallId: string;
1313
- toolName: string;
1314
- agentName: string;
1315
- outcome: Readonly<{
1316
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
1317
- reason?: string | undefined;
1318
- executionState?: "not_executed" | "outcome_unknown" | undefined;
1319
- }>;
1320
- sequence: number;
1321
- executionId: string;
1322
- }>[];
1323
- integrityStatus: "invalid" | "valid" | "sanitized";
1324
- anomalies: Readonly<{
1325
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
1326
- toolCallId: string;
1327
- count?: number | undefined;
1328
- }>[];
1329
- }>;
1330
- runningWork: Readonly<{
1331
- sessionId: number;
1332
- state: "completed" | "cleanup-failed" | "running" | "draining" | "stopping";
1333
- managerInstanceId: string;
1334
- workdir: string;
1335
- recoverability: "unavailable" | "live" | "stale";
1336
- commandPreview: string;
1337
- observedAt: string;
1338
- exitCode?: number | undefined;
1339
- terminationCause?: string | undefined;
1340
- wallTimeMs?: number | undefined;
1341
- cleanupError?: string | undefined;
1342
- }>[];
1343
- transcript: Readonly<{
1344
- messages: {
1345
- fromSequenceExclusive: number;
1346
- throughSequence: number;
1347
- };
1348
- toolExecutions: {
1349
- fromSequenceExclusive: number;
1350
- throughSequence: number;
1351
- };
1352
- completeness: "complete" | "legacy_snapshot";
1353
- }>;
1354
- goal?: Readonly<{
1355
- status: "unknown" | "active" | "interrupted";
1356
- verbatimRequest: string;
1357
- sourceSequence: number;
1358
- }> | undefined;
1359
- previousCheckpointId?: string | undefined;
1360
- }>>;
1361
- export declare const compactionCheckpointV2Schema: z.ZodReadonly<z.ZodEffects<z.ZodObject<{
428
+ lastValidCheckpointId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "CompactionCheckpointId", "out">>;
429
+ }, z.core.$strict>], "status">>;
430
+ }, z.core.$strict>>;
431
+ export declare const compactionCheckpointV2Schema: z.ZodReadonly<z.ZodObject<{
1362
432
  version: z.ZodLiteral<2>;
1363
- id: z.ZodBranded<z.ZodString, "CompactionCheckpointId">;
433
+ id: z.core.$ZodBranded<z.ZodString, "CompactionCheckpointId", "out">;
1364
434
  generation: z.ZodNumber;
1365
- previousCheckpointId: z.ZodOptional<z.ZodBranded<z.ZodString, "CompactionCheckpointId">>;
435
+ previousCheckpointId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "CompactionCheckpointId", "out">>;
1366
436
  createdAt: z.ZodString;
1367
437
  transcript: z.ZodReadonly<z.ZodObject<{
1368
- messages: z.ZodEffects<z.ZodObject<{
438
+ messages: z.ZodObject<{
1369
439
  fromSequenceExclusive: z.ZodNumber;
1370
440
  throughSequence: z.ZodNumber;
1371
- }, "strict", z.ZodTypeAny, {
1372
- fromSequenceExclusive: number;
1373
- throughSequence: number;
1374
- }, {
1375
- fromSequenceExclusive: number;
1376
- throughSequence: number;
1377
- }>, {
1378
- fromSequenceExclusive: number;
1379
- throughSequence: number;
1380
- }, {
1381
- fromSequenceExclusive: number;
1382
- throughSequence: number;
1383
- }>;
1384
- toolExecutions: z.ZodEffects<z.ZodObject<{
441
+ }, z.core.$strict>;
442
+ toolExecutions: z.ZodObject<{
1385
443
  fromSequenceExclusive: z.ZodNumber;
1386
444
  throughSequence: z.ZodNumber;
1387
- }, "strict", z.ZodTypeAny, {
1388
- fromSequenceExclusive: number;
1389
- throughSequence: number;
1390
- }, {
1391
- fromSequenceExclusive: number;
1392
- throughSequence: number;
1393
- }>, {
1394
- fromSequenceExclusive: number;
1395
- throughSequence: number;
1396
- }, {
1397
- fromSequenceExclusive: number;
1398
- throughSequence: number;
445
+ }, z.core.$strict>;
446
+ completeness: z.ZodEnum<{
447
+ complete: "complete";
448
+ legacy_snapshot: "legacy_snapshot";
1399
449
  }>;
1400
- completeness: z.ZodEnum<["complete", "legacy_snapshot"]>;
1401
- }, "strict", z.ZodTypeAny, {
1402
- messages: {
1403
- fromSequenceExclusive: number;
1404
- throughSequence: number;
1405
- };
1406
- toolExecutions: {
1407
- fromSequenceExclusive: number;
1408
- throughSequence: number;
1409
- };
1410
- completeness: "complete" | "legacy_snapshot";
1411
- }, {
1412
- messages: {
1413
- fromSequenceExclusive: number;
1414
- throughSequence: number;
1415
- };
1416
- toolExecutions: {
1417
- fromSequenceExclusive: number;
1418
- throughSequence: number;
1419
- };
1420
- completeness: "complete" | "legacy_snapshot";
1421
- }>>;
1422
- semanticState: z.ZodReadonly<z.ZodEffects<z.ZodObject<{
450
+ }, z.core.$strict>>;
451
+ semanticState: z.ZodReadonly<z.ZodObject<{
1423
452
  version: z.ZodLiteral<1>;
1424
453
  scopeId: z.ZodOptional<z.ZodString>;
1425
454
  goal: z.ZodNullable<z.ZodReadonly<z.ZodObject<{
1426
- id: z.ZodBranded<z.ZodString, "CompactionSemanticItemId">;
455
+ id: z.core.$ZodBranded<z.ZodString, "CompactionSemanticItemId", "out">;
1427
456
  harnessKey: z.ZodOptional<z.ZodString>;
1428
- relatedItemId: z.ZodOptional<z.ZodBranded<z.ZodString, "CompactionSemanticItemId">>;
457
+ relatedItemId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "CompactionSemanticItemId", "out">>;
1429
458
  text: z.ZodString;
1430
- provenance: z.ZodArray<z.ZodReadonly<z.ZodEffects<z.ZodObject<{
1431
- kind: z.ZodEnum<["message", "tool_execution", "resource", "running_session", "legacy_snapshot"]>;
459
+ provenance: z.ZodArray<z.ZodReadonly<z.ZodObject<{
460
+ kind: z.ZodEnum<{
461
+ message: "message";
462
+ legacy_snapshot: "legacy_snapshot";
463
+ resource: "resource";
464
+ tool_execution: "tool_execution";
465
+ running_session: "running_session";
466
+ }>;
1432
467
  messageSequence: z.ZodNullable<z.ZodNumber>;
1433
468
  toolExecutionId: z.ZodNullable<z.ZodString>;
1434
469
  resourceKey: z.ZodNullable<z.ZodString>;
@@ -1436,84 +471,22 @@ export declare const compactionCheckpointV2Schema: z.ZodReadonly<z.ZodEffects<z.
1436
471
  sessionId: z.ZodNullable<z.ZodNumber>;
1437
472
  checkpointId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1438
473
  snapshotIndex: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1439
- }, "strict", z.ZodTypeAny, {
1440
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1441
- sessionId: number | null;
1442
- checkpointId: string | null;
1443
- messageSequence: number | null;
1444
- toolExecutionId: string | null;
1445
- resourceKey: string | null;
1446
- managerInstanceId: string | null;
1447
- snapshotIndex: number | null;
1448
- }, {
1449
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1450
- sessionId: number | null;
1451
- messageSequence: number | null;
1452
- toolExecutionId: string | null;
1453
- resourceKey: string | null;
1454
- managerInstanceId: string | null;
1455
- checkpointId?: string | null | undefined;
1456
- snapshotIndex?: number | null | undefined;
1457
- }>, {
1458
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1459
- sessionId: number | null;
1460
- checkpointId: string | null;
1461
- messageSequence: number | null;
1462
- toolExecutionId: string | null;
1463
- resourceKey: string | null;
1464
- managerInstanceId: string | null;
1465
- snapshotIndex: number | null;
1466
- }, {
1467
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1468
- sessionId: number | null;
1469
- messageSequence: number | null;
1470
- toolExecutionId: string | null;
1471
- resourceKey: string | null;
1472
- managerInstanceId: string | null;
1473
- checkpointId?: string | null | undefined;
1474
- snapshotIndex?: number | null | undefined;
1475
- }>>, "many">;
1476
- sourceQuotes: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1477
- }, "strict", z.ZodTypeAny, {
1478
- id: string & z.BRAND<"CompactionSemanticItemId">;
1479
- text: string;
1480
- provenance: Readonly<{
1481
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1482
- sessionId: number | null;
1483
- checkpointId: string | null;
1484
- messageSequence: number | null;
1485
- toolExecutionId: string | null;
1486
- resourceKey: string | null;
1487
- managerInstanceId: string | null;
1488
- snapshotIndex: number | null;
1489
- }>[];
1490
- sourceQuotes: string[];
1491
- harnessKey?: string | undefined;
1492
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
1493
- }, {
1494
- id: string;
1495
- text: string;
1496
- provenance: Readonly<{
1497
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1498
- sessionId: number | null;
1499
- messageSequence: number | null;
1500
- toolExecutionId: string | null;
1501
- resourceKey: string | null;
1502
- managerInstanceId: string | null;
1503
- checkpointId?: string | null | undefined;
1504
- snapshotIndex?: number | null | undefined;
1505
- }>[];
1506
- harnessKey?: string | undefined;
1507
- relatedItemId?: string | undefined;
1508
- sourceQuotes?: string[] | undefined;
1509
- }>>>;
474
+ }, z.core.$strict>>>;
475
+ sourceQuotes: z.ZodDefault<z.ZodArray<z.ZodString>>;
476
+ }, z.core.$strict>>>;
1510
477
  constraints: z.ZodDefault<z.ZodArray<z.ZodReadonly<z.ZodObject<{
1511
- id: z.ZodBranded<z.ZodString, "CompactionSemanticItemId">;
478
+ id: z.core.$ZodBranded<z.ZodString, "CompactionSemanticItemId", "out">;
1512
479
  harnessKey: z.ZodOptional<z.ZodString>;
1513
- relatedItemId: z.ZodOptional<z.ZodBranded<z.ZodString, "CompactionSemanticItemId">>;
480
+ relatedItemId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "CompactionSemanticItemId", "out">>;
1514
481
  text: z.ZodString;
1515
- provenance: z.ZodArray<z.ZodReadonly<z.ZodEffects<z.ZodObject<{
1516
- kind: z.ZodEnum<["message", "tool_execution", "resource", "running_session", "legacy_snapshot"]>;
482
+ provenance: z.ZodArray<z.ZodReadonly<z.ZodObject<{
483
+ kind: z.ZodEnum<{
484
+ message: "message";
485
+ legacy_snapshot: "legacy_snapshot";
486
+ resource: "resource";
487
+ tool_execution: "tool_execution";
488
+ running_session: "running_session";
489
+ }>;
1517
490
  messageSequence: z.ZodNullable<z.ZodNumber>;
1518
491
  toolExecutionId: z.ZodNullable<z.ZodString>;
1519
492
  resourceKey: z.ZodNullable<z.ZodString>;
@@ -1521,84 +494,22 @@ export declare const compactionCheckpointV2Schema: z.ZodReadonly<z.ZodEffects<z.
1521
494
  sessionId: z.ZodNullable<z.ZodNumber>;
1522
495
  checkpointId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1523
496
  snapshotIndex: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1524
- }, "strict", z.ZodTypeAny, {
1525
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1526
- sessionId: number | null;
1527
- checkpointId: string | null;
1528
- messageSequence: number | null;
1529
- toolExecutionId: string | null;
1530
- resourceKey: string | null;
1531
- managerInstanceId: string | null;
1532
- snapshotIndex: number | null;
1533
- }, {
1534
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1535
- sessionId: number | null;
1536
- messageSequence: number | null;
1537
- toolExecutionId: string | null;
1538
- resourceKey: string | null;
1539
- managerInstanceId: string | null;
1540
- checkpointId?: string | null | undefined;
1541
- snapshotIndex?: number | null | undefined;
1542
- }>, {
1543
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1544
- sessionId: number | null;
1545
- checkpointId: string | null;
1546
- messageSequence: number | null;
1547
- toolExecutionId: string | null;
1548
- resourceKey: string | null;
1549
- managerInstanceId: string | null;
1550
- snapshotIndex: number | null;
1551
- }, {
1552
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1553
- sessionId: number | null;
1554
- messageSequence: number | null;
1555
- toolExecutionId: string | null;
1556
- resourceKey: string | null;
1557
- managerInstanceId: string | null;
1558
- checkpointId?: string | null | undefined;
1559
- snapshotIndex?: number | null | undefined;
1560
- }>>, "many">;
1561
- sourceQuotes: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1562
- }, "strict", z.ZodTypeAny, {
1563
- id: string & z.BRAND<"CompactionSemanticItemId">;
1564
- text: string;
1565
- provenance: Readonly<{
1566
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1567
- sessionId: number | null;
1568
- checkpointId: string | null;
1569
- messageSequence: number | null;
1570
- toolExecutionId: string | null;
1571
- resourceKey: string | null;
1572
- managerInstanceId: string | null;
1573
- snapshotIndex: number | null;
1574
- }>[];
1575
- sourceQuotes: string[];
1576
- harnessKey?: string | undefined;
1577
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
1578
- }, {
1579
- id: string;
1580
- text: string;
1581
- provenance: Readonly<{
1582
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1583
- sessionId: number | null;
1584
- messageSequence: number | null;
1585
- toolExecutionId: string | null;
1586
- resourceKey: string | null;
1587
- managerInstanceId: string | null;
1588
- checkpointId?: string | null | undefined;
1589
- snapshotIndex?: number | null | undefined;
1590
- }>[];
1591
- harnessKey?: string | undefined;
1592
- relatedItemId?: string | undefined;
1593
- sourceQuotes?: string[] | undefined;
1594
- }>>, "many">>;
497
+ }, z.core.$strict>>>;
498
+ sourceQuotes: z.ZodDefault<z.ZodArray<z.ZodString>>;
499
+ }, z.core.$strict>>>>;
1595
500
  decisions: z.ZodArray<z.ZodReadonly<z.ZodObject<{
1596
- id: z.ZodBranded<z.ZodString, "CompactionSemanticItemId">;
501
+ id: z.core.$ZodBranded<z.ZodString, "CompactionSemanticItemId", "out">;
1597
502
  harnessKey: z.ZodOptional<z.ZodString>;
1598
- relatedItemId: z.ZodOptional<z.ZodBranded<z.ZodString, "CompactionSemanticItemId">>;
503
+ relatedItemId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "CompactionSemanticItemId", "out">>;
1599
504
  text: z.ZodString;
1600
- provenance: z.ZodArray<z.ZodReadonly<z.ZodEffects<z.ZodObject<{
1601
- kind: z.ZodEnum<["message", "tool_execution", "resource", "running_session", "legacy_snapshot"]>;
505
+ provenance: z.ZodArray<z.ZodReadonly<z.ZodObject<{
506
+ kind: z.ZodEnum<{
507
+ message: "message";
508
+ legacy_snapshot: "legacy_snapshot";
509
+ resource: "resource";
510
+ tool_execution: "tool_execution";
511
+ running_session: "running_session";
512
+ }>;
1602
513
  messageSequence: z.ZodNullable<z.ZodNumber>;
1603
514
  toolExecutionId: z.ZodNullable<z.ZodString>;
1604
515
  resourceKey: z.ZodNullable<z.ZodString>;
@@ -1606,84 +517,22 @@ export declare const compactionCheckpointV2Schema: z.ZodReadonly<z.ZodEffects<z.
1606
517
  sessionId: z.ZodNullable<z.ZodNumber>;
1607
518
  checkpointId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1608
519
  snapshotIndex: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1609
- }, "strict", z.ZodTypeAny, {
1610
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1611
- sessionId: number | null;
1612
- checkpointId: string | null;
1613
- messageSequence: number | null;
1614
- toolExecutionId: string | null;
1615
- resourceKey: string | null;
1616
- managerInstanceId: string | null;
1617
- snapshotIndex: number | null;
1618
- }, {
1619
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1620
- sessionId: number | null;
1621
- messageSequence: number | null;
1622
- toolExecutionId: string | null;
1623
- resourceKey: string | null;
1624
- managerInstanceId: string | null;
1625
- checkpointId?: string | null | undefined;
1626
- snapshotIndex?: number | null | undefined;
1627
- }>, {
1628
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1629
- sessionId: number | null;
1630
- checkpointId: string | null;
1631
- messageSequence: number | null;
1632
- toolExecutionId: string | null;
1633
- resourceKey: string | null;
1634
- managerInstanceId: string | null;
1635
- snapshotIndex: number | null;
1636
- }, {
1637
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1638
- sessionId: number | null;
1639
- messageSequence: number | null;
1640
- toolExecutionId: string | null;
1641
- resourceKey: string | null;
1642
- managerInstanceId: string | null;
1643
- checkpointId?: string | null | undefined;
1644
- snapshotIndex?: number | null | undefined;
1645
- }>>, "many">;
1646
- sourceQuotes: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1647
- }, "strict", z.ZodTypeAny, {
1648
- id: string & z.BRAND<"CompactionSemanticItemId">;
1649
- text: string;
1650
- provenance: Readonly<{
1651
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1652
- sessionId: number | null;
1653
- checkpointId: string | null;
1654
- messageSequence: number | null;
1655
- toolExecutionId: string | null;
1656
- resourceKey: string | null;
1657
- managerInstanceId: string | null;
1658
- snapshotIndex: number | null;
1659
- }>[];
1660
- sourceQuotes: string[];
1661
- harnessKey?: string | undefined;
1662
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
1663
- }, {
1664
- id: string;
1665
- text: string;
1666
- provenance: Readonly<{
1667
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1668
- sessionId: number | null;
1669
- messageSequence: number | null;
1670
- toolExecutionId: string | null;
1671
- resourceKey: string | null;
1672
- managerInstanceId: string | null;
1673
- checkpointId?: string | null | undefined;
1674
- snapshotIndex?: number | null | undefined;
1675
- }>[];
1676
- harnessKey?: string | undefined;
1677
- relatedItemId?: string | undefined;
1678
- sourceQuotes?: string[] | undefined;
1679
- }>>, "many">;
520
+ }, z.core.$strict>>>;
521
+ sourceQuotes: z.ZodDefault<z.ZodArray<z.ZodString>>;
522
+ }, z.core.$strict>>>;
1680
523
  completedWork: z.ZodArray<z.ZodReadonly<z.ZodObject<{
1681
- id: z.ZodBranded<z.ZodString, "CompactionSemanticItemId">;
524
+ id: z.core.$ZodBranded<z.ZodString, "CompactionSemanticItemId", "out">;
1682
525
  harnessKey: z.ZodOptional<z.ZodString>;
1683
- relatedItemId: z.ZodOptional<z.ZodBranded<z.ZodString, "CompactionSemanticItemId">>;
526
+ relatedItemId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "CompactionSemanticItemId", "out">>;
1684
527
  text: z.ZodString;
1685
- provenance: z.ZodArray<z.ZodReadonly<z.ZodEffects<z.ZodObject<{
1686
- kind: z.ZodEnum<["message", "tool_execution", "resource", "running_session", "legacy_snapshot"]>;
528
+ provenance: z.ZodArray<z.ZodReadonly<z.ZodObject<{
529
+ kind: z.ZodEnum<{
530
+ message: "message";
531
+ legacy_snapshot: "legacy_snapshot";
532
+ resource: "resource";
533
+ tool_execution: "tool_execution";
534
+ running_session: "running_session";
535
+ }>;
1687
536
  messageSequence: z.ZodNullable<z.ZodNumber>;
1688
537
  toolExecutionId: z.ZodNullable<z.ZodString>;
1689
538
  resourceKey: z.ZodNullable<z.ZodString>;
@@ -1691,84 +540,22 @@ export declare const compactionCheckpointV2Schema: z.ZodReadonly<z.ZodEffects<z.
1691
540
  sessionId: z.ZodNullable<z.ZodNumber>;
1692
541
  checkpointId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1693
542
  snapshotIndex: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1694
- }, "strict", z.ZodTypeAny, {
1695
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1696
- sessionId: number | null;
1697
- checkpointId: string | null;
1698
- messageSequence: number | null;
1699
- toolExecutionId: string | null;
1700
- resourceKey: string | null;
1701
- managerInstanceId: string | null;
1702
- snapshotIndex: number | null;
1703
- }, {
1704
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1705
- sessionId: number | null;
1706
- messageSequence: number | null;
1707
- toolExecutionId: string | null;
1708
- resourceKey: string | null;
1709
- managerInstanceId: string | null;
1710
- checkpointId?: string | null | undefined;
1711
- snapshotIndex?: number | null | undefined;
1712
- }>, {
1713
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1714
- sessionId: number | null;
1715
- checkpointId: string | null;
1716
- messageSequence: number | null;
1717
- toolExecutionId: string | null;
1718
- resourceKey: string | null;
1719
- managerInstanceId: string | null;
1720
- snapshotIndex: number | null;
1721
- }, {
1722
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1723
- sessionId: number | null;
1724
- messageSequence: number | null;
1725
- toolExecutionId: string | null;
1726
- resourceKey: string | null;
1727
- managerInstanceId: string | null;
1728
- checkpointId?: string | null | undefined;
1729
- snapshotIndex?: number | null | undefined;
1730
- }>>, "many">;
1731
- sourceQuotes: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1732
- }, "strict", z.ZodTypeAny, {
1733
- id: string & z.BRAND<"CompactionSemanticItemId">;
1734
- text: string;
1735
- provenance: Readonly<{
1736
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1737
- sessionId: number | null;
1738
- checkpointId: string | null;
1739
- messageSequence: number | null;
1740
- toolExecutionId: string | null;
1741
- resourceKey: string | null;
1742
- managerInstanceId: string | null;
1743
- snapshotIndex: number | null;
1744
- }>[];
1745
- sourceQuotes: string[];
1746
- harnessKey?: string | undefined;
1747
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
1748
- }, {
1749
- id: string;
1750
- text: string;
1751
- provenance: Readonly<{
1752
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1753
- sessionId: number | null;
1754
- messageSequence: number | null;
1755
- toolExecutionId: string | null;
1756
- resourceKey: string | null;
1757
- managerInstanceId: string | null;
1758
- checkpointId?: string | null | undefined;
1759
- snapshotIndex?: number | null | undefined;
1760
- }>[];
1761
- harnessKey?: string | undefined;
1762
- relatedItemId?: string | undefined;
1763
- sourceQuotes?: string[] | undefined;
1764
- }>>, "many">;
543
+ }, z.core.$strict>>>;
544
+ sourceQuotes: z.ZodDefault<z.ZodArray<z.ZodString>>;
545
+ }, z.core.$strict>>>;
1765
546
  pendingWork: z.ZodArray<z.ZodReadonly<z.ZodObject<{
1766
- id: z.ZodBranded<z.ZodString, "CompactionSemanticItemId">;
547
+ id: z.core.$ZodBranded<z.ZodString, "CompactionSemanticItemId", "out">;
1767
548
  harnessKey: z.ZodOptional<z.ZodString>;
1768
- relatedItemId: z.ZodOptional<z.ZodBranded<z.ZodString, "CompactionSemanticItemId">>;
549
+ relatedItemId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "CompactionSemanticItemId", "out">>;
1769
550
  text: z.ZodString;
1770
- provenance: z.ZodArray<z.ZodReadonly<z.ZodEffects<z.ZodObject<{
1771
- kind: z.ZodEnum<["message", "tool_execution", "resource", "running_session", "legacy_snapshot"]>;
551
+ provenance: z.ZodArray<z.ZodReadonly<z.ZodObject<{
552
+ kind: z.ZodEnum<{
553
+ message: "message";
554
+ legacy_snapshot: "legacy_snapshot";
555
+ resource: "resource";
556
+ tool_execution: "tool_execution";
557
+ running_session: "running_session";
558
+ }>;
1772
559
  messageSequence: z.ZodNullable<z.ZodNumber>;
1773
560
  toolExecutionId: z.ZodNullable<z.ZodString>;
1774
561
  resourceKey: z.ZodNullable<z.ZodString>;
@@ -1776,82 +563,20 @@ export declare const compactionCheckpointV2Schema: z.ZodReadonly<z.ZodEffects<z.
1776
563
  sessionId: z.ZodNullable<z.ZodNumber>;
1777
564
  checkpointId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1778
565
  snapshotIndex: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1779
- }, "strict", z.ZodTypeAny, {
1780
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1781
- sessionId: number | null;
1782
- checkpointId: string | null;
1783
- messageSequence: number | null;
1784
- toolExecutionId: string | null;
1785
- resourceKey: string | null;
1786
- managerInstanceId: string | null;
1787
- snapshotIndex: number | null;
1788
- }, {
1789
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1790
- sessionId: number | null;
1791
- messageSequence: number | null;
1792
- toolExecutionId: string | null;
1793
- resourceKey: string | null;
1794
- managerInstanceId: string | null;
1795
- checkpointId?: string | null | undefined;
1796
- snapshotIndex?: number | null | undefined;
1797
- }>, {
1798
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1799
- sessionId: number | null;
1800
- checkpointId: string | null;
1801
- messageSequence: number | null;
1802
- toolExecutionId: string | null;
1803
- resourceKey: string | null;
1804
- managerInstanceId: string | null;
1805
- snapshotIndex: number | null;
1806
- }, {
1807
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1808
- sessionId: number | null;
1809
- messageSequence: number | null;
1810
- toolExecutionId: string | null;
1811
- resourceKey: string | null;
1812
- managerInstanceId: string | null;
1813
- checkpointId?: string | null | undefined;
1814
- snapshotIndex?: number | null | undefined;
1815
- }>>, "many">;
1816
- sourceQuotes: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1817
- }, "strict", z.ZodTypeAny, {
1818
- id: string & z.BRAND<"CompactionSemanticItemId">;
1819
- text: string;
1820
- provenance: Readonly<{
1821
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1822
- sessionId: number | null;
1823
- checkpointId: string | null;
1824
- messageSequence: number | null;
1825
- toolExecutionId: string | null;
1826
- resourceKey: string | null;
1827
- managerInstanceId: string | null;
1828
- snapshotIndex: number | null;
1829
- }>[];
1830
- sourceQuotes: string[];
1831
- harnessKey?: string | undefined;
1832
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
1833
- }, {
1834
- id: string;
1835
- text: string;
1836
- provenance: Readonly<{
1837
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1838
- sessionId: number | null;
1839
- messageSequence: number | null;
1840
- toolExecutionId: string | null;
1841
- resourceKey: string | null;
1842
- managerInstanceId: string | null;
1843
- checkpointId?: string | null | undefined;
1844
- snapshotIndex?: number | null | undefined;
1845
- }>[];
1846
- harnessKey?: string | undefined;
1847
- relatedItemId?: string | undefined;
1848
- sourceQuotes?: string[] | undefined;
1849
- }>>, "many">;
566
+ }, z.core.$strict>>>;
567
+ sourceQuotes: z.ZodDefault<z.ZodArray<z.ZodString>>;
568
+ }, z.core.$strict>>>;
1850
569
  resources: z.ZodArray<z.ZodReadonly<z.ZodObject<{
1851
- id: z.ZodBranded<z.ZodString, "CompactionSemanticItemId">;
570
+ id: z.core.$ZodBranded<z.ZodString, "CompactionSemanticItemId", "out">;
1852
571
  resourceKey: z.ZodString;
1853
- provenance: z.ZodArray<z.ZodReadonly<z.ZodEffects<z.ZodObject<{
1854
- kind: z.ZodEnum<["message", "tool_execution", "resource", "running_session", "legacy_snapshot"]>;
572
+ provenance: z.ZodArray<z.ZodReadonly<z.ZodObject<{
573
+ kind: z.ZodEnum<{
574
+ message: "message";
575
+ legacy_snapshot: "legacy_snapshot";
576
+ resource: "resource";
577
+ tool_execution: "tool_execution";
578
+ running_session: "running_session";
579
+ }>;
1855
580
  messageSequence: z.ZodNullable<z.ZodNumber>;
1856
581
  toolExecutionId: z.ZodNullable<z.ZodString>;
1857
582
  resourceKey: z.ZodNullable<z.ZodString>;
@@ -1859,76 +584,20 @@ export declare const compactionCheckpointV2Schema: z.ZodReadonly<z.ZodEffects<z.
1859
584
  sessionId: z.ZodNullable<z.ZodNumber>;
1860
585
  checkpointId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1861
586
  snapshotIndex: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1862
- }, "strict", z.ZodTypeAny, {
1863
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1864
- sessionId: number | null;
1865
- checkpointId: string | null;
1866
- messageSequence: number | null;
1867
- toolExecutionId: string | null;
1868
- resourceKey: string | null;
1869
- managerInstanceId: string | null;
1870
- snapshotIndex: number | null;
1871
- }, {
1872
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1873
- sessionId: number | null;
1874
- messageSequence: number | null;
1875
- toolExecutionId: string | null;
1876
- resourceKey: string | null;
1877
- managerInstanceId: string | null;
1878
- checkpointId?: string | null | undefined;
1879
- snapshotIndex?: number | null | undefined;
1880
- }>, {
1881
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1882
- sessionId: number | null;
1883
- checkpointId: string | null;
1884
- messageSequence: number | null;
1885
- toolExecutionId: string | null;
1886
- resourceKey: string | null;
1887
- managerInstanceId: string | null;
1888
- snapshotIndex: number | null;
1889
- }, {
1890
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1891
- sessionId: number | null;
1892
- messageSequence: number | null;
1893
- toolExecutionId: string | null;
1894
- resourceKey: string | null;
1895
- managerInstanceId: string | null;
1896
- checkpointId?: string | null | undefined;
1897
- snapshotIndex?: number | null | undefined;
1898
- }>>, "many">;
1899
- }, "strict", z.ZodTypeAny, {
1900
- id: string & z.BRAND<"CompactionSemanticItemId">;
1901
- resourceKey: string;
1902
- provenance: Readonly<{
1903
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1904
- sessionId: number | null;
1905
- checkpointId: string | null;
1906
- messageSequence: number | null;
1907
- toolExecutionId: string | null;
1908
- resourceKey: string | null;
1909
- managerInstanceId: string | null;
1910
- snapshotIndex: number | null;
1911
- }>[];
1912
- }, {
1913
- id: string;
1914
- resourceKey: string;
1915
- provenance: Readonly<{
1916
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1917
- sessionId: number | null;
1918
- messageSequence: number | null;
1919
- toolExecutionId: string | null;
1920
- resourceKey: string | null;
1921
- managerInstanceId: string | null;
1922
- checkpointId?: string | null | undefined;
1923
- snapshotIndex?: number | null | undefined;
1924
- }>[];
1925
- }>>, "many">;
587
+ }, z.core.$strict>>>;
588
+ }, z.core.$strict>>>;
1926
589
  runningSessions: z.ZodArray<z.ZodReadonly<z.ZodObject<{
1927
- id: z.ZodBranded<z.ZodString, "CompactionSemanticItemId">;
590
+ id: z.core.$ZodBranded<z.ZodString, "CompactionSemanticItemId", "out">;
1928
591
  managerInstanceId: z.ZodString;
1929
592
  sessionId: z.ZodNumber;
1930
- provenance: z.ZodArray<z.ZodReadonly<z.ZodEffects<z.ZodObject<{
1931
- kind: z.ZodEnum<["message", "tool_execution", "resource", "running_session", "legacy_snapshot"]>;
593
+ provenance: z.ZodArray<z.ZodReadonly<z.ZodObject<{
594
+ kind: z.ZodEnum<{
595
+ message: "message";
596
+ legacy_snapshot: "legacy_snapshot";
597
+ resource: "resource";
598
+ tool_execution: "tool_execution";
599
+ running_session: "running_session";
600
+ }>;
1932
601
  messageSequence: z.ZodNullable<z.ZodNumber>;
1933
602
  toolExecutionId: z.ZodNullable<z.ZodString>;
1934
603
  resourceKey: z.ZodNullable<z.ZodString>;
@@ -1936,79 +605,21 @@ export declare const compactionCheckpointV2Schema: z.ZodReadonly<z.ZodEffects<z.
1936
605
  sessionId: z.ZodNullable<z.ZodNumber>;
1937
606
  checkpointId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1938
607
  snapshotIndex: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1939
- }, "strict", z.ZodTypeAny, {
1940
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1941
- sessionId: number | null;
1942
- checkpointId: string | null;
1943
- messageSequence: number | null;
1944
- toolExecutionId: string | null;
1945
- resourceKey: string | null;
1946
- managerInstanceId: string | null;
1947
- snapshotIndex: number | null;
1948
- }, {
1949
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1950
- sessionId: number | null;
1951
- messageSequence: number | null;
1952
- toolExecutionId: string | null;
1953
- resourceKey: string | null;
1954
- managerInstanceId: string | null;
1955
- checkpointId?: string | null | undefined;
1956
- snapshotIndex?: number | null | undefined;
1957
- }>, {
1958
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1959
- sessionId: number | null;
1960
- checkpointId: string | null;
1961
- messageSequence: number | null;
1962
- toolExecutionId: string | null;
1963
- resourceKey: string | null;
1964
- managerInstanceId: string | null;
1965
- snapshotIndex: number | null;
1966
- }, {
1967
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1968
- sessionId: number | null;
1969
- messageSequence: number | null;
1970
- toolExecutionId: string | null;
1971
- resourceKey: string | null;
1972
- managerInstanceId: string | null;
1973
- checkpointId?: string | null | undefined;
1974
- snapshotIndex?: number | null | undefined;
1975
- }>>, "many">;
1976
- }, "strict", z.ZodTypeAny, {
1977
- id: string & z.BRAND<"CompactionSemanticItemId">;
1978
- sessionId: number;
1979
- managerInstanceId: string;
1980
- provenance: Readonly<{
1981
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1982
- sessionId: number | null;
1983
- checkpointId: string | null;
1984
- messageSequence: number | null;
1985
- toolExecutionId: string | null;
1986
- resourceKey: string | null;
1987
- managerInstanceId: string | null;
1988
- snapshotIndex: number | null;
1989
- }>[];
1990
- }, {
1991
- id: string;
1992
- sessionId: number;
1993
- managerInstanceId: string;
1994
- provenance: Readonly<{
1995
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
1996
- sessionId: number | null;
1997
- messageSequence: number | null;
1998
- toolExecutionId: string | null;
1999
- resourceKey: string | null;
2000
- managerInstanceId: string | null;
2001
- checkpointId?: string | null | undefined;
2002
- snapshotIndex?: number | null | undefined;
2003
- }>[];
2004
- }>>, "many">;
608
+ }, z.core.$strict>>>;
609
+ }, z.core.$strict>>>;
2005
610
  uncertainties: z.ZodArray<z.ZodReadonly<z.ZodObject<{
2006
- id: z.ZodBranded<z.ZodString, "CompactionSemanticItemId">;
611
+ id: z.core.$ZodBranded<z.ZodString, "CompactionSemanticItemId", "out">;
2007
612
  harnessKey: z.ZodOptional<z.ZodString>;
2008
- relatedItemId: z.ZodOptional<z.ZodBranded<z.ZodString, "CompactionSemanticItemId">>;
613
+ relatedItemId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "CompactionSemanticItemId", "out">>;
2009
614
  text: z.ZodString;
2010
- provenance: z.ZodArray<z.ZodReadonly<z.ZodEffects<z.ZodObject<{
2011
- kind: z.ZodEnum<["message", "tool_execution", "resource", "running_session", "legacy_snapshot"]>;
615
+ provenance: z.ZodArray<z.ZodReadonly<z.ZodObject<{
616
+ kind: z.ZodEnum<{
617
+ message: "message";
618
+ legacy_snapshot: "legacy_snapshot";
619
+ resource: "resource";
620
+ tool_execution: "tool_execution";
621
+ running_session: "running_session";
622
+ }>;
2012
623
  messageSequence: z.ZodNullable<z.ZodNumber>;
2013
624
  toolExecutionId: z.ZodNullable<z.ZodString>;
2014
625
  resourceKey: z.ZodNullable<z.ZodString>;
@@ -2016,77 +627,9 @@ export declare const compactionCheckpointV2Schema: z.ZodReadonly<z.ZodEffects<z.
2016
627
  sessionId: z.ZodNullable<z.ZodNumber>;
2017
628
  checkpointId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2018
629
  snapshotIndex: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
2019
- }, "strict", z.ZodTypeAny, {
2020
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2021
- sessionId: number | null;
2022
- checkpointId: string | null;
2023
- messageSequence: number | null;
2024
- toolExecutionId: string | null;
2025
- resourceKey: string | null;
2026
- managerInstanceId: string | null;
2027
- snapshotIndex: number | null;
2028
- }, {
2029
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2030
- sessionId: number | null;
2031
- messageSequence: number | null;
2032
- toolExecutionId: string | null;
2033
- resourceKey: string | null;
2034
- managerInstanceId: string | null;
2035
- checkpointId?: string | null | undefined;
2036
- snapshotIndex?: number | null | undefined;
2037
- }>, {
2038
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2039
- sessionId: number | null;
2040
- checkpointId: string | null;
2041
- messageSequence: number | null;
2042
- toolExecutionId: string | null;
2043
- resourceKey: string | null;
2044
- managerInstanceId: string | null;
2045
- snapshotIndex: number | null;
2046
- }, {
2047
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2048
- sessionId: number | null;
2049
- messageSequence: number | null;
2050
- toolExecutionId: string | null;
2051
- resourceKey: string | null;
2052
- managerInstanceId: string | null;
2053
- checkpointId?: string | null | undefined;
2054
- snapshotIndex?: number | null | undefined;
2055
- }>>, "many">;
2056
- sourceQuotes: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2057
- }, "strict", z.ZodTypeAny, {
2058
- id: string & z.BRAND<"CompactionSemanticItemId">;
2059
- text: string;
2060
- provenance: Readonly<{
2061
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2062
- sessionId: number | null;
2063
- checkpointId: string | null;
2064
- messageSequence: number | null;
2065
- toolExecutionId: string | null;
2066
- resourceKey: string | null;
2067
- managerInstanceId: string | null;
2068
- snapshotIndex: number | null;
2069
- }>[];
2070
- sourceQuotes: string[];
2071
- harnessKey?: string | undefined;
2072
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
2073
- }, {
2074
- id: string;
2075
- text: string;
2076
- provenance: Readonly<{
2077
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2078
- sessionId: number | null;
2079
- messageSequence: number | null;
2080
- toolExecutionId: string | null;
2081
- resourceKey: string | null;
2082
- managerInstanceId: string | null;
2083
- checkpointId?: string | null | undefined;
2084
- snapshotIndex?: number | null | undefined;
2085
- }>[];
2086
- harnessKey?: string | undefined;
2087
- relatedItemId?: string | undefined;
2088
- sourceQuotes?: string[] | undefined;
2089
- }>>, "many">;
630
+ }, z.core.$strict>>>;
631
+ sourceQuotes: z.ZodDefault<z.ZodArray<z.ZodString>>;
632
+ }, z.core.$strict>>>;
2090
633
  prunedItemCounts: z.ZodDefault<z.ZodReadonly<z.ZodObject<{
2091
634
  constraint: z.ZodDefault<z.ZodNumber>;
2092
635
  decision: z.ZodNumber;
@@ -2095,646 +638,35 @@ export declare const compactionCheckpointV2Schema: z.ZodReadonly<z.ZodEffects<z.
2095
638
  resource: z.ZodNumber;
2096
639
  running_session: z.ZodNumber;
2097
640
  uncertainty: z.ZodNumber;
2098
- }, "strict", z.ZodTypeAny, {
2099
- resource: number;
2100
- decision: number;
2101
- running_session: number;
2102
- constraint: number;
2103
- completed_work: number;
2104
- pending_work: number;
2105
- uncertainty: number;
2106
- }, {
2107
- resource: number;
2108
- decision: number;
2109
- running_session: number;
2110
- completed_work: number;
2111
- pending_work: number;
2112
- uncertainty: number;
2113
- constraint?: number | undefined;
2114
- }>>>;
2115
- }, "strict", z.ZodTypeAny, {
2116
- version: 1;
2117
- resources: Readonly<{
2118
- id: string & z.BRAND<"CompactionSemanticItemId">;
2119
- resourceKey: string;
2120
- provenance: Readonly<{
2121
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2122
- sessionId: number | null;
2123
- checkpointId: string | null;
2124
- messageSequence: number | null;
2125
- toolExecutionId: string | null;
2126
- resourceKey: string | null;
2127
- managerInstanceId: string | null;
2128
- snapshotIndex: number | null;
2129
- }>[];
2130
- }>[];
2131
- goal: Readonly<{
2132
- id: string & z.BRAND<"CompactionSemanticItemId">;
2133
- text: string;
2134
- provenance: Readonly<{
2135
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2136
- sessionId: number | null;
2137
- checkpointId: string | null;
2138
- messageSequence: number | null;
2139
- toolExecutionId: string | null;
2140
- resourceKey: string | null;
2141
- managerInstanceId: string | null;
2142
- snapshotIndex: number | null;
2143
- }>[];
2144
- sourceQuotes: string[];
2145
- harnessKey?: string | undefined;
2146
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
2147
- }> | null;
2148
- constraints: Readonly<{
2149
- id: string & z.BRAND<"CompactionSemanticItemId">;
2150
- text: string;
2151
- provenance: Readonly<{
2152
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2153
- sessionId: number | null;
2154
- checkpointId: string | null;
2155
- messageSequence: number | null;
2156
- toolExecutionId: string | null;
2157
- resourceKey: string | null;
2158
- managerInstanceId: string | null;
2159
- snapshotIndex: number | null;
2160
- }>[];
2161
- sourceQuotes: string[];
2162
- harnessKey?: string | undefined;
2163
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
2164
- }>[];
2165
- decisions: Readonly<{
2166
- id: string & z.BRAND<"CompactionSemanticItemId">;
2167
- text: string;
2168
- provenance: Readonly<{
2169
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2170
- sessionId: number | null;
2171
- checkpointId: string | null;
2172
- messageSequence: number | null;
2173
- toolExecutionId: string | null;
2174
- resourceKey: string | null;
2175
- managerInstanceId: string | null;
2176
- snapshotIndex: number | null;
2177
- }>[];
2178
- sourceQuotes: string[];
2179
- harnessKey?: string | undefined;
2180
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
2181
- }>[];
2182
- completedWork: Readonly<{
2183
- id: string & z.BRAND<"CompactionSemanticItemId">;
2184
- text: string;
2185
- provenance: Readonly<{
2186
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2187
- sessionId: number | null;
2188
- checkpointId: string | null;
2189
- messageSequence: number | null;
2190
- toolExecutionId: string | null;
2191
- resourceKey: string | null;
2192
- managerInstanceId: string | null;
2193
- snapshotIndex: number | null;
2194
- }>[];
2195
- sourceQuotes: string[];
2196
- harnessKey?: string | undefined;
2197
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
2198
- }>[];
2199
- pendingWork: Readonly<{
2200
- id: string & z.BRAND<"CompactionSemanticItemId">;
2201
- text: string;
2202
- provenance: Readonly<{
2203
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2204
- sessionId: number | null;
2205
- checkpointId: string | null;
2206
- messageSequence: number | null;
2207
- toolExecutionId: string | null;
2208
- resourceKey: string | null;
2209
- managerInstanceId: string | null;
2210
- snapshotIndex: number | null;
2211
- }>[];
2212
- sourceQuotes: string[];
2213
- harnessKey?: string | undefined;
2214
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
2215
- }>[];
2216
- runningSessions: Readonly<{
2217
- id: string & z.BRAND<"CompactionSemanticItemId">;
2218
- sessionId: number;
2219
- managerInstanceId: string;
2220
- provenance: Readonly<{
2221
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2222
- sessionId: number | null;
2223
- checkpointId: string | null;
2224
- messageSequence: number | null;
2225
- toolExecutionId: string | null;
2226
- resourceKey: string | null;
2227
- managerInstanceId: string | null;
2228
- snapshotIndex: number | null;
2229
- }>[];
2230
- }>[];
2231
- uncertainties: Readonly<{
2232
- id: string & z.BRAND<"CompactionSemanticItemId">;
2233
- text: string;
2234
- provenance: Readonly<{
2235
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2236
- sessionId: number | null;
2237
- checkpointId: string | null;
2238
- messageSequence: number | null;
2239
- toolExecutionId: string | null;
2240
- resourceKey: string | null;
2241
- managerInstanceId: string | null;
2242
- snapshotIndex: number | null;
2243
- }>[];
2244
- sourceQuotes: string[];
2245
- harnessKey?: string | undefined;
2246
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
2247
- }>[];
2248
- prunedItemCounts: Readonly<{
2249
- resource: number;
2250
- decision: number;
2251
- running_session: number;
2252
- constraint: number;
2253
- completed_work: number;
2254
- pending_work: number;
2255
- uncertainty: number;
2256
- }>;
2257
- scopeId?: string | undefined;
2258
- }, {
2259
- version: 1;
2260
- resources: Readonly<{
2261
- id: string;
2262
- resourceKey: string;
2263
- provenance: Readonly<{
2264
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2265
- sessionId: number | null;
2266
- messageSequence: number | null;
2267
- toolExecutionId: string | null;
2268
- resourceKey: string | null;
2269
- managerInstanceId: string | null;
2270
- checkpointId?: string | null | undefined;
2271
- snapshotIndex?: number | null | undefined;
2272
- }>[];
2273
- }>[];
2274
- goal: Readonly<{
2275
- id: string;
2276
- text: string;
2277
- provenance: Readonly<{
2278
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2279
- sessionId: number | null;
2280
- messageSequence: number | null;
2281
- toolExecutionId: string | null;
2282
- resourceKey: string | null;
2283
- managerInstanceId: string | null;
2284
- checkpointId?: string | null | undefined;
2285
- snapshotIndex?: number | null | undefined;
2286
- }>[];
2287
- harnessKey?: string | undefined;
2288
- relatedItemId?: string | undefined;
2289
- sourceQuotes?: string[] | undefined;
2290
- }> | null;
2291
- decisions: Readonly<{
2292
- id: string;
2293
- text: string;
2294
- provenance: Readonly<{
2295
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2296
- sessionId: number | null;
2297
- messageSequence: number | null;
2298
- toolExecutionId: string | null;
2299
- resourceKey: string | null;
2300
- managerInstanceId: string | null;
2301
- checkpointId?: string | null | undefined;
2302
- snapshotIndex?: number | null | undefined;
2303
- }>[];
2304
- harnessKey?: string | undefined;
2305
- relatedItemId?: string | undefined;
2306
- sourceQuotes?: string[] | undefined;
2307
- }>[];
2308
- completedWork: Readonly<{
2309
- id: string;
2310
- text: string;
2311
- provenance: Readonly<{
2312
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2313
- sessionId: number | null;
2314
- messageSequence: number | null;
2315
- toolExecutionId: string | null;
2316
- resourceKey: string | null;
2317
- managerInstanceId: string | null;
2318
- checkpointId?: string | null | undefined;
2319
- snapshotIndex?: number | null | undefined;
2320
- }>[];
2321
- harnessKey?: string | undefined;
2322
- relatedItemId?: string | undefined;
2323
- sourceQuotes?: string[] | undefined;
2324
- }>[];
2325
- pendingWork: Readonly<{
2326
- id: string;
2327
- text: string;
2328
- provenance: Readonly<{
2329
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2330
- sessionId: number | null;
2331
- messageSequence: number | null;
2332
- toolExecutionId: string | null;
2333
- resourceKey: string | null;
2334
- managerInstanceId: string | null;
2335
- checkpointId?: string | null | undefined;
2336
- snapshotIndex?: number | null | undefined;
2337
- }>[];
2338
- harnessKey?: string | undefined;
2339
- relatedItemId?: string | undefined;
2340
- sourceQuotes?: string[] | undefined;
2341
- }>[];
2342
- runningSessions: Readonly<{
2343
- id: string;
2344
- sessionId: number;
2345
- managerInstanceId: string;
2346
- provenance: Readonly<{
2347
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2348
- sessionId: number | null;
2349
- messageSequence: number | null;
2350
- toolExecutionId: string | null;
2351
- resourceKey: string | null;
2352
- managerInstanceId: string | null;
2353
- checkpointId?: string | null | undefined;
2354
- snapshotIndex?: number | null | undefined;
2355
- }>[];
2356
- }>[];
2357
- uncertainties: Readonly<{
2358
- id: string;
2359
- text: string;
2360
- provenance: Readonly<{
2361
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2362
- sessionId: number | null;
2363
- messageSequence: number | null;
2364
- toolExecutionId: string | null;
2365
- resourceKey: string | null;
2366
- managerInstanceId: string | null;
2367
- checkpointId?: string | null | undefined;
2368
- snapshotIndex?: number | null | undefined;
2369
- }>[];
2370
- harnessKey?: string | undefined;
2371
- relatedItemId?: string | undefined;
2372
- sourceQuotes?: string[] | undefined;
2373
- }>[];
2374
- scopeId?: string | undefined;
2375
- constraints?: Readonly<{
2376
- id: string;
2377
- text: string;
2378
- provenance: Readonly<{
2379
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2380
- sessionId: number | null;
2381
- messageSequence: number | null;
2382
- toolExecutionId: string | null;
2383
- resourceKey: string | null;
2384
- managerInstanceId: string | null;
2385
- checkpointId?: string | null | undefined;
2386
- snapshotIndex?: number | null | undefined;
2387
- }>[];
2388
- harnessKey?: string | undefined;
2389
- relatedItemId?: string | undefined;
2390
- sourceQuotes?: string[] | undefined;
2391
- }>[] | undefined;
2392
- prunedItemCounts?: Readonly<{
2393
- resource: number;
2394
- decision: number;
2395
- running_session: number;
2396
- completed_work: number;
2397
- pending_work: number;
2398
- uncertainty: number;
2399
- constraint?: number | undefined;
2400
- }> | undefined;
2401
- }>, {
2402
- version: 1;
2403
- resources: Readonly<{
2404
- id: string & z.BRAND<"CompactionSemanticItemId">;
2405
- resourceKey: string;
2406
- provenance: Readonly<{
2407
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2408
- sessionId: number | null;
2409
- checkpointId: string | null;
2410
- messageSequence: number | null;
2411
- toolExecutionId: string | null;
2412
- resourceKey: string | null;
2413
- managerInstanceId: string | null;
2414
- snapshotIndex: number | null;
2415
- }>[];
2416
- }>[];
2417
- goal: Readonly<{
2418
- id: string & z.BRAND<"CompactionSemanticItemId">;
2419
- text: string;
2420
- provenance: Readonly<{
2421
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2422
- sessionId: number | null;
2423
- checkpointId: string | null;
2424
- messageSequence: number | null;
2425
- toolExecutionId: string | null;
2426
- resourceKey: string | null;
2427
- managerInstanceId: string | null;
2428
- snapshotIndex: number | null;
2429
- }>[];
2430
- sourceQuotes: string[];
2431
- harnessKey?: string | undefined;
2432
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
2433
- }> | null;
2434
- constraints: Readonly<{
2435
- id: string & z.BRAND<"CompactionSemanticItemId">;
2436
- text: string;
2437
- provenance: Readonly<{
2438
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2439
- sessionId: number | null;
2440
- checkpointId: string | null;
2441
- messageSequence: number | null;
2442
- toolExecutionId: string | null;
2443
- resourceKey: string | null;
2444
- managerInstanceId: string | null;
2445
- snapshotIndex: number | null;
2446
- }>[];
2447
- sourceQuotes: string[];
2448
- harnessKey?: string | undefined;
2449
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
2450
- }>[];
2451
- decisions: Readonly<{
2452
- id: string & z.BRAND<"CompactionSemanticItemId">;
2453
- text: string;
2454
- provenance: Readonly<{
2455
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2456
- sessionId: number | null;
2457
- checkpointId: string | null;
2458
- messageSequence: number | null;
2459
- toolExecutionId: string | null;
2460
- resourceKey: string | null;
2461
- managerInstanceId: string | null;
2462
- snapshotIndex: number | null;
2463
- }>[];
2464
- sourceQuotes: string[];
2465
- harnessKey?: string | undefined;
2466
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
2467
- }>[];
2468
- completedWork: Readonly<{
2469
- id: string & z.BRAND<"CompactionSemanticItemId">;
2470
- text: string;
2471
- provenance: Readonly<{
2472
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2473
- sessionId: number | null;
2474
- checkpointId: string | null;
2475
- messageSequence: number | null;
2476
- toolExecutionId: string | null;
2477
- resourceKey: string | null;
2478
- managerInstanceId: string | null;
2479
- snapshotIndex: number | null;
2480
- }>[];
2481
- sourceQuotes: string[];
2482
- harnessKey?: string | undefined;
2483
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
2484
- }>[];
2485
- pendingWork: Readonly<{
2486
- id: string & z.BRAND<"CompactionSemanticItemId">;
2487
- text: string;
2488
- provenance: Readonly<{
2489
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2490
- sessionId: number | null;
2491
- checkpointId: string | null;
2492
- messageSequence: number | null;
2493
- toolExecutionId: string | null;
2494
- resourceKey: string | null;
2495
- managerInstanceId: string | null;
2496
- snapshotIndex: number | null;
2497
- }>[];
2498
- sourceQuotes: string[];
2499
- harnessKey?: string | undefined;
2500
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
2501
- }>[];
2502
- runningSessions: Readonly<{
2503
- id: string & z.BRAND<"CompactionSemanticItemId">;
2504
- sessionId: number;
2505
- managerInstanceId: string;
2506
- provenance: Readonly<{
2507
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2508
- sessionId: number | null;
2509
- checkpointId: string | null;
2510
- messageSequence: number | null;
2511
- toolExecutionId: string | null;
2512
- resourceKey: string | null;
2513
- managerInstanceId: string | null;
2514
- snapshotIndex: number | null;
2515
- }>[];
2516
- }>[];
2517
- uncertainties: Readonly<{
2518
- id: string & z.BRAND<"CompactionSemanticItemId">;
2519
- text: string;
2520
- provenance: Readonly<{
2521
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2522
- sessionId: number | null;
2523
- checkpointId: string | null;
2524
- messageSequence: number | null;
2525
- toolExecutionId: string | null;
2526
- resourceKey: string | null;
2527
- managerInstanceId: string | null;
2528
- snapshotIndex: number | null;
2529
- }>[];
2530
- sourceQuotes: string[];
2531
- harnessKey?: string | undefined;
2532
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
2533
- }>[];
2534
- prunedItemCounts: Readonly<{
2535
- resource: number;
2536
- decision: number;
2537
- running_session: number;
2538
- constraint: number;
2539
- completed_work: number;
2540
- pending_work: number;
2541
- uncertainty: number;
2542
- }>;
2543
- scopeId?: string | undefined;
2544
- }, {
2545
- version: 1;
2546
- resources: Readonly<{
2547
- id: string;
2548
- resourceKey: string;
2549
- provenance: Readonly<{
2550
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2551
- sessionId: number | null;
2552
- messageSequence: number | null;
2553
- toolExecutionId: string | null;
2554
- resourceKey: string | null;
2555
- managerInstanceId: string | null;
2556
- checkpointId?: string | null | undefined;
2557
- snapshotIndex?: number | null | undefined;
2558
- }>[];
2559
- }>[];
2560
- goal: Readonly<{
2561
- id: string;
2562
- text: string;
2563
- provenance: Readonly<{
2564
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2565
- sessionId: number | null;
2566
- messageSequence: number | null;
2567
- toolExecutionId: string | null;
2568
- resourceKey: string | null;
2569
- managerInstanceId: string | null;
2570
- checkpointId?: string | null | undefined;
2571
- snapshotIndex?: number | null | undefined;
2572
- }>[];
2573
- harnessKey?: string | undefined;
2574
- relatedItemId?: string | undefined;
2575
- sourceQuotes?: string[] | undefined;
2576
- }> | null;
2577
- decisions: Readonly<{
2578
- id: string;
2579
- text: string;
2580
- provenance: Readonly<{
2581
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2582
- sessionId: number | null;
2583
- messageSequence: number | null;
2584
- toolExecutionId: string | null;
2585
- resourceKey: string | null;
2586
- managerInstanceId: string | null;
2587
- checkpointId?: string | null | undefined;
2588
- snapshotIndex?: number | null | undefined;
2589
- }>[];
2590
- harnessKey?: string | undefined;
2591
- relatedItemId?: string | undefined;
2592
- sourceQuotes?: string[] | undefined;
2593
- }>[];
2594
- completedWork: Readonly<{
2595
- id: string;
2596
- text: string;
2597
- provenance: Readonly<{
2598
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2599
- sessionId: number | null;
2600
- messageSequence: number | null;
2601
- toolExecutionId: string | null;
2602
- resourceKey: string | null;
2603
- managerInstanceId: string | null;
2604
- checkpointId?: string | null | undefined;
2605
- snapshotIndex?: number | null | undefined;
2606
- }>[];
2607
- harnessKey?: string | undefined;
2608
- relatedItemId?: string | undefined;
2609
- sourceQuotes?: string[] | undefined;
2610
- }>[];
2611
- pendingWork: Readonly<{
2612
- id: string;
2613
- text: string;
2614
- provenance: Readonly<{
2615
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2616
- sessionId: number | null;
2617
- messageSequence: number | null;
2618
- toolExecutionId: string | null;
2619
- resourceKey: string | null;
2620
- managerInstanceId: string | null;
2621
- checkpointId?: string | null | undefined;
2622
- snapshotIndex?: number | null | undefined;
2623
- }>[];
2624
- harnessKey?: string | undefined;
2625
- relatedItemId?: string | undefined;
2626
- sourceQuotes?: string[] | undefined;
2627
- }>[];
2628
- runningSessions: Readonly<{
2629
- id: string;
2630
- sessionId: number;
2631
- managerInstanceId: string;
2632
- provenance: Readonly<{
2633
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2634
- sessionId: number | null;
2635
- messageSequence: number | null;
2636
- toolExecutionId: string | null;
2637
- resourceKey: string | null;
2638
- managerInstanceId: string | null;
2639
- checkpointId?: string | null | undefined;
2640
- snapshotIndex?: number | null | undefined;
2641
- }>[];
2642
- }>[];
2643
- uncertainties: Readonly<{
2644
- id: string;
2645
- text: string;
2646
- provenance: Readonly<{
2647
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2648
- sessionId: number | null;
2649
- messageSequence: number | null;
2650
- toolExecutionId: string | null;
2651
- resourceKey: string | null;
2652
- managerInstanceId: string | null;
2653
- checkpointId?: string | null | undefined;
2654
- snapshotIndex?: number | null | undefined;
2655
- }>[];
2656
- harnessKey?: string | undefined;
2657
- relatedItemId?: string | undefined;
2658
- sourceQuotes?: string[] | undefined;
2659
- }>[];
2660
- scopeId?: string | undefined;
2661
- constraints?: Readonly<{
2662
- id: string;
2663
- text: string;
2664
- provenance: Readonly<{
2665
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
2666
- sessionId: number | null;
2667
- messageSequence: number | null;
2668
- toolExecutionId: string | null;
2669
- resourceKey: string | null;
2670
- managerInstanceId: string | null;
2671
- checkpointId?: string | null | undefined;
2672
- snapshotIndex?: number | null | undefined;
2673
- }>[];
2674
- harnessKey?: string | undefined;
2675
- relatedItemId?: string | undefined;
2676
- sourceQuotes?: string[] | undefined;
2677
- }>[] | undefined;
2678
- prunedItemCounts?: Readonly<{
2679
- resource: number;
2680
- decision: number;
2681
- running_session: number;
2682
- completed_work: number;
2683
- pending_work: number;
2684
- uncertainty: number;
2685
- constraint?: number | undefined;
2686
- }> | undefined;
2687
- }>>;
641
+ }, z.core.$strict>>>;
642
+ }, z.core.$strict>>;
2688
643
  semanticEvidence: z.ZodDefault<z.ZodReadonly<z.ZodObject<{
2689
644
  messagesThroughSequence: z.ZodNumber;
2690
645
  toolExecutionsThroughSequence: z.ZodNumber;
2691
- }, "strict", z.ZodTypeAny, {
2692
- messagesThroughSequence: number;
2693
- toolExecutionsThroughSequence: number;
2694
- }, {
2695
- messagesThroughSequence: number;
2696
- toolExecutionsThroughSequence: number;
2697
- }>>>;
646
+ }, z.core.$strict>>>;
2698
647
  toolEvidenceCursor: z.ZodOptional<z.ZodNumber>;
2699
648
  goal: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
2700
649
  verbatimRequest: z.ZodString;
2701
650
  sourceSequence: z.ZodNumber;
2702
- status: z.ZodEnum<["active", "interrupted", "unknown"]>;
2703
- }, "strict", z.ZodTypeAny, {
2704
- status: "unknown" | "active" | "interrupted";
2705
- verbatimRequest: string;
2706
- sourceSequence: number;
2707
- }, {
2708
- status: "unknown" | "active" | "interrupted";
2709
- verbatimRequest: string;
2710
- sourceSequence: number;
2711
- }>>>;
651
+ status: z.ZodEnum<{
652
+ unknown: "unknown";
653
+ active: "active";
654
+ interrupted: "interrupted";
655
+ }>;
656
+ }, z.core.$strict>>>;
2712
657
  constraints: z.ZodArray<z.ZodReadonly<z.ZodObject<{
2713
658
  quote: z.ZodString;
2714
659
  sourceSequence: z.ZodNumber;
2715
- }, "strict", z.ZodTypeAny, {
2716
- sourceSequence: number;
2717
- quote: string;
2718
- }, {
2719
- sourceSequence: number;
2720
- quote: string;
2721
- }>>, "many">;
660
+ }, z.core.$strict>>>;
2722
661
  resources: z.ZodArray<z.ZodReadonly<z.ZodObject<{
2723
662
  key: z.ZodString;
2724
- mode: z.ZodEnum<["read", "write"]>;
663
+ mode: z.ZodEnum<{
664
+ read: "read";
665
+ write: "write";
666
+ }>;
2725
667
  evidenceToolCallId: z.ZodString;
2726
668
  evidenceExecutionId: z.ZodString;
2727
- }, "strict", z.ZodTypeAny, {
2728
- key: string;
2729
- mode: "read" | "write";
2730
- evidenceToolCallId: string;
2731
- evidenceExecutionId: string;
2732
- }, {
2733
- key: string;
2734
- mode: "read" | "write";
2735
- evidenceToolCallId: string;
2736
- evidenceExecutionId: string;
2737
- }>>, "many">;
669
+ }, z.core.$strict>>>;
2738
670
  toolState: z.ZodReadonly<z.ZodObject<{
2739
671
  countsByOutcome: z.ZodReadonly<z.ZodObject<{
2740
672
  success: z.ZodNumber;
@@ -2743,145 +675,63 @@ export declare const compactionCheckpointV2Schema: z.ZodReadonly<z.ZodEffects<z.
2743
675
  invalid_input: z.ZodNumber;
2744
676
  cancelled: z.ZodNumber;
2745
677
  tool_failed: z.ZodNumber;
2746
- }, "strict", z.ZodTypeAny, {
2747
- success: number;
2748
- cancelled: number;
2749
- invalid_input: number;
2750
- user_rejected: number;
2751
- policy_denied: number;
2752
- tool_failed: number;
2753
- }, {
2754
- success: number;
2755
- cancelled: number;
2756
- invalid_input: number;
2757
- user_rejected: number;
2758
- policy_denied: number;
2759
- tool_failed: number;
2760
- }>>;
678
+ }, z.core.$strict>>;
2761
679
  recentRecords: z.ZodArray<z.ZodReadonly<z.ZodObject<{
2762
680
  executionId: z.ZodString;
2763
681
  sequence: z.ZodNumber;
2764
682
  toolCallId: z.ZodString;
2765
683
  agentName: z.ZodString;
2766
684
  toolName: z.ZodString;
2767
- outcome: z.ZodReadonly<z.ZodEffects<z.ZodObject<{
2768
- kind: z.ZodEnum<["success", "user_rejected", "policy_denied", "invalid_input", "cancelled", "tool_failed"]>;
685
+ outcome: z.ZodReadonly<z.ZodObject<{
686
+ kind: z.ZodEnum<{
687
+ success: "success";
688
+ user_rejected: "user_rejected";
689
+ policy_denied: "policy_denied";
690
+ invalid_input: "invalid_input";
691
+ cancelled: "cancelled";
692
+ tool_failed: "tool_failed";
693
+ }>;
2769
694
  reason: z.ZodOptional<z.ZodString>;
2770
- executionState: z.ZodOptional<z.ZodEnum<["not_executed", "outcome_unknown"]>>;
2771
- }, "strict", z.ZodTypeAny, {
2772
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
2773
- reason?: string | undefined;
2774
- executionState?: "not_executed" | "outcome_unknown" | undefined;
2775
- }, {
2776
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
2777
- reason?: string | undefined;
2778
- executionState?: "not_executed" | "outcome_unknown" | undefined;
2779
- }>, {
2780
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
2781
- reason?: string | undefined;
2782
- executionState?: "not_executed" | "outcome_unknown" | undefined;
2783
- }, {
2784
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
2785
- reason?: string | undefined;
2786
- executionState?: "not_executed" | "outcome_unknown" | undefined;
2787
- }>>;
2788
- }, "strict", z.ZodTypeAny, {
2789
- toolCallId: string;
2790
- toolName: string;
2791
- agentName: string;
2792
- outcome: Readonly<{
2793
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
2794
- reason?: string | undefined;
2795
- executionState?: "not_executed" | "outcome_unknown" | undefined;
2796
- }>;
2797
- sequence: number;
2798
- executionId: string;
2799
- }, {
2800
- toolCallId: string;
2801
- toolName: string;
2802
- agentName: string;
2803
- outcome: Readonly<{
2804
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
2805
- reason?: string | undefined;
2806
- executionState?: "not_executed" | "outcome_unknown" | undefined;
2807
- }>;
2808
- sequence: number;
2809
- executionId: string;
2810
- }>>, "many">;
2811
- integrityStatus: z.ZodEnum<["valid", "sanitized", "invalid"]>;
695
+ executionState: z.ZodOptional<z.ZodEnum<{
696
+ not_executed: "not_executed";
697
+ outcome_unknown: "outcome_unknown";
698
+ }>>;
699
+ }, z.core.$strict>>;
700
+ }, z.core.$strict>>>;
701
+ integrityStatus: z.ZodEnum<{
702
+ invalid: "invalid";
703
+ valid: "valid";
704
+ sanitized: "sanitized";
705
+ }>;
2812
706
  anomalies: z.ZodArray<z.ZodReadonly<z.ZodObject<{
2813
- kind: z.ZodEnum<["orphan_result", "dangling_call", "duplicate_call", "duplicate_result", "record_without_call", "record_without_result", "result_without_record"]>;
707
+ kind: z.ZodEnum<{
708
+ orphan_result: "orphan_result";
709
+ dangling_call: "dangling_call";
710
+ duplicate_call: "duplicate_call";
711
+ duplicate_result: "duplicate_result";
712
+ record_without_call: "record_without_call";
713
+ record_without_result: "record_without_result";
714
+ result_without_record: "result_without_record";
715
+ }>;
2814
716
  toolCallId: z.ZodString;
2815
717
  count: z.ZodOptional<z.ZodNumber>;
2816
- }, "strict", z.ZodTypeAny, {
2817
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
2818
- toolCallId: string;
2819
- count?: number | undefined;
2820
- }, {
2821
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
2822
- toolCallId: string;
2823
- count?: number | undefined;
2824
- }>>, "many">;
2825
- }, "strict", z.ZodTypeAny, {
2826
- countsByOutcome: Readonly<{
2827
- success: number;
2828
- cancelled: number;
2829
- invalid_input: number;
2830
- user_rejected: number;
2831
- policy_denied: number;
2832
- tool_failed: number;
2833
- }>;
2834
- recentRecords: Readonly<{
2835
- toolCallId: string;
2836
- toolName: string;
2837
- agentName: string;
2838
- outcome: Readonly<{
2839
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
2840
- reason?: string | undefined;
2841
- executionState?: "not_executed" | "outcome_unknown" | undefined;
2842
- }>;
2843
- sequence: number;
2844
- executionId: string;
2845
- }>[];
2846
- integrityStatus: "invalid" | "valid" | "sanitized";
2847
- anomalies: Readonly<{
2848
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
2849
- toolCallId: string;
2850
- count?: number | undefined;
2851
- }>[];
2852
- }, {
2853
- countsByOutcome: Readonly<{
2854
- success: number;
2855
- cancelled: number;
2856
- invalid_input: number;
2857
- user_rejected: number;
2858
- policy_denied: number;
2859
- tool_failed: number;
2860
- }>;
2861
- recentRecords: Readonly<{
2862
- toolCallId: string;
2863
- toolName: string;
2864
- agentName: string;
2865
- outcome: Readonly<{
2866
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
2867
- reason?: string | undefined;
2868
- executionState?: "not_executed" | "outcome_unknown" | undefined;
2869
- }>;
2870
- sequence: number;
2871
- executionId: string;
2872
- }>[];
2873
- integrityStatus: "invalid" | "valid" | "sanitized";
2874
- anomalies: Readonly<{
2875
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
2876
- toolCallId: string;
2877
- count?: number | undefined;
2878
- }>[];
2879
- }>>;
718
+ }, z.core.$strict>>>;
719
+ }, z.core.$strict>>;
2880
720
  runningWork: z.ZodArray<z.ZodReadonly<z.ZodObject<{
2881
721
  managerInstanceId: z.ZodString;
2882
722
  sessionId: z.ZodNumber;
2883
- state: z.ZodEnum<["running", "draining", "stopping", "completed", "cleanup-failed"]>;
2884
- recoverability: z.ZodEnum<["live", "stale", "unavailable"]>;
723
+ state: z.ZodEnum<{
724
+ completed: "completed";
725
+ running: "running";
726
+ draining: "draining";
727
+ stopping: "stopping";
728
+ "cleanup-failed": "cleanup-failed";
729
+ }>;
730
+ recoverability: z.ZodEnum<{
731
+ unavailable: "unavailable";
732
+ live: "live";
733
+ stale: "stale";
734
+ }>;
2885
735
  commandPreview: z.ZodString;
2886
736
  workdir: z.ZodString;
2887
737
  observedAt: z.ZodString;
@@ -2889,1131 +739,55 @@ export declare const compactionCheckpointV2Schema: z.ZodReadonly<z.ZodEffects<z.
2889
739
  exitCode: z.ZodOptional<z.ZodNumber>;
2890
740
  terminationCause: z.ZodOptional<z.ZodString>;
2891
741
  cleanupError: z.ZodOptional<z.ZodString>;
2892
- }, "strict", z.ZodTypeAny, {
2893
- sessionId: number;
2894
- state: "completed" | "cleanup-failed" | "running" | "draining" | "stopping";
2895
- managerInstanceId: string;
2896
- workdir: string;
2897
- recoverability: "unavailable" | "live" | "stale";
2898
- commandPreview: string;
2899
- observedAt: string;
2900
- exitCode?: number | undefined;
2901
- terminationCause?: string | undefined;
2902
- wallTimeMs?: number | undefined;
2903
- cleanupError?: string | undefined;
2904
- }, {
2905
- sessionId: number;
2906
- state: "completed" | "cleanup-failed" | "running" | "draining" | "stopping";
2907
- managerInstanceId: string;
2908
- workdir: string;
2909
- recoverability: "unavailable" | "live" | "stale";
2910
- commandPreview: string;
2911
- observedAt: string;
2912
- exitCode?: number | undefined;
2913
- terminationCause?: string | undefined;
2914
- wallTimeMs?: number | undefined;
2915
- cleanupError?: string | undefined;
2916
- }>>, "many">;
742
+ }, z.core.$strict>>>;
2917
743
  context: z.ZodReadonly<z.ZodObject<{
2918
744
  cwd: z.ZodString;
2919
- stableRuleIds: z.ZodArray<z.ZodString, "many">;
745
+ stableRuleIds: z.ZodArray<z.ZodString>;
2920
746
  systemPromptSha256: z.ZodOptional<z.ZodString>;
2921
747
  skills: z.ZodArray<z.ZodReadonly<z.ZodObject<{
2922
748
  name: z.ZodString;
2923
- source: z.ZodEnum<["agent", "project", "user", "config"]>;
2924
- }, "strict", z.ZodTypeAny, {
2925
- name: string;
2926
- source: "config" | "user" | "agent" | "project";
2927
- }, {
2928
- name: string;
2929
- source: "config" | "user" | "agent" | "project";
2930
- }>>, "many">;
2931
- explicitSkillNames: z.ZodArray<z.ZodString, "many">;
2932
- }, "strict", z.ZodTypeAny, {
2933
- cwd: string;
2934
- skills: Readonly<{
2935
- name: string;
2936
- source: "config" | "user" | "agent" | "project";
2937
- }>[];
2938
- stableRuleIds: string[];
2939
- explicitSkillNames: string[];
2940
- systemPromptSha256?: string | undefined;
2941
- }, {
2942
- cwd: string;
2943
- skills: Readonly<{
2944
- name: string;
2945
- source: "config" | "user" | "agent" | "project";
2946
- }>[];
2947
- stableRuleIds: string[];
2948
- explicitSkillNames: string[];
2949
- systemPromptSha256?: string | undefined;
2950
- }>>;
2951
- summary: z.ZodReadonly<z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
749
+ source: z.ZodEnum<{
750
+ agent: "agent";
751
+ project: "project";
752
+ user: "user";
753
+ config: "config";
754
+ }>;
755
+ }, z.core.$strict>>>;
756
+ explicitSkillNames: z.ZodArray<z.ZodString>;
757
+ }, z.core.$strict>>;
758
+ summary: z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodObject<{
2952
759
  status: z.ZodLiteral<"valid">;
2953
760
  digest: z.ZodString;
2954
- }, "strict", z.ZodTypeAny, {
2955
- status: "valid";
2956
- digest: string;
2957
- }, {
2958
- status: "valid";
2959
- digest: string;
2960
- }>, z.ZodObject<{
761
+ }, z.core.$strict>, z.ZodObject<{
2961
762
  status: z.ZodLiteral<"fallback">;
2962
763
  reason: z.ZodString;
2963
- lastValidCheckpointId: z.ZodOptional<z.ZodBranded<z.ZodString, "CompactionCheckpointId">>;
2964
- }, "strict", z.ZodTypeAny, {
2965
- status: "fallback";
2966
- reason: string;
2967
- lastValidCheckpointId?: (string & z.BRAND<"CompactionCheckpointId">) | undefined;
2968
- }, {
2969
- status: "fallback";
2970
- reason: string;
2971
- lastValidCheckpointId?: string | undefined;
2972
- }>, z.ZodObject<{
764
+ lastValidCheckpointId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "CompactionCheckpointId", "out">>;
765
+ }, z.core.$strict>, z.ZodObject<{
2973
766
  status: z.ZodLiteral<"skipped">;
2974
- lastValidCheckpointId: z.ZodOptional<z.ZodBranded<z.ZodString, "CompactionCheckpointId">>;
2975
- }, "strict", z.ZodTypeAny, {
2976
- status: "skipped";
2977
- lastValidCheckpointId?: (string & z.BRAND<"CompactionCheckpointId">) | undefined;
2978
- }, {
2979
- status: "skipped";
2980
- lastValidCheckpointId?: string | undefined;
2981
- }>]>>;
2982
- }, "strict", z.ZodTypeAny, {
2983
- version: 2;
2984
- id: string & z.BRAND<"CompactionCheckpointId">;
2985
- createdAt: string;
2986
- generation: number;
2987
- context: Readonly<{
2988
- cwd: string;
2989
- skills: Readonly<{
2990
- name: string;
2991
- source: "config" | "user" | "agent" | "project";
2992
- }>[];
2993
- stableRuleIds: string[];
2994
- explicitSkillNames: string[];
2995
- systemPromptSha256?: string | undefined;
2996
- }>;
2997
- resources: Readonly<{
2998
- key: string;
2999
- mode: "read" | "write";
3000
- evidenceToolCallId: string;
3001
- evidenceExecutionId: string;
3002
- }>[];
3003
- summary: Readonly<{
3004
- status: "valid";
3005
- digest: string;
3006
- }> | Readonly<{
3007
- status: "fallback";
3008
- reason: string;
3009
- lastValidCheckpointId?: (string & z.BRAND<"CompactionCheckpointId">) | undefined;
3010
- }> | Readonly<{
3011
- status: "skipped";
3012
- lastValidCheckpointId?: (string & z.BRAND<"CompactionCheckpointId">) | undefined;
3013
- }>;
3014
- constraints: Readonly<{
3015
- sourceSequence: number;
3016
- quote: string;
3017
- }>[];
3018
- toolState: Readonly<{
3019
- countsByOutcome: Readonly<{
3020
- success: number;
3021
- cancelled: number;
3022
- invalid_input: number;
3023
- user_rejected: number;
3024
- policy_denied: number;
3025
- tool_failed: number;
3026
- }>;
3027
- recentRecords: Readonly<{
3028
- toolCallId: string;
3029
- toolName: string;
3030
- agentName: string;
3031
- outcome: Readonly<{
3032
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
3033
- reason?: string | undefined;
3034
- executionState?: "not_executed" | "outcome_unknown" | undefined;
3035
- }>;
3036
- sequence: number;
3037
- executionId: string;
3038
- }>[];
3039
- integrityStatus: "invalid" | "valid" | "sanitized";
3040
- anomalies: Readonly<{
3041
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
3042
- toolCallId: string;
3043
- count?: number | undefined;
3044
- }>[];
3045
- }>;
3046
- runningWork: Readonly<{
3047
- sessionId: number;
3048
- state: "completed" | "cleanup-failed" | "running" | "draining" | "stopping";
3049
- managerInstanceId: string;
3050
- workdir: string;
3051
- recoverability: "unavailable" | "live" | "stale";
3052
- commandPreview: string;
3053
- observedAt: string;
3054
- exitCode?: number | undefined;
3055
- terminationCause?: string | undefined;
3056
- wallTimeMs?: number | undefined;
3057
- cleanupError?: string | undefined;
3058
- }>[];
3059
- transcript: Readonly<{
3060
- messages: {
3061
- fromSequenceExclusive: number;
3062
- throughSequence: number;
3063
- };
3064
- toolExecutions: {
3065
- fromSequenceExclusive: number;
3066
- throughSequence: number;
3067
- };
3068
- completeness: "complete" | "legacy_snapshot";
3069
- }>;
3070
- semanticState: Readonly<{
3071
- version: 1;
3072
- resources: Readonly<{
3073
- id: string & z.BRAND<"CompactionSemanticItemId">;
3074
- resourceKey: string;
3075
- provenance: Readonly<{
3076
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3077
- sessionId: number | null;
3078
- checkpointId: string | null;
3079
- messageSequence: number | null;
3080
- toolExecutionId: string | null;
3081
- resourceKey: string | null;
3082
- managerInstanceId: string | null;
3083
- snapshotIndex: number | null;
3084
- }>[];
3085
- }>[];
3086
- goal: Readonly<{
3087
- id: string & z.BRAND<"CompactionSemanticItemId">;
3088
- text: string;
3089
- provenance: Readonly<{
3090
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3091
- sessionId: number | null;
3092
- checkpointId: string | null;
3093
- messageSequence: number | null;
3094
- toolExecutionId: string | null;
3095
- resourceKey: string | null;
3096
- managerInstanceId: string | null;
3097
- snapshotIndex: number | null;
3098
- }>[];
3099
- sourceQuotes: string[];
3100
- harnessKey?: string | undefined;
3101
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
3102
- }> | null;
3103
- constraints: Readonly<{
3104
- id: string & z.BRAND<"CompactionSemanticItemId">;
3105
- text: string;
3106
- provenance: Readonly<{
3107
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3108
- sessionId: number | null;
3109
- checkpointId: string | null;
3110
- messageSequence: number | null;
3111
- toolExecutionId: string | null;
3112
- resourceKey: string | null;
3113
- managerInstanceId: string | null;
3114
- snapshotIndex: number | null;
3115
- }>[];
3116
- sourceQuotes: string[];
3117
- harnessKey?: string | undefined;
3118
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
3119
- }>[];
3120
- decisions: Readonly<{
3121
- id: string & z.BRAND<"CompactionSemanticItemId">;
3122
- text: string;
3123
- provenance: Readonly<{
3124
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3125
- sessionId: number | null;
3126
- checkpointId: string | null;
3127
- messageSequence: number | null;
3128
- toolExecutionId: string | null;
3129
- resourceKey: string | null;
3130
- managerInstanceId: string | null;
3131
- snapshotIndex: number | null;
3132
- }>[];
3133
- sourceQuotes: string[];
3134
- harnessKey?: string | undefined;
3135
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
3136
- }>[];
3137
- completedWork: Readonly<{
3138
- id: string & z.BRAND<"CompactionSemanticItemId">;
3139
- text: string;
3140
- provenance: Readonly<{
3141
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3142
- sessionId: number | null;
3143
- checkpointId: string | null;
3144
- messageSequence: number | null;
3145
- toolExecutionId: string | null;
3146
- resourceKey: string | null;
3147
- managerInstanceId: string | null;
3148
- snapshotIndex: number | null;
3149
- }>[];
3150
- sourceQuotes: string[];
3151
- harnessKey?: string | undefined;
3152
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
3153
- }>[];
3154
- pendingWork: Readonly<{
3155
- id: string & z.BRAND<"CompactionSemanticItemId">;
3156
- text: string;
3157
- provenance: Readonly<{
3158
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3159
- sessionId: number | null;
3160
- checkpointId: string | null;
3161
- messageSequence: number | null;
3162
- toolExecutionId: string | null;
3163
- resourceKey: string | null;
3164
- managerInstanceId: string | null;
3165
- snapshotIndex: number | null;
3166
- }>[];
3167
- sourceQuotes: string[];
3168
- harnessKey?: string | undefined;
3169
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
3170
- }>[];
3171
- runningSessions: Readonly<{
3172
- id: string & z.BRAND<"CompactionSemanticItemId">;
3173
- sessionId: number;
3174
- managerInstanceId: string;
3175
- provenance: Readonly<{
3176
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3177
- sessionId: number | null;
3178
- checkpointId: string | null;
3179
- messageSequence: number | null;
3180
- toolExecutionId: string | null;
3181
- resourceKey: string | null;
3182
- managerInstanceId: string | null;
3183
- snapshotIndex: number | null;
3184
- }>[];
3185
- }>[];
3186
- uncertainties: Readonly<{
3187
- id: string & z.BRAND<"CompactionSemanticItemId">;
3188
- text: string;
3189
- provenance: Readonly<{
3190
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3191
- sessionId: number | null;
3192
- checkpointId: string | null;
3193
- messageSequence: number | null;
3194
- toolExecutionId: string | null;
3195
- resourceKey: string | null;
3196
- managerInstanceId: string | null;
3197
- snapshotIndex: number | null;
3198
- }>[];
3199
- sourceQuotes: string[];
3200
- harnessKey?: string | undefined;
3201
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
3202
- }>[];
3203
- prunedItemCounts: Readonly<{
3204
- resource: number;
3205
- decision: number;
3206
- running_session: number;
3207
- constraint: number;
3208
- completed_work: number;
3209
- pending_work: number;
3210
- uncertainty: number;
3211
- }>;
3212
- scopeId?: string | undefined;
3213
- }>;
3214
- semanticEvidence: Readonly<{
3215
- messagesThroughSequence: number;
3216
- toolExecutionsThroughSequence: number;
3217
- }>;
3218
- goal?: Readonly<{
3219
- status: "unknown" | "active" | "interrupted";
3220
- verbatimRequest: string;
3221
- sourceSequence: number;
3222
- }> | undefined;
3223
- previousCheckpointId?: (string & z.BRAND<"CompactionCheckpointId">) | undefined;
3224
- toolEvidenceCursor?: number | undefined;
3225
- }, {
3226
- version: 2;
3227
- id: string;
3228
- createdAt: string;
3229
- generation: number;
3230
- context: Readonly<{
3231
- cwd: string;
3232
- skills: Readonly<{
3233
- name: string;
3234
- source: "config" | "user" | "agent" | "project";
3235
- }>[];
3236
- stableRuleIds: string[];
3237
- explicitSkillNames: string[];
3238
- systemPromptSha256?: string | undefined;
3239
- }>;
3240
- resources: Readonly<{
3241
- key: string;
3242
- mode: "read" | "write";
3243
- evidenceToolCallId: string;
3244
- evidenceExecutionId: string;
3245
- }>[];
3246
- summary: Readonly<{
3247
- status: "valid";
3248
- digest: string;
3249
- }> | Readonly<{
3250
- status: "fallback";
3251
- reason: string;
3252
- lastValidCheckpointId?: string | undefined;
3253
- }> | Readonly<{
3254
- status: "skipped";
3255
- lastValidCheckpointId?: string | undefined;
3256
- }>;
3257
- constraints: Readonly<{
3258
- sourceSequence: number;
3259
- quote: string;
3260
- }>[];
3261
- toolState: Readonly<{
3262
- countsByOutcome: Readonly<{
3263
- success: number;
3264
- cancelled: number;
3265
- invalid_input: number;
3266
- user_rejected: number;
3267
- policy_denied: number;
3268
- tool_failed: number;
3269
- }>;
3270
- recentRecords: Readonly<{
3271
- toolCallId: string;
3272
- toolName: string;
3273
- agentName: string;
3274
- outcome: Readonly<{
3275
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
3276
- reason?: string | undefined;
3277
- executionState?: "not_executed" | "outcome_unknown" | undefined;
3278
- }>;
3279
- sequence: number;
3280
- executionId: string;
3281
- }>[];
3282
- integrityStatus: "invalid" | "valid" | "sanitized";
3283
- anomalies: Readonly<{
3284
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
3285
- toolCallId: string;
3286
- count?: number | undefined;
3287
- }>[];
3288
- }>;
3289
- runningWork: Readonly<{
3290
- sessionId: number;
3291
- state: "completed" | "cleanup-failed" | "running" | "draining" | "stopping";
3292
- managerInstanceId: string;
3293
- workdir: string;
3294
- recoverability: "unavailable" | "live" | "stale";
3295
- commandPreview: string;
3296
- observedAt: string;
3297
- exitCode?: number | undefined;
3298
- terminationCause?: string | undefined;
3299
- wallTimeMs?: number | undefined;
3300
- cleanupError?: string | undefined;
3301
- }>[];
3302
- transcript: Readonly<{
3303
- messages: {
3304
- fromSequenceExclusive: number;
3305
- throughSequence: number;
3306
- };
3307
- toolExecutions: {
3308
- fromSequenceExclusive: number;
3309
- throughSequence: number;
3310
- };
3311
- completeness: "complete" | "legacy_snapshot";
3312
- }>;
3313
- semanticState: Readonly<{
3314
- version: 1;
3315
- resources: Readonly<{
3316
- id: string;
3317
- resourceKey: string;
3318
- provenance: Readonly<{
3319
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3320
- sessionId: number | null;
3321
- messageSequence: number | null;
3322
- toolExecutionId: string | null;
3323
- resourceKey: string | null;
3324
- managerInstanceId: string | null;
3325
- checkpointId?: string | null | undefined;
3326
- snapshotIndex?: number | null | undefined;
3327
- }>[];
3328
- }>[];
3329
- goal: Readonly<{
3330
- id: string;
3331
- text: string;
3332
- provenance: Readonly<{
3333
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3334
- sessionId: number | null;
3335
- messageSequence: number | null;
3336
- toolExecutionId: string | null;
3337
- resourceKey: string | null;
3338
- managerInstanceId: string | null;
3339
- checkpointId?: string | null | undefined;
3340
- snapshotIndex?: number | null | undefined;
3341
- }>[];
3342
- harnessKey?: string | undefined;
3343
- relatedItemId?: string | undefined;
3344
- sourceQuotes?: string[] | undefined;
3345
- }> | null;
3346
- decisions: Readonly<{
3347
- id: string;
3348
- text: string;
3349
- provenance: Readonly<{
3350
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3351
- sessionId: number | null;
3352
- messageSequence: number | null;
3353
- toolExecutionId: string | null;
3354
- resourceKey: string | null;
3355
- managerInstanceId: string | null;
3356
- checkpointId?: string | null | undefined;
3357
- snapshotIndex?: number | null | undefined;
3358
- }>[];
3359
- harnessKey?: string | undefined;
3360
- relatedItemId?: string | undefined;
3361
- sourceQuotes?: string[] | undefined;
3362
- }>[];
3363
- completedWork: Readonly<{
3364
- id: string;
3365
- text: string;
3366
- provenance: Readonly<{
3367
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3368
- sessionId: number | null;
3369
- messageSequence: number | null;
3370
- toolExecutionId: string | null;
3371
- resourceKey: string | null;
3372
- managerInstanceId: string | null;
3373
- checkpointId?: string | null | undefined;
3374
- snapshotIndex?: number | null | undefined;
3375
- }>[];
3376
- harnessKey?: string | undefined;
3377
- relatedItemId?: string | undefined;
3378
- sourceQuotes?: string[] | undefined;
3379
- }>[];
3380
- pendingWork: Readonly<{
3381
- id: string;
3382
- text: string;
3383
- provenance: Readonly<{
3384
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3385
- sessionId: number | null;
3386
- messageSequence: number | null;
3387
- toolExecutionId: string | null;
3388
- resourceKey: string | null;
3389
- managerInstanceId: string | null;
3390
- checkpointId?: string | null | undefined;
3391
- snapshotIndex?: number | null | undefined;
3392
- }>[];
3393
- harnessKey?: string | undefined;
3394
- relatedItemId?: string | undefined;
3395
- sourceQuotes?: string[] | undefined;
3396
- }>[];
3397
- runningSessions: Readonly<{
3398
- id: string;
3399
- sessionId: number;
3400
- managerInstanceId: string;
3401
- provenance: Readonly<{
3402
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3403
- sessionId: number | null;
3404
- messageSequence: number | null;
3405
- toolExecutionId: string | null;
3406
- resourceKey: string | null;
3407
- managerInstanceId: string | null;
3408
- checkpointId?: string | null | undefined;
3409
- snapshotIndex?: number | null | undefined;
3410
- }>[];
3411
- }>[];
3412
- uncertainties: Readonly<{
3413
- id: string;
3414
- text: string;
3415
- provenance: Readonly<{
3416
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3417
- sessionId: number | null;
3418
- messageSequence: number | null;
3419
- toolExecutionId: string | null;
3420
- resourceKey: string | null;
3421
- managerInstanceId: string | null;
3422
- checkpointId?: string | null | undefined;
3423
- snapshotIndex?: number | null | undefined;
3424
- }>[];
3425
- harnessKey?: string | undefined;
3426
- relatedItemId?: string | undefined;
3427
- sourceQuotes?: string[] | undefined;
3428
- }>[];
3429
- scopeId?: string | undefined;
3430
- constraints?: Readonly<{
3431
- id: string;
3432
- text: string;
3433
- provenance: Readonly<{
3434
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3435
- sessionId: number | null;
3436
- messageSequence: number | null;
3437
- toolExecutionId: string | null;
3438
- resourceKey: string | null;
3439
- managerInstanceId: string | null;
3440
- checkpointId?: string | null | undefined;
3441
- snapshotIndex?: number | null | undefined;
3442
- }>[];
3443
- harnessKey?: string | undefined;
3444
- relatedItemId?: string | undefined;
3445
- sourceQuotes?: string[] | undefined;
3446
- }>[] | undefined;
3447
- prunedItemCounts?: Readonly<{
3448
- resource: number;
3449
- decision: number;
3450
- running_session: number;
3451
- completed_work: number;
3452
- pending_work: number;
3453
- uncertainty: number;
3454
- constraint?: number | undefined;
3455
- }> | undefined;
3456
- }>;
3457
- goal?: Readonly<{
3458
- status: "unknown" | "active" | "interrupted";
3459
- verbatimRequest: string;
3460
- sourceSequence: number;
3461
- }> | undefined;
3462
- previousCheckpointId?: string | undefined;
3463
- semanticEvidence?: Readonly<{
3464
- messagesThroughSequence: number;
3465
- toolExecutionsThroughSequence: number;
3466
- }> | undefined;
3467
- toolEvidenceCursor?: number | undefined;
3468
- }>, {
3469
- version: 2;
3470
- id: string & z.BRAND<"CompactionCheckpointId">;
3471
- createdAt: string;
3472
- generation: number;
3473
- context: Readonly<{
3474
- cwd: string;
3475
- skills: Readonly<{
3476
- name: string;
3477
- source: "config" | "user" | "agent" | "project";
3478
- }>[];
3479
- stableRuleIds: string[];
3480
- explicitSkillNames: string[];
3481
- systemPromptSha256?: string | undefined;
3482
- }>;
3483
- resources: Readonly<{
3484
- key: string;
3485
- mode: "read" | "write";
3486
- evidenceToolCallId: string;
3487
- evidenceExecutionId: string;
3488
- }>[];
3489
- summary: Readonly<{
3490
- status: "valid";
3491
- digest: string;
3492
- }> | Readonly<{
3493
- status: "fallback";
3494
- reason: string;
3495
- lastValidCheckpointId?: (string & z.BRAND<"CompactionCheckpointId">) | undefined;
3496
- }> | Readonly<{
3497
- status: "skipped";
3498
- lastValidCheckpointId?: (string & z.BRAND<"CompactionCheckpointId">) | undefined;
3499
- }>;
3500
- constraints: Readonly<{
3501
- sourceSequence: number;
3502
- quote: string;
3503
- }>[];
3504
- toolState: Readonly<{
3505
- countsByOutcome: Readonly<{
3506
- success: number;
3507
- cancelled: number;
3508
- invalid_input: number;
3509
- user_rejected: number;
3510
- policy_denied: number;
3511
- tool_failed: number;
3512
- }>;
3513
- recentRecords: Readonly<{
3514
- toolCallId: string;
3515
- toolName: string;
3516
- agentName: string;
3517
- outcome: Readonly<{
3518
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
3519
- reason?: string | undefined;
3520
- executionState?: "not_executed" | "outcome_unknown" | undefined;
3521
- }>;
3522
- sequence: number;
3523
- executionId: string;
3524
- }>[];
3525
- integrityStatus: "invalid" | "valid" | "sanitized";
3526
- anomalies: Readonly<{
3527
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
3528
- toolCallId: string;
3529
- count?: number | undefined;
3530
- }>[];
3531
- }>;
3532
- runningWork: Readonly<{
3533
- sessionId: number;
3534
- state: "completed" | "cleanup-failed" | "running" | "draining" | "stopping";
3535
- managerInstanceId: string;
3536
- workdir: string;
3537
- recoverability: "unavailable" | "live" | "stale";
3538
- commandPreview: string;
3539
- observedAt: string;
3540
- exitCode?: number | undefined;
3541
- terminationCause?: string | undefined;
3542
- wallTimeMs?: number | undefined;
3543
- cleanupError?: string | undefined;
3544
- }>[];
3545
- transcript: Readonly<{
3546
- messages: {
3547
- fromSequenceExclusive: number;
3548
- throughSequence: number;
3549
- };
3550
- toolExecutions: {
3551
- fromSequenceExclusive: number;
3552
- throughSequence: number;
3553
- };
3554
- completeness: "complete" | "legacy_snapshot";
3555
- }>;
3556
- semanticState: Readonly<{
3557
- version: 1;
3558
- resources: Readonly<{
3559
- id: string & z.BRAND<"CompactionSemanticItemId">;
3560
- resourceKey: string;
3561
- provenance: Readonly<{
3562
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3563
- sessionId: number | null;
3564
- checkpointId: string | null;
3565
- messageSequence: number | null;
3566
- toolExecutionId: string | null;
3567
- resourceKey: string | null;
3568
- managerInstanceId: string | null;
3569
- snapshotIndex: number | null;
3570
- }>[];
3571
- }>[];
3572
- goal: Readonly<{
3573
- id: string & z.BRAND<"CompactionSemanticItemId">;
3574
- text: string;
3575
- provenance: Readonly<{
3576
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3577
- sessionId: number | null;
3578
- checkpointId: string | null;
3579
- messageSequence: number | null;
3580
- toolExecutionId: string | null;
3581
- resourceKey: string | null;
3582
- managerInstanceId: string | null;
3583
- snapshotIndex: number | null;
3584
- }>[];
3585
- sourceQuotes: string[];
3586
- harnessKey?: string | undefined;
3587
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
3588
- }> | null;
3589
- constraints: Readonly<{
3590
- id: string & z.BRAND<"CompactionSemanticItemId">;
3591
- text: string;
3592
- provenance: Readonly<{
3593
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3594
- sessionId: number | null;
3595
- checkpointId: string | null;
3596
- messageSequence: number | null;
3597
- toolExecutionId: string | null;
3598
- resourceKey: string | null;
3599
- managerInstanceId: string | null;
3600
- snapshotIndex: number | null;
3601
- }>[];
3602
- sourceQuotes: string[];
3603
- harnessKey?: string | undefined;
3604
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
3605
- }>[];
3606
- decisions: Readonly<{
3607
- id: string & z.BRAND<"CompactionSemanticItemId">;
3608
- text: string;
3609
- provenance: Readonly<{
3610
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3611
- sessionId: number | null;
3612
- checkpointId: string | null;
3613
- messageSequence: number | null;
3614
- toolExecutionId: string | null;
3615
- resourceKey: string | null;
3616
- managerInstanceId: string | null;
3617
- snapshotIndex: number | null;
3618
- }>[];
3619
- sourceQuotes: string[];
3620
- harnessKey?: string | undefined;
3621
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
3622
- }>[];
3623
- completedWork: Readonly<{
3624
- id: string & z.BRAND<"CompactionSemanticItemId">;
3625
- text: string;
3626
- provenance: Readonly<{
3627
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3628
- sessionId: number | null;
3629
- checkpointId: string | null;
3630
- messageSequence: number | null;
3631
- toolExecutionId: string | null;
3632
- resourceKey: string | null;
3633
- managerInstanceId: string | null;
3634
- snapshotIndex: number | null;
3635
- }>[];
3636
- sourceQuotes: string[];
3637
- harnessKey?: string | undefined;
3638
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
3639
- }>[];
3640
- pendingWork: Readonly<{
3641
- id: string & z.BRAND<"CompactionSemanticItemId">;
3642
- text: string;
3643
- provenance: Readonly<{
3644
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3645
- sessionId: number | null;
3646
- checkpointId: string | null;
3647
- messageSequence: number | null;
3648
- toolExecutionId: string | null;
3649
- resourceKey: string | null;
3650
- managerInstanceId: string | null;
3651
- snapshotIndex: number | null;
3652
- }>[];
3653
- sourceQuotes: string[];
3654
- harnessKey?: string | undefined;
3655
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
3656
- }>[];
3657
- runningSessions: Readonly<{
3658
- id: string & z.BRAND<"CompactionSemanticItemId">;
3659
- sessionId: number;
3660
- managerInstanceId: string;
3661
- provenance: Readonly<{
3662
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3663
- sessionId: number | null;
3664
- checkpointId: string | null;
3665
- messageSequence: number | null;
3666
- toolExecutionId: string | null;
3667
- resourceKey: string | null;
3668
- managerInstanceId: string | null;
3669
- snapshotIndex: number | null;
3670
- }>[];
3671
- }>[];
3672
- uncertainties: Readonly<{
3673
- id: string & z.BRAND<"CompactionSemanticItemId">;
3674
- text: string;
3675
- provenance: Readonly<{
3676
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3677
- sessionId: number | null;
3678
- checkpointId: string | null;
3679
- messageSequence: number | null;
3680
- toolExecutionId: string | null;
3681
- resourceKey: string | null;
3682
- managerInstanceId: string | null;
3683
- snapshotIndex: number | null;
3684
- }>[];
3685
- sourceQuotes: string[];
3686
- harnessKey?: string | undefined;
3687
- relatedItemId?: (string & z.BRAND<"CompactionSemanticItemId">) | undefined;
3688
- }>[];
3689
- prunedItemCounts: Readonly<{
3690
- resource: number;
3691
- decision: number;
3692
- running_session: number;
3693
- constraint: number;
3694
- completed_work: number;
3695
- pending_work: number;
3696
- uncertainty: number;
3697
- }>;
3698
- scopeId?: string | undefined;
3699
- }>;
3700
- semanticEvidence: Readonly<{
3701
- messagesThroughSequence: number;
3702
- toolExecutionsThroughSequence: number;
3703
- }>;
3704
- goal?: Readonly<{
3705
- status: "unknown" | "active" | "interrupted";
3706
- verbatimRequest: string;
3707
- sourceSequence: number;
3708
- }> | undefined;
3709
- previousCheckpointId?: (string & z.BRAND<"CompactionCheckpointId">) | undefined;
3710
- toolEvidenceCursor?: number | undefined;
3711
- }, {
3712
- version: 2;
3713
- id: string;
3714
- createdAt: string;
3715
- generation: number;
3716
- context: Readonly<{
3717
- cwd: string;
3718
- skills: Readonly<{
3719
- name: string;
3720
- source: "config" | "user" | "agent" | "project";
3721
- }>[];
3722
- stableRuleIds: string[];
3723
- explicitSkillNames: string[];
3724
- systemPromptSha256?: string | undefined;
3725
- }>;
3726
- resources: Readonly<{
3727
- key: string;
3728
- mode: "read" | "write";
3729
- evidenceToolCallId: string;
3730
- evidenceExecutionId: string;
3731
- }>[];
3732
- summary: Readonly<{
3733
- status: "valid";
3734
- digest: string;
3735
- }> | Readonly<{
3736
- status: "fallback";
3737
- reason: string;
3738
- lastValidCheckpointId?: string | undefined;
3739
- }> | Readonly<{
3740
- status: "skipped";
3741
- lastValidCheckpointId?: string | undefined;
3742
- }>;
3743
- constraints: Readonly<{
3744
- sourceSequence: number;
3745
- quote: string;
3746
- }>[];
3747
- toolState: Readonly<{
3748
- countsByOutcome: Readonly<{
3749
- success: number;
3750
- cancelled: number;
3751
- invalid_input: number;
3752
- user_rejected: number;
3753
- policy_denied: number;
3754
- tool_failed: number;
3755
- }>;
3756
- recentRecords: Readonly<{
3757
- toolCallId: string;
3758
- toolName: string;
3759
- agentName: string;
3760
- outcome: Readonly<{
3761
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
3762
- reason?: string | undefined;
3763
- executionState?: "not_executed" | "outcome_unknown" | undefined;
3764
- }>;
3765
- sequence: number;
3766
- executionId: string;
3767
- }>[];
3768
- integrityStatus: "invalid" | "valid" | "sanitized";
3769
- anomalies: Readonly<{
3770
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
3771
- toolCallId: string;
3772
- count?: number | undefined;
3773
- }>[];
3774
- }>;
3775
- runningWork: Readonly<{
3776
- sessionId: number;
3777
- state: "completed" | "cleanup-failed" | "running" | "draining" | "stopping";
3778
- managerInstanceId: string;
3779
- workdir: string;
3780
- recoverability: "unavailable" | "live" | "stale";
3781
- commandPreview: string;
3782
- observedAt: string;
3783
- exitCode?: number | undefined;
3784
- terminationCause?: string | undefined;
3785
- wallTimeMs?: number | undefined;
3786
- cleanupError?: string | undefined;
3787
- }>[];
3788
- transcript: Readonly<{
3789
- messages: {
3790
- fromSequenceExclusive: number;
3791
- throughSequence: number;
3792
- };
3793
- toolExecutions: {
3794
- fromSequenceExclusive: number;
3795
- throughSequence: number;
3796
- };
3797
- completeness: "complete" | "legacy_snapshot";
3798
- }>;
3799
- semanticState: Readonly<{
3800
- version: 1;
3801
- resources: Readonly<{
3802
- id: string;
3803
- resourceKey: string;
3804
- provenance: Readonly<{
3805
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3806
- sessionId: number | null;
3807
- messageSequence: number | null;
3808
- toolExecutionId: string | null;
3809
- resourceKey: string | null;
3810
- managerInstanceId: string | null;
3811
- checkpointId?: string | null | undefined;
3812
- snapshotIndex?: number | null | undefined;
3813
- }>[];
3814
- }>[];
3815
- goal: Readonly<{
3816
- id: string;
3817
- text: string;
3818
- provenance: Readonly<{
3819
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3820
- sessionId: number | null;
3821
- messageSequence: number | null;
3822
- toolExecutionId: string | null;
3823
- resourceKey: string | null;
3824
- managerInstanceId: string | null;
3825
- checkpointId?: string | null | undefined;
3826
- snapshotIndex?: number | null | undefined;
3827
- }>[];
3828
- harnessKey?: string | undefined;
3829
- relatedItemId?: string | undefined;
3830
- sourceQuotes?: string[] | undefined;
3831
- }> | null;
3832
- decisions: Readonly<{
3833
- id: string;
3834
- text: string;
3835
- provenance: Readonly<{
3836
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3837
- sessionId: number | null;
3838
- messageSequence: number | null;
3839
- toolExecutionId: string | null;
3840
- resourceKey: string | null;
3841
- managerInstanceId: string | null;
3842
- checkpointId?: string | null | undefined;
3843
- snapshotIndex?: number | null | undefined;
3844
- }>[];
3845
- harnessKey?: string | undefined;
3846
- relatedItemId?: string | undefined;
3847
- sourceQuotes?: string[] | undefined;
3848
- }>[];
3849
- completedWork: Readonly<{
3850
- id: string;
3851
- text: string;
3852
- provenance: Readonly<{
3853
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3854
- sessionId: number | null;
3855
- messageSequence: number | null;
3856
- toolExecutionId: string | null;
3857
- resourceKey: string | null;
3858
- managerInstanceId: string | null;
3859
- checkpointId?: string | null | undefined;
3860
- snapshotIndex?: number | null | undefined;
3861
- }>[];
3862
- harnessKey?: string | undefined;
3863
- relatedItemId?: string | undefined;
3864
- sourceQuotes?: string[] | undefined;
3865
- }>[];
3866
- pendingWork: Readonly<{
3867
- id: string;
3868
- text: string;
3869
- provenance: Readonly<{
3870
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3871
- sessionId: number | null;
3872
- messageSequence: number | null;
3873
- toolExecutionId: string | null;
3874
- resourceKey: string | null;
3875
- managerInstanceId: string | null;
3876
- checkpointId?: string | null | undefined;
3877
- snapshotIndex?: number | null | undefined;
3878
- }>[];
3879
- harnessKey?: string | undefined;
3880
- relatedItemId?: string | undefined;
3881
- sourceQuotes?: string[] | undefined;
3882
- }>[];
3883
- runningSessions: Readonly<{
3884
- id: string;
3885
- sessionId: number;
3886
- managerInstanceId: string;
3887
- provenance: Readonly<{
3888
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3889
- sessionId: number | null;
3890
- messageSequence: number | null;
3891
- toolExecutionId: string | null;
3892
- resourceKey: string | null;
3893
- managerInstanceId: string | null;
3894
- checkpointId?: string | null | undefined;
3895
- snapshotIndex?: number | null | undefined;
3896
- }>[];
3897
- }>[];
3898
- uncertainties: Readonly<{
3899
- id: string;
3900
- text: string;
3901
- provenance: Readonly<{
3902
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3903
- sessionId: number | null;
3904
- messageSequence: number | null;
3905
- toolExecutionId: string | null;
3906
- resourceKey: string | null;
3907
- managerInstanceId: string | null;
3908
- checkpointId?: string | null | undefined;
3909
- snapshotIndex?: number | null | undefined;
3910
- }>[];
3911
- harnessKey?: string | undefined;
3912
- relatedItemId?: string | undefined;
3913
- sourceQuotes?: string[] | undefined;
3914
- }>[];
3915
- scopeId?: string | undefined;
3916
- constraints?: Readonly<{
3917
- id: string;
3918
- text: string;
3919
- provenance: Readonly<{
3920
- kind: "message" | "resource" | "legacy_snapshot" | "tool_execution" | "running_session";
3921
- sessionId: number | null;
3922
- messageSequence: number | null;
3923
- toolExecutionId: string | null;
3924
- resourceKey: string | null;
3925
- managerInstanceId: string | null;
3926
- checkpointId?: string | null | undefined;
3927
- snapshotIndex?: number | null | undefined;
3928
- }>[];
3929
- harnessKey?: string | undefined;
3930
- relatedItemId?: string | undefined;
3931
- sourceQuotes?: string[] | undefined;
3932
- }>[] | undefined;
3933
- prunedItemCounts?: Readonly<{
3934
- resource: number;
3935
- decision: number;
3936
- running_session: number;
3937
- completed_work: number;
3938
- pending_work: number;
3939
- uncertainty: number;
3940
- constraint?: number | undefined;
3941
- }> | undefined;
3942
- }>;
3943
- goal?: Readonly<{
3944
- status: "unknown" | "active" | "interrupted";
3945
- verbatimRequest: string;
3946
- sourceSequence: number;
3947
- }> | undefined;
3948
- previousCheckpointId?: string | undefined;
3949
- semanticEvidence?: Readonly<{
3950
- messagesThroughSequence: number;
3951
- toolExecutionsThroughSequence: number;
3952
- }> | undefined;
3953
- toolEvidenceCursor?: number | undefined;
3954
- }>>;
767
+ lastValidCheckpointId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "CompactionCheckpointId", "out">>;
768
+ }, z.core.$strict>], "status">>;
769
+ }, z.core.$strict>>;
3955
770
  /** Current checkpoints persist a lossy task summary and Harness facts, never semantic coverage. */
3956
771
  export declare const compactionCheckpointV3Schema: z.ZodReadonly<z.ZodObject<{
3957
772
  version: z.ZodLiteral<3>;
3958
- id: z.ZodBranded<z.ZodString, "CompactionCheckpointId">;
773
+ id: z.core.$ZodBranded<z.ZodString, "CompactionCheckpointId", "out">;
3959
774
  generation: z.ZodNumber;
3960
- previousCheckpointId: z.ZodOptional<z.ZodBranded<z.ZodString, "CompactionCheckpointId">>;
775
+ previousCheckpointId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "CompactionCheckpointId", "out">>;
3961
776
  createdAt: z.ZodString;
3962
777
  transcript: z.ZodReadonly<z.ZodObject<{
3963
- messages: z.ZodEffects<z.ZodObject<{
778
+ messages: z.ZodObject<{
3964
779
  fromSequenceExclusive: z.ZodNumber;
3965
780
  throughSequence: z.ZodNumber;
3966
- }, "strict", z.ZodTypeAny, {
3967
- fromSequenceExclusive: number;
3968
- throughSequence: number;
3969
- }, {
3970
- fromSequenceExclusive: number;
3971
- throughSequence: number;
3972
- }>, {
3973
- fromSequenceExclusive: number;
3974
- throughSequence: number;
3975
- }, {
3976
- fromSequenceExclusive: number;
3977
- throughSequence: number;
3978
- }>;
3979
- toolExecutions: z.ZodEffects<z.ZodObject<{
781
+ }, z.core.$strict>;
782
+ toolExecutions: z.ZodObject<{
3980
783
  fromSequenceExclusive: z.ZodNumber;
3981
784
  throughSequence: z.ZodNumber;
3982
- }, "strict", z.ZodTypeAny, {
3983
- fromSequenceExclusive: number;
3984
- throughSequence: number;
3985
- }, {
3986
- fromSequenceExclusive: number;
3987
- throughSequence: number;
3988
- }>, {
3989
- fromSequenceExclusive: number;
3990
- throughSequence: number;
3991
- }, {
3992
- fromSequenceExclusive: number;
3993
- throughSequence: number;
785
+ }, z.core.$strict>;
786
+ completeness: z.ZodEnum<{
787
+ complete: "complete";
788
+ legacy_snapshot: "legacy_snapshot";
3994
789
  }>;
3995
- completeness: z.ZodEnum<["complete", "legacy_snapshot"]>;
3996
- }, "strict", z.ZodTypeAny, {
3997
- messages: {
3998
- fromSequenceExclusive: number;
3999
- throughSequence: number;
4000
- };
4001
- toolExecutions: {
4002
- fromSequenceExclusive: number;
4003
- throughSequence: number;
4004
- };
4005
- completeness: "complete" | "legacy_snapshot";
4006
- }, {
4007
- messages: {
4008
- fromSequenceExclusive: number;
4009
- throughSequence: number;
4010
- };
4011
- toolExecutions: {
4012
- fromSequenceExclusive: number;
4013
- throughSequence: number;
4014
- };
4015
- completeness: "complete" | "legacy_snapshot";
4016
- }>>;
790
+ }, z.core.$strict>>;
4017
791
  taskSummary: z.ZodString;
4018
792
  toolState: z.ZodReadonly<z.ZodObject<{
4019
793
  countsByOutcome: z.ZodReadonly<z.ZodObject<{
@@ -4023,233 +797,49 @@ export declare const compactionCheckpointV3Schema: z.ZodReadonly<z.ZodObject<{
4023
797
  invalid_input: z.ZodNumber;
4024
798
  cancelled: z.ZodNumber;
4025
799
  tool_failed: z.ZodNumber;
4026
- }, "strict", z.ZodTypeAny, {
4027
- success: number;
4028
- cancelled: number;
4029
- invalid_input: number;
4030
- user_rejected: number;
4031
- policy_denied: number;
4032
- tool_failed: number;
4033
- }, {
4034
- success: number;
4035
- cancelled: number;
4036
- invalid_input: number;
4037
- user_rejected: number;
4038
- policy_denied: number;
4039
- tool_failed: number;
4040
- }>>;
800
+ }, z.core.$strict>>;
4041
801
  recentRecords: z.ZodArray<z.ZodReadonly<z.ZodObject<{
4042
802
  executionId: z.ZodString;
4043
803
  sequence: z.ZodNumber;
4044
804
  toolCallId: z.ZodString;
4045
805
  agentName: z.ZodString;
4046
806
  toolName: z.ZodString;
4047
- outcome: z.ZodReadonly<z.ZodEffects<z.ZodObject<{
4048
- kind: z.ZodEnum<["success", "user_rejected", "policy_denied", "invalid_input", "cancelled", "tool_failed"]>;
807
+ outcome: z.ZodReadonly<z.ZodObject<{
808
+ kind: z.ZodEnum<{
809
+ success: "success";
810
+ user_rejected: "user_rejected";
811
+ policy_denied: "policy_denied";
812
+ invalid_input: "invalid_input";
813
+ cancelled: "cancelled";
814
+ tool_failed: "tool_failed";
815
+ }>;
4049
816
  reason: z.ZodOptional<z.ZodString>;
4050
- executionState: z.ZodOptional<z.ZodEnum<["not_executed", "outcome_unknown"]>>;
4051
- }, "strict", z.ZodTypeAny, {
4052
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
4053
- reason?: string | undefined;
4054
- executionState?: "not_executed" | "outcome_unknown" | undefined;
4055
- }, {
4056
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
4057
- reason?: string | undefined;
4058
- executionState?: "not_executed" | "outcome_unknown" | undefined;
4059
- }>, {
4060
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
4061
- reason?: string | undefined;
4062
- executionState?: "not_executed" | "outcome_unknown" | undefined;
4063
- }, {
4064
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
4065
- reason?: string | undefined;
4066
- executionState?: "not_executed" | "outcome_unknown" | undefined;
4067
- }>>;
4068
- }, "strict", z.ZodTypeAny, {
4069
- toolCallId: string;
4070
- toolName: string;
4071
- agentName: string;
4072
- outcome: Readonly<{
4073
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
4074
- reason?: string | undefined;
4075
- executionState?: "not_executed" | "outcome_unknown" | undefined;
4076
- }>;
4077
- sequence: number;
4078
- executionId: string;
4079
- }, {
4080
- toolCallId: string;
4081
- toolName: string;
4082
- agentName: string;
4083
- outcome: Readonly<{
4084
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
4085
- reason?: string | undefined;
4086
- executionState?: "not_executed" | "outcome_unknown" | undefined;
4087
- }>;
4088
- sequence: number;
4089
- executionId: string;
4090
- }>>, "many">;
4091
- integrityStatus: z.ZodEnum<["valid", "sanitized", "invalid"]>;
817
+ executionState: z.ZodOptional<z.ZodEnum<{
818
+ not_executed: "not_executed";
819
+ outcome_unknown: "outcome_unknown";
820
+ }>>;
821
+ }, z.core.$strict>>;
822
+ }, z.core.$strict>>>;
823
+ integrityStatus: z.ZodEnum<{
824
+ invalid: "invalid";
825
+ valid: "valid";
826
+ sanitized: "sanitized";
827
+ }>;
4092
828
  anomalies: z.ZodArray<z.ZodReadonly<z.ZodObject<{
4093
- kind: z.ZodEnum<["orphan_result", "dangling_call", "duplicate_call", "duplicate_result", "record_without_call", "record_without_result", "result_without_record"]>;
829
+ kind: z.ZodEnum<{
830
+ orphan_result: "orphan_result";
831
+ dangling_call: "dangling_call";
832
+ duplicate_call: "duplicate_call";
833
+ duplicate_result: "duplicate_result";
834
+ record_without_call: "record_without_call";
835
+ record_without_result: "record_without_result";
836
+ result_without_record: "result_without_record";
837
+ }>;
4094
838
  toolCallId: z.ZodString;
4095
839
  count: z.ZodOptional<z.ZodNumber>;
4096
- }, "strict", z.ZodTypeAny, {
4097
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
4098
- toolCallId: string;
4099
- count?: number | undefined;
4100
- }, {
4101
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
4102
- toolCallId: string;
4103
- count?: number | undefined;
4104
- }>>, "many">;
4105
- }, "strict", z.ZodTypeAny, {
4106
- countsByOutcome: Readonly<{
4107
- success: number;
4108
- cancelled: number;
4109
- invalid_input: number;
4110
- user_rejected: number;
4111
- policy_denied: number;
4112
- tool_failed: number;
4113
- }>;
4114
- recentRecords: Readonly<{
4115
- toolCallId: string;
4116
- toolName: string;
4117
- agentName: string;
4118
- outcome: Readonly<{
4119
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
4120
- reason?: string | undefined;
4121
- executionState?: "not_executed" | "outcome_unknown" | undefined;
4122
- }>;
4123
- sequence: number;
4124
- executionId: string;
4125
- }>[];
4126
- integrityStatus: "invalid" | "valid" | "sanitized";
4127
- anomalies: Readonly<{
4128
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
4129
- toolCallId: string;
4130
- count?: number | undefined;
4131
- }>[];
4132
- }, {
4133
- countsByOutcome: Readonly<{
4134
- success: number;
4135
- cancelled: number;
4136
- invalid_input: number;
4137
- user_rejected: number;
4138
- policy_denied: number;
4139
- tool_failed: number;
4140
- }>;
4141
- recentRecords: Readonly<{
4142
- toolCallId: string;
4143
- toolName: string;
4144
- agentName: string;
4145
- outcome: Readonly<{
4146
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
4147
- reason?: string | undefined;
4148
- executionState?: "not_executed" | "outcome_unknown" | undefined;
4149
- }>;
4150
- sequence: number;
4151
- executionId: string;
4152
- }>[];
4153
- integrityStatus: "invalid" | "valid" | "sanitized";
4154
- anomalies: Readonly<{
4155
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
4156
- toolCallId: string;
4157
- count?: number | undefined;
4158
- }>[];
4159
- }>>;
4160
- }, "strict", z.ZodTypeAny, {
4161
- version: 3;
4162
- id: string & z.BRAND<"CompactionCheckpointId">;
4163
- createdAt: string;
4164
- generation: number;
4165
- toolState: Readonly<{
4166
- countsByOutcome: Readonly<{
4167
- success: number;
4168
- cancelled: number;
4169
- invalid_input: number;
4170
- user_rejected: number;
4171
- policy_denied: number;
4172
- tool_failed: number;
4173
- }>;
4174
- recentRecords: Readonly<{
4175
- toolCallId: string;
4176
- toolName: string;
4177
- agentName: string;
4178
- outcome: Readonly<{
4179
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
4180
- reason?: string | undefined;
4181
- executionState?: "not_executed" | "outcome_unknown" | undefined;
4182
- }>;
4183
- sequence: number;
4184
- executionId: string;
4185
- }>[];
4186
- integrityStatus: "invalid" | "valid" | "sanitized";
4187
- anomalies: Readonly<{
4188
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
4189
- toolCallId: string;
4190
- count?: number | undefined;
4191
- }>[];
4192
- }>;
4193
- transcript: Readonly<{
4194
- messages: {
4195
- fromSequenceExclusive: number;
4196
- throughSequence: number;
4197
- };
4198
- toolExecutions: {
4199
- fromSequenceExclusive: number;
4200
- throughSequence: number;
4201
- };
4202
- completeness: "complete" | "legacy_snapshot";
4203
- }>;
4204
- taskSummary: string;
4205
- previousCheckpointId?: (string & z.BRAND<"CompactionCheckpointId">) | undefined;
4206
- }, {
4207
- version: 3;
4208
- id: string;
4209
- createdAt: string;
4210
- generation: number;
4211
- toolState: Readonly<{
4212
- countsByOutcome: Readonly<{
4213
- success: number;
4214
- cancelled: number;
4215
- invalid_input: number;
4216
- user_rejected: number;
4217
- policy_denied: number;
4218
- tool_failed: number;
4219
- }>;
4220
- recentRecords: Readonly<{
4221
- toolCallId: string;
4222
- toolName: string;
4223
- agentName: string;
4224
- outcome: Readonly<{
4225
- kind: "success" | "cancelled" | "invalid_input" | "user_rejected" | "policy_denied" | "tool_failed";
4226
- reason?: string | undefined;
4227
- executionState?: "not_executed" | "outcome_unknown" | undefined;
4228
- }>;
4229
- sequence: number;
4230
- executionId: string;
4231
- }>[];
4232
- integrityStatus: "invalid" | "valid" | "sanitized";
4233
- anomalies: Readonly<{
4234
- kind: "orphan_result" | "dangling_call" | "duplicate_call" | "duplicate_result" | "record_without_call" | "record_without_result" | "result_without_record";
4235
- toolCallId: string;
4236
- count?: number | undefined;
4237
- }>[];
4238
- }>;
4239
- transcript: Readonly<{
4240
- messages: {
4241
- fromSequenceExclusive: number;
4242
- throughSequence: number;
4243
- };
4244
- toolExecutions: {
4245
- fromSequenceExclusive: number;
4246
- throughSequence: number;
4247
- };
4248
- completeness: "complete" | "legacy_snapshot";
4249
- }>;
4250
- taskSummary: string;
4251
- previousCheckpointId?: string | undefined;
4252
- }>>;
840
+ }, z.core.$strict>>>;
841
+ }, z.core.$strict>>;
842
+ }, z.core.$strict>>;
4253
843
  export type CompactionCheckpointV3 = z.infer<typeof compactionCheckpointV3Schema>;
4254
844
  export type CreateSummaryCheckpointInput = {
4255
845
  readonly summary: CompactionCheckpointV3["taskSummary"];
@@ -4278,20 +868,13 @@ export type CompactionCheckpointV2 = z.infer<typeof compactionCheckpointV2Schema
4278
868
  export type CompactionCheckpoint = CompactionCheckpointV1 | CompactionCheckpointV2 | CompactionCheckpointV3;
4279
869
  export declare const archivedTranscriptMessageSchema: z.ZodReadonly<z.ZodObject<{
4280
870
  sequence: z.ZodNumber;
4281
- provenance: z.ZodEnum<["native", "legacy_snapshot"]>;
871
+ provenance: z.ZodEnum<{
872
+ legacy_snapshot: "legacy_snapshot";
873
+ native: "native";
874
+ }>;
4282
875
  createdAt: z.ZodString;
4283
- message: z.ZodType<ModelMessage, z.ZodTypeDef, ModelMessage>;
4284
- }, "strict", z.ZodTypeAny, {
4285
- message: ModelMessage;
4286
- createdAt: string;
4287
- sequence: number;
4288
- provenance: "legacy_snapshot" | "native";
4289
- }, {
4290
- message: ModelMessage;
4291
- createdAt: string;
4292
- sequence: number;
4293
- provenance: "legacy_snapshot" | "native";
4294
- }>>;
876
+ message: z.ZodCustom<ModelMessage, ModelMessage>;
877
+ }, z.core.$strict>>;
4295
878
  export type ArchivedTranscriptMessage = z.infer<typeof archivedTranscriptMessageSchema>;
4296
879
  export interface SequencedToolExecutionEvidence extends ToolExecutionRecord {
4297
880
  readonly sequence: number;
@@ -4320,19 +903,19 @@ export declare function projectCompactionCheckpointReminder(checkpoint: Compacti
4320
903
  semanticProjection: Readonly<{
4321
904
  version: 1;
4322
905
  items: Readonly<{
906
+ itemId: string & z.core.$brand<"CompactionSemanticItemId">;
907
+ category: "decision" | "resource" | "running_session" | "goal" | "constraint" | "completed_work" | "pending_work" | "uncertainty";
4323
908
  text: string;
4324
909
  sourceQuotes: string[];
4325
- itemId: string & z.BRAND<"CompactionSemanticItemId">;
4326
- category: "resource" | "decision" | "running_session" | "goal" | "constraint" | "completed_work" | "pending_work" | "uncertainty";
4327
910
  }>[];
4328
911
  omittedCounts: Readonly<{
4329
- resource: number;
4330
- decision: number;
4331
- running_session: number;
4332
912
  goal: number;
4333
913
  constraint: number;
914
+ decision: number;
4334
915
  completed_work: number;
4335
916
  pending_work: number;
917
+ resource: number;
918
+ running_session: number;
4336
919
  uncertainty: number;
4337
920
  }>;
4338
921
  }> | null;