@deepseek-ai/dsh-schedule 0.1.7-alpha.2 → 0.1.7-rc.2

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.
@@ -0,0 +1,727 @@
1
+ /* Generated by @deepseek-ai/dsh-typert-generator from FaceModel — do not edit. */
2
+ import { z } from 'zod'
3
+
4
+ let _deepseek_ai_dsh_schedule_schedule_catalog_result$schema$value
5
+ const _deepseek_ai_dsh_schedule_schedule_catalog_result$schema = () => (_deepseek_ai_dsh_schedule_schedule_catalog_result$schema$value ??= z.array(z.union([z.intersection(z.object({
6
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
7
+ 'kind': z.literal("after").readonly(),
8
+ 'title': z.string().readonly(),
9
+ 'prompt': z.string().readonly(),
10
+ 'afterSeconds': z.number().readonly(),
11
+ 'scheduledAt': z.string().readonly(),
12
+ }), z.object({
13
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
14
+ 'status': z.union([z.literal("active"), z.literal("inactive")]).readonly(),
15
+ 'lastDelivery': z.object({
16
+ 'scheduledAt': z.string().readonly(),
17
+ 'deliveredAt': z.string().readonly(),
18
+ 'messageId': z.intersection(z.string(), z.unknown()).readonly(),
19
+ }).readonly().optional(),
20
+ })), z.intersection(z.object({
21
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
22
+ 'kind': z.literal("at").readonly(),
23
+ 'title': z.string().readonly(),
24
+ 'prompt': z.string().readonly(),
25
+ 'scheduledAt': z.string().readonly(),
26
+ }), z.object({
27
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
28
+ 'status': z.union([z.literal("active"), z.literal("inactive")]).readonly(),
29
+ 'lastDelivery': z.object({
30
+ 'scheduledAt': z.string().readonly(),
31
+ 'deliveredAt': z.string().readonly(),
32
+ 'messageId': z.intersection(z.string(), z.unknown()).readonly(),
33
+ }).readonly().optional(),
34
+ })), z.intersection(z.object({
35
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
36
+ 'kind': z.literal("every").readonly(),
37
+ 'title': z.string().readonly(),
38
+ 'prompt': z.string().readonly(),
39
+ 'everySeconds': z.number().readonly(),
40
+ 'scheduledAt': z.string().readonly(),
41
+ }), z.object({
42
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
43
+ 'status': z.union([z.literal("active"), z.literal("inactive")]).readonly(),
44
+ 'lastDelivery': z.object({
45
+ 'scheduledAt': z.string().readonly(),
46
+ 'deliveredAt': z.string().readonly(),
47
+ 'messageId': z.intersection(z.string(), z.unknown()).readonly(),
48
+ }).readonly().optional(),
49
+ })), z.intersection(z.object({
50
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
51
+ 'kind': z.literal("daily").readonly(),
52
+ 'title': z.string().readonly(),
53
+ 'prompt': z.string().readonly(),
54
+ 'time': z.string().readonly(),
55
+ 'timeZone': z.string().readonly(),
56
+ 'scheduledAt': z.string().readonly(),
57
+ }), z.object({
58
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
59
+ 'status': z.union([z.literal("active"), z.literal("inactive")]).readonly(),
60
+ 'lastDelivery': z.object({
61
+ 'scheduledAt': z.string().readonly(),
62
+ 'deliveredAt': z.string().readonly(),
63
+ 'messageId': z.intersection(z.string(), z.unknown()).readonly(),
64
+ }).readonly().optional(),
65
+ })), z.intersection(z.object({
66
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
67
+ 'kind': z.literal("weekly").readonly(),
68
+ 'title': z.string().readonly(),
69
+ 'prompt': z.string().readonly(),
70
+ 'time': z.string().readonly(),
71
+ 'timeZone': z.string().readonly(),
72
+ 'weekdays': z.array(z.number()).readonly(),
73
+ 'scheduledAt': z.string().readonly(),
74
+ }), z.object({
75
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
76
+ 'status': z.union([z.literal("active"), z.literal("inactive")]).readonly(),
77
+ 'lastDelivery': z.object({
78
+ 'scheduledAt': z.string().readonly(),
79
+ 'deliveredAt': z.string().readonly(),
80
+ 'messageId': z.intersection(z.string(), z.unknown()).readonly(),
81
+ }).readonly().optional(),
82
+ })), z.intersection(z.object({
83
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
84
+ 'kind': z.literal("cron").readonly(),
85
+ 'title': z.string().readonly(),
86
+ 'prompt': z.string().readonly(),
87
+ 'expression': z.string().readonly(),
88
+ 'timeZone': z.string().readonly(),
89
+ 'scheduledAt': z.string().readonly(),
90
+ }), z.object({
91
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
92
+ 'status': z.union([z.literal("active"), z.literal("inactive")]).readonly(),
93
+ 'lastDelivery': z.object({
94
+ 'scheduledAt': z.string().readonly(),
95
+ 'deliveredAt': z.string().readonly(),
96
+ 'messageId': z.intersection(z.string(), z.unknown()).readonly(),
97
+ }).readonly().optional(),
98
+ }))])))
99
+ let _deepseek_ai_dsh_schedule_schedule_delete_parameter_0$schema$value
100
+ const _deepseek_ai_dsh_schedule_schedule_delete_parameter_0$schema = () => (_deepseek_ai_dsh_schedule_schedule_delete_parameter_0$schema$value ??= z.object({
101
+ 'id': z.intersection(z.string(), z.unknown()),
102
+ 'sessionId': z.intersection(z.string(), z.unknown()),
103
+ }))
104
+ let _deepseek_ai_dsh_schedule_schedule_delete_result$schema$value
105
+ const _deepseek_ai_dsh_schedule_schedule_delete_result$schema = () => (_deepseek_ai_dsh_schedule_schedule_delete_result$schema$value ??= z.union([z.object({
106
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
107
+ 'deleted': z.literal(true).readonly(),
108
+ }), z.object({
109
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
110
+ 'deleted': z.literal(false).readonly(),
111
+ 'code': z.literal("schedule_not_found").readonly(),
112
+ })]))
113
+ let _deepseek_ai_dsh_schedule_schedule_history_parameter_0$schema$value
114
+ const _deepseek_ai_dsh_schedule_schedule_history_parameter_0$schema = () => (_deepseek_ai_dsh_schedule_schedule_history_parameter_0$schema$value ??= z.object({
115
+ 'limit': z.number(),
116
+ 'before': z.intersection(z.string(), z.unknown()).optional(),
117
+ 'id': z.intersection(z.string(), z.unknown()),
118
+ 'sessionId': z.intersection(z.string(), z.unknown()),
119
+ }))
120
+ let _deepseek_ai_dsh_schedule_schedule_history_result$schema$value
121
+ const _deepseek_ai_dsh_schedule_schedule_history_result$schema = () => (_deepseek_ai_dsh_schedule_schedule_history_result$schema$value ??= z.union([z.object({
122
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
123
+ 'records': z.array(z.object({
124
+ 'prompt': z.string().readonly().optional(),
125
+ 'scheduledAt': z.string().readonly(),
126
+ 'deliveredAt': z.string().readonly(),
127
+ 'messageId': z.intersection(z.string(), z.unknown()).readonly(),
128
+ })).readonly(),
129
+ 'earlierRecordsUnavailable': z.boolean().readonly(),
130
+ 'earlierRecordsPruned': z.boolean().readonly(),
131
+ 'retention': z.object({
132
+ 'days': z.number().readonly(),
133
+ 'records': z.number().readonly(),
134
+ }).readonly(),
135
+ 'nextBefore': z.intersection(z.string(), z.unknown()).readonly().optional(),
136
+ }), z.object({
137
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
138
+ 'code': z.union([z.literal("schedule_not_found"), z.literal("delivery_cursor_not_found")]).readonly(),
139
+ })]))
140
+ let _deepseek_ai_dsh_schedule_schedule_list_parameter_0$schema$value
141
+ const _deepseek_ai_dsh_schedule_schedule_list_parameter_0$schema = () => (_deepseek_ai_dsh_schedule_schedule_list_parameter_0$schema$value ??= z.object({
142
+ 'sessionId': z.intersection(z.string(), z.unknown()),
143
+ }))
144
+ let _deepseek_ai_dsh_schedule_schedule_list_result$schema$value
145
+ const _deepseek_ai_dsh_schedule_schedule_list_result$schema = () => (_deepseek_ai_dsh_schedule_schedule_list_result$schema$value ??= z.array(z.union([z.object({
146
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
147
+ 'kind': z.literal("after").readonly(),
148
+ 'title': z.string().readonly(),
149
+ 'prompt': z.string().readonly(),
150
+ 'afterSeconds': z.number().readonly(),
151
+ 'scheduledAt': z.string().readonly(),
152
+ }), z.object({
153
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
154
+ 'kind': z.literal("at").readonly(),
155
+ 'title': z.string().readonly(),
156
+ 'prompt': z.string().readonly(),
157
+ 'scheduledAt': z.string().readonly(),
158
+ }), z.object({
159
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
160
+ 'kind': z.literal("every").readonly(),
161
+ 'title': z.string().readonly(),
162
+ 'prompt': z.string().readonly(),
163
+ 'everySeconds': z.number().readonly(),
164
+ 'scheduledAt': z.string().readonly(),
165
+ }), z.object({
166
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
167
+ 'kind': z.literal("daily").readonly(),
168
+ 'title': z.string().readonly(),
169
+ 'prompt': z.string().readonly(),
170
+ 'time': z.string().readonly(),
171
+ 'timeZone': z.string().readonly(),
172
+ 'scheduledAt': z.string().readonly(),
173
+ }), z.object({
174
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
175
+ 'kind': z.literal("weekly").readonly(),
176
+ 'title': z.string().readonly(),
177
+ 'prompt': z.string().readonly(),
178
+ 'time': z.string().readonly(),
179
+ 'timeZone': z.string().readonly(),
180
+ 'weekdays': z.array(z.number()).readonly(),
181
+ 'scheduledAt': z.string().readonly(),
182
+ }), z.object({
183
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
184
+ 'kind': z.literal("cron").readonly(),
185
+ 'title': z.string().readonly(),
186
+ 'prompt': z.string().readonly(),
187
+ 'expression': z.string().readonly(),
188
+ 'timeZone': z.string().readonly(),
189
+ 'scheduledAt': z.string().readonly(),
190
+ })])))
191
+ let _deepseek_ai_dsh_schedule_schedule_update_parameter_0$schema$value
192
+ const _deepseek_ai_dsh_schedule_schedule_update_parameter_0$schema = () => (_deepseek_ai_dsh_schedule_schedule_update_parameter_0$schema$value ??= z.object({
193
+ 'expected': z.union([z.object({
194
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
195
+ 'kind': z.literal("after").readonly(),
196
+ 'title': z.string().readonly(),
197
+ 'prompt': z.string().readonly(),
198
+ 'afterSeconds': z.number().readonly(),
199
+ 'scheduledAt': z.string().readonly(),
200
+ }), z.object({
201
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
202
+ 'kind': z.literal("at").readonly(),
203
+ 'title': z.string().readonly(),
204
+ 'prompt': z.string().readonly(),
205
+ 'scheduledAt': z.string().readonly(),
206
+ }), z.object({
207
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
208
+ 'kind': z.literal("every").readonly(),
209
+ 'title': z.string().readonly(),
210
+ 'prompt': z.string().readonly(),
211
+ 'everySeconds': z.number().readonly(),
212
+ 'scheduledAt': z.string().readonly(),
213
+ }), z.object({
214
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
215
+ 'kind': z.literal("daily").readonly(),
216
+ 'title': z.string().readonly(),
217
+ 'prompt': z.string().readonly(),
218
+ 'time': z.string().readonly(),
219
+ 'timeZone': z.string().readonly(),
220
+ 'scheduledAt': z.string().readonly(),
221
+ }), z.object({
222
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
223
+ 'kind': z.literal("weekly").readonly(),
224
+ 'title': z.string().readonly(),
225
+ 'prompt': z.string().readonly(),
226
+ 'time': z.string().readonly(),
227
+ 'timeZone': z.string().readonly(),
228
+ 'weekdays': z.array(z.number()).readonly(),
229
+ 'scheduledAt': z.string().readonly(),
230
+ }), z.object({
231
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
232
+ 'kind': z.literal("cron").readonly(),
233
+ 'title': z.string().readonly(),
234
+ 'prompt': z.string().readonly(),
235
+ 'expression': z.string().readonly(),
236
+ 'timeZone': z.string().readonly(),
237
+ 'scheduledAt': z.string().readonly(),
238
+ })]).readonly(),
239
+ 'change': z.union([z.object({
240
+ 'kind': z.literal("at").readonly(),
241
+ 'at': z.union([z.string(), z.object({
242
+ 'date': z.string().readonly(),
243
+ 'time': z.string().readonly(),
244
+ 'time_zone': z.string().readonly(),
245
+ })]).readonly(),
246
+ }), z.object({
247
+ 'kind': z.literal("every").readonly(),
248
+ 'every_seconds': z.number().readonly(),
249
+ }), z.object({
250
+ 'kind': z.literal("daily").readonly(),
251
+ 'daily': z.object({
252
+ 'time': z.string().readonly(),
253
+ 'time_zone': z.string().readonly(),
254
+ }).readonly(),
255
+ }), z.object({
256
+ 'kind': z.literal("weekly").readonly(),
257
+ 'weekly': z.object({
258
+ 'time': z.string().readonly(),
259
+ 'time_zone': z.string().readonly(),
260
+ 'weekdays': z.array(z.number()).readonly(),
261
+ }).readonly(),
262
+ }), z.object({
263
+ 'kind': z.literal("cron").readonly(),
264
+ 'cron': z.object({
265
+ 'expression': z.string().readonly(),
266
+ 'time_zone': z.string().readonly(),
267
+ }).readonly(),
268
+ })]).readonly().optional(),
269
+ 'id': z.intersection(z.string(), z.unknown()),
270
+ 'sessionId': z.intersection(z.string(), z.unknown()),
271
+ 'title': z.string().readonly().optional(),
272
+ 'prompt': z.string().readonly().optional(),
273
+ }))
274
+ let _deepseek_ai_dsh_schedule_schedule_update_result$schema$value
275
+ const _deepseek_ai_dsh_schedule_schedule_update_result$schema = () => (_deepseek_ai_dsh_schedule_schedule_update_result$schema$value ??= z.union([z.object({
276
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
277
+ 'updated': z.boolean().readonly(),
278
+ 'record': z.union([z.object({
279
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
280
+ 'kind': z.literal("after").readonly(),
281
+ 'title': z.string().readonly(),
282
+ 'prompt': z.string().readonly(),
283
+ 'afterSeconds': z.number().readonly(),
284
+ 'scheduledAt': z.string().readonly(),
285
+ }), z.object({
286
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
287
+ 'kind': z.literal("at").readonly(),
288
+ 'title': z.string().readonly(),
289
+ 'prompt': z.string().readonly(),
290
+ 'scheduledAt': z.string().readonly(),
291
+ }), z.object({
292
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
293
+ 'kind': z.literal("every").readonly(),
294
+ 'title': z.string().readonly(),
295
+ 'prompt': z.string().readonly(),
296
+ 'everySeconds': z.number().readonly(),
297
+ 'scheduledAt': z.string().readonly(),
298
+ }), z.object({
299
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
300
+ 'kind': z.literal("daily").readonly(),
301
+ 'title': z.string().readonly(),
302
+ 'prompt': z.string().readonly(),
303
+ 'time': z.string().readonly(),
304
+ 'timeZone': z.string().readonly(),
305
+ 'scheduledAt': z.string().readonly(),
306
+ }), z.object({
307
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
308
+ 'kind': z.literal("weekly").readonly(),
309
+ 'title': z.string().readonly(),
310
+ 'prompt': z.string().readonly(),
311
+ 'time': z.string().readonly(),
312
+ 'timeZone': z.string().readonly(),
313
+ 'weekdays': z.array(z.number()).readonly(),
314
+ 'scheduledAt': z.string().readonly(),
315
+ }), z.object({
316
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
317
+ 'kind': z.literal("cron").readonly(),
318
+ 'title': z.string().readonly(),
319
+ 'prompt': z.string().readonly(),
320
+ 'expression': z.string().readonly(),
321
+ 'timeZone': z.string().readonly(),
322
+ 'scheduledAt': z.string().readonly(),
323
+ })]).readonly(),
324
+ }), z.object({
325
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
326
+ 'updated': z.literal(false).readonly(),
327
+ 'code': z.union([z.literal("schedule_not_found"), z.literal("schedule_ended"), z.literal("schedule_conflict")]).readonly(),
328
+ }), z.object({
329
+ 'code': z.literal("invalid_prompt").readonly(),
330
+ 'message': z.string().readonly(),
331
+ }), z.object({
332
+ 'code': z.literal("invalid_selector").readonly(),
333
+ 'message': z.string().readonly(),
334
+ }), z.object({
335
+ 'code': z.literal("invalid_rule").readonly(),
336
+ 'message': z.string().readonly(),
337
+ }), z.object({
338
+ 'code': z.literal("invalid_time_zone").readonly(),
339
+ 'message': z.string().readonly(),
340
+ }), z.object({
341
+ 'code': z.literal("not_future").readonly(),
342
+ 'message': z.string().readonly(),
343
+ }), z.object({
344
+ 'code': z.literal("time_out_of_range").readonly(),
345
+ 'message': z.string().readonly(),
346
+ }), z.object({
347
+ 'code': z.literal("frequency_too_high").readonly(),
348
+ 'message': z.string().readonly(),
349
+ }), z.object({
350
+ 'code': z.literal("internal_error").readonly(),
351
+ 'message': z.string().readonly(),
352
+ })]))
353
+
354
+ export const TYPERT = {
355
+ package: '@deepseek-ai/dsh-schedule',
356
+ face: 'host',
357
+ schemas: [
358
+ ],
359
+ invocations: [
360
+ {
361
+ id: '@deepseek-ai/dsh-schedule#schedule/catalog',
362
+ service: 'schedule',
363
+ namespace: 'schedule',
364
+ method: 'catalog',
365
+ invocation: { kind: 'direct' },
366
+ parameters: [
367
+ ],
368
+ result: {
369
+ mode: 'strict',
370
+ typeSymbol: '@deepseek-ai/dsh-schedule#schedule/catalog:result',
371
+ create: _deepseek_ai_dsh_schedule_schedule_catalog_result$schema,
372
+ },
373
+ sourceLocation: {"file":"packages/schedule/schedule/src/index.ts","line":304,"column":9},
374
+ },
375
+ {
376
+ id: '@deepseek-ai/dsh-schedule#schedule/delete',
377
+ service: 'schedule',
378
+ namespace: 'schedule',
379
+ method: 'delete',
380
+ invocation: { kind: 'direct' },
381
+ parameters: [
382
+ {
383
+ name: 'request',
384
+ wire: 'request',
385
+ source: 'json',
386
+ codec: {
387
+ mode: 'strict',
388
+ typeSymbol: '@deepseek-ai/dsh-schedule/client#ScheduleDeleteRequest',
389
+ create: _deepseek_ai_dsh_schedule_schedule_delete_parameter_0$schema,
390
+ },
391
+ },
392
+ ],
393
+ cancellation: { parameter: 'signal' },
394
+ result: {
395
+ mode: 'strict',
396
+ typeSymbol: '@deepseek-ai/dsh-schedule/client#ScheduleDeleteResult',
397
+ create: _deepseek_ai_dsh_schedule_schedule_delete_result$schema,
398
+ },
399
+ sourceLocation: {"file":"packages/schedule/schedule/src/index.ts","line":343,"column":9},
400
+ },
401
+ {
402
+ id: '@deepseek-ai/dsh-schedule#schedule/history',
403
+ service: 'schedule',
404
+ namespace: 'schedule',
405
+ method: 'history',
406
+ invocation: { kind: 'direct' },
407
+ parameters: [
408
+ {
409
+ name: 'request',
410
+ wire: 'request',
411
+ source: 'json',
412
+ codec: {
413
+ mode: 'strict',
414
+ typeSymbol: '@deepseek-ai/dsh-schedule/client#ScheduleDeliveryHistoryRequest',
415
+ create: _deepseek_ai_dsh_schedule_schedule_history_parameter_0$schema,
416
+ },
417
+ },
418
+ ],
419
+ result: {
420
+ mode: 'strict',
421
+ typeSymbol: '@deepseek-ai/dsh-schedule/client#ScheduleDeliveryHistoryResult',
422
+ create: _deepseek_ai_dsh_schedule_schedule_history_result$schema,
423
+ },
424
+ sourceLocation: {"file":"packages/schedule/schedule/src/index.ts","line":322,"column":9},
425
+ },
426
+ {
427
+ id: '@deepseek-ai/dsh-schedule#schedule/list',
428
+ service: 'schedule',
429
+ namespace: 'schedule',
430
+ method: 'list',
431
+ invocation: { kind: 'direct' },
432
+ parameters: [
433
+ {
434
+ name: 'request',
435
+ wire: 'request',
436
+ source: 'json',
437
+ codec: {
438
+ mode: 'strict',
439
+ typeSymbol: '@deepseek-ai/dsh-schedule/client#ScheduleListRequest',
440
+ create: _deepseek_ai_dsh_schedule_schedule_list_parameter_0$schema,
441
+ },
442
+ },
443
+ ],
444
+ result: {
445
+ mode: 'strict',
446
+ typeSymbol: '@deepseek-ai/dsh-schedule#schedule/list:result',
447
+ create: _deepseek_ai_dsh_schedule_schedule_list_result$schema,
448
+ },
449
+ sourceLocation: {"file":"packages/schedule/schedule/src/index.ts","line":290,"column":9},
450
+ },
451
+ {
452
+ id: '@deepseek-ai/dsh-schedule#schedule/update',
453
+ service: 'schedule',
454
+ namespace: 'schedule',
455
+ method: 'update',
456
+ invocation: { kind: 'direct' },
457
+ parameters: [
458
+ {
459
+ name: 'request',
460
+ wire: 'request',
461
+ source: 'json',
462
+ codec: {
463
+ mode: 'strict',
464
+ typeSymbol: '@deepseek-ai/dsh-schedule/client#ScheduleUpdateRequest',
465
+ create: _deepseek_ai_dsh_schedule_schedule_update_parameter_0$schema,
466
+ },
467
+ },
468
+ ],
469
+ cancellation: { parameter: 'signal' },
470
+ result: {
471
+ mode: 'strict',
472
+ typeSymbol: '@deepseek-ai/dsh-schedule/client#ScheduleUpdateResult',
473
+ create: _deepseek_ai_dsh_schedule_schedule_update_result$schema,
474
+ },
475
+ sourceLocation: {"file":"packages/schedule/schedule/src/index.ts","line":370,"column":9},
476
+ },
477
+ ],
478
+ model: {
479
+ "services": [
480
+ {
481
+ "description": "Shared management service; reads, deletion, and timing edits never activate a Session. `sessionPersistence` is a load-order requirement rather than a directly called service: a delivery commits only when `ctx.sessions.flush()` reports that a `session/flush` listener participated, and the persistence backend providing this service is the plugin that registers that listener.",
482
+ "summary": "Shared management service; reads, deletion, and timing edits never activate a Session.",
483
+ "tags": [],
484
+ "jsDoc": "/**\n * Shared management service; reads, deletion, and timing edits never activate a Session.\n *\n * `sessionPersistence` is a load-order requirement rather than a directly called\n * service: a delivery commits only when `ctx.sessions.flush()` reports that a\n * `session/flush` listener participated, and the persistence backend providing this\n * service is the plugin that registers that listener.\n */",
485
+ "key": "schedule",
486
+ "exportName": "ScheduleService",
487
+ "members": [
488
+ {
489
+ "kind": "method",
490
+ "name": "[Service.init]",
491
+ "signature": "async [Service.init](): Promise<void>"
492
+ },
493
+ {
494
+ "kind": "method",
495
+ "name": "create",
496
+ "signature": "async create(sessionId: SessionId, request: ScheduleCreateRequest, signal?: AbortSignal): Promise<ScheduleRecord>",
497
+ "summary": "Create a reminder bound to the caller-selected Session without activating it.",
498
+ "jsDoc": "/**\n * Create a reminder bound to the caller-selected Session without activating it.\n *\n * The request must supply a title; a missing, blank-after-trim, or over-long\n * title rejects with `invalid_prompt` instead of deriving one from the prompt.\n * The record is built from the clock reading taken before the request joins the\n * serialized queue, so a create that waits behind a longer operation keeps its\n * request-time anchor and may already be due when the queue reaches it.\n * @param sessionId - Original Session receiving the reminder.\n * @param request - Validated tool selector, required title, and reminder content.\n * @param signal - Optional cancellation checked before persistence begins, including after FIFO waits.\n * @returns The durably stored schedule. Cancellation does not roll back an in-flight write.\n */"
499
+ },
500
+ {
501
+ "kind": "method",
502
+ "name": "list",
503
+ "signature": "@Remote('list') async list(request: ScheduleListRequest): Promise<ScheduleRecord[]>",
504
+ "summary": "Read the selected Session's active tasks without resuming its Agent.",
505
+ "jsDoc": "/**\n * Read the selected Session's active tasks without resuming its Agent.\n * @param request - Session whose task list is requested.\n * @returns Persisted reminders in storage order.\n */"
506
+ },
507
+ {
508
+ "kind": "method",
509
+ "name": "catalog",
510
+ "signature": "@Remote('catalog') async catalog(): Promise<ScheduleCatalogEntry[]>",
511
+ "summary": "Read all active and inactive Host reminders with their original Session bindings.",
512
+ "jsDoc": "/**\n * Read all active and inactive Host reminders with their original Session bindings.\n * A deleted reminder has no row, so it is absent here.\n * Does not activate Sessions or read Session history.\n * @returns Reminders ordered by scheduledAt ascending, then lexicographically by id.\n */"
513
+ },
514
+ {
515
+ "kind": "method",
516
+ "name": "history",
517
+ "signature": "@Remote('history') async history(request: ScheduleDeliveryHistoryRequest): Promise<ScheduleDeliveryHistoryResult>",
518
+ "summary": "Read saved inbox deliveries without activating or reading the original Session.",
519
+ "jsDoc": "/**\n * Read saved inbox deliveries without activating or reading the original Session.\n * The task's own row supplies its binding, so its records stay readable through this lookup.\n * @param request - Session binding, task identity, explicit limit, and optional exclusive message cursor.\n * @returns Newest-first deliveries in append order, or a task/cursor lookup failure.\n * @throws ScheduleInputError when limit is not a safe integer from 1 through 100.\n */"
520
+ },
521
+ {
522
+ "kind": "method",
523
+ "name": "delete",
524
+ "signature": "@Remote('delete') async delete(request: ScheduleDeleteRequest, signal?: AbortSignal): Promise<ScheduleDeleteResult>",
525
+ "summary": "Delete one task belonging to the selected Session, leaving queued messages intact.",
526
+ "jsDoc": "/**\n * Delete one task belonging to the selected Session, leaving queued messages intact.\n *\n * The row is removed: the task no longer schedules, leaves `list` and `catalog`, and its\n * saved delivery records go with it.\n * @param request - Session and exact task identity.\n * @param signal - Optional cancellation checked before persistence begins, including after FIFO waits.\n * @returns Whether that Session owned a deleted task. Cancellation does not roll back an in-flight write.\n */"
527
+ },
528
+ {
529
+ "kind": "method",
530
+ "name": "update",
531
+ "signature": "@Remote('update') async update(request: ScheduleUpdateRequest, signal?: AbortSignal): Promise<ScheduleUpdateResult>",
532
+ "summary": "Update the name, instruction, and timing of an active task within the original Session binding without activating the Session or changing saved deliveries.",
533
+ "jsDoc": "/**\n * Update the name, instruction, and timing of an active task within the original Session\n * binding without activating the Session or changing saved deliveries.\n *\n * Each supplied field replaces its stored value; an omitted field keeps it. A name or\n * instruction change alone does not reset the committed target.\n * @param request - Task binding, complete observed record, and any combination of timing, name, and instruction.\n * @param signal - Cancellation checked after domain readiness and FIFO waits, before persistence begins.\n * @returns The committed record, unchanged record for a no-op, or a non-mutating input/lookup/conflict result.\n * Storage and lifecycle failures reject; cancellation after a write starts does not roll it back.\n */"
534
+ }
535
+ ],
536
+ "types": [
537
+ {
538
+ "name": "AfterScheduleRecord",
539
+ "declaration": "export interface AfterScheduleRecord {\n readonly id: ScheduleId;\n readonly kind: 'after';\n readonly title: string;\n readonly prompt: string;\n readonly afterSeconds: number;\n readonly scheduledAt: string;\n}"
540
+ },
541
+ {
542
+ "name": "AtInput",
543
+ "declaration": "export type AtInput = string | LocalAtInput;"
544
+ },
545
+ {
546
+ "name": "AtScheduleRecord",
547
+ "declaration": "export interface AtScheduleRecord {\n readonly id: ScheduleId;\n readonly kind: 'at';\n readonly title: string;\n readonly prompt: string;\n readonly scheduledAt: string;\n}"
548
+ },
549
+ {
550
+ "name": "Branded",
551
+ "declaration": "export type Branded<B extends string> = string & { readonly [BRAND]: B; };"
552
+ },
553
+ {
554
+ "name": "CronInput",
555
+ "declaration": "export interface CronInput {\n readonly expression: string;\n readonly time_zone: string;\n}"
556
+ },
557
+ {
558
+ "name": "CronScheduleRecord",
559
+ "declaration": "export interface CronScheduleRecord {\n readonly id: ScheduleId;\n readonly kind: 'cron';\n readonly title: string;\n readonly prompt: string;\n readonly expression: string;\n readonly timeZone: string;\n readonly scheduledAt: string;\n}"
560
+ },
561
+ {
562
+ "name": "DailyInput",
563
+ "declaration": "export interface DailyInput {\n readonly time: string;\n readonly time_zone: string;\n}"
564
+ },
565
+ {
566
+ "name": "DailyScheduleRecord",
567
+ "declaration": "export interface DailyScheduleRecord {\n readonly id: ScheduleId;\n readonly kind: 'daily';\n readonly title: string;\n readonly prompt: string;\n readonly time: string;\n readonly timeZone: string;\n readonly scheduledAt: string;\n}"
568
+ },
569
+ {
570
+ "name": "DeliveryRetentionBounds",
571
+ "declaration": "export interface DeliveryRetentionBounds {\n readonly days: number;\n readonly records: number;\n}"
572
+ },
573
+ {
574
+ "name": "EveryScheduleRecord",
575
+ "declaration": "export interface EveryScheduleRecord {\n readonly id: ScheduleId;\n readonly kind: 'every';\n readonly title: string;\n readonly prompt: string;\n readonly everySeconds: number;\n readonly scheduledAt: string;\n}"
576
+ },
577
+ {
578
+ "name": "FrequencyTooHighError",
579
+ "declaration": "export interface FrequencyTooHighError {\n readonly code: 'frequency_too_high';\n readonly message: string;\n}"
580
+ },
581
+ {
582
+ "name": "InternalScheduleError",
583
+ "declaration": "export interface InternalScheduleError {\n readonly code: 'internal_error';\n readonly message: string;\n}"
584
+ },
585
+ {
586
+ "name": "InvalidPromptError",
587
+ "declaration": "export interface InvalidPromptError {\n readonly code: 'invalid_prompt';\n readonly message: string;\n}"
588
+ },
589
+ {
590
+ "name": "InvalidRuleError",
591
+ "declaration": "export interface InvalidRuleError {\n readonly code: 'invalid_rule';\n readonly message: string;\n}"
592
+ },
593
+ {
594
+ "name": "InvalidSelectorError",
595
+ "declaration": "export interface InvalidSelectorError {\n readonly code: 'invalid_selector';\n readonly message: string;\n}"
596
+ },
597
+ {
598
+ "name": "InvalidTimeZoneError",
599
+ "declaration": "export interface InvalidTimeZoneError {\n readonly code: 'invalid_time_zone';\n readonly message: string;\n}"
600
+ },
601
+ {
602
+ "name": "LocalAtInput",
603
+ "declaration": "export interface LocalAtInput {\n readonly date: string;\n readonly time: string;\n readonly time_zone: string;\n}"
604
+ },
605
+ {
606
+ "name": "MessageId",
607
+ "declaration": "export type MessageId = Branded<'MessageId'>;"
608
+ },
609
+ {
610
+ "name": "NotFutureError",
611
+ "declaration": "export interface NotFutureError {\n readonly code: 'not_future';\n readonly message: string;\n}"
612
+ },
613
+ {
614
+ "name": "OneShotScheduleRecord",
615
+ "declaration": "export type OneShotScheduleRecord = AfterScheduleRecord | AtScheduleRecord;"
616
+ },
617
+ {
618
+ "name": "RecurringScheduleRecord",
619
+ "declaration": "export type RecurringScheduleRecord = EveryScheduleRecord | DailyScheduleRecord | WeeklyScheduleRecord | CronScheduleRecord;"
620
+ },
621
+ {
622
+ "name": "ScheduleCatalogEntry",
623
+ "declaration": "export type ScheduleCatalogEntry = ScheduleRecord & { readonly sessionId: SessionId; readonly status: 'active' | 'inactive'; readonly lastDelivery?: ScheduleDeliveryReceipt; };"
624
+ },
625
+ {
626
+ "name": "ScheduleCreateRequest",
627
+ "declaration": "export interface ScheduleCreateRequest {\n prompt: string;\n title: string;\n after_seconds?: number;\n at?: AtInput;\n every_seconds?: number;\n daily?: DailyInput;\n weekly?: WeeklyInput;\n cron?: CronInput;\n}"
628
+ },
629
+ {
630
+ "name": "ScheduleDeleteRequest",
631
+ "declaration": "export interface ScheduleDeleteRequest extends ScheduleListRequest {\n id: ScheduleId;\n}"
632
+ },
633
+ {
634
+ "name": "ScheduleDeleteResult",
635
+ "declaration": "export type ScheduleDeleteResult = { readonly id: ScheduleId; readonly deleted: true; } | { readonly id: ScheduleId; readonly deleted: false; readonly code: 'schedule_not_found'; };"
636
+ },
637
+ {
638
+ "name": "ScheduleDeliveryHistoryRequest",
639
+ "declaration": "export interface ScheduleDeliveryHistoryRequest extends ScheduleDeleteRequest {\n limit: number;\n before?: MessageId;\n}"
640
+ },
641
+ {
642
+ "name": "ScheduleDeliveryHistoryResult",
643
+ "declaration": "export type ScheduleDeliveryHistoryResult = { readonly id: ScheduleId; readonly records: ScheduleDeliveryRecord[]; readonly earlierRecordsUnavailable: boolean; readonly earlierRecordsPruned: boolean; readonly retention: DeliveryRetentionBounds; readonly nextBefore?: MessageId; } | { readonly id: ScheduleId; readonly code: 'schedule_not_found' | 'delivery_cursor_not_found'; };"
644
+ },
645
+ {
646
+ "name": "ScheduleDeliveryReceipt",
647
+ "declaration": "export interface ScheduleDeliveryReceipt {\n readonly scheduledAt: string;\n readonly deliveredAt: string;\n readonly messageId: MessageId;\n}"
648
+ },
649
+ {
650
+ "name": "ScheduleDeliveryRecord",
651
+ "declaration": "export interface ScheduleDeliveryRecord extends ScheduleDeliveryReceipt {\n readonly prompt?: string;\n}"
652
+ },
653
+ {
654
+ "name": "ScheduleId",
655
+ "declaration": "export type ScheduleId = Branded<'ScheduleId'>;"
656
+ },
657
+ {
658
+ "name": "ScheduleListRequest",
659
+ "declaration": "export interface ScheduleListRequest {\n sessionId: SessionId;\n}"
660
+ },
661
+ {
662
+ "name": "ScheduleRecord",
663
+ "declaration": "export type ScheduleRecord = OneShotScheduleRecord | RecurringScheduleRecord;"
664
+ },
665
+ {
666
+ "name": "ScheduleTimingChange",
667
+ "declaration": "export type ScheduleTimingChange = { readonly kind: 'at'; readonly at: AtInput; } | { readonly kind: 'every'; readonly every_seconds: number; } | { readonly kind: 'daily'; readonly daily: DailyInput; } | { readonly kind: 'weekly'; readonly weekly: WeeklyInput; } | { readonly kind: 'cron'; readonly cron: CronInput; };"
668
+ },
669
+ {
670
+ "name": "ScheduleToolError",
671
+ "declaration": "export type ScheduleToolError = InvalidPromptError | InvalidSelectorError | InvalidRuleError | InvalidTimeZoneError | NotFutureError | TimeOutOfRangeError | FrequencyTooHighError | InternalScheduleError;"
672
+ },
673
+ {
674
+ "name": "ScheduleUpdateContent",
675
+ "declaration": "export interface ScheduleUpdateContent {\n readonly title?: string;\n readonly prompt?: string;\n}"
676
+ },
677
+ {
678
+ "name": "ScheduleUpdateMiss",
679
+ "declaration": "export interface ScheduleUpdateMiss {\n readonly id: ScheduleId;\n readonly updated: false;\n readonly code: 'schedule_not_found' | 'schedule_ended' | 'schedule_conflict';\n}"
680
+ },
681
+ {
682
+ "name": "ScheduleUpdateRequest",
683
+ "declaration": "export interface ScheduleUpdateRequest extends ScheduleDeleteRequest, ScheduleUpdateContent {\n readonly expected: ScheduleRecord;\n readonly change?: ScheduleTimingChange;\n}"
684
+ },
685
+ {
686
+ "name": "ScheduleUpdateResult",
687
+ "declaration": "export type ScheduleUpdateResult = { readonly id: ScheduleId; readonly updated: boolean; readonly record: ScheduleRecord; } | ScheduleUpdateMiss | ScheduleToolError;"
688
+ },
689
+ {
690
+ "name": "SessionId",
691
+ "declaration": "export type SessionId = Branded<'SessionId'>;"
692
+ },
693
+ {
694
+ "name": "TimeOutOfRangeError",
695
+ "declaration": "export interface TimeOutOfRangeError {\n readonly code: 'time_out_of_range';\n readonly message: string;\n}"
696
+ },
697
+ {
698
+ "name": "WeeklyInput",
699
+ "declaration": "export interface WeeklyInput {\n readonly time: string;\n readonly time_zone: string;\n readonly weekdays: number[];\n}"
700
+ },
701
+ {
702
+ "name": "WeeklyScheduleRecord",
703
+ "declaration": "export interface WeeklyScheduleRecord {\n readonly id: ScheduleId;\n readonly kind: 'weekly';\n readonly title: string;\n readonly prompt: string;\n readonly time: string;\n readonly timeZone: string;\n readonly weekdays: number[];\n readonly scheduledAt: string;\n}"
704
+ }
705
+ ]
706
+ }
707
+ ],
708
+ "events": [
709
+ {
710
+ "description": "Durable task set changed; clients refetch global task and Session-active catalogs.",
711
+ "summary": "Durable task set changed; clients refetch global task and Session-active catalogs.",
712
+ "tags": [
713
+ {
714
+ "name": "mode",
715
+ "comment": "emit",
716
+ "text": "@mode emit"
717
+ }
718
+ ],
719
+ "jsDoc": "/** Durable task set changed; clients refetch global task and Session-active catalogs.\n * @mode emit\n */",
720
+ "name": "schedule/changed",
721
+ "mode": "emit",
722
+ "signature": "'schedule/changed'(): void"
723
+ }
724
+ ],
725
+ "objects": []
726
+ },
727
+ }