@1claw/openapi-spec 0.61.27 → 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.
Files changed (3) hide show
  1. package/openapi.json +312 -1
  2. package/openapi.yaml +180 -1
  3. 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.27",
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"
@@ -23544,6 +23544,203 @@
23544
23544
  }
23545
23545
  }
23546
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
+ },
23547
23744
  "/v1/agents/{agent_id}/oauth/connections": {
23548
23745
  "get": {
23549
23746
  "tags": [
@@ -39539,6 +39736,120 @@
39539
39736
  },
39540
39737
  "requires_oauth": {
39541
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"
39542
39853
  }
39543
39854
  }
39544
39855
  },
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.27"
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,
@@ -15047,6 +15047,139 @@ paths:
15047
15047
  "404":
15048
15048
  $ref: "#/components/responses/NotFound"
15049
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
+
15050
15183
  /v1/agents/{agent_id}/oauth/connections:
15051
15184
  get:
15052
15185
  tags: [OAuth Connect]
@@ -25662,6 +25795,52 @@ components:
25662
25795
  documentation_url: { type: string, format: uri }
25663
25796
  tier_required: { type: string, example: free }
25664
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 }
25665
25844
 
25666
25845
  InstalledConnector:
25667
25846
  type: object
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1claw/openapi-spec",
3
- "version": "0.61.27",
3
+ "version": "0.61.28",
4
4
  "description": "OpenAPI 3.1.0 specification for the 1Claw Vault API \u2014 generate clients in any language",
5
5
  "license": "MIT",
6
6
  "repository": {