@1claw/sdk 0.61.12 → 0.61.13

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
@@ -636,6 +636,17 @@ const client = createClient({
636
636
  // Tokens refresh transparently — just make API calls
637
637
  ```
638
638
 
639
+ The exchange response also says what the agent is entitled to (vault ≥ 0.61.17), so a tool host can shape its surface without a second call:
640
+
641
+ ```typescript
642
+ const res = await client.auth.agentToken({ api_key: "ocv_..." });
643
+ res.data?.entitlements;
644
+ // { intents_api: true, execution_intents: false, execution_require_tee: false, intents_require_tee: false,
645
+ // cards: false, memory: true, shroud: false, discoverable: false, treasury_signer: false, has_delegations: false }
646
+ ```
647
+
648
+ Changing a claim-bearing agent field (`scopes`, `vault_ids`, `is_active`, `intents_api_enabled`, `shroud_enabled`, `execution_intents_enabled`, `*_require_tee`, `environment`) via `client.agents.update()` revokes the agent's outstanding JWTs; the SDK's next request re-exchanges automatically.
649
+
639
650
  ## DPoP (Proof-of-Possession)
640
651
 
641
652
  Enable [DPoP (RFC 9449)](https://datatracker.ietf.org/doc/html/rfc9449) to bind tokens to the client's ephemeral keypair. When enabled, the SDK generates a P-256 ECDSA keypair at startup and attaches a `DPoP` proof JWT to every request — stolen tokens are unusable without the matching private key.
@@ -510,6 +510,28 @@ export interface paths {
510
510
  patch?: never;
511
511
  trace?: never;
512
512
  };
513
+ "/v1/auth/feature-quota/consume": {
514
+ parameters: {
515
+ query?: never;
516
+ header?: never;
517
+ path?: never;
518
+ cookie?: never;
519
+ };
520
+ get?: never;
521
+ put?: never;
522
+ /**
523
+ * Count one call against a per-user feature quota
524
+ * @description Atomic fixed-window counter for metered dashboard features (currently
525
+ * `voice_brief`, 30 calls per hour). The limit and window are defined
526
+ * server-side; the caller only names the feature. Users only.
527
+ */
528
+ post: operations["consumeFeatureQuota"];
529
+ delete?: never;
530
+ options?: never;
531
+ head?: never;
532
+ patch?: never;
533
+ trace?: never;
534
+ };
513
535
  "/v1/auth/me": {
514
536
  parameters: {
515
537
  query?: never;
@@ -2197,6 +2219,66 @@ export interface paths {
2197
2219
  patch?: never;
2198
2220
  trace?: never;
2199
2221
  };
2222
+ "/v1/admin/agents/{agent_id}/reports/dismiss": {
2223
+ parameters: {
2224
+ query?: never;
2225
+ header?: never;
2226
+ path?: never;
2227
+ cookie?: never;
2228
+ };
2229
+ get?: never;
2230
+ put?: never;
2231
+ /**
2232
+ * Dismiss every open report on a directory listing
2233
+ * @description Platform admins only. Clears the listing's report flag and recounts. The review queue is a platform function — an org dismissing reports against its own agent is the abuse the queue exists to catch.
2234
+ */
2235
+ post: operations["adminDismissAgentReports"];
2236
+ delete?: never;
2237
+ options?: never;
2238
+ head?: never;
2239
+ patch?: never;
2240
+ trace?: never;
2241
+ };
2242
+ "/v1/admin/agents/{agent_id}/verification-tier": {
2243
+ parameters: {
2244
+ query?: never;
2245
+ header?: never;
2246
+ path?: never;
2247
+ cookie?: never;
2248
+ };
2249
+ get?: never;
2250
+ /**
2251
+ * Set a directory listing's verification tier
2252
+ * @description Platform admins only. Unknown tiers are refused rather than demoted to `unverified`.
2253
+ */
2254
+ put: operations["adminSetAgentVerificationTier"];
2255
+ post?: never;
2256
+ delete?: never;
2257
+ options?: never;
2258
+ head?: never;
2259
+ patch?: never;
2260
+ trace?: never;
2261
+ };
2262
+ "/v1/admin/kms/relevel": {
2263
+ parameters: {
2264
+ query?: never;
2265
+ header?: never;
2266
+ path?: never;
2267
+ cookie?: never;
2268
+ };
2269
+ get?: never;
2270
+ put?: never;
2271
+ /**
2272
+ * Move orgs onto the KEK protection level their tier and payment call for
2273
+ * @description Platform admins only. Examines up to `limit` orgs whose stored KEK level disagrees with the target (Pro earns HSM only with an active subscription; Team, Business and Enterprise keep HSM; the platform org is always software) and starts a migration for each: a new key at the right level, every secret and every org-scoped row re-wrapped, the old key released from the keep set 30 days after completion. The nightly consolidation job runs the same pass, 25 orgs at a time.
2274
+ */
2275
+ post: operations["adminKmsRelevel"];
2276
+ delete?: never;
2277
+ options?: never;
2278
+ head?: never;
2279
+ patch?: never;
2280
+ trace?: never;
2281
+ };
2200
2282
  "/v1/admin/chains": {
2201
2283
  parameters: {
2202
2284
  query?: never;
@@ -5677,7 +5759,16 @@ export interface paths {
5677
5759
  get: operations["getConnectionRuntime"];
5678
5760
  put?: never;
5679
5761
  post?: never;
5680
- delete?: never;
5762
+ /**
5763
+ * Delete a connection runtime (plt_ scoped)
5764
+ * @description Removes a runtime the app provisioned on this connection. A running
5765
+ * runtime is stopped at the provider first and any runtime add-on
5766
+ * subscription is cancelled before the record is removed. Scoped like
5767
+ * the GET: the connection must belong to the app and list the runtime.
5768
+ * This is the cleanup path for a mis-provisioned runtime;
5769
+ * `DELETE /v1/runtimes/{id}` does not accept a plt_ key.
5770
+ */
5771
+ delete: operations["deleteConnectionRuntime"];
5681
5772
  options?: never;
5682
5773
  head?: never;
5683
5774
  patch?: never;
@@ -6557,6 +6648,26 @@ export interface paths {
6557
6648
  patch?: never;
6558
6649
  trace?: never;
6559
6650
  };
6651
+ "/v1/agents/{agent_id}/pay/grants/prepare": {
6652
+ parameters: {
6653
+ query?: never;
6654
+ header?: never;
6655
+ path?: never;
6656
+ cookie?: never;
6657
+ };
6658
+ get?: never;
6659
+ put?: never;
6660
+ /**
6661
+ * Prepare a spending grant (step one of two)
6662
+ * @description Fixes the grant terms and a server-side nonce and returns the `grant_digest` the person must assert over with a passkey (`action=x402_grant`). Then call `POST .../pay/grants` with the same terms, the digest, and the passkey token. Preparations are single-use, bound to the caller and agent, and expire after ten minutes. The nonce never leaves the server, so the digest cannot be recomputed for different terms. Human callers only; terms are validated against the agent's maximum cap and window here as well.
6663
+ */
6664
+ post: operations["preparePayGrant"];
6665
+ delete?: never;
6666
+ options?: never;
6667
+ head?: never;
6668
+ patch?: never;
6669
+ trace?: never;
6670
+ };
6560
6671
  "/v1/agents/{agent_id}/pay/grants": {
6561
6672
  parameters: {
6562
6673
  query?: never;
@@ -11281,6 +11392,27 @@ export interface components {
11281
11392
  mfa_token?: string;
11282
11393
  /** @enum {string} */
11283
11394
  mfa_method?: "totp" | "passkey";
11395
+ /**
11396
+ * Format: uuid
11397
+ * @description Agent token exchange only — the resolved agent id.
11398
+ */
11399
+ agent_id?: string;
11400
+ /** @description Agent token exchange only — vaults the agent is bound to. */
11401
+ vault_ids?: string[];
11402
+ entitlements?: components["schemas"]["AgentEntitlements"];
11403
+ };
11404
+ /** @description Returned on agent token exchange. The flags a client needs to decide which tools to offer, as of the moment the token was minted. treasury_signer and has_delegations are derived from the agent's treasury signer rows and active delegations and are not present on the agent profile. */
11405
+ AgentEntitlements: {
11406
+ intents_api: boolean;
11407
+ execution_intents: boolean;
11408
+ execution_require_tee: boolean;
11409
+ intents_require_tee: boolean;
11410
+ cards: boolean;
11411
+ memory: boolean;
11412
+ shroud: boolean;
11413
+ discoverable: boolean;
11414
+ treasury_signer: boolean;
11415
+ has_delegations: boolean;
11284
11416
  };
11285
11417
  /** @description Exactly one credential, decided by the agent's auth_method: api_key for api_key agents, oidc_token for oidc_client_credentials agents. mTLS agents send neither and present a client certificate through the TLS terminator. */
11286
11418
  AgentTokenRequest: {
@@ -13512,6 +13644,15 @@ export interface components {
13512
13644
  };
13513
13645
  LlmTokenBillingStatus: {
13514
13646
  enabled: boolean;
13647
+ /**
13648
+ * @description Usage accrues on the Stripe subscription and is invoiced at the end of the
13649
+ * billing period. `credit_balance` is Stripe's prepaid credit-grant balance,
13650
+ * which is 0 unless a credit grant was issued; a 0 there does not block inference.
13651
+ * @enum {string}
13652
+ */
13653
+ billing_model: "postpaid_metered";
13654
+ /** @description Enabled and the subscription is not canceled/unpaid/expired. */
13655
+ inference_allowed: boolean;
13515
13656
  /** @enum {string} */
13516
13657
  subscription_status?: "active" | "inactive";
13517
13658
  credit_balance?: components["schemas"]["LlmCreditBalance"];
@@ -15053,6 +15194,9 @@ export interface components {
15053
15194
  connection_id: string;
15054
15195
  /** Format: uuid */
15055
15196
  user_id: string;
15197
+ /** @description The connected user's email, as returned by the upsert. Use it to recognise a returning user and begin a passkey ceremony from the connection alone. */
15198
+ email?: string;
15199
+ display_name?: string;
15056
15200
  status: string;
15057
15201
  entitlement_status: string;
15058
15202
  /**
@@ -18061,6 +18205,41 @@ export interface operations {
18061
18205
  403: components["responses"]["Forbidden"];
18062
18206
  };
18063
18207
  };
18208
+ consumeFeatureQuota: {
18209
+ parameters: {
18210
+ query?: never;
18211
+ header?: never;
18212
+ path?: never;
18213
+ cookie?: never;
18214
+ };
18215
+ requestBody: {
18216
+ content: {
18217
+ "application/json": {
18218
+ /** @enum {string} */
18219
+ feature: "voice_brief";
18220
+ };
18221
+ };
18222
+ };
18223
+ responses: {
18224
+ /** @description Whether this call is within the window's limit */
18225
+ 200: {
18226
+ headers: {
18227
+ [name: string]: unknown;
18228
+ };
18229
+ content: {
18230
+ "application/json": {
18231
+ allowed: boolean;
18232
+ limit: number;
18233
+ remaining: number;
18234
+ /** Format: date-time */
18235
+ reset_at: string;
18236
+ };
18237
+ };
18238
+ };
18239
+ 400: components["responses"]["BadRequest"];
18240
+ 403: components["responses"]["Forbidden"];
18241
+ };
18242
+ };
18064
18243
  getMe: {
18065
18244
  parameters: {
18066
18245
  query?: never;
@@ -21171,6 +21350,135 @@ export interface operations {
21171
21350
  404: components["responses"]["NotFound"];
21172
21351
  };
21173
21352
  };
21353
+ adminDismissAgentReports: {
21354
+ parameters: {
21355
+ query?: never;
21356
+ header?: never;
21357
+ path: {
21358
+ agent_id: string;
21359
+ };
21360
+ cookie?: never;
21361
+ };
21362
+ requestBody?: never;
21363
+ responses: {
21364
+ /** @description Reports dismissed */
21365
+ 200: {
21366
+ headers: {
21367
+ [name: string]: unknown;
21368
+ };
21369
+ content: {
21370
+ "application/json": {
21371
+ /** Format: uuid */
21372
+ agent_id?: string;
21373
+ dismissed?: number;
21374
+ };
21375
+ };
21376
+ };
21377
+ /** @description Not a platform admin */
21378
+ 403: {
21379
+ headers: {
21380
+ [name: string]: unknown;
21381
+ };
21382
+ content?: never;
21383
+ };
21384
+ /** @description Agent not found */
21385
+ 404: {
21386
+ headers: {
21387
+ [name: string]: unknown;
21388
+ };
21389
+ content?: never;
21390
+ };
21391
+ };
21392
+ };
21393
+ adminSetAgentVerificationTier: {
21394
+ parameters: {
21395
+ query?: never;
21396
+ header?: never;
21397
+ path: {
21398
+ agent_id: string;
21399
+ };
21400
+ cookie?: never;
21401
+ };
21402
+ requestBody: {
21403
+ content: {
21404
+ "application/json": {
21405
+ /** @enum {string} */
21406
+ tier: "unverified" | "platform_reviewed" | "identity_verified" | "enterprise";
21407
+ /** @description Internal review notes */
21408
+ notes?: string | null;
21409
+ };
21410
+ };
21411
+ };
21412
+ responses: {
21413
+ /** @description Tier set */
21414
+ 200: {
21415
+ headers: {
21416
+ [name: string]: unknown;
21417
+ };
21418
+ content: {
21419
+ "application/json": {
21420
+ /** Format: uuid */
21421
+ agent_id?: string;
21422
+ tier?: string;
21423
+ };
21424
+ };
21425
+ };
21426
+ /** @description Unknown tier */
21427
+ 400: {
21428
+ headers: {
21429
+ [name: string]: unknown;
21430
+ };
21431
+ content?: never;
21432
+ };
21433
+ /** @description Not a platform admin */
21434
+ 403: {
21435
+ headers: {
21436
+ [name: string]: unknown;
21437
+ };
21438
+ content?: never;
21439
+ };
21440
+ /** @description Agent not found */
21441
+ 404: {
21442
+ headers: {
21443
+ [name: string]: unknown;
21444
+ };
21445
+ content?: never;
21446
+ };
21447
+ };
21448
+ };
21449
+ adminKmsRelevel: {
21450
+ parameters: {
21451
+ query?: {
21452
+ limit?: number;
21453
+ };
21454
+ header?: never;
21455
+ path?: never;
21456
+ cookie?: never;
21457
+ };
21458
+ requestBody?: never;
21459
+ responses: {
21460
+ /** @description Orgs examined and migrations started */
21461
+ 200: {
21462
+ headers: {
21463
+ [name: string]: unknown;
21464
+ };
21465
+ content: {
21466
+ "application/json": {
21467
+ examined?: number;
21468
+ migrations_started?: number;
21469
+ limit?: number;
21470
+ };
21471
+ };
21472
+ };
21473
+ /** @description Not a platform admin */
21474
+ 403: {
21475
+ headers: {
21476
+ [name: string]: unknown;
21477
+ };
21478
+ content?: never;
21479
+ };
21480
+ };
21481
+ };
21174
21482
  adminListChains: {
21175
21483
  parameters: {
21176
21484
  query?: never;
@@ -24790,6 +25098,28 @@ export interface operations {
24790
25098
  404: components["responses"]["NotFound"];
24791
25099
  };
24792
25100
  };
25101
+ deleteConnectionRuntime: {
25102
+ parameters: {
25103
+ query?: never;
25104
+ header?: never;
25105
+ path: {
25106
+ connectionId: string;
25107
+ runtimeId: string;
25108
+ };
25109
+ cookie?: never;
25110
+ };
25111
+ requestBody?: never;
25112
+ responses: {
25113
+ /** @description Runtime deleted */
25114
+ 204: {
25115
+ headers: {
25116
+ [name: string]: unknown;
25117
+ };
25118
+ content?: never;
25119
+ };
25120
+ 404: components["responses"]["NotFound"];
25121
+ };
25122
+ };
24793
25123
  connectionPasskeyEnrollBegin: {
24794
25124
  parameters: {
24795
25125
  query?: never;
@@ -26201,6 +26531,55 @@ export interface operations {
26201
26531
  };
26202
26532
  };
26203
26533
  };
26534
+ preparePayGrant: {
26535
+ parameters: {
26536
+ query?: never;
26537
+ header?: never;
26538
+ path: {
26539
+ agent_id: components["parameters"]["AgentId"];
26540
+ };
26541
+ cookie?: never;
26542
+ };
26543
+ requestBody: {
26544
+ content: {
26545
+ "application/json": {
26546
+ cap_usd: string;
26547
+ ttl_secs: number;
26548
+ allowed_paytos?: string[] | null;
26549
+ };
26550
+ };
26551
+ };
26552
+ responses: {
26553
+ /** @description The digest to assert over */
26554
+ 200: {
26555
+ headers: {
26556
+ [name: string]: unknown;
26557
+ };
26558
+ content: {
26559
+ "application/json": {
26560
+ grant_digest: string;
26561
+ /** @enum {string} */
26562
+ action: "x402_grant";
26563
+ expires_in_secs: number;
26564
+ };
26565
+ };
26566
+ };
26567
+ /** @description Invalid terms */
26568
+ 400: {
26569
+ headers: {
26570
+ [name: string]: unknown;
26571
+ };
26572
+ content?: never;
26573
+ };
26574
+ /** @description Not a human caller */
26575
+ 403: {
26576
+ headers: {
26577
+ [name: string]: unknown;
26578
+ };
26579
+ content?: never;
26580
+ };
26581
+ };
26582
+ };
26204
26583
  createPayGrant: {
26205
26584
  parameters: {
26206
26585
  query?: never;