@qoder-ai/qmind-cli 3.2.1 → 3.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 +6 -0
- package/CHANGELOG.zh-CN.md +6 -0
- package/README.md +10 -0
- package/README.zh-CN.md +10 -0
- package/dist/qmind.js +38 -8
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ 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
|
+
## 3.3.0
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- c024d97: Add `notebook list --shared` with pagination and preserve server-provided notebook permissions in CLI output.
|
|
12
|
+
|
|
7
13
|
## 3.2.1
|
|
8
14
|
|
|
9
15
|
### Patch Changes
|
package/CHANGELOG.zh-CN.md
CHANGED
package/README.md
CHANGED
|
@@ -102,3 +102,13 @@ After upgrading from the legacy unpartitioned store, sign in again. Root-level c
|
|
|
102
102
|
The shared 3.x Global/CN release is a breaking upgrade from Global 2.x. Upgrade this package with npm, then run `qmind login`; do not copy legacy credentials into the new partition. Existing versions before the shared release describe the Global/shared implementation only and do not imply a historical CN publication.
|
|
103
103
|
|
|
104
104
|
Common variables include `QMIND_TOKEN`, `QMIND_DEBUG_TOKEN`, `QMIND_HOME`, `QMIND_CLIENT`, `QMIND_NON_INTERACTIVE`, `QMIND_REQUEST_TIMEOUT_MS`, `QMIND_STREAM_IDLE_TIMEOUT_MS`, and `QMIND_TLS_CA_FILE`. `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` are supported. TLS verification is strict by default, and credentials are not forwarded to signed object-storage URLs.
|
|
105
|
+
|
|
106
|
+
## Shared notebook discovery and access
|
|
107
|
+
|
|
108
|
+
```sh
|
|
109
|
+
qmind notebook list --shared --page 1 --page-size 20
|
|
110
|
+
qmind notebook list --shared --format json
|
|
111
|
+
qmind notebook get <notebook-id> --format json
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Both notebook collections support `--page` and `--page-size`. `--shared` cannot be combined with `--filter-client`. Shared results use the same flat `notebooks` output as the ordinary list and preserve the membership `permission`. JSON/NDJSON preserve server-provided `access` (current role, member count and action permissions); Agent output expands these fields. Table lists show role and member count, while details show action permissions. Missing permissions are not inferred and display as `unknown` in tables.
|
package/README.zh-CN.md
CHANGED
|
@@ -102,3 +102,13 @@ qmind login --sash http://localhost:8080 --dashboard http://localhost:3000
|
|
|
102
102
|
共享 3.x Global/CN 发行版相对 Global 2.x 是 breaking upgrade。通过 npm 升级本包后执行 `qmind login`,不要把旧凭证复制到新分区。共同发行版之前的历史版本只描述 Global/共享实现,不代表 CN 曾经发布。
|
|
103
103
|
|
|
104
104
|
常用变量包括 `QMIND_TOKEN`、`QMIND_DEBUG_TOKEN`、`QMIND_HOME`、`QMIND_CLIENT`、`QMIND_NON_INTERACTIVE`、`QMIND_REQUEST_TIMEOUT_MS`、`QMIND_STREAM_IDLE_TIMEOUT_MS` 和 `QMIND_TLS_CA_FILE`。支持 `HTTP_PROXY`、`HTTPS_PROXY` 和 `NO_PROXY`。TLS 默认严格校验,访问签名对象存储地址时不会转发凭证。
|
|
105
|
+
|
|
106
|
+
## 共享知识库发现与权限
|
|
107
|
+
|
|
108
|
+
```sh
|
|
109
|
+
qmind notebook list --shared --page 1 --page-size 20
|
|
110
|
+
qmind notebook list --shared --format json
|
|
111
|
+
qmind notebook get <notebook-id> --format json
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
普通列表和共享列表均支持 `--page`、`--page-size`;`--shared` 不可与 `--filter-client` 组合。共享列表使用与普通列表一致的扁平 `notebooks` 输出,并保留共享关系的 `permission`。JSON/NDJSON 保留服务端返回的 `access`(当前角色、成员数及各操作权限);Agent 输出展开这些字段,表格列表显示角色与成员数,详情显示操作权限。缺失的权限不进行推断,表格显示 `unknown`。
|
package/dist/qmind.js
CHANGED
|
@@ -1274,7 +1274,7 @@ const sashCapabilities = Object.freeze({
|
|
|
1274
1274
|
"notes.saveCondensation": false,
|
|
1275
1275
|
retrieval: true,
|
|
1276
1276
|
scheduledTasks: false,
|
|
1277
|
-
"sharedNotebooks.read":
|
|
1277
|
+
"sharedNotebooks.read": true,
|
|
1278
1278
|
"sources.children": true,
|
|
1279
1279
|
"sources.childrenCount": false,
|
|
1280
1280
|
"sources.actionAccess": true,
|
|
@@ -3104,8 +3104,8 @@ function requestsJsonOutput(argv) {
|
|
|
3104
3104
|
//#region src/build-info.ts
|
|
3105
3105
|
/** Bundled identity, never inferred from argv, environment, or an endpoint. */
|
|
3106
3106
|
const QMIND_CLI_DISTRIBUTION = "global";
|
|
3107
|
-
const QMIND_CLI_VERSION = "3.
|
|
3108
|
-
const QMIND_CLI_BUILD_TIME = "2026-09-
|
|
3107
|
+
const QMIND_CLI_VERSION = "3.3.0";
|
|
3108
|
+
const QMIND_CLI_BUILD_TIME = "2026-09-08T13:16:12.000Z";
|
|
3109
3109
|
function qmindCliPlatform() {
|
|
3110
3110
|
return process.platform === "win32" ? "windows" : process.platform;
|
|
3111
3111
|
}
|
|
@@ -3564,6 +3564,8 @@ function goNotebook(value) {
|
|
|
3564
3564
|
const settings = optionalMap(source.settings);
|
|
3565
3565
|
return {
|
|
3566
3566
|
id: stringValue(source.id),
|
|
3567
|
+
...value.access === void 0 ? {} : { access: value.access },
|
|
3568
|
+
...value.permission === void 0 ? {} : { permission: value.permission },
|
|
3567
3569
|
orgId: stringValue(source.orgId),
|
|
3568
3570
|
userId: stringValue(source.userId),
|
|
3569
3571
|
title: stringValue(source.title),
|
|
@@ -3691,6 +3693,8 @@ function renderAgentNotebook(writer, value, index = 0) {
|
|
|
3691
3693
|
agentField(writer, "id", value.id);
|
|
3692
3694
|
agentField(writer, "orgId", value.orgId);
|
|
3693
3695
|
agentField(writer, "userId", value.userId);
|
|
3696
|
+
agentField(writer, "permission", value.permission);
|
|
3697
|
+
if (value.access != null) for (const [key, field] of Object.entries(value.access)) agentField(writer, key, field);
|
|
3694
3698
|
agentField(writer, "status", value.status);
|
|
3695
3699
|
agentField(writer, "title", value.title);
|
|
3696
3700
|
agentField(writer, "createdAt", timestamp(value.createdAt));
|
|
@@ -3725,6 +3729,8 @@ function renderNotebook(value, format) {
|
|
|
3725
3729
|
else {
|
|
3726
3730
|
writer.line(`ID: ${value.id}`);
|
|
3727
3731
|
writer.line(`Title: ${value.title}`);
|
|
3732
|
+
writer.line(`Permission: ${value.access?.currentUserPermission ?? value.permission ?? "unknown"}`);
|
|
3733
|
+
if (value.access != null) for (const [key, field] of Object.entries(value.access)) writer.line(`${key}: ${field}`);
|
|
3728
3734
|
writer.line(`Status: ${value.status}`);
|
|
3729
3735
|
writer.line(`OrgID: ${value.orgId}`);
|
|
3730
3736
|
writer.line(`UserID: ${value.userId}`);
|
|
@@ -3750,20 +3756,26 @@ function renderNotebookList(value, format) {
|
|
|
3750
3756
|
"STATUS",
|
|
3751
3757
|
"TITLE",
|
|
3752
3758
|
"USER",
|
|
3759
|
+
"PERMISSION",
|
|
3760
|
+
"MEMBERS",
|
|
3753
3761
|
"UPDATED"
|
|
3754
3762
|
], value.notebooks.map((item) => [
|
|
3755
3763
|
truncate(item.id, 36),
|
|
3756
3764
|
truncate(item.status, 10),
|
|
3757
3765
|
truncate(item.title, 28),
|
|
3758
3766
|
truncate(item.userId, 18),
|
|
3767
|
+
item.access?.currentUserPermission ?? item.permission ?? "unknown",
|
|
3768
|
+
item.access?.memberCount ?? "-",
|
|
3759
3769
|
timestamp(item.updatedAt)
|
|
3760
3770
|
]), [
|
|
3761
3771
|
36,
|
|
3762
3772
|
10,
|
|
3763
3773
|
28,
|
|
3764
3774
|
18,
|
|
3775
|
+
12,
|
|
3776
|
+
7,
|
|
3765
3777
|
20
|
|
3766
|
-
],
|
|
3778
|
+
], 143);
|
|
3767
3779
|
}
|
|
3768
3780
|
return writer.toString();
|
|
3769
3781
|
}
|
|
@@ -3943,6 +3955,13 @@ function renderQMindCliPresentation(presentation, format) {
|
|
|
3943
3955
|
switch (presentation.kind) {
|
|
3944
3956
|
case "notebook": return renderNotebook(presentation.value, format);
|
|
3945
3957
|
case "notebookList": return renderNotebookList(presentation.value, format);
|
|
3958
|
+
case "sharedNotebookList": return renderNotebookList({
|
|
3959
|
+
...presentation.value,
|
|
3960
|
+
notebooks: presentation.value.notebooks.map(({ notebook, permission }) => ({
|
|
3961
|
+
...notebook,
|
|
3962
|
+
...permission === void 0 ? {} : { permission }
|
|
3963
|
+
}))
|
|
3964
|
+
}, format);
|
|
3946
3965
|
case "source": return renderSource(presentation.value, format);
|
|
3947
3966
|
case "sourceList": return renderSourceList(presentation.value, format);
|
|
3948
3967
|
case "retrieve": return renderRetrieve(presentation.value, format);
|
|
@@ -4447,12 +4466,23 @@ function registerCoreCommands(context, program) {
|
|
|
4447
4466
|
})
|
|
4448
4467
|
});
|
|
4449
4468
|
});
|
|
4450
|
-
withCommon(notebook.command("list").description("List notebooks")).option("--filter-client <name>", "filter by originating client", "").action(async (raw) => {
|
|
4469
|
+
withCommon(notebook.command("list").description("List notebooks")).option("--filter-client <name>", "filter by originating client", "").addOption(new Option("--shared", "list notebooks shared with you").conflicts("filterClient")).option("--page <number>", "page number", integer).option("--page-size <number>", "items per page", integer).action(async (raw) => {
|
|
4451
4470
|
const host = await hostFor(context, raw);
|
|
4452
4471
|
const client = optionalString(raw, "filterClient");
|
|
4453
|
-
|
|
4472
|
+
const pagination = {
|
|
4473
|
+
...raw.page === void 0 ? {} : { page: Number(raw.page) },
|
|
4474
|
+
...raw.pageSize === void 0 ? {} : { pageSize: Number(raw.pageSize) }
|
|
4475
|
+
};
|
|
4476
|
+
if (raw.shared === true) render(context, raw, {
|
|
4477
|
+
kind: "sharedNotebookList",
|
|
4478
|
+
value: await host.client.listSharedNotebooks(pagination)
|
|
4479
|
+
});
|
|
4480
|
+
else render(context, raw, {
|
|
4454
4481
|
kind: "notebookList",
|
|
4455
|
-
value: await host.client.listNotebooks(
|
|
4482
|
+
value: await host.client.listNotebooks({
|
|
4483
|
+
...pagination,
|
|
4484
|
+
...client === void 0 ? {} : { client }
|
|
4485
|
+
})
|
|
4456
4486
|
});
|
|
4457
4487
|
});
|
|
4458
4488
|
withCommon(notebook.command("get <notebook_id>").description("Get a notebook")).action(async (notebookId, raw) => {
|
|
@@ -4782,7 +4812,7 @@ async function runQMindCli(argv, options = {}) {
|
|
|
4782
4812
|
updater: options.updater ?? createQMindCliUpdater({ identity: {
|
|
4783
4813
|
artifactKind: "npm",
|
|
4784
4814
|
command: distribution.command,
|
|
4785
|
-
currentVersion: "3.
|
|
4815
|
+
currentVersion: "3.3.0",
|
|
4786
4816
|
distribution: distribution.id,
|
|
4787
4817
|
executablePath: process.execPath,
|
|
4788
4818
|
package: distribution.package,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qoder-ai/qmind-cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "QMind command line interface",
|
|
5
5
|
"bin": {
|
|
6
6
|
"qmind": "bin/cli.js"
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"@types/picomatch": "4.0.3",
|
|
40
40
|
"@types/proper-lockfile": "4.1.4",
|
|
41
41
|
"@types/semver": "7.8.0",
|
|
42
|
-
"@ali/qmind-node-host": "^2.3.
|
|
43
|
-
"@ali/qmind-sdk": "^0.
|
|
42
|
+
"@ali/qmind-node-host": "^2.3.4",
|
|
43
|
+
"@ali/qmind-sdk": "^0.19.0"
|
|
44
44
|
},
|
|
45
45
|
"license": "UNLICENSED"
|
|
46
46
|
}
|