@qoder-ai/qmind-cli 3.1.1 → 3.2.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 +10 -0
- package/CHANGELOG.zh-CN.md +10 -0
- package/README.md +3 -2
- package/README.zh-CN.md +3 -2
- package/dist/{bot-gateway-CB6KrV15.js → bot-gateway-C3AvO7gR.js} +1 -1
- package/dist/{cards-JaeY0mah.js → cards-D3WYzf7s.js} +1 -1
- package/dist/{imports-CHEgKeR5.js → imports-D6n1sOFM.js} +1 -1
- package/dist/{management-J4OEjnLA.js → management-uK44XohU.js} +1 -1
- package/dist/{notes-CxkxuWdP.js → notes-BWrCOixr.js} +1 -1
- package/dist/qmind.js +106 -26
- package/dist/{shared-9iPJsfjP.js → shared-OBSNlxAo.js} +4 -0
- package/dist/{source-upload-mZ-N52xb.js → source-upload-B0EAhkG2.js} +1 -1
- package/dist/{transfers-BRx_Hrlz.js → transfers-BB__MPG8.js} +2 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@ 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.2.0
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- 7fd1634: Remove the top-level `compile` and `lint` commands and the `source import-site --compile-after-refresh` option, and make `task create` reject the `compilation` and `lint` scenes. `task list` and `task get` can still query historical runs; SDK, UI, backend automatic compilation, and internal capabilities are unchanged.
|
|
12
|
+
|
|
13
|
+
### Changes without version bumps
|
|
14
|
+
|
|
15
|
+
- Show concise Preparing, Downloading with live transfer progress, and Installed stages in the native `qmind` and `qmind-cn` installers.
|
|
16
|
+
|
|
7
17
|
## 3.1.1
|
|
8
18
|
|
|
9
19
|
### Patch Changes
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -4,6 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
以下已发布版本属于 Global CLI / 共享实现,不代表 CN 曾发布过这些版本。CN 将在后续共同发行版加入同一历史。
|
|
6
6
|
|
|
7
|
+
## 3.2.0
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- 7fd1634: 移除顶层 `compile`、`lint` 命令及 `source import-site --compile-after-refresh` 选项,并让 `task create` 拒绝 `compilation` 与 `lint` 场景。`task list` 和 `task get` 仍可查询历史运行;SDK、UI、后端自动编译及内部能力不受影响。
|
|
12
|
+
|
|
13
|
+
### Changes without version bumps
|
|
14
|
+
|
|
15
|
+
- 为 Native `qmind` 和 `qmind-cn` 安装器展示精简的 Preparing、带实时传输进度的 Downloading 和 Installed 三个阶段。
|
|
16
|
+
|
|
7
17
|
## 3.1.1
|
|
8
18
|
|
|
9
19
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[简体中文](./README.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
The QMind command-line interface for Qoder Global lets you sign in, manage knowledge bases and sources, retrieve content, run RAG and
|
|
5
|
+
The QMind command-line interface for Qoder Global lets you sign in, manage knowledge bases and sources, retrieve content, run RAG and task workflows, and synchronize local directories.
|
|
6
6
|
|
|
7
7
|
Package: `@qoder-ai/qmind-cli` · command: `qmind`
|
|
8
8
|
|
|
@@ -63,13 +63,14 @@ Do not put tokens in command arguments, repositories, or logs. Run `qmind logout
|
|
|
63
63
|
| `source` | Manage knowledge-base sources |
|
|
64
64
|
| `retrieve` | Retrieve context without invoking an LLM |
|
|
65
65
|
| `rag` | Ask questions using a knowledge base |
|
|
66
|
-
| `compile` / `lint` | Run compilation or validation workflows |
|
|
67
66
|
| `task` | Manage task runs |
|
|
68
67
|
| `upload-folder` / `sync` | Synchronize a local directory |
|
|
69
68
|
| `image` | Obtain image upload or access URLs |
|
|
70
69
|
| `version` | Print version and build information |
|
|
71
70
|
| `update` / `self-update` | Update an installer-managed Native CLI |
|
|
72
71
|
|
|
72
|
+
`task create` does not start `compilation` or `lint` runs; `task list` and `task get` can still inspect historical runs for those scenes. `source import-site` does not provide an automatic compilation option.
|
|
73
|
+
|
|
73
74
|
Run `qmind <command> --help` for complete options. Domain commands support formats such as `table`, `json`, `agent`, and `ndjson`. stdout contains results; progress and diagnostics go to stderr. Exit codes are `0` for success, `1` for runtime failure/partial success/cancellation, and `2` for invalid usage.
|
|
74
75
|
|
|
75
76
|
## Directory synchronization
|
package/README.zh-CN.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](./README.md)
|
|
4
4
|
|
|
5
|
-
面向 Qoder Global 的 QMind 命令行工具,可用于登录、管理知识库和来源、检索内容、运行 RAG
|
|
5
|
+
面向 Qoder Global 的 QMind 命令行工具,可用于登录、管理知识库和来源、检索内容、运行 RAG 与任务工作流,以及把本地目录同步到知识库。
|
|
6
6
|
|
|
7
7
|
npm 包:`@qoder-ai/qmind-cli` · 命令:`qmind`
|
|
8
8
|
|
|
@@ -63,13 +63,14 @@ qmind retrieve --nb <notebook-id> --format agent "部署流程是什么?"
|
|
|
63
63
|
| `source` | 管理知识库来源 |
|
|
64
64
|
| `retrieve` | 检索上下文,不发起 LLM 调用 |
|
|
65
65
|
| `rag` | 基于知识库提问 |
|
|
66
|
-
| `compile` / `lint` | 运行编译或检查工作流 |
|
|
67
66
|
| `task` | 管理任务运行 |
|
|
68
67
|
| `upload-folder` / `sync` | 同步本地目录 |
|
|
69
68
|
| `image` | 获取图片上传地址或访问地址 |
|
|
70
69
|
| `version` | 查看版本和构建信息 |
|
|
71
70
|
| `update` / `self-update` | 更新 installer 管理的 Native CLI |
|
|
72
71
|
|
|
72
|
+
`task create` 不会启动 `compilation` 或 `lint` 运行;仍可通过 `task list` 和 `task get` 查询这些场景的历史运行。`source import-site` 不提供自动编译选项。
|
|
73
|
+
|
|
73
74
|
使用 `qmind <command> --help` 查看完整参数。领域命令支持 `table`、`json`、`agent`、`ndjson` 等输出格式。stdout 只输出结果,进度与诊断信息输出到 stderr。退出码 `0` 表示成功,`1` 表示运行失败、部分成功或取消,`2` 表示参数错误。
|
|
74
75
|
|
|
75
76
|
## 同步目录
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Y as timestampSchema, 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-
|
|
1
|
+
import { Y as timestampSchema, 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-OBSNlxAo.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region ../sdk/src/operations/bot-gateway-codecs.ts
|
|
4
4
|
const botTimestamp = z.preprocess((value) => typeof value === "object" && value !== null && !Array.isArray(value) && !("seconds" in value) ? {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as cardSchema, a as invalidArgument, c as optionalRecord, d as pagination, g as stringList, h as requiredText, l as optionalString, m as requiredString, n as call, p as queryPath, r as compactUndefined, u as optionalTrimmedString, x as cardListSchema, y as batchMutationResultSchema } from "./shared-
|
|
1
|
+
import { S as cardSchema, a as invalidArgument, c as optionalRecord, d as pagination, g as stringList, h as requiredText, l as optionalString, m as requiredString, n as call, p as queryPath, r as compactUndefined, u as optionalTrimmedString, x as cardListSchema, y as batchMutationResultSchema } from "./shared-OBSNlxAo.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region ../sdk/src/operations/compilation-results.ts
|
|
4
4
|
function linksBody(value, field) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as importProvidersSchema, _ as aliDingImportRunItemListSchema, a as invalidArgument, d as pagination, et as assertCapability, m as requiredString, n as call, p as queryPath, v as aliDingImportRunSchema } from "./shared-
|
|
1
|
+
import { O as importProvidersSchema, _ as aliDingImportRunItemListSchema, a as invalidArgument, d as pagination, et as assertCapability, m as requiredString, n as call, p as queryPath, v as aliDingImportRunSchema } from "./shared-OBSNlxAo.js";
|
|
2
2
|
//#region ../sdk/src/operations/imports.ts
|
|
3
3
|
const aliDingHost = "alidocs.dingtalk.com";
|
|
4
4
|
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,4 @@
|
|
|
1
|
-
import { X as voidResponseSchema, a as invalidArgument, c as optionalRecord, l as optionalString, m as requiredString, n as call, r as compactUndefined, s as optionalBoolean, t as assertNonEmptyPatch } from "./shared-
|
|
1
|
+
import { X as voidResponseSchema, a as invalidArgument, c as optionalRecord, l as optionalString, m as requiredString, n as call, r as compactUndefined, s as optionalBoolean, t as assertNonEmptyPatch } from "./shared-OBSNlxAo.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region ../sdk/src/operations/management-schemas.ts
|
|
4
4
|
const memberPermissionSchema = z.enum([
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { X as voidResponseSchema, Y as timestampSchema, 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-
|
|
1
|
+
import { X as voidResponseSchema, Y as timestampSchema, 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-OBSNlxAo.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region ../sdk/src/operations/note-schemas.ts
|
|
4
4
|
const noteSchema = z.object({
|
package/dist/qmind.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as notebookSchema, B as sourceSchema, C as chatMessageListSchema, D as imageUrlsSchema, E as imageUploadTicketSchema, F as sourceContentSchema, G as sourceWebOfficeTokenSchema, H as sourceUploadCapabilitiesSchema, I as sourceImportResultsSchema, J as taskRunSchema, K as streamWireEventSchema, L as sourceListSchema, M as sharedNotebookListSchema, N as sourceActionAccessSchema, P as sourceChildrenCountsSchema, R as sourcePreviewSchema, T as chatSessionSchema, V as sourceTreeSchema, W as sourceWebOfficeSessionSchema, X as voidResponseSchema, Z as wikiBranchListSchema, a as invalidArgument$1, b as cancelQuestionResultSchema, c as optionalRecord, d as pagination$1, et as assertCapability, f as positiveInteger$1, g as stringList, i as httpUrl, j as retrieveResultSchema, k as notebookListSchema, l as optionalString$1, m as requiredString$2, n as call, o as nonNegativeInteger$1, p as queryPath, q as taskRunListSchema, r as compactUndefined, rt as QMindError, s as optionalBoolean, t as assertNonEmptyPatch, tt as executeStream, u as optionalTrimmedString, w as chatSessionListSchema, y as batchMutationResultSchema, z as sourceRawContentSchema } from "./shared-
|
|
2
|
-
import { t as preflightSourceUpload } from "./source-upload-
|
|
1
|
+
import { A as notebookSchema, B as sourceSchema, C as chatMessageListSchema, D as imageUrlsSchema, E as imageUploadTicketSchema, F as sourceContentSchema, G as sourceWebOfficeTokenSchema, H as sourceUploadCapabilitiesSchema, I as sourceImportResultsSchema, J as taskRunSchema, K as streamWireEventSchema, L as sourceListSchema, M as sharedNotebookListSchema, N as sourceActionAccessSchema, P as sourceChildrenCountsSchema, R as sourcePreviewSchema, T as chatSessionSchema, V as sourceTreeSchema, W as sourceWebOfficeSessionSchema, X as voidResponseSchema, Z as wikiBranchListSchema, a as invalidArgument$1, b as cancelQuestionResultSchema, c as optionalRecord, d as pagination$1, et as assertCapability, f as positiveInteger$1, g as stringList, i as httpUrl, j as retrieveResultSchema, k as notebookListSchema, l as optionalString$1, m as requiredString$2, n as call, o as nonNegativeInteger$1, p as queryPath, q as taskRunListSchema, r as compactUndefined, rt as QMindError, s as optionalBoolean, t as assertNonEmptyPatch, tt as executeStream, u as optionalTrimmedString, w as chatSessionListSchema, y as batchMutationResultSchema, z as sourceRawContentSchema } from "./shared-OBSNlxAo.js";
|
|
2
|
+
import { t as preflightSourceUpload } from "./source-upload-B0EAhkG2.js";
|
|
3
3
|
import { createInterface } from "node:readline/promises";
|
|
4
4
|
import { basename, dirname, extname, join, relative, resolve, sep } from "node:path";
|
|
5
5
|
import { z } from "zod";
|
|
@@ -22,7 +22,7 @@ import { promisify } from "node:util";
|
|
|
22
22
|
import semver from "semver";
|
|
23
23
|
//#region ../sdk/src/operations/agents.ts
|
|
24
24
|
const workflowPrompt = "Follow the system prompt strictly: use the provided tools to discover, process and prepare the result, then emit the final report. Do NOT greet, do NOT ask for clarification — act immediately.";
|
|
25
|
-
function isRecord$
|
|
25
|
+
function isRecord$3(value) {
|
|
26
26
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
27
27
|
}
|
|
28
28
|
function finiteNumber(value, field) {
|
|
@@ -66,7 +66,7 @@ function billingContext(value) {
|
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
function retrieveBody(input) {
|
|
69
|
-
if (!isRecord$
|
|
69
|
+
if (!isRecord$3(input)) throw invalidArgument$1("input must be an object", "input");
|
|
70
70
|
return compactUndefined({
|
|
71
71
|
billingContext: billingContext(input.billingContext),
|
|
72
72
|
maxResults: nonNegativeInteger$1(input.maxResults, "maxResults"),
|
|
@@ -78,7 +78,7 @@ function retrieveBody(input) {
|
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
function chatSessionBody(input = {}) {
|
|
81
|
-
if (!isRecord$
|
|
81
|
+
if (!isRecord$3(input)) throw invalidArgument$1("input must be an object", "input");
|
|
82
82
|
return compactUndefined({
|
|
83
83
|
metadata: optionalRecord(input.metadata, "metadata"),
|
|
84
84
|
modelOverride: optionalTrimmedString(input.modelOverride, "modelOverride"),
|
|
@@ -88,7 +88,7 @@ function chatSessionBody(input = {}) {
|
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
90
|
function streamBody(input) {
|
|
91
|
-
if (!isRecord$
|
|
91
|
+
if (!isRecord$3(input)) throw invalidArgument$1("input must be an object", "input");
|
|
92
92
|
return compactUndefined({
|
|
93
93
|
content: requiredString$2(input.content, "content"),
|
|
94
94
|
maxResults: nonNegativeInteger$1(input.maxResults, "maxResults"),
|
|
@@ -99,7 +99,7 @@ function streamBody(input) {
|
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
101
|
function taskRunBody(input) {
|
|
102
|
-
if (!isRecord$
|
|
102
|
+
if (!isRecord$3(input)) throw invalidArgument$1("input must be an object", "input");
|
|
103
103
|
return compactUndefined({
|
|
104
104
|
chatSessionId: optionalTrimmedString(input.chatSessionId, "chatSessionId"),
|
|
105
105
|
config: optionalRecord(input.config, "config"),
|
|
@@ -112,7 +112,7 @@ function taskRunBody(input) {
|
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
114
|
function taskRunListPath(context, notebookId, input = {}) {
|
|
115
|
-
if (!isRecord$
|
|
115
|
+
if (!isRecord$3(input)) throw invalidArgument$1("input must be an object", "input");
|
|
116
116
|
const normalizedPage = pagination$1(input);
|
|
117
117
|
const status = optionalTrimmedString(input.status, "status");
|
|
118
118
|
if (status !== void 0 && ![
|
|
@@ -219,7 +219,7 @@ function createAgentOperations(context) {
|
|
|
219
219
|
const cancelQuestionFor = (notebookId, sessionId, input = {}, options, featured = false) => {
|
|
220
220
|
const notebook = requiredString$2(notebookId, "notebookId");
|
|
221
221
|
const session = requiredString$2(sessionId, "sessionId");
|
|
222
|
-
if (!isRecord$
|
|
222
|
+
if (!isRecord$3(input)) throw invalidArgument$1("input must be an object", "input");
|
|
223
223
|
return call(context, {
|
|
224
224
|
body: compactUndefined({ reason: optionalTrimmedString(input.reason, "reason") }),
|
|
225
225
|
callOptions: options,
|
|
@@ -278,7 +278,7 @@ function createAgentOperations(context) {
|
|
|
278
278
|
});
|
|
279
279
|
};
|
|
280
280
|
const startAgentRunFor = async (notebookId, input, options, featured) => {
|
|
281
|
-
if (!isRecord$
|
|
281
|
+
if (!isRecord$3(input)) throw invalidArgument$1("input must be an object", "input");
|
|
282
282
|
if (input.scene !== "rag" && input.scene !== "compilation" && input.scene !== "lint") throw invalidArgument$1("scene must be rag, compilation or lint", "scene");
|
|
283
283
|
const notebook = requiredString$2(notebookId, "notebookId");
|
|
284
284
|
const scene = input.scene;
|
|
@@ -514,6 +514,84 @@ function createNotebookOperations(context) {
|
|
|
514
514
|
};
|
|
515
515
|
}
|
|
516
516
|
//#endregion
|
|
517
|
+
//#region ../sdk/src/source-email-folder.ts
|
|
518
|
+
/** The email aggregate directory marker shared by tree projection and source readers. */
|
|
519
|
+
function isQMindEmailFolder(source) {
|
|
520
|
+
return source?.isDir === true && source.metadata?.emailFolder === true;
|
|
521
|
+
}
|
|
522
|
+
//#endregion
|
|
523
|
+
//#region ../sdk/src/sources.ts
|
|
524
|
+
function metadataOf(source) {
|
|
525
|
+
const metadata = source?.metadata;
|
|
526
|
+
return metadata !== null && typeof metadata === "object" ? metadata : {};
|
|
527
|
+
}
|
|
528
|
+
function isRecord$2(value) {
|
|
529
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
530
|
+
}
|
|
531
|
+
function text(value) {
|
|
532
|
+
return typeof value === "string" ? value : "";
|
|
533
|
+
}
|
|
534
|
+
function metadataText(source, ...keys) {
|
|
535
|
+
const metadata = metadataOf(source);
|
|
536
|
+
for (const key of keys) {
|
|
537
|
+
const value = metadata[key];
|
|
538
|
+
if (typeof value === "string" && value.trim().length > 0) return value.trim();
|
|
539
|
+
}
|
|
540
|
+
return "";
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* The canonical stored format of a source, which QMind reports separately from the MIME type
|
|
544
|
+
* because one MIME type can back several formats.
|
|
545
|
+
*/
|
|
546
|
+
function qmindSourceFormat(source) {
|
|
547
|
+
const format = metadataText(source, "sourceFormat", "source_format").toLowerCase().replace(/^\./, "");
|
|
548
|
+
if (format === "markdown" || format === "mdown" || format === "mdx") return "md";
|
|
549
|
+
return format === "htm" ? "html" : format;
|
|
550
|
+
}
|
|
551
|
+
function isQMindEmailSource(source) {
|
|
552
|
+
return source?.sourceType.toLowerCase() === "email" && qmindSourceFormat(source) === "eml";
|
|
553
|
+
}
|
|
554
|
+
function qmindEmailAttachmentRef(source) {
|
|
555
|
+
const value = metadataOf(source).emailAttachment;
|
|
556
|
+
if (!isRecord$2(value)) return null;
|
|
557
|
+
return Object.freeze({
|
|
558
|
+
emailSourceId: text(value.emailSourceId),
|
|
559
|
+
index: typeof value.index === "number" && Number.isFinite(value.index) ? Math.floor(value.index) : -1,
|
|
560
|
+
parentSentAt: text(value.parentSentAt),
|
|
561
|
+
parentSubject: text(value.parentSubject)
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
/** The id of the email body source this source belongs to, or '' when it is not part of an email. */
|
|
565
|
+
function qmindEmailSourceId(source) {
|
|
566
|
+
if (isQMindEmailFolder(source)) return text(metadataOf(source).emailSourceId);
|
|
567
|
+
const attachment = qmindEmailAttachmentRef(source);
|
|
568
|
+
if (attachment !== null) return attachment.emailSourceId;
|
|
569
|
+
return isQMindEmailSource(source) ? source?.id ?? "" : "";
|
|
570
|
+
}
|
|
571
|
+
/**
|
|
572
|
+
* A body and its attachments cannot leave their email folder, because the folder is what carries
|
|
573
|
+
* the email identity.
|
|
574
|
+
*/
|
|
575
|
+
function isQMindEmailAggregateMember(source, siblings) {
|
|
576
|
+
if (source === null || source === void 0 || isQMindEmailFolder(source)) return false;
|
|
577
|
+
if (qmindEmailAttachmentRef(source) !== null) return true;
|
|
578
|
+
if (!isQMindEmailSource(source) || source.parentSourceId.length === 0) return false;
|
|
579
|
+
const parent = siblings.find((item) => item.id === source.parentSourceId);
|
|
580
|
+
return isQMindEmailFolder(parent) && qmindEmailSourceId(parent) === source.id;
|
|
581
|
+
}
|
|
582
|
+
/** The external provider that owns this source, lowercased, or '' when QMind owns it. */
|
|
583
|
+
function qmindSourceProvider(source) {
|
|
584
|
+
return (source?.externalBinding?.provider ?? metadataText(source, "externalProvider", "external_provider")).toLowerCase();
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* `externalBinding` is authoritative; the metadata fallback keeps sources readable on gateways that
|
|
588
|
+
* do not project the binding yet.
|
|
589
|
+
*/
|
|
590
|
+
function isQMindExternalSource(source) {
|
|
591
|
+
return source?.externalBinding !== void 0 || qmindSourceProvider(source) === "aliding";
|
|
592
|
+
}
|
|
593
|
+
[.../* @__PURE__ */ new Set(["axls", "alxs"])];
|
|
594
|
+
//#endregion
|
|
517
595
|
//#region ../sdk/src/operations/sources.ts
|
|
518
596
|
const maxImageBytes = 52428800;
|
|
519
597
|
function sourceTreeNodeOrder(left, right) {
|
|
@@ -543,6 +621,10 @@ function buildSourceTree(sources) {
|
|
|
543
621
|
const nodesById = /* @__PURE__ */ new Map();
|
|
544
622
|
for (const source of sources) nodesById.set(source.id, {
|
|
545
623
|
...source.externalBinding === void 0 ? {} : { externalBinding: source.externalBinding },
|
|
624
|
+
...source.originUrl === void 0 ? {} : { originUrl: source.originUrl },
|
|
625
|
+
isEmailFolder: isQMindEmailFolder(source),
|
|
626
|
+
isEmailAggregateMember: isQMindEmailAggregateMember(source, sources),
|
|
627
|
+
isExternalSource: isQMindExternalSource(source),
|
|
546
628
|
files: [],
|
|
547
629
|
hasChildren: source.hasChildren ?? (source.childrenCount === void 0 ? source.isDir : source.childrenCount > 0),
|
|
548
630
|
id: source.id,
|
|
@@ -1470,7 +1552,7 @@ const botGatewayOperationNames = [
|
|
|
1470
1552
|
function createLazyTransferOperations(context) {
|
|
1471
1553
|
let operations;
|
|
1472
1554
|
const load = () => {
|
|
1473
|
-
operations ??= import("./transfers-
|
|
1555
|
+
operations ??= import("./transfers-BB__MPG8.js").then(({ createTransferOperations }) => createTransferOperations(context));
|
|
1474
1556
|
return operations;
|
|
1475
1557
|
};
|
|
1476
1558
|
return {
|
|
@@ -1481,7 +1563,7 @@ function createLazyTransferOperations(context) {
|
|
|
1481
1563
|
function createLazyBotGatewayOperations(context) {
|
|
1482
1564
|
let operations;
|
|
1483
1565
|
const load = () => {
|
|
1484
|
-
operations ??= import("./bot-gateway-
|
|
1566
|
+
operations ??= import("./bot-gateway-C3AvO7gR.js").then(({ createBotGatewayOperations }) => createBotGatewayOperations(context));
|
|
1485
1567
|
return operations;
|
|
1486
1568
|
};
|
|
1487
1569
|
return Object.fromEntries(botGatewayOperationNames.map((name) => [name, (...args) => load().then((loaded) => Reflect.apply(loaded[name], loaded, args))]));
|
|
@@ -1489,7 +1571,7 @@ function createLazyBotGatewayOperations(context) {
|
|
|
1489
1571
|
function createLazyNoteOperations(context) {
|
|
1490
1572
|
let operations;
|
|
1491
1573
|
const load = () => {
|
|
1492
|
-
operations ??= import("./notes-
|
|
1574
|
+
operations ??= import("./notes-BWrCOixr.js").then(({ createNoteOperations }) => createNoteOperations(context));
|
|
1493
1575
|
return operations;
|
|
1494
1576
|
};
|
|
1495
1577
|
return Object.fromEntries(noteOperationNames.map((name) => [name, (...args) => load().then((loaded) => Reflect.apply(loaded[name], loaded, args))]));
|
|
@@ -1497,7 +1579,7 @@ function createLazyNoteOperations(context) {
|
|
|
1497
1579
|
function createLazyCardOperations(context) {
|
|
1498
1580
|
let operations;
|
|
1499
1581
|
const load = () => {
|
|
1500
|
-
operations ??= import("./cards-
|
|
1582
|
+
operations ??= import("./cards-D3WYzf7s.js").then(({ createCardOperations }) => createCardOperations(context));
|
|
1501
1583
|
return operations;
|
|
1502
1584
|
};
|
|
1503
1585
|
return Object.fromEntries(cardOperationNames.map((name) => [name, (...args) => load().then((loaded) => Reflect.apply(loaded[name], loaded, args))]));
|
|
@@ -1505,7 +1587,7 @@ function createLazyCardOperations(context) {
|
|
|
1505
1587
|
function createLazyImportOperations(context) {
|
|
1506
1588
|
let operations;
|
|
1507
1589
|
const load = () => {
|
|
1508
|
-
operations ??= import("./imports-
|
|
1590
|
+
operations ??= import("./imports-D6n1sOFM.js").then(({ createImportOperations }) => createImportOperations(context));
|
|
1509
1591
|
return operations;
|
|
1510
1592
|
};
|
|
1511
1593
|
return Object.fromEntries(importOperationNames.map((name) => [name, (...args) => load().then((loaded) => Reflect.apply(loaded[name], loaded, args))]));
|
|
@@ -1513,7 +1595,7 @@ function createLazyImportOperations(context) {
|
|
|
1513
1595
|
function createLazyManagementOperations(context) {
|
|
1514
1596
|
let operations;
|
|
1515
1597
|
const load = () => {
|
|
1516
|
-
operations ??= import("./management-
|
|
1598
|
+
operations ??= import("./management-uK44XohU.js").then(({ createManagementOperations }) => createManagementOperations(context));
|
|
1517
1599
|
return operations;
|
|
1518
1600
|
};
|
|
1519
1601
|
return Object.fromEntries(managementOperationNames.map((name) => [name, (...args) => load().then((loaded) => Reflect.apply(loaded[name], loaded, args))]));
|
|
@@ -2976,8 +3058,8 @@ function requestsJsonOutput(argv) {
|
|
|
2976
3058
|
//#region src/build-info.ts
|
|
2977
3059
|
/** Bundled identity, never inferred from argv, environment, or an endpoint. */
|
|
2978
3060
|
const QMIND_CLI_DISTRIBUTION = "global";
|
|
2979
|
-
const QMIND_CLI_VERSION = "3.
|
|
2980
|
-
const QMIND_CLI_BUILD_TIME = "2026-09-
|
|
3061
|
+
const QMIND_CLI_VERSION = "3.2.0";
|
|
3062
|
+
const QMIND_CLI_BUILD_TIME = "2026-09-07T06:53:56.000Z";
|
|
2981
3063
|
function qmindCliPlatform() {
|
|
2982
3064
|
return process.platform === "win32" ? "windows" : process.platform;
|
|
2983
3065
|
}
|
|
@@ -4464,11 +4546,10 @@ function registerSourceCommands(context, program) {
|
|
|
4464
4546
|
await host.client.deleteSource(notebookId, sourceId);
|
|
4465
4547
|
context.io.stdout("deleted\n");
|
|
4466
4548
|
});
|
|
4467
|
-
withCommon(source.command("import-site").description("Import a complete web site")).option("--nb <id>", "notebook ID (required)").option("--url <url>", "site root URL (required)").option("--title <title>", "source title").option("--parent <id>", "parent source ID", "").option("--path-prefix <path>", "path prefix", "").option("--max-pages <number>", "maximum page count", integer, 50).option("--sitemap <url>", "sitemap URL", "").option("--include <patterns>", "comma-separated include patterns", "").option("--exclude <patterns>", "comma-separated exclude patterns", "").
|
|
4549
|
+
withCommon(source.command("import-site").description("Import a complete web site")).option("--nb <id>", "notebook ID (required)").option("--url <url>", "site root URL (required)").option("--title <title>", "source title").option("--parent <id>", "parent source ID", "").option("--path-prefix <path>", "path prefix", "").option("--max-pages <number>", "maximum page count", integer, 50).option("--sitemap <url>", "sitemap URL", "").option("--include <patterns>", "comma-separated include patterns", "").option("--exclude <patterns>", "comma-separated exclude patterns", "").action(async (raw) => {
|
|
4468
4550
|
const host = await hostFor(context, raw);
|
|
4469
4551
|
const rootUrl = requiredString(raw.url, "--url");
|
|
4470
4552
|
const value = await host.client.importSite(requiredString(raw.nb, "--nb"), {
|
|
4471
|
-
compileAfterRefresh: raw.compileAfterRefresh === true,
|
|
4472
4553
|
excludePaths: splitCsv(stringOption(raw, "exclude")),
|
|
4473
4554
|
includePaths: splitCsv(stringOption(raw, "include")),
|
|
4474
4555
|
maxPages: numberOption(raw, "maxPages", 50),
|
|
@@ -4535,20 +4616,19 @@ function registerSceneCommands(context, program) {
|
|
|
4535
4616
|
topK: numberOption(raw, "topK", 0)
|
|
4536
4617
|
});
|
|
4537
4618
|
});
|
|
4538
|
-
for (const [name, scene] of [["compile", "compilation"], ["lint", "lint"]]) withCommon(program.command(name).description(`Run notebook ${scene}`)).option("--nb <id>", "notebook ID (required)").action(async (raw) => {
|
|
4539
|
-
await renderAgentRun(context, await hostFor(context, raw), requiredString(raw.nb, "--nb"), raw, { scene });
|
|
4540
|
-
});
|
|
4541
4619
|
}
|
|
4542
4620
|
function registerTaskCommands(context, program) {
|
|
4543
4621
|
const task = program.command("task").description("Manage notebook task runs");
|
|
4544
|
-
withCommon(task.command("create").description("Create a notebook task run")).option("--nb <id>", "notebook ID (required)").option("--scene <scene>", "task scene
|
|
4622
|
+
withCommon(task.command("create").description("Create a notebook task run")).option("--nb <id>", "notebook ID (required)").option("--scene <scene>", "task scene (required)").option("--trigger <trigger>", "task trigger", "manual").option("--sources <ids>", "comma-separated source IDs", "").action(async (raw) => {
|
|
4623
|
+
const scene = requiredString(raw.scene, "--scene").trim();
|
|
4624
|
+
if (scene === "compilation" || scene === "lint") throw new QMindError("INVALID_ARGUMENT", `task creation does not support scene ${JSON.stringify(scene)}`);
|
|
4545
4625
|
const host = await hostFor(context, raw);
|
|
4546
4626
|
const sourceIds = splitCsv(stringOption(raw, "sources"));
|
|
4547
4627
|
render(context, raw, {
|
|
4548
4628
|
kind: "json",
|
|
4549
4629
|
value: await host.client.createTaskRun(requiredString(raw.nb, "--nb"), {
|
|
4550
4630
|
...sourceIds.length === 0 ? {} : { config: { sourceIds } },
|
|
4551
|
-
sceneType:
|
|
4631
|
+
sceneType: scene,
|
|
4552
4632
|
trigger: String(raw.trigger ?? "manual")
|
|
4553
4633
|
})
|
|
4554
4634
|
});
|
|
@@ -4656,7 +4736,7 @@ async function runQMindCli(argv, options = {}) {
|
|
|
4656
4736
|
updater: options.updater ?? createQMindCliUpdater({ identity: {
|
|
4657
4737
|
artifactKind: "npm",
|
|
4658
4738
|
command: distribution.command,
|
|
4659
|
-
currentVersion: "3.
|
|
4739
|
+
currentVersion: "3.2.0",
|
|
4660
4740
|
distribution: distribution.id,
|
|
4661
4741
|
executablePath: process.execPath,
|
|
4662
4742
|
package: distribution.package,
|
|
@@ -566,6 +566,10 @@ const sourceListSchema = z.object({
|
|
|
566
566
|
});
|
|
567
567
|
const sourceTreeNodeSchema = z.lazy(() => z.object({
|
|
568
568
|
externalBinding: sourceExternalBindingSchema.optional(),
|
|
569
|
+
originUrl: z.string().optional(),
|
|
570
|
+
isEmailFolder: z.boolean().optional(),
|
|
571
|
+
isEmailAggregateMember: z.boolean().optional(),
|
|
572
|
+
isExternalSource: z.boolean().optional(),
|
|
569
573
|
files: z.array(sourceTreeNodeSchema).default([]),
|
|
570
574
|
hasChildren: z.boolean().optional(),
|
|
571
575
|
id: z.string().min(1),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as sourceUploadCapabilitiesSchema, m as requiredString, n as call } from "./shared-
|
|
1
|
+
import { H as sourceUploadCapabilitiesSchema, m as requiredString, n as call } from "./shared-OBSNlxAo.js";
|
|
2
2
|
//#region ../sdk/src/operations/source-upload.ts
|
|
3
3
|
/** Notebook-scoped edit preflight, not the deployment-level capabilities lookup. */
|
|
4
4
|
async function preflightSourceUpload(context, notebookId, options) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as QMIND_SOURCE_UPLOAD_MAX_BYTES, B as sourceSchema, E as imageUploadTicketSchema, Q as QMIND_MULTIPART_UPLOAD_MAX_BYTES, U as sourceUploadTicketSchema, X as voidResponseSchema, a as invalidArgument, l as optionalString, m as requiredString, nt as executeUnary, p as queryPath, r as compactUndefined, rt as QMindError, u as optionalTrimmedString } from "./shared-
|
|
2
|
-
import { t as preflightSourceUpload } from "./source-upload-
|
|
1
|
+
import { $ as QMIND_SOURCE_UPLOAD_MAX_BYTES, B as sourceSchema, E as imageUploadTicketSchema, Q as QMIND_MULTIPART_UPLOAD_MAX_BYTES, U as sourceUploadTicketSchema, X as voidResponseSchema, a as invalidArgument, l as optionalString, m as requiredString, nt as executeUnary, p as queryPath, r as compactUndefined, rt as QMindError, u as optionalTrimmedString } from "./shared-OBSNlxAo.js";
|
|
2
|
+
import { t as preflightSourceUpload } from "./source-upload-B0EAhkG2.js";
|
|
3
3
|
//#region ../sdk/src/operations/transfers.ts
|
|
4
4
|
function isRecord(value) {
|
|
5
5
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qoder-ai/qmind-cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.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.2.
|
|
43
|
-
"@ali/qmind-sdk": "^0.
|
|
42
|
+
"@ali/qmind-node-host": "^2.2.40",
|
|
43
|
+
"@ali/qmind-sdk": "^0.17.0"
|
|
44
44
|
},
|
|
45
45
|
"license": "UNLICENSED"
|
|
46
46
|
}
|