@lobehub/cli 0.0.10 → 0.0.11

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
@@ -19,7 +19,7 @@ var __getOwnPropNames$2 = Object.getOwnPropertyNames;
19
19
  var __getProtoOf$2 = Object.getPrototypeOf;
20
20
  var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
21
21
  var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
22
- var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
22
+ var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
23
23
  var __exportAll = (all, no_symbols) => {
24
24
  let target = {};
25
25
  for (var name in all) {
@@ -7594,7 +7594,7 @@ const DEFAULT_INPUT_COMPLETION_SYSTEM_AGENT_ITEM = {
7594
7594
  const DEFAULT_CREATED_AT = (/* @__PURE__ */ new Date()).toISOString();
7595
7595
 
7596
7596
  //#endregion
7597
- //#region ../../node_modules/.pnpm/react@19.2.5/node_modules/react/cjs/react-jsx-runtime.production.js
7597
+ //#region ../../node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react-jsx-runtime.production.js
7598
7598
  /**
7599
7599
  * @license React
7600
7600
  * react-jsx-runtime.production.js
@@ -7629,7 +7629,7 @@ var require_react_jsx_runtime_production = /* @__PURE__ */ __commonJSMin(((expor
7629
7629
  }));
7630
7630
 
7631
7631
  //#endregion
7632
- //#region ../../node_modules/.pnpm/react@19.2.5/node_modules/react/cjs/react.production.js
7632
+ //#region ../../node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react.production.js
7633
7633
  /**
7634
7634
  * @license React
7635
7635
  * react.production.js
@@ -7986,11 +7986,11 @@ var require_react_production = /* @__PURE__ */ __commonJSMin(((exports) => {
7986
7986
  exports.useTransition = function() {
7987
7987
  return ReactSharedInternals.H.useTransition();
7988
7988
  };
7989
- exports.version = "19.2.5";
7989
+ exports.version = "19.2.4";
7990
7990
  }));
7991
7991
 
7992
7992
  //#endregion
7993
- //#region ../../node_modules/.pnpm/react@19.2.5/node_modules/react/cjs/react.development.js
7993
+ //#region ../../node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react.development.js
7994
7994
  /**
7995
7995
  * @license React
7996
7996
  * react.development.js
@@ -8744,20 +8744,20 @@ var require_react_development = /* @__PURE__ */ __commonJSMin(((exports, module)
8744
8744
  exports.useTransition = function() {
8745
8745
  return resolveDispatcher().useTransition();
8746
8746
  };
8747
- exports.version = "19.2.5";
8747
+ exports.version = "19.2.4";
8748
8748
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
8749
8749
  })();
8750
8750
  }));
8751
8751
 
8752
8752
  //#endregion
8753
- //#region ../../node_modules/.pnpm/react@19.2.5/node_modules/react/index.js
8753
+ //#region ../../node_modules/.pnpm/react@19.2.4/node_modules/react/index.js
8754
8754
  var require_react = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8755
8755
  if (process.env.NODE_ENV === "production") module.exports = require_react_production();
8756
8756
  else module.exports = require_react_development();
8757
8757
  }));
8758
8758
 
8759
8759
  //#endregion
8760
- //#region ../../node_modules/.pnpm/react@19.2.5/node_modules/react/cjs/react-jsx-runtime.development.js
8760
+ //#region ../../node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react-jsx-runtime.development.js
8761
8761
  /**
8762
8762
  * @license React
8763
8763
  * react-jsx-runtime.development.js
@@ -8957,14 +8957,14 @@ var require_react_jsx_runtime_development = /* @__PURE__ */ __commonJSMin(((expo
8957
8957
  }));
8958
8958
 
8959
8959
  //#endregion
8960
- //#region ../../node_modules/.pnpm/react@19.2.5/node_modules/react/jsx-runtime.js
8960
+ //#region ../../node_modules/.pnpm/react@19.2.4/node_modules/react/jsx-runtime.js
8961
8961
  var require_jsx_runtime = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8962
8962
  if (process.env.NODE_ENV === "production") module.exports = require_react_jsx_runtime_production();
8963
8963
  else module.exports = require_react_jsx_runtime_development();
8964
8964
  }));
8965
8965
 
8966
8966
  //#endregion
8967
- //#region ../../node_modules/.pnpm/@icons-pack+react-simple-icons@13.13.0_react@19.2.5/node_modules/@icons-pack/react-simple-icons/icons/SiCaldotcom.mjs
8967
+ //#region ../../node_modules/.pnpm/@icons-pack+react-simple-icons@13.13.0_react@19.2.4/node_modules/@icons-pack/react-simple-icons/icons/SiCaldotcom.mjs
8968
8968
  var import_jsx_runtime = require_jsx_runtime();
8969
8969
  var import_react = /* @__PURE__ */ __toESM$2(require_react(), 1);
8970
8970
  const defaultColor = "#292929";
@@ -10218,44 +10218,103 @@ const KLAVIS_SERVER_TYPES = [
10218
10218
  ];
10219
10219
 
10220
10220
  //#endregion
10221
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isLength.mjs
10221
+ //#region ../../packages/const/src/recommendedSkill.ts
10222
+ let RecommendedSkillType = /* @__PURE__ */ function(RecommendedSkillType) {
10223
+ RecommendedSkillType["Builtin"] = "builtin";
10224
+ RecommendedSkillType["Klavis"] = "klavis";
10225
+ RecommendedSkillType["Lobehub"] = "lobehub";
10226
+ return RecommendedSkillType;
10227
+ }({});
10228
+ const RECOMMENDED_SKILLS = [
10229
+ {
10230
+ id: "lobe-artifacts",
10231
+ type: RecommendedSkillType.Builtin
10232
+ },
10233
+ {
10234
+ id: "lobe-user-memory",
10235
+ type: RecommendedSkillType.Builtin
10236
+ },
10237
+ {
10238
+ id: "lobe-cloud-sandbox",
10239
+ type: RecommendedSkillType.Builtin
10240
+ },
10241
+ {
10242
+ id: "lobe-gtd",
10243
+ type: RecommendedSkillType.Builtin
10244
+ },
10245
+ {
10246
+ id: "lobe-agent-documents",
10247
+ type: RecommendedSkillType.Builtin
10248
+ },
10249
+ {
10250
+ id: "lobe-message",
10251
+ type: RecommendedSkillType.Builtin
10252
+ },
10253
+ {
10254
+ id: "twitter",
10255
+ type: RecommendedSkillType.Lobehub
10256
+ },
10257
+ {
10258
+ id: "gmail",
10259
+ type: RecommendedSkillType.Klavis
10260
+ },
10261
+ {
10262
+ id: "notion",
10263
+ type: RecommendedSkillType.Klavis
10264
+ },
10265
+ {
10266
+ id: "google-drive",
10267
+ type: RecommendedSkillType.Klavis
10268
+ },
10269
+ {
10270
+ id: "google-calendar",
10271
+ type: RecommendedSkillType.Klavis
10272
+ },
10273
+ {
10274
+ id: "slack",
10275
+ type: RecommendedSkillType.Klavis
10276
+ }
10277
+ ];
10278
+
10279
+ //#endregion
10280
+ //#region ../../node_modules/.pnpm/es-toolkit@1.46.0/node_modules/es-toolkit/dist/predicate/isLength.mjs
10222
10281
  function isLength(value) {
10223
10282
  return Number.isSafeInteger(value) && value >= 0;
10224
10283
  }
10225
10284
 
10226
10285
  //#endregion
10227
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs
10286
+ //#region ../../node_modules/.pnpm/es-toolkit@1.46.0/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs
10228
10287
  function isArrayLike(value) {
10229
10288
  return value != null && typeof value !== "function" && isLength(value.length);
10230
10289
  }
10231
10290
 
10232
10291
  //#endregion
10233
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
10292
+ //#region ../../node_modules/.pnpm/es-toolkit@1.46.0/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
10234
10293
  function isUnsafeProperty(key) {
10235
10294
  return key === "__proto__";
10236
10295
  }
10237
10296
 
10238
10297
  //#endregion
10239
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
10298
+ //#region ../../node_modules/.pnpm/es-toolkit@1.46.0/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
10240
10299
  function isPrimitive(value) {
10241
10300
  return value == null || typeof value !== "object" && typeof value !== "function";
10242
10301
  }
10243
10302
 
10244
10303
  //#endregion
10245
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
10304
+ //#region ../../node_modules/.pnpm/es-toolkit@1.46.0/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
10246
10305
  function getSymbols(object) {
10247
10306
  return Object.getOwnPropertySymbols(object).filter((symbol) => Object.prototype.propertyIsEnumerable.call(object, symbol));
10248
10307
  }
10249
10308
 
10250
10309
  //#endregion
10251
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
10310
+ //#region ../../node_modules/.pnpm/es-toolkit@1.46.0/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
10252
10311
  function getTag(value) {
10253
10312
  if (value == null) return value === void 0 ? "[object Undefined]" : "[object Null]";
10254
10313
  return Object.prototype.toString.call(value);
10255
10314
  }
10256
10315
 
10257
10316
  //#endregion
10258
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/_internal/tags.mjs
10317
+ //#region ../../node_modules/.pnpm/es-toolkit@1.46.0/node_modules/es-toolkit/dist/compat/_internal/tags.mjs
10259
10318
  const regexpTag = "[object RegExp]";
10260
10319
  const stringTag = "[object String]";
10261
10320
  const numberTag = "[object Number]";
@@ -10280,13 +10339,25 @@ const float32ArrayTag = "[object Float32Array]";
10280
10339
  const float64ArrayTag = "[object Float64Array]";
10281
10340
 
10282
10341
  //#endregion
10283
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
10342
+ //#region ../../node_modules/.pnpm/es-toolkit@1.46.0/node_modules/es-toolkit/dist/_internal/globalThis.mjs
10343
+ const globalThis_ = typeof globalThis === "object" && globalThis || typeof window === "object" && window || typeof self === "object" && self || typeof global === "object" && global || (function() {
10344
+ return this;
10345
+ })() || Function("return this")();
10346
+
10347
+ //#endregion
10348
+ //#region ../../node_modules/.pnpm/es-toolkit@1.46.0/node_modules/es-toolkit/dist/predicate/isBuffer.mjs
10349
+ function isBuffer(x) {
10350
+ return typeof globalThis_.Buffer !== "undefined" && globalThis_.Buffer.isBuffer(x);
10351
+ }
10352
+
10353
+ //#endregion
10354
+ //#region ../../node_modules/.pnpm/es-toolkit@1.46.0/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
10284
10355
  function isTypedArray$2(x) {
10285
10356
  return ArrayBuffer.isView(x) && !(x instanceof DataView);
10286
10357
  }
10287
10358
 
10288
10359
  //#endregion
10289
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
10360
+ //#region ../../node_modules/.pnpm/es-toolkit@1.46.0/node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
10290
10361
  function cloneDeepWith$1(obj, cloneValue) {
10291
10362
  return cloneDeepWithImpl(obj, void 0, obj, /* @__PURE__ */ new Map(), cloneValue);
10292
10363
  }
@@ -10321,7 +10392,7 @@ function cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = /* @
10321
10392
  for (const value of valueToClone) result.add(cloneDeepWithImpl(value, void 0, objectToClone, stack, cloneValue));
10322
10393
  return result;
10323
10394
  }
10324
- if (typeof Buffer !== "undefined" && Buffer.isBuffer(valueToClone)) return valueToClone.subarray();
10395
+ if (isBuffer(valueToClone)) return valueToClone.subarray();
10325
10396
  if (isTypedArray$2(valueToClone)) {
10326
10397
  const result = new (Object.getPrototypeOf(valueToClone)).constructor(valueToClone.length);
10327
10398
  stack.set(valueToClone, result);
@@ -10421,7 +10492,7 @@ function isCloneableObject(object) {
10421
10492
  }
10422
10493
 
10423
10494
  //#endregion
10424
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.mjs
10495
+ //#region ../../node_modules/.pnpm/es-toolkit@1.46.0/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.mjs
10425
10496
  function cloneDeepWith(obj, customizer) {
10426
10497
  return cloneDeepWith$1(obj, (value, key, object, stack) => {
10427
10498
  const cloned = customizer?.(value, key, object, stack);
@@ -10454,37 +10525,37 @@ function cloneDeepWith(obj, customizer) {
10454
10525
  }
10455
10526
 
10456
10527
  //#endregion
10457
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/object/cloneDeep.mjs
10528
+ //#region ../../node_modules/.pnpm/es-toolkit@1.46.0/node_modules/es-toolkit/dist/compat/object/cloneDeep.mjs
10458
10529
  function cloneDeep(obj) {
10459
10530
  return cloneDeepWith(obj);
10460
10531
  }
10461
10532
 
10462
10533
  //#endregion
10463
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/predicate/isArguments.mjs
10534
+ //#region ../../node_modules/.pnpm/es-toolkit@1.46.0/node_modules/es-toolkit/dist/compat/predicate/isArguments.mjs
10464
10535
  function isArguments$1(value) {
10465
10536
  return value !== null && typeof value === "object" && getTag(value) === "[object Arguments]";
10466
10537
  }
10467
10538
 
10468
10539
  //#endregion
10469
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.mjs
10540
+ //#region ../../node_modules/.pnpm/es-toolkit@1.46.0/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.mjs
10470
10541
  function isObjectLike(value) {
10471
10542
  return typeof value === "object" && value !== null;
10472
10543
  }
10473
10544
 
10474
10545
  //#endregion
10475
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.mjs
10546
+ //#region ../../node_modules/.pnpm/es-toolkit@1.46.0/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.mjs
10476
10547
  function isArrayLikeObject(value) {
10477
10548
  return isObjectLike(value) && isArrayLike(value);
10478
10549
  }
10479
10550
 
10480
10551
  //#endregion
10481
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.mjs
10552
+ //#region ../../node_modules/.pnpm/es-toolkit@1.46.0/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.mjs
10482
10553
  function isTypedArray$1(x) {
10483
10554
  return isTypedArray$2(x);
10484
10555
  }
10485
10556
 
10486
10557
  //#endregion
10487
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.mjs
10558
+ //#region ../../node_modules/.pnpm/es-toolkit@1.46.0/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.mjs
10488
10559
  function isPlainObject(object) {
10489
10560
  if (typeof object !== "object") return false;
10490
10561
  if (object == null) return false;
@@ -10501,7 +10572,7 @@ function isPlainObject(object) {
10501
10572
  }
10502
10573
 
10503
10574
  //#endregion
10504
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/object/clone.mjs
10575
+ //#region ../../node_modules/.pnpm/es-toolkit@1.46.0/node_modules/es-toolkit/dist/object/clone.mjs
10505
10576
  function clone$1(obj) {
10506
10577
  if (isPrimitive(obj)) return obj;
10507
10578
  if (Array.isArray(obj) || isTypedArray$2(obj) || obj instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && obj instanceof SharedArrayBuffer) return obj.slice(0);
@@ -10532,7 +10603,7 @@ function clone$1(obj) {
10532
10603
  }
10533
10604
 
10534
10605
  //#endregion
10535
- //#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/object/mergeWith.mjs
10606
+ //#region ../../node_modules/.pnpm/es-toolkit@1.46.0/node_modules/es-toolkit/dist/compat/object/mergeWith.mjs
10536
10607
  function mergeWith(object, ...otherArgs) {
10537
10608
  const sources = otherArgs.slice(0, -1);
10538
10609
  const merge = otherArgs[otherArgs.length - 1];
@@ -10560,7 +10631,7 @@ function mergeWithDeep(target, source, merge, stack) {
10560
10631
  let targetValue = target[key];
10561
10632
  if (isArguments$1(sourceValue)) sourceValue = { ...sourceValue };
10562
10633
  if (isArguments$1(targetValue)) targetValue = { ...targetValue };
10563
- if (typeof Buffer !== "undefined" && Buffer.isBuffer(sourceValue)) sourceValue = cloneDeep(sourceValue);
10634
+ if (isBuffer(sourceValue)) sourceValue = cloneDeep(sourceValue);
10564
10635
  if (Array.isArray(sourceValue)) if (Array.isArray(targetValue)) {
10565
10636
  const cloned = [];
10566
10637
  const targetKeys = Reflect.ownKeys(targetValue);
@@ -13209,8 +13280,7 @@ var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => {
13209
13280
  this._state = DEFLATING;
13210
13281
  perMessageDeflate.compress(data, options.fin, (_, buf) => {
13211
13282
  if (this._socket.destroyed) {
13212
- const err = /* @__PURE__ */ new Error("The socket was closed while data was being compressed");
13213
- callCallbacks(this, err, cb);
13283
+ callCallbacks(this, /* @__PURE__ */ new Error("The socket was closed while data was being compressed"), cb);
13214
13284
  return;
13215
13285
  }
13216
13286
  this._bufferedBytes -= options[kByteLength];
@@ -35149,8 +35219,7 @@ var require__stream_writable$1 = /* @__PURE__ */ __commonJSMin(((exports, module
35149
35219
  this.ended = false;
35150
35220
  this.finished = false;
35151
35221
  this.destroyed = false;
35152
- var noDecode = options.decodeStrings === false;
35153
- this.decodeStrings = !noDecode;
35222
+ this.decodeStrings = !(options.decodeStrings === false);
35154
35223
  this.defaultEncoding = options.defaultEncoding || "utf8";
35155
35224
  this.length = 0;
35156
35225
  this.writing = false;
@@ -94845,9 +94914,8 @@ var init_pdf$1 = __esmMin((() => {
94845
94914
  constructor(parent) {
94846
94915
  super();
94847
94916
  const { map, hash, transfer } = parent.serializable;
94848
- const clone = structuredClone(map, transfer ? { transfer } : null);
94849
94917
  this.#serializable = {
94850
- map: clone,
94918
+ map: structuredClone(map, transfer ? { transfer } : null),
94851
94919
  hash,
94852
94920
  transfer
94853
94921
  };
@@ -98853,8 +98921,7 @@ var init_pdf$1 = __esmMin((() => {
98853
98921
  if (!this.contentVisible) return;
98854
98922
  this.groupLevel--;
98855
98923
  const groupCtx = this.ctx;
98856
- const ctx = this.groupStack.pop();
98857
- this.ctx = ctx;
98924
+ this.ctx = this.groupStack.pop();
98858
98925
  this.ctx.imageSmoothingEnabled = false;
98859
98926
  this.dependencyTracker?.popBaseTransform();
98860
98927
  if (group.smask) {
@@ -100242,8 +100309,7 @@ var init_pdf$1 = __esmMin((() => {
100242
100309
  this._loaded = 0;
100243
100310
  this._readableStream = null;
100244
100311
  this._readCapability = Promise.withResolvers();
100245
- const source = stream.source;
100246
- this._isStreamingSupported = !source.disableStream;
100312
+ this._isStreamingSupported = !stream.source.disableStream;
100247
100313
  const fs = process.getBuiltinModule("fs");
100248
100314
  this._setReadableStream(fs.createReadStream(this._url, {
100249
100315
  start,
@@ -101822,11 +101888,10 @@ var init_pdf$1 = __esmMin((() => {
101822
101888
  this.stepper.nextBreakPoint = this.stepper.getNextBreakPoint();
101823
101889
  }
101824
101890
  const { viewport, transform, background, dependencyTracker } = this.params;
101825
- const canvasContext = this._canvasContext || this._canvas.getContext("2d", {
101891
+ this.gfx = new CanvasGraphics(this._canvasContext || this._canvas.getContext("2d", {
101826
101892
  alpha: false,
101827
101893
  willReadFrequently: !this._enableHWA
101828
- });
101829
- this.gfx = new CanvasGraphics(canvasContext, this.commonObjs, this.objs, this.canvasFactory, this.filterFactory, { optionalContentConfig }, this.annotationCanvasMap, this.pageColors, dependencyTracker);
101894
+ }), this.commonObjs, this.objs, this.canvasFactory, this.filterFactory, { optionalContentConfig }, this.annotationCanvasMap, this.pageColors, dependencyTracker);
101830
101895
  this.gfx.beginDrawing({
101831
101896
  transform,
101832
101897
  viewport,
@@ -106185,11 +106250,9 @@ var init_pdf$1 = __esmMin((() => {
106185
106250
  return { numberOfColors: data.get("color").size };
106186
106251
  }
106187
106252
  #createOutlines() {
106188
- const outliner = new HighlightOutliner(this.#boxes, .001);
106189
- this.#highlightOutlines = outliner.getOutlines();
106253
+ this.#highlightOutlines = new HighlightOutliner(this.#boxes, .001).getOutlines();
106190
106254
  [this.x, this.y, this.width, this.height] = this.#highlightOutlines.box;
106191
- const outlinerForOutline = new HighlightOutliner(this.#boxes, .0025, .001, this._uiManager.direction === "ltr");
106192
- this.#focusOutlines = outlinerForOutline.getOutlines();
106255
+ this.#focusOutlines = new HighlightOutliner(this.#boxes, .0025, .001, this._uiManager.direction === "ltr").getOutlines();
106193
106256
  const { firstPoint } = this.#highlightOutlines;
106194
106257
  this.#firstPoint = [(firstPoint[0] - this.x) / this.width, (firstPoint[1] - this.y) / this.height];
106195
106258
  const { lastPoint } = this.#focusOutlines;
@@ -106197,8 +106260,7 @@ var init_pdf$1 = __esmMin((() => {
106197
106260
  }
106198
106261
  #createFreeOutlines({ highlightOutlines, highlightId, clipPathId }) {
106199
106262
  this.#highlightOutlines = highlightOutlines;
106200
- const extraThickness = 1.5;
106201
- this.#focusOutlines = highlightOutlines.getNewOutline(this.#thickness / 2 + extraThickness, .0025);
106263
+ this.#focusOutlines = highlightOutlines.getNewOutline(this.#thickness / 2 + 1.5, .0025);
106202
106264
  if (highlightId >= 0) {
106203
106265
  this.#id = highlightId;
106204
106266
  this.#clipPathId = clipPathId;
@@ -109185,11 +109247,10 @@ var init_pdf$1 = __esmMin((() => {
109185
109247
  onScaleChanging() {
109186
109248
  if (!this.parent) return;
109187
109249
  if (this.#resizeTimeoutId !== null) clearTimeout(this.#resizeTimeoutId);
109188
- const TIME_TO_WAIT = 200;
109189
109250
  this.#resizeTimeoutId = setTimeout(() => {
109190
109251
  this.#resizeTimeoutId = null;
109191
109252
  this.#drawBitmap();
109192
- }, TIME_TO_WAIT);
109253
+ }, 200);
109193
109254
  }
109194
109255
  #createCanvas() {
109195
109256
  const { div } = this;
@@ -127823,10 +127884,9 @@ var init_pdf_worker = __esmMin((() => {
127823
127884
  this.stream = str;
127824
127885
  this.dict = str.dict;
127825
127886
  if (!(params instanceof Dict)) params = Dict.empty;
127826
- const source = { next() {
127887
+ this.ccittFaxDecoder = new CCITTFaxDecoder({ next() {
127827
127888
  return str.getByte();
127828
- } };
127829
- this.ccittFaxDecoder = new CCITTFaxDecoder(source, {
127889
+ } }, {
127830
127890
  K: params.get("K"),
127831
127891
  EndOfLine: params.get("EndOfLine"),
127832
127892
  EncodedByteAlign: params.get("EncodedByteAlign"),
@@ -142002,8 +142062,7 @@ var init_pdf_worker = __esmMin((() => {
142002
142062
  CFFFont = class {
142003
142063
  constructor(file, properties) {
142004
142064
  this.properties = properties;
142005
- const parser = new CFFParser(file, properties, SEAC_ANALYSIS_ENABLED);
142006
- this.cff = parser.parse();
142065
+ this.cff = new CFFParser(file, properties, SEAC_ANALYSIS_ENABLED).parse();
142007
142066
  this.cff.duplicateFirstGlyph();
142008
142067
  const compiler = new CFFCompiler(this.cff);
142009
142068
  this.seacs = this.cff.seacs;
@@ -172111,8 +172170,7 @@ var init_pdf_worker = __esmMin((() => {
172111
172170
  this.firstChar = Infinity;
172112
172171
  this.lastChar = -Infinity;
172113
172172
  this.fontFamily = fontFamily;
172114
- const canvas = new OffscreenCanvas(1, 1);
172115
- this.ctxMeasure = canvas.getContext("2d", { willReadFrequently: true });
172173
+ this.ctxMeasure = new OffscreenCanvas(1, 1).getContext("2d", { willReadFrequently: true });
172116
172174
  if (!FakeUnicodeFont._fontNameId) FakeUnicodeFont._fontNameId = 1;
172117
172175
  this.fontName = Name.get(`InvalidPDFjsFont_${fontFamily}_${FakeUnicodeFont._fontNameId++}`);
172118
172176
  }
@@ -185738,8 +185796,7 @@ var init_pdf_worker = __esmMin((() => {
185738
185796
  }
185739
185797
  if (this._isOffscreenCanvasSupported) {
185740
185798
  const strokeAlpha = params.dict.get("CA");
185741
- const fakeUnicodeFont = new FakeUnicodeFont(xref, "sans-serif");
185742
- this.appearance = fakeUnicodeFont.createAppearance(this._contents.str, this.rectangle, this.rotation, fontSize, fontColor, strokeAlpha);
185799
+ this.appearance = new FakeUnicodeFont(xref, "sans-serif").createAppearance(this._contents.str, this.rectangle, this.rotation, fontSize, fontColor, strokeAlpha);
185743
185800
  this._streams.push(this.appearance);
185744
185801
  } else warn("FreeTextAnnotation: OffscreenCanvas is not supported, annotation may not render correctly.");
185745
185802
  }
@@ -189088,9 +189145,8 @@ var init_pdf_worker = __esmMin((() => {
189088
189145
  if (!("streamState" in this)) {
189089
189146
  const { dict, pos } = stream;
189090
189147
  const byteWidths = dict.get("W");
189091
- const range = dict.get("Index") || [0, dict.get("Size")];
189092
189148
  this.streamState = {
189093
- entryRanges: range,
189149
+ entryRanges: dict.get("Index") || [0, dict.get("Size")],
189094
189150
  byteWidths,
189095
189151
  entryNum: 0,
189096
189152
  streamPos: pos
@@ -190132,8 +190188,7 @@ var init_pdf_worker = __esmMin((() => {
190132
190188
  if (!stream) continue;
190133
190189
  try {
190134
190190
  const str = stringToUTF8String(stream.getString());
190135
- const data = { [key]: str };
190136
- return shadow(this, "xfaDatasets", new DatasetReader(data));
190191
+ return shadow(this, "xfaDatasets", new DatasetReader({ [key]: str }));
190137
190192
  } catch {
190138
190193
  warn("XFA - Invalid utf-8 string.");
190139
190194
  break;
@@ -192013,8 +192068,7 @@ var init_pdf_worker = __esmMin((() => {
192013
192068
  this._contentLength = null;
192014
192069
  this._isRangeSupported = false;
192015
192070
  this._isStreamingSupported = false;
192016
- const readableStream = this._msgHandler.sendWithStream("GetReader");
192017
- this._reader = readableStream.getReader();
192071
+ this._reader = this._msgHandler.sendWithStream("GetReader").getReader();
192018
192072
  this._headersReady = this._msgHandler.sendWithPromise("ReaderHeadersReady").then((data) => {
192019
192073
  this._isStreamingSupported = data.isStreamingSupported;
192020
192074
  this._isRangeSupported = data.isRangeSupported;
@@ -192052,11 +192106,10 @@ var init_pdf_worker = __esmMin((() => {
192052
192106
  constructor(begin, end, msgHandler) {
192053
192107
  this._msgHandler = msgHandler;
192054
192108
  this.onProgress = null;
192055
- const readableStream = this._msgHandler.sendWithStream("GetRangeReader", {
192109
+ this._reader = this._msgHandler.sendWithStream("GetRangeReader", {
192056
192110
  begin,
192057
192111
  end
192058
- });
192059
- this._reader = readableStream.getReader();
192112
+ }).getReader();
192060
192113
  }
192061
192114
  get isStreamingSupported() {
192062
192115
  return false;
@@ -199170,8 +199223,7 @@ var require__stream_writable = /* @__PURE__ */ __commonJSMin(((exports, module)
199170
199223
  this.ended = false;
199171
199224
  this.finished = false;
199172
199225
  this.destroyed = false;
199173
- var noDecode = options.decodeStrings === false;
199174
- this.decodeStrings = !noDecode;
199226
+ this.decodeStrings = !(options.decodeStrings === false);
199175
199227
  this.defaultEncoding = options.defaultEncoding || "utf8";
199176
199228
  this.length = 0;
199177
199229
  this.writing = false;
@@ -206404,6 +206456,33 @@ const guessMediaTypeFromUrl = (url) => {
206404
206456
  }
206405
206457
  };
206406
206458
  const cacheKeyForUrl = (source) => sha256Hex(source.id || source.url);
206459
+ const isRecognizedImageMediaType = (mediaType) => Boolean(EXT_BY_MEDIA_TYPE[mediaType]);
206460
+ /**
206461
+ * Choose the most trustworthy image media type given the available signals.
206462
+ *
206463
+ * Generic / non-image header values (`application/octet-stream`, `text/plain`,
206464
+ * empty) are common from CDNs that strip extensions and fall back to a default
206465
+ * Content-Type — we'd rather sniff the URL extension or PNG/JPEG/GIF/WebP byte
206466
+ * signatures than serialize an unrecognized type into a `media_type` field
206467
+ * that downstream agents (Claude API) will reject.
206468
+ *
206469
+ * Resolution order:
206470
+ * 1. Header type, only if it's a recognized image/* we know how to extension-map
206471
+ * 2. URL extension hint
206472
+ * 3. Byte-signature sniff
206473
+ * 4. Raw header value as a last resort (preserves whatever the server claimed
206474
+ * so the caller at least sees the original signal)
206475
+ * 5. `image/png` fallback
206476
+ */
206477
+ const pickImageMediaType = (rawHeaderType, url, buffer) => {
206478
+ const headerType = normalizeMediaType(rawHeaderType);
206479
+ if (headerType && isRecognizedImageMediaType(headerType)) return headerType;
206480
+ const urlType = url ? guessMediaTypeFromUrl(url) : void 0;
206481
+ if (urlType) return urlType;
206482
+ const sniffed = guessMediaTypeFromBuffer(buffer);
206483
+ if (sniffed) return sniffed;
206484
+ return headerType || "image/png";
206485
+ };
206407
206486
  const fetchUrlImage = async (source, options) => {
206408
206487
  const fetcher = options.fetcher ?? fetch;
206409
206488
  const cacheDir = options.cacheDir;
@@ -206416,14 +206495,14 @@ const fetchUrlImage = async (source, options) => {
206416
206495
  const buffer = await readFile(dataPath);
206417
206496
  return {
206418
206497
  buffer,
206419
- mediaType: normalizeMediaType(meta.mediaType) || guessMediaTypeFromBuffer(buffer) || "image/png"
206498
+ mediaType: pickImageMediaType(meta.mediaType, source.url, buffer)
206420
206499
  };
206421
206500
  } catch {}
206422
206501
  }
206423
206502
  const res = await fetcher(source.url);
206424
206503
  if (!res.ok) throw new Error(`Failed to fetch image at ${source.url}: ${res.status} ${res.statusText || ""}`.trim());
206425
206504
  const buffer = Buffer.from(await res.arrayBuffer());
206426
- const mediaType = normalizeMediaType(res.headers.get("content-type")) || guessMediaTypeFromUrl(source.url) || guessMediaTypeFromBuffer(buffer) || "image/png";
206505
+ const mediaType = pickImageMediaType(res.headers.get("content-type"), source.url, buffer);
206427
206506
  if (cacheDir) {
206428
206507
  const key = cacheKeyForUrl(source);
206429
206508
  await mkdir(cacheDir, { recursive: true });
@@ -206450,7 +206529,7 @@ const decodeBase64Image = (data, mediaType) => {
206450
206529
  const buffer = Buffer.from(data, "base64");
206451
206530
  return {
206452
206531
  buffer,
206453
- mediaType: normalizeMediaType(mediaType) || guessMediaTypeFromBuffer(buffer) || "image/png"
206532
+ mediaType: pickImageMediaType(mediaType, void 0, buffer)
206454
206533
  };
206455
206534
  };
206456
206535
  /**
@@ -206873,14 +206952,20 @@ const exec = async (options) => {
206873
206952
  process.exit(2);
206874
206953
  }
206875
206954
  const operationId = options.operationId || randomUUID();
206876
- const handle = await spawnAgent({
206877
- agentType: options.type,
206878
- command: options.command,
206879
- cwd: options.cwd || process.cwd(),
206880
- operationId,
206881
- prompt: resolved.prompt,
206882
- resumeSessionId: options.resume
206883
- });
206955
+ let handle;
206956
+ try {
206957
+ handle = await spawnAgent({
206958
+ agentType: options.type,
206959
+ command: options.command,
206960
+ cwd: options.cwd || process.cwd(),
206961
+ operationId,
206962
+ prompt: resolved.prompt,
206963
+ resumeSessionId: options.resume
206964
+ });
206965
+ } catch (err) {
206966
+ log$7.error("Failed to start agent:", err instanceof Error ? err.message : String(err));
206967
+ process.exit(1);
206968
+ }
206884
206969
  handle.stderr.pipe(process.stderr);
206885
206970
  let interrupted = false;
206886
206971
  const onSigint = () => {
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.10" "User Commands"
3
+ .TH LH 1 "" "@lobehub/cli 0.0.11" "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.10",
3
+ "version": "0.0.11",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "lh": "./dist/index.js",
@@ -32,9 +32,9 @@
32
32
  "typescript": "^5.9.3",
33
33
  "ws": "^8.18.1",
34
34
  "@lobechat/agent-gateway-client": "1.0.0",
35
+ "@lobechat/heterogeneous-agents": "1.0.0",
35
36
  "@lobechat/device-gateway-client": "1.0.0",
36
- "@lobechat/local-file-shell": "1.0.0",
37
- "@lobechat/heterogeneous-agents": "1.0.0"
37
+ "@lobechat/local-file-shell": "1.0.0"
38
38
  },
39
39
  "publishConfig": {
40
40
  "access": "public",