@veedubin/neuralgentics 0.14.2 → 0.14.3
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.
|
@@ -5,12 +5,15 @@
|
|
|
5
5
|
* package referenced in the written opencode.json so that the first
|
|
6
6
|
* `opencode` launch does not block on a cold `uvx` / `npx` fetch.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
8
|
+
* The MCP config commands use `uvx` and `npx -y` (not `uv tool install`
|
|
9
|
+
* or global installs) so every launch gets the freshest version. To
|
|
10
|
+
* pre-warm the cache without pinning a version, we run the same command
|
|
11
|
+
* with `--help` or `--version` appended — this downloads + caches the
|
|
12
|
+
* package and its deps, then exits immediately without starting the
|
|
13
|
+
* MCP server.
|
|
14
|
+
*
|
|
15
|
+
* - `uvx` packages → `uvx --from <pkg> <bin> --help` or `uvx <pkg> --help`
|
|
16
|
+
* (warms the uvx ephemeral cache)
|
|
14
17
|
* - `npx` packages → `npx --yes <pkg> --help` (downloads + caches, then exits)
|
|
15
18
|
*
|
|
16
19
|
* One package failing does NOT abort the install — failures are collected
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install-packages.d.ts","sourceRoot":"","sources":["../../src/neuralgentics/install-packages.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"install-packages.d.ts","sourceRoot":"","sources":["../../src/neuralgentics/install-packages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH,OAAO,KAAK,EAAE,QAAQ,EAAkB,MAAM,oBAAoB,CAAC;AAEnE,yDAAyD;AACzD,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC3C;AAwCD;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,QAAQ,EACnB,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,iBAAiB,CAAC,CAmC5B"}
|
|
@@ -5,12 +5,15 @@
|
|
|
5
5
|
* package referenced in the written opencode.json so that the first
|
|
6
6
|
* `opencode` launch does not block on a cold `uvx` / `npx` fetch.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
8
|
+
* The MCP config commands use `uvx` and `npx -y` (not `uv tool install`
|
|
9
|
+
* or global installs) so every launch gets the freshest version. To
|
|
10
|
+
* pre-warm the cache without pinning a version, we run the same command
|
|
11
|
+
* with `--help` or `--version` appended — this downloads + caches the
|
|
12
|
+
* package and its deps, then exits immediately without starting the
|
|
13
|
+
* MCP server.
|
|
14
|
+
*
|
|
15
|
+
* - `uvx` packages → `uvx --from <pkg> <bin> --help` or `uvx <pkg> --help`
|
|
16
|
+
* (warms the uvx ephemeral cache)
|
|
14
17
|
* - `npx` packages → `npx --yes <pkg> --help` (downloads + caches, then exits)
|
|
15
18
|
*
|
|
16
19
|
* One package failing does NOT abort the install — failures are collected
|
|
@@ -22,46 +25,32 @@ const PER_PACKAGE_TIMEOUT_MS = 120_000;
|
|
|
22
25
|
/**
|
|
23
26
|
* Build the pre-download command for a single MCP server entry.
|
|
24
27
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
28
|
+
* The MCP config uses `uvx` / `npx -y` for freshest-on-launch. We pre-warm
|
|
29
|
+
* by running the same command with `--help` appended — this downloads +
|
|
30
|
+
* caches the package and deps, then exits immediately.
|
|
27
31
|
*
|
|
28
|
-
*
|
|
29
|
-
* has no `--install` flag. The supported pre-download path is
|
|
30
|
-
* `uv tool install "<pkg>"` — it warms the wheel cache and installs the
|
|
31
|
-
* binary on PATH. opencode still launches the server via `uvx ...`, which
|
|
32
|
-
* hits the warm cache on first run instead of doing a cold fetch.
|
|
32
|
+
* Returns `null` if the entry uses neither `uvx` nor `npx`.
|
|
33
33
|
*/
|
|
34
34
|
function buildPreDownloadCommand(entry) {
|
|
35
35
|
const [runner, ...rest] = entry.command;
|
|
36
36
|
if (runner === "uvx") {
|
|
37
37
|
// Forms seen in mcp-templates.ts:
|
|
38
|
-
// ["uvx", "--from", "memini-ai-dev", "memini-ai"]
|
|
39
|
-
// ["uvx", "videre-mcp[vision]"]
|
|
40
|
-
// ["uvx", "markitdown-mcp"]
|
|
41
|
-
// ["uvx", "mcp-server-motherduck"] →
|
|
38
|
+
// ["uvx", "--from", "memini-ai-dev", "memini-ai"] → uvx --from memini-ai-dev memini-ai --help
|
|
39
|
+
// ["uvx", "videre-mcp[vision]"] → uvx videre-mcp[vision] --help
|
|
40
|
+
// ["uvx", "markitdown-mcp"] → uvx markitdown-mcp --help
|
|
41
|
+
// ["uvx", "mcp-server-motherduck"] → uvx mcp-server-motherduck --help
|
|
42
42
|
//
|
|
43
|
-
//
|
|
44
|
-
//
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
const pkg = rest.join(" ").trim();
|
|
50
|
-
if (!pkg)
|
|
51
|
-
return null;
|
|
52
|
-
return { cmd: `uv tool install --force "${pkg}"`, via: "uvx" };
|
|
43
|
+
// We run the exact same uvx command + " --help" so the ephemeral
|
|
44
|
+
// cache is warmed. On real launch, opencode runs the same uvx
|
|
45
|
+
// command (without --help) and hits the warm cache.
|
|
46
|
+
const fullCmd = entry.command.join(" ");
|
|
47
|
+
return { cmd: `${fullCmd} --help`, via: "uvx" };
|
|
53
48
|
}
|
|
54
49
|
if (runner === "npx") {
|
|
55
50
|
// Forms: ["npx", "-y", "<pkg>"] OR ["npx", "-y", "<pkg>@latest"]
|
|
56
|
-
//
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
if (!pkg)
|
|
60
|
-
return null;
|
|
61
|
-
return {
|
|
62
|
-
cmd: `npx --yes ${pkg} --help`,
|
|
63
|
-
via: "npx",
|
|
64
|
-
};
|
|
51
|
+
// We run the exact same npx command + " --help" to cache it.
|
|
52
|
+
const fullCmd = entry.command.join(" ");
|
|
53
|
+
return { cmd: `${fullCmd} --help`, via: "npx" };
|
|
65
54
|
}
|
|
66
55
|
return null;
|
|
67
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install-packages.js","sourceRoot":"","sources":["../../src/neuralgentics/install-packages.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"install-packages.js","sourceRoot":"","sources":["../../src/neuralgentics/install-packages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAU9C,uDAAuD;AACvD,MAAM,sBAAsB,GAAG,OAAO,CAAC;AAEvC;;;;;;;;GAQG;AACH,SAAS,uBAAuB,CAAC,KAAqB;IACpD,MAAM,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;IACxC,IAAI,MAAM,KAAK,KAAK,EAAE,CAAC;QACrB,kCAAkC;QAClC,kGAAkG;QAClG,qFAAqF;QACrF,iFAAiF;QACjF,wFAAwF;QACxF,EAAE;QACF,iEAAiE;QACjE,8DAA8D;QAC9D,oDAAoD;QACpD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxC,OAAO,EAAE,GAAG,EAAE,GAAG,OAAO,SAAS,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;IAClD,CAAC;IAED,IAAI,MAAM,KAAK,KAAK,EAAE,CAAC;QACrB,mEAAmE;QACnE,6DAA6D;QAC7D,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxC,OAAO,EAAE,GAAG,EAAE,GAAG,OAAO,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