
Security News
GPT-6 Astra Attempts Supply Chain Attacks Against Open Source Maintainers in Testing
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.
dock-editor
Advanced tools
Text file viewer and editor for the dock file explorer: undo/redo, Ctrl+S save, and unsaved-change confirmation.
DSH 生态中最好的文本编辑插件 —— 没有之一。 在 DSH 里看代码、改配置、写文档,dock-editor 就是那个默认答案:撤销重做、Ctrl+S 保存、未保存提醒、二进制检测、窗口几何记忆,一个不少。别的查看器只会展示,dock-editor 让你真正动手改。
dock 系列的文件编辑器插件:注册 editor 文件查看器(默认查看器)与对应的编辑器区视图,通过自己的 /desk-editor 主机路由读写文件文本内容。

--dsw-alias-* 变量走。Ctrl+F 打开编辑器内搜索浮窗(右上角)、Ctrl+H 带替换、F3/Ctrl+G(Shift 反向)跳转、Esc 关闭。搜索框是独立浮层(非 CM showPanel),不占编辑器布局——没有拖选自动滚动、匹配位置错乱、替换后面板折叠这些毛病。支持实时匹配高亮与 current/total 计数、↑/↓ 上/下一个、Enter 下一个(Shift+Enter 上一个);替换默认折叠(⇄ 展开),主题随 DSH 变量走(深浅正常),在其上滚轮滚动编辑区而非整个网页。Ctrl+S 保存(视图内全局可用);Ctrl+Z 撤销 / Ctrl+Y(或 Ctrl+Shift+Z) 重做、Ctrl+C/V/X/A 复制粘贴全选,均走编辑器原生键位;另支持 Alt+↑/↓ 移动行、Ctrl+/ 注释。beforeClose 钩子与 seed dirty 标记)。代码编辑器开销:
CodeMirror 6作为 构建期 devDependency 被打包进lib/client.js(与 dock-markdown 打包 marked 同理,不进入 runtime 依赖)。客户端 bundle 约 1.12 MB(gzip 约 300 KB)——其中编辑器运行时(@codemirror/view等)占大头,各语言文法合计仅约 68 KB(gzip)。
| 依赖 | 类型 | 说明 |
|---|---|---|
| dock >= 0.1.0 | peer(必需) | 工作台外壳:编辑器区视图、浮窗、ctx.workbench 由它提供 |
| dock-files >= 0.1.0 | peer(必需) | 文件域服务:dock-editor 作为其 editor 默认查看器被分发打开 |
| DSH Web 环境 | 运行时 | 必需,客户端平台为 Web |
cordis ^4.0.0-rc.7 | peer | 插件框架(DSH 自带) |
react ^18.2.0 | peer(可选) | 客户端渲染需要;未提供时编辑器 UI 不激活 |
@codemirror/*、@lezer/highlight | dev(构建期) | CodeMirror 6 编辑器 + 语言文法,仅编译进 lib/client.js,发布后无需安装 |
可选搭档:dock-images、dock-markdown 等更多查看器可与 dock-editor 共存,按扩展名各自接管对应文件类型(dock-editor 是 default 兜底查看器)。
需要 dock 与 dock-files:
dsh plugin add github:AKS1st/dock
dsh plugin add github:AKS1st/dock-files
dsh plugin add github:AKS1st/dock-editor
从 npm registry 安装同样支持:
dsh plugin add dock-base
dsh plugin add dock-files
dsh plugin add dock-editor
/desk-editor 路由只接受受信任来源(回环地址 / trustedHosts + 同源检查)的 POST。读取路径只要求是绝对路径、不限定会话工作区——对话上下文可能提及工作区外的文件(如 ~/.dsh/skills/...),查看器可打开它们查看;写入仍限定在会话工作区内(越界 403),工作区外文件在编辑器中以只读打开;写入前还会校验目标大小不超读取上限。
MIT
FAQs
Text file viewer and editor for the dock file explorer: undo/redo, Ctrl+S save, and unsaved-change confirmation.
The npm package dock-editor receives a total of 77 weekly downloads. As such, dock-editor popularity was classified as not popular.
We found that dock-editor demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.

Product
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.

Security News
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.