nolo-cli 0.1.56 → 0.1.58
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 +51 -5
- package/index.js +17267 -11288
- package/package.json +6 -8
package/README.md
CHANGED
|
@@ -71,6 +71,52 @@ nolo login --server https://nolo.chat --token <token>
|
|
|
71
71
|
|
|
72
72
|
本地仓库开发应使用 `nolo login` 或显式 `AUTH_TOKEN` 来运行 agent。
|
|
73
73
|
|
|
74
|
+
## 两层认证模型
|
|
75
|
+
|
|
76
|
+
nolo-cli 的认证分为两个独立层面,理解它们的区别很重要:
|
|
77
|
+
|
|
78
|
+
### 第一层:Nolo 平台登录(`nolo login`)
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
nolo login
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
- 登录 **Nolo 平台账号**
|
|
85
|
+
- 通过 OAuth 设备码流程,在浏览器授权后保存 token 到 `~/.nolo/profile.json`
|
|
86
|
+
- 登录后可以管理 Agent、Doc、Table、Dialog、Space 等 Nolo 资源
|
|
87
|
+
- 对应命令:`nolo login`、`nolo logout`、`nolo whoami`
|
|
88
|
+
|
|
89
|
+
### 第二层:第三方模型订阅授权(`nolo auth <provider>`)
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
nolo auth antigravity # Google Antigravity (Gemini 3, Claude, GPT-OSS)
|
|
93
|
+
nolo auth claude # Claude Pro/Max
|
|
94
|
+
nolo auth chatgpt # ChatGPT Plus / OpenAI Codex
|
|
95
|
+
nolo auth xai # xAI Grok (SuperGrok)
|
|
96
|
+
nolo auth cloudflare # Cloudflare OAuth (email routing, etc.)
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
- 授权 **第三方 API 访问**,让 Agent 使用你的个人订阅额度调用模型
|
|
100
|
+
- token 保存在 `~/.nolo/credentials/<provider>.json`
|
|
101
|
+
- Agent 通过 `apiKeyRef: "<provider>"` + `apiSource: "custom"` 引用这些凭据
|
|
102
|
+
- **不替代 `nolo login`**——管理 Nolo 资源仍需先登录平台
|
|
103
|
+
|
|
104
|
+
### 典型工作流
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# 1. 登录 Nolo 平台
|
|
108
|
+
nolo login
|
|
109
|
+
|
|
110
|
+
# 2. 绑定第三方模型订阅(按需)
|
|
111
|
+
nolo auth antigravity
|
|
112
|
+
|
|
113
|
+
# 3. 查看登录状态
|
|
114
|
+
nolo whoami
|
|
115
|
+
|
|
116
|
+
# 4. 管理 Agent 等资源
|
|
117
|
+
nolo agent list
|
|
118
|
+
```
|
|
119
|
+
|
|
74
120
|
在 TUI 内部,`/update` 是全局 `nolo update` 命令的快捷方式。
|
|
75
121
|
|
|
76
122
|
```bash
|
|
@@ -184,20 +230,20 @@ nolo table add-column --table meta-0e95801d90-01KWSK4Q4TESXQ06SW39JN2TTJ --schem
|
|
|
184
230
|
- `nolo agent email bind <agent> --email <address>` 将已有地址绑定到 agent。
|
|
185
231
|
- `nolo agent email create-and-provision <slug> --name <display> [--local-part pay] [--copy-provider-from <agent>]` 一步创建 agent 并开通邮箱。
|
|
186
232
|
- `nolo auth cloudflare [--client-id <id>] [--generate-token] [--zone-name <domain>] [--write-to-env [path]]` 通过 Cloudflare 自托管 OAuth 授权并可选生成 `Zone:Email Routing:Edit` 的 API Token,还可直接写入 `.env`。
|
|
233
|
+
- `nolo auth claude [--no-browser] [--sync-to-server]` 通过 PKCE + `localhost:54545` 回调授权 Claude Pro/Max;`--no-browser` 时可粘贴最终回调 URL/授权码。凭据保存到 `~/.nolo/credentials/claude.json`。Agent 使用 `provider: "anthropic"`、`apiKeyRef: "claude"`。
|
|
187
234
|
|
|
188
|
-
账户所有权对私有 agent 维护很重要。默认的新测试、验证 dialogs、任务板写入、机器绑定的 agent 运行和用户可见的结果应写入当前操作员账户 `0e95801d90`。原有的 `b2e06f801f` / platform-demo
|
|
235
|
+
账户所有权对私有 agent 维护很重要。默认的新测试、验证 dialogs、任务板写入、机器绑定的 agent 运行和用户可见的结果应写入当前操作员账户 `0e95801d90`。原有的 `b2e06f801f` / platform-demo 账户已删除,仅在极少数维护旧公开/共享记录场景时保留。使用 `nolo agent read`、`nolo agent update` 和仓库原生助手作为正常入口点;只有明确针对旧记录的所有者专属操作才应使用维护的 platform-demo token(来自 `scripts/testUtils.ts`)或重新生成的 token(来自 `scripts/generateToken.ts`)。不要将 token 字符串复制到文档、日志或提示词中。
|
|
189
236
|
|
|
190
237
|
在当前 TUI 中,支持的斜杠命令示例包括:
|
|
191
|
-
`/
|
|
238
|
+
`/switch`、`/agents`、`/context`(别名 `/ctx`)、`/doc`、
|
|
192
239
|
`/help`、`/new`、`/customize`、`/login`、`/profile`、`/version`、`/quit`
|
|
193
240
|
(别名 `/exit`)和 `/update`(映射到 `nolo update`)。
|
|
194
241
|
|
|
195
242
|
更广泛的 TUI 命令模型的未来产品方向示例:
|
|
196
243
|
|
|
197
244
|
```text
|
|
198
|
-
/
|
|
199
|
-
/
|
|
200
|
-
/dialog open latest
|
|
245
|
+
/switch list
|
|
246
|
+
/switch ops
|
|
201
247
|
/doc list
|
|
202
248
|
/table query builtin-dialog-probe-runs
|
|
203
249
|
```
|