@talonic/docs 0.21.23 → 0.21.25

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
@@ -50,6 +50,10 @@ var openapi_default = {
50
50
  name: "Schemas",
51
51
  description: "Create and manage reusable extraction schemas, schema graph classes, output dialects, and the field registry."
52
52
  },
53
+ {
54
+ name: "Specs",
55
+ description: "Read the authoring documents behind `/specs/{id}`: identity, published versions, the ordered stages with their live per-stage ids, and the Spec-field to schema-field correspondence. A Spec and the schema it runs on are two records with two ids \u2014 `schema_id` here and `spec_id` on `/v1/schemas` bridge them. Read-only; authoring happens in the Spec editor.\n"
56
+ },
53
57
  {
54
58
  name: "Jobs & Batches",
55
59
  description: "Track async processing jobs, poll for completion, retrieve result grids, and manage batch inference runs at 50% cost."
@@ -134,6 +138,10 @@ var openapi_default = {
134
138
  name: "Agent",
135
139
  description: "Workspace context and tool registry for the embedded AI agent. Read-only."
136
140
  },
141
+ {
142
+ name: "Agent Tasks",
143
+ description: "Pull worklist for external AI agents at Agent (via MCP) stages. Tasks use leased claims and declared-field result submission."
144
+ },
137
145
  {
138
146
  name: "Account",
139
147
  description: "Self-serve account introspection (tier, status, credits, daily limits, today's usage) and programmatic API-key management."
@@ -15636,6 +15644,154 @@ var openapi_default = {
15636
15644
  }
15637
15645
  }
15638
15646
  },
15647
+ "/v1/specs": {
15648
+ get: {
15649
+ tags: [
15650
+ "Specs"
15651
+ ],
15652
+ summary: "List Specs",
15653
+ description: "Every Spec in the workspace. A Spec is the authoring document behind\n`/specs/{id}` in the app; running it materializes onto a schema, and\n`schema_id` on each row is that schema \u2014 a **different** id from the\nSpec's own. Pair with `spec_id` on `GET /v1/schemas` to cross in the\nother direction.\n",
15654
+ operationId: "listSpecs",
15655
+ parameters: [
15656
+ {
15657
+ $ref: "#/components/parameters/Limit"
15658
+ },
15659
+ {
15660
+ $ref: "#/components/parameters/Cursor"
15661
+ },
15662
+ {
15663
+ $ref: "#/components/parameters/Order"
15664
+ },
15665
+ {
15666
+ name: "search",
15667
+ in: "query",
15668
+ schema: {
15669
+ type: "string"
15670
+ },
15671
+ description: "Case-insensitive name search."
15672
+ }
15673
+ ],
15674
+ responses: {
15675
+ "200": {
15676
+ description: "Paginated list of Specs.",
15677
+ content: {
15678
+ "application/json": {
15679
+ schema: {
15680
+ allOf: [
15681
+ {
15682
+ $ref: "#/components/schemas/PaginatedResponse"
15683
+ },
15684
+ {
15685
+ type: "object",
15686
+ properties: {
15687
+ data: {
15688
+ type: "array",
15689
+ items: {
15690
+ $ref: "#/components/schemas/SpecSummary"
15691
+ }
15692
+ }
15693
+ }
15694
+ }
15695
+ ]
15696
+ }
15697
+ }
15698
+ }
15699
+ },
15700
+ "401": {
15701
+ $ref: "#/components/responses/Unauthorized"
15702
+ },
15703
+ "429": {
15704
+ $ref: "#/components/responses/RateLimitExceeded"
15705
+ }
15706
+ }
15707
+ }
15708
+ },
15709
+ "/v1/specs/{id}": {
15710
+ get: {
15711
+ tags: [
15712
+ "Specs"
15713
+ ],
15714
+ summary: "Get a Spec's structure",
15715
+ description: "Spec identity, version state, and its stages with their live ids.\n\n**Two stage lists, and they differ on purpose.**\n\n- `nodes` \u2014 the rail **as authored**, in editing order. Includes\n non-executing stages such as Source and Data Product.\n- `phases` \u2014 the **compiled execution plan**, in run order. Source and\n Data Product produce no phase; a validation checkpoint expands to one\n phase per member gate. So the two lists rarely have the same length.\n\n`rail_stage_id` on a phase is the join key back to `nodes[].node_id`. It\nis also the per-step cost-attribution key, so a phase here lines up with\nits spend on `GET /v1/usage/pipelines/{id}`.\n\n`phases` describes what a **new** run would execute, compiled from the\ncurrent rail. To see what a specific run actually executed, read its\nfrozen plan via `GET /v1/pipelines/{id}?include=phases` \u2014 same shape,\nsame join key.\n\nStructure and ids only: no rules, gate configuration, prompts, samples,\nor ground truth. Editing stays in the Spec editor.\n",
15716
+ operationId: "getSpec",
15717
+ parameters: [
15718
+ {
15719
+ name: "id",
15720
+ in: "path",
15721
+ required: true,
15722
+ schema: {
15723
+ type: "string",
15724
+ format: "uuid"
15725
+ }
15726
+ }
15727
+ ],
15728
+ responses: {
15729
+ "200": {
15730
+ description: "Spec structure.",
15731
+ content: {
15732
+ "application/json": {
15733
+ schema: {
15734
+ $ref: "#/components/schemas/SpecDetail"
15735
+ }
15736
+ }
15737
+ }
15738
+ },
15739
+ "401": {
15740
+ $ref: "#/components/responses/Unauthorized"
15741
+ },
15742
+ "404": {
15743
+ description: "Spec not found"
15744
+ }
15745
+ }
15746
+ }
15747
+ },
15748
+ "/v1/specs/{id}/versions": {
15749
+ get: {
15750
+ tags: [
15751
+ "Specs"
15752
+ ],
15753
+ summary: "List a Spec's published versions",
15754
+ description: "The Spec's published versions, newest first \u2014 this is where a Spec's\n\"v3\" lives.\n\nNot to be confused with `GET /v1/schemas/{id}/versions`, which reads the\nunrelated legacy schema-version counter. A Spec-authored schema never\nadvances that one, so it is normally empty for these schemas.\n",
15755
+ operationId: "listSpecVersions",
15756
+ parameters: [
15757
+ {
15758
+ name: "id",
15759
+ in: "path",
15760
+ required: true,
15761
+ schema: {
15762
+ type: "string",
15763
+ format: "uuid"
15764
+ }
15765
+ }
15766
+ ],
15767
+ responses: {
15768
+ "200": {
15769
+ description: "Published versions, newest first.",
15770
+ content: {
15771
+ "application/json": {
15772
+ schema: {
15773
+ type: "object",
15774
+ properties: {
15775
+ data: {
15776
+ type: "array",
15777
+ items: {
15778
+ $ref: "#/components/schemas/SpecVersion"
15779
+ }
15780
+ }
15781
+ }
15782
+ }
15783
+ }
15784
+ }
15785
+ },
15786
+ "401": {
15787
+ $ref: "#/components/responses/Unauthorized"
15788
+ },
15789
+ "404": {
15790
+ description: "Spec not found"
15791
+ }
15792
+ }
15793
+ }
15794
+ },
15639
15795
  "/v1/schemas/{id}/rail": {
15640
15796
  get: {
15641
15797
  tags: [
@@ -18928,6 +19084,7 @@ var openapi_default = {
18928
19084
  "Pipelines"
18929
19085
  ],
18930
19086
  summary: "Get a pipeline run",
19087
+ description: "Run detail. `?include=phases` adds the run's FROZEN phase plan \u2014 the\nconfiguration compiled when the run was created, i.e. what this run\nactually executed. That can differ from what the Spec compiles to today\n(a rail edit, a republish, a new policy version), so comparing it with\n`phases` on `GET /v1/specs/{id}` shows the drift. Same shape and the same\n`rail_stage_id` join key.\n",
18931
19088
  operationId: "getPipeline",
18932
19089
  security: [
18933
19090
  {
@@ -18943,11 +19100,68 @@ var openapi_default = {
18943
19100
  type: "string",
18944
19101
  format: "uuid"
18945
19102
  }
19103
+ },
19104
+ {
19105
+ name: "include",
19106
+ in: "query",
19107
+ required: false,
19108
+ schema: {
19109
+ type: "string",
19110
+ enum: [
19111
+ "phases"
19112
+ ]
19113
+ },
19114
+ description: "Comma-separated extras. `phases` adds the run's frozen phase plan."
18946
19115
  }
18947
19116
  ],
18948
19117
  responses: {
18949
19118
  "200": {
18950
- description: "Run detail: id, name, status, schema, phase_count, links."
19119
+ description: "Run detail: id, name, status, schema, phase_count, links (+ phases when requested).",
19120
+ content: {
19121
+ "application/json": {
19122
+ schema: {
19123
+ type: "object",
19124
+ properties: {
19125
+ id: {
19126
+ type: "string",
19127
+ format: "uuid"
19128
+ },
19129
+ name: {
19130
+ type: "string"
19131
+ },
19132
+ status: {
19133
+ type: "string"
19134
+ },
19135
+ schema: {
19136
+ type: "object",
19137
+ properties: {
19138
+ id: {
19139
+ type: "string",
19140
+ format: "uuid"
19141
+ }
19142
+ }
19143
+ },
19144
+ phase_count: {
19145
+ type: "integer"
19146
+ },
19147
+ phases: {
19148
+ type: "array",
19149
+ description: "Present only with `?include=phases`. The run's frozen plan.",
19150
+ items: {
19151
+ $ref: "#/components/schemas/SpecPhase"
19152
+ }
19153
+ },
19154
+ created_at: {
19155
+ type: "string",
19156
+ format: "date-time"
19157
+ },
19158
+ links: {
19159
+ type: "object"
19160
+ }
19161
+ }
19162
+ }
19163
+ }
19164
+ }
18951
19165
  },
18952
19166
  "404": {
18953
19167
  description: "Pipeline not found"
@@ -21893,27 +22107,299 @@ var openapi_default = {
21893
22107
  }
21894
22108
  }
21895
22109
  }
21896
- }
21897
- },
21898
- components: {
21899
- securitySchemes: {
21900
- BearerAuth: {
21901
- type: "http",
21902
- scheme: "bearer",
21903
- bearerFormat: "tlnc_*",
21904
- description: "API key with `tlnc_` prefix. Pass as `Authorization: Bearer tlnc_live_...`.\n"
21905
- },
21906
- OAuthBearerAuth: {
21907
- type: "http",
21908
- scheme: "bearer",
21909
- bearerFormat: "JWT",
21910
- description: "OAuth 2.1 access token (JWT) from the connector OAuth flow. Routes\nthat declare this scheme reject `tlnc_` API keys with `401`.\n"
22110
+ },
22111
+ "/v1/agent-tasks": {
22112
+ get: {
22113
+ operationId: "listAgentTasks",
22114
+ summary: "List Agent (via MCP) tasks visible to this credential",
22115
+ tags: [
22116
+ "Agent Tasks"
22117
+ ],
22118
+ parameters: [
22119
+ {
22120
+ name: "status",
22121
+ in: "query",
22122
+ schema: {
22123
+ type: "string",
22124
+ enum: [
22125
+ "available",
22126
+ "claimed",
22127
+ "submitted",
22128
+ "timed_out",
22129
+ "cancelled"
22130
+ ]
22131
+ }
22132
+ },
22133
+ {
22134
+ name: "limit",
22135
+ in: "query",
22136
+ schema: {
22137
+ type: "integer",
22138
+ minimum: 1,
22139
+ maximum: 100,
22140
+ default: 50
22141
+ }
22142
+ },
22143
+ {
22144
+ name: "cursor",
22145
+ in: "query",
22146
+ schema: {
22147
+ type: "string"
22148
+ }
22149
+ }
22150
+ ],
22151
+ responses: {
22152
+ "200": {
22153
+ description: "Cursor-paginated task metadata. Payloads are fetched individually and audited.",
22154
+ content: {
22155
+ "application/json": {
22156
+ schema: {
22157
+ type: "object",
22158
+ properties: {
22159
+ data: {
22160
+ type: "array",
22161
+ items: {
22162
+ $ref: "#/components/schemas/AgentTaskMetadata"
22163
+ }
22164
+ },
22165
+ pagination: {
22166
+ $ref: "#/components/schemas/CursorPagination"
22167
+ }
22168
+ }
22169
+ }
22170
+ }
22171
+ }
22172
+ },
22173
+ "401": {
22174
+ $ref: "#/components/responses/Unauthorized"
22175
+ },
22176
+ "429": {
22177
+ $ref: "#/components/responses/RateLimitExceeded"
22178
+ }
22179
+ }
21911
22180
  }
21912
22181
  },
21913
- parameters: {
21914
- ResourceId: {
21915
- name: "id",
21916
- in: "path",
22182
+ "/v1/agent-tasks/{id}": {
22183
+ get: {
22184
+ operationId: "getAgentTask",
22185
+ summary: "Fetch one Agent task payload",
22186
+ description: "Fetching the immutable snapshot is recorded as an audited data disclosure.",
22187
+ tags: [
22188
+ "Agent Tasks"
22189
+ ],
22190
+ parameters: [
22191
+ {
22192
+ name: "id",
22193
+ in: "path",
22194
+ required: true,
22195
+ schema: {
22196
+ type: "string",
22197
+ format: "uuid"
22198
+ }
22199
+ }
22200
+ ],
22201
+ responses: {
22202
+ "200": {
22203
+ description: "Task metadata, immutable input snapshot, and declared output contract.",
22204
+ content: {
22205
+ "application/json": {
22206
+ schema: {
22207
+ $ref: "#/components/schemas/AgentTaskPayload"
22208
+ }
22209
+ }
22210
+ }
22211
+ },
22212
+ "401": {
22213
+ $ref: "#/components/responses/Unauthorized"
22214
+ },
22215
+ "404": {
22216
+ $ref: "#/components/responses/NotFound"
22217
+ },
22218
+ "429": {
22219
+ $ref: "#/components/responses/RateLimitExceeded"
22220
+ }
22221
+ }
22222
+ }
22223
+ },
22224
+ "/v1/agent-tasks/{id}/claim": {
22225
+ post: {
22226
+ operationId: "claimAgentTask",
22227
+ summary: "Claim or reclaim an expired Agent task lease",
22228
+ tags: [
22229
+ "Agent Tasks"
22230
+ ],
22231
+ parameters: [
22232
+ {
22233
+ name: "id",
22234
+ in: "path",
22235
+ required: true,
22236
+ schema: {
22237
+ type: "string",
22238
+ format: "uuid"
22239
+ }
22240
+ }
22241
+ ],
22242
+ responses: {
22243
+ "200": {
22244
+ description: "Claimed task payload with a new execution epoch and lease expiry.",
22245
+ content: {
22246
+ "application/json": {
22247
+ schema: {
22248
+ $ref: "#/components/schemas/AgentTaskPayload"
22249
+ }
22250
+ }
22251
+ }
22252
+ },
22253
+ "401": {
22254
+ $ref: "#/components/responses/Unauthorized"
22255
+ },
22256
+ "404": {
22257
+ $ref: "#/components/responses/NotFound"
22258
+ },
22259
+ "409": {
22260
+ $ref: "#/components/responses/Conflict"
22261
+ },
22262
+ "429": {
22263
+ $ref: "#/components/responses/RateLimitExceeded"
22264
+ }
22265
+ }
22266
+ }
22267
+ },
22268
+ "/v1/agent-tasks/{id}/heartbeat": {
22269
+ post: {
22270
+ operationId: "heartbeatAgentTask",
22271
+ summary: "Extend the current Agent task lease",
22272
+ tags: [
22273
+ "Agent Tasks"
22274
+ ],
22275
+ parameters: [
22276
+ {
22277
+ name: "id",
22278
+ in: "path",
22279
+ required: true,
22280
+ schema: {
22281
+ type: "string",
22282
+ format: "uuid"
22283
+ }
22284
+ }
22285
+ ],
22286
+ requestBody: {
22287
+ required: true,
22288
+ content: {
22289
+ "application/json": {
22290
+ schema: {
22291
+ $ref: "#/components/schemas/AgentTaskHeartbeat"
22292
+ }
22293
+ }
22294
+ }
22295
+ },
22296
+ responses: {
22297
+ "200": {
22298
+ description: "Updated task metadata.",
22299
+ content: {
22300
+ "application/json": {
22301
+ schema: {
22302
+ $ref: "#/components/schemas/AgentTaskMetadata"
22303
+ }
22304
+ }
22305
+ }
22306
+ },
22307
+ "401": {
22308
+ $ref: "#/components/responses/Unauthorized"
22309
+ },
22310
+ "404": {
22311
+ $ref: "#/components/responses/NotFound"
22312
+ },
22313
+ "409": {
22314
+ $ref: "#/components/responses/Conflict"
22315
+ },
22316
+ "429": {
22317
+ $ref: "#/components/responses/RateLimitExceeded"
22318
+ }
22319
+ }
22320
+ }
22321
+ },
22322
+ "/v1/agent-tasks/{id}/submit": {
22323
+ post: {
22324
+ operationId: "submitAgentTask",
22325
+ summary: "Submit declared Agent output fields and resume the document",
22326
+ description: "Undeclared fields, invalid field types, stale epochs, and foreign claims are rejected before any value is written.",
22327
+ tags: [
22328
+ "Agent Tasks"
22329
+ ],
22330
+ parameters: [
22331
+ {
22332
+ name: "id",
22333
+ in: "path",
22334
+ required: true,
22335
+ schema: {
22336
+ type: "string",
22337
+ format: "uuid"
22338
+ }
22339
+ }
22340
+ ],
22341
+ requestBody: {
22342
+ required: true,
22343
+ content: {
22344
+ "application/json": {
22345
+ schema: {
22346
+ $ref: "#/components/schemas/AgentTaskSubmit"
22347
+ }
22348
+ }
22349
+ }
22350
+ },
22351
+ responses: {
22352
+ "200": {
22353
+ description: "Submitted task metadata.",
22354
+ content: {
22355
+ "application/json": {
22356
+ schema: {
22357
+ $ref: "#/components/schemas/AgentTaskMetadata"
22358
+ }
22359
+ }
22360
+ }
22361
+ },
22362
+ "400": {
22363
+ $ref: "#/components/responses/BadRequest"
22364
+ },
22365
+ "401": {
22366
+ $ref: "#/components/responses/Unauthorized"
22367
+ },
22368
+ "404": {
22369
+ $ref: "#/components/responses/NotFound"
22370
+ },
22371
+ "409": {
22372
+ $ref: "#/components/responses/Conflict"
22373
+ },
22374
+ "422": {
22375
+ $ref: "#/components/responses/ValidationError"
22376
+ },
22377
+ "429": {
22378
+ $ref: "#/components/responses/RateLimitExceeded"
22379
+ }
22380
+ }
22381
+ }
22382
+ }
22383
+ },
22384
+ components: {
22385
+ securitySchemes: {
22386
+ BearerAuth: {
22387
+ type: "http",
22388
+ scheme: "bearer",
22389
+ bearerFormat: "tlnc_*",
22390
+ description: "API key with `tlnc_` prefix. Pass as `Authorization: Bearer tlnc_live_...`.\n"
22391
+ },
22392
+ OAuthBearerAuth: {
22393
+ type: "http",
22394
+ scheme: "bearer",
22395
+ bearerFormat: "JWT",
22396
+ description: "OAuth 2.1 access token (JWT) from the connector OAuth flow. Routes\nthat declare this scheme reject `tlnc_` API keys with `401`.\n"
22397
+ }
22398
+ },
22399
+ parameters: {
22400
+ ResourceId: {
22401
+ name: "id",
22402
+ in: "path",
21917
22403
  required: true,
21918
22404
  schema: {
21919
22405
  type: "string",
@@ -22080,6 +22566,16 @@ var openapi_default = {
22080
22566
  }
22081
22567
  }
22082
22568
  },
22569
+ ValidationError: {
22570
+ description: "The request is well-formed but violates the declared task contract.",
22571
+ content: {
22572
+ "application/json": {
22573
+ schema: {
22574
+ $ref: "#/components/schemas/ErrorResponse"
22575
+ }
22576
+ }
22577
+ }
22578
+ },
22083
22579
  PayloadTooLarge: {
22084
22580
  description: "The uploaded file exceeds the size limit.",
22085
22581
  content: {
@@ -22214,6 +22710,233 @@ var openapi_default = {
22214
22710
  }
22215
22711
  },
22216
22712
  schemas: {
22713
+ CursorPagination: {
22714
+ type: "object",
22715
+ required: [
22716
+ "has_more",
22717
+ "next_cursor"
22718
+ ],
22719
+ properties: {
22720
+ has_more: {
22721
+ type: "boolean"
22722
+ },
22723
+ next_cursor: {
22724
+ type: [
22725
+ "string",
22726
+ "null"
22727
+ ]
22728
+ }
22729
+ }
22730
+ },
22731
+ AgentTaskMetadata: {
22732
+ type: "object",
22733
+ required: [
22734
+ "id",
22735
+ "customer_id",
22736
+ "pipeline_id",
22737
+ "pipeline_document_id",
22738
+ "document_id",
22739
+ "stage_id",
22740
+ "phase_index",
22741
+ "status",
22742
+ "execution_epoch",
22743
+ "timeout_at",
22744
+ "created_at",
22745
+ "updated_at"
22746
+ ],
22747
+ properties: {
22748
+ id: {
22749
+ type: "string",
22750
+ format: "uuid"
22751
+ },
22752
+ customer_id: {
22753
+ type: "string",
22754
+ format: "uuid"
22755
+ },
22756
+ pipeline_id: {
22757
+ type: "string",
22758
+ format: "uuid"
22759
+ },
22760
+ pipeline_document_id: {
22761
+ type: "string",
22762
+ format: "uuid"
22763
+ },
22764
+ document_id: {
22765
+ type: "string",
22766
+ format: "uuid"
22767
+ },
22768
+ stage_id: {
22769
+ type: "string"
22770
+ },
22771
+ phase_index: {
22772
+ type: "integer",
22773
+ minimum: 0
22774
+ },
22775
+ status: {
22776
+ type: "string",
22777
+ enum: [
22778
+ "available",
22779
+ "claimed",
22780
+ "submitted",
22781
+ "timed_out",
22782
+ "cancelled"
22783
+ ]
22784
+ },
22785
+ execution_epoch: {
22786
+ type: "integer",
22787
+ minimum: 0
22788
+ },
22789
+ claimed_at: {
22790
+ type: [
22791
+ "string",
22792
+ "null"
22793
+ ],
22794
+ format: "date-time"
22795
+ },
22796
+ lease_expires_at: {
22797
+ type: [
22798
+ "string",
22799
+ "null"
22800
+ ],
22801
+ format: "date-time"
22802
+ },
22803
+ timeout_at: {
22804
+ type: "string",
22805
+ format: "date-time"
22806
+ },
22807
+ submitted_at: {
22808
+ type: [
22809
+ "string",
22810
+ "null"
22811
+ ],
22812
+ format: "date-time"
22813
+ },
22814
+ created_at: {
22815
+ type: "string",
22816
+ format: "date-time"
22817
+ },
22818
+ updated_at: {
22819
+ type: "string",
22820
+ format: "date-time"
22821
+ }
22822
+ }
22823
+ },
22824
+ AgentTaskPayload: {
22825
+ allOf: [
22826
+ {
22827
+ $ref: "#/components/schemas/AgentTaskMetadata"
22828
+ },
22829
+ {
22830
+ type: "object",
22831
+ required: [
22832
+ "input_snapshot",
22833
+ "output_contract",
22834
+ "timeout_fallthrough"
22835
+ ],
22836
+ properties: {
22837
+ input_snapshot: {
22838
+ type: "object",
22839
+ description: "Immutable latest-cell snapshot captured when the document reached the Agent (via MCP) stage.",
22840
+ additionalProperties: true
22841
+ },
22842
+ output_contract: {
22843
+ type: "array",
22844
+ items: {
22845
+ type: "object",
22846
+ required: [
22847
+ "key",
22848
+ "dataType",
22849
+ "required"
22850
+ ],
22851
+ properties: {
22852
+ key: {
22853
+ type: "string"
22854
+ },
22855
+ dataType: {
22856
+ type: "string",
22857
+ enum: [
22858
+ "string",
22859
+ "number",
22860
+ "date",
22861
+ "boolean",
22862
+ "object",
22863
+ "array"
22864
+ ]
22865
+ },
22866
+ required: {
22867
+ type: "boolean"
22868
+ }
22869
+ }
22870
+ }
22871
+ },
22872
+ instructions: {
22873
+ type: [
22874
+ "string",
22875
+ "null"
22876
+ ]
22877
+ },
22878
+ timeout_fallthrough: {
22879
+ type: "string",
22880
+ enum: [
22881
+ "hold",
22882
+ "skip",
22883
+ "route_to_review"
22884
+ ]
22885
+ }
22886
+ }
22887
+ }
22888
+ ]
22889
+ },
22890
+ AgentTaskHeartbeat: {
22891
+ type: "object",
22892
+ required: [
22893
+ "execution_epoch"
22894
+ ],
22895
+ properties: {
22896
+ execution_epoch: {
22897
+ type: "integer",
22898
+ minimum: 1
22899
+ }
22900
+ }
22901
+ },
22902
+ AgentTaskSubmit: {
22903
+ type: "object",
22904
+ required: [
22905
+ "execution_epoch",
22906
+ "outputs"
22907
+ ],
22908
+ properties: {
22909
+ execution_epoch: {
22910
+ type: "integer",
22911
+ minimum: 1
22912
+ },
22913
+ outputs: {
22914
+ type: "object",
22915
+ additionalProperties: {
22916
+ type: "object",
22917
+ required: [
22918
+ "value"
22919
+ ],
22920
+ properties: {
22921
+ value: {},
22922
+ confidence: {
22923
+ type: "number",
22924
+ minimum: 0,
22925
+ maximum: 1
22926
+ },
22927
+ reasoning: {
22928
+ type: "string",
22929
+ maxLength: 4e3
22930
+ }
22931
+ }
22932
+ }
22933
+ },
22934
+ summary: {
22935
+ type: "string",
22936
+ maxLength: 4e3
22937
+ }
22938
+ }
22939
+ },
22217
22940
  OntologyDoctype: {
22218
22941
  type: "object",
22219
22942
  required: [
@@ -23347,7 +24070,37 @@ var openapi_default = {
23347
24070
  id: {
23348
24071
  type: "string",
23349
24072
  format: "uuid",
23350
- example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
24073
+ example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
24074
+ },
24075
+ short_id: {
24076
+ type: "string",
24077
+ description: "Short form of `id` (`SCH-` + the first 8 hex characters, uppercased). Accepted wherever `{id}` is.",
24078
+ example: "SCH-A1B2C3D4"
24079
+ },
24080
+ spec_id: {
24081
+ type: [
24082
+ "string",
24083
+ "null"
24084
+ ],
24085
+ format: "uuid",
24086
+ description: "The Spec that authors this schema, or `null` when the schema was created\ndirectly (via `POST /v1/schemas` or the legacy editor). This is the id in\nthe Spec editor URL (`/specs/{spec_id}`) and is a DIFFERENT id from the\nschema `id` above \u2014 a Spec is materialized onto a schema, it is not the\nsame record. Use this to cross between the two.\n",
24087
+ example: "e2144027-39c0-44e8-a196-72be1e360749"
24088
+ },
24089
+ spec_version: {
24090
+ type: [
24091
+ "integer",
24092
+ "null"
24093
+ ],
24094
+ description: "The Spec's published head version \u2014 the number shown in the Spec editor.\n`null` when `spec_id` is `null`, or when the Spec has never been published.\nNot the same counter as `version` below.\n",
24095
+ example: 3
24096
+ },
24097
+ spec_materialized_version: {
24098
+ type: [
24099
+ "integer",
24100
+ "null"
24101
+ ],
24102
+ description: "The Spec version whose configuration is live on this schema \u2014 what a run of\nit actually executes. Normally equal to `spec_version`; it lags when a\npublish was refused by the acknowledgement gate or a stale activation\nno-opped. `null` when `spec_id` is `null`.\n",
24103
+ example: 3
23351
24104
  },
23352
24105
  name: {
23353
24106
  type: "string",
@@ -23416,6 +24169,7 @@ var openapi_default = {
23416
24169
  },
23417
24170
  version: {
23418
24171
  type: "integer",
24172
+ description: "Legacy schema-version counter, advanced by the version endpoints\n(`/v1/schemas/{id}/versions`). A Spec-authored schema never advances it \u2014\nread `spec_version` for those.\n",
23419
24173
  example: 1
23420
24174
  },
23421
24175
  created_at: {
@@ -23445,6 +24199,337 @@ var openapi_default = {
23445
24199
  }
23446
24200
  }
23447
24201
  },
24202
+ SpecSummary: {
24203
+ type: "object",
24204
+ required: [
24205
+ "id",
24206
+ "name"
24207
+ ],
24208
+ properties: {
24209
+ id: {
24210
+ type: "string",
24211
+ format: "uuid",
24212
+ description: "The Spec id \u2014 the one in the `/specs/{id}` editor URL.",
24213
+ example: "e2144027-39c0-44e8-a196-72be1e360749"
24214
+ },
24215
+ name: {
24216
+ type: "string",
24217
+ example: "Bridgeway V25"
24218
+ },
24219
+ description: {
24220
+ type: [
24221
+ "string",
24222
+ "null"
24223
+ ]
24224
+ },
24225
+ schema_id: {
24226
+ type: [
24227
+ "string",
24228
+ "null"
24229
+ ],
24230
+ format: "uuid",
24231
+ description: "The schema this Spec is materialized onto \u2014 a DIFFERENT record from the\nSpec. `null` until the Spec is first published. Use it against\n`/v1/schemas/{schema_id}` and its sub-resources.\n",
24232
+ example: "2e3ddf8c-b9ab-4934-bb11-a371e9c5d7a8"
24233
+ },
24234
+ version: {
24235
+ type: [
24236
+ "integer",
24237
+ "null"
24238
+ ],
24239
+ description: "Published head version \u2014 what the editor shows. `null` if never published.",
24240
+ example: 3
24241
+ },
24242
+ materialized_version: {
24243
+ type: [
24244
+ "integer",
24245
+ "null"
24246
+ ],
24247
+ description: "The version whose configuration is live on the schema \u2014 what a run\nexecutes. Normally equal to `version`; it lags when a publish was\nrefused by the acknowledgement gate or a stale activation no-opped.\n",
24248
+ example: 3
24249
+ },
24250
+ materialized_at: {
24251
+ type: [
24252
+ "string",
24253
+ "null"
24254
+ ],
24255
+ format: "date-time"
24256
+ },
24257
+ field_count: {
24258
+ type: "integer",
24259
+ description: "Fields declared by the Spec.",
24260
+ example: 60
24261
+ },
24262
+ node_count: {
24263
+ type: "integer",
24264
+ description: "Stages in the rail \u2014 the `nodes` count on the detail route. NOT the\nnumber of executable phases: a Source or Data Product marker compiles\nto no phase and a validation checkpoint expands to one per gate, so\nread `phases` on `GET /v1/specs/{id}` for the executable plan.\n",
24265
+ example: 7
24266
+ },
24267
+ created_at: {
24268
+ type: "string",
24269
+ format: "date-time"
24270
+ },
24271
+ updated_at: {
24272
+ type: "string",
24273
+ format: "date-time"
24274
+ },
24275
+ links: {
24276
+ type: "object",
24277
+ properties: {
24278
+ self: {
24279
+ type: "string"
24280
+ },
24281
+ versions: {
24282
+ type: "string"
24283
+ },
24284
+ schema: {
24285
+ type: "string",
24286
+ description: "Present only once the Spec has a schema."
24287
+ },
24288
+ rail: {
24289
+ type: "string",
24290
+ description: "Present only once the Spec has a schema."
24291
+ },
24292
+ dashboard: {
24293
+ type: "string",
24294
+ format: "uri"
24295
+ }
24296
+ }
24297
+ }
24298
+ }
24299
+ },
24300
+ SpecDetail: {
24301
+ allOf: [
24302
+ {
24303
+ $ref: "#/components/schemas/SpecSummary"
24304
+ },
24305
+ {
24306
+ type: "object",
24307
+ properties: {
24308
+ schema: {
24309
+ type: [
24310
+ "object",
24311
+ "null"
24312
+ ],
24313
+ properties: {
24314
+ id: {
24315
+ type: "string",
24316
+ format: "uuid"
24317
+ },
24318
+ name: {
24319
+ type: "string"
24320
+ }
24321
+ }
24322
+ },
24323
+ nodes: {
24324
+ type: "array",
24325
+ description: "The rail as authored, in editing order.",
24326
+ items: {
24327
+ $ref: "#/components/schemas/SpecNode"
24328
+ }
24329
+ },
24330
+ phases: {
24331
+ type: "array",
24332
+ description: "The compiled execution plan, in run order \u2014 what a NEW run would\nexecute. Shorter or longer than `nodes`: Source and Data Product\nproduce no phase, a checkpoint expands to one phase per gate.\n",
24333
+ items: {
24334
+ $ref: "#/components/schemas/SpecPhase"
24335
+ }
24336
+ },
24337
+ fields: {
24338
+ type: "array",
24339
+ description: "Spec-field \u2194 schema-field correspondence.",
24340
+ items: {
24341
+ $ref: "#/components/schemas/SpecFieldMapping"
24342
+ }
24343
+ }
24344
+ }
24345
+ }
24346
+ ]
24347
+ },
24348
+ SpecNode: {
24349
+ type: "object",
24350
+ description: "One rail stage. Carries identity and the live ids the stage points at;\nauthoring configuration (lane predicates, assembly grouping, gate target\nphases) is not included.\n",
24351
+ properties: {
24352
+ node_id: {
24353
+ type: [
24354
+ "string",
24355
+ "null"
24356
+ ],
24357
+ description: "Stage id within the Spec. `null` on a legacy rail that keyed stages by position.",
24358
+ example: "s-schema"
24359
+ },
24360
+ position: {
24361
+ type: "integer",
24362
+ description: "0-based index in the rail.",
24363
+ example: 1
24364
+ },
24365
+ type: {
24366
+ type: "string",
24367
+ enum: [
24368
+ "source",
24369
+ "registry",
24370
+ "schema",
24371
+ "resolve",
24372
+ "valid",
24373
+ "assembly",
24374
+ "deliver",
24375
+ "reconcile",
24376
+ "sanitize",
24377
+ "triage",
24378
+ "switch"
24379
+ ],
24380
+ example: "schema"
24381
+ },
24382
+ name: {
24383
+ type: [
24384
+ "string",
24385
+ "null"
24386
+ ],
24387
+ example: "Extraction"
24388
+ },
24389
+ schema_id: {
24390
+ type: "string",
24391
+ format: "uuid",
24392
+ description: "The schema this stage reads/writes."
24393
+ },
24394
+ policy_ids: {
24395
+ type: "array",
24396
+ description: "`data_policies` ids \u2014 resolve stages.",
24397
+ items: {
24398
+ type: "string",
24399
+ format: "uuid"
24400
+ }
24401
+ },
24402
+ validation_stage_ids: {
24403
+ type: "array",
24404
+ description: "`validation_stages` ids \u2014 the gates a checkpoint contains.",
24405
+ items: {
24406
+ type: "string",
24407
+ format: "uuid"
24408
+ }
24409
+ },
24410
+ matcher_stage_id: {
24411
+ type: "string",
24412
+ format: "uuid",
24413
+ description: "`matcher_stages` id \u2014 reconcile stages."
24414
+ },
24415
+ source_pipeline_id: {
24416
+ type: "string",
24417
+ format: "uuid",
24418
+ description: "Upstream run, when the Source stage injects from a pipeline."
24419
+ }
24420
+ }
24421
+ },
24422
+ SpecPhase: {
24423
+ type: "object",
24424
+ description: "One compiled phase. The identical shape is returned by\n`GET /v1/pipelines/{id}?include=phases` for a run's frozen plan, so the\ntwo are directly comparable.\n",
24425
+ properties: {
24426
+ number: {
24427
+ type: "integer",
24428
+ description: "1-based execution order.",
24429
+ example: 3
24430
+ },
24431
+ phase_id: {
24432
+ type: [
24433
+ "string",
24434
+ "null"
24435
+ ],
24436
+ description: "Positional id within the plan.",
24437
+ example: "phase-3"
24438
+ },
24439
+ type: {
24440
+ type: [
24441
+ "string",
24442
+ "null"
24443
+ ],
24444
+ example: "matching"
24445
+ },
24446
+ name: {
24447
+ type: [
24448
+ "string",
24449
+ "null"
24450
+ ],
24451
+ example: "Matching"
24452
+ },
24453
+ rail_stage_id: {
24454
+ type: [
24455
+ "string",
24456
+ "null"
24457
+ ],
24458
+ description: "The rail stage this phase compiled from \u2014 join key to\n`nodes[].node_id`, and the per-step cost-attribution key on\n`/v1/usage/pipelines/{id}`. `null` only for a rail-less extraction.\n",
24459
+ example: "3a76507f-00ef-4ebd-b8f1-e78a02139634"
24460
+ },
24461
+ policy_id: {
24462
+ type: "string",
24463
+ format: "uuid",
24464
+ description: "Resolution phases."
24465
+ },
24466
+ validation_stage_id: {
24467
+ type: "string",
24468
+ format: "uuid",
24469
+ description: "Validation phases \u2014 one per gate."
24470
+ },
24471
+ matcher_stage_id: {
24472
+ type: "string",
24473
+ format: "uuid",
24474
+ description: "Matching phases."
24475
+ },
24476
+ scope: {
24477
+ type: "string",
24478
+ description: "`pipeline` for a post-assembly phase; absent in the per-document loop."
24479
+ }
24480
+ }
24481
+ },
24482
+ SpecFieldMapping: {
24483
+ type: "object",
24484
+ description: "Pairs a Spec field with the schema field that holds its values. `field_id`\nis the Spec document's immutable field identity \u2014 what lane conditions,\nassembly anchors, gate scopes and ground-truth keys reference \u2014 while\n`user_schema_field_id` is the runtime row. This pairing is available\nnowhere else on the API.\n",
24485
+ properties: {
24486
+ field_id: {
24487
+ type: "string",
24488
+ format: "uuid",
24489
+ example: "c086cb2d-06bf-4c22-9007-c6e455531133"
24490
+ },
24491
+ user_schema_field_id: {
24492
+ type: "string",
24493
+ format: "uuid",
24494
+ example: "a3952c40-9f78-41a3-975f-57c5c79c3fae"
24495
+ },
24496
+ name: {
24497
+ type: [
24498
+ "string",
24499
+ "null"
24500
+ ],
24501
+ example: "shipper_number"
24502
+ },
24503
+ type: {
24504
+ type: [
24505
+ "string",
24506
+ "null"
24507
+ ],
24508
+ example: "string"
24509
+ }
24510
+ }
24511
+ },
24512
+ SpecVersion: {
24513
+ type: "object",
24514
+ properties: {
24515
+ version: {
24516
+ type: "integer",
24517
+ example: 3
24518
+ },
24519
+ content_hash: {
24520
+ type: "string",
24521
+ description: "sha256 of the canonical Spec document \u2014 identical hashes are identical Specs."
24522
+ },
24523
+ created_at: {
24524
+ type: "string",
24525
+ format: "date-time"
24526
+ },
24527
+ is_materialized: {
24528
+ type: "boolean",
24529
+ description: "Whether this is the version currently live on the schema."
24530
+ }
24531
+ }
24532
+ },
23448
24533
  SchemaCreateRequest: {
23449
24534
  type: "object",
23450
24535
  required: [
@@ -29712,6 +30797,11 @@ var API_NAV_SECTIONS = [
29712
30797
  { id: "field-review-triage", label: "Triage Breakdown" },
29713
30798
  { id: "field-review-value-clusters", label: "Value Clusters" }
29714
30799
  ] },
30800
+ { id: "specs", label: "Specs", children: [
30801
+ { id: "list-specs", label: "List Specs" },
30802
+ { id: "get-spec", label: "Get a Spec" },
30803
+ { id: "spec-published-versions", label: "Published Versions" }
30804
+ ] },
29715
30805
  { id: "spec-config", label: "Spec Config", children: [
29716
30806
  { id: "get-spec-rail", label: "Get Rail" },
29717
30807
  { id: "set-spec-rail", label: "Set Rail" },