@haven_ai/connect 0.2.0-alpha.0 → 0.3.0-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.d.cts CHANGED
@@ -170,10 +170,8 @@ interface AgentIdentity {
170
170
  id: string;
171
171
  name: string;
172
172
  status: string;
173
- /** @deprecated #2908 — same value as `account_address`; the server drops it at #2914. */
174
- safe_address: string | null;
175
- /** #2908 — the account-vocabulary twin (not emitted by every server yet; read first, never required). */
176
- account_address?: string | null;
173
+ /** The Haven account (smart account) address. The server emits this ONLY as of #2914 — `safe_address` is retired. */
174
+ account_address: string | null;
177
175
  delegate_address: string | null;
178
176
  chain_id: number | null;
179
177
  execution_rail: 'legacy' | 'delegation' | string;
@@ -738,7 +736,7 @@ type WiringCollisionResolution = {
738
736
  action: 'abort';
739
737
  };
740
738
 
741
- declare const CONNECTOR_VERSION = "0.2.0-alpha.0";
739
+ declare const CONNECTOR_VERSION = "0.3.0-alpha.0";
742
740
  interface ConnectOptions {
743
741
  setupToken: string;
744
742
  apiBaseUrl: string;
@@ -1138,11 +1136,11 @@ declare function isConnectError(err: unknown): err is ConnectError;
1138
1136
 
1139
1137
  declare const MCP_RUNTIME_MANIFEST: {
1140
1138
  readonly mcpPackage: "@haven_ai/mcp";
1141
- readonly mcpVersion: "0.2.0-alpha.0";
1139
+ readonly mcpVersion: "0.3.0-alpha.0";
1142
1140
  readonly sdkPackage: "@haven_ai/sdk";
1143
- readonly sdkVersion: "0.2.0-alpha.0";
1141
+ readonly sdkVersion: "0.3.0-alpha.0";
1144
1142
  readonly signerPackage: "@haven_ai/signer";
1145
- readonly signerVersion: "0.2.0-alpha.0";
1143
+ readonly signerVersion: "0.3.0-alpha.0";
1146
1144
  readonly minimumNodeVersion: "22.0.0";
1147
1145
  readonly supportedClients: readonly ["codex-cli", "codex-desktop", "claude-code"];
1148
1146
  readonly requiredTools: readonly string[];
package/dist/index.d.ts CHANGED
@@ -170,10 +170,8 @@ interface AgentIdentity {
170
170
  id: string;
171
171
  name: string;
172
172
  status: string;
173
- /** @deprecated #2908 — same value as `account_address`; the server drops it at #2914. */
174
- safe_address: string | null;
175
- /** #2908 — the account-vocabulary twin (not emitted by every server yet; read first, never required). */
176
- account_address?: string | null;
173
+ /** The Haven account (smart account) address. The server emits this ONLY as of #2914 — `safe_address` is retired. */
174
+ account_address: string | null;
177
175
  delegate_address: string | null;
178
176
  chain_id: number | null;
179
177
  execution_rail: 'legacy' | 'delegation' | string;
@@ -738,7 +736,7 @@ type WiringCollisionResolution = {
738
736
  action: 'abort';
739
737
  };
740
738
 
741
- declare const CONNECTOR_VERSION = "0.2.0-alpha.0";
739
+ declare const CONNECTOR_VERSION = "0.3.0-alpha.0";
742
740
  interface ConnectOptions {
743
741
  setupToken: string;
744
742
  apiBaseUrl: string;
@@ -1138,11 +1136,11 @@ declare function isConnectError(err: unknown): err is ConnectError;
1138
1136
 
1139
1137
  declare const MCP_RUNTIME_MANIFEST: {
1140
1138
  readonly mcpPackage: "@haven_ai/mcp";
1141
- readonly mcpVersion: "0.2.0-alpha.0";
1139
+ readonly mcpVersion: "0.3.0-alpha.0";
1142
1140
  readonly sdkPackage: "@haven_ai/sdk";
1143
- readonly sdkVersion: "0.2.0-alpha.0";
1141
+ readonly sdkVersion: "0.3.0-alpha.0";
1144
1142
  readonly signerPackage: "@haven_ai/signer";
1145
- readonly signerVersion: "0.2.0-alpha.0";
1143
+ readonly signerVersion: "0.3.0-alpha.0";
1146
1144
  readonly minimumNodeVersion: "22.0.0";
1147
1145
  readonly supportedClients: readonly ["codex-cli", "codex-desktop", "claude-code"];
1148
1146
  readonly requiredTools: readonly string[];
package/dist/index.js CHANGED
@@ -549,9 +549,9 @@ var init_runtime_manifest = __esm({
549
549
  mcpPackage: "@haven_ai/mcp",
550
550
  mcpVersion: MCP_VERSION,
551
551
  sdkPackage: "@haven_ai/sdk",
552
- sdkVersion: "0.2.0-alpha.0",
552
+ sdkVersion: "0.3.0-alpha.0",
553
553
  signerPackage: "@haven_ai/signer",
554
- signerVersion: "0.2.0-alpha.0",
554
+ signerVersion: "0.3.0-alpha.0",
555
555
  // Sourced from the SDK, never a literal (#1161). This field read '20.0.0'
556
556
  // while every package's `engines` said `>=24` and the docs said `>=24.0.0`,
557
557
  // so the guard that was supposed to enforce the floor waved Node v23 through
@@ -1439,7 +1439,7 @@ async function buildLocalMcpConsentInput(identityPath, signerPath) {
1439
1439
  apiKey: credentials.apiKey,
1440
1440
  apiUrl: credentials.apiUrl,
1441
1441
  agentId: credentials.agentId,
1442
- safeAddress: credentials.accountAddress ?? credentials.safeAddress,
1442
+ accountAddress: credentials.accountAddress,
1443
1443
  delegateAddress: credentials.delegateAddress,
1444
1444
  chainId: credentials.chainId,
1445
1445
  allowanceSummary: credentials.allowanceSummary
@@ -2481,7 +2481,7 @@ async function buildSignerConsentInput(signerPath) {
2481
2481
  });
2482
2482
  return {
2483
2483
  delegateAddress: signer.delegateAddress,
2484
- safeAddress: credentials.accountAddress ?? credentials.safeAddress,
2484
+ accountAddress: credentials.accountAddress,
2485
2485
  agentId: credentials.agentId,
2486
2486
  chainId: credentials.chainId,
2487
2487
  network: credentials.network,
@@ -2657,7 +2657,7 @@ async function installRuntime(input, deps = {}) {
2657
2657
  (signerProbe === void 0 || signerProbe.status === "ok");
2658
2658
  const restartRequired = configResult.restartRequired || restartRequiredForRuntime(runtime, deps.env);
2659
2659
  const errorCode = configResult.errorCode ?? (configResult.runtimeMcpMode === "local_stdio" ? localMcpErrorCode(signerCredentialReady, localMcpConsent, localMcpProbe?.status) : hostedMcpErrorCode(configResult.hostedConfigured, hostedProbe.status) ?? signerConsentErrorCode(signerCredentialReady, signerConsent) ?? signerProbeErrorCode(signerProbe));
2660
- 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."] : [];
2660
+ 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."] : [];
2661
2661
  const signerProbeMessages = signerProbe ? signerProbe.status === "ok" ? ["Verified local Haven signer with a stdio handshake."] : [
2662
2662
  `Local Haven signer handshake failed: ${signerProbe.status}.`,
2663
2663
  `Re-run \`${connectorRerunCommand()}\` to repair the signer setup.`
@@ -3319,9 +3319,10 @@ async function finishRekey(options, deps = {}) {
3319
3319
  apiKey: options.newApiKey,
3320
3320
  delegateKey: pending.new_delegate_key,
3321
3321
  delegateAddress: pending.new_delegate_address,
3322
- // #2908: the stored value (already new-name-first) wins; the hosted
3323
- // identity's `account_address` twin before its deprecated `safe_address`.
3324
- accountAddress: stored.accountAddress ?? identity.account_address ?? identity.safe_address ?? void 0,
3322
+ // The stored value (already new-name-first, from the credential-FILE
3323
+ // permanent fallback) wins; the hosted identity's `account_address` is a
3324
+ // LIVE server read, which as of #2914 emits only that name.
3325
+ accountAddress: stored.accountAddress ?? identity.account_address ?? void 0,
3325
3326
  chainId: stored.chainId ?? identity.chain_id ?? void 0,
3326
3327
  network: stored.network,
3327
3328
  agentBudget: stored.agentBudget,
@@ -3707,14 +3708,17 @@ async function checksForAgent(entry, input, deps) {
3707
3708
  ...matches ? {} : { repair: `Run: ${RERUN} --doctor --repair --runtime ${input.runtime} with the same HAVEN_*_SPEC variables set.` }
3708
3709
  });
3709
3710
  } else {
3710
- const matches = await installedRuntimeMatches(sidecar.runtime_directory, sidecar.cli_path);
3711
+ const intact = await installedRuntimeMatchesVersions(sidecar.runtime_directory, sidecar.cli_path, {
3712
+ signerVersion: sidecar.signer_version,
3713
+ sdkVersion: sidecar.sdk_version
3714
+ });
3711
3715
  const versionOk = sidecar.signer_version === MCP_RUNTIME_MANIFEST.signerVersion;
3712
- const ok = matches && versionOk;
3716
+ const ok = intact && versionOk;
3713
3717
  checks.push({
3714
3718
  id: "signer_runtime",
3715
3719
  label: "Signer runtime (preinstalled wrapper)",
3716
3720
  ok,
3717
- 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 ${MCP_RUNTIME_MANIFEST.signerVersion}.` : `Runtime directory is stale or empty (${sidecar.runtime_directory}) \u2014 the CLI or package versions are missing.`,
3721
+ 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 ${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.`,
3718
3722
  ...ok ? {} : { repair: `Run: ${RERUN} --doctor --repair --runtime ${input.runtime}` }
3719
3723
  });
3720
3724
  }
@@ -3727,9 +3731,9 @@ async function checksForAgent(entry, input, deps) {
3727
3731
  id: "hosted_mcp",
3728
3732
  label: "Hosted Haven MCP",
3729
3733
  ok: probe.status === "ok",
3730
- detail: probe.status === "ok" ? `Reachable and authorized (${hostedUrl}).` : `Probe failed: ${probe.status} (${hostedUrl}).`,
3734
+ detail: probe.status === "ok" ? `MCP tools endpoint is reachable (${hostedUrl}).` : `MCP tools endpoint probe failed: ${probe.status} (${hostedUrl}).`,
3731
3735
  ...probe.status === "ok" ? {} : {
3732
- 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."
3736
+ repair: "Check network access and runtime configuration for the hosted MCP URL, then re-run --doctor."
3733
3737
  }
3734
3738
  });
3735
3739
  } else {
@@ -3963,14 +3967,17 @@ async function runDoctor(input, deps = {}) {
3963
3967
  const identity = await readIdentity(entry.directory);
3964
3968
  const tombstone = await readAgentTombstone(entry.directory);
3965
3969
  const otherAgent = entry.agentId ?? basename(entry.directory);
3966
- const otherUrl = identity?.hosted_mcp_url ?? (identity?.api_url ? `${identity.api_url}/mcp` : void 0);
3967
- if (!identity?.api_key || !otherUrl) {
3970
+ if (!identity?.api_key || !identity.api_url) {
3968
3971
  if (tombstone) retired.push(`${otherAgent} (retired ${tombstone.retired_at})`);
3969
- else unverifiable.push(`${otherAgent} (no stored key/URL to probe)`);
3972
+ else unverifiable.push(`${otherAgent} (no stored key/API URL to probe)`);
3970
3973
  continue;
3971
3974
  }
3972
3975
  const suffix = tombstone ? " [tombstoned \u2014 key material still present]" : "";
3973
- const probe = await (deps.probeHosted ?? probeHostedMcpTools)(identity.api_key, otherUrl, deps.fetch);
3976
+ const probe = await (deps.probeHostedIdentity ?? probeHostedAgentIdentity)(
3977
+ identity.api_key,
3978
+ identity.api_url,
3979
+ deps.fetch
3980
+ );
3974
3981
  if (probe.status === "ok") live.push({ label: `${otherAgent}${suffix}`, entry });
3975
3982
  else if (probe.status === "unauthorized") revoked.push(`${otherAgent}${suffix}`);
3976
3983
  else unverifiable.push(`${otherAgent} (${probe.status})${suffix}`);
@@ -4414,7 +4421,7 @@ async function pathExists2(path) {
4414
4421
  init_unwire();
4415
4422
  init_local_mcp_runtime();
4416
4423
  init_runtime_manifest();
4417
- var CONNECTOR_VERSION = "0.2.0-alpha.0";
4424
+ var CONNECTOR_VERSION = "0.3.0-alpha.0";
4418
4425
  var CONNECT_OUTCOME_SCHEMA_VERSION = 1;
4419
4426
  var failureOutcomesByError = /* @__PURE__ */ new WeakMap();
4420
4427
  function failureOutcomeFor(runtimeHint, error) {