Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Creates a new codexhost Harness plugin or plans, reviews and completes an existing Harness Adapter using public contracts.
18% 68%+50 ptsof test cases passed
Passed 15 of 22 test cases with the skill, and 4 of 22 without it.
This test ran on v3. v4 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
6 agent runs
目标:交付一个只通过公共契约工作的独立插件。插件是交付与加载单元,HarnessAdapter / HarnessSession 是运行时接口;不要求继承基类,也不要求使用 ACP。
代码路径以仓库根目录为基准,references/ 链接相对于本 Skill。接口签名、字段限制以源码为准;本 Skill 回答「要实现哪些功能、每项遵守什么规范、怎样验收」,不是第二份类型定义。
Host(公共)
├─ 发现 Manifest、读取 enabled.json、调用插件工厂(Cordis 作用域管理生命周期)
├─ 通过 HarnessAdapter / HarnessSession 执行业务
└─ 拥有 Thread 映射、持久化事务、预热、空闲释放、委派、用量计量、Desktop 协议投影
│ 公共契约(harness-adapter + shared-contracts)
▼
插件(你的代码)
├─ Manifest:身份、版本、展示、安装指引、入口
├─ 工厂:把 HarnessPluginContext 转成原生构造参数,挂上安装/更新能力
├─ HarnessAdapter:检查、打开 Session、可选的目录/账号/统计/导入能力、关闭
└─ HarnessSession:执行、有序输出、状态、历史、关闭
│ 插件内部
▼
原生 SDK / RPC / Gateway / ACP / CLI / 桌面应用内置 CLI
renderer-binding-probe.ts 等处按 ID 的分支只是旧 Thread 编码的兼容读取,不是新插件的模板。| 场景 | 允许修改 | 不应修改 |
|---|---|---|
| 用户独立插件 | 只有插件目录;放入用户插件根并写 enabled.json | 仓库任何文件 |
| 仓库内预装 | 插件目录 + 发行配置(tsconfig.json references、scripts/release/harness-plugins.json、lockfile)+ 文档 | Host / Renderer / protocol-core 公共代码 |
| 公共契约缺口 | 按公共扩展规则设计通用能力 | 新 Harness 专用的 Host 分支、专用 codec、按 ID 判断 |
需要改公共代码时,先确认公共契约确实无法表达该原生能力,并记录缺口;不得以「接入更快」为由增加 Harness 专用分支。
Next to this one in the catalogue, plus more from the same author.