dsh-bugwiki
Bugwiki Markdown memory graph tools and guidance for DeepSeek Harness
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:phillui-37/dsh-bugwiki说明文档
阅读完整 README ↗dsh-bugwiki
A DeepSeek Harness plugin with a small web settings client. The host plugin reads a local Bugwiki Markdown graph and injects DSH-specific memory guidance. It can optionally detect and use the matching installed upstream SKILL.md instead of its own prompt guidance. It reuses the committed Bugwiki upstream as the upstream/ Git submodule, pinned to d28e4cb755f327eb049e912417933ed985da5aac. All adaptation lives in this repository. The submodule stays unchanged, including its MIT copyright notice.
How it works
Loading the plugin registers its guidance and tools; it does not run wiki maintenance in the background. Wiki operations start only when an agent calls a tool. Dream export is registered only when both DSH session services are available. It processes selected session text and tool events, excluding system instructions, reasoning, and binary attachments.
Architecture
flowchart LR
Host["DSH host"] --> Plugin["dsh-bugwiki plugin: guidance and tools"]
Plugin --> Read["Node.js direct file read"] --> Wiki["Local Bugwiki graph"]
Plugin --> Helper["Pinned upstream helper via Bash; shell disabled"] --> Wiki
Host -. optional services .-> Sessions["DSH sessions and sessionPersistence"]
Plugin -. explicit export tool .-> Sessions
Sessions --> Exporter["Bundled Python dream exporter"] --> Output["Optional raw input export and watermark"]
Operation flow
flowchart TD
Load["Plugin loads"] --> Register["Register guidance and wiki tool"]
Register --> Call{"Agent calls a tool?"}
Call -->|No| Idle["No wiki command runs"]
Call -->|Yes| Validate{"Action and path valid?"}
Validate -->|No| Error["Return validation error"]
Validate -->|read| Direct["Read local file; bound output"]
Validate -->|other action| HelperRun["Run pinned helper; bound time and output"]
Direct --> Result["Return JSON result"]
HelperRun --> Result
Register --> Services{"Both session services available?"}
Services -->|No| Unavailable["Dream export tool not registered"]
Services -->|Yes| Dream["Register explicit-session export"]
Dream --> IDs{"Explicit session IDs supplied?"}
IDs -->|No| Error
IDs -->|Yes| DryRun{"dryRun? Default true"}
DryRun -->|Yes| Preview["Run without writing export files"]
DryRun -->|No| Write["Write selected raw inputs and watermark"]
Preview --> Review["Human review before graph promotion"]
Write --> Review
Requirements and installation
DSH >=0.2 [arguments]. Supported commands are init, new (or new fact ), index, find, show, list, lint, verify, stale, and housekeep. These maintenance commands can write the selected wiki; run them deliberately. For example:
npm run wiki -- --home /absolute/wiki new dsh meaningful-incident
npm run wiki -- --home /absolute/wiki verify
npm run wiki -- --home /absolute/wiki lint
Use the generated templates, including oneliner. Upstream find can exit nonzero when a content match lacks oneliner; the adapter preserves that failure instead of hiding it. Upstream show prints graph metadata, not the full body; use tool action read for content. Supersession display follows up to ten hops; cyclic/ambiguous or longer chains require explicit review. Upstream docs and example assets retain their original historical examples; runtime instructions and initialization do not bind to Alma.
When DSH's sessions and sessionPersistence services are available, the bugwiki_export_dream tool is registered. It accepts explicit sessionIds and an optional dryRun (default true). It reads live DSH sessions through the session service and historical sessions through session persistence, converts their actual text/tool events into canonical JSON, and invokes the bundled upstream dream-export.py. Set dryRun: false to write raw inputs and the upstream watermark. Python 3 is required; select pythonExecutable in settings. maxInputBytes defaults to 8 MiB and cannot exceed 64 MiB. Timestamps preserve the event instant in UTC. Reasoning, system instructions and binary attachments are excluded. Exported text requires review before promotion to the graph. Interrupted writes may be partial. No Alma database or source adapter is used. No scheduled tasks, global prompt promotion, auto-commit, or auto-publication is included.
Development and verification
Install the declared peer dependencies in an isolated development environment, or link them read-only from the matching DSH checkout into this repository's ignored node_modules/@deepseek-ai/. Development used the local DSH checkout's actual built dsh-tools, schemastery, and cordis packages rather than mocking their imports. Do not copy SDK source into this package.
npm run check
npm test
npm pack --dry-run --json
Tests execute the real pinned upstream helper in temporary directories inside this repository, including paths with spaces. They cover the registered tool's observable read contract, literal search versus a regex-like decoy, full-page reads, lifecycle disposal, traversal/symlink/edge rejection, bounded output, cancellation, timeout, failed verification, and DSH initialization guidance. They do not install into a live profile, invoke a language model, or claim browser-level settings validation. An earlier DSH app boot with SettingsForms and ConfigEditor verified 17 configurable fields, persisted changes, rejected invalid values and restoration after restart. The followUpstreamSkill setting and skill resolver were added afterward and are not covered by that baseline result. The registered dream tool also completes a dry-run against a real DSH SessionStore.
src/index.js owns tool/settings/prompt registrations; src/wiki.js owns safe argument handling, graph reads and process execution; src/skill.js detects the optional matching upstream skill; src/cli.js provides explicit maintenance. cordis.patch.yml, locale files and icon form the installable host bundle. All files are ESM JavaScript; no build step is needed. MIT applies to this adapter; upstream/LICENSE applies to the vendored submodule. src/dream.js owns DSH session conversion and the upstream export process. Dream tests use real DSH SessionStore events and the actual Python exporter; the historical persistence handle is a controlled fixture, so full disk persistence integration is not claimed.