dsh-loopx-plugin
loopx-project/loopxLoopX——面向长周期 Agent 的提供商中立、本地优先状态内核与控制平面:在 DeepSeek Harness 执行层之上持久化 Goal、Todo、门禁、证据、配额、恢复与交接状态;插件负责引导安装 CLI 与技能、准入有界的同会话续跑,并为精确绑定的工作循环提供本地 GoalBar。
按项目调度提示词,在全新的无头 Agent 会话中执行,支持单次、固定间隔和 cron 计划,并持久化运行历史。
DSH web plugin: per-project scheduled tasks with prompts. Create a task in the sidebar (⏰ 定时任务), give it a prompt, and the plugin runs that prompt on schedule — as a fresh headless agent session in the project directory — then records the outcome as durable run history.
at — run once at an absolute time (strict RFC 3339 instant, or a local
date/time with an explicit IANA time zone; DST gaps are rejected, overlaps
pick the earlier instant).every — run on a fixed creation-anchored interval (≥ 5 minutes); missed
intervals are never replayed, only the latest due occurrence runs.cron — run on a cron calendar rule (five/six/seven-field expression, e.g.
0 9 * * 1-5, evaluated in an explicit IANA time zone, DST-aware).dsh --profile headless). The run session appears
in the project's conversation list with a pinned title (⏰ <task name>) and
stays resumable; the final assistant text is also captured into the run record.running / completed / failed), start/finish
times, output (truncated at 20 KB), error messages; newest first, capped at
20 records per task (configurable).overdue; overdue every tasks run only
their latest due occurrence.at tasks finish after their single run; every tasks stay
active and advance to the next anchor-aligned target.A dual-face npm package installed into the web profile:
| Half | Entry | Role |
|---|---|---|
| Server | lib/index.js | Cordis plugin: opens the scheduled_tasks storage domain (ctx.storageDomain), mounts the task store, the scheduler (bounded timers, clock-rollback-safe wakes), the headless executor, and the ctx.tasks typert service. |
| Protocol | lib/typert.js | Host TYPERT face (tasks/* endpoints), auto-registered by dsh-typert-loader. |
| Browser | lib/client.js | React panel mounted into the sidebar.footer.action slot; calls the host through the installed remote.tasks namespace. |
The client↔server channel is the DSH typert protocol (the same mechanism
dsh-commands uses): strict zod codecs validate every argument and result on
both sides, and no session needs to exist for the panel to work.
dsh plugin --profile web add @opendsh/dsh-plugin-scheduled-tasks
pnpm --dir src/plugins/dsh-plugin-scheduled-tasks typecheck # tsc (TypeScript 7)
pnpm --dir src/plugins/dsh-plugin-scheduled-tasks test # vitest
pnpm --dir src/plugins/dsh-plugin-scheduled-tasks build # tsc emit + tsdown client bundle + loader wrapper
After changing sources, rebuild and re-sync the profile copy
(pnpm install inside the profile re-copies file: dependencies), then
restart dsh web — the plugin has no HMR channel.
| Key | Default | Meaning |
|---|---|---|
maxConcurrentRuns | 2 | Maximum concurrently running agent sessions across all tasks. |
keepRunsPerTask | 20 | Run-history records retained per task (oldest pruned beyond the cap). |
Tool calls that fail with “Interrupted: interrupted” (underlying error
Cannot read properties of undefined (reading 'prepare')) are almost always a
duplicate @deepseek-ai/dsh-tools copy caused by declaring DSH packages in
dependencies instead of peerDependencies. See
docs/troubleshooting.md for the full write-up.
dsh-schedule); there is no external wake-up when the process is down.