DeepSeek Harness 插件

dsh-fabric-monotyka

Fabric-style deterministic compaction, activity, topology, code runtime, mesh, and actor capabilities for DeepSeek Harness(英文原文)

跳到安装方式

来源信息

GitHub 仓库
monotykamary/dsh-fabric
最近更新
2026年8月21日
分类
工具与能力
GitHub stars
2
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/monotykamary/dsh-fabric
插件名:dsh-fabric-monotyka
作者:monotykamary

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

<div align="center">

🧵 dsh-fabric

Fabric-style capabilities for DeepSeek Harness

_Deterministic compaction, checked code execution, durable coordination, and live topology — delivered as native DSH plugins._

![checks](https://github.com/monotykamary/dsh-fabric/actions/workflows/check.yml) ![DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) ![TypeScript](https://www.typescriptlang.org/) ![license](LICENSE)

</div>

---

dsh-fabric adapts the most useful ideas from pi-fabric to DeepSeek Harness without creating a parallel runtime. DSH ToolRuntime remains the tool and policy authority, Cordis owns component lifecycle, and Fabric adds focused providers for compaction, code execution, coordination, projections, and browser UI.

Why Fabric?

CapabilityWhat it unlocks
:-:------
🧠Deterministic compactionStructured, bounded summaries without a second model request.
Checked Code ModeTypeScript validation followed by isolated QuickJS execution with strict budgets.
🕸️Durable meshTopics, compare-and-swap state, and crash-conservative actor mailboxes.
📡Unified activityFabric, workflow, and compaction events projected into one chronological surface.
🗺️Live topologyPortable participants and mesh resources in a grouped tree, with message flow kept as traffic overlays.
🧩Native compositionExternal DSH plugins — no second tool registry, lifecycle, or React business-state store.

How it fits

flowchart LR
  Model[Model] --> TR[DSH ToolRuntime]
  TR --> QJS[Checked QuickJS]
  TR --> Mesh[Fabric Mesh]
  Mesh --> Store[(storage-domain)]
  DSH[DSH events] --> Host[Fabric host projection]
  Mesh --> Host
  Host --> UI[Activity + Topology UI]
  Compiler[Deterministic compiler] --> Compact[DSH compaction transaction]
  DSH --> Compiler

The installable workspace bundle masks the inherited code runtime, stock compactor/pruner, and shipped preset roster. It then mounts Fabric's QuickJS provider, deterministic compaction engine, Fabric-owned presets, mesh provider, host projection, and client surfaces under seven composed rows. The Fabric mesh Consumer and the Fabric system-prompt overlay are NOT host rows: they mount inside the fabric preset itself, so their prompt surfaces stay fabric-scoped and no other preset's system prompt is touched. The Fabric-owned roster keeps the four pinned DSH modes and adds a fifth, fabric: Fabric mode composes the same Code Mode SDK presentation as code (PTC) under its own preset identity, so Fabric sessions record and display as Fabric mode instead of reusing PTC mode.

Packages

PackageResponsibility
[dsh-fabric-protocol](packages/protocol)Host-independent participant, activity, topology, mesh, and actor records.
[dsh-fabric-compaction](packages/compaction)Deterministic summary compiler, DSH CompactionEngine, and masked preset roster.
[dsh-fabric-host](packages/host)Durable-event adapter and bounded session projection.
[dsh-fabric-system-prompt](packages/system-prompt)Fabric-owned system prompt override and native-prose minimization.
[dsh-fabric-mesh](packages/mesh)Topics, CAS state, actor mailboxes, and the fabric_mesh Consumer.
[dsh-fabric-schema](packages/schema)Schema-enforced world state, evidence digests, and fail-closed certification: state_* Timeline/CAS head, complexity ledger, goal predicate, and schema_* hypothesis → certificate → commit workspace transactions with enforce/audit modes.
[dsh-fabric-code-runtime-quickjs](packages/code-runtime-quickjs)Checked QuickJS CodeRuntime provider with execution budgets.
[dsh-fabric-client-ui](packages/client-ui)Browser Activity, Topology, popup metrics, and subagent navigation.

Install

Requirements: Node.js ^22.19.0 || >=24, pnpm 11, and DSH 0.1.0-rc.7.

Clone the repository and install it into your local DSH web profile:

git clone https://github.com/monotykamary/dsh-fabric.git
cd dsh-fabric
pnpm install
pnpm run install:local

The installer builds all packages, links the bundle and its six packages, and validates the composed plugin graph. It does not start or restart DSH. The plugin graph takes effect on the next profile load.

<details> <summary><strong>Profiles, custom DSH homes, and uninstalling</strong></summary>

# Target another profile
pnpm run install:local -- --profile tui

# Target another DSH home
DSH_HOME=/path/to/dsh-home pnpm run install:local -- --profile web

# Reuse existing build output
pnpm run install:local -- --skip-build

# Restore the exact dependency specifications that existed before install
pnpm run uninstall:local

Use the same --profile or DSH_HOME selection when uninstalling. Without its ownership-state file, the uninstaller refuses to remove packages unless this checkout's exact local links prove ownership.

</details>

System prompt and DSH masks

Installing the bundle replaces the verbose native DSH prompt prose with a minimized Fabric operating prompt:

  • A fabric:system-prompt section (right after the persona) captures pi-fabric's well-tuned long-horizon disciplines — durable fabric_mesh coordination, deterministic compaction recovery, Code-Mode economy, delegation fan-out, and error recovery — adapted to DSH's run_code, fabric_mesh, subagent, and workflow surfaces.
  • A system-prompt/assemble waterfall listener drops the native per-tool guidance one-liners whose content the tool schemas already carry, while preserving the persona, plan policy, cordis toolset guidance, subagent reporting, the Code-Mode SDK/collapse sections, and the mesh guidance. Tool schemas and the runtime-context snapshot are never filtered.
  • DSH's todo ledger and goal system (todo_write, create_goal/get_goal/update_goal, /goal, the goal round driver, and the goal bar) are masked. Long-horizon objectives and progress belong in fabric_mesh instead of same-session todo/goal records.
  • Fabric memory/recall composes DSH's native session-query tools (session_search, session_event_search, and the session_trace/session_event_trace/session_event_read readers) over a durable SQLite FTS5 index, with fabric:memory-guidance prompt guidance for re-establishing dropped context after /compact.

The fabric_mesh tool

One Consumer exposes durable coordination through a compact action protocol:

PrimitiveActionsGuarantee
Topicscreate_topic, publish, read_topic, prune_topicStorage-backed ordered messages with explicit retention.
Stateget_state, cas_stateRevision-checked updates; revision 0 creates an absent key.
Actorscreate_actor, send_actor, read_mailboxDurable command queues addressed to stable actors.
Claimsclaim_actor_message, settle_actor_messageToken-fenced settlement and replay-safe terminal outcomes.
DiscoverysnapshotBounded metadata for rediscovering durable coordination state.

Actor claims are deliberately crash-conservative. A claimed command stays claimed after process failure, settlement requires the opaque claim token, and retrying the same settlement returns the stored result rather than executing twice.

Mesh records are isolated by one workspace identity shared by prompt assembly and tool execution: registered workspace membership or canonical path ownership takes precedence, followed by an unregistered path digest and finally a session-only scope when no cwd exists.

Compaction and continuation

Fabric becomes the only composed compaction backend while preserving DSH's /compact command, durable transaction, token meter, and backend-independent invariants.

  • Typed messages and lifecycle events compile into bounded Session Goal, Files and Changes, Fabric Activity, Outstanding Context, Earlier Turns, Current Status, and recent-transcript sections.
  • Reasoning blocks are erased; tool calls and results remain paired by exact identity.
  • Each compaction reconstructs cumulative facts from immutable source-event citations instead of recursively trusting prior checkpoint prose; strict snapshots remain bounded diagnostic and detached-caller artifacts. A 100,000-event traversal cap degrades with an explicit omission notice rather than permanently failing /compact.
  • Mesh contributes bounded metadata — never arbitrary payloads — so durable identifiers can be rediscovered after compaction.
  • Guidance requires rereading durable state after compaction or TOOL_OUTCOME_UNKNOWN instead of trusting conversational memory.

See [ADAPTATION_SWEEP.md](ADAPTATION_SWEEP.md) for the reuse matrix, acceptance evidence, and deferred parity surfaces.

Client surfaces

Fabric adds a conversation tab with:

  • a chronological Activity view for agent, workflow, mesh, and compaction events;
  • a left-to-right Topology tree: Main → Participants → {Sessions, Agents, Actors} and Main → Mesh → {Topics, State};
  • dashed traffic overlays for topic publication, actor routing, and state access rather than message nodes in the hierarchy;
  • deterministic arrow-key or H/J/K/L navigation with focus-aware scrolling;
  • a compact header popup containing participants only;
  • native navigation to authoritative DSH sessions.

FabricParticipantRecord is the portable semantic identity used by the UI. The DSH session mirror and Fabric actor records remain lifecycle authorities; the adapter does not introduce a second executor, registry, or client business-state store. Workflow, phase, message, and compaction facts remain available in Activity without crowding the topology.

Business state remains in DSH and storage-domain. Client-local state is limited to view selection, filters, expansion, and viewport state.

Client HMR

Hot reload requires both watchers:

1. The DeepSeek Harness checkout serving the GUI runs pnpm run dev:web. 2. This workspace runs pnpm run watch:client to rebuild packages/client-ui/lib/client.js.

A running server alone does not compile this repository, and the first installation of a new profile row requires a later profile load.

Development

pnpm install
pnpm run check

pnpm run check type-checks, builds, tests, and verifies the complete workspace. The QuickJS provider enforces fresh contexts, JSON bridge validation, deadlines, cancellation, memory/stack/output budgets, and quiescent disposal.

Current scope

This is a focused DSH adaptation, not literal pi-fabric parity. Known constraints include:

  • New mesh activity uses DSH-native tool/result.meta and tool/code-dispatch events. Only legacy logs written with the retired required fabric/activity event remain incompatible with DSH 0.1.0-rc.6's static persisted-event allowlist.
  • Mesh records written before workspace scoping remain stored but are deliberately invisible to workspace-bound reads; automatic migration would guess an ambiguous destination, so any re-key must be an explicit operator action.
  • The current DSH CodeRunRequest omits the generated SDK declaration prelude, so QuickJS checks namespace/member existence and normal TypeScript semantics while ToolRuntime remains the authoritative argument/result validator.
  • Actor mailboxes provide durable claim/settle semantics, not an always-resident autonomous actor host.
  • Fabric-owned presets are pinned adaptations of DSH 0.1.0-rc.6 and must be reviewed on host upgrades.
  • Memory/recall is DSH session-query composed into the fabric preset, not pi-fabric's tiered transcript index: regex query mode, pi's Fabric-operation filters, and a session-list browse tool are not ported.

Acknowledgments

License

MIT © Tom Nguyen. See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).