@qihongmu/dsh-client-ui-scheduled-task 0.1.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.
@@ -0,0 +1,290 @@
1
+ /** Scheduled-tasks panel UI dictionaries. */
2
+ export const NS = 'scheduled-tasks';
3
+ /** Every translation key owned by the scheduled-tasks UI namespace. */
4
+ const KEY_SET = {
5
+ 'trigger.label': true,
6
+ 'trigger.aria': true,
7
+ 'panel.title': true,
8
+ 'panel.subtitle': true,
9
+ 'panel.empty': true,
10
+ 'panel.loading': true,
11
+ 'panel.readFailed': true,
12
+ 'search.placeholder': true,
13
+ 'filter.all': true,
14
+ 'filter.active': true,
15
+ 'filter.paused': true,
16
+ 'drawer.close': true,
17
+ 'row.schedule.every': true,
18
+ 'row.schedule.after': true,
19
+ 'row.schedule.at': true,
20
+ 'row.schedule.hourly': true,
21
+ 'row.schedule.daily': true,
22
+ 'row.schedule.weekly': true,
23
+ 'row.schedule.monthly': true,
24
+ 'row.next': true,
25
+ 'row.status.active': true,
26
+ 'row.status.paused': true,
27
+ 'row.status.completed': true,
28
+ 'row.state.overdue': true,
29
+ 'row.lastError': true,
30
+ 'action.create': true,
31
+ 'action.pause': true,
32
+ 'action.resume': true,
33
+ 'action.edit': true,
34
+ 'action.delete': true,
35
+ 'action.markRead': true,
36
+ 'create.title': true,
37
+ 'create.editTitle': true,
38
+ 'create.subtitle': true,
39
+ 'create.submit': true,
40
+ 'create.save': true,
41
+ 'form.title.label': true,
42
+ 'form.title.placeholder': true,
43
+ 'form.prompt.label': true,
44
+ 'form.prompt.placeholder': true,
45
+ 'form.prompt.required': true,
46
+ 'form.schedule.label': true,
47
+ 'form.schedule.required': true,
48
+ 'form.schedule.invalid': true,
49
+ 'form.schedule.add': true,
50
+ 'schedule.hourly': true,
51
+ 'schedule.daily': true,
52
+ 'schedule.weekly': true,
53
+ 'schedule.monthly': true,
54
+ 'schedule.custom': true,
55
+ 'schedule.hourlyAtMinute': true,
56
+ 'schedule.minuteUnit': true,
57
+ 'schedule.at': true,
58
+ 'schedule.dayUnit': true,
59
+ 'schedule.clear': true,
60
+ 'schedule.pickWeekdays': true,
61
+ 'schedule.wd.1': true,
62
+ 'schedule.wd.2': true,
63
+ 'schedule.wd.3': true,
64
+ 'schedule.wd.4': true,
65
+ 'schedule.wd.5': true,
66
+ 'schedule.wd.6': true,
67
+ 'schedule.wd.7': true,
68
+ 'schedule.wd.separator': true,
69
+ 'schedule.preview.hourly': true,
70
+ 'schedule.preview.daily': true,
71
+ 'schedule.preview.weekly': true,
72
+ 'schedule.preview.monthly': true,
73
+ 'form.kind.once': true,
74
+ 'form.kind.delay': true,
75
+ 'form.kind.interval': true,
76
+ 'form.date': true,
77
+ 'form.time': true,
78
+ 'form.timeZone': true,
79
+ 'form.afterSeconds': true,
80
+ 'form.everySeconds': true,
81
+ 'form.project.label': true,
82
+ 'form.project.none': true,
83
+ 'form.project.loading': true,
84
+ 'form.project.failed': true,
85
+ 'form.model.label': true,
86
+ 'form.model.default': true,
87
+ 'form.model.loading': true,
88
+ 'form.model.empty': true,
89
+ 'form.model.failed': true,
90
+ 'form.confirm.label': true,
91
+ 'form.confirm.hint': true,
92
+ 'form.cancel': true,
93
+ 'form.submitBusy': true,
94
+ 'duration.seconds': true,
95
+ 'duration.minutes': true,
96
+ 'duration.hours': true,
97
+ 'duration.days': true,
98
+ };
99
+ /** Simplified Chinese scheduled-tasks UI messages. */
100
+ export const zh = {
101
+ 'trigger.label': '定时任务',
102
+ 'trigger.aria': '定时任务',
103
+ 'panel.title': '已安排的任务',
104
+ 'panel.subtitle': '让助手安排任务、设置提醒或监测更新',
105
+ 'panel.empty': '还没有任何任务',
106
+ 'panel.loading': '读取中…',
107
+ 'panel.readFailed': '读取任务列表失败:{message}',
108
+ 'search.placeholder': '搜索已安排任务',
109
+ 'filter.all': '全部',
110
+ 'filter.active': '已开启',
111
+ 'filter.paused': '已暂停',
112
+ 'drawer.close': '关闭',
113
+ 'row.schedule.every': '每 {duration}',
114
+ 'row.schedule.after': '{duration} 后执行一次',
115
+ 'row.schedule.at': '定时:{time}',
116
+ 'row.schedule.hourly': '每小时的第 {minute} 分',
117
+ 'row.schedule.daily': '每天 {time}',
118
+ 'row.schedule.weekly': '每周{weekdays} {time}',
119
+ 'row.schedule.monthly': '每月 {day} 号 {time}',
120
+ 'row.next': '下次运行 {time}',
121
+ 'row.status.active': '进行中',
122
+ 'row.status.paused': '已暂停',
123
+ 'row.status.completed': '已完成',
124
+ 'row.state.overdue': '已逾期',
125
+ 'row.lastError': '上次触发失败',
126
+ 'action.create': '创建',
127
+ 'action.pause': '暂停',
128
+ 'action.resume': '恢复',
129
+ 'action.edit': '编辑',
130
+ 'action.delete': '删除',
131
+ 'action.markRead': '标记已读',
132
+ 'create.title': '新建定时任务',
133
+ 'create.editTitle': '编辑定时任务',
134
+ 'create.subtitle': '配置任务的执行时间、指令和运行方式。',
135
+ 'create.submit': '创建定时任务',
136
+ 'create.save': '保存修改',
137
+ 'form.title.label': '任务标题',
138
+ 'form.title.placeholder': '未命名定时任务',
139
+ 'form.prompt.label': '指令',
140
+ 'form.prompt.placeholder': '例如:Review 最近 24 小时的提交,总结可能引入的 bug 和修复建议',
141
+ 'form.prompt.required': '请填写任务指令',
142
+ 'form.schedule.label': '调度',
143
+ 'form.schedule.required': '请先选择调度频率',
144
+ 'form.schedule.invalid': '调度信息不完整,请补全后重试',
145
+ 'form.schedule.add': '+ 添加计划',
146
+ 'schedule.hourly': '每小时',
147
+ 'schedule.daily': '每天',
148
+ 'schedule.weekly': '每周',
149
+ 'schedule.monthly': '每月',
150
+ 'schedule.custom': '自定义',
151
+ 'schedule.hourlyAtMinute': '第',
152
+ 'schedule.minuteUnit': '分',
153
+ 'schedule.at': '于',
154
+ 'schedule.dayUnit': '号',
155
+ 'schedule.clear': '删除调度',
156
+ 'schedule.pickWeekdays': '选择星期',
157
+ 'schedule.wd.1': '一',
158
+ 'schedule.wd.2': '二',
159
+ 'schedule.wd.3': '三',
160
+ 'schedule.wd.4': '四',
161
+ 'schedule.wd.5': '五',
162
+ 'schedule.wd.6': '六',
163
+ 'schedule.wd.7': '日',
164
+ 'schedule.wd.separator': '、',
165
+ 'schedule.preview.hourly': '每小时的第 {minute} 分',
166
+ 'schedule.preview.daily': '每天 {time}',
167
+ 'schedule.preview.weekly': '每周{weekdays} {time}',
168
+ 'schedule.preview.monthly': '每月 {day} 号 {time}',
169
+ 'form.kind.once': '指定时间',
170
+ 'form.kind.delay': '延迟执行',
171
+ 'form.kind.interval': '周期执行',
172
+ 'form.date': '日期',
173
+ 'form.time': '时间',
174
+ 'form.timeZone': '时区',
175
+ 'form.afterSeconds': '延迟秒数',
176
+ 'form.everySeconds': '间隔秒数',
177
+ 'form.project.label': '项目',
178
+ 'form.project.none': '默认目录(不选择项目)',
179
+ 'form.project.loading': '读取项目…',
180
+ 'form.project.failed': '读取项目失败:{message}',
181
+ 'form.model.label': '模型',
182
+ 'form.model.default': '默认模型',
183
+ 'form.model.loading': '读取模型…',
184
+ 'form.model.empty': '没有打开的会话,无法列出模型;将使用默认模型。',
185
+ 'form.model.failed': '读取模型失败:{message}',
186
+ 'form.confirm.label': '变更前确认',
187
+ 'form.confirm.hint': '运行中执行写入等敏感操作前先征求确认',
188
+ 'form.cancel': '取消',
189
+ 'form.submitBusy': '提交中…',
190
+ 'duration.seconds': '{count} 秒',
191
+ 'duration.minutes': '{count} 分钟',
192
+ 'duration.hours': '{count} 小时',
193
+ 'duration.days': '{count} 天',
194
+ };
195
+ /** English scheduled-tasks UI messages. */
196
+ export const en = {
197
+ 'trigger.label': 'Scheduled Tasks',
198
+ 'trigger.aria': 'Scheduled tasks',
199
+ 'panel.title': 'Scheduled Tasks',
200
+ 'panel.subtitle': 'Let the assistant run tasks, set reminders, or monitor updates',
201
+ 'panel.empty': 'No tasks yet',
202
+ 'panel.loading': 'Reading…',
203
+ 'panel.readFailed': 'Reading the task list failed: {message}',
204
+ 'search.placeholder': 'Search scheduled tasks',
205
+ 'filter.all': 'All',
206
+ 'filter.active': 'Active',
207
+ 'filter.paused': 'Paused',
208
+ 'drawer.close': 'Close',
209
+ 'row.schedule.every': 'Every {duration}',
210
+ 'row.schedule.after': 'Once after {duration}',
211
+ 'row.schedule.at': 'At: {time}',
212
+ 'row.schedule.hourly': 'Hourly at minute {minute}',
213
+ 'row.schedule.daily': 'Daily at {time}',
214
+ 'row.schedule.weekly': 'Weekly {weekdays} {time}',
215
+ 'row.schedule.monthly': 'Monthly on day {day} at {time}',
216
+ 'row.next': 'Next run {time}',
217
+ 'row.status.active': 'Active',
218
+ 'row.status.paused': 'Paused',
219
+ 'row.status.completed': 'Completed',
220
+ 'row.state.overdue': 'Overdue',
221
+ 'row.lastError': 'Last run failed',
222
+ 'action.create': 'Create',
223
+ 'action.pause': 'Pause',
224
+ 'action.resume': 'Resume',
225
+ 'action.edit': 'Edit',
226
+ 'action.delete': 'Delete',
227
+ 'action.markRead': 'Mark as read',
228
+ 'create.title': 'New Scheduled Task',
229
+ 'create.editTitle': 'Edit Scheduled Task',
230
+ 'create.subtitle': 'Configure when the task runs, its instruction, and how it runs.',
231
+ 'create.submit': 'Create Task',
232
+ 'create.save': 'Save Changes',
233
+ 'form.title.label': 'Title',
234
+ 'form.title.placeholder': 'Untitled task',
235
+ 'form.prompt.label': 'Instruction',
236
+ 'form.prompt.placeholder': 'e.g. Review the last 24 hours of commits and summarize likely bugs and fixes',
237
+ 'form.prompt.required': 'The task instruction is required',
238
+ 'form.schedule.label': 'Schedule',
239
+ 'form.schedule.required': 'Pick a schedule frequency first',
240
+ 'form.schedule.invalid': 'Schedule details are incomplete',
241
+ 'form.schedule.add': '+ Add schedule',
242
+ 'schedule.hourly': 'Hourly',
243
+ 'schedule.daily': 'Daily',
244
+ 'schedule.weekly': 'Weekly',
245
+ 'schedule.monthly': 'Monthly',
246
+ 'schedule.custom': 'Custom',
247
+ 'schedule.hourlyAtMinute': 'Minute',
248
+ 'schedule.minuteUnit': '',
249
+ 'schedule.at': 'at',
250
+ 'schedule.dayUnit': '',
251
+ 'schedule.clear': 'Clear schedule',
252
+ 'schedule.pickWeekdays': 'Pick weekdays',
253
+ 'schedule.wd.1': 'Mon',
254
+ 'schedule.wd.2': 'Tue',
255
+ 'schedule.wd.3': 'Wed',
256
+ 'schedule.wd.4': 'Thu',
257
+ 'schedule.wd.5': 'Fri',
258
+ 'schedule.wd.6': 'Sat',
259
+ 'schedule.wd.7': 'Sun',
260
+ 'schedule.wd.separator': ', ',
261
+ 'schedule.preview.hourly': 'Hourly at minute {minute}',
262
+ 'schedule.preview.daily': 'Daily at {time}',
263
+ 'schedule.preview.weekly': 'Weekly {weekdays} {time}',
264
+ 'schedule.preview.monthly': 'Monthly on day {day} at {time}',
265
+ 'form.kind.once': 'At a time',
266
+ 'form.kind.delay': 'After a delay',
267
+ 'form.kind.interval': 'Every interval',
268
+ 'form.date': 'Date',
269
+ 'form.time': 'Time',
270
+ 'form.timeZone': 'Time zone',
271
+ 'form.afterSeconds': 'Delay seconds',
272
+ 'form.everySeconds': 'Interval seconds',
273
+ 'form.project.label': 'Project',
274
+ 'form.project.none': 'Default directory (no project)',
275
+ 'form.project.loading': 'Loading projects…',
276
+ 'form.project.failed': 'Loading projects failed: {message}',
277
+ 'form.model.label': 'Model',
278
+ 'form.model.default': 'Default model',
279
+ 'form.model.loading': 'Loading models…',
280
+ 'form.model.empty': 'No open conversation to list models; the default model will be used.',
281
+ 'form.model.failed': 'Loading models failed: {message}',
282
+ 'form.confirm.label': 'Confirm before changes',
283
+ 'form.confirm.hint': 'Ask for confirmation before sensitive actions like writes while running',
284
+ 'form.cancel': 'Cancel',
285
+ 'form.submitBusy': 'Submitting…',
286
+ 'duration.seconds': '{count}s',
287
+ 'duration.minutes': '{count}m',
288
+ 'duration.hours': '{count}h',
289
+ 'duration.days': '{count}d',
290
+ };
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Injected face + Remote typing for the external scheduled-tasks sidebar panel.
3
+ */
4
+ import type { TypertRemoteNamespaceMap } from '@deepseek-ai/dsh-typert-protocol';
5
+ /** The typed `scheduledTasks` Remote namespace the panel drives. */
6
+ export type ScheduledTasksRemote = TypertRemoteNamespaceMap['scheduledTasks'];
7
+ /** One selectable project (DSH workspace) row for the create-form project selector. */
8
+ export interface ScheduledTaskProjectOption {
9
+ /** Stable workspace identity sent back as `workspace_id` on create/update. */
10
+ readonly workspaceId: string;
11
+ /** Display title (defaults to the directory basename). */
12
+ readonly title: string;
13
+ /** Canonical project directory used as the run session `cwd`. */
14
+ readonly path: string;
15
+ }
16
+ /** One selectable provider/model row for the create-form model selector. */
17
+ export interface ScheduledTaskModelOption {
18
+ /** Registered provider route id (e.g. `openrouter`). */
19
+ readonly providerId: string;
20
+ /** Provider display name. */
21
+ readonly providerName: string;
22
+ /** Provider-owned model id sent back as `model.model`. */
23
+ readonly modelId: string;
24
+ /** Model display name. */
25
+ readonly modelName: string;
26
+ }
27
+ /**
28
+ * Registrant-private injected share (arrives via the register inject factory):
29
+ * the live Remote namespace plus the two option loaders backing the create
30
+ * form's project and model selectors. Loaders throw on wire failure; the form
31
+ * surfaces the message inline and keeps the field optional.
32
+ */
33
+ export interface ScheduledTasksPanelFace {
34
+ readonly remote: ScheduledTasksRemote;
35
+ /** List registered workspaces (projects) in registry display order. */
36
+ readonly listProjects: () => Promise<readonly ScheduledTaskProjectOption[]>;
37
+ /**
38
+ * Flatten the current conversation session's advisory model catalog into
39
+ * selectable rows. Empty when no conversation session is open (the task then
40
+ * runs with the deployment default model).
41
+ */
42
+ readonly listModels: () => Promise<readonly ScheduledTaskModelOption[]>;
43
+ }
44
+ //# sourceMappingURL=slots.d.ts.map
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Injected face + Remote typing for the external scheduled-tasks sidebar panel.
3
+ */
4
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * External scheduled-tasks browser panel (node half): registers the
3
+ * `sidebar.footer.action` entry and self-mounts the scheduledTasks Remote.
4
+ * @module @qihongmu/dsh-client-ui-scheduled-task
5
+ */
6
+ /** Host loader entry for the browser-only scheduled-tasks panel plugin. */
7
+ /** Provides no host-side behavior. */
8
+ export declare function apply(): void;
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,8 @@
1
+ /**
2
+ * External scheduled-tasks browser panel (node half): registers the
3
+ * `sidebar.footer.action` entry and self-mounts the scheduledTasks Remote.
4
+ * @module @qihongmu/dsh-client-ui-scheduled-task
5
+ */
6
+ /** Host loader entry for the browser-only scheduled-tasks panel plugin. */
7
+ /** Provides no host-side behavior. */
8
+ export function apply() { }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Package-owned invariant companion for the external scheduled-task UI plugin.
3
+ * @module @qihongmu/dsh-client-ui-scheduled-task/invariant
4
+ */
5
+ import type { Context } from '@deepseek-ai/cordis';
6
+ /** Cordis invariant-companion plugin name. */
7
+ export declare const name = "scheduled-task-ui-invariant";
8
+ /** Service required before reserving this package's invariant ownership. */
9
+ export declare const inject: string[];
10
+ /**
11
+ * Register the package-owned invariant companion.
12
+ * @param ctx - Cordis context carrying the invariant registry.
13
+ * @returns Exact registration disposer after child setup succeeds.
14
+ */
15
+ export declare const apply: (ctx: Context) => Promise<() => void>;
16
+ //# sourceMappingURL=invariant.d.ts.map
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Package-owned invariant companion for the external scheduled-task UI plugin.
3
+ * @module @qihongmu/dsh-client-ui-scheduled-task/invariant
4
+ */
5
+ const PACKAGE_NAME = '@qihongmu/dsh-client-ui-scheduled-task';
6
+ /** Cordis invariant-companion plugin name. */
7
+ export const name = 'scheduled-task-ui-invariant';
8
+ /** Service required before reserving this package's invariant ownership. */
9
+ export const inject = ['invariants'];
10
+ /**
11
+ * Owned relation: the client half is pure presentation over the hosted
12
+ * `scheduledTasks` Remote; it owns no durable or event relationship, so the
13
+ * companion installs no invariant.
14
+ */
15
+ const install = Object.assign(() => undefined, { inject: [] });
16
+ /**
17
+ * Register the package-owned invariant companion.
18
+ * @param ctx - Cordis context carrying the invariant registry.
19
+ * @returns Exact registration disposer after child setup succeeds.
20
+ */
21
+ export const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
package/package.json ADDED
@@ -0,0 +1,71 @@
1
+ {
2
+ "name": "@qihongmu/dsh-client-ui-scheduled-task",
3
+ "version": "0.1.0",
4
+ "license": "MIT",
5
+ "author": "Qihong <qihong.m.u+dev@gmail.com>",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/qihongmu/dsh-plugins.git",
9
+ "directory": "packages/scheduled-task/client"
10
+ },
11
+ "description": "External user plugin: scheduled-tasks sidebar panel (browser half), self-mounts the scheduledTasks Remote via ctx.remote.$mount. No changes to the dsh library.",
12
+ "type": "module",
13
+ "main": "lib/types/index.js",
14
+ "types": "lib/types/index.d.ts",
15
+ "exports": {
16
+ ".": {
17
+ "types": "./lib/types/index.d.ts",
18
+ "default": "./lib/types/index.js"
19
+ },
20
+ "./invariant": {
21
+ "types": "./lib/types/invariant.d.ts",
22
+ "default": "./lib/types/invariant.js"
23
+ },
24
+ "./client": {
25
+ "types": "./lib/types/client/index.d.ts",
26
+ "default": "./lib/client.js"
27
+ },
28
+ "./src/*": "./src/*",
29
+ "./package.json": "./package.json"
30
+ },
31
+ "dsh": {
32
+ "bundle": {
33
+ "patch": "./cordis.patch.yml"
34
+ },
35
+ "client": {
36
+ "inject": [
37
+ "@deepseek-ai/dsh-client-connection",
38
+ "@deepseek-ai/dsh-client-runtime",
39
+ "@deepseek-ai/dsh-client-ui-sidebar",
40
+ "@deepseek-ai/dsh-client-ui-slots",
41
+ "@deepseek-ai/dsh-client-locale",
42
+ "@qihongmu/dsh-client-remotes-scheduled-task",
43
+ "@qihongmu/dsh-plugins-scheduled-task"
44
+ ],
45
+ "platform": "web"
46
+ }
47
+ },
48
+ "scripts": {
49
+ "build": "tsc -p tsconfig.json",
50
+ "typecheck": "tsc -p tsconfig.json --noEmit"
51
+ },
52
+ "peerDependencies": {
53
+ "@deepseek-ai/cordis": "*",
54
+ "@deepseek-ai/dsh-client-connection": "*",
55
+ "@deepseek-ai/dsh-client-locale": "*",
56
+ "@qihongmu/dsh-client-remotes-scheduled-task": "*",
57
+ "@deepseek-ai/dsh-client-runtime": "*",
58
+ "@deepseek-ai/dsh-client-ui-primitives": "*",
59
+ "@deepseek-ai/dsh-client-ui-sidebar": "*",
60
+ "@deepseek-ai/dsh-client-ui-slots": "*",
61
+ "@deepseek-ai/dsh-invariants": "*",
62
+ "@qihongmu/dsh-plugins-scheduled-task": "*",
63
+ "react": "^18.2.0"
64
+ },
65
+ "files": [
66
+ "lib",
67
+ "cordis.patch.yml",
68
+ "!lib/**/*.map",
69
+ "!lib/**/*.tsbuildinfo"
70
+ ]
71
+ }