@deepseek-ai/dsh-client-ui-schedule 0.2.2-alpha.2 → 0.2.2-alpha.3
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.
- package/README.i18n.yaml +19 -19
- package/README.md +28 -38
- package/README.zh.md +26 -36
- package/lib/client.js +15507 -5289
- package/lib/types/client/ClockPicker.d.ts +3 -3
- package/lib/types/client/DeliveryHistory.d.ts +12 -6
- package/lib/types/client/NewSessionLimit.d.ts +12 -0
- package/lib/types/client/RuleSelectRow.d.ts +22 -0
- package/lib/types/client/ScheduleCatalogAction.d.ts +2 -2
- package/lib/types/client/ScheduleTaskTab.d.ts +2 -1
- package/lib/types/client/TaskDetail.d.ts +71 -96
- package/lib/types/client/TaskEditorFields.d.ts +54 -0
- package/lib/types/client/TaskManagerPage.d.ts +8 -4
- package/lib/types/client/TaskRuleControls.d.ts +50 -0
- package/lib/types/client/catalog-source.d.ts +5 -2
- package/lib/types/client/editor-store.d.ts +32 -0
- package/lib/types/client/editor-timing.d.ts +47 -0
- package/lib/types/client/frequency-locales.d.ts +44 -2
- package/lib/types/client/index.d.ts +3 -3
- package/lib/types/client/locales.d.ts +52 -10
- package/lib/types/client/relative-clock.d.ts +8 -2
- package/lib/types/client/schedule-format.d.ts +16 -5
- package/lib/types/client/session-link.d.ts +1 -22
- package/lib/types/client/session-schedule-state.d.ts +13 -29
- package/lib/types/client/task-cron.d.ts +0 -65
- package/lib/types/client/task-manager-locales.d.ts +432 -320
- package/lib/types/client/task-record.d.ts +30 -0
- package/package.json +25 -23
- package/lib/types/client/task-timing.d.ts +0 -96
|
@@ -11,14 +11,20 @@
|
|
|
11
11
|
*/
|
|
12
12
|
/** Simplified Chinese rule and duration copy, key-set source of truth. */
|
|
13
13
|
export declare const frequencyZh: {
|
|
14
|
+
readonly 'frequency.hostMonthly': "每月 {days} 日 {time},不足该日则月末";
|
|
15
|
+
readonly 'frequency.hostDailyInterval': "每 {interval} 天 {time}";
|
|
16
|
+
readonly 'frequency.hostWeeklyInterval': "每 {interval} 周的周{weekdays} {time}";
|
|
17
|
+
readonly 'frequency.hostMonthlyInterval': "每 {interval} 个月的 {days} 日 {time},不足该日则月末";
|
|
18
|
+
readonly 'frequency.hostZone': "{rule}({timeZone})";
|
|
19
|
+
readonly 'frequency.hostCustom': "自定义";
|
|
14
20
|
readonly 'time.locale': "zh-CN";
|
|
15
21
|
readonly 'time.utcPrefix': "UTC";
|
|
16
22
|
readonly 'frequency.daily': "每天 {time}({timeZone})";
|
|
17
23
|
readonly 'frequency.dailyLocal': "每天 {time}";
|
|
18
24
|
readonly 'frequency.weekly': "每周{weekdays} {time}({timeZone})";
|
|
19
25
|
readonly 'frequency.weeklyLocal': "每周{weekdays} {time}";
|
|
20
|
-
readonly 'frequency.cron': "
|
|
21
|
-
readonly 'frequency.cronLocal': "
|
|
26
|
+
readonly 'frequency.cron': "自定义({timeZone})";
|
|
27
|
+
readonly 'frequency.cronLocal': "自定义";
|
|
22
28
|
readonly 'frequency.cronRule': "{rule}({timeZone})";
|
|
23
29
|
readonly 'cron.list.join': "、";
|
|
24
30
|
readonly 'cron.part.join': " ";
|
|
@@ -70,6 +76,12 @@ export declare const frequencyZh: {
|
|
|
70
76
|
export declare const frequencyEn: Record<keyof typeof frequencyZh, string>;
|
|
71
77
|
/** Japanese copy, checked against the English keys. */
|
|
72
78
|
export declare const frequencyJa: {
|
|
79
|
+
'frequency.hostMonthly': string;
|
|
80
|
+
'frequency.hostDailyInterval': string;
|
|
81
|
+
'frequency.hostWeeklyInterval': string;
|
|
82
|
+
'frequency.hostMonthlyInterval': string;
|
|
83
|
+
'frequency.hostZone': string;
|
|
84
|
+
'frequency.hostCustom': string;
|
|
73
85
|
'time.locale': string;
|
|
74
86
|
'time.utcPrefix': string;
|
|
75
87
|
'frequency.daily': string;
|
|
@@ -181,6 +193,12 @@ export declare const frequencyEs: {
|
|
|
181
193
|
'relative.now': string;
|
|
182
194
|
'relative.future': string;
|
|
183
195
|
'relative.overdue': string;
|
|
196
|
+
'frequency.hostMonthly': string;
|
|
197
|
+
'frequency.hostDailyInterval': string;
|
|
198
|
+
'frequency.hostWeeklyInterval': string;
|
|
199
|
+
'frequency.hostMonthlyInterval': string;
|
|
200
|
+
'frequency.hostZone': string;
|
|
201
|
+
'frequency.hostCustom': string;
|
|
184
202
|
};
|
|
185
203
|
/** French dictionary, checked against the English keys. */
|
|
186
204
|
export declare const frequencyFr: {
|
|
@@ -238,6 +256,12 @@ export declare const frequencyFr: {
|
|
|
238
256
|
'relative.now': string;
|
|
239
257
|
'relative.future': string;
|
|
240
258
|
'relative.overdue': string;
|
|
259
|
+
'frequency.hostMonthly': string;
|
|
260
|
+
'frequency.hostDailyInterval': string;
|
|
261
|
+
'frequency.hostWeeklyInterval': string;
|
|
262
|
+
'frequency.hostMonthlyInterval': string;
|
|
263
|
+
'frequency.hostZone': string;
|
|
264
|
+
'frequency.hostCustom': string;
|
|
241
265
|
};
|
|
242
266
|
/** German dictionary, checked against the English keys. */
|
|
243
267
|
export declare const frequencyDe: {
|
|
@@ -295,6 +319,12 @@ export declare const frequencyDe: {
|
|
|
295
319
|
'relative.now': string;
|
|
296
320
|
'relative.future': string;
|
|
297
321
|
'relative.overdue': string;
|
|
322
|
+
'frequency.hostMonthly': string;
|
|
323
|
+
'frequency.hostDailyInterval': string;
|
|
324
|
+
'frequency.hostWeeklyInterval': string;
|
|
325
|
+
'frequency.hostMonthlyInterval': string;
|
|
326
|
+
'frequency.hostZone': string;
|
|
327
|
+
'frequency.hostCustom': string;
|
|
298
328
|
};
|
|
299
329
|
/** Russian dictionary, checked against the English keys. */
|
|
300
330
|
export declare const frequencyRu: {
|
|
@@ -352,6 +382,12 @@ export declare const frequencyRu: {
|
|
|
352
382
|
'relative.now': string;
|
|
353
383
|
'relative.future': string;
|
|
354
384
|
'relative.overdue': string;
|
|
385
|
+
'frequency.hostMonthly': string;
|
|
386
|
+
'frequency.hostDailyInterval': string;
|
|
387
|
+
'frequency.hostWeeklyInterval': string;
|
|
388
|
+
'frequency.hostMonthlyInterval': string;
|
|
389
|
+
'frequency.hostZone': string;
|
|
390
|
+
'frequency.hostCustom': string;
|
|
355
391
|
};
|
|
356
392
|
/** Portuguese dictionary, checked against the English keys. */
|
|
357
393
|
export declare const frequencyPt: {
|
|
@@ -409,5 +445,11 @@ export declare const frequencyPt: {
|
|
|
409
445
|
'relative.now': string;
|
|
410
446
|
'relative.future': string;
|
|
411
447
|
'relative.overdue': string;
|
|
448
|
+
'frequency.hostMonthly': string;
|
|
449
|
+
'frequency.hostDailyInterval': string;
|
|
450
|
+
'frequency.hostWeeklyInterval': string;
|
|
451
|
+
'frequency.hostMonthlyInterval': string;
|
|
452
|
+
'frequency.hostZone': string;
|
|
453
|
+
'frequency.hostCustom': string;
|
|
412
454
|
};
|
|
413
455
|
//# sourceMappingURL=frequency-locales.d.ts.map
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
* `sidebar.session.row.leading` seat marks an idle row whose Session has an
|
|
25
25
|
* active task, and its `sidebar.session.row.hover` seat lists those tasks
|
|
26
26
|
* inside the row's hover card. Both project the same source, so N visible rows
|
|
27
|
-
* issue one query rather than one per row. The header entry
|
|
28
|
-
*
|
|
27
|
+
* issue one query rather than one per row. The header entry projects the same
|
|
28
|
+
* source onto the open Session's active tasks.
|
|
29
29
|
*/
|
|
30
30
|
import type { Context as ClientContext } from '@deepseek-ai/cordis';
|
|
31
31
|
import { type ScheduleCatalogKey } from './locales.ts';
|
|
@@ -38,7 +38,7 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
|
38
38
|
'schedule.manager': TaskManagerKey;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
/** Required services for catalogs, ambient Session marks, the right Sidebar, Remote queries,
|
|
41
|
+
/** Required services for catalogs, ambient Session marks, the right Sidebar, Remote queries, linked-Session navigation, and access. */
|
|
42
42
|
export declare const inject: string[];
|
|
43
43
|
/**
|
|
44
44
|
* Register the Host task page, the Session-header reminder catalog, the
|
|
@@ -4,14 +4,20 @@ export declare const NS = "schedule.catalog";
|
|
|
4
4
|
export declare const zh: {
|
|
5
5
|
readonly 'mark.aria': "{count} 个自动化任务";
|
|
6
6
|
readonly 'hover.more': "另有 {count} 个任务";
|
|
7
|
+
readonly 'frequency.hostMonthly': "每月 {days} 日 {time},不足该日则月末";
|
|
8
|
+
readonly 'frequency.hostDailyInterval': "每 {interval} 天 {time}";
|
|
9
|
+
readonly 'frequency.hostWeeklyInterval': "每 {interval} 周的周{weekdays} {time}";
|
|
10
|
+
readonly 'frequency.hostMonthlyInterval': "每 {interval} 个月的 {days} 日 {time},不足该日则月末";
|
|
11
|
+
readonly 'frequency.hostZone': "{rule}({timeZone})";
|
|
12
|
+
readonly 'frequency.hostCustom': "自定义";
|
|
7
13
|
readonly 'time.locale': "zh-CN";
|
|
8
14
|
readonly 'time.utcPrefix': "UTC";
|
|
9
15
|
readonly 'frequency.daily': "每天 {time}({timeZone})";
|
|
10
16
|
readonly 'frequency.dailyLocal': "每天 {time}";
|
|
11
17
|
readonly 'frequency.weekly': "每周{weekdays} {time}({timeZone})";
|
|
12
18
|
readonly 'frequency.weeklyLocal': "每周{weekdays} {time}";
|
|
13
|
-
readonly 'frequency.cron': "
|
|
14
|
-
readonly 'frequency.cronLocal': "
|
|
19
|
+
readonly 'frequency.cron': "自定义({timeZone})";
|
|
20
|
+
readonly 'frequency.cronLocal': "自定义";
|
|
15
21
|
readonly 'frequency.cronRule': "{rule}({timeZone})";
|
|
16
22
|
readonly 'cron.list.join': "、";
|
|
17
23
|
readonly 'cron.part.join': " ";
|
|
@@ -58,17 +64,17 @@ export declare const zh: {
|
|
|
58
64
|
readonly 'relative.now': "现在到期";
|
|
59
65
|
readonly 'relative.future': "{value}{unit}后";
|
|
60
66
|
readonly 'relative.overdue': "已逾期 {value}{unit}";
|
|
61
|
-
readonly 'trigger.label': "
|
|
62
|
-
readonly 'list.loading': "
|
|
63
|
-
readonly 'list.error': "
|
|
67
|
+
readonly 'trigger.label': "自动化任务";
|
|
68
|
+
readonly 'list.loading': "正在加载自动化任务…";
|
|
69
|
+
readonly 'list.error': "无法加载自动化任务。";
|
|
64
70
|
readonly 'list.retry': "重试";
|
|
65
71
|
readonly 'delete.action': "删除";
|
|
66
72
|
readonly 'delete.pending': "正在删除…";
|
|
67
|
-
readonly 'delete.label': "
|
|
68
|
-
readonly 'list.open': "
|
|
69
|
-
readonly 'trigger.one': "{count}
|
|
70
|
-
readonly 'trigger.other': "{count}
|
|
71
|
-
readonly 'list.aria': "
|
|
73
|
+
readonly 'delete.label': "删除自动化任务:{title}";
|
|
74
|
+
readonly 'list.open': "打开自动化任务详情:{title}";
|
|
75
|
+
readonly 'trigger.one': "{count} 个自动化任务";
|
|
76
|
+
readonly 'trigger.other': "{count} 个自动化任务";
|
|
77
|
+
readonly 'list.aria': "已开启的自动化任务";
|
|
72
78
|
readonly 'list.nextRun': "下次运行";
|
|
73
79
|
readonly 'frequency.once': "单次";
|
|
74
80
|
readonly 'frequency.every': "{value}{unit}一次";
|
|
@@ -95,6 +101,12 @@ export declare const ja: {
|
|
|
95
101
|
'frequency.every': string;
|
|
96
102
|
'mark.aria': string;
|
|
97
103
|
'hover.more': string;
|
|
104
|
+
'frequency.hostMonthly': string;
|
|
105
|
+
'frequency.hostDailyInterval': string;
|
|
106
|
+
'frequency.hostWeeklyInterval': string;
|
|
107
|
+
'frequency.hostMonthlyInterval': string;
|
|
108
|
+
'frequency.hostZone': string;
|
|
109
|
+
'frequency.hostCustom': string;
|
|
98
110
|
'time.locale': string;
|
|
99
111
|
'time.utcPrefix': string;
|
|
100
112
|
'frequency.daily': string;
|
|
@@ -208,6 +220,12 @@ export declare const es: {
|
|
|
208
220
|
'relative.now': string;
|
|
209
221
|
'relative.future': string;
|
|
210
222
|
'relative.overdue': string;
|
|
223
|
+
'frequency.hostMonthly': string;
|
|
224
|
+
'frequency.hostDailyInterval': string;
|
|
225
|
+
'frequency.hostWeeklyInterval': string;
|
|
226
|
+
'frequency.hostMonthlyInterval': string;
|
|
227
|
+
'frequency.hostZone': string;
|
|
228
|
+
'frequency.hostCustom': string;
|
|
211
229
|
'trigger.label': string;
|
|
212
230
|
'list.loading': string;
|
|
213
231
|
'list.error': string;
|
|
@@ -281,6 +299,12 @@ export declare const fr: {
|
|
|
281
299
|
'relative.now': string;
|
|
282
300
|
'relative.future': string;
|
|
283
301
|
'relative.overdue': string;
|
|
302
|
+
'frequency.hostMonthly': string;
|
|
303
|
+
'frequency.hostDailyInterval': string;
|
|
304
|
+
'frequency.hostWeeklyInterval': string;
|
|
305
|
+
'frequency.hostMonthlyInterval': string;
|
|
306
|
+
'frequency.hostZone': string;
|
|
307
|
+
'frequency.hostCustom': string;
|
|
284
308
|
'trigger.label': string;
|
|
285
309
|
'list.loading': string;
|
|
286
310
|
'list.error': string;
|
|
@@ -354,6 +378,12 @@ export declare const de: {
|
|
|
354
378
|
'relative.now': string;
|
|
355
379
|
'relative.future': string;
|
|
356
380
|
'relative.overdue': string;
|
|
381
|
+
'frequency.hostMonthly': string;
|
|
382
|
+
'frequency.hostDailyInterval': string;
|
|
383
|
+
'frequency.hostWeeklyInterval': string;
|
|
384
|
+
'frequency.hostMonthlyInterval': string;
|
|
385
|
+
'frequency.hostZone': string;
|
|
386
|
+
'frequency.hostCustom': string;
|
|
357
387
|
'trigger.label': string;
|
|
358
388
|
'list.loading': string;
|
|
359
389
|
'list.error': string;
|
|
@@ -427,6 +457,12 @@ export declare const ru: {
|
|
|
427
457
|
'relative.now': string;
|
|
428
458
|
'relative.future': string;
|
|
429
459
|
'relative.overdue': string;
|
|
460
|
+
'frequency.hostMonthly': string;
|
|
461
|
+
'frequency.hostDailyInterval': string;
|
|
462
|
+
'frequency.hostWeeklyInterval': string;
|
|
463
|
+
'frequency.hostMonthlyInterval': string;
|
|
464
|
+
'frequency.hostZone': string;
|
|
465
|
+
'frequency.hostCustom': string;
|
|
430
466
|
'trigger.label': string;
|
|
431
467
|
'list.loading': string;
|
|
432
468
|
'list.error': string;
|
|
@@ -500,6 +536,12 @@ export declare const pt: {
|
|
|
500
536
|
'relative.now': string;
|
|
501
537
|
'relative.future': string;
|
|
502
538
|
'relative.overdue': string;
|
|
539
|
+
'frequency.hostMonthly': string;
|
|
540
|
+
'frequency.hostDailyInterval': string;
|
|
541
|
+
'frequency.hostWeeklyInterval': string;
|
|
542
|
+
'frequency.hostMonthlyInterval': string;
|
|
543
|
+
'frequency.hostZone': string;
|
|
544
|
+
'frequency.hostCustom': string;
|
|
503
545
|
'trigger.label': string;
|
|
504
546
|
'list.loading': string;
|
|
505
547
|
'list.error': string;
|
|
@@ -19,8 +19,14 @@ export declare const RELATIVE_CLOCK_PERIOD_MS = 30000;
|
|
|
19
19
|
* `Date.now()` and then a one-second interval while its popover is open, and the
|
|
20
20
|
* Sidebar Session-row hover card samples `Date.now()` once per mount, because
|
|
21
21
|
* that preview must not drift while the pointer rests on it.
|
|
22
|
+
*
|
|
23
|
+
* A state that ends between two periods, such as the delivery floor that holds
|
|
24
|
+
* Run now, passes its end as `wakeAt` so the clock samples it then instead of
|
|
25
|
+
* up to one period late.
|
|
22
26
|
* @param periodMs - refresh period; defaults to {@link RELATIVE_CLOCK_PERIOD_MS}.
|
|
23
|
-
* @
|
|
27
|
+
* @param wakeAt - epoch milliseconds of one extra sample; an instant already past samples at once.
|
|
28
|
+
* An instant beyond the timer limit, about 24.8 days ahead, is left to the period.
|
|
29
|
+
* @returns epoch milliseconds, updated once per period and at `wakeAt`.
|
|
24
30
|
*/
|
|
25
|
-
export declare function useRelativeClock(periodMs?: number): number;
|
|
31
|
+
export declare function useRelativeClock(periodMs?: number, wakeAt?: number): number;
|
|
26
32
|
//# sourceMappingURL=relative-clock.d.ts.map
|
|
@@ -6,7 +6,7 @@ type TimeUnit = 'day' | 'hour' | 'minute' | 'second';
|
|
|
6
6
|
type UnitKey = `unit.${TimeUnit}.${'one' | 'other'}`;
|
|
7
7
|
type WeekdayKey = `frequency.weekday.${1 | 2 | 3 | 4 | 5 | 6 | 7}`;
|
|
8
8
|
/** Dictionary keys required to display exact reminder frequencies. */
|
|
9
|
-
export type FrequencyKey = 'time.locale' | 'time.utcPrefix' | 'frequency.once' | 'frequency.every' | 'frequency.daily' | 'frequency.dailyLocal' | 'frequency.weekly' | 'frequency.weeklyLocal' | 'frequency.cron' | 'frequency.cronLocal' | 'frequency.cronRule' | 'frequency.weekday.join' | WeekdayKey | UnitKey | CronDescriptionKey;
|
|
9
|
+
export type FrequencyKey = 'frequency.hostMonthly' | 'frequency.hostDailyInterval' | 'frequency.hostWeeklyInterval' | 'frequency.hostMonthlyInterval' | 'frequency.hostZone' | 'frequency.hostCustom' | 'time.locale' | 'time.utcPrefix' | 'frequency.once' | 'frequency.every' | 'frequency.daily' | 'frequency.dailyLocal' | 'frequency.weekly' | 'frequency.weeklyLocal' | 'frequency.cron' | 'frequency.cronLocal' | 'frequency.cronRule' | 'frequency.weekday.join' | WeekdayKey | UnitKey | CronDescriptionKey;
|
|
10
10
|
/** Namespace-independent translator for reminder frequencies and time units. */
|
|
11
11
|
export type FrequencyTranslator = Translate<FrequencyKey>;
|
|
12
12
|
/** Dictionary keys required to localize a zone and mark the host's zone. */
|
|
@@ -90,9 +90,8 @@ export declare function recordTimeZone(record: ScheduleRecord): string | undefin
|
|
|
90
90
|
* Format exact intervals or wall-clock rules without changing their precision or zone.
|
|
91
91
|
*
|
|
92
92
|
* A cron rule reads as the sentence `cronPreview` derives from its expression,
|
|
93
|
-
* for example `Every day at 09:00, 15:00`.
|
|
94
|
-
*
|
|
95
|
-
* when the Host's dialect and this parser diverge.
|
|
93
|
+
* for example `Every day at 09:00, 15:00`. Other rules read as Custom;
|
|
94
|
+
* their authoritative expression remains available in the editor.
|
|
96
95
|
* @param record - reminder whose kind and stored rule determine its frequency.
|
|
97
96
|
* @param t - frequency, weekday, and unit translations, independent of the catalog namespace.
|
|
98
97
|
* @param zone - host-zone context; when present, a stored zone equal to `zone.system` is omitted
|
|
@@ -141,6 +140,18 @@ export declare function formatScheduleNextRun(scheduledAt: string, locale: strin
|
|
|
141
140
|
* @returns the localized absolute next run in the device zone, or the raw instant when it cannot be parsed.
|
|
142
141
|
*/
|
|
143
142
|
export declare function formatScheduleAbsolute(scheduledAt: string, locale: string): string;
|
|
143
|
+
/**
|
|
144
|
+
* Format the instant a held action becomes available, in this device's zone.
|
|
145
|
+
*
|
|
146
|
+
* A delivery floor lasts from one minute to one week, so the clock reads to the
|
|
147
|
+
* second and the month and day appear only for another day: `15:51:37` today,
|
|
148
|
+
* and `Oct 20, 15:51:37` in English or `10月20日 15:51:37` in Chinese otherwise.
|
|
149
|
+
* @param at - epoch milliseconds when the action becomes available.
|
|
150
|
+
* @param locale - BCP-47 locale owning the month name, field order, and clock.
|
|
151
|
+
* @param now - current epoch milliseconds.
|
|
152
|
+
* @returns the localized clock time, with the month and day when `at` falls on another day.
|
|
153
|
+
*/
|
|
154
|
+
export declare function formatAvailableAt(at: number, locale: string, now: number): string;
|
|
144
155
|
/**
|
|
145
156
|
* One next-run line as its two texts: the device-zone stamp and the distance.
|
|
146
157
|
*
|
|
@@ -172,6 +183,6 @@ export declare function formatScheduleRelative(scheduledAt: string, now: number,
|
|
|
172
183
|
* @param now - current epoch milliseconds used to identify overdue targets.
|
|
173
184
|
* @returns sorted copy preserving input order for equal targets.
|
|
174
185
|
*/
|
|
175
|
-
export declare function orderScheduleRecords(records: readonly
|
|
186
|
+
export declare function orderScheduleRecords<T extends ScheduleRecord>(records: readonly T[], now: number): T[];
|
|
176
187
|
export {};
|
|
177
188
|
//# sourceMappingURL=schedule-format.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Original-Session link
|
|
1
|
+
/** Original-Session link availability from the current public Session and Workspace feeds. */
|
|
2
2
|
import type { SessionListState } from '@deepseek-ai/dsh-api-session-controller/client';
|
|
3
3
|
import type { WorkspaceSnapshot } from '@deepseek-ai/dsh-api-workspace-controller/client';
|
|
4
4
|
import type { SessionId } from '@deepseek-ai/dsh-session/types';
|
|
@@ -17,25 +17,4 @@ export type SessionLinkState = 'available' | 'loading' | 'archived' | 'unavailab
|
|
|
17
17
|
* @returns availability or the reason navigation is disabled.
|
|
18
18
|
*/
|
|
19
19
|
export declare function sessionLinkState(id: SessionId, sessions: SessionListState, workspaces: WorkspaceSnapshot): SessionLinkState;
|
|
20
|
-
/** Label one linked Session shows, and whether a Session title produced it. */
|
|
21
|
-
export interface SessionLabel {
|
|
22
|
-
/** Session title from the current catalog, otherwise the Session id. */
|
|
23
|
-
readonly text: string;
|
|
24
|
-
/** Whether a catalog title produced {@link SessionLabel.text}; false when the id is shown instead. */
|
|
25
|
-
readonly titled: boolean;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Resolve the label of one linked Session from the Session catalog the calling
|
|
29
|
-
* component already projects.
|
|
30
|
-
*
|
|
31
|
-
* A catalog title renders as-is; the Session id renders while the catalog holds
|
|
32
|
-
* no row for the Session (missing or not yet loaded) or its row carries a blank
|
|
33
|
-
* title, so the label is never empty. Every surface that names a linked Session
|
|
34
|
-
* resolves the label here, so the Automation tasks rows, the task detail, and the
|
|
35
|
-
* task tab all name the same Session the same way.
|
|
36
|
-
* @param id - Original Session bound to the task.
|
|
37
|
-
* @param sessions - Current Session list projection.
|
|
38
|
-
* @returns the resolved label and whether a catalog title produced it.
|
|
39
|
-
*/
|
|
40
|
-
export declare function sessionLabel(id: SessionId, sessions: SessionListState): SessionLabel;
|
|
41
20
|
//# sourceMappingURL=session-link.d.ts.map
|
|
@@ -1,31 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* One Session's scheduled-task state for
|
|
3
|
-
* row mark and the row hover-card task section.
|
|
2
|
+
* One Session's scheduled-task state for its header, Sidebar row mark, and hover card.
|
|
4
3
|
*
|
|
5
|
-
*
|
|
6
|
-
* returns
|
|
4
|
+
* These views project the Host catalog the page already owns — `schedule/catalog()`
|
|
5
|
+
* returns every Host task with its target and involved Sessions — so N
|
|
7
6
|
* visible rows share one Remote read and follow one `schedule/changed`
|
|
8
|
-
* invalidation instead of issuing a query per row
|
|
9
|
-
* keeps its own per-Session `schedule/list` source because it also lists the
|
|
10
|
-
* open Session's tasks.
|
|
7
|
+
* invalidation instead of issuing a query per row or header.
|
|
11
8
|
*/
|
|
12
|
-
import type { Context as ClientContext } from '@deepseek-ai/cordis';
|
|
13
9
|
import type { HostObservable, SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots';
|
|
14
|
-
import type { ScheduleCatalogEntry } from '@deepseek-ai/dsh-schedule/client';
|
|
15
10
|
import type { SessionId } from '@deepseek-ai/dsh-session/types';
|
|
16
|
-
import
|
|
17
|
-
|
|
18
|
-
export type SessionScheduleSourceFactory = (sessionId: SessionId) => CatalogInjected;
|
|
19
|
-
/**
|
|
20
|
-
* Create the durable reminder source for one Session.
|
|
21
|
-
*
|
|
22
|
-
* The stored read is `schedule/list`, which admits only tasks whose durable
|
|
23
|
-
* status is active; loading and error reads carry no authoritative answer.
|
|
24
|
-
* @param ctx - client context carrying the Remote schedule face.
|
|
25
|
-
* @param sessionId - Session whose tasks are read; reading never activates it.
|
|
26
|
-
* @returns observable catalog plus its mutation callbacks.
|
|
27
|
-
*/
|
|
28
|
-
export declare function createSessionScheduleSource(ctx: ClientContext, sessionId: SessionId): CatalogInjected;
|
|
11
|
+
import type { ScheduleCatalogEntry } from '@deepseek-ai/dsh-schedule/client';
|
|
12
|
+
import type { CatalogSnapshot } from './catalog-source.ts';
|
|
29
13
|
/** Selector hook the renderer binds from a slot's `hooks.catalog` observable. */
|
|
30
14
|
export type SessionScheduleCatalogHook = SnapshotSelectorHook<CatalogSnapshot<ScheduleCatalogEntry>>;
|
|
31
15
|
/** Shared Host catalog observable an ambient surface injects through its slot. */
|
|
@@ -40,13 +24,13 @@ export interface SessionScheduleFacts {
|
|
|
40
24
|
/**
|
|
41
25
|
* Project the shared Host catalog onto one Session's active tasks.
|
|
42
26
|
*
|
|
43
|
-
* `schedule/catalog()` returns
|
|
44
|
-
* both facts come from this one snapshot filtered
|
|
45
|
-
* `status === 'active'`. A read that never settled
|
|
46
|
-
* refresh republishes `loading` over the records of
|
|
47
|
-
* the Host emits `schedule/changed` after every
|
|
48
|
-
* here would blank a Session's mark for each
|
|
49
|
-
* lists nothing.
|
|
27
|
+
* `schedule/catalog()` returns every Host task in every lifecycle state, so
|
|
28
|
+
* both facts come from this one snapshot filtered to the tasks that target or
|
|
29
|
+
* involve the Session with `status === 'active'`. A read that never settled
|
|
30
|
+
* answers no active task; a refresh republishes `loading` over the records of
|
|
31
|
+
* the last successful read, and the Host emits `schedule/changed` after every
|
|
32
|
+
* delivery, so following `status` here would blank a Session's mark for each
|
|
33
|
+
* roundtrip. A Session whose tasks are all paused or ended lists nothing.
|
|
50
34
|
* @param snapshot - shared Host catalog snapshot.
|
|
51
35
|
* @param sessionId - Session whose facts are selected.
|
|
52
36
|
* @returns this Session's active-task facts.
|
|
@@ -47,70 +47,5 @@ export declare function parseCronExpression(expression: string): ParsedCron | un
|
|
|
47
47
|
* @returns localized sentence, for example `Mon–Fri at 09:00` or `Every 15 minutes`.
|
|
48
48
|
*/
|
|
49
49
|
export declare function cronPreview(parsed: ParsedCron, t: CronDescriptionTranslator, locale: string): string;
|
|
50
|
-
/** One structured cron shape the Run time card's builder edits as rows. */
|
|
51
|
-
export type CronBuilderState = {
|
|
52
|
-
/** Runs every `step` minutes of every hour and day. */
|
|
53
|
-
readonly kind: 'minutely';
|
|
54
|
-
/** Whole minutes between runs, 1 through 59. */
|
|
55
|
-
readonly step: number;
|
|
56
|
-
} | {
|
|
57
|
-
/** Runs at one minute of every `step` hours, every day. */
|
|
58
|
-
readonly kind: 'hourly';
|
|
59
|
-
/** Whole hours between runs, 1 through 23. */
|
|
60
|
-
readonly step: number;
|
|
61
|
-
/** Minute of each matched hour, 0 through 59. */
|
|
62
|
-
readonly minute: number;
|
|
63
|
-
} | {
|
|
64
|
-
/** Runs once a day at one wall-clock time. */
|
|
65
|
-
readonly kind: 'daily';
|
|
66
|
-
/** Hour of that time, 0 through 23. */
|
|
67
|
-
readonly hour: number;
|
|
68
|
-
/** Minute of that hour, 0 through 59. */
|
|
69
|
-
readonly minute: number;
|
|
70
|
-
} | {
|
|
71
|
-
/** Runs on chosen weekdays at one wall-clock time. */
|
|
72
|
-
readonly kind: 'weekly';
|
|
73
|
-
/** ISO weekdays, Monday 1 through Sunday 7; never empty. */
|
|
74
|
-
readonly weekdays: readonly number[];
|
|
75
|
-
/** Hour of that time, 0 through 23. */
|
|
76
|
-
readonly hour: number;
|
|
77
|
-
/** Minute of that hour, 0 through 59. */
|
|
78
|
-
readonly minute: number;
|
|
79
|
-
} | {
|
|
80
|
-
/** Runs on chosen days of every month at one wall-clock time. */
|
|
81
|
-
readonly kind: 'monthly';
|
|
82
|
-
/** Days of the month, 1 through 31, ascending; never empty. */
|
|
83
|
-
readonly days: readonly number[];
|
|
84
|
-
/** Hour of that time, 0 through 23. */
|
|
85
|
-
readonly hour: number;
|
|
86
|
-
/** Minute of that hour, 0 through 59. */
|
|
87
|
-
readonly minute: number;
|
|
88
|
-
};
|
|
89
|
-
/**
|
|
90
|
-
* Recognize the structured shape one parsed expression states, when one does.
|
|
91
|
-
*
|
|
92
|
-
* Every shape requires an unrestricted month. Exactly one of the two day fields
|
|
93
|
-
* may restrict: a restricted weekday beside a star day-of-month is a weekly
|
|
94
|
-
* rule, a restricted day-of-month beside a star weekday is a monthly rule, and
|
|
95
|
-
* both restricting is unrecognized because each restriction matches
|
|
96
|
-
* independently under the Host's Vixie union rule. Only a literal star states a
|
|
97
|
-
* day field with no restriction: a written-out full set such as `0-6` or `1-31`
|
|
98
|
-
* stays a weekly or monthly rule with every value selected, so toggling the
|
|
99
|
-
* last pill on never collapses its row. Stepped shapes accept any uniform
|
|
100
|
-
* full-range step on the clock, spelled with a star or written out, since both
|
|
101
|
-
* match the same minutes or hours.
|
|
102
|
-
* @param parsed - parsed cron expression.
|
|
103
|
-
* @returns the shape the builder can edit, or undefined for the raw-expression fallback.
|
|
104
|
-
*/
|
|
105
|
-
export declare function recognizeCronShape(parsed: ParsedCron): CronBuilderState | undefined;
|
|
106
|
-
/**
|
|
107
|
-
* Spell one builder shape as the five-field expression a save submits.
|
|
108
|
-
*
|
|
109
|
-
* `recognizeCronShape` recognizes every expression this returns as the same
|
|
110
|
-
* shape, so a builder edit never falls back to the raw-expression row.
|
|
111
|
-
* @param state - builder shape to spell.
|
|
112
|
-
* @returns the expression stating that shape.
|
|
113
|
-
*/
|
|
114
|
-
export declare function cronShapeExpression(state: CronBuilderState): string;
|
|
115
50
|
export {};
|
|
116
51
|
//# sourceMappingURL=task-cron.d.ts.map
|