@lobehub/cli 0.0.89 → 0.0.91
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 +43 -2
- package/man/man1/lh.1 +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -266353,6 +266353,8 @@ const assertEntriesWithinWorkspace = async (workspaceRoot, targets) => {
|
|
|
266353
266353
|
/** Why a client without the app-update handlers rejects those RPCs. */
|
|
266354
266354
|
const APP_UPDATE_UNSUPPORTED_MESSAGE = "This device client does not support remote updates";
|
|
266355
266355
|
const CLI_UPDATE_UNSUPPORTED_MESSAGE = "This device client does not support remote CLI updates";
|
|
266356
|
+
/** Why a client that runs no MCP servers rejects `listMcpTools`. */
|
|
266357
|
+
const MCP_UNSUPPORTED_MESSAGE = "This device client does not support MCP servers";
|
|
266356
266358
|
/** Why a client without a recoverable trash (the CLI daemon) rejects `trashLocalFiles`. */
|
|
266357
266359
|
const TRASH_UNSUPPORTED_MESSAGE = "This device does not support moving files to the trash";
|
|
266358
266360
|
/**
|
|
@@ -266401,6 +266403,9 @@ const executeDeviceRpc = async (method, params, deps) => {
|
|
|
266401
266403
|
case "listHeterogeneousAgentModels":
|
|
266402
266404
|
if (!deps.listHeterogeneousAgentModels) throw new Error("This device client does not support heterogeneous agent model discovery");
|
|
266403
266405
|
return deps.listHeterogeneousAgentModels(params);
|
|
266406
|
+
case "listMcpTools":
|
|
266407
|
+
if (!deps.listMcpTools) throw new Error(MCP_UNSUPPORTED_MESSAGE);
|
|
266408
|
+
return deps.listMcpTools(params);
|
|
266404
266409
|
case "getClaudeCodeQuota": return getClaudeCodeQuota(params);
|
|
266405
266410
|
case "getAntigravityQuota": return getAntigravityQuota(params);
|
|
266406
266411
|
case "getCodexQuota": return getCodexQuota(params);
|
|
@@ -331869,6 +331874,15 @@ async function executeDeviceMcpCall(call, getToolAuth) {
|
|
|
331869
331874
|
}
|
|
331870
331875
|
}
|
|
331871
331876
|
/**
|
|
331877
|
+
* List an MCP server's tools on this machine (the `listMcpTools` device RPC),
|
|
331878
|
+
* for a server the cloud must not connect to itself: an install, a tool
|
|
331879
|
+
* refresh or a connection test. Listed on the runtime the tunneled calls run
|
|
331880
|
+
* on, so a stdio server is listed on the session its calls then reuse.
|
|
331881
|
+
*/
|
|
331882
|
+
async function listDeviceMcpTools({ mcpApps, params }) {
|
|
331883
|
+
return (await getRuntime()).listTools(await toClientParams(params), { mcpApps });
|
|
331884
|
+
}
|
|
331885
|
+
/**
|
|
331872
331886
|
* Disconnect every pooled MCP session so no stdio server outlives the process.
|
|
331873
331887
|
* Every disconnect starts synchronously, so an exit path that cannot await
|
|
331874
331888
|
* (connect's `cleanup()` right before `process.exit`) still closes each
|
|
@@ -554045,6 +554059,7 @@ async function runConnect(options, isDaemonChild) {
|
|
|
554045
554059
|
...params.env
|
|
554046
554060
|
}
|
|
554047
554061
|
}),
|
|
554062
|
+
listMcpTools: listDeviceMcpTools,
|
|
554048
554063
|
restartCli: maintenance.restart,
|
|
554049
554064
|
searchProjectFiles: defaultSearchProjectFiles
|
|
554050
554065
|
};
|
|
@@ -579939,6 +579954,22 @@ var CoalescingBatchIngester = class {
|
|
|
579939
579954
|
|
|
579940
579955
|
//#endregion
|
|
579941
579956
|
//#region src/utils/heteroSteer.ts
|
|
579957
|
+
/** The prompt a follow-up is typed in as: its text, then its images as image blocks. */
|
|
579958
|
+
const buildSteerPrompt = (message) => {
|
|
579959
|
+
const images = message.imageList ?? [];
|
|
579960
|
+
if (images.length === 0) return message.content;
|
|
579961
|
+
return [{
|
|
579962
|
+
text: message.content,
|
|
579963
|
+
type: "text"
|
|
579964
|
+
}, ...images.map(({ id, url }) => ({
|
|
579965
|
+
source: {
|
|
579966
|
+
id,
|
|
579967
|
+
type: "url",
|
|
579968
|
+
url
|
|
579969
|
+
},
|
|
579970
|
+
type: "image"
|
|
579971
|
+
}))];
|
|
579972
|
+
};
|
|
579942
579973
|
const RETRY_MS = 2e3;
|
|
579943
579974
|
/** The server predates steer delivery, or refuses it for this run: stop asking. */
|
|
579944
579975
|
const isPermanentRefusal = (error) => {
|
|
@@ -579978,7 +580009,11 @@ async function* withHeteroSteer(handle, context) {
|
|
|
579978
580009
|
while (!abort.signal.aborted) {
|
|
579979
580010
|
let message;
|
|
579980
580011
|
try {
|
|
579981
|
-
const res = await client.aiAgent.waitHeteroSteer.mutate(supported ? {
|
|
580012
|
+
const res = await client.aiAgent.waitHeteroSteer.mutate(supported ? {
|
|
580013
|
+
acceptsImages: true,
|
|
580014
|
+
operationId
|
|
580015
|
+
} : {
|
|
580016
|
+
acceptsImages: true,
|
|
579982
580017
|
blockMs: 1,
|
|
579983
580018
|
operationId
|
|
579984
580019
|
}, { signal: abort.signal });
|
|
@@ -579995,7 +580030,13 @@ async function* withHeteroSteer(handle, context) {
|
|
|
579995
580030
|
continue;
|
|
579996
580031
|
}
|
|
579997
580032
|
if (!message) continue;
|
|
579998
|
-
|
|
580033
|
+
const steer = message;
|
|
580034
|
+
const options = { uuid: steer.messageId };
|
|
580035
|
+
if (await send(buildSteerPrompt(steer), options).catch(async (error) => {
|
|
580036
|
+
if (!steer.imageList?.length) return false;
|
|
580037
|
+
log$13.debug("Steer images failed, sending the text: %s", String(error));
|
|
580038
|
+
return send(steer.content, options).catch(() => false);
|
|
580039
|
+
})) {
|
|
579999
580040
|
delivered.add(message.messageId);
|
|
580000
580041
|
continue;
|
|
580001
580042
|
}
|
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.91" "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.91",
|
|
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": "a8b501bf87ba0e48281e36c23bf8b247eecef5fe"
|
|
87
87
|
}
|