@1claw/openapi-spec 0.22.2 → 0.23.1

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/openapi.json CHANGED
@@ -98,6 +98,10 @@
98
98
  {
99
99
  "name": "Health",
100
100
  "description": "Service health checks"
101
+ },
102
+ {
103
+ "name": "Platform",
104
+ "description": "Platform API for developers building on 1Claw (plt_ keys, user provisioning, bootstrap templates)"
101
105
  }
102
106
  ],
103
107
  "paths": {
@@ -2783,6 +2787,89 @@
2783
2787
  }
2784
2788
  }
2785
2789
  },
2790
+ "/v1/agents/{agent_id}/signing-keys/{chain}/export": {
2791
+ "post": {
2792
+ "tags": [
2793
+ "Signing Keys"
2794
+ ],
2795
+ "summary": "Export a signing key (private key included)",
2796
+ "description": "Export the private key for an agent's signing key. Requires re-authentication\nvia the X-Auth-Confirm header containing the user's account password.\nHuman users only — agents cannot export keys.\n",
2797
+ "operationId": "exportSigningKey",
2798
+ "parameters": [
2799
+ {
2800
+ "$ref": "#/components/parameters/AgentId"
2801
+ },
2802
+ {
2803
+ "name": "chain",
2804
+ "in": "path",
2805
+ "required": true,
2806
+ "schema": {
2807
+ "type": "string"
2808
+ }
2809
+ },
2810
+ {
2811
+ "name": "X-Auth-Confirm",
2812
+ "in": "header",
2813
+ "required": true,
2814
+ "description": "Account password for re-authentication",
2815
+ "schema": {
2816
+ "type": "string",
2817
+ "format": "password"
2818
+ }
2819
+ }
2820
+ ],
2821
+ "responses": {
2822
+ "200": {
2823
+ "description": "Signing key exported successfully",
2824
+ "content": {
2825
+ "application/json": {
2826
+ "schema": {
2827
+ "type": "object",
2828
+ "required": [
2829
+ "chain",
2830
+ "curve",
2831
+ "public_key",
2832
+ "private_key",
2833
+ "key_version",
2834
+ "agent_id"
2835
+ ],
2836
+ "properties": {
2837
+ "chain": {
2838
+ "type": "string"
2839
+ },
2840
+ "curve": {
2841
+ "type": "string"
2842
+ },
2843
+ "public_key": {
2844
+ "type": "string"
2845
+ },
2846
+ "address": {
2847
+ "type": "string"
2848
+ },
2849
+ "private_key": {
2850
+ "type": "string"
2851
+ },
2852
+ "key_version": {
2853
+ "type": "integer"
2854
+ },
2855
+ "agent_id": {
2856
+ "type": "string",
2857
+ "format": "uuid"
2858
+ }
2859
+ }
2860
+ }
2861
+ }
2862
+ }
2863
+ },
2864
+ "403": {
2865
+ "$ref": "#/components/responses/Forbidden"
2866
+ },
2867
+ "404": {
2868
+ "$ref": "#/components/responses/NotFound"
2869
+ }
2870
+ }
2871
+ }
2872
+ },
2786
2873
  "/v1/agents/{agent_id}/sign": {
2787
2874
  "post": {
2788
2875
  "tags": [
@@ -4468,7 +4555,7 @@
4468
4555
  "Treasury Wallets"
4469
4556
  ],
4470
4557
  "summary": "Export the private key for a treasury wallet",
4471
- "description": "Returns the raw private key hex for the user's active wallet on\nthe given chain. Audit-logged as `treasury_wallet.export`.\nHuman users only.\n",
4558
+ "description": "Returns the raw private key hex for the user's active wallet on\nthe given chain. Requires re-authentication via the `X-Auth-Confirm`\nheader (account password). Audit-logged as `treasury_wallet.export`.\nHuman users only.\n",
4472
4559
  "operationId": "exportTreasuryWallet",
4473
4560
  "security": [
4474
4561
  {
@@ -4483,6 +4570,16 @@
4483
4570
  "schema": {
4484
4571
  "type": "string"
4485
4572
  }
4573
+ },
4574
+ {
4575
+ "name": "X-Auth-Confirm",
4576
+ "in": "header",
4577
+ "required": true,
4578
+ "description": "Account password for re-authentication",
4579
+ "schema": {
4580
+ "type": "string",
4581
+ "format": "password"
4582
+ }
4486
4583
  }
4487
4584
  ],
4488
4585
  "responses": {
@@ -5125,116 +5222,643 @@
5125
5222
  }
5126
5223
  }
5127
5224
  }
5128
- }
5129
- },
5130
- "components": {
5131
- "securitySchemes": {
5132
- "BearerAuth": {
5133
- "type": "http",
5134
- "scheme": "bearer",
5135
- "bearerFormat": "JWT"
5136
- },
5137
- "ApiKeyAuth": {
5138
- "type": "http",
5139
- "scheme": "bearer",
5140
- "description": "1ck_ prefixed API key used as Bearer token"
5141
- }
5142
5225
  },
5143
- "parameters": {
5144
- "VaultId": {
5145
- "name": "vault_id",
5146
- "in": "path",
5147
- "required": true,
5148
- "schema": {
5149
- "type": "string",
5150
- "format": "uuid"
5151
- }
5152
- },
5153
- "SecretPath": {
5154
- "name": "path",
5155
- "in": "path",
5156
- "required": true,
5157
- "schema": {
5158
- "type": "string"
5226
+ "/v1/platform/apps": {
5227
+ "post": {
5228
+ "tags": [
5229
+ "Platform"
5230
+ ],
5231
+ "summary": "Register a platform app",
5232
+ "description": "Register a new platform app for building on top of 1Claw. Returns an API key (plt_ prefix) that must be saved immediately.",
5233
+ "security": [
5234
+ {
5235
+ "BearerAuth": []
5236
+ }
5237
+ ],
5238
+ "requestBody": {
5239
+ "required": true,
5240
+ "content": {
5241
+ "application/json": {
5242
+ "schema": {
5243
+ "$ref": "#/components/schemas/CreatePlatformAppRequest"
5244
+ }
5245
+ }
5246
+ }
5159
5247
  },
5160
- "description": "Secret path (e.g. \"db/credentials\")"
5161
- },
5162
- "AgentId": {
5163
- "name": "agent_id",
5164
- "in": "path",
5165
- "required": true,
5166
- "schema": {
5167
- "type": "string",
5168
- "format": "uuid"
5169
- }
5170
- },
5171
- "PolicyId": {
5172
- "name": "policy_id",
5173
- "in": "path",
5174
- "required": true,
5175
- "schema": {
5176
- "type": "string",
5177
- "format": "uuid"
5248
+ "responses": {
5249
+ "201": {
5250
+ "description": "Platform app created",
5251
+ "content": {
5252
+ "application/json": {
5253
+ "schema": {
5254
+ "$ref": "#/components/schemas/PlatformAppCreatedResponse"
5255
+ }
5256
+ }
5257
+ }
5258
+ },
5259
+ "400": {
5260
+ "description": "Invalid request"
5261
+ },
5262
+ "403": {
5263
+ "description": "Only human users can register platform apps"
5264
+ }
5178
5265
  }
5179
5266
  },
5180
- "IncludeSignedTx": {
5181
- "name": "include_signed_tx",
5182
- "in": "query",
5183
- "required": false,
5184
- "description": "Set to `true` or `1` to include the raw signed transaction hex in the response. Omitted by default to reduce key exfiltration risk. Only the literal values \"true\" or \"1\" enable inclusion; any other value or omission returns responses without signed_tx. Applies to GET /v1/agents/{agent_id}/transactions and GET /v1/agents/{agent_id}/transactions/{tx_id}.\n",
5185
- "schema": {
5186
- "type": "boolean",
5187
- "default": false,
5188
- "example": false
5267
+ "get": {
5268
+ "tags": [
5269
+ "Platform"
5270
+ ],
5271
+ "summary": "List platform apps",
5272
+ "description": "List all platform apps in the organization.",
5273
+ "security": [
5274
+ {
5275
+ "BearerAuth": []
5276
+ }
5277
+ ],
5278
+ "responses": {
5279
+ "200": {
5280
+ "description": "List of platform apps",
5281
+ "content": {
5282
+ "application/json": {
5283
+ "schema": {
5284
+ "type": "array",
5285
+ "items": {
5286
+ "$ref": "#/components/schemas/PlatformAppResponse"
5287
+ }
5288
+ }
5289
+ }
5290
+ }
5291
+ }
5189
5292
  }
5190
5293
  }
5191
5294
  },
5192
- "responses": {
5193
- "BadRequest": {
5194
- "description": "Invalid request",
5195
- "content": {
5196
- "application/json": {
5295
+ "/v1/platform/apps/{appId}": {
5296
+ "get": {
5297
+ "tags": [
5298
+ "Platform"
5299
+ ],
5300
+ "summary": "Get platform app details",
5301
+ "security": [
5302
+ {
5303
+ "BearerAuth": []
5304
+ }
5305
+ ],
5306
+ "parameters": [
5307
+ {
5308
+ "in": "path",
5309
+ "name": "appId",
5310
+ "required": true,
5197
5311
  "schema": {
5198
- "$ref": "#/components/schemas/ProblemDetails"
5312
+ "type": "string",
5313
+ "format": "uuid"
5199
5314
  }
5200
5315
  }
5201
- }
5202
- },
5203
- "Unauthorized": {
5204
- "description": "Authentication required or invalid",
5205
- "content": {
5206
- "application/json": {
5207
- "schema": {
5208
- "$ref": "#/components/schemas/ProblemDetails"
5316
+ ],
5317
+ "responses": {
5318
+ "200": {
5319
+ "description": "Platform app details",
5320
+ "content": {
5321
+ "application/json": {
5322
+ "schema": {
5323
+ "$ref": "#/components/schemas/PlatformAppResponse"
5324
+ }
5325
+ }
5209
5326
  }
5327
+ },
5328
+ "404": {
5329
+ "description": "Not found"
5210
5330
  }
5211
5331
  }
5212
5332
  },
5213
- "Forbidden": {
5214
- "description": "Insufficient permissions",
5215
- "content": {
5216
- "application/json": {
5333
+ "patch": {
5334
+ "tags": [
5335
+ "Platform"
5336
+ ],
5337
+ "summary": "Update platform app",
5338
+ "security": [
5339
+ {
5340
+ "BearerAuth": []
5341
+ }
5342
+ ],
5343
+ "parameters": [
5344
+ {
5345
+ "in": "path",
5346
+ "name": "appId",
5347
+ "required": true,
5217
5348
  "schema": {
5218
- "$ref": "#/components/schemas/ProblemDetails"
5349
+ "type": "string",
5350
+ "format": "uuid"
5219
5351
  }
5220
5352
  }
5221
- }
5222
- },
5223
- "NotFound": {
5224
- "description": "Resource not found",
5225
- "content": {
5226
- "application/json": {
5227
- "schema": {
5228
- "$ref": "#/components/schemas/ProblemDetails"
5353
+ ],
5354
+ "requestBody": {
5355
+ "required": true,
5356
+ "content": {
5357
+ "application/json": {
5358
+ "schema": {
5359
+ "$ref": "#/components/schemas/UpdatePlatformAppRequest"
5360
+ }
5361
+ }
5362
+ }
5363
+ },
5364
+ "responses": {
5365
+ "200": {
5366
+ "description": "Updated platform app",
5367
+ "content": {
5368
+ "application/json": {
5369
+ "schema": {
5370
+ "$ref": "#/components/schemas/PlatformAppResponse"
5371
+ }
5372
+ }
5229
5373
  }
5230
5374
  }
5231
5375
  }
5232
5376
  },
5233
- "PaymentRequired": {
5234
- "description": "x402 payment required",
5235
- "content": {
5236
- "application/json": {
5237
- "schema": {
5377
+ "delete": {
5378
+ "tags": [
5379
+ "Platform"
5380
+ ],
5381
+ "summary": "Delete platform app",
5382
+ "security": [
5383
+ {
5384
+ "BearerAuth": []
5385
+ }
5386
+ ],
5387
+ "parameters": [
5388
+ {
5389
+ "in": "path",
5390
+ "name": "appId",
5391
+ "required": true,
5392
+ "schema": {
5393
+ "type": "string",
5394
+ "format": "uuid"
5395
+ }
5396
+ }
5397
+ ],
5398
+ "responses": {
5399
+ "204": {
5400
+ "description": "Deleted"
5401
+ },
5402
+ "403": {
5403
+ "description": "Only human users can delete platform apps"
5404
+ }
5405
+ }
5406
+ }
5407
+ },
5408
+ "/v1/platform/apps/{appId}/templates": {
5409
+ "post": {
5410
+ "tags": [
5411
+ "Platform"
5412
+ ],
5413
+ "summary": "Create bootstrap template",
5414
+ "description": "Create a template that defines what vault, agents, and policies to bootstrap for each connected user.",
5415
+ "security": [
5416
+ {
5417
+ "BearerAuth": []
5418
+ }
5419
+ ],
5420
+ "parameters": [
5421
+ {
5422
+ "in": "path",
5423
+ "name": "appId",
5424
+ "required": true,
5425
+ "schema": {
5426
+ "type": "string",
5427
+ "format": "uuid"
5428
+ }
5429
+ }
5430
+ ],
5431
+ "requestBody": {
5432
+ "required": true,
5433
+ "content": {
5434
+ "application/json": {
5435
+ "schema": {
5436
+ "$ref": "#/components/schemas/CreateTemplateRequest"
5437
+ }
5438
+ }
5439
+ }
5440
+ },
5441
+ "responses": {
5442
+ "201": {
5443
+ "description": "Template created",
5444
+ "content": {
5445
+ "application/json": {
5446
+ "schema": {
5447
+ "$ref": "#/components/schemas/PlatformTemplateResponse"
5448
+ }
5449
+ }
5450
+ }
5451
+ }
5452
+ }
5453
+ },
5454
+ "get": {
5455
+ "tags": [
5456
+ "Platform"
5457
+ ],
5458
+ "summary": "List templates",
5459
+ "security": [
5460
+ {
5461
+ "BearerAuth": []
5462
+ }
5463
+ ],
5464
+ "parameters": [
5465
+ {
5466
+ "in": "path",
5467
+ "name": "appId",
5468
+ "required": true,
5469
+ "schema": {
5470
+ "type": "string",
5471
+ "format": "uuid"
5472
+ }
5473
+ }
5474
+ ],
5475
+ "responses": {
5476
+ "200": {
5477
+ "description": "List of templates",
5478
+ "content": {
5479
+ "application/json": {
5480
+ "schema": {
5481
+ "type": "array",
5482
+ "items": {
5483
+ "$ref": "#/components/schemas/PlatformTemplateResponse"
5484
+ }
5485
+ }
5486
+ }
5487
+ }
5488
+ }
5489
+ }
5490
+ }
5491
+ },
5492
+ "/v1/platform/users/upsert": {
5493
+ "post": {
5494
+ "tags": [
5495
+ "Platform"
5496
+ ],
5497
+ "summary": "Provision or look up a platform user",
5498
+ "description": "Upserts a user using either an OIDC subject_token (verified against the platform app's JWKS) or an email address. Returns the user handle and connection ID.",
5499
+ "security": [
5500
+ {
5501
+ "BearerAuth": []
5502
+ }
5503
+ ],
5504
+ "requestBody": {
5505
+ "required": true,
5506
+ "content": {
5507
+ "application/json": {
5508
+ "schema": {
5509
+ "$ref": "#/components/schemas/UpsertPlatformUserRequest"
5510
+ }
5511
+ }
5512
+ }
5513
+ },
5514
+ "responses": {
5515
+ "200": {
5516
+ "description": "Existing user found",
5517
+ "content": {
5518
+ "application/json": {
5519
+ "schema": {
5520
+ "$ref": "#/components/schemas/PlatformUserResponse"
5521
+ }
5522
+ }
5523
+ }
5524
+ },
5525
+ "201": {
5526
+ "description": "New user created",
5527
+ "content": {
5528
+ "application/json": {
5529
+ "schema": {
5530
+ "$ref": "#/components/schemas/PlatformUserResponse"
5531
+ }
5532
+ }
5533
+ }
5534
+ }
5535
+ }
5536
+ }
5537
+ },
5538
+ "/v1/platform/apps/{appId}/users": {
5539
+ "get": {
5540
+ "tags": [
5541
+ "Platform"
5542
+ ],
5543
+ "summary": "List connected users",
5544
+ "description": "List all users connected to this platform app.",
5545
+ "security": [
5546
+ {
5547
+ "BearerAuth": []
5548
+ }
5549
+ ],
5550
+ "parameters": [
5551
+ {
5552
+ "in": "path",
5553
+ "name": "appId",
5554
+ "required": true,
5555
+ "schema": {
5556
+ "type": "string",
5557
+ "format": "uuid"
5558
+ }
5559
+ }
5560
+ ],
5561
+ "responses": {
5562
+ "200": {
5563
+ "description": "Connected users",
5564
+ "content": {
5565
+ "application/json": {
5566
+ "schema": {
5567
+ "type": "array",
5568
+ "items": {
5569
+ "$ref": "#/components/schemas/PlatformConnectedUserResponse"
5570
+ }
5571
+ }
5572
+ }
5573
+ }
5574
+ }
5575
+ }
5576
+ }
5577
+ },
5578
+ "/v1/platform/connections/{connectionId}/bootstrap": {
5579
+ "post": {
5580
+ "tags": [
5581
+ "Platform"
5582
+ ],
5583
+ "summary": "Bootstrap resources for a connected user",
5584
+ "description": "Executes a template to create vault, agent, and policies for the connected user. Returns a claim URL and token for the user to claim their resources.",
5585
+ "security": [
5586
+ {
5587
+ "BearerAuth": []
5588
+ }
5589
+ ],
5590
+ "parameters": [
5591
+ {
5592
+ "in": "path",
5593
+ "name": "connectionId",
5594
+ "required": true,
5595
+ "schema": {
5596
+ "type": "string",
5597
+ "format": "uuid"
5598
+ }
5599
+ }
5600
+ ],
5601
+ "requestBody": {
5602
+ "required": true,
5603
+ "content": {
5604
+ "application/json": {
5605
+ "schema": {
5606
+ "$ref": "#/components/schemas/BootstrapRequest"
5607
+ }
5608
+ }
5609
+ }
5610
+ },
5611
+ "responses": {
5612
+ "201": {
5613
+ "description": "Resources bootstrapped",
5614
+ "content": {
5615
+ "application/json": {
5616
+ "schema": {
5617
+ "$ref": "#/components/schemas/BootstrapResponse"
5618
+ }
5619
+ }
5620
+ }
5621
+ }
5622
+ }
5623
+ }
5624
+ },
5625
+ "/v1/platform/apps/{appId}/audit": {
5626
+ "get": {
5627
+ "tags": [
5628
+ "Platform"
5629
+ ],
5630
+ "summary": "Platform audit log",
5631
+ "description": "Returns audit events related to this platform app.",
5632
+ "security": [
5633
+ {
5634
+ "BearerAuth": []
5635
+ }
5636
+ ],
5637
+ "parameters": [
5638
+ {
5639
+ "in": "path",
5640
+ "name": "appId",
5641
+ "required": true,
5642
+ "schema": {
5643
+ "type": "string",
5644
+ "format": "uuid"
5645
+ }
5646
+ },
5647
+ {
5648
+ "in": "query",
5649
+ "name": "limit",
5650
+ "schema": {
5651
+ "type": "integer",
5652
+ "default": 50
5653
+ }
5654
+ },
5655
+ {
5656
+ "in": "query",
5657
+ "name": "offset",
5658
+ "schema": {
5659
+ "type": "integer",
5660
+ "default": 0
5661
+ }
5662
+ }
5663
+ ],
5664
+ "responses": {
5665
+ "200": {
5666
+ "description": "Audit events",
5667
+ "content": {
5668
+ "application/json": {
5669
+ "schema": {
5670
+ "type": "object",
5671
+ "properties": {
5672
+ "events": {
5673
+ "type": "array",
5674
+ "items": {
5675
+ "type": "object"
5676
+ }
5677
+ }
5678
+ }
5679
+ }
5680
+ }
5681
+ }
5682
+ }
5683
+ }
5684
+ }
5685
+ },
5686
+ "/v1/platform/connected-apps": {
5687
+ "get": {
5688
+ "tags": [
5689
+ "Platform"
5690
+ ],
5691
+ "summary": "List connected apps (user side)",
5692
+ "description": "Returns platform apps connected to the calling user's account.",
5693
+ "security": [
5694
+ {
5695
+ "BearerAuth": []
5696
+ }
5697
+ ],
5698
+ "responses": {
5699
+ "200": {
5700
+ "description": "Connected apps",
5701
+ "content": {
5702
+ "application/json": {
5703
+ "schema": {
5704
+ "type": "object",
5705
+ "properties": {
5706
+ "connected_apps": {
5707
+ "type": "array",
5708
+ "items": {
5709
+ "$ref": "#/components/schemas/ConnectedAppResponse"
5710
+ }
5711
+ }
5712
+ }
5713
+ }
5714
+ }
5715
+ }
5716
+ }
5717
+ }
5718
+ }
5719
+ },
5720
+ "/v1/platform/connected-apps/{connectionId}": {
5721
+ "delete": {
5722
+ "tags": [
5723
+ "Platform"
5724
+ ],
5725
+ "summary": "Disconnect a platform app",
5726
+ "description": "Disconnect the calling user from a platform app.",
5727
+ "security": [
5728
+ {
5729
+ "BearerAuth": []
5730
+ }
5731
+ ],
5732
+ "parameters": [
5733
+ {
5734
+ "in": "path",
5735
+ "name": "connectionId",
5736
+ "required": true,
5737
+ "schema": {
5738
+ "type": "string",
5739
+ "format": "uuid"
5740
+ }
5741
+ }
5742
+ ],
5743
+ "responses": {
5744
+ "204": {
5745
+ "description": "Disconnected"
5746
+ },
5747
+ "404": {
5748
+ "description": "Connection not found"
5749
+ }
5750
+ }
5751
+ }
5752
+ }
5753
+ },
5754
+ "components": {
5755
+ "securitySchemes": {
5756
+ "BearerAuth": {
5757
+ "type": "http",
5758
+ "scheme": "bearer",
5759
+ "bearerFormat": "JWT"
5760
+ },
5761
+ "ApiKeyAuth": {
5762
+ "type": "http",
5763
+ "scheme": "bearer",
5764
+ "description": "1ck_ prefixed API key used as Bearer token"
5765
+ }
5766
+ },
5767
+ "parameters": {
5768
+ "VaultId": {
5769
+ "name": "vault_id",
5770
+ "in": "path",
5771
+ "required": true,
5772
+ "schema": {
5773
+ "type": "string",
5774
+ "format": "uuid"
5775
+ }
5776
+ },
5777
+ "SecretPath": {
5778
+ "name": "path",
5779
+ "in": "path",
5780
+ "required": true,
5781
+ "schema": {
5782
+ "type": "string"
5783
+ },
5784
+ "description": "Secret path (e.g. \"db/credentials\")"
5785
+ },
5786
+ "AgentId": {
5787
+ "name": "agent_id",
5788
+ "in": "path",
5789
+ "required": true,
5790
+ "schema": {
5791
+ "type": "string",
5792
+ "format": "uuid"
5793
+ }
5794
+ },
5795
+ "PolicyId": {
5796
+ "name": "policy_id",
5797
+ "in": "path",
5798
+ "required": true,
5799
+ "schema": {
5800
+ "type": "string",
5801
+ "format": "uuid"
5802
+ }
5803
+ },
5804
+ "IncludeSignedTx": {
5805
+ "name": "include_signed_tx",
5806
+ "in": "query",
5807
+ "required": false,
5808
+ "description": "Set to `true` or `1` to include the raw signed transaction hex in the response. Omitted by default to reduce key exfiltration risk. Only the literal values \"true\" or \"1\" enable inclusion; any other value or omission returns responses without signed_tx. Applies to GET /v1/agents/{agent_id}/transactions and GET /v1/agents/{agent_id}/transactions/{tx_id}.\n",
5809
+ "schema": {
5810
+ "type": "boolean",
5811
+ "default": false,
5812
+ "example": false
5813
+ }
5814
+ }
5815
+ },
5816
+ "responses": {
5817
+ "BadRequest": {
5818
+ "description": "Invalid request",
5819
+ "content": {
5820
+ "application/json": {
5821
+ "schema": {
5822
+ "$ref": "#/components/schemas/ProblemDetails"
5823
+ }
5824
+ }
5825
+ }
5826
+ },
5827
+ "Unauthorized": {
5828
+ "description": "Authentication required or invalid",
5829
+ "content": {
5830
+ "application/json": {
5831
+ "schema": {
5832
+ "$ref": "#/components/schemas/ProblemDetails"
5833
+ }
5834
+ }
5835
+ }
5836
+ },
5837
+ "Forbidden": {
5838
+ "description": "Insufficient permissions",
5839
+ "content": {
5840
+ "application/json": {
5841
+ "schema": {
5842
+ "$ref": "#/components/schemas/ProblemDetails"
5843
+ }
5844
+ }
5845
+ }
5846
+ },
5847
+ "NotFound": {
5848
+ "description": "Resource not found",
5849
+ "content": {
5850
+ "application/json": {
5851
+ "schema": {
5852
+ "$ref": "#/components/schemas/ProblemDetails"
5853
+ }
5854
+ }
5855
+ }
5856
+ },
5857
+ "PaymentRequired": {
5858
+ "description": "x402 payment required",
5859
+ "content": {
5860
+ "application/json": {
5861
+ "schema": {
5238
5862
  "$ref": "#/components/schemas/PaymentRequirement"
5239
5863
  }
5240
5864
  }
@@ -8654,74 +9278,302 @@
8654
9278
  }
8655
9279
  }
8656
9280
  },
8657
- "LlmTokenBillingStatus": {
9281
+ "LlmTokenBillingStatus": {
9282
+ "type": "object",
9283
+ "required": [
9284
+ "enabled"
9285
+ ],
9286
+ "properties": {
9287
+ "enabled": {
9288
+ "type": "boolean"
9289
+ },
9290
+ "subscription_status": {
9291
+ "type": "string",
9292
+ "enum": [
9293
+ "active",
9294
+ "inactive"
9295
+ ]
9296
+ },
9297
+ "credit_balance": {
9298
+ "$ref": "#/components/schemas/LlmCreditBalance"
9299
+ },
9300
+ "billing_cycle_usage": {
9301
+ "$ref": "#/components/schemas/LlmBillingCycleUsage"
9302
+ }
9303
+ }
9304
+ },
9305
+ "LlmCheckoutResponse": {
9306
+ "type": "object",
9307
+ "properties": {
9308
+ "checkout_url": {
9309
+ "type": "string",
9310
+ "format": "uri"
9311
+ }
9312
+ }
9313
+ },
9314
+ "LlmDisableResponse": {
9315
+ "type": "object",
9316
+ "properties": {
9317
+ "enabled": {
9318
+ "type": "boolean"
9319
+ }
9320
+ }
9321
+ },
9322
+ "CreditBalanceResponse": {
9323
+ "type": "object",
9324
+ "properties": {
9325
+ "balance_cents": {
9326
+ "type": "integer"
9327
+ },
9328
+ "balance_usd": {
9329
+ "type": "string"
9330
+ },
9331
+ "expiring_within_90_days": {
9332
+ "type": "object",
9333
+ "properties": {
9334
+ "amount_cents": {
9335
+ "type": "integer"
9336
+ },
9337
+ "earliest_expiry": {
9338
+ "type": "string",
9339
+ "format": "date-time"
9340
+ }
9341
+ }
9342
+ }
9343
+ }
9344
+ },
9345
+ "CreditTransactionsListResponse": {
9346
+ "type": "object",
9347
+ "properties": {
9348
+ "transactions": {
9349
+ "type": "array",
9350
+ "items": {
9351
+ "type": "object",
9352
+ "properties": {
9353
+ "id": {
9354
+ "type": "string",
9355
+ "format": "uuid"
9356
+ },
9357
+ "type": {
9358
+ "type": "string"
9359
+ },
9360
+ "amount_cents": {
9361
+ "type": "integer"
9362
+ },
9363
+ "balance_after_cents": {
9364
+ "type": "integer"
9365
+ },
9366
+ "description": {
9367
+ "type": "string"
9368
+ },
9369
+ "created_at": {
9370
+ "type": "string",
9371
+ "format": "date-time"
9372
+ }
9373
+ }
9374
+ }
9375
+ },
9376
+ "page": {
9377
+ "type": "integer"
9378
+ },
9379
+ "limit": {
9380
+ "type": "integer"
9381
+ }
9382
+ }
9383
+ },
9384
+ "OverageMethodResponse": {
9385
+ "type": "object",
9386
+ "properties": {
9387
+ "overage_method": {
9388
+ "type": "string"
9389
+ }
9390
+ }
9391
+ },
9392
+ "AuditEventsResponse": {
9393
+ "type": "object",
9394
+ "properties": {
9395
+ "events": {
9396
+ "type": "array",
9397
+ "items": {
9398
+ "$ref": "#/components/schemas/AuditEvent"
9399
+ }
9400
+ },
9401
+ "count": {
9402
+ "type": "integer"
9403
+ }
9404
+ }
9405
+ },
9406
+ "AuditEvent": {
9407
+ "type": "object",
9408
+ "properties": {
9409
+ "id": {
9410
+ "type": "string",
9411
+ "format": "uuid"
9412
+ },
9413
+ "action": {
9414
+ "type": "string"
9415
+ },
9416
+ "actor_id": {
9417
+ "type": "string"
9418
+ },
9419
+ "actor_type": {
9420
+ "type": "string"
9421
+ },
9422
+ "resource_type": {
9423
+ "type": "string"
9424
+ },
9425
+ "resource_id": {
9426
+ "type": "string"
9427
+ },
9428
+ "org_id": {
9429
+ "type": "string",
9430
+ "format": "uuid"
9431
+ },
9432
+ "details": {
9433
+ "type": "object",
9434
+ "additionalProperties": true
9435
+ },
9436
+ "ip_address": {
9437
+ "type": "string"
9438
+ },
9439
+ "created_at": {
9440
+ "type": "string",
9441
+ "format": "date-time"
9442
+ }
9443
+ }
9444
+ },
9445
+ "CreateIpRuleRequest": {
9446
+ "type": "object",
9447
+ "required": [
9448
+ "rule_type",
9449
+ "cidr"
9450
+ ],
9451
+ "properties": {
9452
+ "rule_type": {
9453
+ "type": "string",
9454
+ "enum": [
9455
+ "allow",
9456
+ "deny"
9457
+ ]
9458
+ },
9459
+ "cidr": {
9460
+ "type": "string"
9461
+ },
9462
+ "label": {
9463
+ "type": "string"
9464
+ },
9465
+ "applies_to": {
9466
+ "type": "string"
9467
+ }
9468
+ }
9469
+ },
9470
+ "IpRuleResponse": {
9471
+ "type": "object",
9472
+ "properties": {
9473
+ "id": {
9474
+ "type": "string",
9475
+ "format": "uuid"
9476
+ },
9477
+ "org_id": {
9478
+ "type": "string",
9479
+ "format": "uuid"
9480
+ },
9481
+ "rule_type": {
9482
+ "type": "string"
9483
+ },
9484
+ "cidr": {
9485
+ "type": "string"
9486
+ },
9487
+ "label": {
9488
+ "type": "string"
9489
+ },
9490
+ "applies_to": {
9491
+ "type": "string"
9492
+ },
9493
+ "created_by": {
9494
+ "type": "string"
9495
+ },
9496
+ "created_at": {
9497
+ "type": "string",
9498
+ "format": "date-time"
9499
+ }
9500
+ }
9501
+ },
9502
+ "IpRulesListResponse": {
9503
+ "type": "object",
9504
+ "properties": {
9505
+ "rules": {
9506
+ "type": "array",
9507
+ "items": {
9508
+ "$ref": "#/components/schemas/IpRuleResponse"
9509
+ }
9510
+ }
9511
+ }
9512
+ },
9513
+ "SettingResponse": {
8658
9514
  "type": "object",
8659
- "required": [
8660
- "enabled"
8661
- ],
8662
9515
  "properties": {
8663
- "enabled": {
8664
- "type": "boolean"
9516
+ "key": {
9517
+ "type": "string"
8665
9518
  },
8666
- "subscription_status": {
8667
- "type": "string",
8668
- "enum": [
8669
- "active",
8670
- "inactive"
8671
- ]
9519
+ "value": {
9520
+ "type": "string"
8672
9521
  },
8673
- "credit_balance": {
8674
- "$ref": "#/components/schemas/LlmCreditBalance"
9522
+ "updated_by": {
9523
+ "type": "string"
8675
9524
  },
8676
- "billing_cycle_usage": {
8677
- "$ref": "#/components/schemas/LlmBillingCycleUsage"
9525
+ "updated_at": {
9526
+ "type": "string",
9527
+ "format": "date-time"
8678
9528
  }
8679
9529
  }
8680
9530
  },
8681
- "LlmCheckoutResponse": {
9531
+ "SettingsListResponse": {
8682
9532
  "type": "object",
8683
9533
  "properties": {
8684
- "checkout_url": {
8685
- "type": "string",
8686
- "format": "uri"
9534
+ "settings": {
9535
+ "type": "array",
9536
+ "items": {
9537
+ "$ref": "#/components/schemas/SettingResponse"
9538
+ }
8687
9539
  }
8688
9540
  }
8689
9541
  },
8690
- "LlmDisableResponse": {
9542
+ "UpdateSettingRequest": {
8691
9543
  "type": "object",
9544
+ "required": [
9545
+ "value"
9546
+ ],
8692
9547
  "properties": {
8693
- "enabled": {
8694
- "type": "boolean"
9548
+ "value": {
9549
+ "type": "string"
8695
9550
  }
8696
9551
  }
8697
9552
  },
8698
- "CreditBalanceResponse": {
9553
+ "X402ConfigResponse": {
8699
9554
  "type": "object",
8700
9555
  "properties": {
8701
- "balance_cents": {
8702
- "type": "integer"
9556
+ "pay_to": {
9557
+ "type": "string"
8703
9558
  },
8704
- "balance_usd": {
9559
+ "network": {
8705
9560
  "type": "string"
8706
9561
  },
8707
- "expiring_within_90_days": {
8708
- "type": "object",
8709
- "properties": {
8710
- "amount_cents": {
8711
- "type": "integer"
8712
- },
8713
- "earliest_expiry": {
8714
- "type": "string",
8715
- "format": "date-time"
8716
- }
8717
- }
9562
+ "scheme": {
9563
+ "type": "string"
9564
+ },
9565
+ "free_tier_limit": {
9566
+ "type": "integer"
9567
+ },
9568
+ "facilitator_url": {
9569
+ "type": "string"
8718
9570
  }
8719
9571
  }
8720
9572
  },
8721
- "CreditTransactionsListResponse": {
9573
+ "AdminUsersListResponse": {
8722
9574
  "type": "object",
8723
9575
  "properties": {
8724
- "transactions": {
9576
+ "users": {
8725
9577
  "type": "array",
8726
9578
  "items": {
8727
9579
  "type": "object",
@@ -8730,911 +9582,1122 @@
8730
9582
  "type": "string",
8731
9583
  "format": "uuid"
8732
9584
  },
8733
- "type": {
9585
+ "email": {
8734
9586
  "type": "string"
8735
9587
  },
8736
- "amount_cents": {
8737
- "type": "integer"
9588
+ "display_name": {
9589
+ "type": "string"
8738
9590
  },
8739
- "balance_after_cents": {
8740
- "type": "integer"
9591
+ "role": {
9592
+ "type": "string"
8741
9593
  },
8742
- "description": {
9594
+ "auth_method": {
9595
+ "type": "string"
9596
+ },
9597
+ "org_id": {
9598
+ "type": "string",
9599
+ "format": "uuid"
9600
+ },
9601
+ "org_name": {
9602
+ "type": "string"
9603
+ },
9604
+ "billing_tier": {
8743
9605
  "type": "string"
8744
9606
  },
8745
9607
  "created_at": {
8746
9608
  "type": "string",
8747
9609
  "format": "date-time"
9610
+ },
9611
+ "free_tier_override": {
9612
+ "type": "integer"
9613
+ },
9614
+ "is_sponsored": {
9615
+ "type": "boolean"
9616
+ },
9617
+ "current_month_requests": {
9618
+ "type": "integer"
8748
9619
  }
8749
9620
  }
8750
9621
  }
8751
9622
  },
8752
- "page": {
9623
+ "total": {
9624
+ "type": "integer"
9625
+ }
9626
+ }
9627
+ },
9628
+ "UpdateOrgLimitsRequest": {
9629
+ "type": "object",
9630
+ "properties": {
9631
+ "free_tier_override": {
8753
9632
  "type": "integer"
8754
9633
  },
8755
- "limit": {
9634
+ "is_sponsored": {
9635
+ "type": "boolean"
9636
+ }
9637
+ }
9638
+ },
9639
+ "OrgLimitsResponse": {
9640
+ "type": "object",
9641
+ "properties": {
9642
+ "org_id": {
9643
+ "type": "string",
9644
+ "format": "uuid"
9645
+ },
9646
+ "free_tier_override": {
8756
9647
  "type": "integer"
9648
+ },
9649
+ "is_sponsored": {
9650
+ "type": "boolean"
8757
9651
  }
8758
9652
  }
8759
9653
  },
8760
- "OverageMethodResponse": {
9654
+ "SetBillingTierRequest": {
8761
9655
  "type": "object",
9656
+ "required": [
9657
+ "tier"
9658
+ ],
8762
9659
  "properties": {
8763
- "overage_method": {
9660
+ "tier": {
9661
+ "type": "string",
9662
+ "enum": [
9663
+ "free",
9664
+ "pro",
9665
+ "business",
9666
+ "enterprise"
9667
+ ]
9668
+ },
9669
+ "duration_days": {
9670
+ "type": "integer",
9671
+ "description": "How many days the tier lasts (default 365). Use 90 for a 3-month trial.",
9672
+ "minimum": 1,
9673
+ "maximum": 3650
9674
+ }
9675
+ }
9676
+ },
9677
+ "CreateTreasuryRequest": {
9678
+ "type": "object",
9679
+ "required": [
9680
+ "name",
9681
+ "safe_address"
9682
+ ],
9683
+ "properties": {
9684
+ "name": {
9685
+ "type": "string",
9686
+ "description": "Display name (1–128 characters)"
9687
+ },
9688
+ "safe_address": {
9689
+ "type": "string",
9690
+ "description": "Deployed Safe contract address (0x-prefixed, 42 characters)"
9691
+ },
9692
+ "chain": {
9693
+ "type": "string",
9694
+ "description": "Chain name (default base)"
9695
+ },
9696
+ "chain_id": {
9697
+ "type": "integer",
9698
+ "description": "EVM chain ID (default 8453 for Base)"
9699
+ },
9700
+ "threshold": {
9701
+ "type": "integer",
9702
+ "minimum": 1,
9703
+ "description": "Safe threshold (default 1)"
9704
+ },
9705
+ "signers": {
9706
+ "type": "array",
9707
+ "items": {
9708
+ "$ref": "#/components/schemas/CreateTreasurySignerEntry"
9709
+ }
9710
+ }
9711
+ }
9712
+ },
9713
+ "CreateTreasurySignerEntry": {
9714
+ "type": "object",
9715
+ "required": [
9716
+ "signer_type",
9717
+ "signer_id",
9718
+ "signer_address"
9719
+ ],
9720
+ "properties": {
9721
+ "signer_type": {
9722
+ "type": "string",
9723
+ "enum": [
9724
+ "user",
9725
+ "agent"
9726
+ ]
9727
+ },
9728
+ "signer_id": {
9729
+ "type": "string",
9730
+ "format": "uuid"
9731
+ },
9732
+ "signer_address": {
9733
+ "type": "string",
9734
+ "description": "EVM address (0x-prefixed)"
9735
+ }
9736
+ }
9737
+ },
9738
+ "UpdateTreasuryRequest": {
9739
+ "type": "object",
9740
+ "properties": {
9741
+ "name": {
8764
9742
  "type": "string"
9743
+ },
9744
+ "threshold": {
9745
+ "type": "integer",
9746
+ "minimum": 1
8765
9747
  }
8766
9748
  }
8767
9749
  },
8768
- "AuditEventsResponse": {
9750
+ "TreasuryResponse": {
8769
9751
  "type": "object",
8770
9752
  "properties": {
8771
- "events": {
9753
+ "id": {
9754
+ "type": "string",
9755
+ "format": "uuid"
9756
+ },
9757
+ "name": {
9758
+ "type": "string"
9759
+ },
9760
+ "safe_address": {
9761
+ "type": "string"
9762
+ },
9763
+ "chain": {
9764
+ "type": "string"
9765
+ },
9766
+ "chain_id": {
9767
+ "type": "integer"
9768
+ },
9769
+ "threshold": {
9770
+ "type": "integer"
9771
+ },
9772
+ "created_by": {
9773
+ "type": "string",
9774
+ "format": "uuid"
9775
+ },
9776
+ "signers": {
8772
9777
  "type": "array",
8773
9778
  "items": {
8774
- "$ref": "#/components/schemas/AuditEvent"
9779
+ "$ref": "#/components/schemas/TreasurySignerResponse"
8775
9780
  }
8776
9781
  },
8777
- "count": {
8778
- "type": "integer"
9782
+ "created_at": {
9783
+ "type": "string",
9784
+ "format": "date-time"
8779
9785
  }
8780
9786
  }
8781
9787
  },
8782
- "AuditEvent": {
9788
+ "TreasurySignerResponse": {
8783
9789
  "type": "object",
8784
9790
  "properties": {
8785
9791
  "id": {
8786
9792
  "type": "string",
8787
9793
  "format": "uuid"
8788
9794
  },
8789
- "action": {
8790
- "type": "string"
8791
- },
8792
- "actor_id": {
8793
- "type": "string"
8794
- },
8795
- "actor_type": {
8796
- "type": "string"
8797
- },
8798
- "resource_type": {
8799
- "type": "string"
8800
- },
8801
- "resource_id": {
8802
- "type": "string"
9795
+ "signer_type": {
9796
+ "type": "string",
9797
+ "enum": [
9798
+ "user",
9799
+ "agent"
9800
+ ]
8803
9801
  },
8804
- "org_id": {
9802
+ "signer_id": {
8805
9803
  "type": "string",
8806
9804
  "format": "uuid"
8807
9805
  },
8808
- "details": {
8809
- "type": "object",
8810
- "additionalProperties": true
8811
- },
8812
- "ip_address": {
9806
+ "signer_address": {
8813
9807
  "type": "string"
8814
9808
  },
8815
- "created_at": {
9809
+ "added_at": {
8816
9810
  "type": "string",
8817
9811
  "format": "date-time"
8818
9812
  }
8819
9813
  }
8820
9814
  },
8821
- "CreateIpRuleRequest": {
9815
+ "AddSignerRequest": {
8822
9816
  "type": "object",
8823
9817
  "required": [
8824
- "rule_type",
8825
- "cidr"
9818
+ "signer_type",
9819
+ "signer_id",
9820
+ "signer_address"
8826
9821
  ],
8827
9822
  "properties": {
8828
- "rule_type": {
9823
+ "signer_type": {
8829
9824
  "type": "string",
8830
9825
  "enum": [
8831
- "allow",
8832
- "deny"
9826
+ "user",
9827
+ "agent"
8833
9828
  ]
8834
9829
  },
8835
- "cidr": {
8836
- "type": "string"
8837
- },
8838
- "label": {
8839
- "type": "string"
9830
+ "signer_id": {
9831
+ "type": "string",
9832
+ "format": "uuid"
8840
9833
  },
8841
- "applies_to": {
9834
+ "signer_address": {
8842
9835
  "type": "string"
8843
9836
  }
8844
9837
  }
8845
9838
  },
8846
- "IpRuleResponse": {
9839
+ "AccessRequestResponse": {
8847
9840
  "type": "object",
8848
9841
  "properties": {
8849
9842
  "id": {
8850
9843
  "type": "string",
8851
9844
  "format": "uuid"
8852
9845
  },
8853
- "org_id": {
9846
+ "treasury_id": {
8854
9847
  "type": "string",
8855
9848
  "format": "uuid"
8856
9849
  },
8857
- "rule_type": {
8858
- "type": "string"
9850
+ "agent_id": {
9851
+ "type": "string",
9852
+ "format": "uuid"
8859
9853
  },
8860
- "cidr": {
8861
- "type": "string"
9854
+ "status": {
9855
+ "type": "string",
9856
+ "enum": [
9857
+ "pending",
9858
+ "approved",
9859
+ "denied"
9860
+ ]
8862
9861
  },
8863
- "label": {
9862
+ "reason": {
8864
9863
  "type": "string"
8865
9864
  },
8866
- "applies_to": {
8867
- "type": "string"
9865
+ "requested_at": {
9866
+ "type": "string",
9867
+ "format": "date-time"
8868
9868
  },
8869
- "created_by": {
8870
- "type": "string"
9869
+ "resolved_by": {
9870
+ "type": "string",
9871
+ "format": "uuid"
8871
9872
  },
8872
- "created_at": {
9873
+ "resolved_at": {
8873
9874
  "type": "string",
8874
9875
  "format": "date-time"
8875
9876
  }
8876
9877
  }
8877
9878
  },
8878
- "IpRulesListResponse": {
9879
+ "GenerateTreasuryWalletsRequest": {
8879
9880
  "type": "object",
8880
9881
  "properties": {
8881
- "rules": {
9882
+ "chains": {
8882
9883
  "type": "array",
8883
9884
  "items": {
8884
- "$ref": "#/components/schemas/IpRuleResponse"
8885
- }
9885
+ "type": "string"
9886
+ },
9887
+ "description": "Chains to generate wallets for (e.g. [\"ethereum\", \"solana\"]). Omit for all supported chains."
8886
9888
  }
8887
9889
  }
8888
9890
  },
8889
- "SettingResponse": {
9891
+ "TreasuryWalletResponse": {
8890
9892
  "type": "object",
8891
9893
  "properties": {
8892
- "key": {
9894
+ "id": {
9895
+ "type": "string",
9896
+ "format": "uuid"
9897
+ },
9898
+ "chain": {
8893
9899
  "type": "string"
8894
9900
  },
8895
- "value": {
9901
+ "curve": {
9902
+ "type": "string",
9903
+ "description": "Cryptographic curve (e.g. secp256k1, ed25519)"
9904
+ },
9905
+ "public_key_hex": {
8896
9906
  "type": "string"
8897
9907
  },
8898
- "updated_by": {
9908
+ "address": {
8899
9909
  "type": "string"
8900
9910
  },
8901
- "updated_at": {
9911
+ "is_active": {
9912
+ "type": "boolean"
9913
+ },
9914
+ "created_at": {
8902
9915
  "type": "string",
8903
9916
  "format": "date-time"
8904
9917
  }
8905
9918
  }
8906
9919
  },
8907
- "SettingsListResponse": {
9920
+ "TreasuryWalletListResponse": {
8908
9921
  "type": "object",
8909
9922
  "properties": {
8910
- "settings": {
9923
+ "wallets": {
8911
9924
  "type": "array",
8912
9925
  "items": {
8913
- "$ref": "#/components/schemas/SettingResponse"
9926
+ "$ref": "#/components/schemas/TreasuryWalletResponse"
8914
9927
  }
8915
9928
  }
8916
9929
  }
8917
9930
  },
8918
- "UpdateSettingRequest": {
8919
- "type": "object",
8920
- "required": [
8921
- "value"
8922
- ],
8923
- "properties": {
8924
- "value": {
8925
- "type": "string"
8926
- }
8927
- }
8928
- },
8929
- "X402ConfigResponse": {
9931
+ "TreasuryWalletExportResponse": {
8930
9932
  "type": "object",
8931
9933
  "properties": {
8932
- "pay_to": {
8933
- "type": "string"
8934
- },
8935
- "network": {
9934
+ "chain": {
8936
9935
  "type": "string"
8937
9936
  },
8938
- "scheme": {
9937
+ "address": {
8939
9938
  "type": "string"
8940
9939
  },
8941
- "free_tier_limit": {
8942
- "type": "integer"
8943
- },
8944
- "facilitator_url": {
8945
- "type": "string"
9940
+ "private_key_hex": {
9941
+ "type": "string",
9942
+ "description": "Raw private key in hex encoding. Handle with extreme care."
8946
9943
  }
8947
9944
  }
8948
9945
  },
8949
- "AdminUsersListResponse": {
9946
+ "PaymentRequirement": {
8950
9947
  "type": "object",
8951
9948
  "properties": {
8952
- "users": {
9949
+ "x402Version": {
9950
+ "type": "integer"
9951
+ },
9952
+ "accepts": {
8953
9953
  "type": "array",
8954
9954
  "items": {
8955
9955
  "type": "object",
8956
9956
  "properties": {
8957
- "id": {
8958
- "type": "string",
8959
- "format": "uuid"
8960
- },
8961
- "email": {
8962
- "type": "string"
8963
- },
8964
- "display_name": {
8965
- "type": "string"
8966
- },
8967
- "role": {
9957
+ "scheme": {
8968
9958
  "type": "string"
8969
9959
  },
8970
- "auth_method": {
9960
+ "network": {
8971
9961
  "type": "string"
8972
9962
  },
8973
- "org_id": {
8974
- "type": "string",
8975
- "format": "uuid"
8976
- },
8977
- "org_name": {
9963
+ "payTo": {
8978
9964
  "type": "string"
8979
9965
  },
8980
- "billing_tier": {
9966
+ "price": {
8981
9967
  "type": "string"
8982
9968
  },
8983
- "created_at": {
8984
- "type": "string",
8985
- "format": "date-time"
8986
- },
8987
- "free_tier_override": {
8988
- "type": "integer"
8989
- },
8990
- "is_sponsored": {
8991
- "type": "boolean"
8992
- },
8993
- "current_month_requests": {
9969
+ "requiredDeadlineSeconds": {
8994
9970
  "type": "integer"
8995
9971
  }
8996
9972
  }
8997
9973
  }
8998
9974
  },
8999
- "total": {
9000
- "type": "integer"
9975
+ "description": {
9976
+ "type": "string"
9001
9977
  }
9002
9978
  }
9003
9979
  },
9004
- "UpdateOrgLimitsRequest": {
9980
+ "ShroudActivityEvent": {
9005
9981
  "type": "object",
9006
9982
  "properties": {
9007
- "free_tier_override": {
9983
+ "id": {
9984
+ "type": "string",
9985
+ "format": "uuid"
9986
+ },
9987
+ "org_id": {
9988
+ "type": "string",
9989
+ "format": "uuid"
9990
+ },
9991
+ "agent_id": {
9992
+ "type": "string"
9993
+ },
9994
+ "provider": {
9995
+ "type": "string"
9996
+ },
9997
+ "model": {
9998
+ "type": "string"
9999
+ },
10000
+ "action": {
10001
+ "type": "string",
10002
+ "description": "Action taken (allowed, blocked, warned)"
10003
+ },
10004
+ "request_tokens": {
10005
+ "type": "integer"
10006
+ },
10007
+ "response_tokens": {
9008
10008
  "type": "integer"
9009
10009
  },
9010
- "is_sponsored": {
9011
- "type": "boolean"
9012
- }
9013
- }
9014
- },
9015
- "OrgLimitsResponse": {
9016
- "type": "object",
9017
- "properties": {
9018
- "org_id": {
9019
- "type": "string",
9020
- "format": "uuid"
10010
+ "latency_ms": {
10011
+ "type": "integer"
10012
+ },
10013
+ "had_secrets_redacted": {
10014
+ "type": "boolean"
10015
+ },
10016
+ "had_pii_detected": {
10017
+ "type": "boolean"
10018
+ },
10019
+ "injection_score": {
10020
+ "type": "number"
10021
+ },
10022
+ "policy_violations": {
10023
+ "type": "array",
10024
+ "items": {
10025
+ "type": "string"
10026
+ }
10027
+ },
10028
+ "response_injection_score": {
10029
+ "type": "number",
10030
+ "description": "Response-side prompt-injection score (0.0–1.0)."
10031
+ },
10032
+ "response_context_injection_score": {
10033
+ "type": "number",
10034
+ "description": "Response-side context-injection score (0.0–1.0)."
9021
10035
  },
9022
- "free_tier_override": {
9023
- "type": "integer"
10036
+ "response_injection_categories": {
10037
+ "type": "array",
10038
+ "items": {
10039
+ "type": "string"
10040
+ },
10041
+ "description": "Category tags emitted by the response-side filters (e.g. `markdown_image_exfil`, `data_uri_blob`, `echoed_instruction`)."
9024
10042
  },
9025
- "is_sponsored": {
9026
- "type": "boolean"
9027
- }
9028
- }
9029
- },
9030
- "SetBillingTierRequest": {
9031
- "type": "object",
9032
- "required": [
9033
- "tier"
9034
- ],
9035
- "properties": {
9036
- "tier": {
9037
- "type": "string",
9038
- "enum": [
9039
- "free",
9040
- "pro",
9041
- "business",
9042
- "enterprise"
9043
- ]
10043
+ "external_urls_flagged": {
10044
+ "type": "array",
10045
+ "items": {
10046
+ "type": "string"
10047
+ },
10048
+ "description": "URLs emitted by the model that were flagged as potential exfil / callback targets."
9044
10049
  },
9045
- "duration_days": {
10050
+ "unexpected_code_blocks": {
9046
10051
  "type": "integer",
9047
- "description": "How many days the tier lasts (default 365). Use 90 for a 3-month trial.",
9048
- "minimum": 1,
9049
- "maximum": 3650
10052
+ "description": "Number of code fences in the response that were not expected for the agent's allowed task set."
10053
+ },
10054
+ "content_filtered": {
10055
+ "type": "boolean",
10056
+ "description": "True when Shroud rewrote or blocked response content before returning it to the agent."
10057
+ },
10058
+ "metadata": {
10059
+ "type": "object"
10060
+ },
10061
+ "timestamp": {
10062
+ "type": "string",
10063
+ "format": "date-time"
9050
10064
  }
9051
10065
  }
9052
10066
  },
9053
- "CreateTreasuryRequest": {
10067
+ "IngestShroudActivityRequest": {
9054
10068
  "type": "object",
9055
10069
  "required": [
9056
- "name",
9057
- "safe_address"
10070
+ "agent_id",
10071
+ "action"
9058
10072
  ],
9059
10073
  "properties": {
9060
- "name": {
9061
- "type": "string",
9062
- "description": "Display name (1–128 characters)"
10074
+ "agent_id": {
10075
+ "type": "string"
9063
10076
  },
9064
- "safe_address": {
9065
- "type": "string",
9066
- "description": "Deployed Safe contract address (0x-prefixed, 42 characters)"
10077
+ "provider": {
10078
+ "type": "string"
9067
10079
  },
9068
- "chain": {
9069
- "type": "string",
9070
- "description": "Chain name (default base)"
10080
+ "model": {
10081
+ "type": "string"
9071
10082
  },
9072
- "chain_id": {
10083
+ "action": {
10084
+ "type": "string"
10085
+ },
10086
+ "request_tokens": {
9073
10087
  "type": "integer",
9074
- "description": "EVM chain ID (default 8453 for Base)"
10088
+ "default": 0
9075
10089
  },
9076
- "threshold": {
10090
+ "response_tokens": {
9077
10091
  "type": "integer",
9078
- "minimum": 1,
9079
- "description": "Safe threshold (default 1)"
10092
+ "default": 0
9080
10093
  },
9081
- "signers": {
10094
+ "latency_ms": {
10095
+ "type": "integer"
10096
+ },
10097
+ "had_secrets_redacted": {
10098
+ "type": "boolean",
10099
+ "default": false
10100
+ },
10101
+ "had_pii_detected": {
10102
+ "type": "boolean",
10103
+ "default": false
10104
+ },
10105
+ "injection_score": {
10106
+ "type": "number",
10107
+ "default": 0
10108
+ },
10109
+ "policy_violations": {
9082
10110
  "type": "array",
9083
10111
  "items": {
9084
- "$ref": "#/components/schemas/CreateTreasurySignerEntry"
10112
+ "type": "string"
10113
+ }
10114
+ },
10115
+ "metadata": {
10116
+ "type": "object"
10117
+ },
10118
+ "response_injection_score": {
10119
+ "type": "number",
10120
+ "default": 0
10121
+ },
10122
+ "response_context_injection_score": {
10123
+ "type": "number",
10124
+ "default": 0
10125
+ },
10126
+ "response_injection_categories": {
10127
+ "type": "array",
10128
+ "items": {
10129
+ "type": "string"
10130
+ }
10131
+ },
10132
+ "external_urls_flagged": {
10133
+ "type": "array",
10134
+ "items": {
10135
+ "type": "string"
9085
10136
  }
10137
+ },
10138
+ "unexpected_code_blocks": {
10139
+ "type": "integer",
10140
+ "default": 0
10141
+ },
10142
+ "content_filtered": {
10143
+ "type": "boolean",
10144
+ "default": false
9086
10145
  }
9087
10146
  }
9088
10147
  },
9089
- "CreateTreasurySignerEntry": {
10148
+ "ShroudThreatSummary": {
9090
10149
  "type": "object",
9091
- "required": [
9092
- "signer_type",
9093
- "signer_id",
9094
- "signer_address"
9095
- ],
9096
10150
  "properties": {
9097
- "signer_type": {
9098
- "type": "string",
9099
- "enum": [
9100
- "user",
9101
- "agent"
9102
- ]
10151
+ "total_requests": {
10152
+ "type": "integer",
10153
+ "format": "int64"
9103
10154
  },
9104
- "signer_id": {
9105
- "type": "string",
9106
- "format": "uuid"
10155
+ "total_requests_prev": {
10156
+ "type": "integer",
10157
+ "format": "int64"
9107
10158
  },
9108
- "signer_address": {
9109
- "type": "string",
9110
- "description": "EVM address (0x-prefixed)"
10159
+ "blocked_requests": {
10160
+ "type": "integer",
10161
+ "format": "int64"
10162
+ },
10163
+ "detectors_triggered": {
10164
+ "type": "integer",
10165
+ "format": "int64"
10166
+ },
10167
+ "active_agents": {
10168
+ "type": "integer",
10169
+ "format": "int64"
10170
+ },
10171
+ "detectors": {
10172
+ "type": "array",
10173
+ "items": {
10174
+ "$ref": "#/components/schemas/ShroudDetectorStats"
10175
+ }
10176
+ },
10177
+ "flagged_requests": {
10178
+ "type": "array",
10179
+ "items": {
10180
+ "$ref": "#/components/schemas/ShroudFlaggedRequest"
10181
+ }
9111
10182
  }
9112
10183
  }
9113
10184
  },
9114
- "UpdateTreasuryRequest": {
10185
+ "ShroudDetectorStats": {
9115
10186
  "type": "object",
9116
10187
  "properties": {
9117
- "name": {
10188
+ "detector": {
9118
10189
  "type": "string"
9119
10190
  },
9120
- "threshold": {
10191
+ "detections": {
9121
10192
  "type": "integer",
9122
- "minimum": 1
10193
+ "format": "int64"
10194
+ },
10195
+ "blocks": {
10196
+ "type": "integer",
10197
+ "format": "int64"
10198
+ },
10199
+ "actions": {
10200
+ "type": "object",
10201
+ "properties": {
10202
+ "blocked": {
10203
+ "type": "integer",
10204
+ "format": "int64"
10205
+ },
10206
+ "warned": {
10207
+ "type": "integer",
10208
+ "format": "int64"
10209
+ },
10210
+ "logged": {
10211
+ "type": "integer",
10212
+ "format": "int64"
10213
+ }
10214
+ }
9123
10215
  }
9124
10216
  }
9125
10217
  },
9126
- "TreasuryResponse": {
10218
+ "ShroudFlaggedRequest": {
9127
10219
  "type": "object",
9128
10220
  "properties": {
9129
10221
  "id": {
9130
- "type": "string",
9131
- "format": "uuid"
9132
- },
9133
- "name": {
9134
10222
  "type": "string"
9135
10223
  },
9136
- "safe_address": {
9137
- "type": "string"
10224
+ "timestamp": {
10225
+ "type": "string",
10226
+ "format": "date-time"
9138
10227
  },
9139
- "chain": {
10228
+ "agent_id": {
9140
10229
  "type": "string"
9141
10230
  },
9142
- "chain_id": {
9143
- "type": "integer"
9144
- },
9145
- "threshold": {
9146
- "type": "integer"
10231
+ "agent_name": {
10232
+ "type": "string"
9147
10233
  },
9148
- "created_by": {
9149
- "type": "string",
9150
- "format": "uuid"
10234
+ "score": {
10235
+ "type": "number"
9151
10236
  },
9152
- "signers": {
9153
- "type": "array",
9154
- "items": {
9155
- "$ref": "#/components/schemas/TreasurySignerResponse"
9156
- }
10237
+ "reason": {
10238
+ "type": "string"
9157
10239
  },
9158
- "created_at": {
10240
+ "action": {
9159
10241
  "type": "string",
9160
- "format": "date-time"
10242
+ "enum": [
10243
+ "blocked",
10244
+ "warned",
10245
+ "logged"
10246
+ ]
9161
10247
  }
9162
10248
  }
9163
10249
  },
9164
- "TreasurySignerResponse": {
10250
+ "HealthResponse": {
9165
10251
  "type": "object",
9166
10252
  "properties": {
9167
- "id": {
9168
- "type": "string",
9169
- "format": "uuid"
9170
- },
9171
- "signer_type": {
10253
+ "status": {
9172
10254
  "type": "string",
9173
10255
  "enum": [
9174
- "user",
9175
- "agent"
10256
+ "healthy",
10257
+ "degraded"
9176
10258
  ]
9177
10259
  },
9178
- "signer_id": {
9179
- "type": "string",
9180
- "format": "uuid"
9181
- },
9182
- "signer_address": {
10260
+ "version": {
9183
10261
  "type": "string"
9184
- },
9185
- "added_at": {
9186
- "type": "string",
9187
- "format": "date-time"
9188
10262
  }
9189
10263
  }
9190
10264
  },
9191
- "AddSignerRequest": {
10265
+ "CreatePlatformAppRequest": {
9192
10266
  "type": "object",
9193
10267
  "required": [
9194
- "signer_type",
9195
- "signer_id",
9196
- "signer_address"
10268
+ "name",
10269
+ "slug"
9197
10270
  ],
9198
10271
  "properties": {
9199
- "signer_type": {
9200
- "type": "string",
9201
- "enum": [
9202
- "user",
9203
- "agent"
9204
- ]
10272
+ "name": {
10273
+ "type": "string"
9205
10274
  },
9206
- "signer_id": {
10275
+ "slug": {
9207
10276
  "type": "string",
9208
- "format": "uuid"
10277
+ "minLength": 3,
10278
+ "maxLength": 64,
10279
+ "pattern": "^[a-zA-Z0-9_-]+$"
9209
10280
  },
9210
- "signer_address": {
10281
+ "description": {
9211
10282
  "type": "string"
9212
- }
9213
- }
9214
- },
9215
- "AccessRequestResponse": {
9216
- "type": "object",
9217
- "properties": {
9218
- "id": {
9219
- "type": "string",
9220
- "format": "uuid"
9221
10283
  },
9222
- "treasury_id": {
10284
+ "oidc_jwks_url": {
9223
10285
  "type": "string",
9224
- "format": "uuid"
10286
+ "format": "uri"
9225
10287
  },
9226
- "agent_id": {
10288
+ "oidc_issuer": {
9227
10289
  "type": "string",
9228
- "format": "uuid"
10290
+ "format": "uri"
9229
10291
  },
9230
- "status": {
10292
+ "oidc_audience": {
9231
10293
  "type": "string",
9232
- "enum": [
9233
- "pending",
9234
- "approved",
9235
- "denied"
9236
- ]
10294
+ "description": "Expected audience claim for OIDC token validation"
9237
10295
  },
9238
- "reason": {
9239
- "type": "string"
10296
+ "redirect_uris": {
10297
+ "type": "array",
10298
+ "items": {
10299
+ "type": "string",
10300
+ "format": "uri"
10301
+ }
9240
10302
  },
9241
- "requested_at": {
10303
+ "billing_model": {
9242
10304
  "type": "string",
9243
- "format": "date-time"
10305
+ "enum": [
10306
+ "platform_pays",
10307
+ "user_pays",
10308
+ "hybrid"
10309
+ ],
10310
+ "default": "platform_pays"
9244
10311
  },
9245
- "resolved_by": {
10312
+ "auth_mode": {
9246
10313
  "type": "string",
9247
- "format": "uuid"
10314
+ "enum": [
10315
+ "silent",
10316
+ "user_signin",
10317
+ "configurable"
10318
+ ],
10319
+ "default": "silent"
9248
10320
  },
9249
- "resolved_at": {
9250
- "type": "string",
9251
- "format": "date-time"
9252
- }
9253
- }
9254
- },
9255
- "GenerateTreasuryWalletsRequest": {
9256
- "type": "object",
9257
- "properties": {
9258
- "chains": {
9259
- "type": "array",
9260
- "items": {
9261
- "type": "string"
9262
- },
9263
- "description": "Chains to generate wallets for (e.g. [\"ethereum\", \"solana\"]). Omit for all supported chains."
10321
+ "max_connected_users": {
10322
+ "type": "integer",
10323
+ "nullable": true
9264
10324
  }
9265
10325
  }
9266
10326
  },
9267
- "TreasuryWalletResponse": {
10327
+ "UpdatePlatformAppRequest": {
9268
10328
  "type": "object",
9269
10329
  "properties": {
9270
- "id": {
9271
- "type": "string",
9272
- "format": "uuid"
9273
- },
9274
- "chain": {
10330
+ "name": {
9275
10331
  "type": "string"
9276
10332
  },
9277
- "curve": {
9278
- "type": "string",
9279
- "description": "Cryptographic curve (e.g. secp256k1, ed25519)"
10333
+ "description": {
10334
+ "type": "string"
9280
10335
  },
9281
- "public_key_hex": {
10336
+ "logo_url": {
9282
10337
  "type": "string"
9283
10338
  },
9284
- "address": {
10339
+ "oidc_jwks_url": {
9285
10340
  "type": "string"
9286
10341
  },
9287
- "is_active": {
9288
- "type": "boolean"
10342
+ "oidc_issuer": {
10343
+ "type": "string"
9289
10344
  },
9290
- "created_at": {
10345
+ "oidc_audience": {
9291
10346
  "type": "string",
9292
- "format": "date-time"
9293
- }
9294
- }
9295
- },
9296
- "TreasuryWalletListResponse": {
9297
- "type": "object",
9298
- "properties": {
9299
- "wallets": {
10347
+ "description": "Expected audience claim for OIDC token validation"
10348
+ },
10349
+ "redirect_uris": {
9300
10350
  "type": "array",
9301
10351
  "items": {
9302
- "$ref": "#/components/schemas/TreasuryWalletResponse"
10352
+ "type": "string"
9303
10353
  }
9304
- }
9305
- }
9306
- },
9307
- "TreasuryWalletExportResponse": {
9308
- "type": "object",
9309
- "properties": {
9310
- "chain": {
9311
- "type": "string"
9312
10354
  },
9313
- "address": {
10355
+ "webhook_url": {
9314
10356
  "type": "string"
9315
10357
  },
9316
- "private_key_hex": {
10358
+ "billing_model": {
9317
10359
  "type": "string",
9318
- "description": "Raw private key in hex encoding. Handle with extreme care."
9319
- }
9320
- }
9321
- },
9322
- "PaymentRequirement": {
9323
- "type": "object",
9324
- "properties": {
9325
- "x402Version": {
9326
- "type": "integer"
10360
+ "enum": [
10361
+ "platform_pays",
10362
+ "user_pays",
10363
+ "hybrid"
10364
+ ]
9327
10365
  },
9328
- "accepts": {
9329
- "type": "array",
9330
- "items": {
9331
- "type": "object",
9332
- "properties": {
9333
- "scheme": {
9334
- "type": "string"
9335
- },
9336
- "network": {
9337
- "type": "string"
9338
- },
9339
- "payTo": {
9340
- "type": "string"
9341
- },
9342
- "price": {
9343
- "type": "string"
9344
- },
9345
- "requiredDeadlineSeconds": {
9346
- "type": "integer"
9347
- }
9348
- }
9349
- }
10366
+ "auth_mode": {
10367
+ "type": "string",
10368
+ "enum": [
10369
+ "silent",
10370
+ "user_signin",
10371
+ "configurable"
10372
+ ]
9350
10373
  },
9351
- "description": {
9352
- "type": "string"
10374
+ "max_connected_users": {
10375
+ "type": "integer",
10376
+ "nullable": true
10377
+ },
10378
+ "is_active": {
10379
+ "type": "boolean"
9353
10380
  }
9354
10381
  }
9355
10382
  },
9356
- "ShroudActivityEvent": {
10383
+ "PlatformAppResponse": {
9357
10384
  "type": "object",
9358
10385
  "properties": {
9359
10386
  "id": {
9360
10387
  "type": "string",
9361
10388
  "format": "uuid"
9362
10389
  },
9363
- "org_id": {
9364
- "type": "string",
9365
- "format": "uuid"
9366
- },
9367
- "agent_id": {
10390
+ "name": {
9368
10391
  "type": "string"
9369
10392
  },
9370
- "provider": {
10393
+ "slug": {
9371
10394
  "type": "string"
9372
10395
  },
9373
- "model": {
10396
+ "description": {
9374
10397
  "type": "string"
9375
10398
  },
9376
- "action": {
10399
+ "logo_url": {
9377
10400
  "type": "string",
9378
- "description": "Action taken (allowed, blocked, warned)"
9379
- },
9380
- "request_tokens": {
9381
- "type": "integer"
9382
- },
9383
- "response_tokens": {
9384
- "type": "integer"
10401
+ "nullable": true
9385
10402
  },
9386
- "latency_ms": {
9387
- "type": "integer"
10403
+ "api_key_prefix": {
10404
+ "type": "string"
9388
10405
  },
9389
- "had_secrets_redacted": {
9390
- "type": "boolean"
10406
+ "oidc_jwks_url": {
10407
+ "type": "string",
10408
+ "nullable": true
9391
10409
  },
9392
- "had_pii_detected": {
9393
- "type": "boolean"
10410
+ "oidc_issuer": {
10411
+ "type": "string",
10412
+ "nullable": true
9394
10413
  },
9395
- "injection_score": {
9396
- "type": "number"
10414
+ "oidc_audience": {
10415
+ "type": "string",
10416
+ "nullable": true,
10417
+ "description": "Expected audience claim for OIDC token validation"
9397
10418
  },
9398
- "policy_violations": {
10419
+ "redirect_uris": {
9399
10420
  "type": "array",
9400
10421
  "items": {
9401
10422
  "type": "string"
9402
10423
  }
9403
10424
  },
9404
- "response_injection_score": {
9405
- "type": "number",
9406
- "description": "Response-side prompt-injection score (0.0–1.0)."
10425
+ "webhook_url": {
10426
+ "type": "string",
10427
+ "nullable": true
9407
10428
  },
9408
- "response_context_injection_score": {
9409
- "type": "number",
9410
- "description": "Response-side context-injection score (0.0–1.0)."
10429
+ "is_active": {
10430
+ "type": "boolean"
9411
10431
  },
9412
- "response_injection_categories": {
9413
- "type": "array",
9414
- "items": {
9415
- "type": "string"
9416
- },
9417
- "description": "Category tags emitted by the response-side filters (e.g. `markdown_image_exfil`, `data_uri_blob`, `echoed_instruction`)."
10432
+ "billing_model": {
10433
+ "type": "string"
9418
10434
  },
9419
- "external_urls_flagged": {
9420
- "type": "array",
9421
- "items": {
9422
- "type": "string"
9423
- },
9424
- "description": "URLs emitted by the model that were flagged as potential exfil / callback targets."
10435
+ "auth_mode": {
10436
+ "type": "string"
9425
10437
  },
9426
- "unexpected_code_blocks": {
10438
+ "max_connected_users": {
9427
10439
  "type": "integer",
9428
- "description": "Number of code fences in the response that were not expected for the agent's allowed task set."
9429
- },
9430
- "content_filtered": {
9431
- "type": "boolean",
9432
- "description": "True when Shroud rewrote or blocked response content before returning it to the agent."
10440
+ "nullable": true
9433
10441
  },
9434
- "metadata": {
9435
- "type": "object"
10442
+ "connected_users": {
10443
+ "type": "integer"
9436
10444
  },
9437
- "timestamp": {
10445
+ "created_at": {
10446
+ "type": "string",
10447
+ "format": "date-time"
10448
+ },
10449
+ "updated_at": {
9438
10450
  "type": "string",
9439
10451
  "format": "date-time"
9440
10452
  }
9441
10453
  }
9442
10454
  },
9443
- "IngestShroudActivityRequest": {
10455
+ "PlatformAppCreatedResponse": {
10456
+ "allOf": [
10457
+ {
10458
+ "$ref": "#/components/schemas/PlatformAppResponse"
10459
+ },
10460
+ {
10461
+ "type": "object",
10462
+ "required": [
10463
+ "api_key"
10464
+ ],
10465
+ "properties": {
10466
+ "api_key": {
10467
+ "type": "string",
10468
+ "description": "The platform API key. Save immediately - it cannot be retrieved again."
10469
+ }
10470
+ }
10471
+ }
10472
+ ]
10473
+ },
10474
+ "CreateTemplateRequest": {
9444
10475
  "type": "object",
9445
10476
  "required": [
9446
- "agent_id",
9447
- "action"
10477
+ "name",
10478
+ "spec"
9448
10479
  ],
9449
10480
  "properties": {
9450
- "agent_id": {
10481
+ "name": {
9451
10482
  "type": "string"
9452
10483
  },
9453
- "provider": {
10484
+ "description": {
9454
10485
  "type": "string"
9455
10486
  },
9456
- "model": {
9457
- "type": "string"
10487
+ "spec": {
10488
+ "type": "object",
10489
+ "description": "Template specification defining vault, agents, policies, and signing keys to bootstrap.\nTop-level fields: `vault` (object with name, description), `agents` (array of agent specs\nwith name, description, shroud_enabled, intents, shroud_config), `policies` (array with\nvault_ref, principal_ref, paths, permissions, conditions), and `signing_keys` (array of\n`{ chain }` objects — supported chains: ethereum, bitcoin, solana, xrp, cardano, tron).\nWhen `signing_keys` is present, HSM-backed signing keys are auto-provisioned for the\nbootstrapped agent.\n"
10490
+ }
10491
+ }
10492
+ },
10493
+ "PlatformTemplateResponse": {
10494
+ "type": "object",
10495
+ "properties": {
10496
+ "id": {
10497
+ "type": "string",
10498
+ "format": "uuid"
9458
10499
  },
9459
- "action": {
9460
- "type": "string"
10500
+ "platform_app_id": {
10501
+ "type": "string",
10502
+ "format": "uuid"
9461
10503
  },
9462
- "request_tokens": {
9463
- "type": "integer",
9464
- "default": 0
10504
+ "name": {
10505
+ "type": "string"
9465
10506
  },
9466
- "response_tokens": {
9467
- "type": "integer",
9468
- "default": 0
10507
+ "description": {
10508
+ "type": "string"
9469
10509
  },
9470
- "latency_ms": {
10510
+ "version": {
9471
10511
  "type": "integer"
9472
10512
  },
9473
- "had_secrets_redacted": {
9474
- "type": "boolean",
9475
- "default": false
9476
- },
9477
- "had_pii_detected": {
9478
- "type": "boolean",
9479
- "default": false
10513
+ "spec": {
10514
+ "type": "object"
9480
10515
  },
9481
- "injection_score": {
9482
- "type": "number",
9483
- "default": 0
10516
+ "is_active": {
10517
+ "type": "boolean"
9484
10518
  },
9485
- "policy_violations": {
9486
- "type": "array",
9487
- "items": {
9488
- "type": "string"
9489
- }
10519
+ "created_at": {
10520
+ "type": "string",
10521
+ "format": "date-time"
9490
10522
  },
9491
- "metadata": {
9492
- "type": "object"
10523
+ "updated_at": {
10524
+ "type": "string",
10525
+ "format": "date-time"
10526
+ }
10527
+ }
10528
+ },
10529
+ "UpsertPlatformUserRequest": {
10530
+ "type": "object",
10531
+ "properties": {
10532
+ "subject_token": {
10533
+ "type": "string",
10534
+ "description": "OIDC JWT from the platform's IdP (verified against JWKS)"
9493
10535
  },
9494
- "response_injection_score": {
9495
- "type": "number",
9496
- "default": 0
10536
+ "subject_token_type": {
10537
+ "type": "string",
10538
+ "default": "urn:ietf:params:oauth:token-type:jwt"
9497
10539
  },
9498
- "response_context_injection_score": {
9499
- "type": "number",
9500
- "default": 0
10540
+ "email": {
10541
+ "type": "string",
10542
+ "format": "email",
10543
+ "description": "Fallback when subject_token is not provided"
9501
10544
  },
9502
- "response_injection_categories": {
9503
- "type": "array",
9504
- "items": {
9505
- "type": "string"
9506
- }
10545
+ "display_name": {
10546
+ "type": "string"
10547
+ }
10548
+ }
10549
+ },
10550
+ "PlatformUserResponse": {
10551
+ "type": "object",
10552
+ "properties": {
10553
+ "user_handle": {
10554
+ "type": "string",
10555
+ "format": "uuid"
9507
10556
  },
9508
- "external_urls_flagged": {
9509
- "type": "array",
9510
- "items": {
9511
- "type": "string"
9512
- }
10557
+ "is_new": {
10558
+ "type": "boolean"
9513
10559
  },
9514
- "unexpected_code_blocks": {
9515
- "type": "integer",
9516
- "default": 0
10560
+ "connection_id": {
10561
+ "type": "string",
10562
+ "format": "uuid"
9517
10563
  },
9518
- "content_filtered": {
9519
- "type": "boolean",
9520
- "default": false
10564
+ "email": {
10565
+ "type": "string"
9521
10566
  }
9522
10567
  }
9523
10568
  },
9524
- "ShroudThreatSummary": {
10569
+ "PlatformConnectedUserResponse": {
9525
10570
  "type": "object",
9526
10571
  "properties": {
9527
- "total_requests": {
9528
- "type": "integer",
9529
- "format": "int64"
9530
- },
9531
- "total_requests_prev": {
9532
- "type": "integer",
9533
- "format": "int64"
10572
+ "connection_id": {
10573
+ "type": "string",
10574
+ "format": "uuid"
9534
10575
  },
9535
- "blocked_requests": {
9536
- "type": "integer",
9537
- "format": "int64"
10576
+ "user_id": {
10577
+ "type": "string",
10578
+ "format": "uuid"
9538
10579
  },
9539
- "detectors_triggered": {
9540
- "type": "integer",
9541
- "format": "int64"
10580
+ "external_subject": {
10581
+ "type": "string"
9542
10582
  },
9543
- "active_agents": {
9544
- "type": "integer",
9545
- "format": "int64"
10583
+ "status": {
10584
+ "type": "string"
9546
10585
  },
9547
- "detectors": {
10586
+ "vault_ids": {
9548
10587
  "type": "array",
9549
10588
  "items": {
9550
- "$ref": "#/components/schemas/ShroudDetectorStats"
10589
+ "type": "string",
10590
+ "format": "uuid"
9551
10591
  }
9552
10592
  },
9553
- "flagged_requests": {
10593
+ "agent_ids": {
9554
10594
  "type": "array",
9555
10595
  "items": {
9556
- "$ref": "#/components/schemas/ShroudFlaggedRequest"
10596
+ "type": "string",
10597
+ "format": "uuid"
9557
10598
  }
10599
+ },
10600
+ "created_at": {
10601
+ "type": "string",
10602
+ "format": "date-time"
10603
+ },
10604
+ "claimed_at": {
10605
+ "type": "string",
10606
+ "format": "date-time",
10607
+ "nullable": true
9558
10608
  }
9559
10609
  }
9560
10610
  },
9561
- "ShroudDetectorStats": {
10611
+ "BootstrapRequest": {
9562
10612
  "type": "object",
9563
10613
  "properties": {
9564
- "detector": {
10614
+ "template_id": {
10615
+ "type": "string",
10616
+ "format": "uuid",
10617
+ "description": "Template to use. Falls back to the app's default template."
10618
+ },
10619
+ "return_to": {
10620
+ "type": "string",
10621
+ "format": "uri",
10622
+ "description": "URL to redirect the user to after claiming resources."
10623
+ }
10624
+ }
10625
+ },
10626
+ "BootstrapResponse": {
10627
+ "type": "object",
10628
+ "properties": {
10629
+ "claim_url": {
10630
+ "type": "string",
10631
+ "format": "uri"
10632
+ },
10633
+ "claim_token": {
9565
10634
  "type": "string"
9566
10635
  },
9567
- "detections": {
10636
+ "expires_in": {
9568
10637
  "type": "integer",
9569
- "format": "int64"
10638
+ "description": "Seconds until the claim token expires"
9570
10639
  },
9571
- "blocks": {
9572
- "type": "integer",
9573
- "format": "int64"
10640
+ "connection_id": {
10641
+ "type": "string",
10642
+ "format": "uuid"
9574
10643
  },
9575
- "actions": {
10644
+ "summary": {
9576
10645
  "type": "object",
9577
10646
  "properties": {
9578
- "blocked": {
9579
- "type": "integer",
9580
- "format": "int64"
10647
+ "vault_id": {
10648
+ "type": "string",
10649
+ "format": "uuid",
10650
+ "nullable": true
9581
10651
  },
9582
- "warned": {
9583
- "type": "integer",
9584
- "format": "int64"
10652
+ "agent_id": {
10653
+ "type": "string",
10654
+ "format": "uuid",
10655
+ "nullable": true
9585
10656
  },
9586
- "logged": {
9587
- "type": "integer",
9588
- "format": "int64"
10657
+ "policy_ids": {
10658
+ "type": "array",
10659
+ "items": {
10660
+ "type": "string",
10661
+ "format": "uuid"
10662
+ }
9589
10663
  }
9590
10664
  }
9591
10665
  }
9592
10666
  }
9593
10667
  },
9594
- "ShroudFlaggedRequest": {
10668
+ "ConnectedAppResponse": {
9595
10669
  "type": "object",
9596
10670
  "properties": {
9597
- "id": {
9598
- "type": "string"
9599
- },
9600
- "timestamp": {
10671
+ "connection_id": {
9601
10672
  "type": "string",
9602
- "format": "date-time"
10673
+ "format": "uuid"
9603
10674
  },
9604
- "agent_id": {
10675
+ "app_name": {
9605
10676
  "type": "string"
9606
10677
  },
9607
- "agent_name": {
10678
+ "app_slug": {
9608
10679
  "type": "string"
9609
10680
  },
9610
- "score": {
9611
- "type": "number"
9612
- },
9613
- "reason": {
10681
+ "status": {
9614
10682
  "type": "string"
9615
10683
  },
9616
- "action": {
9617
- "type": "string",
9618
- "enum": [
9619
- "blocked",
9620
- "warned",
9621
- "logged"
9622
- ]
9623
- }
9624
- }
9625
- },
9626
- "HealthResponse": {
9627
- "type": "object",
9628
- "properties": {
9629
- "status": {
9630
- "type": "string",
9631
- "enum": [
9632
- "healthy",
9633
- "degraded"
9634
- ]
10684
+ "vault_ids": {
10685
+ "type": "array",
10686
+ "items": {
10687
+ "type": "string",
10688
+ "format": "uuid"
10689
+ }
9635
10690
  },
9636
- "version": {
9637
- "type": "string"
10691
+ "agent_ids": {
10692
+ "type": "array",
10693
+ "items": {
10694
+ "type": "string",
10695
+ "format": "uuid"
10696
+ }
10697
+ },
10698
+ "created_at": {
10699
+ "type": "string",
10700
+ "format": "date-time"
9638
10701
  }
9639
10702
  }
9640
10703
  }