@dakota-xyz/ts-sdk 2.1.1 → 2.2.1

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/index.d.ts CHANGED
@@ -558,6 +558,11 @@ type components = {
558
558
  readonly wallet_id?: string;
559
559
  readonly amount: string;
560
560
  readonly asset: string;
561
+ /**
562
+ * @description The chain THIS payment settles on. The network belongs to the payment, not to the payee: an address belongs to a whole family, so which chain a given payment uses is chosen when the payment is made. Optional — the destination's own network is used when omitted. When the destination pins a DIFFERENT one in the same family, this payment's network wins (the pin records what an earlier payment did, not a restriction on the address). Across chain FAMILIES the address does not carry at all, and that is refused.
563
+ * @example base-sepolia
564
+ */
565
+ readonly network_id?: string;
561
566
  readonly dates?: readonly number[];
562
567
  readonly count?: number;
563
568
  /** Format: int64 */
@@ -614,6 +619,11 @@ type components = {
614
619
  readonly source_network_id: components["schemas"]["NetworkId"];
615
620
  /** @description The asset the recipient receives (a currency such as USD for a bank offramp). */
616
621
  readonly output_asset: string;
622
+ /**
623
+ * @description The chain the PAYEE is paid on — the payout leg, and a different chain from `source_network_id` (the deposit the funding wallet pays). Crypto payouts only; a bank offramp has no chain. Optional: the destination's own network is used when omitted. When set it decides, because the network belongs to the payment and not to the payee — an address receives on every chain in its family, so a destination's saved network records what a previous payment did rather than restricting this one. Across chain FAMILIES the address does not carry at all, and that is refused.
624
+ * @example base-sepolia
625
+ */
626
+ readonly output_network_id?: string;
617
627
  /** @description Outbound rail — REQUIRED for a bank offramp (e.g. ach, fedwire, swift); omit for a crypto swap. */
618
628
  readonly rail?: string;
619
629
  /** @enum {string} */
@@ -624,9 +634,28 @@ type components = {
624
634
  */
625
635
  readonly fee_bps?: number;
626
636
  };
637
+ /**
638
+ * @description Your developer fee, declared per payout type. A conversion is charged the rate for the kind of payout it funds: `swap_bps` for a crypto payout, `offramp_bps` for a bank payout. Omit a rate, or send zero, and that payout type carries no fee at all — nothing is charged, nothing is added to the amount, and the agent is told nothing about a fee it could mention. The two are independent, so one conversation can charge a swap and stay silent about a bank payout in the same turn.
639
+ *
640
+ * Both rates are DEFAULTS for the auto-accounts a request creates. An action-level `fee_bps` is an explicit override and still wins outright, for either type.
641
+ */
642
+ readonly DeveloperFee: {
643
+ /**
644
+ * Format: int32
645
+ * @description Rate for a crypto payout — a `create_auto_account` naming no `rail`.
646
+ */
647
+ readonly swap_bps?: number;
648
+ /**
649
+ * Format: int32
650
+ * @description Rate for a bank payout — a `create_auto_account` naming a `rail`. An offramp converts too (it just settles on a rail instead of a chain), so charging it is a pricing decision that belongs to you. Zero or omitted means the payout is free of a conversion fee.
651
+ */
652
+ readonly offramp_bps?: number;
653
+ };
627
654
  readonly CreateInstructionsRequest: {
655
+ readonly client_policy?: components["schemas"]["AgenticClientPolicy"];
628
656
  readonly payment_agent_id: string;
629
657
  readonly proposals: readonly components["schemas"]["AgenticProposal"][];
658
+ readonly developer_fee?: components["schemas"]["DeveloperFee"];
630
659
  };
631
660
  readonly AgenticInstructionsResult: {
632
661
  /** @description Every mandate this batch DRAFTED, in full wire shape (identical to GET /mandates/{mandate_id}) — sign the §8 approval immediately, no follow-up fetch or polling. Pending until a signer other than the bound one approves. */
@@ -644,6 +673,87 @@ type components = {
644
673
  * @example America/Los_Angeles
645
674
  */
646
675
  readonly timezone?: string;
676
+ readonly client_policy?: components["schemas"]["AgenticClientPolicy"];
677
+ };
678
+ /**
679
+ * @description ALPHA — how THIS client's product speaks, and what the agent may propose for it. It reshapes what the drafting model SEES (tool results, tool descriptions, prompt sections) and constrains what it may PROPOSE, so the agent narrates in the client's own nouns instead of platform ones.
680
+ *
681
+ * SCOPE: this is a per-CLIENT policy — it belongs to the `client_id` behind the API key, never to a key (api keys are N:1 to clients, so a per-key policy would fragment for a client running one service key per deployment). REGISTER IT at `PUT /agentic-policy`, which resolves the client from the API key: there is no id to pass and no other client's policy to address.
682
+ *
683
+ * DELIVERY: registration only. A request body never carries this object — a conversation is two calls (draft, then accept) judged independently, and a per-request policy let them disagree, so a draft that was legal under one could be refused at the customer's approval click.
684
+ *
685
+ * STRICT: an unknown key, an unknown value, or a label for a concept the server does not implement is a 400 — "accepted" always means "enforced". Absent (or every field empty) ⇒ platform defaults, byte-for-byte the behaviour of a request that never mentioned it.
686
+ */
687
+ readonly AgenticClientPolicy: {
688
+ /**
689
+ * @description How payees are shaped in tool results. `nested` (the default, and what an absent policy means) returns ONE payee carrying N payout methods. `flat` returns one entry PER payout method — a payee is a name plus one way of being paid — each with `payee_ref` (the id to pass straight through wherever a payout method is referenced), `entity_ref` (the person behind the entry; several entries can share one, and it is what binds a new payout method to an existing person instead of duplicating them), `name`, and `paid_by` (a rendered human phrase such as `bank account at Chase ****4321` or `base-sepolia 0x1234…cdef`). A payout method never pins an asset, so `paid_by` never names one.
690
+ * @example flat
691
+ * @enum {string}
692
+ */
693
+ readonly payee_model?: "" | "nested" | "flat";
694
+ /**
695
+ * @description The assets a PAYEE may receive — what a conversion may output, and what a direct payment may send. Absent or empty means unrestricted, which is the platform default.
696
+ *
697
+ * State it when your product's FUNDING asset is not something a payee is ever paid in. Platform's asset registry only knows which assets settle on which chain, so it cannot tell that your funding stablecoin is a category error as a payout — it will happily draft one if a customer names it, and because that route needs no conversion account it also creates a duplicate payee for someone already saved. Declaring the allowlist turns both into a refusal the model sees before the customer does.
698
+ *
699
+ * Case-insensitive and de-duplicated; the order you send is the order quoted back to the customer.
700
+ * @example [
701
+ * "USDC",
702
+ * "USDT"
703
+ * ]
704
+ */
705
+ readonly payout_assets?: readonly string[];
706
+ /**
707
+ * @description Platform concept → the noun THIS client's customers use for it. The noun replaces the platform word in the tool results the agent reads AND in what it writes to the customer. Implemented concepts: `limit` (the spending limit; platform calls it a mandate), `payee` (the person being paid), and `limit_unit` (the UNIT the limit's amounts are quoted in, e.g. `USD`). Any other key is a 400 — a label for a concept the server does not implement would be accepted and then ignored.
708
+ *
709
+ * `limit` and `payee` are nouns and must match `^[a-z][a-z0-9 _-]{0,30}$`. `limit_unit` is a unit code and must match `^[A-Za-z][A-Za-z0-9]{0,9}$`, so it may be uppercase. Never a phrase, never a sentence.
710
+ *
711
+ * `limit_unit` matters most under a `payout_route` that forces a conversion account: the limit governs the DEPOSIT leg, so its own asset is the funding asset the customer has never heard of. With the unit set the agent quotes the caps and remaining budget in it ("your spending limit is 10 USD per month, 0.98 left") instead of reaching for the funding asset.
712
+ *
713
+ * Labelling `payee` also renames the flat view's keys: the container becomes the label plus `s` and each entry's ref becomes the label plus `_ref` — so `{"payee": "recipient"}` yields `recipients[]` with `recipient_ref`. `entity_ref` is NOT renamed; it is an opaque handle to the person behind the entry, not the labelled concept. The plural is a literal `+s` (the charset restricts labels to simple lowercase nouns), so an irregular noun gets an odd but harmless plural.
714
+ * @example {
715
+ * "limit": "spending limit",
716
+ * "limit_unit": "USD",
717
+ * "payee": "recipient"
718
+ * }
719
+ */
720
+ readonly labels?: {
721
+ readonly [key: string]: string;
722
+ };
723
+ /**
724
+ * @description `external_only`: spending limits live entirely OUTSIDE this conversation — the client creates and amends them in its own limit editor through the customer-signed amend API. The agent never drafts one; a drafted payment must fit an existing active limit's remaining budget, and when nothing covers it the agent says so and points the customer at the app instead of proposing a limit. Absent ⇒ the agent drafts limits as usual.
725
+ * @example external_only
726
+ * @enum {string}
727
+ */
728
+ readonly mandate_strategy?: "" | "external_only";
729
+ /**
730
+ * @description Restricts how the money may leave. `conversion_account_only`: every scheduled payment must fund a conversion account — no direct wallet-to-address send. `bank_only`: on top of that the payout must land in a bank account — an outbound bank rail is required and no crypto payout method may be created. Absent ⇒ any supported route.
731
+ *
732
+ * Either value also makes the FUNDING leg system-chosen, which changes two things. The payment has two legs and the customer only names one: what they ask for is what ARRIVES (the conversion's output), while what LEAVES the wallet is the conversion deposit. The spending limit governs the DEPOSIT leg, so (a) the asset or chain the customer names can never put a payment outside the limit — coverage is judged on the per-payment cap and the remaining budget alone — and (b) the deposit's asset and network move out of the limit's `rule` into a `funding_leg_internal` block in the `active_mandates` result, which the agent copies into the conversion account and never says out loud. Pair this with `labels.limit_unit` so the agent has a unit to quote the limit in.
733
+ * @example conversion_account_only
734
+ * @enum {string}
735
+ */
736
+ readonly payout_route?: "" | "conversion_account_only" | "bank_only";
737
+ } & {
738
+ readonly [key: string]: unknown;
739
+ };
740
+ /**
741
+ * @description A client's registered `client_policy` (ALPHA) with its registration timestamps.
742
+ *
743
+ * `policy` is the NORMALIZED form — what the server will actually apply, not an echo of what was sent. Values that mean "the default" are normalized away (`payee_model: nested` becomes absent, because an explicit nested and an absent policy have to be the same value rather than two values that merely behave alike today).
744
+ */
745
+ readonly RegisteredAgenticClientPolicy: {
746
+ readonly policy: components["schemas"]["AgenticClientPolicy"];
747
+ /**
748
+ * Format: int64
749
+ * @description Unix time this client first registered a policy.
750
+ */
751
+ readonly created_at?: number;
752
+ /**
753
+ * Format: int64
754
+ * @description Unix time the registration was last replaced.
755
+ */
756
+ readonly updated_at?: number;
647
757
  };
648
758
  readonly AgenticChatMessage: {
649
759
  /** @enum {string} */
@@ -697,12 +807,31 @@ type components = {
697
807
  */
698
808
  readonly updated_at?: number;
699
809
  };
810
+ /** @description One machine-actionable reason a drafting turn produced no proposals. Verified server-side before it is returned. */
811
+ readonly AgenticBlocker: {
812
+ /**
813
+ * @description `mandate_does_not_cover_payee` — a spending limit is in force but its rule does not reach the named payee. This is the ACTIONABLE one: the limit can be amended to ADD the payee as a target, which changes nothing else and so can never raise the limit; collect the customer's signature for that amendment and run the turn again. `no_mandate` — no active limit exists at all, so there is nothing to amend and the customer must establish one first. The two are kept distinct so a client never opens an amend flow against a limit that does not exist.
814
+ * @enum {string}
815
+ */
816
+ readonly code: "mandate_does_not_cover_payee" | "no_mandate";
817
+ readonly mandate_id?: components["schemas"]["KSUID"];
818
+ /** @description The payee the customer named, verbatim. A NAME and not an id, because in the case this exists for the payee does not exist yet — which is why nothing covers them. */
819
+ readonly payee_name?: string;
820
+ /** @description Short human-readable note. Advisory only — branch on `code`. */
821
+ readonly detail?: string;
822
+ };
700
823
  /** @description The agent's next step. At least one of `proposals` or `reply` is always present in a successful response — `proposals` at high confidence (optionally with a short `reply` note), or `reply` alone when the agent needs more from the user. */
701
824
  readonly AgenticProposalsResult: {
702
825
  /** @description Validated action-series proposals, ready to accept via POST /instructions. Present only at high confidence. */
703
826
  readonly proposals?: readonly components["schemas"]["AgenticProposal"][];
704
827
  /** @description The agent's conversational reply — a clarifying question or confirmation. Present without proposals when the agent needs more from the user; may accompany proposals as a short note. */
705
828
  readonly reply?: string;
829
+ /**
830
+ * @description ALPHA — machine-actionable reasons the agent could not complete the request, for the CLIENT APPLICATION rather than the customer. `reply` explains it in prose, which software cannot branch on: "extend the limit to cover Priya", "I need her bank details" and "that rail is not supported" all arrive as some text. A blocker names the reason as a stable code so the client can act on it — opening its own limit editor with the payee filled in, say — and only then decide what the customer sees.
831
+ * MAY ACCOMPANY PROPOSALS, and routinely does. The common case is a payee who does not exist yet: the turn proposes creating them AND reports that the limit will not reach them, because the client has to do both, in that order — accept the proposal so the payee has an id, then amend the limit to include it. Treat proposals and blockers as independent, never as alternatives.
832
+ * Absent when nothing blocked the turn. ALWAYS switch on `code` and ignore codes you do not know, as new ones are added over time. Every blocker returned has been re-checked against the server's own data, so a code never reflects only the model's opinion.
833
+ */
834
+ readonly blockers?: readonly components["schemas"]["AgenticBlocker"][];
706
835
  /**
707
836
  * @description How the boundary screen treated this turn. `ok` is a normal payments turn; `warned` means the request was off-topic and the customer was warned but may continue; `blocked` means the conversation has been terminated (repeated off-topic turns or a manipulation attempt) — the client should stop serving it and offer a fresh chat. `rejected_input` means this message was refused wholesale (e.g. more payees than one conversation supports) and should NOT be added to the conversation history — the reply explains what to resend; the conversation itself continues unaffected.
708
837
  * @enum {string}
@@ -1994,15 +2123,41 @@ type components = {
1994
2123
  readonly developer_fee_bps?: number;
1995
2124
  /**
1996
2125
  * Format: int32
1997
- * @description Caps how many sweeps this account performs before it stops
1998
- * converting. A sweep is one convert-and-forward of funds received at
1999
- * the account through to its destination, so `1` makes the account a
2000
- * one-off — the deposit details self-disable after a single sweep —
2001
- * and `N` lets one account serve exactly N sweeps.
2126
+ * @description Hard cap on how many transactions this account may ever create. A
2127
+ * transaction is one convert-and-forward of funds received at the
2128
+ * account through to its destination, so `1` makes the account a
2129
+ * one-off and `N` lets one account serve N payments.
2002
2130
  *
2003
2131
  * Omit for the default, which is unchanged: the account is uncapped
2004
2132
  * and keeps sweeping every deposit indefinitely (a durable, standing
2005
2133
  * account).
2134
+ *
2135
+ * **Reaching the cap refuses further deposits; it does not turn the
2136
+ * deposit details off.** Once the cap is used up:
2137
+ *
2138
+ * - Deposits sent to the account are **refused**. They are *not*
2139
+ * returned to the sender — the funds still arrive and are then held
2140
+ * pending manual intervention. Nothing is converted, nothing is
2141
+ * forwarded, and no transaction appears on the account for them. Stop
2142
+ * sending to the deposit details once the cap is reached.
2143
+ * - The account is closed and stops serving new payments.
2144
+ * - This is **not recoverable through this API**. `max_transactions` is
2145
+ * immutable — it cannot be raised, and a closed account cannot be
2146
+ * reopened — so a capped-out account is finished. Create a new
2147
+ * account (with new deposit details) to keep receiving.
2148
+ *
2149
+ * **A slot is consumed by any transaction in flight or delivered, not
2150
+ * only a successful one.** A slot is released only when a transaction
2151
+ * ends with the value *not* staying with the recipient: canceled,
2152
+ * rejected, reversed, or refunded. A failed or returned transaction
2153
+ * keeps its slot, because its funds are still held and it can still be
2154
+ * retried, until it is refunded. Size the cap against the number of
2155
+ * deposits you expect, not the number of successes you need. Releasing
2156
+ * a slot does not reopen a closed account.
2157
+ *
2158
+ * The cap is checked as each deposit arrives, so deposits that race
2159
+ * each other can briefly overshoot `N`; the account closes on the next
2160
+ * one.
2006
2161
  * @example 1
2007
2162
  */
2008
2163
  readonly max_transactions?: number;
@@ -23447,6 +23602,151 @@ interface operations {
23447
23602
  };
23448
23603
  };
23449
23604
  };
23605
+ readonly getClientAgenticPolicy: {
23606
+ readonly parameters: {
23607
+ readonly query?: never;
23608
+ readonly header?: never;
23609
+ readonly path?: never;
23610
+ readonly cookie?: never;
23611
+ };
23612
+ readonly requestBody?: never;
23613
+ readonly responses: {
23614
+ /** @description The client's registered agentic policy, normalized. */
23615
+ readonly 200: {
23616
+ headers: {
23617
+ readonly [name: string]: unknown;
23618
+ };
23619
+ content: {
23620
+ /**
23621
+ * @example {
23622
+ * "policy": {
23623
+ * "payee_model": "flat",
23624
+ * "mandate_strategy": "external_only",
23625
+ * "payout_route": "bank_only",
23626
+ * "labels": {
23627
+ * "limit": "spending limit",
23628
+ * "limit_unit": "USD",
23629
+ * "payee": "recipient"
23630
+ * }
23631
+ * },
23632
+ * "created_at": 1761600000,
23633
+ * "updated_at": 1761686400
23634
+ * }
23635
+ */
23636
+ readonly "application/json": components["schemas"]["RegisteredAgenticClientPolicy"];
23637
+ };
23638
+ };
23639
+ /** @description Bad Request */
23640
+ readonly 400: {
23641
+ headers: {
23642
+ readonly [name: string]: unknown;
23643
+ };
23644
+ content: {
23645
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
23646
+ };
23647
+ };
23648
+ /** @description Unauthorized */
23649
+ readonly 401: {
23650
+ headers: {
23651
+ readonly [name: string]: unknown;
23652
+ };
23653
+ content: {
23654
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
23655
+ };
23656
+ };
23657
+ /** @description This client has no registered policy. */
23658
+ readonly 404: {
23659
+ headers: {
23660
+ readonly [name: string]: unknown;
23661
+ };
23662
+ content: {
23663
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
23664
+ };
23665
+ };
23666
+ };
23667
+ };
23668
+ readonly updateClientAgenticPolicy: {
23669
+ readonly parameters: {
23670
+ readonly query?: never;
23671
+ readonly header: {
23672
+ /** @description Unique key to ensure request idempotency. If the same key is used within a certain time window, the original response will be returned instead of executing the request again. */
23673
+ readonly "x-idempotency-key": components["parameters"]["IdempotencyKeyHeader"];
23674
+ };
23675
+ readonly path?: never;
23676
+ readonly cookie?: never;
23677
+ };
23678
+ readonly requestBody: {
23679
+ readonly content: {
23680
+ /**
23681
+ * @example {
23682
+ * "payee_model": "flat",
23683
+ * "mandate_strategy": "external_only",
23684
+ * "payout_route": "bank_only",
23685
+ * "labels": {
23686
+ * "limit": "spending limit",
23687
+ * "limit_unit": "USD",
23688
+ * "payee": "recipient"
23689
+ * }
23690
+ * }
23691
+ */
23692
+ readonly "application/json": components["schemas"]["AgenticClientPolicy"];
23693
+ };
23694
+ };
23695
+ readonly responses: {
23696
+ /** @description The registered policy, normalized as it will be applied. */
23697
+ readonly 200: {
23698
+ headers: {
23699
+ readonly [name: string]: unknown;
23700
+ };
23701
+ content: {
23702
+ /**
23703
+ * @example {
23704
+ * "policy": {
23705
+ * "payee_model": "flat",
23706
+ * "mandate_strategy": "external_only",
23707
+ * "payout_route": "bank_only",
23708
+ * "labels": {
23709
+ * "limit": "spending limit",
23710
+ * "limit_unit": "USD",
23711
+ * "payee": "recipient"
23712
+ * }
23713
+ * },
23714
+ * "created_at": 1761600000,
23715
+ * "updated_at": 1761686400
23716
+ * }
23717
+ */
23718
+ readonly "application/json": components["schemas"]["RegisteredAgenticClientPolicy"];
23719
+ };
23720
+ };
23721
+ /** @description The policy is not one this server can enforce — an unknown key, an unsupported value, or a label for an unimplemented concept. */
23722
+ readonly 400: {
23723
+ headers: {
23724
+ readonly [name: string]: unknown;
23725
+ };
23726
+ content: {
23727
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
23728
+ };
23729
+ };
23730
+ /** @description Unauthorized */
23731
+ readonly 401: {
23732
+ headers: {
23733
+ readonly [name: string]: unknown;
23734
+ };
23735
+ content: {
23736
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
23737
+ };
23738
+ };
23739
+ /** @description Not Found */
23740
+ readonly 404: {
23741
+ headers: {
23742
+ readonly [name: string]: unknown;
23743
+ };
23744
+ content: {
23745
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
23746
+ };
23747
+ };
23748
+ };
23749
+ };
23450
23750
  }
23451
23751
 
23452
23752
  /**
@@ -24268,6 +24568,46 @@ type MandateBudget = components['schemas']['MandateBudget'];
24268
24568
  type MandateBudgetLine = components['schemas']['MandateBudgetLine'];
24269
24569
  /** Live snapshot of an in-flight proposal-drafting turn (advisory display only). */
24270
24570
  type AgenticProposalsProgress = components['schemas']['AgenticProposalsProgress'];
24571
+ /**
24572
+ * One machine-actionable reason a drafting turn could not complete — for the
24573
+ * CLIENT APPLICATION, not the customer.
24574
+ *
24575
+ * `reply` explains the same thing in prose, which software cannot branch on.
24576
+ * Always switch on `code` and IGNORE codes you do not recognize: new ones are
24577
+ * added over time.
24578
+ */
24579
+ type AgenticBlocker = components['schemas']['AgenticBlocker'];
24580
+ /** The stable `code` of an {@link AgenticBlocker}. Treat as an OPEN set. */
24581
+ type AgenticBlockerCode = NonNullable<AgenticBlocker['code']>;
24582
+ /**
24583
+ * How THIS client's product speaks, and what the agent may propose for it.
24584
+ *
24585
+ * Reshapes what the drafting model sees and constrains what it may propose,
24586
+ * so the agent narrates in your nouns instead of the platform's. Register it
24587
+ * ONCE via `client.agenticPolicy.set(policy)`; sending it per
24588
+ * request is a development override that wins for that turn only.
24589
+ *
24590
+ * STRICT — an unknown key, an unknown value, or a label for a concept the
24591
+ * server does not implement is a 400, so "accepted" always means "enforced".
24592
+ */
24593
+ type AgenticClientPolicy = components['schemas']['AgenticClientPolicy'];
24594
+ /**
24595
+ * A client's registered policy plus its registration timestamps.
24596
+ *
24597
+ * `policy` is the NORMALIZED form — what the server will actually apply, not
24598
+ * an echo of what was sent (values meaning "the default" are normalized away).
24599
+ */
24600
+ type RegisteredAgenticClientPolicy = components['schemas']['RegisteredAgenticClientPolicy'];
24601
+ /**
24602
+ * Your developer fee, declared per payout type: `swap_bps` for a crypto
24603
+ * payout, `offramp_bps` for a bank payout.
24604
+ *
24605
+ * The two are independent — omit one (or send zero) and that payout type
24606
+ * carries no fee at all, and the agent is told nothing about a fee it could
24607
+ * mention. Both are DEFAULTS for the auto-accounts a request creates; an
24608
+ * action-level `fee_bps` still wins outright.
24609
+ */
24610
+ type DeveloperFee = components['schemas']['DeveloperFee'];
24271
24611
  /** A scheduled payment — bookkeeping row created by accepting an instruction. */
24272
24612
  type ScheduledPayment = components['schemas']['ScheduledPaymentResponse'];
24273
24613
  /** Request body for POST /scheduled-payments — direct (signer-first) schedule create. */
@@ -24792,6 +25132,14 @@ declare class AccountsResource extends BaseResource {
24792
25132
  * });
24793
25133
  * // Returns: { bank_account: { bank_name, aba_routing_number, account_number } } - customer sends USD here
24794
25134
  * ```
25135
+ *
25136
+ * @remarks
25137
+ * `max_transactions` caps how many transactions the account may ever
25138
+ * create — `1` makes it a one-off. Know what reaching the cap does before
25139
+ * you set one: further deposits are **refused, not returned**. The funds
25140
+ * still arrive and are then held pending manual intervention, with nothing
25141
+ * converted, nothing forwarded, and no transaction on the account for
25142
+ * them. Stop sending to the deposit details once the cap is reached.
24795
25143
  */
24796
25144
  create(data: AccountCreateRequest, options?: RequestOptions): Promise<Account>;
24797
25145
  /**
@@ -26190,6 +26538,15 @@ declare class PaymentAgentsResource extends BaseResource {
26190
26538
  * rather than the client's ordinary deadline. Pass `{ timeout }` to
26191
26539
  * change it for one call; an explicit client-wide `timeout` still wins.
26192
26540
  *
26541
+ * The result may carry `blockers` ALONGSIDE proposals — they are not
26542
+ * alternatives. Branch on `blocker.code`, not on `reply`, and ignore codes
26543
+ * you do not recognize.
26544
+ *
26545
+ * `data.client_policy` is a DEVELOPMENT override of the vocabulary the
26546
+ * agent drafts under; prefer registering it once with
26547
+ * `client.agenticPolicy.set()`, since forgetting to send it here fails
26548
+ * silently.
26549
+ *
26193
26550
  * @param paymentAgentId - Payment agent ID
26194
26551
  * @param data - Prompt and/or messages
26195
26552
  * @returns Proposals (at high confidence) and/or a conversational reply
@@ -26244,6 +26601,19 @@ declare class InstructionsResource extends BaseResource {
26244
26601
  /**
26245
26602
  * Accept proposals — actuate them into persisted instructions.
26246
26603
  *
26604
+ * Two optional fields shape the actuation:
26605
+ *
26606
+ * - `developer_fee` declares your fee PER PAYOUT TYPE — `swap_bps` for a
26607
+ * crypto payout, `offramp_bps` for a bank payout. They are independent,
26608
+ * so one conversation can charge a swap and stay silent about a bank
26609
+ * payout in the same turn. Omit a rate (or send zero) and that payout
26610
+ * type carries no fee: nothing is charged, nothing is added to the
26611
+ * amount, and the agent is told nothing about a fee it could mention.
26612
+ * Both are DEFAULTS for the auto-accounts this request creates — an
26613
+ * action-level `fee_bps` still wins outright.
26614
+ * - `client_policy` is the same development override the proposals call
26615
+ * takes. Prefer registering it once with `client.agenticPolicy.set()`.
26616
+ *
26247
26617
  * @param data - The payment agent id and the proposals to accept
26248
26618
  * @returns instruction_ids + the mandates the batch drafted (in full
26249
26619
  * wire shape; sign the §8 approval immediately)
@@ -26498,6 +26868,83 @@ declare class InsightsResource extends BaseResource {
26498
26868
  chat(customerId: string, data: InsightChatRequest, options?: RequestOptions): Promise<InsightChatResponse>;
26499
26869
  }
26500
26870
 
26871
+ /**
26872
+ * Agentic Client Policy resource (ALPHA).
26873
+ *
26874
+ * Agentic payments is an alpha surface (x-alpha, flag-gated on the platform)
26875
+ * and may change without a major-version bump.
26876
+ */
26877
+
26878
+ /**
26879
+ * Agentic Client Policy API resource (ALPHA).
26880
+ *
26881
+ * The policy is per CLIENT — it belongs to the client behind your API key,
26882
+ * never to a key, since API keys are N:1 to clients and a per-key policy
26883
+ * would fragment for anyone running one service key per deployment.
26884
+ *
26885
+ * There is no client id to pass. The route resolves the client from the API
26886
+ * key, so you cannot address another client's policy even to be refused.
26887
+ */
26888
+ declare class AgenticPolicyResource extends BaseResource {
26889
+ /**
26890
+ * Get the policy registered for the client behind your API key.
26891
+ *
26892
+ * A 404 here is the DEFAULT, not an error condition: with no registration
26893
+ * and no per-request policy the agent drafts on platform defaults, exactly
26894
+ * as it did before registration existed.
26895
+ *
26896
+ * @returns The normalized registered policy + its timestamps
26897
+ *
26898
+ * @example
26899
+ * ```typescript
26900
+ * try {
26901
+ * const { policy } = await client.agenticPolicy.get();
26902
+ * console.log(policy.labels);
26903
+ * } catch (e) {
26904
+ * if (e instanceof APIError && e.statusCode === 404) {
26905
+ * // No registration — platform defaults apply.
26906
+ * }
26907
+ * }
26908
+ * ```
26909
+ */
26910
+ get(): Promise<RegisteredAgenticClientPolicy>;
26911
+ /**
26912
+ * Register — or fully replace — this client's agentic policy.
26913
+ *
26914
+ * Declaring the vocabulary once removes a silent failure mode. Sending
26915
+ * `client_policy` in each proposals request still works and still wins, but
26916
+ * FORGETTING to send it fails silently: the agent just narrates in the
26917
+ * platform's nouns again ("destination", "mandate") and nothing errors
26918
+ * anywhere. A registration makes that impossible.
26919
+ *
26920
+ * FULL REPLACE, not a merge — the registration IS your declared vocabulary,
26921
+ * so an omitted field means you no longer want it, and an empty body (`{}`)
26922
+ * clears the registration back to platform defaults.
26923
+ *
26924
+ * Validated exactly like the per-request copy, so an unknown key, an
26925
+ * unsupported value, or a label for an unimplemented concept is a 400 HERE,
26926
+ * at registration — not a surprise on a customer's first conversation.
26927
+ *
26928
+ * The client comes from your API key; there is no id to pass.
26929
+ *
26930
+ * @param policy - The complete policy (`{}` clears it)
26931
+ * @param options - Request options (e.g., custom idempotency key)
26932
+ * @returns The normalized stored policy + its timestamps
26933
+ *
26934
+ * @example
26935
+ * ```typescript
26936
+ * await client.agenticPolicy.set({
26937
+ * payee_model: 'flat',
26938
+ * payout_assets: ['USDC', 'USDT'],
26939
+ * labels: { limit: 'spending limit', payee: 'recipient', limit_unit: 'USD' },
26940
+ * payout_route: 'conversion_account_only',
26941
+ * mandate_strategy: 'external_only',
26942
+ * });
26943
+ * ```
26944
+ */
26945
+ set(policy: AgenticClientPolicy, options?: RequestOptions): Promise<RegisteredAgenticClientPolicy>;
26946
+ }
26947
+
26501
26948
  /**
26502
26949
  * Multi-turn agent chat. The platform's proposals endpoint is STATELESS —
26503
26950
  * it holds no session and must be sent the whole transcript on every turn.
@@ -26553,6 +27000,26 @@ interface ConversationTurn {
26553
27000
  proposals: AgenticProposal[];
26554
27001
  /** Whether the agent drafted proposals this turn. */
26555
27002
  hasProposals: boolean;
27003
+ /**
27004
+ * Machine-actionable reasons the turn could not complete — for YOUR
27005
+ * application, not the customer. `reply` says the same thing in prose,
27006
+ * which software cannot branch on: "extend the limit to cover Priya",
27007
+ * "I need her bank details" and "that rail is not supported" all arrive
27008
+ * as some text.
27009
+ *
27010
+ * These ACCOMPANY proposals rather than replacing them, and routinely do.
27011
+ * The common case is a payee who does not exist yet: the turn proposes
27012
+ * creating them AND reports that the limit will not reach them, because
27013
+ * you have to do both, in that order — accept the proposal so the payee
27014
+ * has an id, then amend the limit to include it. Never treat proposals
27015
+ * and blockers as alternatives.
27016
+ *
27017
+ * Empty when nothing blocked the turn. Always switch on `code` and ignore
27018
+ * codes you do not know; new ones are added over time.
27019
+ */
27020
+ blockers: AgenticBlocker[];
27021
+ /** Whether the turn reported any blocker. */
27022
+ hasBlockers: boolean;
26556
27023
  /**
26557
27024
  * The boundary screen's verdict for this turn: `"ok"` (normal), `"warned"`
26558
27025
  * (off-topic — the customer was warned), or `"blocked"` (the chat is
@@ -26590,6 +27057,20 @@ interface AgentConversationOptions {
26590
27057
  * short global deadline will cut turns off unless you raise it here.
26591
27058
  */
26592
27059
  timeout?: number;
27060
+ /**
27061
+ * Per-turn `client_policy` override — the vocabulary and payout
27062
+ * constraints the agent drafts under.
27063
+ *
27064
+ * This is a DEVELOPMENT override. It wins for the turns of this
27065
+ * conversation and the server logs that it did. For production, register
27066
+ * the policy once with `client.agenticPolicy.set(policy)`
27067
+ * instead: forgetting to pass it here fails SILENTLY — the agent simply
27068
+ * narrates in the platform's nouns again, with no error anywhere.
27069
+ *
27070
+ * Resolution per request is: a non-empty policy here, else the client's
27071
+ * registration, else platform defaults.
27072
+ */
27073
+ clientPolicy?: AgenticClientPolicy;
26593
27074
  }
26594
27075
  /**
26595
27076
  * A stateful, multi-turn proposals chat with one agent.
@@ -26608,6 +27089,7 @@ declare class AgentConversation {
26608
27089
  private readonly paymentAgentId;
26609
27090
  private readonly timezone?;
26610
27091
  private readonly timeout?;
27092
+ private readonly clientPolicy?;
26611
27093
  private history;
26612
27094
  constructor(client: DakotaClient, paymentAgentId: string, history?: ChatMessage[], options?: AgentConversationOptions);
26613
27095
  /**
@@ -26718,6 +27200,8 @@ declare class DakotaClient {
26718
27200
  readonly scheduledPayments: ScheduledPaymentsResource;
26719
27201
  /** Insights API (ALPHA) - read-only advisory reporting over agentic activity */
26720
27202
  readonly insights: InsightsResource;
27203
+ /** Agentic Policy API (ALPHA) - register the vocabulary the agent speaks for your product */
27204
+ readonly agenticPolicy: AgenticPolicyResource;
26721
27205
  /**
26722
27206
  * Create a new Dakota client.
26723
27207
  *
@@ -27138,4 +27622,4 @@ declare function verifyMandateSignature(publicKeyBase64: string, payload: Uint8A
27138
27622
  */
27139
27623
  declare function canonicalJSON(value: unknown): string;
27140
27624
 
27141
- export { APIError, type Account, type AccountCreateRequest, type AccountListParams, type AccountUpdateRequest, AccountsResource, type Address, type AdvanceSimulationRequest, type AdvanceSimulationResult, AgentConversation, type AgentConversationOptions, type AgenticAction, type AgenticActionDownstream, type AgenticInstruction, type AgenticInstructionsResult, type AgenticProposal, type AgenticProposalsProgress, type AgenticProposalsResult, type AmendMandateRequest, type ApiKey, type ApiKeyCreateRequest, type ApiKeyResponse, ApiKeysResource, type Application, type ApplicationDocumentType, type ApplicationDocumentUploadRequest, type ApplicationDocumentUploadUrlRequest, type ApplicationListItem, type ApplicationStatus, type ApplicationSubmissionRequest, ApplicationsResource, type ApproveMandateRequest, type AssociatedIndividual, type AssociatedIndividualRequest, type AttachedPolicy, type AttachedWallet, type Attachment, type AttachmentMediaType, type AttestationSubmitRequest, type AttestationType, AuthMode, type AutoTransaction, AutoTransactionsResource, type AverageMonthlyRevenue, type BulkImportSumsubTokensRequest, type BulkImportSumsubTokensResponse, type BulkImportSumsubTokensResult, type BusinessApplicationCreateRequest, type BusinessDetailsResponse, type BusinessPurposeOfAccount, type BusinessSourceOfFunds, type CancelMandateRequest, type Capability, type CapabilityRequirement, type ChatMessage, type ClientPricingConfig, ConfigurationError, type ConversationTurn, type Country, type CreateApiKeyForClientRequest, type CreateInstructionsRequest, type CreateMandateRequest, type CreateProposalsRequest, type CreateScheduledPaymentRequest, type CryptoDestination, type CryptoDestinationRequest, type CursorExtractor, type Customer, type CustomerCapabilities, type CustomerCreateRequest, type CustomerCreateResponse, type CustomerListParams, type CustomerReEngagementResponse, CustomersResource, DEFAULT_RETRY_POLICY, DakotaClient, type DakotaClientConfig, type Destination, type DestinationCreateResponse, type DestinationRequest, DestinationsResource, type DocumentUploadResponse, type DocumentUploadUrlResponse, type EDDRequest, type EDDWithApplicationID, type EmploymentStatus, type EndorsedRequest, Environment, type Event, type EventListParams, type EventType, EventsResource, type ExpectedMonthlyDeposit, type Family, type FeePayoutDestination, FeePayoutDestinationResource, type FiatUSDestination, type FiatUSDestinationRequest, type ImportPersonaTokensRequest, type ImportPersonaTokensResponse, type IndividualDetailsResponse, type IndividualDocumentType, type IndividualDocumentUploadRequest, type IndividualDocumentUploadUrlRequest, type IndividualRequest, type IndividualRole, type IndividualTitle, InfoResource, type InsightChatMessage, type InsightChatRequest, type InsightChatResponse, type InsightEvidence, type InsightItem, type InsightReport, type InsightSnapshot, InsightsResource, InstructionsResource, type KSUID, type KybStatus, type LegalStructure, type ListParams, type Logger, type Mandate, type MandateAction, type MandateBudget, type MandateBudgetLine, type MandateListParams, type MandateResponse, type MandateRule, type MandateSigner, type MandateVersion, MandatesResource, type Meta, type Network, type NetworkId, type OfframpAccount, type OfframpAccountCreateRequest, type OneOffTransaction, type OneOffTransactionRequest, type OnrampAccount, type OnrampAccountCreateRequest, P256MandateSigner, type PageFetcher, PaginatedIterator, type PaginatedResponse, type PaginationMeta, type PaginationParams, type PaymentAgent, type PaymentAgentCreateRequest, type PaymentAgentSignerGroupRef, PaymentAgentsResource, type PaymentCapability, type PersonName, type PersonaImportJob, type PersonaImportJobListParams, type PersonaImportJobParams, type PersonaImportJobSummary, type PersonaImportJobsPage, type PersonaImportRowResult, PoliciesResource, type Policy, type PolicyCreateRequest, type PolicyRule, type PolicyRuleCreateRequest, type PutFeePayoutDestinationRequest, type Recipient, type RecipientRequest, type RecipientUpdateRequest, RecipientsResource, type RequestOptions, type ResolvedConfig, type RetryPolicy, SandboxResource, type SandboxScenario, type ScheduledPayment, type ScheduledPaymentListParams, ScheduledPaymentsResource, type SelfServeCreditTier, type SelfServeCreditTiersResponse, type SelfServeCreditsBalanceResponse, type SelfServeCreditsLedgerEntry, type SelfServeCreditsLedgerEntryType, type SelfServeCreditsLedgerParams, type SelfServeCreditsLedgerResponse, type SelfServeCreditsPricingResponse, type SelfServeCreditsPurchaseRequest, type SelfServeCreditsPurchaseResponse, SelfServeResource, type SendTransactionIntent, type Signer, type SignerCreateRequest, type SignerGroup, type SignerGroupCreateRequest, type SignerGroupGetParams, type SignerGroupSignerAddRequest, SignerGroupsResource, SignersResource, type SimulateInboundRequest, type SimulateInboundType, type SimulateOnboardingRequest, type SimulateOnboardingResponse, type SimulateOnboardingType, type SimulationCallbackRecord, type SimulationInspection, type SimulationResponse, type SubClientSummary, type SwapAccount, type SwapAccountCreateRequest, type TransactionListParams, type TransactionStatus, TransactionsResource, TransportError, type UpdateCustomerSubClientRequest, type UploadedDocumentMetadata, type UsdcWalletPayoutDestination, type User, type UserCreateRequest, type UserUpdateRequest, UsersResource, type Wallet, type WalletBalance, type WalletBalances, type WalletCreateRequest, type WalletTransaction, type WalletTransactionRequest, WalletsResource, type WebhookEvent, type WebhookHistoryList, type WebhookHistoryListParams, type WebhookHistoryResponse, type WebhookReplayResponse, type WebhookTarget, type WebhookTargetCreateRequest, type WebhookTargetUpdateRequest, WebhooksResource, addPolicyRulePayload, attachGroupPayload, attachPolicyPayload, attachUserToWallet, canonicalJSON, consoleLogger, deletePolicyPayload, detachGroupPayload, detachPolicyPayload, detachUserFromWallet, getEnvironmentURL, mandateAmendSignPayload, mandateSignPayload, noopLogger, paginate, removePolicyRulePayload, updatePolicyRulePayload, verifyMandateSignature };
27625
+ export { APIError, type Account, type AccountCreateRequest, type AccountListParams, type AccountUpdateRequest, AccountsResource, type Address, type AdvanceSimulationRequest, type AdvanceSimulationResult, AgentConversation, type AgentConversationOptions, type AgenticAction, type AgenticActionDownstream, type AgenticBlocker, type AgenticBlockerCode, type AgenticClientPolicy, type AgenticInstruction, type AgenticInstructionsResult, AgenticPolicyResource, type AgenticProposal, type AgenticProposalsProgress, type AgenticProposalsResult, type AmendMandateRequest, type ApiKey, type ApiKeyCreateRequest, type ApiKeyResponse, ApiKeysResource, type Application, type ApplicationDocumentType, type ApplicationDocumentUploadRequest, type ApplicationDocumentUploadUrlRequest, type ApplicationListItem, type ApplicationStatus, type ApplicationSubmissionRequest, ApplicationsResource, type ApproveMandateRequest, type AssociatedIndividual, type AssociatedIndividualRequest, type AttachedPolicy, type AttachedWallet, type Attachment, type AttachmentMediaType, type AttestationSubmitRequest, type AttestationType, AuthMode, type AutoTransaction, AutoTransactionsResource, type AverageMonthlyRevenue, type BulkImportSumsubTokensRequest, type BulkImportSumsubTokensResponse, type BulkImportSumsubTokensResult, type BusinessApplicationCreateRequest, type BusinessDetailsResponse, type BusinessPurposeOfAccount, type BusinessSourceOfFunds, type CancelMandateRequest, type Capability, type CapabilityRequirement, type ChatMessage, type ClientPricingConfig, ConfigurationError, type ConversationTurn, type Country, type CreateApiKeyForClientRequest, type CreateInstructionsRequest, type CreateMandateRequest, type CreateProposalsRequest, type CreateScheduledPaymentRequest, type CryptoDestination, type CryptoDestinationRequest, type CursorExtractor, type Customer, type CustomerCapabilities, type CustomerCreateRequest, type CustomerCreateResponse, type CustomerListParams, type CustomerReEngagementResponse, CustomersResource, DEFAULT_RETRY_POLICY, DakotaClient, type DakotaClientConfig, type Destination, type DestinationCreateResponse, type DestinationRequest, DestinationsResource, type DeveloperFee, type DocumentUploadResponse, type DocumentUploadUrlResponse, type EDDRequest, type EDDWithApplicationID, type EmploymentStatus, type EndorsedRequest, Environment, type Event, type EventListParams, type EventType, EventsResource, type ExpectedMonthlyDeposit, type Family, type FeePayoutDestination, FeePayoutDestinationResource, type FiatUSDestination, type FiatUSDestinationRequest, type ImportPersonaTokensRequest, type ImportPersonaTokensResponse, type IndividualDetailsResponse, type IndividualDocumentType, type IndividualDocumentUploadRequest, type IndividualDocumentUploadUrlRequest, type IndividualRequest, type IndividualRole, type IndividualTitle, InfoResource, type InsightChatMessage, type InsightChatRequest, type InsightChatResponse, type InsightEvidence, type InsightItem, type InsightReport, type InsightSnapshot, InsightsResource, InstructionsResource, type KSUID, type KybStatus, type LegalStructure, type ListParams, type Logger, type Mandate, type MandateAction, type MandateBudget, type MandateBudgetLine, type MandateListParams, type MandateResponse, type MandateRule, type MandateSigner, type MandateVersion, MandatesResource, type Meta, type Network, type NetworkId, type OfframpAccount, type OfframpAccountCreateRequest, type OneOffTransaction, type OneOffTransactionRequest, type OnrampAccount, type OnrampAccountCreateRequest, P256MandateSigner, type PageFetcher, PaginatedIterator, type PaginatedResponse, type PaginationMeta, type PaginationParams, type PaymentAgent, type PaymentAgentCreateRequest, type PaymentAgentSignerGroupRef, PaymentAgentsResource, type PaymentCapability, type PersonName, type PersonaImportJob, type PersonaImportJobListParams, type PersonaImportJobParams, type PersonaImportJobSummary, type PersonaImportJobsPage, type PersonaImportRowResult, PoliciesResource, type Policy, type PolicyCreateRequest, type PolicyRule, type PolicyRuleCreateRequest, type PutFeePayoutDestinationRequest, type Recipient, type RecipientRequest, type RecipientUpdateRequest, RecipientsResource, type RegisteredAgenticClientPolicy, type RequestOptions, type ResolvedConfig, type RetryPolicy, SandboxResource, type SandboxScenario, type ScheduledPayment, type ScheduledPaymentListParams, ScheduledPaymentsResource, type SelfServeCreditTier, type SelfServeCreditTiersResponse, type SelfServeCreditsBalanceResponse, type SelfServeCreditsLedgerEntry, type SelfServeCreditsLedgerEntryType, type SelfServeCreditsLedgerParams, type SelfServeCreditsLedgerResponse, type SelfServeCreditsPricingResponse, type SelfServeCreditsPurchaseRequest, type SelfServeCreditsPurchaseResponse, SelfServeResource, type SendTransactionIntent, type Signer, type SignerCreateRequest, type SignerGroup, type SignerGroupCreateRequest, type SignerGroupGetParams, type SignerGroupSignerAddRequest, SignerGroupsResource, SignersResource, type SimulateInboundRequest, type SimulateInboundType, type SimulateOnboardingRequest, type SimulateOnboardingResponse, type SimulateOnboardingType, type SimulationCallbackRecord, type SimulationInspection, type SimulationResponse, type SubClientSummary, type SwapAccount, type SwapAccountCreateRequest, type TransactionListParams, type TransactionStatus, TransactionsResource, TransportError, type UpdateCustomerSubClientRequest, type UploadedDocumentMetadata, type UsdcWalletPayoutDestination, type User, type UserCreateRequest, type UserUpdateRequest, UsersResource, type Wallet, type WalletBalance, type WalletBalances, type WalletCreateRequest, type WalletTransaction, type WalletTransactionRequest, WalletsResource, type WebhookEvent, type WebhookHistoryList, type WebhookHistoryListParams, type WebhookHistoryResponse, type WebhookReplayResponse, type WebhookTarget, type WebhookTargetCreateRequest, type WebhookTargetUpdateRequest, WebhooksResource, addPolicyRulePayload, attachGroupPayload, attachPolicyPayload, attachUserToWallet, canonicalJSON, consoleLogger, deletePolicyPayload, detachGroupPayload, detachPolicyPayload, detachUserFromWallet, getEnvironmentURL, mandateAmendSignPayload, mandateSignPayload, noopLogger, paginate, removePolicyRulePayload, updatePolicyRulePayload, verifyMandateSignature };