# dsh-notepad **Repository Path**: xujintao1985/dsh-notepad ## Basic Information - **Project Name**: dsh-notepad - **Description**: A notes page for DeepSeek Harness. It adds one Notes entry to the left sidebar; choosing it opens a full-height notebook in the main column. - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-11-26 - **Last Updated**: 2026-11-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Notes A notes page for DeepSeek Harness. It adds one **Notes** entry to the left sidebar; choosing it opens a full-height notebook in the main column. ## What it does - **New note** creates an empty note, selects it, and puts the caret in the title. - Selecting a row opens that note; the title and body save automatically about half a second after you stop typing, and the footer shows the save state. - The search field filters the list by title and body. - The trash control on a row asks for one confirmation, then deletes the note. A deletion is written at once instead of waiting for the debounce. - Switching to another main panel does not lose a pending edit: the notebook store outlives the component and its debounce keeps running. Unloading the plugin sends a pending edit with `keepalive`. ## Where notes live Notes are one JSON document on this machine: ``` $DSH_HOME/notepad/notes.json # default: ~/.dsh/notepad/notes.json ``` The Host half (`index.js`) reads and rewrites that file atomically (temporary file plus rename), so a crash never leaves a half-written notebook. The file is plain JSON; you can copy it, back it up, or read it outside Harness. If the file exists but cannot be read as a notebook, the read reports the failure with the file path and every save is refused with `409` instead of replacing data the page cannot show. The route both halves share is `GET`/`POST /plugin/notepad/notes`. Both methods require an authenticated browser of this listener: the Host applies `connection.requestRejection`, the same Host/Origin fence the shipped `/api` transport uses, so another origin cannot read or overwrite the notebook. ## Limits - Notes are not attached to a Session and are never sent to the model. - One document: if two browser windows edit at once, the last save wins. - At most 500 notes, 200 KiB of body per note, and 16 MiB per save request. - If the file is not valid JSON, the page shows the read error and the file path instead of overwriting it. Repair or remove the file, then choose Retry. - Turning the plugin off hides the sidebar entry and keeps the file. ## Checks Two dependency-free scripts exercise the contract with Node: ``` node test/host.test.mjs # routes, trust fence, limits, atomic write, 409 guard node test/client.test.mjs # module registration, dictionaries, slot wiring, style discipline ```