DeepSeek Harness Plugin

Missher12/Missher-MSE-Learning

Stars ★ 0 Category Memory Added 2026-10-16

Persists scoped user corrections and method candidates for DSH with bounded recall and restart-safe completion settlement.

Install

# from a prebuilt release tarball

dsh plugin --profile web add -w "https://github.com/Missher12/Missher-MSE-Learning/releases/download/v0.9.0-alpha.18/missher-dsh-mse-learning-0.9.0-alpha.18.tgz"

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:Missher12/Missher-MSE-Learning

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

MSE Learning · 持久学习(品牌插画)

MSE learns reusable corrections and failure lessons for DSH. 1.5.0 looks up relevant experience when a task becomes active in the plan. Native writes and replacements also check saved user rules before changing gradients, colors, layout, typography, motion, or project configuration. When a new rule fits the budget, the first edit waits for the next model step to receive the reminder.

Format 6 uses bounded pages without total-count caps on entries, failure problems, revision history, or live dedupe identities. Per-row fields, evidence, and hot state remain bounded; pages stay within 256 KiB and the manifest and other objects within 2 MiB. The complete request history is retained; 96 rows remain only the hot projection. Older format 3/4/5 stores remain readable, pure reads preserve their original bytes, and the first real write migrates recoverably. Export and archive use a directory bundle containing the manifest and data pages, and recovery validates all references first. Recall scoring and order, plus the limit of two methods and one warning, are unchanged.

Opening and mid-turn recall share 512 estimated tokens by default, with an integer Token budget from 128 to 16,384 in the ordinary settings page. Legacy byte settings below 768 B stay in effect until a Token value is saved; older settings at 768 B or above keep the existing 512 Token default. Recall policies activate or roll back based on observed evidence.

Checks run one restricted snapshot through a native tool and require Python plus a host sandbox reporting full read-only enforcement. Exit code 0, hard-coded success, cancellation, stale versions, and unpaired results do not establish a pass. Other Python scripts and business contracts remain unverified.

Resumption requires an admitted native source, matching failure turn, and the exact original route; another session's model is never borrowed. Format 6 pages stay within 256 KiB, while the manifest and other objects stay within 2 MiB. Formats 3/4/5 migrate atomically on the first real write while pure reads preserve original bytes. Keep older binaries disabled after rollback; never let them write the new encoding or replace new facts with an old backup.

Targets: Windows, macOS, and Linux on x64/ARM64, Node ≥22.19. Core OS checks and DSH host acceptance are documented separately in platform validation.

Open Settings → Self-evolution to review six pages. Read-only views make no model calls. Background work may incur charges; unknown-cost calls are never replayed automatically.

In the DSH command bar, /mse <experience> saves the exact text as a project rule. Put --when "situation" before the experience to give recall a short ranking hint of up to 160 UTF-16 code units. Put --global first to select global scope. Task-specific instructions are refused and repeated submissions return the original record.

Bare /mse attempts to extract one rule from the user's words in the just-finished task, using the current model route once. It explains any refusal caused by unclear evidence, unverified scope, or incomplete output.

Learning outcomes

Reusable corrections can carry into a later session. In a controlled DSH comparison, an adaptive policy recovered two missed matches, injected 149 bytes in a new session once qualified, and stopped offering the method after the failure recurred. Examples and reproducible evidence

See the publication record and validation record.

MSE learns standing corrections and lessons from actual failures in DSH. 1.2.2 preserves the existing learning store, settings, and five-page interface. Building on 1.2.1, it lets a fresh v2 candidate gather independent evidence beside legacy v1 observation history; the old evidence stays intact, one failure is not counted twice, and isolated policies remain protected. The first effective step 1 still combines the turn-fact and route writes in one transaction while retaining file and directory sync durability. The adaptive recall page shows recent persisted decisions and bounded native-event diagnostics. Diagnostics contain only fixed reasons and shortened identifiers; they omit content, commands, and paths, and clear on restart. Store capacity remains bounded and old lessons are never deleted automatically. The two-method, one-warning, 768 UTF-8 byte limit remains in effect. The host reports the installed version.

Ordinary user corrections no longer require a remember keyword. Suspected corrections enter a bounded, source-bound extraction after the turn; concrete reusable rules persist and recall in later related sessions/projects. Negations and project limits are retained; one-off requests, questions and quoted logs are not automatically promoted. The status page shows saved, pending and ignored extraction results. This uses the existing learning model route and switches, not a model call for every message.

Explicit user corrections persist across sessions and projects, with project constraints retained. Two independent failures can produce a concrete unvalidated lesson. Opening recall, relevant work stages, and the first concrete failure share the same per-turn budget, with at most 2 methods and 1 guard warning. Attributed recurrence requests a material revision or retires an ineffective version. Daily consolidation runs while idle after local 23:00, with durable processing boundaries and catch-up.

The slim runtime preserves source model routes, a single background slot, bounded calls, durable pause and unknown-cost no-replay. It does not self-award validated status or enable paid evaluation. Objective results can include JSON parsing, precisely paired Node test runner output and TypeScript --noEmit checks. Only real foreground calls with supported exact commands and matching result evidence are counted; MSE does not run extra checks. Each result proves only its own check, while assistant success claims, wrapper commands, zero-test runs and arbitrary exit0 do not verify the full task.

Use Settings → Self-evolution to inspect memory, recurrence, checks, daily summaries and waits. Read-only views do not call models. Background reflection can incur model charges and preserves existing switches.

The new memory-v1.json imports legacy lessons-v1.json read-only; retain original state and package/config backups. Historical problems and spending remain in the original file. Old unvalidated candidates are not promoted by migration. Daily quota fields are ignored; the old evaluation/merge/renewal pipeline is outside the new package.

Layout: rebuild/ holds the whole runtime closure, UI panel and test; src/ keeps only its direct pure helpers; adapters/dsh/usage.mjs parses host usage; scripts/ cover packing, the publication allowlist and package verification; PUBLICATION.md/VALIDATION.md carry the current publication and validation records. Superseded code, old docs and images stay in Git history only. See migration and limits. Relevant checks use node --test rebuild/rebuild.test.mjs and node scripts/verify-package.mjs. Offline fake-provider evidence is not proof of long-term live-model effectiveness.

As of rebuild.23 the settings entry is named "Self-evolution"; only the display name changed, with learning behavior unchanged. rebuild.24 only cleans the public work tree (superseded core, tests, docs and the Hermes adapter leave the tree but stay in Git history), syncs the packing-script assertions and adds the official DSH badge; the 18 runtime modules are byte-identical.

Historical 0.16.0-rc.3: adds bounded, host-attributed prior-turn context (≤2 ended turns, ≤4 items, each ≤512, total ≤1536 UTF-16) used only to resolve references and project/temporary conditions; durability and scope are decided separately (durable methods may stay global, explicit project constraints stay scoped, durable+uncertain scope is kept as a readable project rule instead of being dropped, explicit temporary/one-off is refused), mixed messages are decided per correction, and a minimal decisions audit records why/where (current message or which prior turn) and the saved/ignored reason. Plugin/MSE-sourced text, tool output and outside-workspace material are excluded whole. 0.16.0-rc.2 keeps the rc.1 version-bound evidence and adds NATURAL-GATE-FIX: ordinary-correction admission reads REAL prohibition words through Node's built-in ICU word segmentation (Intl.Segmenter). The 别 inside 分别/区别/类别/识别/特别/别的/别人 is no longer a negation, and the SAME recognition is used for source and candidate. A positive clarification is an inversion only when it re-asserts the banned ACTION (拿…代替 / 重复运行…), not merely because it mentions the same object; real negations, object reversal and project/temporary scope stay strict. 0.16.0-rc.1 adds version-bound evidence and a bounded failure-method history. The learning store format is 4 (format 3 stays READ-compatible; the first real write migrates atomically). Each lesson keeps a current-edition window (injections / matched recurrences / check passes and fails, coverage complete or since_upgrade) separate from its family totals, and the old "3 family recurrences stop the lesson forever" rule is removed. A late checker or recurrence settles only the exact edition that was injected; a failed edition is recalled as a concrete guard warning, never as a recommended method. methodHistory is bounded to 128 rows of ≤6144 UTF-8 bytes each while the method-history ledger keeps its own 2 MiB cap; other learning data uses separate bounded chunks. Revision prompts carry at most 6 related rows / 1536 bytes, a literally repeated mechanism is refused (repeated_mechanism), and a real replacement archives the old edition, resets the window and clears evidenceHash in the same transaction. A capacity pre-flight uses the ACTUAL archived row (128 rows / 2 MiB) before the model call, and REVIEW-FIX2 forecasts the whole start transaction (request/audit/ticket/format migration/archive/result increments from shared schema bounds) so a legal near-capacity store waits readably instead of throwing at beginWork. Tool/checker/JSON-selection feedback shares ONE receipt/offered attribution rule (cancelled terminal, guard, missing and partial editions are never credited; unknown historical counters only start since_upgrade). An edition freezes its OWN bounded source snapshot at birth/revision (multi-source sets are kept whole; overflow stays explicitly unknown) and an archived edition can only copy its old snapshot; the old method body must pass that edition's source+material admission before it is sent to a provider. Guards name a bounded, admitted concrete failure pattern without replaying old repair steps or inventing checker failures. Revision commits re-check the live parent and every archived FAILED edition with the same case-sensitive mechanism key, and history rows are re-admitted by their own frozen provenance plus the current source guard (withdrawn/unknown sources become fixed reasons only); partial legacy snapshots can never gain a complete window or a recovered method, a cancelled turn refuses late checker credit (keeping a voided de-duplication proof), guard wording states only observed facts, and a legal instruction is archived byte-for-byte. scripts/replay-recall.mjs plus tests/fixtures/recall-cases.json are a developer-only offline replay of 24 hand-labelled regression cases (not a blind test): zero model calls, no live-store access, no default-ranking change, and never part of the runtime package.

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.