@lobehub/cli 0.0.77 → 0.0.78

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
@@ -7912,6 +7912,10 @@ var init_agentExecution = __esmMin((() => {
7912
7912
  /** The environment to initialize the sandbox from; see `ChatTopicMetadata.sandboxEnvironmentId`. */
7913
7913
  sandboxEnvironmentId: string().max(255).optional(),
7914
7914
  sandboxInstanceId: string().optional(),
7915
+ /** A default nobody picked; see `ChatTopicMetadata.sandboxSeeded`. */
7916
+ sandboxSeeded: boolean().optional(),
7917
+ /** An explicit temporary-sandbox pick; see `ChatTopicMetadata.sandboxTemporary`. */
7918
+ sandboxTemporary: boolean().optional(),
7915
7919
  sandboxWorkingDirectory: string().max(1024).optional(),
7916
7920
  workingDirectory: string().optional(),
7917
7921
  workingDirectoryConfig: workingDirConfigSchema.optional()
@@ -18445,7 +18449,7 @@ const interestAreaKeySet = new Set(INTEREST_AREA_KEYS);
18445
18449
  const PLUGIN_SCHEMA_SEPARATOR = "____";
18446
18450
 
18447
18451
  //#endregion
18448
- //#region ../../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.mjs
18452
+ //#region ../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.mjs
18449
18453
  /**
18450
18454
  * Checks if a given value is a plain object.
18451
18455
  *
@@ -18485,7 +18489,7 @@ function isPlainObject$12(object) {
18485
18489
  }
18486
18490
 
18487
18491
  //#endregion
18488
- //#region ../../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/predicate/isLength.mjs
18492
+ //#region ../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/predicate/isLength.mjs
18489
18493
  /**
18490
18494
  * Checks if a given value is a valid length.
18491
18495
  *
@@ -18512,7 +18516,7 @@ function isLength(value) {
18512
18516
  }
18513
18517
 
18514
18518
  //#endregion
18515
- //#region ../../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs
18519
+ //#region ../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs
18516
18520
  /**
18517
18521
  * Checks if `value` is array-like.
18518
18522
  *
@@ -18532,7 +18536,7 @@ function isArrayLike(value) {
18532
18536
  }
18533
18537
 
18534
18538
  //#endregion
18535
- //#region ../../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
18539
+ //#region ../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
18536
18540
  /**
18537
18541
  * Checks if a property key is unsafe to access or copy directly.
18538
18542
  *
@@ -18551,7 +18555,7 @@ function isUnsafeProperty(key) {
18551
18555
  }
18552
18556
 
18553
18557
  //#endregion
18554
- //#region ../../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/_internal/hasOwn.mjs
18558
+ //#region ../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/_internal/hasOwn.mjs
18555
18559
  const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
18556
18560
  /**
18557
18561
  * Checks if `key` is an own property of `object`, like `Object.hasOwn`, which is not available on ES2015 engines.
@@ -18565,7 +18569,7 @@ function hasOwn(object, key) {
18565
18569
  }
18566
18570
 
18567
18571
  //#endregion
18568
- //#region ../../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
18572
+ //#region ../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
18569
18573
  /**
18570
18574
  * Checks whether a value is a JavaScript primitive.
18571
18575
  * JavaScript primitives include null, undefined, strings, numbers, booleans, symbols, and bigints.
@@ -18592,7 +18596,7 @@ function isPrimitive$1(value) {
18592
18596
  }
18593
18597
 
18594
18598
  //#endregion
18595
- //#region ../../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
18599
+ //#region ../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
18596
18600
  /**
18597
18601
  * Gets the `toStringTag` of `value`.
18598
18602
  *
@@ -18606,7 +18610,7 @@ function getTag(value) {
18606
18610
  }
18607
18611
 
18608
18612
  //#endregion
18609
- //#region ../../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/_internal/tags.mjs
18613
+ //#region ../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/_internal/tags.mjs
18610
18614
  const regexpTag = "[object RegExp]";
18611
18615
  const stringTag = "[object String]";
18612
18616
  const numberTag = "[object Number]";
@@ -18631,13 +18635,13 @@ const float32ArrayTag = "[object Float32Array]";
18631
18635
  const float64ArrayTag = "[object Float64Array]";
18632
18636
 
18633
18637
  //#endregion
18634
- //#region ../../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/_internal/globalThis.mjs
18638
+ //#region ../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/_internal/globalThis.mjs
18635
18639
  const globalThis_ = typeof globalThis === "object" && globalThis || typeof window === "object" && window || typeof self === "object" && self || typeof global === "object" && global || (function() {
18636
18640
  return this;
18637
18641
  })();
18638
18642
 
18639
18643
  //#endregion
18640
- //#region ../../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/predicate/isBuffer.mjs
18644
+ //#region ../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/predicate/isBuffer.mjs
18641
18645
  /**
18642
18646
  * Checks if the given value is a Buffer instance.
18643
18647
  *
@@ -18661,7 +18665,7 @@ function isBuffer$1(x) {
18661
18665
  }
18662
18666
 
18663
18667
  //#endregion
18664
- //#region ../../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/predicate/isBuffer.mjs
18668
+ //#region ../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/predicate/isBuffer.mjs
18665
18669
  /**
18666
18670
  * Checks if the given value is a Buffer instance.
18667
18671
  *
@@ -18685,7 +18689,7 @@ function isBuffer(x) {
18685
18689
  }
18686
18690
 
18687
18691
  //#endregion
18688
- //#region ../../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
18692
+ //#region ../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
18689
18693
  /**
18690
18694
  * Checks if a value is a TypedArray.
18691
18695
  * @param x The value to check.
@@ -18706,7 +18710,7 @@ function isTypedArray$3(x) {
18706
18710
  }
18707
18711
 
18708
18712
  //#endregion
18709
- //#region ../../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.mjs
18713
+ //#region ../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.mjs
18710
18714
  /**
18711
18715
  * Checks if a value is a TypedArray.
18712
18716
  * @param x The value to check.
@@ -18727,13 +18731,13 @@ function isTypedArray$2(x) {
18727
18731
  }
18728
18732
 
18729
18733
  //#endregion
18730
- //#region ../../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
18734
+ //#region ../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
18731
18735
  function getSymbols(object) {
18732
18736
  return Object.getOwnPropertySymbols(object).filter((symbol) => Object.prototype.propertyIsEnumerable.call(object, symbol));
18733
18737
  }
18734
18738
 
18735
18739
  //#endregion
18736
- //#region ../../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.mjs
18740
+ //#region ../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.mjs
18737
18741
  /**
18738
18742
  * Creates a deep clone of the given object using a customizer function.
18739
18743
  *
@@ -18905,7 +18909,7 @@ function isCloneableObject(tag) {
18905
18909
  }
18906
18910
 
18907
18911
  //#endregion
18908
- //#region ../../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/object/cloneDeep.mjs
18912
+ //#region ../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/object/cloneDeep.mjs
18909
18913
  /**
18910
18914
  * Creates a deep clone of the given object.
18911
18915
  *
@@ -18957,7 +18961,7 @@ function cloneDeep(obj) {
18957
18961
  }
18958
18962
 
18959
18963
  //#endregion
18960
- //#region ../../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/predicate/isArguments.mjs
18964
+ //#region ../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/predicate/isArguments.mjs
18961
18965
  /**
18962
18966
  * Checks if the given value is an arguments object.
18963
18967
  *
@@ -18983,7 +18987,7 @@ function isArguments$1(value) {
18983
18987
  }
18984
18988
 
18985
18989
  //#endregion
18986
- //#region ../../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.mjs
18990
+ //#region ../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.mjs
18987
18991
  /**
18988
18992
  * Checks if the given value is object-like.
18989
18993
  *
@@ -19012,7 +19016,7 @@ function isObjectLike(value) {
19012
19016
  }
19013
19017
 
19014
19018
  //#endregion
19015
- //#region ../../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.mjs
19019
+ //#region ../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.mjs
19016
19020
  /**
19017
19021
  * Checks if the given value is a non-primitive, array-like object.
19018
19022
  *
@@ -19030,7 +19034,7 @@ function isArrayLikeObject(value) {
19030
19034
  }
19031
19035
 
19032
19036
  //#endregion
19033
- //#region ../../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/_internal/baseClone.mjs
19037
+ //#region ../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/_internal/baseClone.mjs
19034
19038
  /**
19035
19039
  * A copy of `clone` from `es-toolkit/object` that does not rely on `AggregateError`,
19036
19040
  * which is not available on ES2015 engines, so that `es-toolkit/compat` runs on Node.js 6
@@ -19070,7 +19074,7 @@ function baseClone(obj) {
19070
19074
  }
19071
19075
 
19072
19076
  //#endregion
19073
- //#region ../../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/object/mergeWith.mjs
19077
+ //#region ../../node_modules/.pnpm/es-toolkit@1.53.2/node_modules/es-toolkit/dist/compat/object/mergeWith.mjs
19074
19078
  /**
19075
19079
  * Merges the properties of one or more source objects into the target object using a customizer function.
19076
19080
  *
@@ -25973,7 +25977,7 @@ const cliVersion = pkg.version;
25973
25977
  const cliNodeEngine = pkg.engines?.node;
25974
25978
 
25975
25979
  //#endregion
25976
- //#region ../../../node_modules/.pnpm/@trpc+server@11.24.0_@types+aws-lambda@8.10.164_@types+express@5.0.6_@types+ws@8.18.2_n_e97b959fd035a93e873e8b57998a58cd/node_modules/@trpc/server/dist/observable-CdPmrXKY.mjs
25980
+ //#region ../../node_modules/.pnpm/@trpc+server@11.26.0_@types+aws-lambda@8.10.164_@types+express@5.0.6_@types+ws@8.18.2_n_23f3a92b907f005541536d7114533dc2/node_modules/@trpc/server/dist/observable-CodTG6Sf.mjs
25977
25981
  /**
25978
25982
  * Creates an observable. `subscribe` runs for each subscriber, and can
25979
25983
  * return a function that cleans up when it unsubscribes.
@@ -25994,6 +25998,19 @@ function observable(subscribe) {
25994
25998
  let isDone = false;
25995
25999
  let unsubscribed = false;
25996
26000
  let teardownImmediately = false;
26001
+ let subscribing = true;
26002
+ let thrownWhileSubscribing = null;
26003
+ function end(notify) {
26004
+ try {
26005
+ notify();
26006
+ } catch (cause) {
26007
+ var _thrownWhileSubscribi;
26008
+ if (!subscribing) throw cause;
26009
+ (_thrownWhileSubscribi = thrownWhileSubscribing) !== null && _thrownWhileSubscribi !== void 0 || (thrownWhileSubscribing = { cause });
26010
+ } finally {
26011
+ unsubscribe();
26012
+ }
26013
+ }
25997
26014
  function unsubscribe() {
25998
26015
  if (teardownRef === null) {
25999
26016
  teardownImmediately = true;
@@ -26011,21 +26028,25 @@ function observable(subscribe) {
26011
26028
  (_observer$next = observer.next) === null || _observer$next === void 0 || _observer$next.call(observer, value);
26012
26029
  },
26013
26030
  error(err) {
26014
- var _observer$error;
26015
26031
  if (isDone) return;
26016
26032
  isDone = true;
26017
- (_observer$error = observer.error) === null || _observer$error === void 0 || _observer$error.call(observer, err);
26018
- unsubscribe();
26033
+ end(() => {
26034
+ var _observer$error;
26035
+ return (_observer$error = observer.error) === null || _observer$error === void 0 ? void 0 : _observer$error.call(observer, err);
26036
+ });
26019
26037
  },
26020
26038
  complete() {
26021
- var _observer$complete;
26022
26039
  if (isDone) return;
26023
26040
  isDone = true;
26024
- (_observer$complete = observer.complete) === null || _observer$complete === void 0 || _observer$complete.call(observer);
26025
- unsubscribe();
26041
+ end(() => {
26042
+ var _observer$complete;
26043
+ return (_observer$complete = observer.complete) === null || _observer$complete === void 0 ? void 0 : _observer$complete.call(observer);
26044
+ });
26026
26045
  }
26027
26046
  });
26047
+ subscribing = false;
26028
26048
  if (teardownImmediately) unsubscribe();
26049
+ if (thrownWhileSubscribing) throw thrownWhileSubscribing.cause;
26029
26050
  return { unsubscribe };
26030
26051
  },
26031
26052
  pipe(...operations) {
@@ -49286,6 +49307,8 @@ const readJsonObjectFile = async (filePath, label) => {
49286
49307
  if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) throw new Error(`${label} JSON must be a plain object`);
49287
49308
  return parsed;
49288
49309
  };
49310
+ /** Values `agent.createAgent` accepts for `visibility`; omit it to keep the server default. */
49311
+ const AGENT_VISIBILITIES = ["private", "public"];
49289
49312
  const readAgencyConfig = (agencyConfigFile) => readJsonObjectFile(agencyConfigFile, "agencyConfig");
49290
49313
  function registerAgentCommand(program) {
49291
49314
  const agent = program.command("agent").description("Manage agents");
@@ -49346,6 +49369,7 @@ function registerAgentCommand(program) {
49346
49369
  if (r.description || r.meta?.description) meta.push(r.description || r.meta.description);
49347
49370
  if (r.model) meta.push(`Model: ${r.model}`);
49348
49371
  if (r.provider) meta.push(`Provider: ${r.provider}`);
49372
+ if (r.workspaceId && r.visibility) meta.push(`Visibility: ${r.visibility}`);
49349
49373
  if (meta.length > 0) console.log(import_picocolors.default.dim(meta.join(" · ")));
49350
49374
  if (r.systemRole) {
49351
49375
  console.log();
@@ -49353,7 +49377,7 @@ function registerAgentCommand(program) {
49353
49377
  console.log(r.systemRole);
49354
49378
  }
49355
49379
  });
49356
- agent.command("create").description("Create a new agent").option("-t, --title <title>", "Agent title").option("-d, --description <desc>", "Agent description").option("-m, --model <model>", "Model ID").option("-p, --provider <provider>", "Provider ID").option("-s, --system-role <role>", "System role prompt").option("--group <groupId>", "Group ID").action(async (options) => {
49380
+ agent.command("create").description("Create a new agent").option("-t, --title <title>", "Agent title").option("-d, --description <desc>", "Agent description").option("-m, --model <model>", "Model ID").option("-p, --provider <provider>", "Provider ID").option("-s, --system-role <role>", "System role prompt").option("--group <groupId>", "Group ID").addOption(new Option("--visibility <visibility>", "Who can see the agent in a workspace: `private` (only you) or `public` (workspace members). Omit to use the server default").choices(AGENT_VISIBILITIES)).option("--json [fields]", "Output the created agent as JSON, optionally selecting fields").action(async (options) => {
49357
49381
  const client = await getTrpcClient();
49358
49382
  const buildUrl = await resolveAppUrlBuilder(client);
49359
49383
  const config = {};
@@ -49364,11 +49388,31 @@ function registerAgentCommand(program) {
49364
49388
  if (options.systemRole) config.systemRole = options.systemRole;
49365
49389
  const input = { config };
49366
49390
  if (options.group) input.groupId = options.group;
49391
+ if (options.visibility) input.visibility = options.visibility;
49367
49392
  const r = await client.agent.createAgent.mutate(input);
49368
49393
  const agentId = r.agentId || r.id;
49369
49394
  const url = buildUrl(`/agent/${encodeURIComponent(agentId)}`);
49395
+ if (options.json !== void 0) {
49396
+ let created = null;
49397
+ try {
49398
+ created = await client.agent.getAgentConfigById.query({ agentId });
49399
+ } catch (error) {
49400
+ log$13.warn(`Created ${agentId}, but could not read it back: ${error.message}`);
49401
+ }
49402
+ const fields = typeof options.json === "string" ? options.json : void 0;
49403
+ outputJson({
49404
+ id: agentId,
49405
+ ...r.sessionId ? { sessionId: r.sessionId } : {},
49406
+ title: created?.title ?? options.title ?? null,
49407
+ url,
49408
+ visibility: created?.visibility ?? null,
49409
+ workspaceId: created?.workspaceId ?? null
49410
+ }, fields);
49411
+ return;
49412
+ }
49370
49413
  console.log(`${import_picocolors.default.green("✓")} Created agent ${import_picocolors.default.bold(agentId)}`);
49371
49414
  if (r.sessionId) console.log(` Session: ${r.sessionId}`);
49415
+ if (options.visibility) console.log(` Visibility: ${options.visibility}`);
49372
49416
  console.log(`${import_picocolors.default.bold("agent")}: ${url}`);
49373
49417
  });
49374
49418
  agent.command("edit [agentId]").alias("update").description("Update agent configuration").option("--slug <slug>", "Agent slug (e.g. inbox)").option("-t, --title <title>", "New title").option("-d, --description <desc>", "New description").option("-m, --model <model>", "New model ID").option("-p, --provider <provider>", "New provider ID").option("-s, --system-role <role>", "New system role prompt").option("--graph-file <path>", "AgentGraph JSON file").option("--enable-graph", "Enable graph runtime").option("--disable-graph", "Disable graph runtime").option("--agency-config-file <path>", "agencyConfig JSON file, deep-merged into the agent (send `null` to clear a nested key)").option("--config-file <path>", "Agent config JSON file for fields without a dedicated flag (openingMessage, openingQuestions, tags, avatar, params, chatConfig, …). Deep-merged server-side; identity fields (id/slug/userId/workspaceId/visibility) are rejected. Explicit flags win over this file.").option("--json [fields]", "Output the updated agent as JSON, optionally selecting fields").action(async (agentIdArg, options) => {
@@ -50849,7 +50893,7 @@ const collectLocalResourceRefs = ({ allowExternalReads = false, content, rootDir
50849
50893
  };
50850
50894
 
50851
50895
  //#endregion
50852
- //#region ../../../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js
50896
+ //#region ../../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js
50853
50897
  var require_base64_js$1 = /* @__PURE__ */ __commonJSMin$2(((exports) => {
50854
50898
  exports.byteLength = byteLength;
50855
50899
  exports.toByteArray = toByteArray;
@@ -50938,7 +50982,7 @@ var require_base64_js$1 = /* @__PURE__ */ __commonJSMin$2(((exports) => {
50938
50982
  }));
50939
50983
 
50940
50984
  //#endregion
50941
- //#region ../../../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js
50985
+ //#region ../../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js
50942
50986
  var require_ieee754 = /* @__PURE__ */ __commonJSMin$2(((exports) => {
50943
50987
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
50944
50988
  exports.read = function(buffer, offset, isLE, mLen, nBytes) {
@@ -51012,7 +51056,7 @@ var require_ieee754 = /* @__PURE__ */ __commonJSMin$2(((exports) => {
51012
51056
  }));
51013
51057
 
51014
51058
  //#endregion
51015
- //#region ../../../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js
51059
+ //#region ../../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js
51016
51060
  /*!
51017
51061
  * The buffer module from node.js, for the browser.
51018
51062
  *
@@ -584031,7 +584075,7 @@ function registerTaskCommand(program) {
584031
584075
  console.log(`ID: ${result.data.id}`);
584032
584076
  console.log(`${import_picocolors.default.bold("task")}: ${url}`);
584033
584077
  });
584034
- task.command("edit <id>").description("Update a task").option("-n, --name <name>", "Task name").option("-i, --instruction <text>", "Task instruction").option("--agent <id>", "Assign to agent").option("--user <idOrEmail>", "Assign to a workspace member (user id, email or username)").option("--priority <n>", "Priority (0-4)").option("--label <name>", "Add a label (repeatable or comma-separated; replaces the task's other label of the same group)", collectLabels).option("--remove-label <name>", "Remove a label (repeatable or comma-separated)", collectLabels).option("--heartbeat-interval <n>", "Heartbeat interval in seconds").option("--heartbeat-timeout <n>", "Heartbeat timeout in seconds (0 to disable)").option("--description <text>", "Task description").option("--model <model>", "Model to run with (\"null\" to follow the assignee agent again)").option("--provider <provider>", "Provider for the model (default: resolved from the agent)").option("--status <status>", "Set status (backlog, running, paused, completed, failed, canceled)").option("--json [fields]", "Output JSON").action(async (id, options) => {
584078
+ task.command("edit <id>").description("Update a task").option("-n, --name <name>", "Task name").option("-i, --instruction <text>", "Task instruction").option("--agent <id>", "Assign to agent").option("--user <idOrEmail>", "Assign to a workspace member (user id, email or username)").option("--priority <n>", "Priority (0-4)").option("--project <id>", "Move to a project (\"null\" to remove it from its project)").option("--label <name>", "Add a label (repeatable or comma-separated; replaces the task's other label of the same group)", collectLabels).option("--remove-label <name>", "Remove a label (repeatable or comma-separated)", collectLabels).option("--heartbeat-interval <n>", "Heartbeat interval in seconds").option("--heartbeat-timeout <n>", "Heartbeat timeout in seconds (0 to disable)").option("--description <text>", "Task description").option("--model <model>", "Model to run with (\"null\" to follow the assignee agent again)").option("--provider <provider>", "Provider for the model (default: resolved from the agent)").option("--status <status>", "Set status (backlog, running, paused, completed, failed, canceled)").option("--json [fields]", "Output JSON").action(async (id, options) => {
584035
584079
  const client = await getTrpcClient();
584036
584080
  const assigneeUserId = await resolveUserOption(client, options.user);
584037
584081
  if (assigneeUserId === false) return;
@@ -584047,6 +584091,7 @@ function registerTaskCommand(program) {
584047
584091
  if (options.agent) input.assigneeAgentId = options.agent;
584048
584092
  if (assigneeUserId) input.assigneeUserId = assigneeUserId;
584049
584093
  if (options.priority) input.priority = Number.parseInt(options.priority, 10);
584094
+ if (options.project !== void 0) input.projectId = options.project === "null" ? null : options.project;
584050
584095
  if (options.heartbeatInterval) input.heartbeatInterval = Number.parseInt(options.heartbeatInterval, 10);
584051
584096
  if (options.heartbeatTimeout !== void 0) {
584052
584097
  const val = Number.parseInt(options.heartbeatTimeout, 10);
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.77" "User Commands"
3
+ .TH LH 1 "" "@lobehub/cli 0.0.78" "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,11 @@
1
1
  {
2
2
  "name": "@lobehub/cli",
3
- "version": "0.0.77",
3
+ "version": "0.0.78",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "https://github.com/lobehub/lobehub",
7
+ "directory": "apps/cli"
8
+ },
4
9
  "type": "module",
5
10
  "bin": {
6
11
  "lh": "dist/index.js",