@1claw/openapi-spec 0.61.31 → 0.61.34
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 +352 -4
- package/openapi.yaml +207 -1
- package/package.json +1 -1
package/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.1.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "1Claw API",
|
|
5
|
-
"version": "0.61.
|
|
5
|
+
"version": "0.61.34",
|
|
6
6
|
"description": "Secure secret management for AI agents. Provides vaults, secrets,\npolicy-based access control, agent identity, Intents API,\nsharing, billing, and audit logging. Automations (workflow_spec,\nwebhook tokens, event triggers, Assist), cloud runtimes with\ninteractive shell sessions, agent memory, and discovery.\n\n## Domains\n\n`api.1claw.co` is canonical: it is the OIDC issuer, the `aud` the API\nmints, and the first entry in `servers` — a generated client takes its\nbase URL from there, and the previous ordering pointed every SDK at the\ndomain the issuer had already left. `api.1claw.xyz` still answers and is\nstill accepted on token validation, because tokens minted before the\nmove carry it; it is never minted now.\n\nOne deliberate exception: the Shroud attestation identity token is\nrequested from GCP with `audience: https://api.1claw.xyz`, so\n`/v1/shroud/attestation` reports that as its `expected_audience`. That\nis accurate rather than stale — the audience is a verification contract\nwith anyone already checking the token, and moving it is a breaking\nchange for them, not a rename.\n\nAll endpoints require JWT Bearer authentication unless marked with\n`security: []`.\n",
|
|
7
7
|
"contact": {
|
|
8
8
|
"email": "ops@1claw.co"
|
|
@@ -17221,6 +17221,75 @@
|
|
|
17221
17221
|
}
|
|
17222
17222
|
}
|
|
17223
17223
|
},
|
|
17224
|
+
"/v1/x402/topup": {
|
|
17225
|
+
"post": {
|
|
17226
|
+
"tags": [
|
|
17227
|
+
"Billing"
|
|
17228
|
+
],
|
|
17229
|
+
"summary": "x402 ledger top-up (agent door)",
|
|
17230
|
+
"description": "The wallet rail for Shroud (Shroud AI plan). Without `X-PAYMENT` the response is a\n**402** quote (`x402Version`, `accepts[]` with `payTo`, `maxAmountRequired`, `resource`)\nfor `amount_usd` (default $1) of USDC on Base. With a signed EIP-3009 `X-PAYMENT`\nthe facilitator verifies it, the proof is claimed once, the payer wallet's org\nledger is credited in micro-USD, and the facilitator settles.\n\n**Payment is the account.** An unknown wallet's first settled top-up provisions a\nshadow org, one Shroud-enabled agent and one `sk-shroud-v1` router key keyed on the\nwallet (returned once as `router_key`), after screening the wallet against the OFAC\nSDN list (fails closed when the list is missing or stale) and the caller's region\nagainst the custody geofence. Same wallet = same org on every later top-up. The\nresponse always carries a ≤60 s `access_token` for the wallet's agent so the\ngateway can serve the paid request immediately. The Shroud gateway drives this for\n`Authorization: Bearer x402` requests and relays the quote or the result.\n",
|
|
17231
|
+
"operationId": "x402Topup",
|
|
17232
|
+
"security": [],
|
|
17233
|
+
"parameters": [
|
|
17234
|
+
{
|
|
17235
|
+
"name": "X-PAYMENT",
|
|
17236
|
+
"in": "header",
|
|
17237
|
+
"required": false,
|
|
17238
|
+
"schema": {
|
|
17239
|
+
"type": "string"
|
|
17240
|
+
},
|
|
17241
|
+
"description": "Base64 x402 payment payload (EIP-3009 USDC authorization on Base)"
|
|
17242
|
+
}
|
|
17243
|
+
],
|
|
17244
|
+
"requestBody": {
|
|
17245
|
+
"required": false,
|
|
17246
|
+
"content": {
|
|
17247
|
+
"application/json": {
|
|
17248
|
+
"schema": {
|
|
17249
|
+
"type": "object",
|
|
17250
|
+
"additionalProperties": false,
|
|
17251
|
+
"properties": {
|
|
17252
|
+
"amount_usd": {
|
|
17253
|
+
"type": "integer",
|
|
17254
|
+
"minimum": 1,
|
|
17255
|
+
"maximum": 100,
|
|
17256
|
+
"description": "Whole dollars to add to the ledger (default 1)"
|
|
17257
|
+
}
|
|
17258
|
+
}
|
|
17259
|
+
}
|
|
17260
|
+
}
|
|
17261
|
+
}
|
|
17262
|
+
},
|
|
17263
|
+
"responses": {
|
|
17264
|
+
"200": {
|
|
17265
|
+
"description": "Credited",
|
|
17266
|
+
"content": {
|
|
17267
|
+
"application/json": {
|
|
17268
|
+
"schema": {
|
|
17269
|
+
"$ref": "#/components/schemas/X402TopupResponse"
|
|
17270
|
+
}
|
|
17271
|
+
}
|
|
17272
|
+
}
|
|
17273
|
+
},
|
|
17274
|
+
"402": {
|
|
17275
|
+
"description": "Payment required — the quote to sign, or why the payment was refused",
|
|
17276
|
+
"content": {
|
|
17277
|
+
"application/json": {
|
|
17278
|
+
"schema": {
|
|
17279
|
+
"$ref": "#/components/schemas/PaymentRequirement"
|
|
17280
|
+
}
|
|
17281
|
+
}
|
|
17282
|
+
}
|
|
17283
|
+
},
|
|
17284
|
+
"403": {
|
|
17285
|
+
"description": "The wallet is sanctioned or the region is fenced; no account is opened"
|
|
17286
|
+
},
|
|
17287
|
+
"503": {
|
|
17288
|
+
"description": "The sanctions list is unavailable (fails closed)"
|
|
17289
|
+
}
|
|
17290
|
+
}
|
|
17291
|
+
}
|
|
17292
|
+
},
|
|
17224
17293
|
"/v1/oauth/token": {
|
|
17225
17294
|
"post": {
|
|
17226
17295
|
"tags": [
|
|
@@ -23871,6 +23940,130 @@
|
|
|
23871
23940
|
}
|
|
23872
23941
|
}
|
|
23873
23942
|
},
|
|
23943
|
+
"/v1/agents/{agent_id}/tool-bindings": {
|
|
23944
|
+
"post": {
|
|
23945
|
+
"tags": [
|
|
23946
|
+
"Agents"
|
|
23947
|
+
],
|
|
23948
|
+
"summary": "Create a secret → tool binding (rehydration policy)",
|
|
23949
|
+
"description": "Authorises the enclave to rehydrate the `⟦sk:…⟧` placeholder for `secret_path`\ninto `tool_name` at `arg_path` — and only when the call's destination host is one\nof `destination_hosts`. Redaction replaces vault secrets in prompts with\ndeterministic placeholders the model can place but never read; a placeholder is\nsubstituted back only inside an authorised tool-call argument, at the moment the\nenclave performs the call (`execution_mode: \"tee\"`). No binding, wrong argument,\nwrong host, bad checksum or an unknown tag is a 403 at execution time. Human users\nonly; up to 200 per agent.\n",
|
|
23950
|
+
"operationId": "createToolBinding",
|
|
23951
|
+
"parameters": [
|
|
23952
|
+
{
|
|
23953
|
+
"$ref": "#/components/parameters/AgentId"
|
|
23954
|
+
}
|
|
23955
|
+
],
|
|
23956
|
+
"requestBody": {
|
|
23957
|
+
"required": true,
|
|
23958
|
+
"content": {
|
|
23959
|
+
"application/json": {
|
|
23960
|
+
"schema": {
|
|
23961
|
+
"$ref": "#/components/schemas/CreateToolBindingRequest"
|
|
23962
|
+
}
|
|
23963
|
+
}
|
|
23964
|
+
}
|
|
23965
|
+
},
|
|
23966
|
+
"responses": {
|
|
23967
|
+
"201": {
|
|
23968
|
+
"description": "Created",
|
|
23969
|
+
"content": {
|
|
23970
|
+
"application/json": {
|
|
23971
|
+
"schema": {
|
|
23972
|
+
"$ref": "#/components/schemas/SecretToolBinding"
|
|
23973
|
+
}
|
|
23974
|
+
}
|
|
23975
|
+
}
|
|
23976
|
+
},
|
|
23977
|
+
"400": {
|
|
23978
|
+
"$ref": "#/components/responses/BadRequest"
|
|
23979
|
+
},
|
|
23980
|
+
"403": {
|
|
23981
|
+
"$ref": "#/components/responses/Forbidden"
|
|
23982
|
+
},
|
|
23983
|
+
"404": {
|
|
23984
|
+
"$ref": "#/components/responses/NotFound"
|
|
23985
|
+
},
|
|
23986
|
+
"409": {
|
|
23987
|
+
"description": "A binding for this secret, tool and argument already exists"
|
|
23988
|
+
}
|
|
23989
|
+
}
|
|
23990
|
+
},
|
|
23991
|
+
"get": {
|
|
23992
|
+
"tags": [
|
|
23993
|
+
"Agents"
|
|
23994
|
+
],
|
|
23995
|
+
"summary": "List secret → tool bindings",
|
|
23996
|
+
"operationId": "listToolBindings",
|
|
23997
|
+
"parameters": [
|
|
23998
|
+
{
|
|
23999
|
+
"$ref": "#/components/parameters/AgentId"
|
|
24000
|
+
}
|
|
24001
|
+
],
|
|
24002
|
+
"responses": {
|
|
24003
|
+
"200": {
|
|
24004
|
+
"description": "Bindings",
|
|
24005
|
+
"content": {
|
|
24006
|
+
"application/json": {
|
|
24007
|
+
"schema": {
|
|
24008
|
+
"type": "object",
|
|
24009
|
+
"required": [
|
|
24010
|
+
"bindings"
|
|
24011
|
+
],
|
|
24012
|
+
"properties": {
|
|
24013
|
+
"bindings": {
|
|
24014
|
+
"type": "array",
|
|
24015
|
+
"items": {
|
|
24016
|
+
"$ref": "#/components/schemas/SecretToolBinding"
|
|
24017
|
+
}
|
|
24018
|
+
}
|
|
24019
|
+
}
|
|
24020
|
+
}
|
|
24021
|
+
}
|
|
24022
|
+
}
|
|
24023
|
+
},
|
|
24024
|
+
"403": {
|
|
24025
|
+
"$ref": "#/components/responses/Forbidden"
|
|
24026
|
+
},
|
|
24027
|
+
"404": {
|
|
24028
|
+
"$ref": "#/components/responses/NotFound"
|
|
24029
|
+
}
|
|
24030
|
+
}
|
|
24031
|
+
}
|
|
24032
|
+
},
|
|
24033
|
+
"/v1/agents/{agent_id}/tool-bindings/{binding_id}": {
|
|
24034
|
+
"delete": {
|
|
24035
|
+
"tags": [
|
|
24036
|
+
"Agents"
|
|
24037
|
+
],
|
|
24038
|
+
"summary": "Delete a secret → tool binding",
|
|
24039
|
+
"operationId": "deleteToolBinding",
|
|
24040
|
+
"parameters": [
|
|
24041
|
+
{
|
|
24042
|
+
"$ref": "#/components/parameters/AgentId"
|
|
24043
|
+
},
|
|
24044
|
+
{
|
|
24045
|
+
"name": "binding_id",
|
|
24046
|
+
"in": "path",
|
|
24047
|
+
"required": true,
|
|
24048
|
+
"schema": {
|
|
24049
|
+
"type": "string",
|
|
24050
|
+
"format": "uuid"
|
|
24051
|
+
}
|
|
24052
|
+
}
|
|
24053
|
+
],
|
|
24054
|
+
"responses": {
|
|
24055
|
+
"204": {
|
|
24056
|
+
"description": "Deleted"
|
|
24057
|
+
},
|
|
24058
|
+
"403": {
|
|
24059
|
+
"$ref": "#/components/responses/Forbidden"
|
|
24060
|
+
},
|
|
24061
|
+
"404": {
|
|
24062
|
+
"$ref": "#/components/responses/NotFound"
|
|
24063
|
+
}
|
|
24064
|
+
}
|
|
24065
|
+
}
|
|
24066
|
+
},
|
|
23874
24067
|
"/v1/agents/{agent_id}/oauth/connections": {
|
|
23875
24068
|
"get": {
|
|
23876
24069
|
"tags": [
|
|
@@ -36090,7 +36283,13 @@
|
|
|
36090
36283
|
"type": "string"
|
|
36091
36284
|
},
|
|
36092
36285
|
"credit_balance_cents": {
|
|
36093
|
-
"type": "integer"
|
|
36286
|
+
"type": "integer",
|
|
36287
|
+
"description": "Derived (rounded down); the ledger unit is micro-USD"
|
|
36288
|
+
},
|
|
36289
|
+
"credit_balance_micro_usd": {
|
|
36290
|
+
"type": "integer",
|
|
36291
|
+
"format": "int64",
|
|
36292
|
+
"description": "The ledger value. One inspected Shroud request costs 5,000 micro-USD ($0.005)."
|
|
36094
36293
|
},
|
|
36095
36294
|
"credit_balance_usd": {
|
|
36096
36295
|
"type": "string"
|
|
@@ -36313,10 +36512,17 @@
|
|
|
36313
36512
|
"type": "object",
|
|
36314
36513
|
"properties": {
|
|
36315
36514
|
"balance_cents": {
|
|
36316
|
-
"type": "integer"
|
|
36515
|
+
"type": "integer",
|
|
36516
|
+
"description": "Derived (rounded down); the ledger unit is micro-USD"
|
|
36517
|
+
},
|
|
36518
|
+
"balance_micro_usd": {
|
|
36519
|
+
"type": "integer",
|
|
36520
|
+
"format": "int64",
|
|
36521
|
+
"description": "The ledger value (1 = $0.000001)"
|
|
36317
36522
|
},
|
|
36318
36523
|
"balance_usd": {
|
|
36319
|
-
"type": "string"
|
|
36524
|
+
"type": "string",
|
|
36525
|
+
"description": "Dollars at the ledger's precision (e.g. \"4.995\"), never fewer than two decimals"
|
|
36320
36526
|
},
|
|
36321
36527
|
"expiring_within_90_days": {
|
|
36322
36528
|
"type": "object",
|
|
@@ -40035,6 +40241,148 @@
|
|
|
40035
40241
|
}
|
|
40036
40242
|
]
|
|
40037
40243
|
},
|
|
40244
|
+
"CreateToolBindingRequest": {
|
|
40245
|
+
"type": "object",
|
|
40246
|
+
"additionalProperties": false,
|
|
40247
|
+
"required": [
|
|
40248
|
+
"secret_path",
|
|
40249
|
+
"tool_name",
|
|
40250
|
+
"destination_hosts"
|
|
40251
|
+
],
|
|
40252
|
+
"properties": {
|
|
40253
|
+
"secret_path": {
|
|
40254
|
+
"type": "string",
|
|
40255
|
+
"description": "Vault path of the secret the placeholder stands for"
|
|
40256
|
+
},
|
|
40257
|
+
"tool_name": {
|
|
40258
|
+
"type": "string",
|
|
40259
|
+
"description": "Tool the binding applies to (`http_request`, `run_sql`, …) or `*`"
|
|
40260
|
+
},
|
|
40261
|
+
"arg_path": {
|
|
40262
|
+
"type": "string",
|
|
40263
|
+
"description": "JSON pointer into the tool's arguments (`/headers/Authorization`, `/body/*`) or `*` (default)"
|
|
40264
|
+
},
|
|
40265
|
+
"destination_hosts": {
|
|
40266
|
+
"type": "array",
|
|
40267
|
+
"minItems": 1,
|
|
40268
|
+
"maxItems": 32,
|
|
40269
|
+
"items": {
|
|
40270
|
+
"type": "string"
|
|
40271
|
+
},
|
|
40272
|
+
"description": "Hosts the rehydrated call may reach (`api.stripe.com`, `*.googleapis.com`); required"
|
|
40273
|
+
}
|
|
40274
|
+
}
|
|
40275
|
+
},
|
|
40276
|
+
"SecretToolBinding": {
|
|
40277
|
+
"type": "object",
|
|
40278
|
+
"required": [
|
|
40279
|
+
"id",
|
|
40280
|
+
"org_id",
|
|
40281
|
+
"agent_id",
|
|
40282
|
+
"secret_path",
|
|
40283
|
+
"tool_name",
|
|
40284
|
+
"arg_path",
|
|
40285
|
+
"destination_hosts",
|
|
40286
|
+
"created_at"
|
|
40287
|
+
],
|
|
40288
|
+
"properties": {
|
|
40289
|
+
"id": {
|
|
40290
|
+
"type": "string",
|
|
40291
|
+
"format": "uuid"
|
|
40292
|
+
},
|
|
40293
|
+
"org_id": {
|
|
40294
|
+
"type": "string",
|
|
40295
|
+
"format": "uuid"
|
|
40296
|
+
},
|
|
40297
|
+
"agent_id": {
|
|
40298
|
+
"type": "string",
|
|
40299
|
+
"format": "uuid"
|
|
40300
|
+
},
|
|
40301
|
+
"secret_path": {
|
|
40302
|
+
"type": "string"
|
|
40303
|
+
},
|
|
40304
|
+
"tool_name": {
|
|
40305
|
+
"type": "string"
|
|
40306
|
+
},
|
|
40307
|
+
"arg_path": {
|
|
40308
|
+
"type": "string"
|
|
40309
|
+
},
|
|
40310
|
+
"destination_hosts": {
|
|
40311
|
+
"type": "array",
|
|
40312
|
+
"items": {
|
|
40313
|
+
"type": "string"
|
|
40314
|
+
}
|
|
40315
|
+
},
|
|
40316
|
+
"created_by": {
|
|
40317
|
+
"type": "string",
|
|
40318
|
+
"format": "uuid",
|
|
40319
|
+
"nullable": true
|
|
40320
|
+
},
|
|
40321
|
+
"created_at": {
|
|
40322
|
+
"type": "string",
|
|
40323
|
+
"format": "date-time"
|
|
40324
|
+
}
|
|
40325
|
+
}
|
|
40326
|
+
},
|
|
40327
|
+
"X402TopupResponse": {
|
|
40328
|
+
"type": "object",
|
|
40329
|
+
"required": [
|
|
40330
|
+
"wallet",
|
|
40331
|
+
"org_id",
|
|
40332
|
+
"agent_id",
|
|
40333
|
+
"credited_micro_usd",
|
|
40334
|
+
"balance_micro_usd",
|
|
40335
|
+
"balance_usd",
|
|
40336
|
+
"access_token",
|
|
40337
|
+
"expires_in",
|
|
40338
|
+
"base_url",
|
|
40339
|
+
"provisioned"
|
|
40340
|
+
],
|
|
40341
|
+
"properties": {
|
|
40342
|
+
"wallet": {
|
|
40343
|
+
"type": "string",
|
|
40344
|
+
"description": "Payer address (lower-case)"
|
|
40345
|
+
},
|
|
40346
|
+
"org_id": {
|
|
40347
|
+
"type": "string",
|
|
40348
|
+
"format": "uuid"
|
|
40349
|
+
},
|
|
40350
|
+
"agent_id": {
|
|
40351
|
+
"type": "string",
|
|
40352
|
+
"format": "uuid"
|
|
40353
|
+
},
|
|
40354
|
+
"credited_micro_usd": {
|
|
40355
|
+
"type": "integer",
|
|
40356
|
+
"format": "int64"
|
|
40357
|
+
},
|
|
40358
|
+
"balance_micro_usd": {
|
|
40359
|
+
"type": "integer",
|
|
40360
|
+
"format": "int64"
|
|
40361
|
+
},
|
|
40362
|
+
"balance_usd": {
|
|
40363
|
+
"type": "string"
|
|
40364
|
+
},
|
|
40365
|
+
"router_key": {
|
|
40366
|
+
"type": "string",
|
|
40367
|
+
"description": "Present only on the top-up that provisioned the account (or re-minted a lost key). Shown once."
|
|
40368
|
+
},
|
|
40369
|
+
"access_token": {
|
|
40370
|
+
"type": "string",
|
|
40371
|
+
"description": "A ≤60 s agent token for the wallet's agent (carries the `router_key` claim)"
|
|
40372
|
+
},
|
|
40373
|
+
"expires_in": {
|
|
40374
|
+
"type": "integer"
|
|
40375
|
+
},
|
|
40376
|
+
"base_url": {
|
|
40377
|
+
"type": "string",
|
|
40378
|
+
"description": "The Shroud gateway"
|
|
40379
|
+
},
|
|
40380
|
+
"provisioned": {
|
|
40381
|
+
"type": "boolean",
|
|
40382
|
+
"description": "True when this top-up created the account"
|
|
40383
|
+
}
|
|
40384
|
+
}
|
|
40385
|
+
},
|
|
40038
40386
|
"EventSubscription": {
|
|
40039
40387
|
"type": "object",
|
|
40040
40388
|
"required": [
|
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.61.
|
|
5
|
+
version: "0.61.34"
|
|
6
6
|
description: |
|
|
7
7
|
Secure secret management for AI agents. Provides vaults, secrets,
|
|
8
8
|
policy-based access control, agent identity, Intents API,
|
|
@@ -10956,6 +10956,64 @@ paths:
|
|
|
10956
10956
|
"400":
|
|
10957
10957
|
description: Invalid request
|
|
10958
10958
|
|
|
10959
|
+
/v1/x402/topup:
|
|
10960
|
+
post:
|
|
10961
|
+
tags: [Billing]
|
|
10962
|
+
summary: x402 ledger top-up (agent door)
|
|
10963
|
+
description: |
|
|
10964
|
+
The wallet rail for Shroud (Shroud AI plan). Without `X-PAYMENT` the response is a
|
|
10965
|
+
**402** quote (`x402Version`, `accepts[]` with `payTo`, `maxAmountRequired`, `resource`)
|
|
10966
|
+
for `amount_usd` (default $1) of USDC on Base. With a signed EIP-3009 `X-PAYMENT`
|
|
10967
|
+
the facilitator verifies it, the proof is claimed once, the payer wallet's org
|
|
10968
|
+
ledger is credited in micro-USD, and the facilitator settles.
|
|
10969
|
+
|
|
10970
|
+
**Payment is the account.** An unknown wallet's first settled top-up provisions a
|
|
10971
|
+
shadow org, one Shroud-enabled agent and one `sk-shroud-v1` router key keyed on the
|
|
10972
|
+
wallet (returned once as `router_key`), after screening the wallet against the OFAC
|
|
10973
|
+
SDN list (fails closed when the list is missing or stale) and the caller's region
|
|
10974
|
+
against the custody geofence. Same wallet = same org on every later top-up. The
|
|
10975
|
+
response always carries a ≤60 s `access_token` for the wallet's agent so the
|
|
10976
|
+
gateway can serve the paid request immediately. The Shroud gateway drives this for
|
|
10977
|
+
`Authorization: Bearer x402` requests and relays the quote or the result.
|
|
10978
|
+
operationId: x402Topup
|
|
10979
|
+
security: []
|
|
10980
|
+
parameters:
|
|
10981
|
+
- name: X-PAYMENT
|
|
10982
|
+
in: header
|
|
10983
|
+
required: false
|
|
10984
|
+
schema: { type: string }
|
|
10985
|
+
description: Base64 x402 payment payload (EIP-3009 USDC authorization on Base)
|
|
10986
|
+
requestBody:
|
|
10987
|
+
required: false
|
|
10988
|
+
content:
|
|
10989
|
+
application/json:
|
|
10990
|
+
schema:
|
|
10991
|
+
type: object
|
|
10992
|
+
additionalProperties: false
|
|
10993
|
+
properties:
|
|
10994
|
+
amount_usd:
|
|
10995
|
+
type: integer
|
|
10996
|
+
minimum: 1
|
|
10997
|
+
maximum: 100
|
|
10998
|
+
description: Whole dollars to add to the ledger (default 1)
|
|
10999
|
+
responses:
|
|
11000
|
+
"200":
|
|
11001
|
+
description: Credited
|
|
11002
|
+
content:
|
|
11003
|
+
application/json:
|
|
11004
|
+
schema:
|
|
11005
|
+
$ref: "#/components/schemas/X402TopupResponse"
|
|
11006
|
+
"402":
|
|
11007
|
+
description: Payment required — the quote to sign, or why the payment was refused
|
|
11008
|
+
content:
|
|
11009
|
+
application/json:
|
|
11010
|
+
schema:
|
|
11011
|
+
$ref: "#/components/schemas/PaymentRequirement"
|
|
11012
|
+
"403":
|
|
11013
|
+
description: The wallet is sanctioned or the region is fenced; no account is opened
|
|
11014
|
+
"503":
|
|
11015
|
+
description: The sanctions list is unavailable (fails closed)
|
|
11016
|
+
|
|
10959
11017
|
/v1/oauth/token:
|
|
10960
11018
|
post:
|
|
10961
11019
|
tags: [OAuth]
|
|
@@ -15270,6 +15328,86 @@ paths:
|
|
|
15270
15328
|
"404":
|
|
15271
15329
|
$ref: "#/components/responses/NotFound"
|
|
15272
15330
|
|
|
15331
|
+
/v1/agents/{agent_id}/tool-bindings:
|
|
15332
|
+
post:
|
|
15333
|
+
tags: [Agents]
|
|
15334
|
+
summary: Create a secret → tool binding (rehydration policy)
|
|
15335
|
+
description: |
|
|
15336
|
+
Authorises the enclave to rehydrate the `⟦sk:…⟧` placeholder for `secret_path`
|
|
15337
|
+
into `tool_name` at `arg_path` — and only when the call's destination host is one
|
|
15338
|
+
of `destination_hosts`. Redaction replaces vault secrets in prompts with
|
|
15339
|
+
deterministic placeholders the model can place but never read; a placeholder is
|
|
15340
|
+
substituted back only inside an authorised tool-call argument, at the moment the
|
|
15341
|
+
enclave performs the call (`execution_mode: "tee"`). No binding, wrong argument,
|
|
15342
|
+
wrong host, bad checksum or an unknown tag is a 403 at execution time. Human users
|
|
15343
|
+
only; up to 200 per agent.
|
|
15344
|
+
operationId: createToolBinding
|
|
15345
|
+
parameters:
|
|
15346
|
+
- $ref: "#/components/parameters/AgentId"
|
|
15347
|
+
requestBody:
|
|
15348
|
+
required: true
|
|
15349
|
+
content:
|
|
15350
|
+
application/json:
|
|
15351
|
+
schema:
|
|
15352
|
+
$ref: "#/components/schemas/CreateToolBindingRequest"
|
|
15353
|
+
responses:
|
|
15354
|
+
"201":
|
|
15355
|
+
description: Created
|
|
15356
|
+
content:
|
|
15357
|
+
application/json:
|
|
15358
|
+
schema:
|
|
15359
|
+
$ref: "#/components/schemas/SecretToolBinding"
|
|
15360
|
+
"400":
|
|
15361
|
+
$ref: "#/components/responses/BadRequest"
|
|
15362
|
+
"403":
|
|
15363
|
+
$ref: "#/components/responses/Forbidden"
|
|
15364
|
+
"404":
|
|
15365
|
+
$ref: "#/components/responses/NotFound"
|
|
15366
|
+
"409":
|
|
15367
|
+
description: A binding for this secret, tool and argument already exists
|
|
15368
|
+
get:
|
|
15369
|
+
tags: [Agents]
|
|
15370
|
+
summary: List secret → tool bindings
|
|
15371
|
+
operationId: listToolBindings
|
|
15372
|
+
parameters:
|
|
15373
|
+
- $ref: "#/components/parameters/AgentId"
|
|
15374
|
+
responses:
|
|
15375
|
+
"200":
|
|
15376
|
+
description: Bindings
|
|
15377
|
+
content:
|
|
15378
|
+
application/json:
|
|
15379
|
+
schema:
|
|
15380
|
+
type: object
|
|
15381
|
+
required: [bindings]
|
|
15382
|
+
properties:
|
|
15383
|
+
bindings:
|
|
15384
|
+
type: array
|
|
15385
|
+
items:
|
|
15386
|
+
$ref: "#/components/schemas/SecretToolBinding"
|
|
15387
|
+
"403":
|
|
15388
|
+
$ref: "#/components/responses/Forbidden"
|
|
15389
|
+
"404":
|
|
15390
|
+
$ref: "#/components/responses/NotFound"
|
|
15391
|
+
|
|
15392
|
+
/v1/agents/{agent_id}/tool-bindings/{binding_id}:
|
|
15393
|
+
delete:
|
|
15394
|
+
tags: [Agents]
|
|
15395
|
+
summary: Delete a secret → tool binding
|
|
15396
|
+
operationId: deleteToolBinding
|
|
15397
|
+
parameters:
|
|
15398
|
+
- $ref: "#/components/parameters/AgentId"
|
|
15399
|
+
- name: binding_id
|
|
15400
|
+
in: path
|
|
15401
|
+
required: true
|
|
15402
|
+
schema: { type: string, format: uuid }
|
|
15403
|
+
responses:
|
|
15404
|
+
"204":
|
|
15405
|
+
description: Deleted
|
|
15406
|
+
"403":
|
|
15407
|
+
$ref: "#/components/responses/Forbidden"
|
|
15408
|
+
"404":
|
|
15409
|
+
$ref: "#/components/responses/NotFound"
|
|
15410
|
+
|
|
15273
15411
|
/v1/agents/{agent_id}/oauth/connections:
|
|
15274
15412
|
get:
|
|
15275
15413
|
tags: [OAuth Connect]
|
|
@@ -23430,6 +23568,11 @@ components:
|
|
|
23430
23568
|
type: string
|
|
23431
23569
|
credit_balance_cents:
|
|
23432
23570
|
type: integer
|
|
23571
|
+
description: Derived (rounded down); the ledger unit is micro-USD
|
|
23572
|
+
credit_balance_micro_usd:
|
|
23573
|
+
type: integer
|
|
23574
|
+
format: int64
|
|
23575
|
+
description: The ledger value. One inspected Shroud request costs 5,000 micro-USD ($0.005).
|
|
23433
23576
|
credit_balance_usd:
|
|
23434
23577
|
type: string
|
|
23435
23578
|
overage_method:
|
|
@@ -23586,8 +23729,14 @@ components:
|
|
|
23586
23729
|
properties:
|
|
23587
23730
|
balance_cents:
|
|
23588
23731
|
type: integer
|
|
23732
|
+
description: Derived (rounded down); the ledger unit is micro-USD
|
|
23733
|
+
balance_micro_usd:
|
|
23734
|
+
type: integer
|
|
23735
|
+
format: int64
|
|
23736
|
+
description: The ledger value (1 = $0.000001)
|
|
23589
23737
|
balance_usd:
|
|
23590
23738
|
type: string
|
|
23739
|
+
description: Dollars at the ledger's precision (e.g. "4.995"), never fewer than two decimals
|
|
23591
23740
|
expiring_within_90_days:
|
|
23592
23741
|
type: object
|
|
23593
23742
|
properties:
|
|
@@ -25982,6 +26131,63 @@ components:
|
|
|
25982
26131
|
description: The Shroud gateway to point the SDK at
|
|
25983
26132
|
example: https://shroud.1claw.co
|
|
25984
26133
|
|
|
26134
|
+
CreateToolBindingRequest:
|
|
26135
|
+
type: object
|
|
26136
|
+
additionalProperties: false
|
|
26137
|
+
required: [secret_path, tool_name, destination_hosts]
|
|
26138
|
+
properties:
|
|
26139
|
+
secret_path:
|
|
26140
|
+
type: string
|
|
26141
|
+
description: Vault path of the secret the placeholder stands for
|
|
26142
|
+
tool_name:
|
|
26143
|
+
type: string
|
|
26144
|
+
description: Tool the binding applies to (`http_request`, `run_sql`, …) or `*`
|
|
26145
|
+
arg_path:
|
|
26146
|
+
type: string
|
|
26147
|
+
description: JSON pointer into the tool's arguments (`/headers/Authorization`, `/body/*`) or `*` (default)
|
|
26148
|
+
destination_hosts:
|
|
26149
|
+
type: array
|
|
26150
|
+
minItems: 1
|
|
26151
|
+
maxItems: 32
|
|
26152
|
+
items: { type: string }
|
|
26153
|
+
description: Hosts the rehydrated call may reach (`api.stripe.com`, `*.googleapis.com`); required
|
|
26154
|
+
|
|
26155
|
+
SecretToolBinding:
|
|
26156
|
+
type: object
|
|
26157
|
+
required: [id, org_id, agent_id, secret_path, tool_name, arg_path, destination_hosts, created_at]
|
|
26158
|
+
properties:
|
|
26159
|
+
id: { type: string, format: uuid }
|
|
26160
|
+
org_id: { type: string, format: uuid }
|
|
26161
|
+
agent_id: { type: string, format: uuid }
|
|
26162
|
+
secret_path: { type: string }
|
|
26163
|
+
tool_name: { type: string }
|
|
26164
|
+
arg_path: { type: string }
|
|
26165
|
+
destination_hosts:
|
|
26166
|
+
type: array
|
|
26167
|
+
items: { type: string }
|
|
26168
|
+
created_by: { type: string, format: uuid, nullable: true }
|
|
26169
|
+
created_at: { type: string, format: date-time }
|
|
26170
|
+
|
|
26171
|
+
X402TopupResponse:
|
|
26172
|
+
type: object
|
|
26173
|
+
required: [wallet, org_id, agent_id, credited_micro_usd, balance_micro_usd, balance_usd, access_token, expires_in, base_url, provisioned]
|
|
26174
|
+
properties:
|
|
26175
|
+
wallet: { type: string, description: Payer address (lower-case) }
|
|
26176
|
+
org_id: { type: string, format: uuid }
|
|
26177
|
+
agent_id: { type: string, format: uuid }
|
|
26178
|
+
credited_micro_usd: { type: integer, format: int64 }
|
|
26179
|
+
balance_micro_usd: { type: integer, format: int64 }
|
|
26180
|
+
balance_usd: { type: string }
|
|
26181
|
+
router_key:
|
|
26182
|
+
type: string
|
|
26183
|
+
description: Present only on the top-up that provisioned the account (or re-minted a lost key). Shown once.
|
|
26184
|
+
access_token:
|
|
26185
|
+
type: string
|
|
26186
|
+
description: A ≤60 s agent token for the wallet's agent (carries the `router_key` claim)
|
|
26187
|
+
expires_in: { type: integer }
|
|
26188
|
+
base_url: { type: string, description: The Shroud gateway }
|
|
26189
|
+
provisioned: { type: boolean, description: True when this top-up created the account }
|
|
26190
|
+
|
|
25985
26191
|
EventSubscription:
|
|
25986
26192
|
type: object
|
|
25987
26193
|
required: [id, agent_id, binding_id, event_type, interval_secs, is_active, primed, next_poll_at, consecutive_errors, events_emitted, created_at]
|