@1claw/sdk 0.4.0 → 0.7.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.
@@ -140,6 +140,25 @@ export interface paths {
140
140
  patch?: never;
141
141
  trace?: never;
142
142
  };
143
+ "/v1/auth/me": {
144
+ parameters: {
145
+ query?: never;
146
+ header?: never;
147
+ path?: never;
148
+ cookie?: never;
149
+ };
150
+ /** Get current user profile */
151
+ get: operations["getMe"];
152
+ put?: never;
153
+ post?: never;
154
+ /** Delete current user account */
155
+ delete: operations["deleteMe"];
156
+ options?: never;
157
+ head?: never;
158
+ /** Update user profile */
159
+ patch: operations["updateMe"];
160
+ trace?: never;
161
+ };
143
162
  "/v1/auth/mfa/status": {
144
163
  parameters: {
145
164
  query?: never;
@@ -518,6 +537,28 @@ export interface paths {
518
537
  patch?: never;
519
538
  trace?: never;
520
539
  };
540
+ "/v1/agents/enroll": {
541
+ parameters: {
542
+ query?: never;
543
+ header?: never;
544
+ path?: never;
545
+ cookie?: never;
546
+ };
547
+ get?: never;
548
+ put?: never;
549
+ /**
550
+ * Self-enroll an agent
551
+ * @description Public endpoint (no auth required). Creates an agent under the human's org
552
+ * and emails the credentials to the specified human email. The API key is NOT
553
+ * returned in the response. Anti-spam: IP rate limiting + per-email cooldown.
554
+ */
555
+ post: operations["enrollAgent"];
556
+ delete?: never;
557
+ options?: never;
558
+ head?: never;
559
+ patch?: never;
560
+ trace?: never;
561
+ };
521
562
  "/v1/agents": {
522
563
  parameters: {
523
564
  query?: never;
@@ -599,7 +640,12 @@ export interface paths {
599
640
  /** List agent transactions */
600
641
  get: operations["listTransactions"];
601
642
  put?: never;
602
- /** Submit a transaction for signing */
643
+ /**
644
+ * Submit a transaction for signing
645
+ * @description Replay protection: send an optional **Idempotency-Key** header (e.g. UUID or opaque string).
646
+ * Duplicate requests with the same key within 24 hours return the cached transaction response
647
+ * (no second sign/broadcast). Omit the header for non-idempotent submissions.
648
+ */
603
649
  post: operations["submitTransaction"];
604
650
  delete?: never;
605
651
  options?: never;
@@ -1210,6 +1256,29 @@ export interface paths {
1210
1256
  patch?: never;
1211
1257
  trace?: never;
1212
1258
  };
1259
+ "/v1/admin/orgs/{org_id}/billing-tier": {
1260
+ parameters: {
1261
+ query?: never;
1262
+ header?: never;
1263
+ path?: never;
1264
+ cookie?: never;
1265
+ };
1266
+ get?: never;
1267
+ /**
1268
+ * Set org billing tier (without Stripe)
1269
+ * @description Manually set an organization's billing tier to free, pro, or business.
1270
+ * For testing and manual upgrades — does not create a Stripe subscription.
1271
+ * Setting to "pro" or "business" sets period_end to +1 year.
1272
+ * Setting to "free" clears subscription data.
1273
+ */
1274
+ put: operations["adminSetBillingTier"];
1275
+ post?: never;
1276
+ delete?: never;
1277
+ options?: never;
1278
+ head?: never;
1279
+ patch?: never;
1280
+ trace?: never;
1281
+ };
1213
1282
  "/v1/health": {
1214
1283
  parameters: {
1215
1284
  query?: never;
@@ -1351,6 +1420,23 @@ export interface components {
1351
1420
  DeviceApproveRequest: {
1352
1421
  user_code: string;
1353
1422
  };
1423
+ UserProfileResponse: {
1424
+ /** Format: uuid */
1425
+ id?: string;
1426
+ email?: string;
1427
+ display_name?: string;
1428
+ auth_method?: string;
1429
+ role?: string;
1430
+ email_verified?: boolean;
1431
+ marketing_emails?: boolean;
1432
+ totp_enabled?: boolean;
1433
+ /** Format: date-time */
1434
+ created_at?: string;
1435
+ };
1436
+ UpdateProfileRequest: {
1437
+ display_name?: string;
1438
+ marketing_emails?: boolean;
1439
+ };
1354
1440
  CreateApiKeyRequest: {
1355
1441
  name: string;
1356
1442
  scopes?: string[];
@@ -1521,15 +1607,40 @@ export interface components {
1521
1607
  PolicyListResponse: {
1522
1608
  policies?: components["schemas"]["PolicyResponse"][];
1523
1609
  };
1610
+ EnrollAgentRequest: {
1611
+ /** @description Display name for the new agent */
1612
+ name: string;
1613
+ /**
1614
+ * Format: email
1615
+ * @description Email of the human who will receive the agent credentials
1616
+ */
1617
+ human_email: string;
1618
+ /** @description Optional agent description */
1619
+ description?: string;
1620
+ };
1621
+ EnrollAgentResponse: {
1622
+ /**
1623
+ * Format: uuid
1624
+ * @description UUID of the created agent (nil UUID when email not found — uniform response)
1625
+ */
1626
+ agent_id?: string;
1627
+ /** @description Status message (always generic to prevent email enumeration) */
1628
+ message?: string;
1629
+ };
1524
1630
  CreateAgentRequest: {
1525
1631
  name: string;
1526
1632
  description?: string;
1527
- auth_method?: string;
1633
+ /**
1634
+ * @description Authentication method. api_key generates a one-time key; mtls requires client_cert_fingerprint; oidc_client_credentials requires oidc_issuer and oidc_client_id.
1635
+ * @default api_key
1636
+ * @enum {string}
1637
+ */
1638
+ auth_method: "api_key" | "mtls" | "oidc_client_credentials";
1528
1639
  scopes?: string[];
1529
1640
  /** Format: date-time */
1530
1641
  expires_at?: string;
1531
1642
  /** @default false */
1532
- crypto_proxy_enabled: boolean;
1643
+ intents_api_enabled: boolean;
1533
1644
  tx_to_allowlist?: string[];
1534
1645
  tx_max_value_eth?: string;
1535
1646
  tx_daily_limit_eth?: string;
@@ -1538,6 +1649,12 @@ export interface components {
1538
1649
  token_ttl_seconds?: number | null;
1539
1650
  /** @description Restrict agent to specific vault UUIDs (empty = all vaults in org) */
1540
1651
  vault_ids?: string[];
1652
+ /** @description SHA-256 fingerprint of the client certificate (required for mTLS auth) */
1653
+ client_cert_fingerprint?: string;
1654
+ /** @description OIDC issuer URL (required for oidc_client_credentials auth) */
1655
+ oidc_issuer?: string;
1656
+ /** @description OIDC client ID (required for oidc_client_credentials auth) */
1657
+ oidc_client_id?: string;
1541
1658
  };
1542
1659
  UpdateAgentRequest: {
1543
1660
  name?: string;
@@ -1545,7 +1662,7 @@ export interface components {
1545
1662
  is_active?: boolean;
1546
1663
  /** Format: date-time */
1547
1664
  expires_at?: string;
1548
- crypto_proxy_enabled?: boolean;
1665
+ intents_api_enabled?: boolean;
1549
1666
  tx_to_allowlist?: string[];
1550
1667
  tx_max_value_eth?: string;
1551
1668
  tx_daily_limit_eth?: string;
@@ -1558,16 +1675,27 @@ export interface components {
1558
1675
  id: string;
1559
1676
  name: string;
1560
1677
  description?: string;
1561
- auth_method: string;
1678
+ /** @enum {string} */
1679
+ auth_method: "api_key" | "mtls" | "oidc_client_credentials";
1562
1680
  scopes?: string[];
1563
1681
  is_active: boolean;
1564
- crypto_proxy_enabled: boolean;
1682
+ intents_api_enabled: boolean;
1565
1683
  tx_to_allowlist?: string[];
1566
1684
  tx_max_value_eth?: string;
1567
1685
  tx_daily_limit_eth?: string;
1568
1686
  tx_allowed_chains?: string[];
1569
1687
  token_ttl_seconds?: number | null;
1570
1688
  vault_ids?: string[];
1689
+ /** @description SHA-256 fingerprint of the client certificate (mTLS agents) */
1690
+ client_cert_fingerprint?: string;
1691
+ /** @description OIDC issuer URL (oidc_client_credentials agents) */
1692
+ oidc_issuer?: string;
1693
+ /** @description OIDC client ID (oidc_client_credentials agents) */
1694
+ oidc_client_id?: string;
1695
+ /** @description Ed25519 SSH public key (base64-encoded, auto-generated at creation) */
1696
+ ssh_public_key?: string;
1697
+ /** @description P-256 ECDH public key (base64 SEC1 uncompressed point, auto-generated at creation) */
1698
+ ecdh_public_key?: string;
1571
1699
  /** Format: date-time */
1572
1700
  created_at: string;
1573
1701
  /** Format: date-time */
@@ -1584,7 +1712,7 @@ export interface components {
1584
1712
  org_id?: string;
1585
1713
  scopes?: string[];
1586
1714
  is_active?: boolean;
1587
- crypto_proxy_enabled?: boolean;
1715
+ intents_api_enabled?: boolean;
1588
1716
  /** Format: uuid */
1589
1717
  created_by?: string;
1590
1718
  /** Format: date-time */
@@ -1593,11 +1721,15 @@ export interface components {
1593
1721
  expires_at?: string;
1594
1722
  /** Format: date-time */
1595
1723
  last_active_at?: string;
1724
+ /** @description Ed25519 SSH public key (base64-encoded) */
1725
+ ssh_public_key?: string;
1726
+ /** @description P-256 ECDH public key (base64 SEC1 uncompressed point) */
1727
+ ecdh_public_key?: string;
1596
1728
  };
1597
1729
  AgentCreatedResponse: {
1598
1730
  agent: components["schemas"]["AgentResponse"];
1599
- /** @description One-time API key (store securely) */
1600
- api_key: string;
1731
+ /** @description One-time API key (only present for api_key auth method) */
1732
+ api_key?: string;
1601
1733
  };
1602
1734
  AgentListResponse: {
1603
1735
  agents?: components["schemas"]["AgentResponse"][];
@@ -1645,7 +1777,8 @@ export interface components {
1645
1777
  value_wei?: string;
1646
1778
  /** @enum {string} */
1647
1779
  status?: "pending" | "signed" | "broadcast" | "failed" | "simulation_failed";
1648
- signed_tx?: string;
1780
+ /** @description Raw signed transaction hex. Omitted (null) by default to reduce exfiltration risk. Pass `include_signed_tx=true` query param on GET endpoints to include it. Always returned on the initial POST submission response. */
1781
+ signed_tx?: string | null;
1649
1782
  tx_hash?: string;
1650
1783
  error_message?: string;
1651
1784
  /** Format: date-time */
@@ -1873,7 +2006,7 @@ export interface components {
1873
2006
  agents?: components["schemas"]["UsageMeter"];
1874
2007
  vaults?: components["schemas"]["UsageMeter"];
1875
2008
  team_members?: components["schemas"]["UsageMeter"];
1876
- proxy_transactions?: components["schemas"]["UsageMeter"];
2009
+ intent_transactions?: components["schemas"]["UsageMeter"];
1877
2010
  shares?: components["schemas"]["UsageMeter"];
1878
2011
  };
1879
2012
  };
@@ -1982,6 +2115,7 @@ export interface components {
1982
2115
  /** Format: uuid */
1983
2116
  org_id?: string;
1984
2117
  org_name?: string;
2118
+ billing_tier?: string;
1985
2119
  /** Format: date-time */
1986
2120
  created_at?: string;
1987
2121
  free_tier_override?: number;
@@ -2000,6 +2134,10 @@ export interface components {
2000
2134
  free_tier_override?: number;
2001
2135
  is_sponsored?: boolean;
2002
2136
  };
2137
+ SetBillingTierRequest: {
2138
+ /** @enum {string} */
2139
+ tier: "free" | "pro" | "business";
2140
+ };
2003
2141
  PaymentRequirement: {
2004
2142
  x402Version?: number;
2005
2143
  accepts?: {
@@ -2070,6 +2208,8 @@ export interface components {
2070
2208
  SecretPath: string;
2071
2209
  AgentId: string;
2072
2210
  PolicyId: string;
2211
+ /** @description Set to `true` to include the raw signed transaction hex in the response. Omitted by default to reduce key exfiltration risk. */
2212
+ IncludeSignedTx: boolean;
2073
2213
  };
2074
2214
  requestBodies: never;
2075
2215
  headers: never;
@@ -2298,6 +2438,77 @@ export interface operations {
2298
2438
  400: components["responses"]["BadRequest"];
2299
2439
  };
2300
2440
  };
2441
+ getMe: {
2442
+ parameters: {
2443
+ query?: never;
2444
+ header?: never;
2445
+ path?: never;
2446
+ cookie?: never;
2447
+ };
2448
+ requestBody?: never;
2449
+ responses: {
2450
+ /** @description User profile */
2451
+ 200: {
2452
+ headers: {
2453
+ [name: string]: unknown;
2454
+ };
2455
+ content: {
2456
+ "application/json": components["schemas"]["UserProfileResponse"];
2457
+ };
2458
+ };
2459
+ };
2460
+ };
2461
+ deleteMe: {
2462
+ parameters: {
2463
+ query?: never;
2464
+ header?: never;
2465
+ path?: never;
2466
+ cookie?: never;
2467
+ };
2468
+ requestBody: {
2469
+ content: {
2470
+ "application/json": {
2471
+ /** @description Must be "DELETE MY ACCOUNT" */
2472
+ confirmation: string;
2473
+ };
2474
+ };
2475
+ };
2476
+ responses: {
2477
+ /** @description Account deleted */
2478
+ 204: {
2479
+ headers: {
2480
+ [name: string]: unknown;
2481
+ };
2482
+ content?: never;
2483
+ };
2484
+ 400: components["responses"]["BadRequest"];
2485
+ };
2486
+ };
2487
+ updateMe: {
2488
+ parameters: {
2489
+ query?: never;
2490
+ header?: never;
2491
+ path?: never;
2492
+ cookie?: never;
2493
+ };
2494
+ requestBody: {
2495
+ content: {
2496
+ "application/json": components["schemas"]["UpdateProfileRequest"];
2497
+ };
2498
+ };
2499
+ responses: {
2500
+ /** @description Profile updated */
2501
+ 200: {
2502
+ headers: {
2503
+ [name: string]: unknown;
2504
+ };
2505
+ content: {
2506
+ "application/json": components["schemas"]["UserProfileResponse"];
2507
+ };
2508
+ };
2509
+ 400: components["responses"]["BadRequest"];
2510
+ };
2511
+ };
2301
2512
  mfaStatus: {
2302
2513
  parameters: {
2303
2514
  query?: never;
@@ -2989,6 +3200,37 @@ export interface operations {
2989
3200
  404: components["responses"]["NotFound"];
2990
3201
  };
2991
3202
  };
3203
+ enrollAgent: {
3204
+ parameters: {
3205
+ query?: never;
3206
+ header?: never;
3207
+ path?: never;
3208
+ cookie?: never;
3209
+ };
3210
+ requestBody: {
3211
+ content: {
3212
+ "application/json": components["schemas"]["EnrollAgentRequest"];
3213
+ };
3214
+ };
3215
+ responses: {
3216
+ /** @description Enrollment processed (uniform response to prevent email enumeration) */
3217
+ 201: {
3218
+ headers: {
3219
+ [name: string]: unknown;
3220
+ };
3221
+ content: {
3222
+ "application/json": components["schemas"]["EnrollAgentResponse"];
3223
+ };
3224
+ };
3225
+ /** @description Rate limit exceeded */
3226
+ 429: {
3227
+ headers: {
3228
+ [name: string]: unknown;
3229
+ };
3230
+ content?: never;
3231
+ };
3232
+ };
3233
+ };
2992
3234
  listAgents: {
2993
3235
  parameters: {
2994
3236
  query?: never;
@@ -3151,7 +3393,10 @@ export interface operations {
3151
3393
  };
3152
3394
  listTransactions: {
3153
3395
  parameters: {
3154
- query?: never;
3396
+ query?: {
3397
+ /** @description Set to `true` to include the raw signed transaction hex in the response. Omitted by default to reduce key exfiltration risk. */
3398
+ include_signed_tx?: components["parameters"]["IncludeSignedTx"];
3399
+ };
3155
3400
  header?: never;
3156
3401
  path: {
3157
3402
  agent_id: components["parameters"]["AgentId"];
@@ -3174,7 +3419,10 @@ export interface operations {
3174
3419
  submitTransaction: {
3175
3420
  parameters: {
3176
3421
  query?: never;
3177
- header?: never;
3422
+ header?: {
3423
+ /** @description Optional key for replay protection; duplicate requests return cached response. */
3424
+ "Idempotency-Key"?: string;
3425
+ };
3178
3426
  path: {
3179
3427
  agent_id: components["parameters"]["AgentId"];
3180
3428
  };
@@ -3186,6 +3434,15 @@ export interface operations {
3186
3434
  };
3187
3435
  };
3188
3436
  responses: {
3437
+ /** @description Transaction previously created with same Idempotency-Key (replay-safe response) */
3438
+ 200: {
3439
+ headers: {
3440
+ [name: string]: unknown;
3441
+ };
3442
+ content: {
3443
+ "application/json": components["schemas"]["TransactionResponse"];
3444
+ };
3445
+ };
3189
3446
  /** @description Transaction signed (and optionally broadcast) */
3190
3447
  201: {
3191
3448
  headers: {
@@ -3196,6 +3453,15 @@ export interface operations {
3196
3453
  };
3197
3454
  };
3198
3455
  403: components["responses"]["Forbidden"];
3456
+ /** @description Idempotency-Key in use by another in-flight request; retry later. */
3457
+ 409: {
3458
+ headers: {
3459
+ [name: string]: unknown;
3460
+ };
3461
+ content: {
3462
+ "application/json": components["schemas"]["ProblemDetails"];
3463
+ };
3464
+ };
3199
3465
  /** @description Simulation reverted (when simulate_first is true) */
3200
3466
  422: {
3201
3467
  headers: {
@@ -3209,7 +3475,10 @@ export interface operations {
3209
3475
  };
3210
3476
  getTransaction: {
3211
3477
  parameters: {
3212
- query?: never;
3478
+ query?: {
3479
+ /** @description Set to `true` to include the raw signed transaction hex in the response. Omitted by default to reduce key exfiltration risk. */
3480
+ include_signed_tx?: components["parameters"]["IncludeSignedTx"];
3481
+ };
3213
3482
  header?: never;
3214
3483
  path: {
3215
3484
  agent_id: components["parameters"]["AgentId"];
@@ -4166,6 +4435,32 @@ export interface operations {
4166
4435
  };
4167
4436
  };
4168
4437
  };
4438
+ adminSetBillingTier: {
4439
+ parameters: {
4440
+ query?: never;
4441
+ header?: never;
4442
+ path: {
4443
+ org_id: string;
4444
+ };
4445
+ cookie?: never;
4446
+ };
4447
+ requestBody: {
4448
+ content: {
4449
+ "application/json": components["schemas"]["SetBillingTierRequest"];
4450
+ };
4451
+ };
4452
+ responses: {
4453
+ /** @description Billing tier updated */
4454
+ 200: {
4455
+ headers: {
4456
+ [name: string]: unknown;
4457
+ };
4458
+ content?: never;
4459
+ };
4460
+ 400: components["responses"]["BadRequest"];
4461
+ 403: components["responses"]["Forbidden"];
4462
+ };
4463
+ };
4169
4464
  healthCheck: {
4170
4465
  parameters: {
4171
4466
  query?: never;