@yoooclaw/cli 0.0.3 → 0.0.5
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/LICENSE +21 -0
- package/README.md +32 -6
- package/dist/bin.cjs +6677 -2469
- package/dist/bin.cjs.map +35 -13
- package/dist/index.cjs +6677 -2469
- package/dist/index.cjs.map +35 -13
- package/package.json +2 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Yoooclaw
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
yoooclaw 独立 CLI 工具 —— 自带后台守护进程(daemon),不依赖 openclaw 客户端在线。
|
|
4
4
|
设计对齐飞书 [lark-cli](https://github.com/larksuite/cli):Service-oriented 命令树、三层命令体系(Shortcuts / Service Commands / Raw API)、统一 `--format`、Agent-Native。
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
完整文档见 [packages/docs/src/cli](../docs/src/cli)。
|
|
7
7
|
|
|
8
|
-
>
|
|
9
|
-
> 各 service 的真实逻辑按后续 imp 文档逐个落地,当前 action 返回 `YOOOCLAW_NOT_IMPLEMENTED` 占位。
|
|
8
|
+
> **状态:可用。** 配置、认证、daemon、通知、录音、图片、灯效规则、监控、Relay、日志、gateway 自检和 raw API 等 service 命令已落地;本地查询类可纯读磁盘,控制类通过本地 daemon 协作。
|
|
10
9
|
|
|
11
10
|
## 安装与命令
|
|
12
11
|
|
|
@@ -48,23 +47,47 @@ yc --help # 等价短 alias
|
|
|
48
47
|
成功与失败共用同一通道(stdout)与可预测结构;失败额外以非零退出码表达:
|
|
49
48
|
|
|
50
49
|
```json
|
|
51
|
-
{ "ok": false, "error": { "code": "
|
|
50
|
+
{ "ok": false, "error": { "code": "YOOOCLAW_DAEMON_NOT_RUNNING", "message": "...", "hint": "..." } }
|
|
52
51
|
```
|
|
53
52
|
|
|
54
53
|
错误码统一前缀 `YOOOCLAW_*`(见 [src/errors.ts](src/errors.ts))。
|
|
55
54
|
|
|
55
|
+
## 录音与 Relay
|
|
56
|
+
|
|
57
|
+
独立 daemon 会复用 `@yoooclaw/phone-notifications` 的录音存储、状态机和 ASR 调度,并通过 `RelayClient + RelayDispatcher` 接收手机端 `recordings.sync` / `POST /recordings`。
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# api 模式:未写 --api-key 时回退 account 级 ock- key
|
|
61
|
+
yoooclaw recording setup-asr --mode api --language auto --non-interactive
|
|
62
|
+
|
|
63
|
+
# 查询和跟随录音状态事件
|
|
64
|
+
yoooclaw recording list
|
|
65
|
+
yoooclaw recording events --since 1h --limit 50
|
|
66
|
+
yoooclaw recording events --id <recording-id> --watch
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
录音配置与事件分别落在当前 profile 的:
|
|
70
|
+
|
|
71
|
+
```text
|
|
72
|
+
~/.yoooclaw/profiles/<profile>/recordings/asr-config.json
|
|
73
|
+
~/.yoooclaw/profiles/<profile>/recordings/state/events.jsonl
|
|
74
|
+
```
|
|
75
|
+
|
|
56
76
|
## Agent Skill
|
|
57
77
|
|
|
58
78
|
随包发布 [skills/](skills/) 下的 SKILL.md(流式查通知、从 stdin 建灯效规则、隧道排查),教 Agent 直接调 `yoooclaw` 命令。在 openclaw 插件里这些 Skill 由 `openclaw.plugin.json` 自动注册;独立 CLI 形态下需手动安装到 Agent 的 skills 发现目录:
|
|
59
79
|
|
|
60
80
|
```bash
|
|
61
81
|
yoooclaw skills list # 列出随包发布的内置 Skill
|
|
62
|
-
yoooclaw skills
|
|
82
|
+
yoooclaw skills targets # 查看支持的 Agent 目标和探测结果
|
|
83
|
+
yoooclaw skills install # 自动探测唯一 Agent 后软链安装
|
|
84
|
+
yoooclaw skills install --agent codex
|
|
85
|
+
yoooclaw skills install --agent claude
|
|
63
86
|
yoooclaw skills install --copy # 复制而非软链(Windows 无管理员权限时用)
|
|
64
87
|
yoooclaw skills install --target <dir> --force
|
|
65
88
|
```
|
|
66
89
|
|
|
67
|
-
默认软链而非复制:`yoooclaw update self` 升级 CLI 后,Skill
|
|
90
|
+
默认软链而非复制:`yoooclaw update self` 升级 CLI 后,Skill 内容自动跟随新版本。裸 `skills install` 只会在检测到唯一 Agent 时自动安装;否则显式传 `--agent claude` / `--agent codex` 或 `--target <dir>`。安装后重启 Agent 会话即可被发现。
|
|
68
91
|
|
|
69
92
|
## 数据目录
|
|
70
93
|
|
|
@@ -91,4 +114,7 @@ node dist/bin.cjs --help
|
|
|
91
114
|
| [src/output/format.ts](src/output/format.ts) | `--format` 统一序列化 + 错误 schema |
|
|
92
115
|
| [src/errors.ts](src/errors.ts) | `YOOOCLAW_*` 错误码 + `YoooclawError` |
|
|
93
116
|
| [src/paths.ts](src/paths.ts) | `~/.yoooclaw/` 目录布局解析 |
|
|
117
|
+
| [src/daemon/recording-bridge.ts](src/daemon/recording-bridge.ts) | daemon 形态的 `recordings.sync` 覆盖、ASR fallback 与 in-flight 去重 |
|
|
118
|
+
| [src/daemon/recording-events.ts](src/daemon/recording-events.ts) | 录音状态事件 JSONL 追加日志 |
|
|
119
|
+
| [src/daemon/relay-dispatcher.ts](src/daemon/relay-dispatcher.ts) | Relay 入站帧到 `StandaloneRuntime` 的进程内分发 |
|
|
94
120
|
| [src/commands/skills.ts](src/commands/skills.ts) | 内置 Skill 列举 / 安装到 Agent skills 目录 |
|