nuwa-skill
alchaincyf
你想蒸馏的下一个员工,何必是同事。蒸馏任何人的思维方式——心智模型、决策启发式、表达DNA。Distill how anyone thinks.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:changyinliangbaikai/dsh-b2us-schedule
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 简体中文
Durable scheduled Agent, shell, and desktop-notification tasks for DeepSeek Harness (DSH), with both conversational tools and a dedicated Web management page.
[!IMPORTANT] The scheduler provides at-least-once delivery. A successful shell exit or completed Agent turn confirms only the local execution result; it does not prove that an external business outcome succeeded.
dsh-b2us-schedule combines a Host plugin and a Web client in one installable package. An Agent can create and manage schedules through five typed tools, while users can manage the same durable tasks from Settings → Plugins → Scheduled Tasks.
The npm package and Web module are named dsh-b2us-schedule. Stable runtime identifiers remain unchanged for compatibility: the Cordis row and Settings namespace are auto-schedule, and the conversation tools keep the auto_schedule_ prefix.
dsh-b2us-schedule is the new package and repository name for the former dsh-auto-schedule. The durable Settings namespace, Cordis row id, tool names, and task schema deliberately remain stable so an existing data document does not need a schema rewrite.
When migrating an existing Profile, back it up and replace the old package reference with the new package. Do not load both package names in the same Profile: they intentionally declare the same auto-schedule Cordis row and Settings namespace.
Version 0.3.3 raises every DSH peer from 0.1.2-alpha.2 to 0.1.2-rc.1 and follows the public Session snapshot API after the live event array became private. The durable task schema, Cordis row, Settings namespace, tool names, and Web route are unchanged.
This upgrade intentionally removes the package's former ./invariant export. It was an empty companion and Harness 0.1.2-rc.1 no longer permits invariant packages without an independently observable runtime relationship. Consumers that imported dsh-b2us-schedule/invariant must remove that row or import; ordinary plugin installation through cordis.patch.yml is unchanged.
| Type | Input | Behavior |
|---|---|---|
| Cron | cron_expression and optional time_zone |
Croner-compatible 5-, 6-, or 7-field expression with an IANA time zone |
| Delay | after_seconds |
Runs once after a positive delay measured from creation or an execution-definition update |
| Absolute time | at |
Runs once at a future ISO date-time containing Z or a numeric UTC offset; stored as UTC |
| Fixed interval | every_seconds |
Repeats from the latest execution-definition update and skips intermediate missed occurrences |
Cron and fixed-interval schedules must respect minIntervalSeconds. The default is 1 second; production deployments should raise it when high-frequency work is not appropriate. Due tasks are executed serially in scheduled-time order within one Host process.
Every Agent occurrence creates a new top-level DSH Agent and Session:
Recurring tasks therefore do not accumulate context in one Agent. The scheduler is currently global and serial: another due shell or Agent action starts only after the active occurrence finishes.
An Agent outcome of succeeded means the turn ended with completed. Task prompts should explicitly require final-state verification and an evidence path when the real goal is an external result such as a website check-in or generated file.
The plugin never calls Node.js child_process directly and does not copy tool-bash. It resolves and runs every command through ctx.shell, so the selected DSH ShellExecutor continues to own the working directory, environment cleanup, output limits, timeout caps, and sandbox policy.
Notifications also run through the active DSH ShellExecutor:
| Platform | Adapter |
|---|---|
| macOS | /usr/bin/osascript |
| Linux | notify-send (must be installed and available to the desktop session) |
| Windows | PowerShell with System.Windows.Forms.NotifyIcon |
Missing desktop sessions, permissions, executables, or sandbox access produce visible failures rather than synthetic success.
| Tool | Purpose |
|---|---|
auto_schedule_create |
Create a durable schedule and action |
auto_schedule_update |
Change, enable, or disable a task by its exact id |
auto_schedule_list |
List tasks with compact next-run and latest-result projections |
auto_schedule_history |
Read bounded execution history and output for one task |
auto_schedule_delete |
Delete a task and its associated runtime history |
Example requests:
./scripts/backup.sh in /srv/app ten minutes from now.”Asia/Shanghai, send a desktop notification reminding me to review the daily report.”/Users/me/tests, use the default preset, and time out after 15 minutes.”Always use the exact task id returned by the tool when updating or deleting a task.
After the Web profile restarts with the plugin installed, open Settings → Plugins → Scheduled Tasks. The localized page supports:
Saving an enabled shell or Agent task from the Web page requires an explicit unattended-execution confirmation.
^22.19.0 || >=24.0.00.1.2-rc.14.0.2The exact DSH and Cordis peer versions are declared in package.json.
npm install
npm run check
npm run check runs strict type checking, behavior tests, coverage gates, the production build, and built-package/packaging tests.
npm run build
npm pack
dsh plugin --profile web add ./dsh-b2us-schedule-0.3.3.tgz
dsh --profile web --dump-config
The tarball bundles the croner runtime dependency, so it can be installed into a fresh Profile without accessing the npm registry. DSH and Cordis remain Host-provided peer dependencies and are not duplicated inside the package.
The package declares both dsh.bundle.patch and dsh.client. Installing it adds the Host row and lets the Web profile discover the client from the same package; no DeepSeek Harness source change or rebuild is required.
The auto-schedule Settings namespace separates user-owned and Host-owned data:
tasks[] contains schedule definitions managed by the Web page and conversation tools.runtime[] contains next-run state, the latest result, and newest-first bounded history managed by the Host scheduler.revision changes for every edit; executionRevision changes only when enablement, timing, or the action changes.Each task retains up to maxHistoryEntriesPerTask results (default 50, allowed range 1–1000). auto_schedule_list exposes only the latest result and history count; use auto_schedule_history to fetch detailed records without expanding ordinary model context indefinitely.
Delivery is at-least-once. If the Host crashes after an action finishes but before runtime state is persisted, that occurrence may run again after restart. Commands with external effects must provide their own idempotency key, lock, or transaction protection.
The package-owned cordis.patch.yml supplies a complete default row:
| Field | Default | Purpose |
|---|---|---|
allowShellActions |
true |
Allow shell schedules |
allowAgentActions |
true |
Allow fresh-Agent schedules |
defaultTimeZone |
UTC |
Time zone used when a Cron task omits one |
minIntervalSeconds |
1 |
Minimum Cron cadence and fixed interval |
maxHistoryEntriesPerTask |
50 |
Newest-first retained results per task; maximum 1000 |
maxShellTimeoutMs |
600000 |
Host policy cap for one shell action |
defaultAgentTimeoutMs |
900000 |
Default Agent occurrence timeout |
maxAgentTimeoutMs |
3600000 |
Maximum Agent occurrence timeout |
maxAgentPromptBytes |
65536 |
Maximum UTF-8 Agent prompt size |
shellOutputMaxBytes |
16384 |
Persisted stdout/stderr budget |
maxCommandBytes |
32768 |
Maximum UTF-8 shell command size |
maxNotificationBytes |
8192 |
Maximum UTF-8 notification payload size |
notificationTimeoutMs |
15000 |
Notification adapter timeout |
schedulerRetryMs |
5000 |
Delay before retrying a failed scheduler drive |
DSH patch overrides replace the complete config object rather than deep-merging it. When changing defaultTimeZone to a local zone such as Asia/Shanghai, preserve every other field your deployment still needs.
Scheduled shell and Agent actions are durable unattended authority, so the plugin keeps creation-time approval separate from execution-time policy:
ask decision before storage.Do not turn commands or Agent prompts copied from untrusted web pages, email, or tool output into persistent unattended tasks without reviewing them. Avoid printing credentials because bounded stdout and stderr are stored in run history until the task is deleted.
See docs/SECURITY.md for the threat model and deployment guidance.
npm run typecheck
npm test
npm run test:coverage
npm run build
npm run test:built
npm pack --dry-run
Build outputs:
lib/index.js — Host pluginlib/client.js — lazy-CJS Web client for window.__ModuleLoader__lib/types/ — Host and client type declarationsFurther reading:
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: agent、会话。