@qoder-ai/qmind-cli 4.1.0 → 4.3.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/CHANGELOG.md +12 -0
- package/CHANGELOG.zh-CN.md +12 -0
- package/README.md +18 -3
- package/README.zh-CN.md +16 -1
- package/dist/{bot-gateway-B5cW3ErV.js → bot-gateway-C4c1bMi9.js} +2 -1
- package/dist/{imports-BZyUf1pq.js → imports-Bb3NHsmd.js} +2 -1
- package/dist/{management-DQVj17Hn.js → management-BYR88TwO.js} +2 -1
- package/dist/{notes-BRnv_Z10.js → notes-HS_N--cJ.js} +2 -1
- package/dist/qmind.js +5181 -4526
- package/dist/{shared-53S5tNf6.js → schemas-DG7vaJMR.js} +15 -369
- package/dist/shared-CbvrtGyv.js +386 -0
- package/dist/{source-upload-DlOLtECT.js → source-upload-XrNG4_4V.js} +2 -1
- package/dist/{transfers-cf1MXHdB.js → transfers-DONoEIKT.js} +86 -5
- package/dist/wiki-DBT6JdyN.js +99 -0
- package/dist/{wiki-branches-DmgHlIxc.js → wiki-branches-BfEMuXDW.js} +2 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@ English (default) | [简体中文](CHANGELOG.zh-CN.md)
|
|
|
4
4
|
|
|
5
5
|
Published versions below describe the Global CLI/shared implementation, not historical CN releases. CN will join the shared history with the future joint release.
|
|
6
6
|
|
|
7
|
+
## 4.3.0
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- 9a45e75: Allow up to 32 distinct notebook targets for `qmind-cn retrieve`, using the shared Agent Core limit. The server must support 32 targets; result budgets remain unchanged.
|
|
12
|
+
|
|
13
|
+
## 4.2.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- 38beef0: Support non-interactive Qoder PAT login via `login --pat-stdin`, `login --pat`, and region/environment-specific PAT variables in `qmind` and `qmind-cn`. Persist validated credentials, reuse Job Tokens, and exchange again on expiry or HTTP 401. Add `login --no-browser` for manual browser authorization.
|
|
18
|
+
|
|
7
19
|
## 4.1.0
|
|
8
20
|
|
|
9
21
|
### Minor Changes
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -4,6 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
以下已发布版本属于 Global CLI / 共享实现,不代表 CN 曾发布过这些版本。CN 将在后续共同发行版加入同一历史。
|
|
6
6
|
|
|
7
|
+
## 4.3.0
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- 9a45e75: `qmind-cn retrieve` 支持最多 32 个不同知识库目标,复用 Agent Core 的统一上限。服务端须支持 32 个目标;返回结果预算保持不变。
|
|
12
|
+
|
|
13
|
+
## 4.2.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- 38beef0: 支持在 `qmind` 和 `qmind-cn` 中通过 `login --pat-stdin`、`login --pat` 及按地域、环境选择的 PAT 变量无交互登录。验证成功后保存凭据,复用 Job Token,并在过期或 HTTP 401 时重新交换。新增 `login --no-browser`,支持手动打开浏览器授权。
|
|
18
|
+
|
|
7
19
|
## 4.1.0
|
|
8
20
|
|
|
9
21
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -54,6 +54,21 @@ qmind retrieve --nb <notebook-id> --format agent "What is the deployment process
|
|
|
54
54
|
|
|
55
55
|
Do not put tokens in command arguments, repositories, or logs. Run `qmind logout` to remove the current local session.
|
|
56
56
|
|
|
57
|
+
### Login without a browser or interactive terminal
|
|
58
|
+
|
|
59
|
+
Create a PAT on the [Qoder PAT management page](https://qoder.com/account/integrations), then sign in through standard input (`--non-interactive` is also supported):
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
qmind login --pat-stdin < /path/to/pat-secret
|
|
63
|
+
qmind notebook list --non-interactive --format json
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Alternatively, inject `QODER_PROD_PAT` from your secret manager and run `qmind login --non-interactive`. `login --pat <token>` accepts an explicit PAT; prefer stdin or environment variables to keep secrets out of shell history and process arguments. PAT login exchanges a Job Token before saving the PAT, Job Token, and expiry in the current target's file vault. Later commands reuse the cached Job Token and exchange again on expiry or HTTP 401. Business requests use only the Job Token. `logout` removes the current target's local credentials without revoking the remote PAT.
|
|
67
|
+
|
|
68
|
+
For CI, inject a PAT and run commands directly without saving it to the vault. This product uses `QODER_PROD_PAT` for production and `QODER_TEST_PAT` for `--env test`, with `QODER_PERSONAL_ACCESS_TOKEN` as a fallback. Global `--env daily` uses only the generic variable. Dedicated PATs are never borrowed across regions or environments. Custom targets do not automatically read these PAT variables; explicitly use `--pat-stdin` or `--token`.
|
|
69
|
+
|
|
70
|
+
For browser login, `qmind login --no-browser` prints the authorization URL to open on another machine; it still requires an interactive terminal.
|
|
71
|
+
|
|
57
72
|
## Commands
|
|
58
73
|
|
|
59
74
|
| Command | Purpose |
|
|
@@ -76,7 +91,7 @@ Run `qmind <command> --help` for complete options. Domain commands support forma
|
|
|
76
91
|
|
|
77
92
|
## Multi-notebook retrieval
|
|
78
93
|
|
|
79
|
-
`retrieve --nb` accepts comma-separated or repeated Notebook IDs, deduplicating up to
|
|
94
|
+
`retrieve --nb` accepts comma-separated or repeated Notebook IDs, deduplicating up to 32 distinct notebooks:
|
|
80
95
|
|
|
81
96
|
```sh
|
|
82
97
|
qmind retrieve --nb nb-1,nb-2 "What is the deployment process?" --format json
|
|
@@ -110,7 +125,7 @@ QMIND_DEBUG_TOKEN='<debug-token>' qmind notebook list --env test --non-interacti
|
|
|
110
125
|
qmind login --sash http://localhost:8080 --dashboard http://localhost:3000
|
|
111
126
|
```
|
|
112
127
|
|
|
113
|
-
Production token priority is `--token > QMIND_TOKEN > current production vault`. Debug token priority is `--token > QMIND_DEBUG_TOKEN > current debug vault`; credentials are never borrowed across targets.
|
|
128
|
+
Production token priority is `--token > QMIND_TOKEN > selected Qoder PAT variable > current production vault`. Debug token priority is `--token > QMIND_DEBUG_TOKEN > selected Qoder PAT variable > current debug vault`; credentials are never borrowed across targets.
|
|
114
129
|
|
|
115
130
|
State is stored under `<state-root>/cli/global/<target>/`, where the state root is `QMIND_HOME` or `~/.qmind`. The CLI does not install, load, or access the OS Keyring. Credential files are plaintext JSON, not encrypted storage. On POSIX, partition directories use mode `0700` and files use `0600`; these modes do not represent Windows ACLs. Writes use atomic replacement, file locking, and compare-and-swap protection for refreshes.
|
|
116
131
|
|
|
@@ -170,7 +185,7 @@ qmind retrieve --nb <notebook-id> --unified --score-threshold 0.6 'Deployment pr
|
|
|
170
185
|
qmind retrieve --targets '[{"notebookId":"nb-1","sourceIds":["source-1"]},{"notebookId":"nb-2","sourceIds":["source-2"]}]' --max-results 8 'Deployment process'
|
|
171
186
|
```
|
|
172
187
|
|
|
173
|
-
`--targets` conflicts with `--nb` and `--sources` and supports independent Source filters per notebook. Unified retrieval defaults to maxResults=8 (1..50), with optional topK (1..100); zero selects the workflow default. There may be at most
|
|
188
|
+
`--targets` conflicts with `--nb` and `--sources` and supports independent Source filters per notebook. Unified retrieval defaults to maxResults=8 (1..50), with optional topK (1..100); zero selects the workflow default. There may be at most 32 unique targets. Results use the envelope above: read `data.chunks/data.promptContext`. `--score-threshold` accepts 0..1 and also works on the existing retrieval path. Zero budgets on the existing path still use server defaults; scripts are not silently migrated.
|
|
174
189
|
|
|
175
190
|
## Scheduled task configuration
|
|
176
191
|
|
package/README.zh-CN.md
CHANGED
|
@@ -54,6 +54,21 @@ qmind retrieve --nb <notebook-id> --format agent "部署流程是什么?"
|
|
|
54
54
|
|
|
55
55
|
不要把 token 写进命令参数、仓库或日志。使用完本机凭证后执行 `qmind logout`。
|
|
56
56
|
|
|
57
|
+
### 无浏览器 / 无交互终端登录
|
|
58
|
+
|
|
59
|
+
在 [Qoder PAT 管理页](https://qoder.com/account/integrations) 创建 PAT,然后通过标准输入登录(同样支持 `--non-interactive`):
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
qmind login --pat-stdin < /path/to/pat-secret
|
|
63
|
+
qmind notebook list --non-interactive --format json
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
也可从密钥管理工具注入 `QODER_PROD_PAT` 后执行 `qmind login --non-interactive`。`login --pat <token>` 可显式传入 PAT;优先使用标准输入或环境变量,避免令牌出现在 shell 历史或进程参数中。PAT 登录会先交换 Job Token,成功后才在当前目标的文件 vault 保存 PAT、Job Token 及有效期;后续命令复用未过期的 Job Token,过期或收到 401 时用 PAT 重新交换。业务请求仅使用 Job Token。`logout` 删除当前目标的本地凭证,不撤销远端 PAT。
|
|
67
|
+
|
|
68
|
+
CI 也可以只注入 PAT 并直接运行命令,此时不写入 vault。当前产品正式环境使用 `QODER_PROD_PAT`,`--env test` 使用 `QODER_TEST_PAT`,均可回退到 `QODER_PERSONAL_ACCESS_TOKEN`。Global `--env daily` 只使用通用变量。不会跨地域或环境借用专用 PAT。自定义目标不自动读取这些 PAT 变量,须显式使用 `--pat-stdin` 或 `--token`。
|
|
69
|
+
|
|
70
|
+
浏览器登录可用 `qmind login --no-browser` 仅打印授权 URL,在其他机器打开;它仍要求交互终端。
|
|
71
|
+
|
|
57
72
|
## 命令
|
|
58
73
|
|
|
59
74
|
| 命令 | 用途 |
|
|
@@ -110,7 +125,7 @@ QMIND_DEBUG_TOKEN='<debug-token>' qmind notebook list --env test --non-interacti
|
|
|
110
125
|
qmind login --sash http://localhost:8080 --dashboard http://localhost:3000
|
|
111
126
|
```
|
|
112
127
|
|
|
113
|
-
正式环境 Token 优先级为 `--token > QMIND_TOKEN > 当前正式 vault`;调试环境为 `--token > QMIND_DEBUG_TOKEN > 当前调试 vault`,不会跨目标借用凭证。
|
|
128
|
+
正式环境 Token 优先级为 `--token > QMIND_TOKEN > 当前环境 Qoder PAT 变量 > 当前正式 vault`;调试环境为 `--token > QMIND_DEBUG_TOKEN > 当前环境 Qoder PAT 变量 > 当前调试 vault`,不会跨目标借用凭证。
|
|
114
129
|
|
|
115
130
|
状态保存在 `<状态根>/cli/global/<目标>/`,状态根为 `QMIND_HOME` 或 `~/.qmind`。CLI 不安装、加载或访问 OS Keyring。凭证文件是明文 JSON,不是加密存储。POSIX 平台分区目录为 `0700`、文件为 `0600`;这些 mode 不代表 Windows ACL。写入使用原子替换、文件锁及 refresh compare-and-swap 保护。
|
|
116
131
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { F as timestampSchema } from "./schemas-DG7vaJMR.js";
|
|
2
|
+
import { a as invalidArgument, c as optionalRecord, d as pagination, h as requiredText, l as optionalString, m as requiredString, n as call, p as queryPath, r as compactUndefined, s as optionalBoolean, t as assertNonEmptyPatch, u as optionalTrimmedString } from "./shared-CbvrtGyv.js";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
//#region ../sdk/src/operations/bot-gateway-codecs.ts
|
|
4
5
|
const botTimestamp = z.preprocess((value) => typeof value === "object" && value !== null && !Array.isArray(value) && !("seconds" in value) ? {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as qmindFullSiteURLImportPageLimit, c as fullSiteURLImportConfirmationSchema, f as importProvidersSchema, l as fullSiteURLImportDiscoverySchema, n as aliDingImportRunSchema, t as aliDingImportRunItemListSchema } from "./schemas-DG7vaJMR.js";
|
|
2
|
+
import { _ as assertCapability, a as invalidArgument, d as pagination, m as requiredString, n as call, p as queryPath } from "./shared-CbvrtGyv.js";
|
|
2
3
|
//#region ../sdk/src/operations/imports.ts
|
|
3
4
|
const aliDingHost = "alidocs.dingtalk.com";
|
|
4
5
|
const requestIdPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/u;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I as voidResponseSchema } from "./schemas-DG7vaJMR.js";
|
|
2
|
+
import { a as invalidArgument, c as optionalRecord, f as positiveInteger, l as optionalString, m as requiredString, n as call, p as queryPath, r as compactUndefined, s as optionalBoolean, t as assertNonEmptyPatch } from "./shared-CbvrtGyv.js";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
//#region ../sdk/src/operations/management-schemas.ts
|
|
4
5
|
const memberPermissionSchema = z.enum([
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { F as timestampSchema, I as voidResponseSchema } from "./schemas-DG7vaJMR.js";
|
|
2
|
+
import { c as optionalRecord, d as pagination, h as requiredText, l as optionalString, m as requiredString, n as call, p as queryPath, r as compactUndefined, t as assertNonEmptyPatch } from "./shared-CbvrtGyv.js";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
//#region ../sdk/src/operations/note-schemas.ts
|
|
4
5
|
const noteSchema = z.object({
|