@haven_ai/sdk 0.6.0-alpha.0 → 0.8.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.
@@ -55,7 +55,7 @@ interface HavenClientConfig {
55
55
  chainRpcs?: Record<number, string>;
56
56
  }
57
57
  interface PaymentRequest {
58
- /** Token symbol: "EURe", "USDC.e", or "xDAI" */
58
+ /** Token symbol: "USDC" (agent budgets are USDC on Base and Base Sepolia) */
59
59
  token: string;
60
60
  /** Amount as a decimal string, e.g. "5.00" */
61
61
  amount: string;
@@ -74,6 +74,14 @@ interface PaymentRequest {
74
74
  * token/recipient/parent disagree with this request.
75
75
  */
76
76
  taskBudgetId?: string;
77
+ /**
78
+ * #3330: redeem against this open sub-budget's grant (this agent is the
79
+ * sub-agent B) instead of the agent's budget delegation directly —
80
+ * `[grant, parent-child, budget]`. The backend refuses (404/409) when the
81
+ * id is unknown, not open, or its token/recipient/parent disagree with
82
+ * this request. Mutually exclusive with `taskBudgetId`.
83
+ */
84
+ subBudgetId?: string;
77
85
  }
78
86
  interface SignData {
79
87
  /** The hash to sign (keccak256, 0x-prefixed) */
@@ -125,6 +133,15 @@ interface PaymentIntent {
125
133
  expiresAt: string;
126
134
  /** Data needed to sign the payment */
127
135
  signData: SignData;
136
+ /**
137
+ * #3531: advisory, history-only recipient classification — `previously_paid`
138
+ * when this agent has a prior confirmed payment to this recipient,
139
+ * `new_address` otherwise. Never affects signing or policy. Absent against
140
+ * an older backend, and when the backend's history read fails.
141
+ */
142
+ recipient?: {
143
+ class: 'previously_paid' | 'new_address';
144
+ };
128
145
  }
129
146
  type PaymentStatus = 'pending_signature' | 'submitted' | 'confirmed' | 'pending_approval' | 'approved' | 'proposed' | 'executed' | 'rejected' | 'expired' | 'failed';
130
147
  interface PaymentResult {
@@ -277,8 +294,23 @@ interface X402AuthorizationOptions {
277
294
  * a task budget's recipient pin is compared with the agent's own delegate
278
295
  * wallet, so a merchant-pinned task budget is refused there
279
296
  * (`task_budget_recipient_mismatch`); it pays through erc7710 only (#3378).
297
+ * #3392: the receipt cache and in-flight map record this id per entry —
298
+ * reusing an idempotency key under a DIFFERENT budget throws
299
+ * `X402TaskBudgetMismatchError` before any network call; pay again under a
300
+ * new key instead.
280
301
  */
281
302
  taskBudgetId?: string;
303
+ /**
304
+ * #3330: redeem against this open sub-budget's grant (this agent is the
305
+ * sub-agent B) for the funding leg / erc7710 settlement instead of the
306
+ * agent's budget delegation directly. Same refusal contract as
307
+ * `PaymentRequest.subBudgetId`; mutually exclusive with `taskBudgetId`.
308
+ * The receipt cache and in-flight map pin this id per entry exactly as
309
+ * they pin `taskBudgetId` (#3392) — a key reused under a different
310
+ * authorizing child throws the typed mismatch error before any network
311
+ * call.
312
+ */
313
+ subBudgetId?: string;
282
314
  }
283
315
  /**
284
316
  * Keyless x402 construct result.
@@ -527,6 +559,26 @@ interface HavenAllowance {
527
559
  tokenSymbol: string;
528
560
  configuredAmount: string;
529
561
  resetPeriodMin: number;
562
+ /**
563
+ * #3518: this budget's SCOPE, so an agent holding more than one budget
564
+ * for a token can name the merchant-locked one before paying. The
565
+ * recipient pin is null for an open budget; `merchantId` is set only on a
566
+ * #3331 merchant-locked budget (which always carries a pin). Additive —
567
+ * undefined on an older backend that does not send them.
568
+ */
569
+ delegationHash?: string;
570
+ recipientAddress?: string | null;
571
+ merchantId?: string | null;
572
+ /**
573
+ * #3518: the Haven-side reservation against this budget — the sum of its
574
+ * open, unexpired task- and sub-budget children's caps, in ATOMIC units.
575
+ * Reported beside `onchain.remaining` and never folded into it (the
576
+ * on-chain figure stays authoritative; a reservation releases on
577
+ * close/expire without any chain event). `'0'` also covers a failed
578
+ * read — the sum is best-effort server-side. Additive; undefined on an
579
+ * older backend.
580
+ */
581
+ reservedHavenAtomic?: string;
530
582
  /**
531
583
  * #3128: human-readable `onchain.remaining`, e.g. "4.96 USDC" — the SAME
532
584
  * string {@link HavenAgentAllowanceSummary.remainingDisplay} carries for
@@ -567,8 +619,12 @@ interface HavenAllowanceSummary {
567
619
  * (#1310). Read-only reporting — the on-chain policy remains the actual
568
620
  * spend gate either way, this only says what is left after the purchase.
569
621
  *
570
- * Deliberately the SAME rail-labeled field spelling as #1306's
571
- * catalog-purchase preflight `allowance` block (never a new spelling),
622
+ * #3464: the canonical key spelling is the ONE `haven_get_agent`'s
623
+ * `allowances[]` rows use — the read the server tells an agent to make
624
+ * first — with the figures named `remainingAtomic`, `remainingDisplay`,
625
+ * `resetPeriodMin`, `tokenSymbol`, `tokenAddress`. Deliberately the SAME
626
+ * spelling as #1306's catalog-purchase preflight `allowance` block (never a
627
+ * new spelling; the hosted result types carry the same names),
572
628
  * minus the preflight-only `sufficient` field: post-purchase reporting
573
629
  * answers "what is left", not "was this purchase covered". Read through the
574
630
  * exact same source as {@link HavenAllowanceSummary} / `haven_get_allowances`
@@ -576,19 +632,57 @@ interface HavenAllowanceSummary {
576
632
  * `deriveDelegationBudgets`-backed enforcer read, never `agent_allowances`),
577
633
  * so this can never disagree with `haven_get_allowances` for the same
578
634
  * fixture.
635
+ *
636
+ * The snake_case keys below are DEPRECATED since #3464 and kept for one
637
+ * deprecation window so existing readers keep working; every value is also
638
+ * emitted under the camelCase name above. Removal condition: once
639
+ * `packages/qa-agent` reads the camelCase keys on a released qa-agent build,
640
+ * the snake_case keys go — tracked as the additive-window close, not a
641
+ * separate decision. The new keys stay OPTIONAL on this exported type so
642
+ * existing constructors keep type-checking unchanged.
579
643
  */
580
644
  interface PostPurchaseAllowanceSummary {
581
- /** Which on-chain policy primitive gates this agent's spend (#1306 labeling). */
582
- rail: 'legacy' | 'delegation';
645
+ /**
646
+ * Which on-chain policy primitive gates this agent's spend (#1306
647
+ * labeling). #3464: `'legacy'` removed — unreachable since #1986/#2020
648
+ * (`GET /machine-payments/allowances` answers 410 before this summary is
649
+ * built), superseding #2265's keep-as-declared rationale; the public
650
+ * {@link HavenAgent.executionRail} keeps its declared union.
651
+ */
652
+ rail: 'delegation';
583
653
  /** Remaining atomic units, read through the same source as {@link HavenAllowance.onchain.remaining}. */
584
654
  remaining_atomic: string;
585
- /** Human-readable remaining, e.g. "4.96 USDC". Omitted when the token's decimals are unknown. */
655
+ /**
656
+ * @deprecated #3464 — use `remainingAtomic` (same value). Kept for the
657
+ * deprecation window; removed once `packages/qa-agent` reads the camelCase
658
+ * keys.
659
+ */
586
660
  remaining_display?: string;
661
+ /** @deprecated #3464 — use `tokenSymbol` (same value). Same removal condition. */
587
662
  token_symbol?: string;
663
+ /** @deprecated #3464 — use `tokenAddress` (same value). Same removal condition. */
588
664
  token_address?: string;
589
- /** Minutes — mirrors {@link HavenAllowance.resetPeriodMin} / the delegation's period. */
665
+ /** @deprecated #3464 — use `resetPeriodMin` (same value). Same removal condition. */
590
666
  reset_period?: number;
591
- source: 'allowance_module' | 'active_delegations';
667
+ /**
668
+ * Which source produced the figures. #3464: `'allowance_module'` removed
669
+ * for the same unreachability as `rail: 'legacy'` above.
670
+ */
671
+ source: 'active_delegations';
672
+ /** Remaining atomic units — the same figure `remaining_atomic` carries. Optional on the type, always emitted at runtime. */
673
+ remainingAtomic?: string;
674
+ /**
675
+ * Human-readable remaining, formatted by the ONE shared formatter
676
+ * (`formatRemainingDisplay`) — always emitted at runtime, never omitted:
677
+ * an unknown-decimals token gets the same explicit atomic label
678
+ * `haven_get_agent`'s `allowances[]` rows carry. Optional on the type so
679
+ * existing constructors stay valid.
680
+ */
681
+ remainingDisplay?: string;
682
+ /** Minutes — mirrors {@link HavenAllowance.resetPeriodMin} / the delegation's period. */
683
+ resetPeriodMin?: number;
684
+ tokenSymbol?: string;
685
+ tokenAddress?: string;
592
686
  }
593
687
  /**
594
688
  * #3126 — the answer to "is there money actually HELD behind my budget?",
@@ -646,6 +740,13 @@ interface HavenBalanceCoverage {
646
740
  * token (nothing was read).
647
741
  */
648
742
  budgetRemainingIsFromChain?: boolean;
743
+ /**
744
+ * #3518: present only when `budgetRemainingAtomic` is "0" because the
745
+ * agent has no OPEN budget for the token but holds live merchant-locked
746
+ * budgets — their recipients (lowercase). Those budgets pay only these
747
+ * addresses; `getAllowances()` reports their remaining figures.
748
+ */
749
+ budgetRecipientAddresses?: string[];
649
750
  }
650
751
  /**
651
752
  * Affirmative spend-readiness for the authenticated agent, derived from the raw
@@ -693,7 +794,7 @@ interface HavenAgentAllowanceSummary {
693
794
  remainingAtomic: string;
694
795
  /** Human-readable remaining, e.g. "4.96 USDC". */
695
796
  remainingDisplay: string;
696
- /** Configured allowance amount (atomic) the owner granted. */
797
+ /** Configured allowance amount in whole token units (human decimal, e.g. "1.00" — NOT atomic; on-chain.amount is the atomic figure). */
697
798
  configuredAmount: string;
698
799
  resetPeriodMin: number;
699
800
  isResetPending: boolean;
@@ -729,6 +830,81 @@ interface HavenAgentSummary extends HavenAgent {
729
830
  * budgets", not a fetch failure).
730
831
  */
731
832
  taskBudgets: HavenTaskBudgetSummary[];
833
+ /**
834
+ * #3506: the sub-budget rows THIS agent must still sign as the DELEGATING
835
+ * agent — the owner issued a sub-budget (a parent-child row for this agent
836
+ * plus a grant to the sub-agent), and each row is `pending` until this
837
+ * agent's delegate key signs it (or `closing` until it signs the close).
838
+ * A derived VIEW, populated from `GET /sub-budgets?status=awaiting_signature`;
839
+ * empty (never throws) against a backend that predates the filter.
840
+ */
841
+ pendingSubBudgetSignatures: HavenPendingSubBudgetSignature[];
842
+ }
843
+ /**
844
+ * #3506: one sub-budget row awaiting THIS agent's signature — what
845
+ * `haven_get_agent` carries per row so the agent can call
846
+ * `haven_sign { sub_budget_id }` then `haven_submit { sub_budget_id, signature }`.
847
+ */
848
+ interface HavenPendingSubBudgetSignature {
849
+ subBudgetId: string;
850
+ /** The parent-child row a grant hangs under; null on the parent-child row itself (they share a tree). */
851
+ parentSubBudgetId: string | null;
852
+ /** `open`: sign the child delegation (row is pending). `close`: sign the revocation (row is closing). */
853
+ purpose: 'open' | 'close';
854
+ /** `parent-child`: this agent's own narrowing of its budget. `grant`: the slice delegated to the sub-agent. */
855
+ what: 'parent-child' | 'grant';
856
+ /** The sub-agent that holds the grant; null on this agent's own parent-child row. */
857
+ subAgentId: string | null;
858
+ tokenAddress: string;
859
+ recipientAddress: string | null;
860
+ periodAmountAtomic: string;
861
+ expiresAt: number;
862
+ isExpired: boolean;
863
+ }
864
+ /** #3506: sub-budget lifecycle status, as the wire names it. */
865
+ type HavenSubBudgetStatus = 'pending' | 'open' | 'closing' | 'closed';
866
+ /** #3506: `RawSubBudget`, camelCased — what the SDK sub-budget methods return. */
867
+ interface HavenSubBudget {
868
+ id: string;
869
+ agentId: string;
870
+ parentAgentId: string;
871
+ parentSubBudgetId: string | null;
872
+ chainId: number;
873
+ tokenAddress: string;
874
+ recipientAddress: string | null;
875
+ parentDelegationHash: string;
876
+ delegationHash: string;
877
+ label: string | null;
878
+ periodAmountAtomic: string;
879
+ status: HavenSubBudgetStatus;
880
+ expiresAt: number;
881
+ isExpired: boolean;
882
+ createdAt: string;
883
+ openedAt: string | null;
884
+ closedAt: string | null;
885
+ closeTxHash: string | null;
886
+ }
887
+ /** #3506: `POST /sub-budgets/:id/submit` — opened (from pending) or closed (from closing). */
888
+ interface SubmitSubBudgetResult {
889
+ subBudget: HavenSubBudget;
890
+ status: 'open' | 'closed';
891
+ /** Present only once the close UserOp lands (`status === 'closed'` from `closing`). */
892
+ closeTxHash?: string;
893
+ }
894
+ /** #3506: the sign data a live-child close returns (the revocation UserOp's typed data). */
895
+ interface HavenSubBudgetCloseSignData {
896
+ signature_scheme: 'eip712_userop';
897
+ typed_data: Record<string, unknown>;
898
+ user_op_hash: string;
899
+ }
900
+ /** #3506: `POST /sub-budgets/:id/close`. */
901
+ interface CloseSubBudgetResult {
902
+ subBudget: HavenSubBudget;
903
+ /** `closed` on a trivial close (never signed, or already expired); absent when a close signature is pending. */
904
+ status?: 'closed';
905
+ /** Present only when the close needed a signature (a live child). */
906
+ signData?: HavenSubBudgetCloseSignData;
907
+ nextAction?: string;
732
908
  }
733
909
  /** #3329: task-budget lifecycle status, as the wire names it. */
734
910
  type HavenTaskBudgetStatus = 'pending' | 'open' | 'closing' | 'closed';
@@ -743,6 +919,22 @@ interface HavenTaskBudget {
743
919
  delegationHash: string;
744
920
  label: string | null;
745
921
  maxAtomic: string;
922
+ /**
923
+ * #3501: camelCase form of `spent_atomic` — the live enforcer figure.
924
+ * Present on GET reads of an open task budget; null when the read failed;
925
+ * absent when the response did not read the chain.
926
+ */
927
+ spentAtomic?: string | null;
928
+ /**
929
+ * #3501: what the chain will still allow through this child (cap minus
930
+ * spent, clamped at zero). A failed read is null — never the full cap.
931
+ */
932
+ remainingAtomic?: string | null;
933
+ /**
934
+ * #3501: provenance of `remainingAtomic`, the parent allowance's honesty
935
+ * flag (`onchain.remainingIsFromChain`, #1319) on the task-budget surface.
936
+ */
937
+ remainingIsFromChain?: boolean;
746
938
  status: HavenTaskBudgetStatus;
747
939
  expiresAt: number;
748
940
  isExpired: boolean;
@@ -755,6 +947,15 @@ interface HavenTaskBudget {
755
947
  * #3329: the condensed row `getAgentSummary()` carries per open, unexpired
756
948
  * task budget — enough to render a "reserved by open task budgets" line and
757
949
  * a task-budget list without a second read.
950
+ *
951
+ * #3501: each row also carries the budget-visibility figure the issue asks
952
+ * for — what the chain will still allow through this child — so an agent
953
+ * reading `haven_get_agent` can tell BEFORE its next payment whether the
954
+ * task budget will refuse it. `remainingAtomic` is null when the on-chain
955
+ * read failed (never the full cap as remaining), and
956
+ * `remainingIsFromChain` is the same honesty flag the parent allowance's
957
+ * `onchain.remainingIsFromChain` carries (#1319): true = live enforcer
958
+ * read, false = the read failed and the figures are null.
758
959
  */
759
960
  interface HavenTaskBudgetSummary {
760
961
  id: string;
@@ -762,8 +963,55 @@ interface HavenTaskBudgetSummary {
762
963
  tokenAddress: string;
763
964
  maxAtomic: string;
764
965
  maxDisplay: string;
966
+ /**
967
+ * #3501: spent so far through this child, from the enforcer's `spentMap`.
968
+ * Null when the on-chain read failed; also null for a budget whose
969
+ * delegation the read could not speak for.
970
+ */
971
+ spentAtomic: string | null;
972
+ /**
973
+ * #3501: `maxAtomic` minus spent, clamped at zero. Null — never the full
974
+ * cap — when the on-chain read failed.
975
+ */
976
+ remainingAtomic: string | null;
977
+ /**
978
+ * #3501: true when `remainingAtomic` came from the live enforcer read,
979
+ * false when that read failed (spent/remaining are then null).
980
+ */
981
+ remainingIsFromChain: boolean;
982
+ /**
983
+ * #3501: human form of `remainingAtomic` ("0.001 USDC"), derived by the
984
+ * same formatter as `maxDisplay`. Null exactly when `remainingAtomic` is
985
+ * null — a failed read never renders as an amount.
986
+ */
987
+ remainingDisplay: string | null;
765
988
  recipientAddress: string | null;
766
989
  expiresAt: number;
990
+ /**
991
+ * #3518: the budget's lifecycle status (`pending` | `open` | `closing` |
992
+ * `closed`) — `haven_get_agent` lists closing and pending budgets too (a
993
+ * close refusal says "re-check the budget's status", so the status must
994
+ * be readable there), and an agent that only ever saw open rows could
995
+ * not. Additive; undefined on a stale cached read from an older client
996
+ * build.
997
+ */
998
+ status?: HavenTaskBudgetStatus;
999
+ isExpired?: boolean;
1000
+ }
1001
+ /**
1002
+ * `precheckBudget()`'s 200 answer. #3518: the `budget_*` fields name the
1003
+ * budget the compare ran against — the one the payment would draw on
1004
+ * (absent when no budget row matched the token).
1005
+ */
1006
+ interface BudgetPrecheckResult {
1007
+ sufficient: boolean;
1008
+ remaining_atomic: string;
1009
+ remaining_is_from_chain?: boolean;
1010
+ replay?: boolean;
1011
+ budget_id?: string;
1012
+ budget_delegation_hash?: string;
1013
+ budget_recipient_address?: string | null;
1014
+ budget_merchant_id?: string | null;
767
1015
  }
768
1016
  /** #3329: `POST /task-budgets` and `POST /task-budgets/:id/close` — the sign-then-submit envelope. */
769
1017
  interface HavenTaskBudgetSignData {
@@ -831,6 +1079,33 @@ interface PaymentParties {
831
1079
  delegate: string | null;
832
1080
  delegateAccount: string | null;
833
1081
  merchant: string | null;
1082
+ /**
1083
+ * #3332: the paying agent's owner's company details — additive, present
1084
+ * only when the backend has `HAVEN_OWNER_COMPANY_DETAILS` on AND the owner
1085
+ * saved details; absent (not `undefined`-valued, the KEY is absent)
1086
+ * otherwise. `viesStatus: 'valid'` means VIES accepted the VAT number —
1087
+ * never render that as "verified" (see Haven's agent-passport docs on the
1088
+ * same naming discipline).
1089
+ *
1090
+ * Present only on the receipt surfaces — `GET /payments/:id/receipt` and
1091
+ * `GET /machine-payments/receipts` (`HavenClient.getReceipt()`,
1092
+ * `listReceipts()`/`listReceiptsPage()`) — never on `GET
1093
+ * /machine-payments/:id/status` (`getPaymentStatus`) or the evidence-attach echo,
1094
+ * even with the feature on: those report payment/settlement state, not the
1095
+ * buyer's company details (out of scope for #3332, see
1096
+ * docs/product/owner-company-details.md).
1097
+ */
1098
+ buyer?: PaymentPartiesBuyer;
1099
+ }
1100
+ interface PaymentPartiesBuyer {
1101
+ legalName: string;
1102
+ /** ISO 3166-1 alpha-2. */
1103
+ country: string;
1104
+ /** For a sole trader this IS the personal identity number. */
1105
+ orgNumber: string;
1106
+ vatNumber: string | null;
1107
+ viesStatus: 'pending' | 'valid' | 'invalid' | 'not_verifiable' | null;
1108
+ viesCheckedAt: string | null;
834
1109
  }
835
1110
  /** @internal wire shape of {@link PaymentParties}. */
836
1111
  interface RawPaymentParties {
@@ -838,6 +1113,16 @@ interface RawPaymentParties {
838
1113
  delegate: string | null;
839
1114
  delegate_account: string | null;
840
1115
  merchant: string | null;
1116
+ buyer?: RawPaymentPartiesBuyer;
1117
+ }
1118
+ /** @internal wire shape of {@link PaymentPartiesBuyer}. */
1119
+ interface RawPaymentPartiesBuyer {
1120
+ legal_name: string;
1121
+ country: string;
1122
+ org_number: string;
1123
+ vat_number: string | null;
1124
+ vies_status: 'pending' | 'valid' | 'invalid' | 'not_verifiable' | null;
1125
+ vies_checked_at: string | null;
841
1126
  }
842
1127
  /**
843
1128
  * #3132 (owner decision 3 on #3130): what population a list row came from and
@@ -889,8 +1174,10 @@ interface HavenPaymentReceipt {
889
1174
  /**
890
1175
  * The delegate → merchant settlement transaction (#2998). Trust level differs
891
1176
  * by scheme: on erc7710 it is `txHash` itself and Haven VERIFIED it on-chain
892
- * before the receipt existed; on eip3009 it is the merchant's claim as relayed
893
- * (PAYMENT-RESPONSE), NOT verified on-chain by Haven — cite it as such.
1177
+ * before the receipt existed. On eip3009 it is the settlement the agent
1178
+ * reported through `reportSettlementEvidence()` when there is one, which Haven
1179
+ * also VERIFIED on-chain (#3475); otherwise the merchant's claim as relayed
1180
+ * (PAYMENT-RESPONSE), NOT verified on-chain by Haven — cite that as such.
894
1181
  */
895
1182
  settlementTxHash: string | null;
896
1183
  chainId: number;
@@ -1065,6 +1352,20 @@ declare const AgentPaymentPhase: {
1065
1352
  * the funds.
1066
1353
  */
1067
1354
  readonly FundedButUnsettled: "funded_but_unsettled";
1355
+ /**
1356
+ * #3420: TERMINAL — a `submitted` erc7710 x402 intent whose settlement
1357
+ * window AND the sweep's last attribution chance have both passed with no
1358
+ * verified evidence. The sweep's tick (120s) only ever confirms a
1359
+ * transaction mined inside the payment's own settlement window (the child
1360
+ * delegation's on-chain `timestamp` caveat, plus the verifier's 120s
1361
+ * clock-skew allowance), so once authorize + window + skew is behind the
1362
+ * payment, no poll — and no sweep tick — can ever change the answer.
1363
+ * The paired `next_action` is `stop_and_tell_user`: tell the user the goods
1364
+ * were delivered but Haven holds no verified settlement evidence; reporting
1365
+ * a real settlement hash (`haven_report_settlement_evidence`) still works
1366
+ * at any age.
1367
+ */
1368
+ readonly DeliveredUnverified: "delivered_unverified";
1068
1369
  };
1069
1370
  type AgentPaymentPhase = (typeof AgentPaymentPhase)[keyof typeof AgentPaymentPhase];
1070
1371
  declare const AgentPaymentNextAction: {
@@ -1222,7 +1523,7 @@ declare const AgentPaymentRail: {
1222
1523
  type AgentPaymentRail = (typeof AgentPaymentRail)[keyof typeof AgentPaymentRail];
1223
1524
  type PaymentPhase = AgentPaymentPhase;
1224
1525
  type PaymentNextAction = AgentPaymentNextAction;
1225
- declare const AGENT_PAYMENT_PHASE_VALUES: ("rejected" | "expired" | "failed" | "agent_signature_required" | "payment_submitted" | "payment_confirmed" | "user_approval_required" | "user_execution_required" | "waiting_for_additional_approvals" | "funding_sent" | "insufficient_funds" | "funded_but_unsettled")[];
1526
+ declare const AGENT_PAYMENT_PHASE_VALUES: ("rejected" | "expired" | "failed" | "agent_signature_required" | "payment_submitted" | "payment_confirmed" | "user_approval_required" | "user_execution_required" | "waiting_for_additional_approvals" | "funding_sent" | "insufficient_funds" | "funded_but_unsettled" | "delivered_unverified")[];
1226
1527
  declare const AGENT_PAYMENT_NEXT_ACTION_VALUES: ("sign_and_submit_payment" | "check_status_later" | "none" | "wait_for_user_approval" | "wait_for_user_to_complete_payment" | "retry_original_x402_request" | "stop_and_tell_user" | "request_again_if_user_still_wants_it" | "retry_with_explicit_context" | "payment_window_expired" | "fund_account_or_raise_allowance" | "sweep_stranded_funds" | "awaiting_settlement_evidence")[];
1227
1528
  declare const AGENT_PAYMENT_FAILURE_CODE_VALUES: ("PRICE_EXCEEDS_MAX" | "PAYMENT_WINDOW_EXPIRED" | "MERCHANT_REJECTED_AFTER_FUNDING" | "MERCHANT_UNRESPONSIVE_AFTER_FUNDING" | "MERCHANT_CALL_CONTEXT_UNAVAILABLE" | "AMBIGUOUS_MAX_AMOUNT" | "MAX_AMOUNT_UNCONVERTIBLE" | "MERCHANT_NOT_READY")[];
1228
1529
  declare const AGENT_PAYMENT_RAIL_VALUES: ("x402" | "mpp_demo" | "mpp_crypto" | "stripe_deposit" | "spt" | "direct" | "mpp")[];
@@ -1408,6 +1709,43 @@ interface PaymentStatusResult {
1408
1709
  expiresAt: string;
1409
1710
  chainId: number;
1410
1711
  message: string;
1712
+ /**
1713
+ * #3420: `true` = the merchant answered 2xx (a `machine_payment_evidence`
1714
+ * row records its response); absent = unknown. See the raw field's doc.
1715
+ */
1716
+ delivered?: boolean;
1717
+ /**
1718
+ * #3475 follow-up: which settlement branch this x402 payment runs (#946).
1719
+ * `null` on the legacy rail, on any x402 intent whose scheme metadata
1720
+ * predates #946, or any stored value outside this enum.
1721
+ */
1722
+ settlementScheme?: 'eip3009' | 'erc7710' | null;
1723
+ /**
1724
+ * #3475 follow-up: `true` only when an eip3009 payment's merchant
1725
+ * settlement transaction is already recorded and on-chain-verified.
1726
+ * Absent — never `false` — when unknown or on erc7710, matching
1727
+ * `delivered`'s own honesty rule.
1728
+ */
1729
+ merchantSettlementRecorded?: boolean;
1730
+ /**
1731
+ * #3494: a bounded, redacted cause for a `failed` payment — present
1732
+ * (possibly `null`, when no message was recorded) only when `status` is
1733
+ * `'failed'`; absent on every other status.
1734
+ */
1735
+ failureReason?: string | null;
1736
+ /**
1737
+ * #3518: the budget delegation that METERED this payment, recorded at
1738
+ * authorize (migration 053) — the settle summary's authoritative answer
1739
+ * to "which budget paid". Absent on the legacy rail and on rows
1740
+ * predating migration 053.
1741
+ */
1742
+ budgetDelegationHash?: string;
1743
+ /**
1744
+ * #3564: `true` only while a payment's submit is receipt-unconfirmed and
1745
+ * not yet reconciled from the chain. Absent — never `false` — on every
1746
+ * other row, matching `delivered`'s own honesty rule.
1747
+ */
1748
+ submissionOutcomePending?: true;
1411
1749
  /** Platform fee surfaced so it's never silently collected (#386). */
1412
1750
  fee?: PaymentFee | null;
1413
1751
  amountAtomic?: string | null;
@@ -1568,6 +1906,32 @@ declare class MerchantTimeoutError extends HavenApiError {
1568
1906
  readonly merchantErrorCode: "merchant_timeout";
1569
1907
  constructor(message: string);
1570
1908
  }
1909
+ /**
1910
+ * #3417: an erc7710 `POST /x402` authorize replayed a key whose payment to THIS
1911
+ * merchant for THIS resource has already settled. The backend returns
1912
+ * `200 { status: 'confirmed', tx_hash, to, resource_url }` and, correctly, no
1913
+ * `sign_data`, because nothing is left to sign
1914
+ * (`packages/backend/src/modules/x402/replay.ts`). Before this class the
1915
+ * erc7710 path read that answer as a scheme mismatch and threw a 500, which
1916
+ * hosted callers relayed as "transient, retry". Typed so a caller can report
1917
+ * the original settlement instead of retrying, and never signs anything.
1918
+ *
1919
+ * Only thrown when the confirmed row pays the merchant this request names, for
1920
+ * the resource it asked for. The backend's replay lookup is keyed on the
1921
+ * idempotency key alone, so a key reused for another payee or resource — or
1922
+ * first spent on an EIP-3009 funding leg, whose confirmed `tx_hash` proves only
1923
+ * that the delegate was funded — is refused as a 409 collision instead of read
1924
+ * as this settlement. Amount and the MCP tool call are not compared: on an MCP
1925
+ * merchant the resource is its endpoint, so a key reused for another tool
1926
+ * there is answered as that merchant's earlier payment. A `HavenError`, not a `HavenApiError`: nothing failed upstream.
1927
+ */
1928
+ declare class X402Erc7710AlreadySettledError extends HavenError {
1929
+ readonly paymentId: string;
1930
+ readonly txHash: string;
1931
+ readonly body?: unknown | undefined;
1932
+ readonly x402ErrorCode: "payment_already_settled";
1933
+ constructor(paymentId: string, txHash: string, body?: unknown | undefined);
1934
+ }
1571
1935
  declare class X402UnexpectedStatusError extends HavenApiError {
1572
1936
  readonly x402ErrorCode: "unexpected_non_402_status";
1573
1937
  /**
@@ -1626,6 +1990,33 @@ declare class HavenPaymentStateError extends HavenApiError {
1626
1990
  get phase(): PaymentPhase;
1627
1991
  get nextAction(): PaymentNextAction;
1628
1992
  }
1993
+ /**
1994
+ * #3392: the SDK's x402 receipt cache and in-flight map record the
1995
+ * `taskBudgetId` each entry was created under. A call reusing an idempotency
1996
+ * key whose cached/in-flight entry was created under a DIFFERENT task budget
1997
+ * is refused with this typed error BEFORE any network call — the alternative
1998
+ * was silently returning (or joining) a payment charged to another budget.
1999
+ * Typed rather than `HavenApiError`-shaped: no request was attempted, so
2000
+ * there is no HTTP status or response body to carry (the
2001
+ * `HavenZeroSettlementHashError` precedent). A caller that genuinely wants to
2002
+ * pay again under a different budget passes a new `idempotencyKey`.
2003
+ */
2004
+ declare class X402TaskBudgetMismatchError extends HavenError {
2005
+ /** The idempotency key whose cached entry was created under another budget. */
2006
+ readonly idempotencyKey: string;
2007
+ /** The budget the cached/in-flight entry was created under (undefined = none). */
2008
+ readonly entryTaskBudgetId: string | undefined;
2009
+ /** The budget this call named (undefined = none). */
2010
+ readonly requestedTaskBudgetId: string | undefined;
2011
+ readonly x402ErrorCode: "task_budget_mismatch";
2012
+ constructor(message: string,
2013
+ /** The idempotency key whose cached entry was created under another budget. */
2014
+ idempotencyKey: string,
2015
+ /** The budget the cached/in-flight entry was created under (undefined = none). */
2016
+ entryTaskBudgetId: string | undefined,
2017
+ /** The budget this call named (undefined = none). */
2018
+ requestedTaskBudgetId: string | undefined);
2019
+ }
1629
2020
  declare class HavenSigningError extends HavenError {
1630
2021
  constructor(message: string);
1631
2022
  }
@@ -1901,7 +2292,7 @@ declare function buildSweepAuthorizationMessage(auth: SweepAuthorization): strin
1901
2292
  * This SDK's own version. Owned by `scripts/release-bump.mjs`, which rewrites
1902
2293
  * it with the package version on every release — never hand-edit it.
1903
2294
  */
1904
- declare const SDK_VERSION = "0.6.0-alpha.0";
2295
+ declare const SDK_VERSION = "0.8.0-alpha.0";
1905
2296
  /** The request header every published Haven client sends. */
1906
2297
  declare const HAVEN_CLIENT_HEADER = "X-Haven-Client";
1907
2298
  /** `<package>/<version>` — the value of {@link HAVEN_CLIENT_HEADER}. */
@@ -2120,6 +2511,28 @@ declare function connectorRerunCommand(args?: string, options?: {
2120
2511
  channel?: string;
2121
2512
  npxFlags?: string;
2122
2513
  }): string;
2514
+ /**
2515
+ * The command every UPGRADE hint names (#3412): `npx -y @haven_ai/connect@<channel> --doctor`.
2516
+ *
2517
+ * A bare connector re-run is a SETUP command — on a machine that is already
2518
+ * set up it stops at "Missing --setup <hv_setup_...> setup token", so an
2519
+ * outdated signer, local MCP or connector told to "re-run the connector" was
2520
+ * handed a dead end. The flagless doctor works as pasted on an existing
2521
+ * install (#3210: it resolves the runtime from the setup record), diagnoses an
2522
+ * outdated signer, and prints the exact `--doctor --repair` line for the agent
2523
+ * it describes — with `--credentials-dir` whenever more than one agent lives on
2524
+ * the machine, so the repair cannot land on a different agent.
2525
+ *
2526
+ * `-y` because an upgrade hint is often run by an agent in a non-interactive
2527
+ * shell. `@haven_ai/core`'s `upgradeCommandFor` (the backend's
2528
+ * `client_update.upgrade_command`) cannot import this package, so it carries a
2529
+ * copy; `packages/backend/src/__tests__/connector-upgrade-command-parity.test.ts`
2530
+ * fails if the two ever disagree. Setup-time hints (identity restore,
2531
+ * mid-setup retry) legitimately stay on {@link connectorRerunCommand}.
2532
+ */
2533
+ declare function connectorUpgradeCommand(options?: {
2534
+ channel?: string;
2535
+ }): string;
2123
2536
 
2124
2537
  /**
2125
2538
  * The Node.js floor Haven's published packages support (#1161).
@@ -2466,12 +2879,25 @@ declare function encodePaymentProof(receipt: {
2466
2879
  * Resolve a token symbol from a contract address.
2467
2880
  *
2468
2881
  * Checks all supported chains. For chain-specific resolution,
2469
- * pass the optional `network` CAIP-2 string (e.g. "eip155:100").
2882
+ * pass the optional `network` CAIP-2 string (e.g. "eip155:8453").
2470
2883
  */
2471
2884
  declare function resolveTokenFromAddress(address: string, network?: string): {
2472
2885
  symbol: string;
2473
2886
  decimals: number;
2474
2887
  } | null;
2888
+ /**
2889
+ * #3410: token decimals from a SYMBOL + CHAIN — the same registry
2890
+ * `resolveTokenFromAddress` reads, keyed the other way. The address-based
2891
+ * resolver needs the token's contract address, which the consent seed path
2892
+ * (setup-time credential files) does not carry; the symbol and chain it does
2893
+ * carry. Null when the symbol is not registered on that chain (unknown or
2894
+ * custom tokens) — callers must fall back to an explicit atomic label rather
2895
+ * than reading an atomic amount as whole tokens.
2896
+ */
2897
+ declare function resolveTokenBySymbol(chainId: number, symbol: string): {
2898
+ symbol: string;
2899
+ decimals: number;
2900
+ } | null;
2475
2901
 
2476
2902
  /**
2477
2903
  * #3271: the integrity check every client runs before signing a direct
@@ -2502,6 +2928,19 @@ declare function resolveTokenFromAddress(address: string, network?: string): {
2502
2928
  */
2503
2929
  /** Version of the direct-payment sign context (`GET /payments/:id/sign-context`). */
2504
2930
  declare const DIRECT_SIGN_CONTEXT_VERSION = 1;
2931
+ /**
2932
+ * #3419: version of the task-budget sign context (`GET
2933
+ * /task-budgets/:id/sign-context`), the sign-then-submit envelope every
2934
+ * `haven_sign { task_budget_id }` call fetches. The backend emits it
2935
+ * (`task-budget-service.ts`, `task_sign_context_version: 1`); the signer
2936
+ * derives its enforced set `SUPPORTED_TASK_SIGN_CONTEXT_VERSIONS` from this
2937
+ * constant — never a second literal — and the hosted/local task-budget
2938
+ * handoffs report it in `signer_compatibility.task_sign_context_version`.
2939
+ * The signer could not carry the single source itself (a published package
2940
+ * cannot host a constant the backend also serves), so it lives beside the
2941
+ * other binding constants here, exactly as `DIRECT_SIGN_CONTEXT_VERSION` does.
2942
+ */
2943
+ declare const TASK_SIGN_CONTEXT_VERSION = 1;
2505
2944
  /** The ERC-4337 v0.7 EntryPoint — the only one the delegation rail submits to. */
2506
2945
  declare const ENTRY_POINT_V07 = "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
2507
2946
  /**
@@ -2738,9 +3177,9 @@ declare class HavenTypedDataRefusedError extends HavenSigningError {
2738
3177
  /**
2739
3178
  * Chains the delegation rail has PINNED delegation contracts for
2740
3179
  * (`packages/backend/src/rails/delegation-contracts.ts`) — the only chains a
2741
- * direct-payment UserOp may be scoped to. Gnosis (100) has no pinned
2742
- * DelegationManager/enforcer set, so it is deliberately excluded even though
2743
- * the delegate account itself could exist there.
3180
+ * direct-payment UserOp may be scoped to. No other chain has a pinned
3181
+ * DelegationManager/enforcer set, so every other chain is deliberately
3182
+ * excluded even where the delegate account itself could exist.
2744
3183
  */
2745
3184
  declare const DIRECT_PAYMENT_CHAIN_IDS: ReadonlySet<number>;
2746
3185
  /** The DeleGator's single-execution `execute((address,uint256,bytes))` — selector `0x5c1c6dcd`. */
@@ -2955,4 +3394,4 @@ declare function encodeBase64Json(value: unknown): string;
2955
3394
  */
2956
3395
  declare function decodeBase64Json<T>(value: string, label?: string): T;
2957
3396
 
2958
- export { AgentPaymentPhase as $, type AgentPaymentWarning as A, type ResumeAuthorizedX402Input as B, type CloseTaskBudgetResult as C, type ResumeX402PaymentInput as D, type X402ResumeState as E, type X402McpTransport as F, type X402MerchantCallContext as G, type HavenClientConfig as H, HavenError as I, AGENT_PAYMENT_FAILURE_CODE_VALUES as J, AGENT_PAYMENT_NEXT_ACTION_VALUES as K, AGENT_PAYMENT_PHASE_VALUES as L, AGENT_PAYMENT_RAIL_VALUES as M, type AgentNextStep as N, type OpenTaskBudgetResult as O, type PaymentRequest as P, type AgentPaymentEnumSchema as Q, type RawPaymentParties as R, type SweepResult as S, type TaskBudgetSignContext as T, AgentPaymentFailureCode as U, AgentPaymentFailureCodeDescriptions as V, AgentPaymentFailureCodeSchema as W, type X402PaymentRequired as X, AgentPaymentNextAction as Y, AgentPaymentNextActionDescriptions as Z, AgentPaymentNextActionSchema as _, type HavenClientUpdate as a, type SweepExpectedAuth as a$, AgentPaymentPhaseDescriptions as a0, AgentPaymentPhaseSchema as a1, AgentPaymentRail as a2, AgentPaymentRailDescriptions as a3, AgentPaymentRailSchema as a4, type AgentPaymentSummary as a5, AgentPaymentWarningCode as a6, type AgentPurchaseSummary as a7, CONNECTOR_PACKAGE_NAME as a8, type CatalogSubmissionAccepted as a9, NEXT_TOOL_SERVER_NAMES as aA, NEXT_TOOL_SERVER_ROLES as aB, type NextStep as aC, type NextStepArguments as aD, type NextStepHandoff as aE, type NextStepInput as aF, type NextStepTarget as aG, type NextStepTargets as aH, type NextToolServerRole as aI, PACKED_USER_OPERATION_FIELDS as aJ, type PaymentFee as aK, type PaymentNextAction as aL, type PaymentPhase as aM, type PaymentStatus as aN, ROOT_AUTHORITY as aO, SDK_CLIENT_IDENTITY as aP, SDK_VERSION as aQ, SIGNER_UPDATE_FALLBACK as aR, SWEEP_BASE_CHAIN_ID as aS, SWEEP_BASE_SEPOLIA_CHAIN_ID as aT, SWEEP_BASE_SEPOLIA_USDC_ADDRESS as aU, SWEEP_BASE_USDC_ADDRESS as aV, type SettlementChildExpectation as aW, SignerRefusalCode as aX, type SweepConfirmation as aY, type SweepEip712Domain as aZ, type SweepEntry as a_, DEFAULT_CONFIRMATION_TIMEOUT_MS as aa, DEFAULT_NEXT_TOOL_BY_ACTION as ab, DIRECT_SIGN_CONTEXT_VERSION as ac, ENTRY_POINT_V07 as ad, ERC7710_ASSET_TRANSFER_METHOD as ae, HAVEN_CLIENT_HEADER as af, HAVEN_CONNECTOR_CHANNEL as ag, HAVEN_MINIMUM_NODE_VERSION as ah, HYBRID_DELEGATOR_DOMAIN_NAME as ai, HYBRID_DELEGATOR_DOMAIN_VERSION as aj, type HavenAgentAllowanceSummary as ak, type HavenAgentReadiness as al, type HavenAllowance as am, HavenApiError as an, type HavenCatalogMerchant as ao, type HavenListScope as ap, HavenPaymentStateError as aq, HavenSigningError as ar, HavenTimeoutError as as, HavenTypedDataRefusedError as at, HavenUnsupportedSignerVersionError as au, HavenUserOpBindingError as av, HavenZeroSettlementHashError as aw, MAX_TASK_BUDGET_TTL_SECONDS as ax, type MachinePaymentRail as ay, MerchantTimeoutError as az, type PaymentResult as b, selectX402SettlementScheme as b$, type SweepPreparation as b0, type SweepSubmitResult as b1, type SweepTypedData as b2, TRANSFER_WITH_AUTHORIZATION_TYPES as b3, TYPED_DATA_NOT_ALLOWED as b4, type TaskBudgetCloseExpectation as b5, type TaskChildExpectation as b6, type TaskChildTypedData as b7, type UnsupportedNodeVersionMessageOptions as b8, X402AlreadySettledError as b9, decodeBase64Json as bA, decodeBase64Utf8 as bB, defaultNextToolFor as bC, deriveDelegateAccountAddress as bD, encodeBase64Json as bE, encodeBase64Utf8 as bF, encodePaymentProof as bG, hashDelegation as bH, havenClientIdentity as bI, isConnectorChannel as bJ, isErc7710Option as bK, isPackedUserOperationTypedData as bL, isSupportedNodeVersion as bM, isSweepableChain as bN, isTaskChildTypedData as bO, normalizePaymentRequired as bP, packedUserOperationHash as bQ, parseNextTool as bR, parsePaymentRequired as bS, parsePaymentRequiredResponse as bT, readClientUpdate as bU, renderNextTool as bV, resolveConnectorChannel as bW, resolveTokenFromAddress as bX, selectErc7710PaymentOption as bY, selectPaymentOption as bZ, selectStandardPaymentOption as b_, type X402ExpectedAuth as ba, type X402ExpectedContext as bb, type X402PaymentHeaderContext as bc, X402PaymentHeaderValidationError as bd, type X402PaymentOption as be, type X402RequestSnapshot as bf, type X402SchemeSelection as bg, X402UnexpectedStatusError as bh, X402_LEGACY_PAYMENT_HEADER_NAME as bi, X402_MAX_AUTHORIZATION_WINDOW_SECONDS as bj, X402_PAYMENT_HEADER_NAME as bk, X402_PAYMENT_HEADER_NAMES_SENT as bl, X402_PAYMENT_REQUIRED_HEADER_NAME as bm, X402_PAYMENT_RESPONSE_HEADER_NAME as bn, X402_SETTLEMENT_FORWARD_MARGIN_SECONDS as bo, assertBoundDirectPaymentUserOp as bp, assertOwnTaskBudgetCloseUserOp as bq, assertOwnTaskChild as br, assertUserOpTypedDataBinding as bs, buildSweepAuthorizationMessage as bt, buildSweepTypedData as bu, buildX402ExpectedMessage as bv, compareNodeVersions as bw, connectorRerunCommand as bx, connectorSpec as by, createNextStepBuilder as bz, type PaymentIntent as c, signerUpdateFallback as c0, sweepUsdcAddress as c1, sweepUsdcDomain as c2, toStandardPaymentRequirements as c3, unsupportedNodeVersionMessage as c4, validateStandardX402PaymentHeader as c5, verifySettlementChild as c6, x402AssetTransferMethod as c7, x402AuthorizationAmount as c8, x402FacilitatorAddresses as c9, x402V2PaymentEnvelope as ca, CAVEAT_ENFORCERS as cb, CAVEAT_TYPEHASH as cc, DELEGATION_MANAGER as cd, DELEGATION_TYPEHASH as ce, DIRECT_PAYMENT_CHAIN_IDS as cf, type DelegationForHashing as cg, EXECUTE_ABI as ch, HYBRID_DELEGATOR_IMPLEMENTATION as ci, MAX_SETTLEMENT_WINDOW_SECONDS as cj, SIMPLE_FACTORY_ADDRESS as ck, type SettlementChildTypedData as cl, assertFundingLegPaysDelegate as cm, assertOwnSettlementChild as cn, chainIdForNetwork as co, isSettlementChildTypedData as cp, type X402AuthorizationOptions as d, type X402Intent as e, type PaymentStatusResult as f, type HavenAgent as g, type HavenAgentSummary as h, type SweepPrepareResponse as i, type SweepAuthorization as j, type SweepSubmitResponse as k, type HavenAllowanceSummary as l, type HavenBalanceCoverage as m, type PostPurchaseAllowanceSummary as n, type HavenCatalogEntry as o, type HavenCatalogSubmission as p, type HavenPaymentReceipt as q, type HavenPaymentReceiptsPage as r, type HavenTaskBudget as s, type SubmitTaskBudgetResult as t, type PaymentResumeState as u, type X402Receipt as v, type X402Quote as w, type X402Erc7710Settlement as x, type X402McpCallContext as y, type SignData as z };
3397
+ export { AgentPaymentFailureCodeSchema as $, type AgentPaymentWarning as A, type BudgetPrecheckResult as B, type CloseTaskBudgetResult as C, type X402Erc7710Settlement as D, type X402McpCallContext as E, type SignData as F, type ResumeAuthorizedX402Input as G, type HavenClientConfig as H, type ResumeX402PaymentInput as I, type X402ResumeState as J, type X402McpTransport as K, type X402MerchantCallContext as L, HavenError as M, AGENT_PAYMENT_FAILURE_CODE_VALUES as N, type OpenTaskBudgetResult as O, type PaymentRequest as P, AGENT_PAYMENT_NEXT_ACTION_VALUES as Q, type RawPaymentParties as R, type SweepResult as S, type TaskBudgetSignContext as T, AGENT_PAYMENT_PHASE_VALUES as U, AGENT_PAYMENT_RAIL_VALUES as V, type AgentNextStep as W, type X402PaymentRequired as X, type AgentPaymentEnumSchema as Y, AgentPaymentFailureCode as Z, AgentPaymentFailureCodeDescriptions as _, type HavenClientUpdate as a, SignerRefusalCode as a$, AgentPaymentNextAction as a0, AgentPaymentNextActionDescriptions as a1, AgentPaymentNextActionSchema as a2, AgentPaymentPhase as a3, AgentPaymentPhaseDescriptions as a4, AgentPaymentPhaseSchema as a5, AgentPaymentRail as a6, AgentPaymentRailDescriptions as a7, AgentPaymentRailSchema as a8, type AgentPaymentSummary as a9, HavenZeroSettlementHashError as aA, MAX_TASK_BUDGET_TTL_SECONDS as aB, type MachinePaymentRail as aC, MerchantTimeoutError as aD, NEXT_TOOL_SERVER_NAMES as aE, NEXT_TOOL_SERVER_ROLES as aF, type NextStep as aG, type NextStepArguments as aH, type NextStepHandoff as aI, type NextStepInput as aJ, type NextStepTarget as aK, type NextStepTargets as aL, type NextToolServerRole as aM, PACKED_USER_OPERATION_FIELDS as aN, type PaymentFee as aO, type PaymentNextAction as aP, type PaymentPhase as aQ, type PaymentStatus as aR, ROOT_AUTHORITY as aS, SDK_CLIENT_IDENTITY as aT, SDK_VERSION as aU, SIGNER_UPDATE_FALLBACK as aV, SWEEP_BASE_CHAIN_ID as aW, SWEEP_BASE_SEPOLIA_CHAIN_ID as aX, SWEEP_BASE_SEPOLIA_USDC_ADDRESS as aY, SWEEP_BASE_USDC_ADDRESS as aZ, type SettlementChildExpectation as a_, AgentPaymentWarningCode as aa, type AgentPurchaseSummary as ab, CONNECTOR_PACKAGE_NAME as ac, type CatalogSubmissionAccepted as ad, DEFAULT_CONFIRMATION_TIMEOUT_MS as ae, DEFAULT_NEXT_TOOL_BY_ACTION as af, DIRECT_SIGN_CONTEXT_VERSION as ag, ENTRY_POINT_V07 as ah, ERC7710_ASSET_TRANSFER_METHOD as ai, HAVEN_CLIENT_HEADER as aj, HAVEN_CONNECTOR_CHANNEL as ak, HAVEN_MINIMUM_NODE_VERSION as al, HYBRID_DELEGATOR_DOMAIN_NAME as am, HYBRID_DELEGATOR_DOMAIN_VERSION as an, type HavenAgentAllowanceSummary as ao, type HavenAgentReadiness as ap, type HavenAllowance as aq, HavenApiError as ar, type HavenCatalogMerchant as as, type HavenListScope as at, HavenPaymentStateError as au, HavenSigningError as av, HavenTimeoutError as aw, HavenTypedDataRefusedError as ax, HavenUnsupportedSignerVersionError as ay, HavenUserOpBindingError as az, type PaymentResult as b, parsePaymentRequiredResponse as b$, type SweepConfirmation as b0, type SweepEip712Domain as b1, type SweepEntry as b2, type SweepExpectedAuth as b3, type SweepPreparation as b4, type SweepSubmitResult as b5, type SweepTypedData as b6, TASK_SIGN_CONTEXT_VERSION as b7, TRANSFER_WITH_AUTHORIZATION_TYPES as b8, TYPED_DATA_NOT_ALLOWED as b9, buildSweepAuthorizationMessage as bA, buildSweepTypedData as bB, buildX402ExpectedMessage as bC, compareNodeVersions as bD, connectorRerunCommand as bE, connectorSpec as bF, connectorUpgradeCommand as bG, createNextStepBuilder as bH, decodeBase64Json as bI, decodeBase64Utf8 as bJ, defaultNextToolFor as bK, deriveDelegateAccountAddress as bL, encodeBase64Json as bM, encodeBase64Utf8 as bN, encodePaymentProof as bO, hashDelegation as bP, havenClientIdentity as bQ, isConnectorChannel as bR, isErc7710Option as bS, isPackedUserOperationTypedData as bT, isSupportedNodeVersion as bU, isSweepableChain as bV, isTaskChildTypedData as bW, normalizePaymentRequired as bX, packedUserOperationHash as bY, parseNextTool as bZ, parsePaymentRequired as b_, type TaskBudgetCloseExpectation as ba, type TaskChildExpectation as bb, type TaskChildTypedData as bc, type UnsupportedNodeVersionMessageOptions as bd, X402AlreadySettledError as be, X402Erc7710AlreadySettledError as bf, type X402ExpectedAuth as bg, type X402ExpectedContext as bh, type X402PaymentHeaderContext as bi, X402PaymentHeaderValidationError as bj, type X402PaymentOption as bk, type X402RequestSnapshot as bl, type X402SchemeSelection as bm, X402TaskBudgetMismatchError as bn, X402UnexpectedStatusError as bo, X402_LEGACY_PAYMENT_HEADER_NAME as bp, X402_MAX_AUTHORIZATION_WINDOW_SECONDS as bq, X402_PAYMENT_HEADER_NAME as br, X402_PAYMENT_HEADER_NAMES_SENT as bs, X402_PAYMENT_REQUIRED_HEADER_NAME as bt, X402_PAYMENT_RESPONSE_HEADER_NAME as bu, X402_SETTLEMENT_FORWARD_MARGIN_SECONDS as bv, assertBoundDirectPaymentUserOp as bw, assertOwnTaskBudgetCloseUserOp as bx, assertOwnTaskChild as by, assertUserOpTypedDataBinding as bz, type PaymentIntent as c, readClientUpdate as c0, renderNextTool as c1, resolveConnectorChannel as c2, resolveTokenBySymbol as c3, resolveTokenFromAddress as c4, selectErc7710PaymentOption as c5, selectPaymentOption as c6, selectStandardPaymentOption as c7, selectX402SettlementScheme as c8, signerUpdateFallback as c9, sweepUsdcAddress as ca, sweepUsdcDomain as cb, toStandardPaymentRequirements as cc, unsupportedNodeVersionMessage as cd, validateStandardX402PaymentHeader as ce, verifySettlementChild as cf, x402AssetTransferMethod as cg, x402AuthorizationAmount as ch, x402FacilitatorAddresses as ci, x402V2PaymentEnvelope as cj, type DelegationForHashing as ck, CAVEAT_ENFORCERS as cl, CAVEAT_TYPEHASH as cm, DELEGATION_MANAGER as cn, DELEGATION_TYPEHASH as co, DIRECT_PAYMENT_CHAIN_IDS as cp, EXECUTE_ABI as cq, HYBRID_DELEGATOR_IMPLEMENTATION as cr, MAX_SETTLEMENT_WINDOW_SECONDS as cs, SIMPLE_FACTORY_ADDRESS as ct, type SettlementChildTypedData as cu, assertFundingLegPaysDelegate as cv, assertOwnSettlementChild as cw, chainIdForNetwork as cx, isSettlementChildTypedData as cy, type X402AuthorizationOptions as d, type X402Intent as e, type PaymentStatusResult as f, type HavenAgent as g, type HavenAgentSummary as h, type SweepPrepareResponse as i, type SweepAuthorization as j, type SweepSubmitResponse as k, type HavenAllowanceSummary as l, type HavenBalanceCoverage as m, type PostPurchaseAllowanceSummary as n, type HavenCatalogEntry as o, type HavenCatalogSubmission as p, type HavenPaymentReceipt as q, type HavenPaymentReceiptsPage as r, type HavenTaskBudget as s, type SubmitTaskBudgetResult as t, type SubmitSubBudgetResult as u, type HavenPendingSubBudgetSignature as v, type CloseSubBudgetResult as w, type PaymentResumeState as x, type X402Receipt as y, type X402Quote as z };