@fanglinwei/agent-fit 0.7.2 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/plugins/marketplace.json +20 -0
- package/.codex-plugin/plugin.json +34 -0
- package/README.md +14 -1
- package/VERSION +1 -1
- package/adapters/codex/skills/agent-fit/SKILL.md +6 -0
- package/docs/usage.md +4 -4
- package/package.json +2 -2
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agent-fit",
|
|
3
|
+
"interface": {
|
|
4
|
+
"displayName": "Agent Fit"
|
|
5
|
+
},
|
|
6
|
+
"plugins": [
|
|
7
|
+
{
|
|
8
|
+
"name": "agent-fit",
|
|
9
|
+
"source": {
|
|
10
|
+
"source": "local",
|
|
11
|
+
"path": "./"
|
|
12
|
+
},
|
|
13
|
+
"policy": {
|
|
14
|
+
"installation": "AVAILABLE",
|
|
15
|
+
"authentication": "ON_USE"
|
|
16
|
+
},
|
|
17
|
+
"category": "Productivity"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agent-fit",
|
|
3
|
+
"version": "0.7.3",
|
|
4
|
+
"description": "为 Codex 已获授权的子任务选择模型、推理强度和备用组合;需要 agent-fit CLI。",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "fanglinwei",
|
|
7
|
+
"url": "https://github.com/fanglinwei"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/fanglinwei/agent-fit",
|
|
10
|
+
"repository": "https://github.com/fanglinwei/agent-fit",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"codex",
|
|
14
|
+
"subagents",
|
|
15
|
+
"model-routing",
|
|
16
|
+
"skills"
|
|
17
|
+
],
|
|
18
|
+
"skills": "./adapters/codex/skills/",
|
|
19
|
+
"interface": {
|
|
20
|
+
"displayName": "Agent Fit",
|
|
21
|
+
"shortDescription": "按任务复杂度、作用域和预算选择子代理模型",
|
|
22
|
+
"longDescription": "提供 agent-fit Skill,查询已配置的档位,为已获授权的委派选择模型、推理强度和备用组合。使用前须安装 @fanglinwei/agent-fit CLI 并完成 setup;插件安装不会自动修改 Codex 配置。",
|
|
23
|
+
"developerName": "fanglinwei",
|
|
24
|
+
"category": "Productivity",
|
|
25
|
+
"capabilities": [
|
|
26
|
+
"Instructions"
|
|
27
|
+
],
|
|
28
|
+
"websiteURL": "https://github.com/fanglinwei/agent-fit",
|
|
29
|
+
"defaultPrompt": [
|
|
30
|
+
"使用 Agent Fit 查看当前有效档位和委派规则。",
|
|
31
|
+
"使用 Agent Fit 为已获授权的子任务选择模型与推理强度。"
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
}
|
package/README.md
CHANGED
|
@@ -45,6 +45,19 @@ agent-fit serve --open
|
|
|
45
45
|
|
|
46
46
|
日常全局、项目和会话切档,以及模型与 effort 调整无需重启;后续新任务读取新选择。更新基础 Skill、AGENTS 或角色职责,以及恢复原配置后仍需重启。
|
|
47
47
|
|
|
48
|
+
## Marketplace 插件
|
|
49
|
+
|
|
50
|
+
仓库同时提供 Codex marketplace 插件,直接复用现有 Skill:
|
|
51
|
+
|
|
52
|
+
- marketplace 清单:`.agents/plugins/marketplace.json`。
|
|
53
|
+
- 插件清单:`.codex-plugin/plugin.json`,通过 `skills` 指向 `adapters/codex/skills/`。
|
|
54
|
+
- 在 Codex 的插件管理中添加 GitHub 仓库 `https://github.com/fanglinwei/agent-fit` 作为 marketplace 来源,选择 **Agent Fit** 安装并启用。首次安装后重启 Codex,使插件 Skill 可被发现。
|
|
55
|
+
- 本地验证时可将当前仓库作为 marketplace 来源;清单中的 `source.path` 相对于仓库根目录解析。
|
|
56
|
+
|
|
57
|
+
插件安装提供规则;运行依赖仍按上面的快速开始安装 `@fanglinwei/agent-fit` 并执行 `setup`。已有配置无需重新 setup。插件不会自动运行命令、切档、检测模型或修改账号。使用时可要求“使用 Agent Fit 查看当前有效档位”。
|
|
58
|
+
|
|
59
|
+
CLI setup 安装的共享 Skill 与插件中的 Skill 来自同一份源码,可能同时被发现;两者应保持同版本。插件通过插件管理更新,共享 Skill 通过 `agent-fit skill update` 更新。禁用或卸载插件只移除插件规则;如需移除 CLI 配置,仍须按下文恢复流程处理原绑定 home。
|
|
60
|
+
|
|
48
61
|
## 四种档位
|
|
49
62
|
|
|
50
63
|
| 档位 | 使用方式 |
|
|
@@ -155,7 +168,7 @@ npm test
|
|
|
155
168
|
npm pack
|
|
156
169
|
```
|
|
157
170
|
|
|
158
|
-
本地打包产物为 `fanglinwei-agent-fit-0.7.
|
|
171
|
+
本地打包产物为 `fanglinwei-agent-fit-0.7.3.tgz`,可用 `npm install -g ./fanglinwei-agent-fit-0.7.3.tgz` 安装。浏览器集成使用已有 Playwright 与 Chrome,运行方法见[开发验证](docs/usage.md#开发验证)。唯一运行依赖为 [smol-toml](https://github.com/squirrelchat/smol-toml)。
|
|
159
172
|
|
|
160
173
|
## License
|
|
161
174
|
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.7.
|
|
1
|
+
0.7.3
|
|
@@ -10,6 +10,12 @@ Codex 启动后读取本 Skill;每次创建、重新委派或切换子智能
|
|
|
10
10
|
|
|
11
11
|
本目录只保存可共享的规则与说明,可由 CCSwitch 放在 `~/.agents/skills/agent-fit/`。当前档位、项目与会话配置属于各自 Codex home;全局快照存于 `<home>/.agent-fit/current-mode.json`,有效配置通过 `agent-fit explain` 查询。目录中遗留的 `references/current-mode.json` 是旧安装文件,不能作为当前配置。规则入口用 `agent-fit skill path --codex-home <绑定 home> --json` 查询;退出码为 0 且 `errors` 为空后读取 `data.path`。
|
|
12
12
|
|
|
13
|
+
## Marketplace 插件前提
|
|
14
|
+
|
|
15
|
+
通过 marketplace 安装本 Skill 后,仍需 Node.js 22+、`@fanglinwei/agent-fit` CLI 和已完成 `setup` 的目标 Codex home。插件安装仅提供规则,不自动安装 CLI、写入角色或切换档位。
|
|
16
|
+
|
|
17
|
+
首次使用先确认 `agent-fit --version` 可用,再用 `agent-fit status --codex-home <绑定 home> --json` 检查配置。CLI 缺失或尚未配置时,说明缺少的前提并提供 README 中的安装与 setup 步骤;不凭预设猜测有效档位,不自动执行安装或 setup。用户已授权初始化时可按其范围完成配置。插件缓存中的规则由插件更新管理;`agent-fit skill update` 管理的是共享 Skill,不更新插件缓存。
|
|
18
|
+
|
|
13
19
|
## 卸载前恢复
|
|
14
20
|
|
|
15
21
|
执行本工具的卸载指令(包括 `npm uninstall`、`npm remove`)前,必须先按恢复流程,用可用的本工具版本对原绑定 home 执行 `agent-fit restore --dry-run` 预览,再执行实际 `agent-fit restore`。使用独立 home 时,两步均显式传入相同的 `--codex-home <原路径>`;涉及多个 home 时逐一恢复,不能只恢复默认 home。
|
package/docs/usage.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# 使用说明
|
|
2
2
|
|
|
3
|
-
`agent-fit` 0.7.
|
|
3
|
+
`agent-fit` 0.7.3,npm 包名为 `@fanglinwei/agent-fit`,命令和 Skill 名仍为 `agent-fit`。首版支持 Codex;Node.js 22+。命令、网页和生成的 Skill 使用同一套档位数据。
|
|
4
4
|
|
|
5
5
|
工具只处理当前格式与版本的配置;独立 home 全程使用显式指定的路径。
|
|
6
6
|
|
|
7
7
|
## 安装与配置
|
|
8
8
|
|
|
9
|
-
从 npm registry 安装,或在项目目录运行 `npm pack` 后使用 `npm install -g ./fanglinwei-agent-fit-0.7.
|
|
9
|
+
从 npm registry 安装,或在项目目录运行 `npm pack` 后使用 `npm install -g ./fanglinwei-agent-fit-0.7.3.tgz` 安装本地包。两种方式都需要 Node/npm。
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
12
|
npm install -g @fanglinwei/agent-fit
|
|
@@ -166,8 +166,8 @@ agent-fit explain --level L4 --role task_review
|
|
|
166
166
|
无需全局安装的 npm 查询,以及本地包查询:
|
|
167
167
|
|
|
168
168
|
```sh
|
|
169
|
-
npm exec --package=@fanglinwei/agent-fit@0.7.
|
|
170
|
-
npm exec --package="/path/to/fanglinwei-agent-fit-0.7.
|
|
169
|
+
npm exec --package=@fanglinwei/agent-fit@0.7.3 -- agent-fit status --details
|
|
170
|
+
npm exec --package="/path/to/fanglinwei-agent-fit-0.7.3.tgz" -- agent-fit status --details
|
|
171
171
|
```
|
|
172
172
|
|
|
173
173
|
## 委派收益检查
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fanglinwei/agent-fit",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"description": "Match delegated tasks to model and reasoning effort profiles for Codex, with scoped configuration and restore.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"keywords": ["codex", "subagents", "model-routing", "reasoning", "skills", "cli"],
|
|
12
12
|
"bin": { "agent-fit": "bin/agent-fit.mjs" },
|
|
13
13
|
"engines": { "node": ">=22" },
|
|
14
|
-
"files": ["bin/", "lib/", "web/", "adapters/", "VERSION", "README.md", "docs/README.md", "docs/usage.md", "docs/implementation-review.md", "LICENSE"],
|
|
14
|
+
"files": [".agents/plugins/marketplace.json", ".codex-plugin/plugin.json", "bin/", "lib/", "web/", "adapters/", "VERSION", "README.md", "docs/README.md", "docs/usage.md", "docs/implementation-review.md", "LICENSE"],
|
|
15
15
|
"scripts": { "test": "node --test tests/*.test.mjs", "test:browser": "node tests/browser.mjs" },
|
|
16
16
|
"dependencies": { "smol-toml": "1.9.1" }
|
|
17
17
|
}
|