[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-107656":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":15,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":9,"pushedAt":28,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":14,"starSnapshotCount":14,"syncStatus":32,"lastSyncTime":33,"discoverSource":34},107656,"dsh-marktext","Roland0511\u002Fdsh-marktext","Roland0511","MarkText (muya) WYSIWYG Markdown editor for the DeepSeek Harness right sidebar",null,"JavaScript",389,14,39,0,180,826,73.34,"MIT License",false,"main",true,[23,24,25,26,27],"deepseek-harness","dsh","dsh-plugin","markdown","marktext","2026-11-23 08:51:30","2026-11-23 18:07:34","\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002FRoland0511\u002Fdsh-marktext\u002Fmain\u002Ficon.svg\" width=\"72\" alt=\"dsh-marktext icon\">\n\u003C\u002Fp>\n\n\u003Ch1 align=\"center\">dsh-marktext\u003C\u002Fh1>\n\n\u003Cp align=\"center\">\n  \u003Cb>Write Markdown the way it will look.\u003C\u002Fb>\u003Cbr\u002F>\n  MarkText's editor engine, living in the DeepSeek Harness right sidebar.\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fdsh-marktext\">\u003Cimg alt=\"npm version\" src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fdsh-marktext?color=cb3837\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fdsh-marktext\">\u003Cimg alt=\"npm downloads\" src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fdm\u002Fdsh-marktext?color=brightgreen\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRoland0511\u002Fdsh-marktext\u002Fstargazers\">\u003Cimg alt=\"GitHub stars\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002FRoland0511\u002Fdsh-marktext?style=social\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT\">\u003Cimg alt=\"License: MIT\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue\">\u003C\u002Fa>\n  \u003Cimg alt=\"DSH 0.2.1+\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDSH-0.2.1%2B-4d6bfe\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRoland0511\u002Fdsh-marktext\u002Factions\u002Fworkflows\u002Fpublish.yml\">\u003Cimg alt=\"publish\" src=\"https:\u002F\u002Fgithub.com\u002FRoland0511\u002Fdsh-marktext\u002Factions\u002Fworkflows\u002Fpublish.yml\u002Fbadge.svg\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"README.md\">\u003Cb>English\u003C\u002Fb>\u003C\u002Fa> · \u003Ca href=\"README.zh.md\">简体中文\u003C\u002Fa>\n\u003C\u002Fp>\n\n![dsh-marktext — the MarkText editor inside the DeepSeek Harness right sidebar](https:\u002F\u002Fraw.githubusercontent.com\u002FRoland0511\u002Fdsh-marktext\u002Fmain\u002Fdocs\u002Fassets\u002Fscreenshot-dsh.png)\n\n**Click a `.md` in the sidebar and it opens as the finished document** — headings, tables, math, diagrams and images, all editable in place. No split pane, no source-and-preview dance. Save with `⌘S`; the file goes back to disk through a version guard, so you never overwrite someone else's edit.\n\n> MarkText is an Electron desktop app. This plugin doesn't ship its shell — it takes the editor core MarkText extracts ([`@muyajs\u002Fcore`](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@muyajs\u002Fcore) \u002F muya, MIT) and adds only the DSH integration. Everything runs locally.\n\n## Why it feels different\n\n- **✍️ You edit the document, not the source.** Markdown markers stay hidden; headings, lists, tables and quotes are real elements. Put the caret in a table cell and fix the cell, not a row of pipes.\n- **📊 Diagrams and math just render.** KaTeX, Mermaid, Vega and PlantUML ship with the plugin and load on demand — offline, no CDN, no account.\n- **🖼️ Images land where you expect.** `![](assets\u002Fdiagram.png)` resolves against the document's own folder, so docs written in your editor look right here.\n- **💾 Saving is boring, in the best way.** Autosave 2.5 s after you stop typing; `⌘S` saves immediately; a changed file on disk means a conflict banner, never a silent overwrite.\n- **🌗 It looks like DSH.** Light and dark follow the host, and the editor never adopts a foreign theme.\n- **⌨️ Your fingers already know it.** `⌘Z` \u002F `⇧⌘Z` undo and redo, `⌘S` saves, `⌘F` finds — nothing to relearn.\n\n## Install in one line\n\n```sh\ndsh plugin --profile web add dsh-marktext\n```\n\n**Using the Desktop app?** Open **Plugins → Add plugin → Install a third-party plugin**, enter `dsh-marktext`, click **Enable now**, then restart the app once. (The desktop profile is managed by the app, so the CLI line above is for `dsh web` only.)\n\n\u003Cdetails>\n\u003Csummary>Manual install, GitHub install, requirements\u003C\u002Fsummary>\n\n**Manual (desktop profile)** — edit `~\u002F.dsh\u002Fprofiles\u002Fdesktop\u002Fpackage.json`:\n\n```jsonc\n{\n  \"dsh\": { \"profile\": { \"bundles\": [..., \"dsh-marktext\"] } },\n  \"dependencies\": { ..., \"dsh-marktext\": \"^0.1.11\" }\n}\n```\n\n```sh\ncd ~\u002F.dsh\u002Fprofiles\u002Fdesktop && pnpm install\n```\n\nThen restart the app.\n\n**From GitHub instead of npm:** `github:Roland0511\u002Fdsh-marktext` works anywhere a package name does — the built renderer is committed, so there is no build step.\n\n**Requirements:** DeepSeek Harness **0.2.1+** (`ctx.sidebarRightTabs`, `ctx.slots`, `ctx.fs`, `ctx.webServer`). Node 20+ only if you build from source.\n\n\u003C\u002Fdetails>\n\n## What you get\n\n| | |\n|---|---|\n| **Open any Markdown**\u003Cbr\u002F>`*.md`, `*.markdown`, `*.mdown`, `*.mkd` in the sidebar open in an editing tab. | **Real editing**\u003Cbr\u002F>Tables, code blocks, quotes, task lists — direct manipulation, not text surgery. |\n| **Math & diagrams**\u003Cbr\u002F>KaTeX inline\u002Fblock, Mermaid, Vega-Lite, PlantUML, Prism highlighting. | **Version-guarded saves**\u003Cbr\u002F>Optimistic concurrency; conflicts surface instead of clobbering. |\n| **Relative images**\u003Cbr\u002F>Resolved against the document folder through a per-document token. | **Links between files**\u003Cbr\u002F>`[next](next.md)` opens in another MarkText tab, not as raw text. |\n| **Native shortcuts**\u003Cbr\u002F>`⌘S` · `⌘Z` · `⇧⌘Z`, autosave, and a dirty-state dot in the toolbar. | **Follows DSH**\u003Cbr\u002F>Light\u002Fdark theme, locale, and the host's own sidebar chrome. |\n\n## Under the hood\n\n```\nDSH Web (React)\n  lib\u002Fclient.js  ── sidebar tab kind `marktext` (patterns: *.md)\n      │             tab body = \u003Ciframe src=\"\u002Fdsh-marktext\u002Frenderer\u002F\u003Ctoken>\u002Findex.html\">\n      │ postMessage (single envelope: __dshmkt)\n      ▼\nrenderer\u002F (standalone Vite build, contains muya + mermaid)\n      │ fetch\n      ▼\nlib\u002Findex.js (host plugin)\n  · \u002Fdsh-marktext\u002Frenderer\u002F\u003Ctoken>\u002F*   static assets; misses fall back to the document folder\n  · \u002Fdsh-marktext\u002Fapi\u002Fopen|save|stat   through ctx.fs; save requires baseVersion\n```\n\nThe editor runs in an iframe on purpose: muya declares its CSS variables on `:root` and appends floating toolbars to `document.body`, so inlining it would leak styles into the host. The iframe isolates all of that; only document, theme and save calls cross the boundary.\n\n\u003Cdetails>\n\u003Csummary>Message protocol (v1) and the file-policy fallback\u003C\u002Fsummary>\n\nEnvelope: `{ __dshmkt: true, dir: 'down' | 'up', type, content }`\n\n| Direction | type | content |\n|---|---|---|\n| down | `doc` | `{ path, displayPath, text, version, dark, locale }` |\n| down | `saved` | `{ version }` |\n| down | `save-error` | `{ code, message }` |\n| down | `theme` | `{ dark }` |\n| up | `ready` | — |\n| up | `dirty` | `{ dirty }` |\n| up | `save` | `{ text, baseVersion }` |\n| up | `reload` | — |\n| up | `open-external` | `{ href }` |\n\n**Saving and the file policy.** The normal path is `ctx.fs.writeText(target, text, { kind: 'replaceIfVersion', version })`; a stale version returns `FS_STALE_VERSION` and the UI shows a conflict banner. If the host policy refuses the write (`FS_SANDBOX_DENIED`, e.g. `workspace-write` \u002F `read-only`), the save falls back to Node's `fs.writeFile` **with the version guard intact** — the version is checked before and re-read after. Real OS errors (`EACCES` \u002F `EPERM`) still surface as-is.\n\n\u003C\u002Fdetails>\n\n## Troubleshooting\n\nIf a `.md` opens but the tab says something like \"no viewer available\", the client half didn't register its tab body. Read the registration report:\n\n```sh\ncurl -s http:\u002F\u002F127.0.0.1:\u003CDSH-port>\u002Fdsh-marktext\u002Fapi\u002Fdiag | python3 -m json.tool\n```\n\n`typeRegistered`, `bodyRegistered` and `errors` point at the failing step.\n\n## FAQ\n\n**Is this the MarkText app?** No. It's MarkText's editor core (muya) wrapped for DSH — no Electron, no desktop shell, no second app to install.\n\n**Will it reformat my file?** It saves what the editor serializes, which is standard CommonMark\u002FGFM. The version guard is what protects you: if the file changed underneath, you get a conflict, not a silent rewrite.\n\n**Does it work offline?** Yes — every asset, font, diagram engine and syntax highlighter ships with the plugin.\n\n**Does it fight with other Markdown plugins?** Both it and `dsh-markdown-typora` claim `*.md` in the `extension` band, so install one of them, not both.\n\n**Known limits:** absolute image paths (`\u002Fabs\u002Fa.png`, `file:\u002F\u002F`) aren't resolved yet; no \"insert selection into chat\"; no PDF export. Package size ≈4 MB tarball; first paint ≈1.6 MB.\n\n## Development\n\n```sh\nnpm install\nnpm run build:renderer            # writes renderer\u002F (committed; only needed when src\u002Frenderer changes)\nnpm test                          # host routes, version guard, traversal, origin fence, client registration\nnode scripts\u002Fverify-renderer.mjs  # headless Chrome: open → render → save → disk\n```\n\n## Release\n\nPublishing uses **npm Trusted Publishing (OIDC)** — no token or secret in the repo. Every push to `main` runs tests, verifies the committed `renderer\u002F` matches `src\u002Frenderer\u002F`, publishes only when the version is new, and creates a **GitHub Release** (`v\u003Cversion>`, generated notes).\n\n```sh\nnpm version patch --no-git-tag-version\ngit commit -am \"chore: release x.y.z\"\ngit push\n```\n\n## Star history\n\n\u003Ca href=\"https:\u002F\u002Fwww.star-history.com\u002F?type=date&repos=Roland0511%2Fdsh-marktext\">\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fapi.star-history.com\u002Fchart?repos=Roland0511\u002Fdsh-marktext&type=date&theme=dark&legend=top-left\" \u002F>\n    \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fapi.star-history.com\u002Fchart?repos=Roland0511\u002Fdsh-marktext&type=date&legend=top-left\" \u002F>\n    \u003Cimg alt=\"Star History Chart\" src=\"https:\u002F\u002Fapi.star-history.com\u002Fchart?repos=Roland0511\u002Fdsh-marktext&type=date&legend=top-left\" \u002F>\n  \u003C\u002Fpicture>\n\u003C\u002Fa>\n\n## License\n\nMIT — see [LICENSE](LICENSE). Third-party components and MarkText attribution: [NOTICE.md](NOTICE.md).\n","dsh-marktext 是一款专为 DeepSeek Harness（DSH）设计的右侧面板内嵌式 Markdown 所见即所得（WYSIWYG）编辑器插件。它基于 MarkText 的核心渲染引擎 muya，提供无源码分屏的实时富文本编辑体验，支持数学公式（KaTeX）、流程图（Mermaid\u002FPlantUML）、图表（Vega）及本地路径图片的原生解析与编辑，所有渲染离线完成。编辑状态与文件系统双向同步，具备冲突提示、自动保存和主机主题跟随等特性。适用于在 DeepSeek Harness 环境中高效编写、预览和协作维护技术文档、API 说明、笔记等结构化 Markdown 内容。",2,"2026-11-24 04:32:32","CREATED_QUERY"]