@1claw/openapi-spec 0.61.31 → 0.61.35

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 +730 -6
  2. package/openapi.yaml +484 -3
  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.31",
5
+ "version": "0.61.35",
6
6
  "description": "Secure secret management for AI agents. Provides vaults, secrets,\npolicy-based access control, agent identity, Intents API,\nsharing, billing, and audit logging. Automations (workflow_spec,\nwebhook tokens, event triggers, Assist), cloud runtimes with\ninteractive shell sessions, agent memory, and discovery.\n\n## Domains\n\n`api.1claw.co` is canonical: it is the OIDC issuer, the `aud` the API\nmints, and the first entry in `servers` — a generated client takes its\nbase URL from there, and the previous ordering pointed every SDK at the\ndomain the issuer had already left. `api.1claw.xyz` still answers and is\nstill accepted on token validation, because tokens minted before the\nmove carry it; it is never minted now.\n\nOne deliberate exception: the Shroud attestation identity token is\nrequested from GCP with `audience: https://api.1claw.xyz`, so\n`/v1/shroud/attestation` reports that as its `expected_audience`. That\nis accurate rather than stale — the audience is a verification contract\nwith anyone already checking the token, and moving it is a breaking\nchange for them, not a rename.\n\nAll endpoints require JWT Bearer authentication unless marked with\n`security: []`.\n",
7
7
  "contact": {
8
8
  "email": "ops@1claw.co"
@@ -17221,6 +17221,75 @@
17221
17221
  }
17222
17222
  }
17223
17223
  },
17224
+ "/v1/x402/topup": {
17225
+ "post": {
17226
+ "tags": [
17227
+ "Billing"
17228
+ ],
17229
+ "summary": "x402 ledger top-up (agent door)",
17230
+ "description": "The wallet rail for Shroud (Shroud AI plan). Without `X-PAYMENT` the response is a\n**402** quote (`x402Version`, `accepts[]` with `payTo`, `maxAmountRequired`, `resource`)\nfor `amount_usd` (default $1) of USDC on Base. With a signed EIP-3009 `X-PAYMENT`\nthe facilitator verifies it, the proof is claimed once, the payer wallet's org\nledger is credited in micro-USD, and the facilitator settles.\n\n**Payment is the account.** An unknown wallet's first settled top-up provisions a\nshadow org, one Shroud-enabled agent and one `sk-shroud-v1` router key keyed on the\nwallet (returned once as `router_key`), after screening the wallet against the OFAC\nSDN list (fails closed when the list is missing or stale) and the caller's region\nagainst the custody geofence. Same wallet = same org on every later top-up. The\nresponse always carries a ≤60 s `access_token` for the wallet's agent so the\ngateway can serve the paid request immediately. The Shroud gateway drives this for\n`Authorization: Bearer x402` requests and relays the quote or the result.\n",
17231
+ "operationId": "x402Topup",
17232
+ "security": [],
17233
+ "parameters": [
17234
+ {
17235
+ "name": "X-PAYMENT",
17236
+ "in": "header",
17237
+ "required": false,
17238
+ "schema": {
17239
+ "type": "string"
17240
+ },
17241
+ "description": "Base64 x402 payment payload (EIP-3009 USDC authorization on Base)"
17242
+ }
17243
+ ],
17244
+ "requestBody": {
17245
+ "required": false,
17246
+ "content": {
17247
+ "application/json": {
17248
+ "schema": {
17249
+ "type": "object",
17250
+ "additionalProperties": false,
17251
+ "properties": {
17252
+ "amount_usd": {
17253
+ "type": "integer",
17254
+ "minimum": 1,
17255
+ "maximum": 100,
17256
+ "description": "Whole dollars to add to the ledger (default 1)"
17257
+ }
17258
+ }
17259
+ }
17260
+ }
17261
+ }
17262
+ },
17263
+ "responses": {
17264
+ "200": {
17265
+ "description": "Credited",
17266
+ "content": {
17267
+ "application/json": {
17268
+ "schema": {
17269
+ "$ref": "#/components/schemas/X402TopupResponse"
17270
+ }
17271
+ }
17272
+ }
17273
+ },
17274
+ "402": {
17275
+ "description": "Payment required — the quote to sign, or why the payment was refused",
17276
+ "content": {
17277
+ "application/json": {
17278
+ "schema": {
17279
+ "$ref": "#/components/schemas/PaymentRequirement"
17280
+ }
17281
+ }
17282
+ }
17283
+ },
17284
+ "403": {
17285
+ "description": "The wallet is sanctioned or the region is fenced; no account is opened"
17286
+ },
17287
+ "503": {
17288
+ "description": "The sanctions list is unavailable (fails closed)"
17289
+ }
17290
+ }
17291
+ }
17292
+ },
17224
17293
  "/v1/oauth/token": {
17225
17294
  "post": {
17226
17295
  "tags": [
@@ -18770,6 +18839,7 @@
18770
18839
  ],
18771
18840
  "summary": "Trigger automation",
18772
18841
  "operationId": "triggerAutomation",
18842
+ "description": "Start a run now. With an `idempotency_key` (body or `Idempotency-Key` header) the\nsame key returns the run already started for it (200) rather than a second run\n(201). `input` is exposed to steps as `{{trigger.*}}`.\n",
18773
18843
  "parameters": [
18774
18844
  {
18775
18845
  "name": "automationId",
@@ -18781,9 +18851,29 @@
18781
18851
  }
18782
18852
  }
18783
18853
  ],
18854
+ "requestBody": {
18855
+ "required": false,
18856
+ "content": {
18857
+ "application/json": {
18858
+ "schema": {
18859
+ "$ref": "#/components/schemas/TriggerAutomationRequest"
18860
+ }
18861
+ }
18862
+ }
18863
+ },
18784
18864
  "responses": {
18785
18865
  "200": {
18786
- "description": "Automation triggered",
18866
+ "description": "An earlier run with the same idempotency key",
18867
+ "content": {
18868
+ "application/json": {
18869
+ "schema": {
18870
+ "$ref": "#/components/schemas/AutomationRunResponse"
18871
+ }
18872
+ }
18873
+ }
18874
+ },
18875
+ "201": {
18876
+ "description": "Run started",
18787
18877
  "content": {
18788
18878
  "application/json": {
18789
18879
  "schema": {
@@ -19198,6 +19288,173 @@
19198
19288
  }
19199
19289
  }
19200
19290
  },
19291
+ "/v1/automations/{automationId}/runs/{runId}/callback/{token}": {
19292
+ "post": {
19293
+ "tags": [
19294
+ "Automations"
19295
+ ],
19296
+ "summary": "Continue a run parked on awaiting_callback",
19297
+ "operationId": "automationRunCallback",
19298
+ "security": [],
19299
+ "description": "Public, authenticated by the per-run token. A spec with an `awaiting_callback`\nstep gets the token at run start as `{{run.callback_url}}` / `{{run.callback_token}}`;\nan earlier step hands the URL to the external system, the step parks the run\n(`awaiting_callback`, up to its `timeout_secs`), and this POST continues it. The\nJSON body becomes `{{resume.*}}`. 409 when the run is not (yet) parked on a\ncallback; 401 for a wrong token.\n",
19300
+ "parameters": [
19301
+ {
19302
+ "name": "automationId",
19303
+ "in": "path",
19304
+ "required": true,
19305
+ "schema": {
19306
+ "type": "string",
19307
+ "format": "uuid"
19308
+ }
19309
+ },
19310
+ {
19311
+ "name": "runId",
19312
+ "in": "path",
19313
+ "required": true,
19314
+ "schema": {
19315
+ "type": "string",
19316
+ "format": "uuid"
19317
+ }
19318
+ },
19319
+ {
19320
+ "name": "token",
19321
+ "in": "path",
19322
+ "required": true,
19323
+ "schema": {
19324
+ "type": "string"
19325
+ }
19326
+ }
19327
+ ],
19328
+ "requestBody": {
19329
+ "required": false,
19330
+ "content": {
19331
+ "application/json": {
19332
+ "schema": {
19333
+ "type": "object",
19334
+ "additionalProperties": true
19335
+ }
19336
+ }
19337
+ }
19338
+ },
19339
+ "responses": {
19340
+ "202": {
19341
+ "description": "The run, continuing",
19342
+ "content": {
19343
+ "application/json": {
19344
+ "schema": {
19345
+ "$ref": "#/components/schemas/AutomationRunResponse"
19346
+ }
19347
+ }
19348
+ }
19349
+ },
19350
+ "401": {
19351
+ "$ref": "#/components/responses/Unauthorized"
19352
+ },
19353
+ "409": {
19354
+ "$ref": "#/components/responses/Conflict"
19355
+ }
19356
+ }
19357
+ }
19358
+ },
19359
+ "/v1/automations/{automationId}/versions": {
19360
+ "get": {
19361
+ "tags": [
19362
+ "Automations"
19363
+ ],
19364
+ "summary": "List spec versions",
19365
+ "operationId": "listAutomationVersions",
19366
+ "description": "Every `workflow_spec` the automation has had, newest first. Version 1 is the\nspec it was created with; every update that changes the spec publishes the\nnext one. Runs record the version they executed.\n",
19367
+ "parameters": [
19368
+ {
19369
+ "name": "automationId",
19370
+ "in": "path",
19371
+ "required": true,
19372
+ "schema": {
19373
+ "type": "string",
19374
+ "format": "uuid"
19375
+ }
19376
+ }
19377
+ ],
19378
+ "responses": {
19379
+ "200": {
19380
+ "description": "Versions",
19381
+ "content": {
19382
+ "application/json": {
19383
+ "schema": {
19384
+ "$ref": "#/components/schemas/AutomationVersionListResponse"
19385
+ }
19386
+ }
19387
+ }
19388
+ },
19389
+ "401": {
19390
+ "$ref": "#/components/responses/Unauthorized"
19391
+ },
19392
+ "404": {
19393
+ "$ref": "#/components/responses/NotFound"
19394
+ }
19395
+ }
19396
+ }
19397
+ },
19398
+ "/v1/automations/{automationId}/versions/{version}/rollback": {
19399
+ "post": {
19400
+ "tags": [
19401
+ "Automations"
19402
+ ],
19403
+ "summary": "Roll back to an earlier spec version",
19404
+ "operationId": "rollbackAutomationVersion",
19405
+ "description": "Publishes the chosen version's spec as a new version and makes it current.\nHuman-only. A rollback that widens what the automation can do relative to the\nlive spec goes through the `automation.widen` control-plane consensus gate,\nlike an edit would.\n",
19406
+ "parameters": [
19407
+ {
19408
+ "name": "automationId",
19409
+ "in": "path",
19410
+ "required": true,
19411
+ "schema": {
19412
+ "type": "string",
19413
+ "format": "uuid"
19414
+ }
19415
+ },
19416
+ {
19417
+ "name": "version",
19418
+ "in": "path",
19419
+ "required": true,
19420
+ "schema": {
19421
+ "type": "integer"
19422
+ }
19423
+ }
19424
+ ],
19425
+ "requestBody": {
19426
+ "required": false,
19427
+ "content": {
19428
+ "application/json": {
19429
+ "schema": {
19430
+ "$ref": "#/components/schemas/RollbackAutomationRequest"
19431
+ }
19432
+ }
19433
+ }
19434
+ },
19435
+ "responses": {
19436
+ "200": {
19437
+ "description": "The automation with the rolled-back spec current",
19438
+ "content": {
19439
+ "application/json": {
19440
+ "schema": {
19441
+ "$ref": "#/components/schemas/AutomationResponse"
19442
+ }
19443
+ }
19444
+ }
19445
+ },
19446
+ "401": {
19447
+ "$ref": "#/components/responses/Unauthorized"
19448
+ },
19449
+ "403": {
19450
+ "$ref": "#/components/responses/Forbidden"
19451
+ },
19452
+ "404": {
19453
+ "$ref": "#/components/responses/NotFound"
19454
+ }
19455
+ }
19456
+ }
19457
+ },
19201
19458
  "/v1/automations/presets": {
19202
19459
  "get": {
19203
19460
  "tags": [
@@ -23871,6 +24128,130 @@
23871
24128
  }
23872
24129
  }
23873
24130
  },
24131
+ "/v1/agents/{agent_id}/tool-bindings": {
24132
+ "post": {
24133
+ "tags": [
24134
+ "Agents"
24135
+ ],
24136
+ "summary": "Create a secret → tool binding (rehydration policy)",
24137
+ "description": "Authorises the enclave to rehydrate the `⟦sk:…⟧` placeholder for `secret_path`\ninto `tool_name` at `arg_path` — and only when the call's destination host is one\nof `destination_hosts`. Redaction replaces vault secrets in prompts with\ndeterministic placeholders the model can place but never read; a placeholder is\nsubstituted back only inside an authorised tool-call argument, at the moment the\nenclave performs the call (`execution_mode: \"tee\"`). No binding, wrong argument,\nwrong host, bad checksum or an unknown tag is a 403 at execution time. Human users\nonly; up to 200 per agent.\n",
24138
+ "operationId": "createToolBinding",
24139
+ "parameters": [
24140
+ {
24141
+ "$ref": "#/components/parameters/AgentId"
24142
+ }
24143
+ ],
24144
+ "requestBody": {
24145
+ "required": true,
24146
+ "content": {
24147
+ "application/json": {
24148
+ "schema": {
24149
+ "$ref": "#/components/schemas/CreateToolBindingRequest"
24150
+ }
24151
+ }
24152
+ }
24153
+ },
24154
+ "responses": {
24155
+ "201": {
24156
+ "description": "Created",
24157
+ "content": {
24158
+ "application/json": {
24159
+ "schema": {
24160
+ "$ref": "#/components/schemas/SecretToolBinding"
24161
+ }
24162
+ }
24163
+ }
24164
+ },
24165
+ "400": {
24166
+ "$ref": "#/components/responses/BadRequest"
24167
+ },
24168
+ "403": {
24169
+ "$ref": "#/components/responses/Forbidden"
24170
+ },
24171
+ "404": {
24172
+ "$ref": "#/components/responses/NotFound"
24173
+ },
24174
+ "409": {
24175
+ "description": "A binding for this secret, tool and argument already exists"
24176
+ }
24177
+ }
24178
+ },
24179
+ "get": {
24180
+ "tags": [
24181
+ "Agents"
24182
+ ],
24183
+ "summary": "List secret → tool bindings",
24184
+ "operationId": "listToolBindings",
24185
+ "parameters": [
24186
+ {
24187
+ "$ref": "#/components/parameters/AgentId"
24188
+ }
24189
+ ],
24190
+ "responses": {
24191
+ "200": {
24192
+ "description": "Bindings",
24193
+ "content": {
24194
+ "application/json": {
24195
+ "schema": {
24196
+ "type": "object",
24197
+ "required": [
24198
+ "bindings"
24199
+ ],
24200
+ "properties": {
24201
+ "bindings": {
24202
+ "type": "array",
24203
+ "items": {
24204
+ "$ref": "#/components/schemas/SecretToolBinding"
24205
+ }
24206
+ }
24207
+ }
24208
+ }
24209
+ }
24210
+ }
24211
+ },
24212
+ "403": {
24213
+ "$ref": "#/components/responses/Forbidden"
24214
+ },
24215
+ "404": {
24216
+ "$ref": "#/components/responses/NotFound"
24217
+ }
24218
+ }
24219
+ }
24220
+ },
24221
+ "/v1/agents/{agent_id}/tool-bindings/{binding_id}": {
24222
+ "delete": {
24223
+ "tags": [
24224
+ "Agents"
24225
+ ],
24226
+ "summary": "Delete a secret → tool binding",
24227
+ "operationId": "deleteToolBinding",
24228
+ "parameters": [
24229
+ {
24230
+ "$ref": "#/components/parameters/AgentId"
24231
+ },
24232
+ {
24233
+ "name": "binding_id",
24234
+ "in": "path",
24235
+ "required": true,
24236
+ "schema": {
24237
+ "type": "string",
24238
+ "format": "uuid"
24239
+ }
24240
+ }
24241
+ ],
24242
+ "responses": {
24243
+ "204": {
24244
+ "description": "Deleted"
24245
+ },
24246
+ "403": {
24247
+ "$ref": "#/components/responses/Forbidden"
24248
+ },
24249
+ "404": {
24250
+ "$ref": "#/components/responses/NotFound"
24251
+ }
24252
+ }
24253
+ }
24254
+ },
23874
24255
  "/v1/agents/{agent_id}/oauth/connections": {
23875
24256
  "get": {
23876
24257
  "tags": [
@@ -36090,7 +36471,13 @@
36090
36471
  "type": "string"
36091
36472
  },
36092
36473
  "credit_balance_cents": {
36093
- "type": "integer"
36474
+ "type": "integer",
36475
+ "description": "Derived (rounded down); the ledger unit is micro-USD"
36476
+ },
36477
+ "credit_balance_micro_usd": {
36478
+ "type": "integer",
36479
+ "format": "int64",
36480
+ "description": "The ledger value. One inspected Shroud request costs 5,000 micro-USD ($0.005)."
36094
36481
  },
36095
36482
  "credit_balance_usd": {
36096
36483
  "type": "string"
@@ -36313,10 +36700,17 @@
36313
36700
  "type": "object",
36314
36701
  "properties": {
36315
36702
  "balance_cents": {
36316
- "type": "integer"
36703
+ "type": "integer",
36704
+ "description": "Derived (rounded down); the ledger unit is micro-USD"
36705
+ },
36706
+ "balance_micro_usd": {
36707
+ "type": "integer",
36708
+ "format": "int64",
36709
+ "description": "The ledger value (1 = $0.000001)"
36317
36710
  },
36318
36711
  "balance_usd": {
36319
- "type": "string"
36712
+ "type": "string",
36713
+ "description": "Dollars at the ledger's precision (e.g. \"4.995\"), never fewer than two decimals"
36320
36714
  },
36321
36715
  "expiring_within_90_days": {
36322
36716
  "type": "object",
@@ -40035,6 +40429,148 @@
40035
40429
  }
40036
40430
  ]
40037
40431
  },
40432
+ "CreateToolBindingRequest": {
40433
+ "type": "object",
40434
+ "additionalProperties": false,
40435
+ "required": [
40436
+ "secret_path",
40437
+ "tool_name",
40438
+ "destination_hosts"
40439
+ ],
40440
+ "properties": {
40441
+ "secret_path": {
40442
+ "type": "string",
40443
+ "description": "Vault path of the secret the placeholder stands for"
40444
+ },
40445
+ "tool_name": {
40446
+ "type": "string",
40447
+ "description": "Tool the binding applies to (`http_request`, `run_sql`, …) or `*`"
40448
+ },
40449
+ "arg_path": {
40450
+ "type": "string",
40451
+ "description": "JSON pointer into the tool's arguments (`/headers/Authorization`, `/body/*`) or `*` (default)"
40452
+ },
40453
+ "destination_hosts": {
40454
+ "type": "array",
40455
+ "minItems": 1,
40456
+ "maxItems": 32,
40457
+ "items": {
40458
+ "type": "string"
40459
+ },
40460
+ "description": "Hosts the rehydrated call may reach (`api.stripe.com`, `*.googleapis.com`); required"
40461
+ }
40462
+ }
40463
+ },
40464
+ "SecretToolBinding": {
40465
+ "type": "object",
40466
+ "required": [
40467
+ "id",
40468
+ "org_id",
40469
+ "agent_id",
40470
+ "secret_path",
40471
+ "tool_name",
40472
+ "arg_path",
40473
+ "destination_hosts",
40474
+ "created_at"
40475
+ ],
40476
+ "properties": {
40477
+ "id": {
40478
+ "type": "string",
40479
+ "format": "uuid"
40480
+ },
40481
+ "org_id": {
40482
+ "type": "string",
40483
+ "format": "uuid"
40484
+ },
40485
+ "agent_id": {
40486
+ "type": "string",
40487
+ "format": "uuid"
40488
+ },
40489
+ "secret_path": {
40490
+ "type": "string"
40491
+ },
40492
+ "tool_name": {
40493
+ "type": "string"
40494
+ },
40495
+ "arg_path": {
40496
+ "type": "string"
40497
+ },
40498
+ "destination_hosts": {
40499
+ "type": "array",
40500
+ "items": {
40501
+ "type": "string"
40502
+ }
40503
+ },
40504
+ "created_by": {
40505
+ "type": "string",
40506
+ "format": "uuid",
40507
+ "nullable": true
40508
+ },
40509
+ "created_at": {
40510
+ "type": "string",
40511
+ "format": "date-time"
40512
+ }
40513
+ }
40514
+ },
40515
+ "X402TopupResponse": {
40516
+ "type": "object",
40517
+ "required": [
40518
+ "wallet",
40519
+ "org_id",
40520
+ "agent_id",
40521
+ "credited_micro_usd",
40522
+ "balance_micro_usd",
40523
+ "balance_usd",
40524
+ "access_token",
40525
+ "expires_in",
40526
+ "base_url",
40527
+ "provisioned"
40528
+ ],
40529
+ "properties": {
40530
+ "wallet": {
40531
+ "type": "string",
40532
+ "description": "Payer address (lower-case)"
40533
+ },
40534
+ "org_id": {
40535
+ "type": "string",
40536
+ "format": "uuid"
40537
+ },
40538
+ "agent_id": {
40539
+ "type": "string",
40540
+ "format": "uuid"
40541
+ },
40542
+ "credited_micro_usd": {
40543
+ "type": "integer",
40544
+ "format": "int64"
40545
+ },
40546
+ "balance_micro_usd": {
40547
+ "type": "integer",
40548
+ "format": "int64"
40549
+ },
40550
+ "balance_usd": {
40551
+ "type": "string"
40552
+ },
40553
+ "router_key": {
40554
+ "type": "string",
40555
+ "description": "Present only on the top-up that provisioned the account (or re-minted a lost key). Shown once."
40556
+ },
40557
+ "access_token": {
40558
+ "type": "string",
40559
+ "description": "A ≤60 s agent token for the wallet's agent (carries the `router_key` claim)"
40560
+ },
40561
+ "expires_in": {
40562
+ "type": "integer"
40563
+ },
40564
+ "base_url": {
40565
+ "type": "string",
40566
+ "description": "The Shroud gateway"
40567
+ },
40568
+ "provisioned": {
40569
+ "type": "boolean",
40570
+ "description": "True when this top-up created the account"
40571
+ }
40572
+ }
40573
+ },
40038
40574
  "EventSubscription": {
40039
40575
  "type": "object",
40040
40576
  "required": [
@@ -42543,6 +43079,139 @@
42543
43079
  },
42544
43080
  "is_active": {
42545
43081
  "type": "boolean"
43082
+ },
43083
+ "approval_id": {
43084
+ "type": "string",
43085
+ "format": "uuid",
43086
+ "description": "Control-plane approval authorising a widening change (adding a step that\nmoves funds or reaches the network, raising or removing a `budget` cap).\nRequired only when the org's consensus policy gates `automation.widen`.\n"
43087
+ },
43088
+ "version_note": {
43089
+ "type": "string",
43090
+ "description": "Note recorded on the new spec version."
43091
+ },
43092
+ "webhook_signature": {
43093
+ "nullable": true,
43094
+ "description": "Inbound signature scheme for a webhook-triggered automation. `stripe`\n(`Stripe-Signature: t=…,v1=…` over `<t>.<body>`), `github`\n(`X-Hub-Signature-256: sha256=…` over the body) or `hmac_sha256`\n(`<header>: <hex|base64>` over the body). The secret is stored encrypted\nand never returned; `null` removes the scheme. With a scheme set, an\nunsigned or mis-signed delivery starts nothing.\n",
43095
+ "type": "object",
43096
+ "properties": {
43097
+ "scheme": {
43098
+ "type": "string",
43099
+ "enum": [
43100
+ "stripe",
43101
+ "github",
43102
+ "hmac_sha256"
43103
+ ]
43104
+ },
43105
+ "secret": {
43106
+ "type": "string",
43107
+ "minLength": 8,
43108
+ "maxLength": 512
43109
+ },
43110
+ "header": {
43111
+ "type": "string",
43112
+ "description": "Header carrying the signature (defaults per scheme)."
43113
+ },
43114
+ "tolerance_secs": {
43115
+ "type": "integer",
43116
+ "default": 300,
43117
+ "description": "Timestamp tolerance for schemes that carry one (stripe)."
43118
+ }
43119
+ }
43120
+ }
43121
+ }
43122
+ },
43123
+ "AutomationVersionResponse": {
43124
+ "type": "object",
43125
+ "required": [
43126
+ "version",
43127
+ "spec_hash",
43128
+ "workflow_spec",
43129
+ "created_by_type",
43130
+ "created_at",
43131
+ "current"
43132
+ ],
43133
+ "properties": {
43134
+ "version": {
43135
+ "type": "integer"
43136
+ },
43137
+ "spec_hash": {
43138
+ "type": "string",
43139
+ "description": "SHA-256 of the canonical (sorted-key) JSON of the spec."
43140
+ },
43141
+ "workflow_spec": {
43142
+ "oneOf": [
43143
+ {
43144
+ "type": "array",
43145
+ "items": {
43146
+ "type": "object",
43147
+ "additionalProperties": true
43148
+ }
43149
+ },
43150
+ {
43151
+ "type": "object",
43152
+ "additionalProperties": true
43153
+ }
43154
+ ]
43155
+ },
43156
+ "created_by_type": {
43157
+ "type": "string"
43158
+ },
43159
+ "note": {
43160
+ "type": "string",
43161
+ "nullable": true
43162
+ },
43163
+ "created_at": {
43164
+ "type": "string",
43165
+ "format": "date-time"
43166
+ },
43167
+ "current": {
43168
+ "type": "boolean"
43169
+ }
43170
+ }
43171
+ },
43172
+ "AutomationVersionListResponse": {
43173
+ "type": "object",
43174
+ "required": [
43175
+ "current_version",
43176
+ "versions"
43177
+ ],
43178
+ "properties": {
43179
+ "current_version": {
43180
+ "type": "integer"
43181
+ },
43182
+ "versions": {
43183
+ "type": "array",
43184
+ "items": {
43185
+ "$ref": "#/components/schemas/AutomationVersionResponse"
43186
+ }
43187
+ }
43188
+ }
43189
+ },
43190
+ "RollbackAutomationRequest": {
43191
+ "type": "object",
43192
+ "properties": {
43193
+ "note": {
43194
+ "type": "string"
43195
+ },
43196
+ "approval_id": {
43197
+ "type": "string",
43198
+ "format": "uuid",
43199
+ "description": "Control-plane approval when rolling back to a wider spec."
43200
+ }
43201
+ }
43202
+ },
43203
+ "TriggerAutomationRequest": {
43204
+ "type": "object",
43205
+ "properties": {
43206
+ "input": {
43207
+ "type": "object",
43208
+ "additionalProperties": true,
43209
+ "description": "Exposed to steps as `{{trigger.*}}`."
43210
+ },
43211
+ "idempotency_key": {
43212
+ "type": "string",
43213
+ "maxLength": 128,
43214
+ "description": "Same key twice for one automation returns the existing run (200) instead\nof starting a second (201). `Idempotency-Key` header is equivalent.\n"
42546
43215
  }
42547
43216
  }
42548
43217
  },
@@ -42655,6 +43324,15 @@
42655
43324
  "updated_at": {
42656
43325
  "type": "string",
42657
43326
  "format": "date-time"
43327
+ },
43328
+ "spec_version": {
43329
+ "type": "integer",
43330
+ "description": "Current `automation_versions` version."
43331
+ },
43332
+ "webhook_signature_scheme": {
43333
+ "type": "string",
43334
+ "nullable": true,
43335
+ "description": "Inbound signature scheme name, never the secret."
42658
43336
  }
42659
43337
  }
42660
43338
  },
@@ -42787,12 +43465,58 @@
42787
43465
  "enum": [
42788
43466
  "running",
42789
43467
  "success",
43468
+ "completed_with_skips",
42790
43469
  "failed",
42791
43470
  "timed_out",
42792
43471
  "cancelled",
42793
- "awaiting_approval"
43472
+ "awaiting_approval",
43473
+ "waiting",
43474
+ "awaiting_callback"
43475
+ ],
43476
+ "description": "`awaiting_approval`, `waiting` (a `wait_until` park) and `awaiting_callback`\nare parked states: the run's clock is stopped and it continues when the\napproval is decided, the wake time passes, or the callback URL is posted to.\n"
43477
+ },
43478
+ "paused_reason": {
43479
+ "type": "string",
43480
+ "nullable": true,
43481
+ "enum": [
43482
+ "approval",
43483
+ "wait_until",
43484
+ "callback"
42794
43485
  ]
42795
43486
  },
43487
+ "paused_at_step": {
43488
+ "type": "integer",
43489
+ "nullable": true
43490
+ },
43491
+ "paused_approval_id": {
43492
+ "type": "string",
43493
+ "format": "uuid",
43494
+ "nullable": true
43495
+ },
43496
+ "paused_until": {
43497
+ "type": "string",
43498
+ "format": "date-time",
43499
+ "nullable": true
43500
+ },
43501
+ "paused_expires_at": {
43502
+ "type": "string",
43503
+ "format": "date-time",
43504
+ "nullable": true
43505
+ },
43506
+ "spec_version": {
43507
+ "type": "integer",
43508
+ "nullable": true
43509
+ },
43510
+ "idempotency_key": {
43511
+ "type": "string",
43512
+ "nullable": true
43513
+ },
43514
+ "parent_run_id": {
43515
+ "type": "string",
43516
+ "format": "uuid",
43517
+ "nullable": true,
43518
+ "description": "Set when a `call_automation` step started this run."
43519
+ },
42796
43520
  "step_results": {
42797
43521
  "nullable": true
42798
43522
  },