@talonic/docs 0.21.35 → 0.21.37

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 CHANGED
@@ -1134,6 +1134,119 @@
1134
1134
  }
1135
1135
  }
1136
1136
  },
1137
+ "/v1/documents/{id}/file": {
1138
+ "get": {
1139
+ "operationId": "getDocumentFile",
1140
+ "summary": "Stream the document's original file",
1141
+ "description": "Streams the document's original uploaded bytes (e.g. the source PDF or\nimage) so a caller can show it alongside extracted data or a review\ndecision — for example a client-side pdf.js viewer. The platform keeps\nno separate page-image/raster store, so a caller that wants to render\na specific page renders this response itself.\n\nSupports HTTP byte-range requests (`Range: bytes=...`) so a viewer can\nfetch only the pages it needs instead of the whole file; a `206`\nresponse carries `Content-Range` and omits nothing else. Returns 404\nif the document does not exist, is not visible to the API key's\ncreator (Sources IAM), or has no recoverable original file (e.g. a\nlegacy document whose source was never retained — use\n`GET /v1/documents/{id}/markdown` instead in that case).\n\nA linked duplicate (an exact re-submission of an already-ingested\nfile) streams the CANONICAL document's bytes while keeping this id's\nown filename in `Content-Disposition`.\n",
1142
+ "tags": [
1143
+ "Documents"
1144
+ ],
1145
+ "parameters": [
1146
+ {
1147
+ "$ref": "#/components/parameters/ResourceId"
1148
+ },
1149
+ {
1150
+ "name": "Range",
1151
+ "in": "header",
1152
+ "required": false,
1153
+ "schema": {
1154
+ "type": "string"
1155
+ },
1156
+ "example": "bytes=0-1048575",
1157
+ "description": "Standard HTTP byte-range request (RFC 7233). Honored end-to-end; an unsatisfiable or multi-range request currently degrades to a full `200` response rather than a `416`."
1158
+ }
1159
+ ],
1160
+ "responses": {
1161
+ "200": {
1162
+ "description": "The full file. `Accept-Ranges: bytes` is always present so a client can switch to ranged requests.",
1163
+ "headers": {
1164
+ "Content-Type": {
1165
+ "schema": {
1166
+ "type": "string"
1167
+ },
1168
+ "description": "The document's stored MIME type, or `application/octet-stream` when unknown."
1169
+ },
1170
+ "Content-Disposition": {
1171
+ "schema": {
1172
+ "type": "string"
1173
+ },
1174
+ "description": "`inline; filename=\"...\"; filename*=UTF-8''...` (RFC 5987) — the document's own filename, sanitized."
1175
+ },
1176
+ "Content-Length": {
1177
+ "schema": {
1178
+ "type": "integer"
1179
+ },
1180
+ "description": "Present only when the byte count is known and positive."
1181
+ },
1182
+ "Accept-Ranges": {
1183
+ "schema": {
1184
+ "type": "string",
1185
+ "example": "bytes"
1186
+ }
1187
+ }
1188
+ },
1189
+ "content": {
1190
+ "application/octet-stream": {
1191
+ "schema": {
1192
+ "type": "string",
1193
+ "format": "binary"
1194
+ }
1195
+ },
1196
+ "application/pdf": {
1197
+ "schema": {
1198
+ "type": "string",
1199
+ "format": "binary"
1200
+ }
1201
+ }
1202
+ }
1203
+ },
1204
+ "206": {
1205
+ "description": "Partial content for a satisfied `Range` request.",
1206
+ "headers": {
1207
+ "Content-Range": {
1208
+ "schema": {
1209
+ "type": "string"
1210
+ },
1211
+ "example": "bytes 0-1048575/5242880"
1212
+ },
1213
+ "Content-Type": {
1214
+ "schema": {
1215
+ "type": "string"
1216
+ }
1217
+ }
1218
+ },
1219
+ "content": {
1220
+ "application/octet-stream": {
1221
+ "schema": {
1222
+ "type": "string",
1223
+ "format": "binary"
1224
+ }
1225
+ }
1226
+ }
1227
+ },
1228
+ "401": {
1229
+ "$ref": "#/components/responses/Unauthorized"
1230
+ },
1231
+ "404": {
1232
+ "$ref": "#/components/responses/NotFound"
1233
+ },
1234
+ "416": {
1235
+ "description": "The `Range` value is syntactically invalid or entirely outside the\nfile (documented for RFC 7233 completeness — the current\nimplementation degrades this case to a full `200` instead of\nreturning `416`; treat both as \"the server did not honor the\nrequested range\").\n",
1236
+ "content": {
1237
+ "application/json": {
1238
+ "schema": {
1239
+ "$ref": "#/components/schemas/ErrorResponse"
1240
+ }
1241
+ }
1242
+ }
1243
+ },
1244
+ "429": {
1245
+ "$ref": "#/components/responses/RateLimitExceeded"
1246
+ }
1247
+ }
1248
+ }
1249
+ },
1137
1250
  "/v1/documents/{id}/span-geometry": {
1138
1251
  "get": {
1139
1252
  "operationId": "getDocumentSpanGeometry",
@@ -1800,7 +1913,7 @@
1800
1913
  "patch": {
1801
1914
  "operationId": "updateExtractionData",
1802
1915
  "summary": "Correct extraction data",
1803
- "description": "Submit field-level corrections. Each key in the body is a field name; the value\nis the corrected value. Corrected fields are locked at confidence 1.0.\n",
1916
+ "description": "Submit field-level corrections. Each key in the body is a field name; the value\nis the corrected value. Corrected fields are locked at confidence 1.0.\n\nCorrections are written to the **value plane** as new cell versions\n(`source: api_correction`) and mirrored into the extraction data. They pass the\ncentral cell-write authority guard first: a field whose current value was\npromoted by review, or is held for approval, is **withheld** and reported in\n`cells_skipped` instead of being overwritten. A document that has no\ncapture-layer record yet answers `value_plane: \"not_migrated\"` and is corrected\nin the extraction data only.\n",
1804
1917
  "tags": [
1805
1918
  "Extractions"
1806
1919
  ],
@@ -1831,7 +1944,7 @@
1831
1944
  "content": {
1832
1945
  "application/json": {
1833
1946
  "schema": {
1834
- "$ref": "#/components/schemas/ExtractionResponse"
1947
+ "$ref": "#/components/schemas/ExtractionCorrectionResponse"
1835
1948
  },
1836
1949
  "example": {
1837
1950
  "id": "d1a2b3c4-5678-9abc-def0-1234567890ab",
@@ -1859,6 +1972,12 @@
1859
1972
  "vendor_name",
1860
1973
  "total_amount"
1861
1974
  ],
1975
+ "value_plane": "written",
1976
+ "cells_written": [
1977
+ "vendor_name",
1978
+ "total_amount"
1979
+ ],
1980
+ "cells_skipped": [],
1862
1981
  "processing": {
1863
1982
  "duration_ms": 3420,
1864
1983
  "pages_processed": 3,
@@ -1875,6 +1994,9 @@
1875
1994
  }
1876
1995
  }
1877
1996
  },
1997
+ "400": {
1998
+ "$ref": "#/components/responses/BadRequest"
1999
+ },
1878
2000
  "401": {
1879
2001
  "$ref": "#/components/responses/Unauthorized"
1880
2002
  },
@@ -3978,6 +4100,7 @@
3978
4100
  "delete": {
3979
4101
  "operationId": "deleteDeliveryDestination",
3980
4102
  "summary": "Delete a delivery destination",
4103
+ "description": "Deletes the destination and ORPHANS the bindings routed to it: each\nis deactivated, stamped `last_status: destination_deleted`, and keeps\nevery other setting with `destination_id: null`. Re-point such a\nbinding with `PUT /v1/delivery/bindings/{id}` (`destination_id` is\nrequired on that update) and set `is_active: true` to resume. The\ndestination's delivery history is deleted with it.\n",
3981
4104
  "tags": [
3982
4105
  "Delivery"
3983
4106
  ],
@@ -3988,7 +4111,7 @@
3988
4111
  ],
3989
4112
  "responses": {
3990
4113
  "200": {
3991
- "description": "Destination deleted.",
4114
+ "description": "Destination deleted; its bindings remain, orphaned.",
3992
4115
  "content": {
3993
4116
  "application/json": {
3994
4117
  "schema": {
@@ -4471,7 +4594,7 @@
4471
4594
  "write"
4472
4595
  ],
4473
4596
  "summary": "Bulk-clear the delivery log",
4474
- "description": "Deletes every delivery attempt record for the tenant matching the\noptional `binding_id` / `destination_id` / `status` filters, the\nsame filters as the list route (no filters clears the whole log).\nThis is a deliberate admin cleanup: dead-letter rows referencing a\ndeleted item are de-linked, not removed. Requires an\norganization-scoped API key.\n",
4597
+ "description": "Deletes every delivery attempt record for the tenant matching the\noptional `binding_id` / `destination_id` / `status` filters, the\nsame filters as the list route (no filters clears the whole log).\nThis is a deliberate admin cleanup: dead-letter rows referencing a\ndeleted item are de-linked, not removed. Requires an\norganization-scoped API key.\n\nRows are removed in bounded batches for a fixed time budget per\nrequest; a large log answers `remaining: true` with the count removed\nso far, and the caller repeats the same request until it answers\n`remaining: false`.\n",
4475
4598
  "tags": [
4476
4599
  "Delivery"
4477
4600
  ],
@@ -4507,7 +4630,7 @@
4507
4630
  ],
4508
4631
  "responses": {
4509
4632
  "200": {
4510
- "description": "Rows removed.",
4633
+ "description": "Rows removed in this request.",
4511
4634
  "content": {
4512
4635
  "application/json": {
4513
4636
  "schema": {
@@ -4515,6 +4638,10 @@
4515
4638
  "properties": {
4516
4639
  "deleted": {
4517
4640
  "type": "integer"
4641
+ },
4642
+ "remaining": {
4643
+ "type": "boolean",
4644
+ "description": "True when the time budget ended before the matching set was exhausted; call again."
4518
4645
  }
4519
4646
  }
4520
4647
  }
@@ -10745,7 +10872,7 @@
10745
10872
  },
10746
10873
  "scopes": {
10747
10874
  "type": "array",
10748
- "description": "Subset of: extract, read, write, operations, billing, delivery, usage. Defaults to extract/read/write/operations. `usage` (grants access to the cost-visibility routes `GET /v1/usage/pipelines/:id` and `GET /v1/usage/runs/:id`) is scope-attenuated: requesting it is rejected with `403` (`scope_not_grantable`) unless the calling key itself already carries `usage` — a key can only ever narrow its own privilege on a newly minted key, never widen it. De-novo `usage` grants happen only through owner+ key management, never through self-serve key creation.",
10875
+ "description": "Subset of: extract, read, write, operations, billing, delivery, usage, records_write. Defaults to extract/read/write/operations. `usage` (the cost-visibility routes `GET /v1/usage/pipelines/:id` and `GET /v1/usage/runs/:id`) and `records_write` (record-set writes) are scope-attenuated: requesting one is rejected with `403` (`scope_not_grantable`) unless the calling key itself already carries it — a key can only ever narrow its own privilege on a newly minted key, never widen it. De-novo grants of either happen only through owner+ key management, never through self-serve key creation.",
10749
10876
  "items": {
10750
10877
  "type": "string",
10751
10878
  "enum": [
@@ -10755,7 +10882,8 @@
10755
10882
  "operations",
10756
10883
  "billing",
10757
10884
  "delivery",
10758
- "usage"
10885
+ "usage",
10886
+ "records_write"
10759
10887
  ]
10760
10888
  }
10761
10889
  }
@@ -21751,7 +21879,7 @@
21751
21879
  "Events"
21752
21880
  ],
21753
21881
  "summary": "List tenant events",
21754
- "description": "Newest-first feed of platform events (document.extracted, run.*.completed/failed, result.flagged/approved/rejected, delivery.item.*, case.resolved, and the Field Registry lifecycle family field.graduated / field.promoted / field.demoted / field.merged / field.renamed — every payload names the concept by stable `field_id`, so a consumer caching /v1/fields can invalidate instead of polling). Alias of /v1/delivery/events at the API root.\n",
21882
+ "description": "Newest-first feed of platform events (document.extracted, run.*.completed/failed, result.flagged/approved/rejected, delivery.item.*, case.resolved, and the Field Registry lifecycle family field.graduated / field.promoted / field.demoted / field.merged / field.renamed — every payload names the concept by stable `field_id`, so a consumer caching /v1/fields can invalidate instead of polling). Also carries the external-work family: app.decision_task.offered and agent_task.offered (each written in the same transaction as the task row it announces, so the task is always loadable when the event is visible) and app.run.sealed (a sealed App run, with record_set_id / subjects when the sealed record names them). The exhaustive list is /v1/delivery/catalog/signals. Alias of /v1/delivery/events at the API root.\n",
21755
21883
  "operationId": "listEvents",
21756
21884
  "security": [
21757
21885
  {
@@ -22588,7 +22716,7 @@
22588
22716
  "Extractions"
22589
22717
  ],
22590
22718
  "summary": "Correct extracted field values",
22591
- "description": "Overrides field values on an extraction (each set to confidence 1.0 and locked). Body is a flat map of field name to corrected value. Requires write scope.\n",
22719
+ "description": "Alias of `PATCH /v1/extractions/{id}/data`, with identical semantics. Overrides field values on an extraction (each set to confidence 1.0 and locked) by writing new value-plane cell versions under the cell-write authority guard; fields the guard withholds come back in `cells_skipped` and are left unchanged. Body is a flat map of field name to corrected value. Requires write scope.\n",
22592
22720
  "operationId": "correctExtraction",
22593
22721
  "security": [
22594
22722
  {
@@ -22620,7 +22748,17 @@
22620
22748
  },
22621
22749
  "responses": {
22622
22750
  "200": {
22623
- "description": "Updated extraction"
22751
+ "description": "Updated extraction, with the value-plane correction outcome.",
22752
+ "content": {
22753
+ "application/json": {
22754
+ "schema": {
22755
+ "$ref": "#/components/schemas/ExtractionCorrectionResponse"
22756
+ }
22757
+ }
22758
+ }
22759
+ },
22760
+ "400": {
22761
+ "description": "Body is not a JSON object"
22624
22762
  },
22625
22763
  "404": {
22626
22764
  "description": "Not found"
@@ -23996,6 +24134,465 @@
23996
24134
  }
23997
24135
  }
23998
24136
  },
24137
+ "/v1/apps/{id}/decision-tasks": {
24138
+ "get": {
24139
+ "operationId": "listDecisionTasks",
24140
+ "summary": "List an External app's decision tasks",
24141
+ "description": "The polling alternative to the `app.decision_task.offered` webhook. Requires a `decide` grant on the app; machine callers only.\n",
24142
+ "tags": [
24143
+ "Apps"
24144
+ ],
24145
+ "parameters": [
24146
+ {
24147
+ "name": "id",
24148
+ "in": "path",
24149
+ "required": true,
24150
+ "schema": {
24151
+ "type": "string",
24152
+ "format": "uuid"
24153
+ }
24154
+ },
24155
+ {
24156
+ "name": "status",
24157
+ "in": "query",
24158
+ "schema": {
24159
+ "type": "string",
24160
+ "enum": [
24161
+ "available",
24162
+ "claimed",
24163
+ "submitted",
24164
+ "released",
24165
+ "failed",
24166
+ "timed_out",
24167
+ "cancelled"
24168
+ ]
24169
+ }
24170
+ },
24171
+ {
24172
+ "name": "limit",
24173
+ "in": "query",
24174
+ "schema": {
24175
+ "type": "integer",
24176
+ "minimum": 1,
24177
+ "maximum": 100,
24178
+ "default": 50
24179
+ }
24180
+ },
24181
+ {
24182
+ "name": "cursor",
24183
+ "in": "query",
24184
+ "schema": {
24185
+ "type": "string"
24186
+ }
24187
+ }
24188
+ ],
24189
+ "responses": {
24190
+ "200": {
24191
+ "description": "Cursor-paginated decision-task metadata. The frozen input package is never inlined.",
24192
+ "content": {
24193
+ "application/json": {
24194
+ "schema": {
24195
+ "type": "object",
24196
+ "properties": {
24197
+ "data": {
24198
+ "type": "array",
24199
+ "items": {
24200
+ "$ref": "#/components/schemas/DecisionTaskMetadata"
24201
+ }
24202
+ },
24203
+ "pagination": {
24204
+ "$ref": "#/components/schemas/CursorPagination"
24205
+ }
24206
+ }
24207
+ }
24208
+ }
24209
+ }
24210
+ },
24211
+ "400": {
24212
+ "$ref": "#/components/responses/BadRequest"
24213
+ },
24214
+ "401": {
24215
+ "$ref": "#/components/responses/Unauthorized"
24216
+ },
24217
+ "403": {
24218
+ "$ref": "#/components/responses/Forbidden"
24219
+ },
24220
+ "429": {
24221
+ "$ref": "#/components/responses/RateLimitExceeded"
24222
+ }
24223
+ }
24224
+ }
24225
+ },
24226
+ "/v1/decision-tasks/{id}/claim": {
24227
+ "post": {
24228
+ "operationId": "claimDecisionTask",
24229
+ "summary": "Claim an External-mode decision task",
24230
+ "description": "Takes the exclusive lease, bumps `execution_epoch`, and returns the decision bundle: task metadata, the output contract, the run's precedent block, and a package DESCRIPTOR. The package itself is read in pages through `GET /v1/decision-tasks/{id}/package`.\n",
24231
+ "tags": [
24232
+ "Apps"
24233
+ ],
24234
+ "parameters": [
24235
+ {
24236
+ "name": "id",
24237
+ "in": "path",
24238
+ "required": true,
24239
+ "schema": {
24240
+ "type": "string",
24241
+ "format": "uuid"
24242
+ }
24243
+ }
24244
+ ],
24245
+ "responses": {
24246
+ "200": {
24247
+ "description": "The decision bundle for the claimed task.",
24248
+ "content": {
24249
+ "application/json": {
24250
+ "schema": {
24251
+ "$ref": "#/components/schemas/DecisionTaskBundle"
24252
+ }
24253
+ }
24254
+ }
24255
+ },
24256
+ "401": {
24257
+ "$ref": "#/components/responses/Unauthorized"
24258
+ },
24259
+ "403": {
24260
+ "$ref": "#/components/responses/Forbidden"
24261
+ },
24262
+ "404": {
24263
+ "$ref": "#/components/responses/NotFound"
24264
+ },
24265
+ "409": {
24266
+ "$ref": "#/components/responses/Conflict"
24267
+ },
24268
+ "429": {
24269
+ "$ref": "#/components/responses/RateLimitExceeded"
24270
+ }
24271
+ }
24272
+ }
24273
+ },
24274
+ "/v1/decision-tasks/{id}/package": {
24275
+ "get": {
24276
+ "operationId": "readDecisionTaskPackage",
24277
+ "summary": "Read a page of the run's frozen input package",
24278
+ "description": "Serves the persisted package exactly as assembled, in cursor pages. Readable by the client holding the claim only; every page is journaled onto the run as `package_read`.\n",
24279
+ "tags": [
24280
+ "Apps"
24281
+ ],
24282
+ "parameters": [
24283
+ {
24284
+ "name": "id",
24285
+ "in": "path",
24286
+ "required": true,
24287
+ "schema": {
24288
+ "type": "string",
24289
+ "format": "uuid"
24290
+ }
24291
+ },
24292
+ {
24293
+ "name": "cursor",
24294
+ "in": "query",
24295
+ "description": "Opaque cursor from a previous page; omit for the first page.",
24296
+ "schema": {
24297
+ "type": "string"
24298
+ }
24299
+ },
24300
+ {
24301
+ "name": "limit",
24302
+ "in": "query",
24303
+ "description": "Page size; defaults to apps.package_page_size, capped at apps.package_page_size_max.",
24304
+ "schema": {
24305
+ "type": "integer",
24306
+ "minimum": 1,
24307
+ "maximum": 2000
24308
+ }
24309
+ }
24310
+ ],
24311
+ "responses": {
24312
+ "200": {
24313
+ "description": "One page of package records, in the package's frozen order.",
24314
+ "content": {
24315
+ "application/json": {
24316
+ "schema": {
24317
+ "$ref": "#/components/schemas/DecisionTaskPackagePage"
24318
+ }
24319
+ }
24320
+ }
24321
+ },
24322
+ "400": {
24323
+ "$ref": "#/components/responses/BadRequest"
24324
+ },
24325
+ "401": {
24326
+ "$ref": "#/components/responses/Unauthorized"
24327
+ },
24328
+ "403": {
24329
+ "$ref": "#/components/responses/Forbidden"
24330
+ },
24331
+ "404": {
24332
+ "$ref": "#/components/responses/NotFound"
24333
+ },
24334
+ "409": {
24335
+ "$ref": "#/components/responses/Conflict"
24336
+ },
24337
+ "429": {
24338
+ "$ref": "#/components/responses/RateLimitExceeded"
24339
+ }
24340
+ }
24341
+ }
24342
+ },
24343
+ "/v1/decision-tasks/{id}/heartbeat": {
24344
+ "post": {
24345
+ "operationId": "heartbeatDecisionTask",
24346
+ "summary": "Extend the decision-task lease",
24347
+ "description": "The lease never extends past the task's SLA deadline. A stale epoch is a 409 and journals nothing.",
24348
+ "tags": [
24349
+ "Apps"
24350
+ ],
24351
+ "parameters": [
24352
+ {
24353
+ "name": "id",
24354
+ "in": "path",
24355
+ "required": true,
24356
+ "schema": {
24357
+ "type": "string",
24358
+ "format": "uuid"
24359
+ }
24360
+ }
24361
+ ],
24362
+ "requestBody": {
24363
+ "required": true,
24364
+ "content": {
24365
+ "application/json": {
24366
+ "schema": {
24367
+ "$ref": "#/components/schemas/DecisionTaskEpoch"
24368
+ }
24369
+ }
24370
+ }
24371
+ },
24372
+ "responses": {
24373
+ "200": {
24374
+ "description": "Updated task metadata.",
24375
+ "content": {
24376
+ "application/json": {
24377
+ "schema": {
24378
+ "$ref": "#/components/schemas/DecisionTaskMetadata"
24379
+ }
24380
+ }
24381
+ }
24382
+ },
24383
+ "400": {
24384
+ "$ref": "#/components/responses/BadRequest"
24385
+ },
24386
+ "401": {
24387
+ "$ref": "#/components/responses/Unauthorized"
24388
+ },
24389
+ "403": {
24390
+ "$ref": "#/components/responses/Forbidden"
24391
+ },
24392
+ "404": {
24393
+ "$ref": "#/components/responses/NotFound"
24394
+ },
24395
+ "409": {
24396
+ "$ref": "#/components/responses/Conflict"
24397
+ },
24398
+ "429": {
24399
+ "$ref": "#/components/responses/RateLimitExceeded"
24400
+ }
24401
+ }
24402
+ }
24403
+ },
24404
+ "/v1/decision-tasks/{id}/submit": {
24405
+ "post": {
24406
+ "operationId": "submitDecisionTask",
24407
+ "summary": "Submit the decision and resume the run",
24408
+ "description": "`outcome` is validated against the task's output contract, every evidence locator must exist in the frozen input package, and a decision rationale is mandatory. Rejections journal a `rejected` event. Submit is idempotent per claimant + epoch.\n",
24409
+ "tags": [
24410
+ "Apps"
24411
+ ],
24412
+ "parameters": [
24413
+ {
24414
+ "name": "id",
24415
+ "in": "path",
24416
+ "required": true,
24417
+ "schema": {
24418
+ "type": "string",
24419
+ "format": "uuid"
24420
+ }
24421
+ }
24422
+ ],
24423
+ "requestBody": {
24424
+ "required": true,
24425
+ "content": {
24426
+ "application/json": {
24427
+ "schema": {
24428
+ "$ref": "#/components/schemas/DecisionTaskSubmit"
24429
+ }
24430
+ }
24431
+ }
24432
+ },
24433
+ "responses": {
24434
+ "200": {
24435
+ "description": "Submitted task metadata.",
24436
+ "content": {
24437
+ "application/json": {
24438
+ "schema": {
24439
+ "$ref": "#/components/schemas/DecisionTaskMetadata"
24440
+ }
24441
+ }
24442
+ }
24443
+ },
24444
+ "400": {
24445
+ "$ref": "#/components/responses/BadRequest"
24446
+ },
24447
+ "401": {
24448
+ "$ref": "#/components/responses/Unauthorized"
24449
+ },
24450
+ "403": {
24451
+ "$ref": "#/components/responses/Forbidden"
24452
+ },
24453
+ "404": {
24454
+ "$ref": "#/components/responses/NotFound"
24455
+ },
24456
+ "409": {
24457
+ "$ref": "#/components/responses/Conflict"
24458
+ },
24459
+ "413": {
24460
+ "$ref": "#/components/responses/PayloadTooLarge"
24461
+ },
24462
+ "422": {
24463
+ "$ref": "#/components/responses/ValidationError"
24464
+ },
24465
+ "429": {
24466
+ "$ref": "#/components/responses/RateLimitExceeded"
24467
+ }
24468
+ }
24469
+ }
24470
+ },
24471
+ "/v1/decision-tasks/{id}/release": {
24472
+ "post": {
24473
+ "operationId": "releaseDecisionTask",
24474
+ "summary": "Give a claimed decision task back",
24475
+ "description": "The task returns to `available`; the next claim bumps the epoch.",
24476
+ "tags": [
24477
+ "Apps"
24478
+ ],
24479
+ "parameters": [
24480
+ {
24481
+ "name": "id",
24482
+ "in": "path",
24483
+ "required": true,
24484
+ "schema": {
24485
+ "type": "string",
24486
+ "format": "uuid"
24487
+ }
24488
+ }
24489
+ ],
24490
+ "requestBody": {
24491
+ "required": true,
24492
+ "content": {
24493
+ "application/json": {
24494
+ "schema": {
24495
+ "$ref": "#/components/schemas/DecisionTaskEpoch"
24496
+ }
24497
+ }
24498
+ }
24499
+ },
24500
+ "responses": {
24501
+ "200": {
24502
+ "description": "Released task metadata.",
24503
+ "content": {
24504
+ "application/json": {
24505
+ "schema": {
24506
+ "$ref": "#/components/schemas/DecisionTaskMetadata"
24507
+ }
24508
+ }
24509
+ }
24510
+ },
24511
+ "400": {
24512
+ "$ref": "#/components/responses/BadRequest"
24513
+ },
24514
+ "401": {
24515
+ "$ref": "#/components/responses/Unauthorized"
24516
+ },
24517
+ "403": {
24518
+ "$ref": "#/components/responses/Forbidden"
24519
+ },
24520
+ "404": {
24521
+ "$ref": "#/components/responses/NotFound"
24522
+ },
24523
+ "409": {
24524
+ "$ref": "#/components/responses/Conflict"
24525
+ },
24526
+ "429": {
24527
+ "$ref": "#/components/responses/RateLimitExceeded"
24528
+ }
24529
+ }
24530
+ }
24531
+ },
24532
+ "/v1/decision-tasks/{id}/fail": {
24533
+ "post": {
24534
+ "operationId": "failDecisionTask",
24535
+ "summary": "Report that the agent cannot decide",
24536
+ "description": "Terminates the task, raises a Human Review carrying the stated reason, and applies the app's declared fallback policy (`rules`, `hold`, or `none`) exactly as an SLA expiry does. Permitted after the lease has lapsed: reporting failure must always stay possible.\n",
24537
+ "tags": [
24538
+ "Apps"
24539
+ ],
24540
+ "parameters": [
24541
+ {
24542
+ "name": "id",
24543
+ "in": "path",
24544
+ "required": true,
24545
+ "schema": {
24546
+ "type": "string",
24547
+ "format": "uuid"
24548
+ }
24549
+ }
24550
+ ],
24551
+ "requestBody": {
24552
+ "required": true,
24553
+ "content": {
24554
+ "application/json": {
24555
+ "schema": {
24556
+ "$ref": "#/components/schemas/DecisionTaskFail"
24557
+ }
24558
+ }
24559
+ }
24560
+ },
24561
+ "responses": {
24562
+ "200": {
24563
+ "description": "Failed task metadata.",
24564
+ "content": {
24565
+ "application/json": {
24566
+ "schema": {
24567
+ "$ref": "#/components/schemas/DecisionTaskMetadata"
24568
+ }
24569
+ }
24570
+ }
24571
+ },
24572
+ "400": {
24573
+ "$ref": "#/components/responses/BadRequest"
24574
+ },
24575
+ "401": {
24576
+ "$ref": "#/components/responses/Unauthorized"
24577
+ },
24578
+ "403": {
24579
+ "$ref": "#/components/responses/Forbidden"
24580
+ },
24581
+ "404": {
24582
+ "$ref": "#/components/responses/NotFound"
24583
+ },
24584
+ "409": {
24585
+ "$ref": "#/components/responses/Conflict"
24586
+ },
24587
+ "422": {
24588
+ "$ref": "#/components/responses/ValidationError"
24589
+ },
24590
+ "429": {
24591
+ "$ref": "#/components/responses/RateLimitExceeded"
24592
+ }
24593
+ }
24594
+ }
24595
+ },
23999
24596
  "/v1/apps": {
24000
24597
  "get": {
24001
24598
  "operationId": "listApps",
@@ -24309,6 +24906,96 @@
24309
24906
  }
24310
24907
  }
24311
24908
  },
24909
+ "/v1/apps/import": {
24910
+ "post": {
24911
+ "operationId": "importApp",
24912
+ "summary": "Import a previously exported app manifest as a new app (spec B3.2 Portability)",
24913
+ "description": "Creates the app then saves `content` as its draft, through the same create+saveDraft path as POST /v1/apps/{id}/duplicate. `mode` defaults from `content.mode` when the body omits it. Counterpart to GET /v1/apps/{id}/export.",
24914
+ "tags": [
24915
+ "Apps"
24916
+ ],
24917
+ "requestBody": {
24918
+ "required": true,
24919
+ "content": {
24920
+ "application/json": {
24921
+ "schema": {
24922
+ "type": "object",
24923
+ "required": [
24924
+ "slug",
24925
+ "display_name",
24926
+ "content",
24927
+ "export_version"
24928
+ ],
24929
+ "properties": {
24930
+ "slug": {
24931
+ "type": "string",
24932
+ "pattern": "^[a-z0-9][a-z0-9-]{1,62}[a-z0-9]$"
24933
+ },
24934
+ "display_name": {
24935
+ "type": "string",
24936
+ "maxLength": 200
24937
+ },
24938
+ "mode": {
24939
+ "type": "string",
24940
+ "enum": [
24941
+ "rules",
24942
+ "assisted",
24943
+ "external"
24944
+ ]
24945
+ },
24946
+ "content": {
24947
+ "type": "object"
24948
+ },
24949
+ "export_version": {
24950
+ "type": "integer",
24951
+ "enum": [
24952
+ 1
24953
+ ]
24954
+ }
24955
+ }
24956
+ }
24957
+ }
24958
+ }
24959
+ },
24960
+ "responses": {
24961
+ "201": {
24962
+ "description": "The created app's manifest plus the saved draft version.",
24963
+ "content": {
24964
+ "application/json": {
24965
+ "schema": {
24966
+ "type": "object",
24967
+ "properties": {
24968
+ "app": {
24969
+ "$ref": "#/components/schemas/AppManifest"
24970
+ },
24971
+ "draft": {
24972
+ "type": "object",
24973
+ "properties": {
24974
+ "version": {
24975
+ "type": "integer"
24976
+ },
24977
+ "status": {
24978
+ "type": "string"
24979
+ },
24980
+ "content_hash": {
24981
+ "type": "string"
24982
+ }
24983
+ }
24984
+ }
24985
+ }
24986
+ }
24987
+ }
24988
+ }
24989
+ },
24990
+ "409": {
24991
+ "$ref": "#/components/responses/Conflict"
24992
+ },
24993
+ "422": {
24994
+ "$ref": "#/components/responses/ValidationError"
24995
+ }
24996
+ }
24997
+ }
24998
+ },
24312
24999
  "/v1/apps/{id}/logic/compile": {
24313
25000
  "post": {
24314
25001
  "operationId": "compileAppRules",
@@ -24993,19 +25680,241 @@
24993
25680
  ],
24994
25681
  "responses": {
24995
25682
  "200": {
24996
- "description": "The version row."
25683
+ "description": "The version row."
25684
+ },
25685
+ "404": {
25686
+ "$ref": "#/components/responses/NotFound"
25687
+ }
25688
+ }
25689
+ }
25690
+ },
25691
+ "/v1/apps/{id}/export": {
25692
+ "get": {
25693
+ "operationId": "exportApp",
25694
+ "summary": "Environment-free manifest of the app's active version (spec B3.2 Portability)",
25695
+ "description": "slug/display_name/mode plus the published content unmodified — no grants, keys, install state, or `endpoints`. Counterpart to POST /v1/apps/import.",
25696
+ "tags": [
25697
+ "Apps"
25698
+ ],
25699
+ "parameters": [
25700
+ {
25701
+ "name": "id",
25702
+ "in": "path",
25703
+ "required": true,
25704
+ "schema": {
25705
+ "type": "string",
25706
+ "format": "uuid"
25707
+ }
25708
+ }
25709
+ ],
25710
+ "responses": {
25711
+ "200": {
25712
+ "description": "The environment-free manifest.",
25713
+ "content": {
25714
+ "application/json": {
25715
+ "schema": {
25716
+ "type": "object",
25717
+ "properties": {
25718
+ "export_version": {
25719
+ "type": "integer",
25720
+ "enum": [
25721
+ 1
25722
+ ]
25723
+ },
25724
+ "app": {
25725
+ "type": "object",
25726
+ "properties": {
25727
+ "slug": {
25728
+ "type": "string"
25729
+ },
25730
+ "display_name": {
25731
+ "type": "string"
25732
+ },
25733
+ "mode": {
25734
+ "type": "string",
25735
+ "enum": [
25736
+ "rules",
25737
+ "assisted",
25738
+ "external"
25739
+ ]
25740
+ }
25741
+ }
25742
+ },
25743
+ "version": {
25744
+ "type": "integer"
25745
+ },
25746
+ "content": {
25747
+ "type": "object"
25748
+ }
25749
+ }
25750
+ }
25751
+ }
25752
+ }
25753
+ },
25754
+ "404": {
25755
+ "$ref": "#/components/responses/NotFound"
25756
+ },
25757
+ "409": {
25758
+ "description": "The app has no published version."
25759
+ }
25760
+ }
25761
+ }
25762
+ },
25763
+ "/v1/apps/{id}/duplicate": {
25764
+ "post": {
25765
+ "operationId": "duplicateApp",
25766
+ "summary": "Duplicate an app's active version into a new app (spec B3.2 Portability)",
25767
+ "description": "Copies content only, through the same create+saveDraft path as POST /v1/apps/import — no grants, keys, or install state carry over. Default slug `<slug>-copy` (existing slug-collision 409 applies unchanged); default display name `<display_name> (copy)`.",
25768
+ "tags": [
25769
+ "Apps"
25770
+ ],
25771
+ "parameters": [
25772
+ {
25773
+ "name": "id",
25774
+ "in": "path",
25775
+ "required": true,
25776
+ "schema": {
25777
+ "type": "string",
25778
+ "format": "uuid"
25779
+ }
25780
+ }
25781
+ ],
25782
+ "requestBody": {
25783
+ "required": false,
25784
+ "content": {
25785
+ "application/json": {
25786
+ "schema": {
25787
+ "type": "object",
25788
+ "properties": {
25789
+ "slug": {
25790
+ "type": "string",
25791
+ "pattern": "^[a-z0-9][a-z0-9-]{1,62}[a-z0-9]$"
25792
+ },
25793
+ "display_name": {
25794
+ "type": "string",
25795
+ "maxLength": 200
25796
+ }
25797
+ }
25798
+ }
25799
+ }
25800
+ }
25801
+ },
25802
+ "responses": {
25803
+ "201": {
25804
+ "description": "The new app's manifest plus the saved draft version.",
25805
+ "content": {
25806
+ "application/json": {
25807
+ "schema": {
25808
+ "type": "object",
25809
+ "properties": {
25810
+ "app": {
25811
+ "$ref": "#/components/schemas/AppManifest"
25812
+ },
25813
+ "draft": {
25814
+ "type": "object",
25815
+ "properties": {
25816
+ "version": {
25817
+ "type": "integer"
25818
+ },
25819
+ "status": {
25820
+ "type": "string"
25821
+ },
25822
+ "content_hash": {
25823
+ "type": "string"
25824
+ }
25825
+ }
25826
+ }
25827
+ }
25828
+ }
25829
+ }
25830
+ }
25831
+ },
25832
+ "409": {
25833
+ "$ref": "#/components/responses/Conflict"
25834
+ },
25835
+ "422": {
25836
+ "$ref": "#/components/responses/ValidationError"
25837
+ }
25838
+ }
25839
+ }
25840
+ },
25841
+ "/v1/apps/{id}/versions/{n}/publish": {
25842
+ "post": {
25843
+ "operationId": "publishAppVersion",
25844
+ "summary": "Publish the draft (freezes it, supersedes the prior version, activates)",
25845
+ "description": "No-ops when the draft's content hash matches the active version. First publish locks the slug.",
25846
+ "tags": [
25847
+ "Apps"
25848
+ ],
25849
+ "parameters": [
25850
+ {
25851
+ "name": "id",
25852
+ "in": "path",
25853
+ "required": true,
25854
+ "schema": {
25855
+ "type": "string",
25856
+ "format": "uuid"
25857
+ }
25858
+ },
25859
+ {
25860
+ "name": "n",
25861
+ "in": "path",
25862
+ "required": true,
25863
+ "schema": {
25864
+ "type": "integer"
25865
+ }
25866
+ }
25867
+ ],
25868
+ "responses": {
25869
+ "200": {
25870
+ "description": "Published version summary."
25871
+ },
25872
+ "409": {
25873
+ "$ref": "#/components/responses/Conflict"
25874
+ }
25875
+ }
25876
+ }
25877
+ },
25878
+ "/v1/apps/{id}/versions/{n}/activate": {
25879
+ "post": {
25880
+ "operationId": "activateAppVersion",
25881
+ "summary": "Activate a version (v1 activates on publish; rollback activation is not implemented yet)",
25882
+ "tags": [
25883
+ "Apps"
25884
+ ],
25885
+ "parameters": [
25886
+ {
25887
+ "name": "id",
25888
+ "in": "path",
25889
+ "required": true,
25890
+ "schema": {
25891
+ "type": "string",
25892
+ "format": "uuid"
25893
+ }
25894
+ },
25895
+ {
25896
+ "name": "n",
25897
+ "in": "path",
25898
+ "required": true,
25899
+ "schema": {
25900
+ "type": "integer"
25901
+ }
25902
+ }
25903
+ ],
25904
+ "responses": {
25905
+ "200": {
25906
+ "description": "Already active."
24997
25907
  },
24998
- "404": {
24999
- "$ref": "#/components/responses/NotFound"
25908
+ "501": {
25909
+ "description": "Rollback activation of a superseded version is not implemented yet."
25000
25910
  }
25001
25911
  }
25002
25912
  }
25003
25913
  },
25004
- "/v1/apps/{id}/versions/{n}/publish": {
25914
+ "/v1/apps/{id}/enable": {
25005
25915
  "post": {
25006
- "operationId": "publishAppVersion",
25007
- "summary": "Publish the draft (freezes it, supersedes the prior version, activates)",
25008
- "description": "No-ops when the draft's content hash matches the active version. First publish locks the slug.",
25916
+ "operationId": "enableApp",
25917
+ "summary": "Enable an app (owner required when the app has actions)",
25009
25918
  "tags": [
25010
25919
  "Apps"
25011
25920
  ],
@@ -25018,30 +25927,51 @@
25018
25927
  "type": "string",
25019
25928
  "format": "uuid"
25020
25929
  }
25930
+ }
25931
+ ],
25932
+ "responses": {
25933
+ "200": {
25934
+ "description": "Enabled."
25935
+ },
25936
+ "403": {
25937
+ "$ref": "#/components/responses/Forbidden"
25021
25938
  },
25939
+ "409": {
25940
+ "$ref": "#/components/responses/Conflict"
25941
+ }
25942
+ }
25943
+ }
25944
+ },
25945
+ "/v1/apps/{id}/disable": {
25946
+ "post": {
25947
+ "operationId": "disableApp",
25948
+ "summary": "Disable an app (the kill switch — always one call)",
25949
+ "tags": [
25950
+ "Apps"
25951
+ ],
25952
+ "parameters": [
25022
25953
  {
25023
- "name": "n",
25954
+ "name": "id",
25024
25955
  "in": "path",
25025
25956
  "required": true,
25026
25957
  "schema": {
25027
- "type": "integer"
25958
+ "type": "string",
25959
+ "format": "uuid"
25028
25960
  }
25029
25961
  }
25030
25962
  ],
25031
25963
  "responses": {
25032
25964
  "200": {
25033
- "description": "Published version summary."
25034
- },
25035
- "409": {
25036
- "$ref": "#/components/responses/Conflict"
25965
+ "description": "Disabled."
25037
25966
  }
25038
25967
  }
25039
25968
  }
25040
25969
  },
25041
- "/v1/apps/{id}/versions/{n}/activate": {
25970
+ "/v1/apps/{id}/install": {
25042
25971
  "post": {
25043
- "operationId": "activateAppVersion",
25044
- "summary": "Activate a version (v1 activates on publish; rollback activation is not implemented yet)",
25972
+ "operationId": "installApp",
25973
+ "summary": "Install an external app (human workspace owner only)",
25974
+ "description": "Mints the service key carrying the `decide` grant plus the manifest's `required_grants`, stores the surface URL and allowed browser origin, and pre-consents the OAuth client. The plaintext key is returned ONCE and is never retrievable again. Machine callers are 403 whatever grants they hold.",
25045
25975
  "tags": [
25046
25976
  "Apps"
25047
25977
  ],
@@ -25054,30 +25984,241 @@
25054
25984
  "type": "string",
25055
25985
  "format": "uuid"
25056
25986
  }
25987
+ }
25988
+ ],
25989
+ "requestBody": {
25990
+ "required": false,
25991
+ "content": {
25992
+ "application/json": {
25993
+ "schema": {
25994
+ "type": "object",
25995
+ "properties": {
25996
+ "surface_url": {
25997
+ "type": "string",
25998
+ "maxLength": 2048,
25999
+ "description": "https URL of the external service UI; surfaces as endpoints.surface."
26000
+ },
26001
+ "allowed_origin": {
26002
+ "type": "string",
26003
+ "maxLength": 2048,
26004
+ "description": "Exact https origin admitted for the surface's browser calls. Must match the host of one of the OAuth client's registered redirect URIs, so oauth_client_id is required with it."
26005
+ },
26006
+ "oauth_client_id": {
26007
+ "type": "string",
26008
+ "format": "uuid"
26009
+ },
26010
+ "key_name": {
26011
+ "type": "string",
26012
+ "maxLength": 100
26013
+ }
26014
+ }
26015
+ }
26016
+ }
26017
+ }
26018
+ },
26019
+ "responses": {
26020
+ "201": {
26021
+ "description": "Installed. The service key appears here and nowhere else.",
26022
+ "content": {
26023
+ "application/json": {
26024
+ "schema": {
26025
+ "type": "object",
26026
+ "properties": {
26027
+ "install": {
26028
+ "$ref": "#/components/schemas/AppInstall"
26029
+ },
26030
+ "service_key": {
26031
+ "type": "string"
26032
+ },
26033
+ "masked_prefix": {
26034
+ "type": "string"
26035
+ },
26036
+ "warning": {
26037
+ "type": "string"
26038
+ }
26039
+ }
26040
+ }
26041
+ }
26042
+ }
26043
+ },
26044
+ "403": {
26045
+ "$ref": "#/components/responses/Forbidden"
25057
26046
  },
26047
+ "409": {
26048
+ "$ref": "#/components/responses/Conflict"
26049
+ },
26050
+ "422": {
26051
+ "description": "A required grant target does not exist here, or the origin is not admissible."
26052
+ }
26053
+ }
26054
+ },
26055
+ "get": {
26056
+ "operationId": "getAppInstall",
26057
+ "summary": "The app's install row (human workspace owner only)",
26058
+ "tags": [
26059
+ "Apps"
26060
+ ],
26061
+ "parameters": [
25058
26062
  {
25059
- "name": "n",
26063
+ "name": "id",
25060
26064
  "in": "path",
25061
26065
  "required": true,
25062
26066
  "schema": {
25063
- "type": "integer"
26067
+ "type": "string",
26068
+ "format": "uuid"
25064
26069
  }
25065
26070
  }
25066
26071
  ],
25067
26072
  "responses": {
25068
26073
  "200": {
25069
- "description": "Already active."
26074
+ "description": "The install, or null when the app was never installed.",
26075
+ "content": {
26076
+ "application/json": {
26077
+ "schema": {
26078
+ "type": "object",
26079
+ "properties": {
26080
+ "install": {
26081
+ "allOf": [
26082
+ {
26083
+ "$ref": "#/components/schemas/AppInstall"
26084
+ }
26085
+ ],
26086
+ "nullable": true
26087
+ }
26088
+ }
26089
+ }
26090
+ }
26091
+ }
25070
26092
  },
25071
- "501": {
25072
- "description": "Rollback activation of a superseded version is not implemented yet."
26093
+ "403": {
26094
+ "$ref": "#/components/responses/Forbidden"
26095
+ }
26096
+ }
26097
+ },
26098
+ "patch": {
26099
+ "operationId": "updateAppInstall",
26100
+ "summary": "Re-point a live install (human workspace owner only)",
26101
+ "description": "Updates the surface URL, the allowed browser origin, and the OAuth client the origin is bound to. An absent field is unchanged; an explicit null clears the value. The origin and client are validated by exactly the rules install applies, against the merged next state. The service key, its grants, and the install status are not touched here. 409 when the install is uninstalled - install again instead.",
26102
+ "tags": [
26103
+ "Apps"
26104
+ ],
26105
+ "parameters": [
26106
+ {
26107
+ "name": "id",
26108
+ "in": "path",
26109
+ "required": true,
26110
+ "schema": {
26111
+ "type": "string",
26112
+ "format": "uuid"
26113
+ }
26114
+ }
26115
+ ],
26116
+ "requestBody": {
26117
+ "required": false,
26118
+ "content": {
26119
+ "application/json": {
26120
+ "schema": {
26121
+ "type": "object",
26122
+ "properties": {
26123
+ "surface_url": {
26124
+ "type": "string",
26125
+ "maxLength": 2048,
26126
+ "nullable": true
26127
+ },
26128
+ "allowed_origin": {
26129
+ "type": "string",
26130
+ "maxLength": 2048,
26131
+ "nullable": true,
26132
+ "description": "Exact https origin admitted for the surface's browser calls. Must match the host of one of the OAuth client's registered redirect URIs, so a non-null origin requires an oauth_client_id on the merged row."
26133
+ },
26134
+ "oauth_client_id": {
26135
+ "type": "string",
26136
+ "format": "uuid",
26137
+ "nullable": true
26138
+ }
26139
+ }
26140
+ }
26141
+ }
26142
+ }
26143
+ },
26144
+ "responses": {
26145
+ "200": {
26146
+ "description": "Updated.",
26147
+ "content": {
26148
+ "application/json": {
26149
+ "schema": {
26150
+ "type": "object",
26151
+ "properties": {
26152
+ "install": {
26153
+ "$ref": "#/components/schemas/AppInstall"
26154
+ }
26155
+ }
26156
+ }
26157
+ }
26158
+ }
26159
+ },
26160
+ "403": {
26161
+ "$ref": "#/components/responses/Forbidden"
26162
+ },
26163
+ "404": {
26164
+ "$ref": "#/components/responses/NotFound"
26165
+ },
26166
+ "409": {
26167
+ "$ref": "#/components/responses/Conflict"
26168
+ },
26169
+ "422": {
26170
+ "description": "The origin is not admissible for the bound OAuth client."
26171
+ }
26172
+ }
26173
+ },
26174
+ "delete": {
26175
+ "operationId": "uninstallApp",
26176
+ "summary": "Uninstall (revokes the service key, drops decide, clears the origin)",
26177
+ "description": "Open decision tasks get an execution_epoch bump and return to available. The row survives as uninstalled for the audit trail.",
26178
+ "tags": [
26179
+ "Apps"
26180
+ ],
26181
+ "parameters": [
26182
+ {
26183
+ "name": "id",
26184
+ "in": "path",
26185
+ "required": true,
26186
+ "schema": {
26187
+ "type": "string",
26188
+ "format": "uuid"
26189
+ }
26190
+ }
26191
+ ],
26192
+ "responses": {
26193
+ "200": {
26194
+ "description": "Uninstalled.",
26195
+ "content": {
26196
+ "application/json": {
26197
+ "schema": {
26198
+ "type": "object",
26199
+ "properties": {
26200
+ "install": {
26201
+ "$ref": "#/components/schemas/AppInstall"
26202
+ }
26203
+ }
26204
+ }
26205
+ }
26206
+ }
26207
+ },
26208
+ "403": {
26209
+ "$ref": "#/components/responses/Forbidden"
26210
+ },
26211
+ "404": {
26212
+ "$ref": "#/components/responses/NotFound"
25073
26213
  }
25074
26214
  }
25075
26215
  }
25076
26216
  },
25077
- "/v1/apps/{id}/enable": {
26217
+ "/v1/apps/{id}/install/suspend": {
25078
26218
  "post": {
25079
- "operationId": "enableApp",
25080
- "summary": "Enable an app (owner required when the app has actions)",
26219
+ "operationId": "suspendAppInstall",
26220
+ "summary": "Suspend an install (human workspace owner only)",
26221
+ "description": "Stops the offered-task producer and bumps execution_epoch on every open decision task of the app, invalidating open leases. Also happens automatically when the service key is revoked (reason key_revoked).",
25081
26222
  "tags": [
25082
26223
  "Apps"
25083
26224
  ],
@@ -25092,23 +26233,55 @@
25092
26233
  }
25093
26234
  }
25094
26235
  ],
26236
+ "requestBody": {
26237
+ "required": false,
26238
+ "content": {
26239
+ "application/json": {
26240
+ "schema": {
26241
+ "type": "object",
26242
+ "properties": {
26243
+ "reason": {
26244
+ "type": "string",
26245
+ "maxLength": 500
26246
+ }
26247
+ }
26248
+ }
26249
+ }
26250
+ }
26251
+ },
25095
26252
  "responses": {
25096
26253
  "200": {
25097
- "description": "Enabled."
26254
+ "description": "Suspended.",
26255
+ "content": {
26256
+ "application/json": {
26257
+ "schema": {
26258
+ "type": "object",
26259
+ "properties": {
26260
+ "install": {
26261
+ "$ref": "#/components/schemas/AppInstall"
26262
+ }
26263
+ }
26264
+ }
26265
+ }
26266
+ }
25098
26267
  },
25099
26268
  "403": {
25100
26269
  "$ref": "#/components/responses/Forbidden"
25101
26270
  },
26271
+ "404": {
26272
+ "$ref": "#/components/responses/NotFound"
26273
+ },
25102
26274
  "409": {
25103
26275
  "$ref": "#/components/responses/Conflict"
25104
26276
  }
25105
26277
  }
25106
26278
  }
25107
26279
  },
25108
- "/v1/apps/{id}/disable": {
26280
+ "/v1/apps/{id}/install/resume": {
25109
26281
  "post": {
25110
- "operationId": "disableApp",
25111
- "summary": "Disable an app (the kill switch — always one call)",
26282
+ "operationId": "resumeAppInstall",
26283
+ "summary": "Resume a suspended install (human workspace owner only)",
26284
+ "description": "409 when the install's service key is revoked - that install cannot be made to work again; uninstall and install afresh to mint a new key.",
25112
26285
  "tags": [
25113
26286
  "Apps"
25114
26287
  ],
@@ -25125,7 +26298,28 @@
25125
26298
  ],
25126
26299
  "responses": {
25127
26300
  "200": {
25128
- "description": "Disabled."
26301
+ "description": "Resumed.",
26302
+ "content": {
26303
+ "application/json": {
26304
+ "schema": {
26305
+ "type": "object",
26306
+ "properties": {
26307
+ "install": {
26308
+ "$ref": "#/components/schemas/AppInstall"
26309
+ }
26310
+ }
26311
+ }
26312
+ }
26313
+ }
26314
+ },
26315
+ "403": {
26316
+ "$ref": "#/components/responses/Forbidden"
26317
+ },
26318
+ "404": {
26319
+ "$ref": "#/components/responses/NotFound"
26320
+ },
26321
+ "409": {
26322
+ "$ref": "#/components/responses/Conflict"
25129
26323
  }
25130
26324
  }
25131
26325
  }
@@ -25751,7 +26945,8 @@
25751
26945
  "type": "string",
25752
26946
  "enum": [
25753
26947
  "read",
25754
- "act"
26948
+ "act",
26949
+ "write"
25755
26950
  ]
25756
26951
  }
25757
26952
  }
@@ -26953,7 +28148,7 @@
26953
28148
  "type": "http",
26954
28149
  "scheme": "bearer",
26955
28150
  "bearerFormat": "JWT",
26956
- "description": "OAuth 2.1 access token (JWT) from the connector OAuth flow. Routes\nthat declare this scheme reject `tlnc_` API keys with `401`.\n"
28151
+ "description": "OAuth 2.1 access token (JWT) from the connector OAuth flow. Routes\nthat declare this scheme reject `tlnc_` API keys with `401`.\n\nScopes a client may request (the live list is served by\n`GET /.well-known/oauth-authorization-server` as `scopes_supported`):\n\n| Scope | Grants |\n|---|---|\n| `extract:write` | Create extractions; every legacy `write` route |\n| `documents:read` | Read documents and extraction results |\n| `schemas:read` | Read schemas and field definitions |\n| `sources:read` | List connected sources |\n| `webhooks:manage` | Create and manage webhooks |\n| `apps:read` | Read apps, runs and results |\n| `apps:operate` | Run and operate apps |\n| `records:write` | Write record-set data |\n| `identity:read` | Identity only (`/oauth/userinfo`); no `/v1` privilege |\n\nA client that omits `scope` receives the five legacy public-API scopes\nonly. `apps:read`, `apps:operate`, `records:write` and `identity:read`\nare never granted implicitly and must be requested by name. The Apps\nscopes are checked directly by the routes that need them: holding\n`extract:write` does not satisfy an Apps write or a record-set write,\nand `apps:read` alone cannot start a run.\n"
26957
28152
  }
26958
28153
  },
26959
28154
  "parameters": {
@@ -27624,11 +28819,83 @@
27624
28819
  },
27625
28820
  "rest": {
27626
28821
  "type": "string"
28822
+ },
28823
+ "surface": {
28824
+ "type": "string",
28825
+ "description": "The installed external service's UI. The one install-derived value a manifest carries - read-only, absent when the app is not installed."
27627
28826
  }
27628
28827
  }
27629
28828
  }
27630
28829
  }
27631
28830
  },
28831
+ "AppInstall": {
28832
+ "type": "object",
28833
+ "description": "The binding between one workspace and one external service (Apps spec B7.1). Not versioned and never part of the manifest: it holds the ids that exist in one deployment only (service key, OAuth client, URL, origin).",
28834
+ "properties": {
28835
+ "app_id": {
28836
+ "type": "string",
28837
+ "format": "uuid"
28838
+ },
28839
+ "status": {
28840
+ "type": "string",
28841
+ "enum": [
28842
+ "installed",
28843
+ "suspended",
28844
+ "uninstalled"
28845
+ ]
28846
+ },
28847
+ "service_api_key_id": {
28848
+ "type": "string",
28849
+ "format": "uuid",
28850
+ "nullable": true,
28851
+ "description": "The workspace key the service authenticates with; null once revoked."
28852
+ },
28853
+ "oauth_client_id": {
28854
+ "type": "string",
28855
+ "format": "uuid",
28856
+ "nullable": true,
28857
+ "description": "The pre-consented OAuth public client the surface exchanges a session code for."
28858
+ },
28859
+ "surface_url": {
28860
+ "type": "string",
28861
+ "nullable": true
28862
+ },
28863
+ "allowed_origin": {
28864
+ "type": "string",
28865
+ "nullable": true,
28866
+ "description": "Exact https origin (scheme + host + optional port), no wildcard, no path."
28867
+ },
28868
+ "installed_by": {
28869
+ "type": "string",
28870
+ "nullable": true
28871
+ },
28872
+ "installed_at": {
28873
+ "type": "string",
28874
+ "format": "date-time",
28875
+ "nullable": true
28876
+ },
28877
+ "suspended_at": {
28878
+ "type": "string",
28879
+ "format": "date-time",
28880
+ "nullable": true
28881
+ },
28882
+ "suspended_reason": {
28883
+ "type": "string",
28884
+ "nullable": true,
28885
+ "description": "'key_revoked' when the service key was revoked; otherwise the owner's reason."
28886
+ },
28887
+ "last_seen_at": {
28888
+ "type": "string",
28889
+ "format": "date-time",
28890
+ "nullable": true
28891
+ },
28892
+ "uninstalled_at": {
28893
+ "type": "string",
28894
+ "format": "date-time",
28895
+ "nullable": true
28896
+ }
28897
+ }
28898
+ },
27632
28899
  "AppRun": {
27633
28900
  "type": "object",
27634
28901
  "description": "Run projection. The journal (/events) and the sealed record (/record) are the ledger.",
@@ -28010,6 +29277,340 @@
28010
29277
  }
28011
29278
  }
28012
29279
  },
29280
+ "DecisionTaskMetadata": {
29281
+ "type": "object",
29282
+ "required": [
29283
+ "id",
29284
+ "customer_id",
29285
+ "run_id",
29286
+ "app_id",
29287
+ "status",
29288
+ "execution_epoch",
29289
+ "sla_deadline_at",
29290
+ "created_at",
29291
+ "updated_at"
29292
+ ],
29293
+ "properties": {
29294
+ "id": {
29295
+ "type": "string",
29296
+ "format": "uuid"
29297
+ },
29298
+ "customer_id": {
29299
+ "type": "string",
29300
+ "format": "uuid"
29301
+ },
29302
+ "run_id": {
29303
+ "type": "string",
29304
+ "format": "uuid"
29305
+ },
29306
+ "app_id": {
29307
+ "type": "string",
29308
+ "format": "uuid"
29309
+ },
29310
+ "status": {
29311
+ "type": "string",
29312
+ "enum": [
29313
+ "available",
29314
+ "claimed",
29315
+ "submitted",
29316
+ "released",
29317
+ "failed",
29318
+ "timed_out",
29319
+ "cancelled"
29320
+ ]
29321
+ },
29322
+ "execution_epoch": {
29323
+ "type": "integer",
29324
+ "minimum": 0
29325
+ },
29326
+ "input_package_ref": {
29327
+ "type": "string",
29328
+ "description": "Where the frozen package lives; `run` in v1."
29329
+ },
29330
+ "lease_seconds": {
29331
+ "type": "integer",
29332
+ "minimum": 1
29333
+ },
29334
+ "claimed_by": {
29335
+ "type": [
29336
+ "string",
29337
+ "null"
29338
+ ],
29339
+ "description": "Id of the API key holding the claim."
29340
+ },
29341
+ "claimed_at": {
29342
+ "type": [
29343
+ "string",
29344
+ "null"
29345
+ ],
29346
+ "format": "date-time"
29347
+ },
29348
+ "lease_expires_at": {
29349
+ "type": [
29350
+ "string",
29351
+ "null"
29352
+ ],
29353
+ "format": "date-time"
29354
+ },
29355
+ "heartbeat_at": {
29356
+ "type": [
29357
+ "string",
29358
+ "null"
29359
+ ],
29360
+ "format": "date-time"
29361
+ },
29362
+ "sla_deadline_at": {
29363
+ "type": "string",
29364
+ "format": "date-time",
29365
+ "description": "Hard decision deadline; heartbeats never extend the lease past it."
29366
+ },
29367
+ "submitted_at": {
29368
+ "type": [
29369
+ "string",
29370
+ "null"
29371
+ ],
29372
+ "format": "date-time"
29373
+ },
29374
+ "created_at": {
29375
+ "type": "string",
29376
+ "format": "date-time"
29377
+ },
29378
+ "updated_at": {
29379
+ "type": "string",
29380
+ "format": "date-time"
29381
+ }
29382
+ }
29383
+ },
29384
+ "DecisionTaskPackageDescriptor": {
29385
+ "type": "object",
29386
+ "required": [
29387
+ "record_count",
29388
+ "page_size",
29389
+ "first_cursor"
29390
+ ],
29391
+ "properties": {
29392
+ "record_count": {
29393
+ "type": "integer",
29394
+ "minimum": 0,
29395
+ "description": "Total records across every binding of the frozen package."
29396
+ },
29397
+ "page_size": {
29398
+ "type": "integer",
29399
+ "minimum": 1,
29400
+ "description": "Default page size for GET /v1/decision-tasks/{id}/package."
29401
+ },
29402
+ "first_cursor": {
29403
+ "type": [
29404
+ "string",
29405
+ "null"
29406
+ ],
29407
+ "description": "Cursor for the first page; null when the package holds no records."
29408
+ },
29409
+ "documents": {
29410
+ "type": "array",
29411
+ "description": "Source documents the package's cells cite, unique, first-seen order; empty on runs assembled before enrichment. Bytes are served by `GET /v1/documents/{id}/file`, which applies Sources IAM as the key's minting user.",
29412
+ "items": {
29413
+ "$ref": "#/components/schemas/DecisionTaskPackageDocument"
29414
+ }
29415
+ }
29416
+ }
29417
+ },
29418
+ "DecisionTaskPackageDocument": {
29419
+ "type": "object",
29420
+ "required": [
29421
+ "document_id",
29422
+ "filename",
29423
+ "file_url"
29424
+ ],
29425
+ "properties": {
29426
+ "document_id": {
29427
+ "type": "string",
29428
+ "format": "uuid"
29429
+ },
29430
+ "filename": {
29431
+ "type": [
29432
+ "string",
29433
+ "null"
29434
+ ]
29435
+ },
29436
+ "mime_type": {
29437
+ "type": "string"
29438
+ },
29439
+ "file_url": {
29440
+ "type": "string",
29441
+ "description": "Relative API path, `/v1/documents/{id}/file`."
29442
+ }
29443
+ }
29444
+ },
29445
+ "DecisionTaskBundle": {
29446
+ "type": "object",
29447
+ "required": [
29448
+ "task",
29449
+ "output_contract",
29450
+ "precedents",
29451
+ "package"
29452
+ ],
29453
+ "properties": {
29454
+ "task": {
29455
+ "$ref": "#/components/schemas/DecisionTaskMetadata"
29456
+ },
29457
+ "output_contract": {
29458
+ "type": "object",
29459
+ "description": "For a `single` contract, the bare JSON Schema the submitted `outcome` must validate against (unchanged wire shape). For `verdict_matrix` and `record_set` contracts, the wrapped form `{ kind, schema }`: the client submits the envelope that kind defines (see DecisionTaskSubmit) and the platform validates it against the app version's declaration.",
29460
+ "additionalProperties": true
29461
+ },
29462
+ "precedents": {
29463
+ "type": "array",
29464
+ "description": "Precedent references injected into this run's context.",
29465
+ "items": {
29466
+ "type": "object",
29467
+ "additionalProperties": true
29468
+ }
29469
+ },
29470
+ "package": {
29471
+ "$ref": "#/components/schemas/DecisionTaskPackageDescriptor"
29472
+ }
29473
+ }
29474
+ },
29475
+ "DecisionTaskPackagePage": {
29476
+ "type": "object",
29477
+ "required": [
29478
+ "task_id",
29479
+ "run_id",
29480
+ "record_count",
29481
+ "page_size",
29482
+ "data",
29483
+ "pagination"
29484
+ ],
29485
+ "properties": {
29486
+ "task_id": {
29487
+ "type": "string",
29488
+ "format": "uuid"
29489
+ },
29490
+ "run_id": {
29491
+ "type": "string",
29492
+ "format": "uuid"
29493
+ },
29494
+ "record_count": {
29495
+ "type": "integer",
29496
+ "minimum": 0
29497
+ },
29498
+ "page_size": {
29499
+ "type": "integer",
29500
+ "minimum": 1
29501
+ },
29502
+ "documents": {
29503
+ "type": "array",
29504
+ "description": "Present on the first page only; same shape as the claim descriptor's `documents`.",
29505
+ "items": {
29506
+ "$ref": "#/components/schemas/DecisionTaskPackageDocument"
29507
+ }
29508
+ },
29509
+ "data": {
29510
+ "type": "array",
29511
+ "items": {
29512
+ "type": "object",
29513
+ "required": [
29514
+ "binding",
29515
+ "index",
29516
+ "record"
29517
+ ],
29518
+ "properties": {
29519
+ "binding": {
29520
+ "type": "string",
29521
+ "description": "Input-binding alias the record came from."
29522
+ },
29523
+ "index": {
29524
+ "type": "integer",
29525
+ "minimum": 0,
29526
+ "description": "Position within that binding."
29527
+ },
29528
+ "record": {
29529
+ "type": "object",
29530
+ "additionalProperties": true,
29531
+ "description": "The record as persisted, each cell carrying its provenance locator."
29532
+ }
29533
+ }
29534
+ }
29535
+ },
29536
+ "pagination": {
29537
+ "$ref": "#/components/schemas/CursorPagination"
29538
+ }
29539
+ }
29540
+ },
29541
+ "DecisionTaskEpoch": {
29542
+ "type": "object",
29543
+ "required": [
29544
+ "execution_epoch"
29545
+ ],
29546
+ "properties": {
29547
+ "execution_epoch": {
29548
+ "type": "integer",
29549
+ "minimum": 1
29550
+ }
29551
+ }
29552
+ },
29553
+ "DecisionTaskFail": {
29554
+ "type": "object",
29555
+ "required": [
29556
+ "execution_epoch",
29557
+ "reason"
29558
+ ],
29559
+ "properties": {
29560
+ "execution_epoch": {
29561
+ "type": "integer",
29562
+ "minimum": 1
29563
+ },
29564
+ "reason": {
29565
+ "type": "string",
29566
+ "maxLength": 2000,
29567
+ "description": "Stated on the Human Review this raises."
29568
+ }
29569
+ }
29570
+ },
29571
+ "DecisionTaskSubmit": {
29572
+ "type": "object",
29573
+ "required": [
29574
+ "execution_epoch",
29575
+ "outcome",
29576
+ "evidence",
29577
+ "rationale"
29578
+ ],
29579
+ "properties": {
29580
+ "execution_epoch": {
29581
+ "type": "integer",
29582
+ "minimum": 1
29583
+ },
29584
+ "outcome": {
29585
+ "type": "object",
29586
+ "additionalProperties": true,
29587
+ "description": "`single`: validated against the task's output contract. `verdict_matrix`: `{ subjects: [{ subject_key, rule_outcomes: { <rule id>: passed | failed | indeterminate }, auto?, detail? }] }` over the version's declared `logic.rules`; `rolled_outcome`, `substantive_passes` and `auto` are recomputed by the platform (a disagreeing advisory `auto` is journaled `decision_rejected` and overridden). `record_set`: `{ fields: [{ key, label?, data_type }], records: [{ source_record_id?, values }] }`, where each entry of `values` is either a bare value or `{ value, confidence?, status? }` (`status` one of filled, empty, flagged, pending_approval). Under the version's `record_set_output.mode = derive` the platform materializes a NEW `app_run` record set and ignores `confidence`/`status`; under `mode = promote` it appends cell versions into `record_set_output.target` (an `app_run` set the app holds a `write` grant on), matching rows by `source_record_id` against the target's record ids and columns against the target's fields, under the version's autonomy contract (`observe` rejects any value output, `propose` lands cells `pending_approval`, a value below `confidence_floor` is flagged and not written). Whole body ≤ `apps.submit_max_bytes` (413)."
29588
+ },
29589
+ "confidence": {
29590
+ "type": "number",
29591
+ "minimum": 0,
29592
+ "maximum": 1
29593
+ },
29594
+ "evidence": {
29595
+ "type": "array",
29596
+ "description": "Provenance locators the decision relied on. Each must exist in the frozen input package, or parse as `db:{connectionId}:{table}:{rowKey}:{column}` / `ref:{referenceDataId}:{rowKey}:{column}` against a resource the app holds a `read` grant on: such locators are accepted as attestations (recorded `{ locator, external: true }`, journaled `evidence_attested`, never resolved). Anything else is 422 `evidence_outside_grants`; `api:` is reserved. An empty block is accepted only when the app allows unevidenced decisions.",
29597
+ "items": {
29598
+ "type": "string",
29599
+ "maxLength": 512
29600
+ }
29601
+ },
29602
+ "rationale": {
29603
+ "type": "string",
29604
+ "maxLength": 4000,
29605
+ "description": "Decision rationale — never private chain-of-thought."
29606
+ },
29607
+ "service_version": {
29608
+ "type": "string",
29609
+ "maxLength": 64,
29610
+ "description": "Build identifier of the deciding service; recorded in `decided_by.label`."
29611
+ }
29612
+ }
29613
+ },
28013
29614
  "BindingResolutionRequest": {
28014
29615
  "type": "object",
28015
29616
  "required": [
@@ -29418,6 +31019,63 @@
29418
31019
  }
29419
31020
  }
29420
31021
  },
31022
+ "ExtractionCorrectionResponse": {
31023
+ "description": "An extraction, plus what the correction did in the value plane. The top-level shape is unchanged from ExtractionResponse; the three correction fields are additive.\n",
31024
+ "allOf": [
31025
+ {
31026
+ "$ref": "#/components/schemas/ExtractionResponse"
31027
+ },
31028
+ {
31029
+ "type": "object",
31030
+ "required": [
31031
+ "value_plane",
31032
+ "cells_written",
31033
+ "cells_skipped"
31034
+ ],
31035
+ "properties": {
31036
+ "value_plane": {
31037
+ "type": "string",
31038
+ "enum": [
31039
+ "written",
31040
+ "not_migrated"
31041
+ ],
31042
+ "description": "`written` — the corrections landed as new value-plane cell versions. `not_migrated` — the document has no capture-layer record yet, so the correction was applied to the legacy extraction JSONB only.\n"
31043
+ },
31044
+ "cells_written": {
31045
+ "type": "array",
31046
+ "items": {
31047
+ "type": "string"
31048
+ },
31049
+ "description": "Field names that became new value-plane cell versions."
31050
+ },
31051
+ "cells_skipped": {
31052
+ "type": "array",
31053
+ "description": "Fields the central cell-write authority guard withheld. A value promoted by review (`human_review`, `auto_adjudication`, `agentic_review`) outranks a machine correction, and a cell held for approval stays held. A withheld field is not applied to the extraction data either — it keeps its previous value everywhere.\n",
31054
+ "items": {
31055
+ "type": "object",
31056
+ "required": [
31057
+ "field",
31058
+ "reason"
31059
+ ],
31060
+ "properties": {
31061
+ "field": {
31062
+ "type": "string",
31063
+ "description": "The field name as submitted in the request body."
31064
+ },
31065
+ "reason": {
31066
+ "type": "string",
31067
+ "enum": [
31068
+ "review_authority",
31069
+ "pending_approval"
31070
+ ]
31071
+ }
31072
+ }
31073
+ }
31074
+ }
31075
+ }
31076
+ }
31077
+ ]
31078
+ },
29421
31079
  "SchemaResponse": {
29422
31080
  "type": "object",
29423
31081
  "required": [
@@ -31381,20 +33039,31 @@
31381
33039
  },
31382
33040
  "config": {
31383
33041
  "type": "object",
31384
- "additionalProperties": true
33042
+ "additionalProperties": true,
33043
+ "description": "Connector-specific transport settings (e.g. `{ url, method, headers }` for `webhook`)."
31385
33044
  },
31386
33045
  "auth_config": {
31387
- "type": [
31388
- "object",
31389
- "null"
31390
- ],
31391
- "additionalProperties": true
33046
+ "description": "Transport credentials for the connector, discriminated by `type`\n(see `DestinationAuthConfig` and `/v1/delivery/catalog/connectors`).\nFor a `webhook` destination a `signing_secret` key may also be\nplaced here; it is stored as the destination's signing secret\n(encrypted, never echoed) and stripped from the credentials, so a\nbody whose `auth_config` holds only the secret reads back as\n`has_auth_config: false, has_signing_secret: true`.\n",
33047
+ "anyOf": [
33048
+ {
33049
+ "$ref": "#/components/schemas/DestinationAuthConfig"
33050
+ },
33051
+ {
33052
+ "type": "object",
33053
+ "additionalProperties": true
33054
+ },
33055
+ {
33056
+ "type": "null"
33057
+ }
33058
+ ]
31392
33059
  },
31393
33060
  "signing_secret": {
31394
33061
  "type": [
31395
33062
  "string",
31396
33063
  "null"
31397
- ]
33064
+ ],
33065
+ "description": "HMAC-SHA256 secret for `webhook` destinations. Deliveries then carry\n`X-Talonic-Signature: t=<ms>,v1=<hex>` with `hex = HMAC(secret, \"<t>.<body>\")`\n(see the Signature verification section). Equivalent to\n`auth_config.signing_secret`; supplying both with different values is a 400.\n",
33066
+ "example": "whsec_rotate_monthly"
31398
33067
  },
31399
33068
  "payload_cap_bytes": {
31400
33069
  "type": [
@@ -31419,17 +33088,26 @@
31419
33088
  "additionalProperties": true
31420
33089
  },
31421
33090
  "auth_config": {
31422
- "type": [
31423
- "object",
31424
- "null"
31425
- ],
31426
- "additionalProperties": true
33091
+ "description": "Replaces the stored credentials. `auth_config.signing_secret` is\nlifted onto the destination's signing secret exactly as on create.\n",
33092
+ "anyOf": [
33093
+ {
33094
+ "$ref": "#/components/schemas/DestinationAuthConfig"
33095
+ },
33096
+ {
33097
+ "type": "object",
33098
+ "additionalProperties": true
33099
+ },
33100
+ {
33101
+ "type": "null"
33102
+ }
33103
+ ]
31427
33104
  },
31428
33105
  "signing_secret": {
31429
33106
  "type": [
31430
33107
  "string",
31431
33108
  "null"
31432
- ]
33109
+ ],
33110
+ "description": "Set or rotate the HMAC signing secret; `null` clears it."
31433
33111
  },
31434
33112
  "payload_cap_bytes": {
31435
33113
  "type": [
@@ -31901,7 +33579,11 @@
31901
33579
  "description": "Must resolve to a registered deliverable resolver."
31902
33580
  },
31903
33581
  "destination_id": {
31904
- "type": "string",
33582
+ "type": [
33583
+ "string",
33584
+ "null"
33585
+ ],
33586
+ "description": "Null when the destination was deleted: the binding is orphaned (inactive, last_status destination_deleted) until re-pointed.",
31905
33587
  "format": "uuid",
31906
33588
  "example": "e1f2a3b4-c5d6-7890-efab-901234567890"
31907
33589
  },
@@ -35269,6 +36951,13 @@
35269
36951
  "nullable": true,
35270
36952
  "additionalProperties": true,
35271
36953
  "description": "Row values after the change; null on `removed`."
36954
+ },
36955
+ "changed_at": {
36956
+ "type": [
36957
+ "string",
36958
+ "null"
36959
+ ],
36960
+ "description": "Exact write time of the row's newest change in the window, as the source's change history recorded it (external-history sources); null on platform captures, which only know the capture time."
35272
36961
  }
35273
36962
  }
35274
36963
  },
@@ -35337,6 +37026,13 @@
35337
37026
  "type": "object",
35338
37027
  "nullable": true,
35339
37028
  "additionalProperties": true
37029
+ },
37030
+ "changed_at": {
37031
+ "type": [
37032
+ "string",
37033
+ "null"
37034
+ ],
37035
+ "description": "Exact write time from the source's change history (external-history sources); null on platform captures."
35340
37036
  }
35341
37037
  }
35342
37038
  }