@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/README.md +7 -0
- package/dist/cli.cjs +25 -18
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +25 -18
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +25 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -8
- package/dist/index.d.ts +6 -8
- package/dist/index.js +25 -18
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -101,6 +101,13 @@ one agent and sign as another, and it fails hard. This is the half of that
|
|
|
101
101
|
hazard a local tool can know — the doctor still cannot see inside an
|
|
102
102
|
already-running host, which is why the restart guidance below matters.
|
|
103
103
|
|
|
104
|
+
The hosted MCP `tools/list` row is an endpoint-reachability handshake, not a
|
|
105
|
+
credential-authentication result. When doctor classifies a superseded
|
|
106
|
+
directory, it uses the same authenticated, read-only identity endpoint: a
|
|
107
|
+
401/403 means the stored key is already revoked; a successful identity read
|
|
108
|
+
means it remains spend-capable; and network or malformed responses remain
|
|
109
|
+
unverifiable.
|
|
110
|
+
|
|
104
111
|
## Retiring an old agent directory
|
|
105
112
|
|
|
106
113
|
Re-running setup without `--replace` creates a NEW agent and retires nothing
|
package/dist/cli.cjs
CHANGED
|
@@ -557,9 +557,9 @@ var init_runtime_manifest = __esm({
|
|
|
557
557
|
mcpPackage: "@haven_ai/mcp",
|
|
558
558
|
mcpVersion: mcp.MCP_VERSION,
|
|
559
559
|
sdkPackage: "@haven_ai/sdk",
|
|
560
|
-
sdkVersion: "0.
|
|
560
|
+
sdkVersion: "0.3.0-alpha.0",
|
|
561
561
|
signerPackage: "@haven_ai/signer",
|
|
562
|
-
signerVersion: "0.
|
|
562
|
+
signerVersion: "0.3.0-alpha.0",
|
|
563
563
|
// Sourced from the SDK, never a literal (#1161). This field read '20.0.0'
|
|
564
564
|
// while every package's `engines` said `>=24` and the docs said `>=24.0.0`,
|
|
565
565
|
// so the guard that was supposed to enforce the floor waved Node v23 through
|
|
@@ -1447,7 +1447,7 @@ async function buildLocalMcpConsentInput(identityPath, signerPath) {
|
|
|
1447
1447
|
apiKey: credentials.apiKey,
|
|
1448
1448
|
apiUrl: credentials.apiUrl,
|
|
1449
1449
|
agentId: credentials.agentId,
|
|
1450
|
-
|
|
1450
|
+
accountAddress: credentials.accountAddress,
|
|
1451
1451
|
delegateAddress: credentials.delegateAddress,
|
|
1452
1452
|
chainId: credentials.chainId,
|
|
1453
1453
|
allowanceSummary: credentials.allowanceSummary
|
|
@@ -2489,7 +2489,7 @@ async function buildSignerConsentInput(signerPath) {
|
|
|
2489
2489
|
});
|
|
2490
2490
|
return {
|
|
2491
2491
|
delegateAddress: signer$1.delegateAddress,
|
|
2492
|
-
|
|
2492
|
+
accountAddress: credentials.accountAddress,
|
|
2493
2493
|
agentId: credentials.agentId,
|
|
2494
2494
|
chainId: credentials.chainId,
|
|
2495
2495
|
network: credentials.network,
|
|
@@ -2665,7 +2665,7 @@ async function installRuntime(input, deps = {}) {
|
|
|
2665
2665
|
(signerProbe === void 0 || signerProbe.status === "ok");
|
|
2666
2666
|
const restartRequired = configResult.restartRequired || restartRequiredForRuntime(runtime, deps.env);
|
|
2667
2667
|
const errorCode = configResult.errorCode ?? (configResult.runtimeMcpMode === "local_stdio" ? localMcpErrorCode(signerCredentialReady, localMcpConsent, localMcpProbe?.status) : hostedMcpErrorCode(configResult.hostedConfigured, hostedProbe.status) ?? signerConsentErrorCode(signerCredentialReady, signerConsent) ?? signerProbeErrorCode(signerProbe));
|
|
2668
|
-
const hostedProbeMessages = configResult.hostedConfigured && hostedProbe.status !== "ok" ? [`Hosted Haven MCP probe failed: ${hostedProbe.status}.`] : configResult.hostedConfigured ? ["Verified hosted Haven MCP tools
|
|
2668
|
+
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."] : [];
|
|
2669
2669
|
const signerProbeMessages = signerProbe ? signerProbe.status === "ok" ? ["Verified local Haven signer with a stdio handshake."] : [
|
|
2670
2670
|
`Local Haven signer handshake failed: ${signerProbe.status}.`,
|
|
2671
2671
|
`Re-run \`${sdk.connectorRerunCommand()}\` to repair the signer setup.`
|
|
@@ -3327,9 +3327,10 @@ async function finishRekey(options, deps = {}) {
|
|
|
3327
3327
|
apiKey: options.newApiKey,
|
|
3328
3328
|
delegateKey: pending.new_delegate_key,
|
|
3329
3329
|
delegateAddress: pending.new_delegate_address,
|
|
3330
|
-
//
|
|
3331
|
-
// identity's `account_address`
|
|
3332
|
-
|
|
3330
|
+
// The stored value (already new-name-first, from the credential-FILE
|
|
3331
|
+
// permanent fallback) wins; the hosted identity's `account_address` is a
|
|
3332
|
+
// LIVE server read, which as of #2914 emits only that name.
|
|
3333
|
+
accountAddress: stored.accountAddress ?? identity.account_address ?? void 0,
|
|
3333
3334
|
chainId: stored.chainId ?? identity.chain_id ?? void 0,
|
|
3334
3335
|
network: stored.network,
|
|
3335
3336
|
agentBudget: stored.agentBudget,
|
|
@@ -3715,14 +3716,17 @@ async function checksForAgent(entry, input, deps) {
|
|
|
3715
3716
|
...matches ? {} : { repair: `Run: ${RERUN} --doctor --repair --runtime ${input.runtime} with the same HAVEN_*_SPEC variables set.` }
|
|
3716
3717
|
});
|
|
3717
3718
|
} else {
|
|
3718
|
-
const
|
|
3719
|
+
const intact = await installedRuntimeMatchesVersions(sidecar.runtime_directory, sidecar.cli_path, {
|
|
3720
|
+
signerVersion: sidecar.signer_version,
|
|
3721
|
+
sdkVersion: sidecar.sdk_version
|
|
3722
|
+
});
|
|
3719
3723
|
const versionOk = sidecar.signer_version === MCP_RUNTIME_MANIFEST.signerVersion;
|
|
3720
|
-
const ok =
|
|
3724
|
+
const ok = intact && versionOk;
|
|
3721
3725
|
checks.push({
|
|
3722
3726
|
id: "signer_runtime",
|
|
3723
3727
|
label: "Signer runtime (preinstalled wrapper)",
|
|
3724
3728
|
ok,
|
|
3725
|
-
detail: ok ? `Installed ${sidecar.signer_package}@${sidecar.signer_version} at ${sidecar.runtime_directory}` :
|
|
3729
|
+
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.`,
|
|
3726
3730
|
...ok ? {} : { repair: `Run: ${RERUN} --doctor --repair --runtime ${input.runtime}` }
|
|
3727
3731
|
});
|
|
3728
3732
|
}
|
|
@@ -3735,9 +3739,9 @@ async function checksForAgent(entry, input, deps) {
|
|
|
3735
3739
|
id: "hosted_mcp",
|
|
3736
3740
|
label: "Hosted Haven MCP",
|
|
3737
3741
|
ok: probe.status === "ok",
|
|
3738
|
-
detail: probe.status === "ok" ? `
|
|
3742
|
+
detail: probe.status === "ok" ? `MCP tools endpoint is reachable (${hostedUrl}).` : `MCP tools endpoint probe failed: ${probe.status} (${hostedUrl}).`,
|
|
3739
3743
|
...probe.status === "ok" ? {} : {
|
|
3740
|
-
repair:
|
|
3744
|
+
repair: "Check network access and runtime configuration for the hosted MCP URL, then re-run --doctor."
|
|
3741
3745
|
}
|
|
3742
3746
|
});
|
|
3743
3747
|
} else {
|
|
@@ -3971,14 +3975,17 @@ async function runDoctor(input, deps = {}) {
|
|
|
3971
3975
|
const identity = await readIdentity(entry.directory);
|
|
3972
3976
|
const tombstone = await readAgentTombstone(entry.directory);
|
|
3973
3977
|
const otherAgent = entry.agentId ?? path.basename(entry.directory);
|
|
3974
|
-
|
|
3975
|
-
if (!identity?.api_key || !otherUrl) {
|
|
3978
|
+
if (!identity?.api_key || !identity.api_url) {
|
|
3976
3979
|
if (tombstone) retired.push(`${otherAgent} (retired ${tombstone.retired_at})`);
|
|
3977
|
-
else unverifiable.push(`${otherAgent} (no stored key/URL to probe)`);
|
|
3980
|
+
else unverifiable.push(`${otherAgent} (no stored key/API URL to probe)`);
|
|
3978
3981
|
continue;
|
|
3979
3982
|
}
|
|
3980
3983
|
const suffix = tombstone ? " [tombstoned \u2014 key material still present]" : "";
|
|
3981
|
-
const probe = await (deps.
|
|
3984
|
+
const probe = await (deps.probeHostedIdentity ?? probeHostedAgentIdentity)(
|
|
3985
|
+
identity.api_key,
|
|
3986
|
+
identity.api_url,
|
|
3987
|
+
deps.fetch
|
|
3988
|
+
);
|
|
3982
3989
|
if (probe.status === "ok") live.push({ label: `${otherAgent}${suffix}`, entry });
|
|
3983
3990
|
else if (probe.status === "unauthorized") revoked.push(`${otherAgent}${suffix}`);
|
|
3984
3991
|
else unverifiable.push(`${otherAgent} (${probe.status})${suffix}`);
|
|
@@ -4422,7 +4429,7 @@ async function pathExists2(path) {
|
|
|
4422
4429
|
init_unwire();
|
|
4423
4430
|
init_local_mcp_runtime();
|
|
4424
4431
|
init_runtime_manifest();
|
|
4425
|
-
var CONNECTOR_VERSION = "0.
|
|
4432
|
+
var CONNECTOR_VERSION = "0.3.0-alpha.0";
|
|
4426
4433
|
var CONNECT_OUTCOME_SCHEMA_VERSION = 1;
|
|
4427
4434
|
var failureOutcomesByError = /* @__PURE__ */ new WeakMap();
|
|
4428
4435
|
function failureOutcomeFor(runtimeHint, error) {
|