@1claw/openapi-spec 0.61.25 → 0.61.28
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 +535 -2
- package/openapi.yaml +349 -8
- 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.28",
|
|
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": [
|
|
@@ -19001,6 +19131,73 @@
|
|
|
19001
19131
|
}
|
|
19002
19132
|
}
|
|
19003
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
|
+
},
|
|
19004
19201
|
"/v1/automations/presets": {
|
|
19005
19202
|
"get": {
|
|
19006
19203
|
"tags": [
|
|
@@ -20838,7 +21035,7 @@
|
|
|
20838
21035
|
"Organization"
|
|
20839
21036
|
],
|
|
20840
21037
|
"summary": "Apply a chart",
|
|
20841
|
-
"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",
|
|
20842
21039
|
"operationId": "applyChart",
|
|
20843
21040
|
"requestBody": {
|
|
20844
21041
|
"required": true,
|
|
@@ -20889,6 +21086,7 @@
|
|
|
20889
21086
|
"type": "string",
|
|
20890
21087
|
"enum": [
|
|
20891
21088
|
"created",
|
|
21089
|
+
"patched",
|
|
20892
21090
|
"unchanged",
|
|
20893
21091
|
"skipped",
|
|
20894
21092
|
"refused",
|
|
@@ -20902,6 +21100,10 @@
|
|
|
20902
21100
|
},
|
|
20903
21101
|
"detail": {
|
|
20904
21102
|
"type": "string"
|
|
21103
|
+
},
|
|
21104
|
+
"authorization_url": {
|
|
21105
|
+
"type": "string",
|
|
21106
|
+
"description": "Connectors only — where a person signs in to finish the install."
|
|
20905
21107
|
}
|
|
20906
21108
|
}
|
|
20907
21109
|
}
|
|
@@ -23342,6 +23544,203 @@
|
|
|
23342
23544
|
}
|
|
23343
23545
|
}
|
|
23344
23546
|
},
|
|
23547
|
+
"/v1/agents/{agent_id}/event-subscriptions": {
|
|
23548
|
+
"post": {
|
|
23549
|
+
"tags": [
|
|
23550
|
+
"Connectors"
|
|
23551
|
+
],
|
|
23552
|
+
"summary": "Subscribe to a connector event source",
|
|
23553
|
+
"description": "Pairs an installed connector binding with one of its preset's event\nsources (see `event_sources` on `GET /v1/connectors/presets`). 1Claw\nthen polls the source through the binding — same host and path\nallowlists, same credential, same SSRF guard — keeps the item ids it has\nseen, and dispatches each new item as an automation event of\n`event_type`, so an automation with `trigger_type: event` and\n`event_filter: { \"event_type\": \"gmail.message.received\" }` reacts within\none poll interval instead of on a cron it has to dedupe itself.\n\nThe first poll primes the subscription: it records what already exists\nand emits nothing, so a new subscription does not replay the inbox. At\nmost 25 new items are emitted per poll (oldest first); lists come from\nthe source's first page only. Failures back off exponentially on the\ninterval and switch the subscription off after 20 in a row.\n\nHuman users only; the agent needs Execution Intents enabled. At most 20\nsubscriptions per agent. The event payload is\n`{ \"event_type\", \"payload\": { \"subscription_id\", \"binding_id\", \"binding\", \"connector\", \"item\" } }`.\n",
|
|
23554
|
+
"operationId": "createEventSubscription",
|
|
23555
|
+
"parameters": [
|
|
23556
|
+
{
|
|
23557
|
+
"$ref": "#/components/parameters/AgentId"
|
|
23558
|
+
}
|
|
23559
|
+
],
|
|
23560
|
+
"requestBody": {
|
|
23561
|
+
"required": true,
|
|
23562
|
+
"content": {
|
|
23563
|
+
"application/json": {
|
|
23564
|
+
"schema": {
|
|
23565
|
+
"type": "object",
|
|
23566
|
+
"required": [
|
|
23567
|
+
"binding_id",
|
|
23568
|
+
"event_type"
|
|
23569
|
+
],
|
|
23570
|
+
"properties": {
|
|
23571
|
+
"binding_id": {
|
|
23572
|
+
"type": "string",
|
|
23573
|
+
"format": "uuid"
|
|
23574
|
+
},
|
|
23575
|
+
"event_type": {
|
|
23576
|
+
"type": "string",
|
|
23577
|
+
"example": "gmail.message.received"
|
|
23578
|
+
},
|
|
23579
|
+
"interval_secs": {
|
|
23580
|
+
"type": "integer",
|
|
23581
|
+
"description": "Poll interval, at least the source's `min_interval_secs` and at most 86400. Defaults to the minimum."
|
|
23582
|
+
}
|
|
23583
|
+
}
|
|
23584
|
+
}
|
|
23585
|
+
}
|
|
23586
|
+
}
|
|
23587
|
+
},
|
|
23588
|
+
"responses": {
|
|
23589
|
+
"201": {
|
|
23590
|
+
"description": "Subscribed",
|
|
23591
|
+
"content": {
|
|
23592
|
+
"application/json": {
|
|
23593
|
+
"schema": {
|
|
23594
|
+
"$ref": "#/components/schemas/EventSubscription"
|
|
23595
|
+
}
|
|
23596
|
+
}
|
|
23597
|
+
}
|
|
23598
|
+
},
|
|
23599
|
+
"400": {
|
|
23600
|
+
"$ref": "#/components/responses/BadRequest"
|
|
23601
|
+
},
|
|
23602
|
+
"403": {
|
|
23603
|
+
"$ref": "#/components/responses/Forbidden"
|
|
23604
|
+
},
|
|
23605
|
+
"404": {
|
|
23606
|
+
"$ref": "#/components/responses/NotFound"
|
|
23607
|
+
},
|
|
23608
|
+
"409": {
|
|
23609
|
+
"description": "This binding already subscribes to that event type"
|
|
23610
|
+
}
|
|
23611
|
+
}
|
|
23612
|
+
},
|
|
23613
|
+
"get": {
|
|
23614
|
+
"tags": [
|
|
23615
|
+
"Connectors"
|
|
23616
|
+
],
|
|
23617
|
+
"summary": "List an agent's event subscriptions",
|
|
23618
|
+
"operationId": "listEventSubscriptions",
|
|
23619
|
+
"parameters": [
|
|
23620
|
+
{
|
|
23621
|
+
"$ref": "#/components/parameters/AgentId"
|
|
23622
|
+
}
|
|
23623
|
+
],
|
|
23624
|
+
"responses": {
|
|
23625
|
+
"200": {
|
|
23626
|
+
"description": "Subscriptions",
|
|
23627
|
+
"content": {
|
|
23628
|
+
"application/json": {
|
|
23629
|
+
"schema": {
|
|
23630
|
+
"type": "object",
|
|
23631
|
+
"properties": {
|
|
23632
|
+
"subscriptions": {
|
|
23633
|
+
"type": "array",
|
|
23634
|
+
"items": {
|
|
23635
|
+
"$ref": "#/components/schemas/EventSubscription"
|
|
23636
|
+
}
|
|
23637
|
+
}
|
|
23638
|
+
}
|
|
23639
|
+
}
|
|
23640
|
+
}
|
|
23641
|
+
}
|
|
23642
|
+
},
|
|
23643
|
+
"403": {
|
|
23644
|
+
"$ref": "#/components/responses/Forbidden"
|
|
23645
|
+
},
|
|
23646
|
+
"404": {
|
|
23647
|
+
"$ref": "#/components/responses/NotFound"
|
|
23648
|
+
}
|
|
23649
|
+
}
|
|
23650
|
+
}
|
|
23651
|
+
},
|
|
23652
|
+
"/v1/agents/{agent_id}/event-subscriptions/{id}": {
|
|
23653
|
+
"delete": {
|
|
23654
|
+
"tags": [
|
|
23655
|
+
"Connectors"
|
|
23656
|
+
],
|
|
23657
|
+
"summary": "Delete an event subscription",
|
|
23658
|
+
"description": "Human users only.",
|
|
23659
|
+
"operationId": "deleteEventSubscription",
|
|
23660
|
+
"parameters": [
|
|
23661
|
+
{
|
|
23662
|
+
"$ref": "#/components/parameters/AgentId"
|
|
23663
|
+
},
|
|
23664
|
+
{
|
|
23665
|
+
"name": "id",
|
|
23666
|
+
"in": "path",
|
|
23667
|
+
"required": true,
|
|
23668
|
+
"schema": {
|
|
23669
|
+
"type": "string",
|
|
23670
|
+
"format": "uuid"
|
|
23671
|
+
}
|
|
23672
|
+
}
|
|
23673
|
+
],
|
|
23674
|
+
"responses": {
|
|
23675
|
+
"204": {
|
|
23676
|
+
"description": "Deleted"
|
|
23677
|
+
},
|
|
23678
|
+
"403": {
|
|
23679
|
+
"$ref": "#/components/responses/Forbidden"
|
|
23680
|
+
},
|
|
23681
|
+
"404": {
|
|
23682
|
+
"$ref": "#/components/responses/NotFound"
|
|
23683
|
+
}
|
|
23684
|
+
}
|
|
23685
|
+
}
|
|
23686
|
+
},
|
|
23687
|
+
"/v1/agents/{agent_id}/event-subscriptions/{id}/poll": {
|
|
23688
|
+
"post": {
|
|
23689
|
+
"tags": [
|
|
23690
|
+
"Connectors"
|
|
23691
|
+
],
|
|
23692
|
+
"summary": "Poll an event subscription now",
|
|
23693
|
+
"description": "Runs one poll immediately instead of waiting for the interval. The first\npoll of a fresh subscription primes it; a subscription switched off by\nrepeated failures is switched back on if the poll succeeds. Human users\nonly. A failed poll returns 400 with the source's error and is recorded\non the subscription like a scheduled failure.\n",
|
|
23694
|
+
"operationId": "pollEventSubscriptionNow",
|
|
23695
|
+
"parameters": [
|
|
23696
|
+
{
|
|
23697
|
+
"$ref": "#/components/parameters/AgentId"
|
|
23698
|
+
},
|
|
23699
|
+
{
|
|
23700
|
+
"name": "id",
|
|
23701
|
+
"in": "path",
|
|
23702
|
+
"required": true,
|
|
23703
|
+
"schema": {
|
|
23704
|
+
"type": "string",
|
|
23705
|
+
"format": "uuid"
|
|
23706
|
+
}
|
|
23707
|
+
}
|
|
23708
|
+
],
|
|
23709
|
+
"responses": {
|
|
23710
|
+
"200": {
|
|
23711
|
+
"description": "Polled",
|
|
23712
|
+
"content": {
|
|
23713
|
+
"application/json": {
|
|
23714
|
+
"schema": {
|
|
23715
|
+
"type": "object",
|
|
23716
|
+
"required": [
|
|
23717
|
+
"emitted",
|
|
23718
|
+
"subscription"
|
|
23719
|
+
],
|
|
23720
|
+
"properties": {
|
|
23721
|
+
"emitted": {
|
|
23722
|
+
"type": "integer"
|
|
23723
|
+
},
|
|
23724
|
+
"subscription": {
|
|
23725
|
+
"$ref": "#/components/schemas/EventSubscription"
|
|
23726
|
+
}
|
|
23727
|
+
}
|
|
23728
|
+
}
|
|
23729
|
+
}
|
|
23730
|
+
}
|
|
23731
|
+
},
|
|
23732
|
+
"400": {
|
|
23733
|
+
"$ref": "#/components/responses/BadRequest"
|
|
23734
|
+
},
|
|
23735
|
+
"403": {
|
|
23736
|
+
"$ref": "#/components/responses/Forbidden"
|
|
23737
|
+
},
|
|
23738
|
+
"404": {
|
|
23739
|
+
"$ref": "#/components/responses/NotFound"
|
|
23740
|
+
}
|
|
23741
|
+
}
|
|
23742
|
+
}
|
|
23743
|
+
},
|
|
23345
23744
|
"/v1/agents/{agent_id}/oauth/connections": {
|
|
23346
23745
|
"get": {
|
|
23347
23746
|
"tags": [
|
|
@@ -32594,6 +32993,19 @@
|
|
|
32594
32993
|
"created_at"
|
|
32595
32994
|
],
|
|
32596
32995
|
"properties": {
|
|
32996
|
+
"agent_type": {
|
|
32997
|
+
"type": "string",
|
|
32998
|
+
"enum": [
|
|
32999
|
+
"standard",
|
|
33000
|
+
"child"
|
|
33001
|
+
],
|
|
33002
|
+
"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."
|
|
33003
|
+
},
|
|
33004
|
+
"parent_agent_id": {
|
|
33005
|
+
"type": "string",
|
|
33006
|
+
"format": "uuid",
|
|
33007
|
+
"description": "Present on child agents."
|
|
33008
|
+
},
|
|
32597
33009
|
"memory_enabled": {
|
|
32598
33010
|
"type": "boolean",
|
|
32599
33011
|
"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."
|
|
@@ -39324,6 +39736,120 @@
|
|
|
39324
39736
|
},
|
|
39325
39737
|
"requires_oauth": {
|
|
39326
39738
|
"type": "boolean"
|
|
39739
|
+
},
|
|
39740
|
+
"event_sources": {
|
|
39741
|
+
"type": "array",
|
|
39742
|
+
"description": "Events 1Claw can synthesise for this connector by polling a list\nendpoint through the installed binding (nanobots item 4, polling\ninterim). Subscribe with `POST /v1/agents/{agent_id}/event-subscriptions`.\n",
|
|
39743
|
+
"items": {
|
|
39744
|
+
"$ref": "#/components/schemas/ConnectorEventSource"
|
|
39745
|
+
}
|
|
39746
|
+
}
|
|
39747
|
+
}
|
|
39748
|
+
},
|
|
39749
|
+
"ConnectorEventSource": {
|
|
39750
|
+
"type": "object",
|
|
39751
|
+
"required": [
|
|
39752
|
+
"event_type",
|
|
39753
|
+
"description",
|
|
39754
|
+
"path",
|
|
39755
|
+
"items_pointer",
|
|
39756
|
+
"id_pointers",
|
|
39757
|
+
"min_interval_secs"
|
|
39758
|
+
],
|
|
39759
|
+
"properties": {
|
|
39760
|
+
"event_type": {
|
|
39761
|
+
"type": "string",
|
|
39762
|
+
"example": "gmail.message.received"
|
|
39763
|
+
},
|
|
39764
|
+
"description": {
|
|
39765
|
+
"type": "string"
|
|
39766
|
+
},
|
|
39767
|
+
"path": {
|
|
39768
|
+
"type": "string",
|
|
39769
|
+
"description": "Path (with query) relative to the binding's base URL, inside the preset's allowed paths."
|
|
39770
|
+
},
|
|
39771
|
+
"items_pointer": {
|
|
39772
|
+
"type": "string",
|
|
39773
|
+
"description": "JSON pointer to the array of items in the response body; empty means the body is the array."
|
|
39774
|
+
},
|
|
39775
|
+
"id_pointers": {
|
|
39776
|
+
"type": "array",
|
|
39777
|
+
"items": {
|
|
39778
|
+
"type": "string"
|
|
39779
|
+
},
|
|
39780
|
+
"description": "Pointers within one item whose values together identify it."
|
|
39781
|
+
},
|
|
39782
|
+
"min_interval_secs": {
|
|
39783
|
+
"type": "integer",
|
|
39784
|
+
"example": 60
|
|
39785
|
+
}
|
|
39786
|
+
}
|
|
39787
|
+
},
|
|
39788
|
+
"EventSubscription": {
|
|
39789
|
+
"type": "object",
|
|
39790
|
+
"required": [
|
|
39791
|
+
"id",
|
|
39792
|
+
"agent_id",
|
|
39793
|
+
"binding_id",
|
|
39794
|
+
"event_type",
|
|
39795
|
+
"interval_secs",
|
|
39796
|
+
"is_active",
|
|
39797
|
+
"primed",
|
|
39798
|
+
"next_poll_at",
|
|
39799
|
+
"consecutive_errors",
|
|
39800
|
+
"events_emitted",
|
|
39801
|
+
"created_at"
|
|
39802
|
+
],
|
|
39803
|
+
"properties": {
|
|
39804
|
+
"id": {
|
|
39805
|
+
"type": "string",
|
|
39806
|
+
"format": "uuid"
|
|
39807
|
+
},
|
|
39808
|
+
"agent_id": {
|
|
39809
|
+
"type": "string",
|
|
39810
|
+
"format": "uuid"
|
|
39811
|
+
},
|
|
39812
|
+
"binding_id": {
|
|
39813
|
+
"type": "string",
|
|
39814
|
+
"format": "uuid"
|
|
39815
|
+
},
|
|
39816
|
+
"event_type": {
|
|
39817
|
+
"type": "string",
|
|
39818
|
+
"example": "gmail.message.received"
|
|
39819
|
+
},
|
|
39820
|
+
"interval_secs": {
|
|
39821
|
+
"type": "integer"
|
|
39822
|
+
},
|
|
39823
|
+
"is_active": {
|
|
39824
|
+
"type": "boolean"
|
|
39825
|
+
},
|
|
39826
|
+
"primed": {
|
|
39827
|
+
"type": "boolean",
|
|
39828
|
+
"description": "False until the first poll has recorded what already exists. That poll emits nothing."
|
|
39829
|
+
},
|
|
39830
|
+
"next_poll_at": {
|
|
39831
|
+
"type": "string",
|
|
39832
|
+
"format": "date-time"
|
|
39833
|
+
},
|
|
39834
|
+
"last_polled_at": {
|
|
39835
|
+
"type": "string",
|
|
39836
|
+
"format": "date-time",
|
|
39837
|
+
"nullable": true
|
|
39838
|
+
},
|
|
39839
|
+
"last_error": {
|
|
39840
|
+
"type": "string",
|
|
39841
|
+
"nullable": true
|
|
39842
|
+
},
|
|
39843
|
+
"consecutive_errors": {
|
|
39844
|
+
"type": "integer"
|
|
39845
|
+
},
|
|
39846
|
+
"events_emitted": {
|
|
39847
|
+
"type": "integer",
|
|
39848
|
+
"format": "int64"
|
|
39849
|
+
},
|
|
39850
|
+
"created_at": {
|
|
39851
|
+
"type": "string",
|
|
39852
|
+
"format": "date-time"
|
|
39327
39853
|
}
|
|
39328
39854
|
}
|
|
39329
39855
|
},
|
|
@@ -43512,6 +44038,13 @@
|
|
|
43512
44038
|
"items": {
|
|
43513
44039
|
"$ref": "#/components/schemas/OAuthAppCredentialResponse"
|
|
43514
44040
|
}
|
|
44041
|
+
},
|
|
44042
|
+
"platform_defaults": {
|
|
44043
|
+
"type": "array",
|
|
44044
|
+
"items": {
|
|
44045
|
+
"type": "string"
|
|
44046
|
+
},
|
|
44047
|
+
"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"
|
|
43515
44048
|
}
|
|
43516
44049
|
}
|
|
43517
44050
|
},
|
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.28"
|
|
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]
|
|
@@ -12079,6 +12155,59 @@ paths:
|
|
|
12079
12155
|
"404":
|
|
12080
12156
|
$ref: "#/components/responses/NotFound"
|
|
12081
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
|
+
|
|
12082
12211
|
/v1/automations/presets:
|
|
12083
12212
|
get:
|
|
12084
12213
|
tags: [Automations]
|
|
@@ -13303,16 +13432,31 @@ paths:
|
|
|
13303
13432
|
chart queues an approval exactly as a dashboard click would. That resource
|
|
13304
13433
|
comes back as `awaiting_approval` rather than failing the whole chart.
|
|
13305
13434
|
|
|
13306
|
-
|
|
13307
|
-
`
|
|
13308
|
-
|
|
13309
|
-
|
|
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.
|
|
13310
13450
|
|
|
13311
13451
|
Save `applied_state` to `.1claw/apply-state.json`. It records what apply
|
|
13312
13452
|
set, which is what lets the next run tell drift from a first apply.
|
|
13313
13453
|
|
|
13314
|
-
|
|
13315
|
-
|
|
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.
|
|
13316
13460
|
operationId: applyChart
|
|
13317
13461
|
requestBody:
|
|
13318
13462
|
required: true
|
|
@@ -13346,9 +13490,12 @@ paths:
|
|
|
13346
13490
|
name: { type: string }
|
|
13347
13491
|
result:
|
|
13348
13492
|
type: string
|
|
13349
|
-
enum: [created, unchanged, skipped, refused, awaiting_approval, failed]
|
|
13493
|
+
enum: [created, patched, unchanged, skipped, refused, awaiting_approval, failed]
|
|
13350
13494
|
id: { type: string, format: uuid }
|
|
13351
13495
|
detail: { type: string }
|
|
13496
|
+
authorization_url:
|
|
13497
|
+
type: string
|
|
13498
|
+
description: Connectors only — where a person signs in to finish the install.
|
|
13352
13499
|
warnings:
|
|
13353
13500
|
type: array
|
|
13354
13501
|
items: { type: string }
|
|
@@ -14900,6 +15047,139 @@ paths:
|
|
|
14900
15047
|
"404":
|
|
14901
15048
|
$ref: "#/components/responses/NotFound"
|
|
14902
15049
|
|
|
15050
|
+
/v1/agents/{agent_id}/event-subscriptions:
|
|
15051
|
+
post:
|
|
15052
|
+
tags: [Connectors]
|
|
15053
|
+
summary: Subscribe to a connector event source
|
|
15054
|
+
description: |
|
|
15055
|
+
Pairs an installed connector binding with one of its preset's event
|
|
15056
|
+
sources (see `event_sources` on `GET /v1/connectors/presets`). 1Claw
|
|
15057
|
+
then polls the source through the binding — same host and path
|
|
15058
|
+
allowlists, same credential, same SSRF guard — keeps the item ids it has
|
|
15059
|
+
seen, and dispatches each new item as an automation event of
|
|
15060
|
+
`event_type`, so an automation with `trigger_type: event` and
|
|
15061
|
+
`event_filter: { "event_type": "gmail.message.received" }` reacts within
|
|
15062
|
+
one poll interval instead of on a cron it has to dedupe itself.
|
|
15063
|
+
|
|
15064
|
+
The first poll primes the subscription: it records what already exists
|
|
15065
|
+
and emits nothing, so a new subscription does not replay the inbox. At
|
|
15066
|
+
most 25 new items are emitted per poll (oldest first); lists come from
|
|
15067
|
+
the source's first page only. Failures back off exponentially on the
|
|
15068
|
+
interval and switch the subscription off after 20 in a row.
|
|
15069
|
+
|
|
15070
|
+
Human users only; the agent needs Execution Intents enabled. At most 20
|
|
15071
|
+
subscriptions per agent. The event payload is
|
|
15072
|
+
`{ "event_type", "payload": { "subscription_id", "binding_id", "binding", "connector", "item" } }`.
|
|
15073
|
+
operationId: createEventSubscription
|
|
15074
|
+
parameters:
|
|
15075
|
+
- $ref: "#/components/parameters/AgentId"
|
|
15076
|
+
requestBody:
|
|
15077
|
+
required: true
|
|
15078
|
+
content:
|
|
15079
|
+
application/json:
|
|
15080
|
+
schema:
|
|
15081
|
+
type: object
|
|
15082
|
+
required: [binding_id, event_type]
|
|
15083
|
+
properties:
|
|
15084
|
+
binding_id: { type: string, format: uuid }
|
|
15085
|
+
event_type: { type: string, example: gmail.message.received }
|
|
15086
|
+
interval_secs:
|
|
15087
|
+
type: integer
|
|
15088
|
+
description: Poll interval, at least the source's `min_interval_secs` and at most 86400. Defaults to the minimum.
|
|
15089
|
+
responses:
|
|
15090
|
+
"201":
|
|
15091
|
+
description: Subscribed
|
|
15092
|
+
content:
|
|
15093
|
+
application/json:
|
|
15094
|
+
schema:
|
|
15095
|
+
$ref: "#/components/schemas/EventSubscription"
|
|
15096
|
+
"400":
|
|
15097
|
+
$ref: "#/components/responses/BadRequest"
|
|
15098
|
+
"403":
|
|
15099
|
+
$ref: "#/components/responses/Forbidden"
|
|
15100
|
+
"404":
|
|
15101
|
+
$ref: "#/components/responses/NotFound"
|
|
15102
|
+
"409":
|
|
15103
|
+
description: This binding already subscribes to that event type
|
|
15104
|
+
get:
|
|
15105
|
+
tags: [Connectors]
|
|
15106
|
+
summary: List an agent's event subscriptions
|
|
15107
|
+
operationId: listEventSubscriptions
|
|
15108
|
+
parameters:
|
|
15109
|
+
- $ref: "#/components/parameters/AgentId"
|
|
15110
|
+
responses:
|
|
15111
|
+
"200":
|
|
15112
|
+
description: Subscriptions
|
|
15113
|
+
content:
|
|
15114
|
+
application/json:
|
|
15115
|
+
schema:
|
|
15116
|
+
type: object
|
|
15117
|
+
properties:
|
|
15118
|
+
subscriptions:
|
|
15119
|
+
type: array
|
|
15120
|
+
items:
|
|
15121
|
+
$ref: "#/components/schemas/EventSubscription"
|
|
15122
|
+
"403":
|
|
15123
|
+
$ref: "#/components/responses/Forbidden"
|
|
15124
|
+
"404":
|
|
15125
|
+
$ref: "#/components/responses/NotFound"
|
|
15126
|
+
|
|
15127
|
+
/v1/agents/{agent_id}/event-subscriptions/{id}:
|
|
15128
|
+
delete:
|
|
15129
|
+
tags: [Connectors]
|
|
15130
|
+
summary: Delete an event subscription
|
|
15131
|
+
description: Human users only.
|
|
15132
|
+
operationId: deleteEventSubscription
|
|
15133
|
+
parameters:
|
|
15134
|
+
- $ref: "#/components/parameters/AgentId"
|
|
15135
|
+
- name: id
|
|
15136
|
+
in: path
|
|
15137
|
+
required: true
|
|
15138
|
+
schema: { type: string, format: uuid }
|
|
15139
|
+
responses:
|
|
15140
|
+
"204":
|
|
15141
|
+
description: Deleted
|
|
15142
|
+
"403":
|
|
15143
|
+
$ref: "#/components/responses/Forbidden"
|
|
15144
|
+
"404":
|
|
15145
|
+
$ref: "#/components/responses/NotFound"
|
|
15146
|
+
|
|
15147
|
+
/v1/agents/{agent_id}/event-subscriptions/{id}/poll:
|
|
15148
|
+
post:
|
|
15149
|
+
tags: [Connectors]
|
|
15150
|
+
summary: Poll an event subscription now
|
|
15151
|
+
description: |
|
|
15152
|
+
Runs one poll immediately instead of waiting for the interval. The first
|
|
15153
|
+
poll of a fresh subscription primes it; a subscription switched off by
|
|
15154
|
+
repeated failures is switched back on if the poll succeeds. Human users
|
|
15155
|
+
only. A failed poll returns 400 with the source's error and is recorded
|
|
15156
|
+
on the subscription like a scheduled failure.
|
|
15157
|
+
operationId: pollEventSubscriptionNow
|
|
15158
|
+
parameters:
|
|
15159
|
+
- $ref: "#/components/parameters/AgentId"
|
|
15160
|
+
- name: id
|
|
15161
|
+
in: path
|
|
15162
|
+
required: true
|
|
15163
|
+
schema: { type: string, format: uuid }
|
|
15164
|
+
responses:
|
|
15165
|
+
"200":
|
|
15166
|
+
description: Polled
|
|
15167
|
+
content:
|
|
15168
|
+
application/json:
|
|
15169
|
+
schema:
|
|
15170
|
+
type: object
|
|
15171
|
+
required: [emitted, subscription]
|
|
15172
|
+
properties:
|
|
15173
|
+
emitted: { type: integer }
|
|
15174
|
+
subscription:
|
|
15175
|
+
$ref: "#/components/schemas/EventSubscription"
|
|
15176
|
+
"400":
|
|
15177
|
+
$ref: "#/components/responses/BadRequest"
|
|
15178
|
+
"403":
|
|
15179
|
+
$ref: "#/components/responses/Forbidden"
|
|
15180
|
+
"404":
|
|
15181
|
+
$ref: "#/components/responses/NotFound"
|
|
15182
|
+
|
|
14903
15183
|
/v1/agents/{agent_id}/oauth/connections:
|
|
14904
15184
|
get:
|
|
14905
15185
|
tags: [OAuth Connect]
|
|
@@ -20916,6 +21196,14 @@ components:
|
|
|
20916
21196
|
created_at,
|
|
20917
21197
|
]
|
|
20918
21198
|
properties:
|
|
21199
|
+
agent_type:
|
|
21200
|
+
type: string
|
|
21201
|
+
enum: [standard, child]
|
|
21202
|
+
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.
|
|
21203
|
+
parent_agent_id:
|
|
21204
|
+
type: string
|
|
21205
|
+
format: uuid
|
|
21206
|
+
description: Present on child agents.
|
|
20919
21207
|
memory_enabled:
|
|
20920
21208
|
type: boolean
|
|
20921
21209
|
description: >-
|
|
@@ -25507,6 +25795,52 @@ components:
|
|
|
25507
25795
|
documentation_url: { type: string, format: uri }
|
|
25508
25796
|
tier_required: { type: string, example: free }
|
|
25509
25797
|
requires_oauth: { type: boolean }
|
|
25798
|
+
event_sources:
|
|
25799
|
+
type: array
|
|
25800
|
+
description: |
|
|
25801
|
+
Events 1Claw can synthesise for this connector by polling a list
|
|
25802
|
+
endpoint through the installed binding (nanobots item 4, polling
|
|
25803
|
+
interim). Subscribe with `POST /v1/agents/{agent_id}/event-subscriptions`.
|
|
25804
|
+
items:
|
|
25805
|
+
$ref: "#/components/schemas/ConnectorEventSource"
|
|
25806
|
+
|
|
25807
|
+
ConnectorEventSource:
|
|
25808
|
+
type: object
|
|
25809
|
+
required: [event_type, description, path, items_pointer, id_pointers, min_interval_secs]
|
|
25810
|
+
properties:
|
|
25811
|
+
event_type: { type: string, example: gmail.message.received }
|
|
25812
|
+
description: { type: string }
|
|
25813
|
+
path:
|
|
25814
|
+
type: string
|
|
25815
|
+
description: Path (with query) relative to the binding's base URL, inside the preset's allowed paths.
|
|
25816
|
+
items_pointer:
|
|
25817
|
+
type: string
|
|
25818
|
+
description: JSON pointer to the array of items in the response body; empty means the body is the array.
|
|
25819
|
+
id_pointers:
|
|
25820
|
+
type: array
|
|
25821
|
+
items: { type: string }
|
|
25822
|
+
description: Pointers within one item whose values together identify it.
|
|
25823
|
+
min_interval_secs: { type: integer, example: 60 }
|
|
25824
|
+
|
|
25825
|
+
EventSubscription:
|
|
25826
|
+
type: object
|
|
25827
|
+
required: [id, agent_id, binding_id, event_type, interval_secs, is_active, primed, next_poll_at, consecutive_errors, events_emitted, created_at]
|
|
25828
|
+
properties:
|
|
25829
|
+
id: { type: string, format: uuid }
|
|
25830
|
+
agent_id: { type: string, format: uuid }
|
|
25831
|
+
binding_id: { type: string, format: uuid }
|
|
25832
|
+
event_type: { type: string, example: gmail.message.received }
|
|
25833
|
+
interval_secs: { type: integer }
|
|
25834
|
+
is_active: { type: boolean }
|
|
25835
|
+
primed:
|
|
25836
|
+
type: boolean
|
|
25837
|
+
description: False until the first poll has recorded what already exists. That poll emits nothing.
|
|
25838
|
+
next_poll_at: { type: string, format: date-time }
|
|
25839
|
+
last_polled_at: { type: string, format: date-time, nullable: true }
|
|
25840
|
+
last_error: { type: string, nullable: true }
|
|
25841
|
+
consecutive_errors: { type: integer }
|
|
25842
|
+
events_emitted: { type: integer, format: int64 }
|
|
25843
|
+
created_at: { type: string, format: date-time }
|
|
25510
25844
|
|
|
25511
25845
|
InstalledConnector:
|
|
25512
25846
|
type: object
|
|
@@ -28213,6 +28547,13 @@ components:
|
|
|
28213
28547
|
type: array
|
|
28214
28548
|
items:
|
|
28215
28549
|
$ref: "#/components/schemas/OAuthAppCredentialResponse"
|
|
28550
|
+
platform_defaults:
|
|
28551
|
+
type: array
|
|
28552
|
+
items: { type: string }
|
|
28553
|
+
description: |
|
|
28554
|
+
Provider slugs 1Claw has its own OAuth app for. Where the organization has
|
|
28555
|
+
registered no credentials for one of these, connections use 1Claw's app;
|
|
28556
|
+
an organization credential for the same provider always wins.
|
|
28216
28557
|
|
|
28217
28558
|
# -------------------------------------------------------------------
|
|
28218
28559
|
# Key Import
|