@haven_ai/connect 0.2.0-alpha.0 → 0.2.1-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/index.cjs CHANGED
@@ -556,9 +556,9 @@ var init_runtime_manifest = __esm({
556
556
  mcpPackage: "@haven_ai/mcp",
557
557
  mcpVersion: mcp.MCP_VERSION,
558
558
  sdkPackage: "@haven_ai/sdk",
559
- sdkVersion: "0.2.0-alpha.0",
559
+ sdkVersion: "0.2.1-alpha.0",
560
560
  signerPackage: "@haven_ai/signer",
561
- signerVersion: "0.2.0-alpha.0",
561
+ signerVersion: "0.2.1-alpha.0",
562
562
  // Sourced from the SDK, never a literal (#1161). This field read '20.0.0'
563
563
  // while every package's `engines` said `>=24` and the docs said `>=24.0.0`,
564
564
  // so the guard that was supposed to enforce the floor waved Node v23 through
@@ -2664,7 +2664,7 @@ async function installRuntime(input, deps = {}) {
2664
2664
  (signerProbe === void 0 || signerProbe.status === "ok");
2665
2665
  const restartRequired = configResult.restartRequired || restartRequiredForRuntime(runtime, deps.env);
2666
2666
  const errorCode = configResult.errorCode ?? (configResult.runtimeMcpMode === "local_stdio" ? localMcpErrorCode(signerCredentialReady, localMcpConsent, localMcpProbe?.status) : hostedMcpErrorCode(configResult.hostedConfigured, hostedProbe.status) ?? signerConsentErrorCode(signerCredentialReady, signerConsent) ?? signerProbeErrorCode(signerProbe));
2667
- const hostedProbeMessages = configResult.hostedConfigured && hostedProbe.status !== "ok" ? [`Hosted Haven MCP probe failed: ${hostedProbe.status}.`] : configResult.hostedConfigured ? ["Verified hosted Haven MCP tools with a read-only handshake."] : [];
2667
+ const hostedProbeMessages = configResult.hostedConfigured && hostedProbe.status !== "ok" ? [`Hosted Haven MCP probe failed: ${hostedProbe.status}.`] : configResult.hostedConfigured ? ["Verified that the hosted Haven MCP tools endpoint responds to a read-only handshake."] : [];
2668
2668
  const signerProbeMessages = signerProbe ? signerProbe.status === "ok" ? ["Verified local Haven signer with a stdio handshake."] : [
2669
2669
  `Local Haven signer handshake failed: ${signerProbe.status}.`,
2670
2670
  `Re-run \`${sdk.connectorRerunCommand()}\` to repair the signer setup.`
@@ -3714,14 +3714,17 @@ async function checksForAgent(entry, input, deps) {
3714
3714
  ...matches ? {} : { repair: `Run: ${RERUN} --doctor --repair --runtime ${input.runtime} with the same HAVEN_*_SPEC variables set.` }
3715
3715
  });
3716
3716
  } else {
3717
- const matches = await installedRuntimeMatches(sidecar.runtime_directory, sidecar.cli_path);
3717
+ const intact = await installedRuntimeMatchesVersions(sidecar.runtime_directory, sidecar.cli_path, {
3718
+ signerVersion: sidecar.signer_version,
3719
+ sdkVersion: sidecar.sdk_version
3720
+ });
3718
3721
  const versionOk = sidecar.signer_version === exports.MCP_RUNTIME_MANIFEST.signerVersion;
3719
- const ok = matches && versionOk;
3722
+ const ok = intact && versionOk;
3720
3723
  checks.push({
3721
3724
  id: "signer_runtime",
3722
3725
  label: "Signer runtime (preinstalled wrapper)",
3723
3726
  ok,
3724
- detail: ok ? `Installed ${sidecar.signer_package}@${sidecar.signer_version} at ${sidecar.runtime_directory}` : matches ? `Installed version ${sidecar.signer_version} does not match the connector's pinned ${exports.MCP_RUNTIME_MANIFEST.signerVersion}.` : `Runtime directory is stale or empty (${sidecar.runtime_directory}) \u2014 the CLI or package versions are missing.`,
3727
+ detail: ok ? `Installed ${sidecar.signer_package}@${sidecar.signer_version} at ${sidecar.runtime_directory}` : intact ? `Installed version ${sidecar.signer_version} does not match the connector's pinned ${exports.MCP_RUNTIME_MANIFEST.signerVersion} \u2014 intact, but outdated.` : `Runtime directory is stale or empty (${sidecar.runtime_directory}) \u2014 the CLI or package versions are missing.`,
3725
3728
  ...ok ? {} : { repair: `Run: ${RERUN} --doctor --repair --runtime ${input.runtime}` }
3726
3729
  });
3727
3730
  }
@@ -3734,9 +3737,9 @@ async function checksForAgent(entry, input, deps) {
3734
3737
  id: "hosted_mcp",
3735
3738
  label: "Hosted Haven MCP",
3736
3739
  ok: probe.status === "ok",
3737
- detail: probe.status === "ok" ? `Reachable and authorized (${hostedUrl}).` : `Probe failed: ${probe.status} (${hostedUrl}).`,
3740
+ detail: probe.status === "ok" ? `MCP tools endpoint is reachable (${hostedUrl}).` : `MCP tools endpoint probe failed: ${probe.status} (${hostedUrl}).`,
3738
3741
  ...probe.status === "ok" ? {} : {
3739
- repair: probe.status === "unauthorized" ? `The stored API key was rejected \u2014 re-run the full setup with a fresh token: ${RERUN} --setup <token>.` : "Check network access to the hosted MCP URL, then re-run --doctor."
3742
+ repair: "Check network access and runtime configuration for the hosted MCP URL, then re-run --doctor."
3740
3743
  }
3741
3744
  });
3742
3745
  } else {
@@ -3970,14 +3973,17 @@ async function runDoctor(input, deps = {}) {
3970
3973
  const identity = await readIdentity(entry.directory);
3971
3974
  const tombstone = await readAgentTombstone(entry.directory);
3972
3975
  const otherAgent = entry.agentId ?? path.basename(entry.directory);
3973
- const otherUrl = identity?.hosted_mcp_url ?? (identity?.api_url ? `${identity.api_url}/mcp` : void 0);
3974
- if (!identity?.api_key || !otherUrl) {
3976
+ if (!identity?.api_key || !identity.api_url) {
3975
3977
  if (tombstone) retired.push(`${otherAgent} (retired ${tombstone.retired_at})`);
3976
- else unverifiable.push(`${otherAgent} (no stored key/URL to probe)`);
3978
+ else unverifiable.push(`${otherAgent} (no stored key/API URL to probe)`);
3977
3979
  continue;
3978
3980
  }
3979
3981
  const suffix = tombstone ? " [tombstoned \u2014 key material still present]" : "";
3980
- const probe = await (deps.probeHosted ?? probeHostedMcpTools)(identity.api_key, otherUrl, deps.fetch);
3982
+ const probe = await (deps.probeHostedIdentity ?? probeHostedAgentIdentity)(
3983
+ identity.api_key,
3984
+ identity.api_url,
3985
+ deps.fetch
3986
+ );
3981
3987
  if (probe.status === "ok") live.push({ label: `${otherAgent}${suffix}`, entry });
3982
3988
  else if (probe.status === "unauthorized") revoked.push(`${otherAgent}${suffix}`);
3983
3989
  else unverifiable.push(`${otherAgent} (${probe.status})${suffix}`);
@@ -4421,7 +4427,7 @@ async function pathExists2(path) {
4421
4427
  init_unwire();
4422
4428
  init_local_mcp_runtime();
4423
4429
  init_runtime_manifest();
4424
- var CONNECTOR_VERSION = "0.2.0-alpha.0";
4430
+ var CONNECTOR_VERSION = "0.2.1-alpha.0";
4425
4431
  var CONNECT_OUTCOME_SCHEMA_VERSION = 1;
4426
4432
  var failureOutcomesByError = /* @__PURE__ */ new WeakMap();
4427
4433
  function failureOutcomeFor(runtimeHint, error) {