@haven_ai/mcp 0.0.0-dev.202609181540.08a5f50 → 0.0.0-dev.202609181648.6a9b97f
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 +15 -4
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +15 -4
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +15 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +15 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/cli.cjs
CHANGED
|
@@ -690,7 +690,11 @@ function normalizeError(err) {
|
|
|
690
690
|
message: err.message,
|
|
691
691
|
statusCode: err.statusCode,
|
|
692
692
|
nextAction: err.nextAction,
|
|
693
|
-
|
|
693
|
+
next_action: err.nextAction,
|
|
694
|
+
retry_with_new_quote: err.retryWithNewQuote,
|
|
695
|
+
// #3103: the local runtime's one decision site — no tool can act until
|
|
696
|
+
// the merchant recovers; the message carries retry_after_s.
|
|
697
|
+
next_tool_omitted_reason: "the merchant needs to recover first; re-quote after the retry_after_s in the message"
|
|
694
698
|
};
|
|
695
699
|
}
|
|
696
700
|
if (err instanceof sdk.HavenPaymentStateError) {
|
|
@@ -703,6 +707,7 @@ function normalizeError(err) {
|
|
|
703
707
|
status: err.status,
|
|
704
708
|
phase: err.phase,
|
|
705
709
|
nextAction: err.nextAction,
|
|
710
|
+
next_action: err.nextAction,
|
|
706
711
|
resume_state: err.resumeState,
|
|
707
712
|
body: err.body
|
|
708
713
|
};
|
|
@@ -724,6 +729,7 @@ function normalizeError(err) {
|
|
|
724
729
|
paymentId: err.paymentId,
|
|
725
730
|
phase: stringOrUndefined(body?.phase),
|
|
726
731
|
nextAction: stringOrUndefined(body?.nextAction) ?? stringOrUndefined(body?.next_action) ?? sdk.AgentPaymentNextAction.StopAndTellUser,
|
|
732
|
+
next_action: stringOrUndefined(body?.nextAction) ?? stringOrUndefined(body?.next_action) ?? sdk.AgentPaymentNextAction.StopAndTellUser,
|
|
727
733
|
body: err.body
|
|
728
734
|
};
|
|
729
735
|
}
|
|
@@ -740,7 +746,11 @@ function normalizeError(err) {
|
|
|
740
746
|
success: false,
|
|
741
747
|
code: "UNKNOWN_ERROR",
|
|
742
748
|
message: err instanceof Error ? err.message : String(err),
|
|
743
|
-
nextAction: sdk.AgentPaymentNextAction.StopAndTellUser
|
|
749
|
+
nextAction: sdk.AgentPaymentNextAction.StopAndTellUser,
|
|
750
|
+
next_action: sdk.AgentPaymentNextAction.StopAndTellUser,
|
|
751
|
+
// #3103: the second local decision site — nothing structured can follow an
|
|
752
|
+
// error this runtime did not recognise.
|
|
753
|
+
next_tool_omitted_reason: "an error this runtime does not recognise; tell the user what the message says"
|
|
744
754
|
};
|
|
745
755
|
}
|
|
746
756
|
function stringOrUndefined(value) {
|
|
@@ -936,7 +946,7 @@ async function resolveHavenClient(options = {}) {
|
|
|
936
946
|
return { client, credentials };
|
|
937
947
|
}
|
|
938
948
|
var MCP_NAME = "@haven_ai/mcp";
|
|
939
|
-
var MCP_VERSION = "0.0.0-dev.
|
|
949
|
+
var MCP_VERSION = "0.0.0-dev.202609181648.6a9b97f";
|
|
940
950
|
var MCP_INSTRUCTIONS = [
|
|
941
951
|
"Haven local MCP server: signs in-process with the delegate key it holds on",
|
|
942
952
|
"this machine \u2014 the key never leaves this process. Call haven_get_agent",
|
|
@@ -945,7 +955,8 @@ var MCP_INSTRUCTIONS = [
|
|
|
945
955
|
"",
|
|
946
956
|
"To pay: haven_discover_tools to find a payable service, then",
|
|
947
957
|
"haven_pay_mcp_tool for MCP merchants or haven_pay_x402 for any x402",
|
|
948
|
-
"paywall. Tool responses carry nextAction
|
|
958
|
+
"paywall. Tool responses carry next_action (nextAction is the same value, kept one more",
|
|
959
|
+
"release) and, when no tool follows, next_tool_omitted_reason \u2014 follow them; description prose",
|
|
949
960
|
"is fallback, not the source of truth.",
|
|
950
961
|
"",
|
|
951
962
|
"A payment outside the agent budget is declined before any money moves. Haven",
|