@1claw/openapi-spec 0.61.24 → 0.61.27
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 +321 -7
- package/openapi.yaml +238 -14
- 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.27",
|
|
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"
|
|
@@ -3861,6 +3861,136 @@
|
|
|
3861
3861
|
}
|
|
3862
3862
|
}
|
|
3863
3863
|
},
|
|
3864
|
+
"/v1/agents/{agent_id}/children": {
|
|
3865
|
+
"parameters": [
|
|
3866
|
+
{
|
|
3867
|
+
"name": "agent_id",
|
|
3868
|
+
"in": "path",
|
|
3869
|
+
"required": true,
|
|
3870
|
+
"schema": {
|
|
3871
|
+
"type": "string",
|
|
3872
|
+
"format": "uuid"
|
|
3873
|
+
}
|
|
3874
|
+
}
|
|
3875
|
+
],
|
|
3876
|
+
"get": {
|
|
3877
|
+
"tags": [
|
|
3878
|
+
"Agents"
|
|
3879
|
+
],
|
|
3880
|
+
"summary": "List an agent's child agents",
|
|
3881
|
+
"operationId": "listChildAgents",
|
|
3882
|
+
"security": [
|
|
3883
|
+
{
|
|
3884
|
+
"BearerAuth": []
|
|
3885
|
+
}
|
|
3886
|
+
],
|
|
3887
|
+
"responses": {
|
|
3888
|
+
"200": {
|
|
3889
|
+
"description": "Children",
|
|
3890
|
+
"content": {
|
|
3891
|
+
"application/json": {
|
|
3892
|
+
"schema": {
|
|
3893
|
+
"$ref": "#/components/schemas/AgentListResponse"
|
|
3894
|
+
}
|
|
3895
|
+
}
|
|
3896
|
+
}
|
|
3897
|
+
},
|
|
3898
|
+
"404": {
|
|
3899
|
+
"$ref": "#/components/responses/NotFound"
|
|
3900
|
+
}
|
|
3901
|
+
}
|
|
3902
|
+
},
|
|
3903
|
+
"post": {
|
|
3904
|
+
"tags": [
|
|
3905
|
+
"Agents"
|
|
3906
|
+
],
|
|
3907
|
+
"summary": "Create a child agent",
|
|
3908
|
+
"description": "A cheap sub-agent under a parent. The child has its own API key, memory\nnamespaces and `action_approval_policy`; is created with a subset of the\nparent's `vault_ids` and `scopes` (a superset is refused, not trimmed);\ninherits the parent's vault access policies (policy lookups include the\nparent's rows) and guardrails; does not count against the plan's agent cap\n(capped at 50 per parent); and cannot have children of its own. Human-only.\nAudited as `agent.child_created`.\n",
|
|
3909
|
+
"operationId": "createChildAgent",
|
|
3910
|
+
"security": [
|
|
3911
|
+
{
|
|
3912
|
+
"BearerAuth": []
|
|
3913
|
+
}
|
|
3914
|
+
],
|
|
3915
|
+
"requestBody": {
|
|
3916
|
+
"required": true,
|
|
3917
|
+
"content": {
|
|
3918
|
+
"application/json": {
|
|
3919
|
+
"schema": {
|
|
3920
|
+
"type": "object",
|
|
3921
|
+
"required": [
|
|
3922
|
+
"name"
|
|
3923
|
+
],
|
|
3924
|
+
"properties": {
|
|
3925
|
+
"name": {
|
|
3926
|
+
"type": "string",
|
|
3927
|
+
"maxLength": 100
|
|
3928
|
+
},
|
|
3929
|
+
"description": {
|
|
3930
|
+
"type": "string"
|
|
3931
|
+
},
|
|
3932
|
+
"vault_ids": {
|
|
3933
|
+
"type": "array",
|
|
3934
|
+
"items": {
|
|
3935
|
+
"type": "string",
|
|
3936
|
+
"format": "uuid"
|
|
3937
|
+
},
|
|
3938
|
+
"description": "Subset of the parent's vault_ids. Default the parent's."
|
|
3939
|
+
},
|
|
3940
|
+
"scopes": {
|
|
3941
|
+
"type": "array",
|
|
3942
|
+
"items": {
|
|
3943
|
+
"type": "string"
|
|
3944
|
+
},
|
|
3945
|
+
"description": "Subset of the parent's scopes. Default the parent's."
|
|
3946
|
+
},
|
|
3947
|
+
"memory_namespace_allowlist": {
|
|
3948
|
+
"type": "array",
|
|
3949
|
+
"items": {
|
|
3950
|
+
"type": "string"
|
|
3951
|
+
},
|
|
3952
|
+
"description": "The child's own namespaces. Default `[\"child:{child_id}\"]`."
|
|
3953
|
+
},
|
|
3954
|
+
"action_approval_policy": {
|
|
3955
|
+
"type": "object",
|
|
3956
|
+
"description": "The child's own policy. Default the parent's."
|
|
3957
|
+
},
|
|
3958
|
+
"expires_at": {
|
|
3959
|
+
"type": "string",
|
|
3960
|
+
"format": "date-time"
|
|
3961
|
+
},
|
|
3962
|
+
"approval_id": {
|
|
3963
|
+
"type": "string",
|
|
3964
|
+
"format": "uuid"
|
|
3965
|
+
}
|
|
3966
|
+
}
|
|
3967
|
+
}
|
|
3968
|
+
}
|
|
3969
|
+
}
|
|
3970
|
+
},
|
|
3971
|
+
"responses": {
|
|
3972
|
+
"201": {
|
|
3973
|
+
"description": "Created; `api_key` shown once",
|
|
3974
|
+
"content": {
|
|
3975
|
+
"application/json": {
|
|
3976
|
+
"schema": {
|
|
3977
|
+
"$ref": "#/components/schemas/AgentCreatedResponse"
|
|
3978
|
+
}
|
|
3979
|
+
}
|
|
3980
|
+
}
|
|
3981
|
+
},
|
|
3982
|
+
"400": {
|
|
3983
|
+
"$ref": "#/components/responses/BadRequest"
|
|
3984
|
+
},
|
|
3985
|
+
"403": {
|
|
3986
|
+
"$ref": "#/components/responses/Forbidden"
|
|
3987
|
+
},
|
|
3988
|
+
"404": {
|
|
3989
|
+
"$ref": "#/components/responses/NotFound"
|
|
3990
|
+
}
|
|
3991
|
+
}
|
|
3992
|
+
}
|
|
3993
|
+
},
|
|
3864
3994
|
"/v1/agents/{agent_id}/rotate-key": {
|
|
3865
3995
|
"post": {
|
|
3866
3996
|
"tags": [
|
|
@@ -15947,8 +16077,8 @@
|
|
|
15947
16077
|
"tags": [
|
|
15948
16078
|
"Approvals"
|
|
15949
16079
|
],
|
|
15950
|
-
"summary": "List
|
|
15951
|
-
"description": "
|
|
16080
|
+
"summary": "List approvals",
|
|
16081
|
+
"description": "Humans get their own approval queue. An agent caller gets only the\napprovals it created (`agent_id` = caller) — enough to recover one whose\nid was lost across a restart, never the organization's queue. Supports\nfiltering by status and pagination.\n",
|
|
15952
16082
|
"operationId": "listApprovals",
|
|
15953
16083
|
"parameters": [
|
|
15954
16084
|
{
|
|
@@ -15961,7 +16091,8 @@
|
|
|
15961
16091
|
"pending",
|
|
15962
16092
|
"approved",
|
|
15963
16093
|
"rejected",
|
|
15964
|
-
"expired"
|
|
16094
|
+
"expired",
|
|
16095
|
+
"cancelled"
|
|
15965
16096
|
]
|
|
15966
16097
|
},
|
|
15967
16098
|
"description": "Filter by approval status"
|
|
@@ -16046,6 +16177,61 @@
|
|
|
16046
16177
|
}
|
|
16047
16178
|
}
|
|
16048
16179
|
},
|
|
16180
|
+
"/v1/approvals/{approval_id}/cancel": {
|
|
16181
|
+
"post": {
|
|
16182
|
+
"tags": [
|
|
16183
|
+
"Approvals"
|
|
16184
|
+
],
|
|
16185
|
+
"summary": "Cancel a pending approval (requester)",
|
|
16186
|
+
"description": "Withdraws a pending approval. Callable by the agent that requested it or\nthe human it was addressed to. First answer wins: if the approval was\nalready decided or expired, the existing record is returned unchanged\n(200) rather than an error — the caller's next question is what the\nanswer was. A cancellation is delivered to webhook subscribers as\n`approval.decided` with `decision: \"cancelled\"`, and audited as\n`approval.cancelled`.\n",
|
|
16187
|
+
"operationId": "cancelApproval",
|
|
16188
|
+
"parameters": [
|
|
16189
|
+
{
|
|
16190
|
+
"name": "approval_id",
|
|
16191
|
+
"in": "path",
|
|
16192
|
+
"required": true,
|
|
16193
|
+
"schema": {
|
|
16194
|
+
"type": "string",
|
|
16195
|
+
"format": "uuid"
|
|
16196
|
+
}
|
|
16197
|
+
}
|
|
16198
|
+
],
|
|
16199
|
+
"requestBody": {
|
|
16200
|
+
"required": false,
|
|
16201
|
+
"content": {
|
|
16202
|
+
"application/json": {
|
|
16203
|
+
"schema": {
|
|
16204
|
+
"type": "object",
|
|
16205
|
+
"properties": {
|
|
16206
|
+
"reason": {
|
|
16207
|
+
"type": "string",
|
|
16208
|
+
"maxLength": 500
|
|
16209
|
+
}
|
|
16210
|
+
}
|
|
16211
|
+
}
|
|
16212
|
+
}
|
|
16213
|
+
}
|
|
16214
|
+
},
|
|
16215
|
+
"responses": {
|
|
16216
|
+
"200": {
|
|
16217
|
+
"description": "The approval — `cancelled`, or the decision that landed first",
|
|
16218
|
+
"content": {
|
|
16219
|
+
"application/json": {
|
|
16220
|
+
"schema": {
|
|
16221
|
+
"$ref": "#/components/schemas/ApprovalResponse"
|
|
16222
|
+
}
|
|
16223
|
+
}
|
|
16224
|
+
}
|
|
16225
|
+
},
|
|
16226
|
+
"403": {
|
|
16227
|
+
"$ref": "#/components/responses/Forbidden"
|
|
16228
|
+
},
|
|
16229
|
+
"404": {
|
|
16230
|
+
"$ref": "#/components/responses/NotFound"
|
|
16231
|
+
}
|
|
16232
|
+
}
|
|
16233
|
+
}
|
|
16234
|
+
},
|
|
16049
16235
|
"/v1/approvals/{approval_id}/status": {
|
|
16050
16236
|
"get": {
|
|
16051
16237
|
"tags": [
|
|
@@ -18945,6 +19131,73 @@
|
|
|
18945
19131
|
}
|
|
18946
19132
|
}
|
|
18947
19133
|
},
|
|
19134
|
+
"/v1/automations/{automationId}/runs/{runId}/resume": {
|
|
19135
|
+
"post": {
|
|
19136
|
+
"tags": [
|
|
19137
|
+
"Automations"
|
|
19138
|
+
],
|
|
19139
|
+
"summary": "Resume a run parked on an approval",
|
|
19140
|
+
"operationId": "resumeAutomationRun",
|
|
19141
|
+
"description": "An `approval_request` step parks the run in `awaiting_approval` and stops the\nclock. Deciding that approval — via the API, the one-tap email link or the\nphone — resumes the run automatically: `approved` continues from the next\nstep, `rejected` fails the run with the reason. This route is the hand-off\nfor a decision made elsewhere: it marks the approval approved on the caller's\nbehalf and continues the run. Human-only. Idempotent — a run that is not\nparked is returned unchanged. Later steps see the approval step's output as\n`{status, approval_id}` and the optional `payload` as `{{resume.*}}`. A\nparked run that nobody decides within 72 hours becomes `timed_out`.\nEmits `automation.run.resumed`.\n",
|
|
19142
|
+
"parameters": [
|
|
19143
|
+
{
|
|
19144
|
+
"name": "automationId",
|
|
19145
|
+
"in": "path",
|
|
19146
|
+
"required": true,
|
|
19147
|
+
"schema": {
|
|
19148
|
+
"type": "string",
|
|
19149
|
+
"format": "uuid"
|
|
19150
|
+
}
|
|
19151
|
+
},
|
|
19152
|
+
{
|
|
19153
|
+
"name": "runId",
|
|
19154
|
+
"in": "path",
|
|
19155
|
+
"required": true,
|
|
19156
|
+
"schema": {
|
|
19157
|
+
"type": "string",
|
|
19158
|
+
"format": "uuid"
|
|
19159
|
+
}
|
|
19160
|
+
}
|
|
19161
|
+
],
|
|
19162
|
+
"requestBody": {
|
|
19163
|
+
"required": false,
|
|
19164
|
+
"content": {
|
|
19165
|
+
"application/json": {
|
|
19166
|
+
"schema": {
|
|
19167
|
+
"type": "object",
|
|
19168
|
+
"properties": {
|
|
19169
|
+
"payload": {
|
|
19170
|
+
"type": "object",
|
|
19171
|
+
"description": "Exposed to later steps as `{{resume.*}}`."
|
|
19172
|
+
}
|
|
19173
|
+
}
|
|
19174
|
+
}
|
|
19175
|
+
}
|
|
19176
|
+
}
|
|
19177
|
+
},
|
|
19178
|
+
"responses": {
|
|
19179
|
+
"200": {
|
|
19180
|
+
"description": "The run, now running (or unchanged if it was not parked)",
|
|
19181
|
+
"content": {
|
|
19182
|
+
"application/json": {
|
|
19183
|
+
"schema": {
|
|
19184
|
+
"$ref": "#/components/schemas/AutomationRunResponse"
|
|
19185
|
+
}
|
|
19186
|
+
}
|
|
19187
|
+
}
|
|
19188
|
+
},
|
|
19189
|
+
"401": {
|
|
19190
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
19191
|
+
},
|
|
19192
|
+
"403": {
|
|
19193
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19194
|
+
},
|
|
19195
|
+
"404": {
|
|
19196
|
+
"$ref": "#/components/responses/NotFound"
|
|
19197
|
+
}
|
|
19198
|
+
}
|
|
19199
|
+
}
|
|
19200
|
+
},
|
|
18948
19201
|
"/v1/automations/presets": {
|
|
18949
19202
|
"get": {
|
|
18950
19203
|
"tags": [
|
|
@@ -20782,7 +21035,7 @@
|
|
|
20782
21035
|
"Organization"
|
|
20783
21036
|
],
|
|
20784
21037
|
"summary": "Apply a chart",
|
|
20785
|
-
"description": "Create what the chart describes. Human users only.\n\n**Apply calls the same handlers the HTTP routes call.** Creating a vault\nruns five gates before anything is written — the delegation scope, a name\ncheck, control-plane consensus, a creation rate limit and the tier quota\n— and creating an agent runs its own. A reconciler that wrote through the\nrepositories would skip all of them and would look, in review, exactly\nlike one that did not.\n\nSo if your org has consensus configured on `vault.create`, applying a\nchart queues an approval exactly as a dashboard click would. That resource\ncomes back as `awaiting_approval` rather than failing the whole chart.\n\nPer-resource results: `created`, `
|
|
21038
|
+
"description": "Create what the chart describes. Human users only.\n\n**Apply calls the same handlers the HTTP routes call.** Creating a vault\nruns five gates before anything is written — the delegation scope, a name\ncheck, control-plane consensus, a creation rate limit and the tier quota\n— and creating an agent runs its own. A reconciler that wrote through the\nrepositories would skip all of them and would look, in review, exactly\nlike one that did not.\n\nSo if your org has consensus configured on `vault.create`, applying a\nchart queues an approval exactly as a dashboard click would. That resource\ncomes back as `awaiting_approval` rather than failing the whole chart.\n\nResource kinds, in the order apply walks them: `vault`, `agent`,\n`policy` (one per path pattern, named `vault:agent:path`), `connector`\n(`agent/binding_name`; `authorization_url` on the result when a person\nstill has to sign in) and `binding` (`agent/name`, from\n`spec.agents[].bindings` — declared in full with `binding_type`, `config`,\n`guardrails.allowed_hosts` and an optional `credential: {vault_ref, path}`\npointing into a chart vault). A dependent resource whose vault or agent\nwas queued for approval this run is `skipped` with \"waiting on …\" and is\ncreated by the next apply.\n\nPer-resource results: `created`, `patched`, `unchanged`, `skipped`,\n`refused`, `awaiting_approval`, `failed`. `needs_attention` is true when\nthe chart is not fully applied — something is waiting on a person, whether\nan approval, an OAuth sign-in, or a resource that drifted and was left\nalone.\n\nSave `applied_state` to `.1claw/apply-state.json`. It records what apply\nset, which is what lets the next run tell drift from a first apply.\n\nApply creates, and patches an agent's `description`/`system_prompt` in\nplace through the same `update_agent` gate a dashboard edit takes. Policy\npermissions, binding config and guardrails, connector presets and vault\nfields are create-only: a difference is `refused` with the endpoint that\nowns the change. It does not delete or prune. An apply that silently\ndeletes is an apply nobody runs twice.\n",
|
|
20786
21039
|
"operationId": "applyChart",
|
|
20787
21040
|
"requestBody": {
|
|
20788
21041
|
"required": true,
|
|
@@ -20833,6 +21086,7 @@
|
|
|
20833
21086
|
"type": "string",
|
|
20834
21087
|
"enum": [
|
|
20835
21088
|
"created",
|
|
21089
|
+
"patched",
|
|
20836
21090
|
"unchanged",
|
|
20837
21091
|
"skipped",
|
|
20838
21092
|
"refused",
|
|
@@ -20846,6 +21100,10 @@
|
|
|
20846
21100
|
},
|
|
20847
21101
|
"detail": {
|
|
20848
21102
|
"type": "string"
|
|
21103
|
+
},
|
|
21104
|
+
"authorization_url": {
|
|
21105
|
+
"type": "string",
|
|
21106
|
+
"description": "Connectors only — where a person signs in to finish the install."
|
|
20849
21107
|
}
|
|
20850
21108
|
}
|
|
20851
21109
|
}
|
|
@@ -32538,6 +32796,19 @@
|
|
|
32538
32796
|
"created_at"
|
|
32539
32797
|
],
|
|
32540
32798
|
"properties": {
|
|
32799
|
+
"agent_type": {
|
|
32800
|
+
"type": "string",
|
|
32801
|
+
"enum": [
|
|
32802
|
+
"standard",
|
|
32803
|
+
"child"
|
|
32804
|
+
],
|
|
32805
|
+
"description": "A `child` is a sub-agent under `parent_agent_id` that inherits its parent's policies and does not count against the plan's agent cap."
|
|
32806
|
+
},
|
|
32807
|
+
"parent_agent_id": {
|
|
32808
|
+
"type": "string",
|
|
32809
|
+
"format": "uuid",
|
|
32810
|
+
"description": "Present on child agents."
|
|
32811
|
+
},
|
|
32541
32812
|
"memory_enabled": {
|
|
32542
32813
|
"type": "boolean",
|
|
32543
32814
|
"description": "Whether durable key-value and semantic memory is enabled. Omitted when false: the server skips serializing this field unless it is true, so an absent key means disabled."
|
|
@@ -39388,7 +39659,8 @@
|
|
|
39388
39659
|
"pending",
|
|
39389
39660
|
"approved",
|
|
39390
39661
|
"rejected",
|
|
39391
|
-
"expired"
|
|
39662
|
+
"expired",
|
|
39663
|
+
"cancelled"
|
|
39392
39664
|
]
|
|
39393
39665
|
},
|
|
39394
39666
|
"summary": {
|
|
@@ -39454,7 +39726,8 @@
|
|
|
39454
39726
|
"pending",
|
|
39455
39727
|
"approved",
|
|
39456
39728
|
"rejected",
|
|
39457
|
-
"expired"
|
|
39729
|
+
"expired",
|
|
39730
|
+
"cancelled"
|
|
39458
39731
|
]
|
|
39459
39732
|
},
|
|
39460
39733
|
"expires_at": {
|
|
@@ -42311,6 +42584,19 @@
|
|
|
42311
42584
|
"type": "number",
|
|
42312
42585
|
"nullable": true
|
|
42313
42586
|
},
|
|
42587
|
+
"has_paid_addon": {
|
|
42588
|
+
"type": "boolean",
|
|
42589
|
+
"description": "Whether this runtime has a paid Stripe add-on (unlimited hours)."
|
|
42590
|
+
},
|
|
42591
|
+
"billing_kind": {
|
|
42592
|
+
"type": "string",
|
|
42593
|
+
"enum": [
|
|
42594
|
+
"pool",
|
|
42595
|
+
"included",
|
|
42596
|
+
"addon"
|
|
42597
|
+
],
|
|
42598
|
+
"description": "`pool` — counts against the plan's monthly runtime hours. `included` — the plan's\nfree runtime (every plan from Pro up includes one small or medium runtime, no hour\ncap, no charge). `addon` — paid Stripe subscription item (no hour cap).\n"
|
|
42599
|
+
},
|
|
42314
42600
|
"created_at": {
|
|
42315
42601
|
"type": "string",
|
|
42316
42602
|
"format": "date-time"
|
|
@@ -42332,6 +42618,27 @@
|
|
|
42332
42618
|
"items": {
|
|
42333
42619
|
"$ref": "#/components/schemas/RuntimeResponse"
|
|
42334
42620
|
}
|
|
42621
|
+
},
|
|
42622
|
+
"included_runtime": {
|
|
42623
|
+
"type": "object",
|
|
42624
|
+
"description": "The plan's included-runtime allowance (human callers only).",
|
|
42625
|
+
"properties": {
|
|
42626
|
+
"allowance": {
|
|
42627
|
+
"type": "integer",
|
|
42628
|
+
"description": "Runtimes the plan includes at no charge."
|
|
42629
|
+
},
|
|
42630
|
+
"used": {
|
|
42631
|
+
"type": "integer",
|
|
42632
|
+
"description": "Included slots currently in use."
|
|
42633
|
+
},
|
|
42634
|
+
"presets": {
|
|
42635
|
+
"type": "array",
|
|
42636
|
+
"items": {
|
|
42637
|
+
"type": "string"
|
|
42638
|
+
},
|
|
42639
|
+
"description": "Presets an included runtime may use (up to 1 vCPU / 2 GB)."
|
|
42640
|
+
}
|
|
42641
|
+
}
|
|
42335
42642
|
}
|
|
42336
42643
|
}
|
|
42337
42644
|
},
|
|
@@ -43420,6 +43727,13 @@
|
|
|
43420
43727
|
"items": {
|
|
43421
43728
|
"$ref": "#/components/schemas/OAuthAppCredentialResponse"
|
|
43422
43729
|
}
|
|
43730
|
+
},
|
|
43731
|
+
"platform_defaults": {
|
|
43732
|
+
"type": "array",
|
|
43733
|
+
"items": {
|
|
43734
|
+
"type": "string"
|
|
43735
|
+
},
|
|
43736
|
+
"description": "Provider slugs 1Claw has its own OAuth app for. Where the organization has\nregistered no credentials for one of these, connections use 1Claw's app;\nan organization credential for the same provider always wins.\n"
|
|
43423
43737
|
}
|
|
43424
43738
|
}
|
|
43425
43739
|
},
|
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.27"
|
|
6
6
|
description: |
|
|
7
7
|
Secure secret management for AI agents. Provides vaults, secrets,
|
|
8
8
|
policy-based access control, agent identity, Intents API,
|
|
@@ -2568,6 +2568,82 @@ paths:
|
|
|
2568
2568
|
"404":
|
|
2569
2569
|
$ref: "#/components/responses/NotFound"
|
|
2570
2570
|
|
|
2571
|
+
/v1/agents/{agent_id}/children:
|
|
2572
|
+
parameters:
|
|
2573
|
+
- name: agent_id
|
|
2574
|
+
in: path
|
|
2575
|
+
required: true
|
|
2576
|
+
schema: { type: string, format: uuid }
|
|
2577
|
+
get:
|
|
2578
|
+
tags: [Agents]
|
|
2579
|
+
summary: List an agent's child agents
|
|
2580
|
+
operationId: listChildAgents
|
|
2581
|
+
security:
|
|
2582
|
+
- BearerAuth: []
|
|
2583
|
+
responses:
|
|
2584
|
+
"200":
|
|
2585
|
+
description: Children
|
|
2586
|
+
content:
|
|
2587
|
+
application/json:
|
|
2588
|
+
schema:
|
|
2589
|
+
$ref: "#/components/schemas/AgentListResponse"
|
|
2590
|
+
"404":
|
|
2591
|
+
$ref: "#/components/responses/NotFound"
|
|
2592
|
+
post:
|
|
2593
|
+
tags: [Agents]
|
|
2594
|
+
summary: Create a child agent
|
|
2595
|
+
description: |
|
|
2596
|
+
A cheap sub-agent under a parent. The child has its own API key, memory
|
|
2597
|
+
namespaces and `action_approval_policy`; is created with a subset of the
|
|
2598
|
+
parent's `vault_ids` and `scopes` (a superset is refused, not trimmed);
|
|
2599
|
+
inherits the parent's vault access policies (policy lookups include the
|
|
2600
|
+
parent's rows) and guardrails; does not count against the plan's agent cap
|
|
2601
|
+
(capped at 50 per parent); and cannot have children of its own. Human-only.
|
|
2602
|
+
Audited as `agent.child_created`.
|
|
2603
|
+
operationId: createChildAgent
|
|
2604
|
+
security:
|
|
2605
|
+
- BearerAuth: []
|
|
2606
|
+
requestBody:
|
|
2607
|
+
required: true
|
|
2608
|
+
content:
|
|
2609
|
+
application/json:
|
|
2610
|
+
schema:
|
|
2611
|
+
type: object
|
|
2612
|
+
required: [name]
|
|
2613
|
+
properties:
|
|
2614
|
+
name: { type: string, maxLength: 100 }
|
|
2615
|
+
description: { type: string }
|
|
2616
|
+
vault_ids:
|
|
2617
|
+
type: array
|
|
2618
|
+
items: { type: string, format: uuid }
|
|
2619
|
+
description: Subset of the parent's vault_ids. Default the parent's.
|
|
2620
|
+
scopes:
|
|
2621
|
+
type: array
|
|
2622
|
+
items: { type: string }
|
|
2623
|
+
description: Subset of the parent's scopes. Default the parent's.
|
|
2624
|
+
memory_namespace_allowlist:
|
|
2625
|
+
type: array
|
|
2626
|
+
items: { type: string }
|
|
2627
|
+
description: The child's own namespaces. Default `["child:{child_id}"]`.
|
|
2628
|
+
action_approval_policy:
|
|
2629
|
+
type: object
|
|
2630
|
+
description: The child's own policy. Default the parent's.
|
|
2631
|
+
expires_at: { type: string, format: date-time }
|
|
2632
|
+
approval_id: { type: string, format: uuid }
|
|
2633
|
+
responses:
|
|
2634
|
+
"201":
|
|
2635
|
+
description: Created; `api_key` shown once
|
|
2636
|
+
content:
|
|
2637
|
+
application/json:
|
|
2638
|
+
schema:
|
|
2639
|
+
$ref: "#/components/schemas/AgentCreatedResponse"
|
|
2640
|
+
"400":
|
|
2641
|
+
$ref: "#/components/responses/BadRequest"
|
|
2642
|
+
"403":
|
|
2643
|
+
$ref: "#/components/responses/Forbidden"
|
|
2644
|
+
"404":
|
|
2645
|
+
$ref: "#/components/responses/NotFound"
|
|
2646
|
+
|
|
2571
2647
|
/v1/agents/{agent_id}/rotate-key:
|
|
2572
2648
|
post:
|
|
2573
2649
|
tags: [Agents]
|
|
@@ -10184,10 +10260,12 @@ paths:
|
|
|
10184
10260
|
/v1/approvals:
|
|
10185
10261
|
get:
|
|
10186
10262
|
tags: [Approvals]
|
|
10187
|
-
summary: List
|
|
10263
|
+
summary: List approvals
|
|
10188
10264
|
description: |
|
|
10189
|
-
|
|
10190
|
-
|
|
10265
|
+
Humans get their own approval queue. An agent caller gets only the
|
|
10266
|
+
approvals it created (`agent_id` = caller) — enough to recover one whose
|
|
10267
|
+
id was lost across a restart, never the organization's queue. Supports
|
|
10268
|
+
filtering by status and pagination.
|
|
10191
10269
|
operationId: listApprovals
|
|
10192
10270
|
parameters:
|
|
10193
10271
|
- name: status
|
|
@@ -10195,7 +10273,7 @@ paths:
|
|
|
10195
10273
|
required: false
|
|
10196
10274
|
schema:
|
|
10197
10275
|
type: string
|
|
10198
|
-
enum: [pending, approved, rejected, expired]
|
|
10276
|
+
enum: [pending, approved, rejected, expired, cancelled]
|
|
10199
10277
|
description: Filter by approval status
|
|
10200
10278
|
- name: limit
|
|
10201
10279
|
in: query
|
|
@@ -10246,6 +10324,46 @@ paths:
|
|
|
10246
10324
|
"404":
|
|
10247
10325
|
$ref: "#/components/responses/NotFound"
|
|
10248
10326
|
|
|
10327
|
+
/v1/approvals/{approval_id}/cancel:
|
|
10328
|
+
post:
|
|
10329
|
+
tags: [Approvals]
|
|
10330
|
+
summary: Cancel a pending approval (requester)
|
|
10331
|
+
description: |
|
|
10332
|
+
Withdraws a pending approval. Callable by the agent that requested it or
|
|
10333
|
+
the human it was addressed to. First answer wins: if the approval was
|
|
10334
|
+
already decided or expired, the existing record is returned unchanged
|
|
10335
|
+
(200) rather than an error — the caller's next question is what the
|
|
10336
|
+
answer was. A cancellation is delivered to webhook subscribers as
|
|
10337
|
+
`approval.decided` with `decision: "cancelled"`, and audited as
|
|
10338
|
+
`approval.cancelled`.
|
|
10339
|
+
operationId: cancelApproval
|
|
10340
|
+
parameters:
|
|
10341
|
+
- name: approval_id
|
|
10342
|
+
in: path
|
|
10343
|
+
required: true
|
|
10344
|
+
schema:
|
|
10345
|
+
type: string
|
|
10346
|
+
format: uuid
|
|
10347
|
+
requestBody:
|
|
10348
|
+
required: false
|
|
10349
|
+
content:
|
|
10350
|
+
application/json:
|
|
10351
|
+
schema:
|
|
10352
|
+
type: object
|
|
10353
|
+
properties:
|
|
10354
|
+
reason: { type: string, maxLength: 500 }
|
|
10355
|
+
responses:
|
|
10356
|
+
"200":
|
|
10357
|
+
description: The approval — `cancelled`, or the decision that landed first
|
|
10358
|
+
content:
|
|
10359
|
+
application/json:
|
|
10360
|
+
schema:
|
|
10361
|
+
$ref: "#/components/schemas/ApprovalResponse"
|
|
10362
|
+
"403":
|
|
10363
|
+
$ref: "#/components/responses/Forbidden"
|
|
10364
|
+
"404":
|
|
10365
|
+
$ref: "#/components/responses/NotFound"
|
|
10366
|
+
|
|
10249
10367
|
/v1/approvals/{approval_id}/status:
|
|
10250
10368
|
get:
|
|
10251
10369
|
tags: [Approvals]
|
|
@@ -12037,6 +12155,59 @@ paths:
|
|
|
12037
12155
|
"404":
|
|
12038
12156
|
$ref: "#/components/responses/NotFound"
|
|
12039
12157
|
|
|
12158
|
+
/v1/automations/{automationId}/runs/{runId}/resume:
|
|
12159
|
+
post:
|
|
12160
|
+
tags: [Automations]
|
|
12161
|
+
summary: Resume a run parked on an approval
|
|
12162
|
+
operationId: resumeAutomationRun
|
|
12163
|
+
description: |
|
|
12164
|
+
An `approval_request` step parks the run in `awaiting_approval` and stops the
|
|
12165
|
+
clock. Deciding that approval — via the API, the one-tap email link or the
|
|
12166
|
+
phone — resumes the run automatically: `approved` continues from the next
|
|
12167
|
+
step, `rejected` fails the run with the reason. This route is the hand-off
|
|
12168
|
+
for a decision made elsewhere: it marks the approval approved on the caller's
|
|
12169
|
+
behalf and continues the run. Human-only. Idempotent — a run that is not
|
|
12170
|
+
parked is returned unchanged. Later steps see the approval step's output as
|
|
12171
|
+
`{status, approval_id}` and the optional `payload` as `{{resume.*}}`. A
|
|
12172
|
+
parked run that nobody decides within 72 hours becomes `timed_out`.
|
|
12173
|
+
Emits `automation.run.resumed`.
|
|
12174
|
+
parameters:
|
|
12175
|
+
- name: automationId
|
|
12176
|
+
in: path
|
|
12177
|
+
required: true
|
|
12178
|
+
schema:
|
|
12179
|
+
type: string
|
|
12180
|
+
format: uuid
|
|
12181
|
+
- name: runId
|
|
12182
|
+
in: path
|
|
12183
|
+
required: true
|
|
12184
|
+
schema:
|
|
12185
|
+
type: string
|
|
12186
|
+
format: uuid
|
|
12187
|
+
requestBody:
|
|
12188
|
+
required: false
|
|
12189
|
+
content:
|
|
12190
|
+
application/json:
|
|
12191
|
+
schema:
|
|
12192
|
+
type: object
|
|
12193
|
+
properties:
|
|
12194
|
+
payload:
|
|
12195
|
+
type: object
|
|
12196
|
+
description: Exposed to later steps as `{{resume.*}}`.
|
|
12197
|
+
responses:
|
|
12198
|
+
"200":
|
|
12199
|
+
description: The run, now running (or unchanged if it was not parked)
|
|
12200
|
+
content:
|
|
12201
|
+
application/json:
|
|
12202
|
+
schema:
|
|
12203
|
+
$ref: "#/components/schemas/AutomationRunResponse"
|
|
12204
|
+
"401":
|
|
12205
|
+
$ref: "#/components/responses/Unauthorized"
|
|
12206
|
+
"403":
|
|
12207
|
+
$ref: "#/components/responses/Forbidden"
|
|
12208
|
+
"404":
|
|
12209
|
+
$ref: "#/components/responses/NotFound"
|
|
12210
|
+
|
|
12040
12211
|
/v1/automations/presets:
|
|
12041
12212
|
get:
|
|
12042
12213
|
tags: [Automations]
|
|
@@ -13261,16 +13432,31 @@ paths:
|
|
|
13261
13432
|
chart queues an approval exactly as a dashboard click would. That resource
|
|
13262
13433
|
comes back as `awaiting_approval` rather than failing the whole chart.
|
|
13263
13434
|
|
|
13264
|
-
|
|
13265
|
-
`
|
|
13266
|
-
|
|
13267
|
-
|
|
13435
|
+
Resource kinds, in the order apply walks them: `vault`, `agent`,
|
|
13436
|
+
`policy` (one per path pattern, named `vault:agent:path`), `connector`
|
|
13437
|
+
(`agent/binding_name`; `authorization_url` on the result when a person
|
|
13438
|
+
still has to sign in) and `binding` (`agent/name`, from
|
|
13439
|
+
`spec.agents[].bindings` — declared in full with `binding_type`, `config`,
|
|
13440
|
+
`guardrails.allowed_hosts` and an optional `credential: {vault_ref, path}`
|
|
13441
|
+
pointing into a chart vault). A dependent resource whose vault or agent
|
|
13442
|
+
was queued for approval this run is `skipped` with "waiting on …" and is
|
|
13443
|
+
created by the next apply.
|
|
13444
|
+
|
|
13445
|
+
Per-resource results: `created`, `patched`, `unchanged`, `skipped`,
|
|
13446
|
+
`refused`, `awaiting_approval`, `failed`. `needs_attention` is true when
|
|
13447
|
+
the chart is not fully applied — something is waiting on a person, whether
|
|
13448
|
+
an approval, an OAuth sign-in, or a resource that drifted and was left
|
|
13449
|
+
alone.
|
|
13268
13450
|
|
|
13269
13451
|
Save `applied_state` to `.1claw/apply-state.json`. It records what apply
|
|
13270
13452
|
set, which is what lets the next run tell drift from a first apply.
|
|
13271
13453
|
|
|
13272
|
-
|
|
13273
|
-
|
|
13454
|
+
Apply creates, and patches an agent's `description`/`system_prompt` in
|
|
13455
|
+
place through the same `update_agent` gate a dashboard edit takes. Policy
|
|
13456
|
+
permissions, binding config and guardrails, connector presets and vault
|
|
13457
|
+
fields are create-only: a difference is `refused` with the endpoint that
|
|
13458
|
+
owns the change. It does not delete or prune. An apply that silently
|
|
13459
|
+
deletes is an apply nobody runs twice.
|
|
13274
13460
|
operationId: applyChart
|
|
13275
13461
|
requestBody:
|
|
13276
13462
|
required: true
|
|
@@ -13304,9 +13490,12 @@ paths:
|
|
|
13304
13490
|
name: { type: string }
|
|
13305
13491
|
result:
|
|
13306
13492
|
type: string
|
|
13307
|
-
enum: [created, unchanged, skipped, refused, awaiting_approval, failed]
|
|
13493
|
+
enum: [created, patched, unchanged, skipped, refused, awaiting_approval, failed]
|
|
13308
13494
|
id: { type: string, format: uuid }
|
|
13309
13495
|
detail: { type: string }
|
|
13496
|
+
authorization_url:
|
|
13497
|
+
type: string
|
|
13498
|
+
description: Connectors only — where a person signs in to finish the install.
|
|
13310
13499
|
warnings:
|
|
13311
13500
|
type: array
|
|
13312
13501
|
items: { type: string }
|
|
@@ -20874,6 +21063,14 @@ components:
|
|
|
20874
21063
|
created_at,
|
|
20875
21064
|
]
|
|
20876
21065
|
properties:
|
|
21066
|
+
agent_type:
|
|
21067
|
+
type: string
|
|
21068
|
+
enum: [standard, child]
|
|
21069
|
+
description: A `child` is a sub-agent under `parent_agent_id` that inherits its parent's policies and does not count against the plan's agent cap.
|
|
21070
|
+
parent_agent_id:
|
|
21071
|
+
type: string
|
|
21072
|
+
format: uuid
|
|
21073
|
+
description: Present on child agents.
|
|
20877
21074
|
memory_enabled:
|
|
20878
21075
|
type: boolean
|
|
20879
21076
|
description: >-
|
|
@@ -25532,7 +25729,7 @@ components:
|
|
|
25532
25729
|
description: "What the action will do, as submitted."
|
|
25533
25730
|
status:
|
|
25534
25731
|
type: string
|
|
25535
|
-
enum: [pending, approved, rejected, expired]
|
|
25732
|
+
enum: [pending, approved, rejected, expired, cancelled]
|
|
25536
25733
|
summary:
|
|
25537
25734
|
type: object
|
|
25538
25735
|
description: Structured summary of the action requiring approval
|
|
@@ -25575,7 +25772,7 @@ components:
|
|
|
25575
25772
|
properties:
|
|
25576
25773
|
status:
|
|
25577
25774
|
type: string
|
|
25578
|
-
enum: [pending, approved, rejected, expired]
|
|
25775
|
+
enum: [pending, approved, rejected, expired, cancelled]
|
|
25579
25776
|
expires_at:
|
|
25580
25777
|
type: string
|
|
25581
25778
|
format: date-time
|
|
@@ -27373,6 +27570,16 @@ components:
|
|
|
27373
27570
|
monthly_hours_used:
|
|
27374
27571
|
type: number
|
|
27375
27572
|
nullable: true
|
|
27573
|
+
has_paid_addon:
|
|
27574
|
+
type: boolean
|
|
27575
|
+
description: Whether this runtime has a paid Stripe add-on (unlimited hours).
|
|
27576
|
+
billing_kind:
|
|
27577
|
+
type: string
|
|
27578
|
+
enum: [pool, included, addon]
|
|
27579
|
+
description: |
|
|
27580
|
+
`pool` — counts against the plan's monthly runtime hours. `included` — the plan's
|
|
27581
|
+
free runtime (every plan from Pro up includes one small or medium runtime, no hour
|
|
27582
|
+
cap, no charge). `addon` — paid Stripe subscription item (no hour cap).
|
|
27376
27583
|
created_at:
|
|
27377
27584
|
type: string
|
|
27378
27585
|
format: date-time
|
|
@@ -27388,6 +27595,16 @@ components:
|
|
|
27388
27595
|
type: array
|
|
27389
27596
|
items:
|
|
27390
27597
|
$ref: "#/components/schemas/RuntimeResponse"
|
|
27598
|
+
included_runtime:
|
|
27599
|
+
type: object
|
|
27600
|
+
description: The plan's included-runtime allowance (human callers only).
|
|
27601
|
+
properties:
|
|
27602
|
+
allowance: { type: integer, description: Runtimes the plan includes at no charge. }
|
|
27603
|
+
used: { type: integer, description: Included slots currently in use. }
|
|
27604
|
+
presets:
|
|
27605
|
+
type: array
|
|
27606
|
+
items: { type: string }
|
|
27607
|
+
description: Presets an included runtime may use (up to 1 vCPU / 2 GB).
|
|
27391
27608
|
|
|
27392
27609
|
SlugCheckResponse:
|
|
27393
27610
|
type: object
|
|
@@ -28151,6 +28368,13 @@ components:
|
|
|
28151
28368
|
type: array
|
|
28152
28369
|
items:
|
|
28153
28370
|
$ref: "#/components/schemas/OAuthAppCredentialResponse"
|
|
28371
|
+
platform_defaults:
|
|
28372
|
+
type: array
|
|
28373
|
+
items: { type: string }
|
|
28374
|
+
description: |
|
|
28375
|
+
Provider slugs 1Claw has its own OAuth app for. Where the organization has
|
|
28376
|
+
registered no credentials for one of these, connections use 1Claw's app;
|
|
28377
|
+
an organization credential for the same provider always wins.
|
|
28154
28378
|
|
|
28155
28379
|
# -------------------------------------------------------------------
|
|
28156
28380
|
# Key Import
|