@lobehub/cli 0.0.228 → 0.0.229

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
@@ -7875,6 +7875,10 @@ var init_agent = __esmMin((() => {
7875
7875
  init_tts$1();
7876
7876
  }));
7877
7877
 
7878
+ //#endregion
7879
+ //#region ../../packages/types/src/agentAccess.ts
7880
+ var init_agentAccess = __esmMin((() => {}));
7881
+
7878
7882
  //#endregion
7879
7883
  //#region ../../packages/types/src/agentAccount.ts
7880
7884
  var AGENT_ACCOUNT_KINDS, AGENT_ACCOUNT_PERSISTED_KINDS;
@@ -12578,6 +12582,7 @@ var init_zustand = __esmMin((() => {}));
12578
12582
  //#region ../../packages/types/src/index.ts
12579
12583
  var init_src$2 = __esmMin((() => {
12580
12584
  init_agent();
12585
+ init_agentAccess();
12581
12586
  init_agentAccount();
12582
12587
  init_agentAvailability();
12583
12588
  init_agentDelivery();
@@ -26689,7 +26694,7 @@ const GOMS_KLM_TIMING_SECONDS = {
26689
26694
  };
26690
26695
 
26691
26696
  //#endregion
26692
- //#region node_modules/.pnpm/@trpc+server@11.29.11_@types+ws@8.18.2_typescript@6.0.3/node_modules/@trpc/server/dist/observable-CodTG6Sf.mjs
26697
+ //#region node_modules/.pnpm/@trpc+server@11.31.0_@types+ws@8.18.2_typescript@6.0.3/node_modules/@trpc/server/dist/observable-CodTG6Sf.mjs
26693
26698
  /**
26694
26699
  * Creates an observable. `subscribe` runs for each subscriber, and can
26695
26700
  * return a function that cleans up when it unsubscribes.
@@ -26915,7 +26920,7 @@ function observableToAsyncIterable(observable, signal) {
26915
26920
  }
26916
26921
 
26917
26922
  //#endregion
26918
- //#region node_modules/.pnpm/@trpc+server@11.29.11_@types+ws@8.18.2_typescript@6.0.3/node_modules/@trpc/server/dist/observable-BjUZYMQq.mjs
26923
+ //#region node_modules/.pnpm/@trpc+server@11.31.0_@types+ws@8.18.2_typescript@6.0.3/node_modules/@trpc/server/dist/observable-BjUZYMQq.mjs
26919
26924
  /**
26920
26925
  * Shares one subscription to the source between all subscribers. It
26921
26926
  * starts with the first subscriber and ends when the last unsubscribes.
@@ -26996,52 +27001,9 @@ function share(_opts) {
26996
27001
  });
26997
27002
  };
26998
27003
  }
26999
- /**
27000
- * Calls one of several observers. A throw would stop the caller from
27001
- * notifying the rest, so it is rethrown asynchronously instead: it still
27002
- * shows up as an uncaught exception.
27003
- */
27004
- function callObserver(callback) {
27005
- try {
27006
- callback();
27007
- } catch (error) {
27008
- setTimeout(() => {
27009
- throw error;
27010
- });
27011
- }
27012
- }
27013
- /**
27014
- * Creates an observable that holds a current value. New subscribers get
27015
- * it right away, unless it's `undefined`.
27016
- * @internal
27017
- */
27018
- function behaviorSubject(initialValue) {
27019
- let value = initialValue;
27020
- const observerList = /* @__PURE__ */ new Set();
27021
- const addObserver = (observer) => {
27022
- if (value !== void 0) observer.next(value);
27023
- observerList.add(observer);
27024
- };
27025
- const removeObserver = (observer) => {
27026
- observerList.delete(observer);
27027
- };
27028
- const obs = observable((observer) => {
27029
- addObserver(observer);
27030
- return () => {
27031
- removeObserver(observer);
27032
- };
27033
- });
27034
- obs.next = (nextValue) => {
27035
- if (value === nextValue) return;
27036
- value = nextValue;
27037
- for (const observer of [...observerList]) if (observerList.has(observer)) callObserver(() => observer.next(nextValue));
27038
- };
27039
- obs.get = () => value;
27040
- return obs;
27041
- }
27042
27004
 
27043
27005
  //#endregion
27044
- //#region node_modules/.pnpm/@trpc+client@11.29.11_@trpc+server@11.29.11_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/splitLink-PFsRy7Mf.mjs
27006
+ //#region node_modules/.pnpm/@trpc+client@11.31.0_@trpc+server@11.31.0_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/splitLink-PFsRy7Mf.mjs
27045
27007
  /** @internal */
27046
27008
  function createChain(opts) {
27047
27009
  return observable((observer) => {
@@ -27060,7 +27022,7 @@ function createChain(opts) {
27060
27022
  }
27061
27023
 
27062
27024
  //#endregion
27063
- //#region node_modules/.pnpm/@trpc+client@11.29.11_@trpc+server@11.29.11_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/objectSpread2-pyA4QVO4.mjs
27025
+ //#region node_modules/.pnpm/@trpc+client@11.31.0_@trpc+server@11.31.0_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/objectSpread2-pyA4QVO4.mjs
27064
27026
  function _typeof$1(o) {
27065
27027
  "@babel/helpers - typeof";
27066
27028
  return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -27114,7 +27076,7 @@ function _objectSpread2$1(e) {
27114
27076
  }
27115
27077
 
27116
27078
  //#endregion
27117
- //#region node_modules/.pnpm/@trpc+server@11.29.11_@types+ws@8.18.2_typescript@6.0.3/node_modules/@trpc/server/dist/codes-BCsCCyMj.mjs
27079
+ //#region node_modules/.pnpm/@trpc+server@11.31.0_@types+ws@8.18.2_typescript@6.0.3/node_modules/@trpc/server/dist/codes-BCsCCyMj.mjs
27118
27080
  /**
27119
27081
  * Check that value is object
27120
27082
  * @internal
@@ -27177,7 +27139,7 @@ const retryableRpcCodes = [
27177
27139
  ];
27178
27140
 
27179
27141
  //#endregion
27180
- //#region node_modules/.pnpm/@trpc+server@11.29.11_@types+ws@8.18.2_typescript@6.0.3/node_modules/@trpc/server/dist/getErrorShape-CVrl8_-w.mjs
27142
+ //#region node_modules/.pnpm/@trpc+server@11.31.0_@types+ws@8.18.2_typescript@6.0.3/node_modules/@trpc/server/dist/getErrorShape-CVrl8_-w.mjs
27181
27143
  const noop$4 = () => {};
27182
27144
  const freezeIfAvailable = (obj) => {
27183
27145
  if (Object.freeze) Object.freeze(obj);
@@ -27282,7 +27244,7 @@ function _objectSpread2(e) {
27282
27244
  }
27283
27245
 
27284
27246
  //#endregion
27285
- //#region node_modules/.pnpm/@trpc+server@11.29.11_@types+ws@8.18.2_typescript@6.0.3/node_modules/@trpc/server/dist/asyncGeneratorDelegate-qZNHzmPI.mjs
27247
+ //#region node_modules/.pnpm/@trpc+server@11.31.0_@types+ws@8.18.2_typescript@6.0.3/node_modules/@trpc/server/dist/asyncGeneratorDelegate-qZNHzmPI.mjs
27286
27248
  /** @internal */
27287
27249
  function transformResultInner(response, transformer) {
27288
27250
  if ("error" in response) {
@@ -27388,7 +27350,7 @@ AsyncGenerator$1.prototype["function" == typeof Symbol && Symbol.asyncIterator |
27388
27350
  };
27389
27351
 
27390
27352
  //#endregion
27391
- //#region node_modules/.pnpm/@trpc+client@11.29.11_@trpc+server@11.29.11_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/TRPCClientError-DE6-fd1n.mjs
27353
+ //#region node_modules/.pnpm/@trpc+client@11.31.0_@trpc+server@11.31.0_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/TRPCClientError-DE6-fd1n.mjs
27392
27354
  /**
27393
27355
  * Whether a value is a `TRPCClientError`, typed for a router or procedure.
27394
27356
  * @see https://trpc.io/docs/client/vanilla/error-handling#catching-a-thrown-error
@@ -27444,7 +27406,7 @@ var TRPCClientError = class TRPCClientError extends Error {
27444
27406
  };
27445
27407
 
27446
27408
  //#endregion
27447
- //#region node_modules/.pnpm/@trpc+client@11.29.11_@trpc+server@11.29.11_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/unstable-internals.mjs
27409
+ //#region node_modules/.pnpm/@trpc+client@11.31.0_@trpc+server@11.31.0_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/unstable-internals.mjs
27448
27410
  /**
27449
27411
  * @internal
27450
27412
  */
@@ -27471,7 +27433,7 @@ function getTransformer(transformer) {
27471
27433
  }
27472
27434
 
27473
27435
  //#endregion
27474
- //#region node_modules/.pnpm/@trpc+client@11.29.11_@trpc+server@11.29.11_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/httpUtils-CtMuyl9j.mjs
27436
+ //#region node_modules/.pnpm/@trpc+client@11.31.0_@trpc+server@11.31.0_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/httpUtils-CtMuyl9j.mjs
27475
27437
  const isFunction$1 = (fn) => typeof fn === "function";
27476
27438
  /**
27477
27439
  * The `fetch` to use: `customFetchImpl` if given, or else the global one.
@@ -27607,7 +27569,7 @@ async function httpRequest(opts) {
27607
27569
  }
27608
27570
 
27609
27571
  //#endregion
27610
- //#region node_modules/.pnpm/@trpc+client@11.29.11_@trpc+server@11.29.11_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/httpLink-B4UwXApa.mjs
27572
+ //#region node_modules/.pnpm/@trpc+client@11.31.0_@trpc+server@11.31.0_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/httpLink-B4UwXApa.mjs
27611
27573
  /** Whether an input is binary: a `Uint8Array`, `Blob` or `File`. */
27612
27574
  function isOctetType(input) {
27613
27575
  return input instanceof Uint8Array || input instanceof Blob;
@@ -27700,197 +27662,7 @@ function httpLink(opts) {
27700
27662
  }
27701
27663
 
27702
27664
  //#endregion
27703
- //#region node_modules/.pnpm/@trpc+client@11.29.11_@trpc+server@11.29.11_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/wsLink-DYx-NUSN.mjs
27704
- /**
27705
- * Get the result of a value or function that returns a value
27706
- * It also optionally accepts typesafe arguments for the function
27707
- */
27708
- const resultOf = (value, ...args) => {
27709
- return typeof value === "function" ? value(...args) : value;
27710
- };
27711
- function withResolvers() {
27712
- let resolve;
27713
- let reject;
27714
- return {
27715
- promise: new Promise((res, rej) => {
27716
- resolve = res;
27717
- reject = rej;
27718
- }),
27719
- resolve,
27720
- reject
27721
- };
27722
- }
27723
- /**
27724
- * Resolves a WebSocket URL and optionally appends connection parameters.
27725
- *
27726
- * If connectionParams are provided, appends 'connectionParams=1' query parameter.
27727
- */
27728
- async function prepareUrl(urlOptions) {
27729
- const url = await resultOf(urlOptions.url);
27730
- if (!urlOptions.connectionParams) return url;
27731
- return url + `${url.includes("?") ? "&" : "?"}connectionParams=1`;
27732
- }
27733
- async function buildConnectionMessage(connectionParams, encoder) {
27734
- const message = {
27735
- method: "connectionParams",
27736
- data: await resultOf(connectionParams)
27737
- };
27738
- return encoder.encode(message);
27739
- }
27740
- /**
27741
- * Opens a WebSocket connection asynchronously and returns a promise
27742
- * that resolves when the connection is successfully established.
27743
- * The promise rejects if an error occurs during the connection attempt.
27744
- */
27745
- function asyncWsOpen(ws) {
27746
- const { promise, resolve, reject } = withResolvers();
27747
- ws.addEventListener("open", () => {
27748
- ws.removeEventListener("error", reject);
27749
- resolve();
27750
- });
27751
- ws.addEventListener("error", reject);
27752
- return promise;
27753
- }
27754
- const pongCallbacks = /* @__PURE__ */ new WeakMap();
27755
- /**
27756
- * Sends "PING" on `ws` and calls `onPong`, if given, once its "PONG"
27757
- * arrives. The server answers in order, so by then everything it sent before
27758
- * it read this "PING" has arrived too.
27759
- */
27760
- function sendPing(ws, onPong) {
27761
- let callbacks = pongCallbacks.get(ws);
27762
- if (!callbacks) {
27763
- const queue = [];
27764
- callbacks = queue;
27765
- pongCallbacks.set(ws, queue);
27766
- ws.addEventListener("message", ({ data }) => {
27767
- var _queue$shift;
27768
- if (data === "PONG") (_queue$shift = queue.shift()) === null || _queue$shift === void 0 || _queue$shift();
27769
- });
27770
- }
27771
- callbacks.push(onPong);
27772
- ws.send("PING");
27773
- }
27774
- /**
27775
- * Sets up a periodic ping-pong mechanism to keep the WebSocket connection alive.
27776
- *
27777
- * - Sends "PING" messages at regular intervals defined by `intervalMs`.
27778
- * - If a "PONG" response is not received within the `pongTimeoutMs`, the WebSocket is closed.
27779
- * - The ping timer resets upon receiving any message to maintain activity.
27780
- * - Automatically starts the ping process when the WebSocket connection is opened.
27781
- * - Cleans up timers when the WebSocket is closed.
27782
- *
27783
- * @param ws - The WebSocket instance to manage.
27784
- * @param options - Configuration options for ping-pong intervals and timeouts.
27785
- */
27786
- function setupPingInterval(ws, { intervalMs, pongTimeoutMs }) {
27787
- let pingTimeout;
27788
- let pongTimeout;
27789
- function start() {
27790
- pingTimeout = setTimeout(() => {
27791
- sendPing(ws, null);
27792
- pongTimeout = setTimeout(() => {
27793
- ws.close();
27794
- }, pongTimeoutMs);
27795
- }, intervalMs);
27796
- }
27797
- function reset() {
27798
- clearTimeout(pingTimeout);
27799
- start();
27800
- }
27801
- function pong() {
27802
- clearTimeout(pongTimeout);
27803
- reset();
27804
- }
27805
- ws.addEventListener("open", start);
27806
- ws.addEventListener("message", ({ data }) => {
27807
- clearTimeout(pingTimeout);
27808
- start();
27809
- if (data === "PONG") pong();
27810
- });
27811
- ws.addEventListener("close", () => {
27812
- clearTimeout(pingTimeout);
27813
- clearTimeout(pongTimeout);
27814
- });
27815
- }
27816
- /**
27817
- * Manages a WebSocket connection with support for reconnection, keep-alive mechanisms,
27818
- * and observable state tracking.
27819
- */
27820
- var WsConnection = class WsConnection {
27821
- constructor(opts) {
27822
- var _opts$WebSocketPonyfi;
27823
- _defineProperty$1(this, "id", ++WsConnection.connectCount);
27824
- _defineProperty$1(this, "WebSocketPonyfill", void 0);
27825
- _defineProperty$1(this, "urlOptions", void 0);
27826
- _defineProperty$1(this, "keepAliveOpts", void 0);
27827
- _defineProperty$1(this, "encoder", void 0);
27828
- _defineProperty$1(this, "wsObservable", behaviorSubject(null));
27829
- _defineProperty$1(this, "openPromise", null);
27830
- this.WebSocketPonyfill = (_opts$WebSocketPonyfi = opts.WebSocketPonyfill) !== null && _opts$WebSocketPonyfi !== void 0 ? _opts$WebSocketPonyfi : WebSocket;
27831
- if (!this.WebSocketPonyfill) throw new Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");
27832
- this.urlOptions = opts.urlOptions;
27833
- this.keepAliveOpts = opts.keepAlive;
27834
- this.encoder = opts.encoder;
27835
- }
27836
- get ws() {
27837
- return this.wsObservable.get();
27838
- }
27839
- set ws(ws) {
27840
- this.wsObservable.next(ws);
27841
- }
27842
- /**
27843
- * Checks if the WebSocket connection is open and ready to communicate.
27844
- */
27845
- isOpen() {
27846
- return !!this.ws && this.ws.readyState === this.WebSocketPonyfill.OPEN && !this.openPromise;
27847
- }
27848
- /**
27849
- * Checks if the WebSocket connection is closed or in the process of closing.
27850
- */
27851
- isClosed() {
27852
- return !!this.ws && (this.ws.readyState === this.WebSocketPonyfill.CLOSING || this.ws.readyState === this.WebSocketPonyfill.CLOSED);
27853
- }
27854
- async open() {
27855
- if (this.openPromise) return this.openPromise;
27856
- this.id = ++WsConnection.connectCount;
27857
- const wsPromise = prepareUrl(this.urlOptions).then((url) => new this.WebSocketPonyfill(url));
27858
- this.openPromise = wsPromise.then(async (ws) => {
27859
- this.ws = ws;
27860
- ws.binaryType = "arraybuffer";
27861
- ws.addEventListener("message", function({ data }) {
27862
- if (data === "PING") this.send("PONG");
27863
- });
27864
- if (this.keepAliveOpts.enabled) setupPingInterval(ws, this.keepAliveOpts);
27865
- ws.addEventListener("close", () => {
27866
- if (this.ws === ws) this.ws = null;
27867
- });
27868
- await asyncWsOpen(ws);
27869
- if (this.urlOptions.connectionParams) ws.send(await buildConnectionMessage(this.urlOptions.connectionParams, this.encoder));
27870
- });
27871
- try {
27872
- await this.openPromise;
27873
- } finally {
27874
- this.openPromise = null;
27875
- }
27876
- }
27877
- /**
27878
- * Closes the WebSocket connection gracefully.
27879
- * Waits for any ongoing open operation to complete before closing.
27880
- */
27881
- async close() {
27882
- try {
27883
- await this.openPromise;
27884
- } finally {
27885
- var _this$ws;
27886
- (_this$ws = this.ws) === null || _this$ws === void 0 || _this$ws.close();
27887
- }
27888
- }
27889
- };
27890
- _defineProperty$1(WsConnection, "connectCount", 0);
27891
-
27892
- //#endregion
27893
- //#region node_modules/.pnpm/@trpc+client@11.29.11_@trpc+server@11.29.11_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/index.mjs
27665
+ //#region node_modules/.pnpm/@trpc+client@11.31.0_@trpc+server@11.31.0_@types+ws@8.18.2_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/index.mjs
27894
27666
  const observerKeys = [
27895
27667
  "onStarted",
27896
27668
  "onData",
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.228" "User Commands"
3
+ .TH LH 1 "" "@lobehub/cli 0.0.229" "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.228",
3
+ "version": "0.0.229",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/lobehub/lobehub",
@@ -83,5 +83,5 @@
83
83
  "access": "public",
84
84
  "registry": "https://registry.npmjs.org"
85
85
  },
86
- "gitHead": "6dbaf19918c13ef2d90aaaeba2713aa8b118707c"
86
+ "gitHead": "73c69167a60dc04dec224a0feafb8fc39ed9639f"
87
87
  }