monotykamary/dsh-factory
Durable dependency-graph task factory for DeepSeek Harness: recurring Agent work, safe checkout lanes, first-class queues, Triage, and artifacts.
项目介绍Project Overview
dsh-factory 是 DSH 插件,把会话工作流转为持久化本地任务工厂。支持依赖图、原生 Agent 运行、隔离 Git 检出、定时与重试、讨论和产物审查。适合把单次提示组织成可并行、串联、循环执行的多 Agent 生产线。注意:它是 DSH 控制面,执行、消息和工具仍由 DSH 管理。
dsh-factory is a DSH plugin that turns Sessions into a durable local task factory. It provides dependency graphs, native Agent runs, isolated Git checkout lanes, schedules, retries, discussions, and artifact review. Use it to organize prompts into parallel, sequential, or recurring multi-agent workflows. It is a control plane over DSH; DSH remains authoritative for Agent execution, messages, tools, and Sessions.
请帮我了解并安装插件:【dsh-factory】【https://github.com/monotykamary/dsh-factory】
把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.
或使用命令行安装(适合开发者)Or use CLI install (for developers)
命令行安装CLI Install
dsh plugin --profile web add dsh-factory@latest
把 monotykamary/dsh-factory 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
🏭 dsh-factory
Durable task graphs and recurring Agent work for DeepSeek Harness
From one prompt to a dependency-aware production line — with isolated checkouts, live Sessions, and reviewable results.
dsh-factory turns the ordinary DSH Session workflow into a durable local task factory. People can capture work from New Session, models can build dependency graphs directly, and a lease-elected scheduler runs eligible nodes through native DSH Agents without introducing a second Agent loop, tool registry, or conversation store.
Why Factory?
| Capability | What it unlocks | |
|---|---|---|
| 🕸️ | Dependency graphs | Parallel branches, sequential chains, joins, and always-run finalizers in one named flow. |
| 🏃 | Native Agent runs | Every assignment executes as an ordinary durable DSH Session with the selected model and preset. |
| 🛤️ | Safe checkout lanes | Current, isolated, and predecessor-reuse lanes over managed Git worktrees with dirty-work and live-Session protection. |
| ⏰ | One-shot + recurring schedules | Delayed starts and Croner-backed recurrence with lease-safe activation and non-overlapping occurrences. |
| 🔁 | Automatic failure retries | Abruptly failed runs requeue with exponential backoff — three retries starting at thirty seconds by default — with workspace and per-task opt-outs. |
| 🏷️ | Project-scoped identifiers | Every workspace derives its own uppercase key with an independent counter — DOCS-3 beside SR-2 — so cross-project dependencies stay mistake-proof while legacy FAC numbers keep resolving. |
| 💬 | First-class discussion | Posted prompts, steer messages, reorderable queued follow-ups, images, and Factory notes in one chronological feed. |
| 🔎 | Triage and artifacts | Unread and failed run results, mutation receipts, plus images and videos discovered under each run's .artifacts/ directory. |
| ✨ | White-glove intake | A compact Task/Flow selector extends New Session instead of duplicating its Workspace, model, permission, attachment, and draft controls. |
How it fits
flowchart LR
Human[Human or model] --> Intake[New Session + Factory tools]
Intake --> Graph[(Task and flow graph)]
Graph --> Scheduler[Lease-elected scheduler]
Scheduler --> Lanes[Serialized checkout lanes]
Lanes --> Agents[DSH Agents]
Agents --> Sessions[(Durable Sessions)]
Sessions --> Triage[Triage + artifacts]
Sessions --> Graph
Factory is a control plane over DSH, not a replacement for it. Factory SQLite owns projects, tasks, flows, schedules, runs, and review state. DSH remains authoritative for Agent execution, model-visible messages, pending prompt order, tools, attachments, Sessions, and worktree safety.
The workflow
- Capture — send normally to create a live Session, choose Run later for a draft task, or place the prompt into a new or existing flow.
- Compose — add searchable dependencies, parallel branches, joins, finalizers, labels, priorities, schedules, and model overrides.
- Run — the scheduler claims ready work, resolves a safe checkout lane, starts a DSH Agent, and logs the assignment with dependency and mutation-ledger context.
- Collaborate — Queue and Steer post through the Agent inbox; pending rows stay editable and reorderable until claimed.
- Finish — a missing report receives one logged next-step reminder;
factory_finishis followed by one concise user-facing result and settles only after the Session log is flushed. - Review — Triage preserves each terminal occurrence, including recurring runs, receipts, summaries, failures, and
.artifacts/media.
Packages
| Package | Responsibility |
|---|---|
dsh-factory-protocol |
Host-independent task, flow, run, schedule, observation, and graph records. |
dsh-factory-store |
Persistence Service Definition. |
dsh-factory-store-sqlite |
Transactional documents, presence, revisions, and scheduler leases. |
dsh-factory-domain |
State transitions, metadata settlement, artifacts, and Typert Remote methods. |
dsh-factory-tools |
Model graph tools, explicit completion, and the bundled Factory skill. |
dsh-factory-scheduler |
Dependency, lane, cron, cleanup, and DSH Agent reconciliation. |
dsh-factory-client-ui |
Work, task detail, Triage, New Session intake, and project settings. |
dsh-factory |
Installable Cordis patch-layer bundle. |
Install
Monotykamary DSH flavor
Factory ships in the custom Web profile beside Fabric and Fovea:
npm install --global @monotykamary/dsh@latest
dsh --profile web
Add to another compatible profile
dsh plugin --profile web add dsh-factory@latest
Restart the selected profile after installation. Factory appears as an additive Sidebar application and stores its SQLite database under the DSH home.
Install this checkout locally
git clone https://github.com/monotykamary/dsh-factory.git
cd dsh-factory
pnpm install
pnpm run check
pnpm run install:local -- --profile web --skip-build
The installer links all eight workspace packages, validates the composed Factory rows, and never starts or restarts DSH.
Safety model
A checkout is one serialized writer lane. Factory never force-removes a worktree, never deletes dirty work, and never releases a lane while shared presence reports a live Session. It refuses primary and unmanaged checkout removal. Publishing remains an explicit task, and cleanup cannot rewrite a flow outcome.
Recurring tasks return to Scheduled after every occurrence and retain each success or failure in Triage. Scheduler takeover recovers only scheduler-owned dispatches, so observation of an external Session cannot create a duplicate run.
Browser experience
Work shows Emerging work first and then graph-ordered flows. Task detail combines properties, dependencies, schedule, model selection, run output, discussion, mutation receipts, and review media. Linked Sessions can be settled or archived; cancelled tasks that never acquired a Session can be permanently deleted after explicit acknowledgement. Relationship rails move from neutral pending nodes to a blue running spinner, green completion check, or red abrupt-failure cross.
Pasted images reuse the DSH attachment gallery and fullscreen lightbox. Task detail and exact-run Triage discover images and videos in the owning checkout's .artifacts/ directory and open one keyboard-accessible carousel without copying media into Factory state.
Development
Requirements: Node.js ^22.19.0 || >=24 and pnpm 11.
pnpm install
pnpm run check
pnpm run check also packs all eight packages and installs them with standard npm, without legacy peer mode. Browser-facing changes additionally run pnpm run test:e2e against an assembled Factory Web profile. Local captures belong under .artifacts/screenshots/ and are excluded from Git and npm.
See docs/architecture.md for durable authority, intake, metadata, scheduling, execution, Triage, cleanup, and browser-state ownership.
nexu-io/open-design
ruvnet/ruflo
amruthpillai/reactive-resume
esengine/DeepSeek-Reasonix
volcengine/OpenViking
Molunerfinn/PicGo
titanwings/distilly
titanwings/colleague-skill