opencode-auto-resume 1.1.9 → 1.1.11

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 (2) hide show
  1. package/dist/index.js +875 -709
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -17,495 +17,495 @@ var __export = (target, all) => {
17
17
  // node_modules/zod/v4/classic/external.js
18
18
  var exports_external = {};
19
19
  __export(exports_external, {
20
- xid: () => xid2,
21
- void: () => _void2,
22
- uuidv7: () => uuidv7,
23
- uuidv6: () => uuidv6,
24
- uuidv4: () => uuidv4,
25
- uuid: () => uuid2,
26
- util: () => exports_util,
27
- url: () => url,
28
- uppercase: () => _uppercase,
29
- unknown: () => unknown,
30
- union: () => union,
31
- undefined: () => _undefined3,
32
- ulid: () => ulid2,
33
- uint64: () => uint64,
34
- uint32: () => uint32,
35
- tuple: () => tuple,
36
- trim: () => _trim,
37
- treeifyError: () => treeifyError,
38
- transform: () => transform,
39
- toUpperCase: () => _toUpperCase,
40
- toLowerCase: () => _toLowerCase,
41
- toJSONSchema: () => toJSONSchema,
42
- templateLiteral: () => templateLiteral,
43
- symbol: () => symbol,
44
- superRefine: () => superRefine,
45
- success: () => success,
46
- stringbool: () => stringbool,
47
- stringFormat: () => stringFormat,
48
- string: () => string2,
49
- strictObject: () => strictObject,
50
- startsWith: () => _startsWith,
51
- size: () => _size,
52
- setErrorMap: () => setErrorMap,
53
- set: () => set,
54
- safeParseAsync: () => safeParseAsync2,
55
- safeParse: () => safeParse2,
56
- safeEncodeAsync: () => safeEncodeAsync2,
57
- safeEncode: () => safeEncode2,
58
- safeDecodeAsync: () => safeDecodeAsync2,
59
- safeDecode: () => safeDecode2,
60
- registry: () => registry,
61
- regexes: () => exports_regexes,
62
- regex: () => _regex,
63
- refine: () => refine,
64
- record: () => record,
65
- readonly: () => readonly,
66
- property: () => _property,
67
- promise: () => promise,
68
- prettifyError: () => prettifyError,
69
- preprocess: () => preprocess,
70
- prefault: () => prefault,
71
- positive: () => _positive,
72
- pipe: () => pipe,
73
- partialRecord: () => partialRecord,
74
- parseAsync: () => parseAsync2,
75
- parse: () => parse3,
76
- overwrite: () => _overwrite,
77
- optional: () => optional,
78
- object: () => object,
79
- number: () => number2,
80
- nullish: () => nullish2,
81
- nullable: () => nullable,
82
- null: () => _null3,
83
- normalize: () => _normalize,
84
- nonpositive: () => _nonpositive,
85
- nonoptional: () => nonoptional,
86
- nonnegative: () => _nonnegative,
87
- never: () => never,
88
- negative: () => _negative,
89
- nativeEnum: () => nativeEnum,
90
- nanoid: () => nanoid2,
91
- nan: () => nan,
92
- multipleOf: () => _multipleOf,
93
- minSize: () => _minSize,
94
- minLength: () => _minLength,
95
- mime: () => _mime,
96
- maxSize: () => _maxSize,
97
- maxLength: () => _maxLength,
98
- map: () => map,
99
- lte: () => _lte,
100
- lt: () => _lt,
101
- lowercase: () => _lowercase,
102
- looseObject: () => looseObject,
103
- locales: () => exports_locales,
104
- literal: () => literal,
105
- length: () => _length,
106
- lazy: () => lazy,
107
- ksuid: () => ksuid2,
108
- keyof: () => keyof,
109
- jwt: () => jwt,
110
- json: () => json,
111
- iso: () => exports_iso,
112
- ipv6: () => ipv62,
113
- ipv4: () => ipv42,
114
- intersection: () => intersection,
115
- int64: () => int64,
116
- int32: () => int32,
117
- int: () => int,
118
- instanceof: () => _instanceof,
119
- includes: () => _includes,
120
- httpUrl: () => httpUrl,
121
- hostname: () => hostname2,
122
- hex: () => hex2,
123
- hash: () => hash,
124
- guid: () => guid2,
125
- gte: () => _gte,
126
- gt: () => _gt,
127
- globalRegistry: () => globalRegistry,
128
- getErrorMap: () => getErrorMap,
129
- function: () => _function,
130
- formatError: () => formatError,
131
- float64: () => float64,
132
- float32: () => float32,
133
- flattenError: () => flattenError,
134
- file: () => file,
135
- enum: () => _enum2,
136
- endsWith: () => _endsWith,
137
- encodeAsync: () => encodeAsync2,
138
- encode: () => encode2,
139
- emoji: () => emoji2,
140
- email: () => email2,
141
- e164: () => e1642,
142
- discriminatedUnion: () => discriminatedUnion,
143
- decodeAsync: () => decodeAsync2,
144
- decode: () => decode2,
145
- date: () => date3,
146
- custom: () => custom,
147
- cuid2: () => cuid22,
148
- cuid: () => cuid3,
149
- core: () => exports_core2,
150
- config: () => config,
151
- coerce: () => exports_coerce,
152
- codec: () => codec,
153
- clone: () => clone,
154
- cidrv6: () => cidrv62,
155
- cidrv4: () => cidrv42,
156
- check: () => check,
157
- catch: () => _catch2,
158
- boolean: () => boolean2,
159
- bigint: () => bigint2,
160
- base64url: () => base64url2,
161
- base64: () => base642,
162
- array: () => array,
163
- any: () => any,
164
- _function: () => _function,
165
- _default: () => _default2,
166
- _ZodString: () => _ZodString,
167
- ZodXID: () => ZodXID,
168
- ZodVoid: () => ZodVoid,
169
- ZodUnknown: () => ZodUnknown,
170
- ZodUnion: () => ZodUnion,
171
- ZodUndefined: () => ZodUndefined,
172
- ZodUUID: () => ZodUUID,
173
- ZodURL: () => ZodURL,
174
- ZodULID: () => ZodULID,
175
- ZodType: () => ZodType,
176
- ZodTuple: () => ZodTuple,
177
- ZodTransform: () => ZodTransform,
178
- ZodTemplateLiteral: () => ZodTemplateLiteral,
179
- ZodSymbol: () => ZodSymbol,
180
- ZodSuccess: () => ZodSuccess,
181
- ZodStringFormat: () => ZodStringFormat,
182
- ZodString: () => ZodString,
183
- ZodSet: () => ZodSet,
184
- ZodRecord: () => ZodRecord,
185
- ZodRealError: () => ZodRealError,
186
- ZodReadonly: () => ZodReadonly,
187
- ZodPromise: () => ZodPromise,
188
- ZodPrefault: () => ZodPrefault,
189
- ZodPipe: () => ZodPipe,
190
- ZodOptional: () => ZodOptional,
191
- ZodObject: () => ZodObject,
192
- ZodNumberFormat: () => ZodNumberFormat,
193
- ZodNumber: () => ZodNumber,
194
- ZodNullable: () => ZodNullable,
195
- ZodNull: () => ZodNull,
196
- ZodNonOptional: () => ZodNonOptional,
197
- ZodNever: () => ZodNever,
198
- ZodNanoID: () => ZodNanoID,
199
- ZodNaN: () => ZodNaN,
200
- ZodMap: () => ZodMap,
201
- ZodLiteral: () => ZodLiteral,
202
- ZodLazy: () => ZodLazy,
203
- ZodKSUID: () => ZodKSUID,
204
- ZodJWT: () => ZodJWT,
205
- ZodIssueCode: () => ZodIssueCode,
206
- ZodIntersection: () => ZodIntersection,
207
- ZodISOTime: () => ZodISOTime,
208
- ZodISODuration: () => ZodISODuration,
209
- ZodISODateTime: () => ZodISODateTime,
210
- ZodISODate: () => ZodISODate,
211
- ZodIPv6: () => ZodIPv6,
212
- ZodIPv4: () => ZodIPv4,
213
- ZodGUID: () => ZodGUID,
214
- ZodFunction: () => ZodFunction,
215
- ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
216
- ZodFile: () => ZodFile,
217
- ZodError: () => ZodError,
218
- ZodEnum: () => ZodEnum,
219
- ZodEmoji: () => ZodEmoji,
220
- ZodEmail: () => ZodEmail,
221
- ZodE164: () => ZodE164,
222
- ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
223
- ZodDefault: () => ZodDefault,
224
- ZodDate: () => ZodDate,
225
- ZodCustomStringFormat: () => ZodCustomStringFormat,
226
- ZodCustom: () => ZodCustom,
227
- ZodCodec: () => ZodCodec,
228
- ZodCatch: () => ZodCatch,
229
- ZodCUID2: () => ZodCUID2,
230
- ZodCUID: () => ZodCUID,
231
- ZodCIDRv6: () => ZodCIDRv6,
232
- ZodCIDRv4: () => ZodCIDRv4,
233
- ZodBoolean: () => ZodBoolean,
234
- ZodBigIntFormat: () => ZodBigIntFormat,
235
- ZodBigInt: () => ZodBigInt,
236
- ZodBase64URL: () => ZodBase64URL,
237
- ZodBase64: () => ZodBase64,
238
- ZodArray: () => ZodArray,
239
- ZodAny: () => ZodAny,
240
- TimePrecision: () => TimePrecision,
241
- NEVER: () => NEVER,
242
- $output: () => $output,
243
- $input: () => $input,
244
- $brand: () => $brand
245
- });
246
-
247
- // node_modules/zod/v4/core/index.js
248
- var exports_core2 = {};
249
- __export(exports_core2, {
250
- version: () => version,
251
- util: () => exports_util,
252
- treeifyError: () => treeifyError,
253
- toJSONSchema: () => toJSONSchema,
254
- toDotPath: () => toDotPath,
255
- safeParseAsync: () => safeParseAsync,
256
- safeParse: () => safeParse,
257
- safeEncodeAsync: () => safeEncodeAsync,
258
- safeEncode: () => safeEncode,
259
- safeDecodeAsync: () => safeDecodeAsync,
260
- safeDecode: () => safeDecode,
261
- registry: () => registry,
262
- regexes: () => exports_regexes,
263
- prettifyError: () => prettifyError,
264
- parseAsync: () => parseAsync,
265
- parse: () => parse,
266
- locales: () => exports_locales,
267
- isValidJWT: () => isValidJWT,
268
- isValidBase64URL: () => isValidBase64URL,
269
- isValidBase64: () => isValidBase64,
270
- globalRegistry: () => globalRegistry,
271
- globalConfig: () => globalConfig,
272
- formatError: () => formatError,
273
- flattenError: () => flattenError,
274
- encodeAsync: () => encodeAsync,
275
- encode: () => encode,
276
- decodeAsync: () => decodeAsync,
277
- decode: () => decode,
278
- config: () => config,
279
- clone: () => clone,
280
- _xid: () => _xid,
281
- _void: () => _void,
282
- _uuidv7: () => _uuidv7,
283
- _uuidv6: () => _uuidv6,
284
- _uuidv4: () => _uuidv4,
285
- _uuid: () => _uuid,
286
- _url: () => _url,
287
- _uppercase: () => _uppercase,
288
- _unknown: () => _unknown,
289
- _union: () => _union,
290
- _undefined: () => _undefined2,
291
- _ulid: () => _ulid,
292
- _uint64: () => _uint64,
293
- _uint32: () => _uint32,
294
- _tuple: () => _tuple,
295
- _trim: () => _trim,
296
- _transform: () => _transform,
297
- _toUpperCase: () => _toUpperCase,
298
- _toLowerCase: () => _toLowerCase,
299
- _templateLiteral: () => _templateLiteral,
300
- _symbol: () => _symbol,
301
- _superRefine: () => _superRefine,
302
- _success: () => _success,
303
- _stringbool: () => _stringbool,
304
- _stringFormat: () => _stringFormat,
305
- _string: () => _string,
306
- _startsWith: () => _startsWith,
307
- _size: () => _size,
308
- _set: () => _set,
309
- _safeParseAsync: () => _safeParseAsync,
310
- _safeParse: () => _safeParse,
311
- _safeEncodeAsync: () => _safeEncodeAsync,
312
- _safeEncode: () => _safeEncode,
313
- _safeDecodeAsync: () => _safeDecodeAsync,
314
- _safeDecode: () => _safeDecode,
315
- _regex: () => _regex,
316
- _refine: () => _refine,
317
- _record: () => _record,
318
- _readonly: () => _readonly,
319
- _property: () => _property,
320
- _promise: () => _promise,
321
- _positive: () => _positive,
322
- _pipe: () => _pipe,
323
- _parseAsync: () => _parseAsync,
324
- _parse: () => _parse,
325
- _overwrite: () => _overwrite,
326
- _optional: () => _optional,
327
- _number: () => _number,
328
- _nullable: () => _nullable,
329
- _null: () => _null2,
330
- _normalize: () => _normalize,
331
- _nonpositive: () => _nonpositive,
332
- _nonoptional: () => _nonoptional,
333
- _nonnegative: () => _nonnegative,
334
- _never: () => _never,
335
- _negative: () => _negative,
336
- _nativeEnum: () => _nativeEnum,
337
- _nanoid: () => _nanoid,
338
- _nan: () => _nan,
339
- _multipleOf: () => _multipleOf,
340
- _minSize: () => _minSize,
341
- _minLength: () => _minLength,
342
- _min: () => _gte,
343
- _mime: () => _mime,
344
- _maxSize: () => _maxSize,
345
- _maxLength: () => _maxLength,
346
- _max: () => _lte,
347
- _map: () => _map,
348
- _lte: () => _lte,
349
- _lt: () => _lt,
350
- _lowercase: () => _lowercase,
351
- _literal: () => _literal,
352
- _length: () => _length,
353
- _lazy: () => _lazy,
354
- _ksuid: () => _ksuid,
355
- _jwt: () => _jwt,
356
- _isoTime: () => _isoTime,
357
- _isoDuration: () => _isoDuration,
358
- _isoDateTime: () => _isoDateTime,
359
- _isoDate: () => _isoDate,
360
- _ipv6: () => _ipv6,
361
- _ipv4: () => _ipv4,
362
- _intersection: () => _intersection,
363
- _int64: () => _int64,
364
- _int32: () => _int32,
365
- _int: () => _int,
366
- _includes: () => _includes,
367
- _guid: () => _guid,
368
- _gte: () => _gte,
369
- _gt: () => _gt,
370
- _float64: () => _float64,
371
- _float32: () => _float32,
372
- _file: () => _file,
373
- _enum: () => _enum,
374
- _endsWith: () => _endsWith,
375
- _encodeAsync: () => _encodeAsync,
376
- _encode: () => _encode,
377
- _emoji: () => _emoji2,
378
- _email: () => _email,
379
- _e164: () => _e164,
380
- _discriminatedUnion: () => _discriminatedUnion,
381
- _default: () => _default,
382
- _decodeAsync: () => _decodeAsync,
383
- _decode: () => _decode,
384
- _date: () => _date,
385
- _custom: () => _custom,
386
- _cuid2: () => _cuid2,
387
- _cuid: () => _cuid,
388
- _coercedString: () => _coercedString,
389
- _coercedNumber: () => _coercedNumber,
390
- _coercedDate: () => _coercedDate,
391
- _coercedBoolean: () => _coercedBoolean,
392
- _coercedBigint: () => _coercedBigint,
393
- _cidrv6: () => _cidrv6,
394
- _cidrv4: () => _cidrv4,
395
- _check: () => _check,
396
- _catch: () => _catch,
397
- _boolean: () => _boolean,
398
- _bigint: () => _bigint,
399
- _base64url: () => _base64url,
400
- _base64: () => _base64,
401
- _array: () => _array,
402
- _any: () => _any,
403
- TimePrecision: () => TimePrecision,
404
- NEVER: () => NEVER,
405
- JSONSchemaGenerator: () => JSONSchemaGenerator,
406
- JSONSchema: () => exports_json_schema,
407
- Doc: () => Doc,
408
- $output: () => $output,
409
- $input: () => $input,
410
- $constructor: () => $constructor,
411
20
  $brand: () => $brand,
412
- $ZodXID: () => $ZodXID,
413
- $ZodVoid: () => $ZodVoid,
414
- $ZodUnknown: () => $ZodUnknown,
415
- $ZodUnion: () => $ZodUnion,
416
- $ZodUndefined: () => $ZodUndefined,
417
- $ZodUUID: () => $ZodUUID,
418
- $ZodURL: () => $ZodURL,
419
- $ZodULID: () => $ZodULID,
420
- $ZodType: () => $ZodType,
421
- $ZodTuple: () => $ZodTuple,
422
- $ZodTransform: () => $ZodTransform,
423
- $ZodTemplateLiteral: () => $ZodTemplateLiteral,
424
- $ZodSymbol: () => $ZodSymbol,
425
- $ZodSuccess: () => $ZodSuccess,
426
- $ZodStringFormat: () => $ZodStringFormat,
427
- $ZodString: () => $ZodString,
428
- $ZodSet: () => $ZodSet,
429
- $ZodRegistry: () => $ZodRegistry,
430
- $ZodRecord: () => $ZodRecord,
431
- $ZodRealError: () => $ZodRealError,
432
- $ZodReadonly: () => $ZodReadonly,
433
- $ZodPromise: () => $ZodPromise,
434
- $ZodPrefault: () => $ZodPrefault,
435
- $ZodPipe: () => $ZodPipe,
436
- $ZodOptional: () => $ZodOptional,
437
- $ZodObjectJIT: () => $ZodObjectJIT,
438
- $ZodObject: () => $ZodObject,
439
- $ZodNumberFormat: () => $ZodNumberFormat,
440
- $ZodNumber: () => $ZodNumber,
441
- $ZodNullable: () => $ZodNullable,
442
- $ZodNull: () => $ZodNull,
443
- $ZodNonOptional: () => $ZodNonOptional,
444
- $ZodNever: () => $ZodNever,
445
- $ZodNanoID: () => $ZodNanoID,
446
- $ZodNaN: () => $ZodNaN,
447
- $ZodMap: () => $ZodMap,
448
- $ZodLiteral: () => $ZodLiteral,
449
- $ZodLazy: () => $ZodLazy,
450
- $ZodKSUID: () => $ZodKSUID,
451
- $ZodJWT: () => $ZodJWT,
452
- $ZodIntersection: () => $ZodIntersection,
453
- $ZodISOTime: () => $ZodISOTime,
454
- $ZodISODuration: () => $ZodISODuration,
455
- $ZodISODateTime: () => $ZodISODateTime,
456
- $ZodISODate: () => $ZodISODate,
457
- $ZodIPv6: () => $ZodIPv6,
458
- $ZodIPv4: () => $ZodIPv4,
459
- $ZodGUID: () => $ZodGUID,
460
- $ZodFunction: () => $ZodFunction,
461
- $ZodFile: () => $ZodFile,
462
- $ZodError: () => $ZodError,
463
- $ZodEnum: () => $ZodEnum,
464
- $ZodEncodeError: () => $ZodEncodeError,
465
- $ZodEmoji: () => $ZodEmoji,
466
- $ZodEmail: () => $ZodEmail,
467
- $ZodE164: () => $ZodE164,
468
- $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion,
469
- $ZodDefault: () => $ZodDefault,
470
- $ZodDate: () => $ZodDate,
471
- $ZodCustomStringFormat: () => $ZodCustomStringFormat,
472
- $ZodCustom: () => $ZodCustom,
473
- $ZodCodec: () => $ZodCodec,
474
- $ZodCheckUpperCase: () => $ZodCheckUpperCase,
475
- $ZodCheckStringFormat: () => $ZodCheckStringFormat,
476
- $ZodCheckStartsWith: () => $ZodCheckStartsWith,
477
- $ZodCheckSizeEquals: () => $ZodCheckSizeEquals,
478
- $ZodCheckRegex: () => $ZodCheckRegex,
479
- $ZodCheckProperty: () => $ZodCheckProperty,
480
- $ZodCheckOverwrite: () => $ZodCheckOverwrite,
481
- $ZodCheckNumberFormat: () => $ZodCheckNumberFormat,
482
- $ZodCheckMultipleOf: () => $ZodCheckMultipleOf,
483
- $ZodCheckMinSize: () => $ZodCheckMinSize,
484
- $ZodCheckMinLength: () => $ZodCheckMinLength,
485
- $ZodCheckMimeType: () => $ZodCheckMimeType,
486
- $ZodCheckMaxSize: () => $ZodCheckMaxSize,
487
- $ZodCheckMaxLength: () => $ZodCheckMaxLength,
488
- $ZodCheckLowerCase: () => $ZodCheckLowerCase,
489
- $ZodCheckLessThan: () => $ZodCheckLessThan,
490
- $ZodCheckLengthEquals: () => $ZodCheckLengthEquals,
491
- $ZodCheckIncludes: () => $ZodCheckIncludes,
492
- $ZodCheckGreaterThan: () => $ZodCheckGreaterThan,
493
- $ZodCheckEndsWith: () => $ZodCheckEndsWith,
494
- $ZodCheckBigIntFormat: () => $ZodCheckBigIntFormat,
495
- $ZodCheck: () => $ZodCheck,
496
- $ZodCatch: () => $ZodCatch,
497
- $ZodCUID2: () => $ZodCUID2,
498
- $ZodCUID: () => $ZodCUID,
499
- $ZodCIDRv6: () => $ZodCIDRv6,
500
- $ZodCIDRv4: () => $ZodCIDRv4,
501
- $ZodBoolean: () => $ZodBoolean,
502
- $ZodBigIntFormat: () => $ZodBigIntFormat,
503
- $ZodBigInt: () => $ZodBigInt,
504
- $ZodBase64URL: () => $ZodBase64URL,
505
- $ZodBase64: () => $ZodBase64,
506
- $ZodAsyncError: () => $ZodAsyncError,
21
+ $input: () => $input,
22
+ $output: () => $output,
23
+ NEVER: () => NEVER,
24
+ TimePrecision: () => TimePrecision,
25
+ ZodAny: () => ZodAny,
26
+ ZodArray: () => ZodArray,
27
+ ZodBase64: () => ZodBase64,
28
+ ZodBase64URL: () => ZodBase64URL,
29
+ ZodBigInt: () => ZodBigInt,
30
+ ZodBigIntFormat: () => ZodBigIntFormat,
31
+ ZodBoolean: () => ZodBoolean,
32
+ ZodCIDRv4: () => ZodCIDRv4,
33
+ ZodCIDRv6: () => ZodCIDRv6,
34
+ ZodCUID: () => ZodCUID,
35
+ ZodCUID2: () => ZodCUID2,
36
+ ZodCatch: () => ZodCatch,
37
+ ZodCodec: () => ZodCodec,
38
+ ZodCustom: () => ZodCustom,
39
+ ZodCustomStringFormat: () => ZodCustomStringFormat,
40
+ ZodDate: () => ZodDate,
41
+ ZodDefault: () => ZodDefault,
42
+ ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
43
+ ZodE164: () => ZodE164,
44
+ ZodEmail: () => ZodEmail,
45
+ ZodEmoji: () => ZodEmoji,
46
+ ZodEnum: () => ZodEnum,
47
+ ZodError: () => ZodError,
48
+ ZodFile: () => ZodFile,
49
+ ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
50
+ ZodFunction: () => ZodFunction,
51
+ ZodGUID: () => ZodGUID,
52
+ ZodIPv4: () => ZodIPv4,
53
+ ZodIPv6: () => ZodIPv6,
54
+ ZodISODate: () => ZodISODate,
55
+ ZodISODateTime: () => ZodISODateTime,
56
+ ZodISODuration: () => ZodISODuration,
57
+ ZodISOTime: () => ZodISOTime,
58
+ ZodIntersection: () => ZodIntersection,
59
+ ZodIssueCode: () => ZodIssueCode,
60
+ ZodJWT: () => ZodJWT,
61
+ ZodKSUID: () => ZodKSUID,
62
+ ZodLazy: () => ZodLazy,
63
+ ZodLiteral: () => ZodLiteral,
64
+ ZodMap: () => ZodMap,
65
+ ZodNaN: () => ZodNaN,
66
+ ZodNanoID: () => ZodNanoID,
67
+ ZodNever: () => ZodNever,
68
+ ZodNonOptional: () => ZodNonOptional,
69
+ ZodNull: () => ZodNull,
70
+ ZodNullable: () => ZodNullable,
71
+ ZodNumber: () => ZodNumber,
72
+ ZodNumberFormat: () => ZodNumberFormat,
73
+ ZodObject: () => ZodObject,
74
+ ZodOptional: () => ZodOptional,
75
+ ZodPipe: () => ZodPipe,
76
+ ZodPrefault: () => ZodPrefault,
77
+ ZodPromise: () => ZodPromise,
78
+ ZodReadonly: () => ZodReadonly,
79
+ ZodRealError: () => ZodRealError,
80
+ ZodRecord: () => ZodRecord,
81
+ ZodSet: () => ZodSet,
82
+ ZodString: () => ZodString,
83
+ ZodStringFormat: () => ZodStringFormat,
84
+ ZodSuccess: () => ZodSuccess,
85
+ ZodSymbol: () => ZodSymbol,
86
+ ZodTemplateLiteral: () => ZodTemplateLiteral,
87
+ ZodTransform: () => ZodTransform,
88
+ ZodTuple: () => ZodTuple,
89
+ ZodType: () => ZodType,
90
+ ZodULID: () => ZodULID,
91
+ ZodURL: () => ZodURL,
92
+ ZodUUID: () => ZodUUID,
93
+ ZodUndefined: () => ZodUndefined,
94
+ ZodUnion: () => ZodUnion,
95
+ ZodUnknown: () => ZodUnknown,
96
+ ZodVoid: () => ZodVoid,
97
+ ZodXID: () => ZodXID,
98
+ _ZodString: () => _ZodString,
99
+ _default: () => _default2,
100
+ _function: () => _function,
101
+ any: () => any,
102
+ array: () => array,
103
+ base64: () => base642,
104
+ base64url: () => base64url2,
105
+ bigint: () => bigint2,
106
+ boolean: () => boolean2,
107
+ catch: () => _catch2,
108
+ check: () => check,
109
+ cidrv4: () => cidrv42,
110
+ cidrv6: () => cidrv62,
111
+ clone: () => clone,
112
+ codec: () => codec,
113
+ coerce: () => exports_coerce,
114
+ config: () => config,
115
+ core: () => exports_core2,
116
+ cuid: () => cuid3,
117
+ cuid2: () => cuid22,
118
+ custom: () => custom,
119
+ date: () => date3,
120
+ decode: () => decode2,
121
+ decodeAsync: () => decodeAsync2,
122
+ discriminatedUnion: () => discriminatedUnion,
123
+ e164: () => e1642,
124
+ email: () => email2,
125
+ emoji: () => emoji2,
126
+ encode: () => encode2,
127
+ encodeAsync: () => encodeAsync2,
128
+ endsWith: () => _endsWith,
129
+ enum: () => _enum2,
130
+ file: () => file,
131
+ flattenError: () => flattenError,
132
+ float32: () => float32,
133
+ float64: () => float64,
134
+ formatError: () => formatError,
135
+ function: () => _function,
136
+ getErrorMap: () => getErrorMap,
137
+ globalRegistry: () => globalRegistry,
138
+ gt: () => _gt,
139
+ gte: () => _gte,
140
+ guid: () => guid2,
141
+ hash: () => hash,
142
+ hex: () => hex2,
143
+ hostname: () => hostname2,
144
+ httpUrl: () => httpUrl,
145
+ includes: () => _includes,
146
+ instanceof: () => _instanceof,
147
+ int: () => int,
148
+ int32: () => int32,
149
+ int64: () => int64,
150
+ intersection: () => intersection,
151
+ ipv4: () => ipv42,
152
+ ipv6: () => ipv62,
153
+ iso: () => exports_iso,
154
+ json: () => json,
155
+ jwt: () => jwt,
156
+ keyof: () => keyof,
157
+ ksuid: () => ksuid2,
158
+ lazy: () => lazy,
159
+ length: () => _length,
160
+ literal: () => literal,
161
+ locales: () => exports_locales,
162
+ looseObject: () => looseObject,
163
+ lowercase: () => _lowercase,
164
+ lt: () => _lt,
165
+ lte: () => _lte,
166
+ map: () => map,
167
+ maxLength: () => _maxLength,
168
+ maxSize: () => _maxSize,
169
+ mime: () => _mime,
170
+ minLength: () => _minLength,
171
+ minSize: () => _minSize,
172
+ multipleOf: () => _multipleOf,
173
+ nan: () => nan,
174
+ nanoid: () => nanoid2,
175
+ nativeEnum: () => nativeEnum,
176
+ negative: () => _negative,
177
+ never: () => never,
178
+ nonnegative: () => _nonnegative,
179
+ nonoptional: () => nonoptional,
180
+ nonpositive: () => _nonpositive,
181
+ normalize: () => _normalize,
182
+ null: () => _null3,
183
+ nullable: () => nullable,
184
+ nullish: () => nullish2,
185
+ number: () => number2,
186
+ object: () => object,
187
+ optional: () => optional,
188
+ overwrite: () => _overwrite,
189
+ parse: () => parse3,
190
+ parseAsync: () => parseAsync2,
191
+ partialRecord: () => partialRecord,
192
+ pipe: () => pipe,
193
+ positive: () => _positive,
194
+ prefault: () => prefault,
195
+ preprocess: () => preprocess,
196
+ prettifyError: () => prettifyError,
197
+ promise: () => promise,
198
+ property: () => _property,
199
+ readonly: () => readonly,
200
+ record: () => record,
201
+ refine: () => refine,
202
+ regex: () => _regex,
203
+ regexes: () => exports_regexes,
204
+ registry: () => registry,
205
+ safeDecode: () => safeDecode2,
206
+ safeDecodeAsync: () => safeDecodeAsync2,
207
+ safeEncode: () => safeEncode2,
208
+ safeEncodeAsync: () => safeEncodeAsync2,
209
+ safeParse: () => safeParse2,
210
+ safeParseAsync: () => safeParseAsync2,
211
+ set: () => set,
212
+ setErrorMap: () => setErrorMap,
213
+ size: () => _size,
214
+ startsWith: () => _startsWith,
215
+ strictObject: () => strictObject,
216
+ string: () => string2,
217
+ stringFormat: () => stringFormat,
218
+ stringbool: () => stringbool,
219
+ success: () => success,
220
+ superRefine: () => superRefine,
221
+ symbol: () => symbol,
222
+ templateLiteral: () => templateLiteral,
223
+ toJSONSchema: () => toJSONSchema,
224
+ toLowerCase: () => _toLowerCase,
225
+ toUpperCase: () => _toUpperCase,
226
+ transform: () => transform,
227
+ treeifyError: () => treeifyError,
228
+ trim: () => _trim,
229
+ tuple: () => tuple,
230
+ uint32: () => uint32,
231
+ uint64: () => uint64,
232
+ ulid: () => ulid2,
233
+ undefined: () => _undefined3,
234
+ union: () => union,
235
+ unknown: () => unknown,
236
+ uppercase: () => _uppercase,
237
+ url: () => url,
238
+ util: () => exports_util,
239
+ uuid: () => uuid2,
240
+ uuidv4: () => uuidv4,
241
+ uuidv6: () => uuidv6,
242
+ uuidv7: () => uuidv7,
243
+ void: () => _void2,
244
+ xid: () => xid2
245
+ });
246
+
247
+ // node_modules/zod/v4/core/index.js
248
+ var exports_core2 = {};
249
+ __export(exports_core2, {
250
+ $ZodAny: () => $ZodAny,
507
251
  $ZodArray: () => $ZodArray,
508
- $ZodAny: () => $ZodAny
252
+ $ZodAsyncError: () => $ZodAsyncError,
253
+ $ZodBase64: () => $ZodBase64,
254
+ $ZodBase64URL: () => $ZodBase64URL,
255
+ $ZodBigInt: () => $ZodBigInt,
256
+ $ZodBigIntFormat: () => $ZodBigIntFormat,
257
+ $ZodBoolean: () => $ZodBoolean,
258
+ $ZodCIDRv4: () => $ZodCIDRv4,
259
+ $ZodCIDRv6: () => $ZodCIDRv6,
260
+ $ZodCUID: () => $ZodCUID,
261
+ $ZodCUID2: () => $ZodCUID2,
262
+ $ZodCatch: () => $ZodCatch,
263
+ $ZodCheck: () => $ZodCheck,
264
+ $ZodCheckBigIntFormat: () => $ZodCheckBigIntFormat,
265
+ $ZodCheckEndsWith: () => $ZodCheckEndsWith,
266
+ $ZodCheckGreaterThan: () => $ZodCheckGreaterThan,
267
+ $ZodCheckIncludes: () => $ZodCheckIncludes,
268
+ $ZodCheckLengthEquals: () => $ZodCheckLengthEquals,
269
+ $ZodCheckLessThan: () => $ZodCheckLessThan,
270
+ $ZodCheckLowerCase: () => $ZodCheckLowerCase,
271
+ $ZodCheckMaxLength: () => $ZodCheckMaxLength,
272
+ $ZodCheckMaxSize: () => $ZodCheckMaxSize,
273
+ $ZodCheckMimeType: () => $ZodCheckMimeType,
274
+ $ZodCheckMinLength: () => $ZodCheckMinLength,
275
+ $ZodCheckMinSize: () => $ZodCheckMinSize,
276
+ $ZodCheckMultipleOf: () => $ZodCheckMultipleOf,
277
+ $ZodCheckNumberFormat: () => $ZodCheckNumberFormat,
278
+ $ZodCheckOverwrite: () => $ZodCheckOverwrite,
279
+ $ZodCheckProperty: () => $ZodCheckProperty,
280
+ $ZodCheckRegex: () => $ZodCheckRegex,
281
+ $ZodCheckSizeEquals: () => $ZodCheckSizeEquals,
282
+ $ZodCheckStartsWith: () => $ZodCheckStartsWith,
283
+ $ZodCheckStringFormat: () => $ZodCheckStringFormat,
284
+ $ZodCheckUpperCase: () => $ZodCheckUpperCase,
285
+ $ZodCodec: () => $ZodCodec,
286
+ $ZodCustom: () => $ZodCustom,
287
+ $ZodCustomStringFormat: () => $ZodCustomStringFormat,
288
+ $ZodDate: () => $ZodDate,
289
+ $ZodDefault: () => $ZodDefault,
290
+ $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion,
291
+ $ZodE164: () => $ZodE164,
292
+ $ZodEmail: () => $ZodEmail,
293
+ $ZodEmoji: () => $ZodEmoji,
294
+ $ZodEncodeError: () => $ZodEncodeError,
295
+ $ZodEnum: () => $ZodEnum,
296
+ $ZodError: () => $ZodError,
297
+ $ZodFile: () => $ZodFile,
298
+ $ZodFunction: () => $ZodFunction,
299
+ $ZodGUID: () => $ZodGUID,
300
+ $ZodIPv4: () => $ZodIPv4,
301
+ $ZodIPv6: () => $ZodIPv6,
302
+ $ZodISODate: () => $ZodISODate,
303
+ $ZodISODateTime: () => $ZodISODateTime,
304
+ $ZodISODuration: () => $ZodISODuration,
305
+ $ZodISOTime: () => $ZodISOTime,
306
+ $ZodIntersection: () => $ZodIntersection,
307
+ $ZodJWT: () => $ZodJWT,
308
+ $ZodKSUID: () => $ZodKSUID,
309
+ $ZodLazy: () => $ZodLazy,
310
+ $ZodLiteral: () => $ZodLiteral,
311
+ $ZodMap: () => $ZodMap,
312
+ $ZodNaN: () => $ZodNaN,
313
+ $ZodNanoID: () => $ZodNanoID,
314
+ $ZodNever: () => $ZodNever,
315
+ $ZodNonOptional: () => $ZodNonOptional,
316
+ $ZodNull: () => $ZodNull,
317
+ $ZodNullable: () => $ZodNullable,
318
+ $ZodNumber: () => $ZodNumber,
319
+ $ZodNumberFormat: () => $ZodNumberFormat,
320
+ $ZodObject: () => $ZodObject,
321
+ $ZodObjectJIT: () => $ZodObjectJIT,
322
+ $ZodOptional: () => $ZodOptional,
323
+ $ZodPipe: () => $ZodPipe,
324
+ $ZodPrefault: () => $ZodPrefault,
325
+ $ZodPromise: () => $ZodPromise,
326
+ $ZodReadonly: () => $ZodReadonly,
327
+ $ZodRealError: () => $ZodRealError,
328
+ $ZodRecord: () => $ZodRecord,
329
+ $ZodRegistry: () => $ZodRegistry,
330
+ $ZodSet: () => $ZodSet,
331
+ $ZodString: () => $ZodString,
332
+ $ZodStringFormat: () => $ZodStringFormat,
333
+ $ZodSuccess: () => $ZodSuccess,
334
+ $ZodSymbol: () => $ZodSymbol,
335
+ $ZodTemplateLiteral: () => $ZodTemplateLiteral,
336
+ $ZodTransform: () => $ZodTransform,
337
+ $ZodTuple: () => $ZodTuple,
338
+ $ZodType: () => $ZodType,
339
+ $ZodULID: () => $ZodULID,
340
+ $ZodURL: () => $ZodURL,
341
+ $ZodUUID: () => $ZodUUID,
342
+ $ZodUndefined: () => $ZodUndefined,
343
+ $ZodUnion: () => $ZodUnion,
344
+ $ZodUnknown: () => $ZodUnknown,
345
+ $ZodVoid: () => $ZodVoid,
346
+ $ZodXID: () => $ZodXID,
347
+ $brand: () => $brand,
348
+ $constructor: () => $constructor,
349
+ $input: () => $input,
350
+ $output: () => $output,
351
+ Doc: () => Doc,
352
+ JSONSchema: () => exports_json_schema,
353
+ JSONSchemaGenerator: () => JSONSchemaGenerator,
354
+ NEVER: () => NEVER,
355
+ TimePrecision: () => TimePrecision,
356
+ _any: () => _any,
357
+ _array: () => _array,
358
+ _base64: () => _base64,
359
+ _base64url: () => _base64url,
360
+ _bigint: () => _bigint,
361
+ _boolean: () => _boolean,
362
+ _catch: () => _catch,
363
+ _check: () => _check,
364
+ _cidrv4: () => _cidrv4,
365
+ _cidrv6: () => _cidrv6,
366
+ _coercedBigint: () => _coercedBigint,
367
+ _coercedBoolean: () => _coercedBoolean,
368
+ _coercedDate: () => _coercedDate,
369
+ _coercedNumber: () => _coercedNumber,
370
+ _coercedString: () => _coercedString,
371
+ _cuid: () => _cuid,
372
+ _cuid2: () => _cuid2,
373
+ _custom: () => _custom,
374
+ _date: () => _date,
375
+ _decode: () => _decode,
376
+ _decodeAsync: () => _decodeAsync,
377
+ _default: () => _default,
378
+ _discriminatedUnion: () => _discriminatedUnion,
379
+ _e164: () => _e164,
380
+ _email: () => _email,
381
+ _emoji: () => _emoji2,
382
+ _encode: () => _encode,
383
+ _encodeAsync: () => _encodeAsync,
384
+ _endsWith: () => _endsWith,
385
+ _enum: () => _enum,
386
+ _file: () => _file,
387
+ _float32: () => _float32,
388
+ _float64: () => _float64,
389
+ _gt: () => _gt,
390
+ _gte: () => _gte,
391
+ _guid: () => _guid,
392
+ _includes: () => _includes,
393
+ _int: () => _int,
394
+ _int32: () => _int32,
395
+ _int64: () => _int64,
396
+ _intersection: () => _intersection,
397
+ _ipv4: () => _ipv4,
398
+ _ipv6: () => _ipv6,
399
+ _isoDate: () => _isoDate,
400
+ _isoDateTime: () => _isoDateTime,
401
+ _isoDuration: () => _isoDuration,
402
+ _isoTime: () => _isoTime,
403
+ _jwt: () => _jwt,
404
+ _ksuid: () => _ksuid,
405
+ _lazy: () => _lazy,
406
+ _length: () => _length,
407
+ _literal: () => _literal,
408
+ _lowercase: () => _lowercase,
409
+ _lt: () => _lt,
410
+ _lte: () => _lte,
411
+ _map: () => _map,
412
+ _max: () => _lte,
413
+ _maxLength: () => _maxLength,
414
+ _maxSize: () => _maxSize,
415
+ _mime: () => _mime,
416
+ _min: () => _gte,
417
+ _minLength: () => _minLength,
418
+ _minSize: () => _minSize,
419
+ _multipleOf: () => _multipleOf,
420
+ _nan: () => _nan,
421
+ _nanoid: () => _nanoid,
422
+ _nativeEnum: () => _nativeEnum,
423
+ _negative: () => _negative,
424
+ _never: () => _never,
425
+ _nonnegative: () => _nonnegative,
426
+ _nonoptional: () => _nonoptional,
427
+ _nonpositive: () => _nonpositive,
428
+ _normalize: () => _normalize,
429
+ _null: () => _null2,
430
+ _nullable: () => _nullable,
431
+ _number: () => _number,
432
+ _optional: () => _optional,
433
+ _overwrite: () => _overwrite,
434
+ _parse: () => _parse,
435
+ _parseAsync: () => _parseAsync,
436
+ _pipe: () => _pipe,
437
+ _positive: () => _positive,
438
+ _promise: () => _promise,
439
+ _property: () => _property,
440
+ _readonly: () => _readonly,
441
+ _record: () => _record,
442
+ _refine: () => _refine,
443
+ _regex: () => _regex,
444
+ _safeDecode: () => _safeDecode,
445
+ _safeDecodeAsync: () => _safeDecodeAsync,
446
+ _safeEncode: () => _safeEncode,
447
+ _safeEncodeAsync: () => _safeEncodeAsync,
448
+ _safeParse: () => _safeParse,
449
+ _safeParseAsync: () => _safeParseAsync,
450
+ _set: () => _set,
451
+ _size: () => _size,
452
+ _startsWith: () => _startsWith,
453
+ _string: () => _string,
454
+ _stringFormat: () => _stringFormat,
455
+ _stringbool: () => _stringbool,
456
+ _success: () => _success,
457
+ _superRefine: () => _superRefine,
458
+ _symbol: () => _symbol,
459
+ _templateLiteral: () => _templateLiteral,
460
+ _toLowerCase: () => _toLowerCase,
461
+ _toUpperCase: () => _toUpperCase,
462
+ _transform: () => _transform,
463
+ _trim: () => _trim,
464
+ _tuple: () => _tuple,
465
+ _uint32: () => _uint32,
466
+ _uint64: () => _uint64,
467
+ _ulid: () => _ulid,
468
+ _undefined: () => _undefined2,
469
+ _union: () => _union,
470
+ _unknown: () => _unknown,
471
+ _uppercase: () => _uppercase,
472
+ _url: () => _url,
473
+ _uuid: () => _uuid,
474
+ _uuidv4: () => _uuidv4,
475
+ _uuidv6: () => _uuidv6,
476
+ _uuidv7: () => _uuidv7,
477
+ _void: () => _void,
478
+ _xid: () => _xid,
479
+ clone: () => clone,
480
+ config: () => config,
481
+ decode: () => decode,
482
+ decodeAsync: () => decodeAsync,
483
+ encode: () => encode,
484
+ encodeAsync: () => encodeAsync,
485
+ flattenError: () => flattenError,
486
+ formatError: () => formatError,
487
+ globalConfig: () => globalConfig,
488
+ globalRegistry: () => globalRegistry,
489
+ isValidBase64: () => isValidBase64,
490
+ isValidBase64URL: () => isValidBase64URL,
491
+ isValidJWT: () => isValidJWT,
492
+ locales: () => exports_locales,
493
+ parse: () => parse,
494
+ parseAsync: () => parseAsync,
495
+ prettifyError: () => prettifyError,
496
+ regexes: () => exports_regexes,
497
+ registry: () => registry,
498
+ safeDecode: () => safeDecode,
499
+ safeDecodeAsync: () => safeDecodeAsync,
500
+ safeEncode: () => safeEncode,
501
+ safeEncodeAsync: () => safeEncodeAsync,
502
+ safeParse: () => safeParse,
503
+ safeParseAsync: () => safeParseAsync,
504
+ toDotPath: () => toDotPath,
505
+ toJSONSchema: () => toJSONSchema,
506
+ treeifyError: () => treeifyError,
507
+ util: () => exports_util,
508
+ version: () => version
509
509
  });
510
510
 
511
511
  // node_modules/zod/v4/core/core.js
@@ -578,66 +578,66 @@ function config(newConfig) {
578
578
  // node_modules/zod/v4/core/util.js
579
579
  var exports_util = {};
580
580
  __export(exports_util, {
581
- unwrapMessage: () => unwrapMessage,
582
- uint8ArrayToHex: () => uint8ArrayToHex,
583
- uint8ArrayToBase64url: () => uint8ArrayToBase64url,
584
- uint8ArrayToBase64: () => uint8ArrayToBase64,
585
- stringifyPrimitive: () => stringifyPrimitive,
586
- shallowClone: () => shallowClone,
587
- safeExtend: () => safeExtend,
588
- required: () => required,
589
- randomString: () => randomString,
590
- propertyKeyTypes: () => propertyKeyTypes,
591
- promiseAllObject: () => promiseAllObject,
592
- primitiveTypes: () => primitiveTypes,
593
- prefixIssues: () => prefixIssues,
594
- pick: () => pick,
595
- partial: () => partial,
596
- optionalKeys: () => optionalKeys,
597
- omit: () => omit,
598
- objectClone: () => objectClone,
599
- numKeys: () => numKeys,
600
- nullish: () => nullish,
601
- normalizeParams: () => normalizeParams,
602
- mergeDefs: () => mergeDefs,
603
- merge: () => merge,
604
- jsonStringifyReplacer: () => jsonStringifyReplacer,
605
- joinValues: () => joinValues,
606
- issue: () => issue,
607
- isPlainObject: () => isPlainObject,
608
- isObject: () => isObject,
609
- hexToUint8Array: () => hexToUint8Array,
610
- getSizableOrigin: () => getSizableOrigin,
611
- getParsedType: () => getParsedType,
612
- getLengthableOrigin: () => getLengthableOrigin,
613
- getEnumValues: () => getEnumValues,
614
- getElementAtPath: () => getElementAtPath,
615
- floatSafeRemainder: () => floatSafeRemainder,
616
- finalizeIssue: () => finalizeIssue,
617
- extend: () => extend,
618
- escapeRegex: () => escapeRegex,
619
- esc: () => esc,
620
- defineLazy: () => defineLazy,
621
- createTransparentProxy: () => createTransparentProxy,
622
- cloneDef: () => cloneDef,
623
- clone: () => clone,
624
- cleanRegex: () => cleanRegex,
625
- cleanEnum: () => cleanEnum,
626
- captureStackTrace: () => captureStackTrace,
627
- cached: () => cached,
628
- base64urlToUint8Array: () => base64urlToUint8Array,
629
- base64ToUint8Array: () => base64ToUint8Array,
630
- assignProp: () => assignProp,
631
- assertNotEqual: () => assertNotEqual,
632
- assertNever: () => assertNever,
633
- assertIs: () => assertIs,
634
- assertEqual: () => assertEqual,
635
- assert: () => assert,
636
- allowsEval: () => allowsEval,
637
- aborted: () => aborted,
638
- NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES,
581
+ BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
639
582
  Class: () => Class,
640
- BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES
583
+ NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES,
584
+ aborted: () => aborted,
585
+ allowsEval: () => allowsEval,
586
+ assert: () => assert,
587
+ assertEqual: () => assertEqual,
588
+ assertIs: () => assertIs,
589
+ assertNever: () => assertNever,
590
+ assertNotEqual: () => assertNotEqual,
591
+ assignProp: () => assignProp,
592
+ base64ToUint8Array: () => base64ToUint8Array,
593
+ base64urlToUint8Array: () => base64urlToUint8Array,
594
+ cached: () => cached,
595
+ captureStackTrace: () => captureStackTrace,
596
+ cleanEnum: () => cleanEnum,
597
+ cleanRegex: () => cleanRegex,
598
+ clone: () => clone,
599
+ cloneDef: () => cloneDef,
600
+ createTransparentProxy: () => createTransparentProxy,
601
+ defineLazy: () => defineLazy,
602
+ esc: () => esc,
603
+ escapeRegex: () => escapeRegex,
604
+ extend: () => extend,
605
+ finalizeIssue: () => finalizeIssue,
606
+ floatSafeRemainder: () => floatSafeRemainder,
607
+ getElementAtPath: () => getElementAtPath,
608
+ getEnumValues: () => getEnumValues,
609
+ getLengthableOrigin: () => getLengthableOrigin,
610
+ getParsedType: () => getParsedType,
611
+ getSizableOrigin: () => getSizableOrigin,
612
+ hexToUint8Array: () => hexToUint8Array,
613
+ isObject: () => isObject,
614
+ isPlainObject: () => isPlainObject,
615
+ issue: () => issue,
616
+ joinValues: () => joinValues,
617
+ jsonStringifyReplacer: () => jsonStringifyReplacer,
618
+ merge: () => merge,
619
+ mergeDefs: () => mergeDefs,
620
+ normalizeParams: () => normalizeParams,
621
+ nullish: () => nullish,
622
+ numKeys: () => numKeys,
623
+ objectClone: () => objectClone,
624
+ omit: () => omit,
625
+ optionalKeys: () => optionalKeys,
626
+ partial: () => partial,
627
+ pick: () => pick,
628
+ prefixIssues: () => prefixIssues,
629
+ primitiveTypes: () => primitiveTypes,
630
+ promiseAllObject: () => promiseAllObject,
631
+ propertyKeyTypes: () => propertyKeyTypes,
632
+ randomString: () => randomString,
633
+ required: () => required,
634
+ safeExtend: () => safeExtend,
635
+ shallowClone: () => shallowClone,
636
+ stringifyPrimitive: () => stringifyPrimitive,
637
+ uint8ArrayToBase64: () => uint8ArrayToBase64,
638
+ uint8ArrayToBase64url: () => uint8ArrayToBase64url,
639
+ uint8ArrayToHex: () => uint8ArrayToHex,
640
+ unwrapMessage: () => unwrapMessage
641
641
  });
642
642
  function assertEqual(val) {
643
643
  return val;
@@ -1437,63 +1437,63 @@ var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
1437
1437
  // node_modules/zod/v4/core/regexes.js
1438
1438
  var exports_regexes = {};
1439
1439
  __export(exports_regexes, {
1440
- xid: () => xid,
1441
- uuid7: () => uuid7,
1442
- uuid6: () => uuid6,
1443
- uuid4: () => uuid4,
1444
- uuid: () => uuid,
1445
- uppercase: () => uppercase,
1446
- unicodeEmail: () => unicodeEmail,
1447
- undefined: () => _undefined,
1448
- ulid: () => ulid,
1449
- time: () => time,
1450
- string: () => string,
1451
- sha512_hex: () => sha512_hex,
1452
- sha512_base64url: () => sha512_base64url,
1453
- sha512_base64: () => sha512_base64,
1454
- sha384_hex: () => sha384_hex,
1455
- sha384_base64url: () => sha384_base64url,
1456
- sha384_base64: () => sha384_base64,
1457
- sha256_hex: () => sha256_hex,
1458
- sha256_base64url: () => sha256_base64url,
1459
- sha256_base64: () => sha256_base64,
1460
- sha1_hex: () => sha1_hex,
1461
- sha1_base64url: () => sha1_base64url,
1462
- sha1_base64: () => sha1_base64,
1463
- rfc5322Email: () => rfc5322Email,
1464
- number: () => number,
1465
- null: () => _null,
1466
- nanoid: () => nanoid,
1467
- md5_hex: () => md5_hex,
1468
- md5_base64url: () => md5_base64url,
1469
- md5_base64: () => md5_base64,
1470
- lowercase: () => lowercase,
1471
- ksuid: () => ksuid,
1472
- ipv6: () => ipv6,
1473
- ipv4: () => ipv4,
1474
- integer: () => integer,
1475
- idnEmail: () => idnEmail,
1476
- html5Email: () => html5Email,
1477
- hostname: () => hostname,
1478
- hex: () => hex,
1479
- guid: () => guid,
1480
- extendedDuration: () => extendedDuration,
1481
- emoji: () => emoji,
1482
- email: () => email,
1483
- e164: () => e164,
1484
- duration: () => duration,
1485
- domain: () => domain,
1486
- datetime: () => datetime,
1487
- date: () => date,
1488
- cuid2: () => cuid2,
1489
- cuid: () => cuid,
1490
- cidrv6: () => cidrv6,
1491
- cidrv4: () => cidrv4,
1492
- browserEmail: () => browserEmail,
1493
- boolean: () => boolean,
1494
- bigint: () => bigint,
1440
+ base64: () => base64,
1495
1441
  base64url: () => base64url,
1496
- base64: () => base64
1442
+ bigint: () => bigint,
1443
+ boolean: () => boolean,
1444
+ browserEmail: () => browserEmail,
1445
+ cidrv4: () => cidrv4,
1446
+ cidrv6: () => cidrv6,
1447
+ cuid: () => cuid,
1448
+ cuid2: () => cuid2,
1449
+ date: () => date,
1450
+ datetime: () => datetime,
1451
+ domain: () => domain,
1452
+ duration: () => duration,
1453
+ e164: () => e164,
1454
+ email: () => email,
1455
+ emoji: () => emoji,
1456
+ extendedDuration: () => extendedDuration,
1457
+ guid: () => guid,
1458
+ hex: () => hex,
1459
+ hostname: () => hostname,
1460
+ html5Email: () => html5Email,
1461
+ idnEmail: () => idnEmail,
1462
+ integer: () => integer,
1463
+ ipv4: () => ipv4,
1464
+ ipv6: () => ipv6,
1465
+ ksuid: () => ksuid,
1466
+ lowercase: () => lowercase,
1467
+ md5_base64: () => md5_base64,
1468
+ md5_base64url: () => md5_base64url,
1469
+ md5_hex: () => md5_hex,
1470
+ nanoid: () => nanoid,
1471
+ null: () => _null,
1472
+ number: () => number,
1473
+ rfc5322Email: () => rfc5322Email,
1474
+ sha1_base64: () => sha1_base64,
1475
+ sha1_base64url: () => sha1_base64url,
1476
+ sha1_hex: () => sha1_hex,
1477
+ sha256_base64: () => sha256_base64,
1478
+ sha256_base64url: () => sha256_base64url,
1479
+ sha256_hex: () => sha256_hex,
1480
+ sha384_base64: () => sha384_base64,
1481
+ sha384_base64url: () => sha384_base64url,
1482
+ sha384_hex: () => sha384_hex,
1483
+ sha512_base64: () => sha512_base64,
1484
+ sha512_base64url: () => sha512_base64url,
1485
+ sha512_hex: () => sha512_hex,
1486
+ string: () => string,
1487
+ time: () => time,
1488
+ ulid: () => ulid,
1489
+ undefined: () => _undefined,
1490
+ unicodeEmail: () => unicodeEmail,
1491
+ uppercase: () => uppercase,
1492
+ uuid: () => uuid,
1493
+ uuid4: () => uuid4,
1494
+ uuid6: () => uuid6,
1495
+ uuid7: () => uuid7,
1496
+ xid: () => xid
1497
1497
  });
1498
1498
  var cuid = /^[cC][^\s-]{8,}$/;
1499
1499
  var cuid2 = /^[0-9a-z]+$/;
@@ -3998,52 +3998,52 @@ function handleRefineResult(result, payload, input, inst) {
3998
3998
  // node_modules/zod/v4/locales/index.js
3999
3999
  var exports_locales = {};
4000
4000
  __export(exports_locales, {
4001
- zhTW: () => zh_TW_default,
4002
- zhCN: () => zh_CN_default,
4003
- yo: () => yo_default,
4004
- vi: () => vi_default,
4005
- ur: () => ur_default,
4006
- uk: () => uk_default,
4007
- ua: () => ua_default,
4008
- tr: () => tr_default,
4009
- th: () => th_default,
4010
- ta: () => ta_default,
4011
- sv: () => sv_default,
4012
- sl: () => sl_default,
4013
- ru: () => ru_default,
4014
- pt: () => pt_default,
4015
- ps: () => ps_default,
4016
- pl: () => pl_default,
4017
- ota: () => ota_default,
4018
- no: () => no_default,
4019
- nl: () => nl_default,
4020
- ms: () => ms_default,
4021
- mk: () => mk_default,
4022
- lt: () => lt_default,
4023
- ko: () => ko_default,
4024
- km: () => km_default,
4025
- kh: () => kh_default,
4026
- ka: () => ka_default,
4027
- ja: () => ja_default,
4028
- it: () => it_default,
4029
- is: () => is_default,
4030
- id: () => id_default,
4031
- hu: () => hu_default,
4032
- he: () => he_default,
4033
- frCA: () => fr_CA_default,
4034
- fr: () => fr_default,
4035
- fi: () => fi_default,
4036
- fa: () => fa_default,
4037
- es: () => es_default,
4038
- eo: () => eo_default,
4039
- en: () => en_default,
4040
- de: () => de_default,
4041
- da: () => da_default,
4042
- cs: () => cs_default,
4043
- ca: () => ca_default,
4044
- be: () => be_default,
4001
+ ar: () => ar_default,
4045
4002
  az: () => az_default,
4046
- ar: () => ar_default
4003
+ be: () => be_default,
4004
+ ca: () => ca_default,
4005
+ cs: () => cs_default,
4006
+ da: () => da_default,
4007
+ de: () => de_default,
4008
+ en: () => en_default,
4009
+ eo: () => eo_default,
4010
+ es: () => es_default,
4011
+ fa: () => fa_default,
4012
+ fi: () => fi_default,
4013
+ fr: () => fr_default,
4014
+ frCA: () => fr_CA_default,
4015
+ he: () => he_default,
4016
+ hu: () => hu_default,
4017
+ id: () => id_default,
4018
+ is: () => is_default,
4019
+ it: () => it_default,
4020
+ ja: () => ja_default,
4021
+ ka: () => ka_default,
4022
+ kh: () => kh_default,
4023
+ km: () => km_default,
4024
+ ko: () => ko_default,
4025
+ lt: () => lt_default,
4026
+ mk: () => mk_default,
4027
+ ms: () => ms_default,
4028
+ nl: () => nl_default,
4029
+ no: () => no_default,
4030
+ ota: () => ota_default,
4031
+ pl: () => pl_default,
4032
+ ps: () => ps_default,
4033
+ pt: () => pt_default,
4034
+ ru: () => ru_default,
4035
+ sl: () => sl_default,
4036
+ sv: () => sv_default,
4037
+ ta: () => ta_default,
4038
+ th: () => th_default,
4039
+ tr: () => tr_default,
4040
+ ua: () => ua_default,
4041
+ uk: () => uk_default,
4042
+ ur: () => ur_default,
4043
+ vi: () => vi_default,
4044
+ yo: () => yo_default,
4045
+ zhCN: () => zh_CN_default,
4046
+ zhTW: () => zh_TW_default
4047
4047
  });
4048
4048
 
4049
4049
  // node_modules/zod/v4/locales/ar.js
@@ -11216,14 +11216,14 @@ var exports_json_schema = {};
11216
11216
  // node_modules/zod/v4/classic/iso.js
11217
11217
  var exports_iso = {};
11218
11218
  __export(exports_iso, {
11219
- time: () => time2,
11220
- duration: () => duration2,
11221
- datetime: () => datetime2,
11222
- date: () => date2,
11223
- ZodISOTime: () => ZodISOTime,
11224
- ZodISODuration: () => ZodISODuration,
11219
+ ZodISODate: () => ZodISODate,
11225
11220
  ZodISODateTime: () => ZodISODateTime,
11226
- ZodISODate: () => ZodISODate
11221
+ ZodISODuration: () => ZodISODuration,
11222
+ ZodISOTime: () => ZodISOTime,
11223
+ date: () => date2,
11224
+ datetime: () => datetime2,
11225
+ duration: () => duration2,
11226
+ time: () => time2
11227
11227
  });
11228
11228
  var ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => {
11229
11229
  $ZodISODateTime.init(inst, def);
@@ -12305,11 +12305,11 @@ var ZodFirstPartyTypeKind;
12305
12305
  // node_modules/zod/v4/classic/coerce.js
12306
12306
  var exports_coerce = {};
12307
12307
  __export(exports_coerce, {
12308
- string: () => string3,
12309
- number: () => number3,
12310
- date: () => date4,
12308
+ bigint: () => bigint3,
12311
12309
  boolean: () => boolean3,
12312
- bigint: () => bigint3
12310
+ date: () => date4,
12311
+ number: () => number3,
12312
+ string: () => string3
12313
12313
  });
12314
12314
  function string3(params) {
12315
12315
  return _coercedString(ZodString, params);
@@ -12349,6 +12349,7 @@ var DEFAULT_TOOL_TEXT_CHECK_DELAY_MS = 3000;
12349
12349
  var DEFAULT_MAX_RECOVERY_RETRIES = 2;
12350
12350
  var DEFAULT_MIN_ACTIVITY_GAP_MS = 1000;
12351
12351
  var DEFAULT_WARMUP_MS = 15000;
12352
+ var DEFAULT_SILENT_DEAD_STREAM_MIN_TOKENS = 200;
12352
12353
  var DEFAULT_DEBUG = false;
12353
12354
  var DEFAULT_STREAMING_FAILURE_ERROR_NAMES = [
12354
12355
  "ProviderError",
@@ -12439,13 +12440,18 @@ var DONE_CLAIM_PATTERNS = [
12439
12440
  /^task\s+completed[.!]*$/im,
12440
12441
  /^all\s+tasks?\s+complete[.!]*$/im,
12441
12442
  /^all\s+tasks?\s+completed[.!]*$/im,
12442
- /^(?:i['']?m\s+)?done\s+with\s+task/im
12443
+ /^(?:i['']?m\s+)?done\s+with\s+task/im,
12444
+ /\bdone\s+with\s+(?:the\s+)?(?:task|work|implementation)/im,
12445
+ /\bfinished\s+(?:the\s+)?(?:task|work|implementation)/im,
12446
+ /\b(?:all|everything)\s+(?:is\s+)?(?:complete|done|finished)/im,
12447
+ /\bnothing\s+(?:else\s+)?(?:left|remaining|to do)/im
12443
12448
  ];
12444
12449
  var DONE_WITHOUT_WORK_PROMPT = "I need you to verify more carefully that you have actually completed all the required tasks. " + "Your response indicated you're done, but no work was detected. Please check your todo list " + "and complete any remaining work.";
12450
+ var DONE_WITHOUT_DETAILS_PROMPT = "Your last response claimed the task is complete but contained no work description. This is not acceptable. " + "You MUST respond now with a full, detailed report of everything you did: " + "for each file you modified, state the full path and the exact changes; " + "list every command you ran to verify and its result; state the final outcome. " + "Do NOT reply with 'done', 'task completed', or any short acknowledgment \u2014 " + "your ONLY acceptable response right now is this detailed report. Write it now.";
12445
12451
  function containsDoneClaimPattern(text) {
12446
12452
  const lines = text.split(`
12447
12453
  `);
12448
- const lastLines = lines.slice(-3).join(`
12454
+ const lastLines = lines.slice(-5).join(`
12449
12455
  `);
12450
12456
  return DONE_CLAIM_PATTERNS.some((pat) => pat.test(lastLines));
12451
12457
  }
@@ -12501,6 +12507,30 @@ function getLastAssistantError(messages) {
12501
12507
  }
12502
12508
  return null;
12503
12509
  }
12510
+ function getLastSilentDeadStream(messages) {
12511
+ for (let i = messages.length - 1;i >= 0; i--) {
12512
+ const msg = messages[i];
12513
+ const role = msg.role ?? msg.info?.role;
12514
+ if (role !== "assistant")
12515
+ continue;
12516
+ const info = msg.info;
12517
+ const finish = msg.finish ?? info?.finish ?? info?.finishReason;
12518
+ if (!finish)
12519
+ continue;
12520
+ const parts = msg.parts ?? [];
12521
+ const hasText = parts.some((p) => {
12522
+ const t = p;
12523
+ return t.type === "text" && typeof t.text === "string" && t.text.length > 0;
12524
+ });
12525
+ if (hasText)
12526
+ continue;
12527
+ const tokens = msg.tokens;
12528
+ const tInfo = info?.tokens;
12529
+ const output = (tokens?.output ?? 0) + (tInfo?.output ?? 0);
12530
+ return { finish, outputTokens: output };
12531
+ }
12532
+ return null;
12533
+ }
12504
12534
  function backoffMs(attempt, baseBackoffMs = DEFAULT_BASE_BACKOFF_MS, maxBackoffMs = DEFAULT_MAX_BACKOFF_MS) {
12505
12535
  return Math.min(baseBackoffMs * Math.pow(2, attempt - 1), maxBackoffMs);
12506
12536
  }
@@ -12566,6 +12596,8 @@ var AutoResumePlugin = async (ctx, options) => {
12566
12596
  const toolTextRecoveryPrompt = options?.toolTextRecoveryPrompt ?? TOOL_TEXT_RECOVERY_PROMPT;
12567
12597
  const thinkingToolRecoveryPrompt = options?.thinkingToolRecoveryPrompt ?? THINKING_TOOL_RECOVERY_PROMPT;
12568
12598
  const doneWithoutWorkPrompt = options?.doneWithoutWorkPrompt ?? DONE_WITHOUT_WORK_PROMPT;
12599
+ const doneWithoutDetailsPrompt = options?.doneWithoutDetailsPrompt ?? DONE_WITHOUT_DETAILS_PROMPT;
12600
+ const silentDeadStreamMinTokens = options?.silentDeadStreamMinTokens ?? DEFAULT_SILENT_DEAD_STREAM_MIN_TOKENS;
12569
12601
  const dbg = (...args) => {
12570
12602
  if (debug)
12571
12603
  console.log("[debug]", ...args);
@@ -12592,7 +12624,22 @@ var AutoResumePlugin = async (ctx, options) => {
12592
12624
  recordContinue(sid);
12593
12625
  return w.continueTimestamps.length >= loopMaxContinues;
12594
12626
  }
12627
+ const recentLogMsgs = new Map;
12628
+ const LOG_DEDUP_WINDOW_MS = 5000;
12595
12629
  async function log(level, msg) {
12630
+ if (level === "debug") {
12631
+ const key = `${level}:${msg}`;
12632
+ const now = Date.now();
12633
+ const last = recentLogMsgs.get(key);
12634
+ if (last && now - last < LOG_DEDUP_WINDOW_MS)
12635
+ return;
12636
+ recentLogMsgs.set(key, now);
12637
+ if (recentLogMsgs.size > 200) {
12638
+ const oldest = [...recentLogMsgs.entries()].sort((a, b) => a[1] - b[1]);
12639
+ for (let i = 0;i < 100; i++)
12640
+ recentLogMsgs.delete(oldest[i][0]);
12641
+ }
12642
+ }
12596
12643
  try {
12597
12644
  await ctx.client.app.log({ body: { service: "auto-resume", level, message: msg } });
12598
12645
  } catch (e) {
@@ -12624,6 +12671,7 @@ var AutoResumePlugin = async (ctx, options) => {
12624
12671
  gaveUp: false,
12625
12672
  orphanWatchStartAt: null,
12626
12673
  aborting: false,
12674
+ pluginAbortInFlight: false,
12627
12675
  toolTextRecovered: false,
12628
12676
  toolTextAttempts: 0,
12629
12677
  continueTimestamps: [],
@@ -12782,6 +12830,8 @@ var AutoResumePlugin = async (ctx, options) => {
12782
12830
  await log("debug", `${short(sid)} - continue already in progress, skipping`);
12783
12831
  return;
12784
12832
  }
12833
+ if (w.userCancelled || w.completionSignaled)
12834
+ return;
12785
12835
  if (!w.continuing)
12786
12836
  dbg(`State transition on ${short(sid)}: continuing=false -> true`);
12787
12837
  w.continuing = true;
@@ -12917,9 +12967,21 @@ var AutoResumePlugin = async (ctx, options) => {
12917
12967
  return response.messages;
12918
12968
  return [];
12919
12969
  }
12970
+ const messagesInflight = new Map;
12920
12971
  async function getSessionMessages(sid) {
12921
- const response = await ctx.client.session.messages({ path: { id: sid } });
12922
- return extractMessages(response);
12972
+ const inflight = messagesInflight.get(sid);
12973
+ if (inflight)
12974
+ return inflight;
12975
+ const p = (async () => {
12976
+ try {
12977
+ const response = await ctx.client.session.messages({ path: { id: sid } });
12978
+ return extractMessages(response);
12979
+ } finally {
12980
+ messagesInflight.delete(sid);
12981
+ }
12982
+ })();
12983
+ messagesInflight.set(sid, p);
12984
+ return p;
12923
12985
  }
12924
12986
  function roleOf(msg) {
12925
12987
  if (!msg)
@@ -12971,6 +13033,43 @@ var AutoResumePlugin = async (ctx, options) => {
12971
13033
  return {};
12972
13034
  }
12973
13035
  }
13036
+ const todoCache = new Map;
13037
+ const todoInflight = new Map;
13038
+ const TODO_CACHE_TTL_MS = 2000;
13039
+ async function fetchSessionTodos(sid) {
13040
+ if (typeof sid !== "string" || !sid.startsWith("ses"))
13041
+ return [];
13042
+ const cached2 = todoCache.get(sid);
13043
+ if (cached2 && Date.now() - cached2.fetchedAt < TODO_CACHE_TTL_MS)
13044
+ return cached2.todos;
13045
+ const inflight = todoInflight.get(sid);
13046
+ if (inflight)
13047
+ return inflight;
13048
+ const p = (async () => {
13049
+ try {
13050
+ const todoFn = ctx.client.session.todo;
13051
+ if (typeof todoFn !== "function")
13052
+ return [];
13053
+ const response = await todoFn.call(ctx.client.session, { path: { id: sid } });
13054
+ const rawTodos = response.data ?? response;
13055
+ if (!Array.isArray(rawTodos))
13056
+ return [];
13057
+ const todos = rawTodos.map((t) => ({
13058
+ content: t?.content ?? "",
13059
+ status: t?.status ?? "pending",
13060
+ priority: t?.priority ?? "medium"
13061
+ }));
13062
+ todoCache.set(sid, { todos, fetchedAt: Date.now() });
13063
+ return todos;
13064
+ } catch {
13065
+ return [];
13066
+ } finally {
13067
+ todoInflight.delete(sid);
13068
+ }
13069
+ })();
13070
+ todoInflight.set(sid, p);
13071
+ return p;
13072
+ }
12974
13073
  const SUBAGENT_STUCK_MS = 60000;
12975
13074
  const SUBAGENT_RECOVERY_PROMPT = "It looks like you may have stalled or timed out. Please retry the last operation or continue with the task.";
12976
13075
  async function recoverSubagent(subagentSid) {
@@ -13096,6 +13195,34 @@ var AutoResumePlugin = async (ctx, options) => {
13096
13195
  w.recoveryAttempts = 0;
13097
13196
  w.watchdogRetryGuard = false;
13098
13197
  }
13198
+ function resetBusyFlags(w) {
13199
+ w.resumeAttempts = 0;
13200
+ w.lastRetryAt = 0;
13201
+ w.pendingTools = 0;
13202
+ w.pendingCommands = 0;
13203
+ w.gaveUp = false;
13204
+ w.orphanWatchStartAt = null;
13205
+ w.aborting = false;
13206
+ w.toolTextRecovered = false;
13207
+ w.toolTextAttempts = 0;
13208
+ w.todoCheckAttempts = 0;
13209
+ w.checkingToolText = false;
13210
+ w.interruptedContinueCount = 0;
13211
+ w.recentToolCalls = [];
13212
+ w.toolLoopAttempts = 0;
13213
+ w.pendingRecovery = false;
13214
+ w.pendingRecoveryReason = null;
13215
+ w.pendingRecoveryAt = 0;
13216
+ w.recoveryAttempts = 0;
13217
+ w.watchdogRetryGuard = false;
13218
+ if (w.toolTextTimer) {
13219
+ clearTimeout(w.toolTextTimer);
13220
+ w.toolTextTimer = null;
13221
+ }
13222
+ w.todoNudgeAttempts = 0;
13223
+ w.doneClaimNoTodosAttempts = 0;
13224
+ w.continueTimestamps = [];
13225
+ }
13099
13226
  function resetIdleFlags(w) {
13100
13227
  w.aborting = false;
13101
13228
  w.orphanWatchStartAt = null;
@@ -13297,9 +13424,9 @@ var AutoResumePlugin = async (ctx, options) => {
13297
13424
  priority: 1
13298
13425
  };
13299
13426
  } else if (w.doneClaimNoTodosAttempts < maxRetries) {
13300
- await log("info", `${short(sid)} - model claims done with no open todos. Sending verification prompt (attempt ${w.doneClaimNoTodosAttempts + 1}/${maxRetries})...`);
13427
+ await log("info", `${short(sid)} - model claims done with no open todos. Sending details prompt (attempt ${w.doneClaimNoTodosAttempts + 1}/${maxRetries})...`);
13301
13428
  bestCandidate = {
13302
- prompt: doneWithoutWorkPrompt,
13429
+ prompt: doneWithoutDetailsPrompt,
13303
13430
  source: "done-claim-no-todos",
13304
13431
  priority: 1
13305
13432
  };
@@ -13331,14 +13458,19 @@ var AutoResumePlugin = async (ctx, options) => {
13331
13458
  const trimmedText = allAssistantText.trim();
13332
13459
  const normalized = trimmedText.replace(/[.!?]+$/, "");
13333
13460
  if (normalized.endsWith("\uD83C\uDF89") && (!bestCandidate || bestCandidate.priority > 0)) {
13334
- await log("info", `${short(sid)} - \uD83C\uDF89 completion detected, skipping continue`);
13335
- w.toolTextRecovered = true;
13336
- w.completionSignaled = true;
13337
- if (w.toolTextTimer) {
13338
- clearTimeout(w.toolTextTimer);
13339
- w.toolTextTimer = null;
13461
+ const openCount = getOpenTodos(w.todos || []).length;
13462
+ if (openCount > 0) {
13463
+ await log("info", `${short(sid)} - \uD83C\uDF89 detected but ${openCount} open todos remain, NOT latching completion`);
13464
+ } else {
13465
+ await log("info", `${short(sid)} - \uD83C\uDF89 completion detected, skipping continue`);
13466
+ w.toolTextRecovered = true;
13467
+ w.completionSignaled = true;
13468
+ if (w.toolTextTimer) {
13469
+ clearTimeout(w.toolTextTimer);
13470
+ w.toolTextTimer = null;
13471
+ }
13472
+ return;
13340
13473
  }
13341
- return;
13342
13474
  }
13343
13475
  if (!bestCandidate) {
13344
13476
  const todos = w.todos || [];
@@ -13412,11 +13544,13 @@ var AutoResumePlugin = async (ctx, options) => {
13412
13544
  await log("warn", `Invalid sid for abort: ${sid} (must start with "ses_")`);
13413
13545
  return false;
13414
13546
  }
13547
+ if (w.userCancelled || w.completionSignaled)
13548
+ return false;
13415
13549
  if (w.aborting)
13416
13550
  return false;
13417
- w.aborting = true;
13418
13551
  const idleSec = Math.round((Date.now() - (w.orphanWatchStartAt ?? w.lastActivityAt)) / 1000);
13419
13552
  await log("info", `Abort+Resume on ${short(sid)} (${idleSec}s idle). Aborting...`);
13553
+ w.pluginAbortInFlight = true;
13420
13554
  try {
13421
13555
  await ctx.client.session.abort({ path: { id: sid } });
13422
13556
  await log("info", `${short(sid)} - abort OK`);
@@ -13425,6 +13559,7 @@ var AutoResumePlugin = async (ctx, options) => {
13425
13559
  const errMsg = err instanceof Error ? err.message : String(err);
13426
13560
  await log("warn", `${short(sid)} - abort failed: ${errMsg}`);
13427
13561
  w.aborting = false;
13562
+ w.pluginAbortInFlight = false;
13428
13563
  return false;
13429
13564
  }
13430
13565
  await new Promise((resolve) => setTimeout(resolve, ABORT_CONTINUE_DELAY_MS));
@@ -13442,6 +13577,8 @@ var AutoResumePlugin = async (ctx, options) => {
13442
13577
  await log("warn", `${short(sid)} - continue after abort failed: ${errMsg}`);
13443
13578
  w.aborting = false;
13444
13579
  return false;
13580
+ } finally {
13581
+ w.pluginAbortInFlight = false;
13445
13582
  }
13446
13583
  }
13447
13584
  async function tryResume(sid, w, reason, prompt) {
@@ -13500,7 +13637,12 @@ var AutoResumePlugin = async (ctx, options) => {
13500
13637
  w.idleSince = Date.now();
13501
13638
  }
13502
13639
  if (isNew) {
13503
- log("debug", `Discovered session ${short(sid)} via list()`);
13640
+ log("debug", `Discovered session ${short(sid)} via list() \u2014 fetching todos`);
13641
+ const fetched = await fetchSessionTodos(sid);
13642
+ if (fetched.length > 0) {
13643
+ const w = sessions.get(sid);
13644
+ w.todos = fetched;
13645
+ }
13504
13646
  }
13505
13647
  }
13506
13648
  }
@@ -13526,7 +13668,7 @@ var AutoResumePlugin = async (ctx, options) => {
13526
13668
  }
13527
13669
  if (w.status !== "busy")
13528
13670
  continue;
13529
- if (w.userCancelled)
13671
+ if (w.userCancelled || w.completionSignaled)
13530
13672
  continue;
13531
13673
  if (w.aborting)
13532
13674
  continue;
@@ -13666,6 +13808,12 @@ var AutoResumePlugin = async (ctx, options) => {
13666
13808
  continue;
13667
13809
  if (busyCount() !== 0)
13668
13810
  continue;
13811
+ if ((w.todos || []).length === 0) {
13812
+ const fetched = await fetchSessionTodos(sid);
13813
+ if (fetched.length > 0) {
13814
+ w.todos = fetched;
13815
+ }
13816
+ }
13669
13817
  const open = getOpenTodos(w.todos || []);
13670
13818
  if (open.length === 0)
13671
13819
  continue;
@@ -13677,8 +13825,13 @@ var AutoResumePlugin = async (ctx, options) => {
13677
13825
  continue;
13678
13826
  const isCelebration = await lastAssistantEndsWithCelebration(sid);
13679
13827
  if (isCelebration) {
13680
- w.toolTextRecovered = true;
13681
- w.completionSignaled = true;
13828
+ const openCount = getOpenTodos(w.todos || []).length;
13829
+ if (openCount > 0) {
13830
+ await log("info", `${short(sid)} - \uD83C\uDF89 detected in periodic recheck but ${openCount} open todos remain, NOT latching completion`);
13831
+ } else {
13832
+ w.toolTextRecovered = true;
13833
+ w.completionSignaled = true;
13834
+ }
13682
13835
  continue;
13683
13836
  }
13684
13837
  const reminder = buildOpenTodosReminder(w.todos || []);
@@ -13719,7 +13872,7 @@ var AutoResumePlugin = async (ctx, options) => {
13719
13872
  if (w.pendingRecovery) {
13720
13873
  dbg(`Pending recovery cleared on ${short(sid)}: reason=session-busy`);
13721
13874
  }
13722
- resetSessionFlags(w);
13875
+ resetBusyFlags(w);
13723
13876
  prevBusyCount = busyCount();
13724
13877
  log("debug", `${short(sid)} -> busy (${prevBusyCount})`);
13725
13878
  } else if (statusType === "interrupted") {
@@ -13762,24 +13915,41 @@ var AutoResumePlugin = async (ctx, options) => {
13762
13915
  const errMsg = e instanceof Error ? e.message : String(e);
13763
13916
  dbg(`session.idle sid=${short(sid)}: streaming-failure check error: ${errMsg}`);
13764
13917
  }
13918
+ try {
13919
+ const dead = getLastSilentDeadStream(await getSessionMessages(sid));
13920
+ if (dead && dead.outputTokens >= silentDeadStreamMinTokens) {
13921
+ w.pendingRecovery = true;
13922
+ w.pendingRecoveryReason = `silent-${dead.finish}`;
13923
+ w.pendingRecoveryAt = Date.now();
13924
+ await log("info", `${short(sid)} - silent dead stream: finish=${dead.finish}, ${dead.outputTokens} output tokens, no text parts; resuming`);
13925
+ await tryResume(sid, w, `Silent dead stream (${dead.finish})`, continuePrompt);
13926
+ }
13927
+ } catch (e) {
13928
+ const errMsg = e instanceof Error ? e.message : String(e);
13929
+ dbg(`session.idle sid=${short(sid)}: silent-dead-stream check error: ${errMsg}`);
13930
+ }
13931
+ }
13932
+ let todos = w.todos || [];
13933
+ if (todos.length === 0) {
13934
+ const fetched = await fetchSessionTodos(sid);
13935
+ if (fetched.length > 0) {
13936
+ w.todos = fetched;
13937
+ todos = fetched;
13938
+ }
13765
13939
  }
13766
- const todos = w.todos || [];
13767
13940
  const open = getOpenTodos(todos);
13768
13941
  if (open.length > 0 && currentBusy === 0 && !w.completionSignaled && !w.userCancelled && w.todoNudgeAttempts < maxRetries) {
13769
13942
  const isCelebration = await lastAssistantEndsWithCelebration(sid);
13943
+ await log("info", `${short(sid)} - open todos=${open.length}, isCelebration=${isCelebration}, currentBusy=${currentBusy}`);
13770
13944
  if (isCelebration) {
13771
- await log("info", `${short(sid)} - \uD83C\uDF89 detected in idle handler, skipping continue`);
13772
- w.toolTextRecovered = true;
13773
- w.completionSignaled = true;
13774
- if (w.toolTextTimer) {
13775
- clearTimeout(w.toolTextTimer);
13776
- w.toolTextTimer = null;
13777
- }
13778
- } else {
13945
+ await log("info", `${short(sid)} - \uD83C\uDF89 detected but ${open.length} open todos remain, sending nudge`);
13946
+ const reminder = buildOpenTodosReminder(todos);
13947
+ await tryResume(sid, w, "Idle with open todos (celebration false positive)", reminder);
13779
13948
  w.todoNudgeAttempts++;
13949
+ } else {
13780
13950
  const reminder = buildOpenTodosReminder(todos);
13781
- await log("info", `${short(sid)} - idle with ${open.length} open todos. Sending reminder (nudge ${w.todoNudgeAttempts}/${maxRetries})...`);
13782
13951
  await tryResume(sid, w, "Idle with open todos", reminder);
13952
+ w.todoNudgeAttempts++;
13783
13953
  }
13784
13954
  }
13785
13955
  }
@@ -13793,8 +13963,7 @@ var AutoResumePlugin = async (ctx, options) => {
13793
13963
  dbg(`session.idle sid=${short(idleSid)}: skipping action intent, session is warming up (${Date.now() - idleW.createdAt}ms < ${warmupMs}ms)`);
13794
13964
  return;
13795
13965
  }
13796
- const response = await ctx.client.session.messages({ path: { id: idleSid } });
13797
- const msgs = extractMessages(response);
13966
+ const msgs = await getSessionMessages(idleSid);
13798
13967
  const lastAssistantMsg = msgs.slice().reverse().find((m) => (m.role ?? m.info?.role) === "assistant");
13799
13968
  if (lastAssistantMsg) {
13800
13969
  let lastText = "";
@@ -13804,7 +13973,7 @@ var AutoResumePlugin = async (ctx, options) => {
13804
13973
  }
13805
13974
  if (containsActionIntent(lastText)) {
13806
13975
  const w2 = sessions.get(idleSid);
13807
- if (!w2 || w2.toolTextRecovered || w2.completionSignaled || w2.status !== "idle")
13976
+ if (!w2 || w2.toolTextRecovered || w2.completionSignaled || w2.userCancelled || w2.status !== "idle")
13808
13977
  return;
13809
13978
  w2.toolTextRecovered = true;
13810
13979
  w2.toolTextAttempts++;
@@ -13858,8 +14027,7 @@ var AutoResumePlugin = async (ctx, options) => {
13858
14027
  dbg(`session.idle sid=${short(sid)}: skipping action intent, session is warming up (${Date.now() - w.createdAt}ms < ${warmupMs}ms)`);
13859
14028
  return;
13860
14029
  }
13861
- const response = await ctx.client.session.messages({ path: { id: sid } });
13862
- const msgs = extractMessages(response);
14030
+ const msgs = await getSessionMessages(sid);
13863
14031
  const lastAssistantMsg = msgs.slice().reverse().find((m) => (m.role ?? m.info?.role) === "assistant");
13864
14032
  if (lastAssistantMsg) {
13865
14033
  let lastText = "";
@@ -13869,7 +14037,7 @@ var AutoResumePlugin = async (ctx, options) => {
13869
14037
  }
13870
14038
  if (containsActionIntent(lastText)) {
13871
14039
  const w2 = sessions.get(sid);
13872
- if (!w2 || w2.toolTextRecovered || w2.completionSignaled || w2.status !== "idle")
14040
+ if (!w2 || w2.toolTextRecovered || w2.completionSignaled || w2.userCancelled || w2.status !== "idle")
13873
14041
  return;
13874
14042
  w2.toolTextRecovered = true;
13875
14043
  w2.toolTextAttempts++;
@@ -13930,7 +14098,7 @@ var AutoResumePlugin = async (ctx, options) => {
13930
14098
  const isMessageAborted = errorName === "MessageAbortedError";
13931
14099
  if (isMessageAborted) {
13932
14100
  for (const [wSid, w] of sessions) {
13933
- if (w.status === "busy") {
14101
+ if (!w.pluginAbortInFlight) {
13934
14102
  w.userCancelled = true;
13935
14103
  w.status = "idle";
13936
14104
  resetIdleFlags(w);
@@ -13968,16 +14136,14 @@ var AutoResumePlugin = async (ctx, options) => {
13968
14136
  break;
13969
14137
  }
13970
14138
  case "command.executed": {
13971
- for (const [sid2, w2] of sessions) {
13972
- if (w2.pendingRecovery) {
13973
- dbg(`Pending recovery cleared on ${short(sid2)}: reason=user-command`);
13974
- }
13975
- resetSessionFlags(w2);
13976
- }
13977
14139
  if (!sid)
13978
14140
  break;
13979
14141
  const w = sessions.get(sid);
13980
14142
  if (w) {
14143
+ if (w.pendingRecovery) {
14144
+ dbg(`Pending recovery cleared on ${short(sid)}: reason=user-command`);
14145
+ }
14146
+ resetBusyFlags(w);
13981
14147
  w.pendingCommands = Math.max(0, w.pendingCommands - 1);
13982
14148
  w.lastActivityAt = Date.now();
13983
14149
  }
@@ -13986,7 +14152,7 @@ var AutoResumePlugin = async (ctx, options) => {
13986
14152
  }
13987
14153
  }
13988
14154
  const taskCompleteTool = tool({
13989
- description: "Signal that all work is complete. Call this when you have finished everything requested.",
14155
+ description: "Signal that all work is complete and stop automatic continuation prompts. Call this ONLY after finishing everything requested.",
13990
14156
  args: {},
13991
14157
  execute: async (_args, ctx2) => {
13992
14158
  const w = sessions.get(ctx2.sessionID);
@@ -13998,12 +14164,12 @@ var AutoResumePlugin = async (ctx, options) => {
13998
14164
  await log("info", `${short(ctx2.sessionID)} - task_complete blocked: ${openTodos.length} open todos remain (override ${w.taskCompleteOverrides}/${maxRetries})`);
13999
14165
  return `You have ${openTodos.length} unfinished task(s). Please complete all remaining work before signaling completion.`;
14000
14166
  }
14001
- w.toolTextRecovered = true;
14002
- w.completionSignaled = true;
14003
- if (w.toolTextTimer) {
14004
- clearTimeout(w.toolTextTimer);
14005
- w.toolTextTimer = null;
14006
- }
14167
+ }
14168
+ w.toolTextRecovered = true;
14169
+ w.completionSignaled = true;
14170
+ if (w.toolTextTimer) {
14171
+ clearTimeout(w.toolTextTimer);
14172
+ w.toolTextTimer = null;
14007
14173
  }
14008
14174
  log("info", `${short(ctx2.sessionID)} - task_complete called, ${w.isSubagent ? "subagent" : "agent"} done`);
14009
14175
  }
@@ -14053,6 +14219,6 @@ var AutoResumePlugin = async (ctx, options) => {
14053
14219
  };
14054
14220
  var src_default = AutoResumePlugin;
14055
14221
  export {
14056
- src_default as default,
14057
- AutoResumePlugin
14222
+ AutoResumePlugin,
14223
+ src_default as default
14058
14224
  };