@talonic/docs 0.21.7 → 0.21.8

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
@@ -10020,6 +10020,314 @@
10020
10020
  }
10021
10021
  }
10022
10022
  },
10023
+ "/v1/ask": {
10024
+ "post": {
10025
+ "operationId": "ask",
10026
+ "summary": "Ask a question over your documents",
10027
+ "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 — 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",
10028
+ "tags": [
10029
+ "Agent"
10030
+ ],
10031
+ "requestBody": {
10032
+ "required": true,
10033
+ "content": {
10034
+ "application/json": {
10035
+ "schema": {
10036
+ "type": "object",
10037
+ "required": [
10038
+ "question"
10039
+ ],
10040
+ "properties": {
10041
+ "question": {
10042
+ "type": "string",
10043
+ "maxLength": 20000,
10044
+ "description": "The natural-language question to answer over the workspace corpus.",
10045
+ "example": "What is the payment term in the Globex contract, and where does it say so?"
10046
+ }
10047
+ }
10048
+ }
10049
+ }
10050
+ }
10051
+ },
10052
+ "responses": {
10053
+ "202": {
10054
+ "description": "Ask accepted; poll `poll_url` for the answer.",
10055
+ "content": {
10056
+ "application/json": {
10057
+ "schema": {
10058
+ "type": "object",
10059
+ "properties": {
10060
+ "ask_id": {
10061
+ "type": "string",
10062
+ "format": "uuid"
10063
+ },
10064
+ "status": {
10065
+ "type": "string",
10066
+ "enum": [
10067
+ "processing"
10068
+ ]
10069
+ },
10070
+ "poll_url": {
10071
+ "type": "string",
10072
+ "example": "/v1/ask/3fa85f64-5717-4562-b3fc-2c963f66afa6"
10073
+ }
10074
+ }
10075
+ }
10076
+ }
10077
+ }
10078
+ },
10079
+ "400": {
10080
+ "$ref": "#/components/responses/BadRequest"
10081
+ },
10082
+ "401": {
10083
+ "$ref": "#/components/responses/Unauthorized"
10084
+ },
10085
+ "402": {
10086
+ "description": "Insufficient credits. The body is the agent-actionable `insufficient_credits` contract with `buy_credits_url` and `pricing_url`."
10087
+ },
10088
+ "429": {
10089
+ "$ref": "#/components/responses/RateLimitExceeded"
10090
+ }
10091
+ }
10092
+ }
10093
+ },
10094
+ "/v1/ask/{id}": {
10095
+ "get": {
10096
+ "operationId": "getAsk",
10097
+ "summary": "Poll an ask for its answer",
10098
+ "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` — the full answer in markdown, citations inline as links.\n- `citations[]` — 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` — 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` — token count and the flat `credits_charged`.\n",
10099
+ "tags": [
10100
+ "Agent"
10101
+ ],
10102
+ "parameters": [
10103
+ {
10104
+ "name": "id",
10105
+ "in": "path",
10106
+ "required": true,
10107
+ "schema": {
10108
+ "type": "string",
10109
+ "format": "uuid"
10110
+ }
10111
+ }
10112
+ ],
10113
+ "responses": {
10114
+ "200": {
10115
+ "description": "The ask's current state (processing, completed, or error).",
10116
+ "content": {
10117
+ "application/json": {
10118
+ "schema": {
10119
+ "type": "object",
10120
+ "properties": {
10121
+ "ask_id": {
10122
+ "type": "string",
10123
+ "format": "uuid"
10124
+ },
10125
+ "status": {
10126
+ "type": "string",
10127
+ "enum": [
10128
+ "processing",
10129
+ "completed",
10130
+ "error"
10131
+ ]
10132
+ },
10133
+ "poll_url": {
10134
+ "type": "string"
10135
+ },
10136
+ "answer": {
10137
+ "type": "string",
10138
+ "description": "Markdown answer (present when completed)."
10139
+ },
10140
+ "citations": {
10141
+ "type": "array",
10142
+ "items": {
10143
+ "type": "object",
10144
+ "properties": {
10145
+ "quote": {
10146
+ "type": "string"
10147
+ },
10148
+ "document_id": {
10149
+ "type": "string",
10150
+ "format": "uuid"
10151
+ },
10152
+ "kind": {
10153
+ "type": "string",
10154
+ "enum": [
10155
+ "field",
10156
+ "quote"
10157
+ ]
10158
+ },
10159
+ "reference": {
10160
+ "type": "string"
10161
+ },
10162
+ "app_url": {
10163
+ "type": "string"
10164
+ }
10165
+ }
10166
+ }
10167
+ },
10168
+ "verification": {
10169
+ "type": "object",
10170
+ "nullable": true,
10171
+ "properties": {
10172
+ "verdict": {
10173
+ "type": "string",
10174
+ "enum": [
10175
+ "supported",
10176
+ "issues",
10177
+ "unverifiable"
10178
+ ]
10179
+ },
10180
+ "checks_total": {
10181
+ "type": "integer"
10182
+ },
10183
+ "checks_unsupported": {
10184
+ "type": "integer"
10185
+ },
10186
+ "correction": {
10187
+ "type": "string"
10188
+ }
10189
+ }
10190
+ },
10191
+ "usage": {
10192
+ "type": "object",
10193
+ "properties": {
10194
+ "tokens": {
10195
+ "type": "integer",
10196
+ "nullable": true
10197
+ },
10198
+ "credits_charged": {
10199
+ "type": "integer"
10200
+ }
10201
+ }
10202
+ }
10203
+ }
10204
+ }
10205
+ }
10206
+ }
10207
+ },
10208
+ "401": {
10209
+ "$ref": "#/components/responses/Unauthorized"
10210
+ },
10211
+ "404": {
10212
+ "$ref": "#/components/responses/NotFound"
10213
+ },
10214
+ "429": {
10215
+ "$ref": "#/components/responses/RateLimitExceeded"
10216
+ }
10217
+ }
10218
+ }
10219
+ },
10220
+ "/v1/agent/query": {
10221
+ "post": {
10222
+ "operationId": "startAgentQuery",
10223
+ "summary": "Ask the agent (legacy alias of /v1/ask)",
10224
+ "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",
10225
+ "tags": [
10226
+ "Agent"
10227
+ ],
10228
+ "requestBody": {
10229
+ "required": true,
10230
+ "content": {
10231
+ "application/json": {
10232
+ "schema": {
10233
+ "type": "object",
10234
+ "required": [
10235
+ "query"
10236
+ ],
10237
+ "properties": {
10238
+ "query": {
10239
+ "type": "string",
10240
+ "maxLength": 20000
10241
+ }
10242
+ }
10243
+ }
10244
+ }
10245
+ }
10246
+ },
10247
+ "responses": {
10248
+ "202": {
10249
+ "description": "Turn started.",
10250
+ "content": {
10251
+ "application/json": {
10252
+ "schema": {
10253
+ "type": "object",
10254
+ "properties": {
10255
+ "turnId": {
10256
+ "type": "string",
10257
+ "format": "uuid"
10258
+ }
10259
+ }
10260
+ }
10261
+ }
10262
+ }
10263
+ },
10264
+ "400": {
10265
+ "$ref": "#/components/responses/BadRequest"
10266
+ },
10267
+ "401": {
10268
+ "$ref": "#/components/responses/Unauthorized"
10269
+ },
10270
+ "402": {
10271
+ "description": "Insufficient credits (`insufficient_credits` contract)."
10272
+ },
10273
+ "429": {
10274
+ "$ref": "#/components/responses/RateLimitExceeded"
10275
+ }
10276
+ }
10277
+ }
10278
+ },
10279
+ "/v1/agent/query/{id}": {
10280
+ "get": {
10281
+ "operationId": "getAgentQuery",
10282
+ "summary": "Poll an agent query (legacy alias)",
10283
+ "description": "Poll a turn started via `POST /v1/agent/query`. Returns `status` and the plain answer text; empty until the turn completes.",
10284
+ "tags": [
10285
+ "Agent"
10286
+ ],
10287
+ "parameters": [
10288
+ {
10289
+ "name": "id",
10290
+ "in": "path",
10291
+ "required": true,
10292
+ "schema": {
10293
+ "type": "string",
10294
+ "format": "uuid"
10295
+ }
10296
+ }
10297
+ ],
10298
+ "responses": {
10299
+ "200": {
10300
+ "description": "The turn's status and answer.",
10301
+ "content": {
10302
+ "application/json": {
10303
+ "schema": {
10304
+ "type": "object",
10305
+ "properties": {
10306
+ "status": {
10307
+ "type": "string",
10308
+ "enum": [
10309
+ "processing",
10310
+ "completed",
10311
+ "error"
10312
+ ]
10313
+ },
10314
+ "answer": {
10315
+ "type": "string"
10316
+ }
10317
+ }
10318
+ }
10319
+ }
10320
+ }
10321
+ },
10322
+ "401": {
10323
+ "$ref": "#/components/responses/Unauthorized"
10324
+ },
10325
+ "404": {
10326
+ "$ref": "#/components/responses/NotFound"
10327
+ }
10328
+ }
10329
+ }
10330
+ },
10023
10331
  "/v1/agent/context": {
10024
10332
  "get": {
10025
10333
  "operationId": "getAgentContext",
@@ -17121,7 +17429,7 @@
17121
17429
  "document_ids": {
17122
17430
  "type": "array",
17123
17431
  "minItems": 1,
17124
- "maxItems": 10000,
17432
+ "maxItems": 3000,
17125
17433
  "items": {
17126
17434
  "type": "string",
17127
17435
  "format": "uuid"
@@ -17143,6 +17451,15 @@
17143
17451
  },
17144
17452
  "400": {
17145
17453
  "description": "The Spec has no composed rail, or the body failed validation."
17454
+ },
17455
+ "413": {
17456
+ "description": "The request exceeds the tested per-run document ceiling."
17457
+ },
17458
+ "429": {
17459
+ "description": "The pipeline queue lacks tested headroom; retry after the advised delay."
17460
+ },
17461
+ "503": {
17462
+ "description": "Pipeline queue headroom or durable fan-out could not be verified."
17146
17463
  }
17147
17464
  }
17148
17465
  }
@@ -17398,6 +17715,15 @@
17398
17715
  "metadata": {
17399
17716
  "type": "string",
17400
17717
  "description": "Optional JSON string of a FLAT object `{ [key]: string | number | boolean | null }` (nested objects/arrays are rejected 400; limits: ≤50 keys, key ≤128 chars, string value ≤1024 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"
17718
+ },
17719
+ "ingestion_target": {
17720
+ "type": "string",
17721
+ "enum": [
17722
+ "ingest",
17723
+ "extract"
17724
+ ],
17725
+ "default": "ingest",
17726
+ "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 — the pipeline still starts the moment OCR markdown is ready, capture never delays it. `extract`: markdown-only; the documents are not askable.\n"
17401
17727
  }
17402
17728
  }
17403
17729
  }
@@ -17502,7 +17828,10 @@
17502
17828
  "description": "A file exceeds the tier's per-file size cap."
17503
17829
  },
17504
17830
  "429": {
17505
- "$ref": "#/components/responses/RateLimitExceeded"
17831
+ "description": "API rate limit or pipeline-queue admission limit reached; retry after the advised delay."
17832
+ },
17833
+ "503": {
17834
+ "description": "Pipeline queue headroom could not be verified before ingest."
17506
17835
  }
17507
17836
  }
17508
17837
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@talonic/docs",
3
- "version": "0.21.7",
3
+ "version": "0.21.8",
4
4
  "description": "Talonic documentation components — API Reference & Platform Guide",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,