@haven_ai/sdk 0.0.0-dev.202609291605.3a86a6f → 0.0.0-dev.202609291949.4e52d4b

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.
@@ -590,8 +590,12 @@ interface HavenAllowanceSummary {
590
590
  * (#1310). Read-only reporting — the on-chain policy remains the actual
591
591
  * spend gate either way, this only says what is left after the purchase.
592
592
  *
593
- * Deliberately the SAME rail-labeled field spelling as #1306's
594
- * catalog-purchase preflight `allowance` block (never a new spelling),
593
+ * #3464: the canonical key spelling is the ONE `haven_get_agent`'s
594
+ * `allowances[]` rows use — the read the server tells an agent to make
595
+ * first — with the figures named `remainingAtomic`, `remainingDisplay`,
596
+ * `resetPeriodMin`, `tokenSymbol`, `tokenAddress`. Deliberately the SAME
597
+ * spelling as #1306's catalog-purchase preflight `allowance` block (never a
598
+ * new spelling; the hosted result types carry the same names),
595
599
  * minus the preflight-only `sufficient` field: post-purchase reporting
596
600
  * answers "what is left", not "was this purchase covered". Read through the
597
601
  * exact same source as {@link HavenAllowanceSummary} / `haven_get_allowances`
@@ -599,19 +603,57 @@ interface HavenAllowanceSummary {
599
603
  * `deriveDelegationBudgets`-backed enforcer read, never `agent_allowances`),
600
604
  * so this can never disagree with `haven_get_allowances` for the same
601
605
  * fixture.
606
+ *
607
+ * The snake_case keys below are DEPRECATED since #3464 and kept for one
608
+ * deprecation window so existing readers keep working; every value is also
609
+ * emitted under the camelCase name above. Removal condition: once
610
+ * `packages/qa-agent` reads the camelCase keys on a released qa-agent build,
611
+ * the snake_case keys go — tracked as the additive-window close, not a
612
+ * separate decision. The new keys stay OPTIONAL on this exported type so
613
+ * existing constructors keep type-checking unchanged.
602
614
  */
603
615
  interface PostPurchaseAllowanceSummary {
604
- /** Which on-chain policy primitive gates this agent's spend (#1306 labeling). */
605
- rail: 'legacy' | 'delegation';
616
+ /**
617
+ * Which on-chain policy primitive gates this agent's spend (#1306
618
+ * labeling). #3464: `'legacy'` removed — unreachable since #1986/#2020
619
+ * (`GET /machine-payments/allowances` answers 410 before this summary is
620
+ * built), superseding #2265's keep-as-declared rationale; the public
621
+ * {@link HavenAgent.executionRail} keeps its declared union.
622
+ */
623
+ rail: 'delegation';
606
624
  /** Remaining atomic units, read through the same source as {@link HavenAllowance.onchain.remaining}. */
607
625
  remaining_atomic: string;
608
- /** Human-readable remaining, e.g. "4.96 USDC". Omitted when the token's decimals are unknown. */
626
+ /**
627
+ * @deprecated #3464 — use `remainingAtomic` (same value). Kept for the
628
+ * deprecation window; removed once `packages/qa-agent` reads the camelCase
629
+ * keys.
630
+ */
609
631
  remaining_display?: string;
632
+ /** @deprecated #3464 — use `tokenSymbol` (same value). Same removal condition. */
610
633
  token_symbol?: string;
634
+ /** @deprecated #3464 — use `tokenAddress` (same value). Same removal condition. */
611
635
  token_address?: string;
612
- /** Minutes — mirrors {@link HavenAllowance.resetPeriodMin} / the delegation's period. */
636
+ /** @deprecated #3464 — use `resetPeriodMin` (same value). Same removal condition. */
613
637
  reset_period?: number;
614
- source: 'allowance_module' | 'active_delegations';
638
+ /**
639
+ * Which source produced the figures. #3464: `'allowance_module'` removed
640
+ * for the same unreachability as `rail: 'legacy'` above.
641
+ */
642
+ source: 'active_delegations';
643
+ /** Remaining atomic units — the same figure `remaining_atomic` carries. Optional on the type, always emitted at runtime. */
644
+ remainingAtomic?: string;
645
+ /**
646
+ * Human-readable remaining, formatted by the ONE shared formatter
647
+ * (`formatRemainingDisplay`) — always emitted at runtime, never omitted:
648
+ * an unknown-decimals token gets the same explicit atomic label
649
+ * `haven_get_agent`'s `allowances[]` rows carry. Optional on the type so
650
+ * existing constructors stay valid.
651
+ */
652
+ remainingDisplay?: string;
653
+ /** Minutes — mirrors {@link HavenAllowance.resetPeriodMin} / the delegation's period. */
654
+ resetPeriodMin?: number;
655
+ tokenSymbol?: string;
656
+ tokenAddress?: string;
615
657
  }
616
658
  /**
617
659
  * #3126 — the answer to "is there money actually HELD behind my budget?",
@@ -2035,7 +2077,7 @@ declare function buildSweepAuthorizationMessage(auth: SweepAuthorization): strin
2035
2077
  * This SDK's own version. Owned by `scripts/release-bump.mjs`, which rewrites
2036
2078
  * it with the package version on every release — never hand-edit it.
2037
2079
  */
2038
- declare const SDK_VERSION = "0.0.0-dev.202609291605.3a86a6f";
2080
+ declare const SDK_VERSION = "0.0.0-dev.202609291949.4e52d4b";
2039
2081
  /** The request header every published Haven client sends. */
2040
2082
  declare const HAVEN_CLIENT_HEADER = "X-Haven-Client";
2041
2083
  /** `<package>/<version>` — the value of {@link HAVEN_CLIENT_HEADER}. */
@@ -590,8 +590,12 @@ interface HavenAllowanceSummary {
590
590
  * (#1310). Read-only reporting — the on-chain policy remains the actual
591
591
  * spend gate either way, this only says what is left after the purchase.
592
592
  *
593
- * Deliberately the SAME rail-labeled field spelling as #1306's
594
- * catalog-purchase preflight `allowance` block (never a new spelling),
593
+ * #3464: the canonical key spelling is the ONE `haven_get_agent`'s
594
+ * `allowances[]` rows use — the read the server tells an agent to make
595
+ * first — with the figures named `remainingAtomic`, `remainingDisplay`,
596
+ * `resetPeriodMin`, `tokenSymbol`, `tokenAddress`. Deliberately the SAME
597
+ * spelling as #1306's catalog-purchase preflight `allowance` block (never a
598
+ * new spelling; the hosted result types carry the same names),
595
599
  * minus the preflight-only `sufficient` field: post-purchase reporting
596
600
  * answers "what is left", not "was this purchase covered". Read through the
597
601
  * exact same source as {@link HavenAllowanceSummary} / `haven_get_allowances`
@@ -599,19 +603,57 @@ interface HavenAllowanceSummary {
599
603
  * `deriveDelegationBudgets`-backed enforcer read, never `agent_allowances`),
600
604
  * so this can never disagree with `haven_get_allowances` for the same
601
605
  * fixture.
606
+ *
607
+ * The snake_case keys below are DEPRECATED since #3464 and kept for one
608
+ * deprecation window so existing readers keep working; every value is also
609
+ * emitted under the camelCase name above. Removal condition: once
610
+ * `packages/qa-agent` reads the camelCase keys on a released qa-agent build,
611
+ * the snake_case keys go — tracked as the additive-window close, not a
612
+ * separate decision. The new keys stay OPTIONAL on this exported type so
613
+ * existing constructors keep type-checking unchanged.
602
614
  */
603
615
  interface PostPurchaseAllowanceSummary {
604
- /** Which on-chain policy primitive gates this agent's spend (#1306 labeling). */
605
- rail: 'legacy' | 'delegation';
616
+ /**
617
+ * Which on-chain policy primitive gates this agent's spend (#1306
618
+ * labeling). #3464: `'legacy'` removed — unreachable since #1986/#2020
619
+ * (`GET /machine-payments/allowances` answers 410 before this summary is
620
+ * built), superseding #2265's keep-as-declared rationale; the public
621
+ * {@link HavenAgent.executionRail} keeps its declared union.
622
+ */
623
+ rail: 'delegation';
606
624
  /** Remaining atomic units, read through the same source as {@link HavenAllowance.onchain.remaining}. */
607
625
  remaining_atomic: string;
608
- /** Human-readable remaining, e.g. "4.96 USDC". Omitted when the token's decimals are unknown. */
626
+ /**
627
+ * @deprecated #3464 — use `remainingAtomic` (same value). Kept for the
628
+ * deprecation window; removed once `packages/qa-agent` reads the camelCase
629
+ * keys.
630
+ */
609
631
  remaining_display?: string;
632
+ /** @deprecated #3464 — use `tokenSymbol` (same value). Same removal condition. */
610
633
  token_symbol?: string;
634
+ /** @deprecated #3464 — use `tokenAddress` (same value). Same removal condition. */
611
635
  token_address?: string;
612
- /** Minutes — mirrors {@link HavenAllowance.resetPeriodMin} / the delegation's period. */
636
+ /** @deprecated #3464 — use `resetPeriodMin` (same value). Same removal condition. */
613
637
  reset_period?: number;
614
- source: 'allowance_module' | 'active_delegations';
638
+ /**
639
+ * Which source produced the figures. #3464: `'allowance_module'` removed
640
+ * for the same unreachability as `rail: 'legacy'` above.
641
+ */
642
+ source: 'active_delegations';
643
+ /** Remaining atomic units — the same figure `remaining_atomic` carries. Optional on the type, always emitted at runtime. */
644
+ remainingAtomic?: string;
645
+ /**
646
+ * Human-readable remaining, formatted by the ONE shared formatter
647
+ * (`formatRemainingDisplay`) — always emitted at runtime, never omitted:
648
+ * an unknown-decimals token gets the same explicit atomic label
649
+ * `haven_get_agent`'s `allowances[]` rows carry. Optional on the type so
650
+ * existing constructors stay valid.
651
+ */
652
+ remainingDisplay?: string;
653
+ /** Minutes — mirrors {@link HavenAllowance.resetPeriodMin} / the delegation's period. */
654
+ resetPeriodMin?: number;
655
+ tokenSymbol?: string;
656
+ tokenAddress?: string;
615
657
  }
616
658
  /**
617
659
  * #3126 — the answer to "is there money actually HELD behind my budget?",
@@ -2035,7 +2077,7 @@ declare function buildSweepAuthorizationMessage(auth: SweepAuthorization): strin
2035
2077
  * This SDK's own version. Owned by `scripts/release-bump.mjs`, which rewrites
2036
2078
  * it with the package version on every release — never hand-edit it.
2037
2079
  */
2038
- declare const SDK_VERSION = "0.0.0-dev.202609291605.3a86a6f";
2080
+ declare const SDK_VERSION = "0.0.0-dev.202609291949.4e52d4b";
2039
2081
  /** The request header every published Haven client sends. */
2040
2082
  declare const HAVEN_CLIENT_HEADER = "X-Haven-Client";
2041
2083
  /** `<package>/<version>` — the value of {@link HAVEN_CLIENT_HEADER}. */
@@ -1016,5 +1016,5 @@ function assertRedeemsOwnBudgetDelegation(redeemCalldata, ownAccount) {
1016
1016
  }
1017
1017
 
1018
1018
  export { AGENT_PAYMENT_FAILURE_CODE_VALUES, AGENT_PAYMENT_NEXT_ACTION_VALUES, AGENT_PAYMENT_PHASE_VALUES, AGENT_PAYMENT_RAIL_VALUES, AgentPaymentFailureCode, AgentPaymentFailureCodeDescriptions, AgentPaymentFailureCodeSchema, AgentPaymentNextAction, AgentPaymentNextActionDescriptions, AgentPaymentNextActionSchema, AgentPaymentPhase, AgentPaymentPhaseDescriptions, AgentPaymentPhaseSchema, AgentPaymentRail, AgentPaymentRailDescriptions, AgentPaymentRailSchema, AgentPaymentWarningCode, CAVEAT_ENFORCERS, CONNECTOR_PACKAGE_NAME, DEFAULT_CONFIRMATION_TIMEOUT_MS, DELEGATION_MANAGER, DELEGATION_TUPLE_COMPONENTS, DIRECT_SIGN_CONTEXT_VERSION, ENTRY_POINT_V07, HAVEN_CONNECTOR_CHANNEL, HYBRID_DELEGATOR_DOMAIN_NAME, HYBRID_DELEGATOR_DOMAIN_VERSION, HYBRID_DELEGATOR_IMPLEMENTATION, HavenApiError, HavenError, HavenPaymentStateError, HavenSigningError, HavenTimeoutError, HavenUnsupportedSignerVersionError, HavenUserOpBindingError, HavenZeroSettlementHashError, MAX_SETTLEMENT_WINDOW_SECONDS, MerchantTimeoutError, PACKED_USER_OPERATION_FIELDS, REDEEM_DELEGATIONS_ABI, ROOT_AUTHORITY, SIGNER_UPDATE_FALLBACK, SIMPLE_FACTORY_ADDRESS, SINGLE_DEFAULT_MODE, SignerRefusalCode, TASK_SIGN_CONTEXT_VERSION, X402AlreadySettledError, X402Erc7710AlreadySettledError, X402TaskBudgetMismatchError, X402UnexpectedStatusError, assertRedeemsOwnBudgetDelegation, assertUserOpTypedDataBinding, chainIdForNetwork, connectorRerunCommand, connectorSpec, connectorUpgradeCommand, deriveDelegateAccountAddress, isConnectorChannel, isPackedUserOperationTypedData, isSettlementChildTypedData, packedUserOperationHash, resolveConnectorChannel, signerUpdateFallback, verifySettlementChild };
1019
- //# sourceMappingURL=chunk-WKGZG52P.js.map
1020
- //# sourceMappingURL=chunk-WKGZG52P.js.map
1019
+ //# sourceMappingURL=chunk-5I6LGPWZ.js.map
1020
+ //# sourceMappingURL=chunk-5I6LGPWZ.js.map