@larkup/cli 0.3.4 → 0.3.7
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/{chunk-N24SOKC6.js → chunk-I73MFARR.js} +24 -7
- package/dist/{chunk-4OJDAZYP.js → chunk-P2RSGKNC.js} +2 -2
- package/dist/index.js +11 -11
- package/dist/{tool-loader-AAV4QYJS.js → tool-loader-7VEZIF4X.js} +2 -2
- package/dist/{tool-registry-3ENYDFZN.js → tool-registry-46TSIBQI.js} +1 -1
- package/package.json +11 -11
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getToolById,
|
|
3
3
|
invalidateRegistryCache
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-P2RSGKNC.js";
|
|
5
5
|
import {
|
|
6
6
|
__require
|
|
7
7
|
} from "./chunk-QGM4M3NI.js";
|
|
@@ -14,11 +14,12 @@ import { pathToFileURL } from "url";
|
|
|
14
14
|
// ../../packages/marketplace/src/tool-installer.ts
|
|
15
15
|
import { promises as fs } from "fs";
|
|
16
16
|
import path from "path";
|
|
17
|
-
import { exec as execCb } from "child_process";
|
|
17
|
+
import { exec as execCb, execFile as execFileCb } from "child_process";
|
|
18
18
|
import { promisify } from "util";
|
|
19
19
|
var installingTools = /* @__PURE__ */ new Set();
|
|
20
20
|
var uninstallingTools = /* @__PURE__ */ new Set();
|
|
21
21
|
var execAsync = promisify(execCb);
|
|
22
|
+
var execFileAsync = promisify(execFileCb);
|
|
22
23
|
var packageMutationChain = Promise.resolve();
|
|
23
24
|
function serializePackageMutation(fn) {
|
|
24
25
|
const run = packageMutationChain.then(fn, fn);
|
|
@@ -208,6 +209,18 @@ async function ensureToolsPackageJson() {
|
|
|
208
209
|
);
|
|
209
210
|
}
|
|
210
211
|
}
|
|
212
|
+
function buildNpmInstallArgs(specifier, toolsDir) {
|
|
213
|
+
return [
|
|
214
|
+
"install",
|
|
215
|
+
specifier,
|
|
216
|
+
"--prefix",
|
|
217
|
+
toolsDir,
|
|
218
|
+
"--save",
|
|
219
|
+
"--no-audit",
|
|
220
|
+
"--no-fund",
|
|
221
|
+
"--prefer-online"
|
|
222
|
+
];
|
|
223
|
+
}
|
|
211
224
|
async function execInstall(packageName, version, target, onProgress) {
|
|
212
225
|
return serializePackageMutation(
|
|
213
226
|
() => execInstallUnlocked(packageName, version, target, onProgress)
|
|
@@ -220,9 +233,8 @@ async function execInstallUnlocked(packageName, version, target, onProgress) {
|
|
|
220
233
|
case "docker": {
|
|
221
234
|
await ensureToolsPackageJson();
|
|
222
235
|
const install = async (specifier) => {
|
|
223
|
-
const installCmd = `npm install ${specifier} --prefix "${toolsDir}" --save --no-audit --no-fund --prefer-offline`;
|
|
224
236
|
onProgress?.(`Running: npm install ${specifier}`);
|
|
225
|
-
const { stderr } = await
|
|
237
|
+
const { stderr } = await execFileAsync("npm", buildNpmInstallArgs(specifier, toolsDir), {
|
|
226
238
|
cwd: toolsDir,
|
|
227
239
|
// Native tool dependencies can take longer under Docker Desktop's
|
|
228
240
|
// amd64 emulation. Let the request finish instead of reporting a
|
|
@@ -272,7 +284,12 @@ async function execInstallUnlocked(packageName, version, target, onProgress) {
|
|
|
272
284
|
const packageJson = JSON.parse(
|
|
273
285
|
await fs.readFile(path.join(resolvedPath, "package.json"), "utf8")
|
|
274
286
|
);
|
|
275
|
-
|
|
287
|
+
const resolvedVersion = packageJson.version ?? version;
|
|
288
|
+
const { compareToolVersions } = await import("./tool-registry-46TSIBQI.js");
|
|
289
|
+
if (compareToolVersions(version, resolvedVersion) > 0) {
|
|
290
|
+
throw new Error(`Version ${version} is not yet available. Please try again later.`);
|
|
291
|
+
}
|
|
292
|
+
return { resolvedPath, version: resolvedVersion };
|
|
276
293
|
}
|
|
277
294
|
case "serverless": {
|
|
278
295
|
onProgress?.("Serverless environment detected \u2014 queuing for next deploy");
|
|
@@ -459,7 +476,7 @@ async function uninstallTool(toolId) {
|
|
|
459
476
|
}
|
|
460
477
|
}
|
|
461
478
|
invalidateRegistryCache();
|
|
462
|
-
const { unloadTool: unloadTool2 } = await import("./tool-loader-
|
|
479
|
+
const { unloadTool: unloadTool2 } = await import("./tool-loader-7VEZIF4X.js");
|
|
463
480
|
unloadTool2(toolId);
|
|
464
481
|
} finally {
|
|
465
482
|
uninstallingTools.delete(toolId);
|
|
@@ -583,7 +600,7 @@ function unloadTool(toolId) {
|
|
|
583
600
|
moduleCache.delete(toolId);
|
|
584
601
|
}
|
|
585
602
|
async function hasCapability(capability) {
|
|
586
|
-
const { getToolsWithCapability } = await import("./tool-registry-
|
|
603
|
+
const { getToolsWithCapability } = await import("./tool-registry-46TSIBQI.js");
|
|
587
604
|
const tools = await getToolsWithCapability(capability);
|
|
588
605
|
for (const t of tools) {
|
|
589
606
|
const installed = await getInstalledTool(t.id);
|
|
@@ -23,7 +23,7 @@ var BUILTIN_TOOLS = [
|
|
|
23
23
|
description: "Help your AI understand your videos, so you can ask questions and get answers from the right moments.",
|
|
24
24
|
longDescription: "Turn videos into knowledge your AI can understand. It listens to what is said, reads what appears on screen, and helps you find the moments that matter.",
|
|
25
25
|
category: "media",
|
|
26
|
-
version: "0.
|
|
26
|
+
version: "0.3.0",
|
|
27
27
|
pricing: "free",
|
|
28
28
|
emoji: "\u{1F3AC}",
|
|
29
29
|
icon: "Film",
|
|
@@ -596,7 +596,7 @@ var BUILTIN_TOOLS = [
|
|
|
596
596
|
description: "AI-powered form filling and document editing with Canvas-style live preview.",
|
|
597
597
|
longDescription: "Open PDF, Word, PowerPoint, and text files in a split-view Canvas. AI fills forms using your knowledge base, edits content on request, and previews changes live. Supports PDF form fields (AcroForm), DOCX paragraphs/tables, PPTX slide text, and plain text editing. Uses pdf-lib (native) for PDF and the Docker sandbox for DOCX/PPTX via python-docx/python-pptx.",
|
|
598
598
|
category: "utility",
|
|
599
|
-
version: "0.2.
|
|
599
|
+
version: "0.2.25",
|
|
600
600
|
pricing: "free",
|
|
601
601
|
emoji: "\u{1F4DD}",
|
|
602
602
|
icon: "FileEdit",
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
isToolInstalled,
|
|
7
7
|
loadTool,
|
|
8
8
|
uninstallTool
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-I73MFARR.js";
|
|
10
10
|
import {
|
|
11
11
|
ALL_MODELS,
|
|
12
12
|
DEFAULT_CONFIG,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
import {
|
|
26
26
|
getAllTools,
|
|
27
27
|
getToolById
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-P2RSGKNC.js";
|
|
29
29
|
import {
|
|
30
30
|
__require
|
|
31
31
|
} from "./chunk-QGM4M3NI.js";
|
|
@@ -36,7 +36,7 @@ import { Command } from "commander";
|
|
|
36
36
|
// package.json
|
|
37
37
|
var package_default = {
|
|
38
38
|
name: "@larkup/cli",
|
|
39
|
-
version: "0.3.
|
|
39
|
+
version: "0.3.7",
|
|
40
40
|
engines: {
|
|
41
41
|
node: ">=22"
|
|
42
42
|
},
|
|
@@ -57,13 +57,13 @@ var package_default = {
|
|
|
57
57
|
"type-check": "tsc --noEmit"
|
|
58
58
|
},
|
|
59
59
|
dependencies: {
|
|
60
|
-
"@ai-sdk/cohere": "^4.0.
|
|
61
|
-
"@ai-sdk/deepseek": "^3.0.
|
|
62
|
-
"@ai-sdk/gateway": "^4.0.
|
|
63
|
-
"@ai-sdk/google": "^4.0.
|
|
64
|
-
"@ai-sdk/mistral": "^4.0.
|
|
65
|
-
"@ai-sdk/openai": "^4.0.
|
|
66
|
-
"@ai-sdk/openai-compatible": "^3.0.
|
|
60
|
+
"@ai-sdk/cohere": "^4.0.44",
|
|
61
|
+
"@ai-sdk/deepseek": "^3.0.47",
|
|
62
|
+
"@ai-sdk/gateway": "^4.0.85",
|
|
63
|
+
"@ai-sdk/google": "^4.0.74",
|
|
64
|
+
"@ai-sdk/mistral": "^4.0.46",
|
|
65
|
+
"@ai-sdk/openai": "^4.0.69",
|
|
66
|
+
"@ai-sdk/openai-compatible": "^3.0.51",
|
|
67
67
|
"@clack/prompts": "^1.7.0",
|
|
68
68
|
"@lancedb/lancedb": "^0.38.0",
|
|
69
69
|
"@larkup/core": "workspace:*",
|
|
@@ -71,7 +71,7 @@ var package_default = {
|
|
|
71
71
|
"@larkup/vector-stores": "workspace:*",
|
|
72
72
|
"@napi-rs/canvas": "1.0.9",
|
|
73
73
|
"@pinecone-database/pinecone": "^9.0.0",
|
|
74
|
-
ai: "^7.0.
|
|
74
|
+
ai: "^7.0.105",
|
|
75
75
|
"apache-arrow": "18.1.0",
|
|
76
76
|
chalk: "^6.0.0",
|
|
77
77
|
chromadb: "^3.5.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@larkup/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=22"
|
|
6
6
|
},
|
|
@@ -15,18 +15,18 @@
|
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@ai-sdk/cohere": "^4.0.
|
|
19
|
-
"@ai-sdk/deepseek": "^3.0.
|
|
20
|
-
"@ai-sdk/gateway": "^4.0.
|
|
21
|
-
"@ai-sdk/google": "^4.0.
|
|
22
|
-
"@ai-sdk/mistral": "^4.0.
|
|
23
|
-
"@ai-sdk/openai": "^4.0.
|
|
24
|
-
"@ai-sdk/openai-compatible": "^3.0.
|
|
18
|
+
"@ai-sdk/cohere": "^4.0.44",
|
|
19
|
+
"@ai-sdk/deepseek": "^3.0.47",
|
|
20
|
+
"@ai-sdk/gateway": "^4.0.85",
|
|
21
|
+
"@ai-sdk/google": "^4.0.74",
|
|
22
|
+
"@ai-sdk/mistral": "^4.0.46",
|
|
23
|
+
"@ai-sdk/openai": "^4.0.69",
|
|
24
|
+
"@ai-sdk/openai-compatible": "^3.0.51",
|
|
25
25
|
"@clack/prompts": "^1.7.0",
|
|
26
26
|
"@lancedb/lancedb": "^0.38.0",
|
|
27
27
|
"@napi-rs/canvas": "1.0.9",
|
|
28
28
|
"@pinecone-database/pinecone": "^9.0.0",
|
|
29
|
-
"ai": "^7.0.
|
|
29
|
+
"ai": "^7.0.105",
|
|
30
30
|
"apache-arrow": "18.1.0",
|
|
31
31
|
"chalk": "^6.0.0",
|
|
32
32
|
"chromadb": "^3.5.0",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"mammoth": "^1.12.0",
|
|
36
36
|
"pdf-parse": "2.4.5",
|
|
37
37
|
"zod": "^4.4.3",
|
|
38
|
+
"@larkup/core": "0.7.0",
|
|
38
39
|
"@larkup/vector-stores": "0.1.27",
|
|
39
|
-
"@larkup/
|
|
40
|
-
"@larkup/marketplace": "0.2.8"
|
|
40
|
+
"@larkup/marketplace": "0.3.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"tsup": "^8.5.1",
|