@fastagent/cli 0.3.1 → 0.5.0
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/README.md +26 -2
- package/cli.js +321 -306
- package/examples/fastagent.config.example.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @fastagent/cli
|
|
2
2
|
|
|
3
|
-
`@fastagent/cli` 是 FastAgent 的公开命令行工具。你可以用它在本地运行 FastAgent、接入内置 IM 通道、安装 skills,并使用一组面向长会话和自动化场景的工程化能力,例如记忆、上下文压缩、任务调度和 sandbox
|
|
3
|
+
`@fastagent/cli` 是 FastAgent 的公开命令行工具。你可以用它在本地运行 FastAgent、接入内置 IM 通道、安装 skills,并使用一组面向长会话和自动化场景的工程化能力,例如记忆、上下文压缩、任务调度和 sandbox 路由。当前 npm 发布面已经覆盖了最近这批 IM runtime 增强,包括更完整的微信入站媒体处理、保守型非终态反馈、`/resume` 挂起恢复,以及会话内 `cron` / `send_im_media` 这类可主动回发 IM 的能力。
|
|
4
4
|
|
|
5
5
|
它适合这些场景:
|
|
6
6
|
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
- 计划清单:管理会话内的任务列表
|
|
24
24
|
- 后台任务控制:查看、等待和停止子智能体 / 后台运行任务
|
|
25
25
|
- local / remote sandbox 运行模式
|
|
26
|
+
- IM runtime:微信扫码登录 / restore、图片入模、语音转写复用、文件/视频持久化、非终态进度/typing、`/resume` 恢复、`send_im_media`、会话内 `cron` 主动回发
|
|
26
27
|
|
|
27
28
|
这些能力很多会在运行时自动生效,当前并不都会以独立子命令的形式直接暴露。
|
|
28
29
|
|
|
@@ -117,7 +118,7 @@ fastagent doctor --config ./fastagent.config.json
|
|
|
117
118
|
- `jsonl` 机器输出
|
|
118
119
|
- `local` / `remote` sandbox 路由
|
|
119
120
|
|
|
120
|
-
|
|
121
|
+
普通 final reply 仍以文本回复为主;媒体出站目前不是独立 CLI flag,而是通过运行时工具 `send_im_media` 和 scheduled/proactive delivery 复用同一条 IM 出站链路。
|
|
121
122
|
|
|
122
123
|
### 启动前需要的环境变量
|
|
123
124
|
|
|
@@ -201,6 +202,27 @@ fastagent doctor --config ./fastagent.config.json
|
|
|
201
202
|
- 带 `--config <path>` 时:`config.sandbox.launcher` -> env -> PATH
|
|
202
203
|
- 若两者都没有,会直接提示 companion package / env 的修复方式
|
|
203
204
|
|
|
205
|
+
## Skills 命令
|
|
206
|
+
|
|
207
|
+
- `fastagent skills add <source>` 默认走 runtime 推断:
|
|
208
|
+
repo-local 本地 source 会安装到当前 workspace 的 `.fastagent/skills/<name>`,
|
|
209
|
+
其他 source 默认安装到 runtime-global skill root `<globalDataDir>/skills/<name>`;
|
|
210
|
+
对普通 npm 安装且未显式覆盖时,通常是 `~/.fastagent/skills/<name>`
|
|
211
|
+
- `fastagent skills add <source> --scope project` 强制安装到当前 workspace 的 `.fastagent/skills/<name>`
|
|
212
|
+
- `fastagent skills add <source> --scope user` 强制安装到 runtime-global skill root `<globalDataDir>/skills/<name>`;
|
|
213
|
+
对普通 npm 安装且未显式覆盖时,通常是 `~/.fastagent/skills/<name>`
|
|
214
|
+
- `fastagent skills add <source> --list` 只列出候选 skill,不写磁盘
|
|
215
|
+
- `fastagent skills list` 默认同时列出 project + user 两个 scope 的已安装 skill,并按 scope 分组显示
|
|
216
|
+
- `fastagent skills list --scope project|user` 只列出单一 scope 的已安装 skill
|
|
217
|
+
- `fastagent skills add` 不再暴露 `--yes`;当前没有 CLI-owned confirmation flow
|
|
218
|
+
|
|
219
|
+
当前常见 source 形态:
|
|
220
|
+
|
|
221
|
+
- 本地路径:已有目录优先按本地 source 处理,包括 `./skills/demo-skill`
|
|
222
|
+
- GitHub shorthand:`owner/repo`
|
|
223
|
+
- GitHub repo URL:`https://github.com/<owner>/<repo>`
|
|
224
|
+
- GitHub tree URL:`https://github.com/<owner>/<repo>/tree/<ref>` 或 `.../tree/<ref>/skills/...`
|
|
225
|
+
|
|
204
226
|
## 常见用例
|
|
205
227
|
|
|
206
228
|
```bash
|
|
@@ -210,7 +232,9 @@ fastagent --channel weixin
|
|
|
210
232
|
fastagent --channel weixin --output jsonl
|
|
211
233
|
fastagent --channel weixin --sandbox local
|
|
212
234
|
fastagent skills add owner/repo
|
|
235
|
+
fastagent skills add owner/repo --list
|
|
213
236
|
fastagent skills add ./skills/review-pr --scope project
|
|
237
|
+
fastagent skills list --scope user
|
|
214
238
|
fastagent config
|
|
215
239
|
fastagent doctor
|
|
216
240
|
fastagent skills list
|