@1claw/openapi-spec 0.44.0 → 0.44.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/README.md +10 -2
- package/openapi.json +514 -0
- package/openapi.yaml +357 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,11 +40,19 @@ openapi-generator generate \
|
|
|
40
40
|
import spec from "@1claw/openapi-spec/openapi.json";
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
## What's in the spec (v0.
|
|
43
|
+
## What's in the spec (v0.44.0 — API `info.version` 2.33.0)
|
|
44
|
+
|
|
45
|
+
### Automations v2 & Channels (2.33)
|
|
46
|
+
- **Automations v2** — Workflow engine with multi-step pipelines, 14 step types, `{{...}}` template variables, conditional logic (`skip_if`/`run_if`), 10 marketing presets, webhook/event/cron/manual triggers. Enriched list API with `last_run_status`, `total_runs`, `success_rate`, `agent_name`. Run detail with `context` JSONB. Assist NL→workflow drafting.
|
|
47
|
+
- **Agent Channels** — Telegram, WhatsApp, Discord messaging channels for agents. CRUD, send, message history, test connectivity.
|
|
48
|
+
- **Agent Memory** — Three-tier memory (scratch, durable, semantic) with encryption at rest. CRUD, semantic search, namespace management.
|
|
49
|
+
- **Cloud Runtimes** — Managed containers with lifecycle management, hosting, interactive shell. Presets from small to large-cc (confidential compute).
|
|
50
|
+
- **Platform delegation** — Platform apps can perform delegated CRUD on connected user resources via `X-Platform-Connection` header. Delegation log for audit.
|
|
51
|
+
- **Discovery** — Public agent directory and platform marketplace.
|
|
44
52
|
|
|
45
53
|
### Non-EVM transaction signing (2.23)
|
|
46
54
|
- **Intents API** — `SubmitTransactionRequest` / `SignTransactionRequest` / `SignIntentRequest` extended with non-EVM fields: `destination_tag` (XRP), `memo`, `fee_rate_sat_per_vbyte` (Bitcoin), `fee_limit_sun` (Tron), `token_mint` / `token_decimals` (Solana SPL + Tron TRC-20), `ttl` (Cardano). Native sign + broadcast for Bitcoin, Solana, XRP, Cardano, Tron.
|
|
47
|
-
- **`xrpl_tx_json`** — Optional raw XRPL transaction JSON for 30+ transaction types beyond simple Payment.
|
|
55
|
+
- **`xrpl_tx_json`** — Optional raw XRPL transaction JSON for 30+ transaction types beyond simple Payment.
|
|
48
56
|
|
|
49
57
|
### Risk Engine & DPoP (2.19)
|
|
50
58
|
- **Risk events** — `GET /v1/risk/events` (list, filterable by severity/principal_type)
|
package/openapi.json
CHANGED
|
@@ -158,6 +158,10 @@
|
|
|
158
158
|
{
|
|
159
159
|
"name": "Agent Channels",
|
|
160
160
|
"description": "External messaging channels (Telegram, WhatsApp, Discord)"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "OAuth Connect",
|
|
164
|
+
"description": "OAuth connected accounts for agents (provider registry, connect flows, app credentials)"
|
|
161
165
|
}
|
|
162
166
|
],
|
|
163
167
|
"paths": {
|
|
@@ -12818,6 +12822,291 @@
|
|
|
12818
12822
|
}
|
|
12819
12823
|
}
|
|
12820
12824
|
}
|
|
12825
|
+
},
|
|
12826
|
+
"/v1/oauth/providers": {
|
|
12827
|
+
"get": {
|
|
12828
|
+
"tags": [
|
|
12829
|
+
"OAuth Connect"
|
|
12830
|
+
],
|
|
12831
|
+
"summary": "List OAuth providers",
|
|
12832
|
+
"description": "Returns the list of supported OAuth providers with their metadata,\navailable scopes, and authorization URLs. No authentication required.\n",
|
|
12833
|
+
"operationId": "listOAuthProviders",
|
|
12834
|
+
"security": [],
|
|
12835
|
+
"responses": {
|
|
12836
|
+
"200": {
|
|
12837
|
+
"description": "Provider list",
|
|
12838
|
+
"content": {
|
|
12839
|
+
"application/json": {
|
|
12840
|
+
"schema": {
|
|
12841
|
+
"$ref": "#/components/schemas/OAuthProviderListResponse"
|
|
12842
|
+
}
|
|
12843
|
+
}
|
|
12844
|
+
}
|
|
12845
|
+
}
|
|
12846
|
+
}
|
|
12847
|
+
}
|
|
12848
|
+
},
|
|
12849
|
+
"/v1/agents/{agent_id}/oauth/connect": {
|
|
12850
|
+
"post": {
|
|
12851
|
+
"tags": [
|
|
12852
|
+
"OAuth Connect"
|
|
12853
|
+
],
|
|
12854
|
+
"summary": "Initiate OAuth connection",
|
|
12855
|
+
"description": "Start an OAuth authorization flow for the specified agent and provider.\nReturns the authorization URL to redirect the user to. Human-only.\n",
|
|
12856
|
+
"operationId": "connectOAuth",
|
|
12857
|
+
"parameters": [
|
|
12858
|
+
{
|
|
12859
|
+
"$ref": "#/components/parameters/AgentId"
|
|
12860
|
+
}
|
|
12861
|
+
],
|
|
12862
|
+
"requestBody": {
|
|
12863
|
+
"required": true,
|
|
12864
|
+
"content": {
|
|
12865
|
+
"application/json": {
|
|
12866
|
+
"schema": {
|
|
12867
|
+
"$ref": "#/components/schemas/ConnectOAuthRequest"
|
|
12868
|
+
}
|
|
12869
|
+
}
|
|
12870
|
+
}
|
|
12871
|
+
},
|
|
12872
|
+
"responses": {
|
|
12873
|
+
"200": {
|
|
12874
|
+
"description": "Authorization URL generated",
|
|
12875
|
+
"content": {
|
|
12876
|
+
"application/json": {
|
|
12877
|
+
"schema": {
|
|
12878
|
+
"$ref": "#/components/schemas/ConnectOAuthResponse"
|
|
12879
|
+
}
|
|
12880
|
+
}
|
|
12881
|
+
}
|
|
12882
|
+
},
|
|
12883
|
+
"400": {
|
|
12884
|
+
"$ref": "#/components/responses/BadRequest"
|
|
12885
|
+
},
|
|
12886
|
+
"403": {
|
|
12887
|
+
"$ref": "#/components/responses/Forbidden"
|
|
12888
|
+
},
|
|
12889
|
+
"404": {
|
|
12890
|
+
"$ref": "#/components/responses/NotFound"
|
|
12891
|
+
}
|
|
12892
|
+
}
|
|
12893
|
+
}
|
|
12894
|
+
},
|
|
12895
|
+
"/v1/agents/{agent_id}/oauth/connections": {
|
|
12896
|
+
"get": {
|
|
12897
|
+
"tags": [
|
|
12898
|
+
"OAuth Connect"
|
|
12899
|
+
],
|
|
12900
|
+
"summary": "List OAuth connections",
|
|
12901
|
+
"description": "List all active OAuth connections for the specified agent.",
|
|
12902
|
+
"operationId": "listOAuthConnections",
|
|
12903
|
+
"parameters": [
|
|
12904
|
+
{
|
|
12905
|
+
"$ref": "#/components/parameters/AgentId"
|
|
12906
|
+
}
|
|
12907
|
+
],
|
|
12908
|
+
"responses": {
|
|
12909
|
+
"200": {
|
|
12910
|
+
"description": "Connection list",
|
|
12911
|
+
"content": {
|
|
12912
|
+
"application/json": {
|
|
12913
|
+
"schema": {
|
|
12914
|
+
"$ref": "#/components/schemas/OAuthConnectionListResponse"
|
|
12915
|
+
}
|
|
12916
|
+
}
|
|
12917
|
+
}
|
|
12918
|
+
},
|
|
12919
|
+
"404": {
|
|
12920
|
+
"$ref": "#/components/responses/NotFound"
|
|
12921
|
+
}
|
|
12922
|
+
}
|
|
12923
|
+
}
|
|
12924
|
+
},
|
|
12925
|
+
"/v1/agents/{agent_id}/oauth/disconnect/{binding_id}": {
|
|
12926
|
+
"post": {
|
|
12927
|
+
"tags": [
|
|
12928
|
+
"OAuth Connect"
|
|
12929
|
+
],
|
|
12930
|
+
"summary": "Disconnect OAuth connection",
|
|
12931
|
+
"description": "Disconnect an OAuth connection by revoking tokens and removing the binding.\nHuman-only.\n",
|
|
12932
|
+
"operationId": "disconnectOAuth",
|
|
12933
|
+
"parameters": [
|
|
12934
|
+
{
|
|
12935
|
+
"$ref": "#/components/parameters/AgentId"
|
|
12936
|
+
},
|
|
12937
|
+
{
|
|
12938
|
+
"name": "binding_id",
|
|
12939
|
+
"in": "path",
|
|
12940
|
+
"required": true,
|
|
12941
|
+
"schema": {
|
|
12942
|
+
"type": "string",
|
|
12943
|
+
"format": "uuid"
|
|
12944
|
+
}
|
|
12945
|
+
}
|
|
12946
|
+
],
|
|
12947
|
+
"responses": {
|
|
12948
|
+
"204": {
|
|
12949
|
+
"description": "Connection disconnected"
|
|
12950
|
+
},
|
|
12951
|
+
"403": {
|
|
12952
|
+
"$ref": "#/components/responses/Forbidden"
|
|
12953
|
+
},
|
|
12954
|
+
"404": {
|
|
12955
|
+
"$ref": "#/components/responses/NotFound"
|
|
12956
|
+
}
|
|
12957
|
+
}
|
|
12958
|
+
}
|
|
12959
|
+
},
|
|
12960
|
+
"/v1/agents/{agent_id}/oauth/app-credentials": {
|
|
12961
|
+
"post": {
|
|
12962
|
+
"tags": [
|
|
12963
|
+
"OAuth Connect"
|
|
12964
|
+
],
|
|
12965
|
+
"summary": "Save OAuth app credentials",
|
|
12966
|
+
"description": "Store custom OAuth app credentials (client ID/secret) for a provider.\nAllows the agent to use a BYOA (Bring Your Own App) OAuth application\ninstead of 1Claw's shared credentials. Human-only.\n",
|
|
12967
|
+
"operationId": "saveOAuthAppCredentials",
|
|
12968
|
+
"parameters": [
|
|
12969
|
+
{
|
|
12970
|
+
"$ref": "#/components/parameters/AgentId"
|
|
12971
|
+
}
|
|
12972
|
+
],
|
|
12973
|
+
"requestBody": {
|
|
12974
|
+
"required": true,
|
|
12975
|
+
"content": {
|
|
12976
|
+
"application/json": {
|
|
12977
|
+
"schema": {
|
|
12978
|
+
"$ref": "#/components/schemas/SaveOAuthAppCredentialsRequest"
|
|
12979
|
+
}
|
|
12980
|
+
}
|
|
12981
|
+
}
|
|
12982
|
+
},
|
|
12983
|
+
"responses": {
|
|
12984
|
+
"201": {
|
|
12985
|
+
"description": "Credentials saved",
|
|
12986
|
+
"content": {
|
|
12987
|
+
"application/json": {
|
|
12988
|
+
"schema": {
|
|
12989
|
+
"$ref": "#/components/schemas/OAuthAppCredentialResponse"
|
|
12990
|
+
}
|
|
12991
|
+
}
|
|
12992
|
+
}
|
|
12993
|
+
},
|
|
12994
|
+
"400": {
|
|
12995
|
+
"$ref": "#/components/responses/BadRequest"
|
|
12996
|
+
},
|
|
12997
|
+
"403": {
|
|
12998
|
+
"$ref": "#/components/responses/Forbidden"
|
|
12999
|
+
},
|
|
13000
|
+
"404": {
|
|
13001
|
+
"$ref": "#/components/responses/NotFound"
|
|
13002
|
+
}
|
|
13003
|
+
}
|
|
13004
|
+
},
|
|
13005
|
+
"get": {
|
|
13006
|
+
"tags": [
|
|
13007
|
+
"OAuth Connect"
|
|
13008
|
+
],
|
|
13009
|
+
"summary": "List OAuth app credentials",
|
|
13010
|
+
"description": "List stored OAuth app credentials for the agent. Client secrets\nare never returned in the response.\n",
|
|
13011
|
+
"operationId": "listOAuthAppCredentials",
|
|
13012
|
+
"parameters": [
|
|
13013
|
+
{
|
|
13014
|
+
"$ref": "#/components/parameters/AgentId"
|
|
13015
|
+
}
|
|
13016
|
+
],
|
|
13017
|
+
"responses": {
|
|
13018
|
+
"200": {
|
|
13019
|
+
"description": "Credential list",
|
|
13020
|
+
"content": {
|
|
13021
|
+
"application/json": {
|
|
13022
|
+
"schema": {
|
|
13023
|
+
"$ref": "#/components/schemas/OAuthAppCredentialListResponse"
|
|
13024
|
+
}
|
|
13025
|
+
}
|
|
13026
|
+
}
|
|
13027
|
+
},
|
|
13028
|
+
"404": {
|
|
13029
|
+
"$ref": "#/components/responses/NotFound"
|
|
13030
|
+
}
|
|
13031
|
+
}
|
|
13032
|
+
}
|
|
13033
|
+
},
|
|
13034
|
+
"/v1/agents/{agent_id}/oauth/app-credentials/{provider_slug}": {
|
|
13035
|
+
"delete": {
|
|
13036
|
+
"tags": [
|
|
13037
|
+
"OAuth Connect"
|
|
13038
|
+
],
|
|
13039
|
+
"summary": "Delete OAuth app credentials",
|
|
13040
|
+
"description": "Remove stored OAuth app credentials for a specific provider. Human-only.\n",
|
|
13041
|
+
"operationId": "deleteOAuthAppCredentials",
|
|
13042
|
+
"parameters": [
|
|
13043
|
+
{
|
|
13044
|
+
"$ref": "#/components/parameters/AgentId"
|
|
13045
|
+
},
|
|
13046
|
+
{
|
|
13047
|
+
"name": "provider_slug",
|
|
13048
|
+
"in": "path",
|
|
13049
|
+
"required": true,
|
|
13050
|
+
"schema": {
|
|
13051
|
+
"type": "string"
|
|
13052
|
+
},
|
|
13053
|
+
"description": "Provider identifier (e.g. \"github\", \"google\", \"slack\")"
|
|
13054
|
+
}
|
|
13055
|
+
],
|
|
13056
|
+
"responses": {
|
|
13057
|
+
"204": {
|
|
13058
|
+
"description": "Credentials deleted"
|
|
13059
|
+
},
|
|
13060
|
+
"403": {
|
|
13061
|
+
"$ref": "#/components/responses/Forbidden"
|
|
13062
|
+
},
|
|
13063
|
+
"404": {
|
|
13064
|
+
"$ref": "#/components/responses/NotFound"
|
|
13065
|
+
}
|
|
13066
|
+
}
|
|
13067
|
+
}
|
|
13068
|
+
},
|
|
13069
|
+
"/v1/oauth/callback": {
|
|
13070
|
+
"get": {
|
|
13071
|
+
"tags": [
|
|
13072
|
+
"OAuth Connect"
|
|
13073
|
+
],
|
|
13074
|
+
"summary": "OAuth callback",
|
|
13075
|
+
"description": "Public callback URL that OAuth providers redirect to after user authorization.\nExchanges the authorization code for tokens and redirects to the dashboard.\n",
|
|
13076
|
+
"operationId": "oauthConnectCallback",
|
|
13077
|
+
"security": [],
|
|
13078
|
+
"parameters": [
|
|
13079
|
+
{
|
|
13080
|
+
"name": "code",
|
|
13081
|
+
"in": "query",
|
|
13082
|
+
"schema": {
|
|
13083
|
+
"type": "string"
|
|
13084
|
+
},
|
|
13085
|
+
"description": "Authorization code from the OAuth provider"
|
|
13086
|
+
},
|
|
13087
|
+
{
|
|
13088
|
+
"name": "state",
|
|
13089
|
+
"in": "query",
|
|
13090
|
+
"schema": {
|
|
13091
|
+
"type": "string"
|
|
13092
|
+
},
|
|
13093
|
+
"description": "Opaque state parameter for CSRF protection and session binding"
|
|
13094
|
+
},
|
|
13095
|
+
{
|
|
13096
|
+
"name": "error",
|
|
13097
|
+
"in": "query",
|
|
13098
|
+
"schema": {
|
|
13099
|
+
"type": "string"
|
|
13100
|
+
},
|
|
13101
|
+
"description": "Error code if the authorization was denied or failed"
|
|
13102
|
+
}
|
|
13103
|
+
],
|
|
13104
|
+
"responses": {
|
|
13105
|
+
"302": {
|
|
13106
|
+
"description": "Redirect to dashboard with success or error status"
|
|
13107
|
+
}
|
|
13108
|
+
}
|
|
13109
|
+
}
|
|
12821
13110
|
}
|
|
12822
13111
|
},
|
|
12823
13112
|
"components": {
|
|
@@ -22085,6 +22374,231 @@
|
|
|
22085
22374
|
}
|
|
22086
22375
|
}
|
|
22087
22376
|
}
|
|
22377
|
+
},
|
|
22378
|
+
"OAuthProviderScope": {
|
|
22379
|
+
"type": "object",
|
|
22380
|
+
"properties": {
|
|
22381
|
+
"scope": {
|
|
22382
|
+
"type": "string"
|
|
22383
|
+
},
|
|
22384
|
+
"label": {
|
|
22385
|
+
"type": "string"
|
|
22386
|
+
},
|
|
22387
|
+
"description": {
|
|
22388
|
+
"type": "string"
|
|
22389
|
+
},
|
|
22390
|
+
"default": {
|
|
22391
|
+
"type": "boolean"
|
|
22392
|
+
}
|
|
22393
|
+
}
|
|
22394
|
+
},
|
|
22395
|
+
"OAuthProvider": {
|
|
22396
|
+
"type": "object",
|
|
22397
|
+
"properties": {
|
|
22398
|
+
"slug": {
|
|
22399
|
+
"type": "string",
|
|
22400
|
+
"description": "Unique provider identifier (e.g. \"github\", \"google\", \"slack\")"
|
|
22401
|
+
},
|
|
22402
|
+
"display_name": {
|
|
22403
|
+
"type": "string"
|
|
22404
|
+
},
|
|
22405
|
+
"icon_url": {
|
|
22406
|
+
"type": "string",
|
|
22407
|
+
"format": "uri"
|
|
22408
|
+
},
|
|
22409
|
+
"authorization_url": {
|
|
22410
|
+
"type": "string",
|
|
22411
|
+
"format": "uri"
|
|
22412
|
+
},
|
|
22413
|
+
"token_url": {
|
|
22414
|
+
"type": "string",
|
|
22415
|
+
"format": "uri"
|
|
22416
|
+
},
|
|
22417
|
+
"scopes_available": {
|
|
22418
|
+
"type": "array",
|
|
22419
|
+
"items": {
|
|
22420
|
+
"$ref": "#/components/schemas/OAuthProviderScope"
|
|
22421
|
+
}
|
|
22422
|
+
},
|
|
22423
|
+
"default_scopes": {
|
|
22424
|
+
"type": "array",
|
|
22425
|
+
"items": {
|
|
22426
|
+
"type": "string"
|
|
22427
|
+
}
|
|
22428
|
+
},
|
|
22429
|
+
"extra_auth_params": {
|
|
22430
|
+
"type": "object",
|
|
22431
|
+
"additionalProperties": {
|
|
22432
|
+
"type": "string"
|
|
22433
|
+
},
|
|
22434
|
+
"nullable": true
|
|
22435
|
+
},
|
|
22436
|
+
"requires_app_credentials": {
|
|
22437
|
+
"type": "boolean",
|
|
22438
|
+
"description": "Whether custom app credentials are required (vs. shared 1Claw app)"
|
|
22439
|
+
},
|
|
22440
|
+
"documentation_url": {
|
|
22441
|
+
"type": "string",
|
|
22442
|
+
"format": "uri",
|
|
22443
|
+
"nullable": true
|
|
22444
|
+
}
|
|
22445
|
+
}
|
|
22446
|
+
},
|
|
22447
|
+
"OAuthProviderListResponse": {
|
|
22448
|
+
"type": "object",
|
|
22449
|
+
"properties": {
|
|
22450
|
+
"providers": {
|
|
22451
|
+
"type": "array",
|
|
22452
|
+
"items": {
|
|
22453
|
+
"$ref": "#/components/schemas/OAuthProvider"
|
|
22454
|
+
}
|
|
22455
|
+
}
|
|
22456
|
+
}
|
|
22457
|
+
},
|
|
22458
|
+
"ConnectOAuthRequest": {
|
|
22459
|
+
"type": "object",
|
|
22460
|
+
"required": [
|
|
22461
|
+
"provider_slug"
|
|
22462
|
+
],
|
|
22463
|
+
"properties": {
|
|
22464
|
+
"provider_slug": {
|
|
22465
|
+
"type": "string",
|
|
22466
|
+
"description": "Provider to connect (e.g. \"github\", \"google\", \"slack\")"
|
|
22467
|
+
},
|
|
22468
|
+
"scopes": {
|
|
22469
|
+
"type": "array",
|
|
22470
|
+
"items": {
|
|
22471
|
+
"type": "string"
|
|
22472
|
+
},
|
|
22473
|
+
"description": "Override default scopes for this connection"
|
|
22474
|
+
},
|
|
22475
|
+
"redirect_after": {
|
|
22476
|
+
"type": "string",
|
|
22477
|
+
"description": "URL to redirect to after the OAuth flow completes"
|
|
22478
|
+
}
|
|
22479
|
+
}
|
|
22480
|
+
},
|
|
22481
|
+
"ConnectOAuthResponse": {
|
|
22482
|
+
"type": "object",
|
|
22483
|
+
"properties": {
|
|
22484
|
+
"authorization_url": {
|
|
22485
|
+
"type": "string",
|
|
22486
|
+
"format": "uri",
|
|
22487
|
+
"description": "Redirect the user to this URL to authorize the connection"
|
|
22488
|
+
}
|
|
22489
|
+
}
|
|
22490
|
+
},
|
|
22491
|
+
"OAuthConnectionResponse": {
|
|
22492
|
+
"type": "object",
|
|
22493
|
+
"properties": {
|
|
22494
|
+
"binding_id": {
|
|
22495
|
+
"type": "string",
|
|
22496
|
+
"format": "uuid"
|
|
22497
|
+
},
|
|
22498
|
+
"provider_slug": {
|
|
22499
|
+
"type": "string"
|
|
22500
|
+
},
|
|
22501
|
+
"provider_name": {
|
|
22502
|
+
"type": "string"
|
|
22503
|
+
},
|
|
22504
|
+
"scopes": {
|
|
22505
|
+
"type": "array",
|
|
22506
|
+
"items": {
|
|
22507
|
+
"type": "string"
|
|
22508
|
+
}
|
|
22509
|
+
},
|
|
22510
|
+
"status": {
|
|
22511
|
+
"type": "string",
|
|
22512
|
+
"enum": [
|
|
22513
|
+
"active",
|
|
22514
|
+
"expired",
|
|
22515
|
+
"revoked"
|
|
22516
|
+
]
|
|
22517
|
+
},
|
|
22518
|
+
"needs_reauth": {
|
|
22519
|
+
"type": "boolean"
|
|
22520
|
+
},
|
|
22521
|
+
"created_at": {
|
|
22522
|
+
"type": "string",
|
|
22523
|
+
"format": "date-time"
|
|
22524
|
+
}
|
|
22525
|
+
}
|
|
22526
|
+
},
|
|
22527
|
+
"OAuthConnectionListResponse": {
|
|
22528
|
+
"type": "object",
|
|
22529
|
+
"properties": {
|
|
22530
|
+
"connections": {
|
|
22531
|
+
"type": "array",
|
|
22532
|
+
"items": {
|
|
22533
|
+
"$ref": "#/components/schemas/OAuthConnectionResponse"
|
|
22534
|
+
}
|
|
22535
|
+
}
|
|
22536
|
+
}
|
|
22537
|
+
},
|
|
22538
|
+
"SaveOAuthAppCredentialsRequest": {
|
|
22539
|
+
"type": "object",
|
|
22540
|
+
"required": [
|
|
22541
|
+
"provider_slug",
|
|
22542
|
+
"client_id",
|
|
22543
|
+
"client_secret"
|
|
22544
|
+
],
|
|
22545
|
+
"properties": {
|
|
22546
|
+
"provider_slug": {
|
|
22547
|
+
"type": "string",
|
|
22548
|
+
"description": "Provider this credential is for"
|
|
22549
|
+
},
|
|
22550
|
+
"client_id": {
|
|
22551
|
+
"type": "string"
|
|
22552
|
+
},
|
|
22553
|
+
"client_secret": {
|
|
22554
|
+
"type": "string",
|
|
22555
|
+
"description": "Write-only; never returned in responses"
|
|
22556
|
+
},
|
|
22557
|
+
"redirect_uri": {
|
|
22558
|
+
"type": "string",
|
|
22559
|
+
"format": "uri",
|
|
22560
|
+
"description": "Custom redirect URI override"
|
|
22561
|
+
}
|
|
22562
|
+
}
|
|
22563
|
+
},
|
|
22564
|
+
"OAuthAppCredentialResponse": {
|
|
22565
|
+
"type": "object",
|
|
22566
|
+
"properties": {
|
|
22567
|
+
"id": {
|
|
22568
|
+
"type": "string",
|
|
22569
|
+
"format": "uuid"
|
|
22570
|
+
},
|
|
22571
|
+
"provider_slug": {
|
|
22572
|
+
"type": "string"
|
|
22573
|
+
},
|
|
22574
|
+
"client_id": {
|
|
22575
|
+
"type": "string"
|
|
22576
|
+
},
|
|
22577
|
+
"redirect_uri": {
|
|
22578
|
+
"type": "string",
|
|
22579
|
+
"format": "uri",
|
|
22580
|
+
"nullable": true
|
|
22581
|
+
},
|
|
22582
|
+
"created_at": {
|
|
22583
|
+
"type": "string",
|
|
22584
|
+
"format": "date-time"
|
|
22585
|
+
},
|
|
22586
|
+
"updated_at": {
|
|
22587
|
+
"type": "string",
|
|
22588
|
+
"format": "date-time"
|
|
22589
|
+
}
|
|
22590
|
+
}
|
|
22591
|
+
},
|
|
22592
|
+
"OAuthAppCredentialListResponse": {
|
|
22593
|
+
"type": "object",
|
|
22594
|
+
"properties": {
|
|
22595
|
+
"credentials": {
|
|
22596
|
+
"type": "array",
|
|
22597
|
+
"items": {
|
|
22598
|
+
"$ref": "#/components/schemas/OAuthAppCredentialResponse"
|
|
22599
|
+
}
|
|
22600
|
+
}
|
|
22601
|
+
}
|
|
22088
22602
|
}
|
|
22089
22603
|
}
|
|
22090
22604
|
}
|
package/openapi.yaml
CHANGED
|
@@ -94,6 +94,8 @@ tags:
|
|
|
94
94
|
description: Chat with agents via Shroud LLM proxy
|
|
95
95
|
- name: Agent Channels
|
|
96
96
|
description: External messaging channels (Telegram, WhatsApp, Discord)
|
|
97
|
+
- name: OAuth Connect
|
|
98
|
+
description: OAuth connected accounts for agents (provider registry, connect flows, app credentials)
|
|
97
99
|
|
|
98
100
|
# =============================================================================
|
|
99
101
|
# PATHS
|
|
@@ -8173,6 +8175,200 @@ paths:
|
|
|
8173
8175
|
"200":
|
|
8174
8176
|
description: Webhook processed
|
|
8175
8177
|
|
|
8178
|
+
# ---------------------------------------------------------------------------
|
|
8179
|
+
# OAuth Connect
|
|
8180
|
+
# ---------------------------------------------------------------------------
|
|
8181
|
+
|
|
8182
|
+
/v1/oauth/providers:
|
|
8183
|
+
get:
|
|
8184
|
+
tags: [OAuth Connect]
|
|
8185
|
+
summary: List OAuth providers
|
|
8186
|
+
description: |
|
|
8187
|
+
Returns the list of supported OAuth providers with their metadata,
|
|
8188
|
+
available scopes, and authorization URLs. No authentication required.
|
|
8189
|
+
operationId: listOAuthProviders
|
|
8190
|
+
security: []
|
|
8191
|
+
responses:
|
|
8192
|
+
"200":
|
|
8193
|
+
description: Provider list
|
|
8194
|
+
content:
|
|
8195
|
+
application/json:
|
|
8196
|
+
schema:
|
|
8197
|
+
$ref: "#/components/schemas/OAuthProviderListResponse"
|
|
8198
|
+
|
|
8199
|
+
/v1/agents/{agent_id}/oauth/connect:
|
|
8200
|
+
post:
|
|
8201
|
+
tags: [OAuth Connect]
|
|
8202
|
+
summary: Initiate OAuth connection
|
|
8203
|
+
description: |
|
|
8204
|
+
Start an OAuth authorization flow for the specified agent and provider.
|
|
8205
|
+
Returns the authorization URL to redirect the user to. Human-only.
|
|
8206
|
+
operationId: connectOAuth
|
|
8207
|
+
parameters:
|
|
8208
|
+
- $ref: "#/components/parameters/AgentId"
|
|
8209
|
+
requestBody:
|
|
8210
|
+
required: true
|
|
8211
|
+
content:
|
|
8212
|
+
application/json:
|
|
8213
|
+
schema:
|
|
8214
|
+
$ref: "#/components/schemas/ConnectOAuthRequest"
|
|
8215
|
+
responses:
|
|
8216
|
+
"200":
|
|
8217
|
+
description: Authorization URL generated
|
|
8218
|
+
content:
|
|
8219
|
+
application/json:
|
|
8220
|
+
schema:
|
|
8221
|
+
$ref: "#/components/schemas/ConnectOAuthResponse"
|
|
8222
|
+
"400":
|
|
8223
|
+
$ref: "#/components/responses/BadRequest"
|
|
8224
|
+
"403":
|
|
8225
|
+
$ref: "#/components/responses/Forbidden"
|
|
8226
|
+
"404":
|
|
8227
|
+
$ref: "#/components/responses/NotFound"
|
|
8228
|
+
|
|
8229
|
+
/v1/agents/{agent_id}/oauth/connections:
|
|
8230
|
+
get:
|
|
8231
|
+
tags: [OAuth Connect]
|
|
8232
|
+
summary: List OAuth connections
|
|
8233
|
+
description: List all active OAuth connections for the specified agent.
|
|
8234
|
+
operationId: listOAuthConnections
|
|
8235
|
+
parameters:
|
|
8236
|
+
- $ref: "#/components/parameters/AgentId"
|
|
8237
|
+
responses:
|
|
8238
|
+
"200":
|
|
8239
|
+
description: Connection list
|
|
8240
|
+
content:
|
|
8241
|
+
application/json:
|
|
8242
|
+
schema:
|
|
8243
|
+
$ref: "#/components/schemas/OAuthConnectionListResponse"
|
|
8244
|
+
"404":
|
|
8245
|
+
$ref: "#/components/responses/NotFound"
|
|
8246
|
+
|
|
8247
|
+
/v1/agents/{agent_id}/oauth/disconnect/{binding_id}:
|
|
8248
|
+
post:
|
|
8249
|
+
tags: [OAuth Connect]
|
|
8250
|
+
summary: Disconnect OAuth connection
|
|
8251
|
+
description: |
|
|
8252
|
+
Disconnect an OAuth connection by revoking tokens and removing the binding.
|
|
8253
|
+
Human-only.
|
|
8254
|
+
operationId: disconnectOAuth
|
|
8255
|
+
parameters:
|
|
8256
|
+
- $ref: "#/components/parameters/AgentId"
|
|
8257
|
+
- name: binding_id
|
|
8258
|
+
in: path
|
|
8259
|
+
required: true
|
|
8260
|
+
schema:
|
|
8261
|
+
type: string
|
|
8262
|
+
format: uuid
|
|
8263
|
+
responses:
|
|
8264
|
+
"204":
|
|
8265
|
+
description: Connection disconnected
|
|
8266
|
+
"403":
|
|
8267
|
+
$ref: "#/components/responses/Forbidden"
|
|
8268
|
+
"404":
|
|
8269
|
+
$ref: "#/components/responses/NotFound"
|
|
8270
|
+
|
|
8271
|
+
/v1/agents/{agent_id}/oauth/app-credentials:
|
|
8272
|
+
post:
|
|
8273
|
+
tags: [OAuth Connect]
|
|
8274
|
+
summary: Save OAuth app credentials
|
|
8275
|
+
description: |
|
|
8276
|
+
Store custom OAuth app credentials (client ID/secret) for a provider.
|
|
8277
|
+
Allows the agent to use a BYOA (Bring Your Own App) OAuth application
|
|
8278
|
+
instead of 1Claw's shared credentials. Human-only.
|
|
8279
|
+
operationId: saveOAuthAppCredentials
|
|
8280
|
+
parameters:
|
|
8281
|
+
- $ref: "#/components/parameters/AgentId"
|
|
8282
|
+
requestBody:
|
|
8283
|
+
required: true
|
|
8284
|
+
content:
|
|
8285
|
+
application/json:
|
|
8286
|
+
schema:
|
|
8287
|
+
$ref: "#/components/schemas/SaveOAuthAppCredentialsRequest"
|
|
8288
|
+
responses:
|
|
8289
|
+
"201":
|
|
8290
|
+
description: Credentials saved
|
|
8291
|
+
content:
|
|
8292
|
+
application/json:
|
|
8293
|
+
schema:
|
|
8294
|
+
$ref: "#/components/schemas/OAuthAppCredentialResponse"
|
|
8295
|
+
"400":
|
|
8296
|
+
$ref: "#/components/responses/BadRequest"
|
|
8297
|
+
"403":
|
|
8298
|
+
$ref: "#/components/responses/Forbidden"
|
|
8299
|
+
"404":
|
|
8300
|
+
$ref: "#/components/responses/NotFound"
|
|
8301
|
+
get:
|
|
8302
|
+
tags: [OAuth Connect]
|
|
8303
|
+
summary: List OAuth app credentials
|
|
8304
|
+
description: |
|
|
8305
|
+
List stored OAuth app credentials for the agent. Client secrets
|
|
8306
|
+
are never returned in the response.
|
|
8307
|
+
operationId: listOAuthAppCredentials
|
|
8308
|
+
parameters:
|
|
8309
|
+
- $ref: "#/components/parameters/AgentId"
|
|
8310
|
+
responses:
|
|
8311
|
+
"200":
|
|
8312
|
+
description: Credential list
|
|
8313
|
+
content:
|
|
8314
|
+
application/json:
|
|
8315
|
+
schema:
|
|
8316
|
+
$ref: "#/components/schemas/OAuthAppCredentialListResponse"
|
|
8317
|
+
"404":
|
|
8318
|
+
$ref: "#/components/responses/NotFound"
|
|
8319
|
+
|
|
8320
|
+
/v1/agents/{agent_id}/oauth/app-credentials/{provider_slug}:
|
|
8321
|
+
delete:
|
|
8322
|
+
tags: [OAuth Connect]
|
|
8323
|
+
summary: Delete OAuth app credentials
|
|
8324
|
+
description: |
|
|
8325
|
+
Remove stored OAuth app credentials for a specific provider. Human-only.
|
|
8326
|
+
operationId: deleteOAuthAppCredentials
|
|
8327
|
+
parameters:
|
|
8328
|
+
- $ref: "#/components/parameters/AgentId"
|
|
8329
|
+
- name: provider_slug
|
|
8330
|
+
in: path
|
|
8331
|
+
required: true
|
|
8332
|
+
schema:
|
|
8333
|
+
type: string
|
|
8334
|
+
description: Provider identifier (e.g. "github", "google", "slack")
|
|
8335
|
+
responses:
|
|
8336
|
+
"204":
|
|
8337
|
+
description: Credentials deleted
|
|
8338
|
+
"403":
|
|
8339
|
+
$ref: "#/components/responses/Forbidden"
|
|
8340
|
+
"404":
|
|
8341
|
+
$ref: "#/components/responses/NotFound"
|
|
8342
|
+
|
|
8343
|
+
/v1/oauth/callback:
|
|
8344
|
+
get:
|
|
8345
|
+
tags: [OAuth Connect]
|
|
8346
|
+
summary: OAuth callback
|
|
8347
|
+
description: |
|
|
8348
|
+
Public callback URL that OAuth providers redirect to after user authorization.
|
|
8349
|
+
Exchanges the authorization code for tokens and redirects to the dashboard.
|
|
8350
|
+
operationId: oauthConnectCallback
|
|
8351
|
+
security: []
|
|
8352
|
+
parameters:
|
|
8353
|
+
- name: code
|
|
8354
|
+
in: query
|
|
8355
|
+
schema:
|
|
8356
|
+
type: string
|
|
8357
|
+
description: Authorization code from the OAuth provider
|
|
8358
|
+
- name: state
|
|
8359
|
+
in: query
|
|
8360
|
+
schema:
|
|
8361
|
+
type: string
|
|
8362
|
+
description: Opaque state parameter for CSRF protection and session binding
|
|
8363
|
+
- name: error
|
|
8364
|
+
in: query
|
|
8365
|
+
schema:
|
|
8366
|
+
type: string
|
|
8367
|
+
description: Error code if the authorization was denied or failed
|
|
8368
|
+
responses:
|
|
8369
|
+
"302":
|
|
8370
|
+
description: Redirect to dashboard with success or error status
|
|
8371
|
+
|
|
8176
8372
|
# =============================================================================
|
|
8177
8373
|
# COMPONENTS
|
|
8178
8374
|
# =============================================================================
|
|
@@ -14544,3 +14740,164 @@ components:
|
|
|
14544
14740
|
type: array
|
|
14545
14741
|
items:
|
|
14546
14742
|
$ref: "#/components/schemas/ChannelMessageResponse"
|
|
14743
|
+
|
|
14744
|
+
# ── OAuth Connect ──────────────────────────────────────────────
|
|
14745
|
+
|
|
14746
|
+
OAuthProviderScope:
|
|
14747
|
+
type: object
|
|
14748
|
+
properties:
|
|
14749
|
+
scope:
|
|
14750
|
+
type: string
|
|
14751
|
+
label:
|
|
14752
|
+
type: string
|
|
14753
|
+
description:
|
|
14754
|
+
type: string
|
|
14755
|
+
default:
|
|
14756
|
+
type: boolean
|
|
14757
|
+
|
|
14758
|
+
OAuthProvider:
|
|
14759
|
+
type: object
|
|
14760
|
+
properties:
|
|
14761
|
+
slug:
|
|
14762
|
+
type: string
|
|
14763
|
+
description: Unique provider identifier (e.g. "github", "google", "slack")
|
|
14764
|
+
display_name:
|
|
14765
|
+
type: string
|
|
14766
|
+
icon_url:
|
|
14767
|
+
type: string
|
|
14768
|
+
format: uri
|
|
14769
|
+
authorization_url:
|
|
14770
|
+
type: string
|
|
14771
|
+
format: uri
|
|
14772
|
+
token_url:
|
|
14773
|
+
type: string
|
|
14774
|
+
format: uri
|
|
14775
|
+
scopes_available:
|
|
14776
|
+
type: array
|
|
14777
|
+
items:
|
|
14778
|
+
$ref: "#/components/schemas/OAuthProviderScope"
|
|
14779
|
+
default_scopes:
|
|
14780
|
+
type: array
|
|
14781
|
+
items:
|
|
14782
|
+
type: string
|
|
14783
|
+
extra_auth_params:
|
|
14784
|
+
type: object
|
|
14785
|
+
additionalProperties:
|
|
14786
|
+
type: string
|
|
14787
|
+
nullable: true
|
|
14788
|
+
requires_app_credentials:
|
|
14789
|
+
type: boolean
|
|
14790
|
+
description: Whether custom app credentials are required (vs. shared 1Claw app)
|
|
14791
|
+
documentation_url:
|
|
14792
|
+
type: string
|
|
14793
|
+
format: uri
|
|
14794
|
+
nullable: true
|
|
14795
|
+
|
|
14796
|
+
OAuthProviderListResponse:
|
|
14797
|
+
type: object
|
|
14798
|
+
properties:
|
|
14799
|
+
providers:
|
|
14800
|
+
type: array
|
|
14801
|
+
items:
|
|
14802
|
+
$ref: "#/components/schemas/OAuthProvider"
|
|
14803
|
+
|
|
14804
|
+
ConnectOAuthRequest:
|
|
14805
|
+
type: object
|
|
14806
|
+
required: [provider_slug]
|
|
14807
|
+
properties:
|
|
14808
|
+
provider_slug:
|
|
14809
|
+
type: string
|
|
14810
|
+
description: Provider to connect (e.g. "github", "google", "slack")
|
|
14811
|
+
scopes:
|
|
14812
|
+
type: array
|
|
14813
|
+
items:
|
|
14814
|
+
type: string
|
|
14815
|
+
description: Override default scopes for this connection
|
|
14816
|
+
redirect_after:
|
|
14817
|
+
type: string
|
|
14818
|
+
description: URL to redirect to after the OAuth flow completes
|
|
14819
|
+
|
|
14820
|
+
ConnectOAuthResponse:
|
|
14821
|
+
type: object
|
|
14822
|
+
properties:
|
|
14823
|
+
authorization_url:
|
|
14824
|
+
type: string
|
|
14825
|
+
format: uri
|
|
14826
|
+
description: Redirect the user to this URL to authorize the connection
|
|
14827
|
+
|
|
14828
|
+
OAuthConnectionResponse:
|
|
14829
|
+
type: object
|
|
14830
|
+
properties:
|
|
14831
|
+
binding_id:
|
|
14832
|
+
type: string
|
|
14833
|
+
format: uuid
|
|
14834
|
+
provider_slug:
|
|
14835
|
+
type: string
|
|
14836
|
+
provider_name:
|
|
14837
|
+
type: string
|
|
14838
|
+
scopes:
|
|
14839
|
+
type: array
|
|
14840
|
+
items:
|
|
14841
|
+
type: string
|
|
14842
|
+
status:
|
|
14843
|
+
type: string
|
|
14844
|
+
enum: [active, expired, revoked]
|
|
14845
|
+
needs_reauth:
|
|
14846
|
+
type: boolean
|
|
14847
|
+
created_at:
|
|
14848
|
+
type: string
|
|
14849
|
+
format: date-time
|
|
14850
|
+
|
|
14851
|
+
OAuthConnectionListResponse:
|
|
14852
|
+
type: object
|
|
14853
|
+
properties:
|
|
14854
|
+
connections:
|
|
14855
|
+
type: array
|
|
14856
|
+
items:
|
|
14857
|
+
$ref: "#/components/schemas/OAuthConnectionResponse"
|
|
14858
|
+
|
|
14859
|
+
SaveOAuthAppCredentialsRequest:
|
|
14860
|
+
type: object
|
|
14861
|
+
required: [provider_slug, client_id, client_secret]
|
|
14862
|
+
properties:
|
|
14863
|
+
provider_slug:
|
|
14864
|
+
type: string
|
|
14865
|
+
description: Provider this credential is for
|
|
14866
|
+
client_id:
|
|
14867
|
+
type: string
|
|
14868
|
+
client_secret:
|
|
14869
|
+
type: string
|
|
14870
|
+
description: Write-only; never returned in responses
|
|
14871
|
+
redirect_uri:
|
|
14872
|
+
type: string
|
|
14873
|
+
format: uri
|
|
14874
|
+
description: Custom redirect URI override
|
|
14875
|
+
|
|
14876
|
+
OAuthAppCredentialResponse:
|
|
14877
|
+
type: object
|
|
14878
|
+
properties:
|
|
14879
|
+
id:
|
|
14880
|
+
type: string
|
|
14881
|
+
format: uuid
|
|
14882
|
+
provider_slug:
|
|
14883
|
+
type: string
|
|
14884
|
+
client_id:
|
|
14885
|
+
type: string
|
|
14886
|
+
redirect_uri:
|
|
14887
|
+
type: string
|
|
14888
|
+
format: uri
|
|
14889
|
+
nullable: true
|
|
14890
|
+
created_at:
|
|
14891
|
+
type: string
|
|
14892
|
+
format: date-time
|
|
14893
|
+
updated_at:
|
|
14894
|
+
type: string
|
|
14895
|
+
format: date-time
|
|
14896
|
+
|
|
14897
|
+
OAuthAppCredentialListResponse:
|
|
14898
|
+
type: object
|
|
14899
|
+
properties:
|
|
14900
|
+
credentials:
|
|
14901
|
+
type: array
|
|
14902
|
+
items:
|
|
14903
|
+
$ref: "#/components/schemas/OAuthAppCredentialResponse"
|