@stitchmux/client 0.0.0-stage → 0.96.1

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 (103) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +45 -2
  3. package/dist/chunk-wddwdvbj.js +714 -0
  4. package/dist/index.js +4070 -0
  5. package/dist/monitoring.js +279 -0
  6. package/native-stream.json +8 -0
  7. package/package.json +36 -4
  8. package/types/src/agent/claude/native/commandSchema.d.ts +14 -0
  9. package/types/src/agent/custom/config.d.ts +159 -0
  10. package/types/src/agent/custom/endpoint.d.ts +26 -0
  11. package/types/src/agent/transcript/messageSchema.d.ts +153 -0
  12. package/types/src/attachments/reference.d.ts +56 -0
  13. package/types/src/attachments/schema.d.ts +512 -0
  14. package/types/src/chat/communicationAuthorizationSchema.d.ts +77 -0
  15. package/types/src/chat/communicationReceiptSchema.d.ts +82 -0
  16. package/types/src/chat/feedSchema.d.ts +641 -0
  17. package/types/src/chat/holdKind.d.ts +26 -0
  18. package/types/src/chat/identity.d.ts +55 -0
  19. package/types/src/chat/identitySchema.d.ts +121 -0
  20. package/types/src/chat/letterRequestSchema.d.ts +35 -0
  21. package/types/src/chat/messageOperationSchema.d.ts +277 -0
  22. package/types/src/chat/messageSchema.d.ts +284 -0
  23. package/types/src/chat/originSchema.d.ts +67 -0
  24. package/types/src/chat/sentLetterSchema.d.ts +79 -0
  25. package/types/src/client.d.ts +16 -0
  26. package/types/src/config/claudeProfileSchema.d.ts +22 -0
  27. package/types/src/config/launchSchema.d.ts +136 -0
  28. package/types/src/config/location.d.ts +6 -0
  29. package/types/src/config/machineSchema.d.ts +320 -0
  30. package/types/src/config/modelSelectionFlags.d.ts +4 -0
  31. package/types/src/config/paths.d.ts +87 -0
  32. package/types/src/config/remoteTransport.d.ts +12 -0
  33. package/types/src/content/schema.d.ts +312 -0
  34. package/types/src/content/toolSchema.d.ts +36 -0
  35. package/types/src/context/corpusSearchSchema.d.ts +578 -0
  36. package/types/src/context/exactMessageSchema.d.ts +54 -0
  37. package/types/src/context/messageSenderSchema.d.ts +14 -0
  38. package/types/src/context/schema.d.ts +176 -0
  39. package/types/src/context/searchFrames.d.ts +225 -0
  40. package/types/src/context/searchRequestSchema.d.ts +47 -0
  41. package/types/src/context/transcriptJsonSchema.d.ts +210 -0
  42. package/types/src/control/schema/context.d.ts +188 -0
  43. package/types/src/control/schema/contract.d.ts +7142 -0
  44. package/types/src/control/schema/core.d.ts +722 -0
  45. package/types/src/control/schema/directory.d.ts +34 -0
  46. package/types/src/control/schema/eventsContract.d.ts +1423 -0
  47. package/types/src/control/schema/externalList.d.ts +96 -0
  48. package/types/src/control/schema/message.d.ts +280 -0
  49. package/types/src/control/schema/model.d.ts +128 -0
  50. package/types/src/control/schema/native.d.ts +664 -0
  51. package/types/src/control/schema/nativeStreamContract.d.ts +155 -0
  52. package/types/src/control/schema/performance.d.ts +85 -0
  53. package/types/src/control/schema/public.d.ts +48 -0
  54. package/types/src/control/schema/reading.d.ts +24 -0
  55. package/types/src/control/schema/refusals.d.ts +433 -0
  56. package/types/src/control/schema/runtimeOps.d.ts +724 -0
  57. package/types/src/control/schema/searchContract.d.ts +258 -0
  58. package/types/src/control/schema/selection.d.ts +124 -0
  59. package/types/src/control/schema/session.d.ts +272 -0
  60. package/types/src/control/schema/terminalPrompt.d.ts +102 -0
  61. package/types/src/control/transport/boundary.d.ts +7137 -0
  62. package/types/src/control/transport/client.d.ts +10838 -0
  63. package/types/src/control/transport/connection.d.ts +13 -0
  64. package/types/src/control/transport/socketPath.d.ts +3 -0
  65. package/types/src/control-client.d.ts +9 -0
  66. package/types/src/delegation/applicationSchema.d.ts +132 -0
  67. package/types/src/delegation/schema.d.ts +267 -0
  68. package/types/src/events/schema.d.ts +155 -0
  69. package/types/src/external/contentSchema.d.ts +145 -0
  70. package/types/src/external/messageSchema.d.ts +131 -0
  71. package/types/src/external/residentFrames.d.ts +130 -0
  72. package/types/src/external/residentSchema.d.ts +144 -0
  73. package/types/src/external/sessionSchema.d.ts +427 -0
  74. package/types/src/external/turnSchema.d.ts +55 -0
  75. package/types/src/fleet/fleetSchema.d.ts +937 -0
  76. package/types/src/inventory/listSchema.d.ts +442 -0
  77. package/types/src/monitoring/nativeFile.d.ts +7 -0
  78. package/types/src/monitoring/nativeRead.d.ts +14 -0
  79. package/types/src/monitoring/performanceSchema.d.ts +28 -0
  80. package/types/src/monitoring/schema.d.ts +410 -0
  81. package/types/src/monitoring/validate.d.ts +5 -0
  82. package/types/src/monitoring-reader.d.ts +4 -0
  83. package/types/src/policy/reference.d.ts +93 -0
  84. package/types/src/policy/runtimeProfile.d.ts +24 -0
  85. package/types/src/policy/schema.d.ts +177 -0
  86. package/types/src/runtime/capabilities.d.ts +124 -0
  87. package/types/src/runtime/modes.d.ts +47 -0
  88. package/types/src/runtime/permissionScope.d.ts +22 -0
  89. package/types/src/runtime/planLimitsSchema.d.ts +55 -0
  90. package/types/src/runtime/projectionSchema.d.ts +539 -0
  91. package/types/src/runtime/rewindSchema.d.ts +16 -0
  92. package/types/src/runtime/selectionSchema.d.ts +158 -0
  93. package/types/src/runtime/workloadContract.d.ts +55 -0
  94. package/types/src/session/boundary.d.ts +43 -0
  95. package/types/src/session/identitySchema.d.ts +353 -0
  96. package/types/src/session/schema.d.ts +341 -0
  97. package/types/src/session/sleep/schema.d.ts +283 -0
  98. package/types/src/steering/schema.d.ts +197 -0
  99. package/types/src/types.d.ts +48 -0
  100. package/types/src/usage/schema.d.ts +978 -0
  101. package/types/src/util/home.d.ts +9 -0
  102. package/types/src/util/preview.d.ts +13 -0
  103. package/types/src/util/version.d.ts +3 -0
@@ -0,0 +1,578 @@
1
+ import { z } from 'zod';
2
+ /** Which conversation a line is in, and whose it is. Every line, conversation and receipt of an
3
+ * answer carries exactly this. */
4
+ export declare const ConversationRefSchema: z.ZodObject<{
5
+ address: z.ZodString;
6
+ provider: z.ZodEnum<{
7
+ claude: "claude";
8
+ codex: "codex";
9
+ }>;
10
+ threadId: z.ZodString;
11
+ session: z.ZodNullable<z.ZodString>;
12
+ ofSession: z.ZodNullable<z.ZodString>;
13
+ dir: z.ZodNullable<z.ZodString>;
14
+ repository: z.ZodNullable<z.ZodString>;
15
+ project: z.ZodOptional<z.ZodString>;
16
+ }, z.core.$strip>;
17
+ export type ConversationRef = z.infer<typeof ConversationRefSchema>;
18
+ export declare const CorpusMatchSchema: z.ZodObject<{
19
+ address: z.ZodString;
20
+ provider: z.ZodEnum<{
21
+ claude: "claude";
22
+ codex: "codex";
23
+ }>;
24
+ threadId: z.ZodString;
25
+ session: z.ZodNullable<z.ZodString>;
26
+ ofSession: z.ZodNullable<z.ZodString>;
27
+ dir: z.ZodNullable<z.ZodString>;
28
+ repository: z.ZodNullable<z.ZodString>;
29
+ project: z.ZodOptional<z.ZodString>;
30
+ lines: z.ZodBoolean;
31
+ seq: z.ZodInt;
32
+ createdAt: z.ZodNullable<z.ZodString>;
33
+ role: z.ZodEnum<{
34
+ assistant: "assistant";
35
+ system: "system";
36
+ tool: "tool";
37
+ unknown: "unknown";
38
+ user: "user";
39
+ }>;
40
+ kind: z.ZodEnum<{
41
+ event: "event";
42
+ image: "image";
43
+ message: "message";
44
+ thinking: "thinking";
45
+ tool_call: "tool_call";
46
+ tool_result: "tool_result";
47
+ unknown: "unknown";
48
+ }>;
49
+ toolName: z.ZodNullable<z.ZodString>;
50
+ field: z.ZodEnum<{
51
+ input: "input";
52
+ output: "output";
53
+ text: "text";
54
+ }>;
55
+ count: z.ZodInt;
56
+ excerpt: z.ZodObject<{
57
+ before: z.ZodString;
58
+ match: z.ZodString;
59
+ after: z.ZodString;
60
+ }, z.core.$strip>;
61
+ text: z.ZodNullable<z.ZodString>;
62
+ }, z.core.$strip>;
63
+ export type CorpusMatch = z.infer<typeof CorpusMatchSchema>;
64
+ /** One conversation's share of the answer: where a subject lived, before any single line of it. */
65
+ export declare const ConversationHitsSchema: z.ZodObject<{
66
+ address: z.ZodString;
67
+ provider: z.ZodEnum<{
68
+ claude: "claude";
69
+ codex: "codex";
70
+ }>;
71
+ threadId: z.ZodString;
72
+ session: z.ZodNullable<z.ZodString>;
73
+ ofSession: z.ZodNullable<z.ZodString>;
74
+ dir: z.ZodNullable<z.ZodString>;
75
+ repository: z.ZodNullable<z.ZodString>;
76
+ project: z.ZodOptional<z.ZodString>;
77
+ total: z.ZodInt;
78
+ user: z.ZodInt;
79
+ assistant: z.ZodInt;
80
+ firstAt: z.ZodNullable<z.ZodString>;
81
+ lastAt: z.ZodNullable<z.ZodString>;
82
+ sample: z.ZodObject<{
83
+ address: z.ZodString;
84
+ provider: z.ZodEnum<{
85
+ claude: "claude";
86
+ codex: "codex";
87
+ }>;
88
+ threadId: z.ZodString;
89
+ session: z.ZodNullable<z.ZodString>;
90
+ ofSession: z.ZodNullable<z.ZodString>;
91
+ dir: z.ZodNullable<z.ZodString>;
92
+ repository: z.ZodNullable<z.ZodString>;
93
+ project: z.ZodOptional<z.ZodString>;
94
+ lines: z.ZodBoolean;
95
+ seq: z.ZodInt;
96
+ createdAt: z.ZodNullable<z.ZodString>;
97
+ role: z.ZodEnum<{
98
+ assistant: "assistant";
99
+ system: "system";
100
+ tool: "tool";
101
+ unknown: "unknown";
102
+ user: "user";
103
+ }>;
104
+ kind: z.ZodEnum<{
105
+ event: "event";
106
+ image: "image";
107
+ message: "message";
108
+ thinking: "thinking";
109
+ tool_call: "tool_call";
110
+ tool_result: "tool_result";
111
+ unknown: "unknown";
112
+ }>;
113
+ toolName: z.ZodNullable<z.ZodString>;
114
+ field: z.ZodEnum<{
115
+ input: "input";
116
+ output: "output";
117
+ text: "text";
118
+ }>;
119
+ count: z.ZodInt;
120
+ excerpt: z.ZodObject<{
121
+ before: z.ZodString;
122
+ match: z.ZodString;
123
+ after: z.ZodString;
124
+ }, z.core.$strip>;
125
+ text: z.ZodNullable<z.ZodString>;
126
+ }, z.core.$strip>;
127
+ }, z.core.$strip>;
128
+ export type ConversationHits = z.infer<typeof ConversationHitsSchema>;
129
+ /**
130
+ * Where a marked message arrived: one conversation that holds the mark, and the first message there
131
+ * that carries it.
132
+ */
133
+ export declare const DeliverySchema: z.ZodObject<{
134
+ address: z.ZodString;
135
+ provider: z.ZodEnum<{
136
+ claude: "claude";
137
+ codex: "codex";
138
+ }>;
139
+ threadId: z.ZodString;
140
+ session: z.ZodNullable<z.ZodString>;
141
+ ofSession: z.ZodNullable<z.ZodString>;
142
+ dir: z.ZodNullable<z.ZodString>;
143
+ repository: z.ZodNullable<z.ZodString>;
144
+ project: z.ZodOptional<z.ZodString>;
145
+ lines: z.ZodBoolean;
146
+ seq: z.ZodInt;
147
+ receivedAt: z.ZodNullable<z.ZodString>;
148
+ role: z.ZodEnum<{
149
+ assistant: "assistant";
150
+ system: "system";
151
+ tool: "tool";
152
+ unknown: "unknown";
153
+ user: "user";
154
+ }>;
155
+ messageId: z.ZodString;
156
+ sender: z.ZodOptional<z.ZodNullable<z.ZodObject<{
157
+ verdict: z.ZodEnum<{
158
+ harness: "harness";
159
+ person: "person";
160
+ "routed-input": "routed-input";
161
+ "session-letter": "session-letter";
162
+ "stitchmux-keys": "stitchmux-keys";
163
+ unverifiable: "unverifiable";
164
+ }>;
165
+ reason: z.ZodString;
166
+ }, z.core.$strict>>>;
167
+ }, z.core.$strip>;
168
+ export type Delivery = z.infer<typeof DeliverySchema>;
169
+ /** How many distinct marks one machine keeps receipts for. */
170
+ export declare const RECEIPT_MARKS_MAX = 10000;
171
+ export declare const ReceiptsSchema: z.ZodObject<{
172
+ truncated: z.ZodBoolean;
173
+ marks: z.ZodArray<z.ZodObject<{
174
+ mark: z.ZodString;
175
+ deliveries: z.ZodArray<z.ZodObject<{
176
+ address: z.ZodString;
177
+ provider: z.ZodEnum<{
178
+ claude: "claude";
179
+ codex: "codex";
180
+ }>;
181
+ threadId: z.ZodString;
182
+ session: z.ZodNullable<z.ZodString>;
183
+ ofSession: z.ZodNullable<z.ZodString>;
184
+ dir: z.ZodNullable<z.ZodString>;
185
+ repository: z.ZodNullable<z.ZodString>;
186
+ project: z.ZodOptional<z.ZodString>;
187
+ lines: z.ZodBoolean;
188
+ seq: z.ZodInt;
189
+ receivedAt: z.ZodNullable<z.ZodString>;
190
+ role: z.ZodEnum<{
191
+ assistant: "assistant";
192
+ system: "system";
193
+ tool: "tool";
194
+ unknown: "unknown";
195
+ user: "user";
196
+ }>;
197
+ messageId: z.ZodString;
198
+ sender: z.ZodOptional<z.ZodNullable<z.ZodObject<{
199
+ verdict: z.ZodEnum<{
200
+ harness: "harness";
201
+ person: "person";
202
+ "routed-input": "routed-input";
203
+ "session-letter": "session-letter";
204
+ "stitchmux-keys": "stitchmux-keys";
205
+ unverifiable: "unverifiable";
206
+ }>;
207
+ reason: z.ZodString;
208
+ }, z.core.$strict>>>;
209
+ }, z.core.$strip>>;
210
+ }, z.core.$strip>>;
211
+ }, z.core.$strip>;
212
+ export type Receipts = z.infer<typeof ReceiptsSchema>;
213
+ /** What one machine looked through. "Nothing found" is only an answer beside these numbers. */
214
+ export declare const MachineCoverageSchema: z.ZodObject<{
215
+ machine: z.ZodString;
216
+ status: z.ZodLiteral<"searched">;
217
+ elapsedMs: z.ZodInt;
218
+ conversations: z.ZodInt;
219
+ files: z.ZodInt;
220
+ bytes: z.ZodInt;
221
+ skippedFiles: z.ZodInt;
222
+ unreadableFiles: z.ZodInt;
223
+ total: z.ZodInt;
224
+ }, z.core.$strip>;
225
+ export type MachineCoverage = z.infer<typeof MachineCoverageSchema>;
226
+ export declare const MachineUnavailableSchema: z.ZodObject<{
227
+ machine: z.ZodString;
228
+ status: z.ZodLiteral<"unavailable">;
229
+ error: z.ZodString;
230
+ }, z.core.$strip>;
231
+ export declare const FleetConversationHitsSchema: z.ZodObject<{
232
+ address: z.ZodString;
233
+ provider: z.ZodEnum<{
234
+ claude: "claude";
235
+ codex: "codex";
236
+ }>;
237
+ threadId: z.ZodString;
238
+ session: z.ZodNullable<z.ZodString>;
239
+ ofSession: z.ZodNullable<z.ZodString>;
240
+ dir: z.ZodNullable<z.ZodString>;
241
+ repository: z.ZodNullable<z.ZodString>;
242
+ project: z.ZodOptional<z.ZodString>;
243
+ total: z.ZodInt;
244
+ user: z.ZodInt;
245
+ assistant: z.ZodInt;
246
+ firstAt: z.ZodNullable<z.ZodString>;
247
+ lastAt: z.ZodNullable<z.ZodString>;
248
+ sample: z.ZodObject<{
249
+ address: z.ZodString;
250
+ provider: z.ZodEnum<{
251
+ claude: "claude";
252
+ codex: "codex";
253
+ }>;
254
+ threadId: z.ZodString;
255
+ session: z.ZodNullable<z.ZodString>;
256
+ ofSession: z.ZodNullable<z.ZodString>;
257
+ dir: z.ZodNullable<z.ZodString>;
258
+ repository: z.ZodNullable<z.ZodString>;
259
+ project: z.ZodOptional<z.ZodString>;
260
+ lines: z.ZodBoolean;
261
+ seq: z.ZodInt;
262
+ createdAt: z.ZodNullable<z.ZodString>;
263
+ role: z.ZodEnum<{
264
+ assistant: "assistant";
265
+ system: "system";
266
+ tool: "tool";
267
+ unknown: "unknown";
268
+ user: "user";
269
+ }>;
270
+ kind: z.ZodEnum<{
271
+ event: "event";
272
+ image: "image";
273
+ message: "message";
274
+ thinking: "thinking";
275
+ tool_call: "tool_call";
276
+ tool_result: "tool_result";
277
+ unknown: "unknown";
278
+ }>;
279
+ toolName: z.ZodNullable<z.ZodString>;
280
+ field: z.ZodEnum<{
281
+ input: "input";
282
+ output: "output";
283
+ text: "text";
284
+ }>;
285
+ count: z.ZodInt;
286
+ excerpt: z.ZodObject<{
287
+ before: z.ZodString;
288
+ match: z.ZodString;
289
+ after: z.ZodString;
290
+ }, z.core.$strip>;
291
+ text: z.ZodNullable<z.ZodString>;
292
+ }, z.core.$strip>;
293
+ machine: z.ZodString;
294
+ }, z.core.$strip>;
295
+ export declare const FleetMatchSchema: z.ZodObject<{
296
+ address: z.ZodString;
297
+ provider: z.ZodEnum<{
298
+ claude: "claude";
299
+ codex: "codex";
300
+ }>;
301
+ threadId: z.ZodString;
302
+ session: z.ZodNullable<z.ZodString>;
303
+ ofSession: z.ZodNullable<z.ZodString>;
304
+ dir: z.ZodNullable<z.ZodString>;
305
+ repository: z.ZodNullable<z.ZodString>;
306
+ project: z.ZodOptional<z.ZodString>;
307
+ lines: z.ZodBoolean;
308
+ seq: z.ZodInt;
309
+ createdAt: z.ZodNullable<z.ZodString>;
310
+ role: z.ZodEnum<{
311
+ assistant: "assistant";
312
+ system: "system";
313
+ tool: "tool";
314
+ unknown: "unknown";
315
+ user: "user";
316
+ }>;
317
+ kind: z.ZodEnum<{
318
+ event: "event";
319
+ image: "image";
320
+ message: "message";
321
+ thinking: "thinking";
322
+ tool_call: "tool_call";
323
+ tool_result: "tool_result";
324
+ unknown: "unknown";
325
+ }>;
326
+ toolName: z.ZodNullable<z.ZodString>;
327
+ field: z.ZodEnum<{
328
+ input: "input";
329
+ output: "output";
330
+ text: "text";
331
+ }>;
332
+ count: z.ZodInt;
333
+ excerpt: z.ZodObject<{
334
+ before: z.ZodString;
335
+ match: z.ZodString;
336
+ after: z.ZodString;
337
+ }, z.core.$strip>;
338
+ text: z.ZodNullable<z.ZodString>;
339
+ machine: z.ZodString;
340
+ }, z.core.$strip>;
341
+ export declare const FleetDeliverySchema: z.ZodObject<{
342
+ address: z.ZodString;
343
+ provider: z.ZodEnum<{
344
+ claude: "claude";
345
+ codex: "codex";
346
+ }>;
347
+ threadId: z.ZodString;
348
+ session: z.ZodNullable<z.ZodString>;
349
+ ofSession: z.ZodNullable<z.ZodString>;
350
+ dir: z.ZodNullable<z.ZodString>;
351
+ repository: z.ZodNullable<z.ZodString>;
352
+ project: z.ZodOptional<z.ZodString>;
353
+ lines: z.ZodBoolean;
354
+ seq: z.ZodInt;
355
+ receivedAt: z.ZodNullable<z.ZodString>;
356
+ role: z.ZodEnum<{
357
+ assistant: "assistant";
358
+ system: "system";
359
+ tool: "tool";
360
+ unknown: "unknown";
361
+ user: "user";
362
+ }>;
363
+ messageId: z.ZodString;
364
+ sender: z.ZodOptional<z.ZodNullable<z.ZodObject<{
365
+ verdict: z.ZodEnum<{
366
+ harness: "harness";
367
+ person: "person";
368
+ "routed-input": "routed-input";
369
+ "session-letter": "session-letter";
370
+ "stitchmux-keys": "stitchmux-keys";
371
+ unverifiable: "unverifiable";
372
+ }>;
373
+ reason: z.ZodString;
374
+ }, z.core.$strict>>>;
375
+ machine: z.ZodString;
376
+ }, z.core.$strip>;
377
+ export declare const CorpusSearchJsonSchema: z.ZodObject<{
378
+ query: z.ZodObject<{
379
+ pattern: z.ZodNullable<z.ZodString>;
380
+ flags: z.ZodString;
381
+ roles: z.ZodNullable<z.ZodArray<z.ZodEnum<{
382
+ assistant: "assistant";
383
+ system: "system";
384
+ tool: "tool";
385
+ unknown: "unknown";
386
+ user: "user";
387
+ }>>>;
388
+ kinds: z.ZodArray<z.ZodEnum<{
389
+ event: "event";
390
+ image: "image";
391
+ message: "message";
392
+ thinking: "thinking";
393
+ tool_call: "tool_call";
394
+ tool_result: "tool_result";
395
+ unknown: "unknown";
396
+ }>>;
397
+ providers: z.ZodNullable<z.ZodArray<z.ZodEnum<{
398
+ claude: "claude";
399
+ codex: "codex";
400
+ }>>>;
401
+ project: z.ZodNullable<z.ZodString>;
402
+ since: z.ZodNullable<z.ZodString>;
403
+ until: z.ZodNullable<z.ZodString>;
404
+ limit: z.ZodInt;
405
+ full: z.ZodBoolean;
406
+ receipts: z.ZodOptional<z.ZodBoolean>;
407
+ }, z.core.$strip>;
408
+ machines: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
409
+ machine: z.ZodString;
410
+ status: z.ZodLiteral<"searched">;
411
+ elapsedMs: z.ZodInt;
412
+ conversations: z.ZodInt;
413
+ files: z.ZodInt;
414
+ bytes: z.ZodInt;
415
+ skippedFiles: z.ZodInt;
416
+ unreadableFiles: z.ZodInt;
417
+ total: z.ZodInt;
418
+ }, z.core.$strip>, z.ZodObject<{
419
+ machine: z.ZodString;
420
+ status: z.ZodLiteral<"unavailable">;
421
+ error: z.ZodString;
422
+ }, z.core.$strip>]>>;
423
+ total: z.ZodInt;
424
+ truncated: z.ZodBoolean;
425
+ conversations: z.ZodArray<z.ZodObject<{
426
+ address: z.ZodString;
427
+ provider: z.ZodEnum<{
428
+ claude: "claude";
429
+ codex: "codex";
430
+ }>;
431
+ threadId: z.ZodString;
432
+ session: z.ZodNullable<z.ZodString>;
433
+ ofSession: z.ZodNullable<z.ZodString>;
434
+ dir: z.ZodNullable<z.ZodString>;
435
+ repository: z.ZodNullable<z.ZodString>;
436
+ project: z.ZodOptional<z.ZodString>;
437
+ total: z.ZodInt;
438
+ user: z.ZodInt;
439
+ assistant: z.ZodInt;
440
+ firstAt: z.ZodNullable<z.ZodString>;
441
+ lastAt: z.ZodNullable<z.ZodString>;
442
+ sample: z.ZodObject<{
443
+ address: z.ZodString;
444
+ provider: z.ZodEnum<{
445
+ claude: "claude";
446
+ codex: "codex";
447
+ }>;
448
+ threadId: z.ZodString;
449
+ session: z.ZodNullable<z.ZodString>;
450
+ ofSession: z.ZodNullable<z.ZodString>;
451
+ dir: z.ZodNullable<z.ZodString>;
452
+ repository: z.ZodNullable<z.ZodString>;
453
+ project: z.ZodOptional<z.ZodString>;
454
+ lines: z.ZodBoolean;
455
+ seq: z.ZodInt;
456
+ createdAt: z.ZodNullable<z.ZodString>;
457
+ role: z.ZodEnum<{
458
+ assistant: "assistant";
459
+ system: "system";
460
+ tool: "tool";
461
+ unknown: "unknown";
462
+ user: "user";
463
+ }>;
464
+ kind: z.ZodEnum<{
465
+ event: "event";
466
+ image: "image";
467
+ message: "message";
468
+ thinking: "thinking";
469
+ tool_call: "tool_call";
470
+ tool_result: "tool_result";
471
+ unknown: "unknown";
472
+ }>;
473
+ toolName: z.ZodNullable<z.ZodString>;
474
+ field: z.ZodEnum<{
475
+ input: "input";
476
+ output: "output";
477
+ text: "text";
478
+ }>;
479
+ count: z.ZodInt;
480
+ excerpt: z.ZodObject<{
481
+ before: z.ZodString;
482
+ match: z.ZodString;
483
+ after: z.ZodString;
484
+ }, z.core.$strip>;
485
+ text: z.ZodNullable<z.ZodString>;
486
+ }, z.core.$strip>;
487
+ machine: z.ZodString;
488
+ }, z.core.$strip>>;
489
+ matches: z.ZodArray<z.ZodObject<{
490
+ address: z.ZodString;
491
+ provider: z.ZodEnum<{
492
+ claude: "claude";
493
+ codex: "codex";
494
+ }>;
495
+ threadId: z.ZodString;
496
+ session: z.ZodNullable<z.ZodString>;
497
+ ofSession: z.ZodNullable<z.ZodString>;
498
+ dir: z.ZodNullable<z.ZodString>;
499
+ repository: z.ZodNullable<z.ZodString>;
500
+ project: z.ZodOptional<z.ZodString>;
501
+ lines: z.ZodBoolean;
502
+ seq: z.ZodInt;
503
+ createdAt: z.ZodNullable<z.ZodString>;
504
+ role: z.ZodEnum<{
505
+ assistant: "assistant";
506
+ system: "system";
507
+ tool: "tool";
508
+ unknown: "unknown";
509
+ user: "user";
510
+ }>;
511
+ kind: z.ZodEnum<{
512
+ event: "event";
513
+ image: "image";
514
+ message: "message";
515
+ thinking: "thinking";
516
+ tool_call: "tool_call";
517
+ tool_result: "tool_result";
518
+ unknown: "unknown";
519
+ }>;
520
+ toolName: z.ZodNullable<z.ZodString>;
521
+ field: z.ZodEnum<{
522
+ input: "input";
523
+ output: "output";
524
+ text: "text";
525
+ }>;
526
+ count: z.ZodInt;
527
+ excerpt: z.ZodObject<{
528
+ before: z.ZodString;
529
+ match: z.ZodString;
530
+ after: z.ZodString;
531
+ }, z.core.$strip>;
532
+ text: z.ZodNullable<z.ZodString>;
533
+ machine: z.ZodString;
534
+ }, z.core.$strip>>;
535
+ receipts: z.ZodOptional<z.ZodObject<{
536
+ truncated: z.ZodBoolean;
537
+ marks: z.ZodArray<z.ZodObject<{
538
+ mark: z.ZodString;
539
+ deliveries: z.ZodArray<z.ZodObject<{
540
+ address: z.ZodString;
541
+ provider: z.ZodEnum<{
542
+ claude: "claude";
543
+ codex: "codex";
544
+ }>;
545
+ threadId: z.ZodString;
546
+ session: z.ZodNullable<z.ZodString>;
547
+ ofSession: z.ZodNullable<z.ZodString>;
548
+ dir: z.ZodNullable<z.ZodString>;
549
+ repository: z.ZodNullable<z.ZodString>;
550
+ project: z.ZodOptional<z.ZodString>;
551
+ lines: z.ZodBoolean;
552
+ seq: z.ZodInt;
553
+ receivedAt: z.ZodNullable<z.ZodString>;
554
+ role: z.ZodEnum<{
555
+ assistant: "assistant";
556
+ system: "system";
557
+ tool: "tool";
558
+ unknown: "unknown";
559
+ user: "user";
560
+ }>;
561
+ messageId: z.ZodString;
562
+ sender: z.ZodOptional<z.ZodNullable<z.ZodObject<{
563
+ verdict: z.ZodEnum<{
564
+ harness: "harness";
565
+ person: "person";
566
+ "routed-input": "routed-input";
567
+ "session-letter": "session-letter";
568
+ "stitchmux-keys": "stitchmux-keys";
569
+ unverifiable: "unverifiable";
570
+ }>;
571
+ reason: z.ZodString;
572
+ }, z.core.$strict>>>;
573
+ machine: z.ZodString;
574
+ }, z.core.$strip>>;
575
+ }, z.core.$strip>>;
576
+ }, z.core.$strip>>;
577
+ }, z.core.$strip>;
578
+ export type CorpusSearchJson = z.infer<typeof CorpusSearchJsonSchema>;
@@ -0,0 +1,54 @@
1
+ import { z } from 'zod';
2
+ /** The answer of one message read whole by its id — what `exactMessage.ts` returns. */
3
+ export declare const EXACT_MESSAGE_LIMITS: {
4
+ /** The message text is returned whole or not at all; past this it is `too-large`. */
5
+ textBytes: number;
6
+ };
7
+ /**
8
+ * `resolved`: the exact message, whole. `not-found`: the conversation has no record with that id.
9
+ * `not-user-input`: the id names something that is not a user message — the agent's answer, a tool
10
+ * call. `ambiguous`: the record holds several user messages; name one by its full id. `too-large`:
11
+ * the text exceeds the bound and is not returned cut. `unsupported`: this session's runtime keeps
12
+ * no history file to read a record from. `unavailable`: the history could not be read.
13
+ */
14
+ export declare const ExactMessageOutcomeSchema: z.ZodEnum<{
15
+ ambiguous: "ambiguous";
16
+ "not-found": "not-found";
17
+ "not-user-input": "not-user-input";
18
+ resolved: "resolved";
19
+ "too-large": "too-large";
20
+ unavailable: "unavailable";
21
+ unsupported: "unsupported";
22
+ }>;
23
+ export declare const ExactMessageResultSchema: z.ZodObject<{
24
+ target: z.ZodString;
25
+ messageId: z.ZodString;
26
+ outcome: z.ZodEnum<{
27
+ ambiguous: "ambiguous";
28
+ "not-found": "not-found";
29
+ "not-user-input": "not-user-input";
30
+ resolved: "resolved";
31
+ "too-large": "too-large";
32
+ unavailable: "unavailable";
33
+ unsupported: "unsupported";
34
+ }>;
35
+ observedAt: z.ZodISODateTime;
36
+ message: z.ZodNullable<z.ZodObject<{
37
+ id: z.ZodString;
38
+ seq: z.ZodInt;
39
+ recordedAt: z.ZodNullable<z.ZodString>;
40
+ text: z.ZodString;
41
+ sender: z.ZodObject<{
42
+ verdict: z.ZodEnum<{
43
+ harness: "harness";
44
+ person: "person";
45
+ "routed-input": "routed-input";
46
+ "session-letter": "session-letter";
47
+ "stitchmux-keys": "stitchmux-keys";
48
+ unverifiable: "unverifiable";
49
+ }>;
50
+ reason: z.ZodString;
51
+ }, z.core.$strict>;
52
+ }, z.core.$strict>>;
53
+ }, z.core.$strict>;
54
+ export type ExactMessageResult = z.infer<typeof ExactMessageResultSchema>;
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ /** Who put a message into the user's side of a conversation — the verdict `messageSender.ts` gives. */
3
+ export declare const MessageSenderSchema: z.ZodObject<{
4
+ verdict: z.ZodEnum<{
5
+ harness: "harness";
6
+ person: "person";
7
+ "routed-input": "routed-input";
8
+ "session-letter": "session-letter";
9
+ "stitchmux-keys": "stitchmux-keys";
10
+ unverifiable: "unverifiable";
11
+ }>;
12
+ reason: z.ZodString;
13
+ }, z.core.$strict>;
14
+ export type MessageSender = z.infer<typeof MessageSenderSchema>;