@lobehub/cli 0.0.3 → 0.0.5
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 +486 -30691
- package/man/man1/lh.1 +4 -1
- package/package.json +16 -19
- package/dist/buffer-crc32-BlUV1nEz.js +0 -342
- package/dist/doc-CR0Zm5t8.js +0 -4144
- package/dist/docx-73xqMWN6.js +0 -33097
- package/dist/excel-3NB56vnT.js +0 -23451
- package/dist/node-BbXtxEF5.js +0 -48
- package/dist/pdf-B5Ukgxfs.js +0 -108386
- package/dist/pptx-DwZ8X2Hk.js +0 -9929
- package/dist/text-LU5pflEU.js +0 -59
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.
|
|
3
|
+
.TH LH 1 "" "@lobehub/cli 0.0.5" "User Commands"
|
|
4
4
|
.SH NAME
|
|
5
5
|
lh \- LobeHub CLI \- manage and connect to LobeHub services
|
|
6
6
|
.SH SYNOPSIS
|
|
@@ -98,6 +98,9 @@ Manage messages
|
|
|
98
98
|
.B model
|
|
99
99
|
Manage AI models
|
|
100
100
|
.TP
|
|
101
|
+
.B notify
|
|
102
|
+
Send a callback message to a topic and trigger the agent to process it
|
|
103
|
+
.TP
|
|
101
104
|
.B provider
|
|
102
105
|
Manage AI providers
|
|
103
106
|
.TP
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"lh": "./dist/index.js",
|
|
@@ -16,23 +16,7 @@
|
|
|
16
16
|
"dist",
|
|
17
17
|
"man"
|
|
18
18
|
],
|
|
19
|
-
"scripts": {
|
|
20
|
-
"build": "tsdown",
|
|
21
|
-
"cli:link": "bun link",
|
|
22
|
-
"cli:unlink": "bun unlink",
|
|
23
|
-
"dev": "LOBEHUB_CLI_HOME=.lobehub-dev bun src/index.ts",
|
|
24
|
-
"man:generate": "bun src/man/generate.ts",
|
|
25
|
-
"prepublishOnly": "npm run build && npm run man:generate",
|
|
26
|
-
"test": "bunx vitest run --config vitest.config.mts --silent='passed-only'",
|
|
27
|
-
"test:coverage": "bunx vitest run --config vitest.config.mts --coverage",
|
|
28
|
-
"type-check": "tsc --noEmit"
|
|
29
|
-
},
|
|
30
|
-
"dependencies": {
|
|
31
|
-
"ignore": "^7.0.5"
|
|
32
|
-
},
|
|
33
19
|
"devDependencies": {
|
|
34
|
-
"@lobechat/device-gateway-client": "workspace:*",
|
|
35
|
-
"@lobechat/local-file-shell": "workspace:*",
|
|
36
20
|
"@trpc/client": "^11.8.1",
|
|
37
21
|
"@types/node": "^22.13.5",
|
|
38
22
|
"@types/ws": "^8.18.1",
|
|
@@ -40,14 +24,27 @@
|
|
|
40
24
|
"debug": "^4.4.0",
|
|
41
25
|
"diff": "^8.0.3",
|
|
42
26
|
"fast-glob": "^3.3.3",
|
|
27
|
+
"ignore": "^7.0.5",
|
|
43
28
|
"picocolors": "^1.1.1",
|
|
44
29
|
"superjson": "^2.2.6",
|
|
45
30
|
"tsdown": "^0.21.4",
|
|
46
31
|
"typescript": "^5.9.3",
|
|
47
|
-
"ws": "^8.18.1"
|
|
32
|
+
"ws": "^8.18.1",
|
|
33
|
+
"@lobechat/device-gateway-client": "1.0.0",
|
|
34
|
+
"@lobechat/local-file-shell": "1.0.0"
|
|
48
35
|
},
|
|
49
36
|
"publishConfig": {
|
|
50
37
|
"access": "public",
|
|
51
38
|
"registry": "https://registry.npmjs.org"
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "tsdown",
|
|
42
|
+
"cli:link": "bun link",
|
|
43
|
+
"cli:unlink": "bun unlink",
|
|
44
|
+
"dev": "LOBEHUB_CLI_HOME=.lobehub-dev bun src/index.ts",
|
|
45
|
+
"man:generate": "bun src/man/generate.ts",
|
|
46
|
+
"test": "bunx vitest run --config vitest.config.mts --silent='passed-only'",
|
|
47
|
+
"test:coverage": "bunx vitest run --config vitest.config.mts --coverage",
|
|
48
|
+
"type-check": "tsc --noEmit"
|
|
52
49
|
}
|
|
53
|
-
}
|
|
50
|
+
}
|
|
@@ -1,342 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { a as __require, n as __commonJSMin } from "./index.js";
|
|
3
|
-
//#region node_modules/.pnpm/pend@1.2.0/node_modules/pend/index.js
|
|
4
|
-
var require_pend = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5
|
-
module.exports = Pend;
|
|
6
|
-
function Pend() {
|
|
7
|
-
this.pending = 0;
|
|
8
|
-
this.max = Infinity;
|
|
9
|
-
this.listeners = [];
|
|
10
|
-
this.waiting = [];
|
|
11
|
-
this.error = null;
|
|
12
|
-
}
|
|
13
|
-
Pend.prototype.go = function(fn) {
|
|
14
|
-
if (this.pending < this.max) pendGo(this, fn);
|
|
15
|
-
else this.waiting.push(fn);
|
|
16
|
-
};
|
|
17
|
-
Pend.prototype.wait = function(cb) {
|
|
18
|
-
if (this.pending === 0) cb(this.error);
|
|
19
|
-
else this.listeners.push(cb);
|
|
20
|
-
};
|
|
21
|
-
Pend.prototype.hold = function() {
|
|
22
|
-
return pendHold(this);
|
|
23
|
-
};
|
|
24
|
-
function pendHold(self) {
|
|
25
|
-
self.pending += 1;
|
|
26
|
-
var called = false;
|
|
27
|
-
return onCb;
|
|
28
|
-
function onCb(err) {
|
|
29
|
-
if (called) throw new Error("callback called twice");
|
|
30
|
-
called = true;
|
|
31
|
-
self.error = self.error || err;
|
|
32
|
-
self.pending -= 1;
|
|
33
|
-
if (self.waiting.length > 0 && self.pending < self.max) pendGo(self, self.waiting.shift());
|
|
34
|
-
else if (self.pending === 0) {
|
|
35
|
-
var listeners = self.listeners;
|
|
36
|
-
self.listeners = [];
|
|
37
|
-
listeners.forEach(cbListener);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
function cbListener(listener) {
|
|
41
|
-
listener(self.error);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
function pendGo(self, fn) {
|
|
45
|
-
fn(pendHold(self));
|
|
46
|
-
}
|
|
47
|
-
}));
|
|
48
|
-
//#endregion
|
|
49
|
-
//#region node_modules/.pnpm/buffer-crc32@0.2.13/node_modules/buffer-crc32/index.js
|
|
50
|
-
var require_buffer_crc32 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
51
|
-
var Buffer = __require("buffer").Buffer;
|
|
52
|
-
var CRC_TABLE = [
|
|
53
|
-
0,
|
|
54
|
-
1996959894,
|
|
55
|
-
3993919788,
|
|
56
|
-
2567524794,
|
|
57
|
-
124634137,
|
|
58
|
-
1886057615,
|
|
59
|
-
3915621685,
|
|
60
|
-
2657392035,
|
|
61
|
-
249268274,
|
|
62
|
-
2044508324,
|
|
63
|
-
3772115230,
|
|
64
|
-
2547177864,
|
|
65
|
-
162941995,
|
|
66
|
-
2125561021,
|
|
67
|
-
3887607047,
|
|
68
|
-
2428444049,
|
|
69
|
-
498536548,
|
|
70
|
-
1789927666,
|
|
71
|
-
4089016648,
|
|
72
|
-
2227061214,
|
|
73
|
-
450548861,
|
|
74
|
-
1843258603,
|
|
75
|
-
4107580753,
|
|
76
|
-
2211677639,
|
|
77
|
-
325883990,
|
|
78
|
-
1684777152,
|
|
79
|
-
4251122042,
|
|
80
|
-
2321926636,
|
|
81
|
-
335633487,
|
|
82
|
-
1661365465,
|
|
83
|
-
4195302755,
|
|
84
|
-
2366115317,
|
|
85
|
-
997073096,
|
|
86
|
-
1281953886,
|
|
87
|
-
3579855332,
|
|
88
|
-
2724688242,
|
|
89
|
-
1006888145,
|
|
90
|
-
1258607687,
|
|
91
|
-
3524101629,
|
|
92
|
-
2768942443,
|
|
93
|
-
901097722,
|
|
94
|
-
1119000684,
|
|
95
|
-
3686517206,
|
|
96
|
-
2898065728,
|
|
97
|
-
853044451,
|
|
98
|
-
1172266101,
|
|
99
|
-
3705015759,
|
|
100
|
-
2882616665,
|
|
101
|
-
651767980,
|
|
102
|
-
1373503546,
|
|
103
|
-
3369554304,
|
|
104
|
-
3218104598,
|
|
105
|
-
565507253,
|
|
106
|
-
1454621731,
|
|
107
|
-
3485111705,
|
|
108
|
-
3099436303,
|
|
109
|
-
671266974,
|
|
110
|
-
1594198024,
|
|
111
|
-
3322730930,
|
|
112
|
-
2970347812,
|
|
113
|
-
795835527,
|
|
114
|
-
1483230225,
|
|
115
|
-
3244367275,
|
|
116
|
-
3060149565,
|
|
117
|
-
1994146192,
|
|
118
|
-
31158534,
|
|
119
|
-
2563907772,
|
|
120
|
-
4023717930,
|
|
121
|
-
1907459465,
|
|
122
|
-
112637215,
|
|
123
|
-
2680153253,
|
|
124
|
-
3904427059,
|
|
125
|
-
2013776290,
|
|
126
|
-
251722036,
|
|
127
|
-
2517215374,
|
|
128
|
-
3775830040,
|
|
129
|
-
2137656763,
|
|
130
|
-
141376813,
|
|
131
|
-
2439277719,
|
|
132
|
-
3865271297,
|
|
133
|
-
1802195444,
|
|
134
|
-
476864866,
|
|
135
|
-
2238001368,
|
|
136
|
-
4066508878,
|
|
137
|
-
1812370925,
|
|
138
|
-
453092731,
|
|
139
|
-
2181625025,
|
|
140
|
-
4111451223,
|
|
141
|
-
1706088902,
|
|
142
|
-
314042704,
|
|
143
|
-
2344532202,
|
|
144
|
-
4240017532,
|
|
145
|
-
1658658271,
|
|
146
|
-
366619977,
|
|
147
|
-
2362670323,
|
|
148
|
-
4224994405,
|
|
149
|
-
1303535960,
|
|
150
|
-
984961486,
|
|
151
|
-
2747007092,
|
|
152
|
-
3569037538,
|
|
153
|
-
1256170817,
|
|
154
|
-
1037604311,
|
|
155
|
-
2765210733,
|
|
156
|
-
3554079995,
|
|
157
|
-
1131014506,
|
|
158
|
-
879679996,
|
|
159
|
-
2909243462,
|
|
160
|
-
3663771856,
|
|
161
|
-
1141124467,
|
|
162
|
-
855842277,
|
|
163
|
-
2852801631,
|
|
164
|
-
3708648649,
|
|
165
|
-
1342533948,
|
|
166
|
-
654459306,
|
|
167
|
-
3188396048,
|
|
168
|
-
3373015174,
|
|
169
|
-
1466479909,
|
|
170
|
-
544179635,
|
|
171
|
-
3110523913,
|
|
172
|
-
3462522015,
|
|
173
|
-
1591671054,
|
|
174
|
-
702138776,
|
|
175
|
-
2966460450,
|
|
176
|
-
3352799412,
|
|
177
|
-
1504918807,
|
|
178
|
-
783551873,
|
|
179
|
-
3082640443,
|
|
180
|
-
3233442989,
|
|
181
|
-
3988292384,
|
|
182
|
-
2596254646,
|
|
183
|
-
62317068,
|
|
184
|
-
1957810842,
|
|
185
|
-
3939845945,
|
|
186
|
-
2647816111,
|
|
187
|
-
81470997,
|
|
188
|
-
1943803523,
|
|
189
|
-
3814918930,
|
|
190
|
-
2489596804,
|
|
191
|
-
225274430,
|
|
192
|
-
2053790376,
|
|
193
|
-
3826175755,
|
|
194
|
-
2466906013,
|
|
195
|
-
167816743,
|
|
196
|
-
2097651377,
|
|
197
|
-
4027552580,
|
|
198
|
-
2265490386,
|
|
199
|
-
503444072,
|
|
200
|
-
1762050814,
|
|
201
|
-
4150417245,
|
|
202
|
-
2154129355,
|
|
203
|
-
426522225,
|
|
204
|
-
1852507879,
|
|
205
|
-
4275313526,
|
|
206
|
-
2312317920,
|
|
207
|
-
282753626,
|
|
208
|
-
1742555852,
|
|
209
|
-
4189708143,
|
|
210
|
-
2394877945,
|
|
211
|
-
397917763,
|
|
212
|
-
1622183637,
|
|
213
|
-
3604390888,
|
|
214
|
-
2714866558,
|
|
215
|
-
953729732,
|
|
216
|
-
1340076626,
|
|
217
|
-
3518719985,
|
|
218
|
-
2797360999,
|
|
219
|
-
1068828381,
|
|
220
|
-
1219638859,
|
|
221
|
-
3624741850,
|
|
222
|
-
2936675148,
|
|
223
|
-
906185462,
|
|
224
|
-
1090812512,
|
|
225
|
-
3747672003,
|
|
226
|
-
2825379669,
|
|
227
|
-
829329135,
|
|
228
|
-
1181335161,
|
|
229
|
-
3412177804,
|
|
230
|
-
3160834842,
|
|
231
|
-
628085408,
|
|
232
|
-
1382605366,
|
|
233
|
-
3423369109,
|
|
234
|
-
3138078467,
|
|
235
|
-
570562233,
|
|
236
|
-
1426400815,
|
|
237
|
-
3317316542,
|
|
238
|
-
2998733608,
|
|
239
|
-
733239954,
|
|
240
|
-
1555261956,
|
|
241
|
-
3268935591,
|
|
242
|
-
3050360625,
|
|
243
|
-
752459403,
|
|
244
|
-
1541320221,
|
|
245
|
-
2607071920,
|
|
246
|
-
3965973030,
|
|
247
|
-
1969922972,
|
|
248
|
-
40735498,
|
|
249
|
-
2617837225,
|
|
250
|
-
3943577151,
|
|
251
|
-
1913087877,
|
|
252
|
-
83908371,
|
|
253
|
-
2512341634,
|
|
254
|
-
3803740692,
|
|
255
|
-
2075208622,
|
|
256
|
-
213261112,
|
|
257
|
-
2463272603,
|
|
258
|
-
3855990285,
|
|
259
|
-
2094854071,
|
|
260
|
-
198958881,
|
|
261
|
-
2262029012,
|
|
262
|
-
4057260610,
|
|
263
|
-
1759359992,
|
|
264
|
-
534414190,
|
|
265
|
-
2176718541,
|
|
266
|
-
4139329115,
|
|
267
|
-
1873836001,
|
|
268
|
-
414664567,
|
|
269
|
-
2282248934,
|
|
270
|
-
4279200368,
|
|
271
|
-
1711684554,
|
|
272
|
-
285281116,
|
|
273
|
-
2405801727,
|
|
274
|
-
4167216745,
|
|
275
|
-
1634467795,
|
|
276
|
-
376229701,
|
|
277
|
-
2685067896,
|
|
278
|
-
3608007406,
|
|
279
|
-
1308918612,
|
|
280
|
-
956543938,
|
|
281
|
-
2808555105,
|
|
282
|
-
3495958263,
|
|
283
|
-
1231636301,
|
|
284
|
-
1047427035,
|
|
285
|
-
2932959818,
|
|
286
|
-
3654703836,
|
|
287
|
-
1088359270,
|
|
288
|
-
936918e3,
|
|
289
|
-
2847714899,
|
|
290
|
-
3736837829,
|
|
291
|
-
1202900863,
|
|
292
|
-
817233897,
|
|
293
|
-
3183342108,
|
|
294
|
-
3401237130,
|
|
295
|
-
1404277552,
|
|
296
|
-
615818150,
|
|
297
|
-
3134207493,
|
|
298
|
-
3453421203,
|
|
299
|
-
1423857449,
|
|
300
|
-
601450431,
|
|
301
|
-
3009837614,
|
|
302
|
-
3294710456,
|
|
303
|
-
1567103746,
|
|
304
|
-
711928724,
|
|
305
|
-
3020668471,
|
|
306
|
-
3272380065,
|
|
307
|
-
1510334235,
|
|
308
|
-
755167117
|
|
309
|
-
];
|
|
310
|
-
if (typeof Int32Array !== "undefined") CRC_TABLE = new Int32Array(CRC_TABLE);
|
|
311
|
-
function ensureBuffer(input) {
|
|
312
|
-
if (Buffer.isBuffer(input)) return input;
|
|
313
|
-
var hasNewBufferAPI = typeof Buffer.alloc === "function" && typeof Buffer.from === "function";
|
|
314
|
-
if (typeof input === "number") return hasNewBufferAPI ? Buffer.alloc(input) : new Buffer(input);
|
|
315
|
-
else if (typeof input === "string") return hasNewBufferAPI ? Buffer.from(input) : new Buffer(input);
|
|
316
|
-
else throw new Error("input must be buffer, number, or string, received " + typeof input);
|
|
317
|
-
}
|
|
318
|
-
function bufferizeInt(num) {
|
|
319
|
-
var tmp = ensureBuffer(4);
|
|
320
|
-
tmp.writeInt32BE(num, 0);
|
|
321
|
-
return tmp;
|
|
322
|
-
}
|
|
323
|
-
function _crc32(buf, previous) {
|
|
324
|
-
buf = ensureBuffer(buf);
|
|
325
|
-
if (Buffer.isBuffer(previous)) previous = previous.readUInt32BE(0);
|
|
326
|
-
var crc = ~~previous ^ -1;
|
|
327
|
-
for (var n = 0; n < buf.length; n++) crc = CRC_TABLE[(crc ^ buf[n]) & 255] ^ crc >>> 8;
|
|
328
|
-
return crc ^ -1;
|
|
329
|
-
}
|
|
330
|
-
function crc32() {
|
|
331
|
-
return bufferizeInt(_crc32.apply(null, arguments));
|
|
332
|
-
}
|
|
333
|
-
crc32.signed = function() {
|
|
334
|
-
return _crc32.apply(null, arguments);
|
|
335
|
-
};
|
|
336
|
-
crc32.unsigned = function() {
|
|
337
|
-
return _crc32.apply(null, arguments) >>> 0;
|
|
338
|
-
};
|
|
339
|
-
module.exports = crc32;
|
|
340
|
-
}));
|
|
341
|
-
//#endregion
|
|
342
|
-
export { require_pend as n, require_buffer_crc32 as t };
|