@lobehub/cli 0.0.81 → 0.0.82
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 +2 -2
- package/dist/index.js +44 -15
- package/man/man1/lh.1 +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -77745,6 +77745,7 @@ var CursorAcpSession = class extends AcpAgentSession {
|
|
|
77745
77745
|
//#endregion
|
|
77746
77746
|
//#region ../../packages/heterogeneous-agents/src/spawn/devinAcpSession.ts
|
|
77747
77747
|
const TRANSPORT$1 = "devin-acp";
|
|
77748
|
+
const DEVIN_FORCED_SESSION_MODE = "bypass";
|
|
77748
77749
|
const splitThinkingModel = (model) => {
|
|
77749
77750
|
const match = /^(?!fusion-)(.+)-(none|minimal|low|medium|high|xhigh|max)$/i.exec(model);
|
|
77750
77751
|
return match ? {
|
|
@@ -77753,6 +77754,7 @@ const splitThinkingModel = (model) => {
|
|
|
77753
77754
|
} : void 0;
|
|
77754
77755
|
};
|
|
77755
77756
|
const getThinkingConfig = (configOptions) => Array.isArray(configOptions) ? configOptions.filter(isRecord$7).find((option) => option.id === "thought_level") : void 0;
|
|
77757
|
+
const getModeConfigValue = (configOptions) => Array.isArray(configOptions) ? configOptions.filter(isRecord$7).find((option) => option.id === "mode")?.currentValue : void 0;
|
|
77756
77758
|
const buildDevinAcpArgs = (extraArgs = []) => {
|
|
77757
77759
|
const args = [...extraArgs];
|
|
77758
77760
|
let resolvedMode;
|
|
@@ -77780,11 +77782,10 @@ const buildDevinAcpArgs = (extraArgs = []) => {
|
|
|
77780
77782
|
const buildDevinAcpPrompt = (prompt, options = {}) => buildTraeAcpPrompt(prompt, options);
|
|
77781
77783
|
var DevinAcpSession = class extends AcpAgentSession {
|
|
77782
77784
|
acceptUpdates = false;
|
|
77783
|
-
|
|
77785
|
+
modeReasserted = false;
|
|
77784
77786
|
constructor(options) {
|
|
77785
|
-
const devinArgs = buildDevinAcpArgs(options.args);
|
|
77786
77787
|
super(options, {
|
|
77787
|
-
args:
|
|
77788
|
+
args: buildDevinAcpArgs(options.args),
|
|
77788
77789
|
pipeline: {
|
|
77789
77790
|
agentType: "devin",
|
|
77790
77791
|
cwd: options.cwd
|
|
@@ -77792,7 +77793,6 @@ var DevinAcpSession = class extends AcpAgentSession {
|
|
|
77792
77793
|
processLabel: "Devin ACP",
|
|
77793
77794
|
transport: TRANSPORT$1
|
|
77794
77795
|
});
|
|
77795
|
-
this.resolvedPermissionMode = devinArgs[0] === "--permission-mode" ? devinArgs[1] : options.permissionMode ?? void 0;
|
|
77796
77796
|
}
|
|
77797
77797
|
get sessionId() {
|
|
77798
77798
|
return this.acpSessionId;
|
|
@@ -77828,11 +77828,7 @@ var DevinAcpSession = class extends AcpAgentSession {
|
|
|
77828
77828
|
const sessionId = sessionResult.sessionId ?? this.options.resumeSessionId;
|
|
77829
77829
|
if (!sessionId) throw new Error("Devin ACP returned no session id");
|
|
77830
77830
|
const model = await this.applyInitialModel(sessionId, sessionResult);
|
|
77831
|
-
|
|
77832
|
-
configId: "mode",
|
|
77833
|
-
sessionId,
|
|
77834
|
-
value: this.resolvedPermissionMode
|
|
77835
|
-
});
|
|
77831
|
+
await this.applyForcedSessionMode(sessionId);
|
|
77836
77832
|
if (model) {
|
|
77837
77833
|
this.pipeline.configureSession({ model });
|
|
77838
77834
|
this.options.onModel?.(model);
|
|
@@ -77888,9 +77884,45 @@ var DevinAcpSession = class extends AcpAgentSession {
|
|
|
77888
77884
|
this.pipeline.configureSession({ model });
|
|
77889
77885
|
this.options.onModel?.(model);
|
|
77890
77886
|
}
|
|
77887
|
+
this.reassertForcedSessionMode(update.configOptions);
|
|
77891
77888
|
}
|
|
77892
77889
|
await this.pushToPipeline(update);
|
|
77893
77890
|
}
|
|
77891
|
+
/**
|
|
77892
|
+
* `--permission-mode` has no effect on Devin ACP sessions (they always start
|
|
77893
|
+
* in `accept-edits`), so the mode is forced through `session/set_config_option`.
|
|
77894
|
+
* A failure only degrades to Devin's default mode; it must never prevent the
|
|
77895
|
+
* session from starting.
|
|
77896
|
+
*/
|
|
77897
|
+
async applyForcedSessionMode(sessionId) {
|
|
77898
|
+
try {
|
|
77899
|
+
await this.client.request("session/set_config_option", {
|
|
77900
|
+
configId: "mode",
|
|
77901
|
+
sessionId,
|
|
77902
|
+
value: DEVIN_FORCED_SESSION_MODE
|
|
77903
|
+
});
|
|
77904
|
+
} catch (error) {
|
|
77905
|
+
console.warn(`[DevinAcpSession] Failed to set session mode "${DEVIN_FORCED_SESSION_MODE}"; continuing with Devin's default mode:`, {
|
|
77906
|
+
error,
|
|
77907
|
+
operationId: this.options.operationId,
|
|
77908
|
+
sessionId
|
|
77909
|
+
});
|
|
77910
|
+
}
|
|
77911
|
+
}
|
|
77912
|
+
/**
|
|
77913
|
+
* Devin pushes `config_option_update` whenever a config changes. If the mode
|
|
77914
|
+
* drifted away from the forced value, set it back — once per session, so a
|
|
77915
|
+
* peer that rejects the value but keeps echoing updates cannot cause a
|
|
77916
|
+
* set → update → set loop.
|
|
77917
|
+
*/
|
|
77918
|
+
reassertForcedSessionMode(configOptions) {
|
|
77919
|
+
const mode = getModeConfigValue(configOptions);
|
|
77920
|
+
if (mode === void 0 || mode === DEVIN_FORCED_SESSION_MODE || this.modeReasserted) return;
|
|
77921
|
+
const sessionId = this.acpSessionId;
|
|
77922
|
+
if (!sessionId) return;
|
|
77923
|
+
this.modeReasserted = true;
|
|
77924
|
+
this.applyForcedSessionMode(sessionId);
|
|
77925
|
+
}
|
|
77894
77926
|
async handleServerRequest(message) {
|
|
77895
77927
|
if (message.method !== "session/request_permission") throw new AcpServerRequestError(-32601, `Unsupported ACP client request: ${message.method}`);
|
|
77896
77928
|
const request = this.parsePermissionRequest(message.params);
|
|
@@ -79865,7 +79897,6 @@ const spawnDevinAcpAgent = async (options, command, cwd) => {
|
|
|
79865
79897
|
},
|
|
79866
79898
|
initialModel: options.initialModel,
|
|
79867
79899
|
onEvents: bridge.onEvents,
|
|
79868
|
-
permissionMode: options.permissionMode,
|
|
79869
79900
|
onRawMessage: teeAcpRawStdout(options.onRawStdout),
|
|
79870
79901
|
onRuntimeStatus: () => {},
|
|
79871
79902
|
onSessionId: () => {},
|
|
@@ -578416,7 +578447,6 @@ const exec = async (options) => {
|
|
|
578416
578447
|
pathEnv: resolvedCommand.pathEnv,
|
|
578417
578448
|
topicId: options.topic
|
|
578418
578449
|
});
|
|
578419
|
-
const permissionMode = options.type === "devin" ? "bypass" : void 0;
|
|
578420
578450
|
const spawnOptions = {
|
|
578421
578451
|
agentType: options.type,
|
|
578422
578452
|
askUserBridge: askBridge,
|
|
@@ -578430,7 +578460,6 @@ const exec = async (options) => {
|
|
|
578430
578460
|
initialModel: usesHeterogeneousSessionInitialModel(options.type) ? options.model : void 0,
|
|
578431
578461
|
liveInput: options.type === "claude-code",
|
|
578432
578462
|
operationId,
|
|
578433
|
-
permissionMode,
|
|
578434
578463
|
uploadImage
|
|
578435
578464
|
};
|
|
578436
578465
|
const first = await runOneAgent({
|
|
@@ -583247,7 +583276,7 @@ const followTaskRun = async (client, operationId, options) => {
|
|
|
583247
583276
|
}
|
|
583248
583277
|
};
|
|
583249
583278
|
function registerLifecycleCommands(task) {
|
|
583250
|
-
task.command("start <id>").description("Start a task (
|
|
583279
|
+
task.command("start <id>").description("Start a task (backlog → running)").option("--no-run", "Only update status, do not trigger agent execution").option("-p, --prompt <text>", "Additional context for the agent").option("-f, --follow", "Follow agent output in real-time (default: run in background)").option("--json", "Output full JSON event stream").option("-v, --verbose", "Show detailed tool call info").action(async (id, options) => {
|
|
583251
583280
|
const client = await getTrpcClient();
|
|
583252
583281
|
const taskDetail = await client.task.find.query({ id });
|
|
583253
583282
|
if (taskDetail.data.status === "running") {
|
|
@@ -583783,7 +583812,7 @@ function registerTopicCommands(task) {
|
|
|
583783
583812
|
init_src$1();
|
|
583784
583813
|
function registerTaskCommand(program) {
|
|
583785
583814
|
const task = program.command("task").description("Manage agent tasks");
|
|
583786
|
-
task.command("list").description("List tasks").option("--status <status>", "Filter by status (
|
|
583815
|
+
task.command("list").description("List tasks").option("--status <status>", "Filter by status (backlog/running/scheduled/paused/completed/failed/canceled)").option("--root", "Only show root tasks (no parent)").option("--parent <id>", "Filter by parent task ID").option("--agent <id>", "Filter by assignee agent ID").option("--label <name>", "Only tasks with this label (repeatable or comma-separated; a group name matches any of its labels)", collectLabels).option("--unlabeled", "Only tasks without labels").option("--archived", "Include archived tasks").option("-L, --limit <n>", "Page size", "50").option("--offset <n>", "Offset", "0").option("--tree", "Display as tree structure").option("--board", "Display as kanban board grouped by status").option("--json [fields]", "Output JSON").action(async (options) => {
|
|
583787
583816
|
const client = await getTrpcClient();
|
|
583788
583817
|
const input = {};
|
|
583789
583818
|
if (options.status) input.statuses = [options.status];
|
|
@@ -584274,7 +584303,7 @@ function registerTaskCommand(program) {
|
|
|
584274
584303
|
if (!t) return;
|
|
584275
584304
|
const prefix = indent === 0 ? "" : " ".repeat(indent) + "├── ";
|
|
584276
584305
|
const name = t.name || t.identifier || "";
|
|
584277
|
-
const status = t.status || "
|
|
584306
|
+
const status = t.status || "backlog";
|
|
584278
584307
|
const identifier = t.identifier || t.id;
|
|
584279
584308
|
console.log(`${prefix}${import_picocolors.default.dim(identifier)} ${statusBadge(status)} ${name}`);
|
|
584280
584309
|
for (const child of result.data) if ((child.parentTaskId || child.parent_task_id) === taskId) printNode(child.id, indent + 1);
|
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.82" "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.82",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/lobehub/lobehub",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"access": "public",
|
|
83
83
|
"registry": "https://registry.npmjs.org"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "1c4ee6ba2fc1292e44be2fc3a9ab7e278042039f"
|
|
86
86
|
}
|