@qoder-ai/qmind-cli 3.2.0 → 3.2.1
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/dist/{bot-gateway-C3AvO7gR.js → bot-gateway-C0KmAiBy.js} +1 -1
- package/dist/{cards-D3WYzf7s.js → cards-YqfPPr12.js} +1 -1
- package/dist/{imports-D6n1sOFM.js → imports-CkLS3Vqu.js} +1 -1
- package/dist/{management-uK44XohU.js → management-BqqR6Ihj.js} +1 -1
- package/dist/{notes-BWrCOixr.js → notes-B9mcsP2n.js} +1 -1
- package/dist/qmind.js +64 -18
- package/dist/{shared-OBSNlxAo.js → shared-BFU7amCH.js} +10 -3
- package/dist/{source-upload-B0EAhkG2.js → source-upload-D3rcA1v1.js} +1 -1
- package/dist/{transfers-BB__MPG8.js → transfers-CzWL9766.js} +2 -2
- 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.2.1
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- cb40928: Bundle the SDK fix for Source ID citations in streamed messages so qmind and qmind-cn finish RAG responses with references instead of failing with STREAM_ERROR.
|
|
12
|
+
|
|
7
13
|
## 3.2.0
|
|
8
14
|
|
|
9
15
|
### Minor Changes
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -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-BFU7amCH.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-BFU7amCH.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-BFU7amCH.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-BFU7amCH.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-BFU7amCH.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-BFU7amCH.js";
|
|
2
|
+
import { t as preflightSourceUpload } from "./source-upload-D3rcA1v1.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";
|
|
@@ -1552,7 +1552,7 @@ const botGatewayOperationNames = [
|
|
|
1552
1552
|
function createLazyTransferOperations(context) {
|
|
1553
1553
|
let operations;
|
|
1554
1554
|
const load = () => {
|
|
1555
|
-
operations ??= import("./transfers-
|
|
1555
|
+
operations ??= import("./transfers-CzWL9766.js").then(({ createTransferOperations }) => createTransferOperations(context));
|
|
1556
1556
|
return operations;
|
|
1557
1557
|
};
|
|
1558
1558
|
return {
|
|
@@ -1563,7 +1563,7 @@ function createLazyTransferOperations(context) {
|
|
|
1563
1563
|
function createLazyBotGatewayOperations(context) {
|
|
1564
1564
|
let operations;
|
|
1565
1565
|
const load = () => {
|
|
1566
|
-
operations ??= import("./bot-gateway-
|
|
1566
|
+
operations ??= import("./bot-gateway-C0KmAiBy.js").then(({ createBotGatewayOperations }) => createBotGatewayOperations(context));
|
|
1567
1567
|
return operations;
|
|
1568
1568
|
};
|
|
1569
1569
|
return Object.fromEntries(botGatewayOperationNames.map((name) => [name, (...args) => load().then((loaded) => Reflect.apply(loaded[name], loaded, args))]));
|
|
@@ -1571,7 +1571,7 @@ function createLazyBotGatewayOperations(context) {
|
|
|
1571
1571
|
function createLazyNoteOperations(context) {
|
|
1572
1572
|
let operations;
|
|
1573
1573
|
const load = () => {
|
|
1574
|
-
operations ??= import("./notes-
|
|
1574
|
+
operations ??= import("./notes-B9mcsP2n.js").then(({ createNoteOperations }) => createNoteOperations(context));
|
|
1575
1575
|
return operations;
|
|
1576
1576
|
};
|
|
1577
1577
|
return Object.fromEntries(noteOperationNames.map((name) => [name, (...args) => load().then((loaded) => Reflect.apply(loaded[name], loaded, args))]));
|
|
@@ -1579,7 +1579,7 @@ function createLazyNoteOperations(context) {
|
|
|
1579
1579
|
function createLazyCardOperations(context) {
|
|
1580
1580
|
let operations;
|
|
1581
1581
|
const load = () => {
|
|
1582
|
-
operations ??= import("./cards-
|
|
1582
|
+
operations ??= import("./cards-YqfPPr12.js").then(({ createCardOperations }) => createCardOperations(context));
|
|
1583
1583
|
return operations;
|
|
1584
1584
|
};
|
|
1585
1585
|
return Object.fromEntries(cardOperationNames.map((name) => [name, (...args) => load().then((loaded) => Reflect.apply(loaded[name], loaded, args))]));
|
|
@@ -1587,7 +1587,7 @@ function createLazyCardOperations(context) {
|
|
|
1587
1587
|
function createLazyImportOperations(context) {
|
|
1588
1588
|
let operations;
|
|
1589
1589
|
const load = () => {
|
|
1590
|
-
operations ??= import("./imports-
|
|
1590
|
+
operations ??= import("./imports-CkLS3Vqu.js").then(({ createImportOperations }) => createImportOperations(context));
|
|
1591
1591
|
return operations;
|
|
1592
1592
|
};
|
|
1593
1593
|
return Object.fromEntries(importOperationNames.map((name) => [name, (...args) => load().then((loaded) => Reflect.apply(loaded[name], loaded, args))]));
|
|
@@ -1595,7 +1595,7 @@ function createLazyImportOperations(context) {
|
|
|
1595
1595
|
function createLazyManagementOperations(context) {
|
|
1596
1596
|
let operations;
|
|
1597
1597
|
const load = () => {
|
|
1598
|
-
operations ??= import("./management-
|
|
1598
|
+
operations ??= import("./management-BqqR6Ihj.js").then(({ createManagementOperations }) => createManagementOperations(context));
|
|
1599
1599
|
return operations;
|
|
1600
1600
|
};
|
|
1601
1601
|
return Object.fromEntries(managementOperationNames.map((name) => [name, (...args) => load().then((loaded) => Reflect.apply(loaded[name], loaded, args))]));
|
|
@@ -2393,6 +2393,26 @@ async function atomicQMindWrite(path, content, overwrite = false) {
|
|
|
2393
2393
|
}
|
|
2394
2394
|
}
|
|
2395
2395
|
//#endregion
|
|
2396
|
+
//#region ../node-host/src/request-budget.ts
|
|
2397
|
+
function createRequestBudgetTransport(transport, budget) {
|
|
2398
|
+
const withinBudget = (request) => {
|
|
2399
|
+
const current = budget();
|
|
2400
|
+
if (!current) return request;
|
|
2401
|
+
const remaining = Math.ceil(current.deadlineAt - Date.now());
|
|
2402
|
+
if (remaining <= 0) throw new QMindError("TIMEOUT", "Request deadline exceeded.");
|
|
2403
|
+
if (current.signal.aborted) throw new QMindError("ABORTED", "QMind request was aborted");
|
|
2404
|
+
return {
|
|
2405
|
+
...request,
|
|
2406
|
+
timeoutMs: Math.min(request.timeoutMs ?? remaining, remaining),
|
|
2407
|
+
signal: request.signal ? AbortSignal.any([request.signal, current.signal]) : current.signal
|
|
2408
|
+
};
|
|
2409
|
+
};
|
|
2410
|
+
return {
|
|
2411
|
+
request: async (request) => await transport.request(withinBudget(request)),
|
|
2412
|
+
stream: async (request) => await transport.stream(withinBudget(request))
|
|
2413
|
+
};
|
|
2414
|
+
}
|
|
2415
|
+
//#endregion
|
|
2396
2416
|
//#region ../node-host/src/node-transport.ts
|
|
2397
2417
|
const RETRYABLE_STATUS = /* @__PURE__ */ new Set([
|
|
2398
2418
|
408,
|
|
@@ -2409,6 +2429,7 @@ const CREDENTIAL_HEADERS = /* @__PURE__ */ new Set([
|
|
|
2409
2429
|
"x-csrf-token",
|
|
2410
2430
|
"x-xsrf-token"
|
|
2411
2431
|
]);
|
|
2432
|
+
const DOWNLOAD_ERROR_MAX_BYTES = 65536;
|
|
2412
2433
|
const SSE_MAX_BUFFER_SIZE = 8388608;
|
|
2413
2434
|
function invalidArgument(message, field) {
|
|
2414
2435
|
return new QMindError("INVALID_ARGUMENT", message, { details: { field } });
|
|
@@ -2499,8 +2520,26 @@ function parseRawBody(rawBody) {
|
|
|
2499
2520
|
return rawBody;
|
|
2500
2521
|
}
|
|
2501
2522
|
}
|
|
2502
|
-
async function wireResponse(response) {
|
|
2503
|
-
|
|
2523
|
+
async function wireResponse(response, maxBytes) {
|
|
2524
|
+
let rawBody;
|
|
2525
|
+
if (maxBytes === void 0) rawBody = await response.body.text();
|
|
2526
|
+
else {
|
|
2527
|
+
const chunks = [];
|
|
2528
|
+
let bytes = 0;
|
|
2529
|
+
try {
|
|
2530
|
+
if (Number(response.headers["content-length"]) > maxBytes) throw new QMindError("FILE_TOO_LARGE", "Response exceeds read limit");
|
|
2531
|
+
for await (const chunk of response.body) {
|
|
2532
|
+
const value = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
2533
|
+
bytes += value.byteLength;
|
|
2534
|
+
if (bytes > maxBytes) throw new QMindError("FILE_TOO_LARGE", "Response exceeds read limit");
|
|
2535
|
+
chunks.push(value);
|
|
2536
|
+
}
|
|
2537
|
+
rawBody = Buffer.concat(chunks, bytes).toString("utf8");
|
|
2538
|
+
} finally {
|
|
2539
|
+
response.body.on("error", () => {});
|
|
2540
|
+
response.body.destroy();
|
|
2541
|
+
}
|
|
2542
|
+
}
|
|
2504
2543
|
return {
|
|
2505
2544
|
body: parseRawBody(rawBody),
|
|
2506
2545
|
headers: headersToRecord(response.headers),
|
|
@@ -2509,6 +2548,7 @@ async function wireResponse(response) {
|
|
|
2509
2548
|
};
|
|
2510
2549
|
}
|
|
2511
2550
|
function assertWireRequest(request) {
|
|
2551
|
+
if (request.maxResponseBytes !== void 0) positiveInteger(request.maxResponseBytes, request.maxResponseBytes, "maxResponseBytes");
|
|
2512
2552
|
if (request.timeoutMs !== void 0) positiveInteger(request.timeoutMs, request.timeoutMs, "timeoutMs");
|
|
2513
2553
|
if (request.destination.kind === "host") {
|
|
2514
2554
|
if (!request.destination.path.startsWith("/") || request.destination.path.startsWith("//")) throw new QMindError("HOST_POLICY_ERROR", "host destination must be root-relative");
|
|
@@ -2751,7 +2791,7 @@ function createQMindNodeTransport(options) {
|
|
|
2751
2791
|
...download.signal === void 0 ? {} : { signal: download.signal }
|
|
2752
2792
|
});
|
|
2753
2793
|
if (response.statusCode < 200 || response.statusCode >= 300) {
|
|
2754
|
-
const decoded = await wireResponse(response);
|
|
2794
|
+
const decoded = await wireResponse(response, DOWNLOAD_ERROR_MAX_BYTES);
|
|
2755
2795
|
throw new QMindError("REMOTE_ERROR", "download request failed", {
|
|
2756
2796
|
...decoded.rawBody === void 0 ? {} : { rawBody: decoded.rawBody },
|
|
2757
2797
|
status: decoded.status
|
|
@@ -2794,12 +2834,17 @@ function createQMindNodeTransport(options) {
|
|
|
2794
2834
|
signal: deadline.signal
|
|
2795
2835
|
});
|
|
2796
2836
|
if (attempt + 1 < attempts && RETRYABLE_STATUS.has(response.statusCode)) {
|
|
2797
|
-
await response.body.dump();
|
|
2837
|
+
if (request$2.maxResponseBytes === void 0) await response.body.dump();
|
|
2838
|
+
else {
|
|
2839
|
+
response.body.on("error", () => {});
|
|
2840
|
+
response.body.destroy();
|
|
2841
|
+
}
|
|
2798
2842
|
await abortableSleep(250 * 2 ** attempt, deadline.signal);
|
|
2799
2843
|
continue;
|
|
2800
2844
|
}
|
|
2801
|
-
return await wireResponse(response);
|
|
2845
|
+
return await wireResponse(response, request$2.maxResponseBytes);
|
|
2802
2846
|
} catch (cause) {
|
|
2847
|
+
if (cause instanceof QMindError && cause.code === "FILE_TOO_LARGE") throw cause;
|
|
2803
2848
|
lastFailure = cause;
|
|
2804
2849
|
if (attempt + 1 >= attempts || request$2.signal?.aborted === true || deadline.timedOut) break;
|
|
2805
2850
|
try {
|
|
@@ -2844,7 +2889,7 @@ function createQMindNodeTransport(options) {
|
|
|
2844
2889
|
const headers = headersToRecord(response.headers);
|
|
2845
2890
|
if (response.statusCode < 200 || response.statusCode >= 300 || !headers["content-type"]?.toLowerCase().includes("text/event-stream")) try {
|
|
2846
2891
|
return {
|
|
2847
|
-
...await wireResponse(response),
|
|
2892
|
+
...await wireResponse(response, request$3.maxResponseBytes),
|
|
2848
2893
|
kind: "response"
|
|
2849
2894
|
};
|
|
2850
2895
|
} finally {
|
|
@@ -2972,7 +3017,8 @@ async function createQMindCliHost(options = {}) {
|
|
|
2972
3017
|
}
|
|
2973
3018
|
};
|
|
2974
3019
|
const ownedTransport = options.adapters?.transport === void 0 ? createQMindNodeTransport(nodeOptions) : void 0;
|
|
2975
|
-
const
|
|
3020
|
+
const baseTransport = options.adapters?.transport ?? ownedTransport;
|
|
3021
|
+
const rawTransport = baseTransport && options.adapters?.requestBudget ? createRequestBudgetTransport(baseTransport, options.adapters.requestBudget) : baseTransport;
|
|
2976
3022
|
if (rawTransport === void 0) throw new QMindError("HOST_POLICY_ERROR", "unable to initialize the QMind transport");
|
|
2977
3023
|
const auth = createQMindCliAuthManager({
|
|
2978
3024
|
browser: options.adapters?.browser ?? defaultBrowser(),
|
|
@@ -3058,8 +3104,8 @@ function requestsJsonOutput(argv) {
|
|
|
3058
3104
|
//#region src/build-info.ts
|
|
3059
3105
|
/** Bundled identity, never inferred from argv, environment, or an endpoint. */
|
|
3060
3106
|
const QMIND_CLI_DISTRIBUTION = "global";
|
|
3061
|
-
const QMIND_CLI_VERSION = "3.2.
|
|
3062
|
-
const QMIND_CLI_BUILD_TIME = "2026-09-
|
|
3107
|
+
const QMIND_CLI_VERSION = "3.2.1";
|
|
3108
|
+
const QMIND_CLI_BUILD_TIME = "2026-09-08T12:44:54.000Z";
|
|
3063
3109
|
function qmindCliPlatform() {
|
|
3064
3110
|
return process.platform === "win32" ? "windows" : process.platform;
|
|
3065
3111
|
}
|
|
@@ -4736,7 +4782,7 @@ async function runQMindCli(argv, options = {}) {
|
|
|
4736
4782
|
updater: options.updater ?? createQMindCliUpdater({ identity: {
|
|
4737
4783
|
artifactKind: "npm",
|
|
4738
4784
|
command: distribution.command,
|
|
4739
|
-
currentVersion: "3.2.
|
|
4785
|
+
currentVersion: "3.2.1",
|
|
4740
4786
|
distribution: distribution.id,
|
|
4741
4787
|
executablePath: process.execPath,
|
|
4742
4788
|
package: distribution.package,
|
|
@@ -903,8 +903,12 @@ const chatMessageSchema = z.object({
|
|
|
903
903
|
updatedAt: timestampSchema.optional(),
|
|
904
904
|
userId: z.string().optional()
|
|
905
905
|
});
|
|
906
|
+
const streamChatMessageSchema = z.preprocess((value) => isRecord(value) && Array.isArray(value.citations) ? {
|
|
907
|
+
...value,
|
|
908
|
+
citations: value.citations.map((citation) => typeof citation === "string" ? { sourceId: citation } : citation)
|
|
909
|
+
} : value, chatMessageSchema);
|
|
906
910
|
const streamWireEventSchema = z.object({
|
|
907
|
-
assistantMessage:
|
|
911
|
+
assistantMessage: streamChatMessageSchema.optional(),
|
|
908
912
|
assistantMessageId: z.string().optional(),
|
|
909
913
|
cancelReason: z.string().optional(),
|
|
910
914
|
canceled: z.boolean().optional(),
|
|
@@ -924,7 +928,7 @@ const streamWireEventSchema = z.object({
|
|
|
924
928
|
toolResult: z.string().optional(),
|
|
925
929
|
totalContextChunks: z.number().int().nonnegative().optional(),
|
|
926
930
|
type: z.string().optional(),
|
|
927
|
-
userMessage:
|
|
931
|
+
userMessage: streamChatMessageSchema.optional()
|
|
928
932
|
});
|
|
929
933
|
const sourceUploadTicketSchema = z.object({
|
|
930
934
|
expiresAt: z.string().optional(),
|
|
@@ -1129,6 +1133,8 @@ function queryPath(path, entries) {
|
|
|
1129
1133
|
function wireRequest(options) {
|
|
1130
1134
|
const timeoutMs = options.callOptions?.timeoutMs;
|
|
1131
1135
|
if (timeoutMs !== void 0 && (!Number.isFinite(timeoutMs) || timeoutMs <= 0)) throw invalidArgument("timeoutMs must be a positive finite number", "timeoutMs");
|
|
1136
|
+
const maxResponseBytes = options.callOptions?.maxResponseBytes;
|
|
1137
|
+
if (maxResponseBytes !== void 0 && (!Number.isSafeInteger(maxResponseBytes) || maxResponseBytes <= 0)) throw invalidArgument("maxResponseBytes must be a positive integer", "maxResponseBytes");
|
|
1132
1138
|
const authorization = options.callOptions?.authorization?.trim();
|
|
1133
1139
|
return {
|
|
1134
1140
|
...options.body === void 0 ? {} : { body: {
|
|
@@ -1143,7 +1149,8 @@ function wireRequest(options) {
|
|
|
1143
1149
|
idempotent: options.idempotent,
|
|
1144
1150
|
method: options.method,
|
|
1145
1151
|
...options.callOptions?.signal === void 0 ? {} : { signal: options.callOptions.signal },
|
|
1146
|
-
...timeoutMs === void 0 ? {} : { timeoutMs }
|
|
1152
|
+
...timeoutMs === void 0 ? {} : { timeoutMs },
|
|
1153
|
+
...maxResponseBytes === void 0 ? {} : { maxResponseBytes }
|
|
1147
1154
|
};
|
|
1148
1155
|
}
|
|
1149
1156
|
function call(context, options) {
|
|
@@ -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-BFU7amCH.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-BFU7amCH.js";
|
|
2
|
+
import { t as preflightSourceUpload } from "./source-upload-D3rcA1v1.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.2.
|
|
3
|
+
"version": "3.2.1",
|
|
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.
|
|
43
|
-
"@ali/qmind-sdk": "^0.
|
|
42
|
+
"@ali/qmind-node-host": "^2.3.3",
|
|
43
|
+
"@ali/qmind-sdk": "^0.18.3"
|
|
44
44
|
},
|
|
45
45
|
"license": "UNLICENSED"
|
|
46
46
|
}
|