@1claw/sdk 0.53.3 → 0.55.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.
@@ -2077,6 +2077,46 @@ export interface paths {
2077
2077
  patch?: never;
2078
2078
  trace?: never;
2079
2079
  };
2080
+ "/v1/org/freeze": {
2081
+ parameters: {
2082
+ query?: never;
2083
+ header?: never;
2084
+ path?: never;
2085
+ cookie?: never;
2086
+ };
2087
+ get?: never;
2088
+ put?: never;
2089
+ /**
2090
+ * Emergency org-wide freeze
2091
+ * @description Sets organizations.frozen_at — blocks agent tx/execution until unfreeze. Owner/admin only.
2092
+ */
2093
+ post: operations["freezeOrg"];
2094
+ delete?: never;
2095
+ options?: never;
2096
+ head?: never;
2097
+ patch?: never;
2098
+ trace?: never;
2099
+ };
2100
+ "/v1/org/unfreeze": {
2101
+ parameters: {
2102
+ query?: never;
2103
+ header?: never;
2104
+ path?: never;
2105
+ cookie?: never;
2106
+ };
2107
+ get?: never;
2108
+ put?: never;
2109
+ /**
2110
+ * Clear org-wide freeze
2111
+ * @description Clears organizations.frozen_at. Owner/admin only.
2112
+ */
2113
+ post: operations["unfreezeOrg"];
2114
+ delete?: never;
2115
+ options?: never;
2116
+ head?: never;
2117
+ patch?: never;
2118
+ trace?: never;
2119
+ };
2080
2120
  "/v1/org/bankr-config": {
2081
2121
  parameters: {
2082
2122
  query?: never;
@@ -4488,6 +4528,28 @@ export interface paths {
4488
4528
  patch?: never;
4489
4529
  trace?: never;
4490
4530
  };
4531
+ "/v1/approvals/{approval_id}/status": {
4532
+ parameters: {
4533
+ query?: never;
4534
+ header?: never;
4535
+ path?: never;
4536
+ cookie?: never;
4537
+ };
4538
+ /**
4539
+ * Poll approval status (agent-only)
4540
+ * @description Lightweight status poll for agents waiting on human approval.
4541
+ * Returns `status` and `expires_at` only. Agents may only poll
4542
+ * approvals they created (`agent_id` must match the caller).
4543
+ */
4544
+ get: operations["getApprovalStatus"];
4545
+ put?: never;
4546
+ post?: never;
4547
+ delete?: never;
4548
+ options?: never;
4549
+ head?: never;
4550
+ patch?: never;
4551
+ trace?: never;
4552
+ };
4491
4553
  "/v1/approvals/{approval_id}/decide": {
4492
4554
  parameters: {
4493
4555
  query?: never;
@@ -7619,6 +7681,55 @@ export interface components {
7619
7681
  * @default true
7620
7682
  */
7621
7683
  card_require_approval: boolean;
7684
+ /** @description Graduated transaction approval policy (HITL thresholds). Separate from hard guardrails. */
7685
+ tx_approval_policy?: {
7686
+ [key: string]: unknown;
7687
+ } | null;
7688
+ /**
7689
+ * @description EIP-712 escalation when typed_data matches no allowlist — deny (403) or route to HITL (approve).
7690
+ * @enum {string}
7691
+ */
7692
+ typed_data_policy?: "deny" | "approve";
7693
+ /**
7694
+ * @description Simulation failure escalation — deny (422) or route to HITL (approve).
7695
+ * @enum {string}
7696
+ */
7697
+ simulation_failure_policy?: "deny" | "approve";
7698
+ /**
7699
+ * @description Block unlimited ERC-20 approvals (max uint256 / setApprovalForAll).
7700
+ * @default false
7701
+ */
7702
+ tx_block_unlimited_approvals: boolean;
7703
+ /** @description Max transactions to the same recipient address per UTC day. */
7704
+ tx_per_recipient_max_per_day?: number | null;
7705
+ /** @description Max native-unit spend to the same recipient per UTC day. */
7706
+ tx_per_recipient_daily_limit?: string | null;
7707
+ /** @description Cap on first-time recipient spend in native units. */
7708
+ new_recipient_cap_native?: string | null;
7709
+ /** @description Per-transaction USD cap (requires price oracle). */
7710
+ tx_max_value_usd?: string | null;
7711
+ /** @description Rolling 24h USD spend cap (requires price oracle). */
7712
+ tx_daily_limit_usd?: string | null;
7713
+ /**
7714
+ * @description Raw digest signing policy — allow, deny, or route to HITL (approve).
7715
+ * @default allow
7716
+ * @enum {string}
7717
+ */
7718
+ raw_signing_policy: "allow" | "deny" | "approve";
7719
+ /** @description personal_sign guardrails (message allowlist, max bytes, etc.). */
7720
+ personal_sign_policy?: {
7721
+ [key: string]: unknown;
7722
+ };
7723
+ /**
7724
+ * @description Allow ERC-4337 gasless UserOperations.
7725
+ * @default false
7726
+ */
7727
+ allow_erc4337: boolean;
7728
+ /**
7729
+ * @description Allow EIP-7702 (tx type 4) set-code transactions.
7730
+ * @default false
7731
+ */
7732
+ allow_eip7702: boolean;
7622
7733
  /**
7623
7734
  * Format: date-time
7624
7735
  * @description Optional expiration time for the agent's API key.
@@ -7700,6 +7811,47 @@ export interface components {
7700
7811
  card_reveal_enabled?: boolean;
7701
7812
  /** @description When true, card orders route through the human approval queue before x402 payment. */
7702
7813
  card_require_approval?: boolean;
7814
+ /** @description Graduated transaction approval policy (HITL thresholds). */
7815
+ tx_approval_policy?: {
7816
+ [key: string]: unknown;
7817
+ } | null;
7818
+ /**
7819
+ * @description EIP-712 escalation policy.
7820
+ * @enum {string|null}
7821
+ */
7822
+ typed_data_policy?: "deny" | "approve" | null;
7823
+ /**
7824
+ * @description Simulation failure escalation policy.
7825
+ * @enum {string|null}
7826
+ */
7827
+ simulation_failure_policy?: "deny" | "approve" | null;
7828
+ /** @description Block unlimited ERC-20 approvals (max uint256 / setApprovalForAll). */
7829
+ tx_block_unlimited_approvals?: boolean;
7830
+ /** @description Max transactions to the same recipient per UTC day. Null clears. */
7831
+ tx_per_recipient_max_per_day?: number | null;
7832
+ /** @description Max native spend to same recipient per UTC day. Null clears. */
7833
+ tx_per_recipient_daily_limit?: string | null;
7834
+ /** @description First-time recipient native cap. Null clears. */
7835
+ new_recipient_cap_native?: string | null;
7836
+ /** @description Per-tx USD cap. Null clears. */
7837
+ tx_max_value_usd?: string | null;
7838
+ /** @description Rolling 24h USD spend cap. Null clears. */
7839
+ tx_daily_limit_usd?: string | null;
7840
+ /**
7841
+ * @description Raw digest signing policy.
7842
+ * @enum {string}
7843
+ */
7844
+ raw_signing_policy?: "allow" | "deny" | "approve";
7845
+ /** @description personal_sign guardrails JSON. */
7846
+ personal_sign_policy?: {
7847
+ [key: string]: unknown;
7848
+ };
7849
+ /** @description Allow ERC-4337 gasless UserOperations. */
7850
+ allow_erc4337?: boolean;
7851
+ /** @description Allow EIP-7702 (tx type 4). */
7852
+ allow_eip7702?: boolean;
7853
+ /** @description When true, clears circuit-breaker auto-suspension (human owner/admin only). */
7854
+ clear_auto_suspended?: boolean;
7703
7855
  /**
7704
7856
  * @description Enable OIDC federation (RFC 8693 token-exchange) for this agent.
7705
7857
  * When true, the agent may call POST /v1/auth/federated-token to mint
@@ -7829,6 +7981,30 @@ export interface components {
7829
7981
  card_reveal_enabled?: boolean;
7830
7982
  /** @description When true, card orders route through the human approval queue before x402 payment. */
7831
7983
  card_require_approval?: boolean;
7984
+ /** @description Graduated transaction approval policy (HITL thresholds). */
7985
+ tx_approval_policy?: {
7986
+ [key: string]: unknown;
7987
+ } | null;
7988
+ /** @enum {string|null} */
7989
+ typed_data_policy?: "deny" | "approve" | null;
7990
+ /** @enum {string|null} */
7991
+ simulation_failure_policy?: "deny" | "approve" | null;
7992
+ /** @description Block unlimited ERC-20 approvals. */
7993
+ tx_block_unlimited_approvals?: boolean;
7994
+ tx_per_recipient_max_per_day?: number | null;
7995
+ tx_per_recipient_daily_limit?: string | null;
7996
+ new_recipient_cap_native?: string | null;
7997
+ tx_max_value_usd?: string | null;
7998
+ tx_daily_limit_usd?: string | null;
7999
+ /** @enum {string} */
8000
+ raw_signing_policy?: "allow" | "deny" | "approve";
8001
+ personal_sign_policy?: {
8002
+ [key: string]: unknown;
8003
+ } | null;
8004
+ allow_erc4337?: boolean;
8005
+ allow_eip7702?: boolean;
8006
+ /** @description True when circuit breaker auto-suspended the agent after repeated guardrail denials. */
8007
+ auto_suspended?: boolean;
7832
8008
  /** @description Today's transaction count (UTC calendar day). Present when intents_api_enabled. */
7833
8009
  tx_count_today?: number;
7834
8010
  /** @description Today's overhead spend by chain in native units. */
@@ -9978,6 +10154,25 @@ export interface components {
9978
10154
  /** Format: date-time */
9979
10155
  created_at: string;
9980
10156
  };
10157
+ ApprovalStatusResponse: {
10158
+ /** @enum {string} */
10159
+ status: "pending" | "approved" | "rejected" | "expired";
10160
+ /** Format: date-time */
10161
+ expires_at?: string | null;
10162
+ };
10163
+ GuardrailViolation: {
10164
+ /** @enum {string} */
10165
+ error: "guardrail_violation";
10166
+ /** @enum {string} */
10167
+ reason_code: "binding_rpm_exceeded" | "agent_rpm_exceeded" | "graphql_mutation_blocked" | "graphql_depth_exceeded" | "graphql_parse_failed" | "graphql_introspection_blocked" | "response_too_large" | "request_too_large" | "method_not_allowed" | "header_not_allowed" | "dns_private_ip_blocked" | "agent_suspended" | "outside_time_window" | "secret_in_request" | "concurrency_exceeded" | "org_frozen";
10168
+ limit?: string | null;
10169
+ current?: string | null;
10170
+ attempted?: string | null;
10171
+ /** @default false */
10172
+ approval_available: boolean;
10173
+ retry_after_seconds?: number | null;
10174
+ detail?: string | null;
10175
+ };
9981
10176
  EmailOtpVerifyResponse: {
9982
10177
  /** @description JWT access token */
9983
10178
  token: string;
@@ -10170,9 +10365,7 @@ export interface components {
10170
10365
  config?: {
10171
10366
  [key: string]: unknown;
10172
10367
  };
10173
- guardrails?: {
10174
- [key: string]: unknown;
10175
- };
10368
+ guardrails?: components["schemas"]["BindingGuardrails"];
10176
10369
  /** @description Legacy: inline credential value. Use credential_source for new integrations. */
10177
10370
  credential?: {
10178
10371
  [key: string]: unknown;
@@ -10183,9 +10376,7 @@ export interface components {
10183
10376
  config?: {
10184
10377
  [key: string]: unknown;
10185
10378
  };
10186
- guardrails?: {
10187
- [key: string]: unknown;
10188
- };
10379
+ guardrails?: components["schemas"]["BindingGuardrails"];
10189
10380
  is_active?: boolean;
10190
10381
  /** @description Legacy: inline credential value. */
10191
10382
  credential?: {
@@ -10193,6 +10384,48 @@ export interface components {
10193
10384
  };
10194
10385
  credential_source?: components["schemas"]["CredentialSource"];
10195
10386
  };
10387
+ /** @description Per-binding execution guardrails enforced at execute time. */
10388
+ BindingGuardrails: {
10389
+ /** @description Host allowlist (trailing * wildcard supported). Empty = unrestricted at binding level. */
10390
+ allowed_hosts?: string[];
10391
+ /** @description Path allowlist for HTTP/GraphQL bindings. */
10392
+ allowed_paths?: string[];
10393
+ /** @description Per-binding RPM; strictest of binding and agent limits wins. Denied executions do not count. */
10394
+ max_requests_per_minute?: number;
10395
+ /** @description Upstream timeout cap for this binding. */
10396
+ max_duration_ms?: number;
10397
+ /**
10398
+ * @description Max serialized execute `params` size in bytes (default 256 KiB).
10399
+ * @default 262144
10400
+ */
10401
+ max_request_bytes: number;
10402
+ /** @description Max upstream response body bytes (default 1 MiB, hard cap 4 MiB). */
10403
+ max_response_bytes?: number;
10404
+ /** @description Agent-supplied headers permitted in execute params. Defaults to content-type, accept, user-agent, idempotency-key. */
10405
+ allowed_request_headers?: string[];
10406
+ /**
10407
+ * @description GraphQL only — when false, mutation operations return 403 guardrail_violation.
10408
+ * @default true
10409
+ */
10410
+ allow_mutations: boolean;
10411
+ /**
10412
+ * @description GraphQL only — when false, __schema/__type introspection is blocked.
10413
+ * @default false
10414
+ */
10415
+ allow_introspection: boolean;
10416
+ /**
10417
+ * @description GraphQL max selection depth.
10418
+ * @default 10
10419
+ */
10420
+ max_query_depth: number;
10421
+ /**
10422
+ * @description GraphQL max alias count.
10423
+ * @default 30
10424
+ */
10425
+ max_aliases: number;
10426
+ /** @description GraphQL operation kinds allowed (query, mutation, subscription). */
10427
+ allowed_operations?: string[];
10428
+ };
10196
10429
  BindingResponse: {
10197
10430
  /** Format: uuid */
10198
10431
  id: string;
@@ -10204,9 +10437,7 @@ export interface components {
10204
10437
  config?: {
10205
10438
  [key: string]: unknown;
10206
10439
  };
10207
- guardrails?: {
10208
- [key: string]: unknown;
10209
- };
10440
+ guardrails?: components["schemas"]["BindingGuardrails"];
10210
10441
  is_active: boolean;
10211
10442
  /** @description Whether a credential is stored for this binding. The value itself is never returned. */
10212
10443
  credential_set?: boolean;
@@ -10247,6 +10478,36 @@ export interface components {
10247
10478
  params: {
10248
10479
  [key: string]: unknown;
10249
10480
  };
10481
+ /**
10482
+ * @description When true, validate guardrails and approval policy without executing or persisting side effects.
10483
+ * @default false
10484
+ */
10485
+ dry_run: boolean;
10486
+ /**
10487
+ * Format: uuid
10488
+ * @description Internal — resume execution after human approval (server-injected).
10489
+ */
10490
+ resume_after_approval_id?: string;
10491
+ };
10492
+ ExecutionApprovalRequired: {
10493
+ /** @enum {string} */
10494
+ error: "approval_required";
10495
+ /** Format: uuid */
10496
+ approval_id: string;
10497
+ /** @enum {string} */
10498
+ status: "pending";
10499
+ /** Format: date-time */
10500
+ expires_at?: string | null;
10501
+ };
10502
+ TxAwaitingApproval: {
10503
+ /** @enum {string} */
10504
+ status: "awaiting_approval";
10505
+ /** Format: uuid */
10506
+ approval_id: string;
10507
+ /** Format: uuid */
10508
+ tx_id?: string | null;
10509
+ /** Format: date-time */
10510
+ expires_at?: string | null;
10250
10511
  };
10251
10512
  ExecuteResponse: {
10252
10513
  /** Format: uuid */
@@ -14233,6 +14494,15 @@ export interface operations {
14233
14494
  "application/json": components["schemas"]["TransactionResponse"];
14234
14495
  };
14235
14496
  };
14497
+ /** @description Transaction held for human approval (graduated tx_approval_policy) */
14498
+ 202: {
14499
+ headers: {
14500
+ [name: string]: unknown;
14501
+ };
14502
+ content: {
14503
+ "application/json": components["schemas"]["TxAwaitingApproval"];
14504
+ };
14505
+ };
14236
14506
  402: components["responses"]["PaymentRequired"];
14237
14507
  403: components["responses"]["Forbidden"];
14238
14508
  /** @description Idempotency-Key in use by another in-flight request; retry later. */
@@ -15031,8 +15301,43 @@ export interface operations {
15031
15301
  "application/json": components["schemas"]["ExecuteResponse"];
15032
15302
  };
15033
15303
  };
15304
+ /** @description Execution requires human approval before running */
15305
+ 202: {
15306
+ headers: {
15307
+ [name: string]: unknown;
15308
+ };
15309
+ content: {
15310
+ "application/json": components["schemas"]["ExecutionApprovalRequired"];
15311
+ };
15312
+ };
15034
15313
  400: components["responses"]["BadRequest"];
15035
- 403: components["responses"]["Forbidden"];
15314
+ /** @description Guardrail violation or permission denied */
15315
+ 403: {
15316
+ headers: {
15317
+ [name: string]: unknown;
15318
+ };
15319
+ content: {
15320
+ "application/json": components["schemas"]["GuardrailViolation"] | components["schemas"]["ProblemDetails"];
15321
+ };
15322
+ };
15323
+ /** @description Request params exceed binding max_request_bytes */
15324
+ 413: {
15325
+ headers: {
15326
+ [name: string]: unknown;
15327
+ };
15328
+ content: {
15329
+ "application/json": components["schemas"]["GuardrailViolation"];
15330
+ };
15331
+ };
15332
+ /** @description Binding or agent execution rate limit exceeded */
15333
+ 429: {
15334
+ headers: {
15335
+ [name: string]: unknown;
15336
+ };
15337
+ content: {
15338
+ "application/json": components["schemas"]["GuardrailViolation"];
15339
+ };
15340
+ };
15036
15341
  };
15037
15342
  };
15038
15343
  listExecutions: {
@@ -15396,6 +15701,70 @@ export interface operations {
15396
15701
  };
15397
15702
  };
15398
15703
  };
15704
+ freezeOrg: {
15705
+ parameters: {
15706
+ query?: never;
15707
+ header?: never;
15708
+ path?: never;
15709
+ cookie?: never;
15710
+ };
15711
+ requestBody?: never;
15712
+ responses: {
15713
+ /** @description Organization frozen */
15714
+ 200: {
15715
+ headers: {
15716
+ [name: string]: unknown;
15717
+ };
15718
+ content: {
15719
+ "application/json": {
15720
+ /** @enum {string} */
15721
+ status?: "frozen";
15722
+ /** Format: uuid */
15723
+ org_id?: string;
15724
+ };
15725
+ };
15726
+ };
15727
+ /** @description Forbidden */
15728
+ 403: {
15729
+ headers: {
15730
+ [name: string]: unknown;
15731
+ };
15732
+ content?: never;
15733
+ };
15734
+ };
15735
+ };
15736
+ unfreezeOrg: {
15737
+ parameters: {
15738
+ query?: never;
15739
+ header?: never;
15740
+ path?: never;
15741
+ cookie?: never;
15742
+ };
15743
+ requestBody?: never;
15744
+ responses: {
15745
+ /** @description Organization unfrozen */
15746
+ 200: {
15747
+ headers: {
15748
+ [name: string]: unknown;
15749
+ };
15750
+ content: {
15751
+ "application/json": {
15752
+ /** @enum {string} */
15753
+ status?: "unfrozen";
15754
+ /** Format: uuid */
15755
+ org_id?: string;
15756
+ };
15757
+ };
15758
+ };
15759
+ /** @description Forbidden */
15760
+ 403: {
15761
+ headers: {
15762
+ [name: string]: unknown;
15763
+ };
15764
+ content?: never;
15765
+ };
15766
+ };
15767
+ };
15399
15768
  getOrgBankrConfig: {
15400
15769
  parameters: {
15401
15770
  query?: never;
@@ -17601,6 +17970,30 @@ export interface operations {
17601
17970
  404: components["responses"]["NotFound"];
17602
17971
  };
17603
17972
  };
17973
+ getApprovalStatus: {
17974
+ parameters: {
17975
+ query?: never;
17976
+ header?: never;
17977
+ path: {
17978
+ approval_id: string;
17979
+ };
17980
+ cookie?: never;
17981
+ };
17982
+ requestBody?: never;
17983
+ responses: {
17984
+ /** @description Approval status */
17985
+ 200: {
17986
+ headers: {
17987
+ [name: string]: unknown;
17988
+ };
17989
+ content: {
17990
+ "application/json": components["schemas"]["ApprovalStatusResponse"];
17991
+ };
17992
+ };
17993
+ 403: components["responses"]["Forbidden"];
17994
+ 404: components["responses"]["NotFound"];
17995
+ };
17996
+ };
17604
17997
  decideApproval: {
17605
17998
  parameters: {
17606
17999
  query?: never;