@haven_ai/mcp 0.0.0-dev.202609281335.705f436 → 0.0.0-dev.202609281736.4aa027b
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 +1 -1
- package/dist/cli.cjs +15 -3
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +16 -4
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +15 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -2
- package/dist/index.d.ts +21 -2
- package/dist/index.js +16 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -159,7 +159,7 @@ Tools this server will expose to your agent runtime:
|
|
|
159
159
|
|
|
160
160
|
On-chain budget (the real spend gate — enforced by the agent's
|
|
161
161
|
signed delegation, not by Haven):
|
|
162
|
-
• up to
|
|
162
|
+
• up to 25 USDC per 1440 min
|
|
163
163
|
|
|
164
164
|
Anything above the on-chain budget is declined before any money
|
|
165
165
|
moves — it is not queued, and no one is asked to review it. If the
|
package/dist/cli.cjs
CHANGED
|
@@ -967,7 +967,7 @@ function renderConsentBlock(input, hash) {
|
|
|
967
967
|
lines.push("signed delegation, not by Haven):");
|
|
968
968
|
for (const a of input.allowanceSummary) {
|
|
969
969
|
const reset = a.resetMinutes ? ` per ${a.resetMinutes} min` : " (no reset)";
|
|
970
|
-
lines.push(` \u2022 up to ${a
|
|
970
|
+
lines.push(` \u2022 up to ${describeBudgetAmount(a, input.chainId)}${reset}`);
|
|
971
971
|
}
|
|
972
972
|
}
|
|
973
973
|
lines.push("");
|
|
@@ -1064,7 +1064,14 @@ async function consentInputFromClient(haven, seed, toolNames) {
|
|
|
1064
1064
|
}
|
|
1065
1065
|
const liveAllowanceSummary = list.map((a) => ({
|
|
1066
1066
|
token: a.tokenSymbol ?? "UNKNOWN",
|
|
1067
|
-
|
|
1067
|
+
// #3410: `onchain.amount` is the atomic budget (`budget_atomic` on the
|
|
1068
|
+
// backend). The old `a.configuredAmount` fallback here was unreachable
|
|
1069
|
+
// — `onchain` is required in the SDK types and dereferenced
|
|
1070
|
+
// unconditionally, so a response without it throws into the seed path —
|
|
1071
|
+
// and it was the one HUMAN-decimal value in this chain; a human number
|
|
1072
|
+
// must never reach an atomic field. '0' keeps the (defensive) shape for
|
|
1073
|
+
// a malformed onchain object without inventing a unit.
|
|
1074
|
+
amount: a.onchain?.amount ?? "0",
|
|
1068
1075
|
resetMinutes: typeof a.onchain?.resetTimeMin === "number" ? a.onchain.resetTimeMin : typeof a.resetPeriodMin === "number" ? a.resetPeriodMin : null
|
|
1069
1076
|
}));
|
|
1070
1077
|
allowanceSummary = liveAllowanceSummary;
|
|
@@ -1087,6 +1094,11 @@ function isAllowanceSummary(value) {
|
|
|
1087
1094
|
function derivePrefix(apiKey) {
|
|
1088
1095
|
return apiKey.slice(0, 12);
|
|
1089
1096
|
}
|
|
1097
|
+
function describeBudgetAmount(a, chainId) {
|
|
1098
|
+
const token = chainId === void 0 ? null : sdk.resolveTokenBySymbol(chainId, a.token);
|
|
1099
|
+
if (!token) return `${a.amount} ${a.token} (atomic units)`;
|
|
1100
|
+
return `${sdk.formatTokenAmount(a.amount, token.decimals)} ${a.token}`;
|
|
1101
|
+
}
|
|
1090
1102
|
function registeredToolNames() {
|
|
1091
1103
|
return Object.keys(toolSchemas);
|
|
1092
1104
|
}
|
|
@@ -1111,7 +1123,7 @@ async function resolveHavenClient(options = {}) {
|
|
|
1111
1123
|
return { client, credentials };
|
|
1112
1124
|
}
|
|
1113
1125
|
var MCP_NAME = "@haven_ai/mcp";
|
|
1114
|
-
var MCP_VERSION = "0.0.0-dev.
|
|
1126
|
+
var MCP_VERSION = "0.0.0-dev.202609281736.4aa027b";
|
|
1115
1127
|
var MCP_INSTRUCTIONS = [
|
|
1116
1128
|
"Haven local MCP server: signs in-process with the delegate key it holds on",
|
|
1117
1129
|
"this machine \u2014 the key never leaves this process. Call haven_get_agent",
|