@lichao0223/lobehub-cli 0.0.86 → 0.0.87

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
@@ -15,7 +15,7 @@ import { Buffer as Buffer$1 } from "node:buffer";
15
15
  import * as net$1 from "node:net";
16
16
  import net, { BlockList, connect, createServer, isIP } from "node:net";
17
17
  import { scheduler, setImmediate as setImmediate$1, setTimeout as setTimeout$1 } from "node:timers/promises";
18
- import process$1, { cwd, execArgv, execPath, hrtime, platform as platform$1 } from "node:process";
18
+ import _w, { cwd, execArgv, execPath, hrtime, platform as platform$1 } from "node:process";
19
19
  import { URL as URL$1, fileURLToPath, pathToFileURL } from "node:url";
20
20
  import { finished, pipeline } from "node:stream/promises";
21
21
  import { Duplex, PassThrough, Readable, Transform, Writable, getDefaultHighWaterMark, pipeline as pipeline$1 } from "node:stream";
@@ -9007,6 +9007,10 @@ var init_manifest = __esmMin((() => {
9007
9007
  ToolManifestSchema = object$1({
9008
9008
  $schema: string().optional(),
9009
9009
  api: array(LobeChatPluginApiSchema),
9010
+ connector: object$1({
9011
+ id: string(),
9012
+ identifier: string()
9013
+ }).optional(),
9010
9014
  connectorLinks: object$1({
9011
9015
  connectorId: string(),
9012
9016
  param: string()
@@ -12147,6 +12151,10 @@ var init_artboard = __esmMin((() => {}));
12147
12151
  //#region ../../packages/types/src/connector.ts
12148
12152
  var init_connector = __esmMin((() => {}));
12149
12153
 
12154
+ //#endregion
12155
+ //#region ../../packages/types/src/connectorToolIdentifier.ts
12156
+ var init_connectorToolIdentifier = __esmMin((() => {}));
12157
+
12150
12158
  //#endregion
12151
12159
  //#region ../../packages/types/src/inboundWebhook.ts
12152
12160
  var GENERIC_WEBHOOK_TOPIC_MODES, GENERIC_WEBHOOK_IDENTIFIER_PATTERN, InboundWebhookChannelDeliverySchema, McpEventsWebhookConfigSchema, McpEventsWebhookStateSchema, McpEventsWebhookVerificationSchema, GenericWebhookConfigSchema, GenericWebhookStateSchema, GenericWebhookVerificationSchema, InboundWebhookDataSchema;
@@ -12354,6 +12362,7 @@ var init_src$2 = __esmMin((() => {
12354
12362
  init_agentRuntime();
12355
12363
  init_artboard();
12356
12364
  init_connector();
12365
+ init_connectorToolIdentifier();
12357
12366
  init_inboundWebhook();
12358
12367
  init_oauthApp();
12359
12368
  init_chat();
@@ -21916,7 +21925,7 @@ var require_command = /* @__PURE__ */ __commonJSMin$2(((exports) => {
21916
21925
  const childProcess$2 = __require("node:child_process");
21917
21926
  const path$16 = __require("node:path");
21918
21927
  const fs$17 = __require("node:fs");
21919
- const process$3 = __require("node:process");
21928
+ const process$2 = __require("node:process");
21920
21929
  const { Argument, humanReadableArgName } = require_argument();
21921
21930
  const { CommanderError } = require_error$1();
21922
21931
  const { Help, stripColor } = require_help();
@@ -21968,13 +21977,13 @@ var require_command = /* @__PURE__ */ __commonJSMin$2(((exports) => {
21968
21977
  this._showSuggestionAfterError = true;
21969
21978
  this._savedState = null;
21970
21979
  this._outputConfiguration = {
21971
- writeOut: (str) => process$3.stdout.write(str),
21972
- writeErr: (str) => process$3.stderr.write(str),
21980
+ writeOut: (str) => process$2.stdout.write(str),
21981
+ writeErr: (str) => process$2.stderr.write(str),
21973
21982
  outputError: (str, write) => write(str),
21974
- getOutHelpWidth: () => process$3.stdout.isTTY ? process$3.stdout.columns : void 0,
21975
- getErrHelpWidth: () => process$3.stderr.isTTY ? process$3.stderr.columns : void 0,
21976
- getOutHasColors: () => useColor() ?? (process$3.stdout.isTTY && process$3.stdout.hasColors?.()),
21977
- getErrHasColors: () => useColor() ?? (process$3.stderr.isTTY && process$3.stderr.hasColors?.()),
21983
+ getOutHelpWidth: () => process$2.stdout.isTTY ? process$2.stdout.columns : void 0,
21984
+ getErrHelpWidth: () => process$2.stderr.isTTY ? process$2.stderr.columns : void 0,
21985
+ getOutHasColors: () => useColor() ?? (process$2.stdout.isTTY && process$2.stdout.hasColors?.()),
21986
+ getErrHasColors: () => useColor() ?? (process$2.stderr.isTTY && process$2.stderr.hasColors?.()),
21978
21987
  stripColor: (str) => stripColor(str)
21979
21988
  };
21980
21989
  this._hidden = false;
@@ -22332,7 +22341,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
22332
22341
  */
22333
22342
  _exit(exitCode, code, message) {
22334
22343
  if (this._exitCallback) this._exitCallback(new CommanderError(exitCode, code, message));
22335
- process$3.exit(exitCode);
22344
+ process$2.exit(exitCode);
22336
22345
  }
22337
22346
  /**
22338
22347
  * Register callback `fn` for the command.
@@ -22671,11 +22680,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
22671
22680
  if (argv !== void 0 && !Array.isArray(argv)) throw new Error("first parameter to parse must be array or undefined");
22672
22681
  parseOptions = parseOptions || {};
22673
22682
  if (argv === void 0 && parseOptions.from === void 0) {
22674
- if (process$3.versions?.electron) parseOptions.from = "electron";
22675
- const execArgv = process$3.execArgv ?? [];
22683
+ if (process$2.versions?.electron) parseOptions.from = "electron";
22684
+ const execArgv = process$2.execArgv ?? [];
22676
22685
  if (execArgv.includes("-e") || execArgv.includes("--eval") || execArgv.includes("-p") || execArgv.includes("--print")) parseOptions.from = "eval";
22677
22686
  }
22678
- if (argv === void 0) argv = process$3.argv;
22687
+ if (argv === void 0) argv = process$2.argv;
22679
22688
  this.rawArgs = argv.slice();
22680
22689
  let userArgs;
22681
22690
  switch (parseOptions.from) {
@@ -22685,7 +22694,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
22685
22694
  userArgs = argv.slice(2);
22686
22695
  break;
22687
22696
  case "electron":
22688
- if (process$3.defaultApp) {
22697
+ if (process$2.defaultApp) {
22689
22698
  this._scriptPath = argv[1];
22690
22699
  userArgs = argv.slice(2);
22691
22700
  } else userArgs = argv.slice(1);
@@ -22850,16 +22859,16 @@ Expecting one of '${allowedValues.join("', '")}'`);
22850
22859
  }
22851
22860
  launchWithNode = sourceExt.includes(path$16.extname(executableFile));
22852
22861
  let proc;
22853
- if (process$3.platform !== "win32") if (launchWithNode) {
22862
+ if (process$2.platform !== "win32") if (launchWithNode) {
22854
22863
  args.unshift(executableFile);
22855
- args = incrementNodeInspectorPort(process$3.execArgv).concat(args);
22856
- proc = childProcess$2.spawn(process$3.argv[0], args, { stdio: "inherit" });
22864
+ args = incrementNodeInspectorPort(process$2.execArgv).concat(args);
22865
+ proc = childProcess$2.spawn(process$2.argv[0], args, { stdio: "inherit" });
22857
22866
  } else proc = childProcess$2.spawn(executableFile, args, { stdio: "inherit" });
22858
22867
  else {
22859
22868
  this._checkForMissingExecutable(executableFile, executableDir, subcommand._name);
22860
22869
  args.unshift(executableFile);
22861
- args = incrementNodeInspectorPort(process$3.execArgv).concat(args);
22862
- proc = childProcess$2.spawn(process$3.execPath, args, { stdio: "inherit" });
22870
+ args = incrementNodeInspectorPort(process$2.execArgv).concat(args);
22871
+ proc = childProcess$2.spawn(process$2.execPath, args, { stdio: "inherit" });
22863
22872
  }
22864
22873
  if (!proc.killed) [
22865
22874
  "SIGUSR1",
@@ -22868,20 +22877,20 @@ Expecting one of '${allowedValues.join("', '")}'`);
22868
22877
  "SIGINT",
22869
22878
  "SIGHUP"
22870
22879
  ].forEach((signal) => {
22871
- process$3.on(signal, () => {
22880
+ process$2.on(signal, () => {
22872
22881
  if (proc.killed === false && proc.exitCode === null) proc.kill(signal);
22873
22882
  });
22874
22883
  });
22875
22884
  const exitCallback = this._exitCallback;
22876
22885
  proc.on("close", (code) => {
22877
22886
  code = code ?? 1;
22878
- if (!exitCallback) process$3.exit(code);
22887
+ if (!exitCallback) process$2.exit(code);
22879
22888
  else exitCallback(new CommanderError(code, "commander.executeSubCommandAsync", "(close)"));
22880
22889
  });
22881
22890
  proc.on("error", (err) => {
22882
22891
  if (err.code === "ENOENT") this._checkForMissingExecutable(executableFile, executableDir, subcommand._name);
22883
22892
  else if (err.code === "EACCES") throw new Error(`'${executableFile}' not executable`);
22884
- if (!exitCallback) process$3.exit(1);
22893
+ if (!exitCallback) process$2.exit(1);
22885
22894
  else {
22886
22895
  const wrappedError = new CommanderError(1, "commander.executeSubCommandAsync", "(error)");
22887
22896
  wrappedError.nestedError = err;
@@ -23290,13 +23299,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
23290
23299
  */
23291
23300
  _parseOptionsEnv() {
23292
23301
  this.options.forEach((option) => {
23293
- if (option.envVar && option.envVar in process$3.env) {
23302
+ if (option.envVar && option.envVar in process$2.env) {
23294
23303
  const optionKey = option.attributeName();
23295
23304
  if (this.getOptionValue(optionKey) === void 0 || [
23296
23305
  "default",
23297
23306
  "config",
23298
23307
  "env"
23299
- ].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$3.env[option.envVar]);
23308
+ ].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$2.env[option.envVar]);
23300
23309
  else this.emit(`optionEnv:${option.name()}`);
23301
23310
  }
23302
23311
  });
@@ -23713,7 +23722,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
23713
23722
  */
23714
23723
  help(contextOptions) {
23715
23724
  this.outputHelp(contextOptions);
23716
- let exitCode = Number(process$3.exitCode ?? 0);
23725
+ let exitCode = Number(process$2.exitCode ?? 0);
23717
23726
  if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) exitCode = 1;
23718
23727
  this._exit(exitCode, "commander.help", "(outputHelp)");
23719
23728
  }
@@ -23803,8 +23812,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
23803
23812
  * @package
23804
23813
  */
23805
23814
  function useColor() {
23806
- if (process$3.env.NO_COLOR || process$3.env.FORCE_COLOR === "0" || process$3.env.FORCE_COLOR === "false") return false;
23807
- if (process$3.env.FORCE_COLOR || process$3.env.CLICOLOR_FORCE !== void 0) return true;
23815
+ if (process$2.env.NO_COLOR || process$2.env.FORCE_COLOR === "0" || process$2.env.FORCE_COLOR === "false") return false;
23816
+ if (process$2.env.FORCE_COLOR || process$2.env.CLICOLOR_FORCE !== void 0) return true;
23808
23817
  }
23809
23818
  exports.Command = Command;
23810
23819
  exports.useColor = useColor;
@@ -332550,7 +332559,7 @@ var stdio_exports = /* @__PURE__ */ __exportAll$2({
332550
332559
  function getDefaultEnvironment() {
332551
332560
  const env = {};
332552
332561
  for (const key of DEFAULT_INHERITED_ENV_VARS) {
332553
- const value = process$1.env[key];
332562
+ const value = _w.env[key];
332554
332563
  if (value === void 0) continue;
332555
332564
  if (value.startsWith("()")) continue;
332556
332565
  env[key] = value;
@@ -332561,7 +332570,7 @@ var import_cross_spawn$1, DEFAULT_INHERITED_ENV_VARS, StdioClientTransport;
332561
332570
  var init_stdio = __esmMin((() => {
332562
332571
  init_src_CeKsbNLO();
332563
332572
  import_cross_spawn$1 = /* @__PURE__ */ __toESM$2(require_cross_spawn(), 1);
332564
- DEFAULT_INHERITED_ENV_VARS = process$1.platform === "win32" ? [
332573
+ DEFAULT_INHERITED_ENV_VARS = _w.platform === "win32" ? [
332565
332574
  "APPDATA",
332566
332575
  "COMSPEC",
332567
332576
  "HOMEDRIVE",
@@ -332618,7 +332627,7 @@ var init_stdio = __esmMin((() => {
332618
332627
  this._serverParams.stderr ?? "inherit"
332619
332628
  ],
332620
332629
  shell: false,
332621
- windowsHide: process$1.platform === "win32",
332630
+ windowsHide: _w.platform === "win32",
332622
332631
  cwd: this._serverParams.cwd
332623
332632
  });
332624
332633
  this._process.on("error", (error) => {
@@ -335652,9 +335661,9 @@ const getSubprocessResult = ({ stdout }) => {
335652
335661
  //#region node_modules/.pnpm/execa@9.6.1/node_modules/execa/lib/utils/standard-stream.js
335653
335662
  const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
335654
335663
  const STANDARD_STREAMS = [
335655
- process$1.stdin,
335656
- process$1.stdout,
335657
- process$1.stderr
335664
+ _w.stdin,
335665
+ _w.stdout,
335666
+ _w.stderr
335658
335667
  ];
335659
335668
  const STANDARD_STREAMS_ALIASES = [
335660
335669
  "stdin",
@@ -335779,9 +335788,9 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
335779
335788
  //#endregion
335780
335789
  //#region node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
335781
335790
  function isUnicodeSupported() {
335782
- const { env } = process$1;
335791
+ const { env } = _w;
335783
335792
  const { TERM, TERM_PROGRAM } = env;
335784
- if (process$1.platform !== "win32") return TERM !== "linux";
335793
+ if (_w.platform !== "win32") return TERM !== "linux";
335785
335794
  return Boolean(env.WT_SESSION) || Boolean(env.TERMINUS_SUBLIME) || env.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
335786
335795
  }
335787
335796
 
@@ -336316,7 +336325,7 @@ function traversePathUp(startPath) {
336316
336325
 
336317
336326
  //#endregion
336318
336327
  //#region node_modules/.pnpm/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
336319
- const npmRunPath = ({ cwd = process$1.cwd(), path: pathOption = process$1.env[pathKey()], preferLocal = true, execPath = process$1.execPath, addExecPath = true } = {}) => {
336328
+ const npmRunPath = ({ cwd = _w.cwd(), path: pathOption = _w.env[pathKey()], preferLocal = true, execPath = _w.execPath, addExecPath = true } = {}) => {
336320
336329
  const cwdPath = path.resolve(toPath(cwd));
336321
336330
  const result = [];
336322
336331
  const pathParts = pathOption.split(path.delimiter);
@@ -336334,7 +336343,7 @@ const applyExecPath = (result, pathParts, execPath, cwdPath) => {
336334
336343
  const pathPart = path.resolve(cwdPath, toPath(execPath), "..");
336335
336344
  if (!pathParts.includes(pathPart)) result.push(pathPart);
336336
336345
  };
336337
- const npmRunPathEnv = ({ env = process$1.env, ...options } = {}) => {
336346
+ const npmRunPathEnv = ({ env = _w.env, ...options } = {}) => {
336338
336347
  env = { ...env };
336339
336348
  const pathName = pathKey({ env });
336340
336349
  options.path = env[pathName];
@@ -337469,7 +337478,7 @@ const normalizeCwd = (cwd = getDefaultCwd()) => {
337469
337478
  };
337470
337479
  const getDefaultCwd = () => {
337471
337480
  try {
337472
- return process$1.cwd();
337481
+ return _w.cwd();
337473
337482
  } catch (error) {
337474
337483
  error.message = `The current directory does not exist.\n${error.message}`;
337475
337484
  throw error;
@@ -337505,7 +337514,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
337505
337514
  options.killSignal = normalizeKillSignal(options.killSignal);
337506
337515
  options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
337507
337516
  options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
337508
- if (process$1.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
337517
+ if (_w.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
337509
337518
  return {
337510
337519
  file,
337511
337520
  commandArguments,
@@ -337532,7 +337541,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
337532
337541
  });
337533
337542
  const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
337534
337543
  const env = extendEnv ? {
337535
- ...process$1.env,
337544
+ ..._w.env,
337536
337545
  ...envOption
337537
337546
  } : envOption;
337538
337547
  if (preferLocal || node) return npmRunPathEnv({
@@ -338534,12 +338543,12 @@ const guessStreamDirection = {
338534
338543
  }
338535
338544
  };
338536
338545
  const getStandardStreamDirection = (value) => {
338537
- if ([0, process$1.stdin].includes(value)) return "input";
338546
+ if ([0, _w.stdin].includes(value)) return "input";
338538
338547
  if ([
338539
338548
  1,
338540
338549
  2,
338541
- process$1.stdout,
338542
- process$1.stderr
338550
+ _w.stdout,
338551
+ _w.stderr
338543
338552
  ].includes(value)) return "output";
338544
338553
  };
338545
338554
  const DEFAULT_DIRECTION = "output";
@@ -339603,9 +339612,9 @@ const addIpcMethods = (subprocess, { ipc }) => {
339603
339612
  Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
339604
339613
  };
339605
339614
  const getIpcExport = () => {
339606
- const anyProcess = process$1;
339615
+ const anyProcess = _w;
339607
339616
  const isSubprocess = true;
339608
- const ipc = process$1.channel !== void 0;
339617
+ const ipc = _w.channel !== void 0;
339609
339618
  return {
339610
339619
  ...getIpcMethods(anyProcess, isSubprocess, ipc),
339611
339620
  getCancelSignal: getCancelSignal$1.bind(void 0, {
@@ -340082,7 +340091,7 @@ var SignalExitFallback = class extends SignalExitBase {
340082
340091
  };
340083
340092
  var SignalExit = class extends SignalExitBase {
340084
340093
  /* c8 ignore start */
340085
- #hupSig = process$2.platform === "win32" ? "SIGINT" : "SIGHUP";
340094
+ #hupSig = process$1.platform === "win32" ? "SIGINT" : "SIGHUP";
340086
340095
  /* c8 ignore stop */
340087
340096
  #emitter = new Emitter();
340088
340097
  #process;
@@ -340177,8 +340186,8 @@ var SignalExit = class extends SignalExitBase {
340177
340186
  } else return og.call(this.#process, ev, ...args);
340178
340187
  }
340179
340188
  };
340180
- const process$2 = globalThis.process;
340181
- const { onExit, load: load$1, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
340189
+ const process$1 = globalThis.process;
340190
+ const { onExit, load: load$1, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
340182
340191
 
340183
340192
  //#endregion
340184
340193
  //#region node_modules/.pnpm/execa@9.6.1/node_modules/execa/lib/terminate/cleanup.js
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 "" "@lichao0223/lobehub\-cli 0.0.86" "User Commands"
3
+ .TH LH 1 "" "@lichao0223/lobehub\-cli 0.0.87" "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": "@lichao0223/lobehub-cli",
3
- "version": "0.0.86",
3
+ "version": "0.0.87",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/lichao0223/lobehub",
@@ -83,5 +83,5 @@
83
83
  "access": "public",
84
84
  "registry": "https://registry.npmjs.org"
85
85
  },
86
- "gitHead": "36d3581e7e80078a52e1d3feb876afcc19a708e6"
86
+ "gitHead": "376677324ea456bff448376729b656ff8af03933"
87
87
  }