@haven_ai/connect 0.1.18-alpha.0 → 0.1.20-alpha.0
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/cli.cjs +20 -26
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +21 -27
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +20 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -5
- package/dist/index.d.ts +7 -5
- package/dist/index.js +21 -27
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -235,10 +235,16 @@ var MCP_RUNTIME_MANIFEST = {
|
|
|
235
235
|
mcpPackage: "@haven_ai/mcp",
|
|
236
236
|
mcpVersion: mcp.MCP_VERSION,
|
|
237
237
|
sdkPackage: "@haven_ai/sdk",
|
|
238
|
-
sdkVersion: "0.1.
|
|
238
|
+
sdkVersion: "0.1.20-alpha.0",
|
|
239
239
|
signerPackage: "@haven_ai/signer",
|
|
240
|
-
signerVersion: "0.1.
|
|
241
|
-
|
|
240
|
+
signerVersion: "0.1.20-alpha.0",
|
|
241
|
+
// Sourced from the SDK, never a literal (#1161). This field read '20.0.0'
|
|
242
|
+
// while every package's `engines` said `>=24` and the docs said `>=24.0.0`,
|
|
243
|
+
// so the guard that was supposed to enforce the floor waved Node v23 through
|
|
244
|
+
// — including on the `--local` path where it does run. A hand-maintained
|
|
245
|
+
// second copy of a number is a drift waiting to happen; a guard test pins
|
|
246
|
+
// this against `package.json`'s `engines.node`.
|
|
247
|
+
minimumNodeVersion: sdk.HAVEN_MINIMUM_NODE_VERSION,
|
|
242
248
|
supportedClients: ["codex-cli", "codex-desktop", "claude-code"],
|
|
243
249
|
requiredTools: mcp.registeredToolNames()
|
|
244
250
|
};
|
|
@@ -912,9 +918,13 @@ async function fetchWithTimeout(fetchImpl, url, init) {
|
|
|
912
918
|
var execFileAsync = util.promisify(child_process.execFile);
|
|
913
919
|
var UnsupportedNodeVersionError = class extends Error {
|
|
914
920
|
code = "local_mcp_unsupported_node_version";
|
|
915
|
-
|
|
916
|
-
|
|
921
|
+
nodeVersion;
|
|
922
|
+
minimumNodeVersion;
|
|
923
|
+
constructor(nodeVersion, minimumNodeVersion, subject = "Haven setup") {
|
|
924
|
+
super(sdk.unsupportedNodeVersionMessage({ subject, nodeVersion, minimumNodeVersion }));
|
|
917
925
|
this.name = "UnsupportedNodeVersionError";
|
|
926
|
+
this.nodeVersion = nodeVersion;
|
|
927
|
+
this.minimumNodeVersion = minimumNodeVersion;
|
|
918
928
|
}
|
|
919
929
|
};
|
|
920
930
|
async function prepareLocalMcpRuntime(input, deps = {}) {
|
|
@@ -960,28 +970,11 @@ async function prepareLocalMcpRuntime(input, deps = {}) {
|
|
|
960
970
|
messages
|
|
961
971
|
};
|
|
962
972
|
}
|
|
963
|
-
function assertSupportedNodeVersion(nodeVersion = process.versions.node, minimumNodeVersion = MCP_RUNTIME_MANIFEST.minimumNodeVersion) {
|
|
964
|
-
if (
|
|
965
|
-
throw new UnsupportedNodeVersionError(nodeVersion, minimumNodeVersion);
|
|
973
|
+
function assertSupportedNodeVersion(nodeVersion = process.versions.node, minimumNodeVersion = MCP_RUNTIME_MANIFEST.minimumNodeVersion, subject = "Haven setup") {
|
|
974
|
+
if (!sdk.isSupportedNodeVersion(nodeVersion, minimumNodeVersion)) {
|
|
975
|
+
throw new UnsupportedNodeVersionError(nodeVersion, minimumNodeVersion, subject);
|
|
966
976
|
}
|
|
967
977
|
}
|
|
968
|
-
function compareNodeVersions(left, right) {
|
|
969
|
-
const leftParts = parseNodeVersion(left);
|
|
970
|
-
const rightParts = parseNodeVersion(right);
|
|
971
|
-
for (let i = 0; i < 3; i += 1) {
|
|
972
|
-
if (leftParts[i] !== rightParts[i]) return leftParts[i] > rightParts[i] ? 1 : -1;
|
|
973
|
-
}
|
|
974
|
-
return 0;
|
|
975
|
-
}
|
|
976
|
-
function parseNodeVersion(value) {
|
|
977
|
-
const match = value.trim().match(/^v?(\d+)(?:\.(\d+))?(?:\.(\d+))?/);
|
|
978
|
-
if (!match) return [0, 0, 0];
|
|
979
|
-
return [
|
|
980
|
-
Number(match[1] ?? 0),
|
|
981
|
-
Number(match[2] ?? 0),
|
|
982
|
-
Number(match[3] ?? 0)
|
|
983
|
-
];
|
|
984
|
-
}
|
|
985
978
|
async function installRuntimePackages(runtimeDirectory, npmCacheDirectory, runCommand) {
|
|
986
979
|
const baseArgs = [
|
|
987
980
|
"install",
|
|
@@ -1714,8 +1707,9 @@ function localRuntimePrepareErrorCode(err) {
|
|
|
1714
1707
|
}
|
|
1715
1708
|
|
|
1716
1709
|
// src/runtime.ts
|
|
1717
|
-
var CONNECTOR_VERSION = "0.1.
|
|
1710
|
+
var CONNECTOR_VERSION = "0.1.20-alpha.0";
|
|
1718
1711
|
async function runConnect(options, deps = {}) {
|
|
1712
|
+
assertSupportedNodeVersion(deps.nodeVersion, MCP_RUNTIME_MANIFEST.minimumNodeVersion);
|
|
1719
1713
|
const connectorVersion = options.connectorVersion ?? CONNECTOR_VERSION;
|
|
1720
1714
|
const api = deps.api ?? createConnectApiClient(options.apiBaseUrl);
|
|
1721
1715
|
const log = secureLogger(deps.log ?? ((message) => process.stdout.write(`${message}
|