@lobehub/cli 0.0.106 → 0.0.108
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/dist/acceptance-report.html +267 -275
- package/dist/index.js +179 -116
- package/man/man1/lh.1 +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -9790,6 +9790,7 @@ var init_fetch = __esmMin((() => {
|
|
|
9790
9790
|
ShareTopicLimitExceeded: "ShareTopicLimitExceeded",
|
|
9791
9791
|
ShareSpendLimitExceeded: "ShareSpendLimitExceeded",
|
|
9792
9792
|
ShareHeterogeneousAgentUnsupported: "ShareHeterogeneousAgentUnsupported",
|
|
9793
|
+
ShareHeteroDeviceUnavailable: "ShareHeteroDeviceUnavailable",
|
|
9793
9794
|
AgentShareProviderNotSupported: "AgentShareProviderNotSupported",
|
|
9794
9795
|
SupervisorDecisionFailed: "SupervisorDecisionFailed",
|
|
9795
9796
|
AgentConcurrencyLimitExceeded: "AgentConcurrencyLimitExceeded",
|
|
@@ -31869,6 +31870,70 @@ _Mime_extensionToType = /* @__PURE__ */ new WeakMap(), _Mime_typeToExtension = /
|
|
|
31869
31870
|
//#region node_modules/.pnpm/mime@4.1.2/node_modules/mime/dist/src/index.js
|
|
31870
31871
|
var src_default = new Mime(types$1, types$2)._freeze();
|
|
31871
31872
|
|
|
31873
|
+
//#endregion
|
|
31874
|
+
//#region ../../packages/utils/src/detectUtf16.ts
|
|
31875
|
+
var HEURISTIC_SAMPLE_BYTES, HEURISTIC_THRESHOLD, detectUtf16NoBom;
|
|
31876
|
+
var init_detectUtf16 = __esmMin((() => {
|
|
31877
|
+
HEURISTIC_SAMPLE_BYTES = 512;
|
|
31878
|
+
HEURISTIC_THRESHOLD = .3;
|
|
31879
|
+
detectUtf16NoBom = (buffer) => {
|
|
31880
|
+
const sample = buffer.subarray(0, Math.min(HEURISTIC_SAMPLE_BYTES, buffer.length));
|
|
31881
|
+
if (sample.length < 4 || sample.length % 2 !== 0) return null;
|
|
31882
|
+
let leAsciiPairs = 0;
|
|
31883
|
+
let beAsciiPairs = 0;
|
|
31884
|
+
const totalPairs = sample.length / 2;
|
|
31885
|
+
for (let i = 0; i < sample.length; i += 2) {
|
|
31886
|
+
const lo = sample[i];
|
|
31887
|
+
const hi = sample[i + 1];
|
|
31888
|
+
if (hi === 0 && lo !== 0) leAsciiPairs++;
|
|
31889
|
+
else if (lo === 0 && hi !== 0) beAsciiPairs++;
|
|
31890
|
+
}
|
|
31891
|
+
if (leAsciiPairs > beAsciiPairs && leAsciiPairs / totalPairs >= HEURISTIC_THRESHOLD) return "utf-16le";
|
|
31892
|
+
if (beAsciiPairs > leAsciiPairs && beAsciiPairs / totalPairs >= HEURISTIC_THRESHOLD) return "utf-16be";
|
|
31893
|
+
return null;
|
|
31894
|
+
};
|
|
31895
|
+
}));
|
|
31896
|
+
|
|
31897
|
+
//#endregion
|
|
31898
|
+
//#region ../../packages/utils/src/isBinaryContent.ts
|
|
31899
|
+
var NON_PRINTABLE_THRESHOLD, hasUtf8Bom, hasUtf16Bom, sniffBinaryBuffer, REPLACEMENT_CHAR, checkPrintableRatio;
|
|
31900
|
+
var init_isBinaryContent = __esmMin((() => {
|
|
31901
|
+
init_detectUtf16();
|
|
31902
|
+
NON_PRINTABLE_THRESHOLD = .3;
|
|
31903
|
+
hasUtf8Bom = (buf) => buf.length >= 3 && buf[0] === 239 && buf[1] === 187 && buf[2] === 191;
|
|
31904
|
+
hasUtf16Bom = (buf) => buf.length >= 2 && (buf[0] === 255 && buf[1] === 254 || buf[0] === 254 && buf[1] === 255);
|
|
31905
|
+
sniffBinaryBuffer = (buffer) => {
|
|
31906
|
+
if (buffer.length === 0) return { isBinary: false };
|
|
31907
|
+
if (hasUtf8Bom(buffer) || hasUtf16Bom(buffer)) return { isBinary: false };
|
|
31908
|
+
const utf16Variant = detectUtf16NoBom(buffer);
|
|
31909
|
+
if (utf16Variant) return checkPrintableRatio(new TextDecoder(utf16Variant, { fatal: false }).decode(buffer), buffer.length);
|
|
31910
|
+
if (buffer.includes(0)) return {
|
|
31911
|
+
isBinary: true,
|
|
31912
|
+
reason: "contains null byte"
|
|
31913
|
+
};
|
|
31914
|
+
return checkPrintableRatio(new TextDecoder("utf-8", { fatal: false }).decode(buffer), buffer.length);
|
|
31915
|
+
};
|
|
31916
|
+
REPLACEMENT_CHAR = "�";
|
|
31917
|
+
checkPrintableRatio = (text, sampledBytes) => {
|
|
31918
|
+
if (text.length === 0) return { isBinary: false };
|
|
31919
|
+
let suspect = 0;
|
|
31920
|
+
for (const ch of text) {
|
|
31921
|
+
if (ch === REPLACEMENT_CHAR) {
|
|
31922
|
+
suspect++;
|
|
31923
|
+
continue;
|
|
31924
|
+
}
|
|
31925
|
+
const code = ch.codePointAt(0);
|
|
31926
|
+
if (code < 32 && code !== 9 && code !== 10 && code !== 13) suspect++;
|
|
31927
|
+
}
|
|
31928
|
+
const ratio = suspect / text.length;
|
|
31929
|
+
if (ratio > NON_PRINTABLE_THRESHOLD) return {
|
|
31930
|
+
isBinary: true,
|
|
31931
|
+
reason: `${(ratio * 100).toFixed(1)}% non-printable chars in first ${sampledBytes} bytes`
|
|
31932
|
+
};
|
|
31933
|
+
return { isBinary: false };
|
|
31934
|
+
};
|
|
31935
|
+
}));
|
|
31936
|
+
|
|
31872
31937
|
//#endregion
|
|
31873
31938
|
//#region node_modules/.pnpm/strtok3@10.8.0/node_modules/strtok3/lib/stream/Errors.js
|
|
31874
31939
|
var defaultMessages, EndOfStreamError, AbortError$1;
|
|
@@ -37228,6 +37293,7 @@ var init_file_type = __esmMin((() => {
|
|
|
37228
37293
|
|
|
37229
37294
|
//#endregion
|
|
37230
37295
|
//#region ../../packages/utils/src/mimeType.ts
|
|
37296
|
+
init_isBinaryContent();
|
|
37231
37297
|
const CUSTOM_MIME_TYPES = {
|
|
37232
37298
|
".clj": "text/x-clojure",
|
|
37233
37299
|
".ex": "text/x-elixir",
|
|
@@ -37253,7 +37319,8 @@ const TEXT_FALLBACK_MIME = "text/plain; charset=utf-8";
|
|
|
37253
37319
|
const BINARY_FALLBACK_MIME = "application/octet-stream";
|
|
37254
37320
|
const TEXT_MIME_PATTERN = /^(?:text\/|application\/(?:ecmascript|graphql|javascript|json|toml|xhtml\+xml|xml|yaml))/;
|
|
37255
37321
|
const SVG_MIME = "image/svg+xml";
|
|
37256
|
-
const
|
|
37322
|
+
const DEFAULT_CHARSET = "utf-8";
|
|
37323
|
+
const withCharset = (mimeType, charset = DEFAULT_CHARSET) => TEXT_MIME_PATTERN.test(mimeType) && !mimeType.includes("charset=") ? `${mimeType}; charset=${charset}` : mimeType;
|
|
37257
37324
|
const getExtension = (filePath) => {
|
|
37258
37325
|
const fileName = filePath.replace(/^.*[/\\]/s, "");
|
|
37259
37326
|
const dotIndex = fileName.lastIndexOf(".");
|
|
@@ -37268,6 +37335,32 @@ const looksBinary = (buffer) => {
|
|
|
37268
37335
|
return false;
|
|
37269
37336
|
};
|
|
37270
37337
|
/**
|
|
37338
|
+
* Detect UTF-16 text marked by a byte order mark.
|
|
37339
|
+
*
|
|
37340
|
+
* The UTF-16LE BOM (0xFF 0xFE) is also a valid MPEG audio frame sync, so
|
|
37341
|
+
* file-type reports Windows PowerShell 5.1 output (`Tee-Object`, `Out-File`)
|
|
37342
|
+
* as audio/mpeg. The BOM alone is not proof: a real MPEG-1 Layer I frame can
|
|
37343
|
+
* start with the same bytes. Decode the bytes after the BOM strictly and
|
|
37344
|
+
* require them to read as text: compressed audio contains unpaired surrogates,
|
|
37345
|
+
* and a lenient decode would turn them into "printable" characters. `stream`
|
|
37346
|
+
* keeps a surrogate pair split by the sample boundary from failing the decode.
|
|
37347
|
+
*/
|
|
37348
|
+
const detectUtf16BomText = (buffer) => {
|
|
37349
|
+
if (buffer.byteLength < 2) return null;
|
|
37350
|
+
let charset;
|
|
37351
|
+
if (buffer[0] === 255 && buffer[1] === 254) charset = "utf-16le";
|
|
37352
|
+
else if (buffer[0] === 254 && buffer[1] === 255) charset = "utf-16be";
|
|
37353
|
+
else return null;
|
|
37354
|
+
const sample = buffer.subarray(2, Math.min(buffer.byteLength, SNIFF_BYTES$1));
|
|
37355
|
+
let text;
|
|
37356
|
+
try {
|
|
37357
|
+
text = new TextDecoder(charset, { fatal: true }).decode(sample, { stream: true });
|
|
37358
|
+
} catch {
|
|
37359
|
+
return null;
|
|
37360
|
+
}
|
|
37361
|
+
return sniffBinaryBuffer(new TextEncoder().encode(text)).isBinary ? null : charset;
|
|
37362
|
+
};
|
|
37363
|
+
/**
|
|
37271
37364
|
* Sync extension-only lookup. Falls back to `application/octet-stream` for
|
|
37272
37365
|
* unknown extensions. Use this when a file buffer isn't available (URL input,
|
|
37273
37366
|
* TRPC payload, filename-only records).
|
|
@@ -37283,6 +37376,9 @@ const getMimeType = (filePath) => {
|
|
|
37283
37376
|
* Trust magic bytes first, then fall back to the extension, and let a text
|
|
37284
37377
|
* sniff overrule mime-db when the two disagree.
|
|
37285
37378
|
*
|
|
37379
|
+
* 0. UTF-16 BOM text → text mime with the matching charset, before the
|
|
37380
|
+
* magic-byte check (the UTF-16LE BOM looks like an MPEG audio frame).
|
|
37381
|
+
* Keeps a text extension mime, otherwise falls back to text/plain.
|
|
37286
37382
|
* 1. `fileTypeFromBuffer()` — magic-byte detection. Authoritative when it
|
|
37287
37383
|
* matches: real MPEG-TS media wins here regardless of extension. The one
|
|
37288
37384
|
* exception is a generic `application/xml` match, which yields to the
|
|
@@ -37297,9 +37393,14 @@ const getMimeType = (filePath) => {
|
|
|
37297
37393
|
* 3. No extension mapping → sniff-based fallback.
|
|
37298
37394
|
*/
|
|
37299
37395
|
const resolveMimeType = async (filePath, buffer) => {
|
|
37396
|
+
const fromExtension = lookupExtensionMime(filePath);
|
|
37397
|
+
const utf16Charset = detectUtf16BomText(buffer);
|
|
37398
|
+
if (utf16Charset) {
|
|
37399
|
+
if (fromExtension === SVG_MIME) return SVG_MIME;
|
|
37400
|
+
return fromExtension && TEXT_MIME_PATTERN.test(fromExtension) ? withCharset(fromExtension, utf16Charset) : `text/plain; charset=${utf16Charset}`;
|
|
37401
|
+
}
|
|
37300
37402
|
const { fileTypeFromBuffer } = await Promise.resolve().then(() => (init_file_type(), file_type_exports));
|
|
37301
37403
|
const detected = await fileTypeFromBuffer(buffer);
|
|
37302
|
-
const fromExtension = lookupExtensionMime(filePath);
|
|
37303
37404
|
if (detected?.mime) {
|
|
37304
37405
|
if (detected.mime === "application/xml" && fromExtension === SVG_MIME) return SVG_MIME;
|
|
37305
37406
|
return detected.mime;
|
|
@@ -63615,7 +63716,8 @@ const createCodexAgentHandle = async (options) => {
|
|
|
63615
63716
|
get sessionId() {
|
|
63616
63717
|
return nativeSessionId;
|
|
63617
63718
|
},
|
|
63618
|
-
stderr
|
|
63719
|
+
stderr,
|
|
63720
|
+
supportsSteerImageAttachments: true
|
|
63619
63721
|
};
|
|
63620
63722
|
};
|
|
63621
63723
|
|
|
@@ -74163,7 +74265,8 @@ const spawnCliAgent = async (options, command, cwd, inputPlan, childEnv, codexJw
|
|
|
74163
74265
|
if (!live.isOpen) return false;
|
|
74164
74266
|
const plan = await buildAgentInput("claude-code", prompt, options.inputOptions);
|
|
74165
74267
|
return live.send(plan.stdin, sendOptions?.uuid);
|
|
74166
|
-
}
|
|
74268
|
+
},
|
|
74269
|
+
supportsSteerImageAttachments: true
|
|
74167
74270
|
},
|
|
74168
74271
|
kill: (signal = "SIGINT") => {
|
|
74169
74272
|
killedByUs = true;
|
|
@@ -89699,70 +89802,6 @@ var init_fileParseBudget = __esmMin((() => {
|
|
|
89699
89802
|
isFileParseBudgetError = (error) => error instanceof FileParseBudgetError || error instanceof Error && error.name === "FileParseBudgetError";
|
|
89700
89803
|
}));
|
|
89701
89804
|
|
|
89702
|
-
//#endregion
|
|
89703
|
-
//#region ../../packages/utils/src/detectUtf16.ts
|
|
89704
|
-
var HEURISTIC_SAMPLE_BYTES, HEURISTIC_THRESHOLD, detectUtf16NoBom;
|
|
89705
|
-
var init_detectUtf16 = __esmMin((() => {
|
|
89706
|
-
HEURISTIC_SAMPLE_BYTES = 512;
|
|
89707
|
-
HEURISTIC_THRESHOLD = .3;
|
|
89708
|
-
detectUtf16NoBom = (buffer) => {
|
|
89709
|
-
const sample = buffer.subarray(0, Math.min(HEURISTIC_SAMPLE_BYTES, buffer.length));
|
|
89710
|
-
if (sample.length < 4 || sample.length % 2 !== 0) return null;
|
|
89711
|
-
let leAsciiPairs = 0;
|
|
89712
|
-
let beAsciiPairs = 0;
|
|
89713
|
-
const totalPairs = sample.length / 2;
|
|
89714
|
-
for (let i = 0; i < sample.length; i += 2) {
|
|
89715
|
-
const lo = sample[i];
|
|
89716
|
-
const hi = sample[i + 1];
|
|
89717
|
-
if (hi === 0 && lo !== 0) leAsciiPairs++;
|
|
89718
|
-
else if (lo === 0 && hi !== 0) beAsciiPairs++;
|
|
89719
|
-
}
|
|
89720
|
-
if (leAsciiPairs > beAsciiPairs && leAsciiPairs / totalPairs >= HEURISTIC_THRESHOLD) return "utf-16le";
|
|
89721
|
-
if (beAsciiPairs > leAsciiPairs && beAsciiPairs / totalPairs >= HEURISTIC_THRESHOLD) return "utf-16be";
|
|
89722
|
-
return null;
|
|
89723
|
-
};
|
|
89724
|
-
}));
|
|
89725
|
-
|
|
89726
|
-
//#endregion
|
|
89727
|
-
//#region ../../packages/utils/src/isBinaryContent.ts
|
|
89728
|
-
var NON_PRINTABLE_THRESHOLD, hasUtf8Bom, hasUtf16Bom, sniffBinaryBuffer, REPLACEMENT_CHAR, checkPrintableRatio;
|
|
89729
|
-
var init_isBinaryContent = __esmMin((() => {
|
|
89730
|
-
init_detectUtf16();
|
|
89731
|
-
NON_PRINTABLE_THRESHOLD = .3;
|
|
89732
|
-
hasUtf8Bom = (buf) => buf.length >= 3 && buf[0] === 239 && buf[1] === 187 && buf[2] === 191;
|
|
89733
|
-
hasUtf16Bom = (buf) => buf.length >= 2 && (buf[0] === 255 && buf[1] === 254 || buf[0] === 254 && buf[1] === 255);
|
|
89734
|
-
sniffBinaryBuffer = (buffer) => {
|
|
89735
|
-
if (buffer.length === 0) return { isBinary: false };
|
|
89736
|
-
if (hasUtf8Bom(buffer) || hasUtf16Bom(buffer)) return { isBinary: false };
|
|
89737
|
-
const utf16Variant = detectUtf16NoBom(buffer);
|
|
89738
|
-
if (utf16Variant) return checkPrintableRatio(new TextDecoder(utf16Variant, { fatal: false }).decode(buffer), buffer.length);
|
|
89739
|
-
if (buffer.includes(0)) return {
|
|
89740
|
-
isBinary: true,
|
|
89741
|
-
reason: "contains null byte"
|
|
89742
|
-
};
|
|
89743
|
-
return checkPrintableRatio(new TextDecoder("utf-8", { fatal: false }).decode(buffer), buffer.length);
|
|
89744
|
-
};
|
|
89745
|
-
REPLACEMENT_CHAR = "�";
|
|
89746
|
-
checkPrintableRatio = (text, sampledBytes) => {
|
|
89747
|
-
if (text.length === 0) return { isBinary: false };
|
|
89748
|
-
let suspect = 0;
|
|
89749
|
-
for (const ch of text) {
|
|
89750
|
-
if (ch === REPLACEMENT_CHAR) {
|
|
89751
|
-
suspect++;
|
|
89752
|
-
continue;
|
|
89753
|
-
}
|
|
89754
|
-
const code = ch.codePointAt(0);
|
|
89755
|
-
if (code < 32 && code !== 9 && code !== 10 && code !== 13) suspect++;
|
|
89756
|
-
}
|
|
89757
|
-
const ratio = suspect / text.length;
|
|
89758
|
-
if (ratio > NON_PRINTABLE_THRESHOLD) return {
|
|
89759
|
-
isBinary: true,
|
|
89760
|
-
reason: `${(ratio * 100).toFixed(1)}% non-printable chars in first ${sampledBytes} bytes`
|
|
89761
|
-
};
|
|
89762
|
-
return { isBinary: false };
|
|
89763
|
-
};
|
|
89764
|
-
}));
|
|
89765
|
-
|
|
89766
89805
|
//#endregion
|
|
89767
89806
|
//#region ../../packages/file-loaders/src/loaders/ipynb/index.ts
|
|
89768
89807
|
var ipynb_exports = /* @__PURE__ */ __exportAll$2({
|
|
@@ -579272,7 +579311,7 @@ var WebStandardStreamableHTTPServerTransport = class {
|
|
|
579272
579311
|
};
|
|
579273
579312
|
|
|
579274
579313
|
//#endregion
|
|
579275
|
-
//#region node_modules/.pnpm/@hono+node-server@2.1.
|
|
579314
|
+
//#region node_modules/.pnpm/@hono+node-server@2.1.9_hono@4.13.19/node_modules/@hono/node-server/dist/constants-BLSFu_RU.mjs
|
|
579276
579315
|
const X_ALREADY_SENT = "x-hono-already-sent";
|
|
579277
579316
|
|
|
579278
579317
|
//#endregion
|
|
@@ -579301,7 +579340,7 @@ const defineWebSocketHelper = (handler) => {
|
|
|
579301
579340
|
};
|
|
579302
579341
|
|
|
579303
579342
|
//#endregion
|
|
579304
|
-
//#region node_modules/.pnpm/@hono+node-server@2.1.
|
|
579343
|
+
//#region node_modules/.pnpm/@hono+node-server@2.1.9_hono@4.13.19/node_modules/@hono/node-server/dist/index.mjs
|
|
579305
579344
|
var RequestError = class extends Error {
|
|
579306
579345
|
constructor(message, options) {
|
|
579307
579346
|
super(message, options);
|
|
@@ -579488,7 +579527,11 @@ const toRequestError = (e) => {
|
|
|
579488
579527
|
return new RequestError(e.message, { cause: e });
|
|
579489
579528
|
};
|
|
579490
579529
|
const GlobalRequest = global.Request;
|
|
579491
|
-
var Request$1 = class extends GlobalRequest {
|
|
579530
|
+
var Request$1 = class Request$1 extends GlobalRequest {
|
|
579531
|
+
static [Symbol.hasInstance](instance) {
|
|
579532
|
+
if (this === Request$1) return instance instanceof GlobalRequest || Function.prototype[Symbol.hasInstance].call(this, instance);
|
|
579533
|
+
return Function.prototype[Symbol.hasInstance].call(this, instance);
|
|
579534
|
+
}
|
|
579492
579535
|
constructor(input, options) {
|
|
579493
579536
|
if (typeof input === "object" && getRequestCache in input) {
|
|
579494
579537
|
const hasReplacementBody = options !== void 0 && "body" in options && options.body != null;
|
|
@@ -579527,8 +579570,8 @@ const readBodyBufferedBeforeDisconnect = (incoming, chunks) => {
|
|
|
579527
579570
|
else if (incomingWithRecovery[bodyBufferedLengthBeforeDisconnectKey] !== void 0 && incoming.readableLength !== incomingWithRecovery[bodyBufferedLengthBeforeDisconnectKey]) result = newBodyUnusableError();
|
|
579528
579571
|
else {
|
|
579529
579572
|
const bodyChunks = chunks ?? [];
|
|
579530
|
-
|
|
579531
|
-
|
|
579573
|
+
let chunk;
|
|
579574
|
+
while ((chunk = incoming.read()) !== null) bodyChunks.push(toBufferChunk(chunk, incoming.readableEncoding));
|
|
579532
579575
|
const buffer = bodyChunks.length === 1 ? bodyChunks[0] : Buffer.concat(bodyChunks);
|
|
579533
579576
|
result = buffer;
|
|
579534
579577
|
const contentLength = incoming.headers["content-length"];
|
|
@@ -579865,6 +579908,9 @@ Object.defineProperty(requestPrototype, "blob", { value: function() {
|
|
|
579865
579908
|
return new Response(buf, type ? { headers: { "content-type": type } } : void 0).blob();
|
|
579866
579909
|
});
|
|
579867
579910
|
} });
|
|
579911
|
+
Object.defineProperty(requestPrototype, "bytes", { value: function() {
|
|
579912
|
+
return this.arrayBuffer().then((buf) => new Uint8Array(buf));
|
|
579913
|
+
} });
|
|
579868
579914
|
Object.defineProperty(requestPrototype, "json", { value: function() {
|
|
579869
579915
|
if (this[bodyConsumedDirectlyKey]) return rejectBodyUnusable();
|
|
579870
579916
|
return this.text().then(JSON.parse);
|
|
@@ -579919,6 +579965,10 @@ const GlobalResponse = global.Response;
|
|
|
579919
579965
|
var Response$1 = class Response$1 {
|
|
579920
579966
|
#body;
|
|
579921
579967
|
#init;
|
|
579968
|
+
static [Symbol.hasInstance](instance) {
|
|
579969
|
+
if (this === Response$1) return instance instanceof GlobalResponse || Function.prototype[Symbol.hasInstance].call(this, instance);
|
|
579970
|
+
return Function.prototype[Symbol.hasInstance].call(this, instance);
|
|
579971
|
+
}
|
|
579922
579972
|
[getResponseCache]() {
|
|
579923
579973
|
const cache = this[cacheKey];
|
|
579924
579974
|
const liveHeaders = cache && cache[2] instanceof Headers ? cache[2] : void 0;
|
|
@@ -579939,7 +579989,7 @@ var Response$1 = class Response$1 {
|
|
|
579939
579989
|
this[getResponseCache]();
|
|
579940
579990
|
return;
|
|
579941
579991
|
}
|
|
579942
|
-
this.#init = init
|
|
579992
|
+
this.#init = #init in init ? init.#init : init;
|
|
579943
579993
|
headers = new Headers(init.headers);
|
|
579944
579994
|
} else this.#init = init;
|
|
579945
579995
|
if (body == null || typeof body === "string" || typeof body?.getReader !== "undefined" || body instanceof Blob || body instanceof Uint8Array) this[cacheKey] = [
|
|
@@ -579980,6 +580030,7 @@ var Response$1 = class Response$1 {
|
|
|
579980
580030
|
[
|
|
579981
580031
|
"arrayBuffer",
|
|
579982
580032
|
"blob",
|
|
580033
|
+
"bytes",
|
|
579983
580034
|
"clone",
|
|
579984
580035
|
"formData",
|
|
579985
580036
|
"json",
|
|
@@ -582553,6 +582604,7 @@ async function* withHeteroSteer(handle, context) {
|
|
|
582553
582604
|
try {
|
|
582554
582605
|
const res = await client.aiAgent.waitHeteroSteer.mutate({
|
|
582555
582606
|
...acceptsControl && { acceptsControl: true },
|
|
582607
|
+
...handle.supportsSteerImageAttachments && { acceptsImageAttachments: true },
|
|
582556
582608
|
acceptsImages: true,
|
|
582557
582609
|
...!answered && { blockMs: 1 },
|
|
582558
582610
|
...waitingForUser() && { holdSteer: true },
|
|
@@ -582583,7 +582635,7 @@ async function* withHeteroSteer(handle, context) {
|
|
|
582583
582635
|
const steer = message;
|
|
582584
582636
|
const options = { uuid: steer.messageId };
|
|
582585
582637
|
if (await send(buildSteerPrompt(steer), options).catch(async (error) => {
|
|
582586
|
-
if (!steer.imageList?.length) return false;
|
|
582638
|
+
if (steer.requiresImages || !steer.imageList?.length) return false;
|
|
582587
582639
|
log$15.debug("Steer images failed, sending the text: %s", String(error));
|
|
582588
582640
|
return send(steer.content, options).catch(() => false);
|
|
582589
582641
|
})) {
|
|
@@ -585080,7 +585132,7 @@ function registerMessageCommand(program) {
|
|
|
585080
585132
|
}
|
|
585081
585133
|
|
|
585082
585134
|
//#endregion
|
|
585083
|
-
//#region node_modules/.pnpm/ignore@7.0.
|
|
585135
|
+
//#region node_modules/.pnpm/ignore@7.0.16/node_modules/ignore/index.js
|
|
585084
585136
|
var require_ignore = /* @__PURE__ */ __commonJSMin$2(((exports, module) => {
|
|
585085
585137
|
function makeArray(subject) {
|
|
585086
585138
|
return Array.isArray(subject) ? subject : [subject];
|
|
@@ -585091,7 +585143,6 @@ var require_ignore = /* @__PURE__ */ __commonJSMin$2(((exports, module) => {
|
|
|
585091
585143
|
const ESCAPE = "\\";
|
|
585092
585144
|
const REGEX_LITERAL_SPECIAL = /[.*+?()[\]{}^$|\\/]/;
|
|
585093
585145
|
const BOM = "";
|
|
585094
|
-
const REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/;
|
|
585095
585146
|
const REGEX_ANCHORED_GLOBSTAR = /^\/\*{2,}$/;
|
|
585096
585147
|
const REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/;
|
|
585097
585148
|
const REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/;
|
|
@@ -585146,11 +585197,9 @@ var require_ignore = /* @__PURE__ */ __commonJSMin$2(((exports, module) => {
|
|
|
585146
585197
|
const char = pattern[index];
|
|
585147
585198
|
if (char === UNDEFINED) return null;
|
|
585148
585199
|
if (char === ESCAPE) {
|
|
585149
|
-
const escaped = pattern[index
|
|
585150
|
-
if (escaped === UNDEFINED) return null;
|
|
585200
|
+
const escaped = pattern[++index];
|
|
585151
585201
|
body += escapeMember(escaped);
|
|
585152
585202
|
prev = escaped;
|
|
585153
|
-
index++;
|
|
585154
585203
|
} else if (char === "-" && prev && index + 1 < length && pattern[index + 1] !== "]") {
|
|
585155
585204
|
index++;
|
|
585156
585205
|
let to = pattern[index];
|
|
@@ -585200,7 +585249,7 @@ var require_ignore = /* @__PURE__ */ __commonJSMin$2(((exports, module) => {
|
|
|
585200
585249
|
const char = pattern[index];
|
|
585201
585250
|
if (char === ESCAPE) {
|
|
585202
585251
|
const escaped = pattern[index + 1];
|
|
585203
|
-
if (escaped ===
|
|
585252
|
+
if (escaped === SLASH && index + 2 === length) out += hold(NEVER_MATCH);
|
|
585204
585253
|
else if (escaped === "*" || escaped === "[" || escaped === SPACE) out += pattern.slice(index, index + 2);
|
|
585205
585254
|
else out += hold(REGEX_LITERAL_SPECIAL.test(escaped) ? ESCAPE + escaped : isReserved(escaped) ? `[${escaped}]` : escaped);
|
|
585206
585255
|
index += 2;
|
|
@@ -585228,6 +585277,7 @@ var require_ignore = /* @__PURE__ */ __commonJSMin$2(((exports, module) => {
|
|
|
585228
585277
|
};
|
|
585229
585278
|
const DIRECT = null;
|
|
585230
585279
|
const REGEX_INNER_SLASH = /\/(?!$)/;
|
|
585280
|
+
const WILDCARD = "[^\\/]*";
|
|
585231
585281
|
const REPLACERS = [
|
|
585232
585282
|
[
|
|
585233
585283
|
/(\\+)( ?)/g,
|
|
@@ -585257,11 +585307,11 @@ var require_ignore = /* @__PURE__ */ __commonJSMin$2(((exports, module) => {
|
|
|
585257
585307
|
],
|
|
585258
585308
|
[
|
|
585259
585309
|
/^\^*(?:\\\*\\\*\\\/)+/,
|
|
585260
|
-
() => "
|
|
585310
|
+
() => "(?:^|\\/)",
|
|
585261
585311
|
"*"
|
|
585262
585312
|
],
|
|
585263
585313
|
[DIRECT, (source, pattern) => {
|
|
585264
|
-
if (!source || source[0] === "^") return source;
|
|
585314
|
+
if (!source || source[0] === "^" || source[0] === "(") return source;
|
|
585265
585315
|
return (!REGEX_INNER_SLASH.test(pattern) ? "(?:^|\\/)" : "^") + source;
|
|
585266
585316
|
}],
|
|
585267
585317
|
[
|
|
@@ -585270,10 +585320,8 @@ var require_ignore = /* @__PURE__ */ __commonJSMin$2(((exports, module) => {
|
|
|
585270
585320
|
"*"
|
|
585271
585321
|
],
|
|
585272
585322
|
[
|
|
585273
|
-
/(^|[^\\]
|
|
585274
|
-
(_, p1
|
|
585275
|
-
return p1 + p2.replace(/\\\*/g, "[^\\/]*");
|
|
585276
|
-
},
|
|
585323
|
+
/(^|[^\\])(?:\\\*)+(?!$)/g,
|
|
585324
|
+
(_, p1) => p1 + WILDCARD,
|
|
585277
585325
|
"*"
|
|
585278
585326
|
],
|
|
585279
585327
|
[
|
|
@@ -585310,8 +585358,7 @@ var require_ignore = /* @__PURE__ */ __commonJSMin$2(((exports, module) => {
|
|
|
585310
585358
|
return `${p1 ? `${p1}[^/]+` : "[^/]*"}(?=$|\\/$)`;
|
|
585311
585359
|
};
|
|
585312
585360
|
const REGEX_REPLACE_TRAILING_DOUBLESTAR = /\uE001$/;
|
|
585313
|
-
const replaceTrailingDoublestar = () => "
|
|
585314
|
-
const WILDCARD = "[^\\/]*";
|
|
585361
|
+
const replaceTrailingDoublestar = () => "[\\s\\S]";
|
|
585315
585362
|
const separatorAfter = (run, at) => {
|
|
585316
585363
|
let separator = EMPTY;
|
|
585317
585364
|
for (let index = at + 1; index < run.length && !run[index].wildcard; index++) separator += run[index].single;
|
|
@@ -585399,7 +585446,7 @@ var require_ignore = /* @__PURE__ */ __commonJSMin$2(((exports, module) => {
|
|
|
585399
585446
|
if (body[body.length - 1] === SLASH) prefix = makeRegexPrefix(body.slice(0, -1));
|
|
585400
585447
|
const head = prefix.slice(0, -1);
|
|
585401
585448
|
const last = prefix[prefix.length - 1];
|
|
585402
|
-
return last === TRAILING_WILDCARD ? `${head}$` : last === TRAILING_DOUBLESTAR ?
|
|
585449
|
+
return last === TRAILING_WILDCARD ? `${head}$` : last === TRAILING_DOUBLESTAR ? head : NEVER_MATCH;
|
|
585403
585450
|
};
|
|
585404
585451
|
const matchesBasename = (body) => {
|
|
585405
585452
|
const index = body.indexOf(SLASH);
|
|
@@ -585421,8 +585468,8 @@ var require_ignore = /* @__PURE__ */ __commonJSMin$2(((exports, module) => {
|
|
|
585421
585468
|
return cut < 0 ? EMPTY : path.slice(0, cut + 1);
|
|
585422
585469
|
};
|
|
585423
585470
|
const isString = (subject) => typeof subject === "string";
|
|
585424
|
-
const checkPattern = (pattern) => pattern && isString(pattern)
|
|
585425
|
-
const splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF).filter(Boolean);
|
|
585471
|
+
const checkPattern = (pattern) => pattern && isString(pattern);
|
|
585472
|
+
const splitPattern = (pattern) => (pattern[pattern.length - 1] === "\r" ? pattern.slice(0, -1) : pattern).split(REGEX_SPLITALL_CRLF).filter(Boolean);
|
|
585426
585473
|
var IgnoreRule = class {
|
|
585427
585474
|
constructor(pattern, mark, body, ignoreCase, negative, prefix) {
|
|
585428
585475
|
this.pattern = pattern;
|
|
@@ -585451,19 +585498,28 @@ var require_ignore = /* @__PURE__ */ __commonJSMin$2(((exports, module) => {
|
|
|
585451
585498
|
return define(this, key, regex);
|
|
585452
585499
|
}
|
|
585453
585500
|
};
|
|
585454
|
-
const
|
|
585455
|
-
|
|
585456
|
-
|
|
585457
|
-
|
|
585458
|
-
|
|
585459
|
-
|
|
585460
|
-
|
|
585501
|
+
const hasTrailingBackslash = (str) => {
|
|
585502
|
+
let count = 0;
|
|
585503
|
+
while (str[str.length - count - 1] === ESCAPE) count++;
|
|
585504
|
+
return count % 2 === 1;
|
|
585505
|
+
};
|
|
585506
|
+
const trimEnd = (body, stripLineEnd) => {
|
|
585507
|
+
let lineEnd = body.length;
|
|
585508
|
+
let end;
|
|
585509
|
+
for (;;) {
|
|
585510
|
+
if (stripLineEnd && body[lineEnd - 1] === "\r") lineEnd--;
|
|
585511
|
+
end = lineEnd;
|
|
585512
|
+
while (body[end - 1] === SPACE) end--;
|
|
585513
|
+
if (!stripLineEnd || body[end - 1] !== "\n") break;
|
|
585514
|
+
lineEnd = end - 1;
|
|
585515
|
+
}
|
|
585516
|
+
if (end === lineEnd) return body.slice(0, lineEnd);
|
|
585461
585517
|
let backslashes = 0;
|
|
585462
|
-
while (
|
|
585518
|
+
while (body[end - backslashes - 1] === ESCAPE) backslashes++;
|
|
585463
585519
|
return backslashes % 2 ? body.slice(0, end - 1) + SPACE : body.slice(0, end);
|
|
585464
585520
|
};
|
|
585465
|
-
const createRule = (
|
|
585466
|
-
let body = pattern[0] === BOM ? pattern.slice(1) : pattern;
|
|
585521
|
+
const createRule = (pattern, mark, ignoreCase, stripLineEnd, stripBOM) => {
|
|
585522
|
+
let body = stripBOM && pattern[0] === BOM ? pattern.slice(1) : pattern;
|
|
585467
585523
|
if (body[0] === "#") return;
|
|
585468
585524
|
let negative = false;
|
|
585469
585525
|
if (body[0] === "!") {
|
|
@@ -585471,8 +585527,8 @@ var require_ignore = /* @__PURE__ */ __commonJSMin$2(((exports, module) => {
|
|
|
585471
585527
|
body = body.slice(1);
|
|
585472
585528
|
}
|
|
585473
585529
|
const last = body[body.length - 1];
|
|
585474
|
-
if (last === SPACE || last === "\r" || last === "\n") body = trimEnd(body);
|
|
585475
|
-
if (!body) return;
|
|
585530
|
+
if (last === SPACE || stripLineEnd && (last === "\r" || last === "\n")) body = trimEnd(body, stripLineEnd);
|
|
585531
|
+
if (!body || hasTrailingBackslash(body)) return;
|
|
585476
585532
|
body = body.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#");
|
|
585477
585533
|
const regexPrefix = makeRegexPrefix(body);
|
|
585478
585534
|
return new IgnoreRule(pattern, mark, body, ignoreCase, negative, regexPrefix);
|
|
@@ -585483,15 +585539,16 @@ var require_ignore = /* @__PURE__ */ __commonJSMin$2(((exports, module) => {
|
|
|
585483
585539
|
this._rules = [];
|
|
585484
585540
|
this._basenameCount = 0;
|
|
585485
585541
|
}
|
|
585486
|
-
_add(pattern) {
|
|
585542
|
+
_add(pattern, index) {
|
|
585487
585543
|
if (pattern && pattern[KEY_IGNORE]) {
|
|
585488
585544
|
this._rules = this._rules.concat(pattern._rules._rules);
|
|
585489
585545
|
this._basenameCount += pattern._rules._basenameCount;
|
|
585490
585546
|
this._added = true;
|
|
585491
585547
|
return;
|
|
585492
585548
|
}
|
|
585493
|
-
|
|
585494
|
-
const
|
|
585549
|
+
const isStr = isString(pattern);
|
|
585550
|
+
const raw = isStr ? pattern : pattern.pattern;
|
|
585551
|
+
const rule = checkPattern(raw) && createRule(raw, isStr ? UNDEFINED : pattern.mark, this._ignoreCase, !this._split, this._stripBOM && !index);
|
|
585495
585552
|
if (rule) {
|
|
585496
585553
|
this._added = true;
|
|
585497
585554
|
this._rules.push(rule);
|
|
@@ -585500,7 +585557,9 @@ var require_ignore = /* @__PURE__ */ __commonJSMin$2(((exports, module) => {
|
|
|
585500
585557
|
}
|
|
585501
585558
|
add(pattern) {
|
|
585502
585559
|
this._added = false;
|
|
585503
|
-
|
|
585560
|
+
this._split = isString(pattern);
|
|
585561
|
+
this._stripBOM = !this._split || pattern[0] === BOM;
|
|
585562
|
+
makeArray(this._split ? splitPattern(pattern) : pattern).forEach(this._add, this);
|
|
585504
585563
|
if (this._added) this._literalRules = UNDEFINED;
|
|
585505
585564
|
return this._added;
|
|
585506
585565
|
}
|
|
@@ -585570,6 +585629,7 @@ var require_ignore = /* @__PURE__ */ __commonJSMin$2(((exports, module) => {
|
|
|
585570
585629
|
checkPath.isNotRelative = isNotRelative;
|
|
585571
585630
|
/* istanbul ignore next */
|
|
585572
585631
|
checkPath.convert = (p) => p;
|
|
585632
|
+
const convertPath = (target) => isString(target) && checkPath.convert(target);
|
|
585573
585633
|
var Ignore = class {
|
|
585574
585634
|
constructor({ ignorecase = true, ignoreCase = ignorecase, allowRelativePaths = false } = {}) {
|
|
585575
585635
|
define(this, KEY_IGNORE, true);
|
|
@@ -585588,13 +585648,16 @@ var require_ignore = /* @__PURE__ */ __commonJSMin$2(((exports, module) => {
|
|
|
585588
585648
|
addPattern(pattern) {
|
|
585589
585649
|
return this.add(pattern);
|
|
585590
585650
|
}
|
|
585591
|
-
_test(originalPath, cache) {
|
|
585592
|
-
const path = originalPath && checkPath.convert(originalPath);
|
|
585651
|
+
_test(originalPath, cache, path) {
|
|
585593
585652
|
checkPath(path, originalPath, this._strictPathCheck ? throwError : RETURN_FALSE);
|
|
585594
|
-
return this._t(path, cache)
|
|
585653
|
+
return path ? this._t(path, cache) : {
|
|
585654
|
+
ignored: false,
|
|
585655
|
+
unignored: false
|
|
585656
|
+
};
|
|
585595
585657
|
}
|
|
585596
|
-
checkIgnore(
|
|
585597
|
-
|
|
585658
|
+
checkIgnore(target) {
|
|
585659
|
+
const path = convertPath(target);
|
|
585660
|
+
if (!path || path.charCodeAt(path.length - 1) !== SLASH_CODE) return this._test(target, this._testCache, path);
|
|
585598
585661
|
const dir = this._t(path, this._testCache);
|
|
585599
585662
|
if (dir.ignored) return dir;
|
|
585600
585663
|
const literal = this._rules.testLiteral(path);
|
|
@@ -585607,7 +585670,7 @@ var require_ignore = /* @__PURE__ */ __commonJSMin$2(((exports, module) => {
|
|
|
585607
585670
|
return cache[path] = parent && parent.ignored ? parent : this._rules.test(path, MODE_IGNORE);
|
|
585608
585671
|
}
|
|
585609
585672
|
ignores(path) {
|
|
585610
|
-
return this._test(path, this._ignoreCache).ignored;
|
|
585673
|
+
return this._test(path, this._ignoreCache, convertPath(path)).ignored;
|
|
585611
585674
|
}
|
|
585612
585675
|
createFilter() {
|
|
585613
585676
|
return (path) => !this.ignores(path);
|
|
@@ -585616,11 +585679,11 @@ var require_ignore = /* @__PURE__ */ __commonJSMin$2(((exports, module) => {
|
|
|
585616
585679
|
return makeArray(paths).filter(this.createFilter());
|
|
585617
585680
|
}
|
|
585618
585681
|
test(path) {
|
|
585619
|
-
return this._test(path, this._testCache);
|
|
585682
|
+
return this._test(path, this._testCache, convertPath(path));
|
|
585620
585683
|
}
|
|
585621
585684
|
};
|
|
585622
585685
|
const factory = (options) => new Ignore(options);
|
|
585623
|
-
const isPathValid = (path) => checkPath(
|
|
585686
|
+
const isPathValid = (path) => checkPath(convertPath(path), path, RETURN_FALSE);
|
|
585624
585687
|
/* istanbul ignore next */
|
|
585625
585688
|
const setupWindows = () => {
|
|
585626
585689
|
const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
|
package/man/man1/lh.1
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.\" Code generated by `npm run man:generate`; DO NOT EDIT.
|
|
2
2
|
.\" Manual command details come from the Commander command tree.
|
|
3
|
-
.TH LH 1 "" "@lobehub/cli 0.0.
|
|
3
|
+
.TH LH 1 "" "@lobehub/cli 0.0.108" "User Commands"
|
|
4
4
|
.SH NAME
|
|
5
5
|
lh \- LobeHub CLI \- manage and connect to LobeHub services
|
|
6
6
|
.SH SYNOPSIS
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.108",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/lobehub/lobehub",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"access": "public",
|
|
84
84
|
"registry": "https://registry.npmjs.org"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "a8abb3afa41b778b7f1a9e8ec3428815b902457c"
|
|
87
87
|
}
|