@lobehub/cli 0.0.81 → 0.0.83

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/index.js CHANGED
@@ -17720,6 +17720,7 @@ const TRPC_NAMESPACE_API_KEY_RULES = {
17720
17720
  generationBatch: { any: "model:invoke" },
17721
17721
  generationTopic: { any: "model:invoke" },
17722
17722
  goal: rw("agent:read", "agent:write"),
17723
+ goalShare: "blocked",
17723
17724
  group: rw("agent:read", "agent:write"),
17724
17725
  healthcheck: "open",
17725
17726
  home: rw("chat:read", "chat:write"),
@@ -77745,6 +77746,7 @@ var CursorAcpSession = class extends AcpAgentSession {
77745
77746
  //#endregion
77746
77747
  //#region ../../packages/heterogeneous-agents/src/spawn/devinAcpSession.ts
77747
77748
  const TRANSPORT$1 = "devin-acp";
77749
+ const DEVIN_FORCED_SESSION_MODE = "bypass";
77748
77750
  const splitThinkingModel = (model) => {
77749
77751
  const match = /^(?!fusion-)(.+)-(none|minimal|low|medium|high|xhigh|max)$/i.exec(model);
77750
77752
  return match ? {
@@ -77753,6 +77755,7 @@ const splitThinkingModel = (model) => {
77753
77755
  } : void 0;
77754
77756
  };
77755
77757
  const getThinkingConfig = (configOptions) => Array.isArray(configOptions) ? configOptions.filter(isRecord$7).find((option) => option.id === "thought_level") : void 0;
77758
+ const getModeConfigValue = (configOptions) => Array.isArray(configOptions) ? configOptions.filter(isRecord$7).find((option) => option.id === "mode")?.currentValue : void 0;
77756
77759
  const buildDevinAcpArgs = (extraArgs = []) => {
77757
77760
  const args = [...extraArgs];
77758
77761
  let resolvedMode;
@@ -77780,11 +77783,10 @@ const buildDevinAcpArgs = (extraArgs = []) => {
77780
77783
  const buildDevinAcpPrompt = (prompt, options = {}) => buildTraeAcpPrompt(prompt, options);
77781
77784
  var DevinAcpSession = class extends AcpAgentSession {
77782
77785
  acceptUpdates = false;
77783
- resolvedPermissionMode;
77786
+ modeReasserted = false;
77784
77787
  constructor(options) {
77785
- const devinArgs = buildDevinAcpArgs(options.args);
77786
77788
  super(options, {
77787
- args: devinArgs,
77789
+ args: buildDevinAcpArgs(options.args),
77788
77790
  pipeline: {
77789
77791
  agentType: "devin",
77790
77792
  cwd: options.cwd
@@ -77792,7 +77794,6 @@ var DevinAcpSession = class extends AcpAgentSession {
77792
77794
  processLabel: "Devin ACP",
77793
77795
  transport: TRANSPORT$1
77794
77796
  });
77795
- this.resolvedPermissionMode = devinArgs[0] === "--permission-mode" ? devinArgs[1] : options.permissionMode ?? void 0;
77796
77797
  }
77797
77798
  get sessionId() {
77798
77799
  return this.acpSessionId;
@@ -77828,11 +77829,7 @@ var DevinAcpSession = class extends AcpAgentSession {
77828
77829
  const sessionId = sessionResult.sessionId ?? this.options.resumeSessionId;
77829
77830
  if (!sessionId) throw new Error("Devin ACP returned no session id");
77830
77831
  const model = await this.applyInitialModel(sessionId, sessionResult);
77831
- if (this.resolvedPermissionMode) await this.client.request("session/set_config_option", {
77832
- configId: "mode",
77833
- sessionId,
77834
- value: this.resolvedPermissionMode
77835
- });
77832
+ await this.applyForcedSessionMode(sessionId);
77836
77833
  if (model) {
77837
77834
  this.pipeline.configureSession({ model });
77838
77835
  this.options.onModel?.(model);
@@ -77888,9 +77885,45 @@ var DevinAcpSession = class extends AcpAgentSession {
77888
77885
  this.pipeline.configureSession({ model });
77889
77886
  this.options.onModel?.(model);
77890
77887
  }
77888
+ this.reassertForcedSessionMode(update.configOptions);
77891
77889
  }
77892
77890
  await this.pushToPipeline(update);
77893
77891
  }
77892
+ /**
77893
+ * `--permission-mode` has no effect on Devin ACP sessions (they always start
77894
+ * in `accept-edits`), so the mode is forced through `session/set_config_option`.
77895
+ * A failure only degrades to Devin's default mode; it must never prevent the
77896
+ * session from starting.
77897
+ */
77898
+ async applyForcedSessionMode(sessionId) {
77899
+ try {
77900
+ await this.client.request("session/set_config_option", {
77901
+ configId: "mode",
77902
+ sessionId,
77903
+ value: DEVIN_FORCED_SESSION_MODE
77904
+ });
77905
+ } catch (error) {
77906
+ console.warn(`[DevinAcpSession] Failed to set session mode "${DEVIN_FORCED_SESSION_MODE}"; continuing with Devin's default mode:`, {
77907
+ error,
77908
+ operationId: this.options.operationId,
77909
+ sessionId
77910
+ });
77911
+ }
77912
+ }
77913
+ /**
77914
+ * Devin pushes `config_option_update` whenever a config changes. If the mode
77915
+ * drifted away from the forced value, set it back — once per session, so a
77916
+ * peer that rejects the value but keeps echoing updates cannot cause a
77917
+ * set → update → set loop.
77918
+ */
77919
+ reassertForcedSessionMode(configOptions) {
77920
+ const mode = getModeConfigValue(configOptions);
77921
+ if (mode === void 0 || mode === DEVIN_FORCED_SESSION_MODE || this.modeReasserted) return;
77922
+ const sessionId = this.acpSessionId;
77923
+ if (!sessionId) return;
77924
+ this.modeReasserted = true;
77925
+ this.applyForcedSessionMode(sessionId);
77926
+ }
77894
77927
  async handleServerRequest(message) {
77895
77928
  if (message.method !== "session/request_permission") throw new AcpServerRequestError(-32601, `Unsupported ACP client request: ${message.method}`);
77896
77929
  const request = this.parsePermissionRequest(message.params);
@@ -79865,7 +79898,6 @@ const spawnDevinAcpAgent = async (options, command, cwd) => {
79865
79898
  },
79866
79899
  initialModel: options.initialModel,
79867
79900
  onEvents: bridge.onEvents,
79868
- permissionMode: options.permissionMode,
79869
79901
  onRawMessage: teeAcpRawStdout(options.onRawStdout),
79870
79902
  onRuntimeStatus: () => {},
79871
79903
  onSessionId: () => {},
@@ -578416,7 +578448,6 @@ const exec = async (options) => {
578416
578448
  pathEnv: resolvedCommand.pathEnv,
578417
578449
  topicId: options.topic
578418
578450
  });
578419
- const permissionMode = options.type === "devin" ? "bypass" : void 0;
578420
578451
  const spawnOptions = {
578421
578452
  agentType: options.type,
578422
578453
  askUserBridge: askBridge,
@@ -578430,7 +578461,6 @@ const exec = async (options) => {
578430
578461
  initialModel: usesHeterogeneousSessionInitialModel(options.type) ? options.model : void 0,
578431
578462
  liveInput: options.type === "claude-code",
578432
578463
  operationId,
578433
- permissionMode,
578434
578464
  uploadImage
578435
578465
  };
578436
578466
  const first = await runOneAgent({
@@ -581151,7 +581181,7 @@ function registerNotifyCommand(program) {
581151
581181
  //#endregion
581152
581182
  //#region src/commands/plugin.ts
581153
581183
  function registerLegacyPluginCommand(program) {
581154
- const plugin = program.command("legacy-plugin").alias("plugin").description("Manage legacy 1.0 plugins (user_installed_plugins)");
581184
+ const plugin = program.command("legacy-plugin").alias("plugin").description("Manage legacy 1.0 plugins (user_installed_plugins). Add new MCP servers with lh connector add");
581155
581185
  plugin.command("list").description("List installed plugins").option("--json [fields]", "Output JSON, optionally specify fields (comma-separated)").action(async (options) => {
581156
581186
  const result = await (await getTrpcClient()).plugin.getPlugins.query();
581157
581187
  const items = Array.isArray(result) ? result : [];
@@ -581208,56 +581238,6 @@ function registerLegacyPluginCommand(program) {
581208
581238
  ]);
581209
581239
  if (result?.totalCount > items.length) console.log(import_picocolors.default.dim(`Showing ${items.length} of ${result.totalCount} results.`));
581210
581240
  });
581211
- plugin.command("create").description("Create a new plugin (without settings)").requiredOption("-i, --identifier <id>", "Plugin identifier").requiredOption("--manifest <json>", "Plugin manifest JSON").option("--type <type>", "Plugin type: plugin or customPlugin", "plugin").option("--custom-params <json>", "Custom parameters JSON").action(async (options) => {
581212
- let manifest;
581213
- let customParams = {};
581214
- try {
581215
- manifest = JSON.parse(options.manifest);
581216
- } catch {
581217
- log$13.error("Invalid manifest JSON.");
581218
- process.exit(1);
581219
- return;
581220
- }
581221
- if (options.customParams) try {
581222
- customParams = JSON.parse(options.customParams);
581223
- } catch {
581224
- log$13.error("Invalid custom-params JSON.");
581225
- process.exit(1);
581226
- return;
581227
- }
581228
- const r = await (await getTrpcClient()).plugin.createPlugin.mutate({
581229
- customParams,
581230
- identifier: options.identifier,
581231
- manifest,
581232
- type: options.type
581233
- });
581234
- console.log(`${import_picocolors.default.green("✓")} Created plugin ${import_picocolors.default.bold(r.identifier || options.identifier)}`);
581235
- });
581236
- plugin.command("install").description("Install a plugin").requiredOption("-i, --identifier <id>", "Plugin identifier").requiredOption("--manifest <json>", "Plugin manifest JSON").option("--type <type>", "Plugin type: plugin or customPlugin", "plugin").option("--settings <json>", "Plugin settings JSON").action(async (options) => {
581237
- const client = await getTrpcClient();
581238
- let manifest;
581239
- let settings;
581240
- try {
581241
- manifest = JSON.parse(options.manifest);
581242
- } catch {
581243
- log$13.error("Invalid manifest JSON.");
581244
- process.exit(1);
581245
- }
581246
- if (options.settings) try {
581247
- settings = JSON.parse(options.settings);
581248
- } catch {
581249
- log$13.error("Invalid settings JSON.");
581250
- process.exit(1);
581251
- }
581252
- await client.plugin.createOrInstallPlugin.mutate({
581253
- customParams: {},
581254
- identifier: options.identifier,
581255
- manifest,
581256
- settings,
581257
- type: options.type
581258
- });
581259
- console.log(`${import_picocolors.default.green("✓")} Installed plugin ${import_picocolors.default.bold(options.identifier)}`);
581260
- });
581261
581241
  plugin.command("uninstall <id>").description("Uninstall a plugin").option("--yes", "Skip confirmation prompt").action(async (id, options) => {
581262
581242
  if (!options.yes) {
581263
581243
  if (!await confirm("Are you sure you want to uninstall this plugin?")) {
@@ -583247,7 +583227,7 @@ const followTaskRun = async (client, operationId, options) => {
583247
583227
  }
583248
583228
  };
583249
583229
  function registerLifecycleCommands(task) {
583250
- task.command("start <id>").description("Start a task (pending → 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) => {
583230
+ 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
583231
  const client = await getTrpcClient();
583252
583232
  const taskDetail = await client.task.find.query({ id });
583253
583233
  if (taskDetail.data.status === "running") {
@@ -583783,7 +583763,7 @@ function registerTopicCommands(task) {
583783
583763
  init_src$1();
583784
583764
  function registerTaskCommand(program) {
583785
583765
  const task = program.command("task").description("Manage agent tasks");
583786
- task.command("list").description("List tasks").option("--status <status>", "Filter by status (pending/running/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) => {
583766
+ 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
583767
  const client = await getTrpcClient();
583788
583768
  const input = {};
583789
583769
  if (options.status) input.statuses = [options.status];
@@ -584274,7 +584254,7 @@ function registerTaskCommand(program) {
584274
584254
  if (!t) return;
584275
584255
  const prefix = indent === 0 ? "" : " ".repeat(indent) + "├── ";
584276
584256
  const name = t.name || t.identifier || "";
584277
- const status = t.status || "pending";
584257
+ const status = t.status || "backlog";
584278
584258
  const identifier = t.identifier || t.id;
584279
584259
  console.log(`${prefix}${import_picocolors.default.dim(identifier)} ${statusBadge(status)} ${name}`);
584280
584260
  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.81" "User Commands"
3
+ .TH LH 1 "" "@lobehub/cli 0.0.83" "User Commands"
4
4
  .SH NAME
5
5
  lh \- LobeHub CLI \- manage and connect to LobeHub services
6
6
  .SH SYNOPSIS
@@ -150,7 +150,7 @@ Manage dashboards (boards of monitoring widgets)
150
150
  Build monitoring widgets: sandboxed scripts rendered as dashboard cards
151
151
  .TP
152
152
  .B legacy\-plugin
153
- Manage legacy 1.0 plugins (user_installed_plugins) Alias: plugin.
153
+ Manage legacy 1.0 plugins (user_installed_plugins). Add new MCP servers with lh connector add Alias: plugin.
154
154
  .TP
155
155
  .B connector
156
156
  Manage MCP connectors (user connectors and their synced tools) Alias: mcp.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/cli",
3
- "version": "0.0.81",
3
+ "version": "0.0.83",
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": "6ff88dcf08c46db9952b1444047b6fa745150240"
85
+ "gitHead": "3492696ffec69b68502c8fa013a050d047ac3f95"
86
86
  }