@1claw/openapi-spec 0.56.3 → 0.57.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.
Files changed (3) hide show
  1. package/openapi.json +817 -51
  2. package/openapi.yaml +500 -1
  3. package/package.json +1 -1
package/openapi.yaml CHANGED
@@ -2,7 +2,7 @@ openapi: 3.1.0
2
2
 
3
3
  info:
4
4
  title: 1Claw API
5
- version: 0.56.3
5
+ version: 0.57.0
6
6
  description: |
7
7
  Secure secret management for AI agents. Provides vaults, secrets,
8
8
  policy-based access control, agent identity, Intents API,
@@ -932,6 +932,8 @@ paths:
932
932
  properties:
933
933
  require_passkey_for_vaults:
934
934
  type: boolean
935
+ require_passkey_for_mfa:
936
+ type: boolean
935
937
  passkey_count:
936
938
  type: integer
937
939
  patch:
@@ -941,6 +943,10 @@ paths:
941
943
  Disabling `require_passkey_for_vaults` requires `X-Auth-Confirm`
942
944
  (purpose `security.vault_passkey.disable`) with a passkey or TOTP
943
945
  when either is enrolled.
946
+
947
+ Disabling `require_passkey_for_mfa` requires `X-Auth-Confirm`
948
+ (purpose `security.mfa_passkey.disable`) with a passkey or TOTP
949
+ when either is enrolled.
944
950
  operationId: updateSecuritySettings
945
951
  parameters:
946
952
  - name: X-Auth-Confirm
@@ -957,6 +963,8 @@ paths:
957
963
  properties:
958
964
  require_passkey_for_vaults:
959
965
  type: boolean
966
+ require_passkey_for_mfa:
967
+ type: boolean
960
968
  responses:
961
969
  "200":
962
970
  description: Updated settings
@@ -1071,6 +1079,54 @@ paths:
1071
1079
  "401":
1072
1080
  $ref: "#/components/responses/Unauthorized"
1073
1081
 
1082
+ /v1/auth/mfa/passkey/begin:
1083
+ post:
1084
+ tags: [Authentication]
1085
+ summary: Begin passkey MFA verification during login
1086
+ operationId: mfaPasskeyBegin
1087
+ security: []
1088
+ requestBody:
1089
+ required: true
1090
+ content:
1091
+ application/json:
1092
+ schema:
1093
+ type: object
1094
+ required: [mfa_token]
1095
+ properties:
1096
+ mfa_token:
1097
+ type: string
1098
+ responses:
1099
+ "200":
1100
+ description: WebAuthn challenge
1101
+ content:
1102
+ application/json:
1103
+ schema:
1104
+ $ref: "#/components/schemas/PasskeyAssertBeginResponse"
1105
+ "400":
1106
+ $ref: "#/components/responses/BadRequest"
1107
+
1108
+ /v1/auth/mfa/passkey/complete:
1109
+ post:
1110
+ tags: [Authentication]
1111
+ summary: Complete passkey MFA verification during login
1112
+ operationId: mfaPasskeyComplete
1113
+ security: []
1114
+ requestBody:
1115
+ required: true
1116
+ content:
1117
+ application/json:
1118
+ schema:
1119
+ $ref: "#/components/schemas/MfaPasskeyCompleteRequest"
1120
+ responses:
1121
+ "200":
1122
+ description: MFA verified, JWT issued
1123
+ content:
1124
+ application/json:
1125
+ schema:
1126
+ $ref: "#/components/schemas/TokenResponse"
1127
+ "401":
1128
+ $ref: "#/components/responses/Unauthorized"
1129
+
1074
1130
  /v1/auth/mfa:
1075
1131
  delete:
1076
1132
  tags: [Authentication]
@@ -5524,6 +5580,28 @@ paths:
5524
5580
  "401":
5525
5581
  $ref: "#/components/responses/Unauthorized"
5526
5582
 
5583
+ /v1/treasury/wallets/inference-budget:
5584
+ get:
5585
+ tags: [Treasury Wallets]
5586
+ summary: Get inference budget for current user
5587
+ description: |
5588
+ Returns the user's remaining LLM inference allowance when connected via a platform app.
5589
+ Includes allowance, spent, remaining USD, per-request cap, and billing period end.
5590
+ operationId: getUserInferenceBudget
5591
+ security:
5592
+ - BearerAuth: []
5593
+ responses:
5594
+ "200":
5595
+ description: Inference budget (or unconfigured message)
5596
+ content:
5597
+ application/json:
5598
+ schema:
5599
+ oneOf:
5600
+ - $ref: "#/components/schemas/InferenceBudgetResponse"
5601
+ - $ref: "#/components/schemas/InferenceBudgetUnconfiguredResponse"
5602
+ "403":
5603
+ $ref: "#/components/responses/Forbidden"
5604
+
5527
5605
  # ---------------------------------------------------------------------------
5528
5606
  # Webhooks
5529
5607
  # ---------------------------------------------------------------------------
@@ -6370,6 +6448,44 @@ paths:
6370
6448
  "404":
6371
6449
  $ref: "#/components/responses/NotFound"
6372
6450
 
6451
+ /v1/platform/apps/{appId}/templates/{template_id}/preview:
6452
+ post:
6453
+ tags: [Platform]
6454
+ summary: Preview resolved template spec
6455
+ description: |
6456
+ Resolves `{{params.*}}` and `{{subject.*}}` placeholders in a template spec
6457
+ without provisioning resources. Useful for validating parameterized bootstrap templates.
6458
+ security:
6459
+ - BearerAuth: []
6460
+ parameters:
6461
+ - in: path
6462
+ name: appId
6463
+ required: true
6464
+ schema:
6465
+ type: string
6466
+ format: uuid
6467
+ - in: path
6468
+ name: template_id
6469
+ required: true
6470
+ schema:
6471
+ type: string
6472
+ format: uuid
6473
+ requestBody:
6474
+ required: false
6475
+ content:
6476
+ application/json:
6477
+ schema:
6478
+ $ref: "#/components/schemas/TemplatePreviewRequest"
6479
+ responses:
6480
+ "200":
6481
+ description: Resolved template spec
6482
+ content:
6483
+ application/json:
6484
+ schema:
6485
+ $ref: "#/components/schemas/TemplatePreviewResponse"
6486
+ "404":
6487
+ $ref: "#/components/responses/NotFound"
6488
+
6373
6489
  /v1/platform/users/upsert:
6374
6490
  post:
6375
6491
  tags: [Platform]
@@ -6403,6 +6519,31 @@ paths:
6403
6519
  schema:
6404
6520
  $ref: "#/components/schemas/PlatformUserLinkRequiredResponse"
6405
6521
 
6522
+ /v1/platform/siwe/challenge:
6523
+ post:
6524
+ tags: [Platform]
6525
+ summary: Issue SIWE nonce
6526
+ description: |
6527
+ Creates a one-time nonce for Sign-In With Ethereum user provisioning.
6528
+ Requires platform (`plt_`) authentication. The nonce expires in 5 minutes.
6529
+ security:
6530
+ - BearerAuth: []
6531
+ requestBody:
6532
+ required: false
6533
+ content:
6534
+ application/json:
6535
+ schema:
6536
+ $ref: "#/components/schemas/SiweChallengeRequest"
6537
+ responses:
6538
+ "200":
6539
+ description: Nonce issued
6540
+ content:
6541
+ application/json:
6542
+ schema:
6543
+ $ref: "#/components/schemas/SiweChallengeResponse"
6544
+ "400":
6545
+ description: SIWE domain not configured
6546
+
6406
6547
  /v1/platform/apps/{appId}/users:
6407
6548
  get:
6408
6549
  tags: [Platform]
@@ -6502,6 +6643,100 @@ paths:
6502
6643
  "404":
6503
6644
  description: Connection not found
6504
6645
 
6646
+ /v1/platform/connections/{connectionId}:
6647
+ get:
6648
+ tags: [Platform]
6649
+ summary: Get connection details
6650
+ description: |
6651
+ Returns connection status, claim state, wallet address, and provisioned resource IDs.
6652
+ Use for polling the claim loop after bootstrap.
6653
+ security:
6654
+ - BearerAuth: []
6655
+ parameters:
6656
+ - in: path
6657
+ name: connectionId
6658
+ required: true
6659
+ schema:
6660
+ type: string
6661
+ format: uuid
6662
+ responses:
6663
+ "200":
6664
+ description: Connection details
6665
+ content:
6666
+ application/json:
6667
+ schema:
6668
+ $ref: "#/components/schemas/ConnectionDetailResponse"
6669
+ "404":
6670
+ $ref: "#/components/responses/NotFound"
6671
+
6672
+ /v1/platform/connections/{connectionId}/usage:
6673
+ get:
6674
+ tags: [Platform]
6675
+ summary: Get per-connection usage
6676
+ description: Returns inference spend for the current UTC month for this connection.
6677
+ security:
6678
+ - BearerAuth: []
6679
+ parameters:
6680
+ - in: path
6681
+ name: connectionId
6682
+ required: true
6683
+ schema:
6684
+ type: string
6685
+ format: uuid
6686
+ responses:
6687
+ "200":
6688
+ description: Usage summary
6689
+ content:
6690
+ application/json:
6691
+ schema:
6692
+ $ref: "#/components/schemas/ConnectionUsageResponse"
6693
+ "404":
6694
+ $ref: "#/components/responses/NotFound"
6695
+
6696
+ /v1/platform/connections/{connectionId}/entitlements:
6697
+ get:
6698
+ tags: [Platform]
6699
+ summary: List entitlement evaluations
6700
+ description: Returns on-chain entitlement watch status for the connection.
6701
+ security:
6702
+ - BearerAuth: []
6703
+ parameters:
6704
+ - in: path
6705
+ name: connectionId
6706
+ required: true
6707
+ schema:
6708
+ type: string
6709
+ format: uuid
6710
+ responses:
6711
+ "200":
6712
+ description: Entitlement watches
6713
+ content:
6714
+ application/json:
6715
+ schema:
6716
+ $ref: "#/components/schemas/EntitlementsListResponse"
6717
+ "404":
6718
+ $ref: "#/components/responses/NotFound"
6719
+
6720
+ /v1/platform/connections/{connectionId}/entitlements/refresh:
6721
+ post:
6722
+ tags: [Platform]
6723
+ summary: Refresh entitlement evaluations
6724
+ description: Triggers an immediate entitlement monitor cycle for this connection's org.
6725
+ security:
6726
+ - BearerAuth: []
6727
+ parameters:
6728
+ - in: path
6729
+ name: connectionId
6730
+ required: true
6731
+ schema:
6732
+ type: string
6733
+ format: uuid
6734
+ responses:
6735
+ "202":
6736
+ description: Refresh accepted
6737
+ "404":
6738
+ $ref: "#/components/responses/NotFound"
6739
+
6505
6740
  /v1/platform/apps/{appId}/audit:
6506
6741
  get:
6507
6742
  tags: [Platform]
@@ -11526,6 +11761,10 @@ components:
11526
11761
  type: boolean
11527
11762
  mfa_token:
11528
11763
  type: string
11764
+ mfa_method:
11765
+ type: string
11766
+ enum: [totp, passkey]
11767
+ description: When MFA is required, which second factor to collect
11529
11768
 
11530
11769
  TokenResponse:
11531
11770
  type: object
@@ -11539,6 +11778,13 @@ components:
11539
11778
  type: integer
11540
11779
  refresh_token:
11541
11780
  type: string
11781
+ mfa_required:
11782
+ type: boolean
11783
+ mfa_token:
11784
+ type: string
11785
+ mfa_method:
11786
+ type: string
11787
+ enum: [totp, passkey]
11542
11788
 
11543
11789
  AgentTokenRequest:
11544
11790
  type: object
@@ -11694,6 +11940,12 @@ components:
11694
11940
  properties:
11695
11941
  enabled:
11696
11942
  type: boolean
11943
+ eligible:
11944
+ type: boolean
11945
+ totp_enabled:
11946
+ type: boolean
11947
+ passkey_mfa_enabled:
11948
+ type: boolean
11697
11949
 
11698
11950
  MfaSetupResponse:
11699
11951
  type: object
@@ -16227,12 +16479,29 @@ components:
16227
16479
  subject_token_type:
16228
16480
  type: string
16229
16481
  default: "urn:ietf:params:oauth:token-type:jwt"
16482
+ description: |
16483
+ Token type for subject_token. Use `urn:1claw:params:oauth:token-type:siwe`
16484
+ with `siwe_message` and `siwe_signature` for wallet-based provisioning.
16230
16485
  email:
16231
16486
  type: string
16232
16487
  format: email
16233
16488
  description: Fallback when subject_token is not provided
16234
16489
  display_name:
16235
16490
  type: string
16491
+ siwe_message:
16492
+ type: string
16493
+ description: EIP-4361 Sign-In With Ethereum message (required for SIWE upsert)
16494
+ siwe_signature:
16495
+ type: string
16496
+ description: Hex-encoded SIWE signature (required for SIWE upsert)
16497
+ return_to:
16498
+ type: string
16499
+ format: uri
16500
+ description: Redirect URL after cross-org link consent
16501
+ create_sub_org:
16502
+ type: boolean
16503
+ default: false
16504
+ description: When true, creates a sub-org under the platform app's org
16236
16505
 
16237
16506
  PlatformUserResponse:
16238
16507
  type: object
@@ -16321,6 +16590,12 @@ components:
16321
16590
  type: string
16322
16591
  format: uri
16323
16592
  description: URL to redirect the user to after claiming resources.
16593
+ parameters:
16594
+ type: object
16595
+ additionalProperties: true
16596
+ description: |
16597
+ Template parameters substituted as `{{params.*}}` during bootstrap.
16598
+ Combined with `Idempotency-Key` header for params-aware idempotent replay.
16324
16599
 
16325
16600
  BootstrapResponse:
16326
16601
  type: object
@@ -17009,6 +17284,26 @@ components:
17009
17284
  max_transactions_per_day:
17010
17285
  type: integer
17011
17286
  description: Maximum number of transactions per 24h window
17287
+ inference_allowance_usd:
17288
+ type: string
17289
+ description: Monthly LLM inference allowance in USD (decimal string)
17290
+ inference_reserved_pct:
17291
+ type: integer
17292
+ minimum: 0
17293
+ maximum: 100
17294
+ default: 25
17295
+ description: Percent of allowance held in reserve (not spendable)
17296
+ inference_hard_stop:
17297
+ type: boolean
17298
+ default: true
17299
+ description: When true, block inference when allowance is exhausted
17300
+ inference_allowance_mode:
17301
+ type: string
17302
+ enum: [policy, credits]
17303
+ default: policy
17304
+ max_request_cost_usd:
17305
+ type: string
17306
+ description: Maximum estimated cost per LLM request in USD
17012
17307
  human_factor_auth:
17013
17308
  type: object
17014
17309
  additionalProperties: true
@@ -17017,6 +17312,180 @@ components:
17017
17312
  Fields: send, swap, export (password_or_passkey | passkey_only | passkey_required | password_only | reauth_token_only),
17018
17313
  conditional.require_passkey_above_usd, conditional.require_passkey_for_new_recipient.
17019
17314
 
17315
+ SiweChallengeRequest:
17316
+ type: object
17317
+ properties:
17318
+ domain:
17319
+ type: string
17320
+ description: Optional SIWE domain override (defaults to platform app's siwe_domain)
17321
+
17322
+ SiweChallengeResponse:
17323
+ type: object
17324
+ required: [nonce, expires_in, domain]
17325
+ properties:
17326
+ nonce:
17327
+ type: string
17328
+ expires_in:
17329
+ type: integer
17330
+ description: Seconds until nonce expiry
17331
+ domain:
17332
+ type: string
17333
+
17334
+ ConnectionDetailResponse:
17335
+ type: object
17336
+ required: [connection_id, user_id, status, entitlement_status, vault_ids, agent_ids, claim]
17337
+ properties:
17338
+ connection_id:
17339
+ type: string
17340
+ format: uuid
17341
+ user_id:
17342
+ type: string
17343
+ format: uuid
17344
+ status:
17345
+ type: string
17346
+ entitlement_status:
17347
+ type: string
17348
+ wallet_address:
17349
+ type: string
17350
+ nullable: true
17351
+ vault_ids:
17352
+ type: array
17353
+ items:
17354
+ type: string
17355
+ format: uuid
17356
+ agent_ids:
17357
+ type: array
17358
+ items:
17359
+ type: string
17360
+ format: uuid
17361
+ claimed_at:
17362
+ type: string
17363
+ format: date-time
17364
+ nullable: true
17365
+ claim:
17366
+ $ref: "#/components/schemas/ClaimStatusResponse"
17367
+
17368
+ ClaimStatusResponse:
17369
+ type: object
17370
+ required: [status]
17371
+ properties:
17372
+ status:
17373
+ type: string
17374
+ enum: [pending, active, claimed]
17375
+ redeemed_at:
17376
+ type: string
17377
+ format: date-time
17378
+ nullable: true
17379
+
17380
+ ConnectionUsageResponse:
17381
+ type: object
17382
+ required: [connection_id, period, inference_spent_usd]
17383
+ properties:
17384
+ connection_id:
17385
+ type: string
17386
+ format: uuid
17387
+ period:
17388
+ type: string
17389
+ description: UTC month (YYYY-MM)
17390
+ inference_spent_usd:
17391
+ type: string
17392
+
17393
+ EntitlementsListResponse:
17394
+ type: object
17395
+ required: [evaluations]
17396
+ properties:
17397
+ evaluations:
17398
+ type: array
17399
+ items:
17400
+ $ref: "#/components/schemas/EntitlementEvaluationResponse"
17401
+
17402
+ EntitlementEvaluationResponse:
17403
+ type: object
17404
+ required: [id, status, watch_kind, chain, holder_address]
17405
+ properties:
17406
+ id:
17407
+ type: string
17408
+ status:
17409
+ type: string
17410
+ watch_kind:
17411
+ type: string
17412
+ chain:
17413
+ type: string
17414
+ holder_address:
17415
+ type: string
17416
+ last_value_raw:
17417
+ type: string
17418
+ nullable: true
17419
+ last_checked_at:
17420
+ type: string
17421
+ format: date-time
17422
+ nullable: true
17423
+
17424
+ TemplatePreviewRequest:
17425
+ type: object
17426
+ properties:
17427
+ parameters:
17428
+ type: object
17429
+ additionalProperties: true
17430
+ subject:
17431
+ type: object
17432
+ properties:
17433
+ user_id:
17434
+ type: string
17435
+ external_subject:
17436
+ type: string
17437
+ wallet_address:
17438
+ type: string
17439
+ email:
17440
+ type: string
17441
+
17442
+ TemplatePreviewResponse:
17443
+ type: object
17444
+ required: [resolved_spec]
17445
+ properties:
17446
+ resolved_spec:
17447
+ type: object
17448
+ additionalProperties: true
17449
+
17450
+ InferenceBudgetResponse:
17451
+ type: object
17452
+ required:
17453
+ - allowance_usd
17454
+ - spent_usd
17455
+ - remaining_usd
17456
+ - reserved_pct
17457
+ - max_request_cost_usd
17458
+ - period_end
17459
+ properties:
17460
+ allowance_usd:
17461
+ type: string
17462
+ spent_usd:
17463
+ type: string
17464
+ remaining_usd:
17465
+ type: string
17466
+ reserved_pct:
17467
+ type: integer
17468
+ max_request_cost_usd:
17469
+ type: string
17470
+ period_end:
17471
+ type: string
17472
+ format: date-time
17473
+ connection_id:
17474
+ type: string
17475
+ format: uuid
17476
+ nullable: true
17477
+
17478
+ InferenceBudgetUnconfiguredResponse:
17479
+ type: object
17480
+ properties:
17481
+ allowance_usd:
17482
+ type: string
17483
+ nullable: true
17484
+ remaining_usd:
17485
+ nullable: true
17486
+ message:
17487
+ type: string
17488
+
17020
17489
  SpendPolicyResponse:
17021
17490
  type: object
17022
17491
  required: [id, platform_app_id, created_at]
@@ -17052,6 +17521,21 @@ components:
17052
17521
  max_transactions_per_day:
17053
17522
  type: integer
17054
17523
  nullable: true
17524
+ inference_allowance_usd:
17525
+ type: string
17526
+ nullable: true
17527
+ inference_reserved_pct:
17528
+ type: integer
17529
+ nullable: true
17530
+ inference_hard_stop:
17531
+ type: boolean
17532
+ nullable: true
17533
+ inference_allowance_mode:
17534
+ type: string
17535
+ nullable: true
17536
+ max_request_cost_usd:
17537
+ type: string
17538
+ nullable: true
17055
17539
  human_factor_auth:
17056
17540
  type: object
17057
17541
  additionalProperties: true
@@ -17158,6 +17642,21 @@ components:
17158
17642
  items:
17159
17643
  type: string
17160
17644
 
17645
+ MfaPasskeyCompleteRequest:
17646
+ type: object
17647
+ required: [mfa_token, credential_id, authenticator_data, client_data_json, signature]
17648
+ properties:
17649
+ mfa_token:
17650
+ type: string
17651
+ credential_id:
17652
+ type: string
17653
+ authenticator_data:
17654
+ type: string
17655
+ client_data_json:
17656
+ type: string
17657
+ signature:
17658
+ type: string
17659
+
17161
17660
  GuardrailWideningQueuedResponse:
17162
17661
  type: object
17163
17662
  required: [status, approval_id, revision_id, message]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1claw/openapi-spec",
3
- "version": "0.56.3",
3
+ "version": "0.57.0",
4
4
  "description": "OpenAPI 3.1.0 specification for the 1Claw Vault API — generate clients in any language",
5
5
  "license": "MIT",
6
6
  "repository": {