@lichao0223/lobehub-cli 0.0.80 → 0.0.81
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 +65 -26
- package/man/man1/lh.1 +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import crypto$1, { X509Certificate, createHash, randomBytes, randomUUID, sign } from "node:crypto";
|
|
4
4
|
import * as fs$5 from "node:fs";
|
|
5
|
-
import fs, { appendFileSync, closeSync, constants, createReadStream, createWriteStream, existsSync, lstatSync, mkdirSync, mkdtempSync, openSync, readFileSync, readSync, readdirSync, readlinkSync, realpathSync, rmSync, statSync, symlinkSync, unlink, writeFileSync } from "node:fs";
|
|
5
|
+
import fs, { appendFileSync, closeSync, constants, createReadStream, createWriteStream, existsSync, fstatSync, lstatSync, mkdirSync, mkdtempSync, openSync, readFileSync, readSync, readdirSync, readlinkSync, realpathSync, rmSync, statSync, symlinkSync, unlink, writeFileSync } from "node:fs";
|
|
6
6
|
import * as os$4 from "node:os";
|
|
7
7
|
import os, { EOL, constants as constants$1, homedir, platform, tmpdir } from "node:os";
|
|
8
8
|
import * as path$4 from "node:path";
|
|
@@ -24140,7 +24140,7 @@ const GOMS_KLM_TIMING_SECONDS = {
|
|
|
24140
24140
|
};
|
|
24141
24141
|
|
|
24142
24142
|
//#endregion
|
|
24143
|
-
//#region node_modules/.pnpm/@trpc+server@11.
|
|
24143
|
+
//#region node_modules/.pnpm/@trpc+server@11.29.2_@types+ws@8.18.2_typescript@6.0.3/node_modules/@trpc/server/dist/observable-CodTG6Sf.mjs
|
|
24144
24144
|
/**
|
|
24145
24145
|
* Creates an observable. `subscribe` runs for each subscriber, and can
|
|
24146
24146
|
* return a function that cleans up when it unsubscribes.
|
|
@@ -24366,7 +24366,7 @@ function observableToAsyncIterable(observable, signal) {
|
|
|
24366
24366
|
}
|
|
24367
24367
|
|
|
24368
24368
|
//#endregion
|
|
24369
|
-
//#region node_modules/.pnpm/@trpc+server@11.
|
|
24369
|
+
//#region node_modules/.pnpm/@trpc+server@11.29.2_@types+ws@8.18.2_typescript@6.0.3/node_modules/@trpc/server/dist/observable-BjUZYMQq.mjs
|
|
24370
24370
|
/**
|
|
24371
24371
|
* Shares one subscription to the source between all subscribers. It
|
|
24372
24372
|
* starts with the first subscriber and ends when the last unsubscribes.
|
|
@@ -24492,7 +24492,7 @@ function behaviorSubject(initialValue) {
|
|
|
24492
24492
|
}
|
|
24493
24493
|
|
|
24494
24494
|
//#endregion
|
|
24495
|
-
//#region node_modules/.pnpm/@trpc+client@11.
|
|
24495
|
+
//#region node_modules/.pnpm/@trpc+client@11.29.2_@trpc+server@11.29.2_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/splitLink-PFsRy7Mf.mjs
|
|
24496
24496
|
/** @internal */
|
|
24497
24497
|
function createChain(opts) {
|
|
24498
24498
|
return observable$1((observer) => {
|
|
@@ -24511,7 +24511,7 @@ function createChain(opts) {
|
|
|
24511
24511
|
}
|
|
24512
24512
|
|
|
24513
24513
|
//#endregion
|
|
24514
|
-
//#region node_modules/.pnpm/@trpc+client@11.
|
|
24514
|
+
//#region node_modules/.pnpm/@trpc+client@11.29.2_@trpc+server@11.29.2_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/objectSpread2-pyA4QVO4.mjs
|
|
24515
24515
|
function _typeof$1(o) {
|
|
24516
24516
|
"@babel/helpers - typeof";
|
|
24517
24517
|
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -24565,7 +24565,7 @@ function _objectSpread2$1(e) {
|
|
|
24565
24565
|
}
|
|
24566
24566
|
|
|
24567
24567
|
//#endregion
|
|
24568
|
-
//#region node_modules/.pnpm/@trpc+server@11.
|
|
24568
|
+
//#region node_modules/.pnpm/@trpc+server@11.29.2_@types+ws@8.18.2_typescript@6.0.3/node_modules/@trpc/server/dist/codes-BCsCCyMj.mjs
|
|
24569
24569
|
/**
|
|
24570
24570
|
* Check that value is object
|
|
24571
24571
|
* @internal
|
|
@@ -24628,7 +24628,7 @@ const retryableRpcCodes = [
|
|
|
24628
24628
|
];
|
|
24629
24629
|
|
|
24630
24630
|
//#endregion
|
|
24631
|
-
//#region node_modules/.pnpm/@trpc+server@11.
|
|
24631
|
+
//#region node_modules/.pnpm/@trpc+server@11.29.2_@types+ws@8.18.2_typescript@6.0.3/node_modules/@trpc/server/dist/getErrorShape-CVrl8_-w.mjs
|
|
24632
24632
|
const noop$4 = () => {};
|
|
24633
24633
|
const freezeIfAvailable = (obj) => {
|
|
24634
24634
|
if (Object.freeze) Object.freeze(obj);
|
|
@@ -24733,7 +24733,7 @@ function _objectSpread2(e) {
|
|
|
24733
24733
|
}
|
|
24734
24734
|
|
|
24735
24735
|
//#endregion
|
|
24736
|
-
//#region node_modules/.pnpm/@trpc+server@11.
|
|
24736
|
+
//#region node_modules/.pnpm/@trpc+server@11.29.2_@types+ws@8.18.2_typescript@6.0.3/node_modules/@trpc/server/dist/asyncGeneratorDelegate-Bmz6asKS.mjs
|
|
24737
24737
|
/** @internal */
|
|
24738
24738
|
function transformResultInner(response, transformer) {
|
|
24739
24739
|
if ("error" in response) {
|
|
@@ -24839,7 +24839,7 @@ AsyncGenerator$1.prototype["function" == typeof Symbol && Symbol.asyncIterator |
|
|
|
24839
24839
|
};
|
|
24840
24840
|
|
|
24841
24841
|
//#endregion
|
|
24842
|
-
//#region node_modules/.pnpm/@trpc+client@11.
|
|
24842
|
+
//#region node_modules/.pnpm/@trpc+client@11.29.2_@trpc+server@11.29.2_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/TRPCClientError-DE6-fd1n.mjs
|
|
24843
24843
|
/**
|
|
24844
24844
|
* Whether a value is a `TRPCClientError`, typed for a router or procedure.
|
|
24845
24845
|
* @see https://trpc.io/docs/client/vanilla/error-handling#catching-a-thrown-error
|
|
@@ -24895,7 +24895,7 @@ var TRPCClientError = class TRPCClientError extends Error {
|
|
|
24895
24895
|
};
|
|
24896
24896
|
|
|
24897
24897
|
//#endregion
|
|
24898
|
-
//#region node_modules/.pnpm/@trpc+client@11.
|
|
24898
|
+
//#region node_modules/.pnpm/@trpc+client@11.29.2_@trpc+server@11.29.2_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/unstable-internals.mjs
|
|
24899
24899
|
/**
|
|
24900
24900
|
* @internal
|
|
24901
24901
|
*/
|
|
@@ -24922,7 +24922,7 @@ function getTransformer(transformer) {
|
|
|
24922
24922
|
}
|
|
24923
24923
|
|
|
24924
24924
|
//#endregion
|
|
24925
|
-
//#region node_modules/.pnpm/@trpc+client@11.
|
|
24925
|
+
//#region node_modules/.pnpm/@trpc+client@11.29.2_@trpc+server@11.29.2_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/httpUtils-CtMuyl9j.mjs
|
|
24926
24926
|
const isFunction$1 = (fn) => typeof fn === "function";
|
|
24927
24927
|
/**
|
|
24928
24928
|
* The `fetch` to use: `customFetchImpl` if given, or else the global one.
|
|
@@ -25058,7 +25058,7 @@ async function httpRequest(opts) {
|
|
|
25058
25058
|
}
|
|
25059
25059
|
|
|
25060
25060
|
//#endregion
|
|
25061
|
-
//#region node_modules/.pnpm/@trpc+client@11.
|
|
25061
|
+
//#region node_modules/.pnpm/@trpc+client@11.29.2_@trpc+server@11.29.2_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/httpLink-B4UwXApa.mjs
|
|
25062
25062
|
/** Whether an input is binary: a `Uint8Array`, `Blob` or `File`. */
|
|
25063
25063
|
function isOctetType(input) {
|
|
25064
25064
|
return input instanceof Uint8Array || input instanceof Blob;
|
|
@@ -25151,7 +25151,7 @@ function httpLink(opts) {
|
|
|
25151
25151
|
}
|
|
25152
25152
|
|
|
25153
25153
|
//#endregion
|
|
25154
|
-
//#region node_modules/.pnpm/@trpc+client@11.
|
|
25154
|
+
//#region node_modules/.pnpm/@trpc+client@11.29.2_@trpc+server@11.29.2_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/wsLink-BiIe_j6D.mjs
|
|
25155
25155
|
/**
|
|
25156
25156
|
* Get the result of a value or function that returns a value
|
|
25157
25157
|
* It also optionally accepts typesafe arguments for the function
|
|
@@ -25341,7 +25341,7 @@ var WsConnection = class WsConnection {
|
|
|
25341
25341
|
_defineProperty$1(WsConnection, "connectCount", 0);
|
|
25342
25342
|
|
|
25343
25343
|
//#endregion
|
|
25344
|
-
//#region node_modules/.pnpm/@trpc+client@11.
|
|
25344
|
+
//#region node_modules/.pnpm/@trpc+client@11.29.2_@trpc+server@11.29.2_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/index.mjs
|
|
25345
25345
|
const observerKeys = [
|
|
25346
25346
|
"onStarted",
|
|
25347
25347
|
"onData",
|
|
@@ -26486,7 +26486,7 @@ const cliVersion = pkg.version;
|
|
|
26486
26486
|
const cliNodeEngine = pkg.engines?.node;
|
|
26487
26487
|
|
|
26488
26488
|
//#endregion
|
|
26489
|
-
//#region ../../node_modules/.pnpm/@trpc+server@11.
|
|
26489
|
+
//#region ../../node_modules/.pnpm/@trpc+server@11.29.1_@types+aws-lambda@8.10.164_@types+express@5.0.6_@types+ws@8.18.2_n_6bc90261635995e5d07c47f37b0d7078/node_modules/@trpc/server/dist/observable-CodTG6Sf.mjs
|
|
26490
26490
|
/**
|
|
26491
26491
|
* Creates an observable. `subscribe` runs for each subscriber, and can
|
|
26492
26492
|
* return a function that cleans up when it unsubscribes.
|
|
@@ -27100,7 +27100,16 @@ function printKanban(columns) {
|
|
|
27100
27100
|
}).join(" ");
|
|
27101
27101
|
console.log(bottomBorder);
|
|
27102
27102
|
}
|
|
27103
|
+
/**
|
|
27104
|
+
* Ask a `(y/N)` question on the terminal.
|
|
27105
|
+
*
|
|
27106
|
+
* Without a terminal there is nobody to answer: an agent's shell, a pipe or CI
|
|
27107
|
+
* either never closes stdin (the command hangs until it is killed) or closes it
|
|
27108
|
+
* empty (the action is silently cancelled). Fail loudly instead, so the caller
|
|
27109
|
+
* learns it has to pass `--yes`.
|
|
27110
|
+
*/
|
|
27103
27111
|
function confirm(message) {
|
|
27112
|
+
if (!process.stdin.isTTY) return Promise.reject(/* @__PURE__ */ new Error(`${message}\nRefusing to continue without an interactive terminal to confirm. Re-run with --yes to skip the prompt.`));
|
|
27104
27113
|
const rl = createInterface({
|
|
27105
27114
|
input: process.stdin,
|
|
27106
27115
|
output: process.stderr
|
|
@@ -49846,9 +49855,21 @@ function formatFsLongListing(nodes) {
|
|
|
49846
49855
|
async function readFsContentInput(options) {
|
|
49847
49856
|
if (options.contentFile) return readFileSync(options.contentFile, "utf8");
|
|
49848
49857
|
if (options.content !== void 0) return options.content;
|
|
49849
|
-
if (
|
|
49858
|
+
if (isStdinRedirected()) return text(process.stdin);
|
|
49850
49859
|
return "";
|
|
49851
49860
|
}
|
|
49861
|
+
/**
|
|
49862
|
+
* Whether stdin was piped (`echo x | lh …`) or redirected from a file (`< x`).
|
|
49863
|
+
* A terminal, a closed stdin or `/dev/null` (an agent shell) is not input.
|
|
49864
|
+
*/
|
|
49865
|
+
function isStdinRedirected() {
|
|
49866
|
+
try {
|
|
49867
|
+
const stat = fstatSync(0);
|
|
49868
|
+
return stat.isFIFO() || stat.isFile();
|
|
49869
|
+
} catch {
|
|
49870
|
+
return false;
|
|
49871
|
+
}
|
|
49872
|
+
}
|
|
49852
49873
|
async function resolveAgentFsContext(client, options) {
|
|
49853
49874
|
return {
|
|
49854
49875
|
agentId: await resolveAgentId$1(client, options),
|
|
@@ -74270,7 +74291,8 @@ const spawnCliAgent = async (options, command, cwd, inputPlan, childEnv, codexJw
|
|
|
74270
74291
|
if (!live.isOpen) return false;
|
|
74271
74292
|
const plan = await buildAgentInput("claude-code", prompt, options.inputOptions);
|
|
74272
74293
|
return live.send(plan.stdin, sendOptions?.uuid);
|
|
74273
|
-
}
|
|
74294
|
+
},
|
|
74295
|
+
supportsSteerImageAttachments: true
|
|
74274
74296
|
},
|
|
74275
74297
|
kill: (signal = "SIGINT") => {
|
|
74276
74298
|
killedByUs = true;
|
|
@@ -268578,8 +268600,13 @@ var require_tree_kill = /* @__PURE__ */ __commonJSMin$2(((exports, module) => {
|
|
|
268578
268600
|
var import_tree_kill = /* @__PURE__ */ __toESM$2(require_tree_kill());
|
|
268579
268601
|
const KILL_SIGNAL = "SIGKILL";
|
|
268580
268602
|
/**
|
|
268581
|
-
* Non-interactive backend: a plain `child_process` with stdin
|
|
268582
|
-
*
|
|
268603
|
+
* Non-interactive backend: a plain `child_process` with stdin bound to the
|
|
268604
|
+
* null device and stdout/stderr inherited straight into the output files.
|
|
268605
|
+
*
|
|
268606
|
+
* Nothing ever writes to a command's stdin here, so it must not be an open
|
|
268607
|
+
* pipe: a command that reads stdin (a `(y/N)` confirm, `read`, a CLI that falls
|
|
268608
|
+
* back to piped input) would wait on it until the shell timeout. With `ignore`
|
|
268609
|
+
* it reads EOF at once and fails or cancels instead of hanging.
|
|
268583
268610
|
*/
|
|
268584
268611
|
var ChildProcessBackend = class {
|
|
268585
268612
|
capabilities = {
|
|
@@ -268613,7 +268640,7 @@ var ChildProcessBackend = class {
|
|
|
268613
268640
|
env,
|
|
268614
268641
|
shell: false,
|
|
268615
268642
|
stdio: [
|
|
268616
|
-
"
|
|
268643
|
+
"ignore",
|
|
268617
268644
|
outputFiles.stdout.fd,
|
|
268618
268645
|
outputFiles.stderr.fd
|
|
268619
268646
|
],
|
|
@@ -579323,7 +579350,7 @@ var WebStandardStreamableHTTPServerTransport = class {
|
|
|
579323
579350
|
};
|
|
579324
579351
|
|
|
579325
579352
|
//#endregion
|
|
579326
|
-
//#region node_modules/.pnpm/@hono+node-server@2.1.
|
|
579353
|
+
//#region node_modules/.pnpm/@hono+node-server@2.1.9_hono@4.13.19/node_modules/@hono/node-server/dist/constants-BLSFu_RU.mjs
|
|
579327
579354
|
const X_ALREADY_SENT = "x-hono-already-sent";
|
|
579328
579355
|
|
|
579329
579356
|
//#endregion
|
|
@@ -579352,7 +579379,7 @@ const defineWebSocketHelper = (handler) => {
|
|
|
579352
579379
|
};
|
|
579353
579380
|
|
|
579354
579381
|
//#endregion
|
|
579355
|
-
//#region node_modules/.pnpm/@hono+node-server@2.1.
|
|
579382
|
+
//#region node_modules/.pnpm/@hono+node-server@2.1.9_hono@4.13.19/node_modules/@hono/node-server/dist/index.mjs
|
|
579356
579383
|
var RequestError = class extends Error {
|
|
579357
579384
|
constructor(message, options) {
|
|
579358
579385
|
super(message, options);
|
|
@@ -579539,7 +579566,11 @@ const toRequestError = (e) => {
|
|
|
579539
579566
|
return new RequestError(e.message, { cause: e });
|
|
579540
579567
|
};
|
|
579541
579568
|
const GlobalRequest = global.Request;
|
|
579542
|
-
var Request$1 = class extends GlobalRequest {
|
|
579569
|
+
var Request$1 = class Request$1 extends GlobalRequest {
|
|
579570
|
+
static [Symbol.hasInstance](instance) {
|
|
579571
|
+
if (this === Request$1) return instance instanceof GlobalRequest || Function.prototype[Symbol.hasInstance].call(this, instance);
|
|
579572
|
+
return Function.prototype[Symbol.hasInstance].call(this, instance);
|
|
579573
|
+
}
|
|
579543
579574
|
constructor(input, options) {
|
|
579544
579575
|
if (typeof input === "object" && getRequestCache in input) {
|
|
579545
579576
|
const hasReplacementBody = options !== void 0 && "body" in options && options.body != null;
|
|
@@ -579578,8 +579609,8 @@ const readBodyBufferedBeforeDisconnect = (incoming, chunks) => {
|
|
|
579578
579609
|
else if (incomingWithRecovery[bodyBufferedLengthBeforeDisconnectKey] !== void 0 && incoming.readableLength !== incomingWithRecovery[bodyBufferedLengthBeforeDisconnectKey]) result = newBodyUnusableError();
|
|
579579
579610
|
else {
|
|
579580
579611
|
const bodyChunks = chunks ?? [];
|
|
579581
|
-
|
|
579582
|
-
|
|
579612
|
+
let chunk;
|
|
579613
|
+
while ((chunk = incoming.read()) !== null) bodyChunks.push(toBufferChunk(chunk, incoming.readableEncoding));
|
|
579583
579614
|
const buffer = bodyChunks.length === 1 ? bodyChunks[0] : Buffer.concat(bodyChunks);
|
|
579584
579615
|
result = buffer;
|
|
579585
579616
|
const contentLength = incoming.headers["content-length"];
|
|
@@ -579916,6 +579947,9 @@ Object.defineProperty(requestPrototype, "blob", { value: function() {
|
|
|
579916
579947
|
return new Response(buf, type ? { headers: { "content-type": type } } : void 0).blob();
|
|
579917
579948
|
});
|
|
579918
579949
|
} });
|
|
579950
|
+
Object.defineProperty(requestPrototype, "bytes", { value: function() {
|
|
579951
|
+
return this.arrayBuffer().then((buf) => new Uint8Array(buf));
|
|
579952
|
+
} });
|
|
579919
579953
|
Object.defineProperty(requestPrototype, "json", { value: function() {
|
|
579920
579954
|
if (this[bodyConsumedDirectlyKey]) return rejectBodyUnusable();
|
|
579921
579955
|
return this.text().then(JSON.parse);
|
|
@@ -579970,6 +580004,10 @@ const GlobalResponse = global.Response;
|
|
|
579970
580004
|
var Response$1 = class Response$1 {
|
|
579971
580005
|
#body;
|
|
579972
580006
|
#init;
|
|
580007
|
+
static [Symbol.hasInstance](instance) {
|
|
580008
|
+
if (this === Response$1) return instance instanceof GlobalResponse || Function.prototype[Symbol.hasInstance].call(this, instance);
|
|
580009
|
+
return Function.prototype[Symbol.hasInstance].call(this, instance);
|
|
580010
|
+
}
|
|
579973
580011
|
[getResponseCache]() {
|
|
579974
580012
|
const cache = this[cacheKey];
|
|
579975
580013
|
const liveHeaders = cache && cache[2] instanceof Headers ? cache[2] : void 0;
|
|
@@ -579990,7 +580028,7 @@ var Response$1 = class Response$1 {
|
|
|
579990
580028
|
this[getResponseCache]();
|
|
579991
580029
|
return;
|
|
579992
580030
|
}
|
|
579993
|
-
this.#init = init
|
|
580031
|
+
this.#init = #init in init ? init.#init : init;
|
|
579994
580032
|
headers = new Headers(init.headers);
|
|
579995
580033
|
} else this.#init = init;
|
|
579996
580034
|
if (body == null || typeof body === "string" || typeof body?.getReader !== "undefined" || body instanceof Blob || body instanceof Uint8Array) this[cacheKey] = [
|
|
@@ -580031,6 +580069,7 @@ var Response$1 = class Response$1 {
|
|
|
580031
580069
|
[
|
|
580032
580070
|
"arrayBuffer",
|
|
580033
580071
|
"blob",
|
|
580072
|
+
"bytes",
|
|
580034
580073
|
"clone",
|
|
580035
580074
|
"formData",
|
|
580036
580075
|
"json",
|
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 "" "@lichao0223/lobehub\-cli 0.0.
|
|
3
|
+
.TH LH 1 "" "@lichao0223/lobehub\-cli 0.0.81" "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": "@lichao0223/lobehub-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.81",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/lichao0223/lobehub",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"access": "public",
|
|
84
84
|
"registry": "https://registry.npmjs.org"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "58ac3da2420df40998d5b1f3695887a3dce3aeea"
|
|
87
87
|
}
|