@larkup/cli 0.2.6 → 0.2.8

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.
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getToolById,
3
3
  invalidateRegistryCache
4
- } from "./chunk-P5JVXA7X.js";
4
+ } from "./chunk-UCYL66UI.js";
5
5
  import {
6
6
  __require
7
7
  } from "./chunk-3RG5ZIWI.js";
@@ -17,6 +17,13 @@ import path from "path";
17
17
  import { exec as execCb } from "child_process";
18
18
  import { promisify } from "util";
19
19
  var execAsync = promisify(execCb);
20
+ var packageMutationChain = Promise.resolve();
21
+ function serializePackageMutation(fn) {
22
+ const run = packageMutationChain.then(fn, fn);
23
+ packageMutationChain = run.catch(() => {
24
+ });
25
+ return run;
26
+ }
20
27
  function getToolsDir() {
21
28
  return path.join(process.cwd(), ".larkup", "tools");
22
29
  }
@@ -54,7 +61,7 @@ async function writeManifest(manifest) {
54
61
  async function getInstalledTools() {
55
62
  const manifest = await readManifest();
56
63
  const tools = [...manifest.tools];
57
- const bundledIds = (process.env.LARKUP_BUNDLED_TOOLS ?? "").split(",").map((id) => id.trim()).filter(Boolean);
64
+ const bundledIds = (process.env.LARKUP_BUNDLED_TOOLS ?? "doc-editor,video-audio").split(",").map((id) => id.trim()).filter(Boolean);
58
65
  for (const toolId of bundledIds) {
59
66
  if (tools.some((tool) => tool.id === toolId)) continue;
60
67
  const descriptor = await getToolById(toolId);
@@ -136,13 +143,18 @@ async function ensureToolsPackageJson() {
136
143
  }
137
144
  }
138
145
  async function execInstall(packageName, version, target, onProgress) {
146
+ return serializePackageMutation(
147
+ () => execInstallUnlocked(packageName, version, target, onProgress)
148
+ );
149
+ }
150
+ async function execInstallUnlocked(packageName, version, target, onProgress) {
139
151
  const toolsDir = getToolsDir();
140
152
  switch (target) {
141
153
  case "local":
142
154
  case "docker": {
143
155
  await ensureToolsPackageJson();
144
156
  const install = async (specifier) => {
145
- const installCmd = `npm install ${specifier} --prefix "${toolsDir}" --save --no-audit --no-fund`;
157
+ const installCmd = `npm install ${specifier} --prefix "${toolsDir}" --save --no-audit --no-fund --prefer-offline`;
146
158
  onProgress?.(`Running: npm install ${specifier}`);
147
159
  const { stderr } = await execAsync(installCmd, {
148
160
  cwd: toolsDir,
@@ -331,7 +343,7 @@ async function uninstallTool(toolId) {
331
343
  }
332
344
  }
333
345
  invalidateRegistryCache();
334
- const { unloadTool: unloadTool2 } = await import("./tool-loader-QU6HBUCA.js");
346
+ const { unloadTool: unloadTool2 } = await import("./tool-loader-VBH7DQU3.js");
335
347
  unloadTool2(toolId);
336
348
  }
337
349
  async function notifyHubInstall(toolId) {
@@ -402,7 +414,7 @@ function unloadTool(toolId) {
402
414
  moduleCache.delete(toolId);
403
415
  }
404
416
  async function hasCapability(capability) {
405
- const { getToolsWithCapability } = await import("./tool-registry-W3JOGDE3.js");
417
+ const { getToolsWithCapability } = await import("./tool-registry-ED45DB5F.js");
406
418
  const tools = await getToolsWithCapability(capability);
407
419
  for (const t of tools) {
408
420
  const installed = await getInstalledTool(t.id);
@@ -107,7 +107,7 @@ var FALLBACK_REGISTRY = {
107
107
  ],
108
108
  tags: ["transcription", "ffmpeg", "video", "audio", "whisper"],
109
109
  downloads: 0,
110
- repositoryUrl: "https://github.com/Larkup-AI/larkup-rag",
110
+ repositoryUrl: "https://github.com/Larkup-AI/larkup",
111
111
  license: "Apache-2.0",
112
112
  updatedAt: "2026-07-20",
113
113
  configSchema: [
@@ -161,7 +161,7 @@ var FALLBACK_REGISTRY = {
161
161
  capabilities: ["clip-embeddings", "image-similarity"],
162
162
  tags: ["clip", "siglip", "image-search", "visual-similarity"],
163
163
  downloads: 0,
164
- repositoryUrl: "https://github.com/Larkup-AI/larkup-rag",
164
+ repositoryUrl: "https://github.com/Larkup-AI/larkup",
165
165
  license: "Apache-2.0",
166
166
  updatedAt: "2026-07-20",
167
167
  comingSoon: true
@@ -182,7 +182,7 @@ var FALLBACK_REGISTRY = {
182
182
  capabilities: ["document-editing", "form-filling", "document-preview"],
183
183
  tags: ["pdf", "docx", "pptx", "form", "canvas", "editor", "fill"],
184
184
  downloads: 0,
185
- repositoryUrl: "https://github.com/Larkup-AI/larkup-rag",
185
+ repositoryUrl: "https://github.com/Larkup-AI/larkup",
186
186
  license: "Apache-2.0",
187
187
  updatedAt: "2026-07-20"
188
188
  }
package/dist/index.js CHANGED
@@ -19,11 +19,11 @@ import {
19
19
  isToolInstalled,
20
20
  loadTool,
21
21
  uninstallTool
22
- } from "./chunk-VY6I42DP.js";
22
+ } from "./chunk-KMVYMOQV.js";
23
23
  import {
24
24
  getAllTools,
25
25
  getToolById
26
- } from "./chunk-P5JVXA7X.js";
26
+ } from "./chunk-UCYL66UI.js";
27
27
  import {
28
28
  __require
29
29
  } from "./chunk-3RG5ZIWI.js";
@@ -34,7 +34,7 @@ import { Command } from "commander";
34
34
  // package.json
35
35
  var package_default = {
36
36
  name: "@larkup/cli",
37
- version: "0.2.6",
37
+ version: "0.2.8",
38
38
  publishConfig: {
39
39
  access: "public"
40
40
  },
@@ -1415,7 +1415,7 @@ const server = createServer(async (req, res) => {
1415
1415
  <svg class="icon" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/></svg>
1416
1416
  API Reference
1417
1417
  </a>
1418
- <a href="https://github.com/Larkup-AI/larkup-rag" target="_blank" rel="noopener" class="btn btn-outline">
1418
+ <a href="https://github.com/Larkup-AI/larkup" target="_blank" rel="noopener" class="btn btn-outline">
1419
1419
  <svg class="icon" viewBox="0 0 24 24"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>
1420
1420
  Larkup Team
1421
1421
  </a>
@@ -1424,7 +1424,7 @@ const server = createServer(async (req, res) => {
1424
1424
  Contact
1425
1425
  </a>
1426
1426
  </div>
1427
- <div class="footer">Built with <a href="https://github.com/Larkup-AI/larkup-rag/buddy-rag" target="_blank" rel="noopener">larkup</a> \xB7 v1.0</div>
1427
+ <div class="footer">Built with <a href="https://github.com/Larkup-AI/larkup/buddy-rag" target="_blank" rel="noopener">larkup</a> \xB7 v1.0</div>
1428
1428
  </div>
1429
1429
  </body>
1430
1430
  </html>\`)
@@ -4313,7 +4313,7 @@ async function createAdapter(config, onRateLimit) {
4313
4313
  }
4314
4314
  case "lancedb":
4315
4315
  default: {
4316
- const { LanceDBAdapter } = await import("./lancedb-ITW7V3K5.js");
4316
+ const { LanceDBAdapter } = await import("./lancedb-RUTGJYW7.js");
4317
4317
  return new LanceDBAdapter({
4318
4318
  mode: overrides.mode,
4319
4319
  dbPath: overrides.dbPath,
@@ -112,7 +112,7 @@ var LanceDBAdapter = class {
112
112
  source: r.source,
113
113
  documentId: r.documentId,
114
114
  chunkIndex: r.chunkIndex,
115
- metadata: r.metadata ? JSON.stringify(r.metadata) : void 0
115
+ metadata: JSON.stringify(r.metadata ?? {})
116
116
  };
117
117
  }
118
118
  async upsert(records) {
@@ -3,8 +3,8 @@ import {
3
3
  isToolLoaded,
4
4
  loadTool,
5
5
  unloadTool
6
- } from "./chunk-VY6I42DP.js";
7
- import "./chunk-P5JVXA7X.js";
6
+ } from "./chunk-KMVYMOQV.js";
7
+ import "./chunk-UCYL66UI.js";
8
8
  import "./chunk-3RG5ZIWI.js";
9
9
  export {
10
10
  hasCapability,
@@ -6,7 +6,7 @@ import {
6
6
  getToolById,
7
7
  getToolsWithCapability,
8
8
  invalidateRegistryCache
9
- } from "./chunk-P5JVXA7X.js";
9
+ } from "./chunk-UCYL66UI.js";
10
10
  import "./chunk-3RG5ZIWI.js";
11
11
  export {
12
12
  buildRegistry,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@larkup/cli",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -28,9 +28,9 @@
28
28
  "cli-table3": "^0.6.5",
29
29
  "commander": "^15.0.0",
30
30
  "zod": "^4.4.3",
31
- "@larkup/marketplace": "0.1.6",
32
- "@larkup/vector-stores": "0.1.22",
33
- "@larkup/core": "0.2.3"
31
+ "@larkup/vector-stores": "0.1.23",
32
+ "@larkup/core": "0.2.4",
33
+ "@larkup/marketplace": "0.1.8"
34
34
  },
35
35
  "devDependencies": {
36
36
  "tsup": "^8.0.0",