@lobehub/cli 0.0.225 → 0.0.227
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 +1 -1
- package/dist/index.js +110 -101
- package/man/man1/lh.1 +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import { Buffer as Buffer$1 } from "node:buffer";
|
|
|
15
15
|
import * as net$1 from "node:net";
|
|
16
16
|
import net, { BlockList, connect, createServer, isIP } from "node:net";
|
|
17
17
|
import { scheduler, setImmediate as setImmediate$1, setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
18
|
-
import
|
|
18
|
+
import _w, { cwd, execArgv, execPath, hrtime, platform as platform$1 } from "node:process";
|
|
19
19
|
import { URL as URL$1, fileURLToPath, pathToFileURL } from "node:url";
|
|
20
20
|
import { finished, pipeline } from "node:stream/promises";
|
|
21
21
|
import { Duplex, PassThrough, Readable, Transform, Writable, getDefaultHighWaterMark, pipeline as pipeline$1 } from "node:stream";
|
|
@@ -21096,7 +21096,7 @@ const DEFAULT_AGENT_CONFIG = {
|
|
|
21096
21096
|
|
|
21097
21097
|
//#endregion
|
|
21098
21098
|
//#region ../../package.json
|
|
21099
|
-
var version$2 = "2.3.
|
|
21099
|
+
var version$2 = "2.3.6";
|
|
21100
21100
|
|
|
21101
21101
|
//#endregion
|
|
21102
21102
|
//#region ../../packages/const/src/version.ts
|
|
@@ -24457,7 +24457,7 @@ var require_command = /* @__PURE__ */ __commonJSMin$2(((exports) => {
|
|
|
24457
24457
|
const childProcess$2 = __require("node:child_process");
|
|
24458
24458
|
const path$16 = __require("node:path");
|
|
24459
24459
|
const fs$17 = __require("node:fs");
|
|
24460
|
-
const process$
|
|
24460
|
+
const process$2 = __require("node:process");
|
|
24461
24461
|
const { Argument, humanReadableArgName } = require_argument();
|
|
24462
24462
|
const { CommanderError } = require_error$1();
|
|
24463
24463
|
const { Help, stripColor } = require_help();
|
|
@@ -24509,13 +24509,13 @@ var require_command = /* @__PURE__ */ __commonJSMin$2(((exports) => {
|
|
|
24509
24509
|
this._showSuggestionAfterError = true;
|
|
24510
24510
|
this._savedState = null;
|
|
24511
24511
|
this._outputConfiguration = {
|
|
24512
|
-
writeOut: (str) => process$
|
|
24513
|
-
writeErr: (str) => process$
|
|
24512
|
+
writeOut: (str) => process$2.stdout.write(str),
|
|
24513
|
+
writeErr: (str) => process$2.stderr.write(str),
|
|
24514
24514
|
outputError: (str, write) => write(str),
|
|
24515
|
-
getOutHelpWidth: () => process$
|
|
24516
|
-
getErrHelpWidth: () => process$
|
|
24517
|
-
getOutHasColors: () => useColor() ?? (process$
|
|
24518
|
-
getErrHasColors: () => useColor() ?? (process$
|
|
24515
|
+
getOutHelpWidth: () => process$2.stdout.isTTY ? process$2.stdout.columns : void 0,
|
|
24516
|
+
getErrHelpWidth: () => process$2.stderr.isTTY ? process$2.stderr.columns : void 0,
|
|
24517
|
+
getOutHasColors: () => useColor() ?? (process$2.stdout.isTTY && process$2.stdout.hasColors?.()),
|
|
24518
|
+
getErrHasColors: () => useColor() ?? (process$2.stderr.isTTY && process$2.stderr.hasColors?.()),
|
|
24519
24519
|
stripColor: (str) => stripColor(str)
|
|
24520
24520
|
};
|
|
24521
24521
|
this._hidden = false;
|
|
@@ -24873,7 +24873,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
24873
24873
|
*/
|
|
24874
24874
|
_exit(exitCode, code, message) {
|
|
24875
24875
|
if (this._exitCallback) this._exitCallback(new CommanderError(exitCode, code, message));
|
|
24876
|
-
process$
|
|
24876
|
+
process$2.exit(exitCode);
|
|
24877
24877
|
}
|
|
24878
24878
|
/**
|
|
24879
24879
|
* Register callback `fn` for the command.
|
|
@@ -25212,11 +25212,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
25212
25212
|
if (argv !== void 0 && !Array.isArray(argv)) throw new Error("first parameter to parse must be array or undefined");
|
|
25213
25213
|
parseOptions = parseOptions || {};
|
|
25214
25214
|
if (argv === void 0 && parseOptions.from === void 0) {
|
|
25215
|
-
if (process$
|
|
25216
|
-
const execArgv = process$
|
|
25215
|
+
if (process$2.versions?.electron) parseOptions.from = "electron";
|
|
25216
|
+
const execArgv = process$2.execArgv ?? [];
|
|
25217
25217
|
if (execArgv.includes("-e") || execArgv.includes("--eval") || execArgv.includes("-p") || execArgv.includes("--print")) parseOptions.from = "eval";
|
|
25218
25218
|
}
|
|
25219
|
-
if (argv === void 0) argv = process$
|
|
25219
|
+
if (argv === void 0) argv = process$2.argv;
|
|
25220
25220
|
this.rawArgs = argv.slice();
|
|
25221
25221
|
let userArgs;
|
|
25222
25222
|
switch (parseOptions.from) {
|
|
@@ -25226,7 +25226,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
25226
25226
|
userArgs = argv.slice(2);
|
|
25227
25227
|
break;
|
|
25228
25228
|
case "electron":
|
|
25229
|
-
if (process$
|
|
25229
|
+
if (process$2.defaultApp) {
|
|
25230
25230
|
this._scriptPath = argv[1];
|
|
25231
25231
|
userArgs = argv.slice(2);
|
|
25232
25232
|
} else userArgs = argv.slice(1);
|
|
@@ -25391,16 +25391,16 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
25391
25391
|
}
|
|
25392
25392
|
launchWithNode = sourceExt.includes(path$16.extname(executableFile));
|
|
25393
25393
|
let proc;
|
|
25394
|
-
if (process$
|
|
25394
|
+
if (process$2.platform !== "win32") if (launchWithNode) {
|
|
25395
25395
|
args.unshift(executableFile);
|
|
25396
|
-
args = incrementNodeInspectorPort(process$
|
|
25397
|
-
proc = childProcess$2.spawn(process$
|
|
25396
|
+
args = incrementNodeInspectorPort(process$2.execArgv).concat(args);
|
|
25397
|
+
proc = childProcess$2.spawn(process$2.argv[0], args, { stdio: "inherit" });
|
|
25398
25398
|
} else proc = childProcess$2.spawn(executableFile, args, { stdio: "inherit" });
|
|
25399
25399
|
else {
|
|
25400
25400
|
this._checkForMissingExecutable(executableFile, executableDir, subcommand._name);
|
|
25401
25401
|
args.unshift(executableFile);
|
|
25402
|
-
args = incrementNodeInspectorPort(process$
|
|
25403
|
-
proc = childProcess$2.spawn(process$
|
|
25402
|
+
args = incrementNodeInspectorPort(process$2.execArgv).concat(args);
|
|
25403
|
+
proc = childProcess$2.spawn(process$2.execPath, args, { stdio: "inherit" });
|
|
25404
25404
|
}
|
|
25405
25405
|
if (!proc.killed) [
|
|
25406
25406
|
"SIGUSR1",
|
|
@@ -25409,20 +25409,20 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
25409
25409
|
"SIGINT",
|
|
25410
25410
|
"SIGHUP"
|
|
25411
25411
|
].forEach((signal) => {
|
|
25412
|
-
process$
|
|
25412
|
+
process$2.on(signal, () => {
|
|
25413
25413
|
if (proc.killed === false && proc.exitCode === null) proc.kill(signal);
|
|
25414
25414
|
});
|
|
25415
25415
|
});
|
|
25416
25416
|
const exitCallback = this._exitCallback;
|
|
25417
25417
|
proc.on("close", (code) => {
|
|
25418
25418
|
code = code ?? 1;
|
|
25419
|
-
if (!exitCallback) process$
|
|
25419
|
+
if (!exitCallback) process$2.exit(code);
|
|
25420
25420
|
else exitCallback(new CommanderError(code, "commander.executeSubCommandAsync", "(close)"));
|
|
25421
25421
|
});
|
|
25422
25422
|
proc.on("error", (err) => {
|
|
25423
25423
|
if (err.code === "ENOENT") this._checkForMissingExecutable(executableFile, executableDir, subcommand._name);
|
|
25424
25424
|
else if (err.code === "EACCES") throw new Error(`'${executableFile}' not executable`);
|
|
25425
|
-
if (!exitCallback) process$
|
|
25425
|
+
if (!exitCallback) process$2.exit(1);
|
|
25426
25426
|
else {
|
|
25427
25427
|
const wrappedError = new CommanderError(1, "commander.executeSubCommandAsync", "(error)");
|
|
25428
25428
|
wrappedError.nestedError = err;
|
|
@@ -25831,13 +25831,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
25831
25831
|
*/
|
|
25832
25832
|
_parseOptionsEnv() {
|
|
25833
25833
|
this.options.forEach((option) => {
|
|
25834
|
-
if (option.envVar && option.envVar in process$
|
|
25834
|
+
if (option.envVar && option.envVar in process$2.env) {
|
|
25835
25835
|
const optionKey = option.attributeName();
|
|
25836
25836
|
if (this.getOptionValue(optionKey) === void 0 || [
|
|
25837
25837
|
"default",
|
|
25838
25838
|
"config",
|
|
25839
25839
|
"env"
|
|
25840
|
-
].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$
|
|
25840
|
+
].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$2.env[option.envVar]);
|
|
25841
25841
|
else this.emit(`optionEnv:${option.name()}`);
|
|
25842
25842
|
}
|
|
25843
25843
|
});
|
|
@@ -26254,7 +26254,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
26254
26254
|
*/
|
|
26255
26255
|
help(contextOptions) {
|
|
26256
26256
|
this.outputHelp(contextOptions);
|
|
26257
|
-
let exitCode = Number(process$
|
|
26257
|
+
let exitCode = Number(process$2.exitCode ?? 0);
|
|
26258
26258
|
if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) exitCode = 1;
|
|
26259
26259
|
this._exit(exitCode, "commander.help", "(outputHelp)");
|
|
26260
26260
|
}
|
|
@@ -26344,8 +26344,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
26344
26344
|
* @package
|
|
26345
26345
|
*/
|
|
26346
26346
|
function useColor() {
|
|
26347
|
-
if (process$
|
|
26348
|
-
if (process$
|
|
26347
|
+
if (process$2.env.NO_COLOR || process$2.env.FORCE_COLOR === "0" || process$2.env.FORCE_COLOR === "false") return false;
|
|
26348
|
+
if (process$2.env.FORCE_COLOR || process$2.env.CLICOLOR_FORCE !== void 0) return true;
|
|
26349
26349
|
}
|
|
26350
26350
|
exports.Command = Command;
|
|
26351
26351
|
exports.useColor = useColor;
|
|
@@ -26684,7 +26684,7 @@ const GOMS_KLM_TIMING_SECONDS = {
|
|
|
26684
26684
|
};
|
|
26685
26685
|
|
|
26686
26686
|
//#endregion
|
|
26687
|
-
//#region node_modules/.pnpm/@trpc+server@11.29.
|
|
26687
|
+
//#region node_modules/.pnpm/@trpc+server@11.29.11_@types+ws@8.18.2_typescript@6.0.3/node_modules/@trpc/server/dist/observable-CodTG6Sf.mjs
|
|
26688
26688
|
/**
|
|
26689
26689
|
* Creates an observable. `subscribe` runs for each subscriber, and can
|
|
26690
26690
|
* return a function that cleans up when it unsubscribes.
|
|
@@ -26910,7 +26910,7 @@ function observableToAsyncIterable(observable, signal) {
|
|
|
26910
26910
|
}
|
|
26911
26911
|
|
|
26912
26912
|
//#endregion
|
|
26913
|
-
//#region node_modules/.pnpm/@trpc+server@11.29.
|
|
26913
|
+
//#region node_modules/.pnpm/@trpc+server@11.29.11_@types+ws@8.18.2_typescript@6.0.3/node_modules/@trpc/server/dist/observable-BjUZYMQq.mjs
|
|
26914
26914
|
/**
|
|
26915
26915
|
* Shares one subscription to the source between all subscribers. It
|
|
26916
26916
|
* starts with the first subscriber and ends when the last unsubscribes.
|
|
@@ -27036,7 +27036,7 @@ function behaviorSubject(initialValue) {
|
|
|
27036
27036
|
}
|
|
27037
27037
|
|
|
27038
27038
|
//#endregion
|
|
27039
|
-
//#region node_modules/.pnpm/@trpc+client@11.29.
|
|
27039
|
+
//#region node_modules/.pnpm/@trpc+client@11.29.11_@trpc+server@11.29.11_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/splitLink-PFsRy7Mf.mjs
|
|
27040
27040
|
/** @internal */
|
|
27041
27041
|
function createChain(opts) {
|
|
27042
27042
|
return observable((observer) => {
|
|
@@ -27055,7 +27055,7 @@ function createChain(opts) {
|
|
|
27055
27055
|
}
|
|
27056
27056
|
|
|
27057
27057
|
//#endregion
|
|
27058
|
-
//#region node_modules/.pnpm/@trpc+client@11.29.
|
|
27058
|
+
//#region node_modules/.pnpm/@trpc+client@11.29.11_@trpc+server@11.29.11_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/objectSpread2-pyA4QVO4.mjs
|
|
27059
27059
|
function _typeof$1(o) {
|
|
27060
27060
|
"@babel/helpers - typeof";
|
|
27061
27061
|
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -27109,7 +27109,7 @@ function _objectSpread2$1(e) {
|
|
|
27109
27109
|
}
|
|
27110
27110
|
|
|
27111
27111
|
//#endregion
|
|
27112
|
-
//#region node_modules/.pnpm/@trpc+server@11.29.
|
|
27112
|
+
//#region node_modules/.pnpm/@trpc+server@11.29.11_@types+ws@8.18.2_typescript@6.0.3/node_modules/@trpc/server/dist/codes-BCsCCyMj.mjs
|
|
27113
27113
|
/**
|
|
27114
27114
|
* Check that value is object
|
|
27115
27115
|
* @internal
|
|
@@ -27172,7 +27172,7 @@ const retryableRpcCodes = [
|
|
|
27172
27172
|
];
|
|
27173
27173
|
|
|
27174
27174
|
//#endregion
|
|
27175
|
-
//#region node_modules/.pnpm/@trpc+server@11.29.
|
|
27175
|
+
//#region node_modules/.pnpm/@trpc+server@11.29.11_@types+ws@8.18.2_typescript@6.0.3/node_modules/@trpc/server/dist/getErrorShape-CVrl8_-w.mjs
|
|
27176
27176
|
const noop$4 = () => {};
|
|
27177
27177
|
const freezeIfAvailable = (obj) => {
|
|
27178
27178
|
if (Object.freeze) Object.freeze(obj);
|
|
@@ -27277,7 +27277,7 @@ function _objectSpread2(e) {
|
|
|
27277
27277
|
}
|
|
27278
27278
|
|
|
27279
27279
|
//#endregion
|
|
27280
|
-
//#region node_modules/.pnpm/@trpc+server@11.29.
|
|
27280
|
+
//#region node_modules/.pnpm/@trpc+server@11.29.11_@types+ws@8.18.2_typescript@6.0.3/node_modules/@trpc/server/dist/asyncGeneratorDelegate-qZNHzmPI.mjs
|
|
27281
27281
|
/** @internal */
|
|
27282
27282
|
function transformResultInner(response, transformer) {
|
|
27283
27283
|
if ("error" in response) {
|
|
@@ -27383,7 +27383,7 @@ AsyncGenerator$1.prototype["function" == typeof Symbol && Symbol.asyncIterator |
|
|
|
27383
27383
|
};
|
|
27384
27384
|
|
|
27385
27385
|
//#endregion
|
|
27386
|
-
//#region node_modules/.pnpm/@trpc+client@11.29.
|
|
27386
|
+
//#region node_modules/.pnpm/@trpc+client@11.29.11_@trpc+server@11.29.11_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/TRPCClientError-DE6-fd1n.mjs
|
|
27387
27387
|
/**
|
|
27388
27388
|
* Whether a value is a `TRPCClientError`, typed for a router or procedure.
|
|
27389
27389
|
* @see https://trpc.io/docs/client/vanilla/error-handling#catching-a-thrown-error
|
|
@@ -27439,7 +27439,7 @@ var TRPCClientError = class TRPCClientError extends Error {
|
|
|
27439
27439
|
};
|
|
27440
27440
|
|
|
27441
27441
|
//#endregion
|
|
27442
|
-
//#region node_modules/.pnpm/@trpc+client@11.29.
|
|
27442
|
+
//#region node_modules/.pnpm/@trpc+client@11.29.11_@trpc+server@11.29.11_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/unstable-internals.mjs
|
|
27443
27443
|
/**
|
|
27444
27444
|
* @internal
|
|
27445
27445
|
*/
|
|
@@ -27466,7 +27466,7 @@ function getTransformer(transformer) {
|
|
|
27466
27466
|
}
|
|
27467
27467
|
|
|
27468
27468
|
//#endregion
|
|
27469
|
-
//#region node_modules/.pnpm/@trpc+client@11.29.
|
|
27469
|
+
//#region node_modules/.pnpm/@trpc+client@11.29.11_@trpc+server@11.29.11_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/httpUtils-CtMuyl9j.mjs
|
|
27470
27470
|
const isFunction$1 = (fn) => typeof fn === "function";
|
|
27471
27471
|
/**
|
|
27472
27472
|
* The `fetch` to use: `customFetchImpl` if given, or else the global one.
|
|
@@ -27602,7 +27602,7 @@ async function httpRequest(opts) {
|
|
|
27602
27602
|
}
|
|
27603
27603
|
|
|
27604
27604
|
//#endregion
|
|
27605
|
-
//#region node_modules/.pnpm/@trpc+client@11.29.
|
|
27605
|
+
//#region node_modules/.pnpm/@trpc+client@11.29.11_@trpc+server@11.29.11_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/httpLink-B4UwXApa.mjs
|
|
27606
27606
|
/** Whether an input is binary: a `Uint8Array`, `Blob` or `File`. */
|
|
27607
27607
|
function isOctetType(input) {
|
|
27608
27608
|
return input instanceof Uint8Array || input instanceof Blob;
|
|
@@ -27695,7 +27695,7 @@ function httpLink(opts) {
|
|
|
27695
27695
|
}
|
|
27696
27696
|
|
|
27697
27697
|
//#endregion
|
|
27698
|
-
//#region node_modules/.pnpm/@trpc+client@11.29.
|
|
27698
|
+
//#region node_modules/.pnpm/@trpc+client@11.29.11_@trpc+server@11.29.11_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/wsLink-DYx-NUSN.mjs
|
|
27699
27699
|
/**
|
|
27700
27700
|
* Get the result of a value or function that returns a value
|
|
27701
27701
|
* It also optionally accepts typesafe arguments for the function
|
|
@@ -27885,7 +27885,7 @@ var WsConnection = class WsConnection {
|
|
|
27885
27885
|
_defineProperty$1(WsConnection, "connectCount", 0);
|
|
27886
27886
|
|
|
27887
27887
|
//#endregion
|
|
27888
|
-
//#region node_modules/.pnpm/@trpc+client@11.29.
|
|
27888
|
+
//#region node_modules/.pnpm/@trpc+client@11.29.11_@trpc+server@11.29.11_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/index.mjs
|
|
27889
27889
|
const observerKeys = [
|
|
27890
27890
|
"onStarted",
|
|
27891
27891
|
"onData",
|
|
@@ -50256,6 +50256,7 @@ const CLI_USER_RATE_LIMIT_PATTERNS = [
|
|
|
50256
50256
|
/you'?ve hit your limit/i,
|
|
50257
50257
|
/you'?ve hit your \S+ limit/i,
|
|
50258
50258
|
...CLI_CREDIT_LIMIT_PATTERNS,
|
|
50259
|
+
/\bindividual quota reached\b/i,
|
|
50259
50260
|
/usage limit reached/i,
|
|
50260
50261
|
/\blimit reached\b/i,
|
|
50261
50262
|
/使用上限/
|
|
@@ -50317,23 +50318,35 @@ const classifyCliQuotaMessage = (message) => {
|
|
|
50317
50318
|
//#endregion
|
|
50318
50319
|
//#region ../../packages/heterogeneous-agents/src/errors/classifyCliMessageError.ts
|
|
50319
50320
|
init_config();
|
|
50321
|
+
/** agy reports its reset as a compact relative duration, for example 28m39s. */
|
|
50322
|
+
const antigravityQuotaResetAt = (message) => {
|
|
50323
|
+
const duration = /\bResets in\s+(?:(\d+)d\s*)?(?:(\d+)h\s*)?(?:(\d+)m\s*)?(?:(\d+)s)?(?=\.|$)/i.exec(message);
|
|
50324
|
+
if (!duration) return;
|
|
50325
|
+
const [, days = "0", hours = "0", minutes = "0", seconds = "0"] = duration;
|
|
50326
|
+
const reset = Number(days) * 86400 + Number(hours) * 3600 + Number(minutes) * 60 + Number(seconds);
|
|
50327
|
+
if (Number.isSafeInteger(reset) && reset > 0) return Math.floor(Date.now() / 1e3) + reset;
|
|
50328
|
+
};
|
|
50320
50329
|
/** Error text shared by stream adapters and process failure handling. */
|
|
50321
50330
|
const classifyCliMessageError = ({ agentType, command, detail: rawDetail }) => {
|
|
50322
50331
|
const detail = rawDetail?.trim();
|
|
50323
50332
|
if (!detail) return;
|
|
50324
50333
|
const quota = classifyCliQuotaMessage(detail);
|
|
50325
|
-
if (quota)
|
|
50326
|
-
agentType
|
|
50327
|
-
|
|
50328
|
-
|
|
50329
|
-
|
|
50330
|
-
|
|
50331
|
-
|
|
50332
|
-
|
|
50333
|
-
|
|
50334
|
-
|
|
50335
|
-
|
|
50336
|
-
|
|
50334
|
+
if (quota) {
|
|
50335
|
+
const resetsAt = agentType === "antigravity" ? antigravityQuotaResetAt(detail) : void 0;
|
|
50336
|
+
return {
|
|
50337
|
+
agentType,
|
|
50338
|
+
code: "rate_limit",
|
|
50339
|
+
details: { kind: quota.kind },
|
|
50340
|
+
error: detail,
|
|
50341
|
+
message: detail,
|
|
50342
|
+
...quota.rateLimitType || resetsAt ? { rateLimitInfo: {
|
|
50343
|
+
...quota.rateLimitType && { rateLimitType: quota.rateLimitType },
|
|
50344
|
+
...resetsAt && { resetsAt },
|
|
50345
|
+
status: "rejected"
|
|
50346
|
+
} } : {},
|
|
50347
|
+
stderr: detail
|
|
50348
|
+
};
|
|
50349
|
+
}
|
|
50337
50350
|
if (isHeterogeneousAgentAuthRequired(agentType, detail)) return buildHeterogeneousAgentAuthRequiredError({
|
|
50338
50351
|
agentType,
|
|
50339
50352
|
command,
|
|
@@ -50750,16 +50763,16 @@ var AntigravityAcpAdapter = class extends TraeAcpAdapter {
|
|
|
50750
50763
|
uuid: value.uuid
|
|
50751
50764
|
})];
|
|
50752
50765
|
}
|
|
50753
|
-
|
|
50754
|
-
if (value.type !== `${IDENTIFIER}_error`) return events;
|
|
50766
|
+
if (value.type !== `${IDENTIFIER}_error`) return super.adapt(value);
|
|
50755
50767
|
const classified = classifyCliMessageError({
|
|
50756
50768
|
agentType: IDENTIFIER,
|
|
50757
50769
|
detail: typeof value.message === "string" ? value.message : void 0
|
|
50758
50770
|
});
|
|
50759
|
-
|
|
50771
|
+
if (!classified) return super.adapt(value);
|
|
50772
|
+
return [...classified.code === "rate_limit" && this.stream.pendingStepBoundary ? this.stream.ensureStream(true) : [], ...super.adapt(value).map((event) => event.type === "error" ? {
|
|
50760
50773
|
...event,
|
|
50761
50774
|
data: classified
|
|
50762
|
-
} : event)
|
|
50775
|
+
} : event)];
|
|
50763
50776
|
}
|
|
50764
50777
|
toUsageData(usage) {
|
|
50765
50778
|
return toAntigravityUsage(usage);
|
|
@@ -56336,7 +56349,7 @@ const createAdapter = (agentType) => {
|
|
|
56336
56349
|
};
|
|
56337
56350
|
|
|
56338
56351
|
//#endregion
|
|
56339
|
-
//#region node_modules/.pnpm/@lobehub+icons@6.20.0_@lobehub+ui@6.19.
|
|
56352
|
+
//#region node_modules/.pnpm/@lobehub+icons@6.20.0_@lobehub+ui@6.19.2_lucide-react@1.78.0_@types+react@19.2.13_react_0b302560b79dc828ef2bbaba6d030453/node_modules/@lobehub/icons/es/features/getLobeIconCDN/index.mjs
|
|
56340
56353
|
const GITHUB_ICON_CDN = (type) => `https://raw.githubusercontent.com/lobehub/lobe-icons/refs/heads/master/packages/static-${type}`;
|
|
56341
56354
|
const ALIYUN_ICON_CDN = (type) => `https://registry.npmmirror.com/@lobehub/icons-static-${type}/latest/files`;
|
|
56342
56355
|
const UNPKG_ICON_CDN = (type) => `https://unpkg.com/@lobehub/icons-static-${type}@latest`;
|
|
@@ -76238,6 +76251,7 @@ const isPromptResponse = (message) => {
|
|
|
76238
76251
|
if (message.error) return message.requestMethod === "session/prompt";
|
|
76239
76252
|
return isRecord$8(message.result) && "stopReason" in message.result;
|
|
76240
76253
|
};
|
|
76254
|
+
const QUOTA_NOTICE = /^(?:⚠️?\s*)?Individual quota reached\.\s+Please upgrade your subscription to increase your limits\.(?:\s+Resets in (?:\d+[dhms]\s*)+\.?)?$/i;
|
|
76241
76255
|
/**
|
|
76242
76256
|
* Antigravity over `agy acp`. One run is one user turn; a message the user
|
|
76243
76257
|
* sends while it runs is steered in with another `session/prompt`: agy ends
|
|
@@ -76247,9 +76261,8 @@ const isPromptResponse = (message) => {
|
|
|
76247
76261
|
var AntigravityAcpSession = class extends AcpAgentSession {
|
|
76248
76262
|
/** Session updates before the prompt (a `session/load` replay) are history, not output. */
|
|
76249
76263
|
acceptUpdates = false;
|
|
76250
|
-
/** Read confirmations, chained so each lands before any update that follows it. */
|
|
76251
|
-
confirmations = Promise.resolve();
|
|
76252
76264
|
launch;
|
|
76265
|
+
writingAnswer = false;
|
|
76253
76266
|
/** Prompt responses handled so far, in stdout order. */
|
|
76254
76267
|
promptResponses = 0;
|
|
76255
76268
|
/** Steered prompts written to agy, in order, that the run has not settled yet. */
|
|
@@ -76281,24 +76294,22 @@ var AntigravityAcpSession = class extends AcpAgentSession {
|
|
|
76281
76294
|
}
|
|
76282
76295
|
/**
|
|
76283
76296
|
* Write a user message into the running turn. `false` when the run takes no
|
|
76284
|
-
* input now (not prompting yet, interrupted, or settling):
|
|
76285
|
-
* written, so the message can wait for the next run. agy confirms it read
|
|
76297
|
+
* input now (not prompting yet, writing an answer, interrupted, or settling):
|
|
76298
|
+
* nothing was written, so the message can wait for the next run. agy confirms it read
|
|
76286
76299
|
* the message when the prompt it interrupts returns, reported as
|
|
76287
76300
|
* `step_complete { phase: 'user_message', uuid }`.
|
|
76288
76301
|
*/
|
|
76289
76302
|
steer(prompt, uuid) {
|
|
76290
76303
|
const sessionId = this.acpSessionId;
|
|
76291
|
-
if (!this.steerable || !sessionId || this.closedByHost) return false;
|
|
76304
|
+
if (!this.steerable || !sessionId || this.closedByHost || this.writingAnswer || this.promptResponses > this.steerCount) return false;
|
|
76292
76305
|
const result = this.client.request("session/prompt", {
|
|
76293
76306
|
prompt,
|
|
76294
76307
|
sessionId
|
|
76295
76308
|
}, false);
|
|
76296
76309
|
result.catch(() => {});
|
|
76297
76310
|
this.steers.push(result);
|
|
76298
|
-
|
|
76299
|
-
|
|
76300
|
-
else this.unconfirmedSteers.push({
|
|
76301
|
-
index,
|
|
76311
|
+
this.unconfirmedSteers.push({
|
|
76312
|
+
index: ++this.steerCount,
|
|
76302
76313
|
uuid
|
|
76303
76314
|
});
|
|
76304
76315
|
return true;
|
|
@@ -76371,7 +76382,6 @@ var AntigravityAcpSession = class extends AcpAgentSession {
|
|
|
76371
76382
|
this.addUsage(last.usage);
|
|
76372
76383
|
}
|
|
76373
76384
|
this.steerable = false;
|
|
76374
|
-
await this.confirmations;
|
|
76375
76385
|
const used = Object.values(this.usage).some((value) => value > 0);
|
|
76376
76386
|
await this.pushToPipeline({
|
|
76377
76387
|
stopReason: last.stopReason,
|
|
@@ -76398,13 +76408,16 @@ var AntigravityAcpSession = class extends AcpAgentSession {
|
|
|
76398
76408
|
this.steerable = false;
|
|
76399
76409
|
}
|
|
76400
76410
|
async handleAgentMessage(message) {
|
|
76401
|
-
await this.confirmations;
|
|
76402
76411
|
if (isPromptResponse(message)) {
|
|
76403
76412
|
this.promptResponses += 1;
|
|
76413
|
+
this.writingAnswer = false;
|
|
76404
76414
|
const next = this.unconfirmedSteers[0];
|
|
76405
|
-
if (next && next.index <= this.promptResponses) {
|
|
76415
|
+
if (!message.error && next && next.index <= this.promptResponses) {
|
|
76406
76416
|
this.unconfirmedSteers.shift();
|
|
76407
|
-
await this.
|
|
76417
|
+
await this.pushToPipeline({
|
|
76418
|
+
type: "antigravity_user_message",
|
|
76419
|
+
uuid: next.uuid
|
|
76420
|
+
});
|
|
76408
76421
|
}
|
|
76409
76422
|
return;
|
|
76410
76423
|
}
|
|
@@ -76412,7 +76425,12 @@ var AntigravityAcpSession = class extends AcpAgentSession {
|
|
|
76412
76425
|
const params = isRecord$8(message.params) ? message.params : void 0;
|
|
76413
76426
|
if (!isRecord$8(params?.update)) return;
|
|
76414
76427
|
if (typeof params.sessionId === "string" && params.sessionId !== this.acpSessionId) return;
|
|
76415
|
-
const { name, sessionUpdate, status } = params.update;
|
|
76428
|
+
const { content, name, sessionUpdate, status } = params.update;
|
|
76429
|
+
if (sessionUpdate === "agent_message_chunk" && isRecord$8(content) && content.type === "text") {
|
|
76430
|
+
const text = typeof content.text === "string" ? content.text.trim() : "";
|
|
76431
|
+
if (QUOTA_NOTICE.test(text)) throw new Error(text);
|
|
76432
|
+
if (text) this.writingAnswer = true;
|
|
76433
|
+
} else if (sessionUpdate === "tool_call") this.writingAnswer = false;
|
|
76416
76434
|
if (this.options.askUserBridge && name === "ask_question" && (sessionUpdate === "tool_call" || sessionUpdate === "tool_call_update") && (status === "in_progress" || status === "pending" || status === void 0)) return;
|
|
76417
76435
|
await this.pushToPipeline(params.update);
|
|
76418
76436
|
}
|
|
@@ -76501,15 +76519,6 @@ var AntigravityAcpSession = class extends AcpAgentSession {
|
|
|
76501
76519
|
const variant = level ? `${family}-${level}` : void 0;
|
|
76502
76520
|
return variant && availableModelIds(sessionResult).has(variant) ? variant : family;
|
|
76503
76521
|
}
|
|
76504
|
-
confirmSteer(uuid) {
|
|
76505
|
-
const confirmed = this.confirmations.then(() => this.pushToPipeline({
|
|
76506
|
-
type: "antigravity_user_message",
|
|
76507
|
-
uuid
|
|
76508
|
-
}));
|
|
76509
|
-
confirmed.catch(() => {});
|
|
76510
|
-
this.confirmations = confirmed;
|
|
76511
|
-
return confirmed;
|
|
76512
|
-
}
|
|
76513
76522
|
addUsage(usage) {
|
|
76514
76523
|
if (!isRecord$8(usage)) return;
|
|
76515
76524
|
for (const field of USAGE_FIELDS) {
|
|
@@ -338794,7 +338803,7 @@ var stdio_exports = /* @__PURE__ */ __exportAll$2({
|
|
|
338794
338803
|
function getDefaultEnvironment() {
|
|
338795
338804
|
const env = {};
|
|
338796
338805
|
for (const key of DEFAULT_INHERITED_ENV_VARS) {
|
|
338797
|
-
const value =
|
|
338806
|
+
const value = _w.env[key];
|
|
338798
338807
|
if (value === void 0) continue;
|
|
338799
338808
|
if (value.startsWith("()")) continue;
|
|
338800
338809
|
env[key] = value;
|
|
@@ -338805,7 +338814,7 @@ var import_cross_spawn$1, DEFAULT_INHERITED_ENV_VARS, StdioClientTransport;
|
|
|
338805
338814
|
var init_stdio = __esmMin((() => {
|
|
338806
338815
|
init_src_CeKsbNLO();
|
|
338807
338816
|
import_cross_spawn$1 = /* @__PURE__ */ __toESM$2(require_cross_spawn(), 1);
|
|
338808
|
-
DEFAULT_INHERITED_ENV_VARS =
|
|
338817
|
+
DEFAULT_INHERITED_ENV_VARS = _w.platform === "win32" ? [
|
|
338809
338818
|
"APPDATA",
|
|
338810
338819
|
"COMSPEC",
|
|
338811
338820
|
"HOMEDRIVE",
|
|
@@ -338862,7 +338871,7 @@ var init_stdio = __esmMin((() => {
|
|
|
338862
338871
|
this._serverParams.stderr ?? "inherit"
|
|
338863
338872
|
],
|
|
338864
338873
|
shell: false,
|
|
338865
|
-
windowsHide:
|
|
338874
|
+
windowsHide: _w.platform === "win32",
|
|
338866
338875
|
cwd: this._serverParams.cwd
|
|
338867
338876
|
});
|
|
338868
338877
|
this._process.on("error", (error) => {
|
|
@@ -340913,9 +340922,9 @@ const getSubprocessResult = ({ stdout }) => {
|
|
|
340913
340922
|
//#region node_modules/.pnpm/execa@9.6.1/node_modules/execa/lib/utils/standard-stream.js
|
|
340914
340923
|
const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
|
|
340915
340924
|
const STANDARD_STREAMS = [
|
|
340916
|
-
|
|
340917
|
-
|
|
340918
|
-
|
|
340925
|
+
_w.stdin,
|
|
340926
|
+
_w.stdout,
|
|
340927
|
+
_w.stderr
|
|
340919
340928
|
];
|
|
340920
340929
|
const STANDARD_STREAMS_ALIASES = [
|
|
340921
340930
|
"stdin",
|
|
@@ -341040,9 +341049,9 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
|
341040
341049
|
//#endregion
|
|
341041
341050
|
//#region node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
|
|
341042
341051
|
function isUnicodeSupported() {
|
|
341043
|
-
const { env } =
|
|
341052
|
+
const { env } = _w;
|
|
341044
341053
|
const { TERM, TERM_PROGRAM } = env;
|
|
341045
|
-
if (
|
|
341054
|
+
if (_w.platform !== "win32") return TERM !== "linux";
|
|
341046
341055
|
return Boolean(env.WT_SESSION) || Boolean(env.TERMINUS_SUBLIME) || env.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
341047
341056
|
}
|
|
341048
341057
|
|
|
@@ -341577,7 +341586,7 @@ function traversePathUp(startPath) {
|
|
|
341577
341586
|
|
|
341578
341587
|
//#endregion
|
|
341579
341588
|
//#region node_modules/.pnpm/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
|
|
341580
|
-
const npmRunPath = ({ cwd =
|
|
341589
|
+
const npmRunPath = ({ cwd = _w.cwd(), path: pathOption = _w.env[pathKey()], preferLocal = true, execPath = _w.execPath, addExecPath = true } = {}) => {
|
|
341581
341590
|
const cwdPath = path.resolve(toPath(cwd));
|
|
341582
341591
|
const result = [];
|
|
341583
341592
|
const pathParts = pathOption.split(path.delimiter);
|
|
@@ -341595,7 +341604,7 @@ const applyExecPath = (result, pathParts, execPath, cwdPath) => {
|
|
|
341595
341604
|
const pathPart = path.resolve(cwdPath, toPath(execPath), "..");
|
|
341596
341605
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
341597
341606
|
};
|
|
341598
|
-
const npmRunPathEnv = ({ env =
|
|
341607
|
+
const npmRunPathEnv = ({ env = _w.env, ...options } = {}) => {
|
|
341599
341608
|
env = { ...env };
|
|
341600
341609
|
const pathName = pathKey({ env });
|
|
341601
341610
|
options.path = env[pathName];
|
|
@@ -342730,7 +342739,7 @@ const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
|
342730
342739
|
};
|
|
342731
342740
|
const getDefaultCwd = () => {
|
|
342732
342741
|
try {
|
|
342733
|
-
return
|
|
342742
|
+
return _w.cwd();
|
|
342734
342743
|
} catch (error) {
|
|
342735
342744
|
error.message = `The current directory does not exist.\n${error.message}`;
|
|
342736
342745
|
throw error;
|
|
@@ -342766,7 +342775,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
342766
342775
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
342767
342776
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
342768
342777
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
342769
|
-
if (
|
|
342778
|
+
if (_w.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
|
|
342770
342779
|
return {
|
|
342771
342780
|
file,
|
|
342772
342781
|
commandArguments,
|
|
@@ -342793,7 +342802,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
|
|
|
342793
342802
|
});
|
|
342794
342803
|
const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
|
|
342795
342804
|
const env = extendEnv ? {
|
|
342796
|
-
...
|
|
342805
|
+
..._w.env,
|
|
342797
342806
|
...envOption
|
|
342798
342807
|
} : envOption;
|
|
342799
342808
|
if (preferLocal || node) return npmRunPathEnv({
|
|
@@ -343795,12 +343804,12 @@ const guessStreamDirection = {
|
|
|
343795
343804
|
}
|
|
343796
343805
|
};
|
|
343797
343806
|
const getStandardStreamDirection = (value) => {
|
|
343798
|
-
if ([0,
|
|
343807
|
+
if ([0, _w.stdin].includes(value)) return "input";
|
|
343799
343808
|
if ([
|
|
343800
343809
|
1,
|
|
343801
343810
|
2,
|
|
343802
|
-
|
|
343803
|
-
|
|
343811
|
+
_w.stdout,
|
|
343812
|
+
_w.stderr
|
|
343804
343813
|
].includes(value)) return "output";
|
|
343805
343814
|
};
|
|
343806
343815
|
const DEFAULT_DIRECTION = "output";
|
|
@@ -344864,9 +344873,9 @@ const addIpcMethods = (subprocess, { ipc }) => {
|
|
|
344864
344873
|
Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
|
|
344865
344874
|
};
|
|
344866
344875
|
const getIpcExport = () => {
|
|
344867
|
-
const anyProcess =
|
|
344876
|
+
const anyProcess = _w;
|
|
344868
344877
|
const isSubprocess = true;
|
|
344869
|
-
const ipc =
|
|
344878
|
+
const ipc = _w.channel !== void 0;
|
|
344870
344879
|
return {
|
|
344871
344880
|
...getIpcMethods(anyProcess, isSubprocess, ipc),
|
|
344872
344881
|
getCancelSignal: getCancelSignal$1.bind(void 0, {
|
|
@@ -345343,7 +345352,7 @@ var SignalExitFallback = class extends SignalExitBase {
|
|
|
345343
345352
|
};
|
|
345344
345353
|
var SignalExit = class extends SignalExitBase {
|
|
345345
345354
|
/* c8 ignore start */
|
|
345346
|
-
#hupSig = process$
|
|
345355
|
+
#hupSig = process$1.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
345347
345356
|
/* c8 ignore stop */
|
|
345348
345357
|
#emitter = new Emitter();
|
|
345349
345358
|
#process;
|
|
@@ -345438,8 +345447,8 @@ var SignalExit = class extends SignalExitBase {
|
|
|
345438
345447
|
} else return og.call(this.#process, ev, ...args);
|
|
345439
345448
|
}
|
|
345440
345449
|
};
|
|
345441
|
-
const process$
|
|
345442
|
-
const { onExit, load: load$1, unload } = signalExitWrap(processOk(process$
|
|
345450
|
+
const process$1 = globalThis.process;
|
|
345451
|
+
const { onExit, load: load$1, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
|
|
345443
345452
|
|
|
345444
345453
|
//#endregion
|
|
345445
345454
|
//#region node_modules/.pnpm/execa@9.6.1/node_modules/execa/lib/terminate/cleanup.js
|
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.227" "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.227",
|
|
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": "76722f79a35454e8935fb10223dc03cb4c23dee3"
|
|
87
87
|
}
|