# dsh-gpt56-ptc [![CI](https://github.com/Exception-H/dsh-gpt56-ptc/actions/workflows/ci.yml/badge.svg)](https://github.com/Exception-H/dsh-gpt56-ptc/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![DSH](https://img.shields.io/badge/DSH-0.1.0--rc.8-orange.svg)](https://github.com/deepseek-ai/deepseek-harness) [![DSH Plugin](https://img.shields.io/badge/GitHub%20Topic-dsh--plugin-24292f.svg)](https://github.com/topics/dsh-plugin) [![PTC](https://img.shields.io/badge/tool%20mode-Code%20Mode-6f42c1.svg)](docs/DESIGN.md) English | [简体中文](README.md) A native DeepSeek Harness Profile Bundle that creates a genuine user-owned custom preset named **GPT-5.6 PTC** for `gpt-5.6-sol`, `gpt-5.6-terra`, and `gpt-5.6-luna`. The preset retains the complete official Code composition and a session-stable SDK, then adds a compact trajectory contract for bounded scope, acceptance evidence, stopping, efficient programmatic tool use, and plain-language communication. It leads with concrete outcomes and cause-and-effect, explains necessary technical terms on first use, and preserves exact names only where they help the user act. The user selects the model when creating a session. This project performs no automatic routing, in-session model switching, Native/PTC switching, or per-turn SDK trimming. > Status: experimental `0.1.2`. The composition and installer target `@deepseek-ai/dsh` `0.1.0-rc.8`; every DSH upgrade requires fresh install, collision, rollback, and standing-mount validation. > > Unofficial community project: independently developed and maintained, without endorsement, review, or affiliation by DeepSeek or OpenAI. ## One-command install From the repository root: ```powershell dsh plugin --profile web add . ``` The recommended public install pins the immutable `v0.1.2` Release artifact: ```powershell dsh plugin --profile web add https://github.com/Exception-H/dsh-gpt56-ptc/releases/download/v0.1.2/dsh-gpt56-ptc-0.1.2.tgz ``` The fixed Git tag is also installable: ```powershell dsh plugin --profile web add github:Exception-H/dsh-gpt56-ptc#v0.1.2 ``` In rc.8, plugin management lives under `dsh plugin`, not `dsh --profile web add ...`. The plugin command invokes `pnpm`, so `pnpm` must be available through `PATH`. Loadable Host JavaScript is checked in; no install-time build is required. The command first adds the Bundle to the `web` Profile. After the Web Profile restarts, the Host installer runs one safe publication flow: 1. if any root already supplies the final id `gpt56-ptc`, it stops with zero writes; 2. it generates an unpredictable temporary id and calls official `copy('code', stagingId, ...)` into the first `user` root; 3. it verifies staging trust, exact path containment, real-directory identity, and the composition file before replacing templates and calling `standingKeyFor(stagingId)`; 4. after staging mounts, official `copy(stagingId, 'gpt56-ptc', 'GPT-5.6 PTC')` conflict-safely publishes the complete final tree; 5. it verifies final hashes, calls `standingKeyFor('gpt56-ptc')`, and then marks the final copy `installed`; 6. it removes only the random staging id proven by this installation token. Once the final id is published, the installer never deletes it automatically. The default result is: ```text $DSH_HOME/.agent-presets/gpt56-ptc ``` The authoritative path is the result of `agentPresets.resolve('gpt56-ptc')`, because a deployment may configure a different user root. If any root already supplies `gpt56-ptc`, the installer preserves it and stops. It never adopts, overwrites, or deletes an existing preset. Resolve the collision through DSH's preset manager; never delete the whole `.agent-presets` directory. ## Use 1. Restart the DSH Web Profile. 2. Create a session and choose **GPT-5.6 PTC**; it should appear as a custom preset. 3. Manually choose `gpt-5.6-sol`, `gpt-5.6-terra`, or `gpt-5.6-luna`. 4. Keep the model fixed for that session; create or fork a session to change models. Running sessions retain the composition generation they mounted at creation. Installing, editing, updating, or deleting the on-disk copy never replaces a running session's prompt and tool contract halfway through. ## Design guarantees | Concern | Behavior | |---|---| | Model selection | Manual at session creation | | In-session model | Fixed; no automatic switching | | Tool presentation | Fixed pure Code Mode | | SDK | Generated from the official rc.8 Code rows and capabilities available on the current Host; stable for the session | | Persona | One static prompt, stable for the session | | Host routing | Unchanged | | Native/PTC switching | None | | Per-turn SDK trimming | None | | Sandbox and approvals | Still enforced by the DSH Host | | User directory | First successful activation creates one user copy; that copy is then user-owned | | Existing id | Never adopted, overwritten, or deleted | | Package update | Never silently rewrites the installed copy | | Package removal | Leaves the installed custom preset in place | ```mermaid flowchart LR B[dsh plugin add Bundle] --> C[official copy creates user preset] C --> V[atomic template replacement + standing mount validation] V --> P[user owns GPT-5.6 PTC custom preset] U[user manually selects Sol / Terra / Luna] --> P P --> T[fixed persona + official Code Mode rows] T --> H[DSH Host: route / schema / sandbox / approval] ``` The Bundle's Host row performs only the one-time staging-to-publication flow and mount validation. It does not own model routes, credentials, sandbox policy, approvals, persistence, or cross-session registries. See [Design](docs/DESIGN.md) and [Research](docs/RESEARCH.md). ## Requirements - DeepSeek Harness `0.1.0-rc.8`; - Node.js 20 or newer; - `pnpm` available to `dsh plugin` through `PATH`; - at least one configured target model: `gpt-5.6-sol`, `gpt-5.6-terra`, or `gpt-5.6-luna`. This project does not configure providers, credentials, default models, sandbox policy, or approval policy. ## Update, refresh the copy, and remove Update the Bundle: ```powershell git pull dsh plugin --profile web add . ``` After restart, the installer sees the existing custom preset and leaves it byte-for-byte unchanged. A Bundle update does not silently refresh user content; this is the snapshot ownership model of a locally authored preset. To explicitly adopt a newer template: 1. back up any local preset edits; 2. delete the specific `gpt56-ptc` custom preset through DSH's preset manager; 3. keep the Bundle installed and restart the Web Profile; 4. the installer creates the current template again; 5. manually merge any edits you want to retain. Remove only the Bundle: ```powershell dsh plugin --profile web remove dsh-gpt56-ptc ``` After restart, the Bundle row is gone, but the custom preset remains available to new sessions. For complete removal, delete `gpt56-ptc` through the preset manager first, then remove the Bundle. Never recursively delete the entire user preset root. ### Updating from v0.1.1 `v0.1.2` strengthens the plain-language communication contract. Because the installed copy has been user-owned since `v0.1.1`, updating only the Bundle never overwrites an existing `gpt56-ptc`. To adopt the new template, back up local edits and follow the explicit refresh steps above, or manually merge the new `Communication contract` into the existing copy. Running sessions retain their old prompt; new sessions read the refreshed copy. ### Migrating from v0.1.0 `v0.1.0` used an undocumented mutable-roots compatibility seam and presented package content as `system`. Updating to `v0.1.1` or newer and restarting removes that root injection and creates a genuine `user` copy. If a user preset with the same id already exists, it is preserved. Inspect it and choose whether to keep, rename, or delete it before asking the installer to create a new copy. ## Test ```powershell node --test pnpm pack --dry-run ``` The automated suite covers: - Bundle metadata, the Host installer row, and package contents; - both official staging-to-final `copy()` calls and exact user-root containment from `resolve()`; - zero writes for existing user or system ids; - byte-for-byte preservation across repeat activation and user edits; - staging and final-id copy races, out-of-root paths, file replacement, and both standing mounts; - token-owned staging cleanup before publication and preservation of the final tree after publication; - dual diagnostics when staging cleanup itself fails; - persona synchronization, fixed Code Mode, and absence of dynamic routing or tool trimming; - the pinned rc.8 composition suffix and documentation integrity. A real DSH standing mount remains the canonical composition check. See [Testing](docs/TESTING.md) for the complete install, collision, uninstall-persistence, and behavioral A/B matrix. ## Project structure ```text cordis.patch.yml DSH Profile Bundle installer patch lib/index.js one-time user-preset installer presets/gpt56-ptc/ self-contained installation template src/persona.md canonical GPT-5.6 persona tests/ installer, composition, and docs tests docs/ design, research, testing, and release notes .github/workflows/ GitHub Actions CI ``` ## Limitations - rc.8 has no dedicated external-package preset-import API. The installer uses official `copy()` to create the user directory, then edits that new copy's own files. It never mutates readonly roots. - Replacement is atomic per file, not one transaction across staging composition, metadata, and marker. Before publication, caught failures remove only a random staging id whose token still matches. A force-kill or ownership mismatch may leave an `installing` or `validated` staging directory; the installer will not risk deleting it automatically. - Official whole-directory `copy()` publishes the final id from an already mount-validated staging preset. Once that final directory exists, later failures never trigger automatic deletion. - The marker records first-install provenance, the random staging token, state, and baseline hashes. It is not an integrity proof and never authorizes future overwrite or deletion. - The Bundle entry relies on the pnpm-hoisted Profile created by rc.8 and the normal package key `dsh-gpt56-ptc`. Package aliases, other linkers/package managers, and future Profile layouts are outside the current support contract. - Prompting can reduce boundedness failures; it cannot repair provider incompatibilities, context limits, compaction loops, cache request bugs, backend latency, safety classifiers, or subagent routing defects. - Pure PTC retains a small wrapper cost for one-call tasks in exchange for a stable Code Mode surface. ## Current validation status | Check | Current evidence | |---|---| | Automated tests | 33/33 pass on Windows / Node.js 24, including the plain-language contract, persona sync, staging/final races, containment, states, cleanup, and Windows retries | | Package payload | The real `0.1.2` tarball contains only the Host entry, Bundle patch, both templates, and public release documentation | | Native isolated install | The real tarball installs through `dsh plugin --profile web add` from a path with spaces/non-ASCII characters and emits no package peer warning | | Runtime roster | Real rc.8 reports one `id=gpt56-ptc`, `trust=user`, no broken reason, and no staging row after normal success | | Cordis composition | Staging and final standing calls both succeed; the final marker becomes `installed` only afterward | | Collision and idempotence | A real existing user preset keeps identical hashes with no marker/staging; repeat Host activation preserves a user edit | | Removal persistence | After dependency/row removal, roster trust remains `user` and a new session mounts `gpt56-ptc` successfully | | Node 20/22 and Ubuntu/Windows | GitHub Actions matrix is configured; use the release commit's Actions run as remote evidence | | Sol/Terra/Luna behavioral A/B | Not yet claimed as validated effectiveness for `0.1.2` | Do not describe configured-but-unrun CI as passing, and do not claim model-quality improvement before publishing behavioral A/B traces. ## Contributing, security, and license Read [CONTRIBUTING.md](CONTRIBUTING.md) before proposing behavioral prompt changes. Report security issues according to [SECURITY.md](SECURITY.md). Licensed under [MIT](LICENSE). The composition is derived from the official DeepSeek Harness `code` preset; see [NOTICE](NOTICE.md). This is not an official OpenAI or DeepSeek AI project.