Preface¶
DeepSeek Harness (DSH) uses an “everything is a plugin” architecture. When building complex workflows involving multiple agents, dependency chains, and scheduled tasks, managing sessions and worktrees directly is error-prone and makes it difficult to guarantee state persistence. dsh-factory acts as a control plane, building a persistent dependency-graph task factory on top of DSH’s native capabilities.
Core Capabilities¶
The plugin provides the following features:
- Dependency graph: Supports defining parallel branches, sequential chains, joins, and terminators within a single named flow.
- Native agent execution: Each assigned task runs as a regular persistent DSH session, using the selected model and preset.
- Safe checkout lanes: Isolated write lanes based on Git worktrees, with dirty-work protection and live-session protection.
- Scheduling: Supports one-shot (delayed) and recurring (Cron-based) scheduling.
- Automatic failure retries: Failed runs are requeued with exponential backoff (default: three retries, starting at 30-second intervals).
- Project-scoped identifiers: Each workspace generates independent uppercase keys to avoid cross-project dependency errors.
- First-class discussion and triage: Provides sortable queues, discussion threads, artifacts, and audit results.
- White-glove intake: Extends New Session with a compact task/flow selector.
Installation and Activation¶
Factory operates as a control plane and does not replace DSH itself. After installation, restart the profile to activate it.
dsh plugin --profile web add dsh-factory@latest
Once installed, Factory appears as a sidebar application, with its SQLite database stored in the DSH home directory.
Usage Flow¶
- Capture: Send prompts normally to create a live session, choose “Run later” to create a draft task, or place the prompt in a new or existing flow.
- Compose: Add searchable dependencies, parallel branches, labels, priorities, scheduling, and model overrides.
- Run: The scheduler claims ready tasks, allocates a safe checkout lane, starts a DSH agent, and records the dispatch with dependency and mutation-ledger context.
- Collaborate: Post queue and steering messages through the agent inbox; pending rows remain editable and reorderable until they are claimed.
- Complete: After
factory_finish, a concise user-visible result is generated, settled only after session logs are flushed. - Review: Triage retains every terminal event, including recurring runs, receipts, summaries, failures, and media files.
Notes¶
- Factory is the control plane for DSH, not a replacement. Factory SQLite owns projects, tasks, flows, scheduling, runs, and audit state. DSH retains authority over agent execution, model-visible messages, pending prompt order, tools, attachments, sessions, and worktree safety.
- Checkout is a serialized write lane.
- Factory never force-removes worktrees, never deletes dirty work, and never releases the lane when a shared live session is reported.
- Recurring tasks return to the Scheduled state after each occurrence and retain every success or failure in Triage.
- Scheduler takeover only resumes scheduler-owned dispatches, so observing external sessions does not create duplicate runs.
Summary¶
dsh-factory provides DeepSeek Harness with structured task orchestration capabilities, making it suitable for scenarios that require persistent scheduling, dependency management, and safe concurrent execution.