@heynixie/contract 0.63.0 → 0.65.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,6 +32,7 @@ export declare function buildQueryUtils(client: ContractClient): {
32
32
  size: number;
33
33
  window: number;
34
34
  } | undefined;
35
+ isSilentTurn?: true | undefined;
35
36
  kind: string;
36
37
  message?: {
37
38
  clientMessageId?: string | undefined;
@@ -68,11 +69,6 @@ export declare function buildQueryUtils(client: ContractClient): {
68
69
  }[];
69
70
  } | undefined;
70
71
  recordedAt: Date;
71
- route?: {
72
- isMove: boolean;
73
- messages: number[];
74
- taskID: string;
75
- } | undefined;
76
72
  sequence: number;
77
73
  stop?: {
78
74
  cancelledActions: {
@@ -91,6 +87,9 @@ export declare function buildQueryUtils(client: ContractClient): {
91
87
  error?: string | undefined;
92
88
  errorLimit?: number | undefined;
93
89
  errors?: number | undefined;
90
+ isWaitingForRetry?: boolean | undefined;
91
+ readCursor?: number | undefined;
92
+ reason?: string | undefined;
94
93
  retryAt?: Date | undefined;
95
94
  stepKey?: string | undefined;
96
95
  taskID: string;
@@ -138,6 +137,7 @@ export declare function buildQueryUtils(client: ContractClient): {
138
137
  size: number;
139
138
  window: number;
140
139
  } | undefined;
140
+ isSilentTurn?: true | undefined;
141
141
  kind: string;
142
142
  message?: {
143
143
  clientMessageId?: string | undefined;
@@ -174,11 +174,6 @@ export declare function buildQueryUtils(client: ContractClient): {
174
174
  }[];
175
175
  } | undefined;
176
176
  recordedAt: Date;
177
- route?: {
178
- isMove: boolean;
179
- messages: number[];
180
- taskID: string;
181
- } | undefined;
182
177
  sequence: number;
183
178
  stop?: {
184
179
  cancelledActions: {
@@ -197,6 +192,9 @@ export declare function buildQueryUtils(client: ContractClient): {
197
192
  error?: string | undefined;
198
193
  errorLimit?: number | undefined;
199
194
  errors?: number | undefined;
195
+ isWaitingForRetry?: boolean | undefined;
196
+ readCursor?: number | undefined;
197
+ reason?: string | undefined;
200
198
  retryAt?: Date | undefined;
201
199
  stepKey?: string | undefined;
202
200
  taskID: string;
@@ -290,31 +288,10 @@ export declare function buildQueryUtils(client: ContractClient): {
290
288
  timeZone?: string | undefined;
291
289
  writtenAt?: string | undefined;
292
290
  }>;
293
- readImage: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, {
294
- position: number;
295
- sequence: number;
296
- thread: string;
297
- }, import("zod/v4/core").File, import("@orpc/contract").ErrorFromErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
298
- UNAUTHORIZED: {
299
- message: string;
300
- status: number;
301
- };
302
- }>, {
303
- IMAGE_NOT_FOUND: {
304
- readonly message: 'No readable image of a message has this position';
305
- readonly status: 404;
306
- };
307
- }>>> & import("@orpc/tanstack-query").GeneralUtils<{
308
- position: number;
309
- sequence: number;
310
- thread: string;
311
- }>;
312
- forget: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, {
291
+ retry: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, {
313
292
  clientActionID: string;
314
- sequence: number;
315
- thread: string;
316
293
  }, {
317
- forgottenAt: Date;
294
+ retriedAt: Date;
318
295
  }, import("@orpc/contract").ErrorFromErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
319
296
  UNAUTHORIZED: {
320
297
  message: string;
@@ -326,30 +303,38 @@ export declare function buildQueryUtils(client: ContractClient): {
326
303
  status: number;
327
304
  };
328
305
  }>, {
329
- RECORD_NOT_FOUND: {
306
+ NOTHING_TO_RETRY: {
330
307
  message: string;
331
308
  status: number;
332
309
  };
333
310
  }>>> & import("@orpc/tanstack-query").GeneralUtils<{
334
311
  clientActionID: string;
312
+ }>;
313
+ readImage: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, {
314
+ position: number;
315
+ sequence: number;
316
+ thread: string;
317
+ }, import("zod/v4/core").File, import("@orpc/contract").ErrorFromErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
318
+ UNAUTHORIZED: {
319
+ message: string;
320
+ status: number;
321
+ };
322
+ }>, {
323
+ IMAGE_NOT_FOUND: {
324
+ readonly message: 'No readable image of a message has this position';
325
+ readonly status: 404;
326
+ };
327
+ }>>> & import("@orpc/tanstack-query").GeneralUtils<{
328
+ position: number;
335
329
  sequence: number;
336
330
  thread: string;
337
331
  }>;
338
- move: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, {
332
+ forget: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, {
339
333
  clientActionID: string;
340
334
  sequence: number;
341
335
  thread: string;
342
- to: {
343
- kind: "new";
344
- name: string;
345
- brief: string;
346
- } | {
347
- kind: "task";
348
- taskID: string;
349
- };
350
336
  }, {
351
- movedAt: Date;
352
- taskID: string;
337
+ forgottenAt: Date;
353
338
  }, import("@orpc/contract").ErrorFromErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
354
339
  UNAUTHORIZED: {
355
340
  message: string;
@@ -365,30 +350,10 @@ export declare function buildQueryUtils(client: ContractClient): {
365
350
  message: string;
366
351
  status: number;
367
352
  };
368
- TASK_NOT_FOUND: {
369
- message: string;
370
- status: number;
371
- };
372
- TASK_TAKES_NO_MESSAGES: {
373
- message: string;
374
- status: number;
375
- };
376
- ALREADY_THERE: {
377
- message: string;
378
- status: number;
379
- };
380
353
  }>>> & import("@orpc/tanstack-query").GeneralUtils<{
381
354
  clientActionID: string;
382
355
  sequence: number;
383
356
  thread: string;
384
- to: {
385
- kind: "new";
386
- name: string;
387
- brief: string;
388
- } | {
389
- kind: "task";
390
- taskID: string;
391
- };
392
357
  }>;
393
358
  } & import("@orpc/tanstack-query").GeneralUtils<unknown>;
394
359
  tasks: {
@@ -2082,6 +2047,7 @@ export declare function buildQueryUtils(client: ContractClient): {
2082
2047
  size: number;
2083
2048
  window: number;
2084
2049
  } | undefined;
2050
+ isSilentTurn?: true | undefined;
2085
2051
  kind: string;
2086
2052
  message?: {
2087
2053
  clientMessageId?: string | undefined;
@@ -2118,11 +2084,6 @@ export declare function buildQueryUtils(client: ContractClient): {
2118
2084
  }[];
2119
2085
  } | undefined;
2120
2086
  recordedAt: Date;
2121
- route?: {
2122
- isMove: boolean;
2123
- messages: number[];
2124
- taskID: string;
2125
- } | undefined;
2126
2087
  sequence: number;
2127
2088
  stop?: {
2128
2089
  cancelledActions: {
@@ -2141,6 +2102,9 @@ export declare function buildQueryUtils(client: ContractClient): {
2141
2102
  error?: string | undefined;
2142
2103
  errorLimit?: number | undefined;
2143
2104
  errors?: number | undefined;
2105
+ isWaitingForRetry?: boolean | undefined;
2106
+ readCursor?: number | undefined;
2107
+ reason?: string | undefined;
2144
2108
  retryAt?: Date | undefined;
2145
2109
  stepKey?: string | undefined;
2146
2110
  taskID: string;
@@ -2203,6 +2167,7 @@ export declare function buildQueryUtils(client: ContractClient): {
2203
2167
  size: number;
2204
2168
  window: number;
2205
2169
  } | undefined;
2170
+ isSilentTurn?: true | undefined;
2206
2171
  kind: string;
2207
2172
  message?: {
2208
2173
  clientMessageId?: string | undefined;
@@ -2239,11 +2204,6 @@ export declare function buildQueryUtils(client: ContractClient): {
2239
2204
  }[];
2240
2205
  } | undefined;
2241
2206
  recordedAt: Date;
2242
- route?: {
2243
- isMove: boolean;
2244
- messages: number[];
2245
- taskID: string;
2246
- } | undefined;
2247
2207
  sequence: number;
2248
2208
  stop?: {
2249
2209
  cancelledActions: {
@@ -2262,6 +2222,9 @@ export declare function buildQueryUtils(client: ContractClient): {
2262
2222
  error?: string | undefined;
2263
2223
  errorLimit?: number | undefined;
2264
2224
  errors?: number | undefined;
2225
+ isWaitingForRetry?: boolean | undefined;
2226
+ readCursor?: number | undefined;
2227
+ reason?: string | undefined;
2265
2228
  retryAt?: Date | undefined;
2266
2229
  stepKey?: string | undefined;
2267
2230
  taskID: string;
@@ -35,6 +35,7 @@ export declare const contract: {
35
35
  size: z.ZodInt;
36
36
  window: z.ZodInt;
37
37
  }, z.core.$strip>>;
38
+ isSilentTurn: z.ZodOptional<z.ZodLiteral<true>>;
38
39
  kind: z.ZodString;
39
40
  message: z.ZodOptional<z.ZodObject<{
40
41
  clientMessageId: z.ZodOptional<z.ZodUUID>;
@@ -85,11 +86,6 @@ export declare const contract: {
85
86
  }, z.core.$strip>>;
86
87
  }, z.core.$strip>>;
87
88
  recordedAt: z.ZodDate;
88
- route: z.ZodOptional<z.ZodObject<{
89
- isMove: z.ZodBoolean;
90
- messages: z.ZodArray<z.ZodInt>;
91
- taskID: z.ZodString;
92
- }, z.core.$strip>>;
93
89
  sequence: z.ZodInt;
94
90
  stop: z.ZodOptional<z.ZodObject<{
95
91
  cancelledActions: z.ZodArray<z.ZodObject<{
@@ -111,6 +107,9 @@ export declare const contract: {
111
107
  error: z.ZodOptional<z.ZodString>;
112
108
  errorLimit: z.ZodOptional<z.ZodInt>;
113
109
  errors: z.ZodOptional<z.ZodInt>;
110
+ isWaitingForRetry: z.ZodOptional<z.ZodBoolean>;
111
+ readCursor: z.ZodOptional<z.ZodInt>;
112
+ reason: z.ZodOptional<z.ZodString>;
114
113
  retryAt: z.ZodOptional<z.ZodDate>;
115
114
  stepKey: z.ZodOptional<z.ZodString>;
116
115
  taskID: z.ZodString;
@@ -161,6 +160,7 @@ export declare const contract: {
161
160
  size: z.ZodInt;
162
161
  window: z.ZodInt;
163
162
  }, z.core.$strip>>;
163
+ isSilentTurn: z.ZodOptional<z.ZodLiteral<true>>;
164
164
  kind: z.ZodString;
165
165
  message: z.ZodOptional<z.ZodObject<{
166
166
  clientMessageId: z.ZodOptional<z.ZodUUID>;
@@ -211,11 +211,6 @@ export declare const contract: {
211
211
  }, z.core.$strip>>;
212
212
  }, z.core.$strip>>;
213
213
  recordedAt: z.ZodDate;
214
- route: z.ZodOptional<z.ZodObject<{
215
- isMove: z.ZodBoolean;
216
- messages: z.ZodArray<z.ZodInt>;
217
- taskID: z.ZodString;
218
- }, z.core.$strip>>;
219
214
  sequence: z.ZodInt;
220
215
  stop: z.ZodOptional<z.ZodObject<{
221
216
  cancelledActions: z.ZodArray<z.ZodObject<{
@@ -237,6 +232,9 @@ export declare const contract: {
237
232
  error: z.ZodOptional<z.ZodString>;
238
233
  errorLimit: z.ZodOptional<z.ZodInt>;
239
234
  errors: z.ZodOptional<z.ZodInt>;
235
+ isWaitingForRetry: z.ZodOptional<z.ZodBoolean>;
236
+ readCursor: z.ZodOptional<z.ZodInt>;
237
+ reason: z.ZodOptional<z.ZodString>;
240
238
  retryAt: z.ZodOptional<z.ZodDate>;
241
239
  stepKey: z.ZodOptional<z.ZodString>;
242
240
  taskID: z.ZodString;
@@ -319,27 +317,10 @@ export declare const contract: {
319
317
  status: number;
320
318
  };
321
319
  }>, Record<never, never>>;
322
- readImage: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
323
- position: z.ZodInt;
324
- sequence: z.ZodInt;
325
- thread: z.ZodString;
326
- }, z.core.$strip>, z.ZodFile, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
327
- UNAUTHORIZED: {
328
- message: string;
329
- status: number;
330
- };
331
- }>, {
332
- IMAGE_NOT_FOUND: {
333
- readonly message: 'No readable image of a message has this position';
334
- readonly status: 404;
335
- };
336
- }>, Record<never, never>>;
337
- forget: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
320
+ retry: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
338
321
  clientActionID: z.ZodUUID;
339
- sequence: z.ZodInt;
340
- thread: z.ZodString;
341
322
  }, z.core.$strip>, z.ZodObject<{
342
- forgottenAt: z.ZodDate;
323
+ retriedAt: z.ZodDate;
343
324
  }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
344
325
  UNAUTHORIZED: {
345
326
  message: string;
@@ -351,26 +332,32 @@ export declare const contract: {
351
332
  status: number;
352
333
  };
353
334
  }>, {
354
- RECORD_NOT_FOUND: {
335
+ NOTHING_TO_RETRY: {
355
336
  message: string;
356
337
  status: number;
357
338
  };
358
339
  }>, Record<never, never>>;
359
- move: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
340
+ readImage: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
341
+ position: z.ZodInt;
342
+ sequence: z.ZodInt;
343
+ thread: z.ZodString;
344
+ }, z.core.$strip>, z.ZodFile, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
345
+ UNAUTHORIZED: {
346
+ message: string;
347
+ status: number;
348
+ };
349
+ }>, {
350
+ IMAGE_NOT_FOUND: {
351
+ readonly message: 'No readable image of a message has this position';
352
+ readonly status: 404;
353
+ };
354
+ }>, Record<never, never>>;
355
+ forget: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
360
356
  clientActionID: z.ZodUUID;
361
357
  sequence: z.ZodInt;
362
358
  thread: z.ZodString;
363
- to: z.ZodDiscriminatedUnion<[z.ZodObject<{
364
- kind: z.ZodLiteral<"task">;
365
- taskID: z.ZodString;
366
- }, z.core.$strip>, z.ZodObject<{
367
- kind: z.ZodLiteral<"new">;
368
- name: z.ZodString;
369
- brief: z.ZodString;
370
- }, z.core.$strip>], "kind">;
371
359
  }, z.core.$strip>, z.ZodObject<{
372
- movedAt: z.ZodDate;
373
- taskID: z.ZodString;
360
+ forgottenAt: z.ZodDate;
374
361
  }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
375
362
  UNAUTHORIZED: {
376
363
  message: string;
@@ -386,18 +373,6 @@ export declare const contract: {
386
373
  message: string;
387
374
  status: number;
388
375
  };
389
- TASK_NOT_FOUND: {
390
- message: string;
391
- status: number;
392
- };
393
- TASK_TAKES_NO_MESSAGES: {
394
- message: string;
395
- status: number;
396
- };
397
- ALREADY_THERE: {
398
- message: string;
399
- status: number;
400
- };
401
376
  }>, Record<never, never>>;
402
377
  };
403
378
  tasks: {
@@ -2406,6 +2381,7 @@ export declare const contract: {
2406
2381
  size: number;
2407
2382
  window: number;
2408
2383
  } | undefined;
2384
+ isSilentTurn?: true | undefined;
2409
2385
  kind: string;
2410
2386
  message?: {
2411
2387
  clientMessageId?: string | undefined;
@@ -2442,11 +2418,6 @@ export declare const contract: {
2442
2418
  }[];
2443
2419
  } | undefined;
2444
2420
  recordedAt: Date;
2445
- route?: {
2446
- isMove: boolean;
2447
- messages: number[];
2448
- taskID: string;
2449
- } | undefined;
2450
2421
  sequence: number;
2451
2422
  stop?: {
2452
2423
  cancelledActions: {
@@ -2465,6 +2436,9 @@ export declare const contract: {
2465
2436
  error?: string | undefined;
2466
2437
  errorLimit?: number | undefined;
2467
2438
  errors?: number | undefined;
2439
+ isWaitingForRetry?: boolean | undefined;
2440
+ readCursor?: number | undefined;
2441
+ reason?: string | undefined;
2468
2442
  retryAt?: Date | undefined;
2469
2443
  stepKey?: string | undefined;
2470
2444
  taskID: string;
@@ -2513,6 +2487,7 @@ export declare const contract: {
2513
2487
  size: number;
2514
2488
  window: number;
2515
2489
  } | undefined;
2490
+ isSilentTurn?: true | undefined;
2516
2491
  kind: string;
2517
2492
  message?: {
2518
2493
  clientMessageId?: string | undefined;
@@ -2549,11 +2524,6 @@ export declare const contract: {
2549
2524
  }[];
2550
2525
  } | undefined;
2551
2526
  recordedAt: Date;
2552
- route?: {
2553
- isMove: boolean;
2554
- messages: number[];
2555
- taskID: string;
2556
- } | undefined;
2557
2527
  sequence: number;
2558
2528
  stop?: {
2559
2529
  cancelledActions: {
@@ -2572,6 +2542,9 @@ export declare const contract: {
2572
2542
  error?: string | undefined;
2573
2543
  errorLimit?: number | undefined;
2574
2544
  errors?: number | undefined;
2545
+ isWaitingForRetry?: boolean | undefined;
2546
+ readCursor?: number | undefined;
2547
+ reason?: string | undefined;
2575
2548
  retryAt?: Date | undefined;
2576
2549
  stepKey?: string | undefined;
2577
2550
  taskID: string;
@@ -2631,6 +2604,7 @@ export declare const contract: {
2631
2604
  size: number;
2632
2605
  window: number;
2633
2606
  } | undefined;
2607
+ isSilentTurn?: true | undefined;
2634
2608
  kind: string;
2635
2609
  message?: {
2636
2610
  clientMessageId?: string | undefined;
@@ -2667,11 +2641,6 @@ export declare const contract: {
2667
2641
  }[];
2668
2642
  } | undefined;
2669
2643
  recordedAt: Date;
2670
- route?: {
2671
- isMove: boolean;
2672
- messages: number[];
2673
- taskID: string;
2674
- } | undefined;
2675
2644
  sequence: number;
2676
2645
  stop?: {
2677
2646
  cancelledActions: {
@@ -2690,6 +2659,9 @@ export declare const contract: {
2690
2659
  error?: string | undefined;
2691
2660
  errorLimit?: number | undefined;
2692
2661
  errors?: number | undefined;
2662
+ isWaitingForRetry?: boolean | undefined;
2663
+ readCursor?: number | undefined;
2664
+ reason?: string | undefined;
2693
2665
  retryAt?: Date | undefined;
2694
2666
  stepKey?: string | undefined;
2695
2667
  taskID: string;
@@ -2738,6 +2710,7 @@ export declare const contract: {
2738
2710
  size: number;
2739
2711
  window: number;
2740
2712
  } | undefined;
2713
+ isSilentTurn?: true | undefined;
2741
2714
  kind: string;
2742
2715
  message?: {
2743
2716
  clientMessageId?: string | undefined;
@@ -2774,11 +2747,6 @@ export declare const contract: {
2774
2747
  }[];
2775
2748
  } | undefined;
2776
2749
  recordedAt: Date;
2777
- route?: {
2778
- isMove: boolean;
2779
- messages: number[];
2780
- taskID: string;
2781
- } | undefined;
2782
2750
  sequence: number;
2783
2751
  stop?: {
2784
2752
  cancelledActions: {
@@ -2797,6 +2765,9 @@ export declare const contract: {
2797
2765
  error?: string | undefined;
2798
2766
  errorLimit?: number | undefined;
2799
2767
  errors?: number | undefined;
2768
+ isWaitingForRetry?: boolean | undefined;
2769
+ readCursor?: number | undefined;
2770
+ reason?: string | undefined;
2800
2771
  retryAt?: Date | undefined;
2801
2772
  stepKey?: string | undefined;
2802
2773
  taskID: string;
package/dist/index.js CHANGED
@@ -604,6 +604,9 @@ var taskSchema = z7.object({
604
604
  error: z7.string().optional(),
605
605
  errorLimit: z7.int().positive().optional(),
606
606
  errors: z7.int().positive().optional(),
607
+ isWaitingForRetry: z7.boolean().optional(),
608
+ readCursor: z7.int().nonnegative().optional(),
609
+ reason: z7.string().optional(),
607
610
  retryAt: z7.date().optional(),
608
611
  stepKey: z7.string().optional(),
609
612
  taskID: z7.string()
@@ -672,11 +675,6 @@ var versionTextSchema = versionRefSchema.extend({
672
675
  status: z9.enum(["readable", "shredded", "unreadable", "missing"]),
673
676
  text: z9.string().optional()
674
677
  });
675
- var routeSchema = z9.object({
676
- isMove: z9.boolean(),
677
- messages: z9.array(sequenceSchema),
678
- taskID: threadSchema
679
- });
680
678
  var listedActionSchema = z9.object({ actionID: z9.string(), tool: z9.string() });
681
679
  var taskMessageSchema = z9.object({
682
680
  from: threadSchema,
@@ -699,6 +697,7 @@ var recordSchema = z9.object({
699
697
  compactionFailure: compactionFailureSchema.optional(),
700
698
  forget: z9.object({ sequence: sequenceSchema }).optional(),
701
699
  context: contextSchema.optional(),
700
+ isSilentTurn: z9.literal(true).optional(),
702
701
  kind: z9.string(),
703
702
  message: z9.object({
704
703
  clientMessageId: z9.uuid().optional(),
@@ -710,7 +709,6 @@ var recordSchema = z9.object({
710
709
  rating: ratingSchema.optional(),
711
710
  recall: recallSchema.optional(),
712
711
  recordedAt: z9.date(),
713
- route: routeSchema.optional(),
714
712
  sequence: sequenceSchema,
715
713
  stop: z9.object({ cancelledActions: z9.array(listedActionSchema) }).optional(),
716
714
  summary: summarySchema.optional(),
@@ -728,17 +726,6 @@ var sessionSchema = z9.object({
728
726
  sessionID: z9.uuid()
729
727
  });
730
728
  var checkedAction = signedIn.errors(reusedIDErrors);
731
- var taskNameSchema = z9.string().trim().min(1).max(80);
732
- var taskBriefSchema = z9.string().trim().min(1).max(8000);
733
- var newTaskTargetSchema = z9.object({
734
- kind: z9.literal("new"),
735
- name: taskNameSchema,
736
- brief: taskBriefSchema
737
- });
738
- var moveTargetSchema = z9.discriminatedUnion("kind", [
739
- z9.object({ kind: z9.literal("task"), taskID: threadSchema }),
740
- newTaskTargetSchema
741
- ]);
742
729
  var taskStateSchema = z9.enum([
743
730
  "ready",
744
731
  "running",
@@ -806,6 +793,12 @@ var contract = {
806
793
  timeZone: z9.string().min(1).max(100).optional(),
807
794
  writtenAt: z9.iso.datetime().optional()
808
795
  })).output(z9.object({ duplicate: z9.boolean(), sequence: sequenceSchema })),
796
+ retry: checkedAction.errors({
797
+ NOTHING_TO_RETRY: {
798
+ message: "The last turn of the conversation did not fail, or it runs again already",
799
+ status: 409
800
+ }
801
+ }).input(z9.object({ clientActionID: clientActionIDSchema })).output(z9.object({ retriedAt: z9.date() })),
809
802
  readImage: signedIn.errors({ IMAGE_NOT_FOUND: imageNotFoundError }).input(imageRefSchema).output(z9.file()),
810
803
  forget: checkedAction.errors({
811
804
  RECORD_NOT_FOUND: {
@@ -816,24 +809,7 @@ var contract = {
816
809
  clientActionID: clientActionIDSchema,
817
810
  sequence: sequenceSchema,
818
811
  thread: threadSchema
819
- })).output(z9.object({ forgottenAt: z9.date() })),
820
- move: checkedAction.errors({
821
- RECORD_NOT_FOUND: {
822
- message: "No message of yours on this thread has this sequence",
823
- status: 404
824
- },
825
- TASK_NOT_FOUND: { message: "No open task has this ID", status: 404 },
826
- TASK_TAKES_NO_MESSAGES: {
827
- message: "This task runs on its own schedule and takes no message of yours",
828
- status: 409
829
- },
830
- ALREADY_THERE: { message: "The message already went to this task", status: 409 }
831
- }).input(z9.object({
832
- clientActionID: clientActionIDSchema,
833
- sequence: sequenceSchema,
834
- thread: threadSchema,
835
- to: moveTargetSchema
836
- })).output(z9.object({ movedAt: z9.date(), taskID: threadSchema }))
812
+ })).output(z9.object({ forgottenAt: z9.date() }))
837
813
  },
838
814
  tasks: {
839
815
  list: signedIn.output(z9.object({ readAtSequence: sequenceSchema, tasks: z9.array(listedTaskSchema) })),
@@ -3,6 +3,9 @@ export declare const taskSchema: z.ZodObject<{
3
3
  error: z.ZodOptional<z.ZodString>;
4
4
  errorLimit: z.ZodOptional<z.ZodInt>;
5
5
  errors: z.ZodOptional<z.ZodInt>;
6
+ isWaitingForRetry: z.ZodOptional<z.ZodBoolean>;
7
+ readCursor: z.ZodOptional<z.ZodInt>;
8
+ reason: z.ZodOptional<z.ZodString>;
6
9
  retryAt: z.ZodOptional<z.ZodDate>;
7
10
  stepKey: z.ZodOptional<z.ZodString>;
8
11
  taskID: z.ZodString;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heynixie/contract",
3
- "version": "0.63.0",
3
+ "version": "0.65.0",
4
4
  "description": "The oRPC contract of the nixie API, with the types a client needs",
5
5
  "license": "MIT",
6
6
  "repository": {