dsh-mcviseron-plugin 0.6.8 → 0.7.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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-mcviseron-plugin",
3
- "version": "0.6.8",
4
- "description": "DeepSeek Harness (DSH) master plugin — one package hosting MCviseron's DSH components as separate bundle entries: a time-based light/dark Appearance schedule, an Auto-review fix (shutdown preset guard + Chinese approval-reason translation), and a todo plan guard that keeps multi-stage work advancing, one-shot after-session restart/close actions with task-aware waiting, and automatic auth-cookie hygiene for repeated desktop restarts.",
3
+ "version": "0.7.2",
4
+ "description": "DeepSeek Harness (DSH) master plugin — one package hosting MCviseron's DSH components as separate bundle entries: a time-based light/dark Appearance schedule, an Auto-review fix (shutdown preset guard + Chinese approval-reason translation), and a todo plan guard that keeps multi-stage work advancing, one-shot after-session restart/close actions with task-aware waiting, and automatic auth-cookie hygiene for repeated desktop restarts, and model-editable official automation tasks.",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
7
7
  "name": "MCviseron",
@@ -78,23 +78,20 @@
78
78
  "scripts": {
79
79
  "build": "node build.mjs",
80
80
  "typecheck": "tsc --noEmit",
81
- "test": "node --experimental-strip-types test/schedule.test.ts && node --experimental-strip-types test/routes.test.ts && node --experimental-strip-types test/config.test.ts && node --experimental-strip-types test/auto-review-fix.test.ts && node --experimental-strip-types test/auto-review-fix-cordis.test.ts && node --experimental-strip-types test/review-context.test.ts && node --experimental-strip-types test/global-notice.test.ts && node --experimental-strip-types test/task-guard.test.ts && node --experimental-strip-types test/task-guard-cordis.test.ts && node --experimental-strip-types test/session-end.test.ts && node --experimental-strip-types test/auth-cookie.test.ts && node --experimental-strip-types test/restart.test.ts && node --experimental-strip-types test/plugin.test.ts",
81
+ "test": "node --experimental-strip-types test/schedule.test.ts && node --experimental-strip-types test/routes.test.ts && node --experimental-strip-types test/config.test.ts && node --experimental-strip-types test/auto-review-fix.test.ts && node --experimental-strip-types test/auto-review-fix-cordis.test.ts && node --experimental-strip-types test/review-context.test.ts && node --experimental-strip-types test/global-notice.test.ts && node --experimental-strip-types test/task-guard.test.ts && node --experimental-strip-types test/task-guard-cordis.test.ts && node --experimental-strip-types test/session-end.test.ts && node --experimental-strip-types test/auth-cookie.test.ts && node --experimental-strip-types test/automation-tasks.test.ts && node --experimental-strip-types test/restart.test.ts && node --experimental-strip-types test/plugin.test.ts",
82
82
  "check": "pnpm typecheck && pnpm test && pnpm build",
83
83
  "prepare": "pnpm build",
84
84
  "prepublishOnly": "pnpm check",
85
85
  "repair-profile": "node scripts/repair-profile.mjs"
86
86
  },
87
- "dependencies": {
88
- "@deepseek-ai/schemastery": "^3.18.5"
89
- },
90
87
  "peerDependencies": {
91
88
  "@deepseek-ai/cordis": "^4.0.1",
92
- "@deepseek-ai/dsh-client-connection": "^0.2.0-rc.2 || ^0.2.1-rc.2 || ^0.2.1-rc.3",
93
- "@deepseek-ai/dsh-client-locale": "^0.2.0-rc.2 || ^0.2.1-rc.2 || ^0.2.1-rc.3",
94
- "@deepseek-ai/dsh-client-ui-settings": "^0.2.0-rc.2 || ^0.2.1-rc.2 || ^0.2.1-rc.3",
95
- "@deepseek-ai/dsh-client-ui-slots": "^0.2.0-rc.2 || ^0.2.1-rc.2 || ^0.2.1-rc.3",
96
- "@deepseek-ai/dsh-host-webserver": "^0.2.0-rc.2 || ^0.2.1-rc.2 || ^0.2.1-rc.3",
97
- "@deepseek-ai/dsh-settings": "^0.2.0-rc.2 || ^0.2.1-rc.2 || ^0.2.1-rc.3",
89
+ "@deepseek-ai/dsh-client-connection": "^0.2.0-rc.2 || ^0.2.1-rc.2 || ^0.2.1-rc.3 || ^0.2.1-rc.5 || ^0.2.2-rc.1",
90
+ "@deepseek-ai/dsh-client-locale": "^0.2.0-rc.2 || ^0.2.1-rc.2 || ^0.2.1-rc.3 || ^0.2.1-rc.5 || ^0.2.2-rc.1",
91
+ "@deepseek-ai/dsh-client-ui-settings": "^0.2.0-rc.2 || ^0.2.1-rc.2 || ^0.2.1-rc.3 || ^0.2.1-rc.5 || ^0.2.2-rc.1",
92
+ "@deepseek-ai/dsh-client-ui-slots": "^0.2.0-rc.2 || ^0.2.1-rc.2 || ^0.2.1-rc.3 || ^0.2.1-rc.5 || ^0.2.2-rc.1",
93
+ "@deepseek-ai/dsh-host-webserver": "^0.2.0-rc.2 || ^0.2.1-rc.2 || ^0.2.1-rc.3 || ^0.2.1-rc.5 || ^0.2.2-rc.1",
94
+ "@deepseek-ai/dsh-settings": "^0.2.0-rc.2 || ^0.2.1-rc.2 || ^0.2.1-rc.3 || ^0.2.1-rc.5 || ^0.2.2-rc.1",
98
95
  "react": "^18.2.0",
99
96
  "react-dom": "^18.2.0"
100
97
  },
@@ -128,15 +125,26 @@
128
125
  }
129
126
  },
130
127
  "devDependencies": {
131
- "@deepseek-ai/cordis": "^4.0.5",
132
- "@deepseek-ai/dsh-client-connection": "^0.2.1-rc.3",
133
- "@deepseek-ai/dsh-client-locale": "^0.2.1-rc.3",
134
- "@deepseek-ai/dsh-client-store": "^0.2.1-rc.3",
135
- "@deepseek-ai/dsh-client-ui-renderer": "^0.2.1-rc.3",
136
- "@deepseek-ai/dsh-client-ui-settings": "^0.2.1-rc.3",
137
- "@deepseek-ai/dsh-client-ui-slots": "^0.2.1-rc.3",
138
- "@deepseek-ai/dsh-host-webserver": "^0.2.1-rc.3",
139
- "@deepseek-ai/dsh-settings": "^0.2.1-rc.3",
128
+ "@deepseek-ai/cordis": "^4.1.0",
129
+ "@deepseek-ai/cordis-plugin-group": "^1.1.0",
130
+ "@deepseek-ai/cordis-plugin-include": "^1.1.0",
131
+ "@deepseek-ai/cordis-plugin-loader": "^1.1.0",
132
+ "@deepseek-ai/dsh-app-boot": "^0.2.2-rc.1",
133
+ "@deepseek-ai/dsh-brand": "^0.2.2-rc.1",
134
+ "@deepseek-ai/dsh-client-connection": "^0.2.2-rc.1",
135
+ "@deepseek-ai/dsh-client-locale": "^0.2.2-rc.1",
136
+ "@deepseek-ai/dsh-client-store": "^0.2.2-rc.1",
137
+ "@deepseek-ai/dsh-client-ui-renderer": "^0.2.2-rc.1",
138
+ "@deepseek-ai/dsh-client-ui-settings": "^0.2.2-rc.1",
139
+ "@deepseek-ai/dsh-client-ui-slots": "^0.2.2-rc.1",
140
+ "@deepseek-ai/dsh-config-editor": "^0.2.2-rc.1",
141
+ "@deepseek-ai/dsh-home-paths": "^0.2.2-rc.1",
142
+ "@deepseek-ai/dsh-host-webserver": "^0.2.2-rc.1",
143
+ "@deepseek-ai/dsh-launch-environment": "^0.2.2-rc.1",
144
+ "@deepseek-ai/dsh-scope": "^0.2.2-rc.1",
145
+ "@deepseek-ai/dsh-session": "^0.2.2-rc.1",
146
+ "@deepseek-ai/dsh-settings": "^0.2.2-rc.1",
147
+ "@deepseek-ai/schemastery": "^3.19.0",
140
148
  "@types/node": "^22.20.0",
141
149
  "@types/nodemailer": "^6.4.15",
142
150
  "@types/react": "~18.3.1",
@@ -147,11 +155,6 @@
147
155
  "react": "^18.3.1",
148
156
  "react-dom": "^18.3.1",
149
157
  "typescript": "~5.7.2",
150
- "zustand": "4.4.7",
151
- "@deepseek-ai/dsh-scope": "^0.2.1-rc.3",
152
- "@deepseek-ai/dsh-brand": "^0.2.1-rc.3",
153
- "@deepseek-ai/dsh-session": "^0.2.1-rc.3",
154
- "@deepseek-ai/dsh-app-boot": "^0.2.1-rc.3",
155
- "@deepseek-ai/dsh-config-editor": "^0.2.1-rc.3"
158
+ "zustand": "4.4.7"
156
159
  }
157
160
  }
@@ -0,0 +1,337 @@
1
+ import { appendFileSync } from 'node:fs'
2
+ import { tmpdir } from 'node:os'
3
+ import { join } from 'node:path'
4
+ import type { Context } from '@deepseek-ai/cordis'
5
+
6
+ /**
7
+ * DSH's official schedule tools are mounted only in presets that declare
8
+ * @deepseek-ai/dsh-tool-schedule. The current agent often does not have them,
9
+ * which makes an otherwise session-bound automation task impossible to edit
10
+ * from the conversation. These tools call the Host ctx.schedule service
11
+ * directly; every mutation is persisted by that service.
12
+ */
13
+
14
+ interface ScheduleRecord {
15
+ id: string
16
+ title: string
17
+ prompt: string
18
+ kind: string
19
+ scheduledAt: string
20
+ [key: string]: unknown
21
+ }
22
+
23
+ interface ScheduleService {
24
+ list(filter: { sessionId: string }): Promise<ScheduleRecord[]>
25
+ create(sessionId: string, input: Record<string, unknown>, signal?: AbortSignal): Promise<ScheduleRecord>
26
+ update(input: Record<string, unknown>, signal?: AbortSignal): Promise<Record<string, unknown>>
27
+ delete(input: Record<string, unknown>, signal?: AbortSignal): Promise<Record<string, unknown>>
28
+ }
29
+
30
+ interface ToolExecution {
31
+ agent?: { session?: { id?: string } }
32
+ signal?: AbortSignal
33
+ }
34
+
35
+ interface ToolDefinition {
36
+ name: string
37
+ description: string
38
+ parameters: Record<string, unknown>
39
+ output: {
40
+ schema: Record<string, unknown>
41
+ render: (args: unknown, value: unknown) => Array<{ type: 'text'; text: string }>
42
+ }
43
+ execute: (args: Record<string, any>, exec: ToolExecution) => Promise<unknown>
44
+ }
45
+
46
+ const OUTPUT_SCHEMA = { type: 'object', additionalProperties: true }
47
+ const SELECTOR_KEYS = ['after_seconds', 'at', 'every_seconds', 'daily', 'weekly', 'cron'] as const
48
+
49
+ function output(): ToolDefinition['output'] {
50
+ return {
51
+ schema: OUTPUT_SCHEMA,
52
+ render: (_args, value) => [{ type: 'text', text: JSON.stringify(value) }],
53
+ }
54
+ }
55
+
56
+ function log(message: string): void {
57
+ try {
58
+ appendFileSync(join(tmpdir(), 'dsh-mcviseron-automation-tasks.log'), new Date().toISOString() + ' ' + message + '\n', 'utf8')
59
+ } catch {
60
+ /* diagnostics must never break registration */
61
+ }
62
+ }
63
+
64
+ function sessionIdOf(exec: ToolExecution): string {
65
+ const id = exec.agent?.session?.id
66
+ return typeof id === 'string' ? id : ''
67
+ }
68
+
69
+ function text(value: unknown): value is string {
70
+ return typeof value === 'string' && value.trim() !== ''
71
+ }
72
+
73
+ function selectorCount(args: Record<string, unknown>, keys: readonly string[]): number {
74
+ return keys.filter(key => args[key] !== undefined).length
75
+ }
76
+
77
+ function timingChange(args: Record<string, unknown>): Record<string, unknown> | undefined {
78
+ if (args.at !== undefined) return { kind: 'at', at: args.at }
79
+ if (args.every_seconds !== undefined) return { kind: 'every', every_seconds: args.every_seconds }
80
+ if (args.daily !== undefined) return { kind: 'daily', daily: args.daily }
81
+ if (args.weekly !== undefined) return { kind: 'weekly', weekly: args.weekly }
82
+ if (args.cron !== undefined) return { kind: 'cron', cron: args.cron }
83
+ return undefined
84
+ }
85
+
86
+ function invalid(message: string): { ok: false; code: 'invalid'; error: string } {
87
+ return { ok: false, code: 'invalid', error: message }
88
+ }
89
+
90
+ function serviceFailure(error: unknown): { ok: false; code: 'service_error'; error: string } {
91
+ return { ok: false, code: 'service_error', error: error instanceof Error ? error.message : String(error) }
92
+ }
93
+
94
+ function validateCreate(args: Record<string, unknown>): string | undefined {
95
+ if (!text(args.title)) return 'title must be a non-empty string'
96
+ if (!text(args.prompt)) return 'prompt must be a non-empty string'
97
+ const count = selectorCount(args, SELECTOR_KEYS)
98
+ if (count !== 1) return 'supply exactly one of after_seconds, at, every_seconds, daily, weekly, or cron'
99
+ if (args.after_seconds !== undefined && (!Number.isSafeInteger(args.after_seconds) || Number(args.after_seconds) <= 0)) {
100
+ return 'after_seconds must be a positive integer'
101
+ }
102
+ if (args.every_seconds !== undefined && (!Number.isSafeInteger(args.every_seconds) || Number(args.every_seconds) < 60)) {
103
+ return 'every_seconds must be an integer of at least 60'
104
+ }
105
+ if (args.at !== undefined && !text(args.at)) return 'at must be a non-empty ISO date-time string'
106
+ return undefined
107
+ }
108
+
109
+ function validateUpdate(args: Record<string, unknown>): string | undefined {
110
+ if (!text(args.id)) return 'id must be a non-empty string'
111
+ const keys = ['at', 'every_seconds', 'daily', 'weekly', 'cron']
112
+ if (selectorCount(args, keys) > 1) return 'update accepts at most one timing selector'
113
+ if (args.every_seconds !== undefined && (!Number.isSafeInteger(args.every_seconds) || Number(args.every_seconds) < 60)) {
114
+ return 'every_seconds must be an integer of at least 60'
115
+ }
116
+ if (args.title === undefined && args.prompt === undefined && timingChange(args) === undefined) {
117
+ return 'update needs a new title, prompt, or one timing selector'
118
+ }
119
+ if (args.title !== undefined && !text(args.title)) return 'title must be a non-empty string'
120
+ if (args.prompt !== undefined && !text(args.prompt)) return 'prompt must be a non-empty string'
121
+ return undefined
122
+ }
123
+
124
+ const SELECTOR_SCHEMA = {
125
+ after_seconds: { type: 'number', description: 'Delay in whole seconds; create only.' },
126
+ at: { type: 'string', description: 'Absolute RFC 3339 date-time with offset.' },
127
+ every_seconds: { type: 'number', description: 'Fixed interval in whole seconds, at least 60.' },
128
+ daily: {
129
+ type: 'object', additionalProperties: false, required: ['time', 'time_zone'],
130
+ properties: { time: { type: 'string' }, time_zone: { type: 'string' } },
131
+ },
132
+ weekly: {
133
+ type: 'object', additionalProperties: false, required: ['time', 'time_zone', 'weekdays'],
134
+ properties: {
135
+ time: { type: 'string' },
136
+ time_zone: { type: 'string' },
137
+ weekdays: { type: 'array', items: { type: 'integer', minimum: 1, maximum: 7 } },
138
+ },
139
+ },
140
+ cron: {
141
+ type: 'object', additionalProperties: false, required: ['expression', 'time_zone'],
142
+ properties: { expression: { type: 'string' }, time_zone: { type: 'string' } },
143
+ },
144
+ }
145
+
146
+ const { after_seconds: _createOnlyAfterSeconds, ...UPDATE_SELECTOR_SCHEMA } = SELECTOR_SCHEMA
147
+
148
+ const CREATE_PARAMETERS = {
149
+ type: 'object',
150
+ additionalProperties: false,
151
+ required: ['title', 'prompt'],
152
+ properties: {
153
+ title: { type: 'string', description: 'Short task name; no schedule in the title.' },
154
+ prompt: { type: 'string', description: 'Complete instruction delivered when due.' },
155
+ ...SELECTOR_SCHEMA,
156
+ },
157
+ }
158
+
159
+ const UPDATE_PARAMETERS = {
160
+ type: 'object',
161
+ additionalProperties: false,
162
+ required: ['id'],
163
+ properties: {
164
+ id: { type: 'string', description: 'Exact schedule id from automation_task_list.' },
165
+ title: { type: 'string' },
166
+ prompt: { type: 'string' },
167
+ ...UPDATE_SELECTOR_SCHEMA,
168
+ },
169
+ }
170
+
171
+ const DELETE_PARAMETERS = {
172
+ type: 'object',
173
+ additionalProperties: false,
174
+ required: ['id'],
175
+ properties: { id: { type: 'string', description: 'Exact schedule id.' } },
176
+ }
177
+
178
+ const LIST_PARAMETERS = { type: 'object', additionalProperties: false, properties: {} }
179
+
180
+ /** Build the model-facing tools over one Host Schedule service. */
181
+ export function makeAutomationTaskTools(schedule: ScheduleService): ToolDefinition[] {
182
+ return [
183
+ {
184
+ name: 'automation_task_list',
185
+ description: 'List the official automation tasks bound to the current session. Use this before changing a task so you have its exact id and current prompt.',
186
+ parameters: LIST_PARAMETERS,
187
+ output: output(),
188
+ async execute(_args, exec) {
189
+ const sessionId = sessionIdOf(exec)
190
+ if (sessionId === '') return { ok: false, code: 'no_session', error: 'no current session' }
191
+ try {
192
+ return { ok: true, tasks: await schedule.list({ sessionId }) }
193
+ } catch (error) {
194
+ return serviceFailure(error)
195
+ }
196
+ },
197
+ },
198
+ {
199
+ name: 'automation_task_create',
200
+ description: 'Create an official automation task (DSH schedule) bound to the current session. Supply title, prompt, and exactly one timing selector. The Host schedule service persists it immediately; never edit schedule.json by hand.',
201
+ parameters: CREATE_PARAMETERS,
202
+ output: output(),
203
+ async execute(args, exec) {
204
+ const sessionId = sessionIdOf(exec)
205
+ if (sessionId === '') return { ok: false, code: 'no_session', error: 'no current session' }
206
+ const invalidInput = validateCreate(args)
207
+ if (invalidInput !== undefined) return invalid(invalidInput)
208
+ try {
209
+ const record = await schedule.create(sessionId, {
210
+ ...args,
211
+ title: String(args.title).trim(),
212
+ prompt: String(args.prompt).trim(),
213
+ }, exec.signal)
214
+ return { ok: true, task: record }
215
+ } catch (error) {
216
+ return serviceFailure(error)
217
+ }
218
+ },
219
+ },
220
+ {
221
+ name: 'automation_task_update',
222
+ description: 'Update an existing official automation task in place, keeping its id. Supply id plus a new title, prompt, or at most one timing selector. The Host schedule service persists it immediately; this is the supported way to edit an automation task from the conversation.',
223
+ parameters: UPDATE_PARAMETERS,
224
+ output: output(),
225
+ async execute(args, exec) {
226
+ const sessionId = sessionIdOf(exec)
227
+ if (sessionId === '') return { ok: false, code: 'no_session', error: 'no current session' }
228
+ const invalidInput = validateUpdate(args)
229
+ if (invalidInput !== undefined) return invalid(invalidInput)
230
+ try {
231
+ const id = String(args.id)
232
+ const expected = (await schedule.list({ sessionId })).find(record => record.id === id)
233
+ if (expected === undefined) return { ok: false, code: 'schedule_not_found', error: 'automation task not found in this session: ' + id }
234
+ const change = timingChange(args)
235
+ const result = await schedule.update({
236
+ sessionId,
237
+ id,
238
+ expected,
239
+ ...(change === undefined ? {} : { change }),
240
+ ...(args.title === undefined ? {} : { title: String(args.title).trim() }),
241
+ ...(args.prompt === undefined ? {} : { prompt: String(args.prompt).trim() }),
242
+ }, exec.signal)
243
+ if (result.record !== undefined) return { ok: true, task: result.record }
244
+ return { ok: false, ...result }
245
+ } catch (error) {
246
+ return serviceFailure(error)
247
+ }
248
+ },
249
+ },
250
+ {
251
+ name: 'automation_task_delete',
252
+ description: 'Delete an official automation task in the current session. The Host schedule service removes and persists it immediately.',
253
+ parameters: DELETE_PARAMETERS,
254
+ output: output(),
255
+ async execute(args, exec) {
256
+ const sessionId = sessionIdOf(exec)
257
+ if (sessionId === '') return { ok: false, code: 'no_session', error: 'no current session' }
258
+ if (!text(args.id) || String(args.id).trim() !== String(args.id)) {
259
+ return invalid('id must be a non-empty string without surrounding whitespace')
260
+ }
261
+ try {
262
+ const result = await schedule.delete({ sessionId, id: String(args.id) }, exec.signal)
263
+ return { ok: true, ...result }
264
+ } catch (error) {
265
+ return serviceFailure(error)
266
+ }
267
+ },
268
+ },
269
+ ]
270
+ }
271
+
272
+ function serviceOf(scope: Record<string, unknown>, name: string): unknown {
273
+ try {
274
+ if (scope[name] !== undefined) return scope[name]
275
+ const get = scope.get as ((key: string) => unknown) | undefined
276
+ return typeof get === 'function' ? get.call(scope, name) : undefined
277
+ } catch {
278
+ return undefined
279
+ }
280
+ }
281
+
282
+ /** Register tools and the model guidance through the resolved services. */
283
+ export function apply(ctx: Context): void {
284
+ const inject = (ctx as unknown as { inject?: (deps: string[], callback: (scope: Context) => void) => unknown }).inject
285
+ if (typeof inject !== 'function') return
286
+ try {
287
+ inject.call(ctx, ['tools', 'schedule'], (scope) => {
288
+ const tools = serviceOf(scope as unknown as Record<string, unknown>, 'tools') as {
289
+ register?: (definition: unknown) => (() => void) | undefined
290
+ } | undefined
291
+ const schedule = serviceOf(scope as unknown as Record<string, unknown>, 'schedule') as ScheduleService | undefined
292
+ if (tools === undefined || typeof tools.register !== 'function' || schedule === undefined) {
293
+ log('schedule tools unavailable')
294
+ return
295
+ }
296
+ const dispose = makeAutomationTaskTools(schedule).map(definition => {
297
+ try {
298
+ return tools.register?.(definition)
299
+ } catch (error) {
300
+ log('tool registration failed: ' + (error instanceof Error ? error.message : String(error)))
301
+ return undefined
302
+ }
303
+ }).filter((item): item is () => void => typeof item === 'function')
304
+ const effect = (scope as unknown as { effect?: (body: () => () => void, label: string) => unknown }).effect
305
+ if (typeof effect === 'function') {
306
+ effect.call(scope, () => () => {
307
+ for (const disposeTool of dispose) {
308
+ try { disposeTool() } catch { /* already disposed */ }
309
+ }
310
+ }, 'mcviseron-automation-tasks: tools')
311
+ }
312
+ })
313
+ } catch (error) {
314
+ log('tool injection failed: ' + (error instanceof Error ? error.message : String(error)))
315
+ }
316
+
317
+ try {
318
+ inject.call(ctx, ['systemPrompt'], (scope) => {
319
+ const systemPrompt = serviceOf(scope as unknown as Record<string, unknown>, 'systemPrompt') as {
320
+ section?: (value: unknown) => unknown
321
+ } | undefined
322
+ if (typeof systemPrompt?.section === 'function') {
323
+ systemPrompt.section({
324
+ name: 'plugin:mcviseron-automation-tasks',
325
+ order: 232,
326
+ text: [
327
+ 'Official DSH automation tasks are writable from this conversation.',
328
+ 'Use automation_task_list / automation_task_create / automation_task_update / automation_task_delete; they call the Host schedule service and persist automatically.',
329
+ 'Never edit ~/.dsh/storages/schedule.json by hand, and never tell the user to use a command to change a task when these tools are available.',
330
+ ].join(' '),
331
+ })
332
+ }
333
+ })
334
+ } catch (error) {
335
+ log('system prompt section unavailable: ' + (error instanceof Error ? error.message : String(error)))
336
+ }
337
+ }
package/src/index.ts CHANGED
@@ -2,6 +2,7 @@ import type { Context } from '@deepseek-ai/cordis'
2
2
  import z from '@deepseek-ai/schemastery'
3
3
  import * as appearance from './appearance/index.ts'
4
4
  import * as authCookie from './auth-cookie/index.ts'
5
+ import * as automationTasks from './automation-tasks/index.ts'
5
6
  import * as autoReviewFix from './auto-review-fix/index.ts'
6
7
  import { DEFAULT_AUTO_REVIEW_CONFIG } from './auto-review-fix/index.ts'
7
8
  import * as restart from './restart/index.ts'
@@ -66,6 +67,7 @@ function mount(ctx: Context, component: unknown, config: unknown): void {
66
67
  */
67
68
  export function apply(ctx: Context, rawConfig?: MasterConfig): void {
68
69
  const config = (toPlain(rawConfig) ?? {}) as MasterConfig
70
+ mount(ctx, automationTasks, {})
69
71
  mount(ctx, authCookie, {})
70
72
  mount(ctx, appearance, {
71
73
  enabled: config.enabled ?? DEFAULT_SCHEDULE_CONFIG.enabled,