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