Repository navigation
v0.3.2
0.3.2 补丁版本,汇总了自 v0.3.1 以来的主要变更,包括原生文件工具面扩展、安全与原子性层、可选的官方工具接管以及 PTC 与平台默认值调整。
新增功能
- 原生文件工具面从四项扩到十一项:新增
ops_write_file、ops_edit_file、ops_diff、ops_stat、ops_copy、ops_move与ops_remove,统一使用单一path和 SHA-256revision/expectedRevision的 CAS 契约,写文件与编辑支持dryRun预览。 @Thatgfsj - 新增安全与原子性层:替换回执基于实际观察到的字节,合作写者共享持久路径锁,Windows 保留 owner/group/有序 DACL 与受支持属性,Darwin 非空扩展 ACL 在 staging 前以
METADATA_UNSUPPORTEDfail-closed,并用CREDENTIAL_DENIED、PATH_RESTRICTED、AUTHORITY_CHANGED、EXECUTION_RESTRICTED区分拒绝来源。 @Thatgfsj, @T-Auto - 新增默认关闭的
dsh-ops/hide-official组件:只接管 shell/file/ptc 三个面,隐藏有经审查 OPS 等价物的官方工具(read、glob、grep),其余官方工具保持可见并汇总为一条告警。 @Thatgfsj - PTC 分页与发现性:结果页在投影或过滤之前暴露过期时间、
sourceTotal与稳定有序的contentHash,过期引用返回REFERENCE_EXPIRED并带释放或重新观察的指引,batch 审计页只读且不可释放,执行前重新核对当前权限。 @T-Auto - 平台默认值调整:PTC 增强默认启用(仍只在纯 PTC 会话发布
ops_batch/ops_result),shell 在三个平台保持启用,严格官方工具隐藏仍保持 opt-in,已有显式配置不会被迁移或覆盖。 @T-Auto - 新增可选只读 OPS 侧栏
dsh-ops/tui(默认关闭,基于 TUI panel API v1)与数据采集dsh-ops/panel(所在行默认启用、「启动数据检测」开关默认关闭,写入<cwd>/.dsh-ops/panel/);侧栏只浏览有界保留元数据,不打开面板、不执行工具、不获取结果页。 @ccch1mneyyy, @Thatgfsj, @T-Auto - 新增只读活动投影:内部有界地投影 OPS 原生与 PTC 工具事件,不保存参数或结果体、按会话隔离,只把传输返回标为中性而不宣称业务成功。 @ccch1mneyyy
体验优化
- 文件工具参数 schema 在固定宿主 SDK 中渲染具体类型,SDK 不支持的边界写成描述并由原生校验兜底;
ops_glob执行声明的 limit,ops_grep拒绝未知outputMode,inspect 保留 legacy offset 0。 @T-Auto ops_grep的分页改为诚实统计:即使页已填满也继续统计候选集,只物化请求窗口,total/matched/omitted/complete不再把前缀当成完整结果,非 UTF-8 或超大文件计入skippedFiles。 @T-Autoops_inspect_local_file的模型视图对同质页只在顶部共享一次path,且不修改原始执行/PTC 结果、不删除 revision、分页与截断元数据。 @T-Auto- 文件工具路由与指导对齐真实原生能力:不再宣传多 range、任意编码或 PDF 文本,
summary/count/content分别对应聚合总量、单文件计数与匹配文本。 @T-Auto hide-official的strict不再因为范围外工具缺少等价物而阻塞会话就绪,范围外工具保持可见并汇总告警;只有显式请求范围内无等价物的工具时才以READINESS_BLOCKEDfail-closed。 @Thatgfsjhide-official新增scope: takeover | extended | off,把接管范围数据化为 63 个固定官方工具名与两个动态前缀;takeover为默认值,extended把additionalOfficialTools纳入范围,off让该行不接管任何工具。 @Thatgfsj, @T-Auto- pwsh 接管改为把
pwshPath写入官方行的 volatile 配置引用,不再通过Entry.update()重挂pwsh-sandbox,避免重建permission-presets后拖垮整个权限服务。 @little3tar - 配置迁移标记改走
configEditor.edit()落到 profile 的 patch 层,不再把完整 composed tree 写回 profile 根文件,修复主题/字号回弹以及下次启动整包静默挂载失败。 @Thatgfsj, @Nicholas023 - 凭据围栏按实际覆盖面文档化并扩展:路径级同时覆盖读、写、
copy/move目标与remove,.env也不能通过这些工具创建。 @WTStarMark, @Thatgfsj
问题修复
ops_bash的参数错误恢复为拒绝:非法参数抛出BashArgumentError(INVALID_BASH_ARGUMENT)并点名字段,运行时失败仍折叠为携带完整输出 schema 的值。 @Thatgfsj- 相对
workdir锚定到会话工作区(绝对路径不变,空或纯空白回退会话目录,Windows 盘符相对路径按会话盘解析或拒绝),工作区已消失时给出invalid workdir而不是 Bash 载荷提示。 @Y-fyan, @Thatgfsj ops_glob的details.modified改为真正的修改时间(Unix epoch 毫秒,与ops_stat的modifiedMs同量纲),sort: "modified"按时间倒序稳定排序,时间戳相同则保持遍历顺序。 @Thatgfsj- 可被纯快照检查直接拒绝的单文件请求现在在取锁之前失败,
write_file/edit_file的 dry run 完全跳过锁;持久.dsh-ops-update-<sha256>.locksidecar 作为声明行为记录并保留。 @WTStarMark
其他变更
- 破坏性变更:移除
dsh-ops/background组件与只为它存在的 FastCtx 运行时,ops_run、ops_run_background、ops_job_output、ops_job_list与ops_job_kill不再提供;长任务改用宿主pwsh的run_in_background,或在ops_bash命令内用nohup ... & disown脱离。 @Haoming9527 - 旧 profile 里残留的
dsh-ops/background行继续加载为 no-op stub:接受任意配置、不发布工具、只记录一条可删除该行的警告;configUpdateVersion: 2会从已保存的dsh-ops、dsh-ops/shell与dsh-ops/file行中移除serverName、enableShellTools、toolCallTimeoutMs。 @Haoming9527 - CLI 精简:
resolve、不带--profile的status、build与provision移除并以 exit 2 指向替代命令,ladder改为报告原生 worker 和{ files, bash, pwsh }三档;打包不再包含vendor/fastctx/、FastCtx 平台包与相关脚本。 @Haoming9527 - 公共
dsh-ops/policy导出随之调整:移除BACKGROUND_TOOLS与SHELL_TOOLS,ladderLevels()返回{ files, bash, pwsh },renderToolingPolicy()不再接受enableShellTools;许可证与 FastCtx 致谢原文移到licenses/fastctx/并保持原样。 @Haoming9527 - 仓库结构调整:
CHANGELOG.md与PROVENANCE.md移入docs/,新增双语CONTRIBUTING、issue/PR 模板以及维护者与贡献者章节,图标和头图移入docs/assets/。 @T-Auto, @Haoming9527, @baobaolaodie - 发布流程改为门禁化的 GitHub Release:
release.yml重写为带验证的发布工作流,并补充发布流程文档。 @Thatgfsj - 新增仓库内基准框架与数据面板:比较插件相对干净基线的工具级与模型级成本;它不进入发布包,也不在默认 CI 中运行。 @Thatgfsj, @OldLigant, @Richeir
The 0.3.2 patch release summarizes the main changes since v0.3.1, including the expanded native file surface, the safety and atomicity layer, opt-in official-tool hiding, and PTC and platform-default changes.
New Features
- The native file surface grows from four to eleven tools with
ops_write_file,ops_edit_file,ops_diff,ops_stat,ops_copy,ops_moveandops_remove, all sharing onepathand a SHA-256revision/expectedRevisionCAS contract, and writes and edits supportdryRunpreviews. by @Thatgfsj - Add a safety and atomicity layer: replacement receipts hash the bytes actually observed, cooperating writers share a persistent path lock, Windows preserves owner/group/ordered DACL and supported attributes, Darwin fails closed with
METADATA_UNSUPPORTEDbefore staging a nonempty extended ACL, andCREDENTIAL_DENIED,PATH_RESTRICTED,AUTHORITY_CHANGEDandEXECUTION_RESTRICTEDdistinguish refusal sources. by @Thatgfsj, @T-Auto - Add the disabled-by-default
dsh-ops/hide-officialcomponent: it takes over only the shell/file/ptc faces, hides official tools that have a reviewed OPS equivalent (read,glob,grep), and leaves every other official tool visible with one aggregated warning. by @Thatgfsj - PTC paging and discoverability: result pages expose expiry,
sourceTotaland a stable orderedcontentHashbefore projection or filtering, expired references returnREFERENCE_EXPIREDwith release or reobserve guidance, batch audit pages are read-only and cannot be released, and current authority is rechecked before execution. by @T-Auto - Platform defaults change: PTC enhancement is enabled by default (tools still publish only in pure PTC sessions), shell stays enabled on all three platforms, strict official-tool hiding remains opt-in, and existing explicit profile choices are neither migrated nor overwritten. by @T-Auto
- Add the optional read-only OPS sidebar
dsh-ops/tui(off by default, built on TUI panel API v1) and data capturedsh-ops/panel(row on by default, capture off by default, writing under<cwd>/.dsh-ops/panel/); the sidebar browses only bounded retained metadata, never opens itself, runs tools or fetches result pages. by @ccch1mneyyy, @Thatgfsj, @T-Auto - Add a read-only activity projection: an internal bounded projection of live OPS native and PTC tool events that stores no arguments or result bodies, isolates sessions, and labels transport returns neutrally rather than claiming business success. by @ccch1mneyyy
Improvements
- File-tool argument schemas render concrete types in the pinned host SDK, with SDK-unsupported bounds expressed as descriptions backed by native validation;
ops_globenforces its advertised limit,ops_greprejects unknownoutputModevalues, and inspect keeps legacy offset 0 working. by @T-Auto ops_greppaging now counts honestly: it keeps counting the candidate set after a page fills while materializing only the requested window,total/matched/omitted/completeno longer claim a prefix is a complete result, and non-UTF-8 or oversized files are reported throughskippedFiles. by @T-Auto- The
ops_inspect_local_filemodel view shares a homogeneous page'spathonce at the top level without mutating the raw execution/PTC result or dropping revision, paging and truncation metadata. by @T-Auto - File-tool routing and guidance now match the real native surface: multiple ranges, arbitrary encodings and PDF text are no longer advertised, and
summary/count/contentmean aggregate totals, per-file counts and matching text. by @T-Auto hide-officialwithstrictno longer blocks session readiness for out-of-scope tools without an equivalent; those stay visible with an aggregated warning, and only an explicit request for an in-scope tool without an equivalent fails closed withREADINESS_BLOCKED. by @Thatgfsjhide-officialgainsscope: takeover | extended | off, making the takeover scope data-driven over 63 pinned official tool names and two dynamic prefixes;takeoveris the default,extendedpromotesadditionalOfficialToolsinto the scope, andofftakes over nothing. by @Thatgfsj, @T-Auto- The pwsh takeover now commits
pwshPathinto the official row's volatile config reference instead of remountingpwsh-sandboxthroughEntry.update(), avoiding a rebuiltpermission-presetsthat would break the whole permission service. by @little3tar - The config-update marker now goes through
configEditor.edit()into the profile's patch layer instead of writing the whole composed tree back into the profile root file, fixing theme/font-size bounce and a silent whole-bundle mount failure on the next start. by @Thatgfsj, @Nicholas023 - The credential fence is documented and extended to its real reach: path-based coverage includes reads, writes,
copy/movedestinations andremove, and a.envcannot be created through these tools either. by @WTStarMark, @Thatgfsj
Bug Fixes
ops_bashargument errors are refusals again: an invalid argument raisesBashArgumentError(INVALID_BASH_ARGUMENT) naming the field, while a runtime failure is still folded into a value carrying the full output schema. by @Thatgfsj- A relative
workdirnow anchors to the session workspace (absolute paths unchanged, empty or whitespace falls back to the session directory, and a Windows drive-relative path resolves against the session's drive or is refused), and a vanished workspace reportsinvalid workdirinstead of the missing-payload remedy. by @Y-fyan, @Thatgfsj ops_glob'sdetails.modifiednow reports a real modification time (milliseconds since the Unix epoch, the same quantity asops_stat'smodifiedMs), andsort: "modified"orders newest first, stably, so equal timestamps keep the walk order. by @Thatgfsj- Single-file requests that a pure snapshot check can reject now fail before taking the lock,
write_file/edit_filedry runs skip the lock entirely, and the persistent.dsh-ops-update-<sha256>.locksidecar is documented and retained as declared behaviour. by @WTStarMark
Chores
- Breaking change: the
dsh-ops/backgroundcomponent and the FastCtx runtime that existed only for it are removed, soops_run,ops_run_background,ops_job_output,ops_job_listandops_job_killare gone; use the hostpwshtool'srun_in_backgroundor detach inside anops_bashcommand withnohup ... & disown. by @Haoming9527 - A leftover
dsh-ops/backgroundrow keeps loading as a no-op stub that accepts any config, publishes nothing and logs one warning that the row can be deleted, whileconfigUpdateVersion: 2removesserverName,enableShellToolsandtoolCallTimeoutMsonce from saveddsh-ops,dsh-ops/shellanddsh-ops/filerows. by @Haoming9527 - The CLI shrinks:
resolve,statuswithout--profile,buildandprovisionare removed and exit 2 with the command that replaces each,ladderreports the native worker and{ files, bash, pwsh }, and packaging no longer includesvendor/fastctx/, the FastCtx platform packages or the related scripts. by @Haoming9527 - Public
dsh-ops/policyexports change accordingly:BACKGROUND_TOOLSandSHELL_TOOLSare removed,ladderLevels()returns{ files, bash, pwsh },renderToolingPolicy()no longer takesenableShellTools, and the licence and FastCtx attribution move verbatim tolicenses/fastctx/. by @Haoming9527 - Repository layout changes:
CHANGELOG.mdandPROVENANCE.mdmove intodocs/, a bilingualCONTRIBUTING, issue/PR templates and maintainers/contributors sections are added, and the icon and header artwork move todocs/assets/. by @T-Auto, @Haoming9527, @baobaolaodie - The release process becomes a gated GitHub Release:
release.ymlis rewritten as a verified release workflow, with release-process documentation added. by @Thatgfsj - Add a repository-only benchmark harness and data panel that compare the plugin's tool-level and model-level cost against a clean baseline; it is not shipped and does not run in default CI. by @Thatgfsj, @OldLigant, @Richeir
Full Changelog: v0.3.1...v0.3.2