@talonic/docs 0.21.7 → 0.21.10

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/dist/seo.js CHANGED
@@ -60,7 +60,7 @@ var openapi_default = {
60
60
  },
61
61
  {
62
62
  name: "Delivery",
63
- description: 'Outbound delivery. Configure destinations (six live connectors: webhook, sftp,\ns3, azure_blob, google_drive, onedrive), create bindings that join signal filters\nto deliverable types + destinations + serializers, and inspect the\nhistory/DLQ/events log. Every delivery is at-least-once with an idempotency key\non the wire.\n\n## Webhook Contract\n\n**Event payload:**\n```json\n{\n "event": {\n "event_type": "document.extracted",\n "event_id": "42",\n "binding_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",\n "idempotency_key": "c9f3a7e1b2d4f6a8e0c2d4f6a8e0c2d4",\n "attempt": 1,\n "delivered_at": "2026-04-25T14:30:00.000Z"\n },\n "payload": { "document_id": "...", "data": { "...extracted fields..." } }\n}\n```\n\n**Event types:** `document.extracted`, `document.extraction_failed`,\n`document.structured` (per-document structured fields from a Spec pipeline / `/v1/run`; deliver with the `pipeline.capture` deliverable \u2014 its payload carries `run_id` (null outside `/v1/run`), `document_id`, `pipeline_id`, and `fields` for submission correlation),\n`run.completed` (a `POST /v1/run` pipeline finished; payload adds `records` \u2014\nan array of `{ document_id, filename, data }`, one entry per output row,\nALWAYS an array even for a single document; assembled runs attribute each\ncomposed row to its anchor document; `document_id` and `filename` are\nnullable \u2014 null when a row\'s document identity cannot be resolved \u2014\nalongside the legacy `structured_data`,\nstill emitted but considered legacy in favor of `records`),\n`run.failed` (a `POST /v1/run` pipeline failed \u2014 every document errored\nduring ingest or extraction; the `error` object\'s shape varies by failure\nstage and may include `document_ids`, a best-effort array of the input\ndocument ids),\n`run.dataspace.completed`, `run.dataspace.failed`, `result.dataspace.completed`,\n`result.dataspace.failed`, `run.structuring.completed`, `run.structuring.failed`,\n`run.resolution.completed`, `run.resolution.failed`, `run.extraction.completed`,\n`run.extraction.failed`, `result.flagged`, `result.approved`, `result.rejected`,\n`delivery.item.completed`, `delivery.item.failed`.\n\n**Signature verification (HMAC-SHA256):**\n\nHeader: `X-Talonic-Signature: t=1714060200000,v1=abc123...`\n\n```javascript\nconst crypto = require(\'crypto\');\nconst [tPart, vPart] = signature.split(\',\');\nconst timestamp = tPart.split(\'=\')[1];\nconst received = vPart.split(\'=\')[1];\nconst expected = crypto.createHmac(\'sha256\', signingSecret)\n .update(timestamp + \'.\' + rawBody).digest(\'hex\');\nconst valid = crypto.timingSafeEqual(\n Buffer.from(received), Buffer.from(expected));\n```\n\n**Retry policy:** Up to 7 attempts \u2014 0s, 30s, 2m, 8m, 30m, 2h, 8h (~10.5h total).\nHTTP 429/5xx are retryable. HTTP 4xx (except 408) goes to DLQ immediately.\n\n**Dead-letter queue recovery:** When all retries are exhausted, the delivery\nlands in the DLQ. List failed deliveries with `GET /v1/delivery/dlq`\n(filterable by `binding_id` and `error_code`). Inspect a single entry with\n`GET /v1/delivery/dlq/{id}`. Replay with `POST /v1/delivery/dlq/{id}/replay`\n\u2014 this deletes the DLQ entry, re-signs the payload with the current\nsigning secret, resets the retry counter to attempt 1, and re-enqueues\nthe delivery through the full backoff ladder.\n'
63
+ description: 'Outbound delivery. Configure destinations (six live connectors: webhook, sftp,\ns3, azure_blob, google_drive, onedrive), create bindings that join signal filters\nto deliverable types + destinations + serializers, and inspect the\nhistory/DLQ/events log. Every delivery is at-least-once with an idempotency key\non the wire.\n\n## Webhook Contract\n\n**Event payload:**\n```json\n{\n "event": {\n "event_type": "document.extracted",\n "event_id": "42",\n "binding_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",\n "idempotency_key": "c9f3a7e1b2d4f6a8e0c2d4f6a8e0c2d4",\n "attempt": 1,\n "delivered_at": "2026-04-25T14:30:00.000Z"\n },\n "payload": { "document_id": "...", "data": { "...extracted fields..." } }\n}\n```\n\n**Event types:** `document.extracted` (deliver with the `document.capture`\ndeliverable for the raw field map; its payload gains optional `metadata`/\n`batch_id` read from the document\'s own `client_metadata`/`client_batch_id`\ncolumns \u2014 document-scoped, not request-scoped, since this deliverable has\nno run-request context; present only when set),\n`document.extraction_failed`,\n`document.structured` (per-document structured fields from a Spec pipeline / `/v1/run`; deliver with the `pipeline.capture` deliverable \u2014 its payload carries `run_id` (null outside `/v1/run`), `document_id`, `pipeline_id`, `fields` for submission correlation, and optional `metadata`/`batch_id`; for a `/v1/run`-attributed document these read the ATTRIBUTED REQUEST\'s per-input merged bag first \u2014 correct under byte-identical dedup and append, where the canonical documents row can carry a different submission\'s tags \u2014 falling back to the documents row when no request is attributed; present only when set),\n`run.completed` (a `POST /v1/run` pipeline finished; payload adds `records` \u2014\nan array of `{ document_id, filename, data, metadata?, batch_id? }`, one entry\nper output row, ALWAYS an array even for a single document; `metadata`/\n`batch_id` are the submitting request\'s per-input merged bag (echo-sourced,\nso dedup/append never leaks another request\'s tags onto this one\'s records),\npresent only when set; assembled runs attribute each\ncomposed row to its anchor document; `document_id` and `filename` are\nnullable \u2014 null when a row\'s document identity cannot be resolved \u2014\nalongside the legacy `structured_data`,\nstill emitted but considered legacy in favor of `records`),\n`run.failed` (a `POST /v1/run` pipeline failed \u2014 every document errored\nduring ingest or extraction; the `error` object\'s shape varies by failure\nstage and may include `document_ids`, a best-effort array of the input\ndocument ids),\n`run.dataspace.completed`, `run.dataspace.failed`, `result.dataspace.completed`,\n`result.dataspace.failed`, `run.structuring.completed`, `run.structuring.failed`,\n`run.resolution.completed`, `run.resolution.failed`, `run.extraction.completed`,\n`run.extraction.failed`, `result.flagged`, `result.approved`, `result.rejected`,\n`delivery.item.completed`, `delivery.item.failed`.\n\n**Signature verification (HMAC-SHA256):**\n\nHeader: `X-Talonic-Signature: t=1714060200000,v1=abc123...`\n\n```javascript\nconst crypto = require(\'crypto\');\nconst [tPart, vPart] = signature.split(\',\');\nconst timestamp = tPart.split(\'=\')[1];\nconst received = vPart.split(\'=\')[1];\nconst expected = crypto.createHmac(\'sha256\', signingSecret)\n .update(timestamp + \'.\' + rawBody).digest(\'hex\');\nconst valid = crypto.timingSafeEqual(\n Buffer.from(received), Buffer.from(expected));\n```\n\n**Retry policy:** Up to 7 attempts \u2014 0s, 30s, 2m, 8m, 30m, 2h, 8h (~10.5h total).\nHTTP 429/5xx are retryable. HTTP 4xx (except 408) goes to DLQ immediately.\n\n**Dead-letter queue recovery:** When all retries are exhausted, the delivery\nlands in the DLQ. List failed deliveries with `GET /v1/delivery/dlq`\n(filterable by `binding_id` and `error_code`). Inspect a single entry with\n`GET /v1/delivery/dlq/{id}`. Replay with `POST /v1/delivery/dlq/{id}/replay`\n\u2014 this deletes the DLQ entry, re-signs the payload with the current\nsigning secret, resets the retry counter to attempt 1, and re-enqueues\nthe delivery through the full backoff ladder.\n'
64
64
  },
65
65
  {
66
66
  name: "Filter",
@@ -4115,6 +4115,104 @@ var openapi_default = {
4115
4115
  $ref: "#/components/responses/RateLimitExceeded"
4116
4116
  }
4117
4117
  }
4118
+ },
4119
+ delete: {
4120
+ operationId: "clearDeliveryDlq",
4121
+ summary: "Bulk dismiss dead-letter rows",
4122
+ description: "Deletes every dead-letter row for the tenant matching the optional\n`binding_id` / `error_code` filters (no filters clears the whole\nDLQ). The rows are dismissed, not replayed.\n",
4123
+ tags: [
4124
+ "Delivery"
4125
+ ],
4126
+ parameters: [
4127
+ {
4128
+ in: "query",
4129
+ name: "binding_id",
4130
+ schema: {
4131
+ type: "string",
4132
+ format: "uuid"
4133
+ }
4134
+ },
4135
+ {
4136
+ in: "query",
4137
+ name: "error_code",
4138
+ schema: {
4139
+ type: "string"
4140
+ }
4141
+ }
4142
+ ],
4143
+ responses: {
4144
+ "200": {
4145
+ description: "Rows removed.",
4146
+ content: {
4147
+ "application/json": {
4148
+ schema: {
4149
+ type: "object",
4150
+ properties: {
4151
+ deleted: {
4152
+ type: "integer"
4153
+ }
4154
+ }
4155
+ }
4156
+ }
4157
+ }
4158
+ },
4159
+ "401": {
4160
+ $ref: "#/components/responses/Unauthorized"
4161
+ },
4162
+ "429": {
4163
+ $ref: "#/components/responses/RateLimitExceeded"
4164
+ }
4165
+ }
4166
+ }
4167
+ },
4168
+ "/v1/delivery/dlq/replay-all": {
4169
+ post: {
4170
+ operationId: "replayAllDeliveryDlq",
4171
+ summary: "Bulk re-enqueue dead-letter rows",
4172
+ description: "Deletes every dead-letter row for the tenant matching the optional\n`binding_id` / `error_code` filters and re-enqueues each as a fresh\nattempt-1 delivery (the retry ladder restarts). Idempotency keys are\nunchanged, so receivers that dedupe on\n`X-Talonic-Idempotency-Key` will dedupe the replays.\n",
4173
+ tags: [
4174
+ "Delivery"
4175
+ ],
4176
+ parameters: [
4177
+ {
4178
+ in: "query",
4179
+ name: "binding_id",
4180
+ schema: {
4181
+ type: "string",
4182
+ format: "uuid"
4183
+ }
4184
+ },
4185
+ {
4186
+ in: "query",
4187
+ name: "error_code",
4188
+ schema: {
4189
+ type: "string"
4190
+ }
4191
+ }
4192
+ ],
4193
+ responses: {
4194
+ "200": {
4195
+ description: "Replays enqueued.",
4196
+ content: {
4197
+ "application/json": {
4198
+ schema: {
4199
+ type: "object",
4200
+ properties: {
4201
+ replayed: {
4202
+ type: "integer"
4203
+ }
4204
+ }
4205
+ }
4206
+ }
4207
+ }
4208
+ },
4209
+ "401": {
4210
+ $ref: "#/components/responses/Unauthorized"
4211
+ },
4212
+ "429": {
4213
+ $ref: "#/components/responses/RateLimitExceeded"
4214
+ }
4215
+ }
4118
4216
  }
4119
4217
  },
4120
4218
  "/v1/delivery/dlq/{id}": {
@@ -4307,6 +4405,37 @@ var openapi_default = {
4307
4405
  $ref: "#/components/responses/RateLimitExceeded"
4308
4406
  }
4309
4407
  }
4408
+ },
4409
+ delete: {
4410
+ operationId: "cancelAllPendingRetries",
4411
+ summary: "Cancel all in-flight retries for the tenant",
4412
+ description: "Removes every delayed/waiting retry job across all the tenant's\nbindings. In-progress (`active`) jobs are not affected. Bounded to\nthe most recent jobs per state \u2014 under a deep backlog one call\nclears up to the cap and can be repeated.\n",
4413
+ tags: [
4414
+ "Delivery"
4415
+ ],
4416
+ responses: {
4417
+ "200": {
4418
+ description: "Retries cancelled.",
4419
+ content: {
4420
+ "application/json": {
4421
+ schema: {
4422
+ type: "object",
4423
+ properties: {
4424
+ cancelled: {
4425
+ type: "integer"
4426
+ }
4427
+ }
4428
+ }
4429
+ }
4430
+ }
4431
+ },
4432
+ "401": {
4433
+ $ref: "#/components/responses/Unauthorized"
4434
+ },
4435
+ "429": {
4436
+ $ref: "#/components/responses/RateLimitExceeded"
4437
+ }
4438
+ }
4310
4439
  }
4311
4440
  },
4312
4441
  "/v1/delivery/pending/{jobId}": {
@@ -10040,6 +10169,314 @@ var openapi_default = {
10040
10169
  }
10041
10170
  }
10042
10171
  },
10172
+ "/v1/ask": {
10173
+ post: {
10174
+ operationId: "ask",
10175
+ summary: "Ask a question over your documents",
10176
+ description: 'Ask a natural-language question over the workspace corpus and get back a cited,\nverified answer. This is the "replace your RAG stack" endpoint: instead of\nchunk-embed-retrieve, the Talonic agent plans over the structured field plane\n(three-plane retrieval: semantic field match, lexical value match, and document\ntext search), runs read-only SQL over extracted cells, extracts-and-persists\nmissing fields at query time, and grounds every load-bearing claim in an exact\nsource span.\n\nThe turn runs detached and typically takes 10-60 seconds, so the endpoint is\nasynchronous: it returns `202` with an `ask_id` immediately \u2014 poll\n`GET /v1/ask/{id}` (about every 2 seconds) for the answer.\n\nEach accepted ask charges one flat `agent_ask` credit unit (see `GET /v1/pricing`).\nThe turn is pinned to the least-privilege viewer role: only read tools run, every\nmutation is denied before it executes.\n',
10177
+ tags: [
10178
+ "Agent"
10179
+ ],
10180
+ requestBody: {
10181
+ required: true,
10182
+ content: {
10183
+ "application/json": {
10184
+ schema: {
10185
+ type: "object",
10186
+ required: [
10187
+ "question"
10188
+ ],
10189
+ properties: {
10190
+ question: {
10191
+ type: "string",
10192
+ maxLength: 2e4,
10193
+ description: "The natural-language question to answer over the workspace corpus.",
10194
+ example: "What is the payment term in the Globex contract, and where does it say so?"
10195
+ }
10196
+ }
10197
+ }
10198
+ }
10199
+ }
10200
+ },
10201
+ responses: {
10202
+ "202": {
10203
+ description: "Ask accepted; poll `poll_url` for the answer.",
10204
+ content: {
10205
+ "application/json": {
10206
+ schema: {
10207
+ type: "object",
10208
+ properties: {
10209
+ ask_id: {
10210
+ type: "string",
10211
+ format: "uuid"
10212
+ },
10213
+ status: {
10214
+ type: "string",
10215
+ enum: [
10216
+ "processing"
10217
+ ]
10218
+ },
10219
+ poll_url: {
10220
+ type: "string",
10221
+ example: "/v1/ask/3fa85f64-5717-4562-b3fc-2c963f66afa6"
10222
+ }
10223
+ }
10224
+ }
10225
+ }
10226
+ }
10227
+ },
10228
+ "400": {
10229
+ $ref: "#/components/responses/BadRequest"
10230
+ },
10231
+ "401": {
10232
+ $ref: "#/components/responses/Unauthorized"
10233
+ },
10234
+ "402": {
10235
+ description: "Insufficient credits. The body is the agent-actionable `insufficient_credits` contract with `buy_credits_url` and `pricing_url`."
10236
+ },
10237
+ "429": {
10238
+ $ref: "#/components/responses/RateLimitExceeded"
10239
+ }
10240
+ }
10241
+ }
10242
+ },
10243
+ "/v1/ask/{id}": {
10244
+ get: {
10245
+ operationId: "getAsk",
10246
+ summary: "Poll an ask for its answer",
10247
+ description: 'Poll a previously-started ask. Tenant-isolated: an ask that belongs to a different\nworkspace reads as not found. While the turn runs the response is\n`{ "status": "processing" }`; once completed it carries:\n\n- `answer` \u2014 the full answer in markdown, citations inline as links.\n- `citations[]` \u2014 the same citations structured: source `document_id`, the cited\n `quote`, whether it grounds a captured `field` or a verbatim `quote`, and a deep\n `app_url` that opens the document with the span highlighted.\n- `verification` \u2014 the post-answer verification verdict: a fast model re-checks the\n answer\'s claims against the turn\'s own tool evidence (`supported` | `issues` |\n `unverifiable`, with check counts and an optional correction). Treat `issues` as a\n review pointer, not ground truth.\n- `usage` \u2014 token count and the flat `credits_charged`.\n',
10248
+ tags: [
10249
+ "Agent"
10250
+ ],
10251
+ parameters: [
10252
+ {
10253
+ name: "id",
10254
+ in: "path",
10255
+ required: true,
10256
+ schema: {
10257
+ type: "string",
10258
+ format: "uuid"
10259
+ }
10260
+ }
10261
+ ],
10262
+ responses: {
10263
+ "200": {
10264
+ description: "The ask's current state (processing, completed, or error).",
10265
+ content: {
10266
+ "application/json": {
10267
+ schema: {
10268
+ type: "object",
10269
+ properties: {
10270
+ ask_id: {
10271
+ type: "string",
10272
+ format: "uuid"
10273
+ },
10274
+ status: {
10275
+ type: "string",
10276
+ enum: [
10277
+ "processing",
10278
+ "completed",
10279
+ "error"
10280
+ ]
10281
+ },
10282
+ poll_url: {
10283
+ type: "string"
10284
+ },
10285
+ answer: {
10286
+ type: "string",
10287
+ description: "Markdown answer (present when completed)."
10288
+ },
10289
+ citations: {
10290
+ type: "array",
10291
+ items: {
10292
+ type: "object",
10293
+ properties: {
10294
+ quote: {
10295
+ type: "string"
10296
+ },
10297
+ document_id: {
10298
+ type: "string",
10299
+ format: "uuid"
10300
+ },
10301
+ kind: {
10302
+ type: "string",
10303
+ enum: [
10304
+ "field",
10305
+ "quote"
10306
+ ]
10307
+ },
10308
+ reference: {
10309
+ type: "string"
10310
+ },
10311
+ app_url: {
10312
+ type: "string"
10313
+ }
10314
+ }
10315
+ }
10316
+ },
10317
+ verification: {
10318
+ type: "object",
10319
+ nullable: true,
10320
+ properties: {
10321
+ verdict: {
10322
+ type: "string",
10323
+ enum: [
10324
+ "supported",
10325
+ "issues",
10326
+ "unverifiable"
10327
+ ]
10328
+ },
10329
+ checks_total: {
10330
+ type: "integer"
10331
+ },
10332
+ checks_unsupported: {
10333
+ type: "integer"
10334
+ },
10335
+ correction: {
10336
+ type: "string"
10337
+ }
10338
+ }
10339
+ },
10340
+ usage: {
10341
+ type: "object",
10342
+ properties: {
10343
+ tokens: {
10344
+ type: "integer",
10345
+ nullable: true
10346
+ },
10347
+ credits_charged: {
10348
+ type: "integer"
10349
+ }
10350
+ }
10351
+ }
10352
+ }
10353
+ }
10354
+ }
10355
+ }
10356
+ },
10357
+ "401": {
10358
+ $ref: "#/components/responses/Unauthorized"
10359
+ },
10360
+ "404": {
10361
+ $ref: "#/components/responses/NotFound"
10362
+ },
10363
+ "429": {
10364
+ $ref: "#/components/responses/RateLimitExceeded"
10365
+ }
10366
+ }
10367
+ }
10368
+ },
10369
+ "/v1/agent/query": {
10370
+ post: {
10371
+ operationId: "startAgentQuery",
10372
+ summary: "Ask the agent (legacy alias of /v1/ask)",
10373
+ description: "Legacy alias of `POST /v1/ask` with a minimal response shape. Starts a read-only\nagent turn (202) to poll via `GET /v1/agent/query/{id}`, which returns only\n`status` and the plain `answer` text. New integrations should use `/v1/ask`,\nwhich adds structured citations, the verification verdict, and usage. Charges the\nsame flat `agent_ask` unit.\n",
10374
+ tags: [
10375
+ "Agent"
10376
+ ],
10377
+ requestBody: {
10378
+ required: true,
10379
+ content: {
10380
+ "application/json": {
10381
+ schema: {
10382
+ type: "object",
10383
+ required: [
10384
+ "query"
10385
+ ],
10386
+ properties: {
10387
+ query: {
10388
+ type: "string",
10389
+ maxLength: 2e4
10390
+ }
10391
+ }
10392
+ }
10393
+ }
10394
+ }
10395
+ },
10396
+ responses: {
10397
+ "202": {
10398
+ description: "Turn started.",
10399
+ content: {
10400
+ "application/json": {
10401
+ schema: {
10402
+ type: "object",
10403
+ properties: {
10404
+ turnId: {
10405
+ type: "string",
10406
+ format: "uuid"
10407
+ }
10408
+ }
10409
+ }
10410
+ }
10411
+ }
10412
+ },
10413
+ "400": {
10414
+ $ref: "#/components/responses/BadRequest"
10415
+ },
10416
+ "401": {
10417
+ $ref: "#/components/responses/Unauthorized"
10418
+ },
10419
+ "402": {
10420
+ description: "Insufficient credits (`insufficient_credits` contract)."
10421
+ },
10422
+ "429": {
10423
+ $ref: "#/components/responses/RateLimitExceeded"
10424
+ }
10425
+ }
10426
+ }
10427
+ },
10428
+ "/v1/agent/query/{id}": {
10429
+ get: {
10430
+ operationId: "getAgentQuery",
10431
+ summary: "Poll an agent query (legacy alias)",
10432
+ description: "Poll a turn started via `POST /v1/agent/query`. Returns `status` and the plain answer text; empty until the turn completes.",
10433
+ tags: [
10434
+ "Agent"
10435
+ ],
10436
+ parameters: [
10437
+ {
10438
+ name: "id",
10439
+ in: "path",
10440
+ required: true,
10441
+ schema: {
10442
+ type: "string",
10443
+ format: "uuid"
10444
+ }
10445
+ }
10446
+ ],
10447
+ responses: {
10448
+ "200": {
10449
+ description: "The turn's status and answer.",
10450
+ content: {
10451
+ "application/json": {
10452
+ schema: {
10453
+ type: "object",
10454
+ properties: {
10455
+ status: {
10456
+ type: "string",
10457
+ enum: [
10458
+ "processing",
10459
+ "completed",
10460
+ "error"
10461
+ ]
10462
+ },
10463
+ answer: {
10464
+ type: "string"
10465
+ }
10466
+ }
10467
+ }
10468
+ }
10469
+ }
10470
+ },
10471
+ "401": {
10472
+ $ref: "#/components/responses/Unauthorized"
10473
+ },
10474
+ "404": {
10475
+ $ref: "#/components/responses/NotFound"
10476
+ }
10477
+ }
10478
+ }
10479
+ },
10043
10480
  "/v1/agent/context": {
10044
10481
  get: {
10045
10482
  operationId: "getAgentContext",
@@ -17141,7 +17578,7 @@ var openapi_default = {
17141
17578
  document_ids: {
17142
17579
  type: "array",
17143
17580
  minItems: 1,
17144
- maxItems: 1e4,
17581
+ maxItems: 3e3,
17145
17582
  items: {
17146
17583
  type: "string",
17147
17584
  format: "uuid"
@@ -17151,6 +17588,14 @@ var openapi_default = {
17151
17588
  type: "string",
17152
17589
  minLength: 1,
17153
17590
  maxLength: 200
17591
+ },
17592
+ pipeline_mode: {
17593
+ type: "string",
17594
+ enum: [
17595
+ "new",
17596
+ "append"
17597
+ ],
17598
+ description: "Explicit override of the Spec's configured pipeline mode. `append` adds the documents to the newest eligible existing pipeline on the Spec (config-matching, under the size cap) instead of creating one; the response's `appended` reports which happened. Omitted \u2192 the Spec's own setting (default `new`).\n"
17154
17599
  }
17155
17600
  }
17156
17601
  }
@@ -17159,10 +17604,19 @@ var openapi_default = {
17159
17604
  },
17160
17605
  responses: {
17161
17606
  "201": {
17162
- description: "Created pipeline run with links to progress + data-product."
17607
+ description: "Created pipeline run with links to progress + data-product. `appended: true` marks an append-mode reuse of an existing pipeline (its id is returned)."
17163
17608
  },
17164
17609
  "400": {
17165
17610
  description: "The Spec has no composed rail, or the body failed validation."
17611
+ },
17612
+ "413": {
17613
+ description: "The request exceeds the tested per-run document ceiling."
17614
+ },
17615
+ "429": {
17616
+ description: "The pipeline queue lacks tested headroom; retry after the advised delay."
17617
+ },
17618
+ "503": {
17619
+ description: "Pipeline queue headroom or durable fan-out could not be verified."
17166
17620
  }
17167
17621
  }
17168
17622
  }
@@ -17418,6 +17872,27 @@ var openapi_default = {
17418
17872
  metadata: {
17419
17873
  type: "string",
17420
17874
  description: "Optional JSON string of a FLAT object `{ [key]: string | number | boolean | null }` (nested objects/arrays are rejected 400; limits: \u226450 keys, key \u2264128 chars, string value \u22641024 chars). The validated object is persisted on the run request (echoed by GET /v1/run/{id}) AND stamped on every ingested document as documents.client_metadata.\n"
17875
+ },
17876
+ file_metadata: {
17877
+ type: "string",
17878
+ description: "Optional JSON string of a map `{ [inputKey: string]: ClientMetadata }` for tagging individual files in a multi-file call \u2014 each value obeys the same constraints as `metadata` (\u226450 keys, key \u2264128 chars, string value \u22641024 chars). `inputKey` is the input's identity: for `files`, the uploaded filename exactly as echoed back in `documents[]` (filenames are NFC-normalized before matching, so an umlaut/NFD name still keys correctly); for `file_urls`, the exact URL string (no trim, no normalization). A key matching several same-named inputs applies to ALL of them; a key matching NO input is a 400 `invalid_metadata` naming the offending key, so a typo'd filename fails loudly instead of silently tagging nothing. Per input, the file's bag is merged OVER the call-level `metadata` \u2014 per-file wins per key, and `null` is a value (it overrides), never a deletion, so a per-file entry cannot unset a call-level key. The MERGED result must still satisfy the caps above (a 30-key call bag plus a disjoint 30-key file bag is rejected, not silently truncated) \u2014 400 `invalid_metadata` otherwise. The map itself is capped at the call's max input count (20) entries and 64 KB of decoded JSON; the size cap binds BEFORE per-entry validation, so 20 individually-legal maximal bags can still exceed it. Container inputs (ZIP/email) key by the archive's filename only \u2014 a key can target the archive, never its extracted members, which inherit the archive's merged bag. The resolved per-input bag is echoed back in `documents[].metadata` on this response and on GET /v1/run/{id}.\n"
17879
+ },
17880
+ pipeline_mode: {
17881
+ type: "string",
17882
+ enum: [
17883
+ "new",
17884
+ "append"
17885
+ ],
17886
+ description: "Explicit override of the Spec's configured pipeline mode. `new` (the default when neither this nor the Spec sets a mode) creates a fresh pipeline per call. `append` adds this call's documents to the newest eligible existing pipeline on the Spec \u2014 so bulk uploads accumulate into one growing table instead of one pipeline per call. A pipeline is eligible when its config still matches the Spec (schema fields, policies, gates, assembly/review config) and it is under the append size cap; otherwise a fresh pipeline is created and becomes the new append target. Under append, completion is PER REQUEST: the run.completed webhook and GET /v1/run/{id} report this request's own documents (payloads carry run_id and are scoped to them), and the shared pipeline fires no pipeline-level run.* webhook.\n"
17887
+ },
17888
+ ingestion_target: {
17889
+ type: "string",
17890
+ enum: [
17891
+ "ingest",
17892
+ "extract"
17893
+ ],
17894
+ default: "ingest",
17895
+ description: "How far the platform processes the run's documents beyond the Spec pipeline. `ingest` (default): after OCR, Stage-2 field capture runs asynchronously so the corpus becomes queryable by the agent surfaces (POST /v1/ask) and the pipeline's Transfer phase \u2014 the pipeline still starts the moment OCR markdown is ready, capture never delays it. `extract`: markdown-only; the documents are not askable.\n"
17421
17896
  }
17422
17897
  }
17423
17898
  }
@@ -17496,6 +17971,11 @@ var openapi_default = {
17496
17971
  type: "string",
17497
17972
  format: "uuid",
17498
17973
  description: "Present only when deduplicated is true \u2014 the thin per-upload link row created for this input."
17974
+ },
17975
+ metadata: {
17976
+ type: "object",
17977
+ additionalProperties: true,
17978
+ description: "This input's EFFECTIVE metadata for THIS request \u2014 the call-level `metadata` merged with its `file_metadata` entry (per-file wins), captured at submit. Present only when set. Under byte-identical dedup this can legitimately diverge from GET /v1/documents/{id}'s `metadata`, which keeps the CANONICAL document's tags from its FIRST submission \u2014 this echo is the authoritative per-request tag source; read it (not the document) to see what THIS call tagged.\n"
17499
17979
  }
17500
17980
  },
17501
17981
  example: {
@@ -17522,7 +18002,10 @@ var openapi_default = {
17522
18002
  description: "A file exceeds the tier's per-file size cap."
17523
18003
  },
17524
18004
  "429": {
17525
- $ref: "#/components/responses/RateLimitExceeded"
18005
+ description: "API rate limit or pipeline-queue admission limit reached; retry after the advised delay."
18006
+ },
18007
+ "503": {
18008
+ description: "Pipeline queue headroom could not be verified before ingest."
17526
18009
  }
17527
18010
  }
17528
18011
  }
@@ -17580,6 +18063,14 @@ var openapi_default = {
17580
18063
  format: "uuid",
17581
18064
  nullable: true
17582
18065
  },
18066
+ pipeline_mode: {
18067
+ type: "string",
18068
+ enum: [
18069
+ "new",
18070
+ "append"
18071
+ ],
18072
+ description: "The EFFECTIVE mode this request resolved to (present only when recorded \u2014 omitted for legacy requests). Under `append` the pipeline is shared across requests, and `status`/`progress` are scoped to THIS request's own documents (the same all-terminal fold the per-request webhook fires on), not the whole pipeline.\n"
18073
+ },
17583
18074
  input_count: {
17584
18075
  type: "integer"
17585
18076
  },
@@ -17664,6 +18155,11 @@ var openapi_default = {
17664
18155
  format: "uuid",
17665
18156
  description: "Present only when deduplicated is true."
17666
18157
  },
18158
+ metadata: {
18159
+ type: "object",
18160
+ additionalProperties: true,
18161
+ description: "This input's EFFECTIVE per-request metadata, echoed from submit time (see POST /v1/run's documents[].metadata). Present only when set.\n"
18162
+ },
17667
18163
  status: {
17668
18164
  type: "string",
17669
18165
  enum: [
@@ -20273,6 +20769,15 @@ var openapi_default = {
20273
20769
  },
20274
20770
  description: "Fields that have been manually corrected (locked at confidence 1.0)."
20275
20771
  },
20772
+ batch_id: {
20773
+ type: "string",
20774
+ description: "The caller grouping key stamped on this document at ingestion (documents.client_batch_id) \u2014 e.g. from POST /v1/run or POST /v1/sources/:id/documents. Present only when set.\n"
20775
+ },
20776
+ metadata: {
20777
+ type: "object",
20778
+ additionalProperties: true,
20779
+ description: "The caller's flat metadata bag stamped on this document at ingestion (documents.client_metadata) \u2014 for a /v1/run input, its per-request EFFECTIVE merged bag (call-level metadata merged with any file_metadata entry). Present only when set.\n"
20780
+ },
20276
20781
  processing: {
20277
20782
  type: "object",
20278
20783
  properties: {
@@ -25440,6 +25945,11 @@ var API_NAV_SECTIONS = [
25440
25945
  { id: "extract-include-markdown", label: "Options" },
25441
25946
  { id: "extract-processing-mode", label: "Responses" }
25442
25947
  ] },
25948
+ { id: "ask", label: "Ask", children: [
25949
+ { id: "post-ask", label: "POST /v1/ask" },
25950
+ { id: "ask-results", label: "Poll & Results" },
25951
+ { id: "ask-citations-verification", label: "Citations & Verification" }
25952
+ ] },
25443
25953
  { id: "documents", label: "Documents", children: [
25444
25954
  { id: "list-documents", label: "List Documents" },
25445
25955
  { id: "get-document", label: "Get Document" },
@@ -25569,7 +26079,8 @@ var API_NAV_SECTIONS = [
25569
26079
  ] },
25570
26080
  { id: "agent", label: "Agent", children: [
25571
26081
  { id: "agent-context", label: "Get Workspace Context" },
25572
- { id: "agent-tools", label: "List Agent Tools" }
26082
+ { id: "agent-tools", label: "List Agent Tools" },
26083
+ { id: "agent-query", label: "Agent Query (Legacy)" }
25573
26084
  ] },
25574
26085
  { id: "matching", label: "Matching", children: [
25575
26086
  { id: "list-matching-configs", label: "List Configs" },
@@ -25780,6 +26291,8 @@ var PLATFORM_NAV_SECTIONS = [
25780
26291
  ] },
25781
26292
  { id: "agent", label: "AI Agent", children: [
25782
26293
  { id: "agent-capabilities", label: "Capabilities" },
26294
+ { id: "agent-ask-workflow", label: "How the Agent Answers" },
26295
+ { id: "agent-playground-onboarding", label: "Playground Onboarding" },
25783
26296
  { id: "agent-impact", label: "Impact Levels" },
25784
26297
  { id: "agent-dashboard", label: "Dashboard" }
25785
26298
  ] },
@@ -25873,6 +26386,14 @@ var PLATFORM_NAV_SECTIONS = [
25873
26386
  { id: "reference-primitives", label: "Reference Primitives" },
25874
26387
  { id: "change-review", label: "Change Review" }
25875
26388
  ] },
26389
+ { id: "enterprise-archive", label: "Enterprise Archive", children: [
26390
+ { id: "archive-overview", label: "Archive Overview" },
26391
+ { id: "retention-and-deletion", label: "Retention & Deletion" },
26392
+ { id: "legal-holds", label: "Legal Holds" },
26393
+ { id: "audit-trail", label: "Audit Trail" },
26394
+ { id: "security-architecture", label: "Security Architecture" },
26395
+ { id: "export-bundle-format", label: "Export Bundle Format" }
26396
+ ] },
25876
26397
  { id: "search-filtering", label: "Search & Filtering", children: [
25877
26398
  { id: "omnisearch", label: "Omnisearch" },
25878
26399
  { id: "document-filters", label: "Document Filters" }
@@ -25892,6 +26413,7 @@ var PLATFORM_NAV_SECTIONS = [
25892
26413
  var API_SECTION_META = [
25893
26414
  { id: "overview", title: "API Overview", description: "Introduction, authentication, base URL, and quick start guide for the Talonic document extraction API." },
25894
26415
  { id: "extract", title: "Extract Endpoint", description: "POST /v1/extract \u2014 send a document and schema, receive structured validated data. Supports PDF, DOCX, images, and 25+ formats." },
26416
+ { id: "ask", title: "Ask API", description: "POST /v1/ask \u2014 natural-language questions over the whole workspace corpus with per-claim citations, source-span deep links, and a post-answer verification verdict. One flat credit unit per question." },
25895
26417
  { id: "documents", title: "Documents API", description: "List, retrieve, and delete documents. Each document retains its original file, extracted text, and metadata." },
25896
26418
  { id: "extractions", title: "Extractions API", description: "Query extraction results, retrieve structured data with confidence scores, and submit field corrections." },
25897
26419
  { id: "schemas", title: "Schemas API", description: "Create, update, and manage reusable extraction schemas. Supports JSON Schema, simplified fields, and flat key-type maps." },
@@ -25943,6 +26465,7 @@ var PLATFORM_SECTION_META = [
25943
26465
  { id: "validation-quality", title: "Validation & Benchmarks", description: "Automated validation checks, Ground Truth benchmarking, configurable review gates, and Record Review for flagged results." },
25944
26466
  { id: "delivery", title: "Outputs & Delivery", description: "Push structured data to webhooks, REST APIs, SFTP, email, or cloud storage with field mappings, triggers, delivery configuration, and telemetry." },
25945
26467
  { id: "workspace-settings", title: "Workspace Settings", description: "Shared dialects for output formatting, reference primitives for lookup tables, and change review governance for production workspaces." },
26468
+ { id: "enterprise-archive", title: "Enterprise Archive", description: "Retention policies with review-gated disposition, fail-closed legal holds, archive mode with tombstones, and a tamper-evident hash-chained audit trail." },
25946
26469
  { id: "search-filtering", title: "Search & Filtering", description: "Global omnisearch (Cmd+K) and advanced document filtering by extracted field values with saved presets." },
25947
26470
  { id: "api-webhooks", title: "API & Webhooks", description: "API key management, public REST API overview, and webhook configuration for event-driven integrations." },
25948
26471
  { id: "team-admin", title: "Team & Admin", description: "Role-based access control, credit usage tracking, admin panel, and keyboard shortcuts." }
@@ -26104,6 +26627,8 @@ var LLMS_TXT = `# Talonic
26104
26627
  - [Linking & Cases](https://talonic.com/docs/platform/entity-linking): Entity linking, link keys, cases, anomaly detection
26105
26628
  - [Validation & Quality](https://talonic.com/docs/platform/validation-checks): Golden samples, approval gates, ground truth benchmarks
26106
26629
  - [Delivery](https://talonic.com/docs/platform/destinations): Webhooks, REST, SFTP, email, S3/R2, field mappings, triggers
26630
+ - [Enterprise Archive](https://talonic.com/docs/platform/archive-overview): Retention policies, legal holds, review-gated disposition, tamper-evident audit trail
26631
+ - [Archive Security Architecture](https://talonic.com/docs/platform/security-architecture): Fixity verification cycles, hash-chain anchoring, write-once encrypted storage, compartments, MFA/step-up, SCIM, export bundles
26107
26632
 
26108
26633
  ## Document Types
26109
26634
 
@@ -26124,7 +26649,7 @@ var LLMS_TXT = `# Talonic
26124
26649
  - [Pricing](https://talonic.com/pricing): Free (5,000 credits/mo), Pro (\u20AC49/mo), Enterprise (custom)
26125
26650
  - [Developers](https://talonic.com/developers): Three Modes, API, SDK, MCP server overview
26126
26651
  - [DIN SPEC 91491](https://talonic.com/din-91491): Europe's first standard for AI-ready data
26127
- - [Security](https://talonic.com/security): GDPR, HIPAA, ISO 27001, ISO 42001, EU data residency
26652
+ - [Security](https://talonic.com/security): GDPR-aligned archive controls (retention, legal hold, erasure, tamper-evident audit), EU data residency
26128
26653
  - [Contact](https://talonic.com/contact): Book a demo or request a schema audit
26129
26654
 
26130
26655
  ## Optional