@1claw/sdk 0.54.0 → 0.56.3

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/README.md CHANGED
@@ -306,6 +306,31 @@ console.log(signRes.data?.from); // derived sender address
306
306
 
307
307
  All agent guardrails (allowlists, value caps, daily limits) are enforced exactly as for submit. The transaction is recorded for audit and daily-limit tracking with `status: "sign_only"`.
308
308
 
309
+ ### Graduated HITL & v0.55 guardrails
310
+
311
+ Configure graduated human-in-the-loop thresholds on agents with Intents API enabled:
312
+
313
+ ```typescript
314
+ await client.agents.update(agentId, {
315
+ tx_approval_policy: {
316
+ require_above_native: { ethereum: "0.1", base: "0.05" },
317
+ require_for_new_recipients: true,
318
+ require_for_unlimited_approvals: true,
319
+ },
320
+ typed_data_policy: "approve", // EIP-712 → 202 awaiting_approval
321
+ simulation_failure_policy: "approve", // Tenderly revert → HITL
322
+ raw_signing_policy: "approve", // allow | deny | approve
323
+ tx_block_unlimited_approvals: true,
324
+ tx_max_value_usd: "1000",
325
+ tx_daily_limit_usd: "5000",
326
+ allow_erc4337: true,
327
+ allow_eip7702: false,
328
+ clear_auto_suspended: true, // owner/admin — clear circuit breaker
329
+ });
330
+ ```
331
+
332
+ Org emergency freeze (owner/admin): `POST /v1/org/freeze` and `POST /v1/org/unfreeze`.
333
+
309
334
  ### Non-EVM transactions (Bitcoin, Solana, XRP, Cardano, Tron)
310
335
 
311
336
  The same `submitTransaction` / `signTransaction` methods accept chain-specific fields. Values are in the chain's native unit (BTC, SOL, XRP, ADA, TRX):
@@ -936,6 +961,44 @@ await client.signingKeys.import(agentId, "ethereum", {
936
961
  }, { authConfirm: "your-password" });
937
962
  ```
938
963
 
964
+ ## v0.56 — Safe accounts, guardrail governance, HFA
965
+
966
+ Phase 5 Safe foundation and v0.56 guardrail governance APIs:
967
+
968
+ ```typescript
969
+ // Agent on-chain accounts (EOA + counterfactual Safe)
970
+ const { data: accounts } = await client.agents.listAccounts(agentId);
971
+ await client.agents.migrateToSafe(agentId, { chain: "ethereum", deprecate_eoa: true });
972
+ await client.agents.deprecateEoaAccount(agentId, "ethereum");
973
+ await client.agents.syncOrgSafeAllowances(); // owner/admin
974
+
975
+ // Public Safe module registry (Guard + Zodiac addresses per chain)
976
+ const registry = await client.agents.getSafeModuleRegistry("ethereum");
977
+
978
+ // Guardrail widening returns 202 — resubmit PATCH with approval_id after decide
979
+ await client.agents.update(agentId, {
980
+ tx_to_allowlist: ["0xNewRecipient..."],
981
+ approval_id: "uuid-from-202-response",
982
+ });
983
+
984
+ // Guardrail governance (owner/admin)
985
+ await client.org.getGuardrailShadowReport({ since: "2026-01-01T00:00:00Z" });
986
+ await client.org.listGuardrailRevisions();
987
+ await client.agents.replayGuardrails(agentId, {
988
+ days: 7,
989
+ draft_guardrails: { tx_max_value_eth: "0.1" },
990
+ });
991
+
992
+ // Human Factor Auth — treasury send/swap step-up policies
993
+ await client.auth.getHumanFactorAuth();
994
+ await client.auth.setHumanFactorAuth({ require_passkey: true, require_totp: false });
995
+ const embedded = await client.treasuryWallets.getAuthPolicy(); // wallet-react / embedded clients
996
+
997
+ // Passkey tx-assert for treasury send/swap (alternative to X-Auth-Confirm password)
998
+ const begin = await client.auth.beginPasskeyTxAssert({ tx_digest: "abc123...", action: "swap" });
999
+ // ... complete ceremony, then send with X-Passkey-Token header
1000
+ ```
1001
+
939
1002
  ## OpenAPI Types
940
1003
 
941
1004
  The SDK's request types are generated from the **OpenAPI 3.1** spec, published as [@1claw/openapi-spec](https://www.npmjs.com/package/@1claw/openapi-spec). Advanced users can access the raw generated types: