npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@crazx/dsh-tool-cordis

v0.2.1-rc.2.zw.9

Published

Read-only runtime API inspection for Harness plugin development

Readme


description: "为开发和配置已安装 Harness 插件的 agent 提供只读运行时 API 查询。" kind: "package-reference"

@deepseek-ai/dsh-tool-cordis

English | 中文

概述

编写插件代码前查询 Host 和 Client 的运行时 API。创造模式同时提供这些只读工具与 Plugin Manager,后者负责持久化 profile 变更。检查注册表由 Cordis host runner 提供;浏览器查询需要已连接的页面。

目录


使用本包

创造模式包含这组工具。其他组合需要在宿主组合里、提供 cordisInspect 的 host runner 旁挂载一次 @deepseek-ai/dsh-tool-cordis/host,并在每个要暴露这些工具的 agent preset 里挂载 @deepseek-ai/dsh-tool-cordis;仅有 preset 行不会注册任何 Host provider。调用 cordis_inspect_list 发现 provider,再用 cordis_inspect_query 查询其具体方法和类型。Host 的 Config provider 分页列出运行中的 Loader entry(offset、最多 100 的 limit、可选的精确插件 name;total 与 nextOffset 界定遍历),每个 entry 带 Loader id、patch 所寻址的树内 id 及其 Config 状态(schema、absent、unsupported、group 与 include 载体为 tree、禁用、未导入或已销毁的 entry 为 inactive),并把单个 entry 的原生 Config 投影为自包含的 JSON Schema 文档,同时在 profile 包查找能解析时给出该 entry 的 packageDir,即包 README 与构建产物 lib/ 所在目录。通过 Plugin Manager 安装包含插件代码或 MCP 配置的组合包。


理解实现

Host provider 结合生成的 Service/Event 目录、经 app-boot Config 投影器投影的运行中 Loader 树,以及请求 agent 的工具注册表。Client provider 通过现有检查注册表同步清单,并从已连接页面回答查询。宿主入口持有 Host provider 的注册,preset 行持有两个工具,都通过 Cordis effect;注册表拒绝重复的 provider id,所以 provider 按进程注册一次而不是按 preset 注册。


进一步探索

模型体验

运行时检查

模型所见

工具目录 描述两个只读检查工具。插件不贡献 system prompt 段落:工具描述已说明何时调用每个工具以及查询不会调用业务方法。在 cordis preset 中,首轮 skill catalog 携带两个随附技能的描述,把插件、MCP、组合编辑和未指定去向的视觉请求路由到覆盖 Plugin Manager、MCP 设置、Client 打包和 slot 注册的技能。查询结果包含所请求的 API 声明、当前工具 schema、带 Config 状态的运行中 entry 目录,或单个 entry 投影后的 Config JSON Schema。

Token 影响

插件可见时,只有两个工具 schema 进入模型请求。查询结果追加到转录中;精确查询避免加载无关声明。

KV Cache 影响

未改变的工具 schema 保持前缀稳定。查询结果追加到历史中;启用其他插件可能改变后续工具 schema。

已知限制与待办

  • Client 查询需要页面响应,并采用 Host runner 的有界等待与重试策略。检查不能调用服务方法、配置插件或执行生成代码。
  • Config.listConfigs 只遍历 profile 的 Loader 树。Agent preset 的 plugins 列表挂载在独立的 preset 树中,所以只出现在 preset 声明里的插件不会被列出,除非 profile 树也挂载了它。

开发备注

无。