Skip to content

Releases: M1r0er/dsh-workspace-gate

Release list

v0.1.1

Choose a tag to compare

@M1r0er M1r0er released this 18 Oct 16:35

声明 DSH 运行时要求。

变更

  • package.json 新增 engines.dsh = ^0.2.1-rc.2
  • 版本号 0.1.0 → 0.1.1

行为差异

  • 比 0.2.1-rc.2 更老的 DSH 会在安装期被插件管理器直接拒绝,并给出 incompatible-version,
    而不是装上以后在运行期才报错。
  • 匹配范围包含 0.2.1-rc.*、0.2.1、以及 0.2.x 的非预发布版本;
    预发布版本只有同一 0.2.1 段才匹配(semver 的 prerelease 规则)。

安装

# GitHub(任何机器)
dsh plugin --profile <your-profile> add github:M1r0er/dsh-workspace-gate#v0.1.1

# npm(已发布 0.1.1)
dsh plugin --profile <your-profile> add dsh-workspace-gate@0.1.1

装完仍需在插件页启用 bundle。npm 页:https://www.npmjs.com/package/dsh-workspace-gate

v0.1.0

Choose a tag to compare

@M1r0er M1r0er released this 18 Oct 03:04

首个版本。

做什么:插件照常加载,但按工作区把不该占的提示词前缀摘掉——工具 schema 与系统提示词段都不再进模型上下文。省的是每轮请求的输入 token,不是插件加载开销。

Host

  • agent/created 时按 cwd 匹配最近祖先目录,取该目录的隐藏清单
  • 工具:agent.ctx.tools.restrict({ deny })(逐条施加,单条失败只记 skipped)
  • 提示词段:在 agent 作用域注册同名空文本段,遮蔽全局那一段
  • 清单按 preset 作用域取并集(全局视图只能看到 1/3 的工具)
  • 归属:段命名空间 → 工具名前缀 → 静态扫包 → 手工归属
  • 自注册 HTTP 路由 /workspace-gate/{state,apply,assign,refresh}
  • 模型工具 workspace_gate(status/list/set)

Client

  • 插件管理页新增「按工作区」页签
  • 按来源分档:第三方 / 自定义分组 / 官方 / 官方可选包
  • 组级开关 + 展开到单个工具名/段名 + 归属下拉

验证

  • 24 条单测(纯逻辑层,不启动 DSH)
  • 端到端:隐藏 tool:read 与 section:free-search:engines 后,新开子会话中两者均消失,skipped: []

MIT License.