superun-ai-cli 0.1.26 → 0.1.28
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/INSTALL.md +5 -5
- package/README.en.md +26 -7
- package/README.md +30 -11
- package/dist/api/agent-command-api.d.ts +0 -1
- package/dist/api/agent-command-api.js.map +1 -1
- package/dist/api/integration-api.d.ts +3 -1
- package/dist/api/integration-api.js +40 -2
- package/dist/api/integration-api.js.map +1 -1
- package/dist/api/plugin-api.d.ts +5 -2
- package/dist/api/plugin-api.js +59 -3
- package/dist/api/plugin-api.js.map +1 -1
- package/dist/auth/browser-login.js +2 -2
- package/dist/commands/auth/login.js +1 -1
- package/dist/commands/chat/message.d.ts +1 -1
- package/dist/commands/chat/message.js +4 -24
- package/dist/commands/chat/message.js.map +1 -1
- package/dist/commands/chat/plugin.js +11 -6
- package/dist/commands/chat/plugin.js.map +1 -1
- package/dist/conversation/managed-agent-entry.js +3 -3
- package/dist/conversation/next-actions.js +12 -4
- package/dist/conversation/next-actions.js.map +1 -1
- package/dist/conversation/state-resolver.js +1 -1
- package/dist/interactions/handlers/reply-plugin.js +29 -3
- package/dist/interactions/handlers/reply-plugin.js.map +1 -1
- package/dist/interactions/handlers/reply-secret.js +3 -0
- package/dist/interactions/handlers/reply-secret.js.map +1 -1
- package/dist/interactions/managed-agent-model.js +1 -1
- package/dist/interactions/parsers/plugin-action.js +45 -4
- package/dist/interactions/parsers/plugin-action.js.map +1 -1
- package/dist/interactions/parsers/secret-input.js +5 -2
- package/dist/interactions/parsers/secret-input.js.map +1 -1
- package/dist/interactions/plugin-config.d.ts +9 -0
- package/dist/interactions/plugin-config.js +102 -0
- package/dist/interactions/plugin-config.js.map +1 -0
- package/dist/interactions/registry.js +1 -1
- package/dist/runtime.d.ts +1 -0
- package/dist/runtime.js +73 -4
- package/dist/runtime.js.map +1 -1
- package/package.json +1 -1
- package/dist/api/upload-api.d.ts +0 -8
- package/dist/api/upload-api.js +0 -71
- package/dist/api/upload-api.js.map +0 -1
package/INSTALL.md
CHANGED
|
@@ -31,7 +31,7 @@ WorkBuddy 等工具可能使用自带 Node/npm,与普通终端的安装位置
|
|
|
31
31
|
首次安装、版本查询及旧版升级统一使用以下方式;由安装助手准备并执行,不要求用户读取凭证或修改自己的 npm 配置:
|
|
32
32
|
|
|
33
33
|
- 按当前 Node 和 PATH 定位 npm 可执行文件,解析符号链接得到 `npm-cli.js`,通过当前 Node 直接启动它;不读取 `.npmrc` 来定位 npm,也不执行 `npm config list/get`。
|
|
34
|
-
- 为 npm 子进程新建环境,只传系统运行所需的 PATH、HOME、临时目录、Windows 系统目录、语言,以及代理、CA/证书、缓存配置。不要复制整个环境后仅删除几个已知 Token 名;不传 npm Token、
|
|
34
|
+
- 为 npm 子进程新建环境,只传系统运行所需的 PATH、HOME、临时目录、Windows 系统目录、语言,以及代理、CA/证书、缓存配置。不要复制整个环境后仅删除几个已知 Token 名;不传 npm Token、superun PAT、其他业务凭证和 `NODE_OPTIONS`。主进程中的 superun 登录配置保持不变。
|
|
35
35
|
- 在子进程中固定 `npm_config_userconfig = os.devNull`、`npm_config_globalconfig = path.join(os.devNull, 'superun-empty-npmrc')`、`npm_config_global = 'true'`、`npm_config_registry = 'https://registry.npmjs.org/'`,不继承其他 npm 配置。两份空配置使用不同路径;全局模式跳过项目 `.npmrc`。跨平台路径由 Node 的 `node:os`、`node:path` 计算。
|
|
36
36
|
- 使用下列命令参数安装公开包,并关闭安装脚本、审计与捐助提示。捕获 npm 输出,只报告安装结果、版本或错误码,不把 npm 原始日志发给模型,也不通过打印环境变量排查认证。
|
|
37
37
|
- 旧版在启动更新前被拦截时,不反复执行旧版业务命令;在同一 Node 环境按上述方式安装新版,再验证 `superun-ai version`。安装来源、权限或网络问题应如实报告,不要求用户关闭宿主的敏感信息保护。
|
|
@@ -48,9 +48,9 @@ npm install -g superun-ai-cli --registry=https://registry.npmjs.org --ignore-scr
|
|
|
48
48
|
npm view superun-ai-cli name version dist-tags --registry=https://registry.npmjs.org --json
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
- 安装成功后继续验证命令,再引导用户登录
|
|
51
|
+
- 安装成功后继续验证命令,再引导用户登录 superun。
|
|
52
52
|
- 如果返回 `E404`、网络、证书、权限或其他错误,如实说明并检查 npm 官方 Registry 的访问情况,不自动切换包名、镜像源或源码安装方式。
|
|
53
|
-
- 更新现有安装时,保留用户的
|
|
53
|
+
- 更新现有安装时,保留用户的 superun 凭据;不要求重新导入 PAT。
|
|
54
54
|
- 公开包安装、版本查询及旧入口修复均由安装助手在当前执行环境完成。使用当前 Node 启动对应 npm,以空用户/全局配置执行,禁止读取用户 npmrc 或继承 npm 登录 Token;保留必要的代理和证书环境变量。不要把 npm 凭证授权、环境切换或升级命令转交给用户,也不要关闭宿主的权限保护。
|
|
55
55
|
|
|
56
56
|
### 可选:用户明确要求从源码安装
|
|
@@ -86,7 +86,7 @@ superun-ai version
|
|
|
86
86
|
|
|
87
87
|
确认命令可以启动。若提示找不到命令,检查当前终端的 `PATH`、所用 Node.js 安装及 npm 全局目录;不要把它误判为业务登录失败。不要通过全量打印环境变量来排查,避免泄露凭据。
|
|
88
88
|
|
|
89
|
-
业务命令会先检查 npm `latest`,在独立目录安装并验证新版,切换默认执行入口后继续;原 npm 安装作为启动入口保留,普通终端和工具自带环境各自维护版本。业务执行不清理旧版本或失败安装目录,不通过原地全局更新触发旧包批量删除。版本查询或更新失败时停止业务,不回退旧版继续请求。公开包更新不需要 npm 登录 Token,不让模型读取 npm 凭证明文。版本校验失败时先处理 Registry 访问或安装错误,不清除
|
|
89
|
+
业务命令会先检查 npm `latest`,在独立目录安装并验证新版,切换默认执行入口后继续;原 npm 安装作为启动入口保留,普通终端和工具自带环境各自维护版本。业务执行不清理旧版本或失败安装目录,不通过原地全局更新触发旧包批量删除。版本查询或更新失败时停止业务,不回退旧版继续请求。公开包更新不需要 npm 登录 Token,不让模型读取 npm 凭证明文。版本校验失败时先处理 Registry 访问或安装错误,不清除 superun 凭据。旧入口如在加载新版之前就失败,由安装助手在同一环境完成一次升级并验证,再继续用户任务,不要求用户自行查路径或敲命令;宿主要求权限时仍按实际授权流程处理。
|
|
90
90
|
|
|
91
91
|
## 4. 引导用户登录
|
|
92
92
|
|
|
@@ -104,7 +104,7 @@ superun-ai auth status
|
|
|
104
104
|
superun-ai auth login
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
-
CLI 会打开
|
|
107
|
+
CLI 会打开 superun 登录页面,完成后领取 PAT 并保存到本地。浏览器未自动打开时,把 CLI 打印的登录地址提供给用户。保持登录命令运行,等它返回成功;不要另起重复登录流程。等待期间告诉用户需要完成网页登录,超时或取消时如实说明。
|
|
108
108
|
|
|
109
109
|
如果用户明确要导入已有 PAT,请让用户在自己的交互式终端执行:
|
|
110
110
|
|
package/README.en.md
CHANGED
|
@@ -15,7 +15,7 @@ Requires Node.js 22 or newer and npm.
|
|
|
15
15
|
Send the following prompt to Claude Code, Codex, or another AI coding agent. The agent will follow the [installation guide](INSTALL.md) to check your environment, install the CLI, and guide you through login and verification:
|
|
16
16
|
|
|
17
17
|
```text
|
|
18
|
-
Read https://raw.githubusercontent.com/AiGuangInc/superun-ai-cli/refs/heads/main/INSTALL.md and help me install and configure superun-ai-cli. Install from npm. Let me complete
|
|
18
|
+
Read https://raw.githubusercontent.com/AiGuangInc/superun-ai-cli/refs/heads/main/INSTALL.md and help me install and configure superun-ai-cli. Install from npm. Let me complete superun login in my browser; do not request or display my PAT in plain text.
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
If the agent already has this repository open, ask it to read `INSTALL.md` in the repository root.
|
|
@@ -26,7 +26,7 @@ If the agent already has this repository open, ask it to read `INSTALL.md` in th
|
|
|
26
26
|
npm install -g superun-ai-cli --registry=https://registry.npmjs.org
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
`-g` installs the package globally. Once the global command directory is on your `PATH`, you can run `superun-ai` from any directory. Installing this public package does not require an npm publishing account; sign in to
|
|
29
|
+
`-g` installs the package globally. Once the global command directory is on your `PATH`, you can run `superun-ai` from any directory. Installing this public package does not require an npm publishing account; sign in to superun after installation.
|
|
30
30
|
|
|
31
31
|
The package name is `superun-ai-cli`; the shell command is `superun-ai`.
|
|
32
32
|
|
|
@@ -124,7 +124,7 @@ superun-ai auth status
|
|
|
124
124
|
superun-ai auth logout
|
|
125
125
|
```
|
|
126
126
|
|
|
127
|
-
`auth login` reuses an existing PAT. If none is configured, it opens the system default browser for
|
|
127
|
+
`auth login` reuses an existing PAT. If none is configured, it opens the system default browser for superun login and saves the resulting PAT locally. Business commands without a PAT use the same login flow, including commands run from an agent's non-TTY shell, then resume the original operation without requiring a separate `auth login` command. `auth status` only checks existing configuration and does not open a browser.
|
|
128
128
|
|
|
129
129
|
Browser login waits for up to five minutes. Press Ctrl+C to cancel. If the browser does not open automatically, use the URL printed in the terminal. The website login token is only used to obtain a PAT and is not stored locally.
|
|
130
130
|
|
|
@@ -176,7 +176,7 @@ While `chat wait` or a write command is waiting, progress from every polling ite
|
|
|
176
176
|
|
|
177
177
|
Overall completion retains the existing session, message, interaction, and background-work rules. `taskProgress` is display-only: a completed item or changed card does not end the wait, and item counts do not determine overall completion. Existing early style-preview notifications, local timeouts, and user-input behavior remain unchanged. Pass `--progress-revision` with the previous revision to compute `changed`; it does not suppress progress output on subsequent queries, and `chat state` and `chat style list` also accept this option.
|
|
178
178
|
|
|
179
|
-
The CLI connects to
|
|
179
|
+
The CLI connects to superun by default. Use the global `--endpoint <URL>` option to specify an API endpoint and `--locale <language>` to choose the response language.
|
|
180
180
|
|
|
181
181
|
## Answer questions and create an agent
|
|
182
182
|
|
|
@@ -190,7 +190,7 @@ Creating a managed agent has three setup steps:
|
|
|
190
190
|
|
|
191
191
|
Review the settings and confirm creation once you have finished. You can go back to make changes, skip optional steps, or stop creating the agent. “Quick create” uses the current description without adding knowledge files, a memory store, or optional skills.
|
|
192
192
|
|
|
193
|
-
Upload knowledge files and custom skill packages through the
|
|
193
|
+
Upload knowledge files and custom skill packages through the superun website after creation. Built-in capabilities are currently included with the agent; clearing their checkboxes does not disable them.
|
|
194
194
|
|
|
195
195
|
When using the CLI directly, prepare an answer file following the current question's instructions, then submit it:
|
|
196
196
|
|
|
@@ -210,6 +210,23 @@ If you exit midway, the questions change, or an operation's outcome is unclear,
|
|
|
210
210
|
superun-ai chat state <sessionId>
|
|
211
211
|
```
|
|
212
212
|
|
|
213
|
+
## Enable plugins
|
|
214
|
+
|
|
215
|
+
Use `superun-ai chat plugin list <sessionId>` to see the plugins available to your project, then enable one as needed:
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
superun-ai chat plugin enable <sessionId> <pluginId>
|
|
219
|
+
superun-ai chat plugin status <sessionId> <pluginId>
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Plugins with a platform-managed option, such as speech recognition, do not require your own credentials by default. To use your own account or a plugin that requires credentials, follow the secure-input instructions. Do not paste secrets into ordinary chat. When using the CLI directly, provide a configuration file with `--input ./plugin-config.json`.
|
|
223
|
+
|
|
224
|
+
To start a disabled plugin again, use the same `chat plugin enable` command. In-progress operations continue waiting without a duplicate submission.
|
|
225
|
+
|
|
226
|
+
If an enable request appears in a conversation, answer that request instead of running a second enable command. Keep following its progress while it runs. Restoring a configured plugin will either reuse its settings or ask for credentials as needed.
|
|
227
|
+
|
|
228
|
+
If external authorization or website configuration is needed, follow the instructions before continuing. You can skip plugins you do not need yet.
|
|
229
|
+
|
|
213
230
|
## Automatic testing and code review
|
|
214
231
|
|
|
215
232
|
```bash
|
|
@@ -275,9 +292,11 @@ After the user explicitly asks to launch the site, use `chat publish status <ses
|
|
|
275
292
|
|
|
276
293
|
`chat publish start --indexing allow|deny` controls search-engine indexing, not visitor access. Change site visibility with `chat publish visibility`. If the service requires acknowledgment of cloud costs, review them before explicitly passing `--acknowledge-cloud-fee`.
|
|
277
294
|
|
|
278
|
-
##
|
|
295
|
+
## Text input and result files
|
|
296
|
+
|
|
297
|
+
`chat create/send/test/review` accepts plain text only. Neither `--file` nor JSON `attachments` (including an empty array) is supported. Use `--message <text>` or load JSON containing only `content` or `message` with `--input <file>` / `--input -`; the two text fields are mutually exclusive. `--input` reads request JSON and does not upload the file.
|
|
279
298
|
|
|
280
|
-
`
|
|
299
|
+
Put the complete requirements and text material in `content`, for example `{"content":"Full requirements\n\n## Reference material\nFull material text"}`. Hosts should read text files and include their contents in the text, rather than saying “see attachment” or passing only a local path. Report any material that cannot be read instead of claiming it was submitted.
|
|
281
300
|
|
|
282
301
|
`session get --include-attachments` returns visible attachments. `chat state --include-file <name>` reads a named visible file. System files and secret configuration are not returned as result attachments.
|
|
283
302
|
|
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
把下面这段话发给 Claude Code、Codex 或其他 AI 编码 Agent,它会根据[安装指南](INSTALL.md)检查环境、安装 CLI,并引导你完成登录与验证:
|
|
18
18
|
|
|
19
19
|
```text
|
|
20
|
-
请阅读 https://raw.githubusercontent.com/AiGuangInc/superun-ai-cli/refs/heads/main/INSTALL.md,帮我安装并配置 superun-ai-cli。请通过 npm 安装,登录
|
|
20
|
+
请阅读 https://raw.githubusercontent.com/AiGuangInc/superun-ai-cli/refs/heads/main/INSTALL.md,帮我安装并配置 superun-ai-cli。请通过 npm 安装,登录 superun 时让我在浏览器完成操作,不要索取或展示 PAT 明文。
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
如果 Agent 已经打开本仓库,也可以直接让它阅读根目录的 `INSTALL.md`。
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
npm install -g superun-ai-cli --registry=https://registry.npmjs.org
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
`-g` 表示全局安装。全局命令目录在 `PATH` 中时,可以在任意目录使用 `superun-ai`。安装公开包不需要 npm 发布账号;安装后登录的是
|
|
31
|
+
`-g` 表示全局安装。全局命令目录在 `PATH` 中时,可以在任意目录使用 `superun-ai`。安装公开包不需要 npm 发布账号;安装后登录的是 superun 账号。
|
|
32
32
|
|
|
33
33
|
安装包名为 `superun-ai-cli`,使用时的命令名为 `superun-ai`。
|
|
34
34
|
|
|
@@ -77,7 +77,7 @@ superun-ai chat style generate --help
|
|
|
77
77
|
```text
|
|
78
78
|
superun-ai
|
|
79
79
|
├── auth # 管理 PAT 登录
|
|
80
|
-
│ ├── login # 登录
|
|
80
|
+
│ ├── login # 登录 superun 并保存 PAT
|
|
81
81
|
│ ├── status # 查看本地 PAT 配置状态
|
|
82
82
|
│ └── logout # 清除本地 PAT
|
|
83
83
|
├── session # 查询项目
|
|
@@ -126,7 +126,7 @@ superun-ai auth status
|
|
|
126
126
|
superun-ai auth logout
|
|
127
127
|
```
|
|
128
128
|
|
|
129
|
-
已有 PAT 时,`auth login` 直接复用;没有时自动打开系统默认浏览器,完成
|
|
129
|
+
已有 PAT 时,`auth login` 直接复用;没有时自动打开系统默认浏览器,完成 superun 登录后领取 PAT 并保存到本地,无需手动复制。业务命令缺少 PAT 时也会自动进入同一登录流程,包括 Agent 的非 TTY Shell;登录完成后继续执行原命令,无需另行执行 `auth login`。`auth status` 仍只检查已有配置,不打开浏览器。
|
|
130
130
|
|
|
131
131
|
网页登录最多等待 5 分钟,按 Ctrl+C 可取消。浏览器未自动打开时,可以手动打开终端提示的地址。网页登录 Token 只用于申请 PAT,不会保存到本地。
|
|
132
132
|
|
|
@@ -182,7 +182,7 @@ superun-ai chat stop <sessionId>
|
|
|
182
182
|
|
|
183
183
|
整体结束判断沿用原有会话、消息、交互和后台工作状态逻辑,`taskProgress` 仅用于展示;单项完成或进度卡更新不会结束等待,也不以进度条目数量推断整轮完成。原有单个风格方案就绪提示、本地等待超时及用户问答行为保持不变。`--progress-revision` 可传入上次版本用于计算 `changed`,但不抑制每次查询的进度输出;`chat state` 与 `chat style list` 同样支持该参数。
|
|
184
184
|
|
|
185
|
-
默认连接
|
|
185
|
+
默认连接 superun 服务。全局参数 `--endpoint <URL>` 可指定 API 地址,`--locale <language>` 可指定响应语言。
|
|
186
186
|
|
|
187
187
|
## 回答问题与创建智能体
|
|
188
188
|
|
|
@@ -196,7 +196,7 @@ superun-ai chat stop <sessionId>
|
|
|
196
196
|
|
|
197
197
|
完成配置后,核对信息并确认创建。需要调整时可以返回修改,也可以跳过可选步骤或终止创建。选择“快速创建”会直接按当前设定创建,不配置知识文件、记忆库和可选技能。
|
|
198
198
|
|
|
199
|
-
知识文件和自定义技能包请在创建后到
|
|
199
|
+
知识文件和自定义技能包请在创建后到 superun 网页端上传。当前内置能力随智能体提供,取消勾选不等于禁用对应能力。
|
|
200
200
|
|
|
201
201
|
直接使用 CLI 时,按当前问题的提示准备答案文件,再提交:
|
|
202
202
|
|
|
@@ -216,9 +216,26 @@ superun-ai chat interaction skip <sessionId> <interactionId>
|
|
|
216
216
|
superun-ai chat state <sessionId>
|
|
217
217
|
```
|
|
218
218
|
|
|
219
|
+
## 启用插件
|
|
220
|
+
|
|
221
|
+
使用 `superun-ai chat plugin list <sessionId>` 查看项目可用插件,再按需启用:
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
superun-ai chat plugin enable <sessionId> <pluginId>
|
|
225
|
+
superun-ai chat plugin status <sessionId> <pluginId>
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
语音识别等支持平台托管的插件默认无需自备密钥。使用自有账号,或启用需要凭据的插件时,请按提示通过安全输入提供配置,不要把密钥发到普通聊天里。直接使用 CLI 时,可通过 `--input ./plugin-config.json` 提交配置文件。
|
|
229
|
+
|
|
230
|
+
停用后需要再次启动时,仍使用同一条 `chat plugin enable` 命令。操作进行中会继续等待,无需重复提交。
|
|
231
|
+
|
|
232
|
+
如果插件是在对话中请求启用的,直接回答那条启用或配置提示;不必再执行一次独立启用命令。启用过程中继续查看进度即可。已有配置的插件恢复时会按提示复用配置或要求补充凭据。
|
|
233
|
+
|
|
234
|
+
需要外部平台授权或到网页修改配置时,按提示完成后再继续。暂时不需要的插件可以选择跳过。
|
|
235
|
+
|
|
219
236
|
## 自动测试
|
|
220
237
|
|
|
221
|
-
自动测试验证指定
|
|
238
|
+
自动测试验证指定 superun 项目中的已有功能。发现确认的产品问题后,先在对话中告知,再自动修复并汇报。每次聚焦一个具体流程;测试环境异常、疑似问题和未覆盖范围会如实说明。
|
|
222
239
|
|
|
223
240
|
```bash
|
|
224
241
|
superun-ai chat test <sessionId>
|
|
@@ -271,7 +288,7 @@ superun-ai chat send <sessionId> --test-followup <sourceMessageId> --message "
|
|
|
271
288
|
|
|
272
289
|
## 代码审查
|
|
273
290
|
|
|
274
|
-
代码审查检查指定
|
|
291
|
+
代码审查检查指定 superun 项目的已有代码。未指定范围时检查刚才的改动;指定范围时原样传递用户要求。发现确认的问题后先告知用户,再自动修复并汇报;与用户明确意图冲突的修复先确认业务规则。代码审查与功能的实际运行验证分别表达,不把审查完成或修复完成说成测试、复审通过。
|
|
275
292
|
|
|
276
293
|
```bash
|
|
277
294
|
superun-ai chat review <sessionId>
|
|
@@ -403,9 +420,11 @@ superun-ai chat publish visibility <sessionId> private
|
|
|
403
420
|
|
|
404
421
|
`chat publish start --indexing allow|deny` 控制搜索引擎索引,不限制用户访问;站点上下线使用 `chat publish visibility`。若服务端要求确认云服务费用,了解费用后可显式传入 `--acknowledge-cloud-fee`。
|
|
405
422
|
|
|
406
|
-
##
|
|
423
|
+
## 文本输入与结果文件
|
|
424
|
+
|
|
425
|
+
`chat create/send/test/review` 只接受纯文本,不支持 `--file` 或 JSON `attachments`(包括空数组)。通过 `--message <text>` 传入文本,或通过 `--input <file>` / `--input -` 读取仅含 `content` 或 `message` 字段的 JSON,两个文本字段不能同时提供。`--input` 读取的是请求 JSON,不会上传该文件。
|
|
407
426
|
|
|
408
|
-
`
|
|
427
|
+
需求及文本素材应完整放入 `content`,例如 `{"content":"完整需求正文\n\n## 参考素材\n完整素材正文"}`。宿主读取文本文件后应将正文并入文本,不使用“正文见附件”或只传本地路径;不能读取的素材应明确告知用户,不能假装已经提交。
|
|
409
428
|
|
|
410
429
|
`session get --include-attachments` 返回可见附件清单;`chat state --include-file <name>` 读取指定可见附件正文。系统文件和密钥配置文件不会作为结果附件返回。
|
|
411
430
|
|
|
@@ -447,7 +466,7 @@ CLI 每次执行业务命令前都查询 npm `latest`。版本不一致时,使
|
|
|
447
466
|
|
|
448
467
|
自动更新保留原 npm 安装作为稳定启动入口,新版本存放于 `~/.cache/superun-ai-cli/installations/` 下按安装来源和 Node 环境隔离的目录,通过小型入口记录切换实际执行版本,不原地覆盖全局包。每次安装使用独立目录,并发安装互不覆盖;不创建更新锁,不在业务命令中删除旧版本、失败安装目录或切换残留,避免 npm 清理旧包触发宿主的批量删除确认。历史版本会占用磁盘,本版不自动清理。CLI 不绕过宿主权限保护,其他文件写入或网络权限仍受宿主管理。
|
|
449
468
|
|
|
450
|
-
公开包的版本预检与安装使用无登录凭证的 npm 配置,不读取用户、全局或项目的 npmrc。更新子进程仅接收运行和网络所需的环境变量,不继承 npm Token、
|
|
469
|
+
公开包的版本预检与安装使用无登录凭证的 npm 配置,不读取用户、全局或项目的 npmrc。更新子进程仅接收运行和网络所需的环境变量,不继承 npm Token、superun PAT、其他业务凭证或 `NODE_OPTIONS`,也不弹出 CLI 自己的 npm 登录步骤。环境变量中的代理、CA/证书与缓存配置继续生效;只写在 npmrc 中的配置不用于自动更新。官方 Registry 不可用时,可回退到 `npm_config_registry` / `NPM_CONFIG_REGISTRY` 环境变量指定的无凭证镜像地址,安装沿用查询成功的源。恢复过程不输出 npm 原始日志或凭据;失败只返回原因码,不关闭证书校验、不绕过宿主权限保护。AI 安装助手的首次安装与旧版升级也按 [安装指南](INSTALL.md) 使用无凭证环境,避免旧入口在加载新版之前读取 npm 凭证。
|
|
451
470
|
|
|
452
471
|
可以执行 `superun-ai update` 主动同步 npm `latest`。从源码安装也遵循相同的版本校验;修改源码后需要重新构建,如果全局命令不是链接到该目录,再执行 `npm install -g .`。
|
|
453
472
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-command-api.js","sourceRoot":"","sources":["../../src/api/agent-command-api.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAC7F,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-command-api.js","sourceRoot":"","sources":["../../src/api/agent-command-api.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAC7F,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAkBnG,MAAM,MAAM,GAAG,oCAAoC,CAAC;AACpD,MAAM,OAAO,eAAe;IACG;IAA7B,YAA6B,MAAiB;QAAjB,WAAM,GAAN,MAAM,CAAW;IAAG,CAAC;IAClD,KAAK,CAAC,IAAI,CAAC,KAAgB;QACzB,OAAO,MAAM,CACX,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CACpB,GAAG,MAAM,WAAW,EACpB;YACE,GAAG,KAAK;YACR,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC7E,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC;YACrB,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,CAAC;YAC/B,UAAU,EAAE;gBACV,CAAC,uBAAuB,CAAC,EAAE,MAAM;gBACjC,CAAC,yBAAyB,CAAC,EAAE,MAAM;gBACnC,GAAG,KAAK,CAAC,UAAU;gBACnB,WAAW,EAAE,GAAG;aACjB;YACD,GAAG,CAAC,KAAK,CAAC,SAAS;gBACjB,CAAC,CAAC;oBACE,+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AC,CAAC,CAAC;IAChF,CAAC;IACD,KAAK,CAAC,YAAY,CAAC,SAAiB,EAAE,SAAiB,EAAE,KAAiB;QACxE,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,qBAAqB,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,IAAI,CAAC,CAAC;IAChG,CAAC;IACD,KAAK,CAAC,cAAc,CAClB,SAAiB,EACjB,IAAY,EACZ,OAAgB,EAChB,cAAuB;QAEvB,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CACpB,GAAG,MAAM,qBAAqB,EAC9B,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,cAAc,EAAE,EACvF,IAAI,CACL,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,YAAY,CAAC,KAKlB;QACC,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,qBAAqB,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IACtE,CAAC;IACD,KAAK,CAAC,YAAY,CAAC,SAAiB,EAAE,KAA6B;QACjE,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,qBAAqB,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,IAAI,CAAC,CAAC;IACrF,CAAC;CACF"}
|
|
@@ -4,6 +4,8 @@ import type { JsonObject } from '../contracts/value.js';
|
|
|
4
4
|
export declare class IntegrationApi {
|
|
5
5
|
private readonly client;
|
|
6
6
|
constructor(client: ApiClient);
|
|
7
|
-
connect(sessionId: string, integration: string, payload: JsonObject, toolId?: string): Promise<JsonObject>;
|
|
7
|
+
connect(sessionId: string, integration: string, payload: JsonObject, toolId?: string, suggested?: JsonObject): Promise<JsonObject>;
|
|
8
8
|
status(sessionId: string, integration: string): Promise<JsonObject>;
|
|
9
|
+
batchStatus(sessionId: string, integrations: string[]): Promise<JsonObject>;
|
|
10
|
+
disable(sessionId: string, integration: string): Promise<JsonObject>;
|
|
9
11
|
}
|
|
@@ -1,11 +1,40 @@
|
|
|
1
1
|
import { object } from '../contracts/value.js';
|
|
2
|
+
import { preparePluginConfig } from '../interactions/plugin-config.js';
|
|
3
|
+
import { CliError } from '../output/exit-codes.js';
|
|
2
4
|
export class IntegrationApi {
|
|
3
5
|
client;
|
|
4
6
|
constructor(client) {
|
|
5
7
|
this.client = client;
|
|
6
8
|
}
|
|
7
|
-
async connect(sessionId, integration, payload, toolId) {
|
|
8
|
-
|
|
9
|
+
async connect(sessionId, integration, payload, toolId, suggested = {}) {
|
|
10
|
+
if (integration === 'CUSTOM_MINIPROGRAM' && toolId)
|
|
11
|
+
throw new CliError('UNSUPPORTED_INTERACTION', '小程序配置确认需在网页完成;基础插件启停可使用 chat plugin 命令');
|
|
12
|
+
const current = await this.status(sessionId, integration);
|
|
13
|
+
if (current.integrationStatus === 'ENABLED')
|
|
14
|
+
return current;
|
|
15
|
+
if (![
|
|
16
|
+
'UNKNOWN',
|
|
17
|
+
'NOT_ENABLED',
|
|
18
|
+
'DISABLED',
|
|
19
|
+
'PAUSED',
|
|
20
|
+
'ENABLING',
|
|
21
|
+
'RESTORING',
|
|
22
|
+
'PAUSING',
|
|
23
|
+
'DISABLING',
|
|
24
|
+
].includes(String(current.integrationStatus)))
|
|
25
|
+
throw new CliError('PROTOCOL_ERROR', '插件状态响应无效,请查询后继续', {
|
|
26
|
+
sessionId,
|
|
27
|
+
pluginId: integration,
|
|
28
|
+
});
|
|
29
|
+
if (!toolId && ['ENABLING', 'RESTORING'].includes(String(current.integrationStatus)))
|
|
30
|
+
return current;
|
|
31
|
+
const config = preparePluginConfig(integration, payload, current, suggested);
|
|
32
|
+
const facade = integration === 'ASR'
|
|
33
|
+
? 'AsrIntegration'
|
|
34
|
+
: integration === 'FACEID'
|
|
35
|
+
? 'FaceIdIntegration'
|
|
36
|
+
: 'SessionIntegration';
|
|
37
|
+
return object(await this.client.call(`/api/uxa-center/agent/${facade}/connectIntegration`, { sessionId, integration, payload: config, toolId }, true));
|
|
9
38
|
}
|
|
10
39
|
async status(sessionId, integration) {
|
|
11
40
|
return object(await this.client.call('/api/uxa-center/agent/SessionIntegration/integrationStatus', {
|
|
@@ -13,5 +42,14 @@ export class IntegrationApi {
|
|
|
13
42
|
integration,
|
|
14
43
|
}));
|
|
15
44
|
}
|
|
45
|
+
async batchStatus(sessionId, integrations) {
|
|
46
|
+
return object(await this.client.call('/api/uxa-center/agent/SessionIntegration/batchIntegrationStatus', {
|
|
47
|
+
sessionId,
|
|
48
|
+
integrations,
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
async disable(sessionId, integration) {
|
|
52
|
+
return object(await this.client.call('/api/uxa-center/agent/SessionIntegration/disableIntegration', { sessionId, integration }, true));
|
|
53
|
+
}
|
|
16
54
|
}
|
|
17
55
|
//# sourceMappingURL=integration-api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration-api.js","sourceRoot":"","sources":["../../src/api/integration-api.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,MAAM,OAAO,cAAc;IACI;IAA7B,YAA6B,MAAiB;QAAjB,WAAM,GAAN,MAAM,CAAW;IAAG,CAAC;IAClD,KAAK,CAAC,OAAO,CACX,SAAiB,EACjB,WAAmB,EACnB,OAAmB,EACnB,MAAe;
|
|
1
|
+
{"version":3,"file":"integration-api.js","sourceRoot":"","sources":["../../src/api/integration-api.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,MAAM,OAAO,cAAc;IACI;IAA7B,YAA6B,MAAiB;QAAjB,WAAM,GAA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E,MAAM,EAAE,EACnD,IAAI,CACL,CACF,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,SAAiB,EAAE,WAAmB;QACjD,OAAO,MAAM,CACX,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,4DAA4D,EAAE;YACnF,SAAS;YACT,WAAW;SACZ,CAAC,CACH,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,WAAW,CAAC,SAAiB,EAAE,YAAsB;QACzD,OAAO,MAAM,CACX,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iEAAiE,EAAE;YACxF,SAAS;YACT,YAAY;SACb,CAAC,CACH,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,OAAO,CAAC,SAAiB,EAAE,WAAmB;QAClD,OAAO,MAAM,CACX,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CACpB,6DAA6D,EAC7D,EAAE,SAAS,EAAE,WAAW,EAAE,EAC1B,IAAI,CACL,CACF,CAAC;IACJ,CAAC;CACF"}
|
package/dist/api/plugin-api.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** 插件的脱敏查询与启停;补齐 Glow 已公开的集成入口,不修改插件内部实现。@author xiuyu.yi */
|
|
2
2
|
import type { ApiClient } from '../transport/api-client.js';
|
|
3
|
-
import type
|
|
3
|
+
import { type JsonObject } from '../contracts/value.js';
|
|
4
4
|
export declare class PluginApi {
|
|
5
5
|
private readonly client;
|
|
6
|
+
private readonly integration;
|
|
6
7
|
constructor(client: ApiClient);
|
|
8
|
+
private visible;
|
|
9
|
+
private state;
|
|
7
10
|
list(sessionId: string): Promise<JsonObject>;
|
|
8
11
|
operate(action: 'status' | 'enable' | 'disable', sessionId: string, pluginId: string): Promise<JsonObject>;
|
|
9
12
|
}
|
package/dist/api/plugin-api.js
CHANGED
|
@@ -1,14 +1,70 @@
|
|
|
1
|
-
import { object } from '../contracts/value.js';
|
|
1
|
+
import { object, text } from '../contracts/value.js';
|
|
2
|
+
import { IntegrationApi } from './integration-api.js';
|
|
3
|
+
import { integrationKey } from '../interactions/handlers/reply-plugin.js';
|
|
4
|
+
import { getSuperunHostingDomain } from '../config/runtime-config.js';
|
|
5
|
+
import { CliError } from '../output/exit-codes.js';
|
|
6
|
+
// ProjectPlugin 目录尚未包含的 Glow 基础插件;Skill 卡片不属于集成生命周期。
|
|
7
|
+
const GLOW_PLUGINS = {
|
|
8
|
+
SUPERUN_PAYMENT: 'superun 支付',
|
|
9
|
+
MEDIA_TRANSCODE: '音视频转码',
|
|
10
|
+
AMAP: '高德地图',
|
|
11
|
+
FACEID: '人脸核验',
|
|
12
|
+
SMS: '短信',
|
|
13
|
+
CUSTOM_MINIPROGRAM: '微信小程序',
|
|
14
|
+
DINGTALK: '钉钉',
|
|
15
|
+
WECOM: '企业微信',
|
|
16
|
+
FEISHU: '飞书',
|
|
17
|
+
STRIPE: 'Stripe 支付',
|
|
18
|
+
};
|
|
2
19
|
export class PluginApi {
|
|
3
20
|
client;
|
|
21
|
+
integration;
|
|
4
22
|
constructor(client) {
|
|
5
23
|
this.client = client;
|
|
24
|
+
this.integration = new IntegrationApi(client);
|
|
25
|
+
}
|
|
26
|
+
visible(pluginId) {
|
|
27
|
+
return (pluginId !== 'SUPERUN_PAYMENT' || getSuperunHostingDomain(this.client.config.endpoint) === 'superun.yun');
|
|
28
|
+
}
|
|
29
|
+
state(response, pluginId) {
|
|
30
|
+
const state = text(response.integrationStatus);
|
|
31
|
+
if (!state)
|
|
32
|
+
throw new CliError('PROTOCOL_ERROR', '接口未返回插件状态,请重新查询', { pluginId });
|
|
33
|
+
return { pluginId, state };
|
|
6
34
|
}
|
|
7
35
|
async list(sessionId) {
|
|
8
|
-
|
|
36
|
+
const response = object(await this.client.call('/api/uxa-center/agent/ProjectPlugin/list', { sessionId }));
|
|
37
|
+
if (!Array.isArray(response.plugins))
|
|
38
|
+
throw new CliError('PROTOCOL_ERROR', '接口未返回插件目录');
|
|
39
|
+
const plugins = response.plugins.map(object).filter((plugin) => this.visible(String(plugin.pluginId)));
|
|
40
|
+
const existing = new Set(plugins.map((plugin) => plugin.pluginId));
|
|
41
|
+
const missing = Object.keys(GLOW_PLUGINS).filter((id) => this.visible(id) && !existing.has(id));
|
|
42
|
+
const statuses = missing.length ? await this.integration.batchStatus(sessionId, missing) : {};
|
|
43
|
+
return {
|
|
44
|
+
...response,
|
|
45
|
+
plugins: [
|
|
46
|
+
...plugins,
|
|
47
|
+
...missing.map((pluginId) => ({
|
|
48
|
+
...this.state(object(statuses[pluginId]), pluginId),
|
|
49
|
+
displayName: GLOW_PLUGINS[pluginId],
|
|
50
|
+
})),
|
|
51
|
+
],
|
|
52
|
+
};
|
|
9
53
|
}
|
|
10
54
|
async operate(action, sessionId, pluginId) {
|
|
11
|
-
|
|
55
|
+
const key = integrationKey(pluginId.trim()).toUpperCase();
|
|
56
|
+
if (!this.visible(key))
|
|
57
|
+
throw new CliError('INVALID_ARGUMENT', '此插件在当前站点不可用', { pluginId: key });
|
|
58
|
+
if (Object.hasOwn(GLOW_PLUGINS, key)) {
|
|
59
|
+
const response = action === 'status'
|
|
60
|
+
? await this.integration.status(sessionId, key)
|
|
61
|
+
: action === 'enable'
|
|
62
|
+
? await this.integration.connect(sessionId, key, {})
|
|
63
|
+
: await this.integration.disable(sessionId, key);
|
|
64
|
+
return this.state(response, key);
|
|
65
|
+
}
|
|
66
|
+
// 保留已有入口,尤其是 Cloud 对历史 SUPABASE / SUPABASE_EMBED 的正确路由。
|
|
67
|
+
return object(await this.client.call(`/api/uxa-center/agent/ProjectPlugin/${action}`, { sessionId, pluginId: key === 'SUPABASE_EMBED' ? 'SUPERUN_CLOUD' : key }, action !== 'status'));
|
|
12
68
|
}
|
|
13
69
|
}
|
|
14
70
|
//# sourceMappingURL=plugin-api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-api.js","sourceRoot":"","sources":["../../src/api/plugin-api.ts"],"names":[],"mappings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,EAAE,EACzE,MAAM,KAAK,QAAQ,CACpB,CACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -30,7 +30,7 @@ export async function ensurePat(options) {
|
|
|
30
30
|
return existing;
|
|
31
31
|
if (!allowBrowser)
|
|
32
32
|
throw new CliError('AUTH_REQUIRED', '未配置 PAT,请执行 superun-ai auth login;脚本中请设置 SUPERUN_PAT 或使用 auth login --stdin');
|
|
33
|
-
// 认证统一使用
|
|
33
|
+
// 认证统一使用 superun 站点,业务地址不影响登录与凭据签发。
|
|
34
34
|
const loginConfig = { ...config, endpoint: DEFAULT_ENDPOINT };
|
|
35
35
|
const uuid = randomUUID();
|
|
36
36
|
const loginUrl = new URL('/web/cli-token-callback', loginConfig.endpoint);
|
|
@@ -39,7 +39,7 @@ export async function ensurePat(options) {
|
|
|
39
39
|
const signal = AbortSignal.any([commandSignal, timeout]);
|
|
40
40
|
try {
|
|
41
41
|
signal.throwIfAborted();
|
|
42
|
-
output.log(`请在浏览器完成
|
|
42
|
+
output.log(`请在浏览器完成 superun 登录:${loginUrl.href}`);
|
|
43
43
|
if (!(await openBrowser(loginUrl.href, signal)))
|
|
44
44
|
output.log('未能自动打开浏览器,请手动打开上面的地址。');
|
|
45
45
|
const anonymousClient = new ApiClient(loginConfig, '', undefined, signal);
|
|
@@ -5,7 +5,7 @@ import { requireCredentials } from '../shared.js';
|
|
|
5
5
|
export function registerLogin(auth, context) {
|
|
6
6
|
auth
|
|
7
7
|
.command('login')
|
|
8
|
-
.description('登录
|
|
8
|
+
.description('登录 superun 并保存 PAT')
|
|
9
9
|
.addOption(new Option('--pat', '在终端隐藏输入现有 PAT').conflicts('stdin'))
|
|
10
10
|
.option('--stdin', '从标准输入读取 PAT')
|
|
11
11
|
.action(async (options, command) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** 创建与续写共用的纯文本消息输入和发送流程。@author xiuyu.yi */
|
|
2
2
|
import type { Command } from 'commander';
|
|
3
3
|
import type { CommandContext } from '../shared.js';
|
|
4
4
|
export declare const appendValue: (value: string, previous: Array<string>) => Array<string>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { object, text } from '../../contracts/value.js';
|
|
3
3
|
import { CliError } from '../../output/exit-codes.js';
|
|
4
|
-
import { uploadAttachment } from '../../api/upload-api.js';
|
|
5
4
|
import { currentRound, roundMessage } from '../../conversation/round-selector.js';
|
|
6
5
|
import { AUTO_TEST_DEFAULT_MESSAGE, AUTO_TEST_OPERATION_KEY, AUTO_TEST_SOURCE_KEY, } from '../../conversation/auto-test.js';
|
|
7
6
|
import { hasCompletedCreationResult } from '../../conversation/next-actions.js';
|
|
@@ -11,25 +10,13 @@ const inputSchema = z
|
|
|
11
10
|
.object({
|
|
12
11
|
content: z.string().optional(),
|
|
13
12
|
message: z.string().optional(),
|
|
14
|
-
attachments: z
|
|
15
|
-
.array(z
|
|
16
|
-
.object({
|
|
17
|
-
name: z.string(),
|
|
18
|
-
mediaType: z.string().optional(),
|
|
19
|
-
content: z.string().optional(),
|
|
20
|
-
url: z.string().url().optional(),
|
|
21
|
-
meta: z.record(z.unknown()).optional(),
|
|
22
|
-
})
|
|
23
|
-
.strict())
|
|
24
|
-
.default([]),
|
|
25
13
|
})
|
|
26
14
|
.strict();
|
|
27
15
|
export const appendValue = (value, previous) => [...previous, value];
|
|
28
16
|
export function messageOptions(command) {
|
|
29
17
|
return withWait(command
|
|
30
18
|
.option('--message <text>', '需求文本')
|
|
31
|
-
.option('--input <file>', 'JSON
|
|
32
|
-
.option('--file <path>', '附加本地文件,可重复使用', appendValue, []));
|
|
19
|
+
.option('--input <file>', '仅含 content 或 message 文本字段的 JSON 文件,- 表示标准输入'));
|
|
33
20
|
}
|
|
34
21
|
export async function sendMessage(context, sessionId, command, check) {
|
|
35
22
|
const options = object(command.opts());
|
|
@@ -56,13 +43,10 @@ export async function sendMessage(context, sessionId, command, check) {
|
|
|
56
43
|
};
|
|
57
44
|
const parsed = inputSchema.safeParse(raw);
|
|
58
45
|
if (!parsed.success || (parsed.data.content !== undefined && parsed.data.message !== undefined))
|
|
59
|
-
throw new CliError('INVALID_ARGUMENT', '输入只接受 content
|
|
46
|
+
throw new CliError('INVALID_ARGUMENT', '输入只接受 content 或 message 文本字段,不能同时提供;不支持附件,请将完整文本放入 content');
|
|
60
47
|
const input = parsed.data, content = input.content ?? input.message ?? '';
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
throw new CliError('INVALID_ARGUMENT', '需求或附件不能为空');
|
|
64
|
-
if (check && !content.trim())
|
|
65
|
-
throw new CliError('INVALID_ARGUMENT', `${label}范围不能为空;省略 --message 可检查刚才完成的内容`);
|
|
48
|
+
if (!content.trim())
|
|
49
|
+
throw new CliError('INVALID_ARGUMENT', check ? `${label}范围不能为空;省略 --message 可检查刚才完成的内容` : '需求文本不能为空');
|
|
66
50
|
const service = await runtime(context, command);
|
|
67
51
|
const previous = sessionId && (options.wait !== false || checkKind) ? await service.load(sessionId) : undefined;
|
|
68
52
|
let operation;
|
|
@@ -83,15 +67,11 @@ export async function sendMessage(context, sessionId, command, check) {
|
|
|
83
67
|
});
|
|
84
68
|
operation = check ?? 'repair';
|
|
85
69
|
}
|
|
86
|
-
const attachments = [...input.attachments];
|
|
87
|
-
for (const file of files)
|
|
88
|
-
attachments.push(await uploadAttachment(service, file));
|
|
89
70
|
const previousMessageId = previous ? roundMessage(previous, currentRound(previous))?.messageId : undefined;
|
|
90
71
|
const create = sessionId ? undefined : await service.config.creation(content);
|
|
91
72
|
const response = await businessWrite(context, service, sessionId, () => service.command.chat({
|
|
92
73
|
sessionId,
|
|
93
74
|
content,
|
|
94
|
-
attachments,
|
|
95
75
|
model: text(options.model),
|
|
96
76
|
workspaceId: text(options.workspaceId),
|
|
97
77
|
...(operation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../../src/commands/chat/message.ts"],"names":[],"mappings":"AAEA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